/* ============================================================
   client-services / verifier.css
   ------------------------------------------------------------
   Intentionally a different visual palette from the NetAppMav
   console — this app teaches the OAuth2 flow from a third-party
   client perspective, so the chrome should NOT look like an
   internal admin page. Dark neutral background, monospaced
   code panels, single-color accent for state transitions.
   ============================================================ */

:root {
  --bg:        #0f172a;
  --bg-soft:   #1e293b;
  --bg-card:   #f8fafc;
  --bg-code:   #0f172a;
  --fg:        #0f172a;
  --fg-on-dk:  #e2e8f0;
  --muted:     #64748b;
  --muted-dk:  #94a3b8;
  --accent:    #2563eb;
  --accent-dk: #1d4ed8;
  --good:      #16a34a;
  --good-soft: #dcfce7;
  --bad:       #dc2626;
  --bad-soft:  #fee2e2;
  --warn:      #d97706;
  --warn-soft: #fef3c7;
  --line:      #e2e8f0;
  --line-dk:   #334155;
  --radius:    10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.10);
  --mono:      ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans:      -apple-system, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre { font-family: var(--mono); font-size: 12.5px; }
input, select, button { font-family: inherit; }

/* ----------------------- icon system ---------------------- */
/* Lucide-style stroke icons referenced from the inline SVG
 * sprite. Default size matches inline 14px text; modifiers
 * step the box up/down without changing line layout. Inherits
 * `currentColor` so every icon takes the surrounding text colour. */
.vf-ico {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  vertical-align: -2px;
  stroke-width: 2;
}
.vf-ico-xs { width: 12px; height: 12px; }
.vf-ico-sm { width: 14px; height: 14px; }
.vf-ico-md { width: 18px; height: 18px; }
.vf-ico-lg { width: 28px; height: 28px; }

/* Buttons that contain icons line them up with the label. */
.vf-btn,
.vf-tab,
.vf-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* Anonymous icon-only buttons (drawer / theme toggles in the
 * header). Slightly muted in idle, brightens on hover. */
.vf-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.10);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.vf-icon-btn:hover {
  background: rgba(148, 163, 184, 0.25);
  color: #fff;
  border-color: rgba(148, 163, 184, 0.45);
}
.vf-icon-btn[data-active="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ------------------------ header ------------------------ */
.vf-header {
  background: var(--bg);
  color: var(--fg-on-dk);
  border-bottom: 1px solid #1e293b;
}
.vf-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.vf-brand { display: flex; align-items: center; gap: 14px; }
.vf-brand-mark {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
}
.vf-brand-mark .vf-ico { width: 22px; height: 22px; stroke-width: 2.25; }
.vf-brand h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.vf-tagline {
  margin: 3px 0 0;
  color: var(--muted-dk);
  font-size: 12.5px;
  line-height: 1.5;
  max-width: 640px;
}
.vf-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.vf-meta-pill {
  background: rgba(148, 163, 184, 0.15);
  color: var(--muted-dk);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-family: var(--mono);
}
.vf-meta-pill--alt { color: #c7d2fe; border-color: rgba(99, 102, 241, 0.4); background: rgba(99, 102, 241, 0.15); }
.vf-meta-pill--auth { font-weight: 600; }
.vf-meta-pill--auth[data-state="anon"] {
  color: #fcd34d; border-color: rgba(252, 211, 77, 0.4); background: rgba(252, 211, 77, 0.10);
}
.vf-meta-pill--auth[data-state="signed-in"] {
  color: #86efac; border-color: rgba(134, 239, 172, 0.4); background: rgba(134, 239, 172, 0.12);
}
/* TTL countdown — green when comfortably alive, amber under 5
 * minutes, red and gently pulsing under 60s so the operator
 * notices their bearer is about to expire mid-flow. */
.vf-meta-pill--ttl {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.4);
  background: rgba(134, 239, 172, 0.12);
  font-variant-numeric: tabular-nums;
}
.vf-meta-pill--ttl[data-warn="warn"] {
  color: #fcd34d;
  border-color: rgba(252, 211, 77, 0.4);
  background: rgba(252, 211, 77, 0.12);
}
.vf-meta-pill--ttl[data-warn="critical"] {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.5);
  background: rgba(248, 113, 113, 0.15);
  animation: vfPulse 1.4s ease-in-out infinite;
}
.vf-meta-pill--ttl[data-warn="dead"] {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.5);
  background: rgba(248, 113, 113, 0.20);
}
@keyframes vfPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
.vf-btn-mini {
  padding: 4px 12px !important;
  font-size: 11.5px !important;
  border-radius: 999px !important;
}
/* The header sits on the dark midnight band, so the default ghost
 * button (transparent bg + var(--fg) text) blends into the background.
 * Force a white pill with dark text for the auth controls so they read
 * cleanly against the navy header. */
#vfSignInBtn,
#vfSignOutBtn {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #ffffff !important;
  font-weight: 600;
}
#vfSignInBtn:hover,
#vfSignOutBtn:hover {
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
}

/* OBO additions: grant selector, OBO-only sub-cards */
.vf-grant {
  border-left: 4px solid var(--accent);
}
.vf-grant-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 6px 0;
}
@media (max-width: 720px) { .vf-grant-pick { grid-template-columns: 1fr; } }
.vf-grant-opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.vf-grant-opt:hover { border-color: var(--accent); background: #f8fafc; }
.vf-grant-opt input[type="radio"] { margin-top: 4px; }
.vf-grant-opt strong { display: block; margin-bottom: 4px; }
.vf-grant-opt small { color: var(--muted); display: block; line-height: 1.4; }
.vf-grant-opt input[type="radio"]:checked ~ div strong { color: var(--accent); }
.vf-grant-opt:has(input[type="radio"]:checked) {
  border-color: var(--accent);
  background: #eff6ff;
  box-shadow: var(--shadow-sm);
}

.vf-claim--act {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #4338ca;
}

/* ------------------------ layout ------------------------ */
.vf-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ------------------------- tabs -------------------------- */
.vf-tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow-sm);
}
.vf-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 16px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, color 0.15s;
}
.vf-tab:hover { background: #f1f5f9; color: var(--fg); }
.vf-tab.is-active {
  background: var(--bg);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.vf-tab.is-active:hover { background: var(--bg); color: #fff; }
.vf-tab-icon { font-size: 14px; opacity: 0.85; }
.vf-tab-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  font-family: var(--mono);
}
.vf-tab.is-active .vf-tab-badge { background: #fff; color: var(--accent-dk); }

.vf-tab-panel { display: none; flex-direction: column; gap: 20px; }
.vf-tab-panel.is-active { display: flex; }

/* ----------------------- inputs card --------------------- */
.vf-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.vf-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.vf-card-head h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; letter-spacing: -0.005em; }
.vf-card-head p { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.vf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 18px;
}
.vf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vf-field-wide { grid-column: 1 / -1; }
.vf-field > span { font-size: 12px; font-weight: 600; color: var(--fg); letter-spacing: 0.01em; }
.vf-field input, .vf-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  font-family: var(--mono);
  color: var(--fg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.vf-field input:focus, .vf-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.vf-field small { color: var(--muted); font-size: 11.5px; }
.vf-field small code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; }

/* Inline pill that tags each form field as required / recommended /
 * optional / auto. Sits next to the field label so the request body
 * structure is self-documenting. */
.vf-field-tag {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--muted);
  vertical-align: middle;
}

/* Standalone helper line under code panes (e.g. the live-request
 * preview note). Lighter weight than .vf-field small. */
.vf-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

/* Disabled inputs (subject_token_type, requested_token_type) are
 * shown for documentation only. Visually quieter than active
 * inputs so the eye skips them. */
.vf-field input:disabled {
  background: #f8fafc;
  color: var(--muted);
  cursor: default;
}

/* Build-your-own-request box (revealed when "Build your own request…" is picked) */
.vf-custom-box {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vf-custom-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  align-items: end;
}
.vf-field-method select {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.vf-custom-box textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg);
  resize: vertical;
  min-height: 72px;
}
.vf-custom-box textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.vf-custom-help { color: var(--muted); font-size: 11.5px; }
.vf-custom-help code { background: #fff; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
@media (max-width: 600px) { .vf-custom-row { grid-template-columns: 1fr; } }

.vf-secret-wrap { position: relative; }
.vf-secret-wrap input { padding-right: 64px; }
.vf-secret-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
}
.vf-secret-toggle:hover { background: #f1f5f9; }

.vf-actions {
  margin-top: 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.vf-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.vf-btn-primary { background: var(--accent); color: #fff; }
.vf-btn-primary:hover:not(:disabled) { background: var(--accent-dk); }
.vf-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.vf-btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.vf-btn-ghost:hover { background: #f1f5f9; }
.vf-run-status { color: var(--muted); font-size: 12px; }

/* Save-credentials toggle in the actions row */
.vf-save-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--fg);
  cursor: pointer;
  user-select: none;
}
.vf-save-toggle input { margin: 0; cursor: pointer; }
.vf-link-btn {
  background: transparent;
  border: none;
  color: var(--accent-dk);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.vf-link-btn:hover { color: var(--bad); }

/* ------------------- MAV approvals tab ------------------- */
.vf-approvals-list { display: flex; flex-direction: column; gap: 12px; }

.vf-approval-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vf-approval-card[data-urgency="high"] { border-left: 3px solid var(--bad); }
.vf-approval-card[data-urgency="medium"] { border-left: 3px solid var(--warn); }
.vf-approval-card[data-urgency="low"] { border-left: 3px solid var(--accent); }

.vf-approval-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.vf-approval-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  font-family: var(--mono);
}
.vf-approval-id {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.vf-approval-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vf-approval-meta .vf-claim { font-size: 11px; }

.vf-approval-resource {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow: auto;
}

.vf-approval-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.vf-btn-approve {
  background: var(--good);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.vf-btn-approve:hover:not(:disabled) { background: #15803d; }
.vf-btn-reject {
  background: #fff;
  color: var(--bad);
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.vf-btn-reject:hover:not(:disabled) { background: var(--bad-soft); }
.vf-btn-status {
  background: #fff;
  color: var(--accent, #2563eb);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.vf-btn-status:hover:not(:disabled) { background: #eff6ff; border-color: #93c5fd; }
.vf-btn-approve:disabled,
.vf-btn-reject:disabled,
.vf-btn-status:disabled { opacity: 0.5; cursor: not-allowed; }
.vf-action-done {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  align-self: center;
  font-style: italic;
}

/* ---- per-card API preview (educational disclosure) ---- */
.vf-approval-api {
  margin-top: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fafbff;
  font-size: 12px;
}
.vf-approval-api > summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
  font-weight: 600;
  color: #475569;
  user-select: none;
}
.vf-approval-api > summary::-webkit-details-marker { display: none; }
.vf-approval-api > summary::before {
  content: "▸ ";
  color: #94a3b8;
  font-weight: 400;
}
.vf-approval-api[open] > summary::before { content: "▾ "; }
.vf-approval-api[open] > summary { border-bottom: 1px solid #e2e8f0; }
.vf-approval-api[open] {
  background: #f8fafc;
  border-style: solid;
}
.vf-api-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px 0 12px;
}
.vf-api-tab {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 5px 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  position: relative;
  top: 1px;
}
.vf-api-tab[aria-selected="true"] {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}
.vf-api-tab:hover:not([aria-selected="true"]) { background: #f1f5f9; }
.vf-api-pane {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid #c7d2fe;
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow: auto;
}
.vf-api-pane[hidden] { display: none; }
.vf-api-note {
  padding: 8px 14px 12px 14px;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.5;
}
.vf-api-note code {
  background: #eef2ff;
  color: #4338ca;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 11px;
}

/* ---- per-request status panel (rendered inline in each card) ---- */
.vf-approval-status {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 12.5px;
}
.vf-status-loading,
.vf-status-empty { color: #64748b; font-style: italic; }
.vf-status-error { color: var(--bad); }

.vf-status-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.vf-status-self {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a !important;
}

.vf-status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #e2e8f0;
  color: #334155;
}
.vf-status-pill-pending   { background: #fef3c7; color: #92400e; }
.vf-status-pill-approved,
.vf-status-pill-fulfilled { background: #dcfce7; color: #166534; }
.vf-status-pill-rejected  { background: #fee2e2; color: #991b1b; }
.vf-status-pill-expired,
.vf-status-pill-cancelled { background: #e5e7eb; color: #4b5563; }

.vf-status-history-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 6px 0 4px;
}
.vf-status-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vf-status-history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.vf-status-history-rejected { border-color: #fecaca; }
.vf-status-history-approved { border-color: #bbf7d0; }
.vf-status-who { font-weight: 600; color: #0f172a; }
.vf-status-when { font-size: 11px; }
.vf-status-reason { color: #475569; }
.vf-muted { color: #94a3b8; }

/* ------------------------ stages ------------------------ */
.vf-stage {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
  opacity: 0.55;
}
.vf-stage[data-state="running"]  { opacity: 1; border-color: var(--accent); }
.vf-stage[data-state="ok"]       { opacity: 1; border-color: var(--good); }
.vf-stage[data-state="fail"]     { opacity: 1; border-color: var(--bad); }
.vf-stage[data-state="warn"]     { opacity: 1; border-color: var(--warn); }

.vf-stage-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.vf-stage-num {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--bg);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.vf-stage[data-state="ok"]   .vf-stage-num { background: var(--good); }
.vf-stage[data-state="fail"] .vf-stage-num { background: var(--bad); }
.vf-stage[data-state="warn"] .vf-stage-num { background: var(--warn); }
.vf-stage-head h2 { margin: 0 0 2px; font-size: 14.5px; font-weight: 600; }
.vf-stage-head p  { margin: 0; color: var(--muted); font-size: 12.5px; }
.vf-stage-head > div:nth-child(2) { flex: 1; min-width: 0; }
.vf-stage-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f1f5f9;
  color: var(--muted);
  font-family: var(--mono);
}
.vf-stage[data-state="running"] .vf-stage-pill { background: #dbeafe; color: var(--accent-dk); }
.vf-stage[data-state="ok"]      .vf-stage-pill { background: var(--good-soft); color: #166534; }
.vf-stage[data-state="fail"]    .vf-stage-pill { background: var(--bad-soft);  color: #991b1b; }
.vf-stage[data-state="warn"]    .vf-stage-pill { background: var(--warn-soft); color: #92400e; }

.vf-stage-body { padding: 18px 22px 22px; }

.vf-subhead {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 14px 0 6px;
}
.vf-stage-body > .vf-subhead:first-child { margin-top: 0; }

/* ------------------------ code panes ------------------------ */
.vf-code {
  background: var(--bg-code);
  color: var(--fg-on-dk);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid var(--line-dk);
}

/* JSON token coloring (assigned by verifier.js) */
.vf-json .tok-key   { color: #93c5fd; }
.vf-json .tok-str   { color: #86efac; }
.vf-json .tok-num   { color: #fcd34d; }
.vf-json .tok-bool  { color: #f9a8d4; }
.vf-json .tok-null  { color: #cbd5e1; font-style: italic; }
.vf-json .tok-punc  { color: var(--muted-dk); }

/* ------------------------ JWT segment row ----------------- */
.vf-jwt-segments {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.vf-jwt-seg {
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex; flex-direction: column; gap: 4px;
}
.vf-jwt-seg span {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.vf-jwt-seg code {
  font-size: 11.5px;
  word-break: break-all;
  white-space: pre-wrap;
  color: var(--fg);
}
.vf-jwt-seg--header  code { color: #1d4ed8; }
.vf-jwt-seg--payload code { color: #15803d; }
.vf-jwt-seg--sig     code { color: #b45309; }

/* ------------------------ decoded JSON grid --------------- */
.vf-decode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 800px) {
  .vf-decode-grid { grid-template-columns: 1fr; }
  .vf-grid        { grid-template-columns: 1fr; }
}

/* ------------------------ claim badges ------------------- */
.vf-claim-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vf-claim {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 9px;
  font-family: var(--mono);
  font-size: 11.5px;
}
.vf-claim b { color: var(--accent-dk); font-weight: 600; }
.vf-claim em { color: var(--muted); font-style: normal; }
.vf-claim--exp-ok   { background: var(--good-soft); border-color: #bbf7d0; }
.vf-claim--exp-bad  { background: var(--bad-soft);  border-color: #fecaca; }
.vf-claim-copy {
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.12s, border-color 0.12s;
}
.vf-claim-copy:hover { background: #e0e7ff; border-color: #c7d2fe; }
.vf-claim-copy:active { background: #c7d2fe; }
.vf-empty { color: var(--muted); font-size: 12px; font-style: italic; }

/* ------------------------ checklist ---------------------- */
.vf-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vf-check {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}
.vf-check::before {
  content: "○";
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  width: 18px; text-align: center;
}
.vf-check--idle    { color: var(--muted); }
.vf-check--running { color: var(--accent-dk); border-color: #bfdbfe; background: #eff6ff; }
.vf-check--running::before { content: "…"; color: var(--accent); }
.vf-check--pass    { color: #166534; border-color: #bbf7d0; background: var(--good-soft); }
.vf-check--pass::before    { content: "✓"; color: var(--good); font-weight: 700; }
.vf-check--fail    { color: #991b1b; border-color: #fecaca; background: var(--bad-soft); }
.vf-check--fail::before    { content: "✕"; color: var(--bad);  font-weight: 700; }
.vf-check small { color: inherit; opacity: 0.8; margin-left: auto; font-family: var(--mono); font-size: 11px; }

/* ------------------------ capability box ----------------- */
.vf-capability {
  background: #f8fafc;
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
}
.vf-capability strong { color: var(--accent-dk); }

/* ------------------------ stage 5 ------------------------ */
.vf-response-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid var(--line);
}
.vf-response-status--ok   { background: var(--good-soft); color: #166534; border-color: #bbf7d0; }
.vf-response-status--bad  { background: var(--bad-soft);  color: #991b1b; border-color: #fecaca; }
.vf-response-status--warn { background: var(--warn-soft); color: #92400e; border-color: #fed7aa; }

/* ------------------------ footer ------------------------- */
.vf-footer {
  max-width: 1180px;
  margin: 12px auto 32px;
  padding: 0 28px;
  color: var(--muted);
  font-size: 12px;
}
.vf-footer code { background: #fff; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); }

/* ============================================================
 * POLISH — additive components (stepper, drawer, toasts,
 * two-column layout, copy buttons, refined empty states,
 * dark-mode overrides). All net-new; nothing above changes
 * behaviour, only new selectors.
 * ============================================================ */

/* ------------------------ stage stepper ------------------- */
/* Five-dot connected stepper that mirrors the data-state on
 * each .vf-stage. Sticky at the top of the verifier tab so
 * progress stays visible while the operator scrolls through
 * the long stage cards below. */
.vf-stepper {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  display: flex;
  gap: 0;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 5;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.vf-step {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vf-step + .vf-step::before {
  content: "";
  position: absolute;
  left: -50%;
  right: 50%;
  top: 50%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.vf-step a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  background: var(--bg-card);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.18s, background 0.18s;
}
.vf-step a:hover { color: var(--fg); }
.vf-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--muted);
  border: 2px solid #e2e8f0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.vf-step-label {
  white-space: nowrap;
}
.vf-step[data-state="running"] .vf-step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.vf-step[data-state="running"] a { color: var(--accent-dk); }
.vf-step[data-state="ok"] .vf-step-num,
.vf-step[data-state="ok"] + .vf-step::before { background: var(--good); border-color: var(--good); color: #fff; }
.vf-step[data-state="ok"] a { color: #166534; }
.vf-step[data-state="fail"] .vf-step-num { background: var(--bad); border-color: var(--bad); color: #fff; }
.vf-step[data-state="fail"] a { color: #991b1b; }
.vf-step[data-state="warn"] .vf-step-num { background: var(--warn); border-color: var(--warn); color: #fff; }
.vf-step[data-state="warn"] a { color: #92400e; }
@media (max-width: 700px) {
  .vf-step-label { display: none; }
  .vf-stepper { padding: 8px 10px; }
}

/* ------------------------ stage collapse ------------------ */
/* Once a stage's data-state is "ok" the body collapses to a
 * one-line summary, to declutter the page. The currently
 * active stage stays expanded. Click the head to re-expand. */
.vf-stage-head { cursor: pointer; user-select: none; }
.vf-stage-head:hover { background: #f8fafc; }
.vf-stage-head::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 8px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") center / contain no-repeat;
  opacity: 0.4;
  transition: transform 0.2s, opacity 0.2s;
}
.vf-stage.is-collapsed .vf-stage-head::after { transform: rotate(-90deg); }
.vf-stage:hover .vf-stage-head::after { opacity: 0.7; }
.vf-stage.is-collapsed .vf-stage-body { display: none; }
.vf-stage.is-collapsed .vf-stage-head { border-bottom: none; }
.vf-stage-summary {
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 2px;
  display: none;
}
.vf-stage.is-collapsed .vf-stage-summary { display: block; }

/* ------------------------ mini-collapsibles --------------- */
/* Per-pane toggle inside cards (e.g. subject_token raw vs decoded
 * claims). Mirrors the .vf-stage.is-collapsed pattern but at the
 * sub-section level so individual <pre> blocks can be folded. */
.vf-collapse-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 14px 0 6px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vf-collapse-toggle:hover { color: #1e293b; }
.vf-collapse:first-child .vf-collapse-toggle { margin-top: 0; }
.vf-collapse-chev {
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.vf-collapse.is-collapsed .vf-collapse-chev { transform: rotate(-90deg); }
.vf-collapse.is-collapsed .vf-collapse-body { display: none; }
.vf-ico-xs { width: 12px; height: 12px; }

/* ------------------------ toasts -------------------------- */
.vf-toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
  max-width: 380px;
}
.vf-toast {
  pointer-events: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 10px 12px 10px 14px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--fg);
  animation: vfToastIn 0.18s ease-out;
  cursor: pointer;
  min-width: 240px;
}
.vf-toast.is-leaving {
  animation: vfToastOut 0.16s ease-in forwards;
}
.vf-toast--ok   { border-left-color: var(--good); }
.vf-toast--bad  { border-left-color: var(--bad);  }
.vf-toast--warn { border-left-color: var(--warn); }
.vf-toast .vf-ico { margin-top: 2px; }
.vf-toast--ok   .vf-ico { color: var(--good); }
.vf-toast--bad  .vf-ico { color: var(--bad);  }
.vf-toast--warn .vf-ico { color: var(--warn); }
.vf-toast--info .vf-ico { color: var(--accent); }
.vf-toast strong { display: block; margin-bottom: 2px; font-size: 12.5px; font-weight: 600; }
.vf-toast small  { display: block; color: var(--muted); font-size: 11.5px; }
@keyframes vfToastIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes vfToastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(16px); }
}

/* ------------------------ activity drawer ----------------- */
.vf-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100vw);
  background: #0f172a;
  color: #e2e8f0;
  border-left: 1px solid #1e293b;
  z-index: 900;
  transform: translateX(100%);
  transition: transform 0.22s ease-out;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.18);
}
.vf-drawer[data-open="true"]  { transform: translateX(0); }
.vf-drawer[hidden] { display: flex; }
.vf-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}
.vf-drawer-head h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
}
.vf-drawer-tools { display: inline-flex; gap: 4px; }
.vf-drawer .vf-icon-btn {
  width: 28px; height: 28px;
  border-color: rgba(148, 163, 184, 0.20);
  background: rgba(148, 163, 184, 0.06);
}
.vf-drawer-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px;
}
.vf-drawer-log {
  flex: 1;
  margin: 0;
  background: transparent;
  border: 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}
.vf-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.20);
  z-index: 850;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.vf-drawer-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 700px) {
  .vf-drawer { width: 100vw; }
}

/* ------------------------ two-column verifier ------------- */
/* On wide viewports, stack the config (grant + inputs) on the
 * left and the stages on the right. Below the breakpoint we
 * fall back to plain block flow. The MAV Approvals tab
 * intentionally stays single-column (its cards already span
 * the full width and benefit from the extra horizontal room). */
.vf-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.vf-stack-config,
.vf-stack-flow {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
@media (min-width: 1200px) {
  .vf-stack {
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
  }
  .vf-stack-config {
    position: sticky;
    top: 80px; /* below the stepper, which is sticky at top:0 */
  }
}

/* ------------------------ copy-as-cURL -------------------- */
/* Floating chip in the top-right of code/preview panes. Every
 * pane that hosts one wraps the actual content in a
 * .vf-pane-host so the button is positioned relative to the
 * pane, not the card. */
.vf-pane-host {
  position: relative;
}
.vf-pane-host .vf-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}
.vf-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  backdrop-filter: blur(4px);
}
.vf-copy-btn:hover {
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  border-color: rgba(148, 163, 184, 0.50);
}
.vf-copy-btn[data-copied="true"] {
  background: rgba(22, 163, 74, 0.85);
  border-color: rgba(22, 163, 74, 0.95);
  color: #fff;
}
.vf-copy-btn .vf-ico { width: 12px; height: 12px; }

/* The API-pane buttons in approval cards live on a light
 * background, so flip the contrast there. */
.vf-api-pane.vf-pane-host .vf-copy-btn {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}
.vf-api-pane.vf-pane-host .vf-copy-btn:hover {
  background: rgba(255, 255, 255, 0.20);
  color: #fff;
}

/* ------------------------ refined empty state ------------- */
.vf-empty-rich {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 18px;
  color: var(--muted);
  font-style: normal;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}
.vf-empty-rich strong {
  display: block;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.vf-empty-rich p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
}
.vf-empty-ico {
  color: #94a3b8;
  flex-shrink: 0;
}

/* Helpful "open the drawer" hint chip */
.vf-drawer-hint {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: var(--bg);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11.5px;
  z-index: 800;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.vf-drawer-hint[data-show="true"] { opacity: 0.85; }

/* ============================================================
 * DARK MODE — applied when html[data-theme="dark"]. The header
 * is already navy; we re-tint the body, cards, code panes,
 * inputs, and chips. Text on dark panels switches to slate-200,
 * borders to slate-700.
 * ============================================================ */
html[data-theme="dark"] {
  color-scheme: dark;
}
html[data-theme="dark"] body {
  color: #e2e8f0;
  background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
}
html[data-theme="dark"] .vf-card,
html[data-theme="dark"] .vf-stage {
  background: #111827;
  border-color: #1f2937;
  color: #e2e8f0;
}
html[data-theme="dark"] .vf-card:hover { border-color: #334155; }
html[data-theme="dark"] .vf-card-head h2,
html[data-theme="dark"] .vf-stage-head h2 { color: #f1f5f9; }
html[data-theme="dark"] .vf-card-head p,
html[data-theme="dark"] .vf-stage-head p { color: #94a3b8; }
html[data-theme="dark"] .vf-stage-head { background: #0f172a; border-bottom-color: #1f2937; }
html[data-theme="dark"] .vf-stage-head:hover { background: #131c2e; }
html[data-theme="dark"] .vf-collapse-toggle:hover { color: #f1f5f9; }
html[data-theme="dark"] .vf-field-tag { background: #1f2937; color: #94a3b8; }
html[data-theme="dark"] .vf-help { color: #94a3b8; }
html[data-theme="dark"] .vf-field input:disabled { background: #0f172a; color: #64748b; }
html[data-theme="dark"] .vf-tabs {
  background: #111827;
  border-color: #1f2937;
}
html[data-theme="dark"] .vf-tab { color: #94a3b8; }
html[data-theme="dark"] .vf-tab:hover { background: #1f2937; color: #f1f5f9; }
html[data-theme="dark"] .vf-tab.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
html[data-theme="dark"] .vf-stepper {
  background: #111827;
  border-color: #1f2937;
}
html[data-theme="dark"] .vf-step a { background: #111827; color: #94a3b8; }
html[data-theme="dark"] .vf-step a:hover { color: #f1f5f9; }
html[data-theme="dark"] .vf-step + .vf-step::before { background: #334155; }
html[data-theme="dark"] .vf-step-num {
  background: #1f2937;
  border-color: #334155;
  color: #94a3b8;
}
html[data-theme="dark"] .vf-field input,
html[data-theme="dark"] .vf-field select,
html[data-theme="dark"] .vf-custom-box textarea {
  background: #0b1220;
  border-color: #1f2937;
  color: #e2e8f0;
}
html[data-theme="dark"] .vf-field input:focus,
html[data-theme="dark"] .vf-field select:focus,
html[data-theme="dark"] .vf-custom-box textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
html[data-theme="dark"] .vf-field > span { color: #cbd5e1; }
html[data-theme="dark"] .vf-field small { color: #64748b; }
html[data-theme="dark"] .vf-field small code { background: #1f2937; color: #cbd5e1; }
html[data-theme="dark"] .vf-custom-box { background: #0b1220; border-color: #1f2937; }
html[data-theme="dark"] .vf-custom-help code { background: #1f2937; color: #cbd5e1; border-color: #334155; }
html[data-theme="dark"] .vf-claim {
  background: #1f2937;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .vf-claim b { color: #93c5fd; }
html[data-theme="dark"] .vf-claim em { color: #94a3b8; }
html[data-theme="dark"] .vf-claim--exp-ok  { background: rgba(34,197,94,0.15);  border-color: rgba(34,197,94,0.4); color: #86efac; }
html[data-theme="dark"] .vf-claim--exp-bad { background: rgba(239,68,68,0.15);  border-color: rgba(239,68,68,0.4); color: #fca5a5; }
html[data-theme="dark"] .vf-claim--act     { background: rgba(99,102,241,0.18); border-color: rgba(99,102,241,0.45); color: #c7d2fe; }
html[data-theme="dark"] .vf-claim-copy:hover { background: #334155; border-color: #475569; }
html[data-theme="dark"] .vf-jwt-seg { background: #0b1220; border-color: #1f2937; }
html[data-theme="dark"] .vf-jwt-seg span { color: #94a3b8; }
html[data-theme="dark"] .vf-jwt-seg code { color: #cbd5e1; }
html[data-theme="dark"] .vf-jwt-seg--header  code { color: #93c5fd; }
html[data-theme="dark"] .vf-jwt-seg--payload code { color: #86efac; }
html[data-theme="dark"] .vf-jwt-seg--sig     code { color: #fcd34d; }
html[data-theme="dark"] .vf-stage-pill { background: #1f2937; color: #94a3b8; }
html[data-theme="dark"] .vf-check { background: #0b1220; border-color: #1f2937; color: #cbd5e1; }
html[data-theme="dark"] .vf-check--running { background: rgba(37,99,235,0.18); border-color: rgba(37,99,235,0.45); color: #93c5fd; }
html[data-theme="dark"] .vf-check--pass    { background: rgba(34,197,94,0.18); border-color: rgba(34,197,94,0.45); color: #86efac; }
html[data-theme="dark"] .vf-check--fail    { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.45); color: #fca5a5; }
html[data-theme="dark"] .vf-capability { background: #0b1220; }
html[data-theme="dark"] .vf-response-status { background: #1f2937; color: #94a3b8; border-color: #334155; }
html[data-theme="dark"] .vf-response-status--ok   { background: rgba(34,197,94,0.18); border-color: rgba(34,197,94,0.45); color: #86efac; }
html[data-theme="dark"] .vf-response-status--bad  { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.45); color: #fca5a5; }
html[data-theme="dark"] .vf-response-status--warn { background: rgba(217,119,6,0.18); border-color: rgba(217,119,6,0.45); color: #fcd34d; }
html[data-theme="dark"] .vf-grant-opt { background: #0b1220; border-color: #1f2937; color: #cbd5e1; }
html[data-theme="dark"] .vf-grant-opt:hover { background: #131c2e; border-color: #334155; }
html[data-theme="dark"] .vf-grant-opt:has(input[type="radio"]:checked) {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--accent);
}
html[data-theme="dark"] .vf-grant-opt small { color: #94a3b8; }
html[data-theme="dark"] .vf-approval-card { background: #111827; border-color: #1f2937; color: #e2e8f0; }
html[data-theme="dark"] .vf-approval-title { color: #f1f5f9; }
html[data-theme="dark"] .vf-approval-id { color: #64748b; }
html[data-theme="dark"] .vf-approval-resource { background: #0b1220; border-color: #1f2937; color: #cbd5e1; }
html[data-theme="dark"] .vf-approval-status { background: #0b1220; border-color: #1f2937; }
html[data-theme="dark"] .vf-status-history-row { background: #111827; border-color: #1f2937; }
html[data-theme="dark"] .vf-status-history-rejected { border-color: rgba(239,68,68,0.45); }
html[data-theme="dark"] .vf-status-history-approved { border-color: rgba(34,197,94,0.45); }
html[data-theme="dark"] .vf-status-who { color: #f1f5f9; }
html[data-theme="dark"] .vf-status-reason { color: #cbd5e1; }
html[data-theme="dark"] .vf-approval-api { background: #0b1220; border-color: #1f2937; }
html[data-theme="dark"] .vf-approval-api[open] { background: #0b1220; }
html[data-theme="dark"] .vf-approval-api > summary { color: #cbd5e1; }
html[data-theme="dark"] .vf-approval-api[open] > summary { border-bottom-color: #1f2937; }
html[data-theme="dark"] .vf-api-tab {
  background: #0b1220; border-color: #1f2937; color: #94a3b8;
}
html[data-theme="dark"] .vf-api-tab[aria-selected="true"] {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}
html[data-theme="dark"] .vf-api-tab:hover:not([aria-selected="true"]) { background: #131c2e; }
html[data-theme="dark"] .vf-api-pane { border-top-color: rgba(99, 102, 241, 0.35); }
html[data-theme="dark"] .vf-api-note { color: #cbd5e1; }
html[data-theme="dark"] .vf-api-note code { background: rgba(99, 102, 241, 0.18); color: #c7d2fe; }
html[data-theme="dark"] .vf-toast {
  background: #111827;
  border-color: #1f2937;
  color: #e2e8f0;
}
html[data-theme="dark"] .vf-toast small { color: #94a3b8; }
html[data-theme="dark"] .vf-empty-rich { background: #0b1220; border-color: #1f2937; }
html[data-theme="dark"] .vf-empty-rich strong { color: #f1f5f9; }
html[data-theme="dark"] .vf-empty-rich p { color: #94a3b8; }
html[data-theme="dark"] .vf-empty-ico { color: #475569; }
html[data-theme="dark"] .vf-footer { color: #64748b; }
html[data-theme="dark"] .vf-footer code { background: #1f2937; color: #cbd5e1; border-color: #334155; }
html[data-theme="dark"] .vf-secret-toggle { background: #1f2937; border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .vf-secret-toggle:hover { background: #334155; }
html[data-theme="dark"] .vf-stage-num { background: #1f2937; }
html[data-theme="dark"] .vf-link-btn { color: #93c5fd; }
html[data-theme="dark"] .vf-btn-ghost { color: #cbd5e1; border-color: #334155; }
html[data-theme="dark"] .vf-btn-ghost:hover { background: #1f2937; }
html[data-theme="dark"] .vf-action-done { color: #94a3b8; }
