/* ============================================================
   Indian Railways â€” Block Planning System
   Theme: Classic Light
   Primary: IR Blue (#1a237e) | Accent: Saffron (#f57c00) | BG: #f4f6f9
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap');

/* â”€â”€ CSS Variables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
  /* Backgrounds */
  --bg-app:        #f4f6f9;
  --bg-sidebar:    #1a237e;
  --bg-sidebar-dark: #131a5e;
  --bg-card:       #ffffff;
  --bg-card-hover: #fafbff;
  --bg-input:      #f8f9fc;

  /* Brand colours */
  --ir-blue:       #1a237e;
  --ir-blue-mid:   #283593;
  --ir-blue-light: #3949ab;
  --ir-blue-pale:  #e8eaf6;
  --saffron:       #f57c00;
  --saffron-light: #fb8c00;
  --saffron-pale:  #fff3e0;

  /* Semantic colours */
  --success:       #2e7d32;
  --success-light: #e8f5e9;
  --warning:       #e65100;
  --warning-light: #fff3e0;
  --danger:        #c62828;
  --danger-light:  #ffebee;
  --info:          #1565c0;
  --info-light:    #e3f2fd;

  /* Text */
  --text-primary:   #1c2340;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;
  --text-on-blue:   #ffffff;
  --text-on-blue-2: rgba(255,255,255,0.65);
  --text-on-blue-3: rgba(255,255,255,0.4);

  /* Borders */
  --border:        #e5e7eb;
  --border-strong: #d1d5db;
  --border-focus:  #3949ab;

  /* Typography */
  --font-main:    'Inter', system-ui, sans-serif;
  --font-display: 'Rajdhani', sans-serif;

  /* Radii */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;

  /* Shadows â€” light theme elevation */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:  0 2px 8px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-sidebar: 4px 0 20px rgba(26,35,126,0.15);

  --transition: all 0.18s ease;
}

/* â”€â”€ Reset â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* â”€â”€ Scrollbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f3f9; }
::-webkit-scrollbar-thumb { background: #c5cae9; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9fa8da; }

/* â”€â”€ App Wrapper â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SIDEBAR
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.sidebar {
  width: 248px;
  min-height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  box-shadow: var(--shadow-sidebar);
}

/* IR Tricolor stripe inside sidebar header */
.ir-tricolor {
  display: flex;
  height: 5px;
  margin: -20px -18px 14px;
  overflow: hidden;
}
.ir-tricolor::before, .ir-tricolor::after, .ir-tricolor {
  position: relative;
}
.ir-tricolor { display: flex; }

/* Logo area */
.sidebar-logo {
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: var(--bg-sidebar-dark);
  position: relative;
  overflow: hidden;
}
/* Top tricolor stripe */
.sidebar-logo::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff9933 33.3%, #ffffff 33.3% 66.6%, #138808 66.6%);
}
.logo-emblem {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #003087 0%, #1a237e 100%);
  border: 2px solid rgba(255,153,51,0.6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.ir-wheel {
  font-size: 26px;
  color: #ff9933;
  line-height: 1;
  animation: wheelRotate 12s linear infinite;
}
@keyframes wheelRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.logo-hindi {
  font-family: 'Noto Sans Devanagari', 'Mangal', 'Arial Unicode MS', sans-serif;
  font-size: 16px; font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: 0.5px;
}
.logo-english {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700;
  color: #ff9933;
  letter-spacing: 2px;
  margin-top: 1px;
}
.logo-tagline {
  font-size: 9px; font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1px;
  font-style: italic;
  margin-top: 6px;
}

.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9.5px; font-weight: 600;
  color: #a5d6a7;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 8px;
}
.live-dot {
  width: 7px; height: 7px;
  background: #4caf50;
  border-radius: 50%;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(76,175,80,0.4); }
  50%       { opacity: 0.8; box-shadow: 0 0 0 4px rgba(76,175,80,0); }
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 9.5px; font-weight: 700;
  color: var(--text-on-blue-3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 8px 6px;
  margin-top: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-on-blue-2);
  font-size: 13px; font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-on-blue);
}
.nav-item.active {
  background: rgba(255,255,255,0.15);
  color: var(--text-on-blue);
  border-color: rgba(255,255,255,0.12);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--saffron);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.18);
  color: var(--text-on-blue);
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  line-height: 1.5;
}
.nav-badge.blue    { background: #3949ab; }
.nav-badge.saffron { background: var(--saffron); color: #fff; }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: var(--bg-sidebar-dark);
  position: relative;
}
.sidebar-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff9933 33.3%, #ffffff 33.3% 66.6%, #138808 66.6%);
  opacity: 0.4;
}
.ministry-brand {
  display: flex; flex-direction: column;
}
.ministry-name {
  font-size: 10.5px; font-weight: 700;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.3px;
}
.ministry-sub {
  font-size: 9px; font-weight: 500;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
  margin-top: 1px;
}
.system-time { font-size: 11px; color: var(--text-on-blue-2); display: flex; align-items: center; gap: 6px; }
.time-value  { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MAIN CONTENT
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.main-content {
  margin-left: 248px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* â”€â”€ Top Bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.topbar {
  height: 60px;
  display: flex; align-items: center;
  padding: 0 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 90;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}
.topbar-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  color: var(--ir-blue);
  letter-spacing: 0.2px;
}
.topbar-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.topbar-spacer { flex: 1; }

/* Buttons */
.topbar-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  font-family: var(--font-main);
  text-decoration: none;
  white-space: nowrap;
}
.topbar-btn.primary {
  background: var(--saffron);
  color: #fff;
  border-color: var(--saffron);
  box-shadow: 0 1px 4px rgba(245,124,0,0.25);
}
.topbar-btn.primary:hover {
  background: #e65100;
  border-color: #e65100;
  box-shadow: 0 2px 8px rgba(245,124,0,0.35);
  transform: translateY(-1px);
}
.topbar-btn.secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border-strong);
}
.topbar-btn.secondary:hover {
  background: var(--bg-app);
  color: var(--text-primary);
  border-color: var(--border-focus);
}
.topbar-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Horizon tabs */
.horizon-tabs {
  display: flex;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px;
  gap: 2px;
}
.horizon-tab {
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  border: none; background: none;
  font-family: var(--font-main);
}
.horizon-tab.active {
  background: var(--ir-blue);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
.horizon-tab:not(.active):hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* â”€â”€ Page sections â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page-section {
  display: none;
  padding: 24px;
  animation: fadeInUp 0.28s ease;
}
.page-section.active { display: block; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CARDS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 13.5px; font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 7px;
}
.card-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   KPI GRID
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  border-left: 4px solid var(--accent-color, var(--ir-blue));
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(0,0,0,0.025) 100%);
  pointer-events: none;
}
.kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.kpi-card.green   { --accent-color: var(--success); }
.kpi-card.red     { --accent-color: var(--danger); }
.kpi-card.saffron { --accent-color: var(--saffron); }
.kpi-card.blue    { --accent-color: var(--ir-blue-light); }

.kpi-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi-label  { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.kpi-icon   {
  width: 34px; height: 34px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.kpi-value  {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.5px;
}
.kpi-value span { font-size: 16px; font-weight: 500; color: var(--text-muted); margin-left: 2px; }
.kpi-trend      { font-size: 11px; color: var(--text-muted); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.kpi-trend.up   { color: var(--success); }
.kpi-trend.down { color: var(--danger); }
.kpi-trend.warn { color: var(--warning); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GRID LAYOUTS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TABLE
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  padding: 9px 14px;
  font-size: 10.5px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px; text-transform: uppercase;
  background: #f8f9fc;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
thead th:first-child { border-radius: var(--r-sm) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--r-sm) 0 0; }
tbody tr { border-bottom: 1px solid var(--border); transition: var(--transition); }
tbody tr:last-child  { border-bottom: none; }
tbody tr:hover       { background: #f5f7ff; cursor: pointer; }
tbody td { padding: 11px 14px; color: var(--text-secondary); vertical-align: middle; }
tbody td:first-child { color: var(--text-primary); font-weight: 500; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PILLS / BADGES
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill.critical { background: var(--danger-light);  color: var(--danger);  border-color: #f5c6c6; }
.pill.high     { background: #fff8e1;               color: #e65100;        border-color: #ffe082; }
.pill.normal   { background: var(--info-light);    color: var(--info);    border-color: #bbdefb; }
.pill.planned  { background: var(--success-light); color: var(--success); border-color: #c8e6c9; }
.pill.multi    { background: #f3e5f5;               color: #7b1fa2;        border-color: #e1bee7; }
.pill.eng      { background: #e8eaf6;               color: var(--ir-blue); border-color: #c5cae9; }
.pill.traction { background: var(--saffron-pale);  color: var(--saffron); border-color: #ffcc80; }
.pill.st       { background: #e0f7fa;               color: #00838f;        border-color: #b2ebf2; }
.pill.traffic-block    { background: #e8eaf6;       color: var(--ir-blue); border-color: #9fa8da; }
.pill.power-block      { background: #fff3e0;       color: #e65100;        border-color: #ffb74d; }
.pill.integrated-block { background: #f3e5f5;       color: #6a1b9a;        border-color: #ba68c8; }
.pill.shadow-block     { background: #e0f2f1;       color: #00695c;        border-color: #80cbc4; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   FILTER BAR
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.filter-bar {
  display: flex; gap: 10px; align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  padding: 7px 12px;
  font-size: 13px;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}
.filter-select:focus { border-color: var(--border-focus); color: var(--text-primary); }
.filter-search {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  padding: 7px 12px 7px 34px;
  font-size: 13px;
  font-family: var(--font-main);
  flex: 1; min-width: 180px;
  outline: none;
  transition: var(--transition);
}
.filter-search:focus { border-color: var(--border-focus); }
.filter-search::placeholder { color: var(--text-muted); }
.search-wrap { position: relative; flex: 1; min-width: 180px; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-muted); pointer-events: none; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GANTT CHART
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.gantt-wrap    { overflow-x: auto; padding-bottom: 8px; }
.gantt-container { min-width: 700px; display: flex; flex-direction: column; gap: 5px; }
.gantt-header    { display: flex; gap: 4px; padding-left: 130px; }
.gantt-day-label {
  flex: 1; text-align: center; min-width: 42px;
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.gantt-row {
  display: flex; align-items: center; gap: 4px;
}
.gantt-corridor-label {
  width: 126px;
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  padding-right: 8px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.gantt-days { flex: 1; display: flex; gap: 4px; }
.gantt-cell {
  flex: 1; min-width: 42px;
  height: 30px;
  border-radius: 5px;
  background: #f4f6f9;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.gantt-cell:hover { background: var(--ir-blue-pale); border-color: #9fa8da; }
.gantt-cell.has-block {
  background: var(--ir-blue-pale);
  border-color: #9fa8da;
  border-left: 3px solid var(--ir-blue-light);
}
.gantt-cell.has-block.multi {
  background: #f3e5f5;
  border-color: #ce93d8;
  border-left-color: #7b1fa2;
}
.gantt-cell.has-block.critical {
  background: var(--danger-light);
  border-color: #ef9a9a;
  border-left-color: var(--danger);
}
.gantt-count { font-size: 10px; font-weight: 800; color: var(--ir-blue); }
.gantt-cell.has-block.multi .gantt-count   { color: #7b1fa2; }
.gantt-cell.has-block.critical .gantt-count { color: var(--danger); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PROGRESS BARS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.progress-bar-wrap { display: flex; flex-direction: column; gap: 12px; }
.progress-item     { display: flex; flex-direction: column; gap: 5px; }
.progress-header   { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.progress-name     { color: var(--text-secondary); font-weight: 500; }
.progress-val      { color: var(--text-primary); font-weight: 700; }
.progress-track {
  height: 7px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SPINNER
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--ir-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TOAST NOTIFICATIONS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 13px; color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--ir-blue-light); }
.toast-icon    { font-size: 16px; }
@keyframes toastIn  { from { transform: translateX(80px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to   { opacity: 0; transform: translateX(40px); } }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   STAT ROW
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 12px; color: var(--text-secondary); }
.stat-value { font-size: 13px; font-weight: 700; color: var(--text-primary); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   EMPTY STATE
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 50px 20px;
  color: var(--text-muted);
  text-align: center;
  gap: 10px;
}
.empty-icon    { font-size: 40px; opacity: 0.4; }
.empty-text    { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.empty-subtext { font-size: 12px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MODALS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(28,35,64,0.45);
  backdrop-filter: blur(3px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px;
  width: 90%; max-width: 480px;
  max-height: 80vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); }
.modal-close {
  background: var(--bg-app); border: 1px solid var(--border);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer; color: var(--text-muted); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); border-color: #f5c6c6; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SECTION HEADING
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.section-heading {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
}
.section-count {
  background: var(--ir-blue-pale);
  color: var(--ir-blue);
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #c5cae9;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DONUT LEGEND
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.legend     { display: flex; flex-direction: column; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-label { color: var(--text-secondary); flex: 1; font-weight: 500; }
.legend-val   { color: var(--text-primary); font-weight: 700; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   AVAILABILITY METER
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.avail-meter  { text-align: center; padding: 8px 0; }
.avail-pct    {
  font-family: var(--font-display);
  font-size: 52px; font-weight: 800;
  color: var(--success);
  line-height: 1;
  letter-spacing: -2px;
}
.avail-label  { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SKELETON LOADER
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.skeleton {
  background: linear-gradient(90deg, #f0f2f5 0%, #e8ebf0 50%, #f0f2f5 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   INFO BANNER (breadcrumb-style page intro)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.page-info-banner {
  background: var(--ir-blue-pale);
  border: 1px solid #c5cae9;
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ir-blue);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RESPONSIVE
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 900px) {
  .sidebar { width: 60px; }
  .logo-text, .nav-item span, .sidebar-footer, .nav-section-label, .nav-badge { display: none; }
  .logo-emblem { justify-content: center; }
  .main-content { margin-left: 60px; }
  .grid-2, .grid-2-1, .grid-3 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
  .page-section { padding: 14px; }
}





/* ============================================================
   SPLASH SCREEN â€” Train arriving at platform
   ============================================================ */

/* â”€â”€ Splash container â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#splash-screen {
  position: fixed; inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg,
    #01060f 0%,
    #020b1a 30%,
    #061325 60%,
    #0d1f3a 80%,
    #122540 100%
  );
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.4,0,0.2,1);
}
#splash-screen.splash-exit {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

/* â”€â”€ Stars â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.stars-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0.7;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1.3); }
}

/* â”€â”€ Moon â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.splash-moon {
  position: absolute;
  top: 5%; right: 8%;
  width: 70px; height: 70px;
  background: radial-gradient(circle at 35% 35%, #fff9c4, #ffd54f 60%, #ffb300 100%);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(255,213,79,0.35), 0 0 80px rgba(255,213,79,0.15);
  animation: moonGlow 4s ease-in-out infinite alternate;
}
@keyframes moonGlow {
  from { box-shadow: 0 0 40px rgba(255,213,79,0.35), 0 0 80px rgba(255,213,79,0.1); }
  to   { box-shadow: 0 0 60px rgba(255,213,79,0.55), 0 0 120px rgba(255,213,79,0.2); }
}

/* â”€â”€ City skyline â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.skyline {
  position: absolute;
  bottom: 230px;
  left: 0; right: 0;
  height: 200px;
  pointer-events: none;
}
.bldg {
  position: absolute;
  bottom: 0;
  background: #060f1e;
  border-top: 2px solid #0d1f3a;
}
.bldg::before {
  content: '';
  position: absolute;
  top: 10px; left: 4px; right: 4px;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0, transparent 3px,
    rgba(255,213,79,0.25) 3px, rgba(255,213,79,0.25) 5px
  );
}
.bldg.tower::after {
  content: '';
  position: absolute;
  top: -16px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 16px;
  background: #1a3a6c;
}

/* â”€â”€ Platform Area â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.platform-area {
  position: absolute;
  bottom: 130px;
  left: 0; right: 0;
  z-index: 10;
}

/* Canopy roof */
.platform-roof {
  position: relative;
  height: 28px;
  background: linear-gradient(180deg, #1a3a6c 0%, #0d1f45 100%);
  border-bottom: 3px solid #ff8f00;
  box-shadow: 0 4px 20px rgba(255,143,0,0.3);
  display: flex;
  align-items: flex-end;
  padding: 0 20px;
}
.roof-beam {
  flex: 1;
  height: 24px;
  border-right: 2px solid rgba(255,143,0,0.2);
}
.roof-pillar {
  position: absolute;
  bottom: -40px;
  left: 40px;
  width: 8px;
  height: 40px;
  background: linear-gradient(180deg, #1a3a6c, #0d1f45);
  border: 1px solid rgba(255,143,0,0.3);
}

/* LED board */
.platform-board {
  position: absolute;
  top: -36px;
  left: 50%; transform: translateX(-50%);
  background: #000;
  border: 2px solid #ff8f00;
  border-radius: 4px;
  padding: 4px 16px;
  box-shadow: 0 0 16px rgba(255,143,0,0.4), inset 0 0 8px rgba(0,0,0,0.8);
  white-space: nowrap;
  z-index: 20;
}
.board-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}
.board-label   { color: #ffeb3b; }
.board-route   { color: #fff; }
.board-sep     { color: rgba(255,143,0,0.4); }
.board-platform { color: #80cbc4; }
.board-arriving {
  color: #69f0ae;
  animation: blink-led 1s step-end infinite;
}
@keyframes blink-led {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Platform floor */
.platform-floor {
  position: relative;
  height: 36px;
  background: linear-gradient(180deg, #8d9098 0%, #6b7280 50%, #4b5563 100%);
  border-top: 3px solid #9ca3af;
  overflow: hidden;
}
.platform-floor::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0, transparent 28px,
    rgba(0,0,0,0.1) 28px, rgba(0,0,0,0.1) 30px
  );
}

/* People silhouettes */
.person {
  position: absolute;
  bottom: 0;
  width: 12px;
  background: #1a1a2e;
  border-radius: 6px 6px 0 0;
}
.person::before {
  content: '';
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px;
  background: #1a1a2e;
  border-radius: 50%;
}
.person.tall::before { width: 12px; height: 12px; top: -12px; }

/* Luggage */
.luggage {
  position: absolute;
  bottom: 0;
  width: 14px; height: 10px;
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 2px;
}

/* Yellow safety line */
.yellow-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #ffd700 0, #ffd700 20px,
    transparent 20px, transparent 28px
  );
}

/* â”€â”€ Train Assembly â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.splash-train {
  position: absolute;
  bottom: 152px;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  /* Start way off-screen right, decelerate into position */
  animation: trainArrive 3.2s cubic-bezier(0.05, 0.5, 0.3, 1) forwards;
  animation-delay: 0.3s;
  transform: translateX(110vw);
  z-index: 15;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.7));
}
@keyframes trainArrive {
  0%   { transform: translateX(110vw); }
  100% { transform: translateX(-20px); }
}

/* â”€â”€ Locomotive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.loco {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}

/* Cab */
.loco-cab {
  position: relative;
  width: 55px;
  height: 72px;
  background: linear-gradient(135deg, #1a237e 0%, #283593 60%, #1a237e 100%);
  border-radius: 4px 0 0 0;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 3;
  display: flex; align-items: center; justify-content: center;
}
.loco-cab-window {
  width: 28px; height: 24px;
  background: linear-gradient(135deg, #b3e5fc 0%, #81d4fa 50%, #b3e5fc 100%);
  border: 2px solid #546e7a;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.cab-interior {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: rgba(255,193,7,0.35);
}
.cab-light-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 8px;
  background: linear-gradient(90deg, #ff8f00, #ffb300, #ff8f00);
  opacity: 0.9;
}

/* Loco main body */
.loco-body {
  position: relative;
  width: 170px;
  height: 62px;
  background: linear-gradient(180deg, #1565c0 0%, #0d47a1 60%, #0a3880 100%);
  border-top: 1px solid rgba(255,255,255,0.12);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 12px;
  overflow: hidden;
}
.loco-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: linear-gradient(90deg, #ff8f00, #ffb300, #ff6f00);
}
.loco-logo {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
  opacity: 0.8;
  font-family: 'Rajdhani', sans-serif;
}
.loco-number {
  font-size: 9px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
  margin-top: 2px;
}
.loco-window-row {
  display: flex; gap: 6px;
  margin-top: 4px;
}
.loco-win {
  width: 22px; height: 14px;
  background: linear-gradient(135deg, #fffde7, #fff9c4 60%, #fff8e1);
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 2px;
  box-shadow: inset 0 0 4px rgba(255,213,79,0.5), 0 0 6px rgba(255,213,79,0.4);
}

/* Nose */
.loco-nose {
  position: relative;
  width: 40px;
  height: 62px;
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  clip-path: polygon(0 0, 100% 20%, 100% 80%, 0 100%);
  z-index: 1;
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: center;
  gap: 8px;
  padding-right: 8px;
}
.headlight {
  width: 11px; height: 11px;
  background: radial-gradient(circle, #fff 0%, #fffde7 50%, #ffeb3b 100%);
  border-radius: 50%;
  box-shadow: 0 0 12px #fff, 0 0 30px rgba(255,235,59,0.8), 0 0 60px rgba(255,235,59,0.4);
  animation: headlightFlicker 0.12s ease-in-out infinite alternate;
}
@keyframes headlightFlicker {
  from { box-shadow: 0 0 12px #fff, 0 0 30px rgba(255,235,59,0.8), 0 0 60px rgba(255,235,59,0.4); }
  to   { box-shadow: 0 0 16px #fff, 0 0 40px rgba(255,235,59,0.9), 0 0 80px rgba(255,235,59,0.5); }
}
.nose-stripe {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 5px;
  background: #ff8f00;
  transform: translateY(-50%) skewY(-8deg);
}
.coupling {
  position: absolute;
  right: -8px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 10px;
  background: #546e7a;
  border-radius: 2px;
  border: 1px solid #78909c;
}

/* Chimney */
.chimney {
  position: absolute;
  top: -14px; left: 60px;
  width: 14px; height: 16px;
  background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
  border-radius: 3px 3px 0 0;
  border: 1px solid rgba(255,255,255,0.1);
}

/* â”€â”€ Smoke puffs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.smoke-group {
  position: absolute;
  top: -70px; left: 55px;
  width: 80px; height: 70px;
  pointer-events: none;
}
.puff {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,200,200,0.75) 0%, rgba(150,150,150,0.3) 60%, transparent 100%);
  animation: puffRise 1.8s ease-out infinite;
}
.puff-1 { width: 28px; height: 28px; left: 0; bottom: 0; animation-delay: 0s; }
.puff-2 { width: 22px; height: 22px; left: 18px; bottom: 10px; animation-delay: 0.4s; }
.puff-3 { width: 18px; height: 18px; left: 8px; bottom: 20px; animation-delay: 0.8s; }
@keyframes puffRise {
  0%   { opacity: 0.8; transform: translateY(0) scale(1); }
  50%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-55px) scale(2.2) translateX(20px); }
}

/* â”€â”€ Underframe (wheels) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.underframe {
  position: absolute;
  bottom: -22px; left: 8px; right: 8px;
  height: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: linear-gradient(180deg, #263238 0%, #1a2428 100%);
  border-bottom: 3px solid #37474f;
}
.bogie {
  display: flex; gap: 10px;
  align-items: flex-end;
  padding: 0 4px;
}
.axle {
  display: flex; gap: 4px;
}
.wheel {
  width: 18px; height: 18px;
  background: radial-gradient(circle at 35% 35%, #78909c 0%, #546e7a 40%, #37474f 100%);
  border-radius: 50%;
  border: 2px solid #90a4ae;
  animation: wheelSpin 0.4s linear infinite;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
  position: relative;
}
.wheel::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 5px; height: 5px;
  background: #b0bec5;
  border-radius: 50%;
}
.wheel.w-big {
  width: 24px; height: 24px;
  border: 3px solid #90a4ae;
}
.wheel.w-big::after { width: 7px; height: 7px; }
@keyframes wheelSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* â”€â”€ Coaches â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.coach {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-left: 3px;
}
.coach-body {
  position: relative;
  width: 180px;
  height: 56px;
  background: linear-gradient(180deg, #1565c0 0%, #0d47a1 70%, #0a3880 100%);
  border-top: 1px solid rgba(255,255,255,0.12);
  border-left: 2px solid rgba(255,255,255,0.06);
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 10px;
}
.coach-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 7px;
  background: linear-gradient(90deg, #ff8f00 0%, #ffb300 50%, #ff8f00 100%);
}
.coach-class {
  font-size: 8px; font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}
.coach-num {
  font-size: 7px;
  color: rgba(255,255,255,0.3);
  margin-top: 1px;
}
.coach-windows {
  display: flex; gap: 5px;
  margin-top: 4px;
}
.coach-win {
  width: 16px; height: 13px;
  background: linear-gradient(135deg, #fffde7, #fff9c4 60%, #fff8e1);
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 1px;
  box-shadow: 0 0 5px rgba(255,213,79,0.5);
}
.coach-door {
  position: absolute;
  right: 12px; top: 8px; bottom: 0;
  width: 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
}
.door-line {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255,255,255,0.1);
}
.coach-tail { opacity: 0.8; }

/* â”€â”€ Track â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.track-area {
  position: absolute;
  bottom: 108px;
  left: 0; right: 0;
  height: 44px;
  z-index: 5;
}
.rail {
  position: absolute;
  left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, #546e7a 0%, #78909c 20%, #90a4ae 50%, #78909c 80%, #546e7a 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 -1px 0 rgba(255,255,255,0.1);
}
.rail-top { top: 4px; }
.rail-bot { bottom: 10px; }
.sleepers {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0, transparent 28px,
    #3e2723 28px, #3e2723 42px
  );
  opacity: 0.9;
  z-index: -1;
}
.gravel {
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 14px;
  background:
    radial-gradient(2px 2px at 5% 50%, #546e7a 0%, transparent 100%),
    radial-gradient(2px 2px at 12% 70%, #607d8b 0%, transparent 100%),
    radial-gradient(2px 2px at 20% 40%, #546e7a 0%, transparent 100%),
    radial-gradient(3px 2px at 30% 60%, #455a64 0%, transparent 100%),
    radial-gradient(2px 2px at 40% 50%, #607d8b 0%, transparent 100%),
    radial-gradient(2px 3px at 50% 70%, #546e7a 0%, transparent 100%),
    radial-gradient(3px 2px at 60% 45%, #455a64 0%, transparent 100%),
    radial-gradient(2px 2px at 70% 65%, #607d8b 0%, transparent 100%),
    radial-gradient(2px 2px at 80% 50%, #546e7a 0%, transparent 100%),
    radial-gradient(3px 2px at 90% 60%, #455a64 0%, transparent 100%),
    #37474f;
}

/* Signal post */
.signal-post {
  position: absolute;
  right: 15%; bottom: 5px;
  width: 6px;
  height: 55px;
  background: linear-gradient(180deg, #455a64 0%, #37474f 100%);
  border-radius: 1px;
}
.signal-arm {
  position: absolute;
  top: 5px; right: 5px;
  width: 18px; height: 4px;
  background: #4caf50;
  border-radius: 1px;
  transform: rotate(-20deg);
}
.signal-light {
  position: absolute;
  top: 0; right: -3px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid #333;
}
.sl-green {
  background: #4caf50;
  box-shadow: 0 0 8px #4caf50, 0 0 16px rgba(76,175,80,0.5);
  animation: signalPulse 2s ease-in-out infinite;
}
@keyframes signalPulse {
  0%, 100% { box-shadow: 0 0 8px #4caf50, 0 0 16px rgba(76,175,80,0.5); }
  50%       { box-shadow: 0 0 14px #69f0ae, 0 0 28px rgba(76,175,80,0.8); }
}

/* â”€â”€ Ground / Platform base â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#splash-screen::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 110px;
  background: linear-gradient(180deg, #0d1f3a 0%, #081628 50%, #050f1e 100%);
  border-top: 2px solid rgba(61,126,255,0.15);
  z-index: 1;
}

/* â”€â”€ Splash footer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.splash-footer {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px 24px;
  background: rgba(5,13,31,0.7);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.splash-brand {
  display: flex; align-items: center; gap: 14px;
}
.splash-logo-icon {
  font-size: 36px;
  animation: logoBounce 2s ease-in-out infinite;
}
@keyframes logoBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}
.splash-brand-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px; font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}
.splash-brand-sub {
  font-size: 11px; font-weight: 500;
  color: #ff8f00;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}
.splash-loader {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  min-width: 220px;
}
.loader-track {
  width: 200px; height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.loader-train {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #ff8f00, #ffb300);
  border-radius: 3px;
  width: 0%;
  animation: loaderProgress 4.8s cubic-bezier(0.1,0.5,0.3,1) forwards;
  animation-delay: 0.3s;
  box-shadow: 0 0 8px rgba(255,143,0,0.7);
}
@keyframes loaderProgress {
  0%   { width: 0%; }
  100% { width: 100%; }
}
.splash-loading-text {
  font-size: 11px; font-weight: 600;
  color: rgba(240,244,255,0.5);
  letter-spacing: 1px;
  transition: opacity 0.25s ease;
  font-variant-numeric: tabular-nums;
}

/* â”€â”€ Headlight beam effect â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.splash-train::before {
  content: '';
  position: absolute;
  right: -100px; top: 15px;
  width: 120px; height: 35px;
  background: linear-gradient(90deg, rgba(255,235,59,0.12) 0%, transparent 100%);
  clip-path: polygon(0 20%, 100% 0%, 100% 100%, 0 80%);
  pointer-events: none;
  animation: beamFlicker 0.15s ease-in-out infinite alternate;
}
@keyframes beamFlicker {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

