/* ==================================================================
   softdist — dark glassmorphism UI
   One design system: tokens → primitives → components → layout.
   No external fonts, no CDN, no build step.
================================================================== */

:root {
  /* spacing — 4px base, used everywhere instead of ad-hoc numbers */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 56px;

  /* radii */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* type */
  --fs-xs: 11.5px;
  --fs-sm: 13px;
  --fs-md: 14.5px;
  --fs-lg: 17px;
  --fs-xl: 21px;
  --fs-2xl: 30px;
  --fs-3xl: 42px;
  --lh-tight: 1.15;
  --lh-normal: 1.5;

  /* palette */
  --bg-0: #08061c;
  --text: #f4f6ff;
  --text-dim: rgba(244, 246, 255, 0.66);
  --text-faint: rgba(244, 246, 255, 0.42);

  --glass: rgba(255, 255, 255, 0.06);
  --glass-hover: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.13);
  --stroke: rgba(255, 255, 255, 0.12);
  --stroke-strong: rgba(255, 255, 255, 0.22);
  --inset-hi: inset 0 1px 0 rgba(255, 255, 255, 0.08);

  --accent: #22d3ee;
  --accent-2: #7c5cff;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #fb7185;

  --blur: 18px;
  --shadow-sm: 0 4px 16px rgba(6, 4, 26, 0.35);
  --shadow-md: 0 12px 34px rgba(6, 4, 26, 0.45);
  --shadow-glow: 0 10px 30px rgba(34, 211, 238, 0.28);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.32, 0.72, 0.3, 1);
  --sidebar-w: 244px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--text);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(1200px 780px at 8% -12%, #2b2a86 0%, rgba(43, 42, 134, 0) 62%),
    radial-gradient(1000px 720px at 96% 4%, #6d28d9 0%, rgba(109, 40, 217, 0) 58%),
    radial-gradient(1100px 900px at 70% 108%, #db2777 0%, rgba(219, 39, 119, 0) 55%),
    linear-gradient(165deg, #08061c 0%, #16103f 48%, #2a1150 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* drifting aurora behind the glass */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.42;
  pointer-events: none;
}
body::before {
  width: 46vw; height: 46vw; top: -12vw; left: -8vw;
  background: radial-gradient(circle at 35% 35%, var(--accent), rgba(34, 211, 238, 0) 70%);
  animation: drift-a 30s ease-in-out infinite alternate;
}
body::after {
  width: 50vw; height: 50vw; bottom: -18vw; right: -12vw;
  background: radial-gradient(circle at 60% 40%, #db2777, rgba(219, 39, 119, 0) 70%);
  animation: drift-b 36s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(7vw, 5vh, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-6vw, -4vh, 0) scale(1.08); } }

::selection { background: rgba(34, 211, 238, 0.32); }

* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18); border-radius: var(--r-pill);
  border: 3px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); background-clip: content-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------ primitives */

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

.t-xs { font-size: var(--fs-xs); }
.t-sm { font-size: var(--fs-sm); }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.eyebrow {
  font-size: var(--fs-xs); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}

.stack > * + * { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.row--tight { gap: var(--sp-2); }
.row--between { justify-content: space-between; }
.spacer { flex: 1; }

.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md), var(--inset-hi);
}

.card { padding: var(--sp-6); }
.card--tight { padding: var(--sp-5); }
.card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap;
}
.card__title { font-size: var(--fs-lg); font-weight: 640; letter-spacing: -0.01em; }
.card__sub { font-size: var(--fs-sm); color: var(--text-dim); margin-top: var(--sp-1); }
.card h3 {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: var(--sp-3);
}

.divider { height: 1px; background: var(--stroke); margin: var(--sp-5) 0; border: 0; }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.grid--split-even { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }

/* --------------------------------------------------------------- buttons */

.btn {
  --btn-py: 11px;
  --btn-px: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: var(--btn-py) var(--btn-px);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 1.2;
  color: var(--text); text-decoration: none; white-space: nowrap; cursor: pointer;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--r-md);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--inset-hi);
  transition: transform 0.16s var(--ease), background 0.16s var(--ease), box-shadow 0.16s var(--ease),
    border-color 0.16s var(--ease);
}
.btn:hover { background: var(--glass-hover); border-color: var(--stroke-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--primary {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(124, 92, 255, 0.9));
  border-color: rgba(255, 255, 255, 0.28);
  color: #05121a;
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover { box-shadow: 0 14px 40px rgba(34, 211, 238, 0.4); background: linear-gradient(135deg, #22d3ee, #7c5cff); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn--ghost:hover { background: var(--glass); color: var(--text); }
.btn--danger { color: #ffdbe2; border-color: rgba(251, 113, 133, 0.36); }
.btn--danger:hover { background: rgba(251, 113, 133, 0.16); border-color: rgba(251, 113, 133, 0.55); }
.btn--sm { --btn-py: 7px; --btn-px: 12px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn--lg { --btn-py: 18px; --btn-px: 28px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn--block { width: 100%; }
.btn--icon { --btn-px: 9px; }

/* ----------------------------------------------------------------- forms */

.field + .field { margin-top: var(--sp-4); }
.field label, .label {
  display: block; font-size: var(--fs-sm); font-weight: 600;
  color: var(--text-dim); margin-bottom: var(--sp-2);
}
.hint { font-size: var(--fs-xs); color: var(--text-faint); margin-top: var(--sp-2); line-height: 1.45; }

input[type="text"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 44px; padding: 11px 14px;
  font: inherit; font-size: var(--fs-md); color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke); border-radius: var(--r-md);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
input::placeholder { color: rgba(244, 246, 255, 0.3); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(34, 211, 238, 0.7);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.input-row { display: flex; gap: var(--sp-2); align-items: stretch; }
.input-row input { flex: 1; min-width: 0; }
.input-row .btn { flex: none; }
.form-actions { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-5); flex-wrap: wrap; }

/* radio pills */
.choice { position: relative; display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice label {
  margin: 0; padding: 9px 14px; border-radius: var(--r-pill); cursor: pointer;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-dim);
  background: var(--glass); border: 1px solid var(--stroke);
  transition: 0.16s var(--ease);
}
.choice label:hover { color: var(--text); background: var(--glass-hover); }
.choice input:checked + label {
  color: var(--text); background: rgba(34, 211, 238, 0.16); border-color: rgba(34, 211, 238, 0.5);
}
.choice input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- alerts */

.alert {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md); font-size: var(--fs-sm);
  background: var(--glass); border: 1px solid var(--stroke);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.alert + * { margin-top: var(--sp-5); }
.alert--success { border-color: rgba(74, 222, 128, 0.42); background: rgba(74, 222, 128, 0.1); }
.alert--error { border-color: rgba(251, 113, 133, 0.45); background: rgba(251, 113, 133, 0.11); }
.alert a { color: var(--accent); }

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--stroke); color: var(--text-dim);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge--plain::before { display: none; }
.badge--ready, .badge--done, .badge--active { color: var(--ok); border-color: rgba(74, 222, 128, 0.38); }
.badge--pending, .badge--building, .badge--queued, .badge--running { color: var(--warn); border-color: rgba(251, 191, 36, 0.38); }
.badge--failed { color: var(--bad); border-color: rgba(251, 113, 133, 0.42); }

/* ------------------------------------------------------------------ code */

.code {
  display: block; font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.6;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--stroke);
  word-break: break-all; user-select: all;
}
.code--inline {
  display: inline-block; padding: 3px 8px; border-radius: var(--r-sm);
  font-size: var(--fs-xs); white-space: nowrap; word-break: normal; letter-spacing: 0.01em;
}
a.code--inline { text-decoration: none; color: var(--accent); transition: background 0.16s var(--ease); }
a.code--inline:hover { background: rgba(34, 211, 238, 0.16); }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; margin: 0 calc(var(--sp-2) * -1); padding: 0 var(--sp-2); }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 0 var(--sp-3) var(--sp-3); text-align: left; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint);
}
td {
  padding: var(--sp-3); border-top: 1px solid var(--stroke); vertical-align: middle;
  font-size: var(--fs-sm);
}
tbody tr { transition: background 0.16s var(--ease); }
tbody tr:hover td { background: rgba(255, 255, 255, 0.04); }
td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline-flex; }
td.actions > * + * { margin-left: var(--sp-2); }
.cell-title { font-weight: 620; font-size: var(--fs-md); }
.cell-sub { font-size: var(--fs-xs); color: var(--text-faint); }

/* -------------------------------------------------------------- listrows */

.list { display: flex; flex-direction: column; }
.list__item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-top: 1px solid var(--stroke);
}
.list__item:first-child { border-top: 0; padding-top: 0; }
.list__item:last-child { padding-bottom: 0; }
.list__main { min-width: 0; flex: 1; }
.list__name { display: block; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.list__meta { display: block; font-size: var(--fs-xs); color: var(--text-faint); line-height: 1.4; }

.filetype {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--stroke);
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--text-dim); text-transform: uppercase;
}
.filetype--exe { color: var(--accent); border-color: rgba(34, 211, 238, 0.4); background: rgba(34, 211, 238, 0.1); }
.filetype--dll { color: var(--accent-2); border-color: rgba(124, 92, 255, 0.4); background: rgba(124, 92, 255, 0.1); }

.empty {
  padding: var(--sp-8) var(--sp-4); text-align: center;
  color: var(--text-faint); font-size: var(--fs-sm);
}

/* -------------------------------------------------------------- progress */

.progress { height: 8px; border-radius: var(--r-pill); background: rgba(0, 0, 0, 0.32); overflow: hidden; }
.progress__bar {
  height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.45s var(--ease);
}
.job { margin-top: var(--sp-5); }
.job__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }

/* -------------------------------------------------------------- dropzone */

.dropzone {
  display: block; margin-bottom: var(--sp-5); padding: var(--sp-8) var(--sp-5); text-align: center; cursor: pointer;
  border: 1.5px dashed rgba(255, 255, 255, 0.26); border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.035);
  transition: 0.2s var(--ease);
}
.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--accent); background: rgba(34, 211, 238, 0.09); transform: translateY(-1px);
}
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone__icon {
  width: 46px; height: 46px; margin: 0 auto var(--sp-3); display: grid; place-items: center;
  border-radius: 50%; background: rgba(34, 211, 238, 0.14); border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--accent);
}
.dropzone__icon svg { width: 20px; height: 20px; }
.dropzone__title { font-size: var(--fs-lg); font-weight: 640; }
.dropzone__hint { font-size: var(--fs-sm); color: var(--text-faint); margin-top: var(--sp-1); }
.dropzone__files {
  margin-top: var(--sp-4); text-align: left; display: none; gap: var(--sp-2); flex-direction: column;
}
.dropzone__files.is-visible { display: flex; }
.dropzone__file {
  display: flex; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06); font-size: var(--fs-sm);
}

/* ----------------------------------------------------------- admin shell */

.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; gap: var(--sp-6);
  padding: var(--sp-6) var(--sp-4);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  border-right: 1px solid var(--stroke);
}

.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; padding: 0 var(--sp-2); }
.brand__mark {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(34, 211, 238, 0.32);
  color: #06121c; font-weight: 800; font-size: var(--fs-lg);
}
.brand__name { font-weight: 700; font-size: var(--fs-lg); letter-spacing: -0.01em; line-height: 1.1; }
.brand__sub { font-size: var(--fs-xs); color: var(--text-faint); }

.side-nav { display: flex; flex-direction: column; gap: var(--sp-1); }
.side-nav__label {
  padding: 0 var(--sp-3) var(--sp-2); font-size: var(--fs-xs); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-faint);
}
.side-nav a {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px var(--sp-3); border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: 560; color: var(--text-dim); text-decoration: none;
  border: 1px solid transparent; transition: 0.16s var(--ease);
}
.side-nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.side-nav a:hover { background: var(--glass); color: var(--text); }
.side-nav a.is-active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(124, 92, 255, 0.14));
  border-color: rgba(34, 211, 238, 0.34); color: var(--text);
}
.side-nav a.is-active svg { opacity: 1; color: var(--accent); }

.sidebar__foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-3); }
.who {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3);
  border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--stroke);
}
.who__avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12); font-weight: 700; font-size: var(--fs-sm);
}
.who__name { font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; }
.who__role { font-size: var(--fs-xs); color: var(--text-faint); }

.main { min-width: 0; padding: var(--sp-7) var(--sp-7) var(--sp-9); }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap;
}
.page-head__title { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; line-height: var(--lh-tight); }
.page-head__sub { font-size: var(--fs-sm); color: var(--text-dim); margin-top: var(--sp-2); max-width: 62ch; }
.page-head__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* --------------------------------------------------------------- metrics */

.metric { padding: var(--sp-5); }
.metric__label { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.metric__value {
  margin-top: var(--sp-3); font-size: var(--fs-2xl); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums;
}
.metric__meta { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--text-dim); }

/* ----------------------------------------------------------------- chart */

.chart { display: block; width: 100%; height: auto; }
.chart .bar { fill: url(#barGradient); transition: fill 0.16s var(--ease); }
.chart .bar:hover { fill: var(--accent); }
.chart .grid-line { stroke: rgba(255, 255, 255, 0.09); stroke-width: 1; }
.chart .axis-label { fill: rgba(244, 246, 255, 0.4); font-size: 9px; font-family: var(--font); }

/* ------------------------------------------------------------ key/values */

.kv { display: flex; justify-content: space-between; gap: var(--sp-4); padding: 10px 0; font-size: var(--fs-sm); }
.kv + .kv { border-top: 1px solid var(--stroke); }
.kv__k { color: var(--text-faint); }
.kv__v { text-align: right; overflow-wrap: anywhere; }

/* -------------------------------------------------------- public page */

.public { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: var(--sp-9) var(--sp-5) var(--sp-7); }
.public__inner { width: 100%; max-width: 560px; }
.public__head { text-align: center; margin-bottom: var(--sp-6); }
.public__title {
  margin: var(--sp-3) 0 var(--sp-3); font-size: var(--fs-3xl); font-weight: 750;
  letter-spacing: -0.035em; line-height: var(--lh-tight);
}
.public__meta {
  display: flex; justify-content: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm); color: var(--text-dim);
}
.public__meta span { display: inline-flex; align-items: center; gap: 6px; }

.hero {
  position: relative; padding: var(--sp-6);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045));
  border-radius: var(--r-xl);
}
.hero::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.5), rgba(255, 255, 255, 0.08) 40%, rgba(124, 92, 255, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

.password-row { display: flex; gap: var(--sp-2); align-items: stretch; }
.password-row .code { flex: 1; min-width: 0; font-size: var(--fs-md); letter-spacing: 0.04em; }
.password-row .btn { flex: none; }

.manifest { display: flex; flex-direction: column; gap: var(--sp-1); }
.manifest__row {
  display: flex; justify-content: space-between; gap: var(--sp-3);
  padding: 9px var(--sp-3); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.045); font-size: var(--fs-sm);
}
.manifest__row span:first-child { font-family: var(--mono); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.manifest__row span:last-child { color: var(--text-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }

.center-screen { min-height: 100vh; display: grid; place-items: center; padding: var(--sp-6); }
.auth-card { width: min(400px, 100%); padding: var(--sp-7); }

.page-foot { margin-top: var(--sp-7); text-align: center; font-size: var(--fs-xs); color: var(--text-faint); }

/* ----------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  :root { --sidebar-w: 216px; }
  .main { padding: var(--sp-6) var(--sp-5) var(--sp-8); }
}

@media (max-width: 980px) {
  .grid--split, .grid--2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: static; height: auto; flex-direction: row; align-items: center;
    gap: var(--sp-4); padding: var(--sp-3) var(--sp-4);
    border-right: 0; border-bottom: 1px solid var(--stroke); overflow-x: auto;
  }
  .brand__text { display: none; }
  .side-nav { flex-direction: row; gap: var(--sp-2); }
  .side-nav__label { display: none; }
  .sidebar__foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .who { display: none; }
  .main { padding: var(--sp-5) var(--sp-4) var(--sp-8); }
  .page-head__title { font-size: var(--fs-xl); }
}

@media (max-width: 560px) {
  :root { --fs-3xl: 32px; --fs-2xl: 24px; }
  .card, .card--tight { padding: var(--sp-5) var(--sp-4); }
  .public { padding: var(--sp-6) var(--sp-4); }
  .form-actions .btn, .page-head__actions .btn { flex: 1; }
}

/* --------------------------------------------------------------- TOTP code */

.totp {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  margin-bottom: var(--sp-4); padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md); border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.08);
}
.totp__label { font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.totp__code {
  font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--accent); margin-top: var(--sp-1); font-variant-numeric: tabular-nums; user-select: all;
}
.totp__side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-2); }
.totp__ring {
  font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--text-dim);
  padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--stroke);
}

/* ----------------------------------------------------- accounts (GH manager) */

.toolbar { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.toolbar input[type="search"] { flex: 1; min-width: 200px; min-height: 40px; }
.toolbar select { width: auto; min-height: 40px; }

.bulkbar {
  display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-md);
  background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.3);
}

.acc-table td, .acc-table th { padding: var(--sp-3) var(--sp-4); }
.acc-table .col-check { width: 34px; }
.acc-table .col-num { width: 40px; }
.acc-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.mono-link { font-family: var(--mono); font-size: var(--fs-sm); color: var(--text); text-decoration: none; }
.mono-link:hover { color: var(--accent); }
tr[data-row].is-hidden { display: none; }

.reveal { cursor: pointer; font-family: var(--mono); font-size: var(--fs-sm); color: var(--text-dim); user-select: none; }
.reveal:hover { color: var(--text); }
.reveal.is-shown { color: var(--text); user-select: all; }

.totp-cell {
  display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer;
  font-family: var(--mono);
}
.totp-cell__ring {
  font-size: 10px; color: var(--text-faint); font-variant-numeric: tabular-nums;
  min-width: 26px; text-align: right;
}
.totp-cell__code {
  font-size: var(--fs-md); font-weight: 700; letter-spacing: 0.08em; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.totp-cell.is-copied .totp-cell__code, [data-totp-code].is-copied { color: var(--ok); }
