/* Import Roboto font */
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400;500;600;700&display=swap');

/* OnTow Branding Colors */
:root {
  --ontow-primary: #f97316; /* Vibrant orange */
  --ontow-primary-dark: #ea580c;
  --ontow-primary-light: #fb923c;
  --ontow-secondary: #6b7280;
  --ontow-success: #16a34a;
  --ontow-danger: #ef4444;
  --ontow-warning: #fbbf24;
  --ontow-info: #0ea5e9;
  --ontow-light: #f8fafc;
  --ontow-dark: #1f2937;
  --ontow-background: #eef2ff;
  --ontow-surface: rgba(255, 255, 255, 0.92);
  --ontow-border: rgba(15, 23, 42, 0.08);
  --ontow-muted: #64748b;
  --ontow-shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.08);
  --ontow-shadow-md: 0 20px 45px rgba(15, 23, 42, 0.12);
  --ontow-radius-lg: 18px;
  --ontow-radius-md: 14px;
  --ontow-radius-sm: 10px;
  --ontow-glass: rgba(255, 255, 255, 0.55);
  --ontow-backdrop-blur: blur(14px);

  /* Ontario Colors */
  --ontario-blue: #003366;
  --ontario-red: #990000;
  --ontario-gold: #ffcc00;

  /* Custom Colors */
  --ontow-truck-blue: #1e3a8a;
  --ontow-truck-red: #dc2626;
}

/* Base Styles */
body {
  font-family: 'Work Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.65) 0%, rgba(238, 242, 255, 0.9) 55%, rgba(226, 232, 240, 0.9) 100%);
  color: var(--ontow-dark);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ontow-primary);
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus {
  color: var(--ontow-primary-dark);
}

hr {
  border-color: rgba(15, 23, 42, 0.08);
  margin: 1.5rem 0;
}

.page-title {
  font-weight: 600;
  color: var(--ontow-dark);
  margin-bottom: 0.75rem;
}

.page-subtitle {
  color: var(--ontow-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ontow-dark);
  font-weight: 600;
  letter-spacing: -0.015em;
}

p {
  color: var(--ontow-muted);
}

.btn {
  border-radius: var(--ontow-radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  padding: 0.65rem 1.2rem;
  box-shadow: var(--ontow-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: var(--ontow-shadow-md);
}

.btn-primary {
  background: linear-gradient(135deg, var(--ontow-primary), var(--ontow-primary-dark));
  border-color: transparent;
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--ontow-primary-dark), #c2410c);
}

.btn-secondary {
  background: linear-gradient(135deg, #4b5563, #1f2937);
  border-color: transparent;
  color: #ffffff;
}

.btn-light {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--ontow-border);
  color: var(--ontow-dark);
  box-shadow: none;
}

.btn-light:hover,
.btn-light:focus {
  background: rgba(255, 255, 255, 1);
  box-shadow: var(--ontow-shadow-sm);
}

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

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: rgba(249, 115, 22, 0.1);
  border-color: var(--ontow-primary-dark);
  color: var(--ontow-primary-dark);
}

/* ========================
   Auth / Login
======================== */

.login-hero {
  position: relative;
  overflow: hidden;
  align-items: stretch;
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.35), transparent 55%),
              linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  padding: 3rem;
  color: #fff;
}

.login-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(249, 115, 22, 0.25) 0%, rgba(14, 165, 233, 0.05) 50%, rgba(14, 165, 233, 0.35) 100%);
  opacity: 0.9;
}

.login-hero__pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.25) 1px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.35;
}

.login-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.login-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.login-hero__title {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.login-hero__tagline {
  font-size: 1.05rem;
  color: rgba(226, 232, 240, 0.85);
  line-height: 1.7;
}

.login-hero__highlights {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 1rem;
}

.login-hero__highlights li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.9);
}

.login-hero__highlights i {
  color: var(--ontow-warning);
  background: rgba(249, 115, 22, 0.18);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-hero__cards {
  display: grid;
  gap: 1rem;
}

.login-hero-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--ontow-radius-md);
  padding: 1rem 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.login-hero-card.glass {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.login-hero-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.login-hero-card p {
  margin: 0;
  color: rgba(226, 232, 240, 0.75);
  font-size: 0.9rem;
}

.login-hero-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: rgba(249, 115, 22, 0.22);
  color: var(--ontow-warning);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.22);
}

.login-hero__cards .glass .login-hero-card__icon {
  background: rgba(14, 165, 233, 0.22);
  color: #38bdf8;
}

.login-hero__cards .glass h3 {
  color: #e0f2fe;
}

.login-hero__cards .glass p {
  color: rgba(224, 242, 254, 0.8);
}

.login-hero .login-hero__content > div:last-child {
  margin-top: auto;
}

@media (max-width: 991.98px) {
  .login-hero {
    display: none;
  }
}

.login-form-panel {
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--ontow-radius-lg);
  box-shadow: var(--ontow-shadow-sm);
  padding: 2.5rem 2rem;
  border: 1px solid var(--ontow-border);
  backdrop-filter: var(--ontow-backdrop-blur);
  max-width: 420px;
  width: min(100%, 420px);
}

.login-form-panel h2 {
  color: var(--ontow-dark);
}

.login-form-panel p.text-muted,
.login-form-panel .form-check-label {
  color: var(--ontow-muted) !important;
}

.login-form-panel .form-control,
.login-form-panel .input-group-text {
  box-shadow: none;
}

.login-form-panel .form-control:focus {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.badge {
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  background: var(--ontow-surface);
  box-shadow: var(--ontow-shadow-sm);
  border-radius: var(--ontow-radius-md);
  overflow: hidden;
}

.table thead th {
  background: rgba(15, 23, 42, 0.05);
  border-bottom: none;
  color: var(--ontow-muted);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(249, 115, 22, 0.08);
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--ontow-radius-sm);
  border: 1px solid var(--ontow-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  padding: 0.65rem 0.9rem;
  color: var(--ontow-dark);
}

.form-control::placeholder {
  color: rgba(100, 116, 139, 0.65);
}

.form-control:disabled,
.form-select:disabled {
  background: rgba(148, 163, 184, 0.1);
  cursor: not-allowed;
}

/* GPS Tracking Styles */
.gps-tracking-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  padding: 2rem;
  color: white;
  margin-bottom: 2rem;
}

.tracking-status-card {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--ontow-radius-md);
  transition: all 0.3s ease;
}

.tracking-status-card:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-4px);
  box-shadow: var(--ontow-shadow-md);
}

.tracking-map-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

#trackingMap {
  border-radius: 12px;
}

.driver-marker {
  background: #28a745;
  border: 3px solid white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.driver-marker.moving {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.geofence-circle {
  fill: rgba(0, 123, 255, 0.1);
  stroke: #007bff;
  stroke-width: 2;
  stroke-dasharray: 5, 5;
}

.geofence-center {
  background: #007bff;
  border: 2px solid white;
  border-radius: 50%;
  width: 12px;
  height: 12px;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e9ecef;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-content {
  background: var(--ontow-surface);
  padding: 1rem;
  border-radius: var(--ontow-radius-sm);
  box-shadow: var(--ontow-shadow-sm);
  border: 1px solid var(--ontow-border);
}

.timeline-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-text {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.driver-item {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.driver-item:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
}

.driver-item.selected {
  background-color: #e3f2fd;
  border-left: 4px solid #2196f3;
}

.speed-indicator {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.speed-low { background: #d4edda; color: #155724; }
.speed-medium { background: #fff3cd; color: #856404; }
.speed-high { background: #f8d7da; color: #721c24; }

.location-accuracy {
  font-size: 0.7rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.location-accuracy.high { color: #28a745; }
.location-accuracy.medium { color: #ffc107; }
.location-accuracy.low { color: #dc3545; }

.eta-form {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 1.5rem;
  color: white;
}

.eta-form .form-control {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.eta-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.eta-form .form-control:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
  color: white;
}

.session-controls {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  border-radius: 12px;
  padding: 1.5rem;
  color: white;
}

.session-active {
  background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
}

.map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

.map-control-btn {
  background: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem;
  margin-left: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.map-control-btn:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.map-control-btn.active {
  background: #007bff;
  color: white;
}

.location-permission-modal {
  text-align: center;
}

.location-permission-icon {
  font-size: 4rem;
  color: #ffc107;
  margin-bottom: 1rem;
}

.tracking-disabled-state {
  text-align: center;
  padding: 3rem;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 15px;
  color: white;
}

.tracking-disabled-icon {
  font-size: 5rem;
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

.gps-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.gps-stat-card {
  background: var(--ontow-surface);
  border-radius: var(--ontow-radius-md);
  padding: 1.5rem;
  box-shadow: var(--ontow-shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--ontow-border);
}

.gps-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ontow-shadow-md);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
}

.geofence-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

.geofence-job-site { background: #e3f2fd; color: #1976d2; }
.geofence-depot { background: #e8f5e8; color: #2e7d32; }
.geofence-service-area { background: #fff3e0; color: #f57c00; }
.geofence-restricted { background: #ffebee; color: #d32f2f; }

@media (max-width: 768px) {
  .gps-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline {
    padding-left: 1.5rem;
  }
  
  .timeline-marker {
    left: -1.5rem;
  }
  
  .map-controls {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 1rem;
  }
}

/* Marketplace Styles */
.marketplace-listing {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--ontow-border);
  border-radius: var(--ontow-radius-md);
  box-shadow: var(--ontow-shadow-sm);
  background: var(--ontow-surface);
}

.marketplace-listing:hover {
  transform: translateY(-4px);
  box-shadow: var(--ontow-shadow-md);
}

.listing-image {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.listing-placeholder {
  height: 200px;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
}

.listing-placeholder-large {
  height: 400px;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
}

.listing-main-image {
  height: 400px;
  object-fit: cover;
  cursor: pointer;
}

.listing-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.listing-badges .badge {
  margin-right: 5px;
  margin-bottom: 5px;
}

.listing-stats {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 5px 10px;
  border-radius: 15px;
  z-index: 2;
}

.thumbnail-nav {
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: border-color 0.2s;
}

.thumbnail-nav:hover,
.thumbnail-nav.active {
  border-color: var(--ontow-primary);
}

.similar-thumb {
  height: 80px;
  object-fit: cover;
}

.similar-thumb-placeholder {
  height: 80px;
  background-color: #f8f9fa;
  border: 1px dashed #dee2e6;
}

.favorite-btn {
  transition: all 0.2s ease-in-out;
}

.favorite-btn:hover {
  transform: scale(1.05);
}

.border-left-primary {
  border-left: 0.25rem solid var(--ontow-primary) !important;
}

.border-left-success {
  border-left: 0.25rem solid var(--ontow-success) !important;
}

.border-left-info {
  border-left: 0.25rem solid var(--ontow-info) !important;
}

.border-left-warning {
  border-left: 0.25rem solid var(--ontow-warning) !important;
}

.text-primary {
  color: var(--ontow-primary) !important;
}

.bg-primary {
  background-color: var(--ontow-primary) !important;
}

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

.btn-primary:hover,
.btn-primary:focus {
  background-color: #e06b0d;
  border-color: #e06b0d;
}

/* Marketplace specific card styles */
.marketplace-listing .card-body {
  padding: 1rem;
}

.marketplace-listing .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.marketplace-listing .price h4 {
  font-weight: 700;
  color: var(--ontow-success);
}

.listing-details small {
  display: block;
  margin-bottom: 2px;
}

/* Photo upload preview */
.photo-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.photo-preview-item {
  position: relative;
  width: 120px;
  height: 120px;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e9ecef;
}

.photo-preview-item .remove-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ontow-danger);
  color: white;
  border: none;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-preview-item .primary-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  font-size: 10px;
  padding: 2px 6px;
}

/* Form enhancements */
.form-label {
  font-weight: 500;
  color: var(--ontow-dark);
  margin-bottom: 0.5rem;
}

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

/* Status badges */
.badge.bg-primary {
  background-color: var(--ontow-primary) !important;
}

.badge.bg-success {
  background-color: var(--ontow-success) !important;
}

.badge.bg-warning {
  background-color: var(--ontow-warning) !important;
  color: var(--ontow-dark) !important;
}

.badge.bg-secondary {
  background-color: var(--ontow-secondary) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .listing-image,
  .listing-placeholder {
    height: 150px;
  }
  
  .listing-main-image {
    height: 250px;
  }
  
  .marketplace-listing .card-title {
    font-size: 1rem;
  }
  
  .listing-badges {
    top: 5px;
    left: 5px;
  }
  
  .listing-stats {
    bottom: 5px;
    right: 5px;
    padding: 3px 8px;
    font-size: 0.8rem;
  }
}

/* Animation for loading states */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Marketplace filter section */
.filter-section {
  background: var(--ontow-surface);
  border-radius: var(--ontow-radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--ontow-shadow-sm);
  border: 1px solid var(--ontow-border);
  backdrop-filter: var(--ontow-backdrop-blur);
}

.filter-section .form-control,
.filter-section .form-select {
  border: 1px solid #dee2e6;
  border-radius: 6px;
}

/* Stats cards animation */
.stats-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: var(--ontow-surface);
  border-radius: var(--ontow-radius-md);
  box-shadow: var(--ontow-shadow-sm);
  border: 1px solid var(--ontow-border);
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ontow-shadow-md);
}

/* Login Page Styles */
.bg-primary {
  background: linear-gradient(135deg, var(--ontario-blue), #0f172a) !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ontow-primary), var(--ontow-primary-dark));
  border-color: transparent;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ontow-primary-dark), #c2410c);
  border-color: transparent;
}

/* Dashboard Styles */
.sidebar {
  background: var(--ontow-glass);
  backdrop-filter: var(--ontow-backdrop-blur);
  box-shadow: var(--ontow-shadow-sm);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0;
  min-height: 100vh;
}

.sidebar .position-sticky {
  padding: 1rem 0;
}

.sidebar-heading {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ontow-secondary);
}

.nav.flex-column {
  padding: 0;
}

.nav-link {
  color: var(--ontow-muted);
  padding: 0.75rem 1.1rem;
  border-radius: var(--ontow-radius-sm);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  font-weight: 500;
  position: relative;
  gap: 0.75rem;
}

.nav-link i {
  width: 1.5rem;
  text-align: center;
  font-size: 1rem;
  color: inherit;
  transition: inherit;
}

.nav-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(249, 115, 22, 0.08));
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: -1;
}

.nav-link:hover {
  color: var(--ontow-primary);
  transform: translateX(4px);
  box-shadow: var(--ontow-shadow-sm);
}

.nav-link:hover::after {
  opacity: 1;
}

.nav-link.active {
  color: #ffffff;
  font-weight: 600;
  box-shadow: var(--ontow-shadow-sm);
  background: linear-gradient(135deg, var(--ontow-primary), var(--ontow-primary-dark));
}

.nav-link.active::after {
  opacity: 0;
}

.nav-link.active i {
  color: #ffffff;
}

.nav-item {
  width: auto;
  margin-bottom: 0.125rem;
}

/* ========================
   Dashboard Sidebar
======================== */

.sidebar {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #0b1120 100%);
  color: rgba(226, 232, 240, 0.85);
  min-height: 100vh;
  border-right: 1px solid rgba(15, 23, 42, 0.35);
  position: relative;
  overflow-y: auto;
  padding: 0;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.sidebar__wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2.25rem 1.5rem 1.75rem;
  gap: 2rem;
}

.sidebar__brand {
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--ontow-radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.sidebar__brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(14, 165, 233, 0.25));
  color: #fbbf24;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.2);
}

.sidebar__brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.sidebar__brand-subtitle {
  color: rgba(226, 232, 240, 0.7);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.sidebar__section-title {
  color: rgba(226, 232, 240, 0.58);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  margin-bottom: 0.75rem;
  padding-left: 0.35rem;
}

.sidebar__menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--ontow-radius-sm);
  color: rgba(226, 232, 240, 0.75);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.sidebar-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(14, 165, 233, 0.12));
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: -1;
}

.sidebar-link__icon,
.sidebar-sublink__icon {
  width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.sidebar-link__label,
.sidebar-sublink__label {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.sidebar-link__chevron {
  transition: transform 0.25s ease;
  color: rgba(226, 232, 240, 0.55);
}

.sidebar-link:hover,
.sidebar-link:focus {
  color: #fff;
  transform: translateX(4px);
  box-shadow: var(--ontow-shadow-sm);
}

.sidebar-link:hover::after,
.sidebar-link:focus::after {
  opacity: 1;
}

.sidebar-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.7), rgba(249, 115, 22, 0.45));
  box-shadow: var(--ontow-shadow-sm);
}

.sidebar-link.active::after {
  opacity: 0;
}

.sidebar-link.active .sidebar-link__icon i {
  color: #fff;
}

.sidebar-link--collapsible[aria-expanded="true"] .sidebar-link__chevron {
  transform: rotate(180deg);
}

.sidebar-submenu {
  margin: 0.35rem 0 0.75rem 0;
  border-left: 2px dashed rgba(148, 163, 184, 0.15);
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-sublink {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--ontow-radius-sm);
  color: rgba(226, 232, 240, 0.68);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.sidebar-sublink:hover,
.sidebar-sublink:focus {
  color: #fff;
  background: rgba(249, 115, 22, 0.12);
  transform: translateX(4px);
}

.sidebar-sublink.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.18);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.25);
}

.sidebar__insights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
}

.sidebar__insight-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.25rem;
  border-radius: var(--ontow-radius-md);
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--ontow-shadow-sm);
  color: #fff;
}

.sidebar__insight-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.32), rgba(14, 165, 233, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fbbf24;
}

.sidebar__insight-label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.68);
}

.sidebar__insight-value {
  font-size: 1.4rem;
  font-weight: 700;
}

.sidebar__progress {
  padding: 1rem 1.25rem;
  border-radius: var(--ontow-radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: rgba(226, 232, 240, 0.85);
}

.sidebar__progress-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.sidebar__progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  overflow: hidden;
}

.sidebar__progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.8), rgba(14, 165, 233, 0.8));
}

.sidebar__progress-value {
  font-size: 0.85rem;
  font-weight: 600;
  align-self: flex-end;
}

@media (max-width: 991.98px) {
  .sidebar__wrapper {
    padding: 1.5rem 1.25rem;
  }

  .sidebar__brand {
    padding: 0.85rem 1rem;
  }

  .sidebar-link {
    grid-template-columns: 36px 1fr auto;
  }

  .sidebar-link__icon,
  .sidebar-sublink__icon {
    width: 36px;
  }

  .sidebar-submenu {
    padding-left: 0.75rem;
  }
}

/* Main Content Area */
main.col-md-9 {
  background-color: transparent;
  min-height: 100vh;
  padding: 2rem 2.5rem;
}

/* Card Styles */
.card {
  border: 1px solid var(--ontow-border);
  box-shadow: var(--ontow-shadow-sm);
  border-radius: var(--ontow-radius-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--ontow-surface);
  backdrop-filter: var(--ontow-backdrop-blur);
}

.card:hover {
  box-shadow: var(--ontow-shadow-md);
  transform: translateY(-4px);
}

.card-header,
.card-footer {
  background: transparent;
  border-color: rgba(15, 23, 42, 0.05);
  font-weight: 600;
}

.card-title {
  color: var(--ontow-dark);
}

.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-danger {
  color: rgba(255, 255, 255, 0.92);
}

.card.bg-primary .card-title,
.card.bg-primary .card-body h1,
.card.bg-primary .card-body h2,
.card.bg-primary .card-body h3,
.card.bg-primary .card-body h4,
.card.bg-primary .card-body h5,
.card.bg-primary .card-body h6,
.card.bg-primary .card-body p,
.card.bg-primary i,
.card.bg-success .card-title,
.card.bg-success .card-body h1,
.card.bg-success .card-body h2,
.card.bg-success .card-body h3,
.card.bg-success .card-body h4,
.card.bg-success .card-body h5,
.card.bg-success .card-body h6,
.card.bg-success .card-body p,
.card.bg-success i,
.card.bg-warning .card-title,
.card.bg-warning .card-body h1,
.card.bg-warning .card-body h2,
.card.bg-warning .card-body h3,
.card.bg-warning .card-body h4,
.card.bg-warning .card-body h5,
.card.bg-warning .card-body h6,
.card.bg-warning .card-body p,
.card.bg-warning i,
.card.bg-danger .card-title,
.card.bg-danger .card-body h1,
.card.bg-danger .card-body h2,
.card.bg-danger .card-body h3,
.card.bg-danger .card-body h4,
.card.bg-danger .card-body h5,
.card.bg-danger .card-body h6,
.card.bg-danger .card-body p,
.card.bg-danger i {
  color: rgba(255, 255, 255, 0.92) !important;
}

.card.bg-primary .text-muted,
.card.bg-success .text-muted,
.card.bg-warning .text-muted,
.card.bg-danger .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Form Styles */
.form-control, .input-group-text {
  border-radius: var(--ontow-radius-sm);
}

.input-group-text {
  background-color: rgba(255, 255, 255, 0.85);
  border-color: var(--ontow-border);
  color: var(--ontow-muted);
}

/* Alert Styles */
.alert {
  border-radius: var(--ontow-radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--ontow-shadow-sm);
}

/* Utility Classes */
.text-primary {
  color: var(--ontow-primary) !important;
}

.min-vh-100 {
  min-height: 100vh;
}

/* Job Management Styles */
.timeline {
  position: relative;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--ontow-light);
  left: 20px;
  margin-left: -2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--ontow-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 1;
}

.timeline-content {
  margin-left: 60px;
  padding: 1rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.job-map {
  height: 300px;
  background-color: #e9ecef;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-weight: 500;
}

.eta-display {
  background-color: rgba(248, 250, 252, 0.85);
  padding: 1rem;
  border-radius: var(--ontow-radius-sm);
  text-align: center;
  margin-bottom: 1rem;
  border: 1px solid var(--ontow-border);
}

.eta-display .eta-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ontow-primary);
}

.status-badge {
  font-size: 0.875rem;
  padding: 0.5em 0.75em;
  border-radius: 0.375rem;
  font-weight: 500;
}

/* Map placeholder */
.map-placeholder {
  background-color: #f8f9fa;
  border: 1px dashed #dee2e6;
  border-radius: 0.5rem;
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

.map-placeholder i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #adb5bd;
}

/* === DOCUMENTS MODULE STYLES === */

/* Documents List Styles */
.documents-header {
  background: linear-gradient(135deg, var(--ontow-primary), var(--ontow-primary-dark));
  color: white;
  padding: 2rem;
  border-radius: var(--ontow-radius-md);
  margin-bottom: 2rem;
  box-shadow: var(--ontow-shadow-sm);
}

.documents-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--ontow-surface);
  padding: 1.5rem;
  border-radius: var(--ontow-radius-md);
  box-shadow: var(--ontow-shadow-sm);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--ontow-border);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ontow-shadow-md);
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ontow-primary);
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  color: var(--ontow-secondary);
  font-weight: 500;
}

/* Documents Table Styles */
.documents-table {
  background: var(--ontow-surface);
  border-radius: var(--ontow-radius-md);
  overflow: hidden;
  box-shadow: var(--ontow-shadow-sm);
  border: 1px solid var(--ontow-border);
  backdrop-filter: var(--ontow-backdrop-blur);
}

.documents-table th {
  background-color: var(--ontow-light);
  color: var(--ontow-dark);
  font-weight: 600;
  border: none;
  padding: 1rem;
}

.documents-table td {
  padding: 1rem;
  vertical-align: middle;
  border-color: #f8f9fa;
}

.document-name {
  font-weight: 600;
  color: var(--ontow-dark);
}

.document-type {
  color: var(--ontow-secondary);
  font-size: 0.875rem;
}

.expiry-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.expiry-valid {
  background-color: rgba(25, 135, 84, 0.1);
  color: var(--ontow-success);
}

.expiry-expiring {
  background-color: rgba(255, 193, 7, 0.1);
  color: var(--ontow-warning);
}

.expiry-expired {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--ontow-danger);
}

/* Document Upload Styles */
.document-upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.document-upload-area:hover {
  border-color: var(--ontow-primary);
  background-color: rgba(253, 126, 20, 0.05);
}

.document-upload-area.dragover {
  border-color: var(--ontow-primary);
  background-color: rgba(253, 126, 20, 0.1);
}

.upload-icon {
  font-size: 3rem;
  color: var(--ontow-secondary);
  margin-bottom: 1rem;
}

.file-preview {
  max-width: 200px;
  max-height: 200px;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.file-info {
  background-color: var(--ontow-light);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

/* Document Details Styles */
.document-details {
  background: white;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.document-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.meta-item {
  padding: 1rem;
  background-color: rgba(248, 250, 252, 0.85);
  border-radius: var(--ontow-radius-sm);
  border: 1px solid var(--ontow-border);
}

.meta-item strong {
  color: var(--ontow-dark);
  display: block;
  margin-bottom: 0.25rem;
}

.meta-item span {
  color: var(--ontow-secondary);
}

.document-preview {
  border: 1px solid var(--ontow-border);
  border-radius: var(--ontow-radius-sm);
  padding: 1rem;
  background-color: var(--ontow-surface);
  margin: 1rem 0;
  box-shadow: var(--ontow-shadow-sm);
}

.document-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

.document-preview iframe {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 0.25rem;
}

/* Reminders Styles */
.reminders-list {
  margin-top: 1rem;
}

.reminder-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: var(--ontow-radius-sm);
  margin-bottom: 0.5rem;
  border: 1px solid var(--ontow-border);
}

.reminder-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--ontow-warning);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: white;
}

.reminder-info {
  flex: 1;
}

.reminder-date {
  font-weight: 600;
  color: var(--ontow-dark);
}

.reminder-type {
  color: var(--ontow-secondary);
  font-size: 0.875rem;
}

/* Filter Styles */
.filters-section {
  background: var(--ontow-surface);
  padding: 1.5rem;
  border-radius: var(--ontow-radius-md);
  margin-bottom: 2rem;
  box-shadow: var(--ontow-shadow-sm);
  border: 1px solid var(--ontow-border);
  backdrop-filter: var(--ontow-backdrop-blur);
}

.filter-row {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  font-weight: 600;
  color: var(--ontow-muted);
  margin-bottom: 0.5rem;
  display: block;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .documents-stats {
    grid-template-columns: 1fr;
  }
  
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    min-width: auto;
  }
  
  .documents-table {
    font-size: 0.875rem;
  }
  
  .documents-table th,
  .documents-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* Loading States */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(253, 126, 20, 0.3);
  border-radius: 50%;
  border-top-color: var(--ontow-primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--ontow-secondary);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h4 {
  color: var(--ontow-dark);
  margin-bottom: 0.5rem;
}

/* Document Type Icons */
.document-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  margin-right: 1rem;
}

.document-icon.pdf { background-color: var(--ontow-danger); }
.document-icon.jpg, .document-icon.jpeg, .document-icon.png, .document-icon.gif { background-color: var(--ontow-info); }
.document-icon.doc, .document-icon.docx { background-color: var(--ontow-primary); }
.document-icon.default { background-color: var(--ontow-secondary); }

/* === EXPENSE TRACKER STYLES === */

.expense-tracker .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ontow-primary);
}

.expense-tracker .page-header h1 {
  color: var(--ontow-primary);
  margin: 0;
}

/* Filters */
.expense-filters {
  background: var(--ontow-surface);
  padding: 1.5rem;
  border-radius: var(--ontow-radius-md);
  box-shadow: var(--ontow-shadow-sm);
  margin-bottom: 2rem;
  border: 1px solid var(--ontow-border);
  backdrop-filter: var(--ontow-backdrop-blur);
}

.filter-form .filter-row {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--ontow-dark);
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: end;
}

/* Summary Cards */
.expense-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: var(--ontow-surface);
  padding: 1.5rem;
  border-radius: var(--ontow-radius-md);
  box-shadow: var(--ontow-shadow-sm);
  text-align: center;
  border: 1px solid var(--ontow-border);
  backdrop-filter: var(--ontow-backdrop-blur);
}

.summary-card h3 {
  margin: 0 0 0.5rem 0;
  color: var(--ontow-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card .amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ontow-primary);
  margin: 0;
}

.summary-card .count {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ontow-info);
  margin: 0;
}

/* Actions */
.expense-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Table */
.expense-table {
  width: 100%;
  background: var(--ontow-surface);
  border-radius: var(--ontow-radius-md);
  overflow: hidden;
  box-shadow: var(--ontow-shadow-sm);
  border: 1px solid var(--ontow-border);
  backdrop-filter: var(--ontow-backdrop-blur);
}

.expense-table th,
.expense-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.expense-table th {
  background: rgba(15, 23, 42, 0.05);
  font-weight: 600;
  color: var(--ontow-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.expense-table .amount {
  font-weight: 600;
  color: var(--ontow-primary);
}

.expense-table .description {
  color: var(--ontow-secondary);
  font-size: 0.85rem;
}

.expense-table .actions {
  white-space: nowrap;
}

.expense-table .actions .btn {
  margin-right: 0.25rem;
}

/* Category Badges */
.category-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-fuel { background: #fff3cd; color: #856404; }
.category-repairs { background: #f8d7da; color: #721c24; }
.category-fines { background: #d1ecf1; color: #0c5460; }
.category-meals { background: #d4edda; color: #155724; }
.category-accommodation { background: #e2e3e5; color: #383d41; }
.category-tools { background: #d1ecf1; color: #0c5460; }
.category-insurance { background: #fff3cd; color: #856404; }
.category-other { background: #f8d7da; color: #721c24; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--ontow-secondary);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--ontow-light);
}

.empty-state h3 {
  margin-bottom: 0.5rem;
}

/* Forms */

.expense-form-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 200px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--ontow-muted);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--ontow-border);
  border-radius: var(--ontow-radius-sm);
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ontow-dark);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--ontow-shadow-sm);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.current-receipt {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(248, 250, 252, 0.85);
  border-radius: var(--ontow-radius-sm);
  border: 1px solid var(--ontow-border);
}

/* Detail View */
.expense-view .detail-card {
  background: var(--ontow-surface);
  padding: 2rem;
  border-radius: var(--ontow-radius-md);
  box-shadow: var(--ontow-shadow-sm);
  border: 1px solid var(--ontow-border);
  backdrop-filter: var(--ontow-backdrop-blur);
}

.detail-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}


.detail-item {
  flex: 1;
  min-width: 250px;
}

.detail-item.full-width {
  flex: 0 0 100%;
}


.detail-item label {
  display: block;
  font-weight: 600;
  color: var(--ontow-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.detail-item span {
  display: block;
  font-size: 1.1rem;
  color: var(--ontow-dark);
}

.detail-item .amount {
  color: var(--ontow-primary);
  font-weight: 700;
  font-size: 1.5rem;
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .expense-actions {
    flex-direction: column;
  }
  
  .expense-table {
    font-size: 0.9rem;
  }
  
  .expense-table th,
  .expense-table td {
    padding: 0.5rem;
  }
  
  .detail-row {
    flex-direction: column;
    gap: 1rem;
  }
}

/* === DUTY LOGS MODULE STYLES === */

/* Duty Log Cards */
.duty-log-card {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.duty-log-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Shift Status Badges */
.shift-status {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.shift-status.active {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.shift-status.completed {
  background-color: #d1edff;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.shift-status.cancelled {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Shift Type Badges */
.shift-type {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shift-type.day {
  background-color: #fff3cd;
  color: #856404;
}

.shift-type.night {
  background-color: #d1ecf1;
  color: #0c5460;
}

.shift-type.weekend {
  background-color: #d4edda;
  color: #155724;
}

.shift-type.emergency {
  background-color: #f8d7da;
  color: #721c24;
}

/* Timeline Styles for Activity View */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #007bff, #6c757d);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: white;
  border: 3px solid #007bff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  z-index: 2;
}

.timeline-marker.job-start {
  border-color: #28a745;
  color: #28a745;
}

.timeline-marker.job-complete {
  border-color: #28a745;
  color: #28a745;
  background-color: #28a745;
  color: white;
}

.timeline-marker.break-start {
  border-color: #ffc107;
  color: #ffc107;
}

.timeline-marker.break-end {
  border-color: #17a2b8;
  color: #17a2b8;
}

.timeline-marker.fuel {
  border-color: #007bff;
  color: #007bff;
}

.timeline-marker.maintenance {
  border-color: #6c757d;
  color: #6c757d;
}

.timeline-marker.incident {
  border-color: #dc3545;
  color: #dc3545;
  background-color: #dc3545;
  color: white;
}

.timeline-content {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0.375rem;
  border-left: 4px solid #007bff;
  margin-left: 0.5rem;
}

.timeline-content h6 {
  margin-bottom: 0.5rem;
  color: #495057;
}

.timeline-content .activity-meta {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.timeline-content .activity-meta i {
  margin-right: 0.25rem;
}

/* Duty Log Stats Cards */
.stats-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  border: none;
}

.stats-card.primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.stats-card.success {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.stats-card.warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #212529;
}

.stats-card.info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.stats-card h4 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stats-card p {
  margin-bottom: 0;
  opacity: 0.9;
}

/* Vehicle Info Display */
.vehicle-info {
  background: #f8f9fa;
  border-radius: 0.375rem;
  padding: 1rem;
  border-left: 4px solid var(--ontow-primary);
}

.vehicle-info .vehicle-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.vehicle-info .detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #dee2e6;
}

.vehicle-info .detail-item:last-child {
  border-bottom: none;
}

.vehicle-info .detail-label {
  font-weight: 600;
  color: #495057;
}

.vehicle-info .detail-value {
  color: #212529;
}

/* Activity Form Enhancements */
.activity-form .form-floating {
  margin-bottom: 1rem;
}

.activity-form .activity-type-icon {
  display: inline-block;
  width: 1.5rem;
  text-align: center;
  margin-right: 0.5rem;
}

/* Quick Actions Panel */
.quick-actions {
  background: white;
  border-radius: 0.375rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-actions .btn {
  margin-bottom: 0.5rem;
}

/* Duty Log Filters */
.duty-log-filters {
  background: white;
  border-radius: 0.375rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.duty-log-filters .filter-group {
  margin-bottom: 1rem;
}

.duty-log-filters .filter-group:last-child {
  margin-bottom: 0;
}

/* Responsive Duty Logs */
@media (max-width: 768px) {
  .timeline {
    padding-left: 1.5rem;
  }
  
  .timeline-marker {
    left: -1.5rem;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.625rem;
  }
  
  .timeline-content {
    margin-left: 0.25rem;
  }
  
  .vehicle-info .vehicle-details {
    grid-template-columns: 1fr;
  }
  
  .stats-card h4 {
    font-size: 1.5rem;
  }
  
  .duty-log-filters {
    padding: 1rem;
  }
}

/* Reports & Analytics Styles */
.reports-dashboard {
    padding: 20px;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    height: 120px;
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 1.5rem;
}

.metric-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
}

.metric-content p {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 5px 0 0 0;
    font-weight: 500;
}

.metric-content small {
    font-size: 0.75rem;
}

.reports-dashboard .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.reports-dashboard .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
}

.reports-dashboard .nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
}

.reports-dashboard .nav-tabs .nav-link.active {
    background: white;
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

.reports-dashboard .table th {
    background: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

/* Chart containers */
.reports-dashboard canvas {
    max-height: 300px !important;
}

/* Export modal styling */
.reports-dashboard .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.reports-dashboard .modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
}

.reports-dashboard .modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
}

/* Responsive adjustments for reports */
@media (max-width: 768px) {
    .reports-dashboard .metric-card {
        height: auto;
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .reports-dashboard .metric-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .reports-dashboard .page-header .d-flex {
        flex-direction: column;
        gap: 15px;
    }
    
    .reports-dashboard .header-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
}

/* Loading states for reports */
.reports-dashboard .loading {
    opacity: 0.6;
    pointer-events: none;
}

.reports-dashboard .loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007bff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Table hover effects for reports */
.reports-dashboard .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* ===== FORUM STYLES ===== */

/* Forum Container */
.forum-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Forum Header */
.forum-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.forum-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

/* Forum Statistics Cards */
.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon { background: #007bff; }
.stat-card:nth-child(2) .stat-icon { background: #28a745; }
.stat-card:nth-child(3) .stat-icon { background: #ffc107; }
.stat-card:nth-child(4) .stat-icon { background: #dc3545; }

.stat-card .stat-info h4 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.stat-card .stat-info span {
    color: #666;
    font-size: 0.9rem;
}

/* Forum Filters */
.forum-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Category Tabs */
.category-tabs .nav-pills .nav-link {
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
    color: #666;
    transition: all 0.2s;
}

.category-tabs .nav-pills .nav-link:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.category-tabs .nav-pills .nav-link.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Forum Post Cards */
.forum-post-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid transparent;
}

.forum-post-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.forum-post-card.pinned {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.post-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

.visibility-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.visibility-all { background-color: #e9ecef; color: #495057; }
.visibility-driver { background-color: #d1ecf1; color: #0c5460; }
.visibility-owner { background-color: #fff3cd; color: #856404; }

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
    flex-wrap: wrap;
}

.post-title a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.post-title a:hover {
    color: #007bff;
}

.post-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.post-image img {
    max-width: 150px;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: centersstt;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.post-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.like-stat {
    cursor: pointer;
    transition: color 0.2s;
}

.like-stat:hover {
    color: #dc3545;
}

.like-stat .fa-heart.liked {
    color: #dc3545;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
}

/* Forum Post Detail */
.forum-post-detail {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.forum-post-detail .post-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin: 1rem 0;
}

.forum-post-detail .content-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.forum-post-detail .post-image img {
    max-width: 100%;
    cursor: pointer;
    transition: transform 0.2s;
}

.forum-post-detail .post-image img:hover {
    transform: scale(1.02);
}

.post-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.like-btn {
    transition: all 0.2s;
}

.like-btn.liked {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Reply Form */
.reply-form-container {
    margin: 2rem 0;
}

/* Replies Section */
.replies-section {
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h4 {
    color: #333;
    margin: 0;
}

.sort-options select {
    width: auto;
}

/* Reply Items */
.reply-item {
    margin-bottom: 1rem;
}

.reply-content {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 3px solid #007bff;
}

.reply-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reply-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.reply-actions {
    display: flex;
    gap: 0.25rem;
}

.reply-text {
    color: #444;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.reply-image img {
    max-width: 200px;
    border-radius: 0.25rem;
    cursor: pointer;
}

.nested-replies {
    margin-top: 1rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state .empty-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-replies {
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: #dc3545;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Draft Items */
.draft-item {
    background: #f8f9fa;
    transition: background-color 0.2s;
}

.draft-item:hover {
    background: #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .forum-header {
        padding: 1rem;
        text-align: center;
    }
    
    .post-header,
    .post-footer,
    .section-header,
    .reply-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-stats {
        flex-wrap: wrap;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .category-tabs .nav-pills {
        flex-wrap: wrap;
    }
    
    .forum-post-detail {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-card .stat-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* === INSPECTIONS MODULE STYLES === */
/* Containers */
#inspection-editor {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Checklist table */
.checklist-table th,
.checklist-table td {
  vertical-align: middle;
}

.checklist-table .item-status {
  min-width: 120px;
}

.checklist-table .item-notes {
  min-width: 220px;
}

/* Add item controls */
.add-item-controls .form-control {
  border-color: #dee2e6;
}

/* Photo preview area */
#photoPreview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#photoPreview .img-fluid {
  max-height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

/* Signature area */
#signaturePad {
  width: 100%;
  height: 180px;
  background: #fff;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
}

.signature-actions .btn {
  min-width: 120px;
}

.signature-meta .form-control {
  border-color: #dee2e6;
}

/* Status labels */
.inspection-status-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .checklist-table .item-notes { min-width: 140px; }
  #signaturePad { height: 150px; }
}