/* ============================================================
   Clavitor Vault — App Stylesheet
   Design system: Black (#0A0A0A) + Red (#DC2626), IBM Plex only.
   No shadows. No gradients. No backdrop-filter.
   ============================================================ */

/* === TOKENS === */
:root {
  --brand-black:      #0A0A0A;
  --brand-red:        #DC2626;
  --brand-red-dark:   #B91C1C;
  --brand-red-light:  #FEE2E2;

  --bg:               #FFFFFF;
  --bg-secondary:     #F5F5F5;
  --bg-tertiary:      #E5E5E5;
  --bg-inverse:       #0A0A0A;

  --fg1:              #171717;
  --fg2:              #6B6B6B;
  --fg3:              #8A8A8A;
  --fg-inverse:       #FFFFFF;

  --border:           #E5E5E5;
  --border-strong:    #D4D4D4;

  --success:          #16A34A;
  --warning:          #CA8A04;
  --gold:             #D4AF37;

  --font-sans:        "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono:        "IBM Plex Mono", "SF Mono", Monaco, monospace;

  /*
   * Type scale — Folio steps (folio.css). Components use roles, not raw sizes.
   */
  --t-xs:   0.7rem;     /* ~11px — labels, mono meta */
  --t-sm:   0.875rem;   /* 14px  — body, list rows, UI chrome */
  --t-base: 1rem;       /* 16px  — Folio marketing tables only */
  --t-lg:   1.125rem;   /* 18px  — page titles (Entries, Audit, My vault) */
  --t-xl:   1.375rem;   /* 22px  — rare large heads */

  --w-regular: 400;
  --w-medium:  500;
  --w-bold:    600;

  /* Semantic roles */
  --type-title:  var(--w-bold)    var(--t-lg)/1.25 var(--font-sans);
  --type-lead:   var(--w-regular) var(--t-sm)/1.45 var(--font-sans);
  --type-body:   var(--w-regular) var(--t-sm)/1.5  var(--font-sans);
  --type-row:    var(--w-medium)  var(--t-sm)/1.4  var(--font-sans);
  --type-ui:     var(--w-medium)  var(--t-sm)/1.3  var(--font-sans);
  --type-meta:   var(--w-regular) var(--t-xs)/1.4  var(--font-mono);
  --type-label:  var(--w-medium)  var(--t-xs)/1    var(--font-mono);

  /* Legacy aliases (used in inline styles and other pages) */
  --text:             var(--fg1);
  --muted:            var(--fg2);
  --subtle:           var(--fg3);
  --surface:          #FFFFFF;
  --surface-0:        #FFFFFF;
  --surface-1:        var(--bg-secondary);
  --surface-alt:      var(--bg-secondary);
  --surface-gold:     #FFFBEB;
  --accent:           var(--brand-red);
  --red:              var(--brand-red);
  --border-gold:      rgba(212,175,55,0.3);

  --pad:              24px;
  --radius:           0;
  --radius-sm:        0;
  --radius-full:      0;
  --gap:              1.25rem;

  --focus-ring:       0 0 0 3px rgba(10, 10, 10, 0.30);
  --focus-ring-red:   0 0 0 3px rgba(220, 38, 38, 0.30);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body             { height: 100%; }
/* Standalone vault-app pages (legacy /vault-app/*.html) size through #app.
   Folio ash embeds keep an empty #app sibling — do NOT give it height:100%
   there (chrome.css hides :empty); only size #app when it is the layout root. */
body > #app            { height: 100%; }
#app:not(:empty)       { height: 100%; }
html                   { font-family: var(--font-sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body                   { background: var(--bg); color: var(--fg1); font: var(--type-body); }
a                      { color: inherit; text-decoration: none; }
button                 { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: var(--fg1); }
input[type="checkbox"]  { accent-color: var(--fg1); }
::selection            { background: var(--brand-black); color: #fff; }
:focus-visible         { outline: none; box-shadow: var(--focus-ring); }

/* === TYPOGRAPHY (roles) === */
h1                     { font: var(--type-title); letter-spacing: -0.01em; color: var(--fg1); }
h2                     { font: var(--w-bold) var(--t-base)/1.25 var(--font-sans); color: var(--fg1); }
h3                     { font: var(--w-bold) var(--t-sm)/1.3 var(--font-sans); color: var(--fg1); }
p                      { color: var(--fg2); line-height: 1.6; }
.label                 { font: var(--type-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); }
strong, b              { font-weight: var(--w-bold); color: var(--fg1); }

/* === BUTTONS === */
.btn                   { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 14px; border-radius: 0; font: var(--type-ui); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background 100ms, border-color 100ms; }
.btn-primary           { background: var(--brand-black); color: #fff; }
.btn-primary:hover     { background: #262626; }
.btn-ghost             { border-color: var(--border-strong); color: var(--fg1); background: #fff; }
.btn-ghost:hover       { border-color: var(--brand-black); }
.btn-red               { background: var(--brand-red); color: #fff; }
.btn-red:hover         { background: var(--brand-red-dark); }
.btn-gold              { background: rgba(212,175,55,0.1); color: var(--gold); border-color: rgba(212,175,55,0.3); }
.btn-accent            { background: var(--brand-red); color: #fff; }
.btn-block             { display: flex; width: 100%; }
.btn-lg                { padding: 10px 20px; font-size: 14px; }
.btn-sm                { padding: 4px 10px; font-size: 12px; }
.btn-row               { display: flex; flex-wrap: wrap; gap: 12px; }
.btn:disabled           { opacity: 0.4; cursor: not-allowed; }

/* === BADGES === */
.badge                 { display: inline-block; font: 500 10px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 7px; border-radius: 0; }
.badge.accent          { background: rgba(220,38,38,0.1); color: var(--brand-red); }
.badge.gold            { background: rgba(212,175,55,0.1); color: var(--gold); }
.badge.red             { background: var(--brand-red-light); color: var(--brand-red-dark); }
.badge.blue            { background: rgba(10,10,10,0.06); color: var(--fg2); }
.badge.muted           { background: rgba(10,10,10,0.04); color: var(--fg3); }
.badge.muted.active    { background: rgba(220,38,38,0.1); color: var(--brand-red); }
.badge.t1              { background: rgba(10,10,10,0.06); color: var(--fg1); }
.badge.t3              { background: var(--brand-red-light); color: var(--brand-red-dark); }

/* === SPACING === */
.mt-2  { margin-top: 0.5rem;  }  .mb-2  { margin-bottom: 0.5rem;  }
.mt-3  { margin-top: 0.75rem; }  .mb-3  { margin-bottom: 0.75rem; }
.mt-4  { margin-top: 1rem;    }  .mb-4  { margin-bottom: 1rem;    }
.mt-6  { margin-top: 1.5rem;  }  .mb-6  { margin-bottom: 1.5rem;  }
.mt-8  { margin-top: 2rem;    }  .mb-8  { margin-bottom: 2rem;    }

/* ============================================================
   VAULT LAYOUT — Sidebar + List + Detail
   ============================================================ */

.vault                 { display: grid; grid-template-columns: 260px 1fr; height: 100vh; font-family: var(--font-sans); color: var(--fg1); background: #fff; overflow: hidden; }
.vault *               { box-sizing: border-box; }

/* --- Sidebar --- */
.vault-side            { background: var(--bg-secondary); border-right: 1px solid var(--border); padding: 20px 16px; display: flex; flex-direction: column; gap: 24px; }
.vault-brand           { display: flex; align-items: stretch; gap: 8px; padding: 4px 8px; text-decoration: none; }
.vault-brand .sq       { width: 28px; height: 28px; background: var(--brand-black); flex-shrink: 0; }
.vault-brand .wm       { display: flex; flex-direction: column; justify-content: space-between; }
.vault-brand .wm-name  { font: 700 12px/1 var(--font-sans); letter-spacing: 0.22em; color: var(--brand-black); text-transform: uppercase; }
.vault-brand .wm-tag   { font: 500 6px/1 var(--font-sans); letter-spacing: 0.18em; color: var(--fg3); text-transform: uppercase; }
.vault-nav             { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.vault-nav a           { padding: 8px 10px; border-radius: 0; font-size: 13.5px; color: var(--fg2); text-decoration: none; display: flex; align-items: center; gap: 10px; transition: background 100ms; }
.vault-nav a:hover     { background: rgba(10,10,10,0.04); color: var(--fg1); }
.vault-nav a.active    { background: var(--brand-black); color: #fff; }
.vault-user            { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 16px; }
.vault-user-build      { font: 400 11px/1 var(--font-mono); color: var(--fg3); padding: 0 4px; }

/* --- Main area --- */
.vault-main            { display: grid; grid-template-columns: 360px 1fr; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }

/* --- Entry list panel --- */
.vault-list            { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; }
/* flex-shrink:0 — if the head shrinks, search/title overflow and paint over
   the scrolling entry rows (the LOCK/timer/favicon-on-search overlap). */
.vault-list-head       { flex: 0 0 auto; padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; background: #fff; position: relative; z-index: 2; }
.vault-list-head .title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vault-list-head h1    { font: var(--type-title); margin: 0; letter-spacing: -0.01em; }
.list-stats            { flex: 0 0 auto; }
.vault-search          { position: relative; }
.vault-search input    { width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 0; font: 400 13px/1.5 var(--font-sans); background: #fff; color: var(--fg1); }
.vault-search input:focus { outline: none; border-color: var(--brand-black); box-shadow: var(--focus-ring); }
.vault-search input::placeholder { color: var(--fg3); }
.vault-entries         { overflow-y: auto; padding: 8px; flex: 1 1 0; min-height: 0; }

/* --- Entry card --- */
.vault-entry           { padding: 12px 14px; border-radius: 0; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; transition: background 100ms; }
.vault-entry:hover     { background: var(--bg-secondary); }
.vault-entry.active    { background: rgba(10,10,10,0.04); }
.vault-entry-icon      { width: 32px; height: 32px; background: var(--brand-black); flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font: 600 8px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.02em; }
.vault-entry-body      { flex: 1; min-width: 0; }
.vault-entry-name      { font: var(--type-row); color: var(--fg1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-entry-meta      { font: var(--type-meta); color: var(--fg3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-entry-badge     { margin-left: auto; flex-shrink: 0; align-self: center; }
.entry-empty           { text-align: center; color: var(--fg3); padding: 80px 20px; }
.entry-empty-icon      { font-size: 2.5rem; margin-bottom: 16px; opacity: 0.4; }

/* --- Detail panel --- */
.vault-detail          { overflow-y: auto; padding: 24px 40px; min-height: 0; height: 100%; }
.vault-detail h2       { font: var(--type-title); margin: 0; letter-spacing: -0.01em; }
.split-detail-empty    { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--fg3); font-size: 14px; }

/* ============================================================
   ENTRY DETAIL — Content
   ============================================================ */

.detail-wrap           { max-width: 720px; }
.detail-header         { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.detail-icon           { width: 56px; height: 56px; background: var(--brand-black); color: #fff; display: flex; align-items: center; justify-content: center; font: 600 11px/1 var(--font-mono); flex: none; text-transform: uppercase; letter-spacing: 0.02em; }
.detail-header-info    { flex: 1; min-width: 0; }
.detail-title          { font: 600 24px/1.2 var(--font-sans); letter-spacing: -0.01em; margin-bottom: 4px; }
.detail-type           { font: 400 13px/1.5 var(--font-mono); color: var(--fg3); text-transform: uppercase; letter-spacing: 0.06em; }
.detail-actions        { display: flex; gap: 8px; flex-shrink: 0; }
.detail-menu-wrap      { position: relative; }
.detail-menu-btn       { min-width: 2.25rem; min-height: 2.25rem; padding: 0.35rem 0.65rem; font-size: 1.125rem; line-height: 1; letter-spacing: 0.05em; }
.detail-menu           { position: absolute; top: 100%; right: 0; margin-top: 4px; min-width: 10rem; background: #fff; border: 1px solid var(--border); z-index: 20; display: flex; flex-direction: column; padding: 4px 0; }
.detail-menu.hidden    { display: none; }
.detail-menu button    { display: block; width: 100%; text-align: left; padding: 0.5rem 0.85rem; border: 0; background: none; font: 500 13px/1.3 var(--font-sans); color: var(--fg1); cursor: pointer; }
.detail-menu button:hover { background: var(--bg-secondary); }
.detail-menu button.danger { color: var(--brand-red-dark, #b91c1c); }
.detail-urls           { border: 1px solid var(--border); border-radius: 0; padding: 14px 16px; margin-bottom: 16px; }
.detail-urls .field-label { margin-bottom: 8px; }
.detail-urls a         { color: var(--fg2); display: block; font: 400 13px/1.5 var(--font-mono); transition: color 100ms; }
.detail-urls a:hover   { color: var(--fg1); text-decoration: underline; }
.detail-fields         { display: flex; flex-direction: column; gap: 12px; }

/* --- Field box (restyled for design system) --- */
.field-box             { border: 1px solid var(--border); border-radius: 0; padding: 14px 16px; transition: border-color 100ms; }
.field-box:hover       { border-color: var(--border-strong); }
.field-label           { font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg3); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.field-value           { display: flex; align-items: center; gap: 8px; }
.field-l2-locked       { color: var(--brand-red); font-style: italic; font-size: 13px; }
.field-l2-toggle       { cursor: pointer; transition: opacity 100ms; font-size: 10px; }
.field-l2-toggle:hover { opacity: 0.7; }
.field-action          { background: none; border: 1px solid var(--border); border-radius: 0; padding: 3px 10px; font: 500 11px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg3); cursor: pointer; transition: border-color 100ms, color 100ms; }
.field-action:hover    { border-color: var(--brand-black); color: var(--brand-black); }
.password-masked       { font-family: var(--font-mono); letter-spacing: 0.04em; color: var(--fg2); font-size: 13px; }
.notes-label           { font: 500 11px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); margin-bottom: 8px; }
.notes-box             { border: 1px solid var(--border); border-radius: 0; padding: 14px 16px; white-space: pre-wrap; word-break: break-all; font-size: 14px; color: var(--fg2); line-height: 1.7; }

/* --- Danger zone --- */
.vault-danger          { margin-top: 48px; border: 1px solid var(--brand-red-light); background: rgba(220,38,38,0.04); border-radius: 0; padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.vault-danger-title    { font-size: 14px; font-weight: 600; color: var(--brand-red-dark); margin: 0 0 4px; }
.vault-danger-desc     { font-size: 13px; color: var(--fg2); margin: 0; }

/* Tier badges for field encryption levels */
.tier-badge            { display: inline-block; padding: 2px 6px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 0; margin-left: 4px; }
.tier-l2               { background: rgba(220,38,38,0.1); color: var(--brand-red); }
.tier-l3               { background: rgba(212,175,55,0.1); color: var(--gold); }

/* ============================================================
   AUTH SCREEN — Onboarding / Unlock (no sidebar)
   ============================================================ */

.auth-screen           { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: var(--bg); overflow: visible; }
.auth-brand            { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; }
.auth-brand .auth-sq   { width: 32px; height: 32px; background: var(--brand-black); }
.auth-brand .auth-wm   { font: 700 16px/1 var(--font-sans); letter-spacing: 0.25em; color: var(--brand-black); text-transform: uppercase; }
.auth-fx-canvas        { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.auth-logo             { display: inline-flex; gap: 20px; align-items: stretch; margin-bottom: 40px; position: relative; z-index: 1; }
.auth-logo-text        { display: flex; flex-direction: column; justify-content: space-between; height: 80px; }
.auth-logo-wm          { font: 700 clamp(28px, 5vw, 56px)/1 var(--font-sans); letter-spacing: 0.25em; text-transform: uppercase; color: var(--brand-black); }
.auth-logo-tag         { font: 500 clamp(9px, 1.5vw, 16px)/1 var(--font-sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg3); margin-bottom: -2px; }
.auth-vault            { position: relative; width: 80px; height: 80px; flex-shrink: 0; overflow: visible; }
.auth-vault.ready      { background: var(--brand-black); overflow: hidden; }
.auth-vault-cell       { position: absolute; width: 21px; height: 21px; background: var(--brand-black); transition: transform 0ms, background 100ms; }
.auth-vault-cell.snap  { transition: transform 1200ms cubic-bezier(0.34, 1.35, 0.64, 1), background 100ms; }
.auth-vault-cell.issue { background: var(--brand-red); }
.auth-vault.ready .auth-vault-cell { transition: background 100ms; transform: none; }
.auth-card             { width: 100%; max-width: var(--width, 1280px); background: transparent; border: 0; border-radius: 0; padding: 0; position: relative; z-index: 1; }

/* Centered unlock stack (in-app and standalone) — not Folio hero left-indent. */
.auth-unlock {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
}
.auth-unlock-title {
  margin: 0 0 0.75rem;
  font: 700 clamp(1.75rem, 4vw, 2.5rem)/1.15 var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--fg1, #171717);
}
.auth-unlock-lead {
  margin: 0 0 1.75rem;
  font: 400 1rem/1.55 var(--font-sans);
  color: var(--fg2, #6b6b6b);
}
.auth-unlock .section-eyebrow { margin-bottom: 0.75rem; }
.auth-unlock .card-feature { text-align: left; }

/* Passkey card behaviour only — look comes from Folio card-feature / btn-primary. */
.auth-key .btn-primary { margin-top: 0.25rem; width: 100%; }
.auth-key-switch-wrap { margin: 0.75rem 0 0; }
.auth-key-switch {
  background: none; border: none; padding: 0; font: inherit; font-size: 0.875rem;
  color: var(--fg3, #737373); text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.auth-key-switch:hover { color: var(--fg1, #0a0a0a); }
.auth-key-msg { margin: 0.85rem 0 0; font: 500 0.875rem/1.4 var(--font-sans); color: var(--fg1); }
.auth-key-msg[hidden] { display: none !important; }
.auth-key .btn-primary:disabled { opacity: 0.55; cursor: wait; }
.device-option         { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 0; background: #fff; border: 1px solid var(--border); transition: border-color 100ms; cursor: pointer; text-align: left; }
.device-option:hover   { border-color: var(--brand-black); }
.device-option strong  { display: block; color: var(--fg1); font-size: 14px; }
.device-option div     { color: var(--fg2); }

/* Legacy auth wrappers (still referenced) */
.onboard-wrap          { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-title           { font: 600 18px/1.2 var(--font-sans); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }

/* Locked-email display shown in the enrollment gate when ?email= is in
   the URL. Styled like a read-only field — visible value, not an input. */
.enroll-email-locked   { padding: 10px 12px; border: 1px solid var(--border); border-radius: 0; background: var(--bg-alt, #FAFAF7); font: 500 14px/1.4 var(--font-mono); color: var(--fg1); word-break: break-all; }

/* ============================================================
   TOPBAR — Used by non-vault pages (import, agents, security, tokens)
   ============================================================ */

.topbar                { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--border); padding: 0 16px; }
.topbar-inner          { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.topbar-links          { display: flex; align-items: center; gap: 20px; font-size: 13.5px; }
.topbar-links a,
.topbar-links button   { color: var(--fg2); transition: color 100ms; font-size: 13.5px; }
.topbar-links a:hover,
.topbar-links button:hover { color: var(--fg1); }
.topbar-links a.topbar-active { color: var(--fg1); font-weight: 500; }
.topbar-lock           { color: var(--brand-red) !important; font-weight: 500; }
.vault-lock-banner     { background: var(--brand-red-light); border-bottom: 1px solid rgba(220,38,38,0.3); color: var(--brand-red-dark); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 13px; }

/* Legacy layout containers (used by other pages) */
.main-area             { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.main-content          { flex: 1; overflow: hidden; display: flex; }
.app-column            { max-width: 52rem; margin: 0 auto; width: 100%; }

/* ============================================================
   MODALS
   ============================================================ */

.modal-overlay         { position: fixed; inset: 0; background: rgba(10,10,10,0.5); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-box             { background: #fff; border: 1px solid var(--border); border-radius: 0; max-width: 28rem; width: calc(100% - 32px); max-height: 90vh; overflow-y: auto; padding: 1.5rem; }
.modal-body            { padding: 28px; }
.modal-actions         { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ============================================================
   FORMS
   ============================================================ */

.form-group            { margin-bottom: 16px; box-sizing: border-box; }
.form-label            { display: block; font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg3); margin-bottom: 6px; }
.form-input,
.form-select,
.form-textarea         { width: 100%; max-width: 100%; padding: 8px 12px; background: #fff; border: 1px solid var(--border-strong); border-radius: 0; color: var(--fg1); outline: none; transition: border-color 100ms; box-sizing: border-box; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus   { border-color: var(--brand-black); box-shadow: var(--focus-ring); }
.form-input::placeholder { color: var(--fg3); }
.form-input-sm         { padding: 6px 8px; font-size: 13px; }
.form-row              { display: flex; gap: 8px; align-items: flex-start; }
.form-required .form-label { color: var(--fg1); }

/* ============================================================
   TOAST
   ============================================================ */

.toast                 { position: fixed; top: 16px; right: 16px; padding: 10px 20px; border-radius: 0; z-index: 60; font-weight: 500; font-size: 13px; animation: slideIn 200ms ease; }
.toast.success         { background: var(--brand-black); color: #fff; }
.toast.error           { background: var(--brand-red); color: #fff; }
@keyframes slideIn     { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================
   ALERTS
   ============================================================ */

.alert                 { padding: 12px; border-radius: 0; font-size: 13px; }
.alert-error           { background: var(--brand-red-light); border: 1px solid rgba(220,38,38,0.25); color: var(--brand-red-dark); }
.alert-warning         { background: #FEF9C3; border: 1px solid rgba(202,138,4,0.25); color: #92400E; }

/* ============================================================
   AUDIT TABLE
   ============================================================ */

.audit-table           { width: 100%; border-collapse: collapse; font-size: 13px; }
.audit-table th        { text-align: left; color: var(--fg3); padding: 8px 12px; font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.audit-table td        { padding: 10px 12px; color: var(--fg2); }
.audit-table tr + tr   { border-top: 1px solid var(--border); }
.audit-table tbody tr:hover { background: var(--bg-secondary); }
.audit-scroll          { max-height: 24rem; overflow-y: auto; }

/* ============================================================
   CARDS (used by agents, security, tokens pages)
   ============================================================ */

.card                  { background: #fff; border: 1px solid var(--border); border-radius: 0; padding: 24px; }
.card.alt              { background: var(--brand-red-light); border-color: rgba(220,38,38,0.25); }
.card.gold             { background: rgba(212,175,55,0.06); border-color: rgba(212,175,55,0.25); }
.card.red              { background: var(--brand-red-light); border-color: rgba(220,38,38,0.25); }

/* ============================================================
   STATS BAR (type filter badges)
   ============================================================ */

.list-stats            { padding: 8px 12px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.list-badge            { font: 500 11px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg2); padding: 4px 10px; border-radius: 0; background: var(--bg-secondary); border: 1px solid var(--border); white-space: nowrap; cursor: pointer; transition: border-color 100ms, color 100ms; }
.list-badge:hover      { border-color: var(--brand-black); color: var(--fg1); }
.list-badge.active     { background: var(--brand-black); color: #fff; border-color: var(--brand-black); }
.list-badge.type-credential { color: var(--brand-red); border-color: rgba(220,38,38,0.25); }
.list-badge.type-credential.active { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }
.list-badge.type-card   { color: var(--gold); border-color: rgba(212,175,55,0.25); }
.list-badge.type-card.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.list-section-header    { font: 700 13px/1 var(--font-sans); color: var(--fg1); padding: 16px 16px 6px; border-top: 1px solid var(--border); }
.list-section-header:first-child { border-top: none; }
.list-badge.type-note   { color: var(--fg3); }
.list-badge.type-identity { color: var(--fg3); }
.list-badge.type-ssh_key { color: var(--brand-red); border-color: rgba(220,38,38,0.25); }
.list-badge.type-ssh_key.active { background: var(--brand-red); color: #fff; }
.list-badge.type-totp   { color: var(--gold); border-color: rgba(212,175,55,0.25); }
.list-badge.type-totp.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.list-badge[style*="gold"] { color: var(--gold) !important; border-color: rgba(212,175,55,0.3) !important; }
.list-badge[style*="gold"].active { background: var(--gold) !important; color: #fff !important; }

/* ============================================================
   LIVE TOTP CODE
   ============================================================ */

.totp-code             { font: 600 15px/1 var(--font-mono); letter-spacing: 0.12em; color: var(--fg1); }
.totp-countdown        { font: 500 12px/1 var(--font-mono); color: var(--fg3); }
.totp-countdown.totp-expiring { color: var(--brand-red); animation: totp-pulse 0.5s ease-in-out infinite alternate; }
@keyframes totp-pulse  { from { opacity: 1; } to { opacity: 0.4; } }
.field-totp .field-value { display: flex; align-items: center; }

/* ============================================================
   IMPORT
   ============================================================ */

.import-container      { width: 800px; max-width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 0; min-height: 400px; padding: 28px; }
.import-section        { width: 100%; }
.processing-container  { display: flex; align-items: center; gap: 12px; padding: 48px 16px; justify-content: center; }
.import-option         { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 0; cursor: pointer; margin-bottom: 8px; transition: border-color 100ms; }
.import-option:hover   { border-color: var(--border-strong); }
.import-option input   { margin-top: 2px; accent-color: var(--fg1); width: 1rem; height: 1rem; flex-shrink: 0; }
.option-content        { flex: 1; }
.option-content strong { display: block; font-weight: 600; margin-bottom: 4px; }
.option-content p      { margin: 0; color: var(--fg2); font-size: 13px; }
.option-content .api-note { color: var(--gold); font-size: 12px; margin-top: 4px; }
.nested-options        { margin-top: 12px; padding: 12px; background: var(--bg-secondary); border-radius: 0; }
.nested-title          { font-weight: 600; margin: 0 0 8px; color: var(--fg3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.nested-options label  { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; cursor: pointer; }
.nested-options label:last-child { margin-bottom: 0; }
.nested-options input  { accent-color: var(--fg1); width: 1rem; height: 1rem; }
.privacy-note          { color: var(--fg3); margin: 8px 0; font-size: 12px; }
.dialog-actions        { display: flex; gap: 8px; margin-top: 16px; }
.scope-header          { padding: 8px 12px; font: 600 12px/1 var(--font-mono); color: var(--brand-red); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 8px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.scope-header input    { accent-color: var(--fg1); }
.entry-title           { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 80px; }
.import-divider        { display: flex; align-items: center; gap: 16px; margin: 8px 0; color: var(--fg3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.import-divider::before,
.import-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.import-summary        { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; padding: 12px; background: var(--bg-secondary); border-radius: 0; border: 1px solid var(--border); }
.import-summary label  { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

/* ============================================================
   QR SCANNER & TOTP IMPORT
   ============================================================ */

.btn-qr-scan           { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 0; color: var(--fg1); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color 100ms; }
.btn-qr-scan:hover     { border-color: var(--brand-black); }
.qr-viewfinder         { position: relative; border-radius: 0; overflow: hidden; background: #000; aspect-ratio: 4/3; }
.qr-viewfinder video   { width: 100%; height: 100%; object-fit: cover; }
.qr-overlay            { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.qr-frame              { width: 60%; aspect-ratio: 1; border: 2px solid rgba(212,175,55,0.6); border-radius: 0; }
.qr-status             { text-align: center; padding: 12px; font-size: 13px; color: var(--fg3); }
.totp-import-list      { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; max-height: 300px; overflow-y: auto; }
.totp-import-item      { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 0; transition: opacity 200ms; }
.totp-import-item.skipped { opacity: 0.35; }
.totp-import-info      { flex: 1; min-width: 0; }
.totp-import-name      { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.totp-import-sub       { font-size: 12px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.totp-tier-select      { display: flex; gap: 2px; flex-shrink: 0; }
.tier-btn              { padding: 3px 8px; font-size: 11px; font-weight: 600; border: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--fg3); cursor: pointer; transition: all 100ms; letter-spacing: 0.02em; }
.tier-btn:hover        { border-color: var(--border-strong); color: var(--fg1); }
.tier-btn.active       { background: var(--bg-secondary); border-color: var(--border-strong); color: var(--fg1); }
.tier-btn.tier-skip.active { background: var(--bg-secondary); border-color: var(--border); color: var(--fg3); }

/* ============================================================
   DROP ZONE
   ============================================================ */

.drop-zone             { border: 2px dashed var(--border-strong); border-radius: 0; padding: 40px; text-align: center; cursor: pointer; transition: border-color 200ms, background 200ms; background: var(--bg-secondary); }
.drop-zone:hover       { border-color: var(--brand-black); background: rgba(10,10,10,0.02); }
.drop-zone.active      { border-color: var(--gold); background: rgba(212,175,55,0.04); }
.drop-zone-icon        { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.drop-zone-text        { color: var(--fg2); font-size: 14px; }
.drop-zone-hint        { color: var(--fg3); font-size: 12px; margin-top: 8px; }

/* ============================================================
   DROPDOWN MENU
   ============================================================ */

.dropdown              { position: relative; display: inline-block; }
.dropdown-menu         { position: absolute; top: 100%; right: 0; margin-top: 4px; min-width: 160px; background: #fff; border: 1px solid var(--border); border-radius: 0; z-index: 100; display: none; padding: 4px 0; }
.dropdown-menu.active  { display: block; }
.dropdown-item         { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; background: none; border: none; color: var(--fg1); font-size: 13px; text-align: left; cursor: pointer; transition: background 100ms; }
.dropdown-item:hover   { background: var(--bg-secondary); }
.dropdown-divider      { height: 1px; margin: 4px 0; background: var(--border); }

/* ============================================================
   CONFIG BLOCKS (token page)
   ============================================================ */

.config-tabs           { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.config-tab            { padding: 8px 16px; font: 600 12px/1 var(--font-mono); letter-spacing: 0.04em; color: var(--fg3); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: color 100ms, border-color 100ms; }
.config-tab:hover      { color: var(--fg1); }
.config-tab.active     { color: var(--fg1); border-bottom-color: var(--brand-black); }
.config-block          { position: relative; background: var(--bg-inverse); border: 1px solid var(--border); border-top: none; border-radius: 0; padding: 16px 20px; font: 400 13px/1.65 var(--font-mono); color: var(--fg3); overflow-x: auto; white-space: pre; }
.config-copy           { position: absolute; top: 8px; right: 8px; font: 600 12px/1 var(--font-sans); padding: 4px 10px; border-radius: 0; background: rgba(255,255,255,0.08); color: var(--fg3); border: 1px solid rgba(255,255,255,0.15); cursor: pointer; transition: color 100ms; }
.config-copy:hover     { color: #fff; background: rgba(255,255,255,0.12); }

/* ============================================================
   SITE / MARKETING (homepage, etc.)
   ============================================================ */

.site                  { min-height: 100vh; display: flex; flex-direction: column; }
.site-column           { max-width: 64rem; margin: 0 auto; width: 100%; padding: 0 16px; }
.hero                  { text-align: center; margin-bottom: 80px; }
.hero-title            { font: 700 clamp(2.5rem, 6vw, 4rem)/1.1 var(--font-sans); margin-bottom: 24px; letter-spacing: -0.03em; color: var(--brand-black); }
.hero-sub              { font-size: 18px; color: var(--fg2); max-width: 40rem; margin: 0 auto 32px; line-height: 1.7; }
.hero-actions          { display: flex; gap: 16px; justify-content: center; }
.features              { margin-bottom: 80px; }
.feature-grid          { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 20px; }
.feature-card          { background: #fff; border: 1px solid var(--border); border-radius: 0; padding: 24px; }
.feature-card h3       { font-size: 16px; font-weight: 600; margin: 8px 0; }
.feature-card p        { font-size: 14px; color: var(--fg2); line-height: 1.6; margin: 0; }
.feature-label         { font: 600 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg3); }
.feature-label.accent  { color: var(--brand-red); }
.site-footer           { margin-top: auto; padding: 32px 16px; border-top: 1px solid var(--border); }
.site-footer .site-column { display: flex; align-items: center; gap: 24px; }
.footer-text           { font: 400 13px/1 var(--font-mono); color: var(--fg3); }

/* Vaultname (legacy logo) */
.vaultname             { font: 700 1em/1 var(--font-mono); color: var(--fg1); }
.vaultname .n          { color: var(--brand-red); }

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar         { width: 6px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: rgba(10,10,10,0.08); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: rgba(10,10,10,0.15); }

/* ============================================================
   UTILITIES
   ============================================================ */

.hidden                { display: none !important; }
.truncate              { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-gold             { color: var(--gold); }
.text-red              { color: var(--brand-red); }
.text-accent           { color: var(--brand-red); }
.text-muted            { color: var(--fg2); }
.text-subtle           { color: var(--fg3); }
.text-center           { text-align: center; }
.text-right            { text-align: right; }
.cursor-pointer        { cursor: pointer; }
.italic                { font-style: italic; }
.font-mono             { font-family: var(--font-mono); }
.select-all            { user-select: all; }
.disabled              { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Legacy entry row (used by import page) */
.entry-row             { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 100ms; }
.entry-row:hover       { background: var(--bg-secondary); }
.entry-row:active      { transform: scale(0.995); }
.entry-row.active      { background: rgba(10,10,10,0.04); }
.entry-icon            { width: 2.75rem; height: 1.375rem; border-radius: 0; background: var(--brand-black); display: flex; align-items: center; justify-content: center; font: 600 8px/1 var(--font-mono); color: #fff; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.entry-domain          { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg1); }
.entry-user            { color: var(--fg3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; flex-shrink: 1; min-width: 60px; }
.entry-user::before    { content: '\00b7'; margin: 0 8px; color: var(--fg3); }
.entry-l2              { flex-shrink: 0; }

/* Legacy item row (import, agent list) */
.item-row              { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 100ms; }
.item-row:hover        { background: var(--bg-secondary); }
.item-row.faded        { opacity: 0.35; }
.item-icon             { width: 2.75rem; height: 1.375rem; border-radius: 0; background: var(--brand-black); display: flex; align-items: center; justify-content: center; font: 600 8px/1 var(--font-mono); color: #fff; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.item-title            { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg1); }
.item-sub              { color: var(--fg2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.item-list             { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; }

/* Spinner */
@keyframes spin        { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spinner               { display: inline-block; }

/* Agent widget (hidden in sidebar layout, still referenced) */
.agent-widget          { border-bottom: 1px solid var(--border); }

/* Split panes (legacy, for pages that still use them) */
.split-list            { width: 26rem; min-width: 22rem; max-width: 32rem; overflow-y: auto; border-right: 1px solid var(--border); flex-shrink: 0; }
.split-detail          { flex: 1; overflow-y: auto; }

/* Toolbar (legacy, for import page) */
.toolbar               { background: transparent; border-bottom: 1px solid var(--border); padding: 12px 16px; }
.toolbar-inner         { display: flex; align-items: center; gap: 12px; }
.toolbar-search        { flex: 0 1 20rem; padding: 8px 12px; background: #fff; border: 1px solid var(--border-strong); border-radius: 0; color: var(--fg1); outline: none; transition: border-color 100ms; font-size: 14px; }
.toolbar-search:focus  { border-color: var(--brand-black); box-shadow: var(--focus-ring); }
.toolbar-search::placeholder { color: var(--fg3); }

/* Entry form — floating type menu */
.ef-menu               { position: fixed; z-index: 9999; background: #fff; border: 1px solid var(--border); border-radius: 0; box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 6px 0; min-width: 180px; }
.ef-menu-item          { padding: 8px 16px; font-size: 0.875rem; cursor: pointer; }
.ef-menu-item:hover    { background: var(--bg2); }

/* Entry form — header */
.ef-header             { display: flex; align-items: center; justify-content: space-between; padding: 0 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.ef-header-title       { font-size: 1.125rem; font-weight: 700; }
.ef-close              { font-size: 1.5rem; background: none; border: none; cursor: pointer; color: var(--fg3); padding: 0 4px; line-height: 1; }
.ef-close:hover        { color: var(--fg1); }

/* Entry form — wider modal */
.modal-box:has(.ef-header) { max-width: 560px; }

/* Entry form — form layout */
.ef-label              { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg2); margin-bottom: 2px; }
.ef-row                { display: flex; gap: 12px; }
.ef-flex-field         { flex: 1; min-width: 0; }
.ef-add-field          { font-size: 0.8125rem; color: var(--brand-gold); background: none; border: none; cursor: pointer; padding: 0; }
.ef-add-field:hover    { text-decoration: underline; }
.ef-tier-badge         { display: inline-block; font-size: 0.5625rem; font-weight: 700; color: var(--brand-gold); background: rgba(200,160,60,0.12); padding: 1px 5px; border-radius: 0; vertical-align: middle; margin-left: 4px; letter-spacing: 0.02em; }

/* Entry form — tighter spacing */
.ef-form .form-group   { margin-bottom: 10px; }

/* Security page — full ash-main width, not a 640px essay column */
.security-page {
  max-width: 52rem;
  width: 100%;
  padding: 2rem 2.5rem 3rem;
  box-sizing: border-box;
}
.security-page h1 {
  font: 600 1.375rem/1.25 var(--font-sans);
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}
.security-page .card + .card { margin-top: 0; }
.security-page .card h2 {
  font: 600 1rem/1.3 var(--font-sans);
  margin: 0;
}
/* Two-up on wide panes when cards sit side by side (optional grid for denser layout) */
@media (min-width: 900px) {
  .security-page {
    max-width: 64rem;
    padding: 2rem 2.5rem 3rem;
  }
}

/* Entry form — country picker */
.ef-country-wrap       { position: relative; }
.ef-country-list       { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border-strong); border-radius: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.1); max-height: 200px; overflow-y: auto; z-index: 100; }
.ef-country-option     { padding: 8px 12px; cursor: pointer; font-size: 0.875rem; }
.ef-country-option:hover { background: var(--bg2); }

/* Clients — enrollment panel + grouped list (was page-local in agents.html) */
.client-group { margin-bottom: 0.5rem; }
.client-group-header { font-family: var(--font-sans); font-size: 13px; font-weight: 700; color: var(--fg1); padding: 16px 16px 6px; border-top: 1px solid var(--border); }
.client-group:first-child .client-group-header { border-top: none; }
.client-group-empty { font-size: 12px; color: var(--fg3); padding: 4px 16px 12px; font-style: italic; }
.enroll-panel { padding: 0 0 1.5rem; max-width: 36rem; }
.enroll-title { margin: 0 0 0.35rem; font: var(--type-title, 600 1.125rem/1.25 var(--font-sans)); }
.enroll-lead { margin: 0 0 1.25rem; color: var(--fg3); font-size: 0.875rem; line-height: 1.45; }
.enroll-creds { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.25rem; }
.enroll-field { display: flex; flex-direction: column; min-width: 0; }
.enroll-secret { display: flex; align-items: flex-start; gap: 0.75rem; background: var(--bg-secondary, #f5f5f4); border: 1px solid var(--border, #e5e5e5); padding: 0.65rem 0.75rem; box-sizing: border-box; min-width: 0; }
.enroll-secret-val { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; word-break: break-all; font: 500 0.8rem/1.45 var(--font-mono); color: var(--fg, #0a0a0a); user-select: all; }
.enroll-secret .btn { flex: 0 0 auto; align-self: flex-start; }
.enroll-key .enroll-secret { align-items: center; }
.enroll-key .enroll-secret-val { word-break: normal; overflow-wrap: anywhere; letter-spacing: 0; }
.enroll-block { margin-bottom: 1.25rem; }
.enroll-usage { position: relative; background: var(--bg-secondary, #f5f5f4); border: 1px solid var(--border, #e5e5e5); padding: 0.75rem 1rem; }
.enroll-usage-code { margin: 0; padding: 0; white-space: pre-wrap; word-break: break-word; font: 400 0.75rem/1.55 var(--font-mono); color: var(--fg, #0a0a0a); }
.enroll-copy { position: absolute; top: 0.4rem; right: 0.4rem; padding: 0.2rem 0.5rem; font-size: 0.65rem; }
.enroll-actions { margin-top: 0.5rem; }

/* Audit log — layout only (was page-local in audit.html) */
.aud-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.aud-toolbar .presets { display: inline-flex; border: 1px solid var(--border-strong); }
.aud-toolbar .presets button { font: var(--type-ui); padding: 6px 11px; border: 0; border-right: 1px solid var(--border); background: #fff; color: var(--fg2); cursor: pointer; }
.aud-toolbar .presets button:last-child { border-right: 0; }
.aud-toolbar .presets button.active { background: var(--brand-black); color: #fff; }
.aud-toolbar .form-input { width: auto; min-width: 8rem; height: 2rem; padding: 4px 8px; font: var(--type-ui); }
.aud-toolbar .spacer { flex: 1; }
#tableWrap { flex: 1; min-height: 0; overflow: auto; padding: 0 20px 12px; }
#tableWrap table { margin: 0; font-size: var(--t-sm, 0.875rem); }
#tableWrap th, #tableWrap td { font-size: var(--t-sm, 0.875rem); }
#tableWrap th { font-weight: var(--w-bold, 600); letter-spacing: 0.04em; }
#tableWrap tbody tr.aud-row { cursor: pointer; }
.aud-chain { margin: 10px 0 0; padding: 8px 10px; border: 1px solid var(--border); background: #fafafa; font: var(--type-meta); font-weight: var(--w-medium, 500); color: var(--fg2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.aud-chain.ok { border-color: rgba(22,163,74,0.35); color: var(--success, #15803d); background: rgba(22,163,74,0.06); }
.aud-chain.bad { border-color: rgba(220,38,38,0.4); color: var(--brand-red-dark, #b91c1c); background: var(--brand-red-light, #fee2e2); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--border); font: var(--type-meta); color: var(--fg3); }
.facets { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 20px; border-bottom: 1px solid var(--border); }
.facets:empty { display: none; }
.chip { font: var(--type-ui); padding: 4px 9px; border: 1px solid var(--border-strong); cursor: pointer; background: #fff; }
.chip.active { background: var(--brand-black); color: #fff; border-color: var(--brand-black); }
.state { text-align: center; padding: 4rem 1rem; font: var(--type-body); color: var(--fg3); }
.vault-app-page .vault { height: 100%; min-height: 0; overflow: hidden; }

