/* Subby console — page-specific rules; shared system from MSPY.
   Load order: tokens → accent → components → switch → these rules. The synced
   files under /static/mspy/ are copied by MSPY/scripts/sync.sh — do not edit. */
@import url("/static/mspy/tokens.css");
@import url("/static/mspy/accent.css");
@import url("/static/mspy/components.css");
@import url("/static/mspy/switch.css");

/* ─────────────────────────── page-specific ──────────────────────────── */
/* run matrix */
.run-matrix th:first-child, .run-matrix td:first-child {
  position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 180px;
}
.run-matrix th:first-child { z-index: 3; background: var(--surface-2); }
.run-matrix td.wl-cell { min-width: 110px; }
.run-matrix tr:hover td:first-child { background: var(--surface-2); }
.run-matrix tfoot td { border-top: 2px solid var(--line-strong); font-weight: 600; background: var(--surface); position: sticky; bottom: 0; }
.wl-head { display: inline-flex; align-items: center; gap: 5px; }

/* folder rows in restore browser */
.folder-link { font-weight: 550; }
.folder-link::before { content: "▸ "; color: var(--muted); }

/* restore browser card + drive crumbs (/restore/snap/{id}/browse) */
.browser-card { padding: 0; overflow: hidden; }
.browser-card > .toolbar, .browser-card > .table-scroll, .browser-card > p, .browser-card > .alert { margin-left: var(--sp-4); margin-right: var(--sp-4); }
.browser-card > .toolbar { margin-top: var(--sp-4); }
.browser-card > .table-scroll { margin-bottom: var(--sp-4); }
.browser-card > p.muted { padding: var(--sp-4); margin: 0; }
.drive-crumbs { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-1); flex-wrap: wrap; }
.drive-crumbs a { color: var(--ink); text-decoration: none; font-weight: 550; }
.drive-crumbs a:hover { color: var(--accent); }
.drive-crumbs .sep { color: var(--muted); }

/* sparklines */
.spark-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.spark-tile {
  flex: 1; min-width: 220px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: var(--sp-3);
}
.spark-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.spark-label { font-family: var(--font-head); font-size: var(--fs-0); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.spark-latest { font-family: var(--font-head); font-size: var(--fs-3); font-weight: 650; font-variant-numeric: tabular-nums; }
.spark-tile svg { width: 100%; height: 48px; display: block; margin: var(--sp-2) 0; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--accent-soft); stroke: none; }
.spark-none { height: 48px; display: grid; place-items: center; margin: var(--sp-2) 0; }

/* admins */
.admin-actions { display: flex; gap: var(--sp-1); flex-wrap: wrap; align-items: flex-start; }
.admin-actions form { display: inline; }
details.grants { position: relative; }
details.grants summary { list-style: none; }
details.grants summary::-webkit-details-marker { display: none; }
.grants-form {
  display: flex; flex-direction: column; gap: var(--sp-1);
  padding: var(--sp-2) 0;
}
details.grants .grants-form {
  position: absolute; right: 0; z-index: 20; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: var(--sp-3); box-shadow: var(--shadow);
}
.grants-form .check { display: flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; font-size: var(--fs-1); }
.grants-form .check input { width: auto; margin: 0; }

/* account / TOTP */
.totp-enrol { display: flex; gap: var(--sp-5); align-items: flex-start; flex-wrap: wrap; }
.totp-enrol img { border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.totp-secret { user-select: all; word-break: break-all; background: var(--surface-2); padding: var(--sp-2); border-radius: var(--radius-sm); }

/* audit */
.audit-detail { max-width: 340px; overflow-wrap: anywhere; }

/* ── live activity lanes ─────────────────────────────────────────────────── */
.lanes { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-3); }
.lane {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); padding: 8px 12px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.lane-fill {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  pointer-events: none;
}
.lane-fill rect { fill: var(--run-bg); }
.lane-text, .lane-meta { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.lane-meta { flex: none; font-variant-numeric: tabular-nums; }
/* Indeterminate (enumerating) lanes: no fill, no animation — the text says
   it all, and animating dozens of full-width rows janks the page. */

/* Boot-verification console screenshots */
.verify-shot img { max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); }
.verify-bar { display: block; margin: 4px 0 8px; }
.verify-bar-bg { fill: var(--line); }
.verify-bar-fill { fill: var(--accent); }

/* Recovery-point picker (/restore/server/{id}) */
.rp-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
@media (max-width: 900px) { .rp-layout { grid-template-columns: 1fr; } }
.rp-cal .cal { margin-bottom: var(--sp-3); }
.rp-quick { margin-bottom: var(--sp-2); }
.rp-points h2 { margin-top: 0; }
.rp-card { display: flex; gap: var(--sp-4); align-items: flex-start; }
.rp-main { flex: 1 1 auto; min-width: 0; }
.rp-when { font-size: var(--fs-4); font-weight: 700; display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.rp-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); align-items: center; }
.rp-actions form { display: inline; }
.rp-shot { flex: 0 0 220px; }
.rp-shot img { width: 220px; border: 1px solid var(--line); border-radius: var(--radius); display: block; }

/* "Use a different account" link under the Microsoft button (SSO hand-off). */
.sso-alt { text-align: center; margin: var(--sp-3) 0 0; }
