/* ==========================================================================
   BusMunim — "Road & Ticket" design system
   Built on Bootstrap 5.3. Shared by auth pages, super admin and company panel.
   ========================================================================== */

:root {
    --ink: #0B1530;
    --ink-2: #111E44;
    --ink-3: #1B2B5E;
    --bus: #FFB703;
    --bus-600: #F0A500;
    --bus-700: #B87700;
    --bus-50: #FFF5D6;
    --sunset: #FB8500;
    --sunset-50: #FFEEDC;
    --teal: #1A8FAD;
    --teal-50: #E1F3F8;
    --sky: #8ECAE6;
    --bg: #F3F5FA;
    --surface: #FFFFFF;
    --line: #E2E7F0;
    --line-2: #EEF1F7;
    --text: #0E1630;
    --muted: #68728E;
    --ok: #0F9A4C;
    --ok-50: #E3F6EA;
    --warn: #C77700;
    --warn-50: #FFF2D9;
    --bad: #DC1F4A;
    --bad-50: #FDE7EC;
    --info: #2459D6;
    --info-50: #E6EDFD;
    --mute-50: #EDEFF4;
    --radius: 18px;
    --shadow-sm: 0 1px 2px rgba(11, 21, 48, .06);
    --shadow: 0 1px 2px rgba(11, 21, 48, .05), 0 14px 34px -16px rgba(11, 21, 48, .25);
    --font: 'Plus Jakarta Sans', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --display: 'Baloo 2', 'Plus Jakarta Sans', system-ui, sans-serif;
    --sidebar-w: 276px;

    /* Bootstrap bridge */
    --bs-body-font-family: var(--font);
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--line);
    --bs-primary: #0B1530;
    --bs-primary-rgb: 11, 21, 48;
    --bs-link-color: #1B2B5E;
    --bs-link-color-rgb: 27, 43, 94;
    --bs-link-hover-color: #FB8500;
    --bs-link-hover-color-rgb: 251, 133, 0;
    --bs-border-radius: 12px;
    --bs-focus-ring-color: rgba(255, 183, 3, .35);
    --bs-secondary-color: #68728E;
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { text-decoration: none; }
::selection { background: var(--bus); color: var(--ink); }
.font-display { font-family: var(--display); }
.min-w-0 { min-width: 0; }
.text-muted { color: var(--muted) !important; }
.fw-800 { font-weight: 800 !important; }
.small-caps { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---- Brand mark ---------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 13px; flex: none; display: block;
    box-shadow: 0 8px 20px -8px rgba(255, 183, 3, .75);
}
.brand-mark .logo-mark { width: 100%; height: 100%; display: block; }
.brand:hover .logo-mark path { animation: tick-draw .6s ease; }
@keyframes tick-draw { from { stroke-dasharray: 26; stroke-dashoffset: 26; } to { stroke-dasharray: 26; stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .brand:hover .logo-mark path { animation: none; } }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 25px; line-height: .9; letter-spacing: .2px; }
.brand-name b { color: var(--bus); font-weight: 800; }
.brand-sub { display: block; font-family: var(--font); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; opacity: .55; margin-top: 4px; }

/* ---- Buttons --------------------------------------------------------------- */
.btn { font-weight: 700; border-radius: 12px; padding: .64rem 1.15rem; letter-spacing: .1px; transition: transform .15s, box-shadow .15s, background .15s, color .15s; }
.btn-lg { padding: .82rem 1.4rem; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: .4rem .8rem; font-size: .82rem; border-radius: 10px; }
.btn i.ti { font-size: 1.15em; vertical-align: -2px; }
.btn-bus {
    background: var(--bus); color: var(--ink); border: 0;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .13), 0 8px 18px -10px rgba(240, 165, 0, .9);
}
.btn-bus:hover, .btn-bus:focus-visible { background: #FFC233; color: var(--ink); transform: translateY(-1px); }
.btn-bus:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .13); background: var(--bus-600) !important; color: var(--ink) !important; }
.btn-ink { background: var(--ink); color: #fff; border: 0; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35); }
.btn-ink:hover, .btn-ink:focus-visible { background: var(--ink-3); color: #fff; transform: translateY(-1px); }
.btn-ink:active { background: var(--ink) !important; color: #fff !important; transform: translateY(1px); }
.btn-soft { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-soft:hover, .btn-soft:focus-visible { background: #F7F8FC; color: var(--text); border-color: #D3DAE7; }
.btn-soft-danger { background: var(--bad-50); color: var(--bad); border: 0; }
.btn-soft-danger:hover { background: var(--bad); color: #fff; }
.btn-soft-ok { background: var(--ok-50); color: var(--ok); border: 0; }
.btn-soft-ok:hover { background: var(--ok); color: #fff; }
.btn-whatsapp { background: #1FAF55; color: #fff; border: 0; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.btn-whatsapp:hover { background: #179447; color: #fff; }
.btn-icon { width: 42px; height: 42px; padding: 0; display: inline-grid; place-items: center; border-radius: 12px; }
.btn-icon.btn-sm { width: 34px; height: 34px; border-radius: 10px; }
.btn:focus-visible { box-shadow: 0 0 0 4px rgba(255, 183, 3, .35) !important; }

/* ---- Forms ---------------------------------------------------------------------- */
.form-label { font-weight: 700; font-size: 13px; color: #34405E; margin-bottom: 6px; }
.form-label .opt { font-weight: 600; color: var(--muted); font-size: 12px; }
.form-control, .form-select {
    border-radius: 12px; border: 1.5px solid var(--line); padding: .72rem .95rem;
    font-size: 15px; background-color: #fff; color: var(--text);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-control::placeholder { color: #A3ABC0; }
.form-control:hover, .form-select:hover { border-color: #D2D9E6; }
.form-control:focus, .form-select:focus { border-color: var(--bus); box-shadow: 0 0 0 4px rgba(255, 183, 3, .2); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--bad); background-image: none; padding-right: .95rem; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 4px rgba(220, 31, 74, .14); }
.invalid-feedback { font-weight: 600; font-size: 12.5px; color: var(--bad); }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.form-check-input { width: 1.15em; height: 1.15em; border: 1.5px solid #C5CDDC; }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(255, 183, 3, .25); border-color: var(--bus); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }
.form-switch .form-check-input:checked { background-color: var(--ok); border-color: var(--ok); }
.form-check-label { font-weight: 600; font-size: 14px; }

.input-icon { position: relative; }
.input-icon > i.ti:first-child { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #8A93AC; font-size: 19px; pointer-events: none; z-index: 2; }
.input-icon > .form-control, .input-icon > .form-select { padding-left: 46px; }
.input-icon .input-action {
    position: absolute; right: 7px; top: 50%; transform: translateY(-50%); z-index: 2;
    border: 0; background: transparent; color: var(--muted); width: 38px; height: 38px; border-radius: 10px; font-size: 19px;
}
.input-icon .input-action:hover { background: var(--line-2); color: var(--ink); }
.input-prefix { position: absolute; left: 46px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); font-size: 15px; pointer-events: none; z-index: 2; }
.input-icon.has-prefix > .form-control { padding-left: 82px; }

/* OTP boxes */
.otp { display: flex; gap: 10px; justify-content: space-between; }
.otp input {
    width: 100%; max-width: 56px; height: 60px; text-align: center; padding: 0;
    font-family: var(--display); font-size: 28px; font-weight: 800; color: var(--ink);
    border-radius: 14px; border: 1.5px solid var(--line); background: #fff;
    transition: border-color .15s, box-shadow .15s, transform .15s, background .15s;
}
.otp input:focus { outline: 0; border-color: var(--bus); box-shadow: 0 0 0 4px rgba(255, 183, 3, .22); transform: translateY(-2px); }
.otp input.filled { border-color: var(--ink); background: var(--bus-50); }

/* Password strength (road) */
.strength { display: flex; gap: 5px; margin-top: 8px; }
.strength span { flex: 1; height: 5px; border-radius: 9px; background: var(--line); transition: background .25s; }
.strength[data-score="1"] span:nth-child(-n+1) { background: var(--bad); }
.strength[data-score="2"] span:nth-child(-n+2) { background: var(--sunset); }
.strength[data-score="3"] span:nth-child(-n+3) { background: var(--bus); }
.strength[data-score="4"] span:nth-child(-n+4) { background: var(--ok); }
.strength-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 4px; min-height: 18px; }

/* ==========================================================================
   Panel shell (sidebar + topbar)
   ========================================================================== */
.shell { min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1045;
    display: flex; flex-direction: column; color: #fff;
    background:
        radial-gradient(130% 50% at 0% 0%, rgba(27, 43, 94, .95) 0%, transparent 60%),
        radial-gradient(100% 40% at 100% 100%, rgba(251, 133, 0, .16) 0%, transparent 60%),
        var(--ink);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.sidebar::before { /* faint asphalt texture */
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 16px 16px;
}
.sb-brand { position: relative; padding: 22px 22px 14px; }
.sb-brand .brand-name { color: #fff; }
.sb-scroll { position: relative; flex: 1; overflow-y: auto; padding: 4px 14px 18px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }

.route { position: relative; list-style: none; margin: 0; padding: 0; }
.route::before { /* the road line through every stop */
    content: ''; position: absolute; left: 26px; top: 14px; bottom: 18px; width: 0;
    border-left: 2px dashed rgba(255, 255, 255, .16);
}
.route-label {
    position: relative; padding: 18px 10px 8px 54px;
    font-size: 10.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .4);
}
.route-label::before { /* depot marker */
    content: ''; position: absolute; left: 21px; top: calc(50% + 5px); width: 12px; height: 12px; transform: translateY(-50%) rotate(45deg);
    background: var(--ink); border: 2px solid rgba(255, 255, 255, .25); border-radius: 3px;
}
.stop { position: relative; }
.stop > a, .stop > span {
    position: relative; z-index: 1; display: flex; align-items: center; gap: 14px;
    padding: 8px 12px 8px 7px; margin: 3px 0; border-radius: 15px;
    color: rgba(255, 255, 255, .72); font-weight: 650; font-size: 14.5px;
    transition: background .2s, color .2s;
}
.stop .dot {
    flex: 0 0 40px; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
    background: #16244E; border: 1px solid rgba(255, 255, 255, .09); color: rgba(255, 255, 255, .8); font-size: 20px;
    transition: background .25s, color .25s, border-color .25s, box-shadow .25s, transform .25s;
}
.stop > a:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.stop > a:hover .dot { border-color: rgba(255, 183, 3, .55); color: var(--bus); }
.stop.active > a { color: #fff; background: linear-gradient(90deg, rgba(255, 183, 3, .17), rgba(255, 183, 3, 0) 88%); }
.stop.active .dot { background: var(--bus); color: var(--ink); border-color: var(--bus); box-shadow: 0 0 0 5px rgba(255, 183, 3, .13), 0 10px 22px -8px rgba(255, 183, 3, .7); }
.stop.active .dot.arrived { animation: stopPop .45s cubic-bezier(.3, 1.6, .5, 1); }
.stop .count { margin-left: auto; background: var(--sunset); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.stop.soon > span { cursor: default; color: rgba(255, 255, 255, .42); }
.stop.soon .dot { background: transparent; border-style: dashed; color: rgba(255, 255, 255, .4); }
.stop .soon-chip { margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .45); border: 1px dashed rgba(255, 255, 255, .25); padding: 1px 7px; border-radius: 99px; }

/* The bus that drives along the sidebar route to the page you open */
.route-bus {
    position: absolute; left: 27px; top: 0; z-index: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px;
    border-radius: 9px; background: var(--bus); color: var(--ink); display: grid; place-items: center; font-size: 17px;
    box-shadow: 0 0 0 4px rgba(255, 183, 3, .18), 0 0 18px rgba(255, 183, 3, .55);
    opacity: 0; transition: opacity .2s;
}
.route-bus.moving { opacity: 1; z-index: 2; }
.route-bus i { transition: transform .2s; }

.sb-foot { position: relative; padding: 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.sb-user { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.sb-user .avatar { width: 38px; height: 38px; border-radius: 12px; font-size: 13px; }
.sb-user .nm { font-weight: 700; font-size: 14px; line-height: 1.2; color: #fff; }
.sb-user .rl { font-size: 11.5px; color: rgba(255, 255, 255, .5); }
.sb-user .btn-logout { margin-left: auto; color: rgba(255, 255, 255, .6); background: transparent; border: 0; width: 36px; height: 36px; border-radius: 10px; font-size: 19px; }
.sb-user .btn-logout:hover { background: rgba(225, 29, 72, .2); color: #FF8DA6; }
.sb-pass { margin-bottom: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 183, 3, .08); border: 1px dashed rgba(255, 183, 3, .35); }
.sb-pass .t { font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--bus); }
.sb-pass .v { font-weight: 700; font-size: 13.5px; color: #fff; margin-top: 2px; }
.sb-pass .validity-road { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 8px, rgba(255, 255, 255, .06) 8px 14px); }
.sb-pass .validity-label { color: rgba(255, 255, 255, .65) !important; }
.sb-pass .validity-bus { background: var(--ink-2); border-color: rgba(255, 255, 255, .2); color: var(--bus); }
.sb-pass .validity-flag { color: rgba(255, 255, 255, .5); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 1030; height: 72px; padding: 0 30px;
    display: flex; align-items: center; gap: 14px;
    background: rgba(243, 245, 250, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(11, 21, 48, .4); }
.crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.crumbs .c { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--muted); }
.crumbs .c::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; }
.crumbs .c.now { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.crumbs .c.now::before { background: var(--bus); border-color: var(--bus); box-shadow: 0 0 0 4px rgba(255, 183, 3, .2); }
.crumbs .sep { width: 26px; border-top: 2px dashed #C9D0DE; flex: none; }
.top-search { position: relative; margin-left: auto; width: min(340px, 34vw); }
.top-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8A93AC; font-size: 18px; }
.top-search input { width: 100%; height: 44px; border-radius: 13px; border: 1px solid var(--line); background: #fff; padding: 0 56px 0 42px; font-size: 14px; font-weight: 500; }
.top-search input:focus { outline: 0; border-color: var(--bus); box-shadow: 0 0 0 4px rgba(255, 183, 3, .2); }
.top-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: var(--line-2); color: var(--muted); border: 1px solid var(--line); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 7px; font-family: var(--font); }
.top-btn { position: relative; width: 44px; height: 44px; border-radius: 13px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); font-size: 20px; transition: background .15s, transform .15s; }
.top-btn:hover { background: #F7F8FC; color: var(--ink); transform: translateY(-1px); }
.top-btn .ping { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--sunset); border: 2px solid #fff; }
.top-btn .ping::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sunset); animation: ping 1.8s infinite; }
.top-profile { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--text); }
.top-profile:hover { background: #F7F8FC; color: var(--text); }
.top-profile .avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
.top-profile .nm { font-weight: 700; font-size: 13.5px; line-height: 1.15; }
.top-profile .rl { font-size: 11.5px; color: var(--muted); }
.menu-toggle { display: none; }
.lang-toggle { display: inline-flex; align-items: center; padding: 4px; border-radius: 13px; background: #fff; border: 1px solid var(--line); height: 44px; gap: 2px; }
.lang-toggle span { display: grid; place-items: center; min-width: 38px; height: 34px; border-radius: 10px; font-weight: 800; font-size: 13px; color: var(--muted); transition: all .15s; }
.lang-toggle span.on { background: var(--ink); color: var(--bus); }
.lang-toggle:hover span:not(.on) { color: var(--ink); }
.auth-card .lang-toggle { height: 38px; } .auth-card .lang-toggle span { height: 28px; min-width: 34px; }
.top-btn.ms-auto + .lang-toggle, .top-search + .top-btn + .lang-toggle { margin-left: 0; }
.content { padding: 6px 30px 44px; width: 100%; max-width: 1480px; flex: 1; }
.footer-note { padding: 18px 30px 26px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sb-backdrop { display: none; }

/* impersonation ribbon */
.imp-bar {
    display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 9px 16px;
    background: repeating-linear-gradient(-45deg, var(--bus) 0 18px, #FFC53D 18px 36px); color: var(--ink);
    font-weight: 700; font-size: 13.5px; text-align: center;
}
.imp-bar .btn { padding: .3rem .8rem; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-102%); box-shadow: 30px 0 60px -20px rgba(0, 0, 0, .5); }
    .sb-open .sidebar { transform: none; }
    .sb-open .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 1040; background: rgba(11, 21, 48, .45); backdrop-filter: blur(2px); animation: fadeIn .2s; }
    .main { margin-left: 0; }
    .menu-toggle { display: grid; }
    .topbar { padding: 0 16px; height: 64px; }
    .content { padding: 4px 16px 32px; }
    .footer-note { padding: 14px 16px 22px; }
    .top-search { display: none; }
    .top-profile .who { display: none; }
    .top-profile { padding: 4px; }
    .crumbs .c:not(.now), .crumbs .sep { display: none; }
}

/* ==========================================================================
   Components
   ========================================================================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; }
.page-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3vw, 32px); line-height: 1.05; margin: 0; color: var(--ink); }
.page-head p { color: var(--muted); margin: 6px 0 0; font-size: 14.5px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.card-x { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-x + .card-x { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.card-head h3 { font-size: 16.5px; font-weight: 800; margin: 0; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.card-head h3 .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--bus-50); color: var(--bus-700); }
.card-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-body-x { padding: 18px 22px 22px; }
.card-x.flush .card-body-x { padding: 12px 0 4px; }

/* Ticket stat cards: perforated notches + tear line + barcode */
.ticket-wrap { height: 100%; filter: drop-shadow(0 1px 1px rgba(11, 21, 48, .05)) drop-shadow(0 12px 18px rgba(11, 21, 48, .07)); transition: transform .2s; }
.ticket-wrap:hover { transform: translateY(-3px); }
.ticket {
    --tear: 98px; --notch: 11px;
    position: relative; height: 100%; background: var(--surface); border-radius: 20px; padding: 18px 20px 14px;
    -webkit-mask: radial-gradient(circle var(--notch) at 0 var(--tear), #0000 98%, #000) 0 0 / 51% 100% no-repeat,
                  radial-gradient(circle var(--notch) at 100% var(--tear), #0000 98%, #000) 100% 0 / 51% 100% no-repeat;
            mask: radial-gradient(circle var(--notch) at 0 var(--tear), #0000 98%, #000) 0 0 / 51% 100% no-repeat,
                  radial-gradient(circle var(--notch) at 100% var(--tear), #0000 98%, #000) 100% 0 / 51% 100% no-repeat;
}
.ticket::after { content: ''; position: absolute; left: 18px; right: 18px; top: var(--tear); border-top: 2px dashed var(--line); }
.ticket-top { height: calc(var(--tear) - 18px); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ticket-label { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.ticket-value { font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1.05; margin-top: 8px; color: var(--ink); }
.ticket-value small { font-size: 15px; color: var(--muted); font-weight: 700; }
.ticket-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 23px; flex: none; }
.ticket-foot { padding-top: 16px; font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ticket-foot a { font-weight: 800; }
.barcode { width: 58px; height: 18px; border-radius: 2px; opacity: .2; flex: none;
    background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 7px, var(--ink) 7px 10px, transparent 10px 12px); }
.t-bus .ticket-icon { background: var(--bus-50); color: var(--bus-700); }
.t-teal .ticket-icon { background: var(--teal-50); color: var(--teal); }
.t-sunset .ticket-icon { background: var(--sunset-50); color: var(--sunset); }
.t-ink .ticket-icon { background: #E7EAF4; color: var(--ink-3); }
.t-ok .ticket-icon { background: var(--ok-50); color: var(--ok); }
.t-bad .ticket-icon { background: var(--bad-50); color: var(--bad); }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1.5; }
.pill > i:empty { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.pill-ok { background: var(--ok-50); color: var(--ok); }
.pill-warn { background: var(--warn-50); color: var(--warn); }
.pill-bad { background: var(--bad-50); color: var(--bad); }
.pill-info { background: var(--info-50); color: var(--info); }
.pill-mute { background: var(--mute-50); color: #576079; }
.tag { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 800; background: var(--line-2); color: #4A5470; letter-spacing: .02em; }
.tag-bus { background: var(--bus-50); color: var(--bus-700); }
.tag-ink { background: var(--ink); color: var(--bus); }
.code-chip { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--line-2); padding: 1px 7px; border-radius: 6px; }

/* Validity meter: a bus travelling to the expiry flag */
.validity { min-width: 150px; }
.validity-road { position: relative; height: 8px; border-radius: 99px; margin: 12px 16px 6px 0; background: repeating-linear-gradient(90deg, #E2E6EF 0 8px, #EEF1F6 8px 14px); }
.validity-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.validity-ok .validity-fill { background: linear-gradient(90deg, #3DD186, var(--ok)); }
.validity-warn .validity-fill { background: linear-gradient(90deg, var(--bus), var(--sunset)); }
.validity-bad .validity-fill { background: linear-gradient(90deg, #FF6B8A, var(--bad)); }
.validity-bus { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 8px; background: #fff; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 14px; color: var(--ink); box-shadow: 0 3px 8px -3px rgba(11, 21, 48, .35); }
.validity-flag { position: absolute; right: -16px; top: 50%; transform: translateY(-62%); font-size: 15px; color: #9AA3BA; }
.validity-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.validity-warn .validity-label { color: var(--warn); }
.validity-bad .validity-label { color: var(--bad); }

/* Avatars */
.avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; flex: none; letter-spacing: .02em; }
.av-0 { background: linear-gradient(135deg, #FFB703, #FB8500); color: var(--ink); }
.av-1 { background: linear-gradient(135deg, #219EBC, #126782); }
.av-2 { background: linear-gradient(135deg, #1B2B5E, #0B1530); color: var(--bus); }
.av-3 { background: linear-gradient(135deg, #F15BB5, #B5179E); }
.av-4 { background: linear-gradient(135deg, #3DD186, #0F9A4C); }
.av-5 { background: linear-gradient(135deg, #8B5CF6, #5B21B6); }

/* Tables */
.table-wrap { overflow-x: auto; }
.table-x { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.table-x thead th { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: #F8F9FC; padding: 12px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-x thead th:first-child { border-top-left-radius: 12px; }
.table-x thead th:last-child { border-top-right-radius: 12px; }
.table-x td { padding: 14px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 14px; }
.table-x tbody tr { transition: background .15s; }
.table-x tbody tr:hover { background: #FAFBFE; }
.table-x tbody tr:last-child td { border-bottom: 0; }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.cell-main .t1 { font-weight: 750; color: var(--ink); line-height: 1.25; }
.cell-main .t2 { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
a.cell-main:hover .t1 { color: var(--sunset); }
.contact-line { font-size: 13px; color: #3E4966; white-space: nowrap; }
.contact-line i { color: #9AA3BA; margin-right: 4px; }

/* Chips filter */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 13px; color: #3B4663; transition: all .15s; }
.chip:hover { border-color: #C9D1E0; color: var(--ink); }
.chip .n { background: var(--line-2); border-radius: 99px; padding: 0 8px; font-size: 11.5px; line-height: 19px; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.active .n { background: var(--bus); color: var(--ink); }
.chip .d { width: 8px; height: 8px; border-radius: 50%; }

/* Toolbar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.toolbar .input-icon { flex: 1 1 260px; }
.toolbar .form-control, .toolbar .form-select { height: 44px; padding-top: 0; padding-bottom: 0; font-size: 14px; }
.toolbar .form-select { width: auto; min-width: 160px; }

/* Pagination */
.pager-wrap { padding: 14px 18px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pagination { margin: 0; gap: 6px; }
.pagination .page-link { border-radius: 10px !important; border: 1px solid var(--line); color: var(--ink); font-weight: 700; min-width: 38px; text-align: center; font-size: 13.5px; }
.pagination .active .page-link, .pagination .page-item.active .page-link { background: var(--ink); border-color: var(--ink); color: var(--bus); }
.pagination .page-link:hover { background: var(--bus-50); }

/* Empty state */
.empty { text-align: center; padding: 50px 20px 46px; }
.empty .art { width: 120px; height: 120px; margin: 0 auto 14px; position: relative; display: grid; place-items: center; }
.empty .art::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--bus-50); }
.empty .art i { position: relative; font-size: 52px; color: var(--bus-700); }
.empty .art::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; border-top: 3px dashed #D7DDE8; }
.empty h4 { font-weight: 800; font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 380px; margin: 0 auto 16px; font-size: 14px; }

/* Timeline (route style) */
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; border-left: 2px dashed var(--line); }
.timeline li { position: relative; display: flex; gap: 14px; padding: 7px 0; }
.timeline .tl-dot { position: relative; z-index: 1; flex: none; width: 24px; height: 24px; border-radius: 8px; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.timeline li:first-child .tl-dot { background: var(--bus); border-color: var(--bus); color: var(--ink); }
.timeline .tl-t { font-size: 13.5px; font-weight: 600; color: #2A3554; line-height: 1.35; }
.timeline .tl-m { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Definition list */
.kv { display: grid; grid-template-columns: minmax(84px, 120px) minmax(0, 1fr); gap: 10px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }

/* Hero band (dashboards) */
.hero-band {
    position: relative; overflow: hidden; border-radius: 24px; color: #fff; padding: 28px 30px 92px;
    background:
        radial-gradient(60% 120% at 100% 100%, rgba(251, 133, 0, .55), transparent 60%),
        radial-gradient(50% 90% at 85% 110%, rgba(255, 183, 3, .5), transparent 60%),
        linear-gradient(160deg, #1B2B5E 0%, var(--ink) 60%);
    box-shadow: 0 24px 50px -28px rgba(11, 21, 48, .7);
}
.hero-band::before { content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
    background-image: radial-gradient(1.5px 1.5px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 32% 12%, #fff, transparent), radial-gradient(1.2px 1.2px at 52% 30%, #fff, transparent), radial-gradient(1px 1px at 72% 16%, #fff, transparent), radial-gradient(1.4px 1.4px at 88% 8%, #fff, transparent), radial-gradient(1px 1px at 22% 44%, #fff, transparent); }
.hero-band h2 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.05; margin: 0 0 6px; position: relative; }
.hero-band p { color: rgba(255, 255, 255, .72); margin: 0; position: relative; max-width: 560px; }
.hero-band .hb-actions { position: relative; margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-band .btn-soft { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .2); box-shadow: none; }
.hero-band .btn-soft:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.hero-band .mini-road { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: #0A1129; border-top: 3px solid #22305E; }
.hero-band .mini-road::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 3px; transform: translateY(-50%);
    background: repeating-linear-gradient(90deg, rgba(255, 183, 3, .85) 0 26px, transparent 26px 52px); animation: roadMove 1.1s linear infinite; }
.hero-band .mini-bus { position: absolute; bottom: 24px; right: 7%; width: 210px; z-index: 1; }
.hero-band .hb-skyline { position: absolute; left: 0; right: 0; bottom: 46px; height: 80px; opacity: .35; pointer-events: none; overflow: hidden; }
.hero-band .hb-skyline .track { display: flex; width: max-content; animation: slide 60s linear infinite; }
.hero-band .hb-skyline svg { height: 80px; width: auto; flex: none; }

/* Revenue bars */
.bars { display: flex; align-items: flex-end; gap: clamp(8px, 2vw, 18px); height: 200px; padding-top: 26px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; }
.bar-col { position: relative; width: 100%; max-width: 52px; min-height: 6px; border-radius: 12px 12px 5px 5px; background: #E4E8F2; transition: height .9s cubic-bezier(.3, 1.2, .5, 1); }
.bar.now .bar-col { background: linear-gradient(180deg, var(--bus), var(--sunset)); box-shadow: 0 10px 22px -10px rgba(251, 133, 0, .8); }
.bar-col::after { content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity .15s; }
.bar:hover .bar-col::after, .bar.now .bar-col::after { opacity: 1; }
.bar:hover .bar-col { background: #CBD3E4; }
.bar.now:hover .bar-col { background: linear-gradient(180deg, var(--bus), var(--sunset)); }
.bar-l { font-size: 12px; font-weight: 700; color: var(--muted); }
.bar.now .bar-l { color: var(--ink); }

/* List rows */
.row-list { list-style: none; margin: 0; padding: 0; }
.row-list li { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line-2); }
.row-list li:first-child { border-top: 0; }
.row-list .grow { flex: 1; min-width: 0; }
.row-list .t1 { font-weight: 700; color: var(--ink); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-list .t2 { font-size: 12.5px; color: var(--muted); }
.days-badge { flex: none; text-align: center; min-width: 58px; padding: 5px 8px; border-radius: 12px; line-height: 1.05; }
.days-badge b { display: block; font-family: var(--display); font-size: 20px; font-weight: 800; }
.days-badge span { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.days-badge.warn { background: var(--warn-50); color: var(--warn); }
.days-badge.bad { background: var(--bad-50); color: var(--bad); }

/* Road-sign alert banner */
.sign-alert { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; margin-bottom: 20px; background: var(--bus-50); border: 1.5px solid #FFD970; flex-wrap: wrap; }
.sign-alert .sign { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--bus); color: var(--ink); transform: rotate(45deg); border-radius: 9px; border: 3px solid var(--ink); }
.sign-alert .sign i { transform: rotate(-45deg); font-size: 20px; }
.sign-alert .msg { flex: 1; min-width: 220px; font-size: 14px; color: #5B3B00; }
.sign-alert .msg b { color: var(--ink); }
.sign-alert.bad { background: var(--bad-50); border-color: #F8B4C4; }
.sign-alert.bad .sign { background: var(--bad); color: #fff; }
.sign-alert.bad .msg { color: #7A1028; }

/* Toasts */
.toast-stack { position: fixed; top: 18px; right: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast-x {
    pointer-events: auto; position: relative; overflow: hidden; display: flex; gap: 12px; align-items: flex-start;
    width: min(420px, calc(100vw - 36px)); padding: 14px 14px 16px; border-radius: 16px;
    background: var(--ink); color: #fff; box-shadow: 0 22px 44px -18px rgba(11, 21, 48, .65);
    animation: toastIn .45s cubic-bezier(.2, .9, .3, 1.25);
}
.toast-x.hide { animation: toastOut .3s forwards; }
.toast-x .ic { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; font-size: 19px; }
.toast-x.success .ic { background: var(--ok); }
.toast-x.error .ic { background: var(--bad); }
.toast-x.info .ic { background: var(--teal); }
.toast-x .tx { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.4; padding-top: 6px; }
.toast-x .x { background: transparent; border: 0; color: rgba(255, 255, 255, .5); font-size: 18px; padding: 4px; line-height: 1; }
.toast-x .x:hover { color: #fff; }
.toast-x::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left;
    background: repeating-linear-gradient(90deg, var(--bus) 0 12px, transparent 12px 20px); animation: toastBar 6s linear forwards; }

.dev-otp { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; margin-bottom: 16px;
    border: 2px dashed var(--sunset); background: #FFF4E6; color: #8A4B00; font-size: 13px; font-weight: 600; }
.dev-otp b { font-family: var(--display); font-size: 20px; letter-spacing: .2em; color: var(--ink); }

/* Modals & dropdowns */
.modal-content { border: 0; border-radius: 22px; box-shadow: 0 40px 80px -30px rgba(11, 21, 48, .6); }
.modal-header { border: 0; padding: 22px 24px 4px; align-items: flex-start; }
.modal-title { font-weight: 800; font-size: 19px; color: var(--ink); }
.modal-body { padding: 14px 24px; }
.modal-footer { border: 0; padding: 6px 24px 22px; gap: 8px; }
.modal-footer > * { margin: 0; }
.modal-backdrop.show { opacity: .5; }
.modal-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; margin-bottom: 12px; }
.dropdown-menu { border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); padding: 6px; min-width: 210px; }
.dropdown-item { border-radius: 10px; padding: 9px 12px; font-weight: 600; font-size: 14px; display: flex; gap: 10px; align-items: center; color: var(--text); }
.dropdown-item i { font-size: 18px; color: var(--muted); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--bus-50); color: var(--ink); }
.dropdown-item.text-danger i { color: var(--bad); }
.dropdown-item.text-danger:hover { background: var(--bad-50); color: var(--bad); }
.dropdown-divider { margin: 6px 4px; border-color: var(--line-2); }
.dropdown-header { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Section form (numbered stops) */
.form-stop { display: flex; gap: 16px; }
.form-stop + .form-stop { margin-top: 6px; }
.form-stop .rail { flex: none; display: flex; flex-direction: column; align-items: center; }
.form-stop .no { width: 36px; height: 36px; border-radius: 12px; background: var(--ink); color: var(--bus); font-family: var(--display); font-weight: 800; font-size: 18px; display: grid; place-items: center; }
.form-stop .rail::after { content: ''; flex: 1; border-left: 2px dashed var(--line); margin: 6px 0; min-height: 20px; }
.form-stop:last-child .rail::after { display: none; }
.form-stop .body { flex: 1; min-width: 0; padding-bottom: 26px; }
.form-stop h4 { font-size: 16px; font-weight: 800; color: var(--ink); margin: 6px 0 2px; }
.form-stop .lead { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* Plan choice cards (radio) */
.plan-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.plan-pick input { position: absolute; opacity: 0; pointer-events: none; }
.plan-pick label { position: relative; display: block; cursor: pointer; padding: 14px 14px 12px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; transition: all .15s; height: 100%; }
.plan-pick label:hover { border-color: #C9D1E0; transform: translateY(-2px); }
.plan-pick .nm { font-weight: 800; color: var(--ink); }
.plan-pick .pr { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--ink); line-height: 1.2; margin-top: 4px; }
.plan-pick .pr small { font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 600; }
.plan-pick .mt { font-size: 12px; color: var(--muted); margin-top: 4px; }
.plan-pick .tick { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; font-size: 13px; transition: all .15s; }
.plan-pick input:checked + label { border-color: var(--ink); background: linear-gradient(180deg, var(--bus-50), #fff 70%); box-shadow: 0 0 0 4px rgba(255, 183, 3, .18); }
.plan-pick input:checked + label .tick { background: var(--ink); border-color: var(--ink); color: var(--bus); }
.plan-pick input:focus-visible + label { box-shadow: 0 0 0 4px rgba(255, 183, 3, .35); }

/* Pass card (plan / boarding pass) */
.pass { position: relative; border-radius: 22px; overflow: hidden; color: #fff; background: linear-gradient(150deg, var(--ink-3), var(--ink) 70%); box-shadow: 0 22px 44px -26px rgba(11, 21, 48, .8); }
.pass-top { padding: 20px 22px 18px; position: relative; }
.pass-top::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 183, 3, .35), transparent 70%); }
.pass .lbl { font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.pass .val { font-weight: 800; font-size: 15px; }
.pass .big { font-family: var(--display); font-size: 30px; font-weight: 800; color: var(--bus); line-height: 1.05; }
.pass-tear { position: relative; height: 0; border-top: 2px dashed rgba(255, 255, 255, .2); margin: 0 18px; }
.pass-tear::before, .pass-tear::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.pass-tear::before { left: -30px; }
.pass-tear::after { right: -30px; }
.pass-bottom { padding: 16px 22px 20px; }
.pass .barcode { opacity: .5; background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 4px, #fff 4px 5px, transparent 5px 7px, #fff 7px 10px, transparent 10px 12px); width: 100%; height: 34px; }
.pass .validity-road { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .18) 0 8px, rgba(255, 255, 255, .07) 8px 14px); }
.pass .validity-label { color: rgba(255, 255, 255, .7) !important; }
.pass .validity-bus { background: var(--ink); border-color: rgba(255, 255, 255, .25); color: var(--bus); }
.pass .validity-flag { color: rgba(255, 255, 255, .55); }

/* Onboarding route (company dashboard) */
.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; position: relative; padding-top: 6px; }
.journey::before { content: ''; position: absolute; top: 33px; left: 12%; right: 12%; border-top: 3px dashed #D5DBE7; }
.jstop { position: relative; text-align: center; padding: 0 6px; }
.jstop .jdot { position: relative; z-index: 1; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 18px; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font-size: 25px; color: var(--ink-3); transition: all .2s; }
.jstop:first-child .jdot { background: var(--bus); border-color: var(--bus); color: var(--ink); box-shadow: 0 0 0 6px rgba(255, 183, 3, .18); }
.jstop .jn { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.jstop h5 { font-size: 15px; font-weight: 800; color: var(--ink); margin: 4px 0; }
.jstop p { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.jstop:hover .jdot { transform: translateY(-3px); border-color: var(--bus); }
@media (max-width: 767.98px) {
    .journey { grid-template-columns: 1fr; gap: 0; }
    .journey::before { top: 20px; bottom: 20px; left: 27px; right: auto; border-top: 0; border-left: 3px dashed #D5DBE7; }
    .jstop { display: grid; grid-template-columns: 56px 1fr; gap: 0 14px; text-align: left; padding: 8px 0; }
    .jstop .jdot { grid-row: span 3; margin: 0; }
}

/* ==========================================================================
   Bus illustration (SVG)
   ========================================================================== */
.bus-svg { display: block; width: 100%; height: auto; overflow: visible; }
.bus-svg.is-moving .bus-chassis { animation: busBob .42s ease-in-out infinite alternate; }
.bus-svg.is-moving .wheel { transform-box: fill-box; transform-origin: center; animation: spin .55s linear infinite; }
.bus-svg .beam { opacity: .9; }
.bus-svg .led { animation: ledBlink 2.4s steps(2) infinite; }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(420px, 1fr); background: #fff; }
.auth-scene { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; padding: 34px 44px 0; }
.auth-scene .scene { position: absolute; inset: 0; }
.auth-copy { position: relative; z-index: 3; max-width: 540px; }
.auth-copy h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.02; margin: 46px 0 14px; letter-spacing: -.3px; }
.auth-copy h1 em { font-style: normal; color: var(--bus); position: relative; }
.auth-copy p { font-size: 16.5px; color: rgba(255, 255, 255, .74); max-width: 470px; }
.auth-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: rgba(255, 255, 255, .9); }
.auth-points i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 183, 3, .16); color: var(--bus); font-size: 17px; flex: none; }

.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(24px, 5vw, 70px); position: relative; background:
    radial-gradient(70% 40% at 100% 0%, rgba(255, 183, 3, .1), transparent 70%), #fff; }
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-card .brand-name { color: var(--ink); }
.auth-card .brand-name b { color: var(--sunset); }
.auth-card h2 { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.05; color: var(--ink); margin: 26px 0 6px; }
.auth-card .lead-t { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.auth-card .form-control { height: 54px; font-size: 15.5px; }
.auth-card .btn-lg { height: 54px; }
.auth-foot { margin-top: 26px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-foot a { font-weight: 700; }
.auth-step { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 99px; background: var(--bus-50); color: var(--bus-700); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.auth-step b { width: 22px; height: 22px; border-radius: 50%; background: var(--bus); color: var(--ink); display: grid; place-items: center; font-size: 12px; }
.id-detect { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 8px; background: var(--line-2); color: var(--muted); pointer-events: none; transition: all .2s; z-index: 2; }
.id-detect.on { background: var(--ink); color: var(--bus); }
.divider-road { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; font-weight: 600; margin: 22px 0; }
.divider-road::before, .divider-road::after { content: ''; flex: 1; border-top: 2px dashed var(--line); }

@media (max-width: 991.98px) {
    .auth { grid-template-columns: 1fr; }
    .auth-scene { min-height: 220px; padding: 18px 20px 0; }
    .auth-scene .auth-copy { display: none; }
    .auth-scene .scene-bus { width: min(300px, 72%); bottom: 30px; }
    .auth-scene .skyline.far { height: 120px; }
    .auth-scene .skyline.near { height: 90px; }
    .auth-scene .scene-sun { width: 160px; height: 160px; bottom: 90px; }
    .auth-panel { padding: 28px 20px 40px; justify-content: flex-start; }
    .auth-card h2 { margin-top: 0; font-size: 30px; }
}
.flag-in { display: inline-block; width: 20px; height: 14px; border-radius: 3px; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }

/* ---- Scene: dusk sky, skyline, road --------------------------------------------- */
.scene { overflow: hidden; background: linear-gradient(180deg, #0B1530 0%, #1B2B5E 38%, #6A3B6E 64%, #F4845F 84%, #FFB37A 100%); }
.scene-stars { position: absolute; inset: 0 0 45% 0; opacity: .8;
    background-image: radial-gradient(1.4px 1.4px at 8% 14%, #fff, transparent), radial-gradient(1px 1px at 18% 34%, #fff, transparent), radial-gradient(1.6px 1.6px at 28% 8%, #fff, transparent), radial-gradient(1px 1px at 41% 26%, #fff, transparent), radial-gradient(1.3px 1.3px at 55% 12%, #fff, transparent), radial-gradient(1px 1px at 63% 36%, #fff, transparent), radial-gradient(1.5px 1.5px at 76% 18%, #fff, transparent), radial-gradient(1px 1px at 86% 30%, #fff, transparent), radial-gradient(1.2px 1.2px at 94% 10%, #fff, transparent);
    animation: twinkle 4s ease-in-out infinite alternate; }
.scene-sun { position: absolute; width: 230px; height: 230px; right: 14%; bottom: 120px; border-radius: 50%;
    background: radial-gradient(circle, #FFE29A 0%, #FFB703 45%, rgba(251, 133, 0, 0) 70%); filter: blur(.5px); opacity: .9; }
.skyline { position: absolute; left: 0; right: 0; overflow: hidden; pointer-events: none; }
.skyline .track { display: flex; width: max-content; }
.skyline svg { display: block; flex: none; height: 100%; width: auto; }
.skyline.far { bottom: 104px; height: 170px; opacity: .55; }
.skyline.far .track { animation: slide 90s linear infinite; height: 100%; }
.skyline.near { bottom: 92px; height: 120px; }
.skyline.near .track { animation: slide 38s linear infinite; height: 100%; }
.road { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; background: linear-gradient(180deg, #1A2142 0%, #0F1530 100%); border-top: 5px solid #2A3463; z-index: 2; }
.road::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 9px; background: repeating-linear-gradient(90deg, #E9EDF7 0 30px, #E11D48 30px 60px); opacity: .85; animation: roadMove 1.6s linear infinite; background-size: 120px 9px; }
.road::after { content: ''; position: absolute; left: 0; right: 0; top: 52%; height: 5px; background: repeating-linear-gradient(90deg, rgba(255, 214, 102, .95) 0 46px, transparent 46px 92px); background-size: 92px 5px; animation: roadMoveLane .55s linear infinite; }
.scene-bus { position: absolute; z-index: 3; bottom: 34px; left: 50%; width: min(400px, 60%); transform: translateX(-55%); }
.scene-bus .bus-svg { filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .35)); }

/* ==========================================================================
   Suspended page
   ========================================================================== */
.hold { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background:
    radial-gradient(60% 50% at 50% 0%, rgba(255, 183, 3, .14), transparent 70%), var(--bg); }
.hold-card { width: 100%; max-width: 620px; text-align: center; }
.hold-art { position: relative; max-width: 420px; margin: 0 auto 8px; padding-bottom: 20px; }
.hold-art::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: 10px; border-top: 4px dashed #CDD4E2; }
.hold-art .cone { position: absolute; bottom: 14px; width: 34px; }
.hold h1 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4vw, 40px); color: var(--ink); line-height: 1.05; margin: 18px 0 10px; }
.hold p { color: var(--muted); font-size: 15.5px; max-width: 480px; margin: 0 auto; }
.hold .reason { display: inline-flex; gap: 8px; align-items: center; margin-top: 16px; padding: 8px 14px; border-radius: 12px; background: var(--bad-50); color: var(--bad); font-weight: 700; font-size: 13.5px; }

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes busBob { from { transform: translateY(0); } to { transform: translateY(-1.6px); } }
@keyframes roadMove { from { background-position-x: 0; } to { background-position-x: -120px; } }
@keyframes roadMoveLane { from { background-position-x: 0; } to { background-position-x: -92px; } }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes twinkle { from { opacity: .45; } to { opacity: .95; } }
@keyframes ledBlink { 50% { opacity: .78; } }
@keyframes stopPop { 0% { transform: scale(1); } 45% { transform: scale(1.16) rotate(-4deg); } 100% { transform: scale(1); } }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } }
.rise { animation: riseIn .6s cubic-bezier(.2, .8, .2, 1) both; }
.rise-1 { animation-delay: .05s; } .rise-2 { animation-delay: .1s; } .rise-3 { animation-delay: .15s; } .rise-4 { animation-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---- Upgrade page + locked menu items ------------------------------------ */
.stop .lock-chip { display: inline-flex; align-items: center; gap: 3px; color: var(--bus); border-color: rgba(255, 183, 3, .45); }
.upgrade-hero { display: flex; gap: 22px; align-items: flex-start; padding: 28px; border-radius: var(--radius); background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.upgrade-hero h1 { font-family: var(--display); font-weight: 800; font-size: 32px; margin: 4px 0 6px; color: #fff; }
.upgrade-hero p { color: rgba(255, 255, 255, .75); max-width: 640px; }
.upgrade-hero .small-caps { color: var(--bus); }
.upgrade-ic { flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 32px; background: var(--bus); color: var(--ink); }
.up-plan { padding: 22px; }
.up-plan.fit { border: 2px solid var(--bus); box-shadow: 0 18px 40px -24px rgba(240, 165, 0, .8); }
.plan-price .was { display: block; font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--muted); }
.ticket.t-ink .plan-price .was, .ticket.t-bus .plan-price .was { color: inherit; opacity: .6; }
@media (max-width: 575.98px) { .upgrade-hero { flex-direction: column; padding: 22px; } .upgrade-hero h1 { font-size: 26px; } }

/* ---- Searchable city picker ---------------------------------------------- */
.cp { position: relative; min-width: 0; }
.cp-input { padding-right: 40px; font-weight: 600; }
.cp.has-value .cp-input { padding-right: 150px; }
.cp-caret { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 17px; }
.cp-state { position: absolute; right: 38px; top: 50%; transform: translateY(-50%); max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 700; color: var(--muted); pointer-events: none; }
.cp-menu { position: absolute; z-index: 1060; left: 0; right: 0; top: calc(100% + 6px); min-width: 260px; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 22px 50px -20px rgba(11, 21, 48, .45); padding: 6px; }
.cp-head { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.cp-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14.5px; }
.cp-item.on, .cp-item:hover { background: var(--bus-50); }
.cp-item mark { background: transparent; color: var(--sunset); padding: 0; font-weight: 800; }
.cp-name { font-weight: 600; color: var(--ink); min-width: 0; }
.cp-st { font-size: 12px; color: var(--muted); white-space: nowrap; flex: none; }
.cp-own { font-size: 10px; font-weight: 800; color: var(--teal); background: var(--teal-50); padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.cp-add { color: var(--teal); font-weight: 700; justify-content: flex-start; border-top: 1px dashed var(--line); margin-top: 4px; border-radius: 0 0 10px 10px; }
.cp-hint { font-size: 12.5px; color: var(--muted); padding: 8px 10px; }
@media (max-width: 575.98px) { .cp.has-value .cp-input { padding-right: 40px; } .cp-state { display: none; } }

/* ---- Collapsible sidebar (desktop) ---------------------------------------- */
.sb-collapse { flex: none; }
@media (max-width: 991.98px) { .sb-collapse { display: none !important; } }
@media (min-width: 992px) {
    .sidebar { transition: width .28s cubic-bezier(.4, 0, .2, 1), transform .32s cubic-bezier(.4, 0, .2, 1); }
    .main { transition: margin-left .28s cubic-bezier(.4, 0, .2, 1); }
    .shell.sb-mini { --sidebar-w: 88px; }
    .sb-mini .sb-brand { padding: 20px 0 12px; display: flex; justify-content: center; }
    .sb-mini .sb-brand .brand > span:not(.brand-mark) { display: none; }
    .sb-mini .sb-scroll { padding: 4px 10px 18px; overflow-x: hidden; }
    .sb-mini .route::before { left: 33px; }
    .sb-mini .route-label { padding: 12px 0 4px; height: 26px; font-size: 0; }
    .sb-mini .route-label::before { left: 28px; }
    .sb-mini .stop > a, .sb-mini .stop > span { justify-content: center; padding: 5px 0; gap: 0; }
    .sb-mini .stop > a > span:not(.dot), .sb-mini .stop > span > span:not(.dot) { display: none; }
    .sb-mini .stop.active > a { background: none; }
    .sb-mini .route-bus { left: 34px; }
    .sb-mini .sb-pass { display: none; }
    .sb-mini .sb-foot { padding: 10px; }
    .sb-mini .sb-user { flex-direction: column; gap: 6px; padding: 8px 4px; }
    .sb-mini .sb-user .min-w-0 { display: none; }
    .sb-mini .sb-user form { margin: 0 !important; }
}

/* ---- Guided tour ------------------------------------------------------------ */
.tour { position: fixed; inset: 0; z-index: 2000; pointer-events: none; opacity: 0; transition: opacity .2s; }
.tour.in { opacity: 1; }
.tour.out { opacity: 0; }
.tour-veil { position: absolute; inset: 0; pointer-events: auto; }
.tour.centered .tour-veil { background: rgba(11, 21, 48, .62); backdrop-filter: blur(2px); }
.tour-spot {
    position: absolute; pointer-events: none; opacity: 0;
    box-shadow: 0 0 0 9999px rgba(11, 21, 48, .62), 0 0 0 3px var(--bus), 0 0 34px 8px rgba(255, 183, 3, .45);
    transition: left .3s cubic-bezier(.4, 0, .2, 1), top .3s cubic-bezier(.4, 0, .2, 1), width .3s, height .3s, opacity .2s;
}
.tour-pop {
    position: absolute; width: min(350px, calc(100vw - 24px)); pointer-events: auto; overflow: hidden;
    background: #fff; border-radius: 20px; padding: 20px 18px 14px; color: var(--text);
    box-shadow: 0 34px 70px -24px rgba(0, 0, 0, .6); transition: left .3s cubic-bezier(.4, 0, .2, 1), top .3s cubic-bezier(.4, 0, .2, 1);
}
.tour-pop::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: repeating-linear-gradient(90deg, var(--bus) 0 18px, var(--ink) 18px 28px); }
.tour.centered .tour-pop { width: min(420px, calc(100vw - 24px)); padding: 26px 24px 18px; text-align: left; }
.tour-top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.tour-bus { width: 32px; height: 32px; border-radius: 10px; background: var(--bus); display: grid; place-items: center; font-size: 17px; box-shadow: 0 6px 14px -6px rgba(240, 165, 0, .9); }
.tour-count { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.tour-x { margin-left: auto; border: 0; background: var(--line-2); width: 30px; height: 30px; border-radius: 9px; font-size: 19px; line-height: 1; color: var(--muted); }
.tour-x:hover { background: var(--line); color: var(--ink); }
.tour-title { font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.15; color: var(--ink); margin: 4px 0 6px; }
.tour.centered .tour-title { font-size: 26px; }
.tour-text { font-size: 14.5px; line-height: 1.55; color: #3A4563; margin: 0 0 14px; }
.tour-dots { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line); transition: width .2s, background .2s; }
.tour-dots i.done { background: var(--bus-600); }
.tour-dots i.on { width: 22px; background: var(--ink); }
.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-skip { border: 0; background: none; padding: 0; color: var(--muted); font-weight: 700; font-size: 13px; }
.tour-skip:hover { color: var(--ink); text-decoration: underline; }
.tour-help i { transition: transform .2s; }
.tour-help:hover i { transform: rotate(-12deg) scale(1.08); }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-pop { transition: none; } }
