/* Main Styles for FleetFix Application */

/* Global variables */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  
  --primary-bg: #ffffff;
  --secondary-bg: #f8f9fa;
  --card-bg: #ffffff;
  --text-color: #212529;
  --border-color: #dee2e6;
}

/* Base styles */
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--secondary-bg);
  color: var(--text-color);
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

.container-fluid {
  padding: 0;
}

/* Navigation styles */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background-color: var(--primary-bg);
}

.navbar-brand img {
  max-height: 40px;
}

/* Card styles */
.card {
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
}

.card-header {
  background-color: var(--primary-bg);
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 500;
}

/* Forms */
.form-control, .form-select {
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Buttons */
.btn {
  border-radius: 0.25rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

/* Utility classes */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0062cc 100%);
}

/* Status badges and indicators */
.badge {
  padding: 0.5em 0.75em;
  font-weight: 500;
  border-radius: 0.25rem;
}

/* Priority indicators */
.priority-low {
  background-color: #d1ecf1;
  color: #0c5460;
}

.priority-medium {
  background-color: #fff3cd;
  color: #856404;
}

.priority-high {
  background-color: #f8d7da;
  color: #721c24;
}

.priority-emergency {
  background-color: #dc3545;
  color: #fff;
}

/* Status indicators */
.status-requested {
  background-color: #cce5ff;
  color: #004085;
}

.status-assigned {
  background-color: #d4edda;
  color: #155724;
}

.status-in_progress {
  background-color: #fff3cd;
  color: #856404;
}

.status-completed {
  background-color: #d1e7dd;
  color: #0f5132;
}

.status-invoiced {
  background-color: #d1d3e2;
  color: #3a3b45;
}

/* Dashboard widgets */
.dashboard-stat {
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
}

.dashboard-stat-icon {
  font-size: 2rem;
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: rgba(0,123,255,0.1);
  color: var(--primary-color);
}

.dashboard-stat-content {
  flex: 1;
}

.dashboard-stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.dashboard-stat-label {
  font-size: 0.875rem;
  color: var(--secondary-color);
}

/* Jobs list */
.job-list-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.job-list-item:last-child {
  border-bottom: none;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .dashboard-stat {
    padding: 1rem;
  }
  
  .dashboard-stat-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
  }
  
  .dashboard-stat-number {
    font-size: 1.5rem;
  }
}

/* Login page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary-bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo img {
  max-width: 200px;
}

/* Footer */
.footer {
  background-color: var(--primary-bg);
  padding: 1.5rem 0;
  margin-top: 2rem;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}

/* Mobile improvements */
@media (max-width: 576px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .card {
    border-radius: 0.375rem;
  }
  
  .table {
    font-size: 0.875rem;
  }
}

/* Notifications */
.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.75rem;
  background-color: var(--danger-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 50%;
  transform: translate(25%, -25%);
}

.notification-list {
  max-height: 300px;
  overflow-y: auto;
}

.notification-item {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.notification-item.unread {
  background-color: rgba(0,123,255,0.05);
}

.notification-item:last-child {
  border-bottom: none;
}

/* Timeline */
.timeline {
  position: relative;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1rem;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 1.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 2px solid white;
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}

.timeline-content {
  padding: 1rem;
  background-color: var(--primary-bg);
  border-radius: 0.375rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Progressive enhancement for larger screens */
@media (min-width: 992px) {
  .sidebar {
    position: sticky;
    top: 1rem;
  }
  
  .main-content {
    padding-left: 1.5rem;
  }
}