/* Views inside the shell. Uses the shell's --sh-* tokens (light and dark). */
.st-view { box-sizing: border-box; padding: 20px 16px 40px; }
.st-page { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.st-intro { margin: 0; color: var(--sh-muted); font: 400 14px/20px var(--sh-f-sans); }
.st-muted { color: var(--sh-faint); font-size: 13px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.st-card {
  background: var(--sh-card); color: var(--sh-ink); border: 1px solid var(--sh-border); border-radius: 12px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.st-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.st-card-head h2 { margin: 0; font: 600 16px/24px var(--sh-f-sans); }
.st-card-sub { font-size: 12px; color: var(--sh-faint); }
.st-card-note { margin: 0; font-size: 12px; line-height: 16px; color: var(--sh-faint); }
.st-loading { margin: 0; color: var(--sh-muted); }
.st-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.st-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-stat-value { font: 700 24px/30px var(--sh-f-sans); font-variant-numeric: tabular-nums; }
.st-stat-label { font-size: 13px; line-height: 18px; color: var(--sh-muted); }
.st-stat-hint { font-size: 12px; line-height: 16px; color: var(--sh-faint); }
.st-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--sh-chip); color: var(--sh-ink); font-size: 13px; line-height: 20px;
}
.st-chip-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.st-chip-busy { background: var(--sh-primary); color: var(--sh-primary-ink); }
.st-chip-off { opacity: .65; }

/* ---------- nav ---------- */
.st-nav {
  position: sticky; top: 48px; z-index: 50; display: flex; gap: 4px; padding: 0 16px;
  background: var(--sh-card); border-bottom: 1px solid var(--sh-border);
}
.st-nav-link {
  padding: 10px 14px; color: var(--sh-muted); text-decoration: none; font: 600 14px/20px var(--sh-f-sans);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.st-nav-link:hover { color: var(--sh-ink); }
.st-nav-link[aria-current="page"] { color: var(--sh-ink); border-bottom-color: var(--sh-ink); }
.st-nav-link:focus-visible { outline: 2px solid var(--sh-focus); outline-offset: -2px; }

/* ---------- floor ---------- */
:root {
  --fl-call: #1d4ed8; --fl-call-bg: #e7eefe; --fl-wrap: #7c3aed; --fl-wrap-bg: #f1eafe;
  --fl-ready: #15803d; --fl-ready-bg: #e6f4ea; --fl-away: #b45309; --fl-away-bg: #fdf1e1;
  --fl-off: #6b7280; --fl-off-bg: #eef0f3; --fl-warn: #d97706; --fl-alert: #c81e3a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-st-theme="light"]) {
    --fl-call: #8fb0ff; --fl-call-bg: #1b2b55; --fl-wrap: #c4a6ff; --fl-wrap-bg: #2b2152;
    --fl-ready: #7fd49a; --fl-ready-bg: #173826; --fl-away: #f2b766; --fl-away-bg: #3a2a14;
    --fl-off: #9aa3b5; --fl-off-bg: #222c46; --fl-warn: #f2b766; --fl-alert: #ff8fa3;
  }
}
:root[data-st-theme="dark"] {
  --fl-call: #8fb0ff; --fl-call-bg: #1b2b55; --fl-wrap: #c4a6ff; --fl-wrap-bg: #2b2152;
  --fl-ready: #7fd49a; --fl-ready-bg: #173826; --fl-away: #f2b766; --fl-away-bg: #3a2a14;
  --fl-off: #9aa3b5; --fl-off-bg: #222c46; --fl-warn: #f2b766; --fl-alert: #ff8fa3;
}
.st-fl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.st-fl-title { margin: 0; font: 700 22px/28px var(--sh-f-sans); }
.st-fl-tools { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--sh-muted); }
.st-fl-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.st-fl-updated { color: var(--sh-faint); }
.st-fl-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.st-fl-sum { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--sh-border); background: var(--sh-card); }
.st-fl-sum-n { font: 700 24px/30px var(--sh-f-sans); font-variant-numeric: tabular-nums; }
.st-fl-sum-l { font-size: 12px; color: var(--sh-muted); }
.st-fl-sum.st-k-call .st-fl-sum-n { color: var(--fl-call); }
.st-fl-sum.st-k-wrap .st-fl-sum-n { color: var(--fl-wrap); }
.st-fl-sum.st-k-ready .st-fl-sum-n { color: var(--fl-ready); }
.st-fl-sum.st-k-away .st-fl-sum-n { color: var(--fl-away); }
.st-fl-sum.st-k-off .st-fl-sum-n { color: var(--fl-off); }
.st-fl-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 16px; align-items: start; }
.st-fl-group { background: var(--sh-card); border: 1px solid var(--sh-border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.st-fl-ghead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
.st-fl-ghead h2 { margin: 0; font: 600 16px/24px var(--sh-f-sans); }
.st-fl-gcount { font-size: 12px; color: var(--sh-faint); }
.st-fl-rows { list-style: none; margin: 0; padding: 0; }
.st-fl-row {
  display: grid; grid-template-columns: minmax(7em, 1fr) auto auto; grid-template-areas: "name state time" "detail detail detail";
  gap: 2px 10px; align-items: center; padding: 8px 8px 8px 10px; border-left: 3px solid transparent; border-top: 1px solid var(--sh-line);
}
.st-fl-row:first-child { border-top: 0; }
.st-fl-name { grid-area: name; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-fl-tag { padding: 0 6px; border-radius: 999px; background: var(--sh-chip); color: var(--sh-muted); font-size: 11px; font-weight: 500; line-height: 16px; white-space: nowrap; }
.st-fl-state { grid-area: state; max-width: 11em; overflow: hidden; text-overflow: ellipsis; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.st-fl-time { grid-area: time; font: 600 14px/20px var(--sh-f-sans); font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }
.st-fl-detail { grid-area: detail; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; line-height: 16px; color: var(--sh-faint); min-width: 0; overflow-wrap: anywhere; }
.st-fl-stale .st-fl-detail-text { color: var(--fl-alert); }
.st-k-call .st-fl-state { background: var(--fl-call-bg); color: var(--fl-call); }
.st-k-wrap .st-fl-state { background: var(--fl-wrap-bg); color: var(--fl-wrap); }
.st-k-ready .st-fl-state { background: var(--fl-ready-bg); color: var(--fl-ready); }
.st-k-away .st-fl-state { background: var(--fl-away-bg); color: var(--fl-away); }
.st-k-off .st-fl-state, .st-k-unknown .st-fl-state { background: var(--fl-off-bg); color: var(--fl-off); }
.st-fl-row.st-k-off { opacity: .7; }
.st-fl-warn { border-left-color: var(--fl-warn); }
.st-fl-warn .st-fl-time { color: var(--fl-warn); }
.st-fl-alert { border-left-color: var(--fl-alert); }
.st-fl-alert .st-fl-time { color: var(--fl-alert); }
.st-fl-empty { margin: 4px 0; color: var(--sh-faint); font-size: 13px; }
@media (max-width: 640px) {
  .st-fl-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-nav { top: 48px; padding: 0 8px; }
}
.st-nav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.st-nav::-webkit-scrollbar { display: none; }
.st-nav-link { flex: none; white-space: nowrap; }
