/* ============================================================
   clavitor — app stylesheet
   Design tokens from clavitor.css (website styleguide).
   App-specific component classes below.
   ============================================================ */

/* === TOKENS (shared with website) === */
:root {
  --pad:          2rem;
  --radius:       1rem;
  --radius-sm:    0.5rem;
  --gap:          1.25rem;

  --bg:           #0d1520;
  --surface:      #142542;
  --surface-alt:  #0e2414;
  --surface-gold: #2a1f00;

  --border:       rgba(255,255,255,0.09);
  --border-gold:  rgba(212,175,55,0.3);

  --text:         #f1f5f9;
  --muted:        #94a3b8;
  --subtle:       #64748b;

  --accent:       #4ade80;
  --gold:         #D4AF37;
  --red:          #EF4444;

  --font-sans:    Inter, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

/* --- Themes --- */

body.theme-light {
  --bg:           #f8f9fb;
  --surface:      #ffffff;
  --surface-alt:  #f0fdf4;
  --surface-gold: #fffbeb;
  --border:       rgba(0,0,0,0.1);
  --border-gold:  rgba(180,140,20,0.3);
  --text:         #1e293b;
  --muted:        #64748b;
  --subtle:       #94a3b8;
  --accent:       #16a34a;
  --gold:         #b8860b;
  --red:          #dc2626;
}

body.theme-midnight {
  --bg:           #020617;
  --surface:      #0f172a;
  --surface-alt:  #022c22;
  --surface-gold: #1c1500;
  --border:       rgba(255,255,255,0.06);
  --border-gold:  rgba(212,175,55,0.25);
  --text:         #e2e8f0;
  --muted:        #64748b;
  --subtle:       #475569;
  --accent:       #22c55e;
  --gold:         #eab308;
  --red:          #f87171;
}

body.theme-light .topbar { background: rgba(255,255,255,0.9); }
body.theme-light .vault-lock-banner { background: rgba(239,68,68,0.08); }
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body             { height: 100%; }
body                   { background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 0.875rem; line-height: 1.6; }
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(--text); }

/* === TYPOGRAPHY === */
h1                     { font-size: 1.875rem; font-weight: 800; line-height: 1.1; color: var(--text); }
h2                     { font-size: 1.25rem;  font-weight: 700; line-height: 1.2; color: var(--text); }
h3                     { font-size: 1.125rem; font-weight: 700; line-height: 1.3; color: var(--text); }
p                      { color: var(--muted); line-height: 1.75; }
.label                 { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); }

/* === VAULTNAME (from website) === */
.vaultname             { font-family: var(--font-mono); font-weight: 700; color: var(--text); }
.vaultname .n          { color: var(--accent); }

/* === BUTTONS === */
.btn                   { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; padding: 0.625rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: opacity 0.15s, transform 0.15s; text-align: center; line-height: 1.4; }
.btn:hover             { opacity: 0.85; }
.btn:active            { transform: scale(0.97); }
.btn-primary           { background: var(--accent);             color: var(--bg);     border-color: var(--accent); }
.btn-ghost             { background: transparent;               color: var(--text);   border-color: var(--border); }
.btn-gold              { background: rgba(212,175,55,0.15);     color: var(--gold);   border-color: rgba(212,175,55,0.3); }
.btn-red               { background: rgba(239,68,68,0.15);      color: var(--red);    border-color: rgba(239,68,68,0.3); }
.btn-accent            { background: rgba(34,197,94,0.15);      color: var(--accent); border-color: rgba(34,197,94,0.3); }
.btn-block             { display: flex; width: 100%; }
.btn-lg                { padding: 0.75rem 1.5rem; font-size: 1rem; border-radius: var(--radius); }
.btn-row               { display: flex; flex-wrap: wrap; gap: 1rem; }

/* === CARDS === */
.card                  { background: rgba(100,140,200,0.12); border: 1px solid rgba(148,163,184,0.15); border-radius: var(--radius); padding: 1.75rem; }
.card.alt              { background: rgba(34,197,94,0.15);   border-color: rgba(34,197,94,0.3); }
.card.gold             { background: rgba(212,175,55,0.15);  border-color: rgba(212,175,55,0.35); }
.card.red              { background: rgba(239,68,68,0.15);   border-color: rgba(239,68,68,0.3); }
.card-hover            { transition: transform 0.2s, box-shadow 0.2s; border-color: rgba(255,255,255,0.12); }
.card-hover:hover      { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

/* === BADGES === */
.badge                 { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; padding: 0.25rem 0.625rem; border-radius: 9999px; }
.badge.accent          { background: rgba(34,197,94,0.15); color: var(--accent); border: 1px solid rgba(34,197,94,0.3); }
.badge.gold            { background: rgba(212,175,55,0.15); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); }
.badge.red             { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.badge.blue            { background: rgba(96,165,250,0.15); color: #60a5fa; border: 1px solid rgba(96,165,250,0.3); }
.badge.muted           { background: rgba(100,116,139,0.15); color: var(--subtle); border: 1px solid rgba(100,116,139,0.3); }

/* === SPACING (from website) === */
.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;    }

/* ============================================================
   APP — Layout
   ============================================================ */

.app-shell             { display: flex; height: 100%; }

/* --- Centered column --- */
.app-column            { max-width: 52rem; margin: 0 auto; width: 100%; }

/* --- Top bar --- */
.vault-lock-banner     { background: rgba(239,68,68,0.15); border-bottom: 1px solid rgba(239,68,68,0.4); color: var(--red, #ef4444); padding: 0.6rem 1rem; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 0.8125rem; }
.topbar                { position: sticky; top: 0; z-index: 40; background: rgba(10,22,40,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 0 1rem; }
.topbar-inner          { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.topbar-logo           { font-family: var(--font-mono); font-weight: 700; font-size: 1.25rem; color: var(--text); line-height: 1; letter-spacing: -0.02em; }
.topbar-logo .n        { color: var(--accent); }
.topbar-links          { display: flex; align-items: center; gap: 1.25rem; font-size: 0.875rem; }
.topbar-links a,
.topbar-links button   { color: var(--muted); transition: color 0.15s; font-size: 0.875rem; }
.topbar-links a:hover,
.topbar-links button:hover { color: var(--text); }
.topbar-links a.topbar-active { color: var(--text); }
.topbar-lock           { color: var(--gold) !important; }

/* --- Toolbar (search + actions) --- */
.toolbar               { background: rgba(10,22,40,0.5); border-bottom: 1px solid var(--border); padding: 0.75rem 1rem; }
.toolbar-inner         { display: flex; align-items: center; gap: 0.75rem; }
.toolbar-search        { flex: 0 1 20rem; padding: 0.5rem 0.875rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); outline: none; transition: border-color 0.15s, box-shadow 0.15s; font-size: 0.875rem; }
.toolbar-search:focus  { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(74,222,128,0.15); }
.toolbar-search::placeholder { color: var(--subtle); }

/* --- Main area --- */
.main-area             { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.main-content          { flex: 1; overflow: hidden; display: flex; }

/* --- Split panes --- */
.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; }
.split-detail-empty    { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--subtle); font-size: 0.875rem; }

/* Active row in split list */
.entry-row.active      { background: rgba(74,222,128,0.08); border-right: 2px solid var(--accent); }

/* ============================================================
   APP — Entry List
   ============================================================ */

/* Stats bar (between toolbar and content) */
.list-stats            { padding: 0.5rem 1rem; background: rgba(10,22,40,0.6); border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.list-badge            { font-size: 0.75rem; font-weight: 600; font-family: var(--font-mono); color: var(--text); padding: 0.25rem 0.625rem; border-radius: var(--radius-sm); background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.06); white-space: nowrap; cursor: pointer; transition: opacity 0.15s; }
.list-badge:hover      { opacity: 0.8; }
.list-badge.active     { outline: 1.5px solid currentColor; outline-offset: 1px; }
.list-badge.type-credential { color: var(--accent); background: rgba(74,222,128,0.12); border-color: rgba(74,222,128,0.15); }
.list-badge.type-card       { color: var(--gold); background: rgba(212,175,55,0.12); border-color: rgba(212,175,55,0.15); }
.list-badge.type-note       { color: var(--muted); background: rgba(148,163,184,0.1); border-color: rgba(148,163,184,0.12); }
.list-badge.type-identity   { color: #60a5fa; background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.15); }
.list-badge.type-ssh_key    { color: var(--red); background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.15); }
.list-badge.type-totp       { color: #a855f7; background: rgba(168,85,247,0.12); border-color: rgba(168,85,247,0.15); }

.entry-row             { display: flex; align-items: center; gap: 0.875rem; padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; transition: background 0.15s, transform 0.15s; }
.entry-row:hover       { background: rgba(255,255,255,0.05); }
.entry-row:active      { transform: scale(0.995); }
.entry-icon            { width: 2.75rem; height: 1.375rem; border-radius: 0.25rem; background: rgba(100,140,200,0.12); display: flex; align-items: center; justify-content: center; font-size: 0.5rem; font-weight: 600; color: var(--muted); flex-shrink: 0; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; }
.entry-icon.type-credential { background: rgba(74,222,128,0.1); color: var(--accent); }
.entry-icon.type-card       { background: rgba(212,175,55,0.1); color: var(--gold); }
.entry-icon.type-identity   { background: rgba(96,165,250,0.1); color: #60a5fa; }
.entry-icon.type-note       { background: rgba(148,163,184,0.1); color: var(--muted); }
.entry-icon.type-ssh_key    { background: rgba(239,68,68,0.1); color: var(--red); }
.entry-icon.type-totp       { background: rgba(168,85,247,0.1); color: #a855f7; }
.entry-icon.type-folder     { background: rgba(212,175,55,0.1); color: var(--gold); }
.entry-domain          { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.entry-user            { color: var(--subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; }
.entry-user::before    { content: '·'; margin: 0 0.5rem; color: var(--subtle); }
.entry-l2              { flex-shrink: 0; }
.entry-empty           { text-align: center; color: var(--muted); padding: 5rem 1rem; }
.entry-empty-icon      { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.5; }

/* ============================================================
   APP — Entry Detail
   ============================================================ */

.detail-wrap           { max-width: 48rem; padding: var(--pad); }
.detail-header         { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.detail-back           { color: var(--muted); transition: color 0.15s; font-size: 0.875rem; display: inline-flex; align-items: center; gap: 0.375rem; }
.detail-back:hover     { color: var(--text); }
.detail-icon           { width: 3.25rem; height: 1.75rem; border-radius: 0.25rem; background: rgba(100,140,200,0.12); display: flex; align-items: center; justify-content: center; font-size: 0.625rem; font-weight: 600; color: var(--muted); flex-shrink: 0; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-icon.type-credential { background: rgba(74,222,128,0.1); color: var(--accent); }
.detail-icon.type-card       { background: rgba(212,175,55,0.1); color: var(--gold); }
.detail-icon.type-identity   { background: rgba(96,165,250,0.1); color: #60a5fa; }
.detail-icon.type-note       { background: rgba(148,163,184,0.1); color: var(--muted); }
.detail-icon.type-ssh_key    { background: rgba(239,68,68,0.1); color: var(--red); }
.detail-icon.type-totp       { background: rgba(168,85,247,0.1); color: #a855f7; }
.detail-icon.type-folder     { background: rgba(212,175,55,0.1); color: var(--gold); }
.detail-title          { font-size: 1.25rem; font-weight: 700; }
.detail-type           { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); }
.detail-urls           { background: rgba(100,140,200,0.08); border: 1px solid rgba(148,163,184,0.1); border-radius: var(--radius-sm); padding: 0.875rem; }
.detail-urls a         { color: var(--gold); display: block; font-size: 0.875rem; transition: color 0.15s; }
.detail-urls a:hover   { text-decoration: underline; opacity: 0.85; }
.detail-fields         { display: flex; flex-direction: column; gap: 0.5rem; }
.detail-actions        { display: flex; gap: 0.75rem; }

/* --- Field box --- */
.field-box             { background: rgba(100,140,200,0.08); border: 1px solid rgba(148,163,184,0.1); border-radius: var(--radius-sm); padding: 0.875rem; transition: border-color 0.15s; }
.field-box:hover       { border-color: rgba(148,163,184,0.25); }
.field-box.field-password { border-left: 3px solid var(--accent); }
.field-box.field-totp    { border-left: 3px solid #a855f7; }
.field-box.field-l2      { border-left: 3px solid var(--gold); }
.field-label           { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); margin-bottom: 0.375rem; display: flex; align-items: center; gap: 0.5rem; }
.field-value           { display: flex; align-items: center; gap: 0.5rem; }
.field-l2-locked       { color: var(--gold); font-style: italic; font-size: 0.875rem; }
.field-l2-toggle       { cursor: pointer; transition: opacity 0.15s; font-size: 0.625rem; }
.field-l2-toggle:hover { opacity: 0.7; }
.field-action          { color: var(--subtle); font-size: 0.75rem; cursor: pointer; transition: color 0.15s; background: none; border: none; padding: 0.25rem; border-radius: 0.25rem; }
.field-action:hover    { color: var(--text); background: rgba(255,255,255,0.05); }
.password-masked       { font-family: var(--font-mono); letter-spacing: 0.1em; color: var(--muted); }
.notes-box             { background: rgba(100,140,200,0.08); border: 1px solid rgba(148,163,184,0.1); border-radius: var(--radius-sm); padding: 0.875rem; white-space: pre-wrap; font-size: 0.875rem; color: var(--muted); line-height: 1.7; }
.notes-label           { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); margin-bottom: 0.375rem; }

/* ============================================================
   APP — Modal
   ============================================================ */

.modal-overlay         { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-box             { background: var(--surface); border: 1px solid rgba(148,163,184,0.15); border-radius: var(--radius); box-shadow: 0 25px 50px rgba(0,0,0,0.5); max-width: 42rem; width: calc(100% - 2rem); max-height: 90vh; overflow-y: auto; }
.modal-body            { padding: 1.75rem; }
.modal-title           { font-size: 1.125rem; font-weight: 700; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.modal-actions         { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

/* ============================================================
   APP — Forms
   ============================================================ */

.form-group            { margin-bottom: 1rem; }
.form-label            { display: block; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); margin-bottom: 0.375rem; }
.form-input,
.form-select,
.form-textarea         { width: 100%; padding: 0.5rem 0.75rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus   { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(74,222,128,0.1); }
.form-input-sm         { padding: 0.375rem 0.5rem; font-size: 0.8125rem; }
.form-row              { display: flex; gap: 0.5rem; align-items: flex-start; }

/* ============================================================
   APP — Drop Zone
   ============================================================ */

.drop-zone             { border: 2px dashed rgba(148,163,184,0.2); border-radius: var(--radius); padding: 2.5rem; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; background: rgba(100,140,200,0.04); }
.drop-zone:hover       { border-color: rgba(148,163,184,0.35); background: rgba(100,140,200,0.08); }
.drop-zone.active      { border-color: var(--gold); background: rgba(212,175,55,0.05); }
.drop-zone-icon        { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.7; }
.drop-zone-text        { color: var(--muted); font-size: 0.875rem; }
.drop-zone-hint        { color: var(--subtle); font-size: 0.75rem; margin-top: 0.5rem; }

/* ============================================================
   APP — QR Scanner & TOTP Import
   ============================================================ */

.import-divider          { display: flex; align-items: center; gap: 1rem; margin: 0.5rem 0; color: var(--subtle); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.import-divider::before,
.import-divider::after   { content: ''; flex: 1; height: 1px; background: rgba(148,163,184,0.15); }

.btn-qr-scan             { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.875rem; background: rgba(100,140,200,0.08); border: 1px solid rgba(100,140,200,0.2); border-radius: var(--radius); color: var(--text); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.btn-qr-scan:hover       { background: rgba(100,140,200,0.15); border-color: rgba(100,140,200,0.35); }
.btn-qr-scan svg         { opacity: 0.7; }

.qr-viewfinder           { position: relative; border-radius: var(--radius); 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: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.4); }
.qr-status               { text-align: center; padding: 0.75rem; font-size: 0.8rem; color: var(--muted); }

.totp-import-list        { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1rem; max-height: 300px; overflow-y: auto; }
.totp-import-item        { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: var(--radius); transition: opacity 0.2s; }
.totp-import-item.skipped { opacity: 0.35; }
.totp-import-info        { flex: 1; min-width: 0; }
.totp-import-name        { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.totp-import-sub         { font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.totp-tier-select        { display: flex; gap: 2px; flex-shrink: 0; }
.tier-btn                { padding: 0.2rem 0.55rem; font-size: 0.7rem; font-weight: 600; border: 1px solid rgba(148,163,184,0.15); border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; transition: all 0.15s; letter-spacing: 0.02em; }
.tier-btn:hover          { border-color: rgba(148,163,184,0.3); color: var(--text); }
.tier-btn.active         { background: rgba(100,140,200,0.15); border-color: rgba(100,140,200,0.4); color: var(--text); }
.tier-btn.tier-skip.active { background: rgba(148,163,184,0.08); border-color: rgba(148,163,184,0.2); color: var(--subtle); }

/* ============================================================
   APP — Live TOTP Code
   ============================================================ */

.totp-code               { font-family: 'JetBrains Mono', monospace; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.15em; color: var(--gold, #d4af37); }
.totp-countdown          { font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-left: 0.75rem; min-width: 2rem; }
.totp-countdown.totp-expiring { color: var(--red, #ef4444); 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; }

/* ============================================================
   APP — Import Preview
   ============================================================ */

.import-summary        { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; padding: 0.75rem; background: rgba(100,140,200,0.06); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.import-summary label  { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; }
.import-list           { max-height: 18rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.375rem; }
.import-item           { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 0.75rem; background: rgba(100,140,200,0.08); border: 1px solid rgba(148,163,184,0.08); border-radius: var(--radius-sm); transition: background 0.15s; }
.import-item:hover     { background: rgba(100,140,200,0.12); }
.import-item.faded     { opacity: 0.35; }
.import-item-title     { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

/* ============================================================
   APP — Onboarding / Unlock
   ============================================================ */

.onboard-wrap          { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.onboard-inner         { max-width: 28rem; width: 100%; }
.onboard-heading       { text-align: center; margin-bottom: 2rem; }
.onboard-heading h1    { margin-bottom: 0.5rem; }
.onboard-card          { background: rgba(100,140,200,0.08); border: 1px solid rgba(148,163,184,0.15); border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.5rem; }
.onboard-card h2       { margin-bottom: 0.5rem; }
.device-list           { display: flex; flex-direction: column; gap: 0.75rem; }
.device-option         { width: 100%; display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: var(--radius-sm); background: rgba(255,255,255,0.04); border: 1px solid var(--border); transition: border-color 0.2s, background 0.2s, transform 0.15s; cursor: pointer; text-align: left; }
.device-option:hover   { border-color: var(--accent); background: rgba(74,222,128,0.04); transform: translateY(-1px); }
.device-option-icon    { font-size: 1.5rem; width: 2.5rem; height: 2.5rem; text-align: center; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(100,140,200,0.1); border-radius: var(--radius-sm); }
.device-option strong  { display: block; color: var(--text); }
.device-option span    { color: var(--muted); font-size: 0.8125rem; }
.onboard-footer        { text-align: center; font-size: 0.75rem; color: var(--subtle); }

.unlock-wrap           { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.unlock-inner          { max-width: 24rem; width: 100%; text-align: center; }
.unlock-inner h1       { margin-bottom: 0.5rem; }

/* ============================================================
   APP — Toast
   ============================================================ */

.toast                 { position: fixed; top: 1rem; right: 1rem; padding: 0.75rem 1.25rem; border-radius: var(--radius-sm); z-index: 60; font-weight: 600; font-size: 0.875rem; animation: slideIn 0.3s ease; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.toast.success         { background: rgba(34,197,94,0.85); color: #fff; border: 1px solid rgba(34,197,94,0.5); }
.toast.error           { background: rgba(239,68,68,0.85); color: #fff; border: 1px solid rgba(239,68,68,0.5); }
@keyframes slideIn     { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================
   APP — Audit Table
   ============================================================ */

.audit-table           { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.audit-table th        { text-align: left; color: var(--subtle); padding: 0.5rem 0.75rem; font-weight: 600; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.audit-table td        { padding: 0.625rem 0.75rem; color: var(--muted); }
.audit-table tr + tr   { border-top: 1px solid rgba(255,255,255,0.04); }
.audit-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.audit-scroll          { max-height: 24rem; overflow-y: auto; }

/* ============================================================
   APP — Utilities
   ============================================================ */

.hidden                { display: none !important; }
.truncate              { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-gold             { color: var(--gold); }
.text-red              { color: var(--red); }
.text-accent           { color: var(--accent); }
.text-muted            { color: var(--muted); }
.text-subtle           { color: var(--subtle); }
.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; }

/* Alert boxes */
.alert                 { padding: 0.75rem; border-radius: var(--radius-sm); font-size: 0.8125rem; }
.alert-error           { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25); color: var(--red); }
.alert-warning         { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25); color: #f59e0b; }

/* ============================================================
   APP — Config Snippets (token page)
   ============================================================ */

.config-tabs           { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.config-tab            { padding: 0.5rem 1rem; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; color: var(--subtle); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.config-tab:hover      { color: var(--text); }
.config-tab.active     { color: var(--gold); border-bottom-color: var(--gold); }
.config-block          { position: relative; background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 1rem 1.25rem; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.65; color: var(--muted); overflow-x: auto; white-space: pre; }
.config-copy           { position: absolute; top: 0.5rem; right: 0.5rem; font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.625rem; border-radius: 0.25rem; background: rgba(255,255,255,0.08); color: var(--subtle); border: 1px solid var(--border); cursor: pointer; transition: color 0.15s, background 0.15s; }
.config-copy:hover     { color: var(--text); background: rgba(255,255,255,0.12); }

/* ============================================================
   APP — Scrollbar (subtle, matching dark theme)
   ============================================================ */
::-webkit-scrollbar         { width: 6px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: rgba(148,163,184,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.25); }

/* ============================================================
   SITE — Marketing / Landing Pages
   ============================================================ */
.site                  { min-height: 100vh; display: flex; flex-direction: column; }
.site-column           { max-width: 64rem; margin: 0 auto; width: 100%; padding: 0 1rem; }

/* Hero */
.hero                  { text-align: center; margin-bottom: 5rem; }
.hero-title            { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.03em; }
.hero-sub              { font-size: 1.125rem; color: var(--muted); max-width: 40rem; margin: 0 auto 2rem; line-height: 1.7; }
.hero-actions          { display: flex; gap: 1rem; justify-content: center; }

/* Features */
.features              { margin-bottom: 5rem; }
.feature-grid          { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem; }
.feature-card          { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.5rem; }
.feature-card h3       { font-size: 1rem; font-weight: 700; margin: 0.5rem 0; }
.feature-card p        { font-size: 0.875rem; color: var(--muted); line-height: 1.6; margin: 0; }
.feature-label         { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--subtle); }
.feature-label.accent  { color: var(--accent); }

/* How it works */
.how-it-works          { margin-bottom: 5rem; }
.how-it-works h2,
.l2-demo h2            { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.code-examples         { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem; }
.code-block            { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.code-label            { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; padding: 0.625rem 1rem; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border); color: var(--subtle); text-transform: uppercase; letter-spacing: 0.05em; }
.code-block pre        { margin: 0; padding: 1rem; overflow-x: auto; }
.code-block code       { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); line-height: 1.6; }

/* L2 demo */
.l2-demo               { margin-bottom: 5rem; }

/* Footer */
.site-footer           { margin-top: auto; padding: 2rem 1rem; border-top: 1px solid var(--border); }
.site-footer .site-column { display: flex; align-items: center; gap: 1.5rem; }
.footer-text           { font-size: 0.8125rem; color: var(--subtle); font-family: var(--font-mono); }

/* Small button variant */
.btn-sm                { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
