/* ==========================================================================
   Mobiliti portal design system — "Departure Board"
   Navy like a night coach, amber like bus signage and road markings.
   Layered on Bootstrap 5.3 (light / dark via [data-bs-theme]).
   ========================================================================== */

:root {
    --mb-navy-950: #070F1C;
    --mb-navy-900: #0B1626;
    --mb-navy-800: #0F1B2D;
    --mb-navy-700: #16263E;
    --mb-navy-600: #22385A;
    --mb-navy-400: #5B7091;
    --mb-navy-200: #B7C3D6;
    --mb-amber: #F5A524;
    --mb-amber-600: #E08E0B;
    --mb-amber-700: #A86400;
    --mb-amber-100: #FEF3D9;
    --mb-green: #12A150;
    --mb-red: #E5484D;
    --mb-blue: #2F80ED;

    --mb-sidebar-w: 264px;
    --mb-sidebar-w-condensed: 76px;
    --mb-topbar-h: 68px;
    --mb-radius: 14px;
    --mb-radius-sm: 10px;
    --mb-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mb-font-board: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Surfaces (light) */
    --mb-bg: #F2F4F8;
    --mb-surface: #FFFFFF;
    --mb-surface-2: #F7F8FB;
    --mb-line: #E4E8EF;
    --mb-text: #0F1B2D;
    --mb-muted: #66748B;
    --mb-shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 6px 18px -8px rgba(15, 27, 45, .12);
    --mb-shadow-lg: 0 18px 40px -16px rgba(15, 27, 45, .35);

    /* Bootstrap bridges */
    --bs-body-font-family: var(--mb-font);
    --bs-body-bg: var(--mb-bg);
    --bs-body-color: var(--mb-text);
    --bs-secondary-color: var(--mb-muted);
    --bs-border-color: var(--mb-line);
    --bs-border-radius: .6rem;
    --bs-border-radius-lg: .9rem;
    --bs-primary: var(--mb-amber);
    --bs-primary-rgb: 245, 165, 36;
    --bs-primary-text-emphasis: var(--mb-amber-700);
    --bs-primary-bg-subtle: var(--mb-amber-100);
    --bs-warning: var(--mb-amber);
    --bs-warning-rgb: 245, 165, 36;
    --bs-success: var(--mb-green);
    --bs-success-rgb: 18, 161, 80;
    --bs-danger: var(--mb-red);
    --bs-danger-rgb: 229, 72, 77;
    --bs-info: var(--mb-blue);
    --bs-info-rgb: 47, 128, 237;
    --bs-secondary-rgb: 34, 56, 90;
    --bs-link-color: #1F4E8C;
    --bs-link-color-rgb: 31, 78, 140;
    --bs-link-hover-color: var(--mb-amber-700);
    --bs-card-bg: var(--mb-surface);
}

[data-bs-theme="dark"] {
    --mb-bg: #08111E;
    --mb-surface: #0F1B2D;
    --mb-surface-2: #132238;
    --mb-line: #1F3150;
    --mb-text: #E6ECF5;
    --mb-muted: #8C9BB4;
    --mb-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --bs-body-bg: var(--mb-bg);
    --bs-body-color: var(--mb-text);
    --bs-secondary-color: var(--mb-muted);
    --bs-border-color: var(--mb-line);
    --bs-tertiary-bg: var(--mb-surface-2);
    --bs-secondary-bg: var(--mb-surface-2);
    --bs-primary-text-emphasis: #FFC861;
    --bs-primary-bg-subtle: rgba(245, 165, 36, .14);
    --bs-link-color: #7FB0FF;
    --bs-link-color-rgb: 127, 176, 255;
    --bs-secondary-rgb: 159, 176, 204;
    --bs-secondary-text-emphasis: #B7C3D6;
    --bs-secondary-bg-subtle: rgba(159, 176, 204, .12);
    --bs-link-hover-color: var(--mb-amber);
    --bs-card-bg: var(--mb-surface);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html, body { min-height: 100%; }
body {
    font-family: var(--mb-font);
    background: var(--mb-bg);
    color: var(--mb-text);
    font-size: .9rem;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .h4, .h5 { font-weight: 700; letter-spacing: -.01em; color: var(--mb-text); }
a { text-decoration: none; }
code, .font-board, .font-monospace { font-family: var(--mb-font-board); }
code { color: var(--mb-amber-700); background: var(--mb-amber-100); padding: .1rem .4rem; border-radius: 6px; font-size: .82em; }
[data-bs-theme="dark"] code { color: #FFC861; background: rgba(245, 165, 36, .12); }
.text-muted { color: var(--mb-muted) !important; }
.text-primary { color: var(--bs-primary-text-emphasis) !important; }
::selection { background: var(--mb-amber); color: var(--mb-navy-900); }

/* Template utility compatibility */
.fs-10 { font-size: 10px !important; } .fs-11 { font-size: 11px !important; } .fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; } .fs-14 { font-size: 14px !important; } .fs-15 { font-size: 15px !important; }
.fs-16 { font-size: 16px !important; } .fs-18 { font-size: 18px !important; } .fs-20 { font-size: 20px !important; }
.fs-22 { font-size: 22px !important; } .fs-24 { font-size: 24px !important; } .fs-28 { font-size: 28px !important; }
.fs-32 { font-size: 32px !important; } .fs-36 { font-size: 36px !important; } .fs-40 { font-size: 40px !important; }
.avatar-xs { width: 28px; height: 28px; } .avatar-sm { width: 40px; height: 40px; }
.avatar-md { width: 48px; height: 48px; } .avatar-lg { width: 64px; height: 64px; }
.avatar-title { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.table-centered td, .table-centered th { vertical-align: middle; }
iconify-icon { display: inline-block; vertical-align: -0.15em; }

/* --------------------------------------------------------------------------
   Shell: topbar, sidebar, content
   -------------------------------------------------------------------------- */
.mb-topbar {
    position: fixed; top: 0; right: 0; left: var(--mb-sidebar-w); z-index: 1020;
    height: var(--mb-topbar-h);
    display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem;
    background: color-mix(in srgb, var(--mb-bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--mb-line);
    transition: left .2s ease;
}
.mb-icon-btn {
    width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--mb-line);
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--mb-surface); color: var(--mb-text); font-size: 20px; position: relative;
    transition: border-color .15s, transform .15s;
}
.mb-icon-btn:hover { border-color: var(--mb-amber); color: var(--mb-text); }
.mb-icon-btn .mb-dot {
    position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--mb-red); color: #fff; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; border: 2px solid var(--mb-bg);
}
.mb-search { position: relative; flex: 0 1 360px; }
.mb-search input {
    height: 40px; border-radius: 12px; padding-left: 2.4rem; background: var(--mb-surface);
    border: 1px solid var(--mb-line); font-size: .85rem;
}
.mb-search input:focus { border-color: var(--mb-amber); box-shadow: 0 0 0 .2rem rgba(245, 165, 36, .2); }
.mb-search iconify-icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--mb-muted); font-size: 18px; }
.mb-clock {
    font-family: var(--mb-font-board); font-size: .8rem; color: var(--mb-muted);
    padding: .45rem .7rem; border-radius: 10px; border: 1px dashed var(--mb-line); white-space: nowrap;
}
.mb-clock strong { color: var(--mb-text); font-weight: 600; }
.mb-user { display: flex; align-items: center; gap: .6rem; padding: .25rem .35rem .25rem .25rem; border-radius: 14px; border: 1px solid transparent; color: var(--mb-text); }
.mb-user:hover, .mb-user[aria-expanded="true"] { border-color: var(--mb-line); background: var(--mb-surface); color: var(--mb-text); }
.mb-avatar {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--mb-amber), var(--mb-amber-600)); color: var(--mb-navy-900);
    font-weight: 800; font-size: .85rem;
}
.mb-user-meta { line-height: 1.15; }
.mb-user-meta small { color: var(--mb-muted); font-size: .72rem; }

/* Sidebar: the menu is a route, each entry a stop */
.mb-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1030; width: var(--mb-sidebar-w);
    display: flex; flex-direction: column;
    background:
        radial-gradient(120% 60% at 0% 0%, rgba(245, 165, 36, .08), transparent 60%),
        linear-gradient(180deg, var(--mb-navy-800), var(--mb-navy-950));
    color: var(--mb-navy-200);
    transition: width .2s ease, transform .25s ease;
}
.mb-brand { height: var(--mb-topbar-h); display: flex; align-items: center; gap: .7rem; padding: 0 1.25rem; color: #fff; flex-shrink: 0; }
.mb-brand:hover { color: #fff; }
.mb-brand-mark {
    width: 38px; height: 38px; border-radius: 11px; background: var(--mb-amber); color: var(--mb-navy-900);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 6px 16px -6px rgba(245, 165, 36, .7);
}
.mb-brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; line-height: 1; }
.mb-brand-name small { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mb-amber); margin-top: 4px; }
.mb-tenant-card {
    margin: .25rem 1rem 1rem; padding: .7rem .8rem; border-radius: 12px;
    background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07);
    display: flex; align-items: center; gap: .6rem;
}
.mb-tenant-card .mb-plate {
    font-family: var(--mb-font-board); font-size: .62rem; font-weight: 700; color: var(--mb-navy-900);
    background: #FFD24A; border: 1.5px solid #1a1a1a; border-radius: 4px; padding: .1rem .35rem; letter-spacing: .05em;
}
.mb-tenant-card strong { color: #fff; font-size: .82rem; display: block; line-height: 1.2; }
.mb-tenant-card small { font-size: .7rem; color: var(--mb-navy-400); }
.mb-sidebar-scroll { flex: 1; overflow-y: auto; padding: 0 .75rem 1.5rem; scrollbar-width: thin; scrollbar-color: var(--mb-navy-600) transparent; }

.mb-nav { list-style: none; margin: 0; padding: 0; position: relative; }
.mb-nav-title {
    font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--mb-navy-400); padding: 1.1rem .75rem .45rem 2.45rem;
}
.mb-nav-link {
    position: relative; display: flex; align-items: center; gap: .7rem;
    padding: .55rem .75rem .55rem 2.45rem; margin: 1px 0; border-radius: 10px;
    color: var(--mb-navy-200); font-weight: 500; font-size: .86rem; white-space: nowrap;
    transition: background .15s, color .15s;
}
/* the road: a dashed line joining the stops */
.mb-nav-link::before {
    content: ""; position: absolute; left: 1.05rem; top: -2px; bottom: -2px; width: 2px;
    background: repeating-linear-gradient(180deg, rgba(183, 195, 214, .22) 0 6px, transparent 6px 11px);
}
.mb-nav-link::after {
    content: ""; position: absolute; left: calc(1.05rem - 4px); top: 50%; width: 10px; height: 10px; margin-top: -5px;
    border-radius: 50%; background: var(--mb-navy-800); border: 2px solid var(--mb-navy-400);
    transition: all .15s;
}
.mb-nav-link iconify-icon { font-size: 19px; flex-shrink: 0; opacity: .85; }
.mb-nav-link > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mb-nav-link:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.mb-nav-link:hover::after { border-color: var(--mb-amber); }
.mb-nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(245, 165, 36, .18), rgba(245, 165, 36, .02)); font-weight: 600; }
.mb-nav-link.active iconify-icon { color: var(--mb-amber); opacity: 1; }
.mb-nav-link.active::after { background: var(--mb-amber); border-color: var(--mb-amber); box-shadow: 0 0 0 4px rgba(245, 165, 36, .22); }
.mb-nav-link .mb-caret { margin-left: auto; font-size: 16px; transition: transform .2s; opacity: .6; }
.mb-nav-link[aria-expanded="true"] .mb-caret { transform: rotate(90deg); }
.mb-subnav { list-style: none; margin: 0; padding: .15rem 0 .35rem; }
.mb-subnav a {
    position: relative; display: block; padding: .4rem .75rem .4rem 4.05rem; border-radius: 8px;
    color: var(--mb-navy-200); font-size: .82rem; white-space: nowrap;
}
.mb-subnav a::before {
    content: ""; position: absolute; left: 1.05rem; top: -2px; bottom: -2px; width: 2px;
    background: repeating-linear-gradient(180deg, rgba(183, 195, 214, .22) 0 6px, transparent 6px 11px);
}
.mb-subnav a::after {
    content: ""; position: absolute; left: 2.95rem; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--mb-navy-400);
}
.mb-subnav a:hover { color: #fff; }
.mb-subnav a.active { color: var(--mb-amber); font-weight: 600; }
.mb-subnav a.active::after { background: var(--mb-amber); }
.mb-sidebar-foot { padding: .9rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, .06); font-size: .7rem; color: var(--mb-navy-400); flex-shrink: 0; }
.mb-sidebar-foot .mb-live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mb-green); margin-right: .4rem; box-shadow: 0 0 0 3px rgba(18, 161, 80, .25); }

/* Content area (legacy views use .page-content) */
.page-content { margin-left: var(--mb-sidebar-w); padding: calc(var(--mb-topbar-h) + 1.5rem) .75rem 1.5rem; min-height: calc(100vh - 56px); transition: margin-left .2s ease; }
.page-content > .container-fluid { max-width: 1600px; }
.mb-footer {
    margin-left: var(--mb-sidebar-w); padding: 1rem 1.5rem; font-size: .75rem; color: var(--mb-muted);
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; transition: margin-left .2s ease;
}

/* Condensed sidebar (desktop) */
html[data-sidebar="condensed"] .mb-sidebar { width: var(--mb-sidebar-w-condensed); }
html[data-sidebar="condensed"] .mb-topbar { left: var(--mb-sidebar-w-condensed); }
html[data-sidebar="condensed"] .page-content,
html[data-sidebar="condensed"] .mb-footer { margin-left: var(--mb-sidebar-w-condensed); }
html[data-sidebar="condensed"] .mb-brand-name,
html[data-sidebar="condensed"] .mb-tenant-card,
html[data-sidebar="condensed"] .mb-nav-title,
html[data-sidebar="condensed"] .mb-nav-link span,
html[data-sidebar="condensed"] .mb-nav-link .mb-caret,
html[data-sidebar="condensed"] .mb-subnav,
html[data-sidebar="condensed"] .mb-sidebar-foot { display: none !important; }
html[data-sidebar="condensed"] .mb-brand { padding: 0 1.1rem; }
html[data-sidebar="condensed"] .mb-nav-link { padding: .7rem; justify-content: center; }
html[data-sidebar="condensed"] .mb-nav-link::before,
html[data-sidebar="condensed"] .mb-nav-link::after { display: none; }

/* Mobile: off-canvas sidebar */
.mb-backdrop { display: none; }
@media (max-width: 991.98px) {
    .mb-sidebar { transform: translateX(-100%); width: var(--mb-sidebar-w) !important; }
    .mb-topbar { left: 0 !important; padding: 0 1rem; }
    .page-content, .mb-footer { margin-left: 0 !important; }
    .page-content { padding-left: 0; padding-right: 0; }
    html.mb-sidebar-open .mb-sidebar { transform: none; box-shadow: var(--mb-shadow-lg); }
    html.mb-sidebar-open .mb-backdrop { display: block; position: fixed; inset: 0; z-index: 1025; background: rgba(7, 15, 28, .55); }
    html[data-sidebar="condensed"] .mb-brand-name, html[data-sidebar="condensed"] .mb-tenant-card,
    html[data-sidebar="condensed"] .mb-nav-title, html[data-sidebar="condensed"] .mb-nav-link span,
    html[data-sidebar="condensed"] .mb-subnav, html[data-sidebar="condensed"] .mb-sidebar-foot { display: revert !important; }
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */
.mb-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.mb-page-head h1 { font-size: 1.55rem; font-weight: 800; margin: 0; }
.mb-page-head .mb-eyebrow {
    display: inline-flex; align-items: center; gap: .45rem; font-size: .7rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--bs-primary-text-emphasis); margin-bottom: .35rem;
}
.mb-page-head .mb-eyebrow::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--mb-amber); }
.mb-page-head p { color: var(--mb-muted); margin: .25rem 0 0; }
.mb-page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* --------------------------------------------------------------------------
   Components
   -------------------------------------------------------------------------- */
.card {
    --bs-card-border-color: var(--mb-line);
    --bs-card-border-radius: var(--mb-radius);
    --bs-card-inner-border-radius: calc(var(--mb-radius) - 1px);
    --bs-card-cap-bg: transparent;
    --bs-card-spacer-y: 1.15rem;
    --bs-card-spacer-x: 1.25rem;
    background: var(--mb-surface);
    box-shadow: var(--mb-shadow);
    margin-bottom: 1.25rem;
}
.card-header { border-bottom: 1px solid var(--mb-line); padding-top: 1rem; padding-bottom: 1rem; }
.card-title { font-size: .98rem; font-weight: 700; margin: 0; }
.card-footer { background: transparent; border-top: 1px solid var(--mb-line); }

/* Buttons: amber = primary action (signage), navy = standard action */
.btn { --bs-btn-font-weight: 600; --bs-btn-border-radius: 10px; --bs-btn-padding-x: 1rem; --bs-btn-padding-y: .5rem; --bs-btn-font-size: .86rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.btn-sm { --bs-btn-padding-x: .6rem; --bs-btn-padding-y: .3rem; --bs-btn-font-size: .78rem; --bs-btn-border-radius: 8px; }
.btn-primary, .btn-warning {
    --bs-btn-bg: var(--mb-amber); --bs-btn-border-color: var(--mb-amber); --bs-btn-color: var(--mb-navy-900);
    --bs-btn-hover-bg: var(--mb-amber-600); --bs-btn-hover-border-color: var(--mb-amber-600); --bs-btn-hover-color: var(--mb-navy-900);
    --bs-btn-active-bg: var(--mb-amber-600); --bs-btn-active-border-color: var(--mb-amber-600); --bs-btn-active-color: var(--mb-navy-900);
    --bs-btn-disabled-bg: var(--mb-amber); --bs-btn-disabled-border-color: var(--mb-amber); --bs-btn-disabled-color: var(--mb-navy-900);
    box-shadow: 0 6px 14px -8px rgba(245, 165, 36, .9);
}
.btn-secondary, .btn-dark {
    --bs-btn-bg: var(--mb-navy-800); --bs-btn-border-color: var(--mb-navy-800); --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--mb-navy-600); --bs-btn-hover-border-color: var(--mb-navy-600); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--mb-navy-600); --bs-btn-active-border-color: var(--mb-navy-600); --bs-btn-active-color: #fff;
}
[data-bs-theme="dark"] .btn-secondary, [data-bs-theme="dark"] .btn-dark {
    --bs-btn-bg: #24406A; --bs-btn-border-color: #24406A; --bs-btn-hover-bg: #2D4F82; --bs-btn-hover-border-color: #2D4F82;
}
.btn-outline-secondary {
    --bs-btn-color: var(--mb-text); --bs-btn-border-color: var(--mb-line); --bs-btn-bg: var(--mb-surface);
    --bs-btn-hover-bg: var(--mb-surface); --bs-btn-hover-color: var(--mb-text); --bs-btn-hover-border-color: var(--mb-amber);
    --bs-btn-active-bg: var(--mb-surface-2); --bs-btn-active-color: var(--mb-text); --bs-btn-active-border-color: var(--mb-amber);
}
.btn-light {
    --bs-btn-bg: var(--mb-surface-2); --bs-btn-border-color: var(--mb-line); --bs-btn-color: var(--mb-text);
    --bs-btn-hover-bg: var(--mb-surface); --bs-btn-hover-border-color: var(--mb-amber); --bs-btn-hover-color: var(--mb-text);
}
.btn-info { --bs-btn-bg: var(--mb-blue); --bs-btn-border-color: var(--mb-blue); --bs-btn-color: #fff; --bs-btn-hover-bg: #1F6BD6; --bs-btn-hover-border-color: #1F6BD6; --bs-btn-hover-color: #fff; }
.btn-danger { --bs-btn-bg: var(--mb-red); --bs-btn-border-color: var(--mb-red); --bs-btn-hover-bg: #C9363B; --bs-btn-hover-border-color: #C9363B; }
.btn-success { --bs-btn-bg: var(--mb-green); --bs-btn-border-color: var(--mb-green); --bs-btn-hover-bg: #0E8642; --bs-btn-hover-border-color: #0E8642; }
/* soft buttons (template compatibility) */
.btn[class*="btn-soft-"] { border: 1px solid transparent; }
.btn-soft-primary { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.btn-soft-success { background: rgba(18, 161, 80, .12); color: var(--mb-green); }
.btn-soft-danger { background: rgba(229, 72, 77, .12); color: var(--mb-red); }
.btn-soft-info { background: rgba(47, 128, 237, .12); color: var(--mb-blue); }
.btn-soft-warning { background: rgba(245, 165, 36, .15); color: var(--bs-primary-text-emphasis); }
.btn-soft-secondary { background: var(--mb-surface-2); color: var(--mb-text); }
.btn[class*="btn-soft-"]:hover { filter: brightness(.96); border-color: currentColor; }
/* legacy screens define .action-btn in their own <style>; restyle it as a quiet navy button */
html body .btn.action-btn { background: var(--mb-surface-2); border: 1px solid var(--mb-line); color: var(--mb-text) !important; }
html body .btn.action-btn:hover { border-color: var(--mb-amber); background: var(--mb-surface); }

/* Forms */
.form-control, .form-select {
    border-radius: 10px; border-color: var(--mb-line); background-color: var(--mb-surface); font-size: .87rem; padding: .55rem .8rem;
}
.form-control:focus, .form-select:focus { border-color: var(--mb-amber); box-shadow: 0 0 0 .22rem rgba(245, 165, 36, .2); }
.form-label { font-weight: 600; font-size: .8rem; margin-bottom: .35rem; color: var(--mb-text); }
.form-text { color: var(--mb-muted); font-size: .75rem; }
.form-check-input:checked { background-color: var(--mb-amber); border-color: var(--mb-amber); }
.form-check-input:focus { box-shadow: 0 0 0 .22rem rgba(245, 165, 36, .2); border-color: var(--mb-amber); }
.search-bar { position: relative; }
.search-bar > span { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--mb-muted); z-index: 2; }
.search-bar .form-control { padding-left: 2.3rem; }

/* Tables */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: var(--mb-surface-2); --bs-table-border-color: var(--mb-line); margin-bottom: 0; }
.table > thead th, .table thead.bg-light th {
    background: var(--mb-surface-2) !important; color: var(--mb-muted); font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; padding-top: .8rem; padding-bottom: .8rem; border-bottom: 1px solid var(--mb-line); white-space: nowrap;
}
.table > tbody td { padding-top: .8rem; padding-bottom: .8rem; border-color: var(--mb-line); }
.table > tbody tr { transition: background .12s; }
.table > tbody tr:hover > td { background: var(--mb-surface-2); }
.table-responsive { border-radius: 0 0 var(--mb-radius) var(--mb-radius); }

/* Badges & status pills */
.badge { font-weight: 600; letter-spacing: .02em; border-radius: 999px; padding: .38em .7em; }
.badge[class*="-subtle"]::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: .4em; vertical-align: .1em; }

/* Modals */
.modal-content { border: 0; border-radius: 18px; background: var(--mb-surface); box-shadow: var(--mb-shadow-lg); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--mb-line); padding: 1.1rem 1.4rem; position: relative; }
.modal-header::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: repeating-linear-gradient(90deg, var(--mb-amber) 0 24px, transparent 24px 34px); }
.modal-title { font-weight: 700; font-size: 1.05rem; }
.modal-body { padding: 1.3rem 1.4rem; }
.modal-footer { border-top: 1px solid var(--mb-line); background: var(--mb-surface-2); padding: .9rem 1.4rem; }
.modal-backdrop.show { opacity: .6; background: var(--mb-navy-950); }

/* Alerts, dropdowns, pagination, progress */
.alert { border-radius: 12px; border: 1px solid transparent; font-weight: 500; }
.alert-success { background: rgba(18, 161, 80, .1); color: var(--mb-green); border-color: rgba(18, 161, 80, .25); }
.alert-danger { background: rgba(229, 72, 77, .1); color: var(--mb-red); border-color: rgba(229, 72, 77, .25); }
.alert-warning { background: rgba(245, 165, 36, .12); color: var(--bs-primary-text-emphasis); border-color: rgba(245, 165, 36, .3); }
.alert-info { background: rgba(47, 128, 237, .1); color: var(--mb-blue); border-color: rgba(47, 128, 237, .25); }
.dropdown-menu { border: 1px solid var(--mb-line); border-radius: 14px; box-shadow: var(--mb-shadow-lg); padding: .4rem; background: var(--mb-surface); }
.dropdown-item { border-radius: 8px; padding: .5rem .7rem; font-size: .86rem; display: flex; align-items: center; gap: .55rem; }
.dropdown-item:active { background: var(--mb-amber); color: var(--mb-navy-900); }
.pagination { --bs-pagination-border-radius: 9px; --bs-pagination-active-bg: var(--mb-navy-800); --bs-pagination-active-border-color: var(--mb-navy-800); --bs-pagination-color: var(--mb-text); --bs-pagination-bg: var(--mb-surface); --bs-pagination-border-color: var(--mb-line); gap: 4px; margin: 0; }
.pagination .page-link { border-radius: 9px !important; font-weight: 600; font-size: .8rem; }
.progress { background: var(--mb-surface-2); border-radius: 99px; }
.progress-bar { border-radius: 99px; }
.list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--mb-line); }

/* --------------------------------------------------------------------------
   Bus-specific components
   -------------------------------------------------------------------------- */

/* Ticket stub KPI: perforated edge and punched notches */
.mb-stub {
    position: relative; display: flex; align-items: stretch; height: 100%;
    background: var(--mb-surface); border: 1px solid var(--mb-line); border-radius: var(--mb-radius);
    box-shadow: var(--mb-shadow); overflow: hidden; margin-bottom: 1.25rem;
}
.mb-stub-main { flex: 1; padding: 1rem 1.1rem; min-width: 0; }
.mb-stub-side {
    position: relative; width: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    border-left: 2px dashed var(--mb-line); font-size: 26px;
}
.mb-stub-side::before, .mb-stub-side::after {
    content: ""; position: absolute; left: -9px; width: 16px; height: 16px; border-radius: 50%;
    background: var(--mb-bg); border: 1px solid var(--mb-line);
}
.mb-stub-side::before { top: -9px; }
.mb-stub-side::after { bottom: -9px; }
.mb-stub-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mb-muted); }
.mb-stub-value { font-family: var(--mb-font-board); font-size: 1.45rem; font-weight: 700; margin: .3rem 0 .15rem; letter-spacing: -.02em; color: var(--mb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-stub-hint { font-size: .74rem; color: var(--mb-muted); }
.mb-stub[data-tone="amber"] .mb-stub-side { color: var(--mb-amber-600); background: rgba(245, 165, 36, .08); }
.mb-stub[data-tone="green"] .mb-stub-side { color: var(--mb-green); background: rgba(18, 161, 80, .07); }
.mb-stub[data-tone="blue"] .mb-stub-side { color: var(--mb-blue); background: rgba(47, 128, 237, .07); }
.mb-stub[data-tone="red"] .mb-stub-side { color: var(--mb-red); background: rgba(229, 72, 77, .07); }
.mb-stub[data-tone="navy"] .mb-stub-side { color: var(--mb-navy-600); background: rgba(34, 56, 90, .07); }
[data-bs-theme="dark"] .mb-stub[data-tone="navy"] .mb-stub-side { color: var(--mb-navy-200); }
.mb-stub[data-tone="violet"] .mb-stub-side { color: #7C5CFF; background: rgba(124, 92, 255, .08); }

/* Hero banner: night road with lane markings */
.mb-hero {
    position: relative; overflow: hidden; border-radius: 18px; padding: 1.6rem 1.75rem; margin-bottom: 1.5rem; color: #fff;
    background:
        radial-gradient(90% 140% at 100% 0%, rgba(245, 165, 36, .28), transparent 55%),
        linear-gradient(120deg, var(--mb-navy-800) 0%, var(--mb-navy-700) 60%, #1B3254 100%);
    box-shadow: var(--mb-shadow-lg);
}
.mb-hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 18px; height: 4px; opacity: .55;
    background: repeating-linear-gradient(90deg, var(--mb-amber) 0 38px, transparent 38px 70px);
    animation: mb-road 2.4s linear infinite;
}
@keyframes mb-road { to { background-position: -70px 0; } }
.mb-hero h1 { color: #fff; font-size: 1.6rem; font-weight: 800; margin: 0; }
.mb-hero p { color: var(--mb-navy-200); margin: .35rem 0 0; }
.mb-hero .mb-eyebrow { color: var(--mb-amber); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.mb-hero .btn-outline-light { --bs-btn-border-color: rgba(255, 255, 255, .25); --bs-btn-hover-bg: rgba(255, 255, 255, .1); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--mb-amber); }
.mb-hero-bus { position: absolute; right: 2rem; bottom: 18px; width: 150px; opacity: .95; animation: mb-bob 1.2s ease-in-out infinite; }
@keyframes mb-bob { 50% { transform: translateY(-2px); } }
@media (max-width: 767.98px) { .mb-hero-bus { display: none; } }

/* Departure board */
.mb-board { background: var(--mb-navy-900); border-radius: var(--mb-radius); overflow: hidden; box-shadow: var(--mb-shadow-lg); margin-bottom: 1.25rem; color: #E6ECF5; border: 1px solid #1B2C47; }
.mb-board-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 1.25rem; background: linear-gradient(180deg, #13233A, var(--mb-navy-900)); border-bottom: 1px solid #1B2C47; }
.mb-board-title { font-family: var(--mb-font-board); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: .82rem; color: var(--mb-amber); display: flex; align-items: center; gap: .55rem; }
.mb-board-title .mb-blink { width: 8px; height: 8px; border-radius: 50%; background: var(--mb-amber); animation: mb-blink 1.4s steps(2) infinite; }
@keyframes mb-blink { 50% { opacity: .15; } }
.mb-board-clock { font-family: var(--mb-font-board); color: #fff; font-size: .95rem; letter-spacing: .08em; }
.mb-board table { width: 100%; border-collapse: collapse; }
.mb-board th { font-family: var(--mb-font-board); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: #6F84A6; font-weight: 600; padding: .6rem 1rem; text-align: left; border-bottom: 1px solid #1B2C47; white-space: nowrap; }
.mb-board td { padding: .75rem 1rem; border-bottom: 1px solid rgba(27, 44, 71, .7); vertical-align: middle; font-size: .84rem; }
.mb-board tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .015); }
.mb-board tbody tr:hover td { background: rgba(245, 165, 36, .05); }
.mb-board .mb-time { font-family: var(--mb-font-board); font-size: 1.15rem; font-weight: 700; color: var(--mb-amber); letter-spacing: .04em; }
.mb-board .mb-day { font-family: var(--mb-font-board); font-size: .66rem; color: #6F84A6; text-transform: uppercase; letter-spacing: .1em; }
.mb-board .mb-plate { font-family: var(--mb-font-board); font-size: .72rem; font-weight: 700; color: #111; background: #FFD24A; border: 1.5px solid #111; border-radius: 4px; padding: .1rem .4rem; white-space: nowrap; }
.mb-board .mb-muted { color: #8C9BB4; font-size: .74rem; }
.mb-board a { color: #fff; }
.mb-board .btn-board { font-family: var(--mb-font-board); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mb-amber); border: 1px solid rgba(245, 165, 36, .4); border-radius: 6px; padding: .3rem .55rem; white-space: nowrap; }
.mb-board .btn-board:hover { background: var(--mb-amber); color: var(--mb-navy-900); }
.mb-flap {
    display: inline-block; font-family: var(--mb-font-board); font-size: .66rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; padding: .3rem .55rem; border-radius: 5px; white-space: nowrap; background: #1A2A44; color: #CFE0FF;
}
.mb-flap[data-state="on-time"] { color: #4ADE80; background: rgba(74, 222, 128, .1); }
.mb-flap[data-state="boarding"] { color: var(--mb-navy-900); background: var(--mb-amber); animation: mb-blink 1.2s steps(2) infinite; }
.mb-flap[data-state="en-route"] { color: #7FB0FF; background: rgba(127, 176, 255, .12); }
.mb-flap[data-state="full"] { color: #FF8A8E; background: rgba(229, 72, 77, .15); }
.mb-flap[data-state="cancelled"] { color: #FF8A8E; background: rgba(229, 72, 77, .15); text-decoration: line-through; }
.mb-flap[data-state="arrived"] { color: #8C9BB4; }
.mb-seats { display: flex; align-items: center; gap: .5rem; min-width: 130px; }
.mb-seats .mb-seat-bar { flex: 1; height: 6px; border-radius: 6px; background: #1A2A44; overflow: hidden; }
.mb-seats .mb-seat-bar span { display: block; height: 100%; border-radius: 6px; background: var(--mb-amber); }
.mb-seats small { font-family: var(--mb-font-board); color: #CFE0FF; font-size: .72rem; white-space: nowrap; }
.mb-board-empty { padding: 2.5rem 1rem; text-align: center; font-family: var(--mb-font-board); color: #6F84A6; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; }

/* Route line: origin ●━━●━━● destination */
.mb-route { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.mb-route-end { font-weight: 700; white-space: nowrap; font-size: .84rem; }
.mb-route-line { position: relative; flex: 1; min-width: 70px; height: 12px; display: flex; align-items: center; justify-content: space-between; }
.mb-route-line::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; margin-top: -1px; background: linear-gradient(90deg, var(--mb-amber), #5B7091); }
.mb-route-line i { position: relative; width: 6px; height: 6px; border-radius: 50%; background: #5B7091; }
.mb-route-line i:first-child, .mb-route-line i:last-child { width: 10px; height: 10px; background: var(--mb-navy-900); border: 2px solid var(--mb-amber); }
.mb-route-line i:last-child { border-color: #CFE0FF; }
.mb-route-via { font-size: .7rem; color: #6F84A6; margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
/* route line on light cards */
.card .mb-route-line i:first-child, .card .mb-route-line i:last-child { background: var(--mb-surface); }
.card .mb-route-via { color: var(--mb-muted); }

/* Rank list (top routes etc.) */
.mb-rank { list-style: none; margin: 0; padding: 0; }
.mb-rank li { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.25rem; border-top: 1px solid var(--mb-line); }
.mb-rank li:first-child { border-top: 0; }
.mb-rank .mb-rank-no { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mb-font-board); font-weight: 700; font-size: .8rem; background: var(--mb-surface-2); color: var(--mb-muted); }
.mb-rank li:first-child .mb-rank-no { background: var(--mb-amber); color: var(--mb-navy-900); }
.mb-rank .mb-rank-bar { height: 4px; border-radius: 4px; background: var(--mb-surface-2); margin-top: .35rem; overflow: hidden; }
.mb-rank .mb-rank-bar span { display: block; height: 100%; background: var(--mb-amber); border-radius: 4px; }
.mb-amount { font-family: var(--mb-font-board); font-weight: 700; white-space: nowrap; }

.mb-num { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mb-font-board); font-weight: 700; font-size: .78rem; background: var(--mb-surface-2); color: var(--mb-muted); }
.mb-num.is-first { background: var(--mb-amber); color: var(--mb-navy-900); }

/* Small stat tiles inside CRUD pages */
.mb-tile { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; background: var(--mb-surface); border: 1px solid var(--mb-line); border-radius: var(--mb-radius); box-shadow: var(--mb-shadow); margin-bottom: 1.25rem; position: relative; overflow: hidden; }
.mb-tile::after { content: ""; position: absolute; right: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px 0 0 3px; background: var(--mb-tile-color, var(--mb-amber)); }
.mb-tile-icon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.mb-tile-label { font-size: .72rem; color: var(--mb-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.mb-tile-value { font-family: var(--mb-font-board); font-weight: 700; font-size: 1.15rem; margin-top: .1rem; }

/* Toolbar above tables */
.mb-toolbar { padding: 1rem 1.25rem; border-bottom: 1px solid var(--mb-line); }
.mb-empty { padding: 3.5rem 1rem; text-align: center; color: var(--mb-muted); }
.mb-empty-icon { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto .9rem; display: flex; align-items: center; justify-content: center; font-size: 30px; background: var(--mb-surface-2); color: var(--mb-muted); }

/* Compliance alerts */
.mb-alert-item { display: flex; gap: .75rem; padding: .85rem 1.25rem; border-top: 1px solid var(--mb-line); }
.mb-alert-item:first-child { border-top: 0; }
.mb-alert-item .mb-alert-icon { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; }

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.mb-auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--mb-bg); }
.mb-auth-visual {
    position: relative; overflow: hidden; color: #fff; padding: 2.5rem 3rem; display: flex; flex-direction: column; justify-content: space-between;
    background:
        radial-gradient(70% 60% at 85% 10%, rgba(245, 165, 36, .25), transparent 60%),
        radial-gradient(60% 50% at 0% 100%, rgba(47, 128, 237, .18), transparent 60%),
        linear-gradient(160deg, var(--mb-navy-800), var(--mb-navy-950));
}
.mb-auth-visual h2 { color: #fff; font-size: 2.4rem; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; max-width: 520px; }
.mb-auth-visual h2 span { color: var(--mb-amber); }
.mb-auth-visual p { color: var(--mb-navy-200); max-width: 460px; font-size: 1rem; }
.mb-auth-scene { position: relative; height: 210px; margin: 0 -3rem; }
.mb-auth-scene .mb-road { position: absolute; left: 0; right: 0; bottom: 30px; height: 56px; background: #0A1424; border-top: 2px solid #1D3050; border-bottom: 2px solid #1D3050; }
.mb-auth-scene .mb-road::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: repeating-linear-gradient(90deg, var(--mb-amber) 0 40px, transparent 40px 80px); animation: mb-road 1.6s linear infinite; }
.mb-auth-scene .mb-bus { position: absolute; bottom: 52px; left: 50%; width: 230px; margin-left: -115px; animation: mb-bob 1s ease-in-out infinite; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .45)); }
.mb-auth-stops { display: flex; justify-content: space-between; position: relative; margin-top: 1.25rem; }
.mb-auth-stops::before { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 2px; background: repeating-linear-gradient(90deg, rgba(183, 195, 214, .4) 0 8px, transparent 8px 14px); }
.mb-auth-stops div { position: relative; text-align: center; font-family: var(--mb-font-board); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mb-navy-200); }
.mb-auth-stops div::before { content: ""; display: block; width: 14px; height: 14px; margin: 0 auto .45rem; border-radius: 50%; background: var(--mb-navy-800); border: 2px solid var(--mb-navy-400); }
.mb-auth-stops div:first-child::before, .mb-auth-stops div:last-child::before { border-color: var(--mb-amber); background: var(--mb-amber); }
.mb-auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.mb-auth-card { width: 100%; max-width: 420px; }
.mb-auth-card h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .35rem; }
.mb-auth-card .form-control { height: 48px; }
.mb-auth-card .btn { height: 48px; }
.mb-input-icon { position: relative; }
.mb-input-icon iconify-icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--mb-muted); }
.mb-input-icon .form-control { padding-left: 2.7rem; }
@media (max-width: 991.98px) {
    .mb-auth { grid-template-columns: 1fr; }
    .mb-auth-visual { padding: 1.75rem; min-height: 0; }
    .mb-auth-visual h2 { font-size: 1.7rem; }
    .mb-auth-scene, .mb-auth-visual p { display: none; }
}

/* Print: hide chrome */
@media print {
    .mb-sidebar, .mb-topbar, .mb-footer, .mb-page-actions, .mb-toolbar form { display: none !important; }
    .page-content { margin: 0 !important; padding: 0 !important; }
    .card { box-shadow: none; }
}

/* --------------------------------------------------------------------------
   Ticketing: point of sale, seat plan, tickets
   -------------------------------------------------------------------------- */
.mb-pos { display: grid; grid-template-columns: minmax(280px, 340px) minmax(300px, 1fr) minmax(320px, 400px); gap: 1.25rem; align-items: start; }
@media (max-width: 1399.98px) { .mb-pos { grid-template-columns: minmax(280px, 330px) 1fr; } .mb-pos-summary { grid-column: 1 / -1; } }
@media (max-width: 991.98px) { .mb-pos { grid-template-columns: 1fr; } }
.mb-pos .card { margin-bottom: 0; }
.mb-step { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--mb-navy-800); color: var(--mb-amber); font-family: var(--mb-font-board); font-weight: 700; font-size: .8rem; margin-right: .5rem; }
[data-bs-theme="dark"] .mb-step { background: var(--mb-amber); color: var(--mb-navy-900); }

/* date chips */
.mb-dates { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.mb-date {
    flex: 0 0 auto; min-width: 58px; padding: .45rem .5rem; border-radius: 12px; border: 1px solid var(--mb-line);
    background: var(--mb-surface); text-align: center; cursor: pointer; line-height: 1.1; transition: all .15s;
}
.mb-date small { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mb-muted); }
.mb-date strong { font-family: var(--mb-font-board); font-size: 1.05rem; }
.mb-date:hover { border-color: var(--mb-amber); }
.mb-date.active { background: var(--mb-navy-800); border-color: var(--mb-navy-800); color: #fff; }
.mb-date.active small { color: var(--mb-amber); }
.mb-date[disabled] { opacity: .35; pointer-events: none; }

/* trip cards */
.mb-trips { display: flex; flex-direction: column; gap: .6rem; max-height: 62vh; overflow-y: auto; padding: .1rem .15rem .25rem; }
.mb-trip {
    position: relative; text-align: left; width: 100%; border: 1px solid var(--mb-line); background: var(--mb-surface);
    border-radius: 14px; padding: .8rem .9rem; cursor: pointer; transition: all .15s; color: var(--mb-text);
}
.mb-trip:hover { border-color: var(--mb-amber); transform: translateY(-1px); box-shadow: var(--mb-shadow); }
.mb-trip.active { border-color: var(--mb-amber); box-shadow: 0 0 0 3px rgba(245, 165, 36, .22); }
.mb-trip.active::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--mb-amber); }
.mb-trip-time { font-family: var(--mb-font-board); font-size: 1.25rem; font-weight: 700; }
.mb-trip-arr { font-family: var(--mb-font-board); font-size: .72rem; color: var(--mb-muted); }
.mb-trip-fare { font-family: var(--mb-font-board); font-weight: 700; color: var(--bs-primary-text-emphasis); }
.mb-trip-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; font-size: .74rem; color: var(--mb-muted); }
.mb-plate-sm { font-family: var(--mb-font-board); font-size: .66rem; font-weight: 700; color: #111; background: #FFD24A; border: 1.5px solid #111; border-radius: 4px; padding: 0 .3rem; }
.mb-seats-left { font-weight: 700; }
.mb-seats-left.low { color: var(--mb-red); }
.mb-trip.is-full { opacity: .55; cursor: not-allowed; }

/* the coach seat plan */
.mb-coach {
    position: relative; margin: 0 auto; width: max-content; max-width: 100%;
    padding: 1.1rem 1rem 1.25rem; border-radius: 44px 44px 18px 18px;
    background: var(--mb-surface-2); border: 2px solid var(--mb-line);
    box-shadow: inset 0 0 0 6px var(--mb-surface);
}
.mb-coach-front { display: flex; align-items: center; justify-content: space-between; padding: 0 .35rem .9rem; margin-bottom: .9rem; border-bottom: 2px dashed var(--mb-line); }
.mb-coach-front .mb-wheel { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--mb-navy-800); color: var(--mb-amber); font-size: 22px; }
.mb-coach-front .mb-door { font-family: var(--mb-font-board); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mb-muted); padding: .35rem .5rem; border: 1px dashed var(--mb-line); border-radius: 6px; }
.mb-coach-rows { display: flex; flex-direction: column; gap: .45rem; }
.mb-coach-row { display: flex; align-items: center; gap: .45rem; }
.mb-coach-row .mb-row-no { width: 18px; font-family: var(--mb-font-board); font-size: .62rem; color: var(--mb-muted); text-align: center; }
.mb-aisle { width: 26px; }
.mb-seat {
    position: relative; width: 46px; height: 46px; border-radius: 10px 10px 8px 8px; border: 1.5px solid var(--mb-line);
    background: var(--mb-surface); color: var(--mb-text); font-family: var(--mb-font-board); font-size: .72rem; font-weight: 700;
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; cursor: pointer; transition: transform .1s, background .15s, border-color .15s;
}
.mb-seat::before { content: ""; position: absolute; left: 7px; right: 7px; top: 5px; height: 8px; border-radius: 4px; background: var(--mb-line); }
.mb-seat:hover { border-color: var(--mb-amber); transform: translateY(-1px); }
.mb-seat.is-taken { cursor: not-allowed; color: var(--mb-muted); background: repeating-linear-gradient(135deg, var(--mb-surface-2) 0 6px, transparent 6px 12px); border-style: dashed; }
.mb-seat.is-taken::before { background: transparent; }
.mb-seat.is-taken::after { content: "✕"; position: absolute; top: 4px; font-size: .8rem; color: var(--mb-muted); }
.mb-seat.is-taken:hover { transform: none; border-color: var(--mb-line); }
.mb-seat.is-selected { background: var(--mb-amber); border-color: var(--mb-amber-600); color: var(--mb-navy-900); box-shadow: 0 6px 14px -6px rgba(245, 165, 36, .9); }
.mb-seat.is-selected::before { background: rgba(15, 27, 45, .25); }
.mb-seat.is-vip { width: 54px; }
.mb-seat.is-current { border-color: var(--mb-blue); background: rgba(47, 128, 237, .12); color: var(--mb-blue); }
.mb-seat.is-current::before { background: rgba(47, 128, 237, .35); }
.mb-legend i.cur { border-color: var(--mb-blue); background: rgba(47, 128, 237, .12); }
.mb-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; font-size: .74rem; color: var(--mb-muted); margin-top: 1rem; }
.mb-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.mb-legend i { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--mb-line); background: var(--mb-surface); }
.mb-legend i.sel { background: var(--mb-amber); border-color: var(--mb-amber-600); }
.mb-legend i.taken { border-style: dashed; background: repeating-linear-gradient(135deg, var(--mb-surface-2) 0 3px, transparent 3px 6px); }
.mb-placeholder { padding: 3rem 1rem; text-align: center; color: var(--mb-muted); }
.mb-placeholder .mb-empty-icon { margin-bottom: 1rem; }

/* summary column */
.mb-pos-summary { position: sticky; top: calc(var(--mb-topbar-h) + 1rem); }
@media (max-width: 1399.98px) { .mb-pos-summary { position: static; } }
.mb-trip-banner { background: var(--mb-navy-800); color: #fff; border-radius: 14px; padding: .9rem 1rem; }
.mb-trip-banner .mb-route-end { color: #fff; }
.mb-trip-banner .mb-route-via { color: var(--mb-navy-200); }
.mb-passenger { border: 1px solid var(--mb-line); border-radius: 14px; padding: .85rem; background: var(--mb-surface-2); margin-bottom: .75rem; }
.mb-passenger-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.mb-seat-tag { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--mb-font-board); font-weight: 700; font-size: .78rem; background: var(--mb-amber); color: var(--mb-navy-900); padding: .2rem .55rem; border-radius: 7px; }
.mb-passenger .form-control, .mb-passenger .form-select { padding: .42rem .65rem; font-size: .82rem; }
.mb-passenger .form-label { font-size: .7rem; margin-bottom: .2rem; color: var(--mb-muted); }
.mb-segment { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--mb-surface-2); border: 1px solid var(--mb-line); }
.mb-segment input { display: none; }
.mb-segment label { padding: .32rem .7rem; border-radius: 8px; font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--mb-muted); }
.mb-segment input:checked + label { background: var(--mb-surface); color: var(--mb-text); box-shadow: var(--mb-shadow); }
.mb-pay { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .45rem; }
.mb-pay input { display: none; }
.mb-pay label {
    display: flex; align-items: center; gap: .45rem; padding: .5rem .6rem; border-radius: 10px; border: 1.5px solid var(--mb-line);
    background: var(--mb-surface); cursor: pointer; font-size: .76rem; font-weight: 600; transition: all .15s;
}
.mb-pay label i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.mb-pay input:checked + label { border-color: var(--mb-amber); background: rgba(245, 165, 36, .1); }
.mb-total { display: flex; align-items: baseline; justify-content: space-between; padding: .9rem 0 0; margin-top: .9rem; border-top: 2px dashed var(--mb-line); }
.mb-total strong { font-family: var(--mb-font-board); font-size: 1.5rem; }
.mb-lines { font-size: .8rem; }
.mb-lines div { display: flex; justify-content: space-between; padding: .2rem 0; color: var(--mb-muted); }
.mb-lines div span:last-child { font-family: var(--mb-font-board); color: var(--mb-text); }

/* issued banner */
.mb-issued { border: 1px solid rgba(18, 161, 80, .3); background: linear-gradient(90deg, rgba(18, 161, 80, .1), transparent); border-radius: 16px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.mb-issued code { font-size: .82rem; }

/* booking list */
.mb-ticket-code { font-family: var(--mb-font-board); font-weight: 700; font-size: .8rem; letter-spacing: .02em; color: var(--mb-text); }
.mb-channel { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; color: var(--mb-muted); }
.mb-seat-chip { display: inline-block; min-width: 34px; text-align: center; font-family: var(--mb-font-board); font-weight: 700; font-size: .74rem; padding: .2rem .4rem; border-radius: 6px; border: 1.5px solid var(--mb-line); background: var(--mb-surface-2); }

/* boarding pass (detail drawer + print) */
.mb-pass { border-radius: 18px; overflow: hidden; background: var(--mb-surface); border: 1px solid var(--mb-line); box-shadow: var(--mb-shadow); }
.mb-pass-head { background: var(--mb-navy-800); color: #fff; padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: center; }
.mb-pass-head small { color: var(--mb-amber); font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.mb-pass-cities { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1.1rem 1.2rem .5rem; }
.mb-pass-city small { display: block; font-size: .62rem; color: var(--mb-muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.mb-pass-city strong { font-size: 1.15rem; font-weight: 800; }
.mb-pass-mid { flex: 1; text-align: center; color: var(--mb-amber); }
.mb-pass-mid .mb-route-line { min-width: 0; }
.mb-pass-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem 1rem; padding: .75rem 1.2rem 1rem; }
.mb-pass-grid small { display: block; font-size: .6rem; color: var(--mb-muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.mb-pass-grid strong { font-family: var(--mb-font-board); font-size: .92rem; }
.mb-pass-tear { position: relative; border-top: 2px dashed var(--mb-line); margin: 0 1rem; }
.mb-pass-tear::before, .mb-pass-tear::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bs-body-bg); border: 1px solid var(--mb-line); }
.offcanvas .mb-pass-tear::before, .offcanvas .mb-pass-tear::after { background: var(--bs-offcanvas-bg, var(--mb-surface)); }
.mb-pass-tear::before { left: -27px; } .mb-pass-tear::after { right: -27px; }
.mb-pass-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; }
.offcanvas { --bs-offcanvas-bg: var(--mb-bg); --bs-offcanvas-width: 460px; }
.offcanvas-header { border-bottom: 1px solid var(--mb-line); }

/* language switch in the topbar */
.mb-lang { display: inline-flex; align-items: center; padding: 2px; border-radius: 10px; border: 1px solid var(--mb-line); }
.mb-lang form { margin: 0; }
.mb-lang button { border: 0; background: transparent; color: var(--mb-muted); font-size: .72rem; font-weight: 700; padding: .28rem .5rem; border-radius: 8px; line-height: 1; }
.mb-lang button.is-on { background: var(--mb-amber); color: var(--mb-navy-900); }
