/* ==========================================================================
   Prodigy Station UI
   Shared design system for the front-line "station" dashboards
   (Reception / Nursing). Loaded after app.min.css.

   Sections:
     1. Tokens
     2. Station bar (page identity + actions)
     3. Stat rail (segmented KPI strip)
     4. Launchpad (quick action links)
     5. Panels (section cards)
     6. Dept rail (left column list)
     7. Queue table
     8. Chips, meters, icon buttons
     9. Empty states + toasts
    10. Dark mode
    11. Responsive
   ========================================================================== */

/* ── 1. Tokens ─────────────────────────────────────────────────────────── */
:root {
    --st-sage:        #8FBC8F;
    --st-sage-d:      #5f9060;
    --st-teal:        #20B2AA;
    --st-teal-d:      #14807a;
    --st-grad:        linear-gradient(135deg, #8FBC8F 0%, #20B2AA 100%);

    --st-blue:        #3b82f6;
    --st-amber:       #f59e0b;
    --st-green:       #16a34a;
    --st-red:         #ef4444;
    --st-violet:      #7c69ef;

    --st-surface:     #ffffff;
    --st-surface-2:   #f6faf9;
    --st-canvas:      #eef4f3;
    --st-line:        #e2ecea;
    --st-line-soft:   #eef4f3;

    --st-ink:         #14262b;
    --st-ink-2:       #4a6b6b;
    --st-ink-3:       #8aa5a3;

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

    --st-sh-1:        0 1px 2px rgba(20, 60, 60, .05);
    --st-sh-2:        0 6px 22px rgba(20, 90, 90, .09);
    --st-sh-3:        0 14px 40px rgba(20, 90, 90, .14);
}

body { background: var(--st-canvas); }
.page-content { padding-bottom: 2.5rem; }

.station-scope,
.station-scope .station-bar,
.station-scope .qtable { font-variant-numeric: tabular-nums; }

/* ── 2. Station bar ────────────────────────────────────────────────────── */
.station-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: var(--st-r-lg);
    padding: 1.05rem 1.35rem;
    margin-bottom: 1.15rem;
    box-shadow: var(--st-sh-1);
    overflow: hidden;
}
/* brand hairline instead of a full gradient slab */
.station-bar::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--st-grad);
}
.station-bar::after {
    content: '';
    position: absolute;
    top: -120px; right: -80px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(32, 178, 170, .07) 0%, transparent 65%);
    pointer-events: none;
}

.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: 1.55rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(32, 178, 170, .28);
}
.sb-id { min-width: 0; flex: 1 1 260px; position: relative; }
.sb-eyebrow {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .66rem; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: var(--st-teal-d);
    margin-bottom: .18rem;
}
.sb-title {
    font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em;
    color: var(--st-ink); margin: 0 0 .1rem;
    line-height: 1.15;
}
.sb-meta { font-size: .8rem; color: var(--st-ink-2); margin: 0; }
.sb-actions {
    display: flex; align-items: center; gap: .5rem;
    flex-wrap: wrap; margin-left: auto; position: relative;
}

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

.pill-live {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(22, 163, 74, .1);
    color: #15803d;
    border: 1px solid rgba(22, 163, 74, .2);
    border-radius: 30px;
    padding: .3rem .7rem;
    font-size: .72rem; font-weight: 800; letter-spacing: .04em;
}
.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 } }

.btn-st {
    display: inline-flex; align-items: center; gap: .38rem;
    border-radius: 30px; padding: .42rem .95rem;
    font-size: .78rem; 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;
}
.btn-st:hover { border-color: var(--st-teal); color: var(--st-teal-d); background: rgba(32,178,170,.07); }
.btn-st-solid {
    background: var(--st-grad); border-color: transparent; color: #fff;
    box-shadow: 0 4px 12px rgba(32, 178, 170, .28);
}
.btn-st-solid:hover { color: #fff; filter: brightness(1.05); box-shadow: 0 6px 18px rgba(32,178,170,.34); }

/* ── 3. Stat rail ──────────────────────────────────────────────────────── */
.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: 1.15rem;
}
.stat {
    flex: 1 1 0;
    min-width: 160px;
    padding: 1rem 1.15rem 1.05rem;
    border-left: 1px solid var(--st-line-soft);
    text-decoration: none;
    display: block;
    position: relative;
    transition: background .18s ease;
}
.stat:first-child { border-left: none; }
a.stat:hover { background: var(--st-surface-2); }
a.stat::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: var(--tone, var(--st-teal));
    transform: scaleX(0); transform-origin: left;
    transition: transform .2s ease;
}
a.stat:hover::after { transform: scaleX(1); }
.stat.is-on { background: var(--st-surface-2); }
.stat.is-on::after { transform: scaleX(1); }

.stat-top {
    display: flex; align-items: center; gap: .42rem;
    font-size: .67rem; font-weight: 800; letter-spacing: .09em;
    text-transform: uppercase; color: var(--st-ink-3);
    margin-bottom: .35rem;
}
.stat-top .tag {
    width: 7px; height: 7px; border-radius: 2px;
    background: var(--tone, var(--st-teal)); flex-shrink: 0;
}
.stat-val {
    font-size: 1.85rem; font-weight: 800; line-height: 1;
    color: var(--st-ink); letter-spacing: -.03em;
}
.stat-sub { font-size: .72rem; color: var(--st-ink-3); margin-top: .3rem; }
.stat-meter {
    height: 3px; border-radius: 3px;
    background: var(--st-line-soft);
    margin-top: .55rem; overflow: hidden;
}
.stat-meter > i {
    display: block; height: 100%; border-radius: 3px;
    background: var(--tone, var(--st-teal));
}
.stat.alarm { background: rgba(239, 68, 68, .05); }
.stat.alarm .stat-val { color: #b91c1c; }

/* tone helpers — --tone drives accents, --tone-soft the tinted fills */
.t-teal   { --tone: var(--st-teal);   --tone-soft: rgba(32, 178, 170, .13); }
.t-blue   { --tone: var(--st-blue);   --tone-soft: rgba(59, 130, 246, .13); }
.t-amber  { --tone: var(--st-amber);  --tone-soft: rgba(245, 158, 11, .15); }
.t-green  { --tone: var(--st-green);  --tone-soft: rgba(22, 163, 74, .13); }
.t-red    { --tone: var(--st-red);    --tone-soft: rgba(239, 68, 68, .13); }
.t-sage   { --tone: var(--st-sage-d); --tone-soft: rgba(143, 188, 143, .22); }
.t-violet { --tone: var(--st-violet); --tone-soft: rgba(124, 105, 239, .13); }

/* ── 4. Launchpad ──────────────────────────────────────────────────────── */
.sec-label {
    display: flex; align-items: center; gap: .55rem;
    font-size: .72rem; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: var(--st-ink-3);
    margin: 1.4rem 0 .7rem;
}
.sec-label .bar { width: 16px; height: 3px; border-radius: 3px; background: var(--st-grad); }
.sec-label .rule { flex: 1; height: 1px; background: var(--st-line); }
.sec-label a { font-size: .74rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--st-teal-d); text-decoration: none; }
.sec-label a:hover { text-decoration: underline; }

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

/* ── 5. Panels ─────────────────────────────────────────────────────────── */
.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;
}
.panel-head {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    padding: .85rem 1.1rem;
    background: var(--st-surface-2);
    border-bottom: 1px solid var(--st-line);
}
.panel-title {
    display: flex; align-items: center; gap: .5rem;
    font-size: .87rem; font-weight: 800; color: var(--st-ink); margin: 0;
}
.panel-title i { color: var(--st-teal); }
.panel-title .count {
    background: var(--st-grad); color: #fff;
    border-radius: 30px; padding: .1rem .55rem;
    font-size: .7rem; font-weight: 800;
}
.panel-tools { margin-left: auto; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.panel-note {
    padding: .55rem 1.1rem;
    background: rgba(143, 188, 143, .1);
    border-bottom: 1px solid var(--st-line);
    font-size: .74rem; color: var(--st-ink-2);
}
.panel-foot {
    padding: .6rem 1.1rem;
    border-top: 1px solid var(--st-line);
    background: var(--st-surface-2);
    font-size: .73rem; color: var(--st-ink-3);
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}

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

.sel-st {
    border: 1px solid var(--st-line);
    background: var(--st-surface);
    color: var(--st-ink-2);
    border-radius: 30px;
    padding: .3rem 1.9rem .3rem .8rem;
    font-size: .74rem; font-weight: 700;
    outline: none; cursor: pointer;
    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='%238aa5a3'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;
    background-size: 12px;
}
.sel-st:focus { border-color: var(--st-teal); }

.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;
    transition: all .18s ease;
}
.icon-btn:hover { border-color: var(--st-teal); color: var(--st-teal-d); transform: rotate(30deg); }

/* ── 6. Dept rail ──────────────────────────────────────────────────────── */
.dept-rail { padding: .55rem; display: flex; flex-direction: column; gap: .3rem; max-height: 560px; overflow-y: auto; }
.dept {
    display: block; width: 100%; text-align: left;
    border: 1px solid transparent; background: transparent;
    border-radius: var(--st-r-md);
    padding: .6rem .7rem;
    cursor: pointer;
    transition: all .18s ease;
}
.dept:hover { background: var(--st-surface-2); border-color: var(--st-line); }
.dept.on {
    background: rgba(32, 178, 170, .08);
    border-color: rgba(32, 178, 170, .3);
    box-shadow: inset 3px 0 0 var(--st-teal);
}
.dept-name {
    display: flex; align-items: center; gap: .4rem;
    font-size: .81rem; font-weight: 700; color: var(--st-ink);
    margin-bottom: .35rem;
}
.dept-name .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dept-counts { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.cnt {
    display: inline-flex; align-items: center; gap: .22rem;
    border-radius: 6px; padding: .1rem .42rem;
    font-size: .67rem; font-weight: 800;
}
.cnt-wait { background: rgba(59,130,246,.12);  color: #1d4ed8; }
.cnt-serv { background: rgba(245,158,11,.14);  color: #92400e; }
.cnt-done { background: rgba(22,163,74,.12);   color: #15803d; }
.cnt-mut  { background: var(--st-surface-2);   color: var(--st-ink-3); }
.cap-meter { height: 3px; border-radius: 3px; background: var(--st-line-soft); margin-top: .45rem; overflow: hidden; }
.cap-meter > i { display: block; height: 100%; border-radius: 3px; }

/* ── 7. Queue table ────────────────────────────────────────────────────── */
.qwrap { overflow-x: auto; }
.qtable { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 860px; }
.qtable thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--st-surface-2);
    padding: .6rem .9rem;
    text-align: left;
    font-size: .65rem; font-weight: 800; letter-spacing: .1em;
    text-transform: uppercase; color: var(--st-ink-3);
    border-bottom: 1px solid var(--st-line);
    white-space: nowrap;
}
.qtable tbody td {
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--st-line-soft);
    vertical-align: middle;
    font-size: .82rem; color: var(--st-ink-2);
}
.qtable tbody tr { transition: background .15s ease; }
.qtable tbody tr:hover td { background: var(--st-surface-2); }
.qtable tbody tr:last-child td { border-bottom: none; }
.qtable tbody tr.pri-row-urgent    td:first-child { box-shadow: inset 3px 0 0 var(--st-amber); }
.qtable tbody tr.pri-row-emergency td:first-child { box-shadow: inset 3px 0 0 var(--st-red); }
.qtable tbody tr.pri-row-emergency td { background: rgba(239, 68, 68, .035); }

.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: .72rem; font-weight: 800; color: var(--st-ink-3);
}
.who { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.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: .92rem;
}
.avatar.emergency { background: linear-gradient(135deg, #f87171, #dc2626); }
.avatar.urgent    { background: linear-gradient(135deg, #fbbf24, #d97706); }
.who-txt { min-width: 0; }
.who-name { font-size: .84rem; font-weight: 700; color: var(--st-ink); line-height: 1.25; }
.who-meta { font-size: .7rem; color: var(--st-ink-3); margin-top: .05rem; }
.who-note {
    font-size: .7rem; color: var(--st-ink-3); margin-top: .05rem;
    max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tag-vip {
    display: inline-block; margin-left: .3rem;
    background: rgba(245, 158, 11, .16); color: #92400e;
    border-radius: 5px; padding: 0 .3rem;
    font-size: .58rem; font-weight: 800; letter-spacing: .06em;
    vertical-align: middle;
}

/* ── 8. Chips / meters / actions ───────────────────────────────────────── */
.chip {
    display: inline-flex; align-items: center; gap: .25rem;
    border-radius: 30px; padding: .16rem .6rem;
    font-size: .67rem; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; white-space: nowrap;
}
.chip-normal     { background: rgba(22,163,74,.11);  color: #15803d; }
.chip-urgent     { background: rgba(245,158,11,.16); color: #92400e; }
.chip-emergency  { background: rgba(239,68,68,.13);  color: #b91c1c; }
.chip-waiting    { background: rgba(59,130,246,.12); color: #1d4ed8; }
.chip-in-service { background: rgba(245,158,11,.16); color: #92400e; }
.chip-completed  { background: rgba(22,163,74,.11);  color: #15803d; }
.chip-cancelled  { background: var(--st-surface-2);  color: var(--st-ink-3); }
.chip-no-show    { background: var(--st-surface-2);  color: var(--st-ink-3); }
.chip-transferred{ background: rgba(124,105,239,.12);color: #5b45d6; }
.chip-seen       { background: rgba(124,105,239,.12);color: #5b45d6; }
.chip-soft       { background: var(--st-surface-2); color: var(--st-ink-2); border: 1px solid var(--st-line); }
.chip-pos        { background: var(--st-grad); color: #fff; }

.route {
    display: inline-flex; align-items: center; gap: .3rem;
    background: rgba(32,178,170,.09);
    border: 1px solid rgba(32,178,170,.22);
    color: var(--st-teal-d);
    border-radius: 30px; padding: .16rem .6rem;
    font-size: .7rem; font-weight: 700; white-space: nowrap;
}
.route-sub { font-size: .65rem; color: var(--st-ink-3); margin-top: .15rem; }
.route-none { font-size: .72rem; color: var(--st-ink-3); font-style: italic; }

.wait { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; color: var(--st-ink-2); }
.wait.warn { color: #b91c1c; font-weight: 800; }
.wait.warn i { animation: st-tick 2s infinite; }
@keyframes st-tick { 0%,100% { opacity: 1 } 50% { opacity: .4 } }

.flag-ok   { font-size: .72rem; font-weight: 800; color: #15803d; }
.flag-todo { font-size: .72rem; font-weight: 800; color: #b45309; }

.acts { display: inline-flex; gap: .25rem; }
.act {
    width: 29px; height: 29px; border-radius: var(--st-r-sm);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .82rem; text-decoration: none; border: 1px solid transparent;
    transition: all .18s ease;
}
.act:hover { transform: translateY(-2px); box-shadow: var(--st-sh-2); }
.act-primary { background: rgba(22,163,74,.12);  color: #15803d; }
.act-edit    { background: rgba(245,158,11,.15); color: #92400e; }
.act-view    { background: rgba(32,178,170,.12); color: var(--st-teal-d); }
.act-next    { background: rgba(59,130,246,.12); color: #1d4ed8; }

/* ── 9. Empty state + toasts ───────────────────────────────────────────── */
.empty { text-align: center; padding: 3rem 1.5rem; }
.empty-ic {
    width: 62px; height: 62px; border-radius: 20px; margin: 0 auto .8rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--st-surface-2); border: 1px solid var(--st-line);
    color: var(--st-teal); font-size: 1.7rem;
}
.empty h5 { font-size: .95rem; font-weight: 800; color: var(--st-ink); margin-bottom: .25rem; }
.empty p  { font-size: .8rem; color: var(--st-ink-3); margin-bottom: 1rem; }

#toast-container { position: fixed; top: 88px; right: 22px; z-index: 1080; display: flex; flex-direction: column; gap: .55rem; }
.st-toast {
    display: flex; align-items: flex-start; gap: .65rem;
    min-width: 290px; max-width: 340px;
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-left: 3px solid var(--st-teal);
    border-radius: var(--st-r-md);
    box-shadow: var(--st-sh-3);
    padding: .8rem .9rem;
    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: 1.2rem; color: var(--st-teal); line-height: 1; margin-top: .1rem; }
.st-toast .tt { font-size: .82rem; font-weight: 800; color: var(--st-ink); }
.st-toast .tb { font-size: .75rem; color: var(--st-ink-2); }
.st-toast .tm { font-size: .68rem; color: var(--st-ink-3); }
.st-toast .x  { border: none; background: none; color: var(--st-ink-3); font-size: 1rem; line-height: 1; cursor: pointer; padding: 0; }
.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 } }

/* ── 10. Dark mode ─────────────────────────────────────────────────────── */
[data-bs-theme="dark"] {
    --st-surface:   #212e33;
    --st-surface-2: #1b262a;
    --st-canvas:    #161f22;
    --st-line:      #2c3c41;
    --st-line-soft: #253338;
    --st-ink:       #e6f0ee;
    --st-ink-2:     #a7c0bc;
    --st-ink-3:     #778f8c;
    --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 */
[data-bs-theme="dark"] .chip-normal,
[data-bs-theme="dark"] .chip-completed,
[data-bs-theme="dark"] .flag-ok,
[data-bs-theme="dark"] .cnt-done      { color: #86efac; }
[data-bs-theme="dark"] .chip-urgent,
[data-bs-theme="dark"] .chip-in-service,
[data-bs-theme="dark"] .flag-todo,
[data-bs-theme="dark"] .cnt-serv      { color: #fcd34d; }
[data-bs-theme="dark"] .chip-emergency,
[data-bs-theme="dark"] .wait.warn     { color: #fca5a5; }
[data-bs-theme="dark"] .chip-waiting,
[data-bs-theme="dark"] .cnt-wait      { color: #93c5fd; }
[data-bs-theme="dark"] .chip-transferred,
[data-bs-theme="dark"] .chip-seen     { color: #c4b5fd; }
[data-bs-theme="dark"] .route         { color: #5eead4; }
[data-bs-theme="dark"] .act-primary   { color: #86efac; }
[data-bs-theme="dark"] .act-edit      { color: #fcd34d; }
[data-bs-theme="dark"] .act-view      { color: #5eead4; }
[data-bs-theme="dark"] .act-next      { color: #93c5fd; }
[data-bs-theme="dark"] .sb-eyebrow    { color: #5eead4; }
[data-bs-theme="dark"] .sec-label a   { color: #5eead4; }
[data-bs-theme="dark"] .pill-live     { color: #86efac; }
[data-bs-theme="dark"] .btn-st:hover  { color: #5eead4; }
[data-bs-theme="dark"] .seg > a:hover { color: #5eead4; }
[data-bs-theme="dark"] .icon-btn:hover{ color: #5eead4; }
[data-bs-theme="dark"] .panel-note { background: rgba(143, 188, 143, .06); }
[data-bs-theme="dark"] .qtable tbody tr.pri-row-emergency td { background: rgba(239, 68, 68, .07); }
[data-bs-theme="dark"] .stat.alarm { background: rgba(239, 68, 68, .09); }
[data-bs-theme="dark"] .stat.alarm .stat-val { color: #fca5a5; }

/* ── 11. Responsive ────────────────────────────────────────────────────── */
@media (min-width: 992px) {
    .station-bar { position: sticky; top: 74px; z-index: 4; }
}
@media (max-width: 991.98px) {
    .sb-clock { display: none; }
    .stat { min-width: 50%; border-left: none; border-top: 1px solid var(--st-line-soft); }
    .stat:first-child, .stat:nth-child(2) { border-top: none; }
    .stat:nth-child(even) { border-left: 1px solid var(--st-line-soft); }
    .dept-rail { max-height: none; }
}
@media (max-width: 575.98px) {
    .station-bar { padding: .9rem 1rem; }
    .sb-actions { width: 100%; margin-left: 0; }
    .launchpad { grid-template-columns: 1fr; }
    .stat-val { font-size: 1.55rem; }
    #toast-container { left: 12px; right: 12px; }
    .st-toast { min-width: 0; max-width: none; }
}
