/* ============================================================
   CloserArena — Transcript Vault Design System
   vault.css
============================================================ */

:root {
  --bg:        #08080b;
  --bg-2:      #0e0e13;
  --bg-3:      #141419;
  --bg-4:      #1a1a22;
  --border:    rgba(255,255,255,0.07);
  --border-2:  rgba(255,255,255,0.12);
  --text:      #f0f0f4;
  --text-2:    #b0b3bd;
  --text-3:    #6b6e7a;
  --accent:    #2f6bff;
  --accent-2:  rgba(47,107,255,0.12);
  --green:     #34d399;
  --green-2:   rgba(52,211,153,0.12);
  --amber:     #fbbf24;
  --amber-2:   rgba(251,191,36,0.12);
  --red:       #f87171;
  --red-2:     rgba(248,113,113,0.12);
  --vault:     #a78bfa;
  --vault-2:   rgba(167,139,250,0.12);
  --radius:    6px;
  --radius-lg: 10px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:      'SF Mono', 'Fira Mono', 'Consolas', monospace;
  --nav-h:     56px;
}

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

html { font-size: 14px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbars ─── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 2px; }

/* ─── Utility ─── */
.accent { color: var(--accent); }
.green  { color: var(--green); }
.amber  { color: var(--amber); }
.red    { color: var(--red); }
.blue   { color: #60a5fa; }


/* ============================================================
   TOP NAV
============================================================ */
.vn {
  position: sticky;
  top: 0;
  z-index: 200;
  min-height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  height: auto;
  background: rgba(8,8,11,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0) max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  gap: 16px;
}

.vn-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.vn-back {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-3);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.15s;
  white-space: nowrap;
}
.vn-back:hover { color: var(--text-2); }
.vn-back-icon { font-size: 0.9rem; }

.vn-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.vn-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}
.vn-icon {
  color: var(--vault);
  font-size: 1.1rem;
  line-height: 1;
}
.vn-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.vn-tabs {
  display: flex;
  gap: 2px;
}

.vn-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--text-3);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.vn-tab:hover { background: var(--bg-3); color: var(--text-2); }
.vn-tab.active { background: var(--vault-2); color: var(--vault); }
.vn-tab-icon { font-size: 0.75rem; opacity: 0.7; }

.vn-right {
  display: flex;
  align-items: center;
}

.vn-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 12px;
}
.vn-stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.vn-stat-num {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
}
.vn-stat-num.accent { color: var(--vault); }
.vn-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 500;
}
.vn-stat-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
}


/* ============================================================
   QUOTA WARNING BAR
============================================================ */
.quota-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 190;
  background: rgba(251,191,36,0.12);
  border-bottom: 1px solid rgba(251,191,36,0.25);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--amber);
}
.quota-icon { font-size: 0.85rem; }
.quota-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--amber);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background 0.1s;
}
.quota-dismiss:hover { background: rgba(251,191,36,0.15); }


/* ============================================================
   VAULT SCREENS
============================================================ */
.vault-screen {
  display: none;
  min-height: calc(100vh - var(--nav-h));
}
.vault-screen.active { display: block; }

.screen-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.screen-header {
  margin-bottom: 28px;
}
.screen-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 6px;
}
.screen-sub {
  font-size: 0.88rem;
  color: var(--text-3);
  line-height: 1.5;
}


/* ============================================================
   UPLOAD TAB
============================================================ */
.drop-zone {
  border: 2px dashed rgba(167,139,250,0.3);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  padding: 48px 24px;
  text-align: center;
  transition: all 0.2s;
  cursor: default;
  margin-bottom: 20px;
}
.drop-zone.drag-over {
  border-color: var(--vault);
  background: var(--vault-2);
  transform: scale(1.005);
}
.drop-zone-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.drop-icon {
  font-size: 2.5rem;
  color: var(--vault);
  line-height: 1;
}
.drop-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.drop-sub { font-size: 0.8rem; color: var(--text-3); }
.drop-browse-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--vault-2);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: var(--radius);
  color: var(--vault);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}
.drop-browse-btn:hover { background: rgba(167,139,250,0.2); border-color: var(--vault); }
.drop-limit { font-size: 0.73rem; color: var(--text-3); }

/* Prepare / normalize / compress */
.vault-prep-panel {
  margin: 0 0 20px;
  padding: 16px 18px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.vault-prep-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.vault-prep-icon {
  font-size: 1.25rem;
  color: var(--vault);
  line-height: 1;
  flex-shrink: 0;
}
.vault-prep-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.vault-prep-sub {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
  margin: 0;
}
.vault-prep-sub strong { color: var(--text-2); font-weight: 600; }
.vault-prep-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.45;
  cursor: pointer;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.vault-prep-row:hover { background: rgba(167,139,250,0.06); }
.vault-prep-row input {
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--vault);
}
.vault-prep-row strong { color: var(--text); font-weight: 600; }

/* Paste section */
.paste-section { margin-bottom: 24px; }
.paste-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  user-select: none;
  transition: color 0.15s;
}
.paste-toggle:hover { color: var(--text-2); }
.paste-toggle-icon {
  font-size: 1rem;
  color: var(--vault);
  font-weight: 700;
  line-height: 1;
}
.paste-body { margin-top: 10px; }
.paste-input {
  width: 100%;
  height: 140px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.15s;
}
.paste-input:focus { outline: none; border-color: var(--vault); }
.paste-meta-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.paste-meta-field {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  padding: 8px 12px;
  min-width: 0;
}
.paste-meta-field:focus { outline: none; border-color: var(--vault); }
.btn-paste-add {
  padding: 8px 18px;
  background: var(--vault-2);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: var(--radius);
  color: var(--vault);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-paste-add:hover { background: rgba(167,139,250,0.2); }

/* Upload queue */
.upload-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.upload-queue-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.upload-queue-actions { display: flex; gap: 8px; }

.btn-tag-all, .btn-clear-queue {
  padding: 5px 12px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-tag-all {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-tag-all:hover { border-color: var(--border-2); color: var(--text); }
.btn-clear-queue {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-3);
}
.btn-clear-queue:hover { border-color: var(--border); color: var(--text-2); }

/* Bulk tag panel */
.bulk-tag-panel {
  background: var(--bg-2);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.bulk-tag-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--vault);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bulk-tag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.bulk-tag-label {
  font-size: 0.76rem;
  color: var(--text-3);
  font-weight: 500;
  white-space: nowrap;
}
.bulk-tag-select, .bulk-tag-input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.78rem;
  padding: 5px 10px;
  min-width: 120px;
}
.bulk-tag-select:focus, .bulk-tag-input:focus { outline: none; border-color: var(--vault); }
.btn-bulk-apply {
  padding: 5px 14px;
  background: var(--vault-2);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: var(--radius);
  color: var(--vault);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-bulk-apply:hover { background: rgba(167,139,250,0.2); }

/* Upload list items */
.upload-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }

.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: border-color 0.15s;
}
.upload-item.status-error { border-color: rgba(248,113,113,0.3); }
.upload-item.status-done  { border-color: rgba(52,211,153,0.2); }
.upload-item.status-parsing { opacity: 0.7; }

.upload-item-icon {
  font-size: 0.9rem;
  color: var(--text-3);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.upload-item-name {
  flex: 1;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-item-meta {
  font-size: 0.73rem;
  color: var(--text-3);
  font-family: var(--mono);
  white-space: nowrap;
}
.upload-item-status {
  font-size: 0.73rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.upload-item-status.s-parsing { background: var(--amber-2); color: var(--amber); }
.upload-item-status.s-ready   { background: var(--green-2); color: var(--green); }
.upload-item-status.s-error   { background: var(--red-2); color: var(--red); }

.upload-item-tag-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.upload-item-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 0.73rem;
  padding: 3px 7px;
}
.upload-item-select:focus { outline: none; border-color: var(--vault); }

.upload-item-remove {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 4px;
  border-radius: 3px;
  flex-shrink: 0;
  transition: all 0.1s;
}
.upload-item-remove:hover { background: var(--red-2); color: var(--red); }

/* CTA row */
.upload-cta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.btn-save-all, .btn-analyse-all {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 14px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  text-align: center;
}
.btn-save-all {
  background: var(--vault-2);
  border: 1px solid rgba(167,139,250,0.3);
  color: var(--vault);
}
.btn-save-all:hover { background: rgba(167,139,250,0.2); transform: translateY(-1px); }
.btn-save-all span:first-child, .btn-analyse-all span:first-child {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.btn-sub {
  font-size: 0.72rem;
  color: inherit;
  opacity: 0.6;
}
.btn-analyse-all {
  background: var(--green-2);
  border: 1px solid rgba(52,211,153,0.3);
  color: var(--green);
}
.btn-analyse-all:hover { background: rgba(52,211,153,0.2); transform: translateY(-1px); }

/* Upload empty state */
.upload-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-3);
}
.upload-empty-icon { font-size: 2rem; color: var(--bg-4); margin-bottom: 12px; }
.upload-empty-title { font-size: 1rem; font-weight: 600; color: var(--text-3); margin-bottom: 6px; }
.upload-empty-sub { font-size: 0.82rem; line-height: 1.5; }


/* ============================================================
   LIBRARY TAB
============================================================ */
.lib-summary {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 20px;
}
.lib-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.lib-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text);
  line-height: 1;
}
.lib-stat-val.green { color: var(--green); }
.lib-stat-val.amber { color: var(--amber); }
.lib-stat-key { font-size: 0.72rem; color: var(--text-3); font-weight: 500; }
.lib-stat-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}
.lib-analyse-btn-wrap {
  margin-left: auto;
  padding-left: 20px;
}
.btn-analyse-pending {
  padding: 8px 16px;
  background: var(--green-2);
  border: 1px solid rgba(52,211,153,0.3);
  border-radius: var(--radius);
  color: var(--green);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-analyse-pending:hover { background: rgba(52,211,153,0.2); }

/* Filters */
.lib-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.lib-search {
  flex: 1;
  min-width: 160px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  padding: 7px 12px;
  transition: border-color 0.15s;
}
.lib-search:focus { outline: none; border-color: var(--vault); }
.lib-filter-sel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 0.78rem;
  padding: 7px 10px;
  cursor: pointer;
}
.lib-filter-sel:focus { outline: none; border-color: var(--vault); }
.lib-sort-wrap { display: flex; align-items: center; gap: 6px; }
.lib-sort-label { font-size: 0.75rem; color: var(--text-3); font-weight: 500; white-space: nowrap; }

.btn-lib-delete-sel {
  padding: 6px 12px;
  background: var(--red-2);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius);
  color: var(--red);
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-lib-delete-sel:hover { background: rgba(248,113,113,0.2); }

/* Library table */
.lib-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
}
.lib-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.lib-table thead tr {
  border-bottom: 1px solid var(--border);
}
.lib-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  white-space: nowrap;
}
.lib-th-check { width: 36px; text-align: center; }
.lib-table th input[type="checkbox"],
.lib-table td input[type="checkbox"] { cursor: pointer; accent-color: var(--vault); }
.lib-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.lib-table tbody tr:last-child { border-bottom: none; }
.lib-table tbody tr:hover { background: var(--bg-3); }
.lib-table td {
  padding: 10px 14px;
  color: var(--text-2);
  vertical-align: middle;
}
.lib-td-name {
  font-weight: 500;
  color: var(--text) !important;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lib-td-score {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.88rem;
}
.lib-score-high { color: var(--green); }
.lib-score-mid  { color: var(--amber); }
.lib-score-low  { color: var(--red); }
.lib-score-none { color: var(--text-3); }

.lib-badge {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}
.lib-badge-calltype { background: var(--bg-4); color: var(--text-2); }
.lib-badge-won      { background: var(--green-2); color: var(--green); }
.lib-badge-lost     { background: var(--red-2); color: var(--red); }
.lib-badge-followup { background: var(--amber-2); color: var(--amber); }
.lib-badge-unknown  { background: var(--bg-4); color: var(--text-3); }

.lib-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
}
.lib-status-dot::before {
  content: '●';
  font-size: 0.55rem;
}
.lib-status-done     { color: var(--green); }
.lib-status-pending  { color: var(--text-3); }
.lib-status-analysing{ color: var(--amber); }
.lib-status-error    { color: var(--red); }

.lib-btn-analyse {
  padding: 4px 10px;
  background: var(--green-2);
  border: 1px solid rgba(52,211,153,0.25);
  border-radius: 4px;
  color: var(--green);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}
.lib-btn-analyse:hover { background: rgba(52,211,153,0.2); }
.lib-btn-view {
  padding: 4px 10px;
  background: var(--vault-2);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 4px;
  color: var(--vault);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}
.lib-btn-view:hover { background: rgba(167,139,250,0.2); }

.lib-empty {
  text-align: center;
  padding: 48px;
  color: var(--text-3);
}
.lib-empty-icon { font-size: 1.8rem; margin-bottom: 10px; opacity: 0.3; }
.lib-empty p { font-size: 0.85rem; }


/* ============================================================
   PROGRESS TAB
============================================================ */
.progress-empty {
  text-align: center;
  padding: 80px 24px;
}
.progress-empty-icon { font-size: 2.5rem; color: var(--bg-4); margin-bottom: 16px; }
.progress-empty-title { font-size: 1.1rem; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.progress-empty-sub { font-size: 0.85rem; color: var(--text-3); margin-bottom: 20px; }
.btn-go-upload {
  padding: 9px 20px;
  background: var(--vault-2);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: var(--radius);
  color: var(--vault);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-go-upload:hover { background: rgba(167,139,250,0.2); }

/* Overview panel */
.prog-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.prog-ov-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.prog-ov-card.warning { border-color: rgba(248,113,113,0.2); }
.prog-ov-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.prog-ov-score {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.prog-ov-score.small { font-size: 1.3rem; }
.prog-ov-score.red { color: var(--red); }
.prog-ov-sub { font-size: 0.75rem; color: var(--text-3); }

/* Charts */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.chart-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.chart-card.wide { margin-bottom: 16px; }
.chart-card-header { margin-bottom: 16px; }
.chart-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.chart-card-sub {
  font-size: 0.72rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-canvas-wrap { height: 260px; position: relative; }
.chart-canvas-wrap.short { height: 180px; }
.chart-canvas-wrap canvas { width: 100% !important; height: 100% !important; }

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-dot.amber { background: var(--amber); }
.legend-dot.green { background: var(--green); }

/* Habits */
.habits-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.habit-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.habit-panel.bad  { border-color: rgba(248,113,113,0.15); }
.habit-panel.good { border-color: rgba(52,211,153,0.15); }
.habit-panel-header { margin-bottom: 14px; }
.habit-panel-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.habit-icon { font-size: 0.8rem; font-weight: 700; }
.habit-panel-sub { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }

.habit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.habit-item:last-child { border-bottom: none; }
.habit-rank {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-3);
  width: 16px;
  flex-shrink: 0;
  padding-top: 2px;
}
.habit-text {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.4;
}
.habit-count {
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--mono);
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}
.habit-panel.bad .habit-count { background: var(--red-2); color: var(--red); }
.habit-panel.good .habit-count { background: var(--green-2); color: var(--green); }
.habit-empty {
  font-size: 0.8rem;
  color: var(--text-3);
  padding: 12px 0;
  text-align: center;
}

/* Failure patterns */
.failure-patterns {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.failure-patterns-header { margin-bottom: 16px; }
.failure-patterns-title { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.failure-patterns-sub { font-size: 0.72rem; color: var(--text-3); }
.failure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.failure-pattern-item {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.fp-stage {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber);
  margin-bottom: 4px;
}
.fp-text { font-size: 0.78rem; color: var(--text-2); line-height: 1.4; }
.fp-count { font-size: 0.7rem; color: var(--text-3); margin-top: 5px; font-family: var(--mono); }
.failure-empty { font-size: 0.82rem; color: var(--text-3); padding: 8px 0; }

/* Timeline */
.timeline-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.timeline-header { margin-bottom: 16px; }
.timeline-title { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.timeline-sub { font-size: 0.72rem; color: var(--text-3); }
.timeline-list { display: flex; flex-direction: column; gap: 6px; }

.timeline-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.timeline-item:hover { border-color: var(--border-2); background: var(--bg-4); }
.timeline-score {
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--mono);
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}
.timeline-info { flex: 1; min-width: 0; }
.timeline-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline-detail { font-size: 0.72rem; color: var(--text-3); margin-top: 1px; }
.timeline-badges { display: flex; gap: 5px; flex-shrink: 0; }
.timeline-empty { font-size: 0.82rem; color: var(--text-3); padding: 12px 0; text-align: center; }


/* ============================================================
   EXPORT TAB
============================================================ */
.export-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.export-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.export-card.danger { border-color: rgba(248,113,113,0.2); }
.export-card-icon {
  font-size: 1.5rem;
  color: var(--vault);
  line-height: 1;
}
.export-card-icon.red { color: var(--red); }
.export-card-title { font-size: 0.92rem; font-weight: 700; color: var(--text); }
.export-card-desc { font-size: 0.8rem; color: var(--text-3); line-height: 1.55; flex: 1; }
.export-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  gap: 10px;
}
.export-stat { font-size: 0.75rem; color: var(--text-3); font-family: var(--mono); }

.btn-export {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-export:hover { border-color: var(--border-2); color: var(--text); }
.btn-export.accent {
  background: var(--green-2);
  border-color: rgba(52,211,153,0.3);
  color: var(--green);
}
.btn-export.accent:hover { background: rgba(52,211,153,0.2); }
.btn-export.danger {
  background: var(--red-2);
  border-color: rgba(248,113,113,0.3);
  color: var(--red);
}
.btn-export.danger:hover { background: rgba(248,113,113,0.2); }

/* Storage meter */
.storage-meter {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
}
.storage-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.storage-meter-label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.storage-meter-val { font-size: 0.78rem; font-family: var(--mono); color: var(--text-3); }
.storage-meter-bar-bg {
  height: 6px;
  background: var(--bg-4);
  border-radius: 3px;
  overflow: hidden;
}
.storage-meter-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--vault);
  transition: width 0.4s ease;
}


/* ============================================================
   ANALYSIS MODAL
============================================================ */
.analysis-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
}
.am-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.am-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(820px, 100vw);
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Modal header */
.am-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
  flex-shrink: 0;
}
.am-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.am-score-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.am-score-ring {
  transform: rotate(-90deg);
  width: 64px;
  height: 64px;
}
.am-ring-bg {
  fill: none;
  stroke: var(--bg-4);
  stroke-width: 5;
}
.am-ring-fill {
  fill: none;
  stroke: var(--vault);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s;
}
.am-score-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text);
}
.am-filename {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  word-break: break-all;
}
.am-meta-row { display: flex; gap: 6px; flex-wrap: wrap; }
.am-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}
.am-badge.calltype { background: var(--bg-4); color: var(--text-2); }
.am-badge.outcome  { background: var(--amber-2); color: var(--amber); }
.am-badge.grade    { background: var(--vault-2); color: var(--vault); }

.am-header-right {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}
.am-priority-box {
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  max-width: 260px;
}
.am-priority-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber);
  margin-bottom: 4px;
}
.am-priority-text {
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.45;
}
.am-close-btn {
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-3);
  font-size: 1.1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  flex-shrink: 0;
}
.am-close-btn:hover { background: var(--red-2); border-color: rgba(248,113,113,0.3); color: var(--red); }

/* Modal tabs */
.am-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
  flex-shrink: 0;
  padding: 0 24px;
}
.am-tab {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.am-tab:hover { color: var(--text-2); }
.am-tab.active { color: var(--vault); border-bottom-color: var(--vault); }

/* Modal body / panes */
.am-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.am-pane { display: none; }
.am-pane.active { display: block; }

/* Overview pane */
.am-narrative {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--vault);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 16px;
}
.am-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.am-metric {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}
.am-metric-val {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
}
.am-metric-key { font-size: 0.68rem; color: var(--text-3); font-weight: 500; }
.am-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.am-section { }
.am-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.am-section-title.green { color: var(--green); }
.am-section-title.blue  { color: #60a5fa; }
.am-strength-item, .am-insight-item {
  padding: 9px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.am-strength-moment { font-size: 0.78rem; color: var(--text-2); font-style: italic; margin-bottom: 3px; }
.am-strength-why    { font-size: 0.73rem; color: var(--green); }
.am-insight-label   { font-size: 0.7rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; margin-bottom: 2px; }
.am-insight-text    { font-size: 0.78rem; color: var(--text-2); line-height: 1.4; }
.am-principle-box {
  background: var(--bg-3);
  border: 1px solid rgba(167,139,250,0.2);
  border-left: 3px solid var(--vault);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.am-principle-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; color: var(--vault); margin-bottom: 4px; }
.am-principle-text  { font-size: 0.82rem; color: var(--text); font-weight: 500; line-height: 1.4; }

/* Failures pane */
.am-failures-intro { font-size: 0.78rem; color: var(--text-3); margin-bottom: 14px; }
.am-failure-item {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.am-failure-stage {
  display: inline-flex;
  padding: 1px 6px;
  background: var(--amber-2);
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.am-failure-moment {
  font-size: 0.82rem;
  color: var(--text);
  font-style: italic;
  margin-bottom: 6px;
  padding: 6px 10px;
  background: var(--bg-4);
  border-radius: 4px;
  border-left: 2px solid var(--red);
}
.am-failure-what  { font-size: 0.78rem; color: var(--red); font-weight: 500; margin-bottom: 3px; }
.am-failure-why   { font-size: 0.76rem; color: var(--text-3); margin-bottom: 8px; line-height: 1.45; }
.am-failure-fix-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; color: var(--green); margin-bottom: 4px; }
.am-failure-fix {
  font-size: 0.78rem;
  color: var(--green);
  padding: 6px 10px;
  background: var(--green-2);
  border-radius: 4px;
  border-left: 2px solid var(--green);
  line-height: 1.4;
}
.am-no-failures { font-size: 0.85rem; color: var(--green); padding: 16px 0; }

/* Objections pane */
.am-obj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.am-obj-col-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.am-obj-col-title.amber { color: var(--amber); }
.am-obj-col-title.green { color: var(--green); }
.am-obj-col-title.red   { color: var(--red); }
.am-obj-item {
  font-size: 0.78rem;
  color: var(--text-2);
  padding: 7px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 5px;
  line-height: 1.4;
}
.am-closing-box {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.am-closing-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.am-closing-text  { font-size: 0.82rem; color: var(--text-2); line-height: 1.5; }

/* Habits pane */
.am-habits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.am-habits-col-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.am-habits-col-title.red   { color: var(--red); }
.am-habits-col-title.green { color: var(--green); }
.am-habit-item {
  font-size: 0.78rem;
  color: var(--text-2);
  padding: 8px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 5px;
  line-height: 1.4;
}

/* Scorecard pane */
.am-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.am-sc-item {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}
.am-sc-name  { font-size: 0.68rem; color: var(--text-3); font-weight: 500; margin-bottom: 6px; line-height: 1.3; }
.am-sc-score {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--mono);
  line-height: 1;
  margin-bottom: 4px;
}
.am-sc-bar-bg {
  height: 3px;
  background: var(--bg-4);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.am-sc-bar-fill { height: 100%; border-radius: 2px; transition: width 0.4s; }
.am-scorecard-chart-wrap { height: 280px; position: relative; }
.am-scorecard-chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* Modal footer */
.am-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-3);
  flex-shrink: 0;
}
.am-btn-reanalyse, .am-btn-delete, .am-btn-print {
  padding: 7px 14px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}
.am-btn-reanalyse {
  background: var(--vault-2);
  border: 1px solid rgba(167,139,250,0.3);
  color: var(--vault);
}
.am-btn-reanalyse:hover { background: rgba(167,139,250,0.2); }
.am-btn-delete {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-3);
}
.am-btn-delete:hover { background: var(--red-2); border-color: rgba(248,113,113,0.3); color: var(--red); }
.am-btn-print {
  margin-left: auto;
  background: var(--green-2);
  border: 1px solid rgba(52,211,153,0.3);
  color: var(--green);
}
.am-btn-print:hover { background: rgba(52,211,153,0.2); }


/* ============================================================
   BATCH ANALYSIS PROGRESS OVERLAY
============================================================ */
.analysis-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.apo-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 320px;
  padding: 40px;
}
.apo-icon {
  font-size: 2.5rem;
  color: var(--vault);
  animation: apo-pulse 1.8s ease-in-out infinite;
}
@keyframes apo-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.92); }
}
.apo-title { font-size: 1.1rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.apo-sub   { font-size: 0.78rem; color: var(--text-3); }
.apo-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-4);
  border-radius: 2px;
  overflow: hidden;
}
.apo-progress-fill {
  height: 100%;
  background: var(--vault);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.apo-count { font-size: 0.78rem; color: var(--text-3); font-family: var(--mono); }


/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
  .prog-overview { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .habits-row { grid-template-columns: 1fr; }
  .export-grid { grid-template-columns: 1fr; }
  .am-panel { width: 100vw; }
  .am-two-col { grid-template-columns: 1fr; }
  .am-metrics-row { grid-template-columns: repeat(2, 1fr); }
  .am-obj-grid { grid-template-columns: 1fr; }
  .am-scorecard-grid { grid-template-columns: repeat(2, 1fr); }
  .am-priority-box { display: none; }
}
@media (max-width: 600px) {
  /* Nav wraps: logo row + full-width horizontal scroll tabs (never hide tabs on phone) */
  .vn {
    flex-wrap: wrap;
    height: auto;
    min-height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
    padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
    gap: 8px;
    align-items: center;
  }
  .vn-left { flex: 1 1 auto; min-width: 0; }
  .vn-right {
    flex: 0 0 auto;
    margin-left: auto;
  }
  .vn-tabs {
    order: 3;
    flex: 1 1 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding: 6px 0 10px;
    margin: 0 -4px;
    border-top: 1px solid var(--border);
    scrollbar-width: none;
  }
  .vn-tabs::-webkit-scrollbar { display: none; }
  .vn-tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  .vn-stat-row { padding: 4px 8px; gap: 6px; }
  .vn-stat-num { font-size: 0.85rem; }
  .screen-inner {
    padding: 20px max(16px, env(safe-area-inset-right, 0px)) max(48px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }
  .prog-overview { grid-template-columns: 1fr 1fr; }
  .am-scorecard-grid { grid-template-columns: repeat(2, 1fr); }
  .lib-filters { gap: 6px; flex-wrap: wrap; }
}

/* ============================================================
   PRINT STYLES (for report export)
============================================================ */
@media print {
  .vn, .vault-tabs, .analysis-modal { display: none !important; }
  body { background: #fff; color: #000; }
  .vault-screen { display: block !important; }
}

/* === Closing Arena logo lockup (bundled; mirrors ca-logo.css) === */
.ca-logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.ca-logo-lockup .ca-logo-icon {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.ca-logo-text {
  font-family: system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.ca-logo-closing {
  color: #f0f0f4;
}

.ca-logo-arena {
  color: #2166e8;
}

.ca-logo-lockup--nav .ca-logo-icon {
  width: 38px;
  height: 38px;
}

.ca-logo-lockup--nav .ca-logo-text {
  font-size: 1.28rem;
}

.ca-logo-lockup--sm .ca-logo-icon {
  width: 28px;
  height: 28px;
}

.ca-logo-lockup--sm .ca-logo-text {
  font-size: 1rem;
}

.ca-logo-lockup--tight {
  gap: 8px;
}

.ca-logo-lockup--tight .ca-logo-icon {
  width: 24px;
  height: 24px;
}

.ca-logo-lockup--tight .ca-logo-text {
  font-size: 0.95rem;
}

.ca-logo-lockup--card .ca-logo-icon {
  width: 34px;
  height: 34px;
}

.ca-logo-lockup--auth .ca-logo-icon {
  width: 36px;
  height: 36px;
}

.ca-logo-lockup--auth-lg .ca-logo-icon {
  width: 40px;
  height: 40px;
}
