/* ==========================================================================
   Station UI — © 2026 Exairetech Limited. All rights reserved.

   PROPRIETARY AND CONFIDENTIAL. Station UI is an original design system
   authored by and owned by Exairetech Limited. It is licensed for use only
   within Exairetech products and products Exairetech builds for its clients.
   No part of this file may be copied, redistributed, published, sublicensed
   or used to produce a derivative design system outside that scope without
   the prior written permission of Exairetech Limited.

   Deployed in:  Prodigy  ·  MediSure360 Insure  ·  City HMS
   Contact:      Exairetech Limited, Nairobi, Kenya
   ========================================================================== */

/* ==========================================================================
   City HMS — Station UI
   --------------------------------------------------------------------------
   Shared design system, ported from the Station UI used by the Prodigy and
   MediSure360 projects (assets/css/station-ui.css in each) and retokened to
   City Health's palette. Same component vocabulary and class names as those
   systems — only the brand values changed — so pages, markup and know-how
   stay portable between the three codebases.

   HOST DIFFERENCE — READ THIS FIRST
   Prodigy and MediSure360 run Velzon on Bootstrap 5 with Remix icons. City
   HMS runs AdminLTE on Bootstrap 3 with Font Awesome 4. Three consequences:

     1. Everything here is scoped under `.station-scope`. Station UI's source
        uses bare generic names (.panel, .stat, .chip, .avatar, .empty), and
        Bootstrap 3 already ships .panel / .panel-title / .panel-body — 114
        rules in backend/bootstrap/css/bootstrap.min.css alone. Scoping keeps
        the class names identical to the source system (so markup copies over
        unchanged) while guaranteeing nothing here can reach a legacy page.
        => Every Station page must wrap its content in <div class="station-scope">.
        Only #toast-container / .st-toast are unscoped: toasts are appended to
        <body>, outside the wrapper. Their names are already st-prefixed.

     2. Icons are Font Awesome 4 (`<i class="fa fa-user">`), not `ri-*`.
        When copying markup from Prodigy/MediSure, translate the icon classes.

     3. Dark mode keys off `.station-scope.is-dark`. `[data-bs-theme]` is a
        Bootstrap 5 attribute that AdminLTE never sets, so it is kept only as
        a second selector for portability.

   Load after backend/dist/css/custom_style.css — see
   application/views/admin/layout/_station_assets.php, which is the supported
   way to pull this in.

   Sections:
     1.  Tokens
     2.  Scope + page frame
     3.  Station bar (page identity + actions)
     4.  Stat rail (segmented KPI strip)
     5.  Launchpad (quick action links)
     6.  Panels (section cards)
     7.  Dept rail (left column list)
     8.  Queue table
     9.  Chips, meters, icon buttons
     10. Form kit
     10c. Registration kit
     10d. Capture kit
     11. DataTables skin
     12. Empty states + toasts
     13. Bootstrap 3 / AdminLTE bridges
     14. Dark mode
     15. Responsive
   ========================================================================== */

/* ── A NOTE ON UNITS ───────────────────────────────────────────────────────
   Station UI sizes in PIXELS, deliberately, and must stay that way.

   It was authored in rem against a 16px root. But Bootstrap 3 — which this
   application loads on every in-app page — sets `html { font-size: 10px }`.
   Every rem therefore resolved to 62.5% of its intended size, so the whole
   system rendered about two thirds scale: table headers at 7.4px, chips at
   7.6px, body text at 8.8px. The standalone sign-in screens load no Bootstrap,
   so they rendered at full size — the same stylesheet produced two different
   scales depending on the page.

   Raising the root is not an option: `html` is shared with ~1,475 unconverted
   AdminLTE views and resizing it would move every one of them. Pixels are
   context-free, so the design now renders identically wherever it is embedded.

   If you add a size here, use px. Converted 2026-11-19.
   ──────────────────────────────────────────────────────────────────────── */

/* ── 1. Tokens ─────────────────────────────────────────────────────────── */
/* Declared on :root so a page can override one token in a <style> block, but
   nothing is *applied* at :root — all application is scoped (section 2 on). */
:root {
    /* Brand pair. City HMS has no single brand hex to sample, so these reuse
       the two accents the pb-* pages already use everywhere (teal #0d9488 for
       clinical screens, blue #2563eb for actions) — a Station page therefore
       sits next to an unconverted pb page without a colour clash. Named
       --st-primary / --st-secondary rather than after a literal colour
       (Prodigy's source names these --st-teal / --st-sage, sampled from its
       own logo) so a re-theme doesn't invalidate the names. Changing these
       four values plus --st-grad re-themes the whole system. */
    --st-primary:      #0d9488;
    --st-primary-d:    #0b7f74;
    --st-secondary:    #2563eb;
    --st-secondary-d:  #1d4ed8;
    --st-grad:         linear-gradient(135deg, #2563eb 0%, #0d9488 100%);

    --st-blue:        #2563eb;
    --st-amber:       #d97706;
    --st-green:       #16a34a;
    --st-red:         #dc2626;
    --st-violet:      #7c3aed;

    --st-surface:     #ffffff;
    --st-surface-2:   #f6f8fa;
    --st-canvas:      #f0f2f7;
    --st-line:        #e5e7eb;
    --st-line-soft:   #f0f2f5;

    --st-ink:         #111827;
    --st-ink-2:       #4b5563;
    --st-ink-3:       #9ca3af;

    --st-r-lg:        18px;
    --st-r-md:        13px;
    --st-r-sm:        9px;

    --st-sh-1:        0 1px 2px rgba(17, 24, 39, .06);
    --st-sh-2:        0 6px 22px rgba(13, 148, 136, .14);
    --st-sh-3:        0 14px 40px rgba(17, 24, 39, .18);

    /* AdminLTE's fixed navbar is 50px; the sticky station bar clears it. */
    --st-navbar-h:    50px;
}

/* ── 2. Scope + page frame ─────────────────────────────────────────────── */
.station-scope {
    background: var(--st-canvas);
    color: var(--st-ink);
    /* Base size for anything that does not set its own. Without this the
       scope inherits the host's 13.3px, which is not a size this file ever
       chose — it is whatever AdminLTE happens to leave on <body>. Setting it
       here makes the scope's base deliberate and the same on every page,
       embedded or standalone. */
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    padding: 18px;
    min-height: calc(100vh - var(--st-navbar-h));
    -webkit-font-smoothing: antialiased;
}
/* Inter if the page loaded it (see _station_assets.php); AdminLTE's Source
   Sans Pro otherwise. Never a hard dependency. */
.station-scope { font-family: "Inter", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.station-scope * { box-sizing: border-box; }
.station-scope a { text-decoration: none; }
.station-scope h1, .station-scope h2, .station-scope h3,
.station-scope h4, .station-scope h5 { font-family: inherit; }

/* A scope that supplies no page frame. Station classes are ALL scoped to
   .station-scope, so markup that is not a page — a Bootstrap 3 modal body, a
   fragment a controller renders on its own, a widget dropped into a legacy
   page — still needs the wrapper to pick up any styling at all. Without this
   modifier that wrapper would also paint the canvas grey, add 18px of padding
   and claim a full viewport of height inside its host.
   Use: <div class="modal-content station-scope is-bare"> */
.station-scope.is-bare { background: transparent; padding: 0; min-height: 0; }

/* AdminLTE's section.content carries 15px of its own padding and the station
   frame supplies its own, so the documented wrapper zeroes the host's:
   <section class="content" style="padding:0">. Do NOT "fix" a page that
   forgot it with a negative margin here — that makes .station-scope 30px
   wider than its column and pushes a horizontal scrollbar onto the document.
   If a page looks double-padded, add the inline padding:0 to that page. */

/* ── 3. Station bar ────────────────────────────────────────────────────── */
.station-scope .station-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 17.5px;
    flex-wrap: wrap;
    /* Brand hairline along the top (instead of a full gradient slab) and a
       faint glow in the top-right corner. Both are background layers, not
       ::before/::after boxes, so the rounded corners clip them without
       overflow:hidden — that rule would clip every dropdown opened from the
       bar's own actions. */
    background:
        var(--st-grad) top / 100% 3px no-repeat padding-box,
        radial-gradient(circle 147px at calc(100% - 80px) 40px, rgba(13, 148, 136, .07), transparent) padding-box,
        var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: var(--st-r-lg);
    padding: 17px 21.5px;
    margin-bottom: 18.5px;
    box-shadow: var(--st-sh-1);
}

.station-scope .sb-mark {
    width: 52px; height: 52px;
    border-radius: 15px;
    background: var(--st-grad);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(13, 148, 136, .28);
}
.station-scope .sb-id { min-width: 0; flex: 1 1 260px; position: relative; }
.station-scope .sb-eyebrow {
    display: inline-flex; align-items: center; gap: 5.5px;
    font-size: 12px; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: var(--st-primary-d);
    margin-bottom: 3px;
}
.station-scope .sb-title {
    font-size: 20px; font-weight: 800; letter-spacing: -.02em;
    color: var(--st-ink); margin: 0 0 1.5px;
    line-height: 1.15;
}
.station-scope .sb-meta { font-size: 14px; color: var(--st-ink-2); margin: 0; }
.station-scope .sb-actions {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-left: auto; position: relative;
}

.station-scope .sb-clock {
    display: inline-flex; flex-direction: column; align-items: flex-end;
    padding-right: 13.5px; margin-right: 3px;
    border-right: 1px solid var(--st-line);
    line-height: 1.1;
}
.station-scope .sb-clock .t { font-size: 17px; font-weight: 800; color: var(--st-ink); letter-spacing: -.01em; }
.station-scope .sb-clock .d { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--st-ink-3); }

.station-scope .pill-live {
    display: inline-flex; align-items: center; gap: 6.5px;
    background: rgba(22, 163, 74, .1);
    color: #15803d;
    border: 1px solid rgba(22, 163, 74, .2);
    border-radius: 30px;
    padding: 5px 11px;
    font-size: 12px; font-weight: 800; letter-spacing: .04em;
}
.station-scope .pill-live .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #16a34a; animation: st-pulse 1.6s infinite;
}
@keyframes st-pulse { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.55); opacity: .45 } }

.station-scope .btn-st {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 30px; padding: 6.5px 15px;
    font-size: 14.5px; font-weight: 700;
    border: 1px solid var(--st-line);
    background: var(--st-surface); color: var(--st-ink-2);
    text-decoration: none; cursor: pointer;
    transition: all .18s ease;
}
.station-scope .btn-st:hover,
.station-scope .btn-st:focus { border-color: var(--st-primary); color: var(--st-primary-d); background: rgba(13, 148, 136, .07); text-decoration: none; }
.station-scope .btn-st-solid {
    background: var(--st-grad); border-color: transparent; color: #fff;
    box-shadow: 0 4px 12px rgba(13, 148, 136, .28);
}
.station-scope .btn-st-solid:hover,
.station-scope .btn-st-solid:focus { color: #fff; filter: brightness(1.06); box-shadow: 0 6px 18px rgba(13, 148, 136, .34); }
.station-scope .btn-st-danger { background: transparent; color: var(--st-red); border-color: rgba(220, 38, 38, .45); }
.station-scope .btn-st-danger:hover { background: rgba(220, 38, 38, .1); color: var(--st-red); border-color: var(--st-red); }
.station-scope .btn-st[disabled], .station-scope .btn-st.disabled { opacity: .55; pointer-events: none; }
.station-scope .btn-st.btn-sm { padding: 5px 10.5px; font-size: 12.5px; }

/* ── 4. Stat rail ──────────────────────────────────────────────────────── */
.station-scope .stat-rail {
    display: flex;
    flex-wrap: wrap;
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: var(--st-r-lg);
    box-shadow: var(--st-sh-1);
    overflow: hidden;
    margin-bottom: 18.5px;
}
.station-scope .stat {
    flex: 1 1 0;
    min-width: 160px;
    padding: 16px 18.5px 17px;
    border-left: 1px solid var(--st-line-soft);
    text-decoration: none;
    display: block;
    position: relative;
    transition: background .18s ease;
}
.station-scope .stat:first-child { border-left: none; }
.station-scope a.stat:hover { background: var(--st-surface-2); }
.station-scope a.stat::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: var(--tone, var(--st-primary));
    transform: scaleX(0); transform-origin: left;
    transition: transform .2s ease;
}
.station-scope a.stat:hover::after { transform: scaleX(1); }
.station-scope .stat.is-on { background: var(--st-surface-2); }
.station-scope .stat.is-on::after { transform: scaleX(1); }

.station-scope .stat-top {
    display: flex; align-items: center; gap: 6.5px;
    font-size: 12.5px; font-weight: 800; letter-spacing: .09em;
    text-transform: uppercase; color: var(--st-ink-3);
    margin-bottom: 5.5px;
}
.station-scope .stat-top .tag {
    width: 7px; height: 7px; border-radius: 2px;
    background: var(--tone, var(--st-primary)); flex-shrink: 0;
}
.station-scope .stat-val {
    font-size: 28.5px; font-weight: 800; line-height: 1;
    color: var(--st-ink); letter-spacing: -.03em;
}
.station-scope .stat-val.sm { font-size: 22px; }
.station-scope .stat-sub { font-size: 13px; color: var(--st-ink-3); margin-top: 5px; }
.station-scope .stat-meter {
    display: block; height: 3px; border-radius: 3px;
    background: var(--st-line-soft);
    margin-top: 9px; overflow: hidden;
}
.station-scope .stat-meter > i {
    display: block; height: 100%; border-radius: 3px;
    background: var(--tone, var(--st-primary));
}
.station-scope .stat.alarm { background: rgba(220, 38, 38, .05); }
.station-scope .stat.alarm .stat-val { color: #b91c1c; }

/* tone helpers — --tone drives accents, --tone-soft the tinted fills.
   Same seven names as Prodigy/MediSure, so copied markup keeps its tone. */
.station-scope .t-primary   { --tone: var(--st-primary);     --tone-soft: rgba(13, 148, 136, .13); }
.station-scope .t-secondary { --tone: var(--st-secondary);   --tone-soft: rgba(37, 99, 235, .13); }
.station-scope .t-blue      { --tone: var(--st-blue);        --tone-soft: rgba(37, 99, 235, .13); }
.station-scope .t-amber     { --tone: var(--st-amber);       --tone-soft: rgba(217, 119, 6, .15); }
.station-scope .t-green     { --tone: var(--st-green);       --tone-soft: rgba(22, 163, 74, .13); }
.station-scope .t-red       { --tone: var(--st-red);         --tone-soft: rgba(220, 38, 38, .13); }
.station-scope .t-violet    { --tone: var(--st-violet);      --tone-soft: rgba(124, 58, 237, .13); }

/* ── 5. Launchpad ──────────────────────────────────────────────────────── */
.station-scope .sec-label {
    display: flex; align-items: center; gap: 9px;
    font-size: 13px; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: var(--st-ink-3);
    margin: 22.5px 0 11px;
}
.station-scope .sec-label .bar { width: 16px; height: 3px; border-radius: 3px; background: var(--st-grad); }
.station-scope .sec-label .rule { flex: 1; height: 1px; background: var(--st-line); }
.station-scope .sec-label a { font-size: 12.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--st-primary-d); }
.station-scope .sec-label a:hover { text-decoration: underline; }

.station-scope .launchpad {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 11px;
}
.station-scope .lp {
    display: flex; align-items: center; gap: 12px;
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: var(--st-r-md);
    padding: 13px 14.5px;
    text-decoration: none;
    transition: all .2s ease;
}
.station-scope .lp:hover {
    border-color: var(--tone, var(--st-primary));
    box-shadow: var(--st-sh-2);
    transform: translateY(-2px);
}
.station-scope .lp-ic {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18.5px;
    color: var(--tone, var(--st-primary));
    background: var(--tone-soft, rgba(13, 148, 136, .13));
    transition: all .2s ease;
}
.station-scope .lp:hover .lp-ic { background: var(--tone, var(--st-primary)); color: #fff; }
.station-scope .lp-txt { min-width: 0; flex: 1; }
.station-scope .lp-t { font-size: 14.5px; font-weight: 700; color: var(--st-ink); line-height: 1.2; }
.station-scope .lp-d { font-size: 12px; color: var(--st-ink-3); margin: 2px 0 0; }
.station-scope .lp-go { color: var(--st-ink-3); font-size: 16px; transition: transform .2s ease, color .2s ease; }
.station-scope .lp:hover .lp-go { transform: translateX(3px); color: var(--tone, var(--st-primary)); }

/* ── 6. Panels ─────────────────────────────────────────────────────────── */
/* NOTE: .panel, .panel-title and .panel-body are also Bootstrap 3 classes.
   Because these rules are scoped to .station-scope they outrank BS3 on every
   property they set, and BS3 can never reach a Station page's panels with
   anything we have not already declared. Do not unscope them. */
.station-scope .panel {
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: var(--st-r-lg);
    box-shadow: var(--st-sh-1);
    overflow: hidden;
    margin-bottom: 18.5px;
}
.station-scope .panel-head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 13.5px 17.5px;
    background: var(--st-surface-2);
    border-bottom: 1px solid var(--st-line);
}
.station-scope .panel-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 800; color: var(--st-ink); margin: 0;
    line-height: 1.3;
}
.station-scope .panel-title > i { color: var(--st-primary); }
.station-scope .panel-title .count {
    background: var(--st-grad); color: #fff;
    border-radius: 30px; padding: 1.5px 9px;
    font-size: 12px; font-weight: 800;
}
/* icon + title/subtitle grouped on the left of a panel head. .panel-head is
   already a flex row, so this only needs to keep the pair together — it must
   NOT itself be .panel-title, which is the heading's own class. */
.station-scope .st-head-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
.station-scope .st-head-group > div > p { margin: 2px 0 0; font-size: 13px; color: var(--st-ink-3); }

.station-scope .panel-tools { margin-left: auto; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.station-scope .panel-note {
    padding: 9px 17.5px;
    background: rgba(13, 148, 136, .08);
    border-bottom: 1px solid var(--st-line);
    font-size: 13px; color: var(--st-ink-2);
}
.station-scope .panel-body { padding: 16px 18.5px; }
.station-scope .panel-foot {
    padding: 9.5px 17.5px;
    border-top: 1px solid var(--st-line);
    background: var(--st-surface-2);
    font-size: 13px; color: var(--st-ink-3);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* segmented control */
.station-scope .seg {
    display: inline-flex;
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: 30px;
    padding: 2px;
    gap: 2px;
}
.station-scope .seg > a {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4.5px 13px; border-radius: 30px;
    font-size: 12.5px; font-weight: 700;
    color: var(--st-ink-2); text-decoration: none;
    transition: all .18s ease; white-space: nowrap;
}
.station-scope .seg > a:hover { color: var(--st-primary-d); background: rgba(13, 148, 136, .08); }
.station-scope .seg > a.on { background: var(--st-grad); color: #fff; box-shadow: 0 2px 8px rgba(13, 148, 136, .3); }

.station-scope .sel-st {
    border: 1px solid var(--st-line);
    background: var(--st-surface);
    color: var(--st-ink-2);
    border-radius: 30px;
    padding: 5px 30.5px 5px 13px;
    font-size: 12.5px; font-weight: 700;
    outline: none; cursor: pointer;
    height: auto;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239ca3af'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9.5px center;
    background-size: 12px;
}
.station-scope .sel-st:focus { border-color: var(--st-primary); }

.station-scope .icon-btn {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--st-line); background: var(--st-surface);
    color: var(--st-ink-2); cursor: pointer; text-decoration: none;
    padding: 0;
    transition: all .18s ease;
}
.station-scope .icon-btn:hover { border-color: var(--st-primary); color: var(--st-primary-d); transform: rotate(30deg); }

/* ── 7. Dept rail (left column list) ───────────────────────────────────── */
.station-scope .dept-rail { padding: 9px; display: flex; flex-direction: column; gap: 5px; max-height: 560px; overflow-y: auto; }
.station-scope .dept {
    display: block; width: 100%; text-align: left;
    border: 1px solid transparent; background: transparent;
    border-radius: var(--st-r-md);
    padding: 9.5px 11px;
    cursor: pointer;
    transition: all .18s ease;
}
.station-scope .dept:hover { background: var(--st-surface-2); border-color: var(--st-line); }
.station-scope .dept.on {
    background: rgba(13, 148, 136, .08);
    border-color: rgba(13, 148, 136, .3);
    box-shadow: inset 3px 0 0 var(--st-primary);
}
.station-scope .dept-name {
    display: flex; align-items: center; gap: 6.5px;
    font-size: 15px; font-weight: 700; color: var(--st-ink);
    margin-bottom: 5.5px;
}
.station-scope .dept-name .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station-scope .dept-counts { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.station-scope .cnt {
    display: inline-flex; align-items: center; gap: 3.5px;
    border-radius: 6px; padding: 1.5px 6.5px;
    font-size: 12.5px; font-weight: 800;
}
.station-scope .cnt-wait { background: rgba(37,99,235,.12);  color: #1d4ed8; }
.station-scope .cnt-serv { background: rgba(217,119,6,.14);  color: #92400e; }
.station-scope .cnt-done { background: rgba(22,163,74,.12);  color: #15803d; }
.station-scope .cnt-mut  { background: var(--st-surface-2);  color: var(--st-ink-3); }
.station-scope .cap-meter { display: block; height: 3px; border-radius: 3px; background: var(--st-line-soft); margin-top: 7px; overflow: hidden; }
.station-scope .cap-meter > i { display: block; height: 100%; border-radius: 3px; }

/* ── 7b. Dept grid (service points as cards) ───────────────────────────── */
/* The dept RAIL above is the compact left-column list. This is the same
   information at full width, for a page whose subject IS the departments —
   a queue dashboard rather than a queue. Each card is a link to that
   department's own screen, so the whole card lifts on hover.
   --dept-color is set per card from the department's own theme colour. */
.station-scope .dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 13px;
}
.station-scope .dept-card {
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-left: 3px solid var(--dept-color, var(--st-ink-3));
    border-radius: var(--st-r-md);
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease;
}
.station-scope .dept-card:hover { transform: translateY(-2px); box-shadow: var(--st-sh-1), 0 8px 22px rgba(17, 24, 39, .08); }
.station-scope .dc-top { display: flex; align-items: center; gap: 10.5px; padding: 13px 14.5px 9px; }
.station-scope .dc-ic {
    width: 38px; height: 38px; flex: 0 0 38px;
    border-radius: var(--st-r-sm);
    background: var(--dept-color, var(--st-ink-3));
    color: #fff; font-size: 15.5px;
    display: flex; align-items: center; justify-content: center;
}
.station-scope .dc-id { min-width: 0; }
.station-scope .dc-name {
    font-size: 15px; font-weight: 800; color: var(--st-ink); line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.station-scope .dc-sub { font-size: 12.5px; color: var(--st-ink-3); margin-top: 1.5px; }
.station-scope .dc-count { margin-left: auto; text-align: right; flex-shrink: 0; }
.station-scope .dc-count .v { display: block; font-size: 24.5px; font-weight: 800; color: var(--st-ink); line-height: 1; }
.station-scope .dc-count .l { display: block; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--st-ink-3); }
.station-scope .dc-body { padding: 0 14.5px 12px; }
.station-scope .dc-bar-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--st-ink-3); margin-bottom: 5px; font-weight: 700; }
.station-scope .dc-wait { font-size: 12px; color: var(--st-ink-3); margin-top: 7px; }
.station-scope .dc-acts {
    display: flex; gap: 6.5px;
    padding: 9px 12px;
    border-top: 1px solid var(--st-line-soft);
    background: var(--st-surface-2);
}
.station-scope .dc-acts > .btn-st { flex: 1; justify-content: center; }

/* ── 7c. Slide-in drawer ───────────────────────────────────────────────── */
/* A right-edge panel with a pull-tab, for things that must be reachable from
   ANY page — "my queue", a notifications tray, a quick-look record.
   Because every Station rule is scoped and these elements are position:fixed,
   the markup wraps them in a bare scope that takes no space in the flow:

     <div class="station-scope is-bare">
       <button class="st-drawer-tab">…</button>
       <div class="st-scrim"></div>
       <div class="st-drawer">
         <div class="st-drawer-head">…</div>
         <div class="st-drawer-body">…</div>
       </div>
     </div>

   .is-open on the scrim and the drawer is what shows them. Z-indexes sit
   above AdminLTE's fixed sidebar (1030) and below a Bootstrap modal (1050)
   on purpose: a drawer must not cover a dialog the user just opened. */
.station-scope .st-drawer-tab {
    position: fixed; top: 45%; right: 0; transform: translateY(-50%);
    z-index: 1035;
    display: none; flex-direction: column; align-items: center; gap: 5.5px;
    border: none; border-radius: var(--st-r-md) 0 0 var(--st-r-md);
    padding: 13.5px 10.5px;
    background: var(--st-grad); color: #fff;
    font-size: 12.5px; font-weight: 800;
    box-shadow: -4px 0 18px rgba(17, 24, 39, .22);
    cursor: pointer;
}
.station-scope .st-drawer-tab.is-on { display: flex; }
.station-scope .st-drawer-tab .count {
    min-width: 22px; height: 22px; padding: 0 5px;
    border-radius: 999px; background: var(--st-red); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800;
}
.station-scope .st-scrim {
    position: fixed; inset: 0; z-index: 1036;
    background: rgba(17, 24, 39, .45);
    opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.station-scope .st-scrim.is-open { opacity: 1; pointer-events: auto; }
.station-scope .st-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1037;
    width: min(380px, 92vw);
    display: flex; flex-direction: column;
    background: var(--st-canvas);
    transform: translateX(102%);
    transition: transform .35s cubic-bezier(.32, .72, 0, 1);
    box-shadow: -10px 0 40px rgba(17, 24, 39, .2);
}
.station-scope .st-drawer.is-open { transform: translateX(0); }
.station-scope .st-drawer-head {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 8px;
    padding: 14.5px 17.5px;
    background: var(--st-surface);
    border-bottom: 1px solid var(--st-line);
}
.station-scope .st-drawer-head h4 {
    margin: 0; font-size: 15px; font-weight: 800; color: var(--st-ink);
    display: flex; align-items: center; gap: 6.5px;
}
.station-scope .st-drawer-close {
    margin-left: auto;
    width: 28px; height: 28px;
    border: none; background: none; border-radius: var(--st-r-sm);
    color: var(--st-ink-3); font-size: 17.5px; line-height: 1; cursor: pointer;
}
.station-scope .st-drawer-close:hover { background: var(--st-surface-2); color: var(--st-ink); }
.station-scope .st-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 10.5px; }
.station-scope .st-drawer-item {
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: var(--st-r-md);
    padding: 10.5px 12px;
    margin-bottom: 8px;
}
.station-scope .st-drawer-item:last-child { margin-bottom: 0; }

/* ── 8. Queue table ────────────────────────────────────────────────────── */
.station-scope .qwrap { overflow-x: auto; }
.station-scope .qtable {
    width: 100%; border-collapse: separate; border-spacing: 0;
    min-width: 860px; margin: 0;
    font-variant-numeric: tabular-nums;
}
.station-scope .qtable thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--st-surface-2);
    padding: 9.5px 14.5px;
    text-align: left;
    font-size: 12.5px; font-weight: 800; letter-spacing: .1em;
    text-transform: uppercase; color: var(--st-ink-3);
    border: none;
    border-bottom: 1px solid var(--st-line);
    white-space: nowrap;
}
.station-scope .qtable tbody td {
    padding: 11px 14.5px;
    border: none;
    border-bottom: 1px solid var(--st-line-soft);
    vertical-align: middle;
    font-size: 15px; color: var(--st-ink-2);
}
.station-scope .qtable tbody tr { transition: background .15s ease; }
.station-scope .qtable tbody tr:hover td { background: var(--st-surface-2); }
.station-scope .qtable tbody tr:last-child td { border-bottom: none; }
.station-scope .qtable tbody tr.pri-row-urgent    td:first-child { box-shadow: inset 3px 0 0 var(--st-amber); }
.station-scope .qtable tbody tr.pri-row-emergency td:first-child { box-shadow: inset 3px 0 0 var(--st-red); }
.station-scope .qtable tbody tr.pri-row-emergency td { background: rgba(220, 38, 38, .035); }
.station-scope .qtable tfoot td { font-weight: 800; border-top: 2px solid var(--st-line); background: var(--st-surface-2); }

/* Row state, in the same idiom as pri-row-* above: a 3px inset edge on the
   first cell plus the faintest wash, so a queue reads at a glance without the
   table turning into a colour chart.
     .row-serving  the patient currently being seen
     .row-blocked  cannot proceed (payment gate, missing authorisation)
     .flow-*       where this entry came from, for a queue that mixes sources */
.station-scope .qtable tbody tr.row-serving td:first-child { box-shadow: inset 3px 0 0 var(--st-primary); }
.station-scope .qtable tbody tr.row-serving td { background: rgba(13, 148, 136, .045); }
.station-scope .qtable tbody tr.row-blocked td:first-child { box-shadow: inset 3px 0 0 var(--st-red); }
.station-scope .qtable tbody tr.row-blocked td { background: rgba(220, 38, 38, .04); }
.station-scope .qtable tbody tr.flow-gcc td { background: rgba(37, 99, 235, .04); }
.station-scope .qtable tbody tr.flow-lab td { background: rgba(217, 119, 6, .05); }
.station-scope .qtable tbody tr.flow-rad td { background: rgba(22, 163, 74, .04); }
.station-scope .qtable tbody tr.flow-phm td { background: rgba(124, 58, 237, .04); }
/* State outranks provenance: a blocked GCC row must still read as blocked. */
.station-scope .qtable tbody tr.row-serving.flow-gcc td,
.station-scope .qtable tbody tr.row-serving.flow-lab td,
.station-scope .qtable tbody tr.row-serving.flow-rad td,
.station-scope .qtable tbody tr.row-serving.flow-phm td { background: rgba(13, 148, 136, .045); }
.station-scope .qtable tbody tr.row-blocked.flow-gcc td,
.station-scope .qtable tbody tr.row-blocked.flow-lab td,
.station-scope .qtable tbody tr.row-blocked.flow-rad td,
.station-scope .qtable tbody tr.row-blocked.flow-phm td { background: rgba(220, 38, 38, .04); }

.station-scope .q-idx {
    display: inline-flex; align-items: center; justify-content: center;
    width: 25px; height: 25px; border-radius: 8px;
    background: var(--st-surface-2); border: 1px solid var(--st-line);
    font-size: 13px; font-weight: 800; color: var(--st-ink-3);
}
.station-scope .who { display: flex; align-items: center; gap: 9.5px; min-width: 0; }
.station-scope .avatar {
    width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
    background: var(--st-grad); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15.5px;
}
.station-scope .avatar.emergency { background: linear-gradient(135deg, #f87171, #dc2626); }
.station-scope .avatar.urgent    { background: linear-gradient(135deg, #fbbf24, #d97706); }
.station-scope .who-txt { min-width: 0; }
.station-scope .who-name { font-size: 15px; font-weight: 700; color: var(--st-ink); line-height: 1.25; }
.station-scope .who-meta { font-size: 13px; color: var(--st-ink-3); margin-top: 1px; }
.station-scope .who-note {
    font-size: 13px; color: var(--st-ink-3); margin-top: 1px;
    max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.station-scope .tag-vip {
    display: inline-block; margin-left: 5px;
    background: rgba(217, 119, 6, .16); color: #92400e;
    border-radius: 5px; padding: 0 5px;
    font-size: 12px; font-weight: 800; letter-spacing: .06em;
    vertical-align: middle;
}
.station-scope .num,
.station-scope .qtable td.num,
.station-scope .qtable th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── 9. Chips / meters / actions ───────────────────────────────────────── */
.station-scope .chip {
    display: inline-flex; align-items: center; gap: 4px;
    border-radius: 30px; padding: 2.5px 9.5px;
    font-size: 12.5px; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; white-space: nowrap;
}
.station-scope .chip-normal     { background: rgba(22,163,74,.11);  color: #15803d; }
.station-scope .chip-urgent     { background: rgba(217,119,6,.16);  color: #92400e; }
.station-scope .chip-emergency  { background: rgba(220,38,38,.13);  color: #b91c1c; }
.station-scope .chip-waiting    { background: rgba(37,99,235,.12);  color: #1d4ed8; }
.station-scope .chip-in-service { background: rgba(217,119,6,.16);  color: #92400e; }
.station-scope .chip-completed  { background: rgba(22,163,74,.11);  color: #15803d; }
.station-scope .chip-cancelled  { background: var(--st-surface-2);  color: var(--st-ink-3); }
.station-scope .chip-no-show    { background: var(--st-surface-2);  color: var(--st-ink-3); }
.station-scope .chip-transferred{ background: rgba(124,58,237,.12); color: #6d28d9; }
.station-scope .chip-seen       { background: rgba(124,58,237,.12); color: #6d28d9; }
.station-scope .chip-soft       { background: var(--st-surface-2);  color: var(--st-ink-2); border: 1px solid var(--st-line); }
.station-scope .chip-pos        { background: var(--st-grad);       color: #fff; }
.station-scope .chip-low        { background: var(--st-surface-2);  color: var(--st-ink-3); }
.station-scope .chip-medium     { background: rgba(37,99,235,.12);  color: #1d4ed8; }
.station-scope .chip-high       { background: rgba(217,119,6,.16);  color: #92400e; }
/* City HMS payer vocabulary — cash vs insurance separation is load-bearing
   in this codebase (see the billing views), so it gets first-class chips. */
.station-scope .chip-cash       { background: rgba(22,163,74,.11);  color: #15803d; }
.station-scope .chip-insurance  { background: rgba(37,99,235,.12);  color: #1d4ed8; }
.station-scope .chip-corporate  { background: rgba(124,58,237,.12); color: #6d28d9; }

.station-scope .route {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(13,148,136,.09);
    border: 1px solid rgba(13,148,136,.22);
    color: var(--st-primary-d);
    border-radius: 30px; padding: 2.5px 9.5px;
    font-size: 12px; font-weight: 700; white-space: nowrap;
}
.station-scope .route-sub { font-size: 12.5px; color: var(--st-ink-3); margin-top: 2.5px; }
.station-scope .route-none { font-size: 12px; color: var(--st-ink-3); font-style: italic; }

.station-scope .wait { display: inline-flex; align-items: center; gap: 5px; font-size: 14.5px; font-weight: 600; color: var(--st-ink-2); }
/* Two steps, not one. .warn is "this is getting long", .urgent is "deal with
   this now" — a single red for both means a 31-minute wait shouts as loudly as
   a three-hour one, which is how a queue screen stops being read. */
.station-scope .wait.warn   { color: #b45309; font-weight: 800; }
.station-scope .wait.urgent { color: #b91c1c; font-weight: 800; }
.station-scope .wait.urgent i { animation: st-tick 2s infinite; }
@keyframes st-tick { 0%,100% { opacity: 1 } 50% { opacity: .4 } }

.station-scope .flag-ok   { font-size: 12px; font-weight: 800; color: #15803d; }
.station-scope .flag-todo { font-size: 12px; font-weight: 800; color: #92400e; }
/* The third step the pair was missing. Vitals and other clinical readings need
   "out of range" as distinct from "needs attention" — amber for borderline,
   red for the value a nurse must act on now. */
.station-scope .flag-bad  { font-size: 12px; font-weight: 800; color: #b91c1c; }

.station-scope .acts { display: inline-flex; gap: 4px; }
.station-scope .act {
    width: 29px; height: 29px; border-radius: var(--st-r-sm);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; text-decoration: none; border: 1px solid transparent;
    transition: all .18s ease;
}
.station-scope .act:hover { transform: translateY(-2px); box-shadow: var(--st-sh-2); }
.station-scope .act-primary { background: rgba(22,163,74,.12);  color: #15803d; }
.station-scope .act-edit    { background: rgba(217,119,6,.15);  color: #92400e; }
.station-scope .act-view    { background: rgba(13,148,136,.12); color: var(--st-primary-d); }
.station-scope .act-next    { background: rgba(37,99,235,.12);  color: #1d4ed8; }
.station-scope .act-danger  { background: rgba(220,38,38,.12);  color: #b91c1c; }
/* A row action or pager step that is present but not available right now —
   the first page's "previous", say. Dimmed and inert rather than removed, so
   the control row does not reflow as you page through. */
.station-scope .act.is-off  { opacity: .4; pointer-events: none; }

/* ── 10. Form kit ──────────────────────────────────────────────────────── */
/* Existing ids, names and JS hooks stay on the elements; these classes sit
   alongside them. Use inside .panel:
     <div class="st-grid"><div class="st-field"><label>..</label>
       <input class="st-input"></div></div>                                  */
/* Vertical rhythm. The pb-* forms this replaced put 14px of grid gap AND a
   14px bottom margin on every row — 28px between one field's input and the
   next field's label. Carrying over only the gap halved that and left every
   converted form looking cramped. 22px here, matched by .st-stack and by a
   loose .st-field's margin, so the three ways of stacking fields all agree. */
.station-scope .st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px 17.5px; padding: 16px 18.5px; }
.station-scope .st-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.station-scope .st-grid .span-all { grid-column: 1 / -1; }

/* ── The twelve-column form row ────────────────────────────────────────── */
/* THIS, not .st-grid, is how a form lays its fields out. Prodigy — the
   reference implementation of this design system — gives every field an
   explicit width on a twelve-column grid (`col-md-6`, `col-md-4`,
   `col-md-3`), so a name field is wide, a gender select is narrow, each row
   adds up to twelve and the column edges line up all the way down the form.
   .st-grid above cannot do that: `repeat(auto-fit, minmax(220px, 1fr))`
   derives the column COUNT from the container's width and makes every field
   the same size. Measured at 1440px, a plain .st-grid rendered FIVE equal
   columns and .st-grid.cols-2 rendered FOUR — the name of the class is not
   the number of columns you get, and the number changes as the sidebar
   collapses or the window resizes. That is what made the converted
   registration forms read as a wall of identical boxes instead of a form.

   Use:
     <div class="st-row">
       <div class="st-field st-c6">…</div>
       <div class="st-field st-c3">…</div>
       <div class="st-field st-c3">…</div>
     </div>

   A child with no .st-cN spans the full width. Rows carry their own bottom
   margin — the same 22px as .st-grid's row gap — so consecutive rows keep
   the form's vertical rhythm. .st-grid is left exactly as it was: the queue,
   triage, front-office and sign-in pages are built on it and must not move.*/
.station-scope .st-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 22px 17.5px;
    margin-bottom: 22px;
}
.station-scope .st-row:last-child { margin-bottom: 0; }
.station-scope .st-row > * { grid-column: span 12; min-width: 0; }
/* The row's gap is the only spacing between its cells. A .st-field carries
   a bottom margin for when it sits loose in a .panel-body, and a .panel
   carries one so section cards stack — inside a row both would double the
   gap on every line but the last.
   Bootstrap's .form-group is in this list because walkin and malta keep
   their .form-group / .form-control markup on purpose — their validation JS
   adds and removes .error on those exact elements — and BS3 gives it 15px
   of bottom margin. */
.station-scope .st-row > .st-field,
.station-scope .st-row > .panel,
.station-scope .st-row > .form-group { margin-bottom: 0; }
.station-scope .st-c1  { grid-column: span 1 }
.station-scope .st-c2  { grid-column: span 2 }
.station-scope .st-c3  { grid-column: span 3 }
.station-scope .st-c4  { grid-column: span 4 }
.station-scope .st-c5  { grid-column: span 5 }
.station-scope .st-c6  { grid-column: span 6 }
.station-scope .st-c7  { grid-column: span 7 }
.station-scope .st-c8  { grid-column: span 8 }
.station-scope .st-c9  { grid-column: span 9 }
.station-scope .st-c10 { grid-column: span 10 }
.station-scope .st-c11 { grid-column: span 11 }
.station-scope .st-c12 { grid-column: span 12 }
/* A row sitting directly in .panel-body needs no padding of its own — the
   body already pads. .is-padded is for a row used in place of a body. */
.station-scope .st-row.is-padded { padding: 16px 18.5px; }
/* A row whose cells are narrow by nature — a years / months / days triple,
   a from/to pair of dates — and should stay side by side at every width
   rather than stacking. It opts out of both breakpoints below, which is why
   these selectors carry one class more than the media-query rules do: that
   extra class is what lets them win without !important. */
.station-scope .st-row.is-tight { gap: 9px; }
.station-scope .st-row.is-tight > .st-c1  { grid-column: span 1 }
.station-scope .st-row.is-tight > .st-c2  { grid-column: span 2 }
.station-scope .st-row.is-tight > .st-c3  { grid-column: span 3 }
.station-scope .st-row.is-tight > .st-c4  { grid-column: span 4 }
.station-scope .st-row.is-tight > .st-c6  { grid-column: span 6 }
/* Tablet: thirds and quarters become halves, anything wider goes full.
   Bounded below at 768px on purpose. These selectors are more specific than
   the phone rule's `.st-row > *`, so an unbounded max-width here would win
   at 400px and leave two fields side by side on a phone. Keeping the two
   ranges disjoint avoids needing !important to settle it. */
@media (min-width: 768px) and (max-width: 1199px) {
    .station-scope .st-row > .st-c3,
    .station-scope .st-row > .st-c4,
    .station-scope .st-row > .st-c5,
    .station-scope .st-row > .st-c6,
    .station-scope .st-row > .st-c7,
    .station-scope .st-row > .st-c8 { grid-column: span 6 }
    .station-scope .st-row > .st-c9,
    .station-scope .st-row > .st-c10,
    .station-scope .st-row > .st-c11 { grid-column: span 12 }
}
/* Phone: one field per line, always. */
@media (max-width: 767px) {
    .station-scope .st-row { gap: 18px 0; }
    .station-scope .st-row > * { grid-column: span 12; }
}
.station-scope .st-field { display: flex; flex-direction: column; gap: 4.5px; min-width: 0; margin-bottom: 22px; }
/* A field inside a grid or a stack is spaced by that container's own gap, so
   it must not add a margin on top of it. The margin above is for a field
   sitting loose in a .panel-body, which otherwise touches the next one —
   .st-field replaced .pb-form-group / .pb-field, both of which carried a
   bottom margin, and dropping it silently closed the gap on every form. */
.station-scope .st-grid > .st-field,
.station-scope .st-stack > .st-field,
.station-scope .st-field:last-child { margin-bottom: 0; }
/* font-family is NOT inherited here by accident — it has to be declared.
   backend/dist/css/style-main.css carries a bare `label { font-family:
   Roboto-Medium }`, and an element selector that names the property beats
   inheritance from .station-scope however specific that ancestor rule is.
   The result was a form whose inputs, headings, chips and help text were
   all Inter while every field LABEL rendered in Roboto — the one thing on
   a form the eye lines up down the page. Only font-family was affected —
   every other property below is set with a class selector, which does
   outrank a bare `label`. Do not remove this line. */
.station-scope .st-field > label:not(.st-check),
.station-scope .st-label-row > label,
.station-scope .st-label {
    display: block;
    font-family: inherit;
    font-size: 12.5px; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; color: var(--st-ink-3); margin: 0 0 4.5px;
}
/* …and the same for every other label a Station page can contain. */
.station-scope label, .station-scope .st-check { font-family: inherit; }
.station-scope .st-field > label:not(.st-check) { margin-bottom: 0; }
.station-scope .st-label-row > label { margin-bottom: 0; }
.station-scope .st-input,
.station-scope .st-input.form-control {
    width: 100%; background: var(--st-surface); color: var(--st-ink);
    border: 1px solid var(--st-line); border-radius: var(--st-r-sm);
    padding: 8px 11px; font-size: 15.5px; line-height: 1.3;
    height: auto; box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.station-scope textarea.st-input { min-height: 84px; resize: vertical; }
.station-scope .st-input:focus { outline: none; border-color: var(--st-primary); box-shadow: 0 0 0 3px rgba(13, 148, 136, .14); }
.station-scope .st-input:disabled, .station-scope .st-input[readonly] { background: var(--st-surface-2); color: var(--st-ink-2); }
.station-scope .st-input.is-invalid { border-color: var(--st-red); }
/* an invalid field stays red while focused — the focus ring must not hide it */
.station-scope .st-input.is-invalid:focus { border-color: var(--st-red); box-shadow: 0 0 0 3px rgba(220, 38, 38, .14); }
.station-scope .st-help { font-size: 13px; color: var(--st-ink-3); }
.station-scope .st-check { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; color: var(--st-ink); cursor: pointer; font-weight: 500; }
.station-scope .st-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 13.5px 18.5px; border-top: 1px solid var(--st-line-soft); }
/* Leave / cancel on the left, commit on the right — the form action bar at
   the foot of a long form (Prodigy calls this one .form-actions-bar). */
.station-scope .st-actions.is-split { justify-content: space-between; }
.station-scope .st-actions.is-split > .grp { display: flex; gap: 8px; flex-wrap: wrap; }

/* alerts / banners */
.station-scope .st-alert { display: flex; gap: 10.5px; align-items: flex-start; padding: 12px 16px; border-radius: var(--st-r-md); border: 1px solid var(--st-line); background: var(--st-surface-2); color: var(--st-ink); font-size: 14.5px; margin-bottom: 16px; }
.station-scope .st-alert i { font-size: 17.5px; line-height: 1.3; }
.station-scope .st-alert.is-info    { border-color: rgba(37, 99, 235, .35);  background: rgba(37, 99, 235, .08); }
.station-scope .st-alert.is-info i  { color: var(--st-blue); }
.station-scope .st-alert.is-warn    { border-color: rgba(217, 119, 6, .4);   background: rgba(217, 119, 6, .09); }
.station-scope .st-alert.is-warn i  { color: var(--st-amber); }
.station-scope .st-alert.is-error   { border-color: rgba(220, 38, 38, .4);   background: rgba(220, 38, 38, .08); }
.station-scope .st-alert.is-error i { color: var(--st-red); }
.station-scope .st-alert.is-ok      { border-color: rgba(22, 163, 74, .35);  background: rgba(22, 163, 74, .08); }
.station-scope .st-alert.is-ok i    { color: var(--st-green); }

/* key / value detail list */
.station-scope .st-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 13.5px 22.5px; padding: 16px 18.5px; margin: 0; }
.station-scope .st-kv > div { min-width: 0; }
.station-scope .st-kv dt { font-size: 12px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; color: var(--st-ink-3); margin-bottom: 2px; }
.station-scope .st-kv dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--st-ink); word-break: break-word; }
.station-scope .st-kv .span-all { grid-column: 1 / -1; }

/* inline tabs that switch panes (BS3 tab JS keeps working on the same ids) */
.station-scope .st-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 5.5px; background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 30px; width: -moz-fit-content; width: fit-content; max-width: 100%; margin: 0 0 16px; box-shadow: var(--st-sh-1); overflow-x: auto; list-style: none; }
.station-scope .st-tabs > li { float: none; margin: 0; }
.station-scope .st-tabs > li > a,
.station-scope .st-tabs > a {
    border: none; background: transparent; color: var(--st-ink-2);
    font-size: 14px; font-weight: 700; padding: 6px 14.5px;
    border-radius: 30px; white-space: nowrap; text-decoration: none; margin: 0;
}
.station-scope .st-tabs > li > a:hover,
.station-scope .st-tabs > a:hover { color: var(--st-primary-d); background: rgba(13, 148, 136, .08); border: none; }
.station-scope .st-tabs > li.active > a,
.station-scope .st-tabs > li.active > a:hover,
.station-scope .st-tabs > li.active > a:focus,
.station-scope .st-tabs > a.on { background: var(--st-grad); color: #fff; border: none; box-shadow: 0 2px 8px rgba(13, 148, 136, .3); }

/* step indicator */
.station-scope .st-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; counter-reset: st-step; }
.station-scope .st-step { display: flex; align-items: center; gap: 8px; padding: 6.5px 13.5px; border-radius: 30px; border: 1px solid var(--st-line); background: var(--st-surface); font-size: 13px; font-weight: 700; color: var(--st-ink-3); }
.station-scope .st-step::before { counter-increment: st-step; content: counter(st-step); width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: var(--st-surface-2); color: var(--st-ink-3); }
.station-scope .st-step.is-on { color: var(--st-ink); border-color: var(--st-primary); }
.station-scope .st-step.is-on::before { background: var(--st-grad); color: #fff; }
.station-scope .st-step.is-done::before { content: "\2713"; background: var(--st-green); color: #fff; }

/* radio / checkbox toggle buttons:
   <input type="radio" class="btn-check" id="x"><label class="btn-st" for="x"> */
.station-scope .btn-check { position: absolute; clip: rect(0,0,0,0); pointer-events: none; }
.station-scope .btn-check:checked + .btn-st { background: var(--st-grad); border-color: transparent; color: #fff; box-shadow: 0 2px 8px rgba(13, 148, 136, .3); }
.station-scope .btn-check:focus-visible + .btn-st { outline: 2px solid var(--st-primary); outline-offset: 2px; }
.station-scope .st-toggle { display: flex; gap: 6.5px; flex-wrap: wrap; }
.station-scope .st-toggle .btn-st { flex: 1 1 140px; justify-content: center; }

/* ── 10b. Prose ────────────────────────────────────────────────────────── */
/* Free clinical text — a chief complaint, examination findings, a treatment
   plan — read rather than scanned, so it gets a comfortable measure and line
   height instead of the dense table/label type used everywhere else.
   .is-quote marks the passage the reader came for. */
.station-scope .st-prose {
    font-size: 14.5px; line-height: 1.55; color: var(--st-ink-2);
    margin: 0 0 14.5px; white-space: pre-line; word-break: break-word;
}
.station-scope .st-prose.is-quote {
    padding: 9.5px 13px;
    background: var(--st-surface-2);
    border-left: 3px solid var(--st-primary);
    border-radius: 0 var(--st-r-sm) var(--st-r-sm) 0;
    color: var(--st-ink);
}

/* ── 10c. Registration kit ─────────────────────────────────────────────── */
/* Added for the patient registration forms (general, specialized, walkin,
   gcc, seafarers, small medical, malta, food handlers, agent). Those pages
   each carried a private ~150-line copy of the old pb-* system; these are the
   five shapes that copy contained which the form kit above did not already
   cover. Sized in px, like everything else here — see the note on units.    */

/* selectable card — coverage type, pathway, anything picked by clicking.
   JS toggles .is-on; the radio/checkbox inside keeps the real form value. */
.station-scope .st-choice-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 11px; margin-bottom: 15px;
}
.station-scope .st-choice {
    position: relative; display: block; cursor: pointer;
    padding: 14px 16px; border-radius: var(--st-r-md);
    border: 1px solid var(--st-line); background: var(--st-surface);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.station-scope .st-choice:hover { border-color: var(--st-primary); background: rgba(13, 148, 136, .04); }
.station-scope .st-choice > svg { width: 20px; height: 20px; stroke: var(--st-ink-3); margin-bottom: 7px; display: block; }
.station-scope .st-choice strong { display: block; font-size: 14px; font-weight: 800; color: var(--st-ink); margin-bottom: 2px; }
.station-scope .st-choice p { margin: 0; font-size: 12.5px; color: var(--st-ink-3); line-height: 1.45; }
.station-scope .st-choice.is-on {
    border-color: var(--st-primary); background: rgba(13, 148, 136, .07);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .13);
}
.station-scope .st-choice.is-on > svg { stroke: var(--st-primary-d); }
.station-scope .st-choice.is-on::after {
    content: "\2713"; position: absolute; top: 11px; right: 13px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--st-grad); color: #fff;
    font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}

/* input with a fixed prefix — a currency code, a country dialling code */
.station-scope .st-ig { display: flex; align-items: stretch; }
.station-scope .st-ig-addon {
    display: inline-flex; align-items: center; padding: 0 11px;
    background: var(--st-surface-2); color: var(--st-ink-3);
    border: 1px solid var(--st-line); border-right: 0;
    border-radius: var(--st-r-sm) 0 0 var(--st-r-sm);
    font-size: 13px; font-weight: 800; letter-spacing: .03em; white-space: nowrap;
}
.station-scope .st-ig .st-input { border-radius: 0 var(--st-r-sm) var(--st-r-sm) 0; }
.station-scope .st-ig .st-input:focus { position: relative; z-index: 1; }

/* running cost breakdown, totals last */
.station-scope .st-cost {
    border: 1px solid var(--st-line); border-radius: var(--st-r-md);
    background: var(--st-surface-2); overflow: hidden;
}
.station-scope .st-cost-row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 9.5px 15px; border-bottom: 1px solid var(--st-line-soft);
}
.station-scope .st-cost-row:last-child { border-bottom: 0; }
.station-scope .st-cost-lbl { font-size: 13px; color: var(--st-ink-2); }
.station-scope .st-cost-val { font-size: 14px; font-weight: 700; color: var(--st-ink); font-variant-numeric: tabular-nums; }
.station-scope .st-cost-val.is-credit { color: var(--st-green); }
.station-scope .st-cost-row.is-total { background: var(--st-surface); border-top: 1px solid var(--st-line); }
.station-scope .st-cost-row.is-total .st-cost-lbl { font-weight: 800; color: var(--st-ink); }
.station-scope .st-cost-row.is-total .st-cost-val { font-size: 16px; color: var(--st-primary-d); }

/* optional service: a checkbox row that reveals its own cost field */
.station-scope .st-svc {
    border: 1px solid var(--st-line); border-radius: var(--st-r-md);
    background: var(--st-surface); padding: 12px 14px;
}
.station-scope .st-svc > label { display: flex; align-items: flex-start; gap: 10px; margin: 0; cursor: pointer; font-weight: 500; }
.station-scope .st-svc input[type="checkbox"] { width: 15px; height: 15px; margin-top: 2px; flex-shrink: 0; accent-color: var(--st-primary); }
.station-scope .st-svc span { display: block; font-size: 14px; font-weight: 700; color: var(--st-ink); }
.station-scope .st-svc small { display: block; font-size: 12.5px; color: var(--st-ink-3); margin-top: 1px; }
.station-scope .st-svc.is-on { border-color: var(--st-primary); background: rgba(13, 148, 136, .04); }
.station-scope .st-svc-cost { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--st-line); }

/* Inline SVG icons.
   The registration views draw their icons as <svg viewBox="0 0 24 24"> with
   no width or height — the page's own stylesheet used to size them. An SVG
   with no intrinsic size stretches to fill its container, so once that
   stylesheet goes away they render enormous. Size them here, by context.
   An SVG that sets its own width attribute is left alone. */
.station-scope svg:not([width]) { width: 16px; height: 16px; flex-shrink: 0; }
/* These icons are line art drawn with <path>/<polyline> and NO fill or stroke
   attribute — the page's own stylesheet used to supply them. An SVG with no
   fill declared paints solid black, so without this a button icon renders as
   a filled black square. An SVG that sets its own fill or stroke is left
   alone, so flags and logos are unaffected. */
.station-scope svg:not([fill])   { fill: none; }
.station-scope svg:not([stroke]) { stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.station-scope .panel-title svg:not([width]),
.station-scope .panel-head h2 svg:not([width]) { width: 16px; height: 16px; stroke: var(--st-ink-3); }
.station-scope .btn-st svg:not([width]) { width: 14px; height: 14px; }
.station-scope .st-cost svg:not([width]),
.station-scope .st-vmsg svg:not([width]) { width: 14px; height: 14px; }

/* the asterisk on a required label */
.station-scope .st-req { color: var(--st-red); font-weight: 800; }

/* compact inline validation line, under the field it judges */
.station-scope .st-vmsg {
    display: flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600; margin-top: 6px;
}
.station-scope .st-vmsg svg { width: 14px; height: 14px; flex-shrink: 0; }
.station-scope .st-vmsg.is-ok  { color: var(--st-green); }
.station-scope .st-vmsg.is-err { color: var(--st-red); }

/* a form grid that sits INSIDE .panel-body, which already pads. .st-grid
   above carries its own padding because it is meant to replace the body. */
/* Each row of the old pb-* forms became its own .st-grid, and the original
   carried margin-bottom:14px on that row. Without a margin here, two stacked
   grids sit flush and the next row's LABEL lands right under the previous
   row's input — the row-gap only separates rows INSIDE one grid, which is
   why raising it alone changed nothing. */
.station-scope .st-grid.is-flush { padding: 0; margin-bottom: 22px; }
.station-scope .st-grid.is-flush:last-child { margin-bottom: 0; }
/* three or four narrow fields on one line — years / months / days */
.station-scope .st-grid.is-tight { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 9px; }

/* highlighted sub-box grouping fields that belong together — the date of
   birth and the year/month/day it derives, for instance */
.station-scope .st-subbox {
    background: var(--st-surface-2);
    border: 1px solid var(--st-line);
    border-radius: var(--st-r-md);
    padding: 14px 15px; margin-bottom: 15px;
}

/* sliding switch. The pattern is
   <label class="st-switch"><input type="checkbox"><span></span></label>   */
.station-scope .st-switch { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; margin: 0; }
.station-scope .st-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.station-scope .st-switch > span {
    position: absolute; inset: 0; cursor: pointer;
    background: var(--st-line); border-radius: 22px; transition: background .22s ease;
}
.station-scope .st-switch > span::before {
    content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: transform .22s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}
.station-scope .st-switch input:checked + span { background: var(--st-primary); }
.station-scope .st-switch input:checked + span::before { transform: translateX(20px); }
.station-scope .st-switch input:focus-visible + span { outline: 2px solid var(--st-primary); outline-offset: 2px; }
.station-scope .st-switch-row { display: flex; align-items: center; gap: 11px; }
.station-scope .st-switch-row strong { display: block; font-size: 14px; font-weight: 700; color: var(--st-ink); }
.station-scope .st-switch-row small { display: block; font-size: 12.5px; color: var(--st-ink-3); }

/* small preset buttons — "quick set" amounts beside a money field */
.station-scope .st-quick-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 9px; }
.station-scope .st-quick-row > .lbl { font-size: 12.5px; color: var(--st-ink-3); align-self: center; }
.station-scope .st-quick {
    padding: 4px 12px; border-radius: 30px; cursor: pointer;
    border: 1px solid var(--st-line); background: var(--st-surface);
    font-size: 12.5px; font-weight: 700; color: var(--st-ink-2);
    transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.station-scope .st-quick:hover { border-color: var(--st-primary); color: var(--st-primary-d); background: rgba(13, 148, 136, .06); }
.station-scope .st-quick.is-on { border-color: transparent; background: var(--st-grad); color: #fff; }

/* the launchpad tile for the page you are already on */
.station-scope .lp.is-on { border-color: var(--st-primary); background: rgba(13, 148, 136, .06); }

/* coloured icon tile in a panel head — the registration forms use one per
   section to colour-code the sections. Set the colour inline. */
.station-scope .panel-ic {
    width: 30px; height: 30px; border-radius: var(--st-r-sm);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; color: #fff; flex-shrink: 0;
    background: var(--st-primary);
}

/* compact icon tiles — a specialty picker, where there are a dozen choices
   and each needs only an icon and a short name. .st-choice is the roomier
   card for two or three choices that need a sentence of explanation. */
.station-scope .st-choice-grid.is-tiles { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.station-scope .st-choice.is-tile {
    padding: 13px 10px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.station-scope .st-choice.is-tile strong { font-size: 12.5px; margin: 0; }
.station-scope .st-choice.is-tile small { font-size: 12px; color: var(--st-ink-3); }
.station-scope .st-choice-ic {
    width: 36px; height: 36px; border-radius: var(--st-r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; background: var(--st-surface-2); color: var(--st-ink-2);
    transition: background .15s ease, color .15s ease;
}
.station-scope .st-choice.is-on .st-choice-ic { background: var(--st-grad); color: #fff; }
.station-scope .st-choice.is-tile.is-on::after { top: 6px; right: 7px; width: 16px; height: 16px; font-size: 10px; line-height: 16px; }

/* a selected choice that means caution or danger rather than simply "picked"
   — triage priority, where the colour IS the information */
.station-scope .st-choice.is-on.is-warn {
    border-color: var(--st-amber); background: rgba(217, 119, 6, .08);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, .13);
}
.station-scope .st-choice.is-on.is-warn::after   { background: var(--st-amber); }
.station-scope .st-choice.is-on.is-warn .st-choice-ic { background: var(--st-amber); color: #fff; }
.station-scope .st-choice.is-on.is-danger {
    border-color: var(--st-red); background: rgba(220, 38, 38, .07);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .13);
}
.station-scope .st-choice.is-on.is-danger::after { background: var(--st-red); }
.station-scope .st-choice.is-on.is-danger .st-choice-ic { background: var(--st-red); color: #fff; }
/* small round severity marker used beside a priority name */
.station-scope .st-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; flex-shrink: 0; }

/* a vertical stack of fields — replaces a Bootstrap column that held several
   stacked .form-groups, so a converted page keeps the author's grouping
   instead of reflowing into one flat grid. */
.station-scope .st-stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* a section revealed by a switch; jQuery slideDown/slideUp sets display
   inline from here, so this only needs to supply the closed state */
.station-scope .st-collapsible { display: none; }

/* generic hidden marker, for elements JS shows and hides by class rather
   than by inline style */
.station-scope .is-hidden { display: none !important; }

/* centred variant, and the three extra lines a choice card may carry:
   a price, a footnote, and a block revealed once the card is picked */
.station-scope .st-choice.is-centered { text-align: center; }
.station-scope .st-choice.is-centered .st-choice-ic { margin: 0 auto 7px; }
.station-scope .st-choice-amt { font-size: 15px; font-weight: 800; color: var(--st-primary-d); margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.station-scope .st-choice-note { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--st-line); font-size: 12.5px; color: var(--st-ink-3); }
.station-scope .st-choice-more { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--st-line); }

/* plain rule between two groups of fields */
.station-scope .st-divider { border: 0; border-top: 1px solid var(--st-line-soft); margin: 4px 0 18px; }

/* ── 10d. Capture kit ──────────────────────────────────────────────────── */
/* Added for GCC registration, which captures a fingerprint and a photograph
   from hardware and reports what the device is doing. Generic on purpose:
   any page that captures an image or streams a device log needs these. */

/* dashed drop-zone holding a captured image, or its empty state */
.station-scope .st-capture {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 190px; padding: 20px; margin-bottom: 12px;
    border: 2px dashed var(--st-line); border-radius: var(--st-r-md);
    background: var(--st-surface-2); text-align: center;
    transition: border-color .2s ease;
}
.station-scope .st-capture:hover { border-color: var(--st-primary); }
.station-scope .st-capture.is-filled { border-style: solid; border-color: var(--st-primary); }
.station-scope .st-capture img { max-width: 140px; max-height: 170px; border-radius: var(--st-r-sm); }
.station-scope .st-capture-empty { color: var(--st-ink-3); font-size: 13px; }
.station-scope .st-capture-empty i { display: block; margin-bottom: 8px; font-size: 28px; }

/* device / diagnostics log — deliberately dark and monospaced, because it is
   machine output being read for a fault, not prose */
.station-scope .st-console {
    max-height: 180px; overflow-y: auto; margin-top: 10px; padding: 12px;
    background: #1e293b; border-radius: var(--st-r-sm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px; line-height: 1.5;
}
.station-scope .st-console-line { margin: 2px 0; color: #cbd5e1; }
.station-scope .st-console-line.is-ok   { color: #4ade80; }
.station-scope .st-console-line.is-warn { color: #fbbf24; }
.station-scope .st-console-line.is-err  { color: #f87171; }
.station-scope .st-console-line.is-info { color: #93c5fd; }

/* a short machine value shown back to the user — a template id, a hash */
.station-scope .st-code {
    margin-top: 8px; padding: 8px 10px; border-radius: var(--st-r-sm);
    background: var(--st-surface-2); color: var(--st-ink-2);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px; word-break: break-all;
}

/* progress through a multi-step process, shown in the station bar */
.station-scope .st-progress { margin-top: 12px; }
.station-scope .st-progress-track { height: 6px; border-radius: 3px; background: var(--st-line); overflow: hidden; }
.station-scope .st-progress-fill  { height: 100%; border-radius: 3px; background: var(--st-grad); transition: width .3s ease; }
.station-scope .st-progress-label { margin-top: 5px; font-size: 12.5px; color: var(--st-ink-3); }

/* generic chip tones, for a status word that is not one of the named
   workflow states in section 9 */
.station-scope .chip-ok   { background: rgba(22, 163, 74, .12);  color: #15803d; }
.station-scope .chip-warn { background: rgba(217, 119, 6, .13);  color: #b45309; }
.station-scope .chip-info { background: rgba(37, 99, 235, .12);  color: #1d4ed8; }
.station-scope .chip-bad  { background: rgba(220, 38, 38, .12);  color: #b91c1c; }

/* tighter stack, for a column of buttons rather than a column of fields */
.station-scope .st-stack.is-tight { gap: 7px; }
/* launchpad tiles stacked vertically and centred, for plain navigation */
.station-scope .launchpad.is-tiles .lp { flex-direction: column; text-align: center; gap: 8px; }

/* launchpad tile states, for a workflow list where each step is required,
   next, or already satisfied. The left edge carries the state so the row
   reads at a glance without reading the badge. */
.station-scope .lp.is-done { border-left: 3px solid var(--st-green); }
.station-scope .lp.is-done .lp-ic { background: var(--st-green); color: #fff; }
.station-scope .lp.is-req  { border-left: 3px solid var(--st-amber); }
.station-scope .lp.is-req .lp-ic { background: var(--st-amber); color: #fff; }
.station-scope .lp.is-next {
    border-color: var(--st-blue); border-left: 3px solid var(--st-blue);
    background: rgba(37, 99, 235, .06); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.station-scope .lp.is-next .lp-ic { background: var(--st-blue); color: #fff; }

/* a ticked list of things included or already done */
.station-scope .st-checklist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.station-scope .st-checklist li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--st-ink-2); font-weight: 500; }
.station-scope .st-checklist li > svg,
.station-scope .st-checklist li > i { width: 14px; height: 14px; flex-shrink: 0; color: var(--st-green); stroke: var(--st-green); }

/* ── 11. DataTables skin ───────────────────────────────────────────────── */
.station-scope .dataTables_wrapper { padding: 4px 0 0; }
.station-scope .dataTables_wrapper .row { margin: 0; padding: 9px 16px; align-items: center; }
.station-scope .dataTables_wrapper .dataTables_filter { text-align: right; }
.station-scope .dataTables_wrapper .dataTables_filter label { font-size: 0; margin: 0; }
.station-scope .dataTables_wrapper .dataTables_filter input {
    margin: 0; width: 280px; max-width: 100%; font-size: 14.5px; padding: 7px 12px;
    background: var(--st-surface); color: var(--st-ink); border: 1px solid var(--st-line); border-radius: var(--st-r-sm);
}
.station-scope .dataTables_wrapper .dataTables_filter input:focus { outline: none; border-color: var(--st-primary); box-shadow: 0 0 0 3px rgba(13, 148, 136, .14); }
.station-scope .dataTables_wrapper .dataTables_length label,
.station-scope .dataTables_wrapper .dataTables_info { font-size: 12.5px; color: var(--st-ink-3); font-weight: 400; }
.station-scope .dataTables_wrapper .dataTables_length select { background: var(--st-surface); color: var(--st-ink); border: 1px solid var(--st-line); border-radius: var(--st-r-sm); padding: 4px 8px; }
.station-scope .dt-buttons { display: flex; gap: 6.5px; flex-wrap: wrap; margin: 0; }
.station-scope .dt-buttons .dt-button,
.station-scope .dt-buttons .btn {
    background: var(--st-surface) !important; color: var(--st-ink-2) !important; border: 1px solid var(--st-line) !important;
    border-radius: 30px !important; padding: 5px 13px !important; font-size: 12.5px !important; font-weight: 700 !important;
    box-shadow: none !important; margin: 0 !important; background-image: none !important;
}
.station-scope .dt-buttons .dt-button:hover,
.station-scope .dt-buttons .btn:hover { border-color: var(--st-primary) !important; color: var(--st-primary-d) !important; background: rgba(13, 148, 136, .07) !important; }
.station-scope .pagination { gap: 3px; margin: 0; flex-wrap: wrap; display: inline-flex; }
.station-scope .pagination > li > a,
.station-scope .pagination > li > span { border: 1px solid var(--st-line); background: var(--st-surface); color: var(--st-ink-2); border-radius: var(--st-r-sm) !important; font-size: 12.5px; font-weight: 700; padding: 5px 10.5px; margin: 0; }
.station-scope .pagination > .active > a,
.station-scope .pagination > .active > span,
.station-scope .pagination > .active > a:hover { background: var(--st-grad); border-color: transparent; color: #fff; }
.station-scope .pagination > .disabled > a,
.station-scope .pagination > .disabled > span { opacity: .5; }
.station-scope table.dataTable.qtable { margin: 0 !important; border-collapse: separate !important; }
.station-scope table.dataTable.qtable thead .sorting,
.station-scope table.dataTable.qtable thead .sorting_asc,
.station-scope table.dataTable.qtable thead .sorting_desc { cursor: pointer; }
.station-scope .row-actions { display: inline-flex; gap: 5px; }
.station-scope .row-actions .icon-btn { width: 30px; height: 30px; }

/* ── 12. Empty state + toasts ──────────────────────────────────────────── */
.station-scope .empty { text-align: center; padding: 48px 24px; }
.station-scope .empty-ic {
    width: 62px; height: 62px; border-radius: 20px; margin: 0 auto 13px;
    display: flex; align-items: center; justify-content: center;
    background: var(--st-surface-2); border: 1px solid var(--st-line);
    color: var(--st-primary); font-size: 26px;
}
.station-scope .empty h5 { font-size: 16px; font-weight: 800; color: var(--st-ink); margin: 0 0 4px; }
.station-scope .empty p  { font-size: 14px; color: var(--st-ink-3); margin-bottom: 16px; }

/* Toasts live on <body>, outside .station-scope — left unscoped on purpose.
   Both names are already st-/id-prefixed, so there is nothing to collide with. */
#toast-container { position: fixed; top: 68px; right: 22px; z-index: 1080; display: flex; flex-direction: column; gap: 9px; }
.st-toast {
    display: flex; align-items: flex-start; gap: 10.5px;
    min-width: 290px; max-width: 340px;
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-left: 3px solid var(--st-primary);
    border-radius: var(--st-r-md);
    box-shadow: var(--st-sh-3);
    padding: 13px 14.5px;
    animation: st-slide .28s ease-out;
}
.st-toast.is-urgent    { border-left-color: var(--st-amber); }
.st-toast.is-emergency { border-left-color: var(--st-red); }
.st-toast .ic { font-size: 19px; color: var(--st-primary); line-height: 1; margin-top: 1.5px; }
.st-toast .tt { font-size: 14px; font-weight: 800; color: var(--st-ink); }
.st-toast .tb { font-size: 12.5px; color: var(--st-ink-2); }
.st-toast .tm { font-size: 12px; color: var(--st-ink-3); }
.st-toast .x  { border: none; background: none; color: var(--st-ink-3); font-size: 16px; line-height: 1; cursor: pointer; padding: 0; margin-left: auto; }
.st-toast.out { opacity: 0; transform: translateX(110%); transition: all .3s ease; }
@keyframes st-slide { from { transform: translateX(115%); opacity: 0 } to { transform: translateX(0); opacity: 1 } }

/* ── 13. Bootstrap 3 / AdminLTE bridges ────────────────────────────────── */
/* Host widgets that commonly appear inside a converted page. Keeping these
   here means a page does not need its own <style> block for them. */
.station-scope .form-control { border-radius: var(--st-r-sm); border-color: var(--st-line); box-shadow: none; }
.station-scope .form-control:focus { border-color: var(--st-primary); box-shadow: 0 0 0 3px rgba(13, 148, 136, .14); }
/* Bootstrap form widgets. A converted page often keeps raw .form-group /
   .form-control markup on purpose, because its validation JS adds and removes
   .error / .warning on those exact elements — renaming the markup would mean
   rewriting working logic for no gain. Style them here so such a page needs
   no <style> block of its own.

   WHY !important, WHICH IS OTHERWISE BANNED IN THIS FILE.
   backend/usertemplate/assets/css/admin_registration.css is loaded on EVERY
   page by layout/header.php, and it sets `.form-control { height: 48px;
   border: 2px solid …; border-radius: …; box-shadow: none }` and the .btn
   colours with !important — about forty forced declarations in all. An
   !important declaration beats any normal one no matter how specific, so
   without matching it here a converted page silently keeps the old 48px
   bordered input and its red validation state never shows. Among !important
   declarations the normal cascade applies, so these win on specificity.
   Confine !important to the properties that file actually forces. */
.station-scope .form-group { margin-bottom: 15px; }
.station-scope .form-group > label {
    display: block; margin-bottom: 4.5px;
    font-size: 12.5px; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; color: var(--st-ink-3);
}
.station-scope .form-group > label.required::after { content: " *"; color: var(--st-red); font-weight: 800; }
.station-scope .form-control {
    background: var(--st-surface); color: var(--st-ink);
    padding: 8px 11px; font-size: 15.5px; line-height: 1.3;
    height: auto !important;
    border: 1px solid var(--st-line) !important;
    border-radius: var(--st-r-sm) !important;
    box-shadow: none !important;
}
.station-scope .form-control:focus {
    border-color: var(--st-primary) !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .14) !important;
}
.station-scope textarea.form-control { min-height: 84px; resize: vertical; }
.station-scope .form-control.input-sm { padding: 5px 9px; font-size: 14px; }
/* validation states the page's JS toggles */
.station-scope .form-control.error   { border-color: var(--st-red) !important; }
.station-scope .form-control.error:focus   { border-color: var(--st-red) !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .14) !important; }
.station-scope .form-control.warning { border-color: var(--st-amber) !important; }
.station-scope .form-control.warning:focus { border-color: var(--st-amber) !important; box-shadow: 0 0 0 3px rgba(217, 119, 6, .14) !important; }
.station-scope .text-danger { display: block; margin-top: 4px; font-size: 13px; color: var(--st-red); }
.station-scope .text-muted  { color: var(--st-ink-3); }
.station-scope .checkbox { margin: 0; }
.station-scope .checkbox label {
    display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0;
    font-size: 14.5px; font-weight: 600; color: var(--st-ink);
    text-transform: none; letter-spacing: 0;
}
.station-scope .checkbox input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--st-primary); }

/* Bootstrap buttons inside a Station page, so ids and handlers can stay put */
.station-scope .btn {
    border-radius: var(--st-r-sm) !important; font-weight: 700; font-size: 14px;
    box-shadow: none !important; padding: 7px 15px !important;
    border: 1px solid var(--st-line) !important;
}
.station-scope .btn-default { background: var(--st-surface) !important; color: var(--st-ink-2) !important; }
.station-scope .btn-default:hover { background: var(--st-surface-2) !important; color: var(--st-ink) !important; }
.station-scope .btn-success,
.station-scope .btn-primary { background: var(--st-grad) !important; border-color: transparent !important; color: #fff !important; }
.station-scope .btn-success:hover,
.station-scope .btn-primary:hover { filter: brightness(1.05); color: #fff !important; }
.station-scope .btn-info { background: rgba(37, 99, 235, .1) !important; border-color: rgba(37, 99, 235, .3) !important; color: var(--st-blue) !important; }
.station-scope .btn-lg { padding: 10px 20px !important; font-size: 15px; }
.station-scope .btn:disabled, .station-scope .btn.disabled { opacity: .45; box-shadow: none !important; }

.station-scope .select2-container--default .select2-selection--single,
.station-scope .select2-container--default .select2-selection--multiple { border-color: var(--st-line); border-radius: var(--st-r-sm); }
.station-scope .select2-container--default.select2-container--focus .select2-selection--multiple,
.station-scope .select2-container--default .select2-selection--single:focus { border-color: var(--st-primary); }
.station-scope .table > thead > tr > th,
.station-scope .table > tbody > tr > td { border-color: var(--st-line-soft); }
/* AdminLTE's .box is the thing Station UI replaces. If one survives a partial
   conversion, make it at least agree with the panels around it. */
.station-scope .box { border-top-color: var(--st-primary); border-radius: var(--st-r-md); box-shadow: var(--st-sh-1); }

/* A dialog that is NOT a Bootstrap modal: a plain overlay a page shows and
   hides by setting display. Useful where a page already drives its own dialog
   and pulling in bootstrap.modal would change its behaviour. Unscoped for the
   same reason .station-modal is — the overlay is its own scope. */
.st-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 1050;
    background: rgba(17, 24, 39, .45);
    align-items: center; justify-content: center;
    padding: 16px;
}
.st-overlay.is-open { display: flex; }
.st-overlay > .panel {
    width: 860px; max-width: 100%; max-height: 90vh;
    display: flex; flex-direction: column; margin: 0;
}
.st-overlay > .panel > .panel-body { overflow-y: auto; }

/* Bootstrap 3 modals opened from a Station page */
.station-modal .modal-content { background: var(--st-surface); color: var(--st-ink); border: 1px solid var(--st-line); border-radius: var(--st-r-lg); box-shadow: var(--st-sh-3); }
.station-modal .modal-header, .station-modal .modal-footer { border-color: var(--st-line-soft); }
.station-modal .modal-title { font-weight: 800; font-size: 16px; }

/* ── 14. Dark mode ─────────────────────────────────────────────────────── */
/* AdminLTE has no dark theme, so this is opt-in: add .is-dark to the wrapper
   (<div class="station-scope is-dark">). [data-bs-theme="dark"] is kept so
   the file stays diffable against the Prodigy/MediSure originals. */
.station-scope.is-dark,
[data-bs-theme="dark"] .station-scope {
    --st-surface:   #1f232b;
    --st-surface-2: #191c23;
    --st-canvas:    #13161b;
    --st-line:      #2f3542;
    --st-line-soft: #262b35;
    --st-ink:       #eef0f7;
    --st-ink-2:     #b3b8c9;
    --st-ink-3:     #7b8194;
    --st-sh-1:      0 1px 2px rgba(0, 0, 0, .3);
    --st-sh-2:      0 6px 22px rgba(0, 0, 0, .35);
    --st-sh-3:      0 14px 40px rgba(0, 0, 0, .45);
}
/* tinted labels need lighter ink on a dark ground */
.station-scope.is-dark .chip-normal,
.station-scope.is-dark .chip-completed,
.station-scope.is-dark .chip-cash,
.station-scope.is-dark .flag-bad      { color: #fca5a5; }
.station-scope.is-dark .flag-todo     { color: #fcd34d; }
.station-scope.is-dark .flag-ok,
.station-scope.is-dark .cnt-done      { color: #86efac; }
.station-scope.is-dark .chip-urgent,
.station-scope.is-dark .chip-in-service,
.station-scope.is-dark .chip-high,
.station-scope.is-dark .flag-todo,
.station-scope.is-dark .cnt-serv      { color: #fcd34d; }
.station-scope.is-dark .chip-emergency,
.station-scope.is-dark .wait.warn     { color: #fcd34d; }
.station-scope.is-dark .wait.urgent   { color: #fca5a5; }
.station-scope.is-dark .chip-waiting,
.station-scope.is-dark .chip-insurance,
.station-scope.is-dark .chip-medium,
.station-scope.is-dark .cnt-wait      { color: #93c5fd; }
.station-scope.is-dark .chip-transferred,
.station-scope.is-dark .chip-corporate,
.station-scope.is-dark .chip-seen     { color: #c4b5fd; }
.station-scope.is-dark .route         { color: #5eead4; }
.station-scope.is-dark .act-primary   { color: #86efac; }
.station-scope.is-dark .act-edit      { color: #fcd34d; }
.station-scope.is-dark .act-view      { color: #5eead4; }
.station-scope.is-dark .act-next      { color: #93c5fd; }
.station-scope.is-dark .sb-eyebrow    { color: #5eead4; }
.station-scope.is-dark .sec-label a   { color: #5eead4; }
.station-scope.is-dark .pill-live     { color: #86efac; }
.station-scope.is-dark .btn-st:hover  { color: #5eead4; }
.station-scope.is-dark .seg > a:hover { color: #5eead4; }
.station-scope.is-dark .icon-btn:hover{ color: #5eead4; }
.station-scope.is-dark .stat.alarm    { background: rgba(220, 38, 38, .09); }
.station-scope.is-dark .stat.alarm .stat-val { color: #fca5a5; }
.station-scope.is-dark .qtable tbody tr.pri-row-emergency td { background: rgba(220, 38, 38, .09); }
.station-scope.is-dark .st-input:focus { box-shadow: 0 0 0 3px rgba(13, 148, 136, .3); }

/* ── 15. Responsive ────────────────────────────────────────────────────── */
@media (min-width: 992px) {
    /* 50px AdminLTE navbar, not Velzon's 74px header. */
    .station-scope .station-bar { position: sticky; top: var(--st-navbar-h); z-index: 4; }
}
@media (max-width: 991px) {
    .station-scope .sb-clock { display: none; }
    .station-scope .stat { min-width: 50%; border-left: none; border-top: 1px solid var(--st-line-soft); }
    .station-scope .stat:first-child, .station-scope .stat:nth-child(2) { border-top: none; }
    .station-scope .stat:nth-child(even) { border-left: 1px solid var(--st-line-soft); }
    .station-scope .dept-rail { max-height: none; }
}
@media (max-width: 767px) {
    .station-scope { padding: 12px; }
    .station-scope .station-bar { padding: 14.5px 16px; }
    .station-scope .sb-actions { width: 100%; margin-left: 0; }
    .station-scope .launchpad { grid-template-columns: 1fr; }
    .station-scope .stat-val { font-size: 24px; }
    .station-scope .st-grid, .station-scope .st-kv { padding: 13.5px; grid-template-columns: 1fr; }
    .station-scope .st-actions { justify-content: stretch; }
    .station-scope .st-actions .btn-st { flex: 1; justify-content: center; }
    #toast-container { left: 12px; right: 12px; }
    .st-toast { min-width: 0; max-width: none; }
}

/* Touch screens (ward tablets, reception terminals): comfortable targets and
   no zoom-on-focus. Only where the main pointer is a finger.

   NOTE the .swal2-* rules below are deliberately UNSCOPED, because SweetAlert
   attaches its dialog to <body>, outside any .station-scope. Since 2026-11-18
   layout/header.php loads this stylesheet on every page, so on a TOUCH device
   these four rules now apply to every SweetAlert dialog in the system (~284
   views use one). The effect is 44px targets, 16px inputs — which stops iOS
   zooming the page on focus — and a 94vw cap. Nothing changes on a mouse. */
@media (pointer: coarse) {
    .station-scope .btn-st,
    .station-scope .st-tabs a,
    .station-scope .st-toggle .btn-st { min-height: 44px; }
    .station-scope .form-control,
    .station-scope .st-input,
    .swal2-popup .swal2-input, .swal2-popup .swal2-select, .swal2-popup .swal2-textarea { min-height: 44px; font-size: 16px; }
    .swal2-popup .swal2-styled { min-height: 44px; font-size: 16px; }
    .swal2-popup { max-width: 94vw; }
}

/* Print: drop the furniture, keep the data. */
@media print {
    .station-scope { background: #fff; padding: 0; }
    .station-scope .sb-actions, .station-scope .panel-tools,
    .station-scope .acts, .station-scope .launchpad, #toast-container { display: none !important; }
    .station-scope .station-bar, .station-scope .panel, .station-scope .stat-rail { box-shadow: none; break-inside: avoid; }
    .station-scope .qtable thead th { position: static; }
}

/* ── 16. Auth / login ──────────────────────────────────────────────────── */
/* Standalone pages that render outside the AdminLTE shell (login, OTP,
   password reset, lock screen). Same tokens and the same btn-st / st-input /
   st-alert vocabulary as the in-app pages, so the sign-in screen and the
   first screen after it read as one product.

   Page shape:
     <body><div class="station-scope is-auth">
       <div class="st-auth">
         <div class="st-auth-card">
           <aside class="st-auth-brand">…</aside>
           <main class="st-auth-form">…</main>
         </div>
         <p class="st-auth-foot">…</p>
       </div>
     </div></body>                                                          */

.station-scope.is-auth {
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Two faint brand washes instead of a flat grey — the only decorative
       flourish in the system, and only on the way in. */
    background:
        radial-gradient(ellipse at 14% 18%, rgba(13, 148, 136, .10) 0%, transparent 56%),
        radial-gradient(ellipse at 86% 82%, rgba(37, 99, 235, .09) 0%, transparent 56%),
        var(--st-canvas);
}
.st-auth { width: 100%; max-width: 1000px; padding: 26px 16px; }
.st-auth-card {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: var(--st-r-lg);
    box-shadow: var(--st-sh-3);
    overflow: hidden;
}

/* Brand panel */
.st-auth-brand {
    position: relative;
    padding: 35px 32px;
    color: #fff;
    /* Deeper than --st-grad on purpose. The two-stop brand gradient is right
       for a 3px accent bar; across a whole panel it reads washed out and
       leaves white text low-contrast. Three stops, all darker, give the panel
       depth and lift the text well clear of AA. */
    background:
        radial-gradient(ellipse at 18% -10%, rgba(255,255,255,.18) 0%, transparent 55%),
        linear-gradient(150deg, #1d4ed8 0%, #0e6fb8 45%, #0b7f74 100%);
    display: flex; flex-direction: column; gap: 25.5px;
    overflow: hidden;
}
.st-auth-brand::before {
    /* graph-paper wash, clipped by the panel */
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at 30% 0%, #000 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 0%, #000 0%, transparent 72%);
    pointer-events: none;
}
.st-auth-brand > * { position: relative; }
.st-auth-logo {
    /* SOLID white, not a translucent tile. The uploaded logo is a coloured
       mark; on rgba(255,255,255,.16) over a blue panel it disappeared. A white
       card behind it is the only treatment that works for every logo a site
       might upload — dark, coloured or light. */
    width: 76px; height: 76px; border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(255,255,255,.9);
    box-shadow: 0 6px 18px rgba(8, 47, 73, .22);
    display: flex; align-items: center; justify-content: center;
    padding: 9px;
    margin-bottom: 16px;
}
.st-auth-logo img { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
/* The fallback mark has no white card to sit on, so it takes the brand teal. */
.st-auth-logo i { font-size: 31px; color: var(--st-primary); }
.st-auth-brand h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 3px; color: #fff; }
.st-auth-brand .sub { font-size: 14.5px; color: rgba(255,255,255,.9); margin: 0; }
.st-auth-feats { display: flex; flex-direction: column; gap: 12px; }
.st-auth-feat { display: flex; align-items: center; gap: 11px; }
.st-auth-feat .ic {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff;
}
.st-auth-feat > span:last-child { min-width: 0; }
.st-auth-feat .ft { display: block; font-size: 14px; font-weight: 700; color: #fff; line-height: 1.25; }
.st-auth-feat .fd { display: block; font-size: 12px; color: rgba(255,255,255,.72); line-height: 1.35; }
.st-auth-brand .foot {
    margin-top: auto;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 12px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase;
    color: rgba(255,255,255,.72);
    padding-top: 17.5px;
    border-top: 1px solid rgba(255,255,255,.18);
}
.st-auth-brand .foot .sep { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.5); }

/* Form panel */
.st-auth-form { padding: 35px 33.5px; display: flex; flex-direction: column; }
.st-auth-head { margin-bottom: 21px; }
.st-auth-head .eyebrow {
    display: inline-flex; align-items: center; gap: 5.5px;
    font-size: 12px; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: var(--st-primary-d);
    margin-bottom: 5px;
}
.st-auth-head h1 { font-size: 23px; font-weight: 800; letter-spacing: -.025em; color: var(--st-ink); margin: 0 0 8px; }
.st-auth-head .bar { width: 38px; height: 3px; border-radius: 3px; background: var(--st-grad); margin-bottom: 9px; }
.st-auth-head p { font-size: 14px; color: var(--st-ink-2); margin: 0; }

/* Input with a leading icon and an optional trailing button */
.st-input-wrap { position: relative; display: block; }
.st-input-wrap .st-input-ic {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--st-ink-3); font-size: 15.5px; pointer-events: none;
    transition: color .15s ease;
}
.st-input-wrap .st-input { padding-left: 37px; padding-top: 10px; padding-bottom: 10px; }
.st-input-wrap .st-input:focus ~ .st-input-ic { color: var(--st-primary); }
.st-input-wrap .st-input-btn {
    position: absolute; right: 5.5px; top: 50%; transform: translateY(-50%);
    border: none; background: none; cursor: pointer; padding: 5px 7px;
    color: var(--st-ink-3); font-size: 15.5px; line-height: 1;
}
.st-input-wrap .st-input-btn:hover { color: var(--st-primary-d); }
.st-auth-form .st-field { margin-bottom: 15px; }
.st-auth-form .st-field > label { margin-bottom: 5px; }
.st-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 9.5px; }
.st-label-row a { font-size: 12px; font-weight: 700; color: var(--st-primary-d); }
.st-label-row a:hover { text-decoration: underline; }

.btn-st-block { width: 100%; justify-content: center; padding: 10px 16px; font-size: 15px; }
.btn-st.is-busy { pointer-events: none; opacity: .8; }

/* Captcha */
.st-captcha { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.st-captcha .img {
    border: 1px solid var(--st-line); border-radius: var(--st-r-sm);
    background: var(--st-surface-2); padding: 3px 6.5px; line-height: 0;
}
.st-captcha .img img { display: block; }

.st-auth-foot { text-align: center; font-size: 12.5px; color: var(--st-ink-3); margin: 16px 0 0; }
.st-auth-foot b { color: var(--st-ink-2); font-weight: 700; }

@media (max-width: 900px) {
    .st-auth-card { grid-template-columns: 1fr; }
    /* Keep the identity, drop the sales pitch, on a phone. */
    .st-auth-brand { padding: 24px 22.5px; gap: 16px; flex-direction: row; align-items: center; }
    .st-auth-brand .st-auth-logo { margin-bottom: 0; width: 52px; height: 52px; border-radius: 15px; }
    .st-auth-feats, .st-auth-brand .foot { display: none; }
    .st-auth-form { padding: 24px 22.5px; }
}

/* ── 17. Auth: narrow variant (OTP, reset, change password) ────────────── */
/* Mid-flow auth steps. The two-panel sign-in card sells the product; by the
   time someone is typing a code they are already sold, so these steps get a
   single narrow card with a compact brand strip instead — same tokens, same
   gradient, so it still reads as the page they just came from. */

.st-auth-card.is-narrow {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
}
.st-auth-top {
    position: relative;
    background: var(--st-grad);
    color: #fff;
    padding: 24px 25.5px 21.5px;
    text-align: center;
    overflow: hidden;
}
.st-auth-top::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
    pointer-events: none;
}
.st-auth-top > * { position: relative; }
.st-auth-top .st-auth-logo { margin: 0 auto 11px; }
.st-auth-top h1 {
    font-size: 18.5px; font-weight: 800; letter-spacing: -.02em;
    color: #fff; margin: 0 0 3px;
    display: flex; align-items: center; justify-content: center; gap: 7px;
}
.st-auth-top p { font-size: 13px; color: rgba(255,255,255,.82); margin: 0; }

.st-auth-body { padding: 24px 25.5px; }
.st-auth-body .st-field { margin-bottom: 15px; }

/* "we sent a code to ..." note */
.st-auth-note {
    display: flex; gap: 9.5px; align-items: flex-start;
    background: var(--st-surface-2);
    border: 1px solid var(--st-line);
    border-radius: var(--st-r-md);
    padding: 11px 13.5px;
    font-size: 13px; color: var(--st-ink-2);
    margin-bottom: 16px;
}
.st-auth-note i { color: var(--st-primary); font-size: 16px; margin-top: 1.5px; }
.st-auth-note strong { color: var(--st-ink); font-weight: 700; }

/* One-time code field. Deliberately still a single real input, not a row of
   boxes: the boxes pattern needs JS to assemble the value, and this field is
   the form's actual `otp` input, so the page still works if JS fails. */
.st-otp-input {
    width: 100%;
    text-align: center;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: .42em;
    text-indent: .42em; /* centres the text despite the trailing letter-space */
    padding: 11px 8px;
    color: var(--st-ink);
    background: var(--st-surface-2);
    border: 1.5px solid var(--st-line);
    border-radius: var(--st-r-md);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.st-otp-input::placeholder { color: var(--st-line); letter-spacing: .42em; }
.st-otp-input:focus {
    outline: none;
    background: var(--st-surface);
    border-color: var(--st-primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, .14);
}
.st-otp-input.is-invalid { border-color: var(--st-red); }
.st-otp-input.is-invalid:focus { border-color: var(--st-red); box-shadow: 0 0 0 4px rgba(220, 38, 38, .14); }

/* resend / back row */
.st-auth-links {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin-top: 17.5px; padding-top: 15px;
    border-top: 1px solid var(--st-line-soft);
}
.st-auth-links a {
    display: inline-flex; align-items: center; gap: 5.5px;
    font-size: 13px; font-weight: 700; color: var(--st-primary-d);
}
.st-auth-links a:hover { text-decoration: underline; }
.st-auth-links a.muted { color: var(--st-ink-3); }
.st-auth-links a.muted:hover { color: var(--st-ink-2); }

@media (max-width: 575.98px) {
    .st-auth-top, .st-auth-body { padding-left: 19px; padding-right: 19px; }
    .st-otp-input { font-size: 22px; letter-spacing: .3em; text-indent: .3em; }
    .st-auth-links { justify-content: center; }
}
