/* Compact workspace. shadcn/ui's neutral control grammar, expressed in the
   existing Blade components with Exposcale's own brand and local type. */
:root {
  --bg: #101014; --bg-deep: #0c0c10; --sidebar: #141418;
  --panel: #17171c; --panel-hi: #17171c; --panel-2: #212127;
  --text: #f4f4f5; --text-2: #dedee4; --muted: #a1a1ad; --muted-2: #858591;
  --line: #2b2b33; --line-2: #36363f;
  --ground: var(--bg); --card: var(--panel); --card-hi: var(--panel-2);
  --card-in: var(--bg-deep); --hairline: var(--line); --hairline-2: var(--line-2);
  --card-edge: none; --glass-bg: var(--bg); --glass-line: var(--line);
  --ops-surface: var(--panel); --ops-edge: var(--line); --ops-muted: var(--muted);
}
html { scrollbar-color: #555560 var(--bg); scrollbar-width: thin; scroll-padding-top: 72px; }
body { background: var(--bg); font-size: 13px; line-height: 1.5; }
body::before, body::after, .shell::before, .main::before, .hud-sweep { display: none; }
a { text-underline-offset: 3px; }
[hidden] { display: none !important; }
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; width: auto; padding: 20px 12px 12px; background: var(--sidebar); border-right: 1px solid var(--line); overflow-y: auto; gap: 3px; }
.brand { margin: 0 8px 25px; padding: 0; gap: 10px; }
.brand img.brand-mark { width: 28px; height: 28px; box-shadow: none; border: 0; border-radius: 6px; }
.brand .brand-col { display: flex; }
.brand img.brand-word { display: block; width: 105px; }
.brand .brand-sub { display: block; font: 11px/1.2 var(--sans); letter-spacing: 0; color: var(--muted); }
.nav-group { margin: 0 0 7px; }
.nav-group > summary { display: flex; gap: 9px; align-items: center; padding: 7px 8px; min-height: 34px; color: var(--muted); font-weight: 500; cursor: pointer; list-style: none; border-radius: 6px; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: ''; width: 5px; height: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(-45deg); margin-left: auto; }
.nav-group[open] > summary::after { transform: rotate(45deg); }
.nav-group > summary:hover { background: var(--panel-2); color: var(--text); }
.nav-members { margin-left: 15px; padding-left: 10px; border-left: 1px solid var(--line); }
.sidebar .ni { display: flex; align-items: center; min-height: 34px; padding: 6px 10px; margin: 2px 0; border-radius: 6px; font: 450 12px/1.5 var(--sans); text-transform: none; letter-spacing: 0; color: var(--text-2); }
.sidebar .ni.active { color: #d6bdff; background: #292135; box-shadow: none; }
.sidebar .ni::before, .sidebar .ni::after { display: none; }
.sidebar .ni:hover { background: var(--panel-2); }
.sidebar-foot { margin-top: auto; flex-wrap: wrap; gap: 8px; padding: 14px 6px 0; }
.sidebar-foot .sidebar-who { font-family: var(--sans); font-size: 11px; }
.sidebar-foot form { width: 100%; }
.sidebar-foot form .btn { width: 100%; justify-content: flex-start; color: var(--muted); border: 0; background: transparent; }
.foot-avatar { width: 26px; height: 26px; flex-basis: 26px; font-family: var(--sans); border: 0; }
.foot-avatar::after { display: none; }
.main { margin: 0; width: 100%; max-width: none; min-width: 0; padding: 0 24px 40px; }
.topbar { display: flex; gap: 12px; min-height: 56px; margin: 0 -24px 20px; padding: 10px 24px; background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid var(--line); box-shadow: none; }
.topbar .jump { flex: 1; min-width: 0; max-width: 420px; margin-right: auto; }
.topbar .jump-input { width: 100%; min-height: 32px; font: 12px var(--sans); border-radius: 6px; background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
.topbar .jump-kbd { right: 8px; }
.jump-results { background: var(--panel); border-radius: 8px; }
.page-head, .page-head.one-row { margin: 0 0 16px; padding: 0; gap: 12px; }
h1, .page-head h1 { font: 600 23px/1.25 var(--sans); letter-spacing: -.025em; color: var(--text); }
h2, .panel h2, .panel-title { font: 550 14px/1.4 var(--sans); letter-spacing: -.01em; }
.panel h2::before, .panel-title::before { display: none; }
.page-head p { margin: 5px 0 0; max-width: 75ch; font-size: 12px; }
.panel { padding: 16px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: none; }
.panel > .panel { border: 0; padding: 12px 0; background: transparent; }
.panel:hover, .tile:hover { box-shadow: none; transform: none; }
.panel > p.small, .panel > p.muted { max-width: 75ch; }
.kpi-row { gap: 0; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.kpi-row .tile { border: 0; border-radius: 0; box-shadow: none; padding: 12px 16px; background: transparent; min-height: 88px; }
.kpi-row .tile + .tile { border-left: 1px solid var(--line); }
.kpi-row .tile .n, .tile .n { font: 550 23px/1.3 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile-ico { display: none; }
.kpi-row .tile .l { font-size: 12px; }
.tabs { width: max-content; max-width: 100%; display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin: 0 0 16px; background: var(--panel-2); border: 0; border-radius: 7px; }
.tab { padding: 5px 11px; min-height: 30px; font: 500 12px/1.5 var(--sans); color: var(--muted); border: 0; border-radius: 5px; }
.tab.active { color: var(--text); background: #37333f; box-shadow: none; }
.btn, button.btn, summary.btn { min-height: 32px; padding: 6px 11px; border-radius: 6px; border: 1px solid var(--line-2); font: 500 12px/1.5 var(--sans); background: var(--panel); color: var(--text); box-shadow: none; text-transform: none; letter-spacing: 0; }
.btn.primary { background: #8050d3; border-color: #8050d3; color: white; }
.btn:hover { background: var(--panel-2); box-shadow: none; transform: none; }
.btn.primary:hover { background: #9161e4; }
.btn.danger { color: #fda4a4; border-color: #693e44; background: #302025; }
.btn.small { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input:not([type=checkbox]):not([type=radio]), select, textarea { background: var(--bg-deep); border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 10px; font: 13px/1.5 var(--sans); color: var(--text); box-shadow: none; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
.field { margin-bottom: 14px; }
.field label { font: 500 12px/1.5 var(--sans); margin-bottom: 6px; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { font-size: 12px; }
thead th, table.grid-a1 thead th { padding: 9px 12px; font: 500 11px/1.4 var(--sans); letter-spacing: 0; text-transform: none; background: #1d1d23; color: #b6b6c1; }
tbody td, tbody th { padding: 10px 12px; border-bottom-color: var(--line); }
td.num, th.num { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chip, .issue-badge { font: 500 11px/1.35 var(--sans); letter-spacing: 0; text-transform: none; border-radius: 5px; padding: 3px 6px; box-shadow: none; }
.notice, .attention { border-radius: 7px; padding: 11px 14px; font-size: 12px; box-shadow: none; }
.attention.att-banner > summary { border-left: 0; background: var(--warn-tint); }
.winrow { display: block; margin-bottom: 12px; }
.winpick { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; margin-bottom: 10px; background: transparent; border: 0; box-shadow: none; }
.winpick-presets, .winpick-range { gap: 5px; }
.winpick-range input { width: 135px; min-height: 32px; }
.winpick-floor { flex-basis: 100%; margin: 0; }
.today-stamps { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0 12px; font-family: var(--sans); font-size: 11px; }
.ops { margin: 12px 0 20px; }
.ops-head { padding: 0 0 10px; gap: 12px; align-items: center; }
.ops-head h2 { font: 550 15px/1.3 var(--sans); letter-spacing: -.01em; margin: 0 0 3px; }
.ops-head p { font-size: 11px; }
.ops-actions { gap: 6px; }
.ops-actions .btn { min-height: 30px; padding: 4px 9px; font-size: 11px; }
.ops-basis { font-size: 11px; margin: 0 0 10px; }
.ops-basis > summary { cursor: pointer; width: max-content; }
.ops-basis p { margin: 6px 0; }
.ops-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); border-radius: 8px; }
.ops-metric { position: relative; padding: 13px 14px 11px; border: 0; border-right: 1px solid var(--line); }
.ops-metric:last-child { border-right: 0; }
.ops-metric h3 { font-size: 11px; margin: 0 0 7px; }
.ops-number { font: 550 clamp(18px, 1.65vw, 25px)/1.3 var(--sans); letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.ops-contribution { background: #211c2b; }
.ops-metric-foot { margin-top: 7px; font-size: 10px; }
.ops-metric-info { font-size: 10px; color: var(--muted); margin-top: 3px; }
.ops-metric-info summary { cursor: pointer; }
.ops-metric-info p { min-height: 0; margin: 6px 0; }
.ops-signal { gap: 6px 12px; padding: 10px 0; font-size: 11px; }
.ops-chart { padding: 14px 16px; margin: 4px 0 16px; border-radius: 8px; }
.ops-chart svg { min-width: 580px; max-height: 180px; }
.ops-section-head { margin: 14px 0 10px; gap: 10px; }
.ops-section-head h3 { font-size: 13px; font-weight: 550; }
.ops-section-head p { font-size: 11px; }
.ops-store-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.ops-store { padding: 10px 14px; gap: 16px; grid-template-columns: minmax(150px, 2fr) repeat(4, minmax(85px, 1fr)); }
.ops-store:last-child { border-bottom: 0; }
.ops-store div { gap: 3px; }
.ops-store strong { font-size: 12px; }
.ops-store span { font-size: 10px; }
.ops-days { border-top: 1px solid var(--line); }
.section-disclosure { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; cursor: pointer; font-size: 12px; font-weight: 500; }
.section-disclosure span { color: var(--muted); font-size: 11px; font-weight: 400; }
.ops-days td { padding: 9px 12px; }
.ops-deep { margin: 16px 0; }
.ops-deep > summary { padding: 13px 0; font-size: 12px; }
.ops-options { top: 38px; width: 280px; padding: 16px; border-radius: 8px; background: #24242c; max-height: min(600px, 75vh); overflow-y: auto; }
.ops-options label { font-size: 12px; padding: 4px 0; }
.checklist { display: grid; grid-template-columns: 1fr; gap: 0; }
.checklist .ck-card { padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.ck-summary { min-height: 48px; padding: 10px 2px; }
.ck-summary strong { font-size: 13px; }
.ck-summary::before { content: '+'; color: var(--muted); }
.ck-card[open] > .ck-summary::before { content: '−'; }
.ck-body { padding: 8px 0 18px; max-width: 760px; }
.ck-guide { padding: 0; }
.ck-step { padding: 12px 0; }
.ops-edit-form { gap: 14px; margin-top: 16px; }
.ops-intro { padding: 6px 0 14px; }
.import-status { position: relative; margin-left: auto; }
.import-status summary { list-style: none; cursor: pointer; white-space: nowrap; }
.import-status summary::-webkit-details-marker { display: none; }
.import-status-menu { position: absolute; top: 40px; right: 0; z-index: 45; width: min(360px, calc(100vw - 32px)); background: #24242c; padding: 16px; border-radius: 8px; box-shadow: 0 12px 32px #0006; max-height: 70vh; overflow: auto; }
.import-status-item { padding: 10px 0; border-top: 1px solid var(--line-2); }
.import-status-item strong, .import-status-item span { display: block; font-size: 12px; }
.import-status-item span { color: #b8b8c5; margin-top: 3px; }
.import-status[data-active=true] > summary { color: #d6bdff; border-color: #65517e; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; background: var(--brand); color: white; }
.skip-link:focus { top: 10px; }
.nav-toggle { display: none; }
.guest-wrap, .auth-wrap { background: var(--bg); }
.auth-card { background: var(--panel); border-radius: 10px; box-shadow: none; }
.stagger > *, .main > * { animation: none; opacity: 1; transform: none; }
@media (max-width: 1150px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr); }
  .main { padding: 0 18px 32px; }
  .topbar { margin: 0 -18px 16px; padding: 10px 18px; }
  .ops-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-metric { border-bottom: 1px solid var(--line); }
  .ops-store { grid-template-columns: minmax(150px, 2fr) repeat(4, minmax(70px, 1fr)); gap: 10px; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: relative; height: auto; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 14px; }
  .sidebar .brand { margin-bottom: 15px; }
  .sidebar .ni { display: flex; font-size: 13px; justify-content: flex-start; }
  .sidebar .sidebar-foot { display: flex; }
  .sidebar .brand-col { display: flex; }
  .sidebar .brand-word, .sidebar .brand-sub { display: block; }
  .has-workspace-nav .sidebar { display: none; }
  .has-workspace-nav.nav-open .sidebar { display: flex; flex-direction: column; }
  .nav-toggle:not([hidden]) { display: inline-flex; }
  .main { padding: 0 16px 28px; }
  .topbar { margin: 0 -16px 16px; padding: 9px 16px; gap: 8px; }
  .topbar .jump { max-width: none; }
  .topbar .jump-input { padding-right: 10px; }
  .jump-kbd { display: none; }
  .import-status > summary { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .import-status-menu { position: fixed; top: 62px; right: 16px; }
  .page-head, .page-head.one-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-head h1 { font-size: 21px; }
  .page-head .tabs { margin-left: 0; }
  .panel { padding: 14px; }
  .ops-head { align-items: flex-start; }
  .ops-head h2 { font-size: 15px; }
  .ops-actions { width: auto; }
  .ops-store { grid-template-columns: minmax(115px, 1.5fr) 1fr 1fr; }
  .ops-store div:nth-child(3), .ops-store div:nth-child(4) { display: none; }
  .ops-options { right: 0; left: auto; }
  .ops-chart svg { min-width: 580px; }
  .section-disclosure { flex-wrap: wrap; gap: 4px; }
  .winpick-range { flex-wrap: wrap; }
  .winpick-range input { width: 128px; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .ops-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-metric { padding: 11px 12px; }
  .ops-number { font-size: 22px; }
  .ops-store { gap: 8px; padding: 10px; }
  .ops-store strong { font-size: 11px; }
  .topbar .jump-input { font-size: 11px; }
  .topbar .jump { min-width: 60px; }
  .ops-actions { position: static; }
  .ops-customize { position: relative; }
  .ops-options { right: 0; left: auto; width: 270px; }
}
@media print {
  .topbar, .sidebar, .skip-link { display: none; }
  .shell { display: block; }
  .main { padding: 0; }
}
/* Reset legacy rail labels and flex bases before applying the new hierarchy. */
.sidebar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.sidebar::after { display: none; }
.nav-group { padding: 0; font: 500 12px/1.5 var(--sans); letter-spacing: 0; text-transform: none; }
.topbar > .bell { margin-left: 0; }
@media (max-width: 760px) {
  .page-head.one-row .lede { flex: none; }
  .page-head.one-row .tabs { align-self: flex-start; margin: 0; }
  .topbar .jump-input:not([hidden]) ~ .jump-kbd { display: none; }
  .topbar .bell > summary { font-size: 0; gap: 0; padding: 7px; }
  .topbar .bell > summary svg { font-size: 12px; }
  .ops-customize .ops-options { position: fixed; left: 16px; right: 16px; top: 72px; width: auto; max-height: calc(100dvh - 96px); }
  .sidebar .sidebar-who { display: block; }
}
.settings-section { border-bottom: 1px solid var(--line); }
.settings-section > summary { padding: 16px 4px; font-size: 13px; cursor: pointer; }
.settings-section > .panel, .settings-section > form > .panel { border: 0; background: transparent; padding: 8px 4px 20px; margin: 0; }
.ck-head-row .ck-progress-ring { flex: 0 0 auto; }
@media (max-width: 760px) { .page-head.ck-head-row { flex-direction: row; align-items: center; } }

/* ── City shell (2026-09-29) ───────────────────────────────────────────
   Every admin page in the city's frame: the HUD across the top and the dock
   down the left, drawn with the city's own measurements (city.css #hud / #dock
   / .dk) so moving between the city and any admin screen is one UI.
   Loaded after app.css, so these win over the retired sidebar rules. */
.surface-cityshell { --side: #0c0c10; --brand-bg: rgba(140, 82, 253, .12); }
.cshell { display: grid; grid-template-columns: 80px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); min-height: 100vh; }
.chud { grid-column: 1 / -1; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: var(--side); border-bottom: 1px solid var(--line); min-width: 0; }
.chud-logo { display: flex; align-items: center; flex: none; }
.chud-logo img { height: 19px; width: auto; display: block; }
.chud-sep { width: 1px; height: 28px; background: var(--line); flex: none; }
.chud-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; flex: none; }
.chud-bar { flex: 1; min-width: 0; }
.chud .topbar { margin: 0; min-height: 0; padding: 0; border: 0; background: none; position: static; }
.chud-user { display: flex; align-items: center; gap: 9px; flex: none; }
.chud-who { color: var(--muted); font-size: 12px; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdock { grid-row: 2; position: sticky; top: 49px; align-self: start; height: calc(100vh - 49px); display: flex; flex-direction: column; gap: 2px; padding: 8px 7px; background: var(--side); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: none; z-index: 10; }
.cdock::-webkit-scrollbar { display: none; }
.cdock .dk { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border-radius: 10px; color: var(--muted); font-size: 10.5px; font-weight: 600; text-align: center; text-decoration: none; transition: background .15s, color .15s; }
.cdock .dk svg { width: 19px; height: 19px; }
.cdock .dk:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.cdock .dk.active { color: var(--text); background: var(--brand-bg); }
.cdock .dk.active::before { content: ""; position: absolute; left: -7px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--brand); }
.cdock .dk .b { position: absolute; top: 4px; right: 10px; min-width: 16px; height: 16px; border-radius: 8px; background: #f5a524; color: #1a1206; font-size: 9.5px; font-weight: 700; font-family: var(--mono, monospace); display: grid; place-items: center; padding: 0 4px; }
.cdock .dk-sep { height: 1px; background: var(--line); margin: 5px 8px; flex: none; }
.cmain { grid-row: 2; grid-column: 2; min-width: 0; padding: 18px 24px 40px; }
@media (max-width: 760px) {
  .cshell { grid-template-columns: minmax(0, 1fr); }
  .chud { flex-wrap: wrap; }
  .chud-who, .chud-sep { display: none; }
  .chud-bar { order: 5; flex-basis: 100%; }
  .cdock { position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; width: 92px; transform: translateX(-100%); transition: transform .2s; z-index: 40; }
  body.nav-open .cdock { transform: none; }
  .cmain { grid-column: 1; padding: 14px 16px 32px; }
}
/* Dock flyouts: a hub's pages, beside its icon. */
.cdock { overflow: visible; }
.cdock .nav-group { position: relative; }
.cdock .nav-group > summary { list-style: none; cursor: pointer; }
.cdock .nav-group > summary::-webkit-details-marker { display: none; }
.cdock .nav-group[open] > summary { color: var(--text); background: var(--panel); }
.cdock .dkfly { position: absolute; left: calc(100% + 10px); top: 0; min-width: 210px; padding: 8px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.45); z-index: 30; display: flex; flex-direction: column; gap: 2px; }
.cdock .dkfly-h { font-family: var(--mono, monospace); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2, #868692); padding: 4px 8px 6px; }
.cdock .dkfly .ni { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; border-radius: 8px; color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.cdock .dkfly .ni:hover { background: var(--panel-2); color: var(--text); }
.cdock .dkfly .ni.active { background: var(--brand-bg); color: var(--text); }
@media (max-width: 760px) { .cdock .dkfly { position: static; box-shadow: none; margin: 4px 0; min-width: 0; } }
/* The dock reuses the rail's class names (nav-group / nav-members) — undo the rail's look inside it. */
.cdock .nav-group { margin: 0; padding: 0; }
.cdock .nav-group > summary.dk { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; min-height: 0; border-radius: 10px; font-size: 10.5px; font-weight: 600; }
.cdock .nav-group > summary.dk::after { display: none; }
.cdock .nav-members.dkfly { margin: 0; padding: 8px; border-left: 1px solid var(--line-2); }
