/* ================================================================
   Z-AMPP — Design System
   Broadcast operations console. Signature blue. Deep slate.
   Operator-grade type, tabular numerics, signal-first hierarchy.
   ================================================================ */
/* ================================================================
   TOKENS
   ================================================================ */

:root {
  /* Surfaces (5-step depth, tinted toward brand hue 266) */
  --bg-deep:    oklch(8% 0.011 266);
  --bg-base:    oklch(11% 0.010 266);
  --bg-panel:   oklch(15% 0.013 266);
  --bg-surface: oklch(19% 0.014 266);
  --bg-raised:  oklch(24% 0.015 266);
  --bg-hover:   oklch(28% 0.015 266);

  /* Accent — amber tally light */
  --accent:        oklch(45% 0.20 266);
  --accent-dim:    oklch(56% 0.130 52);
  --accent-subtle: oklch(55% 0.20 266 / 0.12);
  --accent-border: oklch(55% 0.20 266 / 0.36);

  /* Text — lifted secondary for readability (was 62%) */
  --text-primary:   oklch(94% 0.008 266);
  --text-secondary: oklch(72% 0.014 266);
  --text-tertiary:  oklch(52% 0.012 266);
  --text-disabled:  oklch(38% 0.010 266);

  /* Borders — added faint variant */
  --border-faint:  oklch(22% 0.013 266);
  --border:        oklch(28% 0.015 266);
  --border-strong: oklch(38% 0.018 266);

  /* Status — raw color slots */
  --status-green:  oklch(70% 0.18 148);
  --status-red:    oklch(64% 0.22 25);
  --status-blue:   oklch(67% 0.16 245);
  --status-yellow: oklch(80% 0.16 90);
  --status-gray:   oklch(58% 0.012 266);

  --status-green-bg:  oklch(70% 0.18 148 / 0.12);
  --status-red-bg:    oklch(64% 0.22 25  / 0.12);
  --status-blue-bg:   oklch(67% 0.16 245 / 0.12);
  --status-yellow-bg: oklch(80% 0.16 90  / 0.12);

  /* Semantic signal tokens — use these in operational UI */
  --signal-good: var(--status-green);
  --signal-warn: var(--status-yellow);
  --signal-bad:  var(--status-red);
  --signal-idle: var(--status-gray);
  --signal-good-bg: var(--status-green-bg);
  --signal-warn-bg: var(--status-yellow-bg);
  --signal-bad-bg:  var(--status-red-bg);

  /* Legacy aliases (deprecated, kept for stragglers) */
  --status-amber:    var(--accent);
  --status-amber-bg: var(--accent-subtle);

  /* Spacing — 4pt base */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Typography — Inter for prose, JetBrains Mono for tabular numerics */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 14px;
  --text-md:   16px;
  --text-lg:   18px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  40px;
  --text-tc:   64px; /* tally-grade timecode */

  /* Radius */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;

  /* Shell dimensions */
  --sidebar-w: 220px;
  --topbar-h:  48px;

  /* Z-index scale */
  --z-dropdown: 40;
  --z-overlay:  80;
  --z-panel:    90;
  --z-toast:    200;

  /* Transitions */
  --t-fast:   150ms ease-out;
  --t-normal: 250ms ease-out;
}

/* ================================================================
   RESET
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; font-size: 16px; }
body {
  height: 100%;
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-optical-sizing: auto;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; flex-shrink: 0; }

/* ================================================================
   SHELL LAYOUT
   ================================================================ */

.shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ================================================================
   SIDEBAR
   ================================================================ */

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: var(--topbar-h);
  padding: 0 var(--sp-4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-brand-mark {
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: oklch(11% 0.010 250);
}

.sidebar-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
  background: oklch(20% 0.025 250);
  border: 1px solid oklch(35% 0.06 260);
  padding: 2px;
  flex-shrink: 0;
}
.header-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
  background: oklch(20% 0.025 250);
  border: 1px solid oklch(35% 0.06 260);
  padding: 2px;
  flex-shrink: 0;
}

.sidebar-brand-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  padding: var(--sp-3) 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-section-label {
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 400;
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
  overflow: hidden;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-item.active {
  color: var(--accent);
  background: var(--accent-subtle);
  font-weight: 500;
}

.nav-item svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
  flex-shrink: 0;
}

.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ================================================================
   TOPBAR
   ================================================================ */

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: var(--sp-4);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.page-title {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

.topbar-sep {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  flex-shrink: 0;
}

/* ================================================================
   PAGE CONTENT
   ================================================================ */

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-6);
}

.page-content::-webkit-scrollbar { width: 5px; }
.page-content::-webkit-scrollbar-track { background: transparent; }
.page-content::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

/* ================================================================
   BUTTONS
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-3);
  height: 32px;
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

.btn-sm {
  height: 26px;
  padding: 0 var(--sp-2);
  font-size: var(--text-xs);
  gap: var(--sp-1);
  border-radius: var(--r-sm);
}

.btn-lg {
  height: 40px;
  padding: 0 var(--sp-5);
  font-size: var(--text-base);
  border-radius: var(--r-lg);
}

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-sm svg { width: 12px; height: 12px; }
.btn-lg svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--accent);
  color: oklch(11% 0.010 250);
  border-color: var(--accent);
}
.btn-primary:hover   { background: oklch(52% 0.21 266); border-color: oklch(52% 0.21 266); }
.btn-primary:active  { background: oklch(40% 0.19 266); }

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-raised); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-danger {
  background: transparent;
  color: var(--status-red);
  border-color: oklch(62% 0.22 25 / 0.25);
}
.btn-danger:hover { background: var(--status-red-bg); }

.btn-record {
  background: var(--status-red);
  color: oklch(98% 0.005 25);
  border-color: var(--status-red);
  font-variant-numeric: tabular-nums;
}
.btn-record:hover  { background: oklch(68% 0.22 25); }
.btn-record.active { background: oklch(55% 0.22 25); box-shadow: 0 0 0 3px oklch(62% 0.22 25 / 0.25); }

.btn:disabled { opacity: 0.38; cursor: not-allowed; pointer-events: none; }

/* ================================================================
   FORM CONTROLS
   ================================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.form-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.5;
}

.form-error {
  font-size: var(--text-xs);
  color: var(--status-red);
}

.input,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"] {
  width: 100%;
  height: 34px;
  padding: 0 var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
.input:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-subtle); }

input::placeholder { color: var(--text-tertiary); }

select {
  width: 100%;
  height: 34px;
  padding: 0 28px 0 var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23667788' d='m7 10 5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
select:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-subtle); }
select option { background: var(--bg-surface); color: var(--text-primary); }

textarea {
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  resize: vertical;
  line-height: 1.5;
  outline: none;
  transition: border-color var(--t-fast);
}
textarea:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-subtle); }

/* Toggle */
.toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
}
.toggle-track {
  position: relative;
  width: 34px;
  height: 18px;
  background: var(--bg-hover);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  transition: background var(--t-fast), border-color var(--t-fast);
  flex-shrink: 0;
}
.toggle-track::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-tertiary);
  top: 2px; left: 2px;
  transition: transform var(--t-fast), background var(--t-fast);
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle input:checked ~ .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle input:checked ~ .toggle-track::after { transform: translateX(16px); background: oklch(11% 0.010 250); }
.toggle-label { font-size: var(--text-sm); color: var(--text-secondary); }

/* ================================================================
   BADGES
   ================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px 7px;
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-recording { background: var(--status-amber-bg); color: var(--status-amber); }
.badge-idle      { background: oklch(25% 0.014 250); color: var(--text-secondary); }
.badge-processing{ background: var(--status-blue-bg); color: var(--status-blue); }
.badge-ready     { background: var(--status-green-bg); color: var(--status-green); }
.badge-error     { background: var(--status-red-bg); color: var(--status-red); }
.badge-ingesting { background: var(--status-amber-bg); color: var(--status-amber); }
.badge-archived  { background: oklch(25% 0.014 250); color: var(--text-tertiary); }

.badge-sdi  { background: var(--status-blue-bg);  color: var(--status-blue); }
.badge-srt  { background: var(--status-green-bg); color: var(--status-green); }
.badge-rtmp { background: var(--accent-subtle);   color: var(--accent); }

/* ================================================================
   STATUS DOTS
   ================================================================ */

.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--recording  { background: var(--accent); animation: pulse-amber 2s ease-out infinite; }
.status-dot--ready      { background: var(--status-green); }
.status-dot--error      { background: var(--status-red); }
.status-dot--processing { background: var(--status-blue); }
.status-dot--idle       { background: var(--bg-hover); border: 1px solid var(--border-strong); }

@keyframes pulse-amber {
  0%   { box-shadow: 0 0 0 0 oklch(55% 0.20 266 / 0.8); }
  60%  { box-shadow: 0 0 0 5px oklch(55% 0.20 266 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(55% 0.20 266 / 0); }
}

/* ================================================================
   DIVIDER
   ================================================================ */

.divider { height: 1px; background: var(--border); border: none; }

/* ================================================================
   EMPTY STATE
   ================================================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-16) var(--sp-8);
  text-align: center;
  gap: var(--sp-3);
}
.empty-state-icon { color: var(--text-tertiary); margin-bottom: var(--sp-2); }
.empty-state-icon svg { width: 40px; height: 40px; }
.empty-state-title { font-size: var(--text-md); font-weight: 500; }
.empty-state-body  { font-size: var(--text-sm); color: var(--text-secondary); max-width: 34ch; line-height: 1.6; }
.empty-state-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }

/* ================================================================
   TOASTS
   ================================================================ */

.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  z-index: var(--z-toast);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  font-size: var(--text-sm);
  min-width: 260px;
  max-width: 360px;
  pointer-events: all;
  animation: toast-in 180ms ease-out;
}
.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-icon svg { width: 15px; height: 15px; }
.toast-body { flex: 1; }
.toast-title { font-weight: 500; color: var(--text-primary); }
.toast-msg   { font-size: var(--text-xs); color: var(--text-secondary); margin-top: 2px; }
.toast--success .toast-icon { color: var(--status-green); }
.toast--error   .toast-icon { color: var(--status-red); }
.toast--info    .toast-icon { color: var(--status-blue); }
.toast--warning .toast-icon { color: var(--accent); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   SLIDE PANEL
   ================================================================ */

.slide-overlay {
  position: fixed;
  inset: 0;
  background: oklch(8% 0.010 250 / 0.65);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal);
}
.slide-overlay.open { opacity: 1; pointer-events: all; }

.slide-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 460px;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  z-index: var(--z-panel);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--t-normal);
}
.slide-panel.open { transform: translateX(0); }

.slide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.slide-panel-title { font-size: var(--text-base); font-weight: 500; }

.slide-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.slide-panel-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* ================================================================
   DATA TABLE
   ================================================================ */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
.data-table th {
  text-align: left;
  padding: var(--sp-2) var(--sp-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: var(--sp-3);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-primary);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-surface); }

/* ================================================================
   TABS
   ================================================================ */

.tabs { display: flex; border-bottom: 1px solid var(--border); gap: 0; }
.tab {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
  border-radius: 0;
  white-space: nowrap;
}
.tab:hover   { color: var(--text-primary); }
.tab.active  { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

/* ================================================================
   PROGRESS BAR
   ================================================================ */

.progress-bar { height: 3px; background: var(--bg-hover); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 300ms ease-out; }
.progress-fill--success { background: var(--status-green); }
.progress-fill--error   { background: var(--status-red); }

/* ================================================================
   INFO BANNER (inline connection info etc.)
   ================================================================ */

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-md);
  font-size: var(--text-xs);
  color: var(--accent);
  line-height: 1.5;
}
.info-banner svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.info-banner code {
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 11px;
  opacity: 0.9;
}

/* ================================================================
   SEGMENT (conditional field groups)
   ================================================================ */

.conditional-fields { display: flex; flex-direction: column; gap: var(--sp-5); }
.conditional-fields:empty { display: none; }

/* ================================================================
   UTILITY
   ================================================================ */

.monospace { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.truncate  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-accent    { color: var(--accent); }
.text-error     { color: var(--status-red); }
.text-success   { color: var(--status-green); }
.flex          { display: flex; }
.flex-col      { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.gap-2         { gap: var(--sp-2); }
.gap-3         { gap: var(--sp-3); }
.gap-4         { gap: var(--sp-4); }
.mt-1          { margin-top: var(--sp-1); }
.mt-2          { margin-top: var(--sp-2); }
.mt-4          { margin-top: var(--sp-4); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* === AMPP Safe loading indicator =============================
   Use anywhere we'd otherwise show a generic spinner. The helmet
   pulses gently; the dot underneath pulses on a different beat. */
.ampp-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-3);padding:var(--sp-6);color:var(--text-tertiary);font-size:var(--text-sm)}
.ampp-loading-img{width:160px;aspect-ratio:3/2;background-image:url(/img/ampp-safe.png?v=hardhat3);background-size:contain;background-position:center;background-repeat:no-repeat;filter:drop-shadow(0 8px 24px oklch(55% 0.20 266 / 0.35));animation:amppPulse 1.8s ease-in-out infinite}
.ampp-loading-label{display:flex;align-items:center;gap:8px;font-size:var(--text-xs);letter-spacing:.1em;text-transform:uppercase;color:var(--text-secondary)}
.ampp-loading-dot{width:6px;height:6px;border-radius:50%;background:oklch(55% 0.20 266);animation:amppDot 1.2s ease-in-out infinite}
.ampp-loading--sm .ampp-loading-img{width:96px}
.ampp-loading--xs .ampp-loading-img{width:64px}
.ampp-loading--inline{flex-direction:row;padding:var(--sp-2) var(--sp-3);gap:var(--sp-2)}
.ampp-loading--inline .ampp-loading-img{width:28px}
.ampp-loading--inline .ampp-loading-label{font-size:11px}
@keyframes amppPulse{0%,100%{transform:scale(.96);opacity:.78}50%{transform:scale(1);opacity:1}}
@keyframes amppDot{0%,100%{transform:scale(.7);opacity:.35}50%{transform:scale(1.15);opacity:1}}

/* ================================================================
   OPS-CONSOLE ADDITIONS
   Tally lights, timecode, signal meters, chips.
   ================================================================ */

/* Timecode — monospaced, tabular-nums, soft glow on focused values */
.tc { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.tc-display { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-tc); font-weight: 500; letter-spacing: 0.03em; color: var(--accent); text-shadow: 0 0 18px oklch(55% 0.20 266 / 0.35); }
.tc-lg { font-size: var(--text-2xl); font-weight: 500; color: var(--text-primary); }
.tc-md { font-size: var(--text-md); color: var(--text-secondary); }

/* Tally word — the big status word on the recorder card */
.tally-word { font-size: var(--text-md); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.tally-word--good { color: var(--signal-good); text-shadow: 0 0 14px oklch(70% 0.18 148 / 0.35); }
.tally-word--warn { color: var(--signal-warn); text-shadow: 0 0 14px oklch(80% 0.16 90 / 0.30); }
.tally-word--bad  { color: var(--signal-bad);  text-shadow: 0 0 14px oklch(64% 0.22 25 / 0.35); }
.tally-word--idle { color: var(--text-tertiary); }
.tally-word--rec  { color: var(--accent); text-shadow: 0 0 14px oklch(55% 0.20 266 / 0.35); }

/* Signal strip — horizontal bar fluttering at the source frame rate */
.signal-strip { position: relative; height: 4px; border-radius: 2px; background: var(--bg-surface); overflow: hidden; }
.signal-strip-fill { position: absolute; inset: 0; width: 100%; background: var(--signal-good); transform-origin: left; animation: signalFlicker 1.1s ease-in-out infinite; }
.signal-strip--warn .signal-strip-fill { background: var(--signal-warn); animation-duration: 1.4s; }
.signal-strip--bad  .signal-strip-fill { background: var(--signal-bad); animation: none; opacity: 0.5; }
.signal-strip--idle .signal-strip-fill { background: var(--signal-idle); animation: none; opacity: 0.4; }
@keyframes signalFlicker { 0%,100% { transform: scaleX(0.86) } 50% { transform: scaleX(1) } }

/* Operator chip — leading dot + monospaced label, denser than .badge */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; height: 20px; border-radius: 3px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border); white-space: nowrap; }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.chip--good { color: var(--signal-good); border-color: oklch(70% 0.18 148 / 0.35); }
.chip--warn { color: var(--signal-warn); border-color: oklch(80% 0.16 90 / 0.35); }
.chip--bad  { color: var(--signal-bad);  border-color: oklch(64% 0.22 25 / 0.35); }
.chip--rec  { color: var(--accent);      border-color: var(--accent-border); }
.chip--mono { font-family: var(--font-mono); }

/* Topbar status strip — thin live-clock + system pulse on every page */
.topbar-strip { display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 28px; background: var(--bg-deep); border-bottom: 1px solid var(--border-faint); font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); flex-shrink: 0; }
.topbar-strip .ts-now { color: var(--text-primary); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.topbar-strip .ts-sep { width: 1px; height: 12px; background: var(--border); }
.topbar-strip .ts-label { letter-spacing: 0.08em; text-transform: uppercase; }
.topbar-strip .ts-value { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.topbar-strip .ts-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal-good); box-shadow: 0 0 8px var(--signal-good); }

/* Section header */
.section-rule { display: flex; align-items: baseline; gap: 12px; margin-bottom: var(--sp-4); }
.section-rule h2 { font-size: var(--text-md); font-weight: 500; letter-spacing: -0.01em; color: var(--text-primary); }
.section-rule-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); padding: 1px 6px; border: 1px solid var(--border-faint); border-radius: 2px; }
