/* SlugHub - Design System & Styles */

/* ----------------------------------
   1. Design System Tokens & Base
---------------------------------- */
:root {
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;

  /* Creamy Tan Light Theme Base */
  --bg-app: hsl(36, 45%, 90%);         /* Creamy warm tan */
  --bg-surface: hsl(36, 40%, 94%);    /* Card surface */
  --bg-surface-end: hsl(36, 40%, 86%); /* Light mode card gradient end */
  --bg-surface-glass: hsla(36, 40%, 94%, 0.75); /* Translucent glass */
  --border-color: hsl(28, 85%, 70%);  /* Light orange outline */
  --border-glow: hsla(28, 92%, 50%, 0.15); /* Light orange focus glow */

  /* Brand Colors */
  --color-primary: hsl(28, 92%, 50%);    /* Safety Orange */
  --color-primary-dark: hsl(24, 92%, 45%);
  --color-secondary: hsl(28, 92%, 50%);  /* Keep the title orange / secondary color */
  --color-success: hsl(142, 60%, 35%);    /* Green Offset - adjusted for contrast */
  --color-error: hsl(0, 75%, 45%);        /* Crimson Alert - adjusted for contrast */
  --color-warning: hsl(40, 93%, 40%);      /* Warning Yellow - adjusted for contrast */

  /* Text Colors */
  --text-main: hsl(24, 45%, 15%);       /* Dark brown fonts */
  --text-muted: hsl(24, 25%, 38%);      /* Muted dark brown/taupe */

  /* Borders & Spacing */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.15s ease-out;
  --sunset-gradient: linear-gradient(135deg, hsl(38, 95%, 55%) 0%, hsl(24, 95%, 50%) 50%, hsl(8, 95%, 45%) 100%);
}

:root[data-theme="dark"] {
  /* Rich warm cocoa charcoal dark mode */
  --bg-app: hsl(24, 18%, 10%);          /* Deep charcoal cocoa */
  --bg-surface: hsl(24, 15%, 15%);      /* Warm dark gray card surface */
  --bg-surface-end: hsl(24, 15%, 11%);  /* Dark mode card gradient end */
  --bg-surface-glass: hsla(24, 15%, 15%, 0.85); /* Translucent glass dark */
  --border-color: hsl(24, 20%, 25%);    /* Muted warm dark border */
  --border-glow: hsla(28, 92%, 55%, 0.25); /* Orange focus glow */

  /* Brand Colors - adjusted for vibrancy in dark mode */
  --color-primary: hsl(28, 95%, 55%);    /* Safety Orange */
  --color-primary-dark: hsl(28, 92%, 48%);
  --color-secondary: hsl(28, 95%, 55%);
  --color-success: hsl(142, 70%, 50%);    /* Bright success green */
  --color-error: hsl(0, 85%, 60%);        /* Bright crimson red */
  --color-warning: hsl(40, 95%, 50%);      /* Bright warning gold */

  /* Text Colors */
  --text-main: hsl(36, 30%, 88%);       /* Warm light cream text */
}

:root[data-theme="dark"] .segmented-control {
  background-color: var(--bg-surface-end);
  border-color: var(--border-color);
}

.btn-theme-toggle {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: transform 0.3s ease, color 0.15s ease-out, background-color 0.15s ease-out;
  border-radius: 50%;
  width: 32px;
  height: 32px;
}
.btn-theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
  background-color: rgba(0, 0, 0, 0.06);
}
.btn-theme-toggle:active {
  transform: scale(0.95);
}
:root[data-theme="dark"] .btn-theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.08);
}


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

body {
  font-family: var(--font-primary);
  background-color: #16110d;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ----------------------------------
   2. Desktop Phone Framework Layout
   ---------------------------------- */
.desktop-wrapper {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, #292018 0%, #110c09 100%);
}

.phone-chassis {
  position: relative;
  width: 412px;
  height: 892px;
  background-color: var(--bg-app);
  border-radius: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
              0 0 0 12px #352b22, /* Simulated phone outer bezel */
              0 0 0 14px #4d3e32;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Phone Top Bar */
.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 6px 24px;
  background-color: var(--bg-app);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  user-select: none;
  z-index: 10;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.battery-icon {
  width: 20px;
  height: 10px;
  border: 1.5px solid var(--text-main);
  border-radius: 3px;
  position: relative;
  padding: 1px;
}

.battery-icon::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 2.5px;
  width: 2px;
  height: 4px;
  background-color: var(--text-main);
  border-radius: 0 1px 1px 0;
}

.battery-level {
  width: 85%;
  height: 100%;
  background-color: var(--color-success);
  border-radius: 1px;
}

/* Home Indicator for iOS style swipe indicators */
.phone-home-indicator {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 5px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  z-index: 10;
  pointer-events: none;
}

/* Responsive Scaling: Fullscreen on mobile */
@media (max-width: 450px) {
  body {
    background-color: var(--bg-app);
  }
  .desktop-wrapper {
    background: none;
    height: 100%;
  }
  .phone-chassis {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  .phone-chassis::before,
  .phone-home-indicator {
    display: none;
  }
  .phone-status-bar {
    display: none;
  }
  .desktop-copyright {
    display: none !important;
  }
  .app-header {
    padding-top: calc(12px + max(44px, env(safe-area-inset-top, 0px))) !important;
  }
  .auth-screen {
    padding: 10px 20px !important;
    padding-top: calc(max(6px, env(safe-area-inset-top, 24px) - 24px)) !important;
  }
  .auth-card {
    gap: 12px !important;
  }
  .auth-form {
    gap: 10px !important;
  }
  .form-row {
    gap: 8px;
  }
  .form-group select#dash-filter-time,
  .form-group select#commute-time {
    font-size: 0.8rem;
    padding: 12px 24px 12px 8px;
    background-position: right 6px center;
  }
  .form-group input#dash-filter-date,
  .form-group input#commute-date {
    font-size: 0.8rem;
    padding: 12px 8px;
  }
  .calendar-trigger {
    font-size: 0.8rem;
    padding: 12px 8px;
    gap: 6px;
  }
}

/* ----------------------------------
   3. Application Header
---------------------------------- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* align columns to the top for perfect alignment */
  padding: 12px 20px 8px 20px; /* adjusted bottom padding slightly for balance */
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-app);
  z-index: 150;
  position: relative;
}

.header-user-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  position: relative;
  z-index: 160;
  line-height: 1.2;
}

.header-welcome-text {
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: flex-end;
  height: 24px; /* Align with h1 line-height box */
  color: var(--text-muted);
}

#header-user-name {
  font-weight: 700;
  color: var(--text-main);
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: bottom;
}

.header-logout-btn {
  background: none;
  border: none;
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-error);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: var(--transition-fast);
}

.header-logout-btn:hover {
  text-decoration: underline;
  color: hsl(0, 75%, 35%);
}

.header-logout-btn:active {
  transform: scale(0.95);
}

.header-logout-btn:focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: 2px;
  border-radius: 2px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-car-logo {
  display: inline-block;
  height: 1.15em;
  width: 0.85em;
  vertical-align: -0.15em;
  margin: 0 -0.18em 0 0.04em;
  -webkit-text-fill-color: initial;
  flex-shrink: 0;
  transform: skewX(-12deg);
}

.logo-area h1 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, hsl(38, 92%, 55%) 0%, hsl(28, 92%, 45%) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  padding-right: 0.15em;
  margin-top: 6px;
  margin-bottom: -2px;
}

.slug-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-success);
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-success);
  border-radius: 50%;
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* ----------------------------------
   4. SPA Router View System
---------------------------------- */
.app-body {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.tab-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
}

.tab-view.active-view {
  display: flex;
  animation: slide-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes centered-slide-fade-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.scrollable-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px 90px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

#tab-schedule .scrollable-content {
  padding-top: 6px;
}

#tab-matches .scrollable-content {
  padding-top: 8px;
}

#tab-dashboard .scrollable-content {
  padding-top: 0px;
}

/* Scrollbar styling */
.scrollable-content::-webkit-scrollbar {
  width: 6px;
}
.scrollable-content::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: var(--radius-full);
}

.section-container {
  margin-top: 16px;
}

.section-container h3 {
  font-size: 1.125rem;
  margin-bottom: 12px;
  color: var(--text-main);
  padding-left: 2px;
}

/* ----------------------------------
   5. Slug Rules & Etiquette Card
---------------------------------- */
.slug-rules-card {
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--color-secondary); /* Highlight edge with brand orange */
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rules-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-secondary); /* Brand Orange */
  margin-bottom: 4px;
}

.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rules-list li {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.rules-list strong {
  color: hsl(210, 40%, 98%);
  font-weight: 600;
}

.rule-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.2;
}

/* Matching Alert banner */
.match-alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
  border: 1.5px solid var(--color-success);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  animation: pulse-border 2.5s infinite;
  margin-top: 12px;
}

@keyframes pulse-border {
  0%, 100% { border-color: var(--color-success); }
  50% { border-color: var(--color-primary); }
}

.alert-icon {
  font-size: 1.25rem;
}

.alert-text {
  flex: 1;
  font-size: 0.75rem;
  line-height: 1.3;
}

.alert-text strong {
  font-size: 0.875rem;
  color: var(--text-main);
  display: block;
  margin-bottom: 2px;
}

/* ----------------------------------
   6. Commuter Forms System (Scheduler)
---------------------------------- */
.form-header {
  margin-bottom: 12px;
}

.form-header h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.form-title-logo {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.05em;
  text-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
  margin-bottom: 0;
  background: linear-gradient(135deg, hsl(38, 95%, 55%) 0%, hsl(24, 95%, 50%) 50%, hsl(8, 95%, 45%) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  line-height: 1.1;
  padding-right: 0.15em;
}

.form-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.commute-setup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-fieldset {
  border: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-legend {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
  padding-left: 2px;
}

/* Segmented Control Toggle Buttons */
.segmented-control {
  display: flex;
  background-color: hsl(36, 40%, 86%);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--radius-md);
  position: relative;
  min-height: 56px;
}

.segmented-control input[type="radio"] {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.segment-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 2;
  transition: var(--transition-fast);
  text-align: center;
  border-radius: 10px;
}

.segmented-control input[type="radio"]:checked + .segment-label {
  color: #ffffff;
}

.segment-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 2px 4px;
}

.direction-text {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  transition: all 0.2s ease;
}

.route-shields {
  display: flex;
  align-items: center;
  gap: 4px;
}

.interstate-svg {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.segmented-control input[type="radio"]:checked + .segment-label .interstate-svg {
  transform: scale(1.05);
}

.segmented-control input[type="radio"]:focus-visible + .segment-label {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

/* Background slider track */
.selection-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: 10px;
  z-index: 1;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

input[id="role-driver"]:checked ~ .selection-slider,
input[id="edit-role-driver"]:checked ~ .selection-slider {
  transform: translateX(100%);
  background: linear-gradient(135deg, var(--color-secondary) 0%, hsl(28, 92%, 45%) 100%);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Direction Selector Southbound checked transition */
input[id="dir-southbound"]:checked ~ .selection-slider,
input[id="edit-dir-southbound"]:checked ~ .selection-slider,
input[id="dash-dir-southbound"]:checked ~ .selection-slider {
  transform: translateX(100%);
  background: linear-gradient(135deg, var(--color-secondary) 0%, hsl(28, 92%, 45%) 100%);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Direction Selector labels: inner background boxes around the words */
input[id="dir-northbound"]:checked + label.segment-label .direction-text,
input[id="edit-dir-northbound"]:checked + label.segment-label .direction-text,
input[id="dash-dir-northbound"]:checked + label.segment-label .direction-text {
  background-color: #005ea6 !important;
  color: #ffffff !important;
}

input[id="dir-southbound"]:checked + label.segment-label .direction-text,
input[id="edit-dir-southbound"]:checked + label.segment-label .direction-text,
input[id="dash-dir-southbound"]:checked + label.segment-label .direction-text {
  background-color: #ffffff !important;
  color: #005ea6 !important;
}

/* Input Fields & Groups */
.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 {
  flex: 1;
  min-width: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}

.form-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group input[type="date"] {
  font-size: 1rem;
  color: var(--text-main);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  min-height: 48px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: var(--font-primary);
  transition: var(--transition-fast);
}

/* Ensure date inputs can shrink on iOS Safari and display values correctly */
.form-group input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.form-group input[type="date"]::-webkit-date-and-time-value {
  margin: 0;
  padding: 0;
  min-height: 1.2em;
  text-align: center;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none;
}

.password-input-container {
  position: relative;
  width: 100%;
}

.password-input-container input[type="password"],
.password-input-container input[type="text"] {
  padding-right: 48px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
  z-index: 2;
}

.btn-toggle-password:hover {
  color: var(--color-primary);
}

.btn-toggle-password svg {
  display: block;
}

.btn-toggle-password .hidden {
  display: none;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='hsl(24, 25%, 38%)' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 9l4-4 4 4m0 6l-4 4-4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-group select:has(option[value=""]:checked) {
  color: var(--text-muted);
}

.form-group select:focus,
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="time"]:focus,
.form-group input[type="date"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.form-group input:invalid:user-invalid,
.form-group select:invalid:user-invalid {
  border-color: var(--color-error);
}

/* Date and time fields optimization to prevent truncation of 15-min window text */
.form-group select#dash-filter-time,
.form-group select#commute-time {
  font-size: 0.85rem;
  padding: 12px 28px 12px 10px;
  background-position: right 8px center;
}

.form-group input#dash-filter-date,
.form-group input#commute-date {
  font-size: 0.85rem;
  padding: 12px 10px;
}

.error-message {
  font-size: 0.75rem;
  color: var(--color-error);
  min-height: 0;
  font-weight: 500;
  display: none;
  margin-top: 4px;
}

.error-message:not(:empty) {
  display: block;
}

/* Helpers */
.hidden {
  display: none !important;
}

/* Buttons */
.btn {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color); /* light orange border by default */
  cursor: pointer;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  gap: 8px;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 3px solid var(--text-main);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  border-color: var(--color-primary-dark);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}
.btn-primary:hover {
  filter: brightness(1.1);
  border-color: var(--color-primary);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary) 0%, hsl(28, 92%, 45%) 100%);
  color: #ffffff;
  border-color: hsl(28, 92%, 45%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: rgba(0, 0, 0, 0.03);
  border-color: var(--color-primary);
}

.btn-outline-danger {
  background: transparent;
  border: 1.5px solid var(--color-error);
  color: var(--color-error);
}
.btn-outline-danger:hover {
  background-color: rgba(239, 68, 68, 0.08);
  border-color: var(--color-error);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
}

/* ----------------------------------
   7. Matches Sub-page Layout
---------------------------------- */
.matches-header,
.map-header {
  margin-bottom: 16px;
}

.matches-header h2,
.map-header h2 {
  font-size: 1.5rem;
}

.matches-header p,
.map-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Empty State */
.empty-state-view {
  background-color: var(--bg-surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

#match-display-bar.no-matches-style {
  border: 1.5px solid var(--color-primary);
  background-color: var(--bg-surface-glass);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}

#match-display-bar.has-matches-style {
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Matches Pager/Carousel Styles */
.matches-card-carousel-container {
  width: 100%;
  position: relative;
}

.fade-in-slide {
  animation: fadeInSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Matches Header Dropdown Selection Styles */
.matches-title-dropdown-btn:hover,
.matches-title-dropdown-btn:focus,
.matches-title-dropdown-btn:active {
  color: var(--text-main) !important;
  outline: none;
}

.matches-title-dropdown-btn:hover svg {
  color: var(--color-primary) !important;
}

.matches-dropdown-item:hover {
  background-color: rgba(245, 158, 11, 0.04) !important;
}

.matches-dropdown-item.selected {
  background-color: rgba(245, 158, 11, 0.08) !important;
}

.pager-dot.active {
  background-color: var(--color-primary);
  width: 20px;
  border-radius: 4px;
}

.pager-dot:hover:not(.active) {
  background-color: var(--text-muted);
}

.empty-state-view.no-matches-compact {
  flex-direction: row;
  justify-content: center;
  padding: 8px 20px;
  gap: 12px;
}

.empty-state-view.no-matches-compact .empty-state-illustration {
  margin-bottom: 0;
  display: flex;
  align-items: center;
}

.empty-state-view.no-matches-compact h3 {
  margin: 0;
  font-size: 1.125rem;
}

.empty-state-illustration {
  font-size: 48px;
  margin-bottom: 8px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-state-view h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.empty-state-view p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Match Cards */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-slot-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.match-slot-group-header {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 6px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.match-slot-group-count {
  background: var(--color-primary);
  color: var(--bg-surface);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.match-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background-color: var(--color-primary-dark);
  color: #ffffff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 8px;
  line-height: 1;
}


.match-card {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-end) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition-smooth);
  animation: matchCardBlink 3s ease-in-out infinite;
}

@keyframes matchCardBlink {
  0%, 100% {
    box-shadow: none;
    border-color: var(--border-color);
  }
  50% {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
    border-color: var(--color-primary);
  }
}

.match-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: 0 8px 16px -8px rgba(45, 30, 20, 0.15);
}

.match-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.match-avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: #ffffff;
}

.match-avatar.driver-avatar {
  background: linear-gradient(135deg, var(--color-secondary) 0%, hsl(28, 92%, 45%) 100%);
}

.match-info h4 {
  font-size: 0.875rem;
  line-height: 1.2;
}

.match-badge-role {
  display: inline-block;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.role-tag-rider {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.role-tag-driver {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--color-secondary);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.match-percent {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-success);
}

.match-pct-btn {
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
  border: 1.5px solid rgba(16, 185, 129, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.match-pct-btn:hover {
  background-color: rgba(16, 185, 129, 0.22);
}
:root[data-theme="dark"] .match-pct-btn {
  background-color: rgba(52, 211, 153, 0.18);
  color: hsl(142, 75%, 60%);
  border-color: rgba(52, 211, 153, 0.4);
}
:root[data-theme="dark"] .match-pct-btn:hover {
  background-color: rgba(52, 211, 153, 0.28);
}

.match-score-badge {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 3px 6px;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  user-select: none;
  position: relative;
}

.match-score-badge:hover:not(:disabled) {
  border-color: var(--color-primary);
  background-color: rgba(245, 158, 11, 0.08);
}

.match-score-badge.active {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  border-color: var(--color-primary-dark);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.match-score-badge:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.match-card-details {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 0.75rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-item-title {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.detail-item-value {
  font-weight: 500;
}

.car-detail-banner {
  grid-column: span 2;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2px;
  font-style: italic;
  color: var(--text-muted);
}

.match-actions {
  display: flex;
  gap: 8px;
}

.match-actions button {
  flex: 1;
}

/* ----------------------------------
   8. SVG Schematic Map Tab Styles
---------------------------------- */
.map-schematic-card {
  background-color: var(--bg-surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.map-stats-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.map-stat-badge {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 6px;
}

.text-green {
  color: var(--color-success);
}

.map-svg-container {
  width: 100%;
  height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
}

/* Keyframes for animated map dots along express lanes */
@keyframes dash {
  to {
    stroke-dashoffset: -40;
  }
}

#highway-line {
  stroke-dasharray: 8, 4;
  animation: dash 3s linear infinite;
}

/* Floating animation for waiting commuter pings */
.ping-circle {
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  transform-origin: center;
}

@keyframes ping {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Car movement simulations */
.car-dot {
  animation: moveCar 12s linear infinite;
}
#car-dot-1 { animation-delay: 0s; }
#car-dot-2 { animation-delay: 3s; }
#car-dot-3 { animation-delay: 6s; }
#car-dot-4 { animation-delay: 9s; }

@keyframes moveCar {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  95% {
    opacity: 1;
  }
  100% {
    transform: translate(80px, -480px);
    opacity: 0;
  }
}

.map-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.75rem;
  justify-content: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.color-green { background-color: var(--color-success); }
.color-blue { background-color: var(--color-primary); }
.color-orange { background-color: var(--color-secondary); }

/* ----------------------------------
   9. Navigation Bar Styles (3 Tabs)
---------------------------------- */
.bottom-nav {
  position: absolute;
  bottom: 40px;
  left: 20px;
  right: 20px;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  height: 64px;
  padding: 4px;
  z-index: 8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 450px) {
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    border-top: 1px solid var(--border-color);
    border-left: none;
    border-right: none;
    border-bottom: none;
    height: calc(64px + env(safe-area-inset-bottom, 12px));
    padding-bottom: env(safe-area-inset-bottom, 12px);
    background-color: var(--bg-app);
  }
}

.nav-item {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  transition: var(--transition-fast);
  border-radius: 14px;
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  stroke-width: 2px;
  transition: var(--transition-fast);
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Active Nav State */
.nav-item.active-nav {
  color: var(--color-primary);
  background-color: rgba(59, 130, 246, 0.08);
}

/* Nav Badge notifications */
.nav-icon-container {
  position: relative;
}

.badge-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  background-color: var(--color-secondary);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: #ffffff;
  box-sizing: border-box;
  line-height: 1;
}

/* Spinner animation */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ----------------------------------
   10. Dialog overlays (HTML5 Dialog)
---------------------------------- */
.app-dialog {
  border: none;
  background-color: transparent;
  color: var(--text-main);
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  padding: 0;
  align-items: center; /* Centered modal design */
  justify-content: center;
  z-index: 20;
}

.app-dialog:not([open]) {
  display: none;
}

/* Dialog backdrops */
.app-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.app-dialog[open] {
  display: flex;
}

.dialog-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 380px;
  max-width: calc(100% - 32px);
  max-height: 85%;
  overflow-y: auto;
  scroll-behavior: smooth;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: dialog-scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Center edit dialog calendars in the middle of the screen */
#edit-calendar-panel,
#edit-range-calendar-panel {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  margin-top: -160px !important; /* Half of calendar height (approx 320px) */
  margin-left: -140px !important; /* Half of calendar width (280px) */
  width: 280px !important;
  z-index: 10000 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45) !important;
  border-radius: var(--radius-lg) !important;
  animation: dialog-scale-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Center main scheduling calendar in the middle of the screen with animation and backdrop */
#custom-calendar-panel {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 280px !important;
  height: auto !important;
  z-index: 10000 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45) !important;
  border-radius: var(--radius-lg) !important;
  animation: dialog-scale-in-centered 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

#dash-calendar-panel {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 280px !important;
  height: auto !important;
  z-index: 10000 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45) !important;
  border-radius: var(--radius-lg) !important;
  animation: dialog-scale-in-centered 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes dialog-scale-in-centered {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.calendar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#custom-calendar-panel.hidden + #calendar-backdrop {
  display: none;
}

/* Lock background scroll when modal dialog is open to prevent mobile page free floating */
body.dialog-open {
  overflow: hidden !important;
  touch-action: none !important;
  -webkit-overflow-scrolling: none !important;
}

@keyframes dialog-scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 450px) {
  .dialog-content {
    width: calc(100% - 32px);
  }
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background-color: var(--bg-surface);
  z-index: 2;
}

.dialog-header h3 {
  font-size: 1rem;
}

.dialog-close-btn {
  background: none;
  border: none;
  outline: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.dialog-body {
  padding: 20px;
}

/* Detailed Match Modal Layouts */
.modal-match-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.modal-match-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.modal-match-summary-box {
  background-color: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--color-primary);
  padding: 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.75rem;
  line-height: 1.4;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ----------------------------------
   8. User Authentication Page
---------------------------------- */
.auth-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: var(--bg-app);
  height: 100%;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 340px;
  background-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slide-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-logo-area {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.big-logo {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.05em;
  text-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, hsl(38, 95%, 55%) 0%, hsl(24, 95%, 50%) 50%, hsl(8, 95%, 45%) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.15em;
}

.auth-subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-toggle-text {
  font-size: 0.775rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  margin-bottom: 0;
}

.auth-toggle-text a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-toggle-text a:hover {
  text-decoration: underline;
}

/* Forgot Password Link */
.forgot-password-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.forgot-password-link {
  font-size: 0.75rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
  opacity: 0.85;
}

.forgot-password-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Forgot Password Form */
.forgot-pw-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 4px;
}

.forgot-pw-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.forgot-pw-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Forgot Password Success Message */
.forgot-success-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--color-success);
  animation: slide-fade-in 0.3s ease-out;
}

.forgot-success-msg svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.forgot-success-msg p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-success);
  margin: 0;
}

/* ----------------------------------
   9. Dashboard Corridor Expected Counts List
---------------------------------- */
.dashboard-filters-card {
  position: relative;
  z-index: 10;
  background-color: var(--bg-surface-glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  margin-bottom: 8px;
}

.dashboard-subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
  margin-bottom: 6px;
  font-weight: 700;
}

.dashboard-filters-card .form-fieldset {
  gap: 6px;
}

.dashboard-filters-card .segmented-control {
  min-height: 56px;
}

.dashboard-filters-card .form-group {
  gap: 2px;
}

.dashboard-filters-card .calendar-trigger#dash-filter-date-trigger {
  padding: 10px 12px !important;
  font-size: 0.8rem !important;
  min-height: 40px !important;
  height: 40px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
}

.dashboard-filters-card select#dash-filter-time {
  padding: 10px 32px 10px 12px !important;
  font-size: 0.8rem !important;
  min-height: 40px !important;
  height: 40px !important;
  box-sizing: border-box !important;
  line-height: 1.3 !important;
  background-position: right 10px center !important;
}

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 2px;
}

.corridor-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.corridor-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.corridor-to {
  display: none; /* hidden by default on pickup cards */
}

/* Destination layout override rules (counts on left, 'to' and location badge in middle, text on right) */
.corridor-card.is-destination .corridor-counts {
  order: 1;
  width: 90px;
  flex-shrink: 0;
  align-items: flex-start;
}

.corridor-card.is-destination .corridor-to {
  display: block;
  text-align: center;
  order: 2;
  font-family: var(--font-primary);
  font-size: 0.725rem;
  font-weight: 400;
  color: var(--text-muted);
  font-style: normal;
  text-transform: lowercase;
  margin-left: 24px; /* gap from counts */
  margin-right: 10px; /* gap from badge */
  flex-shrink: 0;
  width: 16px;
}

.corridor-card.is-destination .corridor-badge {
  order: 3;
  width: 34px;
  flex-shrink: 0;
  text-align: center;
  margin-left: 0;
  margin-right: 12px; /* gap to text block */
}

.corridor-card.is-destination .corridor-text {
  order: 4;
  flex: 1;
  min-width: 0;
  margin-left: 0;
  text-align: right;
}

.corridor-card.is-destination .corridor-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.corridor-card.is-destination .corridor-desc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.corridor-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.corridor-text {
  flex: 1;
  min-width: 0;
  margin-left: 12px; /* gap between badge and text */
}

.corridor-badge {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  padding: 4px 6px;
  border-radius: 6px;
  min-width: 36px;
  text-align: center;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.corridor-badge:hover {
  transform: translateY(-1px) scale(1.08);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  filter: brightness(1.2);
}

.corridor-badge:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

.badge-va {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-ncr {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
  animation: border-flash-orange 1.5s infinite;
}

.corridor-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.corridor-desc {
  font-size: 0.725rem;
  color: var(--text-muted);
  line-height: 1.1;
  margin-top: 1px;
}

.corridor-counts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.corridor-counts.is-passed {
  opacity: 0.35;
  filter: grayscale(1);
  pointer-events: none;
}

.corridor-card.is-passed {
  opacity: 0.45;
  filter: grayscale(0.6);
  pointer-events: none;
}

.count-item {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.count-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  color: var(--text-muted);
}

.count-svg-icon {
  width: 15px;
  height: 15px;
  stroke: var(--text-muted);
  vertical-align: middle;
  display: inline-block;
}

.count-value-wrapper {
  display: inline-block;
  min-width: 16px;
  text-align: right;
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.875rem;
}

.count-label {
  display: inline-block;
  min-width: 48px;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.count-value {
  color: var(--text-main);
  font-weight: 700;
}

/* ----------------------------------
   10. User Profile & Schedules Management
---------------------------------- */
.profile-card {
  background: linear-gradient(135deg, var(--bg-surface) 0%, hsl(220, 24%, 12%) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}

.profile-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.profile-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-terms-link {
  font-size: 0.75rem;
  color: #0066cc;
  text-decoration: underline;
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
  display: inline-block;
  margin-top: 4px;
}

.profile-terms-link:hover {
  color: #004499;
}

.profile-privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(135deg, hsl(28, 90%, 52%) 0%, hsl(20, 90%, 48%) 100%);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.privacy-lock-icon {
  width: 18px;
  height: 18px;
  color: #ffffff;
  flex-shrink: 0;
  margin-top: 2px;
}

.profile-privacy-notice p {
  font-size: 0.725rem;
  line-height: 1.35;
  color: #ffffff;
}

.profile-privacy-notice strong {
  color: #ffffff;
}

.my-schedules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.my-schedule-item {
  background-color: var(--bg-surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
  height: 64px;
  box-sizing: border-box;
}

.my-schedule-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.my-schedule-route {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.my-schedule-time {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.btn-delete-schedule {
  background: none;
  border: none;
  color: var(--color-error);
  cursor: pointer;
  padding: 6px;
  font-size: 0.85rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-delete-schedule:hover {
  opacity: 1;
  transform: scale(1.1);
}

.btn-edit-schedule {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  padding: 6px;
  font-size: 0.85rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-edit-schedule:hover {
  opacity: 1;
  transform: scale(1.1);
}

.hint-text {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.app-main-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Location details popout modal styles */
.popout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(45, 30, 20, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.popout-overlay.hidden {
  display: none;
  opacity: 0;
}

.popout-back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  padding: 0;
}

.popout-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
  color: var(--color-warning);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.popout-back-btn:active {
  transform: scale(0.95);
}

.popout-circle {
  position: relative;
  width: 385px;
  height: 340px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-app) 100%);
  border: 2px solid var(--border-color);
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.25), inset 0 0 15px rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 52px 12px 24px 12px;
  text-align: center;
  box-sizing: border-box;
  max-height: 90vh;
  overflow: hidden;
  animation: popoutScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              border-radius 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes popoutScaleUp {
  0% {
    transform: scale(0.65);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.popout-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  position: relative;
  z-index: 2;
}

#popout-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--sunset-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1.3;
}

#popout-desc {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  color: var(--text-main);
  margin: 0;
  line-height: 1.4;
  font-weight: 400;
  width: 100%;
}

/* Transit Tab Toggles */
.transit-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 3px;
  gap: 3px;
  margin-top: 4px;
  margin-bottom: 8px;
  width: 340px; /* expanded to comfortably fit 4 tabs with more breathing room */
  box-sizing: border-box;
  z-index: 2;
}

.transit-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 6px 2px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.transit-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.transit-tab-btn.active {
  background: var(--sunset-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.transit-tab-icon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* WMATA departures board styling */
.wmata-board {
  width: 100%; /* fill the expanded width of popout content */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.wmata-header {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  padding-bottom: 5px;
  margin-bottom: 2px;
}

.wmata-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
  box-sizing: border-box;
}

.wmata-list::-webkit-scrollbar {
  width: 5px;
}
.wmata-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}
.wmata-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.wmata-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.metro-arrival-row {
  display: flex;
  align-items: center;
  width: 100%;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  transition: var(--transition-fast);
}

.metro-arrival-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.metro-pill {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%; /* sleek circular pill icon */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.metro-bl { background-color: #0d82d4; color: #ffffff; }
.metro-yl { background-color: #f7ca18; color: #000000; }
.metro-or { background-color: #e65c00; color: #ffffff; }
.metro-sv { background-color: #95a5a6; color: #000000; }
.metro-gr { background-color: #26a65b; color: #ffffff; }
.metro-rd { background-color: #cf000f; color: #ffffff; }

.bus-pill {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 32px;
  height: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.metro-bus {
  background-color: #dc2626;
  color: #ffffff;
}

.omni-ride {
  background-color: #0891b2;
  color: #ffffff;
}

.vre-pill {
  background-color: #0b3c5d; /* VRE Commuter Rail Dark Navy Blue */
  color: #ffffff;
}

.metro-dest {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
  margin-left: 8px;
  flex: 1;
  font-weight: 600;
}

.metro-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #f5b041; /* Amber LED color */
  text-align: right;
  flex-shrink: 0;
  font-size: 0.725rem;
  width: 65px;
  white-space: nowrap;
}
.arr-flash {
  animation: wmataFlash 1s step-end infinite;
  color: #ff3b30;
  font-weight: 800;
}

@keyframes wmataFlash {
  50% { opacity: 0; }
}

/* Commuter Lot Map Background Sizing & Text Glass Overlay */
.popout-map-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  border-radius: 50%;
  animation: popoutScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.popout-text-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: center;
  transition: var(--transition-smooth);
}

.popout-circle.has-map {
  padding: 0 !important;
  overflow: hidden;
}

.popout-circle.has-map .popout-content {
  height: 100%;
  width: 100%;
  padding: 52px 24px 24px 24px;
  box-sizing: border-box;
  justify-content: flex-start;
  align-items: center;
}

.popout-circle.has-map .popout-text-container {
  background: rgba(255, 252, 248, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 8px 10px;
  width: 70%;
  box-shadow: 0 6px 20px rgba(45, 30, 20, 0.15);
  z-index: 2;
  margin-top: 24px;
}

.popout-circle.has-map #popout-title {
  font-size: 0.85rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

/* Leaflet Interactive Map Overrides */
.leaflet-control-attribution {
  display: none !important;
}

.leaflet-container {
  background-color: var(--bg-app) !important;
}

/* Custom Calendar Picker & Mode Selector — 5-column layout */


.segmented-control.five-column .segment-label {
  font-size: 0.7rem;
  padding: 8px 2px;
  letter-spacing: -0.01em;
}

.segmented-control.five-column .selection-slider {
  width: calc((100% - 8px) / 5);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.segmented-control.five-column:has(input[value="single"]:checked) .selection-slider {
  transform: translateX(0);
}

.segmented-control.five-column:has(input[value="range"]:checked) .selection-slider {
  transform: translateX(100%);
}

.segmented-control.five-column:has(input[value="multiple"]:checked) .selection-slider {
  transform: translateX(200%);
}

.segmented-control.five-column:has(input[value="weekends"]:checked) .selection-slider {
  transform: translateX(300%);
}

.segmented-control.five-column:has(input[value="holidays"]:checked) .selection-slider {
  transform: translateX(400%);
}

/* Calendar day states for weekends & holidays — greyed out */
.calendar-day.is-weekend,
.calendar-day.is-holiday {
  color: var(--text-muted);
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
  background: none !important;
  position: relative;
}

/* Subtle strikethrough on greyed-out weekend/holiday cells */
.calendar-day.is-weekend::after,
.calendar-day.is-holiday::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 1.5px;
  background-color: var(--text-muted);
  top: 50%;
  left: 20%;
  opacity: 0.5;
}

/* Today on a weekend/holiday — always selectable with clear orange indicator */
.calendar-day.today.is-weekend,
.calendar-day.today.is-holiday {
  opacity: 1;
  border: 2px solid var(--color-secondary) !important;
  color: var(--text-main);
  cursor: pointer;
  pointer-events: auto;
}

.calendar-day.today.is-weekend::after,
.calendar-day.today.is-holiday::after {
  display: none;
}

/* In weekends/holidays mode, make the selected ones fully active (override the grey) */
.calendar-day.is-weekend.selected,
.calendar-day.is-holiday.selected {
  opacity: 1;
  color: #ffffff;
  cursor: default;
  pointer-events: auto;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
}

.calendar-day.is-weekend.selected::after,
.calendar-day.is-holiday.selected::after {
  display: none;
}

.calendar-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-main);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  min-height: 48px;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-primary);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
}

.calendar-trigger:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.calendar-trigger svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.custom-calendar-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 280px;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(45, 30, 20, 0.18);
  padding: 16px;
  z-index: 1000;
  box-sizing: border-box;
  animation: slide-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----------------------------------
   Custom Location Autocomplete
   (inline input with suggestion dropdown)
---------------------------------- */
.custom-dropoff-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.custom-location-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--color-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  animation: slide-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-location-warning strong {
  font-weight: 700;
}

.custom-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(45, 30, 20, 0.18);
  box-sizing: border-box;
  animation: slide-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.custom-autocomplete-dropdown.hidden {
  display: none !important;
}

.custom-autocomplete-dropdown::-webkit-scrollbar {
  width: 5px;
}

.custom-autocomplete-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.custom-autocomplete-dropdown::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 10px;
}

.custom-autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 0.82rem;
  color: var(--text-main);
  transition: background-color 0.15s ease;
  user-select: none;
}

.custom-autocomplete-item:hover,
.custom-autocomplete-item.active {
  background-color: rgba(59, 130, 246, 0.08);
}

.custom-autocomplete-item:active {
  background-color: rgba(59, 130, 246, 0.14);
}

.custom-autocomplete-item .loc-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-primary);
}

.custom-autocomplete-item .loc-name {
  font-weight: 600;
  line-height: 1.2;
}

.custom-autocomplete-item .loc-area {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 400;
}

.custom-autocomplete-category {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 12px 4px;
  user-select: none;
}

.custom-autocomplete-no-results {
  padding: 14px 12px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

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

.btn-cal-nav {
  background: none;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cal-nav:hover {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-primary);
}

.calendar-month-year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.825rem;
  color: var(--text-main);
  text-align: center;
  flex: 1;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 2px;
}

.calendar-day {
  background: none;
  border: none;
  aspect-ratio: 1;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-radius 0.15s ease;
}

.calendar-day:hover:not(.selected):not(.range-start):not(.range-end) {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-primary);
}

.calendar-day.other-month {
  visibility: hidden;
  pointer-events: none;
}

.calendar-day.today {
  border: 2px solid var(--color-secondary) !important;
}

.calendar-day.selected {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
}

.calendar-day.range-start {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.calendar-day.range-end {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.calendar-day.range-mid {
  background-color: rgba(245, 158, 11, 0.18);
  color: var(--text-main);
  border-radius: 0;
}

.calendar-day:disabled {
  color: var(--text-muted);
  opacity: 0.2;
  cursor: not-allowed;
  background: none !important;
  border: none !important;
  pointer-events: none;
}

/* Custom Scroll Wheels for Multiple Date Customization */
.scroll-wheels-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
  background-color: hsl(36, 40%, 86%);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border-color);
  position: relative;
}

.scroll-wheel {
  height: 120px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  position: relative;
  scrollbar-width: none; /* Hide Firefox scrollbars */
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.1);
}

#wheel-dates-container {
  flex: 0 0 100px;
}

#wheel-times-container {
  flex: 1;
  min-width: 0;
}

.scroll-wheel::-webkit-scrollbar {
  display: none; /* Hide Chrome/Safari scrollbars */
}

.scroll-wheel-list {
  padding-top: 40px; /* Spacers top and bottom to center the first/last items */
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
}

.wheel-item {
  height: 40px;
  min-height: 40px;
  line-height: 40px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  scroll-snap-align: center;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), font-size 0.15s ease, color 0.15s ease, background-color 0.15s ease;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  letter-spacing: -0.015em;
}

.wheel-item.active {
  color: var(--color-primary);
  font-weight: 700;
  transform: scale(1.15); /* Bulge/bow out effect */
  background-color: hsla(28, 92%, 50%, 0.08); /* Highlight slightly */
}

@media (max-width: 480px) {
  #dialog-multiple-prompt .dialog-content {
    padding: 16px !important;
  }
  .scroll-wheels-container {
    gap: 8px;
    padding: 12px 8px;
  }
  #wheel-dates-container {
    flex: 0 0 90px;
  }
  .wheel-item {
    font-size: 0.74rem;
  }
}

/* Confirmed times summary box styles */
.confirmed-summary-box {
  margin-top: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  background-color: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  user-select: none;
}

.confirmed-summary-box:hover {
  border-color: var(--color-primary);
  background-color: hsla(28, 92%, 50%, 0.02);
}

.confirmed-summary-box #confirmed-summary-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.confirmed-summary-box .confirmed-summary-arrow {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.confirmed-summary-box .confirmed-summary-arrow svg {
  transition: transform 0.2s ease;
}

.confirmed-summary-box:hover .confirmed-summary-arrow svg {
  transform: translateY(1px);
}

/* Commuter Lot & Destination Card Overhaul Styles */
.lot-card, .dest-card {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  gap: 8px;
}

.lot-card-left, .dest-card-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.lot-badge-dropdown-row, .dest-badge-dropdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Override default is-destination styles for both cards to keep layout consistent */
.lot-card.is-destination, .dest-card.is-destination {
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.lot-card.is-destination .lot-card-left,
.dest-card.is-destination .dest-card-left {
  order: 1 !important;
  text-align: left !important;
  align-items: flex-start !important;
}

.lot-card.is-destination .corridor-counts,
.dest-card.is-destination .corridor-counts {
  order: 2 !important;
  width: auto !important;
  align-items: flex-end !important;
  opacity: 1;
  filter: none;
}

.lot-card.is-destination .corridor-to,
.dest-card.is-destination .corridor-to {
  display: none !important;
}

.lot-card.is-destination .corridor-badge,
.dest-card.is-destination .corridor-badge {
  order: unset !important;
  width: auto !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

/* Custom Dropdown Styles inside Commuter Lot Cards */
.lot-dropdown-container {
  display: inline-block;
}

.lot-dropdown-trigger {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border: 1px solid var(--color-primary-dark);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-primary);
  font-size: 0.725rem;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

.lot-dropdown-trigger:hover {
  filter: brightness(1.15);
  border-color: var(--color-primary);
}

.dropdown-chevron-icon {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.lot-dropdown-container.open .dropdown-chevron-icon {
  transform: rotate(180deg);
}

.lot-dropdown-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 99999; /* Ensure it floats above all other app layout elements */
  background-color: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 55px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 9999px rgba(22, 17, 13, 0.4);
  width: 385px;
  max-width: calc(100% - 32px);
  box-sizing: border-box;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.lot-dropdown-menu.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  display: flex !important;
}

.dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.02);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
}

.dropdown-dest-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.dropdown-dest-counts {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.dropdown-count {
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
}

/* Weather Status Ticker */
.weather-ticker-container {
  width: 100%;
  overflow: hidden;
  background: transparent;
  border-bottom: none;
  padding: 0px 16px;
  margin-top: 0;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.weather-ticker-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: weather-marquee 25s linear infinite;
}

.weather-ticker-track:hover {
  animation-play-state: paused;
}

.weather-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 48px;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-main);
}

.weather-city {
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.weather-icon {
  font-size: 0.95rem;
}

.weather-temp {
  color: var(--text-main);
  font-weight: 700;
}

.weather-alert {
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 0.775rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@keyframes weather-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Clickable Train Line Filter Badges */
.line-filter-btn {
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 26px !important;
  height: 26px !important;
  font-size: 0.7rem !important;
}

.line-filter-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.line-filter-btn.active {
  transform: scale(1.18);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.25), 0 2px 5px rgba(0, 0, 0, 0.25);
  border: 1.5px solid #ffffff !important;
}

.line-filter-btn.all-filter {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: var(--text-main) !important;
}

/* Flashing Orange Animation for OmniRide Badge */
@keyframes border-flash-orange {
  0%, 100% {
    outline: 2px solid transparent;
    box-shadow: 0 0 0 rgba(249, 115, 22, 0);
  }
  50% {
    outline: 2px solid #f97316;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.8);
  }
}

.omni-flash-orange {
  animation: border-flash-orange 1.5s infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.omni-flash-orange:hover {
  transform: scale(1.1);
}

.pulse-button-orange {
  animation: pulse-button-orange-key 1.5s infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.pulse-button-orange:hover {
  transform: scale(1.05);
}

@keyframes pulse-button-orange-key {
  0%, 100% {
    background-color: #f59e0b !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }
  50% {
    background-color: #ff9800 !important;
    box-shadow: 0 0 16px #f59e0b, 0 0 32px #ff5722, 0 0 8px rgba(255, 255, 255, 0.5);
  }
}

/* Timeline styling for itinerary popout */
.itinerary-timeline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 6px 8px 0px 8px;
  box-sizing: border-box;
  max-height: 220px;
  overflow-y: auto;
}

/* Custom scrollbar for timeline list */
.itinerary-timeline::-webkit-scrollbar {
  width: 6px;
}
.itinerary-timeline::-webkit-scrollbar-track {
  background: transparent;
}
.itinerary-timeline::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
.itinerary-timeline::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  width: 100%;
  text-align: left;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: -10px;
  width: 2px;
  background: var(--border-color);
  opacity: 0.5;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--color-warning); /* Orange dot */
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 6px var(--color-warning);
  flex-shrink: 0;
  z-index: 1;
}

.timeline-content {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.85rem;
}

.timeline-stop {
  font-weight: 600;
  color: var(--text-main);
}

.timeline-time {
  font-family: monospace;
  font-weight: 700;
  color: var(--color-warning);
  margin-left: auto;
}

/* Clickable Metro Train and Bus badges styling & flash animations */
@keyframes border-flash-train {
  0%, 100% {
    outline: 2px solid transparent;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  }
}

.metro-train-clickable {
  animation: border-flash-train 2s infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.metro-train-clickable:hover {
  transform: scale(1.1);
}

@keyframes border-flash-bus {
  0%, 100% {
    outline: 2px solid transparent;
    box-shadow: 0 0 0 rgba(0, 122, 255, 0);
  }
  50% {
    outline: 2px solid #007aff;
    box-shadow: 0 0 8px rgba(0, 122, 255, 0.8);
  }
}

.metro-bus-clickable {
  animation: border-flash-bus 2s infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.metro-bus-clickable:hover {
  transform: scale(1.1);
}

/* ----------------------------------
   Safety Features Styling
---------------------------------- */
.active-safety-card {
  background-color: var(--bg-surface);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.active-safety-card.verified {
  border-color: var(--color-success);
}

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

.safety-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.safety-badge.warning {
  background-color: hsla(40, 93%, 40%, 0.15);
  color: var(--color-warning);
  border: 1px solid var(--color-warning);
}

.safety-badge.success {
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.safety-timer-display {
  font-family: monospace;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  text-align: center;
  margin: 8px 0;
  letter-spacing: 0.05em;
}

.safety-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.btn-safety-action {
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  font-family: var(--font-primary);
  transition: var(--transition-fast);
}

.btn-safety-action:disabled {
  opacity: 0.6;
  background-color: #d1d5db !important; /* Slate grey */
  color: #4b5563 !important;            /* Dark grey text */
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.btn-safety-share {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-safety-verify {
  background-color: #3b82f6;
  color: #ffffff;
}

.btn-safety-checkin {
  background-color: var(--color-success);
  color: #ffffff;
  grid-column: span 2;
  font-size: 0.9rem;
  padding: 10px;
}

.btn-safety-sos {
  background-color: var(--color-error);
  color: #ffffff;
  grid-column: span 2;
  font-size: 0.9rem;
  padding: 10px;
  margin-top: 6px;
  animation: pulse-sos 2s infinite;
}

@keyframes pulse-sos {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

@keyframes alarm-flashing {
  0%, 100% { background-color: rgba(220, 38, 38, 0.95); }
  50% { background-color: rgba(185, 28, 28, 0.95); }
}

.alarm-flashing-overlay {
  animation: alarm-flashing 1s infinite;
  color: white;
  text-align: center;
  padding: 32px 24px;
}

@keyframes warning-icon-flash {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.15; transform: scale(0.85); }
}
.flashing-warning {
  animation: warning-icon-flash 0.8s infinite ease-in-out;
}

@keyframes share-btn-flash {
  0%, 100% { background-color: var(--color-primary); box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7); }
  50% { background-color: #d97706; box-shadow: 0 0 0 8px rgba(249, 115, 22, 0); }
}
.flashing-button {
  animation: share-btn-flash 1.2s infinite ease-in-out;
}

/* Prevent iOS Safari/mobile webview auto-zoom on input focus */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Settings Dropdown & Trigger Styles */
.btn-settings-trigger {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 0 !important;
  cursor: pointer;
  color: #333333 !important; /* Dark color for circles inside the white box */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: transform 0.2s ease, background-color 0.15s ease, color 0.15s ease-out;
  border-radius: 99px !important; /* Rounded pill corners */
  width: 40px !important; /* Longer horizontally */
  height: 16px !important; /* Keep enclosure height same */
  box-sizing: border-box;
}
.btn-settings-trigger:hover {
  background-color: #f3f4f6 !important;
  color: #000000 !important;
}
:root[data-theme="dark"] .btn-settings-trigger {
  background: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}
:root[data-theme="dark"] .btn-settings-trigger:hover {
  background-color: #f3f4f6 !important;
  color: #000000 !important;
}
.btn-settings-trigger:active {
  transform: scale(0.92);
}

.settings-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 150px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  margin-top: 4px;
  transform-origin: top right;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.settings-dropdown-menu.hidden {
  display: none !important;
}

.settings-dropdown-item {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  font-weight: 500;
  font-family: var(--font-display), sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.15s ease-out;
}
.settings-dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
}
:root[data-theme="dark"] .settings-dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

/* Tutorial Screenshot Overlay Styling */
.tutorial-image-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 12px auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.tutorial-overlay-pointer {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulsePointer 1.6s infinite;
  z-index: 15;
}

@keyframes pulsePointer {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.75);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.tutorial-overlay-bubble {
  position: absolute;
  background: rgba(45, 30, 20, 0.92);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-primary), sans-serif;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  z-index: 20;
}
:root[data-theme="dark"] .tutorial-overlay-bubble {
  background: rgba(24, 15, 15, 0.95);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Interactive Tutorial Styles */
.tutorial-link-lot,
.tutorial-link-ncr {
  transition: transform 0.15s ease-out, filter 0.15s ease-out;
}

.tutorial-link-lot:hover,
.tutorial-link-ncr:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.tutorial-link-lot:active,
.tutorial-link-ncr:active {
  transform: scale(0.95);
}

.tutorial-tooltip-bubble {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #000000 !important;
  border: 2.5px solid #ff6a00 !important;
  color: #ffffff !important;
  padding: 18px;
  border-radius: 16px;
  font-size: 11px;
  line-height: 1.4;
  width: 310px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  z-index: 99999;
  box-sizing: border-box;
}
.tutorial-tooltip-bubble strong {
  color: #ff9f0a !important;
}

.tutorial-tooltip-bubble.hidden {
  display: none !important;
}

.tutorial-tooltip-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 99998;
}

.tutorial-tooltip-backdrop.hidden {
  display: none !important;
}

/* Hide number input spinners (dropdown arrows) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"],
.seats-input {
  -moz-appearance: textfield;
  font-family: var(--font-primary) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
}
input[type="number"]::placeholder,
.seats-input::placeholder {
  font-weight: 400 !important;
  color: var(--text-muted) !important;
  opacity: 0.65;
}

.calendar-selected-count-badge {
  font-size: 0.8rem;
  font-weight: 700 !important;
  color: var(--color-primary) !important;
  background-color: var(--border-glow) !important;
  padding: 4px 12px;
  border-radius: 12px;
  text-align: center;
  margin: 0 8px;
  display: inline-block;
  white-space: nowrap;
  flex-grow: 1;
}




