/* ----------------------------------------------------
   CSS Variables & Core Theme Configurations
   ---------------------------------------------------- */
:root {
  --font-family: 'Outfit', sans-serif;
  
  /* Dark Theme Variables (Default) */
  --bg-app: hsl(225, 30%, 8%);
  --bg-sidebar: hsl(225, 28%, 6%);
  --bg-card: rgba(22, 30, 49, 0.55);
  --bg-card-hover: rgba(28, 38, 62, 0.7);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(0, 229, 255, 0.15);
  
  --primary-color: hsl(174, 90%, 45%);
  --primary-hover: hsl(174, 90%, 38%);
  --primary-glow: rgba(0, 229, 255, 0.3);
  
  --secondary-color: hsl(145, 80%, 45%);
  --secondary-hover: hsl(145, 80%, 38%);
  --secondary-glow: rgba(16, 185, 129, 0.3);
  
  --accent-orange: hsl(28, 95%, 55%);
  --accent-red: hsl(350, 90%, 60%);
  
  --text-main: hsl(210, 38%, 96%);
  --text-muted: hsl(215, 20%, 65%);
  --text-inverse: hsl(225, 30%, 8%);
  
  --sidebar-width: 260px;
  --header-height: 80px;
  --transition-speed: 0.3s;
  --border-radius: 16px;
  
  --glass-blur: blur(12px) saturate(140%);
  --box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --card-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.2);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-app: hsl(210, 20%, 96%);
  --bg-sidebar: hsl(210, 22%, 92%);
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(0, 180, 216, 0.08);
  
  --primary-color: hsl(188, 90%, 40%);
  --primary-hover: hsl(188, 90%, 33%);
  --primary-glow: rgba(0, 180, 216, 0.2);
  
  --secondary-color: hsl(152, 75%, 40%);
  --secondary-hover: hsl(152, 75%, 33%);
  --secondary-glow: rgba(40, 167, 69, 0.2);
  
  --text-main: hsl(222, 28%, 15%);
  --text-muted: hsl(220, 15%, 45%);
  --text-inverse: hsl(210, 20%, 96%);
  
  --box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  --card-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
}

/* ----------------------------------------------------
   Reset & Base Styles
   ---------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
}

/* Scrollbar Style */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-sidebar);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* ----------------------------------------------------
   App Layout
   ---------------------------------------------------- */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: background-color var(--transition-speed), border var(--transition-speed);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  position: relative;
}

.logo-glow {
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  filter: blur(15px);
  opacity: 0.6;
  border-radius: 50%;
  left: 0;
  z-index: -1;
}

.logo-icon {
  font-size: 24px;
  color: var(--primary-color);
  filter: drop-shadow(0 0 5px var(--primary-glow));
}

.brand h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.brand .badge {
  font-size: 10px;
  padding: 2px 6px;
  background-color: var(--border-color);
  border-radius: 6px;
  color: var(--primary-color);
  font-weight: 600;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 18px;
  border-radius: var(--border-radius);
  color: var(--text-muted);
  font-weight: 500;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.nav-item i {
  font-size: 18px;
  transition: transform var(--transition-speed);
}

.nav-item:hover {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
  transform: translateX(4px);
}

.nav-item.active {
  color: var(--primary-color);
  background: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: 0 0 15px 0 var(--border-glow);
}

.nav-item.active i {
  transform: scale(1.1);
  color: var(--primary-color);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.theme-btn {
  background: var(--border-color);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.theme-btn:hover {
  background: var(--primary-color);
  color: var(--text-inverse);
  box-shadow: 0 0 10px var(--primary-glow);
}

.brand .theme-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
  font-size: 12px;
}


/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  padding: 30px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.header-welcome h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: 13px;
}

.text-xs {
  font-size: 11px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.live-clock {
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--card-shadow);
  font-variant-numeric: tabular-nums;
  min-width: 135px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--secondary-glow);
  animation: pulse-animation 2s infinite;
}

/* ----------------------------------------------------
   System Notifications
   ---------------------------------------------------- */
.notifications-wrapper {
  position: relative;
}

.notifications-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
  position: relative;
  box-shadow: var(--card-shadow);
}

.notifications-btn:hover {
  background: var(--primary-color);
  color: var(--text-inverse);
  border-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-glow);
}

.notifications-btn i {
  font-size: 18px;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--accent-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid var(--bg-app);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  min-width: 18px;
  text-align: center;
  transition: transform var(--transition-speed);
}

.notif-badge.pulse {
  animation: badge-pulse 0.4s ease-out;
}

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

.notifications-dropdown {
  position: absolute;
  right: 0;
  top: 55px;
  width: 340px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  z-index: 1000;
  display: none;
  flex-direction: column;
  animation: fade-in 0.3s ease-out forwards;
  overflow: hidden;
}

.notifications-dropdown.active {
  display: flex;
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.1);
}

.notif-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.btn-clear-notif {
  background: transparent;
  border: none;
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-speed);
}

.btn-clear-notif:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background var(--transition-speed);
}

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

.notif-item:hover {
  background: var(--bg-card-hover);
}

.notif-item.unread {
  background: rgba(0, 229, 255, 0.03);
  position: relative;
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-icon.delay {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-orange);
}

.notif-icon.alert {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

.notif-icon.info {
  background: rgba(0, 229, 255, 0.15);
  color: var(--primary-color);
}

.notif-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-message {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-main);
}

.notif-item.unread .notif-message {
  font-weight: 500;
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
}

.notif-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.notif-empty i {
  font-size: 24px;
}

@media (max-width: 600px) {
  .notifications-dropdown {
    width: 290px;
    right: -50px;
  }
}

/* Language Switcher */
.lang-wrapper {
  position: relative;
}

.lang-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-speed);
  box-shadow: var(--card-shadow);
  height: 42px;
}

.lang-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.lang-btn i {
  font-size: 14px;
  color: var(--text-muted);
}

.lang-dropdown {
  position: absolute;
  right: 0;
  top: 50px;
  width: 140px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fade-in 0.2s ease-out forwards;
}

.lang-dropdown.active {
  display: flex;
}

.lang-option {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.lang-option:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.lang-option.active {
  color: var(--primary-color);
  background: rgba(0, 229, 255, 0.05);
  font-weight: 600;
}

@media (max-width: 600px) {
  .lang-dropdown {
    right: -20px;
  }
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 8px var(--primary-glow);
}

.profile-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-status {
  font-size: 11px;
  color: var(--secondary-color);
}

/* ----------------------------------------------------
   Tab Panes Common Style
   ---------------------------------------------------- */
.tab-pane {
  display: none;
  animation: fade-in 0.4s ease-out forwards;
}

.tab-pane.active {
  display: block;
}

/* ----------------------------------------------------
   Glassmorphic Cards & Buttons
   ---------------------------------------------------- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--box-shadow);
  transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 15px 0;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border-radius: var(--border-radius);
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-speed);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-inverse);
  box-shadow: 0 4px 15px 0 var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 var(--primary-glow);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-inverse);
  box-shadow: 0 4px 15px 0 var(--secondary-glow);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 var(--secondary-glow);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

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

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 8px;
}

/* ----------------------------------------------------
   1. Search Schedules Tab Styles
   ---------------------------------------------------- */
.hero-banner {
  height: 200px;
  border-radius: var(--border-radius);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 40px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
}

.hero-content h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.hero-content p {
  font-size: 15px;
  color: hsl(210, 20%, 90%);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.search-card {
  margin-bottom: 30px;
}

/* Recent Searches History */
.recent-searches-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--border-radius);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--card-shadow);
  animation: slide-up var(--transition-speed) ease-out forwards;
}

.recent-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.recent-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-grow: 1;
}

.recent-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.recent-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.recent-chip i {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-clear-recent {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-speed);
}

.btn-clear-recent:hover {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.1);
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr 1fr auto;
  align-items: flex-end;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group input, .form-group select {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--border-radius);
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-speed);
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px var(--primary-glow);
}

.search-swap-btn {
  background: var(--border-color);
  border: 1px solid var(--border-color);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  align-self: flex-end;
  margin-bottom: 2px;
  color: var(--text-muted);
  transition: all var(--transition-speed);
}

.search-swap-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: rotate(180deg);
}

.btn-search {
  padding: 13px 25px;
}

/* Results Display */
.results-container {
  animation: slide-up 0.5s ease-out forwards;
}

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

.filter-options {
  display: flex;
  gap: 10px;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.filter-chip:hover, .filter-chip.active {
  color: var(--text-main);
  border-color: var(--primary-color);
  background: var(--bg-card-hover);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Result Ticket Card styling */
.result-card {
  display: grid;
  grid-template-columns: 80px 1.5fr 1fr 1.2fr auto;
  align-items: center;
  padding: 20px 24px;
}

.result-card:hover {
  transform: scale(1.005);
  border-color: var(--primary-color);
}

.result-type-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 20px;
}

.result-card.bus-result .result-type-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--secondary-color);
}

.result-main-details {
  display: flex;
  flex-direction: column;
}

.result-vehicle-name {
  font-size: 18px;
  font-weight: 700;
}

.result-route-line {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.result-schedule-times {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.time-row .station-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.result-price-info {
  display: flex;
  flex-direction: column;
}

.price-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.result-card.bus-result .price-text {
  color: var(--secondary-color);
}

.price-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.result-actions {
  display: flex;
  gap: 10px;
}

/* Status styles inside result cards */
.status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 4px;
}

.status-ontime {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--secondary-color);
}

.status-delayed {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--accent-orange);
}

.status-suspended {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: var(--accent-red) !important;
}

/* ----------------------------------------------------
   2. Live Tracker Tab Styles
   ---------------------------------------------------- */
.tracker-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  height: calc(100vh - var(--header-height) - 70px);
}

.tracker-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
}

.tracker-selectors {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.tracker-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tracker-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--border-radius);
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-speed);
}

.mode-btn.active {
  background: var(--bg-card-hover);
  color: var(--primary-color);
  box-shadow: 0 0 10px 0 var(--border-glow);
}

#tracker-mode-bus.active {
  color: var(--secondary-color);
}

.tracker-group select {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--border-radius);
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

/* Active Trip Stats styling */
.trip-details-card {
  background: rgba(0,0,0,0.15);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 20px;
}

.trip-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.trip-title h4 {
  font-size: 16px;
  font-weight: 700;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.route-line-name {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.trip-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-box .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-box .stat-value {
  font-size: 15px;
  font-weight: 600;
}

/* Timeline/Progress visual inside tracker sidebar */
.progress-timeline-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-stations {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.custom-progress-bar {
  position: relative;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  margin: 10px 0;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
  transition: width var(--transition-speed);
}

.progress-vehicle-marker {
  position: absolute;
  top: -12px;
  width: 30px;
  height: 30px;
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transform: translateX(-50%);
  transition: left var(--transition-speed);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Leaflet Map custom styles */
.tracker-map-container {
  padding: 0;
  overflow: hidden;
  height: 100%;
  position: relative;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

#tracker-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Leaflet custom dark popup styling */
.leaflet-popup-content-wrapper {
  background: var(--bg-sidebar) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  backdrop-filter: var(--glass-blur);
  border-radius: 12px !important;
}

.leaflet-popup-tip {
  background: var(--bg-sidebar) !important;
}

/* ----------------------------------------------------
   3. Seat Booking Tab Styles
   ---------------------------------------------------- */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}

.booking-selection {
  display: flex;
  flex-direction: column;
}

.booking-header-flow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.booking-setup-row {
  display: flex;
  gap: 15px;
}

.booking-setup-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.booking-setup-item label {
  font-size: 11px;
  color: var(--text-muted);
}

.booking-setup-item select {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-main);
  outline: none;
}

/* Seat Legend */
.seat-legend {
  display: flex;
  gap: 25px;
  justify-content: center;
  margin-bottom: 30px;
  background: rgba(0,0,0,0.1);
  padding: 10px;
  border-radius: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.legend-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}

/* Coach Box & Seats */
.coach-container {
  border: 2px dashed var(--border-color);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.1);
  max-width: 100%;
  overflow-x: auto;
}

.coach-front-indicator {
  background-color: var(--border-color);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 6px 20px;
  border-radius: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 30px;
}

.seats-grid {
  display: grid;
  grid-template-columns: repeat(10, 42px);
  grid-row-gap: 25px;
  grid-column-gap: 12px;
  justify-content: center;
}

/* Seat box styling */
.seat {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.seat-available {
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-color);
  color: var(--text-main);
}

.seat-available:hover {
  background-color: rgba(0, 229, 255, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.seat-selected {
  background-color: var(--primary-color);
  border: 2px solid var(--primary-color);
  color: var(--text-inverse);
  box-shadow: 0 0 10px var(--primary-glow);
  transform: scale(1.05);
}

.seat-occupied {
  background-color: rgba(255, 255, 255, 0.03);
  border: 2px solid transparent;
  color: rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
}

/* Corridor Spacing (Create aisle gap between Row 2 and Row 3) */
.seats-grid .seat:nth-child(4n - 1) {
  margin-top: 15px; /* Aisle gap */
}

/* Booking sidebar details */
.booking-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.summary-row span {
  color: var(--text-muted);
}

.price-row {
  font-size: 18px;
  color: var(--primary-color);
}

/* Ticket Pass Display */
.ticket-wrapper {
  background: radial-gradient(circle at 100% 50%, transparent 15px, hsl(222, 30%, 15%) 16px),
              radial-gradient(circle at 0% 50%, transparent 15px, hsl(222, 30%, 15%) 16px);
  background-position: top left, top right;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  animation: slide-up var(--transition-speed) ease-out forwards;
}

.ticket-header {
  background-color: hsl(222, 30%, 20%);
  padding: 16px 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed var(--border-color);
  font-size: 14px;
}

.ticket-header i {
  color: var(--primary-color);
}

.ticket-body {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ticket-main-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-station {
  display: flex;
  flex-direction: column;
}

.ticket-station .code {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.ticket-station .full-name {
  font-size: 12px;
  color: var(--text-muted);
}

.ticket-arrow {
  font-size: 20px;
  color: var(--primary-color);
}

.ticket-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.ticket-info-grid .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.ticket-info-grid .value {
  font-size: 14px;
  font-weight: 600;
}

.ticket-barcode-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

/* Beautiful Barcode Generator via CSS */
.barcode {
  height: 40px;
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--text-main),
    var(--text-main) 1px,
    transparent 1px,
    transparent 4px,
    var(--text-main) 4px,
    var(--text-main) 6px,
    transparent 6px,
    transparent 8px
  );
  opacity: 0.7;
}

.barcode-num {
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.ticket-actions {
  display: flex;
  gap: 10px;
  padding: 15px 20px;
  background-color: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--border-color);
}

.ticket-actions button {
  flex: 1;
}

/* ----------------------------------------------------
   4. Fare Calculator Styles
   ---------------------------------------------------- */
.calculator-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}

.calculator-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calculator-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.calculator-form select {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--border-radius);
  color: var(--text-main);
  outline: none;
}

.calc-metrics-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(0,0,0,0.15);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.metric-card i {
  font-size: 24px;
}

/* Station Timeline */
.calc-timeline-section {
  margin-top: 5px;
}

.calc-timeline-section h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

.calc-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 20px;
}

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

.timeline-node {
  position: relative;
  padding-bottom: 18px;
}

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

.timeline-node::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--bg-sidebar);
  border: 2px solid var(--border-color);
  z-index: 1;
  transition: all var(--transition-speed);
}

.timeline-node.active::before {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  box-shadow: 0 0 8px var(--primary-glow);
}

.timeline-node:first-child::before,
.timeline-node:last-child::before {
  border-color: var(--secondary-color);
  background-color: var(--secondary-color);
  box-shadow: 0 0 8px var(--secondary-glow);
}

.timeline-node-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-station-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.timeline-station-code {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  background-color: var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.icon-teal {
  color: var(--primary-color);
}

.icon-orange {
  color: var(--accent-orange);
}

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-info .label {
  font-size: 11px;
  color: var(--text-muted);
}

.metric-info .val {
  font-size: 16px;
  font-weight: 700;
}

/* Pricing Table Styling */
.fare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.fare-table th, .fare-table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

.fare-table th {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fare-table tbody tr {
  transition: background var(--transition-speed);
}

.fare-table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

.fare-table .bold {
  font-weight: 700;
  font-size: 16px;
}

/* ----------------------------------------------------
   Animations
   ---------------------------------------------------- */
@keyframes pulse-animation {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

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

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----------------------------------------------------
   Responsive Layout Styles
   ---------------------------------------------------- */
@media (max-width: 1400px) {
  .search-grid {
    grid-template-columns: 1fr 1fr;
  }
  .search-swap-btn {
    display: none;
  }
  .btn-search {
    grid-column: span 2;
  }
  .booking-layout, .calculator-layout {
    grid-template-columns: 1fr;
  }
  .tracker-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .tracker-map-container {
    height: 450px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: 1px solid var(--border-color);
    padding: 10px 15px;
    flex-direction: row;
    justify-content: space-around;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
  }
  
  .brand, .sidebar-footer {
    display: none;
  }
  
  .nav-menu {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 0;
  }
  
  .nav-item {
    padding: 8px 12px;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    border-radius: 8px;
  }
  
  .nav-item i {
    font-size: 16px;
  }

  .main-content {
    margin-left: 0;
    padding: 15px;
    padding-bottom: 90px; /* Space for bottom navbar */
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .result-card {
    grid-template-columns: 1fr;
    gap: 15px;
    text-align: center;
    justify-items: center;
  }

  .result-schedule-times {
    flex-direction: row;
    justify-content: center;
    gap: 15px;
  }

  .result-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .seats-grid {
    grid-template-columns: repeat(5, 36px);
    grid-column-gap: 8px;
    grid-row-gap: 15px;
  }

  .seat {
    width: 36px;
    height: 36px;
    font-size: 9px;
  }
}

/* Custom Leaflet Map Pin Overrides */
.station-map-pin, .vehicle-tracker-pin {
  background: transparent !important;
  border: none !important;
}

/* SS Labz Branding Styles */
.brand-accent {
  color: var(--primary-color);
  font-weight: 600;
  transition: color var(--transition-speed);
}

.brand-accent:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.sidebar-brand-credit {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 15px;
  text-align: center;
}

.app-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 40px;
  padding-bottom: 15px;
}

.booking-suspended-alert {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-main);
  background: rgba(239, 68, 68, 0.05);
  border: 1px dashed rgba(239, 68, 68, 0.3);
  border-radius: var(--border-radius);
  gap: 12px;
  width: 100%;
}

.booking-suspended-alert i {
  font-size: 36px;
  color: var(--accent-red);
}

.booking-suspended-alert h4 {
  font-size: 16px;
  font-weight: 700;
}

.booking-suspended-alert p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 380px;
}

/* ----------------------------------------------------
   Print Styles for Boarding Passes
   ---------------------------------------------------- */
@media print {
  /* Hide all elements on the page */
  body * {
    visibility: hidden;
  }
  
  /* Show only the ticket wrapper and its children */
  #generated-ticket-wrapper,
  #generated-ticket-wrapper * {
    visibility: visible;
  }
  
  /* Reset positions and force white backgrounds for ink savings */
  #generated-ticket-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 500px;
    margin: 30px auto;
    padding: 0;
    border: 1px solid #94a3b8 !important;
    border-radius: 12px;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  #generated-ticket-wrapper .ticket-header {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
  }

  #generated-ticket-wrapper .ticket-body {
    background-color: #ffffff !important;
    color: #0f172a !important;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  #generated-ticket-wrapper .ticket-station .code {
    color: #0f172a !important;
  }

  #generated-ticket-wrapper .ticket-station .full-name {
    color: #475569 !important;
  }

  #generated-ticket-wrapper .ticket-arrow {
    color: #0284c7 !important;
  }

  #generated-ticket-wrapper .ticket-info-grid .label {
    color: #475569 !important;
  }

  #generated-ticket-wrapper .ticket-info-grid .value {
    color: #0f172a !important;
  }

  #generated-ticket-wrapper .barcode {
    background: repeating-linear-gradient(
      90deg,
      #000000,
      #000000 1px,
      transparent 1px,
      transparent 4px,
      #000000 4px,
      #000000 6px,
      transparent 6px,
      transparent 8px
    ) !important;
    opacity: 1 !important;
  }

  #generated-ticket-wrapper .barcode-num {
    color: #000000 !important;
  }

  /* Hide the print/download actions inside the printed ticket */
  #generated-ticket-wrapper .ticket-actions {
    display: none !important;
  }
}

/* ----------------------------------------------------
   Custom Leaflet Popup & Station Card Styles
   ---------------------------------------------------- */
.custom-station-popup .leaflet-popup-content-wrapper {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  color: var(--text-main);
  padding: 0;
  overflow: hidden;
}

.custom-station-popup .leaflet-popup-content {
  margin: 0;
  line-height: 1.4;
  font-family: var(--font-family);
  width: 290px !important;
}

.custom-station-popup .leaflet-popup-tip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.custom-station-popup .leaflet-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 16px !important;
  padding: 12px 12px 0 0 !important;
}

.custom-station-popup .leaflet-popup-close-button:hover {
  color: var(--text-main) !important;
  background: transparent !important;
}

.station-popup-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}

.station-popup-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.station-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.popup-station-icon {
  font-size: 20px;
  color: var(--primary-color);
}

.popup-station-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.popup-station-code {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.popup-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popup-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.popup-facilities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.facility-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 20px;
  background-color: var(--border-color);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.facility-badge i {
  font-size: 10px;
  color: var(--primary-color);
}

.popup-arrivals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbar for Arrivals List */
.popup-arrivals-list::-webkit-scrollbar {
  width: 4px;
}
.popup-arrivals-list::-webkit-scrollbar-track {
  background: transparent;
}
.popup-arrivals-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.popup-arrival-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  transition: background-color 0.2s;
}

.popup-arrival-row:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .popup-arrival-row {
  background-color: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .popup-arrival-row:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.arrival-vehicle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.arrival-vehicle i {
  font-size: 12px;
  color: var(--primary-color);
}

.arrival-vehicle.bus i {
  color: var(--secondary-color);
}

.vehicle-info {
  display: flex;
  flex-direction: column;
}

.vehicle-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.vehicle-route {
  font-size: 10px;
  color: var(--text-muted);
}

.arrival-time-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.arrival-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.arrival-status {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.arrival-status.status-ontime {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.arrival-status.status-delayed {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.arrival-status.status-suspended {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.popup-no-arrivals {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
}

.tracker-suspended-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
  color: var(--accent-red);
  font-size: 12px;
  line-height: 1.4;
}

.tracker-suspended-alert i {
  font-size: 16px;
  flex-shrink: 0;
}

/* ----------------------------------------------------
   Database Connection Status Pill & Modal Styles
   ---------------------------------------------------- */
.db-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}

.db-status-badge.connected {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.db-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-orange);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-orange);
  transition: background-color var(--transition-speed);
}

.db-status-badge.connected .db-pulse-dot {
  background-color: var(--secondary-color);
  box-shadow: 0 0 8px var(--secondary-glow);
  animation: pulse 2s infinite;
}


/* Real-time seat locking animation */
.seat-pulsing-lock {
  animation: pulseLock 1.5s ease-in-out 3; /* Pulse 3 times (4.5s) */
  cursor: not-allowed;
  pointer-events: none;
  transition: all 0.5s ease;
}

@keyframes pulseLock {
  0%, 100% {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.8);
    color: rgb(239, 68, 68);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  }
  50% {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-muted);
    box-shadow: none;
  }
}

/* Toast Notifications Container (Top Right Corner) */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 3000;
  pointer-events: none;
}

.toast-item {
  width: 320px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  box-shadow: var(--box-shadow);
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  transition: all 0.3s ease;
}

.toast-item.fade-out {
  animation: toastSlideOut 0.3s ease-in forwards;
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.toast-icon.alert {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.toast-icon.delay {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
}

.toast-msg {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(125%);
    opacity: 0;
  }
}

/* ----------------------------------------------------
   Admin Panel & Booking Lookup Styles
   ---------------------------------------------------- */
.admin-table th, .admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.admin-table tbody tr {
  transition: background var(--transition-speed);
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table .btn-cancel-sm {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.admin-table .btn-cancel-sm:hover {
  background: #ef4444;
  color: var(--text-inverse);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.route-status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px 20px;
}

.route-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.route-meta strong {
  font-size: 14px;
  color: var(--text-main);
}

.route-meta span {
  font-size: 12px;
  color: var(--text-muted);
}

.route-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

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

.badge-status.suspended {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-toggle-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-toggle-status.suspend-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-toggle-status.suspend-btn:hover {
  background: #ef4444;
  color: var(--text-inverse);
}

.btn-toggle-status.activate-btn {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--secondary-color);
}

.btn-toggle-status.activate-btn:hover {
  background: var(--secondary-color);
  color: var(--text-inverse);
}

/* Admin Charts Styling */
.admin-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  margin-top: 10px;
}

.chart-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 24px;
}

.chart-card h3 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.chart-container {
  position: relative;
  width: 100%;
  height: 260px;
}

/* Connection Results Styling */
.connection-result {
  border-left: 3px solid var(--primary-color) !important;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.03), rgba(0, 0, 0, 0.15)) !important;
}

.connection-icon {
  background: rgba(0, 229, 255, 0.15) !important;
  color: var(--primary-color) !important;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.connection-result .result-main-details .result-route-line {
  color: var(--secondary-color) !important;
  font-weight: 600;
}

/* ----------------------------------------------------
   5. Weather Map Layer & Control Panel Overrides
   ---------------------------------------------------- */
.layer-toggles {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layer-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-main);
  user-select: none;
}

.layer-toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
}

/* Pulsing Leaflet Circle Keyframes */
@keyframes weather-overlay-pulse {
  0% {
    stroke-width: 1.5;
    fill-opacity: 0.15;
  }
  50% {
    stroke-width: 4.5;
    fill-opacity: 0.35;
  }
  100% {
    stroke-width: 1.5;
    fill-opacity: 0.15;
  }
}

.weather-pulse-red {
  animation: weather-overlay-pulse 2s infinite ease-in-out;
  stroke: #ef4444 !important;
  fill: #ef4444 !important;
}

.weather-pulse-orange {
  animation: weather-overlay-pulse 2.5s infinite ease-in-out;
  stroke: #f97316 !important;
  fill: #f97316 !important;
}

.weather-pulse-yellow {
  animation: weather-overlay-pulse 3s infinite ease-in-out;
  stroke: #eab308 !important;
  fill: #eab308 !important;
}

/* Custom Glassmorphic Weather Popup */
.custom-weather-popup .leaflet-popup-content-wrapper {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  color: var(--text-main);
  padding: 0;
  overflow: hidden;
}

.custom-weather-popup .leaflet-popup-content {
  margin: 0;
  line-height: 1.4;
  font-family: var(--font-family);
  width: 280px !important;
}

.custom-weather-popup .leaflet-popup-tip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.custom-weather-popup .leaflet-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 16px !important;
  padding: 12px 12px 0 0 !important;
}

.weather-popup-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}

.weather-popup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}

.weather-popup-body {
  font-size: 12px;
  color: var(--text-muted);
}

.weather-popup-impact {
  font-size: 11px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* ==========================================================================
   LankaTransit Hub - Enhancements Stylesheet Extensions
   ========================================================================== */

/* 1. Ticket Wallet */
.wallet-passes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.wallet-pass-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.wallet-pass-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-glow);
}

.wallet-pass-item:hover {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.06), rgba(16, 185, 129, 0.03));
  border-color: var(--primary-color);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.15);
}

.wallet-pass-item.past::before {
  background-color: var(--text-muted);
  box-shadow: none;
}

.wallet-pass-item.past {
  opacity: 0.7;
}

.wallet-pass-item.past:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--text-muted);
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
}

.pass-main-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pass-route {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pass-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pass-status-indicator {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.pass-status-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pass-status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--secondary-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.pass-status-badge.past {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.wallet-empty-state {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.wallet-empty-state i {
  font-size: 24px;
  color: var(--text-muted);
}

/* 2. Cabin Class Seating Overrides */
.seats-grid.class-1st {
  grid-template-columns: repeat(10, 42px);
  grid-row-gap: 35px;
}

.seats-grid.class-3rd {
  grid-template-columns: repeat(10, 42px);
  grid-row-gap: 18px;
}

/* Robust row-based spacing to replace index-based column gaps */
.seats-grid.class-1st .row-b {
  margin-top: 35px; /* Wide observation aisle */
}

.seats-grid.class-2nd .row-c {
  margin-top: 20px; /* Standard 2x2 aisle */
}

.seats-grid.class-3rd .row-d {
  margin-top: 18px; /* Dense 3x2 aisle */
}

/* Observation Window styling for 1st class carriage */
.coach-rear-window {
  width: 100%;
  height: 14px;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.15), rgba(16, 185, 129, 0.15));
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  box-shadow: 0 0 12px var(--primary-glow);
  margin-bottom: 20px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: border-pulse 3s infinite ease-in-out;
}

@keyframes border-pulse {
  0% { border-color: var(--primary-color); box-shadow: 0 0 6px var(--primary-glow); }
  50% { border-color: var(--secondary-color); box-shadow: 0 0 14px var(--secondary-glow); }
  100% { border-color: var(--primary-color); box-shadow: 0 0 6px var(--primary-glow); }
}

/* Premium Seat styling for 1st class */
.seats-grid.class-1st .seat.seat-available {
  border-color: rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.02);
}

.seats-grid.class-1st .seat.seat-available:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--primary-color);
  box-shadow: 0 0 8px var(--primary-glow);
}

/* Upgrade banner pulse animations */
.upgrade-banner i {
  animation: upgrade-pulse 1.8s infinite ease-in-out;
}

@keyframes upgrade-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; color: var(--secondary-color); }
  100% { transform: scale(1); opacity: 0.8; }
}

/* Multi-Modal map details */
.transfer-node-popup {
  font-family: var(--font-family);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.transfer-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.transfer-body {
  font-size: 11px;
  color: var(--text-muted);
}

.transfer-pill {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary-color);
  display: inline-block;
  align-self: flex-start;
}

/* 4. Admin Charts Grid Responsive Override */
.admin-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}




