@import url('/ui/design/fonts.css');

/* ECP Console Theme — dark default (higher contrast), warm-paper light opt-in */
@layer base, components, layout, pages;

/* ============================================================
   BASE TOKENS — extracted from dashboard-reference.html
   ============================================================ */
@layer base {
  :root {
    /* Sidebar */
    --sidebar: #000000;

    /* Backgrounds (Dark — higher contrast: sidebar #000 → body #262626 → card #303030) */
    --bg: #262626;
    --card: #303030;
    --card-hover: #383838;
    --border: #3d3d3d;
    --border-soft: #343434;
    --recessed: #2a2a2a;
    --card-2: #2c2c2c;
    --zebra: #2c2c2c;
    --row-hover: #383838;
    --row-open: #343434;
    --detail-bg: #2a2a2a;
    --heading: #f5f5f5;
    --toast-bg: #303030;
    --toast-border: #3d3d3d;
    --toast-text: #f0f0f0;
    --toast-mut: #a0a0a0;

    /* Text */
    --text: #f0f0f0;
    --muted: #a0a0a0;
    --faint: #707070;
    --placeholder: #707070;

    /* Accents (brass) */
    --accent: #d9a441;
    --accent-2: #c08434;
    --accent-soft: rgba(217, 164, 65, 0.14);
    --accent-d: #e6b052;

    /* Semantic colors */
    --green: #4ade80;  --green-t: rgba(74, 222, 128, 0.14);  --green-d: #86efac;
    --teal:  #22d3ee;  --teal-t:  rgba(34, 211, 238, 0.14);  --teal-d:  #67e8f9;
    --amber: #fbbf24;  --amber-t: rgba(251, 191, 36, 0.14);  --amber-d: #fcd34d;
    --rose:  #f87171;  --rose-t:  rgba(248, 113, 113, 0.14);  --rose-d: #fca5a5;
    --taupe: #a0a0a0;  --taupe-t: rgba(154, 154, 154, 0.14);  --taupe-d: #b8b8b8;

    /* Borders / surfaces used by JS-injected components */
    --border-strong: #4a4a4a;
    --topbar-bg: #262626;
    --hero-a: #241d12;
    --hero-b: #181410;
    --hero-border: #3a2f1c;
    --hero-glow: rgba(217, 164, 65, 0.15);
    --ok: var(--green);
    --bg-0: #262626;
    --bg-1: #303030;
    --line: #3d3d3d;
    --radius-sm: 8px;
    --radius-md: 12px;
    --space-2: 8px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 4px 16px -4px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.4);
    --shadow-lg: 0 14px 34px -8px rgba(0,0,0,.4);

    /* Radius */
    --r: 14px;

    /* Typography */
    --serif: 'Source Serif 4', Georgia, serif;

    /* Layout */
    --sidebar-width: 264px;
    --topbar-height: 64px;
    --content-max-width: 1480px;
  }

  /* Light mode tokens (opt-in warm paper via theme toggle) */
  [data-theme="light"] {
    /* Backgrounds (Light) */
    --bg: #f4ecdf;
    --card: #fffdf7;
    --card-hover: #faf5ea;
    --border: #e7dcc7;
    --border-soft: #efe6d6;
    --recessed: #efe6d6;
    --card-2: #faf7f0;
    --zebra: #f8f3eb;
    --row-hover: #f0e9dd;
    --row-open: #efe6d6;
    --detail-bg: #fdfaf5;
    --heading: #2a2018;
    --toast-bg: #fffdf7;
    --toast-border: #e7dcc7;
    --toast-text: #2a2018;
    --toast-mut: #8a7a66;

    /* Text */
    --text: #2a2018;
    --muted: #8a7a66;
    --faint: #9c8a72;
    --placeholder: #7a6d5b;

    /* Accents */
    --accent: #9a5a2b;
    --accent-2: #c08434;
    --accent-soft: #f3e6d2;
    --accent-d: #7c451d;

    /* Semantic colors */
    --green: #2f8f5b;  --green-t: #e3f0e6;  --green-d: #15603a;
    --teal:  #1f7a8c;  --teal-t:  #dceef2;  --teal-d:  #0b5566;
    --amber: #b4690e;  --amber-t: #f7ecd4;  --amber-d: #854d0e;
    --rose:  #b0432f;  --rose-t:  #f6e2dc;  --rose-d:  #8c2f20;
    --taupe: #8a7a66;  --taupe-t: #ece3d4;  --taupe-d: #6b5d49;

    /* Borders / surfaces used by JS-injected components */
    --border-strong: #d8cbb2;
    --topbar-bg: #f4ecdf;
    --hero-a: #f3e6d2;
    --hero-b: #e9d9bd;
    --hero-border: #d9c9a8;
    --hero-glow: rgba(154, 90, 43, 0.10);
    --ok: var(--green);
    --bg-0: #f4ecdf;
    --bg-1: #fffdf7;
    --line: #e7dcc7;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(74,50,30,.06);
    --shadow-md: 0 4px 16px -4px rgba(74,50,30,.10), 0 1px 3px rgba(74,50,30,.06);
    --shadow-lg: 0 14px 34px -8px rgba(74,50,30,.18);
  }

  /* Fonts — self-hosted via @import url('/ui/design/fonts.css') at the top of this file */

  /* Reset */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { font-size: 14px; -webkit-font-smoothing: antialiased; color-scheme: dark; }
  html[data-theme="light"] { color-scheme: light; }

  body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg);
    min-height: 100vh;
  }

  svg.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
  button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
  a { color: inherit; text-decoration: none; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

/* ============================================================
   COMPONENTS
   ============================================================ */
@layer components {
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 17px;
    border-radius: 11px;
    font-weight: 600;
    font-size: 13.5px;
    transition: .2s;
  }
  .btn svg { width: 16px; height: 16px; }
  .btn-ghost {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: var(--shadow-sm);
  }
  .btn-ghost:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
  .btn-primary {
    background: linear-gradient(135deg, #d9a441, #9a5a2b);
    color: #fff;
    box-shadow: 0 5px 18px -4px rgba(192,132,52,.5);
  }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 9px 26px -5px rgba(192,132,52,.6); }
  .btn-primary:active { transform: translateY(0); }
  /* Micro-Order F (CASE C): elements outside the current API contract are
     disabled with the native [disabled] attribute — keep them visibly inert. */
  .btn:disabled, .icon-btn:disabled { cursor: not-allowed; opacity: .5; }
  .btn:disabled:hover, .icon-btn:disabled:hover { transform: none; box-shadow: var(--shadow-sm); }

  /* Cards */
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
  }
  .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-soft);
    flex-wrap: wrap;
  }
  .card-head h2 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; color: var(--heading); }
  .card-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

  .link {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-2);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 7px;
    padding: 4px 7px;
    margin: -4px -7px;
    transition: .15s;
  }
  .link:hover { background: color-mix(in srgb, var(--accent-2) 14%, var(--card)); }
  .link svg { width: 14px; height: 14px; }

  /* Tabs */
  .tabs { display: flex; gap: 5px; background: var(--recessed); border: 1px solid var(--border); padding: 4px; border-radius: 12px; }
  .tab { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: .18s; }
  .tab:hover { color: var(--text); }
  .tab.active { background: var(--card); color: var(--heading); box-shadow: var(--shadow-sm); }
  .tab .cnt { font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--text) 12%, transparent); padding: 0 6px; border-radius: 999px; min-width: 18px; text-align: center; }
  .tab.active .cnt { background: color-mix(in srgb, #c08434 18%, var(--card)); color: var(--heading); }

  /* KPI Cards */
  .kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 26px; }
  .kpi { padding: 18px 20px; position: relative; overflow: hidden; transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s, border-color .25s; }
  .kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
  .kpi::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c); }
  .kpi-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .kpi-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, var(--card)); color: color-mix(in srgb, var(--c) 82%, var(--text)); }
  .kpi-ico svg { width: 17px; height: 17px; }
  .kpi-label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .kpi-value { font-size: 34px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--heading); }
  .spark { width: 100%; height: 34px; margin: 6px 0 4px; display: block; overflow: visible; }
  .spark .ln { fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .spark .ar { fill: var(--c); opacity: .14; }
  .spark .pt { fill: var(--c); }
  .kpi-foot { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--faint); }
  .trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, var(--card)); color: color-mix(in srgb, var(--c) 80%, var(--text)); }
  .trend svg { width: 11px; height: 11px; }
  .trend.up { --c: var(--green); }
  .trend.down { --c: var(--rose); }
  .trend.flat { --c: var(--muted); }

  /* Badges */
  .badge { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--c) 15%, var(--card)); color: color-mix(in srgb, var(--c) 80%, var(--text)); border-color: color-mix(in srgb, var(--c) 34%, var(--border)); }
  .badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .b-running i { animation: blink 1.2s infinite; }
  @keyframes blink { 50% { opacity: .25; } }

  /* System Chip */
  .sys-chip { display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; background: var(--recessed); color: var(--muted); border: 1px solid var(--border); padding: 3px 9px; border-radius: 8px; }
  .sys-chip i { width: 6px; height: 6px; border-radius: 2px; }

  /* Tables */
  .table-wrap { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; min-width: 920px; }
  thead th { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0; border-bottom: 1px solid var(--border); background: var(--bg); }
  thead th .th-btn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 13px 22px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
  thead th.num .th-btn { justify-content: flex-end; }
  thead th button.sortable:hover { color: var(--heading); }
  thead th .arr { width: 12px; height: 12px; opacity: .35; transition: .15s; }
  thead th[aria-sort] .arr { opacity: 1; color: var(--accent-2); }
  thead th[aria-sort="descending"] .arr { transform: rotate(180deg); }
  tbody td { padding: 13px 22px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
  tbody tr.data { transition: background .12s; cursor: pointer; }
  tbody tr.data.zebra { background: var(--zebra); }
  tbody tr.data:hover { background: var(--row-hover); }
  tbody tr.data.open, tbody tr.data.open:hover { background: var(--row-open); }
  .eval-title { font-weight: 600; display: flex; align-items: center; gap: 9px; color: var(--heading); }
  .eval-title .chev { width: 14px; height: 14px; color: var(--faint); transition: transform .2s; }
  tr.data.open .chev { transform: rotate(90deg); color: var(--accent-2); }
  .eval-id { color: var(--faint); margin-top: 3px; }
  .owner { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
  .score-cell { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
  .score-num { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 26px; text-align: right; color: var(--heading); }
  .score-bar { width: 64px; height: 6px; border-radius: 999px; background: var(--recessed); overflow: hidden; border: 1px solid var(--border-soft); }
  .score-bar i { display: block; height: 100%; border-radius: 999px; width: 0; transition: width 1s cubic-bezier(.4,0,.2,1) .4s; }
  .cell-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
  .cell-date small { display: block; color: var(--faint); font-size: 11px; }
  .empty-row td { text-align: center; color: var(--faint); padding: 44px; font-size: 13px; }
  tr.detail > td { padding: 0; background: var(--detail-bg); border-bottom: 1px solid var(--border); }
  .prov { padding: 18px 22px 22px; }
  .prov h4 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
  .steps { display: flex; align-items: flex-start; flex-wrap: wrap; }
  .step { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 96px; position: relative; flex: 1; }
  .step .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--border); color: var(--faint); z-index: 1; }
  .step .dot svg { width: 15px; height: 15px; }
  .step.done .dot { background: color-mix(in srgb, var(--green) 18%, var(--card)); border-color: color-mix(in srgb, var(--green) 45%, var(--border)); color: color-mix(in srgb, var(--green) 80%, var(--text)); }
  .step.fail .dot { background: color-mix(in srgb, var(--rose) 18%, var(--card)); border-color: color-mix(in srgb, var(--rose) 45%, var(--border)); color: color-mix(in srgb, var(--rose) 80%, var(--text)); }
  .step.active .dot { background: color-mix(in srgb, var(--amber) 18%, var(--card)); border-color: color-mix(in srgb, var(--amber) 45%, var(--border)); color: color-mix(in srgb, var(--amber) 82%, var(--text)); }
  .step .lab { font-size: 11.5px; font-weight: 600; color: var(--text); text-align: center; }
  .step .when { font-size: 10.5px; color: var(--faint); font-family: 'JetBrains Mono', monospace; }
  .step:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--border); }
  .step.done:not(:last-child)::after { background: color-mix(in srgb, var(--green) 50%, var(--border)); }
  .prov .meta { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border-strong); font-size: 12px; color: var(--muted); }
  .prov .meta b { color: var(--heading); }
  .tbl-foot { padding: 12px 22px; font-size: 12px; color: var(--faint); border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
  .pager { display: flex; align-items: center; gap: 6px; }
  .pager button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--card); color: var(--muted); transition: .15s; }
  .pager button:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
  .pager button:disabled { opacity: .4; cursor: not-allowed; }
  .pager span { font-size: 12px; color: var(--faint); min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }

  /* Integrity Hero */
  .section-title { display: flex; align-items: center; gap: 12px; margin: 34px 0 16px; }
  .section-title h2 { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: -.01em; color: var(--heading); }
  .section-title .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }
  .integrity { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
  .hero {
    background: linear-gradient(150deg, var(--hero-a), var(--hero-b));
    color: #f3e8d8;
    border: 1px solid var(--hero-border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg), 0 0 40px -8px var(--hero-glow);
    padding: 26px 28px;
    display: flex;
    gap: 28px;
    align-items: center;
    position: relative;
    overflow: hidden;
  }
  .hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 0% 0%, var(--hero-glow), transparent 55%); pointer-events: none; }
  .hero-arc { position: relative; width: 150px; height: 150px; flex: none; }
  .hero-arc svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .hero-arc circle { fill: none; stroke-width: 11; stroke-linecap: round; }
  .hero-arc .bg { stroke: rgba(255,255,255,.1); }
  .hero-arc .fg { stroke-dasharray: 339; stroke-dashoffset: 339; transition: stroke-dashoffset 1.4s cubic-bezier(.4,0,.2,1) .35s; filter: drop-shadow(0 0 6px rgba(217,164,65,.5)); }
  .hero-arc .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
  .hero-arc .val b { font-family: var(--serif); font-size: 42px; font-weight: 700; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(217,164,65,.4); }
  .hero-arc .val span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #d8b884; }
  .hero-meters { flex: 1; display: grid; gap: 16px; min-width: 0; }
  .hero-meters .mtop { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
  .hero-meters .mtop .nm { font-size: 12.5px; font-weight: 600; color: #f0e2cd; }
  .hero-meters .mtop .vv { font-size: 13px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
  .hero-meters .mtop .vv small { font-weight: 500; color: #cfaa82; font-size: 11px; margin-left: 4px; }
  .mtrack { height: 8px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
  .mfill { height: 100%; border-radius: 999px; width: 0; transition: width 1.2s cubic-bezier(.4,0,.2,1) .4s; }
  .hero-note { font-size: 11px; color: #c2a87f; margin-top: 2px; line-height: 1.5; }
  .total-card { padding: 24px 26px; display: flex; flex-direction: column; }
  .total-card .lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
  .total-card .big { font-family: var(--serif); font-size: 60px; font-weight: 700; letter-spacing: -.03em; line-height: 1; margin: 8px 0 4px; color: var(--heading); }
  .total-card .cap { font-size: 12.5px; color: var(--muted); }
  .breakdown { list-style: none; margin-top: auto; padding-top: 16px; display: grid; gap: 8px; }
  .breakdown li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); }
  .breakdown i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
  .breakdown b { margin-left: auto; color: var(--heading); font-variant-numeric: tabular-nums; }
  .breakdown .pc { color: var(--faint); font-size: 11px; min-width: 34px; text-align: right; }

  /* Two-column layout */
  .two-col { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; margin-top: 16px; }

  /* Distribution Bar */
  .dist { padding: 22px; }
  .dist-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--recessed); margin: 18px 0 16px; gap: 2px; border: 1px solid var(--border-soft); }
  .dist-seg { height: 100%; width: 0; transition: width 1.1s cubic-bezier(.4,0,.2,1) .4s; }
  .dist-seg:first-child { border-radius: 999px 0 0 999px; }
  .dist-seg:last-child { border-radius: 0 999px 999px 0; }
  .dist-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 12.5px; color: var(--muted); }
  .dist-legend span { display: inline-flex; align-items: center; gap: 8px; }
  .dist-legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
  .dist-legend b { color: var(--heading); margin-left: auto; font-variant-numeric: tabular-nums; }

  /* Timeline */
  .timeline { padding: 6px 22px 14px; max-height: 360px; overflow-y: auto; }
  .tl-item { position: relative; display: flex; gap: 14px; padding: 13px 0; }
  .tl-item:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 45px; bottom: -1px; width: 2px; background: var(--border-soft); }
  .tl-ico { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; z-index: 1; border: 2px solid var(--card); box-shadow: var(--shadow-sm); }
  .tl-ico svg { width: 14px; height: 14px; }
  .tl-body { flex: 1; min-width: 0; }
  .tl-body b { font-size: 13px; font-weight: 600; color: var(--heading); }
  .tl-body p { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .tl-body p .mono { color: var(--faint); }
  .tl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
  .tl-time { font-size: 11px; color: var(--faint); white-space: nowrap; }

  /* Footer */
  .foot { margin-top: 36px; text-align: center; font-size: 12px; color: var(--faint); }
  .foot b { color: var(--muted); font-weight: 600; }

  /* Skeletons */
  .sk { background: linear-gradient(90deg, var(--recessed) 25%, var(--card-2) 37%, var(--recessed) 63%); background-size: 400% 100%; animation: sh 1.4s ease infinite; border-radius: 8px; }
  @keyframes sh { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
  .sk.kpi { height: 148px; }
  .sk.row { height: 54px; margin: 0 0 1px; border-radius: 0; }
  .sk.ring { height: 140px; }
  .sk.line { height: 14px; margin: 8px 0; }

  /* Drawer/Modal */
  .drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); z-index: 70; opacity: 0; pointer-events: none; transition: .3s; }
  .drawer-scrim.on { opacity: 1; pointer-events: auto; }
  .drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw; background: var(--card); z-index: 75; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; border-left: 1px solid var(--border); }
  .drawer.on { transform: none; }
  .drawer header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border-soft); }
  .drawer header h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--heading); }
  .drawer .x { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); }
  .drawer .x:hover { background: var(--recessed); color: var(--text); }
  .drawer form { padding: 24px; display: grid; gap: 16px; overflow-y: auto; }
  .field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
  .field input, .field select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); font: inherit; color: var(--text); transition: .15s; }
  .field input::placeholder { color: var(--placeholder); }
  .field input:focus, .field select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(192,132,52,.22); background: var(--card); }
  .field .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .field .chk { display: flex; align-items: center; gap: 9px; font-weight: 500; color: var(--text); }
  .field .chk input { width: 16px; height: 16px; }
  .drawer footer { padding: 18px 24px; border-top: 1px solid var(--border-soft); display: flex; gap: 10px; justify-content: flex-end; margin-top: auto; }

  /* Toasts */
  .toasts { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
  .toast { display: flex; align-items: flex-start; gap: 11px; background: var(--toast-bg); color: var(--toast-text); border: 1px solid var(--toast-border); border-radius: 12px; padding: 13px 15px; box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.97); opacity: 0; transition: .28s cubic-bezier(.4,0,.2,1); }
  .toast.on { transform: none; opacity: 1; }
  .toast .ti { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
  .toast.ok .ti { background: var(--green-t); color: var(--green-d); }
  .toast.info .ti { background: var(--accent-soft); color: var(--accent-d); }
  .toast.warn .ti { background: var(--rose-t); color: var(--rose-d); }
  .toast .tt b { display: block; font-size: 13px; font-weight: 600; }
  .toast .tt p { font-size: 12px; color: var(--toast-mut); margin-top: 2px; }

  /* Reveal animation */
  .reveal { opacity: 0; transform: translateY(16px); animation: up .6s cubic-bezier(.4,0,.2,1) forwards; animation-delay: var(--d, 0s); }
  @keyframes up { to { opacity: 1; transform: none; } }

  /* Overlay */
  .overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); z-index: 55; opacity: 0; pointer-events: none; transition: .3s; }
}

/* ============================================================
   LAYOUT
   ============================================================ */
@layer layout {
  .app { position: relative; z-index: 1; display: flex; min-height: 100vh; }

  /* Sidebar */
  .sidebar {
    width: var(--sidebar-width);
    flex: none;
    background: var(--sidebar);
    color: #d6cfc4;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    border-right: 1px solid rgba(255,255,255,.08);
    transition: width .28s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
  }
  
  /* Folded sidebar */
  .app.folded .sidebar {
    width: 64px;
  }
  
  .app.folded .main {
    margin-left: 64px;
  }
  
  .side-head { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 14px; flex: none; }
  .brand { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; overflow: hidden; transition: opacity .2s, width .2s, gap .2s; }
  .brand-mark { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #d9a441, #9a5a2b 60%, #7c451d); box-shadow: 0 4px 18px -2px rgba(217,164,65,.55); }
  .brand-mark svg { width: 20px; height: 20px; }
  .brand-text { white-space: nowrap; overflow: hidden; }
  .brand-name { font-family: var(--serif); font-weight: 700; font-size: 17px; color: #fff; line-height: 1.1; }
  .brand-name span { display: block; font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500; color: #8a7d6c; letter-spacing: .05em; }
  .fold-btn { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #9a8c78; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: .18s; }
  .fold-btn:hover { background: rgba(255,255,255,.13); color: #fff; border-color: rgba(255,255,255,.24); }
  .fold-btn svg { width: 16px; height: 16px; transition: transform .28s cubic-bezier(.4,0,.2,1); transform: rotate(180deg); }
  .app.folded .fold-btn svg { transform: rotate(0deg); }
  .app.folded .brand { opacity: 0; width: 0; pointer-events: none; gap: 0; }
  .app.folded .side-head { justify-content: center; padding: 0; }
  .app.folded .nav-label, .app.folded .nav-item .label, .app.folded .nav-badge { opacity: 0; width: 0; pointer-events: none; }
  .app.folded .nav-item { justify-content: center; padding: 0; }

  .nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 14px 14px; scrollbar-width: thin; scrollbar-color: #2a2620 transparent; }
  .nav::-webkit-scrollbar { width: 5px; }
  .nav::-webkit-scrollbar-thumb { background: #2a2620; border-radius: 99px; }
  .nav-group { margin-top: 16px; }
  .nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: #7a6d5b; padding: 0 10px 8px; white-space: nowrap; overflow: hidden; transition: opacity .2s; }
  .nav-item { position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 10px; margin-bottom: 2px; border-radius: 11px; color: #a89c8b; font-weight: 500; font-size: 13.5px; transition: background .18s, color .18s; white-space: nowrap; }
  .nav-item > svg { width: 18px; height: 18px; color: #8a7d6a; flex: none; transition: color .18s; }
  .nav-item .label { transition: opacity .2s; }
  .nav-item:hover { background: rgba(255,255,255,.06); color: #f3ede3; }
  .nav-item:hover > svg { color: #cbbfa9; }
  .nav-item.active { background: rgba(217,164,65,.15); color: #fff; }
  .nav-item.active > svg { color: #d9a441; }
  .nav-item.active::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 4px 4px 0; background: linear-gradient(#d9a441, #9a5a2b); box-shadow: 0 0 14px rgba(217,164,65,.8); }
  .nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.1); color: #cbbfa9; transition: opacity .2s; }
  .nav-badge.hot { background: rgba(180,105,14,.28); color: #e0a441; }
  /* ===== Collapsed sidebar nav — single aligned icon column (Micro-Order C) =====
     Operative collapse state: .app.folded on #app (toggled by #foldBtn, persisted
     as 'ecp.sidebar'). shared.js mirrors the state onto the sidebar element as
     .collapsed / [data-collapsed="true"], so the order-literal selectors below
     engage identically. */
  .app.folded .nav-item,
  .sidebar.collapsed .nav-item,
  .sidebar[data-collapsed="true"] .nav-item {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0 auto 4px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
  }
  .app.folded .nav,
  .sidebar.collapsed .nav,
  .sidebar[data-collapsed="true"] .nav {
    /* 12px side padding centers the 40px items in the 64px column: (64-40)/2 */
    padding: 4px 12px 14px;
    /* Release the clipping context so the ::after tooltip (left: 52px) can
       overhang the 64px column; collapsed nav content (~560px) fits viewports
       >= ~720px tall, where scrolling is not needed. */
    overflow: visible;
  }
  .app.folded .sidebar,
  .sidebar.collapsed,
  .sidebar[data-collapsed="true"] {
    /* Same release one level up: the tooltip must escape the 64px sidebar box. */
    overflow: visible;
  }
  .app.folded .nav-item > svg,
  .sidebar.collapsed .nav-item > svg,
  .sidebar[data-collapsed="true"] .nav-item > svg {
    width: 20px;
    height: 20px;
    margin: 0;
  }
  .app.folded .nav-item span.label,
  .app.folded .nav-badge,
  .app.folded .nav-label,
  .sidebar.collapsed .nav-item span.label,
  .sidebar.collapsed .nav-badge,
  .sidebar.collapsed .nav-label,
  .sidebar[data-collapsed="true"] .nav-item span.label,
  .sidebar[data-collapsed="true"] .nav-badge,
  .sidebar[data-collapsed="true"] .nav-label {
    display: none;
  }
  .app.folded .nav-group,
  .sidebar.collapsed .nav-group,
  .sidebar[data-collapsed="true"] .nav-group {
    padding: 6px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .app.folded .nav-group:last-child,
  .sidebar.collapsed .nav-group:last-child,
  .sidebar[data-collapsed="true"] .nav-group:last-child {
    border-bottom: none;
  }
  /* Active indicator: -12px keeps the 3px gold bar flush with the sidebar edge
     (items now start at x=12 instead of x=14; unadjusted it would clip). */
  .app.folded .nav-item.active::before,
  .sidebar.collapsed .nav-item.active::before,
  .sidebar[data-collapsed="true"] .nav-item.active::before {
    left: -12px;
  }
  /* Tooltip on hover (collapsed state only) */
  .app.folded .nav-item:hover::after,
  .sidebar.collapsed .nav-item:hover::after,
  .sidebar[data-collapsed="true"] .nav-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 52px;
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a1a;
    color: #eaeaea;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid #3d3d3d;
    z-index: 100;
    pointer-events: none;
  }
  /* Mobile drawer parity: when a desktop fold left .collapsed on the sidebar and
     the viewport later drops to <=1024px, the .open drawer must restore labels
     exactly as the pre-Order-C baseline did (display:none above would otherwise
     outrank the legacy .open opacity/width restore). */
  .sidebar.open .nav-item span.label,
  .sidebar.open .nav-badge,
  .sidebar.open .nav-label { display: revert; }
  .app.folded .nav-label, .app.folded .nav-item .label, .app.folded .nav-badge { opacity: 0; width: 0; pointer-events: none; }
  .app.folded .side-foot .status-chip span, .app.folded .user-meta { display: none; }
  .app.folded .status-chip { justify-content: center; padding: 9px; }
  .app.folded .user-card { justify-content: center; padding: 8px 0; }
  .side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); flex: none; }
  .status-chip { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #a89c8b; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 11px; padding: 9px 12px; margin-bottom: 12px; white-space: nowrap; overflow: hidden; }
  .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); position: relative; flex: none; }
  .pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--green); opacity: .35; animation: pulse 2s infinite; }
  @keyframes pulse { 0% { transform: scale(.6); opacity: .5; } 70% { transform: scale(1.7); opacity: 0; } 100% { opacity: 0; } }
  .user-card { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 12px; transition: .2s; }
  .user-card:hover { background: rgba(255,255,255,.05); }
  .avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.14); }
  .avatar.sm { width: 24px; height: 24px; font-size: 10px; box-shadow: none; }
  .user-meta { min-width: 0; white-space: nowrap; overflow: hidden; }
  .user-meta b { display: block; font-size: 13px; color: #f3ede3; font-weight: 600; }
  .user-meta span { font-size: 11px; color: #8a7d6a; letter-spacing: .03em; }

  /* Main */
  .main { flex: 1; margin-left: var(--sidebar-width); min-width: 0; display: flex; flex-direction: column; transition: margin-left .28s cubic-bezier(.4,0,.2,1); }

  /* Topbar */
  .topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-height); display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(38,38,38,.82); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--border); }
  [data-theme="light"] .topbar { background: rgba(255,253,247,.82); }
  .hamburger { display: none; width: 38px; height: 38px; border-radius: 11px; place-items: center; color: var(--muted); }
  .hamburger:hover { background: var(--recessed); }
  .crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--faint); }
  .crumbs a:hover { color: var(--accent); }
  .crumbs svg { width: 14px; height: 14px; }
  .crumbs b { color: var(--heading); font-weight: 600; }
  .search { margin-left: auto; display: flex; align-items: center; gap: 9px; width: 300px; height: 40px; padding: 0 12px; background: var(--recessed); border: 1px solid var(--border); border-radius: 10px; color: var(--faint); transition: .2s; }
  .search:focus-within { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(154,90,43,.18); }
  .search input { border: none; outline: none; background: none; flex: 1; font: inherit; color: var(--text); font-size: 13px; }
  .search input::placeholder { color: var(--placeholder); }
  .search kbd { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; background: var(--card); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--muted); }
  .icon-btn { position: relative; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); border: 1px solid transparent; transition: .2s; }
  .icon-btn:hover { background: var(--card); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-sm); }
  .icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); border: 2px solid var(--topbar-bg); }
  .theme-btn .sun { display: block; }
  .theme-btn .moon { display: none; }
  [data-theme="light"] .theme-btn .sun { display: none; }
  [data-theme="light"] .theme-btn .moon { display: block; }
  /* ===== User dropdown menu in topbar (Micro-Order E) =====
     Replaces the inert .top-user button; markup lives in the pages, behavior
     in shared.js initUserMenu(). */
  .user-menu { position: relative; }
  .user-menu-trigger {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 9px 5px 5px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
  }
  .user-menu-trigger:hover {
    border-color: var(--accent);
  }
  .user-avatar-sm {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg,#d9a441,#9a5a2b);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700; font-size: 11px;
  }
  .user-name-sm { font-size: 13px; font-weight: 600; }
  .user-menu-trigger .chevron {
    width: 14px; height: 14px;
    color: var(--muted);
    transition: transform 0.2s;
  }
  .user-menu-trigger[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
  }

  .user-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 14px 34px -8px rgba(0,0,0,.5);
    padding: 6px;
    z-index: 100;
  }
  .user-menu-panel[hidden] { display: none; }

  .user-menu-header {
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 6px;
  }
  .user-menu-name { font-weight: 600; font-size: 13.5px; }
  .user-menu-role {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
  }

  .user-menu-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: background 0.12s;
  }
  .user-menu-item:hover { background: var(--border-soft); }
  .user-menu-item svg { width: 15px; height: 15px; }
  .user-menu-item-danger { color: var(--rose); }
  .user-menu-item-danger:hover {
    background: var(--rose-t);
  }

  /* Content */
  .content { padding: 30px 32px 44px; max-width: var(--content-max-width); width: 100%; margin: 0 auto; }
  .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
  .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
  [data-theme="light"] .eyebrow { color: #7c451d; }
  .eyebrow .live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); position: relative; }
  .eyebrow .live::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: var(--green); opacity: .4; animation: pulse 2s infinite; }
  .page-head h1 { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: -.015em; line-height: 1.1; color: var(--heading); }
  .page-head p { color: var(--muted); margin-top: 5px; max-width: 54ch; }
  .head-actions { display: flex; gap: 10px; }

  /* Verify page (no sidebar) */
  .page-verify .sidebar, .page-verify .topbar { display: none; }
  .page-verify .main { margin-left: 0; }
  .page-verify .content { max-width: 560px; padding: var(--space-8) var(--space-6); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
}

/* ============================================================
   PAGES - responsive
   ============================================================ */
@layer pages {
  @media (max-width: 1320px) {
    .kpis { grid-template-columns: repeat(3, 1fr); }
    .two-col { grid-template-columns: 1fr; }
    .integrity { grid-template-columns: 1fr; }
  }
  @media (max-width: 1100px) {
    .hero { flex-direction: column; align-items: stretch; }
    .hero-arc { align-self: center; }
  }
  @media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); width: 264px !important; transition: transform .3s cubic-bezier(.4,0,.2,1); }
    .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.7); }
    .sidebar.open .brand { opacity: 1; width: auto; pointer-events: auto; gap: 11px; }
    .sidebar.open .side-head { justify-content: flex-start; padding: 0 14px; }
    .sidebar.open .nav-label, .sidebar.open .nav-item .label, .sidebar.open .nav-badge { opacity: 1; width: auto; }
    .sidebar.open .nav-item { justify-content: flex-start; padding: 0 10px; }
    .sidebar.open .status-chip span, .sidebar.open .user-meta { display: revert; }
    .main { margin-left: 0; }
    .hamburger { display: grid; }
    body.nav-open .overlay { opacity: 1; pointer-events: auto; }
  }
  @media (max-width: 860px) {
    .search { width: auto; flex: 1; max-width: 220px; }
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .content { padding: 22px 18px 32px; }
    .topbar { padding: 0 18px; }
    .dist-legend { grid-template-columns: 1fr; }
  }
  @media (max-width: 560px) {
    .kpis { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .search kbd { display: none; }
    .tabs { order: 3; width: 100%; overflow-x: auto; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .reveal { opacity: 1; transform: none; }
  }
}

/* ============================================================
   ICONS (from reference)
   ============================================================ */
@layer base {
  .icon-sprites { display: none; }
}
/* ============================================================
   API KEY CREATED MODAL (Micro-Order B6.1)
   Persistent overlay for the one-time full key reveal. The overlay
   intentionally has NO click-outside-to-close: only the Done button
   or Escape may dismiss it — losing the key is unrecoverable.
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: grid; place-items: center;
  z-index: 200;
}
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 480px; max-width: 640px;
  padding: 0;
  box-shadow: 0 24px 64px -12px rgba(0,0,0,0.7);
}
.modal-header { padding: 20px 24px 12px; }
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-body { padding: 0 24px 16px; }
.modal-footer {
  padding: 12px 24px 20px;
  display: flex; justify-content: flex-end;
}
.key-block {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 6px 0 12px;
}
.key-block code {
  flex: 1;
  font-size: 12px;
  word-break: break-all;
  user-select: all;
}
.warning {
  color: var(--amber);
  background: var(--amber-t);
  border: 1px solid var(--amber);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13px;
}
.field-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 12px;
}
.field-value {
  font-size: 13px;
  margin-top: 4px;
}
/* .btn-secondary is referenced by the B6.1 key modal but had no rule in
   this theme — mirror the ghost look (card background + border). */
.btn-secondary {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
