/* ══════════════════════════════════════════════════════════
   Hunt — Threat Intelligence Terminal
   Font: IBM Plex Mono (data) + Syne (display)
   Accent: #00e5c3 (surveillance teal)
   ══════════════════════════════════════════════════════════ */

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

:root {
  --bg:          #09090d;
  --surface:     #0f1017;
  --surface2:    #161825;
  --surface3:    #1c1f2e;
  --border:      #1e2032;
  --border-hi:   #2a2d45;

  --accent:      #00e5c3;
  --accent-h:    #00ffd6;
  --accent-dim:  rgba(0, 229, 195, 0.07);
  --accent-border: rgba(0, 229, 195, 0.22);

  --green:       #10d97e;
  --yellow:      #f59e0b;
  --red:         #f43f5e;
  --purple:      #a78bfa;
  --blue:        #60a5fa;

  --muted:       #30374a;
  --text:        #c9d1e0;
  --text-dim:    #4a5368;
  --text-bright: #edf0f8;

  --font-mono:    'IBM Plex Mono', 'Fira Code', ui-monospace, monospace;
  --font-display: 'Syne', sans-serif;

  --r:    3px;
  --r-lg: 6px;
}

/* ── Base ─────────────────────────────────────────────── */
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

body {
  background-image:
    radial-gradient(ellipse 120% 50% at 50% -10%, rgba(0,229,195,.05) 0%, transparent 55%),
    linear-gradient(rgba(0,229,195,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,195,.012) 1px, transparent 1px);
  background-size: auto, 80px 80px, 80px 80px;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-mono); font-size: 13px; border: none; background: none; }
input, select, textarea { font-family: var(--font-mono); font-size: 13px; }
.hidden { display: none !important; }

/* ── Login ────────────────────────────────────────────── */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 70% at 50% 50%, rgba(0,229,195,.06) 0%, transparent 65%),
    linear-gradient(rgba(0,229,195,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,195,.015) 1px, transparent 1px);
  background-size: auto, 60px 60px, 60px 60px;
}

.login-box {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-top: 2px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 44px 40px;
  width: 380px;
  box-shadow:
    0 24px 80px rgba(0,0,0,.7),
    0 0 60px rgba(0,229,195,.06);
  animation: modal-in .3s ease;
}

.login-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 36px;
}
.login-logo svg { stroke: var(--accent); width: 22px; height: 22px; }

/* ── App Shell ────────────────────────────────────────── */
.app { display: flex; height: 100vh; }

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar {
  width: 220px; min-width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.sidebar::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0.5;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}
.sidebar-logo svg { stroke: var(--accent); flex-shrink: 0; }

/* ── Projects page grid ───────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.project-card {
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.project-card:hover {
  border-color: var(--accent-border);
}

/* ── Project switcher (tenant-only) ───────────────────── */
.project-switcher {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.project-switcher label {
  display: block;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.project-switcher-row {
  display: flex; gap: 6px; align-items: stretch;
}
.project-switcher select {
  flex: 1;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}
.project-switcher select:focus { border-color: var(--accent); }
.project-switcher .btn-icon {
  width: 28px; flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  color: var(--accent);
  font-size: 16px; font-weight: 700;
  line-height: 1;
  transition: all 0.12s;
}
.project-switcher .btn-icon:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.sidebar-nav {
  flex: 1; padding: 10px 0;
  display: flex; flex-direction: column;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}
.nav-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.nav-item:hover { background: var(--surface2); color: var(--text); border-left-color: var(--border-hi); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); border-left-color: var(--accent); }

.sidebar-footer { padding: 10px 0; border-top: 1px solid var(--border); }

.btn-ghost {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim);
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}
.btn-ghost svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-ghost:hover { background: rgba(244,63,94,.07); color: var(--red); border-left-color: var(--red); }

/* ── Main ─────────────────────────────────────────────── */
.main { flex: 1; overflow-y: auto; padding: 32px 36px; }

/* ── Page animations ──────────────────────────────────── */
.page { animation: page-in .18s ease; animation-fill-mode: both; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Page Header ──────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text-bright);
}
.page-subtitle {
  font-size: 11px; color: var(--text-dim);
  margin-top: 4px; letter-spacing: 0.03em;
}

/* ── Cards ────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent-border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  transition: border-top-color .2s, box-shadow .2s;
}
.card:hover {
  border-top-color: var(--accent);
  box-shadow: 0 0 20px rgba(0,229,195,.06);
}
.card-label {
  font-size: 9px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600;
}
.card-value {
  font-family: var(--font-mono);
  font-size: 26px; font-weight: 600;
  margin-top: 8px; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
  line-height: 1.1;
}
.card-value.green  { color: var(--green); }
.card-value.yellow { color: var(--yellow); }
.card-value.red    { color: var(--red); }
.card-value.accent { color: var(--accent); }

/* ── Tables ───────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.table-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.table-title {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-dim);
}
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 9px 20px;
  font-size: 9px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 11px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 12px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,229,195,.022); }
.empty-row td { text-align: center; color: var(--text-dim); padding: 44px; font-size: 12px; }
.loading-row td { text-align: center; padding: 44px; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; }

/* ── Badges ───────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border-radius: 2px;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.badge.online         { background: rgba(16,217,126,.1);   color: var(--green); }
.badge.online::before { background: var(--green); animation: pulse-dot 2.5s ease infinite; }
.badge.offline        { background: rgba(244,63,94,.1);    color: var(--red); }
.badge.offline::before{ background: var(--red); }
.badge.stale          { background: rgba(245,158,11,.1);   color: var(--yellow); }
.badge.stale::before  { background: var(--yellow); }
.badge.production, .badge.prod { background: rgba(0,229,195,.1); color: var(--accent); }
.badge.production::before, .badge.prod::before { background: var(--accent); }
.badge.dev            { background: rgba(74,83,104,.18);   color: var(--text-dim); }
.badge.dev::before    { background: var(--text-dim); }
.badge.trial          { background: rgba(0,229,195,.1);    color: var(--accent); }
.badge.trial::before  { background: var(--accent); }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,217,126,.5); }
  50%       { box-shadow: 0 0 0 4px rgba(16,217,126,0); }
}

/* ── IP eye-toggle (tokens.js / tenant view) ───────────── */
[data-ip-cell] .ip-mask { display: none; }
[data-ip-cell] .ip-real { display: inline; }
[data-ip-cell].ip-hidden .ip-mask { display: inline; }
[data-ip-cell].ip-hidden .ip-real { display: none; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r);
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  transition: all 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary  { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-h); box-shadow: 0 0 18px rgba(0,229,195,.3); }
.btn-danger   { background: var(--red); color: #fff; }
.btn-danger:hover { background: #ff5572; box-shadow: 0 0 14px rgba(244,63,94,.3); }
.btn-outline  { border: 1px solid var(--border-hi); color: var(--text); background: transparent; }
.btn-outline:hover { background: var(--surface2); border-color: var(--accent-border); }
.btn-sm { padding: 5px 10px; font-size: 10px; }
.btn-full { width: 100%; justify-content: center; }
.btn svg { width: 13px; height: 13px; }
.action-bar { display: flex; gap: 6px; }

/* ── Forms ────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--text-dim); margin-bottom: 7px;
}
.field input, .field select {
  width: 100%; padding: 9px 12px;
  background: var(--surface2); border: 1px solid var(--border-hi);
  border-radius: var(--r); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,229,195,.1);
}
.error-text { color: var(--red); font-size: 12px; margin-top: 10px; }

/* ── Modal ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  animation: overlay-in .15s ease;
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-top: 2px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  width: 480px; max-width: 95vw; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.55), 0 0 50px rgba(0,229,195,.07);
  animation: modal-in .18s cubic-bezier(.22,.68,0,1.2);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 20px; color: var(--text-bright);
}
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ── Token Reveal ─────────────────────────────────────── */
.token-reveal {
  background: var(--surface2);
  border: 1px solid var(--accent-border);
  border-radius: var(--r); padding: 14px 16px; margin: 14px 0;
  font-family: var(--font-mono); font-size: 12px;
  word-break: break-all; color: var(--accent);
  letter-spacing: 0.02em;
}
.token-warn {
  font-size: 11px; color: var(--yellow);
  display: flex; align-items: center; gap: 6px;
}
.token-warn svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Toast ────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px; z-index: 200;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: var(--r);
  background: var(--surface2); border: 1px solid var(--border-hi);
  border-left: 3px solid var(--border-hi);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  animation: toast-in .22s cubic-bezier(.34,1.56,.64,1);
  font-size: 12px; min-width: 200px;
}
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }
.toast.info    { border-left-color: var(--accent); }
@keyframes toast-in {
  from { transform: translateX(16px) scale(0.96); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}

/* ── Spinner ──────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid var(--border-hi); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mono text ────────────────────────────────────────── */
.mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }

/* ── Settings page legacy ─────────────────────────────── */
h1.page-title, .page-header h1 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800; color: var(--text-bright);
}
.card-title, h2 {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; color: var(--text-bright);
  margin-bottom: 14px;
}
.text-muted { color: var(--text-dim); font-size: 12px; }
.qr-box { margin: 16px 0; }
.flex-row { display: flex; }
.gap-sm { gap: 8px; }
.mt-sm { margin-top: 12px; }
.btn.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-dim); border: 1px solid var(--border-hi);
  transition: all 0.15s; width: auto;
}
.btn.btn-ghost:hover { color: var(--text); background: var(--surface2); }

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }


/* ── Dashboard helpers ────────────────────────────────── */
/* card-head: flex row used inside .table-header to place a title + action btn */
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
/* empty-state: centred placeholder inside a card/table-wrap when there is no data */
.empty-state {
  padding: 44px 24px; text-align: center;
  color: var(--text-dim); font-size: 12px;
}

/* ══════════════════════════════════════════════════════════
   Plugin Admin — ZKM stack + version manager
   ══════════════════════════════════════════════════════════ */

/* ── ZKM stack section ─────────────────────────────── */
.zkm-stack {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent-border);
  border-radius: var(--r-lg);
  padding: 18px 20px 16px;
  margin-bottom: 20px;
}
.zkm-stack-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 10px;
}
.zkm-stack-title {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-bright);
}
.zkm-stack-subtitle {
  font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.04em;
}
.zkm-loading {
  padding: 24px 0; text-align: center;
  font-size: 11px; letter-spacing: 0.05em;
}

.zkm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 980px) {
  .zkm-grid { grid-template-columns: 1fr; }
}

.zkm-tile {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 14px 12px;
  display: flex; flex-direction: column;
  min-height: 180px;
  transition: border-color .15s ease;
}
.zkm-tile:hover { border-color: var(--border-hi); }

.zkm-tile-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.zkm-tile-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zkm-tile-label {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  color: var(--text-bright);
  letter-spacing: 0.02em;
}
.zkm-tile-hint {
  font-size: 9px; color: var(--text-dim);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* Status pill — small dot + label, single line */
.zkm-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.zkm-pill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}
.zkm-pill-ok    { color: var(--green); }
.zkm-pill-warn  { color: var(--yellow); }
.zkm-pill-error { color: var(--red); }
.zkm-pill-muted { color: var(--text-dim); }
.zkm-pill-dot.zkm-pill-ok    { background: var(--green);    color: var(--green); }
.zkm-pill-dot.zkm-pill-warn  { background: var(--yellow);   color: var(--yellow); }
.zkm-pill-dot.zkm-pill-error { background: var(--red);      color: var(--red); }
.zkm-pill-dot.zkm-pill-muted { background: var(--text-dim); color: var(--text-dim); }

/* In the tile-head, .zkm-pill follows the dot — keep label color matching pill */
.zkm-pill:has(.zkm-pill-ok)    { color: var(--green); }
.zkm-pill:has(.zkm-pill-warn)  { color: var(--yellow); }
.zkm-pill:has(.zkm-pill-error) { color: var(--red); }

.zkm-tile-body {
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 12px;
  font-size: 11px;
}
.zkm-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 2px 0;
}
.zkm-key {
  color: var(--text-dim); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.zkm-val {
  color: var(--text); font-size: 11px;
  text-align: right; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.zkm-val.mono {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-dim);
}
.zkm-empty {
  color: var(--text-dim);
  font-size: 11px; line-height: 1.5;
  padding: 12px 0;
  text-align: center;
}

.zkm-tile-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.zkm-tile-actions .btn { flex: 1; min-width: 0; }

.zkm-busy {
  margin-top: 12px; padding: 8px 12px;
  background: var(--surface2);
  border-radius: var(--r);
  font-size: 11px; color: var(--text-dim);
  display: flex; align-items: center; gap: 8px;
}
.spinner-inline {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid var(--border-hi);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Plugin versions section ──────────────────────── */
.pv-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent-border);
  border-radius: var(--r-lg);
  padding: 18px 20px 16px;
}
.pv-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 10px;
}
.pv-section-title {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-bright);
}
.pv-section-subtitle {
  font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.04em;
}

.pv-upload {
  display: grid;
  grid-template-columns: 110px 220px 1fr 200px auto;
  gap: 10px; align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
@media (max-width: 1100px) {
  .pv-upload { grid-template-columns: 1fr 1fr; }
  .pv-submit { grid-column: 1 / -1; }
}
.pv-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pv-field label {
  font-size: 9px; color: var(--text-dim);
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}
.pv-field input[type="text"],
.pv-field input[type="file"] {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  padding: 7px 10px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color .12s;
}
.pv-field input[type="text"]:focus { border-color: var(--accent); }
.pv-field input[type="file"] {
  font-size: 10px;
  cursor: pointer;
  padding: 6px 10px;
}
.pv-field-grow { min-width: 160px; }
.pv-submit {
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.pv-submit svg { width: 13px; height: 13px; }

.pv-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface2);
}
.pv-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
.pv-table thead th {
  background: var(--surface);
  padding: 10px 14px;
  text-align: left;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.pv-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.pv-table tbody tr:last-child td { border-bottom: none; }
.pv-table tbody tr:hover { background: var(--surface3); }
.pv-num { text-align: right; font-variant-numeric: tabular-nums; }
.pv-actions-col { text-align: right; white-space: nowrap; }
.pv-actions-col .btn { margin-left: 4px; }

.pv-version {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.01em;
}

.pv-loading td {
  padding: 28px 0 !important;
  text-align: center;
}
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border-hi);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.pv-empty {
  padding: 40px 24px !important;
  text-align: center;
  color: var(--text-dim);
}
.pv-empty-icon {
  margin: 0 auto 12px;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); opacity: 0.5;
}
.pv-empty-title {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.pv-empty-hint {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* Version status badges */
.pv-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid currentColor;
  background: transparent;
}
.pv-badge-ok    { color: var(--green); }
.pv-badge-warn  { color: var(--yellow); }
.pv-badge-muted { color: var(--text-dim); }

/* ── btn-sm modifier (used across the page) ─────────── */
.btn-sm {
  padding: 5px 10px;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.btn-sm svg { width: 11px; height: 11px; }

/* ══════════════════════════════════════════════════════════
   Setup Wizard (Phase 4)
   ══════════════════════════════════════════════════════════ */

/* Step indicator bar */
.wiz-steps {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.wiz-step {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r);
  color: var(--text-dim);
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.wiz-step.active {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}
.wiz-step.done {
  color: var(--green);
  border-color: rgba(16,217,126,.22);
  background: rgba(16,217,126,.06);
}

/* Wizard nav row (back / next buttons) */
.wiz-nav {
  display: flex; gap: 8px; margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Plan picker list */
.plan-list {
  display: flex; flex-direction: column; gap: 8px;
  margin: 14px 0;
}
.plan-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.12s, background 0.12s;
}
.plan-pick:hover { border-color: var(--accent-border); background: var(--surface3); }
.plan-pick input[type="radio"] { accent-color: var(--accent); flex-shrink: 0; }

/* Token display box (one-time secret) */
.token-box {
  background: var(--surface2);
  border: 1px solid var(--accent-border);
  border-radius: var(--r);
  padding: 12px 14px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent);
  word-break: break-all;
  white-space: pre-wrap;
  letter-spacing: 0.03em;
  margin: 12px 0;
}

/* ── Suspended-project banner ───────────────────────────── */
.suspended-banner {
  background: rgba(255,90,90,.12); color: #ff8a8a;
  border: 1px solid rgba(255,90,90,.3); border-radius: 8px;
  padding: 10px 14px; margin: 0 0 16px; font-size: 13px;
}
.suspended-banner a { color: var(--accent); }

/* ── Impersonation banner ────────────────────────────────── */
.imp-banner {
  background: rgba(245,158,11,.13); color: #fbbf24;
  border: 1px solid rgba(245,158,11,.35); border-radius: 8px;
  padding: 10px 14px; margin: 0 0 16px; font-size: 13px;
}
.imp-banner a { color: var(--accent); }
