/* ==========================================================================
   Mantou Monitor — light, quiet console
   Neutral surfaces, teal accents, no glow, readable at a glance.
   ========================================================================== */

:root {
  --bg: #f4f5f7;
  --bg-soft: #f9fafb;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f3f4f6;
  --line: #e7e9ee;
  --line-strong: #d5d9e0;
  --text: #161a20;
  --text-2: #3b424d;
  --muted: #667085;
  --dim: #9aa3b2;
  --accent: #0f766e;
  --accent-2: #0d9488;
  --accent-soft: #effaf7;
  --accent-line: #b7e6dd;
  --blue: #2563eb;
  --blue-soft: #eff4ff;
  --violet: #7c3aed;
  --violet-soft: #f5f3ff;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --green: #16a34a;
  --radius-xl: 20px;
  --radius: 16px;
  --radius-sm: 10px;
  --mono: "SFMono-Regular", "Cascadia Mono", "Consolas", "Roboto Mono", monospace;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.05), 0 10px 28px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 64px rgba(16, 24, 40, 0.14);
}

* { box-sizing: border-box; }
*::selection { background: #bdeee6; color: #0b3b37; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { display: block; }

.icon-btn svg, .hud-btn svg, .ghost-btn svg, .primary-btn svg, .danger-btn svg,
.play-btn svg, .tab svg, .foot-stats svg, .status-chip svg, .admin-badge svg,
.user-chip svg, .view-toggle svg, .video-actions svg, .row-actions svg,
.select-bar svg, .unlock-icon svg, .state-icon svg, .login-note svg,
.brand-mark svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- shared controls ---------- */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  transition: color .16s, border-color .16s, background .16s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .16s, border-color .16s;
}
.hud-btn:hover { background: #0b5f59; border-color: #0b5f59; color: #fff; }
.hud-btn:active { transform: translateY(1px); }

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background .16s, border-color .16s;
}
.primary-btn:hover { background: #0b5f59; border-color: #0b5f59; color: #fff; }
.primary-btn:active { transform: translateY(1px); }
.primary-btn:disabled { opacity: .45; cursor: default; transform: none; }
.primary-btn.small { min-height: 36px; padding: 0 13px; font-size: 12.5px; border-radius: 9px; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  transition: border-color .16s, color .16s, background .16s;
}
.ghost-btn:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.ghost-btn.is-active { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.ghost-btn.small { min-height: 34px; padding: 0 12px; font-size: 12.5px; }

.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}
.danger-btn:hover { background: #fee2e2; }
.danger-btn:disabled { opacity: .5; cursor: default; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
input[type="text"], input[type="password"], input[type="search"], select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  transition: border-color .16s, box-shadow .16s;
}
input::placeholder { color: var(--dim); }
input:focus, select:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12); outline: none; }

.form-error { margin: 0; color: var(--danger); font-size: 12px; }

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-3);
}
.segmented button {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  transition: color .16s, background .16s, box-shadow .16s;
}
.segmented button:hover { color: var(--text); }
.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  transform: translateX(-50%);
  max-width: min(90vw, 520px);
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #e3e6eb;
  border-top-color: var(--accent-2);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ==========================================================================
   Login / first-run setup
   ========================================================================== */
.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px 16px;
  background:
    radial-gradient(720px 520px at 12% -8%, rgba(13, 148, 136, 0.07), transparent 62%),
    var(--bg);
}
.login-shell { width: min(420px, 100%); }
.login-card {
  padding: 32px 30px 26px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 44px; height: 44px; flex: none; border-radius: 13px; }
.login-brand h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: .01em; }
.login-brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.login-form { display: grid; gap: 14px; margin-top: 26px; }
.login-submit { width: 100%; margin-top: 4px; }
.login-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.login-note svg { flex: none; width: 15px; height: 15px; margin-top: 1px; color: var(--dim); }
.setup-intro {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: #0b5f59;
  font-size: 12.5px;
  line-height: 1.6;
}

/* ==========================================================================
   Dashboard console
   ========================================================================== */
.console-page { min-height: 100vh; }
.console-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
  padding: 0 clamp(14px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}
.console-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.console-brand .brand-mark { width: 38px; height: 38px; }
.console-brand h1 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: .01em; white-space: nowrap; }
.console-brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.console-mid { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status-chip.is-online { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.status-chip.is-online .status-dot { background: var(--green); animation: pulse 2.4s ease-in-out infinite; }
.status-chip.is-offline { color: var(--danger); border-color: #fecaca; background: var(--danger-soft); }
.status-chip.is-offline .status-dot { background: var(--danger); }
.status-chip.is-pending .status-dot { animation: pulse 1.4s ease-in-out infinite; }

.version-chip { color: var(--dim); font-family: var(--mono); font-size: 11px; }
.console-actions { display: flex; align-items: center; gap: 10px; }
.console-clock {
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.console-clock small {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}
.logout-form { margin: 0; }

.console-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(380px, 1fr) minmax(220px, 300px);
  gap: clamp(12px, 1.6vw, 20px);
  align-items: stretch;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 2vw, 28px) clamp(14px, 3vw, 40px) 20px;
}
.hud-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hud-card {
  padding: 16px 17px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.hud-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.hud-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hud-tag { color: var(--dim); font-family: var(--mono); font-size: 10.5px; }
.hud-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--text);
  font-size: 24px;
  font-weight: 650;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.hud-value small { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.hud-sub { margin-top: 4px; color: var(--dim); font-family: var(--mono); font-size: 10.5px; }
.hud-sub b { color: var(--muted); font-weight: 500; }

.net-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.net-item { min-width: 0; }
.net-item .hud-value { font-size: 16px; }
.net-item .hud-value small { font-size: 10px; }
.net-item.is-down .hud-value { color: var(--accent); }
.net-item.is-up .hud-value { color: var(--blue); }
.net-chart { width: 100%; height: 52px; margin-top: 8px; }

.load-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.load-value { color: var(--text); font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.load-bars { display: grid; gap: 8px; margin-top: 10px; }
.load-bar { display: grid; grid-template-columns: 28px 1fr 38px; align-items: center; gap: 8px; }
.load-bar span { color: var(--dim); font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; }
.load-bar b { color: var(--muted); font-family: var(--mono); font-size: 10.5px; font-weight: 500; text-align: right; }
.bar-track { height: 5px; overflow: hidden; border-radius: 999px; background: #eef1f4; }
.bar-fill { height: 100%; width: 0; border-radius: inherit; background: var(--accent-2); transition: width .6s ease; }
.bar-fill.is-blue { background: var(--blue); }
.bar-fill.is-violet { background: var(--violet); }
.bar-fill.is-warn { background: #d97706; }
.bar-fill.is-danger { background: var(--danger); }

.thermal-value { color: var(--amber); font-size: 22px; }
.thermal-value.is-cool { color: var(--accent); }
.thermal-value.is-hot { color: var(--danger); }

/* central rings */
.hud-core { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 4px 0 0; }
.core-rings { position: relative; width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto; }
.ring-svg { width: 100%; height: 100%; overflow: visible; }
.ring-track { fill: none; stroke: #edf0f3; }
.ring-arc { fill: none; stroke-linecap: round; }
.ring-arc.cpu { stroke: var(--accent-2); }
.ring-arc.mem { stroke: var(--blue); }
.ring-arc.disk { stroke: var(--violet); }
.ring-arc.is-warn { stroke: #d97706; }
.ring-arc.is-hot { stroke: var(--danger); }
.ring-dash { fill: none; stroke: #e9ecf0; }

.core-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.core-center .kicker {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.core-center .host {
  max-width: 72%;
  margin-top: 8px;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(16px, 1.9vw, 21px);
  font-weight: 650;
  letter-spacing: .01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.core-center .platform {
  max-width: 76%;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.core-center .uptime {
  margin-top: 10px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}
.core-center .uptime b { color: var(--text-2); font-weight: 600; }

.core-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
  width: min(100%, 520px);
  padding: 4px 10px 6px;
}
.core-legend > div { display: flex; align-items: center; gap: 8px; }
.core-legend .dot { width: 8px; height: 8px; border-radius: 3px; background: currentColor; }
.core-legend .dot.cpu { color: var(--accent-2); }
.core-legend .dot.mem { color: var(--blue); }
.core-legend .dot.disk { color: var(--violet); }
.core-legend span { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.core-legend strong {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.cpu-chart { width: 100%; height: 46px; margin-top: 10px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mini-grid > div { min-width: 0; }
.mini-grid span { display: block; color: var(--muted); font-size: 10.5px; }
.mini-grid b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.model-line {
  margin: 0;
  overflow: hidden;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.big-value { display: flex; align-items: baseline; gap: 6px; color: var(--text); font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.big-value span { color: var(--dim); font-size: 12px; font-weight: 400; }
.meter { height: 6px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #eef1f4; }
.meter > i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent-2); transition: width .6s ease; }
.meter.mem > i { background: var(--blue); }
.meter.disk > i { background: var(--violet); }
.meter > i.is-warn { background: #d97706; }
.meter > i.is-danger { background: var(--danger); }
.meter-line { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 10.5px; }
.meter-line b { color: var(--text-2); font-weight: 600; }

.console-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 12px clamp(14px, 3vw, 40px) 22px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: .02em;
}
.console-footer .ok { color: var(--muted); }

/* unlock dialog */
dialog { padding: 0; border: 0; background: transparent; color: var(--text); }
dialog::backdrop { background: rgba(17, 24, 39, 0.38); backdrop-filter: blur(3px); }
.unlock-dialog { width: min(420px, calc(100vw - 28px)); border-radius: var(--radius-xl); }
.unlock-panel {
  padding: 28px 26px 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.unlock-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.unlock-icon svg { width: 21px; height: 21px; }
.unlock-panel h2 { margin: 16px 0 4px; font-size: 18px; font-weight: 650; }
.unlock-panel p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.unlock-form { display: grid; gap: 12px; margin-top: 18px; }
.unlock-input {
  height: 50px;
  text-align: center;
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: .3em;
  text-indent: .3em;
}
.unlock-input::placeholder { color: var(--dim); font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-indent: 0; }
.unlock-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 2px; }

/* ==========================================================================
   Admin / history shell
   ========================================================================== */
.admin-page { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 0 clamp(14px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand .brand-mark { width: 36px; height: 36px; }
.brand-text h1 { margin: 0; font-size: 15px; font-weight: 650; white-space: nowrap; }
.brand-text p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.admin-badge svg { width: 13px; height: 13px; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.user-chip svg { width: 13px; height: 13px; }

.page { width: min(1440px, 100%); margin: 0 auto; padding: 18px clamp(14px, 3vw, 36px) 26px; }
.page-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-3); }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  transition: color .16s, background .16s, box-shadow .16s;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
.page-meta { color: var(--muted); font-size: 11.5px; text-align: right; }
.view { width: 100%; }

/* live */
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: 16px; align-items: start; }
.player-card {
  padding: 14px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #0b0f14;
  border: 1px solid var(--line);
}
.player-shell.is-portrait { width: min(100%, 420px); aspect-ratio: 9 / 16; margin: 0 auto; }
.player-shell video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player-shade { position: absolute; left: 0; right: 0; height: 84px; pointer-events: none; }
.player-shade-top { top: 0; background: linear-gradient(180deg, rgba(3, 7, 12, 0.6), transparent); }
.player-shade-bottom { bottom: 0; background: linear-gradient(0deg, rgba(3, 7, 12, 0.7), transparent); }
.player-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(11, 15, 20, 0.58);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  backdrop-filter: blur(6px);
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.live-badge.is-live { color: #a7f3d0; border-color: rgba(52, 211, 153, 0.4); }
.live-badge.is-live .live-dot { background: #34d399; animation: pulse 1.8s ease-in-out infinite; }
.live-badge.is-idle { color: #fde68a; border-color: rgba(251, 191, 36, 0.3); }
.live-badge.is-error { color: #fecaca; border-color: rgba(248, 113, 113, 0.35); }
.mode-badge {
  height: 23px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 15, 20, 0.5);
  color: rgba(255, 255, 255, 0.62);
  font-size: 10.5px;
  line-height: 21px;
  backdrop-filter: blur(6px);
}
.player-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(9, 13, 18, 0.55);
  transition: opacity .2s;
}
.player-state.is-hidden { opacity: 0; pointer-events: none; }
.state-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; text-align: center; }
.state-panel p { margin: 0; max-width: 330px; color: rgba(255, 255, 255, 0.82); font-size: 12.5px; line-height: 1.6; }
.state-icon { width: 27px; height: 27px; stroke: #fbbf24; }
.player-state .ghost-btn {
  margin-top: 2px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.player-state .ghost-btn:hover { background: rgba(255, 255, 255, 0.18); }
.player-bottom { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.player-meta { display: flex; flex-direction: column; gap: 2px; color: rgba(255, 255, 255, 0.74); font-size: 10.5px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
.player-controls { display: flex; align-items: center; gap: 6px; }
.icon-btn.overlay {
  width: 33px;
  height: 33px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(11, 15, 20, 0.5);
  color: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
}
.icon-btn.overlay:hover { color: #fff; border-color: rgba(255, 255, 255, 0.36); background: rgba(11, 15, 20, 0.7); }
.player-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 11px 4px 2px; color: var(--muted); font-size: 11px; }
.foot-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.foot-stats span { display: inline-flex; align-items: center; gap: 6px; }
.foot-stats svg { width: 13px; height: 13px; }
.player-note { margin: 4px 4px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.side-stack { display: flex; flex-direction: column; gap: 13px; }
.card {
  padding: 15px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.card-head h2 { margin: 0; font-size: 13px; font-weight: 650; }
.mini-badge {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}
.mini-badge.is-live { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.mini-badge.is-busy { color: var(--amber); border-color: #fde68a; background: var(--amber-soft); }
.kv { display: grid; gap: 8px; margin: 0; }
.kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.kv dt { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.kv dd { margin: 0; overflow: hidden; color: var(--text-2); font-family: var(--mono); font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.muted-line { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.transcode-body { display: grid; gap: 9px; }
.job-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.job-name { overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.job-pct { color: var(--accent); font-size: 13px; font-weight: 650; }
.progress-track { height: 5px; overflow: hidden; border-radius: 999px; background: #eef1f4; }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: var(--accent-2); transition: width .4s; }
.progress-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10.5px; }
.queue-list, .recent-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.queue-item, .recent-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10.5px; }
.recent-item strong { color: var(--text-2); font-weight: 600; }
.recent-item.is-failed strong { color: var(--danger); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stat { padding: 10px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.stat span { display: block; color: var(--muted); font-size: 10.5px; }
.stat strong { display: block; margin-top: 3px; color: var(--text); font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat.wide { grid-column: 1 / -1; }
.stat.wide strong { color: var(--accent); font-size: 12.5px; }

/* ==========================================================================
   Archive
   ========================================================================== */
.archive-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.archive-head h2 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: .01em; }
.archive-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.archive-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.view-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-3); }
.view-toggle button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}
.view-toggle button:hover { color: var(--text); }
.view-toggle button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.summary-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.summary-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}
.summary-chip strong { color: var(--text-2); font-size: 12px; font-weight: 650; }

.select-bar {
  position: sticky;
  top: 74px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
}
.select-bar b { font-weight: 650; }
.select-bar .spacer { flex: 1; }
.select-bar .ghost-btn { min-height: 32px; background: var(--surface); }
.select-bar .danger-btn { min-height: 32px; padding: 0 13px; font-size: 12.5px; }

.archive-list { display: grid; gap: 14px; }
.archive-list.is-grid { grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); }
.archive-list.is-list { grid-template-columns: 1fr; gap: 8px; }

.video-card {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s, box-shadow .16s;
}
.video-card:hover { border-color: var(--line-strong); box-shadow: 0 2px 6px rgba(16, 24, 40, 0.06), 0 12px 24px rgba(16, 24, 40, 0.06); }
.video-card.is-selected { border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.16); }
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-3);
  cursor: pointer;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--dim);
  background: var(--surface-3);
}
.video-thumb-fallback svg { width: 28px; height: 28px; }
.video-thumb img + .video-thumb-fallback { display: none; }
.video-thumb img.is-hidden { display: none; }
.video-thumb img.is-hidden + .video-thumb-fallback { display: grid; }
.video-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(12, 17, 23, 0.72);
  color: #fff;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.video-codec {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(12, 17, 23, 0.62);
  color: rgba(255, 255, 255, 0.86);
  font-size: 9.5px;
}
.video-check {
  position: absolute;
  top: 8px;
  left: 8px;
  display: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  background: rgba(12, 17, 23, 0.42);
  color: transparent;
}
.video-check svg { width: 13px; height: 13px; stroke-width: 2.4; }
.archive-list.is-selecting .video-check { display: grid; }
.video-card.is-selected .video-check { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.video-info { padding: 10px 12px 4px; }
.video-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.video-meta { margin-top: 4px; color: var(--muted); font-size: 11px; }
.video-actions { display: flex; align-items: center; gap: 4px; padding: 6px 8px 9px; }
.video-actions .action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
}
.video-actions .action-btn:hover { background: var(--surface-2); color: var(--text); }
.video-actions .action-btn.is-danger:hover { background: var(--danger-soft); color: var(--danger); }
.video-actions .spacer { flex: 1; }
.video-actions a.action-btn { color: var(--muted); }

.video-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.video-row.is-selected { border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.14); }
.row-check {
  display: none;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: transparent;
}
.row-check svg { width: 12px; height: 12px; stroke-width: 2.4; }
.archive-list.is-selecting .row-check { display: grid; }
.video-row.is-selected .row-check { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.row-main { min-width: 0; flex: 1; cursor: pointer; }
.row-main strong { display: block; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.row-main span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.row-duration, .row-size { flex: none; min-width: 58px; color: var(--muted); font-size: 11.5px; text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.row-actions .action-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}
.row-actions .action-btn:hover { background: var(--surface-2); color: var(--text); }
.row-actions .action-btn.is-danger:hover { background: var(--danger-soft); color: var(--danger); }

.empty-state {
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 56px 20px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: var(--surface);
}
.empty-state svg { width: 32px; height: 32px; color: var(--dim); }
.empty-state h3 { margin: 2px 0 0; font-size: 14px; font-weight: 650; }
.empty-state p { margin: 0; max-width: 360px; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* security */
.security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.security-card {
  padding: 19px 19px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.security-card h2 { margin: 0; font-size: 15px; font-weight: 650; }
.security-card .card-intro { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.security-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.security-head .primary-btn { flex: none; white-space: nowrap; }
.token-list { display: grid; gap: 8px; margin-top: 15px; }
.token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.token-name { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 12.5px; font-weight: 600; }
.token-name .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
.token-meta { margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.token-actions { display: flex; align-items: flex-start; gap: 5px; }
.token-actions .icon-btn { width: 32px; height: 32px; border-radius: 8px; }
.token-actions .icon-btn.danger:hover { color: var(--danger); border-color: #fecaca; background: var(--danger-soft); }
.password-form { display: grid; gap: 11px; margin-top: 15px; }
.password-form .primary-btn { width: 100%; margin-top: 3px; }
.security-foot { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.security-foot b { color: var(--text-2); font-weight: 600; }

/* dialogs */
.video-dialog { width: min(920px, calc(100vw - 28px)); border-radius: 16px; }
.dialog-card {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 15px 18px 12px; border-bottom: 1px solid var(--line); }
.dialog-head h3 { margin: 0; font-size: 14px; font-weight: 650; }
.dialog-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.dialog-head .icon-btn { flex: none; }
.video-dialog video { width: 100%; max-height: 66vh; background: #000; display: block; }
.dialog-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 16px; }
.dialog-foot span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.confirm-dialog, .token-dialog { width: min(430px, calc(100vw - 28px)); border-radius: 16px; }
.confirm-body, .token-body { padding: 20px 20px 6px; }
.confirm-body h3, .token-body h3 { margin: 0; font-size: 15px; font-weight: 650; }
.confirm-body p, .token-body p { margin: 7px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.confirm-body .target {
  display: block;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}
.token-body .field { margin-top: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px 18px; }
.token-reveal {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}
.token-reveal code {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #0b5f59;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}
.token-reveal .ghost-btn { flex: none; min-height: 32px; background: var(--surface); }
.token-warn {
  margin-top: 10px !important;
  color: var(--amber) !important;
  font-size: 11.5px !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
  .console-layout { grid-template-columns: minmax(200px, 260px) minmax(340px, 1fr) minmax(200px, 260px); }
  .core-rings { width: min(100%, 460px); }
  .live-layout { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); }
}

@media (max-width: 980px) {
  .console-top { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .console-mid { order: 3; flex-basis: 100%; justify-content: space-between; }
  .console-layout { grid-template-columns: 1fr 1fr; }
  .hud-core { grid-column: 1 / -1; order: -1; padding-top: 6px; }
  .core-rings { width: min(84vw, 420px); }
  .hud-col { display: grid; grid-template-columns: 1fr 1fr; align-content: start; }
  .hud-col .hud-card:last-child { grid-column: 1 / -1; }
  .live-layout { grid-template-columns: 1fr; }
  .side-stack { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .side-stack .card:last-child { grid-column: 1 / -1; }
  .security-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .console-top {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "mid mid";
    align-items: center;
    column-gap: 9px;
    row-gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .console-brand { grid-area: brand; min-width: 0; }
  .console-brand h1 { overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; }
  .console-actions { grid-area: actions; gap: 6px; }
  .console-mid { grid-area: mid; display: flex; flex-basis: auto; order: 0; justify-content: flex-start; gap: 8px; }
  .console-actions .console-clock { display: none; }
  .hud-btn { padding: 0 11px; font-size: 12px; }
  .console-layout { grid-template-columns: 1fr; padding-bottom: 12px; }
  .hud-core { order: -1; }
  .hud-col { grid-template-columns: 1fr 1fr; }
  .hud-col-left { order: 1; }
  .hud-col-right { order: 2; }
  .core-rings { width: min(92vw, 380px); }
  .core-center .platform { display: none; }
  .console-footer { padding-bottom: 16px; }
  .page { padding-top: 12px; }
  .page-bar { flex-direction: column; align-items: stretch; }
  .page-meta { text-align: left; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; }
  .player-card { padding: 10px; border-radius: 16px; }
  .player-shell { border-radius: 10px; }
  .player-shell.is-portrait { width: 100%; }
  .player-note { display: none; }
  .player-meta { font-size: 9.5px; }
  .icon-btn.overlay { width: 30px; height: 30px; }
  .side-stack { grid-template-columns: 1fr; }
  .side-stack .card:last-child { grid-column: auto; }
  .archive-head { align-items: flex-start; }
  .archive-actions { width: 100%; }
  .archive-actions .segmented { flex: 1; }
  .archive-actions .segmented button { flex: 1; }
  .archive-list.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .video-info { padding: 9px 10px 3px; }
  .video-title { font-size: 12px; }
  .video-meta { font-size: 10px; }
  .video-actions { padding: 4px 6px 7px; }
  .video-actions .action-btn { padding: 0 6px; font-size: 10.5px; }
  .video-actions .action-btn span { display: none; }
  .row-duration, .row-size { min-width: 46px; font-size: 10.5px; }
  .row-size { display: none; }
  .topbar { flex-wrap: wrap; padding-top: 9px; padding-bottom: 9px; }
  .topbar-actions { gap: 6px; }
  .brand-text p { display: none; }
  .admin-badge { display: none; }
  .user-chip { display: none; }
  .video-dialog video { max-height: 56vh; }
  .select-bar { top: 62px; }
}

@media (max-width: 480px) {
  .console-brand .brand-mark { width: 34px; height: 34px; }
  .console-brand h1 { font-size: 14px; }
  .console-brand p { display: none; }
  .console-actions { gap: 5px; }
  .hud-btn { height: 34px; padding: 0 9px; font-size: 11px; gap: 6px; }
  .hud-btn svg { width: 14px; height: 14px; }
  .icon-btn { width: 34px; height: 34px; }
  .hud-col { grid-template-columns: 1fr; }
  .hud-col .hud-card:last-child { grid-column: auto; }
  .core-rings { width: min(94vw, 330px); }
  .core-legend { gap: 6px 14px; }
  .core-center .host { font-size: 16px; }
  .core-center .uptime { font-size: 9.5px; }
  .hud-value { font-size: 22px; }
  .net-item .hud-value { font-size: 15px; }
  .summary-chip { font-size: 10.5px; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat.wide { grid-column: auto; }
  .archive-list.is-grid { gap: 8px; }
  .video-card .video-info { padding: 8px; }
  .video-actions .action-btn { min-height: 26px; }
  .video-row { gap: 8px; padding: 10px 11px; }
  .row-duration { display: none; }
  .row-actions .action-btn { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
    scroll-behavior: auto !important;
  }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: #cdd2da; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b6bcc6; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Security layout: token management spans the full width. */
.security-card.wide { grid-column: 1 / -1; }
