/* Global Reset & Typography */
:root {
  --primary: #2c3e50;
  --secondary: #3498db;
  --bg: #f4f7f6;
  --text: #333;
}
body {
  margin: 0;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
}

/* Sticky Top Header */
header {
  background: white;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
  justify-content: space-between;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}
.brand h2 {
  margin: 0;
  color: var(--primary);
  font-size: 1.4em;
}
.user-menu {
  font-size: 0.9em;
  color: #7f8c8d;
}

/* Main Layout Grid */
.main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Sidebar Navigation */
.sidebar {
  width: 240px;
  background: var(--primary);
  color: white;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  overflow-y: auto;
}
.nav-section {
  padding: 15px 20px 5px;
  font-size: 0.75em;
  text-transform: uppercase;
  color: #95a5a6;
  letter-spacing: 1px;
}
.sidebar a {
  color: #ecf0f1;
  text-decoration: none;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95em;
  border-left: 4px solid transparent;
}
.sidebar a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--secondary);
}
.sidebar .material-symbols-outlined {
  font-size: 1.2em;
}

/* Content Canvas */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Mobile Specifics */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--primary);
  padding: 0;
}
.overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 4;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .sidebar {
    position: absolute;
    height: 100%;
    z-index: 5;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }
  .overlay.show {
    display: block;
  }
  .content {
    padding: 10px;
  } /* Slightly tighter padding on mobile */
}
/* Utility Classes (Light Theme) */
.text-muted {
  color: #7f8c8d;
}
.text-primary {
  color: #2c3e50;
}
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-weight: bold;
  border: 1px solid transparent;
}
.alert-warning {
  background: #fff3cd;
  color: #856404;
  border-color: #ffeeba;
}
.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}
.alert-success {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}
/* --- COMPONENT LIBRARY: LIGHT THEME --- */

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.data-table th {
  background: #f8f9fa;
  color: #2c3e50;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}
.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  color: #34495e;
}
.data-table tr:hover {
  background-color: #f8f9fa;
}

/* --- Cards & Containers --- */
.card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-card {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-top: 5px solid #bdc3c7; /* Default top border, overridden inline if needed */
}

/* Status Badges */
.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: bold;
  display: inline-block;
}
.badge-draft {
  background: #e2e3e5;
  color: #383d41;
}
.badge-assigned {
  background: #d1ecf1;
  color: #0c5460;
}
.badge-progress {
  background: #fff3cd;
  color: #856404;
}
.badge-completed {
  background: #d4edda;
  color: #155724;
}
.badge-cancelled {
  background: #f8d7da;
  color: #721c24;
}

/* Form Elements */
.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  color: #2c3e50;
  margin-bottom: 15px;
}
.form-label {
  font-weight: bold;
  color: #7f8c8d;
  display: block;
  margin-bottom: 5px;
}

/* Secondary Buttons */
.btn-secondary {
  background: #95a5a6;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-secondary:hover {
  background: #7f8c8d;
}

.btn-primary {
  background: #3498db;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-weight: bold;
}
.btn-primary:hover {
  background: #2980b9;
}

.btn-success {
  background: #2ecc71;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-weight: bold;
}
.btn-success:hover {
  background: #27ae60;
}

.btn-danger {
  background: #e74c3c;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-weight: bold;
}
.btn-danger:hover {
  background: #c0392b;
}

.btn-warning {
  background: #f39c12;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-weight: bold;
}
.btn-warning:hover {
  background: #e67e22;
}
/* --- Mobile Driver Dashboard Specifics --- */
.data-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid #eee; /* Use var(--border) if you defined it in your themes! */
  padding-bottom: 8px;
}
.data-label {
  color: #7f8c8d;
  font-size: 0.9em;
  font-weight: bold;
}
.data-value {
  color: var(--primary);
  font-weight: bold;
  font-size: 1.1em;
}
.btn-massive {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 1.1em;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
}
.btn-start {
  background: #2ecc71;
  color: white;
  margin-top: 10px;
}
.btn-stop {
  background: #e74c3c;
  color: white;
  margin-top: 10px;
}
.select-massive {
  width: 100%;
  padding: 14px;
  font-size: 1em;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: transparent;
  color: inherit;
  box-sizing: border-box;
}
