/* Workspace refinement. All page colors use the shared theme tokens. */
:root {
  --bg: #f6f7f9;
  --text-faint: #707c8e;
  --accent: #365ad6;
  --accent-hover: #2948b8;
  --radius-lg: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #101319; --text-faint: #909aaa; --accent: #8ba7ff; --accent-hover: #b0c3ff; }
}
:root[data-theme="dark"] { --bg: #101319; --text-faint: #909aaa; --accent: #8ba7ff; --accent-hover: #b0c3ff; }
.workspace { min-height: 100vh; display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.skip-link { position: fixed; left: 20px; top: -80px; z-index: 100; background: var(--surface); padding: 12px; }
.skip-link:focus { top: 10px; }
.topbar { grid-column: 1; grid-row: 1 / span 2; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); }
.topbar-inner { height: 100%; padding: 30px 18px 20px; flex-direction: column; align-items: stretch; gap: 18px; }
.brand { position: relative; flex-wrap: wrap; column-gap: 10px; padding: 0 10px 22px; font-size: 23px; letter-spacing: -.06em; }
.brand-caption { width: 100%; padding-left: 36px; margin-top: -5px; color: var(--text-muted); font-size: 8px; letter-spacing: .13em; font-weight: 600; }
.mainnav { flex-direction: column; background: none; box-shadow: none; margin: 0; padding: 0; gap: 6px; }
.mainnav a { padding: 11px 13px; border-radius: 7px; gap: 12px; }
.mainnav a[aria-current='page'] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.nav-symbol { width: 18px; height: 18px; flex: none; }
.sidebar-note { margin-top: auto; padding: 18px 10px; border-bottom: 1px solid var(--border); }
.eyebrow { display: block; color: var(--text-muted); font-size: 10px; line-height: 1.5; letter-spacing: .12em; font-weight: 600; margin-bottom: 10px; }
.sidebar-note p { font-size: 12px; line-height: 1.7; color: var(--text-muted); }
.sidebar-note a { font-size: 12px; font-weight: 600; text-decoration: none; }
.themetoggle { align-self: flex-start; background: var(--surface-sunk); box-shadow: none; border-radius: 7px; }
.themetoggle button { width: 38px; height: 30px; border-radius: 5px; }
.who { overflow: hidden; text-overflow: ellipsis; padding-left: 10px; }
.topbar form .btn { justify-content: flex-start; }
.page { width: 100%; max-width: 1540px; padding: 0 40px 48px; min-width: 0; }
.workspace-bar { height: 68px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; color: var(--text-muted); font-size: 11px; margin-bottom: 32px; }
.workspace-bar span span { padding: 0 12px; color: var(--text-faint); }
.pagehead { margin: 0 0 26px; }
.pagehead h1 { font-size: 30px; font-weight: 600; letter-spacing: -.045em; }
.pagehead .sub { margin-top: 8px; line-height: 1.7; }
.btn { border-radius: 7px; height: 38px; font-size: 12px; }
.btn-sm { height: 32px; }
.card { border: 1px solid var(--border); box-shadow: 0 2px 4px color-mix(in srgb, var(--text) 2%, transparent); }
.card-head { padding: 20px; min-height: 64px; }
.card-head h2 { font-size: 14px; }
.tiles { gap: 14px; margin-bottom: 26px; }
.tile, .tile.over, .tile.soon, .tile.ok { background: var(--surface); border: 1px solid var(--border); box-shadow: none; padding: 20px 22px; position: relative; gap: 9px; }
.tile b { font-size: 34px; font-weight: 600; }
.tile span, .tile.over span, .tile.soon span, .tile.ok span { color: var(--text-muted); }
.tile::after { content: ''; position: absolute; width: 7px; height: 7px; right: 20px; top: 23px; border-radius: 50%; background: var(--accent); }
.tile.over::after { background: var(--over); }
.tile.soon::after { background: var(--soon); }
.tile.ok::after { background: var(--ok); }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.dashboard-aside { display: grid; gap: 18px; }
.count-chip { display: inline-block; margin-left: 6px; padding: 2px 7px; font-size: 11px; border-radius: 5px; color: var(--text-muted); background: var(--surface-sunk); }
.queue .card-head { flex-wrap: wrap; gap: 6px; }
.queue .card-head .sub { font-size: 11px; }
.qrow { padding: 17px 20px; gap: 12px; }
.qdot { width: 42px; height: 42px; border-radius: 9px; }
.qmeta { font-size: 11px; line-height: 1.6; }
.qrow.snoozed { opacity: 1; }
.qrow .btn-primary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: none; }
.qrow .btn-primary:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.fleet-health { padding: 24px; }
.readiness-number { font-size: 48px; font-weight: 600; letter-spacing: -.06em; line-height: 1.4; }
.readiness-number span { font-size: 24px; color: var(--text-muted); margin-left: 3px; }
.fleet-health p, .planning-card p { font-size: 12px; line-height: 1.8; color: var(--text-muted); }
progress { width: 100%; height: 6px; display: block; margin: 20px 0; border: none; border-radius: 4px; overflow: hidden; background: var(--surface-sunk); accent-color: var(--accent); }
progress::-webkit-progress-bar { background: var(--surface-sunk); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 4px; }
progress::-moz-progress-bar { background: var(--accent); }
.health-key { display: flex; justify-content: space-between; font-size: 12px; padding: 7px 0; color: var(--text-muted); }
.health-key strong { color: var(--text); }
.text-link { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; text-decoration: none; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.planning-card { padding: 25px; border-radius: var(--radius-lg); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.planning-card h2 { font-size: 23px; line-height: 1.3; letter-spacing: -.04em; margin: 16px 0 12px; }
.planning-card .btn { margin-top: 10px; }
.fleet-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; font-size: 12px; }
.fleet-search { display: flex; align-items: center; gap: 10px; width: min(390px, 100%); padding: 0 13px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 7px; color: var(--text-muted); }
.fleet-search input { width: 100%; min-width: 0; height: 40px; border: 0; padding: 0; box-shadow: none; background: transparent; font-size: 12px; }
.fleet-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.fleet-search input:focus-visible { outline: 0; }
.matrix th { background: var(--bg-subtle); padding: 15px 16px; font-size: 10px; }
.matrix .vcell { padding: 18px 16px; }
.vreg { margin-top: 4px; font-size: 10px; }
.iconbtn { width: 34px; height: 34px; opacity: 1; color: var(--text-muted); }
.iconbtn.danger { color: var(--over-text); }
.seg { border-radius: 7px; }
.seg-opt { border-radius: 5px; }
.detail { grid-template-columns: minmax(0, 1fr) minmax(280px, 38%); gap: 22px; }
.docrow { padding: 22px; }
.fieldlist { grid-template-columns: minmax(100px, .8fr) minmax(0, 1fr); gap: 0 20px; }
.fieldlist dt, .fieldlist dd { padding: 10px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; font-size: 12px; }
.tl-row { padding-block: 17px; }
.tl-axis { padding-block: 22px; }
.timeline-card .tl-axis, .timeline-card .tl-row { min-width: 700px; }
.mark { text-decoration: none; }
.mark:hover { outline: 1px solid currentColor; }
.tick:last-child { transform: translateX(-100%); }
.devbanner { grid-column: 2; font-size: 11px; }
@media (min-width: 1100px) { .devbanner + .topbar + .page { grid-column: 2; } }
@media (max-width: 1200px) {
  .workspace { grid-template-columns: 184px minmax(0, 1fr); }
  .page { padding-inline: 24px; }
  .dashboard-layout { grid-template-columns: minmax(0, 1fr); }
  .dashboard-aside { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .workspace { display: block; }
  .topbar { height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .topbar-inner { flex-direction: row; flex-wrap: wrap; padding: 12px 20px; align-items: center; gap: 10px; }
  .brand { padding: 0; margin-right: auto; font-size: 20px; }
  .brand-caption, .sidebar-note, .who { display: none; }
  .mainnav { flex-direction: row; order: 3; width: 100%; overflow-x: auto; }
  .mainnav a { flex: none; padding: 9px 12px; gap: 6px; }
  .mainnav a[aria-current='page'] { box-shadow: none; }
  .nav-symbol { font-size: 17px; }
  .workspace-bar { height: 48px; margin-bottom: 24px; }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .page { padding-inline: 16px; }
  .workspace-date { display: none; }
  .pagehead h1 { font-size: 26px; }
  .pagehead { gap: 16px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile, .tile.over, .tile.soon, .tile.ok { padding: 16px; }
  .tile b { font-size: 28px; }
  .tile span { font-size: 11px; }
  .dashboard-aside { grid-template-columns: 1fr; }
  .qrow { padding: 15px 12px; gap: 9px; flex-wrap: wrap; }
  .qmain { flex-basis: calc(100% - 60px); }
  .qrow > .btn { margin-left: 51px; }
  .qtop .vreg { font-size: 9px; }
  .fleet-toolbar { flex-wrap: wrap; }
  .fleet-search { width: 100%; }
  .themetoggle button { width: 28px; }
  .fieldlist { padding: 12px 16px; }
  .headactions .seg { max-width: 100%; }
  .topbar-inner { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
