*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  background: #f5f5f5;
  color: #222;
}

button {
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: 13px;
}

/* Calendar grid */
.cal-grid {
  display: grid;
  grid-template-columns: 160px repeat(7, 1fr);
  border-left: 1px solid #ddd;
  border-top: 1px solid #ddd;
  background: #fff;
}

.cal-header-cell {
  background: #1a1a2e;
  color: #fff;
  font-weight: 600;
  padding: 8px 6px;
  text-align: center;
  border-right: 1px solid #444;
  border-bottom: 1px solid #444;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.cal-header-cell.driver-col {
  background: #16213e;
  text-align: left;
  padding-left: 10px;
}

/* Corner cell stays pinned through both vertical and horizontal scroll. */
.cal-header-cell.corner-cell {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 30;
  overflow: visible;
}

.driver-filter-pop {
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  color: #222;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  padding: 8px;
  z-index: 40;
}

.driver-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  border-radius: 4px;
}

.driver-filter-item:hover { background: #f0f0f0; }

.cal-driver-cell {
  background: #1a1a2e;
  color: #fff;
  font-weight: 500;
  padding: 8px 10px;
  border-right: 1px solid #333;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  font-size: 12px;
  min-height: 64px;
  position: sticky;
  left: 0;
  z-index: 5;
}

.cal-event-cell {
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 3px;
  min-height: 64px;
  cursor: pointer;
  position: relative;
  background: #fafafa;
  transition: background 0.1s;
}

.cal-event-cell:hover {
  background: #f0f0f0;
}

.cal-event-chip {
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1.3;
  color: #fff;
  cursor: pointer;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-event-chip:hover {
  filter: brightness(0.92);
}

/* Tentative Solo 2: not yet confirmed for the week. */
.cal-event-chip.is-tentative {
  opacity: 0.6;
  border: 1px dashed rgba(255, 255, 255, 0.85);
}

/* Manual-override pencil sits in the chip corner. */
.cal-event-chip {
  position: relative;
}

.cal-event-chip .event-pencil {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 10px;
  line-height: 1;
  opacity: 0.95;
}

.cal-event-chip .event-label {
  font-weight: 600;
  font-size: 11px;
}

.cal-event-chip .event-sub {
  font-size: 10px;
  opacity: 0.9;
}

/* Top bar */
.top-bar {
  background: #1a1a2e;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.top-bar h1 {
  font-size: 19px;
  font-weight: bold;
  color: #90CAF9;
  font-family: 'Aboreto', cursive;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-nav button {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background 0.15s;
}

.week-nav button:hover { background: rgba(255,255,255,0.25); }

.week-label {
  font-size: 13px;
  font-weight: 500;
  min-width: 180px;
  text-align: center;
  color: #fff;
}

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  width: 420px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.modal-box h2 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #1a1a2e;
}

.form-row {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 7px 10px;
  width: 100%;
  background: #fff;
  color: #222;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #2196F3;
}

.btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: filter 0.15s;
}

.btn:hover { filter: brightness(0.9); }
.btn-primary { background: #2196F3; border: 1px solid #2196F3; color: #fff; }
.btn-danger { background: #f44336; border: 1px solid #f44336; color: #fff; }
.btn-ghost { background: transparent; border: 1px solid #ccc; color: #555; }

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Hamburger nav */
.hamburger-nav {
  margin-left: auto;
  position: relative;
}

.hamburger-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.hamburger-btn:hover,
.hamburger-btn.open { background: rgba(255,255,255,0.24); }

.hamburger-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #16213e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  background: transparent;
  border: none;
  color: #e0e0e0;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  width: 100%;
  transition: background 0.12s, color 0.12s;
}

.nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-item.active { background: #2196F3; color: #fff; }
.nav-item-accent { color: #90CAF9; }
.nav-item-accent:hover { background: rgba(33,150,243,0.2); color: #90CAF9; }

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 4px 2px;
}

/* Lists */
.list-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.list-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  border-bottom: 2px solid #e0e0e0;
}

.list-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.list-table tr:hover td { background: #f8f8f8; }

.section {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
}

.calendar-wrapper {
  overflow-x: auto;
}

.today-col .cal-header-cell {
  background: #0d3057;
}

.today-col .cal-event-cell {
  background: #fffde7;
}

/* Driver month view */
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 8px;
}

.month-day {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 6px;
  min-height: 80px;
  background: #fff;
}

.month-day .day-num {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  margin-bottom: 4px;
}

.month-day.today { border-color: #2196F3; }

.coming-soon-modal .modal-box {
  text-align: center;
  padding: 40px;
}

.warn-banner {
  background: #fff3e0;
  border: 1px solid #ff9800;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 12px;
  color: #e65100;
  margin-bottom: 12px;
}

/* Layout nav links (used in layouts/manager.vue, driver.vue, admin.vue) */
.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 4px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.1s, color 0.1s;
  position: relative;
}

.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-link.active { background: #2196F3; color: #fff; }

.pto-badge {
  background: #f44336;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

.top-bar-user {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  margin-left: auto;
  white-space: nowrap;
}

.logout-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}
.logout-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* Note: the hamburger button + dropdown menu styles live scoped in
   components/TopBar.vue (they hot-reload; this static file does not). */

/* Calendar-specific toolbar (week nav + action buttons) */
.cal-toolbar {
  background: #16213e;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #333;
}
