/* ============================================================================
   SAGOR CORPORATE PORTAL — Sagor Aura theme, corporate edition
   One stylesheet for every page under /b2b/. Light and dark.

   Palette   Navy #0A2540 · Blue #0066FF · Teal #00D4AA · Violet #635BFF · Gold #F5A623
   Type      Outfit (headings) · Inter (text)
   Accent    Teal — the Corporate colour across Sagor
   ============================================================================ */

:root {
    --bz-navy: #0a2540;
    --bz-navy-2: #0d3b66;
    --bz-blue: #0066ff;
    --bz-teal: #00d4aa;
    --bz-teal-ink: #007a63;
    --bz-violet: #635bff;
    --bz-gold: #f5a623;

    --bz-bg: #f4f7fb;
    --bz-surface: #ffffff;
    --bz-surface-2: #f8fafc;
    --bz-ink: #0a2540;
    --bz-text: #425466;
    --bz-muted: #66788f;
    --bz-border: #e1e7ef;
    --bz-ring: rgba(0, 102, 255, .22);

    --bz-ok: #047857;      --bz-ok-bg: #d9f7ea;
    --bz-warn: #a15c07;    --bz-warn-bg: #fdf0d2;
    --bz-bad: #b91c1c;     --bz-bad-bg: #fde4e4;
    --bz-info: #1d4ed8;    --bz-info-bg: #dde9ff;
    --bz-idle: #475569;    --bz-idle-bg: #e7ecf2;
    --bz-live: #5b21b6;    --bz-live-bg: #ebe5ff;

    --bz-grad: linear-gradient(135deg, #0066ff 0%, #635bff 100%);
    --bz-grad-hero: linear-gradient(135deg, #0a2540 0%, #0d3b66 52%, #0f4c81 100%);
    --bz-shadow: 0 2px 10px rgba(10, 37, 64, .05);
    --bz-shadow-lg: 0 18px 48px rgba(10, 37, 64, .14);
    --bz-radius: 18px;
    --bz-side: 268px;
    --bz-font-head: 'Outfit', 'Inter', system-ui, sans-serif;
    --bz-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
[data-theme="dark"] {
    --bz-bg: #08121f;
    --bz-surface: #0f1d31;
    --bz-surface-2: #14253d;
    --bz-ink: #eaf1fb;
    --bz-text: #b9c7da;
    --bz-muted: #8ea2bb;
    --bz-border: #213552;
    --bz-ring: rgba(77, 148, 255, .35);
    --bz-teal-ink: #35e0bf;
    --bz-ok: #4ade80;      --bz-ok-bg: #0c3323;
    --bz-warn: #fbbf24;    --bz-warn-bg: #3a2b0c;
    --bz-bad: #fca5a5;     --bz-bad-bg: #44161a;
    --bz-info: #93c5fd;    --bz-info-bg: #12294f;
    --bz-idle: #cbd5e1;    --bz-idle-bg: #24344b;
    --bz-live: #c4b5fd;    --bz-live-bg: #2a2157;
    --bz-shadow: 0 2px 10px rgba(0, 0, 0, .3);
    --bz-shadow-lg: 0 18px 48px rgba(0, 0, 0, .5);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* components below set display, which would otherwise beat the attribute */
html { -webkit-text-size-adjust: 100%; }
body.bz { margin: 0; font-family: var(--bz-font); font-size: 15px; line-height: 1.55; color: var(--bz-text); background: var(--bz-bg); -webkit-font-smoothing: antialiased; }
.bz h1, .bz h2, .bz h3, .bz h4 { font-family: var(--bz-font-head); color: var(--bz-ink); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.bz a { color: var(--bz-blue); text-decoration: none; }
.bz a:hover { text-decoration: underline; }
[data-theme="dark"] .bz a { color: #7db0ff; }
[data-theme="dark"] .bz .bz-nav a { color: #c8d6e8; }
[data-theme="dark"] .bz .bz-nav a.is-on, [data-theme="dark"] .bz .bz-nav a:hover { color: #fff; }
.bz :focus-visible { outline: 3px solid var(--bz-ring); outline-offset: 2px; border-radius: 6px; }
.bz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bz-num { font-variant-numeric: tabular-nums; }
.bz-muted { color: var(--bz-muted); }
.bz-small { font-size: .84rem; }
.bz-nowrap { white-space: nowrap; }

/* ---------- shell ---------- */
.bz-shell { display: flex; min-height: 100vh; }
.bz-side { width: var(--bz-side); flex-shrink: 0; background: var(--bz-grad-hero); color: #c8d6e8; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 60; overflow-y: auto; }
.bz-side__brand { display: flex; align-items: center; gap: .75rem; padding: 1.35rem 1.25rem .4rem; }
.bz-side__brand img { height: 38px; width: auto; }
.bz-side__tag { margin: 0 1.25rem 1.1rem; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bz-teal); font-weight: 700; }
.bz-side__org { margin: 0 .9rem 1rem; padding: .85rem .95rem; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.bz-side__org b { display: block; color: #fff; font-family: var(--bz-font-head); font-size: .98rem; overflow-wrap: anywhere; }
.bz-side__org span { font-size: .78rem; color: #a9bbd2; }
.bz-nav { padding: 0 .9rem; display: grid; gap: .2rem; }
.bz-nav__label { margin: .9rem .5rem .35rem; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #7f95b3; font-weight: 700; }
.bz-nav a { display: flex; align-items: center; gap: .8rem; min-height: 44px; padding: .55rem .8rem; border-radius: 12px; color: #c8d6e8; font-weight: 600; font-size: .92rem; text-decoration: none; }
.bz-nav a i { width: 20px; text-align: center; font-size: .95rem; color: #8fa6c4; }
.bz-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.bz-nav a.is-on { background: rgba(0, 212, 170, .16); color: #fff; box-shadow: inset 3px 0 0 var(--bz-teal); }
.bz-nav a.is-on i { color: var(--bz-teal); }
.bz-nav .count { margin-inline-start: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--bz-gold); color: var(--bz-navy); font-size: .72rem; font-weight: 800; text-align: center; }
.bz-side__foot { margin-top: auto; padding: 1rem .9rem 1.2rem; display: grid; gap: .2rem; border-top: 1px solid rgba(255, 255, 255, .08); }

.bz-main { flex: 1; min-width: 0; margin-inline-start: var(--bz-side); display: flex; flex-direction: column; }
.bz-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1rem; padding: .85rem clamp(1rem, 3vw, 2.2rem); background: color-mix(in srgb, var(--bz-bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bz-border); }
.bz-top__title { min-width: 0; margin-inline-end: auto; }
.bz-top__title h1 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-top__title p { margin: .1rem 0 0; font-size: .84rem; color: var(--bz-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-top__actions { display: flex; align-items: center; gap: .55rem; flex-shrink: 0; }
.bz-burger { display: none; }
.bz-iconbtn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--bz-border); background: var(--bz-surface); color: var(--bz-ink); cursor: pointer; display: grid; place-items: center; font-size: 1rem; }
.bz-iconbtn:hover { border-color: var(--bz-blue); }
.bz-avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--bz-grad); color: #fff !important; display: grid; place-items: center; font-weight: 700; font-family: var(--bz-font-head); text-decoration: none !important; }
.bz-content { padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2.2rem) 4rem; width: 100%; max-width: 1320px; }
.bz-scrim { display: none; }

/* ---------- cards & grids ---------- */
.bz-card { background: var(--bz-surface); border: 1px solid var(--bz-border); border-radius: var(--bz-radius); box-shadow: var(--bz-shadow); margin-bottom: 1.25rem; }
.bz-card__head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: 1.05rem 1.3rem; border-bottom: 1px solid var(--bz-border); }
.bz-card__head h2 { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: .6rem; }
.bz-card__head h2 i { color: var(--bz-teal-ink); font-size: .95rem; }
.bz-card__body { padding: 1.3rem; }
.bz-card__body--flush { padding: 0; }
.bz-card--accent { border-top: 4px solid var(--bz-teal); }
.bz-card--warn { border-top: 4px solid var(--bz-gold); }
.bz-grid { display: grid; gap: 1.1rem; }
.bz-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bz-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bz-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bz-grid--side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.bz-stack > * + * { margin-top: 1rem; }
.bz-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.bz-row--end { justify-content: flex-end; }
.bz-spacer { margin-inline-start: auto; }

/* ---------- KPI tiles ---------- */
.bz-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.bz-kpi { background: var(--bz-surface); border: 1px solid var(--bz-border); border-radius: var(--bz-radius); padding: 1.1rem 1.15rem; display: flex; gap: .9rem; align-items: center; box-shadow: var(--bz-shadow); min-width: 0; }
.bz-kpi__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; background: var(--bz-info-bg); color: var(--bz-info); }
.bz-kpi--teal .bz-kpi__icon { background: var(--bz-ok-bg); color: var(--bz-ok); }
.bz-kpi--gold .bz-kpi__icon { background: var(--bz-warn-bg); color: var(--bz-warn); }
.bz-kpi--violet .bz-kpi__icon { background: var(--bz-live-bg); color: var(--bz-live); }
.bz-kpi--red .bz-kpi__icon { background: var(--bz-bad-bg); color: var(--bz-bad); }
.bz-kpi b { display: block; font-family: var(--bz-font-head); font-size: 1.6rem; line-height: 1.1; color: var(--bz-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bz-kpi span { font-size: .8rem; color: var(--bz-muted); font-weight: 500; }

/* ---------- buttons ---------- */
.bz-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: 12px; border: 1.5px solid transparent; font: 600 .92rem var(--bz-font); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease; }
.bz-btn:hover { transform: translateY(-1px); }
.bz-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.bz-btn--primary { background: var(--bz-grad); color: #fff !important; box-shadow: 0 8px 20px rgba(0, 102, 255, .28); }
.bz-btn--teal { background: var(--bz-teal); color: var(--bz-navy) !important; box-shadow: 0 8px 20px rgba(0, 212, 170, .25); }
.bz-btn--ghost { background: var(--bz-surface); border-color: var(--bz-border); color: var(--bz-ink) !important; }
.bz-btn--ghost:hover { border-color: var(--bz-blue); }
.bz-btn--danger { background: var(--bz-surface); border-color: #f3b4b4; color: var(--bz-bad) !important; }
.bz-btn--danger:hover { background: var(--bz-bad-bg); }
.bz-btn--sm { min-height: 36px; padding: .35rem .8rem; font-size: .84rem; border-radius: 10px; }
.bz-btn--block { width: 100%; }

/* ---------- forms ---------- */
.bz-field { display: grid; gap: .35rem; min-width: 0; }
.bz-label { font-size: .8rem; font-weight: 600; color: var(--bz-ink); }
.bz-label .req { color: var(--bz-bad); }
.bz-input, .bz-select, .bz-textarea { width: 100%; min-height: 44px; padding: .55rem .8rem; border-radius: 12px; border: 1.5px solid var(--bz-border); background: var(--bz-surface); color: var(--bz-ink); font: 500 .94rem var(--bz-font); }
.bz-textarea { min-height: 92px; resize: vertical; }
.bz-input:focus, .bz-select:focus, .bz-textarea:focus { outline: none; border-color: var(--bz-blue); box-shadow: 0 0 0 4px var(--bz-ring); }
.bz-input::placeholder, .bz-textarea::placeholder { color: #9aa9bc; }
.bz-hint { font-size: .78rem; color: var(--bz-muted); margin: 0; }
.bz-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.bz-span-2 { grid-column: span 2; }
.bz-days { display: flex; flex-wrap: wrap; gap: .35rem; }
.bz-days label { position: relative; cursor: pointer; }
.bz-days input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.bz-days span { display: grid; place-items: center; min-width: 44px; height: 40px; padding: 0 .5rem; border-radius: 10px; border: 1.5px solid var(--bz-border); background: var(--bz-surface); color: var(--bz-muted); font-size: .8rem; font-weight: 700; }
.bz-days input:checked + span { background: var(--bz-navy); border-color: var(--bz-navy); color: #fff; }
[data-theme="dark"] .bz-days input:checked + span { background: var(--bz-teal); border-color: var(--bz-teal); color: var(--bz-navy); }
.bz-days input:focus-visible + span { outline: 3px solid var(--bz-ring); outline-offset: 2px; }

/* ---------- trip editor ---------- */
.bz-trip { border: 1.5px solid var(--bz-border); border-radius: 16px; padding: 1rem 1.1rem 1.1rem; background: var(--bz-surface-2); }
.bz-trip + .bz-trip { margin-top: .9rem; }
.bz-trip__head { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.bz-trip__n { width: 30px; height: 30px; border-radius: 10px; background: var(--bz-navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
[data-theme="dark"] .bz-trip__n { background: var(--bz-teal); color: var(--bz-navy); }
.bz-trip__head b { color: var(--bz-ink); font-family: var(--bz-font-head); }
.bz-trip__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .8rem; }
.bz-c2 { grid-column: span 2; } .bz-c3 { grid-column: span 3; } .bz-c4 { grid-column: span 4; } .bz-c5 { grid-column: span 5; } .bz-c6 { grid-column: span 6; } .bz-c12 { grid-column: span 12; }

/* ---------- tables ---------- */
/* position: relative makes the wrapper the containing block for the visually-hidden
   labels inside cells, so they scroll with the table instead of widening the page */
.bz-table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bz-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.bz-table th { text-align: start; padding: .75rem 1rem; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--bz-muted); font-weight: 700; background: var(--bz-surface-2); border-bottom: 1px solid var(--bz-border); white-space: nowrap; }
.bz-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--bz-border); vertical-align: middle; color: var(--bz-text); }
.bz-table tbody tr:last-child td { border-bottom: 0; }
.bz-table tbody tr:hover td { background: color-mix(in srgb, var(--bz-blue) 4%, transparent); }
.bz-table .t-main { color: var(--bz-ink); font-weight: 600; }
.bz-table .t-sub { display: block; font-size: .8rem; color: var(--bz-muted); font-weight: 400; }
.bz-table .t-end { text-align: end; }
.bz-table tfoot td { font-weight: 700; color: var(--bz-ink); background: var(--bz-surface-2); }
.bz-ref { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .84rem; font-weight: 600; color: var(--bz-ink); white-space: nowrap; }

/* ---------- badges ---------- */
.bz-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; background: var(--bz-idle-bg); color: var(--bz-idle); }
.bz-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bz-badge--info { background: var(--bz-info-bg); color: var(--bz-info); }
.bz-badge--warn { background: var(--bz-warn-bg); color: var(--bz-warn); }
.bz-badge--ok { background: var(--bz-ok-bg); color: var(--bz-ok); }
.bz-badge--live { background: var(--bz-live-bg); color: var(--bz-live); }
.bz-badge--bad { background: var(--bz-bad-bg); color: var(--bz-bad); }
.bz-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 8px; background: var(--bz-surface-2); border: 1px solid var(--bz-border); font-size: .78rem; font-weight: 600; color: var(--bz-text); }

/* ---------- alerts ---------- */
.bz-alert { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 14px; font-size: .92rem; margin-bottom: 1.1rem; background: var(--bz-info-bg); color: var(--bz-info); border: 1px solid color-mix(in srgb, var(--bz-info) 25%, transparent); }
.bz-alert i { margin-top: .2rem; }
.bz-alert--ok { background: var(--bz-ok-bg); color: var(--bz-ok); border-color: color-mix(in srgb, var(--bz-ok) 25%, transparent); }
.bz-alert--warn { background: var(--bz-warn-bg); color: var(--bz-warn); border-color: color-mix(in srgb, var(--bz-warn) 30%, transparent); }
.bz-alert--bad { background: var(--bz-bad-bg); color: var(--bz-bad); border-color: color-mix(in srgb, var(--bz-bad) 25%, transparent); }
.bz-alert ul { margin: .3rem 0 0; padding-inline-start: 1.1rem; }
.bz-alert a { color: inherit !important; font-weight: 700; text-decoration: underline; }

/* ---------- workflow stepper ---------- */
.bz-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.bz-steps li { position: relative; text-align: center; padding-top: 42px; font-size: .78rem; font-weight: 600; color: var(--bz-muted); counter-increment: step; }
.bz-steps li::before { content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bz-surface); border: 2px solid var(--bz-border); color: var(--bz-muted); font-weight: 700; z-index: 1; }
.bz-steps li::after { content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--bz-border); }
.bz-steps li:first-child::after { display: none; }
.bz-steps li.is-done { color: var(--bz-ok); }
.bz-steps li.is-done::before { content: '\2713'; background: var(--bz-teal); border-color: var(--bz-teal); color: var(--bz-navy); }
.bz-steps li.is-done::after, .bz-steps li.is-now::after { background: var(--bz-teal); }
.bz-steps li.is-now { color: var(--bz-ink); }
.bz-steps li.is-now::before { background: var(--bz-navy); border-color: var(--bz-navy); color: #fff; box-shadow: 0 0 0 5px var(--bz-ring); }
[data-theme="dark"] .bz-steps li.is-now::before { background: var(--bz-blue); border-color: var(--bz-blue); }

/* ---------- request hero ---------- */
.bz-hero { background: var(--bz-grad-hero); color: #fff; border-radius: 22px; padding: 1.5rem 1.6rem; margin-bottom: 1.25rem; position: relative; overflow: hidden; }
.bz-hero::after { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; top: -160px; background: radial-gradient(circle, rgba(0, 212, 170, .22), transparent 68%); pointer-events: none; }
.bz-hero > * { position: relative; z-index: 1; }
.bz-hero h2 { color: #fff; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 700; }
.bz-hero p { margin: .35rem 0 0; color: #b9cbe2; font-size: .92rem; }
.bz-hero__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1rem; font-size: .88rem; color: #d5e2f3; }
.bz-hero__meta i { color: var(--bz-teal); margin-inline-end: .35rem; }
.bz-hero .bz-btn--ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: #fff !important; }
.bz-price { font-family: var(--bz-font-head); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; color: var(--bz-ink); font-variant-numeric: tabular-nums; line-height: 1; }
.bz-price small { font-size: .9rem; color: var(--bz-muted); font-weight: 500; font-family: var(--bz-font); }

/* ---------- lists ---------- */
.bz-dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: .1rem 1rem; margin: 0; }
.bz-dl dt { color: var(--bz-muted); font-size: .86rem; padding: .5rem 0; border-bottom: 1px dashed var(--bz-border); }
.bz-dl dd { margin: 0; color: var(--bz-ink); font-weight: 600; font-size: .9rem; padding: .5rem 0; border-bottom: 1px dashed var(--bz-border); text-align: end; overflow-wrap: anywhere; }
.bz-timeline { list-style: none; margin: 0; padding: 0; }
.bz-timeline li { position: relative; padding: 0 0 1rem 1.5rem; border-inline-start: 2px solid var(--bz-border); margin-inline-start: .4rem; }
.bz-timeline li:last-child { padding-bottom: 0; border-color: transparent; }
.bz-timeline li::before { content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--bz-teal); border: 2px solid var(--bz-surface); }
.bz-timeline b { display: block; color: var(--bz-ink); font-size: .9rem; }
.bz-timeline span { font-size: .8rem; color: var(--bz-muted); }
.bz-todo { list-style: none; margin: 0; padding: 0; }
.bz-todo li { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.3rem; border-bottom: 1px solid var(--bz-border); }
.bz-todo li:last-child { border-bottom: 0; }
.bz-todo .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--bz-warn-bg); color: var(--bz-warn); flex-shrink: 0; }
.bz-todo .tx { min-width: 0; margin-inline-end: auto; }
.bz-todo .tx b { display: block; color: var(--bz-ink); font-size: .93rem; }
.bz-todo .tx span { font-size: .82rem; color: var(--bz-muted); }
.bz-empty { text-align: center; padding: 2.6rem 1rem; color: var(--bz-muted); }
.bz-empty i { display: block; font-size: 2rem; margin-bottom: .7rem; color: #a9b8cb; }
.bz-empty b { display: block; color: var(--bz-ink); font-family: var(--bz-font-head); font-size: 1.05rem; margin-bottom: .25rem; }
.bz-bar { height: 8px; border-radius: 8px; background: var(--bz-idle-bg); overflow: hidden; min-width: 70px; }
.bz-bar i { display: block; height: 100%; border-radius: 8px; background: var(--bz-teal); }
.bz-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.bz-tabs a { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .4rem .95rem; border-radius: 999px; border: 1.5px solid var(--bz-border); background: var(--bz-surface); color: var(--bz-text) !important; font-weight: 600; font-size: .86rem; text-decoration: none !important; }
.bz-tabs a.is-on { background: var(--bz-navy); border-color: var(--bz-navy); color: #fff !important; }
[data-theme="dark"] .bz-tabs a.is-on { background: var(--bz-blue); border-color: var(--bz-blue); }
.bz-tabs a b { font-size: .74rem; padding: 0 .4rem; border-radius: 999px; background: rgba(127, 149, 179, .22); }

/* ---------- sign-in / register ---------- */
.bz-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 520px); background: var(--bz-grad-hero); }
.bz-auth__pitch { color: #fff; padding: clamp(1.5rem, 5vw, 4.5rem); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.bz-auth__pitch::after { content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%; left: -200px; bottom: -260px; background: radial-gradient(circle, rgba(0, 212, 170, .2), transparent 68%); }
.bz-auth__pitch > * { position: relative; z-index: 1; }
.bz-auth__pitch img { height: 46px; width: auto; align-self: flex-start; }
.bz-auth__eyebrow { margin-top: 2rem; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bz-teal); font-weight: 700; }
.bz-auth__pitch h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 700; margin: .6rem 0 .9rem; max-width: 15ch; }
.bz-auth__pitch p { color: #c3d3e8; max-width: 34rem; margin: 0; }
.bz-auth__flow { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .7rem; max-width: 30rem; }
.bz-auth__flow li { display: flex; gap: .9rem; align-items: center; padding: .8rem 1rem; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.bz-auth__flow i { width: 38px; height: 38px; border-radius: 12px; background: var(--bz-teal); color: var(--bz-navy); display: grid; place-items: center; flex-shrink: 0; }
.bz-auth__flow b { display: block; color: #fff; font-size: .95rem; }
.bz-auth__flow span { font-size: .82rem; color: #b5c7de; }
.bz-auth__panel { background: var(--bz-surface); padding: clamp(1.5rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.bz-auth__panel h2 { font-size: 1.6rem; font-weight: 700; }
.bz-auth__panel .lead { margin: .4rem 0 1.5rem; color: var(--bz-muted); }
.bz-auth__panel form { display: grid; gap: 1rem; }
.bz-auth__alt { margin-top: 1.4rem; display: grid; gap: .5rem; font-size: .9rem; color: var(--bz-muted); }
.bz-roles { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.bz-roles label { position: relative; cursor: pointer; }
.bz-roles input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.bz-roles span { display: block; padding: .9rem; border-radius: 14px; border: 1.5px solid var(--bz-border); text-align: center; color: var(--bz-text); font-size: .84rem; }
.bz-roles span i { display: block; font-size: 1.3rem; margin-bottom: .4rem; color: var(--bz-muted); }
.bz-roles span b { display: block; color: var(--bz-ink); font-size: .95rem; }
.bz-roles input:checked + span { border-color: var(--bz-teal); background: color-mix(in srgb, var(--bz-teal) 10%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bz-teal) 22%, transparent); }
.bz-roles input:checked + span i { color: var(--bz-teal-ink); }
.bz-roles input:focus-visible + span { outline: 3px solid var(--bz-ring); outline-offset: 2px; }

/* ---------- toast ---------- */
.bz-toast { position: fixed; z-index: 90; inset-inline-end: 18px; top: 18px; max-width: min(420px, calc(100vw - 36px)); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .bz-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bz-grid--side, .bz-grid--3 { grid-template-columns: minmax(0, 1fr); }
    .bz-c2, .bz-c3 { grid-column: span 4; } .bz-c4, .bz-c5 { grid-column: span 6; }
}
@media (max-width: 900px) {
    .bz-side { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--bz-shadow-lg); }
    .bz-shell.is-open .bz-side { transform: none; }
    .bz-shell.is-open .bz-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(4, 14, 28, .55); border: 0; }
    .bz-main { margin-inline-start: 0; }
    .bz-burger { display: grid; }
    .bz-auth { grid-template-columns: minmax(0, 1fr); }
    .bz-auth__pitch { padding-bottom: 1.5rem; }
    .bz-auth__flow { display: none; }
    .bz-auth__panel { border-radius: 26px 26px 0 0; }
}
@media (max-width: 640px) {
    .bz-grid--2, .bz-grid--4 { grid-template-columns: minmax(0, 1fr); }
    .bz-span-2 { grid-column: auto; }
    .bz-trip__grid > * { grid-column: span 12; }
    .bz-trip__grid > .bz-half { grid-column: span 6; }
    .bz-top__actions .bz-btn span { display: none; }
    .bz-steps li { font-size: .68rem; }
    .bz-dl { grid-template-columns: minmax(0, 1fr); }
    .bz-dl dt { border-bottom: 0; padding-bottom: 0; }
    .bz-dl dd { text-align: start; padding-top: .1rem; }
    .bz-card__body { padding: 1rem; }
    .bz-card__head { padding: .9rem 1rem; }
}
@media (prefers-reduced-motion: reduce) { .bz *, .bz *::before, .bz *::after { transition: none !important; animation: none !important; } }
@media print {
    .bz-side, .bz-top, .bz-noprint, .bz-toast { display: none !important; }
    .bz-main { margin: 0; }
    .bz-content { padding: 0; max-width: none; }
    .bz-card { box-shadow: none; break-inside: avoid; }
    body.bz { background: #fff; }
}

/* ---- Employees & addresses (employees.php) ---- */
.bz-locs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.bz-loc { border: 1.5px solid var(--bz-border); border-radius: 16px; overflow: hidden; background: var(--bz-surface); display: flex; flex-direction: column; min-width: 0; }
.bz-loc.is-editing { border-color: var(--bz-blue); box-shadow: 0 0 0 4px var(--bz-ring); }
.bz-loc__map { display: block; width: 100%; height: 150px; border: 0; background: var(--bz-surface-2); }
.bz-loc__map--none { display: grid; place-items: center; align-content: center; gap: .4rem; height: 150px; color: var(--bz-muted); font-size: .84rem; text-align: center; padding: 0 1rem; background: var(--bz-surface-2); }
.bz-loc__map--none i { font-size: 1.5rem; opacity: .5; }
.bz-loc__body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.bz-loc__body h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--bz-ink); overflow-wrap: anywhere; }
.bz-loc__body p { margin: 0; font-size: .88rem; color: var(--bz-ink-2, var(--bz-muted)); overflow-wrap: anywhere; }
.bz-loc__count { margin: .2rem 0 .5rem !important; }
.bz-loc__count b { font-family: 'Outfit', sans-serif; font-size: 1.2rem; }
.bz-loc__body .bz-row { margin-top: auto; gap: .45rem; }
.bz-locform { border-top: 1px dashed var(--bz-border); padding-top: 1.2rem; }
.bz-locs + .bz-locform, .bz-empty + .bz-locform { margin-top: 0; }
.bz-locform h3 { margin: 0 0 .9rem; font-size: 1rem; font-weight: 700; color: var(--bz-ink); }
.bz-locform__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.2rem; align-items: stretch; }
.bz-locform__map { border-radius: 14px; overflow: hidden; border: 1.5px solid var(--bz-border); min-height: 240px; display: grid; }
.bz-locform__map iframe { width: 100%; height: 100%; min-height: 240px; border: 0; }
.bz-locform__map .bz-loc__map--none { height: 100%; }
.bz-newloc { border: 1.5px dashed var(--bz-border); border-radius: 14px; padding: 1rem; min-width: 0; margin: 0; }
.bz-newloc legend { float: none; width: auto; padding: 0 .5rem; font-size: .84rem; font-weight: 700; color: var(--bz-ink); margin: 0; }
.bz-newloc .bz-hint { margin-top: .7rem; }
.bz-bulk { margin-top: 1.2rem; border: 1.5px solid var(--bz-border); border-radius: 14px; padding: 0 1rem; }
.bz-bulk summary { cursor: pointer; padding: .9rem 0; font-weight: 700; color: var(--bz-ink); display: flex; align-items: center; gap: .6rem; list-style: none; }
.bz-bulk summary::-webkit-details-marker { display: none; }
.bz-bulk summary::after { content: '+'; margin-inline-start: auto; font-size: 1.2rem; color: var(--bz-muted); }
.bz-bulk[open] summary::after { content: '–'; }
.bz-bulk[open] { padding-bottom: 1rem; }
.bz-stops { display: grid; gap: .8rem; }
.bz-stop { border: 1.5px solid var(--bz-border); border-radius: 14px; padding: .9rem 1rem; }
.bz-stop__head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.bz-stop__head h3 { margin: 0; font-size: .98rem; font-weight: 700; color: var(--bz-ink); }
.bz-stop__head p { margin: .1rem 0 0; font-size: .85rem; color: var(--bz-muted); }
.bz-stop ul { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .3rem .9rem; }
.bz-stop li { font-size: .88rem; display: flex; justify-content: space-between; gap: .6rem; border-bottom: 1px dashed var(--bz-border); padding: .25rem 0; }
@media (max-width: 860px) { .bz-locform__grid { grid-template-columns: minmax(0, 1fr); } .bz-locform__map, .bz-locform__map iframe { min-height: 200px; } }

/* ============================================================================
   Corporate v4 — fleet, run rating, quality reports
   ============================================================================ */
/* percentage with a bar: green from 90, blue from 80, amber from 65, red below */
.bz-meter { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.bz-meter b { font-weight: 700; color: var(--bz-ink); min-width: 2.6em; text-align: end; }
.bz-meter--ok .bz-bar i { background: #10b981; }
.bz-meter--info .bz-bar i { background: #3b82f6; }
.bz-meter--warn .bz-bar i { background: #f59e0b; }
.bz-meter--bad .bz-bar i { background: #ef4444; }
.bz-bad { color: var(--bz-bad) !important; }
.bz-scorelist { display: grid; gap: .55rem; margin: 1rem 0 1.1rem; }
.bz-scorelist > div { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.bz-scorelist dt { font-size: .86rem; color: var(--bz-text); }
.bz-scorelist dd { margin: 0; }

/* tick lists: vehicles and drivers for a contract */
.bz-picklist { display: grid; gap: .45rem; max-height: 340px; overflow-y: auto; }
.bz-picklist label { display: flex; gap: .65rem; align-items: flex-start; padding: .55rem .7rem; border: 1.5px solid var(--bz-border); border-radius: 12px; cursor: pointer; background: var(--bz-surface); }
.bz-picklist label:has(input:checked) { border-color: var(--bz-teal); background: color-mix(in srgb, var(--bz-teal) 9%, var(--bz-surface)); }
.bz-picklist input { width: 18px; height: 18px; margin-top: .15rem; flex: none; accent-color: var(--bz-teal-ink); }
.bz-picklist span { display: grid; min-width: 0; }
.bz-picklist b { color: var(--bz-ink); font-size: .92rem; overflow-wrap: anywhere; }
.bz-picklist small { color: var(--bz-muted); font-size: .8rem; }

/* recording a run: one line of controls */
/* two short lines (result, vehicle, driver / late, note, Save) so the whole row fits a laptop screen */
.bz-runform { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; width: 446px; max-width: 100%; }
.bz-runform .bz-select { padding-inline: .6rem .2rem; }
.bz-runform .bz-input, .bz-runform .bz-select { min-height: 38px; flex: none; }
.bz-runform input[name="notes"] { flex: 1 1 150px; min-width: 120px; }
.bz-runform [hidden] { display: none; }

/* rating a run */
.bz-ratecell { min-width: 132px; }
.bz-ratecell .bz-btn { margin-top: .3rem; }
.bz-marks { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.bz-mark { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.bz-mark--good { background: var(--bz-ok-bg); color: var(--bz-ok); }
.bz-mark--bad { background: var(--bz-bad-bg); color: var(--bz-bad); }
.bz-raterow { display: none; }
.bz-raterow.is-open { display: table-row; }
.bz-raterow > td { background: var(--bz-surface-2); padding: 1rem 1.1rem !important; }
.bz-rate { display: grid; gap: .9rem; max-width: 1100px; }
.bz-rate__title { margin: 0; font-size: .9rem; color: var(--bz-text); }
.bz-rate__title b { color: var(--bz-ink); }
.bz-rate__group { border: 0; padding: 0; margin: 0; min-width: 0; }
.bz-rate__group legend { float: none; width: auto; padding: 0; margin: 0 0 .5rem; font-size: .82rem; font-weight: 700; display: flex; gap: .45rem; align-items: center; }
.bz-rate__group--good legend { color: var(--bz-ok); }
.bz-rate__group--bad legend { color: var(--bz-bad); }
.bz-rate__chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.bz-rate__chips label { position: relative; cursor: pointer; }
.bz-rate__chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.bz-rate__chips span { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: .3rem .8rem; border-radius: 999px; border: 1.5px solid var(--bz-border); background: var(--bz-surface); color: var(--bz-text); font-size: .84rem; font-weight: 600; }
.bz-rate__chips span i { opacity: .7; }
.bz-rate__group--good input:checked + span { background: var(--bz-ok-bg); border-color: var(--bz-ok); color: var(--bz-ok); }
.bz-rate__group--bad input:checked + span { background: var(--bz-bad-bg); border-color: var(--bz-bad); color: var(--bz-bad); }
.bz-rate__chips input:focus-visible + span { outline: 3px solid var(--bz-ring); outline-offset: 2px; }

/* the score: one large figure and the three parts it is made of */
.bz-score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.6rem; align-items: center; }
.bz-score__dial { --pct: 0; --tone: #10b981; width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--tone) calc(var(--pct) * 1%), var(--bz-idle-bg) 0); position: relative; flex: none; }
.bz-score__dial::before { content: ''; position: absolute; inset: 13px; border-radius: 50%; background: var(--bz-surface); }
.bz-score__dial > div { position: relative; text-align: center; }
.bz-score__dial b { display: block; font: 700 2.2rem/1 var(--bz-font-head); color: var(--bz-ink); }
.bz-score__dial span { font-size: .78rem; font-weight: 600; color: var(--bz-muted); }
.bz-score__dial--info { --tone: #3b82f6; } .bz-score__dial--warn { --tone: #f59e0b; } .bz-score__dial--bad { --tone: #ef4444; } .bz-score__dial--none { --tone: var(--bz-idle-bg); }
.bz-score__parts { display: grid; gap: .8rem; min-width: 0; }
.bz-score__part { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; align-items: center; }
.bz-score__part dt { font-weight: 600; color: var(--bz-ink); font-size: .92rem; }
.bz-score__part dt small { display: block; font-weight: 500; color: var(--bz-muted); font-size: .78rem; }
.bz-score__part dd { margin: 0; }
.bz-score__part .bz-bar { width: 150px !important; height: 10px; }

/* indicator lists: how often each was ticked */
.bz-inds { display: grid; gap: .5rem; }
.bz-ind { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(90px, 1fr) auto; gap: .8rem; align-items: center; font-size: .88rem; }
.bz-ind__name { display: flex; align-items: center; gap: .5rem; min-width: 0; color: var(--bz-ink); font-weight: 600; }
.bz-ind__name i { width: 1.1rem; text-align: center; opacity: .7; flex: none; }
.bz-ind__name span { overflow-wrap: anywhere; }
.bz-ind .bz-bar { width: auto; min-width: 0; height: 10px; }
.bz-ind--good .bz-bar i { background: #10b981; }
.bz-ind--bad .bz-bar i { background: #ef4444; }
.bz-ind__n { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--bz-text); min-width: 5.5em; text-align: end; }
.bz-ind__n b { color: var(--bz-ink); }
.bz-ind.is-zero { opacity: .55; }

.bz-filterbar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
.bz-filterbar .bz-field { min-width: 150px; }
.bz-filterbar .bz-input, .bz-filterbar .bz-select { min-height: 40px; }

@media (max-width: 640px) {
    .bz-score { grid-template-columns: minmax(0, 1fr); justify-items: center; }
    .bz-score__parts { width: 100%; }
    .bz-score__part .bz-bar { width: 90px !important; }
    .bz-ind { grid-template-columns: minmax(0, 1fr) auto; }
    .bz-ind .bz-bar { grid-column: 1 / -1; grid-row: 2; }
    .bz-rate .bz-row { flex-wrap: wrap !important; }
}
@media print {
    .bz-raterow { display: none !important; }
    .bz-tabs, .bz-filterbar { display: none !important; }
    .bz-score__dial, .bz-bar i, .bz-mark, .bz-badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
