/*
 *  modern.css v2 — PNRStatus.com design system
 *  Aesthetic: "Night Departure Board" — deep navy shell like a railway
 *  departure board at night, cyan signal-light accents, light data surfaces.
 *  Brand colors preserved: #1bbae1 cyan · #394263 navy · #151515 dark.
 *
 *  Pages using this system load ONLY bootstrap.min.css (grid + modal),
 *  plugins.css (icon font) and this file. The old ProUI main.css/themes.css
 *  are NOT loaded — every component here is self-contained.
 */

/* ============================== TOKENS ============================== */

:root {
    /* brand */
    --cyan: #1bbae1;
    --cyan-bright: #3fd0f0;
    --cyan-deep: #0e9fc3;
    --cyan-glow: rgba(27, 186, 225, 0.45);
    --cyan-tint: rgba(27, 186, 225, 0.10);
    --navy: #394263;
    --navy-800: #475384;
    --navy-900: #313a63;
    --navy-950: #262e50;
    --ink-black: #151515;

    /* signal lights */
    --signal-green: #2ecc71;
    --signal-green-deep: #1e9e54;
    --signal-amber: #f5a623;
    --signal-amber-deep: #c97f0a;
    --signal-red: #ef5350;
    --signal-red-deep: #c62828;

    /* light surfaces */
    --paper: #ffffff;
    --paper-soft: #f4f6fb;
    --paper-mute: #e9edf5;
    --hairline: #e2e7f0;
    --ink: #1b2030;
    --ink-soft: #4a5268;
    --ink-mute: #8a92a6;

    /* type */
    --font-display: 'Bricolage Grotesque', 'Instrument Sans', sans-serif;
    --font-body: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Spline Sans Mono', 'Courier New', monospace;

    /* geometry */
    --r-lg: 18px;
    --r-md: 12px;
    --r-sm: 8px;
    --shadow-card: 0 1px 2px rgba(19, 24, 41, .05), 0 8px 24px rgba(19, 24, 41, .07);
    --shadow-pop: 0 4px 12px rgba(19, 24, 41, .10), 0 20px 50px rgba(19, 24, 41, .18);
    --shadow-glow: 0 0 0 1px rgba(27, 186, 225, .35), 0 8px 40px rgba(27, 186, 225, .25);

    --topbar-h: 64px;
}

/* ============================== RESET-ISH ============================== */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--navy-950);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 .5em;
    line-height: 1.18;
}

p { margin: 0 0 1em; }

a { color: var(--cyan-deep); text-decoration: none; transition: color .15s ease; }
a:hover, a:focus { color: var(--cyan); text-decoration: none; }

img { max-width: 100%; }

::selection { background: var(--cyan); color: #fff; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* numbers that matter read like a departure board */
.mono, .pnr-no, .train-no, .time-cell {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: .01em;
    font-variant-numeric: tabular-nums;
}

/* ============================== RAIL LINE MOTIF ============================== */
/* signature divider: a track with station dots and a moving signal */

.railline {
    position: relative;
    height: 14px;
    margin: 0 auto;
    max-width: 520px;
}

.railline::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 6px;
    height: 2px;
    background: repeating-linear-gradient(90deg,
        rgba(255,255,255,.28) 0 26px, transparent 26px 34px);
    border-radius: 1px;
}

.railline i {
    position: absolute;
    top: 2px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--navy-800);
    border: 2px solid rgba(255,255,255,.4);
}

.railline i:nth-child(1) { left: 0; }
.railline i:nth-child(2) { left: 50%; margin-left: -5px; }
.railline i:nth-child(3) { right: 0; }

.railline b {
    position: absolute;
    top: 3px;
    left: 0;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 12px 3px var(--cyan-glow);
    animation: rail-run 7s linear infinite;
}

@keyframes rail-run {
    0%   { left: 0; opacity: 0; }
    6%   { opacity: 1; }
    94%  { opacity: 1; }
    100% { left: calc(100% - 8px); opacity: 0; }
}

.railline--light::before {
    background: repeating-linear-gradient(90deg,
        var(--hairline) 0 26px, transparent 26px 34px);
}
.railline--light i { background: var(--paper); border-color: var(--paper-mute); }

/* variant: shuttle — train runs there and back (live tracking feel) */
.railline--shuttle b { animation: rail-shuttle 6.5s ease-in-out infinite; }

@keyframes rail-shuttle {
    0%   { left: 0; }
    50%  { left: calc(100% - 8px); }
    100% { left: 0; }
}

/* variant: meet — two trains crossing in opposite directions */
.railline--meet b + b {
    background: var(--signal-amber);
    box-shadow: 0 0 12px 3px rgba(245, 166, 35, .5);
    animation-name: rail-run-rev;
}

@keyframes rail-run-rev {
    0%   { left: calc(100% - 8px); opacity: 0; }
    6%   { opacity: 1; }
    94%  { opacity: 1; }
    100% { left: 0; opacity: 0; }
}

/* variant: cascade — stations light up in sequence like a route chart */
.railline--cascade b { display: none; }
.railline--cascade i { animation: stn-glow 3.6s ease-in-out infinite; }
.railline--cascade i:nth-child(2) { animation-delay: 1.2s; }
.railline--cascade i:nth-child(3) { animation-delay: 2.4s; }

@keyframes stn-glow {
    0%, 40%, 100% { background: var(--navy-800); box-shadow: none; }
    15% { background: var(--cyan); box-shadow: 0 0 14px 4px var(--cyan-glow); }
}

.hero--inner .railline { margin-top: 30px; opacity: .85; }

/* ============================== TOPBAR ============================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--navy-950);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 800;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand:hover { color: #fff; }

.brand .signal {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px 2px var(--cyan-glow);
    animation: signal-pulse 2.6s ease-in-out infinite;
}

/* rail engine logo mark */
.brand .brand-train {
    color: var(--cyan);
    font-size: 19px;
    text-shadow: 0 0 14px var(--cyan-glow);
    animation: train-chug 3.2s ease-in-out infinite;
}

@keyframes train-chug {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(2.5px); }
    75%      { transform: translateX(-2.5px); }
}

@keyframes signal-pulse {
    0%, 100% { box-shadow: 0 0 6px 1px var(--cyan-glow); }
    50%      { box-shadow: 0 0 14px 4px var(--cyan-glow); }
}

.brand em { font-style: normal; color: var(--cyan); }

.mainnav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mainnav > a {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    padding: 8px 14px;
    border-radius: 999px;
    letter-spacing: .02em;
    transition: color .15s ease, background .15s ease;
}

.mainnav > a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.mainnav > a.is-active { color: var(--cyan); background: var(--cyan-tint); }

.mainnav .btn-cyan { margin-left: 8px; }

/* dropdown (user / pnr history) */
.navdrop { position: relative; }

.navdrop > a {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255,255,255,.72);
    padding: 8px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.navdrop > a:hover { color: #fff; background: rgba(255,255,255,.08); }

.navdrop-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 230px;
    max-width: 86vw;
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-pop);
    padding: 6px;
    z-index: 1001;
}

/* invisible bridge over the gap so hover survives the trip to the menu */
.navdrop-menu::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: -12px;
    height: 12px;
}

.navdrop:hover .navdrop-menu,
.navdrop.open .navdrop-menu { display: block; }
.navdrop.open > a { color: #fff; background: rgba(255,255,255,.08); }

.navdrop-menu a {
    display: block;
    padding: 9px 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-soft);
    border-radius: var(--r-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navdrop-menu a:hover { background: var(--paper-soft); color: var(--ink); }

/* mobile toggle */
.nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px; height: 42px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--r-sm);
    background: transparent;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
}

@media (max-width: 919px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .mainnav {
        display: none;
        position: absolute;
        top: var(--topbar-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--navy-950);
        border-bottom: 1px solid rgba(255,255,255,.08);
        padding: 10px 16px 16px;
        box-shadow: 0 30px 60px rgba(0,0,0,.45);
    }
    .mainnav.open { display: flex; }
    .mainnav > a { padding: 12px 14px; border-radius: var(--r-sm); }
    .mainnav .btn-cyan { margin-left: 0; margin-top: 8px; text-align: center; }
    .navdrop > a { width: 100%; padding: 12px 14px; }
    .navdrop-menu { position: static; box-shadow: none; border: none; background: rgba(255,255,255,.05); }
    .navdrop-menu a { color: rgba(255,255,255,.75); }
    .navdrop-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
}

/* ============================== BUTTONS ============================== */

.btn-cyan, .btn-ghost, .btn-light, .btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 11px 22px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    text-decoration: none !important;
}

.btn-cyan {
    background: linear-gradient(135deg, var(--cyan-bright), var(--cyan) 55%, var(--cyan-deep));
    color: #062a36 !important;
    box-shadow: 0 4px 16px rgba(27, 186, 225, .35);
}

.btn-cyan:hover, .btn-cyan:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(27, 186, 225, .5);
    color: #04222c !important;
}

.btn-ghost {
    background: transparent;
    color: rgba(255,255,255,.85) !important;
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28);
}

.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); color: #fff !important; }

.btn-light {
    background: var(--paper);
    color: var(--navy-900) !important;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--hairline);
}

.btn-light:hover { transform: translateY(-1px); box-shadow: var(--shadow-pop); }

.btn-soft {
    background: var(--cyan-tint);
    color: var(--cyan-deep) !important;
}

.btn-soft:hover { background: rgba(27, 186, 225, .18); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* ============================== HERO ============================== */

.hero {
    position: relative;
    background:
        radial-gradient(1000px 500px at 82% -20%, rgba(27,186,225,.20), transparent 62%),
        radial-gradient(700px 380px at 8% 115%, rgba(57,66,99,.55), transparent 60%),
        linear-gradient(168deg, var(--navy-950) 8%, var(--navy-900) 58%, var(--navy-800) 100%);
    color: #fff;
    overflow: hidden;
}

/* faint grid texture like a board */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(75% 100% at 50% 0%, #000 35%, transparent 100%);
    -webkit-mask-image: radial-gradient(75% 100% at 50% 0%, #000 35%, transparent 100%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: 64px 20px 58px;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 18px;
    animation: rise .6s ease both;
}

.hero-eyebrow::before, .hero-eyebrow::after {
    content: "";
    width: 26px; height: 1px;
    background: rgba(27,186,225,.5);
}

.hero h1 {
    font-size: 46px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    animation: rise .6s .08s ease both;
}

.hero h1 .accent {
    background: linear-gradient(120deg, var(--cyan-bright), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 16.5px;
    color: rgba(255,255,255,.62);
    max-width: 560px;
    margin: 0 auto 34px;
    animation: rise .6s .16s ease both;
}

.hero .railline { margin-top: 44px; opacity: .85; }

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

/* hero search */
.searchbox {
    display: flex;
    max-width: 620px;
    margin: 0 auto;
    background: var(--paper);
    border-radius: 999px;
    padding: 6px;
    box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.09);
    animation: rise .6s .24s ease both;
}

.searchbox:focus-within { box-shadow: 0 24px 60px rgba(0,0,0,.45), var(--shadow-glow); }

.searchbox input[type="text"] {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 16.5px;
    font-weight: 500;
    color: var(--ink);
    padding: 12px 14px 12px 22px;
    letter-spacing: .04em;
}

.searchbox input::placeholder { font-family: var(--font-body); font-weight: 500; color: var(--ink-mute); letter-spacing: 0; }
.searchbox input:focus { outline: none; }

.searchbox select {
    border: none;
    background: var(--paper-soft);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 0 14px;
    margin-right: 6px;
    cursor: pointer;
}

.searchbox select:focus { outline: none; }

.searchbox .btn-cyan { border-radius: 999px; padding: 13px 28px; font-size: 14.5px; flex-shrink: 0; }

/* trust chips under search */
.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
    animation: rise .6s .32s ease both;
}

.chips span {
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.chips span i { color: var(--cyan); font-size: 11px; }

/* compact hero for inner pages */
.hero--inner .hero-inner { padding: 40px 20px 42px; }
.hero--inner h1 { font-size: 30px; }
.hero--inner .hero-sub { margin-bottom: 26px; }

@media (max-width: 767px) {
    .hero h1 { font-size: 31px; }
    .hero-inner { padding: 44px 16px 44px; }
    .hero--inner h1 { font-size: 24px; }
    .hero-sub { font-size: 15px; }
    .searchbox { flex-wrap: wrap; border-radius: var(--r-lg); gap: 6px; }
    .searchbox input[type="text"] { width: 100%; flex: 1 1 100%; text-align: center; padding: 12px; }
    .searchbox select { flex: 1; margin: 0; padding: 12px 14px; border-radius: var(--r-md); }
    .searchbox .btn-cyan { flex: 1; border-radius: var(--r-md); }
}

/* ============================== PAGE SHELL ============================== */

.page {
    background: var(--paper-soft);
}

.wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.wrap--narrow { max-width: 880px; }

.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }

.section-head { text-align: center; max-width: 620px; margin: 0 auto 38px; }

.eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--cyan-deep);
    background: var(--cyan-tint);
    border-radius: 999px;
    padding: 5px 14px;
    margin-bottom: 14px;
}

.section-head h2 { font-size: 30px; }
.section-head p { color: var(--ink-soft); }

/* ============================== CARDS ============================== */

.card {
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
}

.card-pad { padding: 26px 28px; }
.card + .card { margin-top: 22px; }

.card-pad > :last-child { margin-bottom: 0; }

.card h3 { font-size: 20px; margin-bottom: 12px; }
.card p { color: var(--ink-soft); }

/* feature cards (homepage trio) */
.cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

@media (max-width: 919px) { .cards-3 { grid-template-columns: 1fr; } }

.feature-card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: 30px 26px 26px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan-bright), var(--cyan-deep));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.feature-card:hover::before { transform: scaleX(1); }

.feature-card h3 { font-size: 18.5px; margin: 18px 0 10px; }
.feature-card p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

.icon-chip {
    width: 54px; height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.icon-chip--cyan  { background: var(--cyan-tint); color: var(--cyan-deep); }
.icon-chip--navy  { background: rgba(57, 66, 99, .12); color: var(--navy); }
.icon-chip--amber { background: rgba(245, 166, 35, .14); color: var(--signal-amber-deep); }
.icon-chip--green { background: rgba(46, 204, 113, .13); color: var(--signal-green-deep); }
.icon-chip--red   { background: rgba(239, 83, 80, .12); color: var(--signal-red-deep); }

/* ============================== STATUS BADGES ============================== */

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 5px 13px;
}

.badge-status::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px 1px currentColor;
}

.badge-status.is-cnf   { background: rgba(46, 204, 113, .12); color: var(--signal-green-deep); }
.badge-status.is-rac   { background: rgba(245, 166, 35, .13); color: var(--signal-amber-deep); }
.badge-status.is-wl    { background: rgba(239, 83, 80, .11); color: var(--signal-red-deep); }
.badge-status.is-na    { background: var(--paper-mute); color: var(--ink-mute); }
.badge-status.is-info  { background: var(--cyan-tint); color: var(--cyan-deep); }

/* delay pills (Get_Delay_HTML) */
.delay-ontime, .delay-early, .delay-late {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
}

.delay-ontime { background: rgba(46, 204, 113, .12); color: var(--signal-green-deep); }
.delay-early  { background: rgba(245, 166, 35, .13); color: var(--signal-amber-deep); }
.delay-late   { background: rgba(239, 83, 80, .11); color: var(--signal-red-deep); }

/* ============================== JOURNEY CARD (PNR result) ============================== */

.journey-card { overflow: hidden; }

.journey-head {
    background: linear-gradient(165deg, var(--navy-900), var(--navy-800));
    color: #fff;
    padding: 22px 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 26px;
}

.journey-head .pnr-no { font-size: 21px; color: #fff; }
.journey-head .pnr-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    display: block;
    margin-bottom: 2px;
}

.journey-head .badge-status { margin-left: auto; }
.journey-head .badge-status.is-cnf { background: rgba(46, 204, 113, .2); color: #7bedb1; }
.journey-head .badge-status.is-info { background: rgba(27, 186, 225, .18); color: #7fdef2; }
.journey-head .badge-status.is-na { background: rgba(255,255,255,.1); color: rgba(255,255,255,.65); }

/* From → To strip */
.route-strip {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 26px 28px 22px;
}

.route-end { flex: 1; min-width: 0; }
.route-end .stn-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink); line-height: 1.25; }
.route-end .stn-code { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--ink-mute); letter-spacing: .08em; }
.route-end .stn-time { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; }
.route-end--to { text-align: right; }

.route-track {
    flex: 1.2;
    position: relative;
    height: 22px;
    min-width: 90px;
}

.route-track::before {
    content: "";
    position: absolute;
    left: 8px; right: 8px; top: 10px;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--paper-mute) 0 18px, transparent 18px 25px);
}

.route-track::after {
    content: "\f238"; /* fa-train */
    font-family: FontAwesome;
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    color: var(--cyan);
    font-size: 15px;
}

.route-track i {
    position: absolute;
    top: 7px;
    width: 8px; height: 8px;
    border-radius: 50%;
    border: 2px solid var(--cyan);
    background: var(--paper);
}

.route-track i:first-child { left: 0; }
.route-track i:last-child { right: 0; }

/* journey meta grid */
.journey-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--hairline);
}

.journey-meta > div {
    padding: 15px 18px;
    border-right: 1px solid var(--hairline);
}

.journey-meta > div:nth-child(4n) { border-right: none; }
.journey-meta > div:nth-child(n+5) { border-top: 1px solid var(--hairline); }

.journey-meta .meta-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 3px;
}

.journey-meta .meta-value { font-size: 14.5px; font-weight: 600; color: var(--ink); }

@media (max-width: 767px) {
    .journey-meta { grid-template-columns: repeat(2, 1fr); }
    .journey-meta > div:nth-child(2n) { border-right: none; }
    .journey-meta > div:nth-child(n+3) { border-top: 1px solid var(--hairline); }
    .route-strip { flex-direction: column; gap: 8px; padding: 22px 20px 18px; }
    .route-end--to { text-align: left; }
    .route-end { width: 100%; }
    .route-track { width: 100%; flex: none; }
}

/* charting banner */
.chart-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 28px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .04em;
    border-top: 1px solid var(--hairline);
}

.chart-banner.is-prepared { background: rgba(46, 204, 113, .08); color: var(--signal-green-deep); }
.chart-banner.is-pending  { background: rgba(245, 166, 35, .08); color: var(--signal-amber-deep); }

/* ============================== PASSENGER CARDS ============================== */

.pax-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.pax-card {
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    text-align: center;
}

.pax-card-head {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-mute);
    padding: 14px 16px 0;
}

.pax-status {
    font-family: var(--font-mono);
    font-size: 21px;
    font-weight: 700;
    color: var(--ink);
    padding: 8px 16px 2px;
    word-break: break-word;
}

.pax-booked {
    font-size: 12.5px;
    color: var(--ink-mute);
    padding: 0 16px 14px;
}

.pax-booked b { color: var(--ink-soft); font-weight: 600; }

/* prediction ring */
.ring-wrap { padding: 10px 16px 20px; border-top: 1px dashed var(--hairline); }

.ring {
    --pct: 50;
    --ring-color: var(--cyan);
    width: 96px; height: 96px;
    border-radius: 50%;
    margin: 12px auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(closest-side, var(--paper) 78%, transparent 79% 100%),
        conic-gradient(var(--ring-color) calc(var(--pct) * 1%), var(--paper-mute) 0);
}

.ring b {
    font-family: var(--font-mono);
    font-size: 21px;
    font-weight: 700;
    color: var(--ink);
}

.ring--green { --ring-color: var(--signal-green); }
.ring--amber { --ring-color: var(--signal-amber); }
.ring--red   { --ring-color: var(--signal-red); }

.ring-label { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }

/* confirmed seat block */
.seat-confirm {
    margin: 10px 16px 18px;
    background: rgba(46, 204, 113, .08);
    border: 1px solid rgba(46, 204, 113, .25);
    border-radius: var(--r-md);
    padding: 14px;
}

.seat-confirm .seat-line { display: flex; justify-content: space-between; font-size: 13.5px; padding: 3px 0; }
.seat-confirm .seat-line span { color: var(--ink-mute); }
.seat-confirm .seat-line b { font-family: var(--font-mono); color: var(--signal-green-deep); }

/* ============================== DATA TABLES ============================== */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid var(--hairline);
    background: var(--paper);
    box-shadow: var(--shadow-card);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead th {
    background: var(--navy-900);
    color: rgba(255,255,255,.85);
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: left;
    padding: 13px 16px;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 12px 16px;
    border-top: 1px solid var(--hairline);
    color: var(--ink-soft);
    vertical-align: middle;
}

.data-table tbody tr:nth-child(even) { background: #fafbfe; }
.data-table tbody tr:hover { background: var(--cyan-tint); }

.data-table .time-cell { font-size: 13px; color: var(--ink); white-space: nowrap; }
.data-table .train-no { color: var(--ink); }

.data-table tr.is-current td {
    background: rgba(27, 186, 225, .09);
    border-top-color: rgba(27, 186, 225, .3);
    border-bottom: 1px solid rgba(27, 186, 225, .3);
}

.data-table tr.is-late td:first-child { box-shadow: inset 3px 0 0 var(--signal-red); }
.data-table tr.is-ontime td:first-child { box-shadow: inset 3px 0 0 var(--signal-green); }

.data-table caption {
    caption-side: top;
    text-align: left;
    padding: 16px 18px 12px;
    font-family: var(--font-display);
    font-size: 16.5px;
    font-weight: 700;
    color: var(--ink);
    background: var(--paper);
}

/* current-station dot */
.dot-now {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    margin-right: 8px;
    animation: signal-pulse 2s ease-in-out infinite;
}

/* ============================== STATUS SUMMARY (running status) ============================== */

.status-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

@media (max-width: 919px) { .status-strip { grid-template-columns: repeat(2, 1fr); } }

.stat-tile {
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-card);
    padding: 16px 18px;
}

.stat-tile .stat-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-mute);
    display: block;
    margin-bottom: 5px;
}

.stat-tile .stat-value { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.stat-tile .stat-value.mono { font-size: 15px; }
.stat-tile.is-good .stat-value { color: var(--signal-green-deep); }
.stat-tile.is-bad  .stat-value { color: var(--signal-red-deep); }
.stat-tile.is-live .stat-value { color: var(--cyan-deep); }

/* ============================== FEED (prediction posts) ============================== */

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

.post-card {
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: 20px 22px;
    transition: box-shadow .2s ease, transform .2s ease;
}

a.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }

.post-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.post-title { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; color: var(--ink); }
.post-meta { font-size: 12.5px; color: var(--ink-mute); margin-left: auto; white-space: nowrap; }
.post-body { color: var(--ink-soft); font-size: 14.5px; }
.post-body :last-child { margin-bottom: 0; }

.avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--navy), var(--navy-900));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* vote pills */
.vote-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.vote-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    border: 1.5px solid var(--hairline);
    background: var(--paper);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all .15s ease;
}

.vote-pill b { font-family: var(--font-mono); }

.vote-pill:hover { border-color: var(--cyan); color: var(--cyan-deep); }
.vote-pill.is-cnf:hover, .vote-pill.is-cnf.active { border-color: var(--signal-green); color: var(--signal-green-deep); background: rgba(46,204,113,.07); }
.vote-pill.is-rac:hover, .vote-pill.is-rac.active { border-color: var(--signal-amber); color: var(--signal-amber-deep); background: rgba(245,166,35,.07); }
.vote-pill.is-wl:hover, .vote-pill.is-wl.active { border-color: var(--signal-red); color: var(--signal-red-deep); background: rgba(239,83,80,.07); }

/* comments */
.comment {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--hairline);
}

.comment-body { flex: 1; min-width: 0; }
.comment-author { font-weight: 700; font-size: 14px; color: var(--ink); margin-right: 8px; }
.comment-time { font-size: 12px; color: var(--ink-mute); }
.comment-text { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }

/* ============================== PAGINATION ============================== */

.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 32px 0 6px;
}

.pager a, .pager span {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--paper);
    border: 1px solid var(--hairline);
    transition: all .15s ease;
}

.pager a:hover { border-color: var(--cyan); color: var(--cyan-deep); }
.pager .is-now { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* ============================== FORMS ============================== */

.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 7px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="number"],
.field select,
.field textarea {
    width: 100%;
    border: 1.5px solid var(--hairline);
    border-radius: var(--r-md);
    background: var(--paper);
    font-family: var(--font-body);
    font-size: 14.5px;
    color: var(--ink);
    padding: 11px 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-tint);
}

.field textarea { resize: vertical; min-height: 90px; }

.form-note { font-size: 12.5px; color: var(--ink-mute); }

/* auth card */
.auth-wrap {
    min-height: calc(100vh - var(--topbar-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-pop);
    padding: 36px 34px 30px;
}

.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .auth-sub { color: var(--ink-mute); font-size: 14px; margin-bottom: 24px; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--ink-mute); margin-top: 18px; }

/* alerts */
.alert-box {
    border-radius: var(--r-md);
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 18px;
}

.alert-box.is-error   { background: rgba(239, 83, 80, .1); color: var(--signal-red-deep); border: 1px solid rgba(239,83,80,.25); }
.alert-box.is-success { background: rgba(46, 204, 113, .1); color: var(--signal-green-deep); border: 1px solid rgba(46,204,113,.25); }
.alert-box.is-info    { background: var(--cyan-tint); color: var(--cyan-deep); border: 1px solid rgba(27,186,225,.25); }

/* ============================== AD SLOT ============================== */

.ad-slot {
    text-align: center;
    margin: 22px auto;
    min-height: 50px;
}

.ad-slot--card {
    background: var(--paper);
    border: 1px dashed var(--hairline);
    border-radius: var(--r-lg);
    padding: 14px;
}

/* ============================== MAP ============================== */

.gmap { border-radius: var(--r-md); overflow: hidden; }

/* ============================== MODALS (bootstrap 3 restyle) ============================== */

.modal-content {
    border: none;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-pop);
    overflow: hidden;
    font-family: var(--font-body);
}

.modal-header {
    background: var(--navy-900);
    color: #fff;
    border-bottom: none;
    padding: 18px 24px;
}

.modal-header .close { color: #fff; opacity: .6; text-shadow: none; }
.modal-title { font-family: var(--font-display); font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer { background: var(--paper-soft); border-top: 1px solid var(--hairline); padding: 14px 24px; }

/* legacy modal buttons restyled */
.modal .btn { border-radius: 999px; font-weight: 700; }
.modal .btn-primary { background: var(--cyan); border-color: var(--cyan); }
.modal .btn-primary:hover { background: var(--cyan-deep); border-color: var(--cyan-deep); }

/* legacy bootstrap form controls inside modals */
.modal .form-control { border-radius: var(--r-md); box-shadow: none; }
.modal .form-control:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-tint); }

/* ============================== FOOTER ============================== */

.site-foot {
    background: var(--navy-950);
    color: rgba(255,255,255,.55);
    position: relative;
}

/* rail-line top border */
.site-foot::before {
    content: "";
    display: block;
    height: 2px;
    background: repeating-linear-gradient(90deg,
        rgba(27,186,225,.45) 0 30px, transparent 30px 40px);
}

.foot-grid {
    max-width: 1140px;
    margin: 0 auto;
    padding: 46px 20px 34px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

@media (max-width: 919px) { .foot-grid { grid-template-columns: 1fr; gap: 26px; } }

.foot-grid h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 14px;
}

.foot-grid p { font-size: 13.5px; line-height: 1.7; }

.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 9px; }
.foot-grid li a { color: rgba(255,255,255,.55); font-size: 13.5px; }
.foot-grid li a:hover { color: var(--cyan); }

.foot-brand {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.foot-brand em { font-style: normal; color: var(--cyan); }

.foot-bottom {
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 18px 20px;
    text-align: center;
    font-size: 12.5px;
    color: rgba(255,255,255,.35);
}

/* ============================== TO TOP ============================== */

#to-top {
    position: fixed;
    right: 18px; bottom: 22px;
    width: 44px; height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--navy-900);
    color: #fff;
    font-size: 19px;
    box-shadow: var(--shadow-pop);
    z-index: 900;
    opacity: .85;
}

#to-top:hover { background: var(--cyan); color: #04222c; opacity: 1; }

/* ============================== UTILITIES ============================== */

.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.muted { color: var(--ink-mute); }
.small-note { font-size: 12.5px; color: var(--ink-mute); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* autosuggest dropdown harmonized */
ul.ui-autocomplete, #suggesstion-box {
    z-index: 1100;
    font-family: var(--font-body);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-pop);
    border: 1px solid var(--hairline);
}

/* ============================== LIVE RUNNING — JOURNEY BOARD ============================== */

.run-board {
    position: relative;
    background:
        radial-gradient(120% 140% at 85% -10%, rgba(27,186,225,.18), transparent 55%),
        linear-gradient(135deg, var(--navy-900) 0%, var(--navy-950) 100%);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: 22px 26px 24px;
    color: #fff;
    overflow: hidden;
    margin-bottom: 22px;
}
.run-board::after {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: .5;
    pointer-events: none;
}

.run-board-top {
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap;
    position: relative; z-index: 1;
    margin-bottom: 20px;
}
.run-board-train {
    font-family: var(--font-display); font-weight: 800;
    font-size: 19px; color: #fff; letter-spacing: -.01em;
}
.run-board-train .train-no {
    background: rgba(27,186,225,.18);
    color: var(--cyan-bright);
    border: 1px solid rgba(27,186,225,.35);
    padding: 2px 9px; border-radius: 7px; margin-right: 8px;
    font-family: var(--font-mono); font-size: 15px;
}
.run-chip {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
    padding: 7px 14px; border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    white-space: nowrap;
}
.run-chip.is-live   { background: rgba(27,186,225,.16);  border-color: rgba(27,186,225,.4);  color: var(--cyan-bright); }
.run-chip.is-good   { background: rgba(46,204,113,.16);  border-color: rgba(46,204,113,.4);  color: #5fe39b; }
.run-chip.is-bad    { background: rgba(245,166,35,.16);  border-color: rgba(245,166,35,.4);  color: #ffc664; }
.run-chip .pulse {
    width: 8px; height: 8px; border-radius: 50%; background: currentColor;
    box-shadow: 0 0 0 0 currentColor;
    animation: run-ping 1.6s ease-out infinite;
}
@keyframes run-ping {
    0%   { box-shadow: 0 0 0 0 rgba(63,208,240,.55); }
    70%  { box-shadow: 0 0 0 7px rgba(63,208,240,0); }
    100% { box-shadow: 0 0 0 0 rgba(63,208,240,0); }
}

/* progress line: source ---o(train)--- destination */
.run-prog { position: relative; z-index: 1; }
.run-prog-ends {
    display: flex; justify-content: space-between; gap: 16px;
    margin-bottom: 12px;
}
.run-end .run-end-code {
    font-family: var(--font-mono); font-weight: 700;
    font-size: 13px; color: var(--cyan-bright); letter-spacing: .04em;
}
.run-end .run-end-name {
    font-size: 13.5px; color: rgba(255,255,255,.78); font-weight: 600;
    max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.run-end.to { text-align: right; }

.run-track {
    position: relative;
    height: 6px; border-radius: 999px;
    background: rgba(255,255,255,.12);
    overflow: visible;
}
.run-track-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--signal-green), var(--cyan));
    box-shadow: 0 0 14px var(--cyan-glow);
    transition: width .6s ease;
}
.run-train-dot {
    position: absolute; top: 50%;
    width: 30px; height: 30px; margin: -15px 0 0 -15px;
    border-radius: 50%;
    background: #fff;
    color: var(--navy-900);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    box-shadow: 0 0 0 4px rgba(27,186,225,.25), 0 6px 16px rgba(0,0,0,.4);
    z-index: 2;
}
.run-train-dot::before {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    border: 2px solid var(--cyan); opacity: .6;
    animation: run-ping 1.8s ease-out infinite;
}
.run-prog-meta {
    margin-top: 14px;
    display: flex; gap: 22px; flex-wrap: wrap;
    font-size: 12.5px; color: rgba(255,255,255,.62);
    position: relative; z-index: 1;
}
.run-prog-meta b { color: #fff; font-weight: 700; }
.run-prog-meta .mono { font-family: var(--font-mono); }

@media (max-width: 600px) {
    .run-board { padding: 18px 16px 20px; }
    .run-board-train { font-size: 16px; width: 100%; }
    .run-chip { margin-left: 0; }
    .run-end .run-end-name { max-width: 30vw; }
}

/* ============================== LIVE RUNNING — TIMELINE ============================== */

.timeline { position: relative; margin: 2px 0 0; }

.tl-row {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 92px 92px 96px;
    column-gap: 12px;
    align-items: stretch;
}
.tl-row.is-current {
    background: linear-gradient(90deg, var(--cyan-tint), rgba(27, 186, 225, .02));
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(27, 186, 225, .25);
    margin: 3px 0;
}

/* rail + node (column 1, spans full row height) */
.tl-rail { position: relative; width: 36px; grid-row: 1 / -1; }
.tl-rail::before, .tl-rail::after {
    content: '';
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 3px; background: var(--paper-mute);
}
.tl-rail::before { top: 0; height: 24px; }
.tl-rail::after  { top: 24px; bottom: 0; }
.tl-row:first-child .tl-rail::before { display: none; }
.tl-row:last-child  .tl-rail::after  { display: none; }

.tl-row.is-done .tl-rail::before,
.tl-row.is-done .tl-rail::after { background: var(--signal-green); }
.tl-row.is-current .tl-rail::before { background: var(--signal-green); }
.tl-row.is-current .tl-rail::after  { background: var(--paper-mute); }

.tl-dot {
    position: absolute; left: 50%; top: 16px;
    transform: translateX(-50%);
    width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 3px solid var(--paper-mute);
    z-index: 1;
}
.tl-row.is-done .tl-dot { background: var(--signal-green); border-color: var(--signal-green); }
.tl-row.is-current .tl-dot {
    width: 26px; height: 26px; top: 11px;
    background: var(--cyan); border: 3px solid #fff;
    color: #fff; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 4px var(--cyan-tint), 0 0 16px var(--cyan-glow);
    animation: tl-throb 2s ease-in-out infinite;
}
@keyframes tl-throb {
    0%,100% { box-shadow: 0 0 0 4px var(--cyan-tint), 0 0 12px var(--cyan-glow); }
    50%     { box-shadow: 0 0 0 7px rgba(27,186,225,.06), 0 0 20px var(--cyan-glow); }
}

/* info column */
.tl-info { padding: 11px 0 13px; min-width: 0; }
.tl-row.is-current .tl-info { padding-left: 12px; }
.tl-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tl-name {
    font-family: var(--font-display); font-weight: 700;
    font-size: 15.5px; color: var(--ink); line-height: 1.2;
}
.tl-row.is-upcoming .tl-name { color: var(--ink-soft); font-weight: 600; }
.tl-code {
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    color: var(--ink-mute); letter-spacing: .03em;
}
.tl-sub {
    margin-top: 3px; display: flex; align-items: center; gap: 9px;
    flex-wrap: wrap; font-size: 12px; color: var(--ink-mute);
}
.tl-sub .hindi { color: var(--ink-soft); }
.tl-sub .km { font-family: var(--font-mono); }
.tl-sub .day {
    background: var(--paper-mute); color: var(--navy);
    font-weight: 700; font-size: 9.5px; letter-spacing: .06em;
    padding: 1px 7px; border-radius: 999px; text-transform: uppercase;
}

/* time columns (arrival / departure) */
.tl-col { padding: 11px 0 13px; display: flex; flex-direction: column; gap: 1px; text-align: right; }
.tl-time-lbl {
    font-size: 9px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ink-mute);
}
.tl-time-act { font-family: var(--font-mono); font-weight: 600; color: var(--ink); font-size: 13.5px; white-space: nowrap; }
.tl-row.is-upcoming .tl-time-act { color: var(--ink-soft); }
.tl-time-act.muted-src {
    font-family: var(--font-body); font-weight: 700; font-size: 10.5px;
    color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em;
}
.tl-time-sch { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.tl-time-sch.struck { text-decoration: line-through; }

/* status column (delay + platform) */
.tl-col-status { padding: 11px 0 13px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.tl-row.is-current .tl-col-status { padding-right: 10px; }
.tl-pf {
    font-size: 10px; font-weight: 700; letter-spacing: .04em;
    color: var(--navy); background: var(--paper-mute);
    padding: 2px 8px; border-radius: 999px;
}

.tl-last-upd {
    margin-top: 8px;
    font-size: 12.5px; color: var(--ink-mute);
    padding: 12px 0 0 48px;
}

@media (max-width: 680px) {
    .tl-row { grid-template-columns: 30px 1fr; column-gap: 10px; }
    .tl-rail { width: 30px; }
    .tl-info { grid-column: 2; padding: 10px 0 2px; }
    .tl-col { grid-column: 2; flex-direction: row; align-items: baseline; gap: 7px; text-align: left; padding: 0 0 3px; }
    .tl-col .tl-time-lbl { min-width: 26px; }
    .tl-col-status { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; padding: 2px 0 11px; }
}

/* ============================== LIVE MAP (Leaflet) ============================== */

/* centered status column (board + timeline + map stacked) */
.run-wrap { max-width: 940px; margin: 0 auto; }

/* last-reported-position strip under the board */
.run-locstrip {
    display: flex; align-items: center; gap: 10px;
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--cyan);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-card);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.run-locstrip i { color: var(--cyan-deep); font-size: 15px; flex-shrink: 0; }

.map-shell {
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-card);
}
.leaf-map { height: 480px; width: 100%; background: #e8edf2; }
@media (max-width: 600px) { .leaf-map { height: 340px; } }

.map-legend {
    display: flex; gap: 18px; flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--paper);
    border-top: 1px solid var(--hairline);
    font-size: 12.5px; color: var(--ink-soft);
}
.map-legend span { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.map-legend i { width: 16px; height: 4px; border-radius: 2px; display: inline-block; }
.map-legend i.done { background: var(--signal-green); }
.map-legend i.todo { background: var(--signal-amber); }
.map-legend i.dot  { width: 11px; height: 11px; border-radius: 50%; }
.map-legend i.cur  { width: 13px; height: 13px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-tint); }

/* leaflet custom markers */
.lm-stop {
    width: 12px; height: 12px; border-radius: 50%;
    background: #fff; border: 3px solid var(--navy-800);
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.lm-stop.done { border-color: var(--signal-green); background: var(--signal-green); }
.lm-cur {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--cyan); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 4px var(--cyan-tint), 0 4px 14px rgba(0,0,0,.45);
    animation: tl-throb 2s ease-in-out infinite;
}

/* leaflet popup restyle to match design system */
.leaflet-popup-content-wrapper {
    border-radius: var(--r-md);
    box-shadow: var(--shadow-pop);
    font-family: var(--font-body);
    padding: 4px 6px;
}
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.leaflet-popup-content .lp-title {
    font-family: var(--font-display); font-weight: 700;
    color: var(--ink); font-size: 14.5px; margin-bottom: 6px;
    display: block;
}
.leaflet-popup-content .lp-row { display: flex; justify-content: space-between; gap: 16px; }
.leaflet-popup-content .lp-row b { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }
.leaflet-popup-content .lp-delay { margin-top: 6px; }
.leaflet-bar a, .leaflet-touch .leaflet-bar a {
    color: var(--navy-900); border-radius: 0;
}
.leaflet-bar { border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--shadow-card); border: none; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
