/* ═══════════════════════════════════════════════════════════════
   TU IA — Bank Statement Intelligence
   Design: Strict Black & White · Minimalist · Arial
   ═══════════════════════════════════════════════════════════════ */

/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:       #0a0a0a;
  --black-soft:  #1a1a1a;
  --black-mid:   #2c2c2c;
  --grey-dark:   #444444;
  --grey-mid:    #888888;
  --grey-light:  #bbbbbb;
  --grey-pale:   #e0e0e0;
  --grey-ghost:  #f0f0f0;
  --white-off:   #f8f8f8;
  --white:       #ffffff;

  --font-main:   'Arial', 'Helvetica Neue', Helvetica, sans-serif;
  --font-serif:  'DM Serif Display', Georgia, serif;
  --font-mono:   'DM Mono', 'Courier New', monospace;

  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   6px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);

  --transition:  0.18s ease;
  --border:      1px solid var(--grey-pale);
  --border-dark: 1px solid var(--grey-dark);
}

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

body {
  font-family: var(--font-main);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── TYPOGRAPHY ───────────────────────────────────────────── */
h1 { font-family: var(--font-serif); font-size: 2rem; font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 400; letter-spacing: -0.01em; }
h3 { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-dark); }
p  { font-size: 0.9rem; color: var(--grey-dark); }

.hidden { display: none !important; }

/* ─── HEADER ───────────────────────────────────────────────── */
.site-header {
  background: var(--black);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--black-soft);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: baseline; gap: 0.5rem; }
.brand-tu {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.03em;
}
.brand-ia {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--grey-light);
  letter-spacing: -0.03em;
}
.brand-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-left: 0.5rem;
}
.header-meta { display: flex; align-items: center; gap: 1rem; }
.trial-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border: 1px solid var(--grey-mid);
  color: var(--grey-light);
  border-radius: var(--radius-sm);
}
.header-disclaimer {
  font-size: 0.7rem;
  color: var(--grey-mid);
  letter-spacing: 0.02em;
}

/* ─── STEP NAV ─────────────────────────────────────────────── */
.step-nav {
  background: var(--white-off);
  border-bottom: var(--border);
  position: sticky;
  top: 56px;
  z-index: 90;
}
.step-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 0;
}
.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.2rem;
  height: 100%;
  cursor: default;
  opacity: 0.4;
  transition: opacity var(--transition);
}
.step.active { opacity: 1; }
.step.done   { opacity: 0.7; }
.step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--grey-mid);
}
.step.active .step-num { color: var(--black); }
.step-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.step-divider {
  width: 32px;
  height: 1px;
  background: var(--grey-pale);
  flex-shrink: 0;
}

/* ─── MAIN CONTENT ─────────────────────────────────────────── */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}
.app-step { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ─── STEP HEADER ──────────────────────────────────────────── */
.step-header { margin-bottom: 2rem; }
.step-title  { margin-bottom: 0.4rem; }
.step-subtitle { font-size: 0.88rem; color: var(--grey-mid); }

/* ─── UPLOAD ZONE ──────────────────────────────────────────── */
.upload-zone {
  border: 1.5px dashed var(--grey-pale);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  margin-bottom: 1.5rem;
  background: var(--white);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--black);
  background: var(--white-off);
}
.upload-icon { margin-bottom: 1rem; opacity: 0.7; }
.upload-primary {
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 0.4rem;
}
.upload-secondary {
  font-size: 0.78rem;
  color: var(--grey-mid);
  letter-spacing: 0.04em;
}
.link-btn {
  background: none;
  border: none;
  font: inherit;
  font-weight: 700;
  color: var(--black);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── FILE QUEUE ───────────────────────────────────────────── */
.file-queue {
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.file-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--white-off);
  border-bottom: var(--border);
}
.file-queue-header h3 { font-size: 0.75rem; }
.file-list { padding: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--white);
  border: var(--border);
  transition: background var(--transition);
}
.file-item:hover { background: var(--white-off); }
.file-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.file-icon.pdf  { background: var(--black); }
.file-icon.csv  { background: var(--black-mid); }
.file-icon.xlsx { background: var(--grey-dark); }
.file-info { flex: 1; min-width: 0; }
.file-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-meta { font-size: 0.72rem; color: var(--grey-mid); }
.file-status {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--grey-ghost);
  color: var(--grey-dark);
}
.file-status.ready   { background: var(--black); color: var(--white); }
.file-status.error   { background: var(--grey-dark); color: var(--white); }
.file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--grey-mid);
  font-size: 1rem;
  line-height: 1;
  padding: 2px 4px;
  transition: color var(--transition);
}
.file-remove:hover { color: var(--black); }

/* ─── FORMAT HINTS ─────────────────────────────────────────── */
.format-hints {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--white-off);
}
.format-hints h4 { margin-bottom: 0.75rem; }
.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem;
}
.format-item {
  font-size: 0.78rem;
  color: var(--grey-dark);
  padding: 0.4rem 0.6rem;
  border-left: 2px solid var(--grey-pale);
}

/* ─── BUTTONS ──────────────────────────────────────────────── */
.step-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: var(--border);
}
.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.primary-btn:hover:not(:disabled) { background: var(--black-mid); transform: translateY(-1px); }
.primary-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--black);
  border: var(--border-dark);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.ghost-btn:hover { background: var(--white-off); }

/* ─── PROCESSING ───────────────────────────────────────────── */
.processing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1.5rem;
}
.processing-animation {
  position: relative;
  width: 100px;
  height: 100px;
}
.proc-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--grey-pale);
  border-top-color: var(--black);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.proc-inner {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.proc-percent {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
}
.processing-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
}
.processing-sub { font-size: 0.85rem; color: var(--grey-mid); }
.processing-log {
  width: 100%;
  max-width: 480px;
  background: var(--white-off);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--grey-dark);
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.log-line { display: flex; gap: 0.75rem; }
.log-time { color: var(--grey-mid); flex-shrink: 0; }
.log-msg  { color: var(--black-mid); }

/* ─── ACCOUNT BAR ──────────────────────────────────────────── */
.account-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.account-card {
  flex: 1;
  min-width: 220px;
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  background: var(--white);
}
.account-card-bank {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-bottom: 0.25rem;
}
.account-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}
.account-card-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey-mid);
  margin-bottom: 0.75rem;
}
.account-card-balances {
  display: flex;
  gap: 1.5rem;
}
.bal-item label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-bottom: 2px;
}
.bal-item span {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
}

/* ─── KPI ROW ──────────────────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kpi-card {
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--black);
}
.kpi-card.income::before  { background: var(--black); }
.kpi-card.expense::before { background: var(--grey-dark); }
.kpi-card.neutral::before { background: var(--grey-light); }
.kpi-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-bottom: 0.4rem;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--black);
  line-height: 1.2;
}
.kpi-sub {
  font-size: 0.7rem;
  color: var(--grey-mid);
  margin-top: 0.25rem;
}

/* ─── CHARTS ───────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.chart-card {
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  background: var(--white);
}
.chart-title {
  font-size: 0.75rem;
  margin-bottom: 1rem;
  color: var(--black);
}
.chart-wrap {
  position: relative;
  height: 220px;
}

/* ─── TABS ─────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: var(--border);
  margin-bottom: 1.25rem;
  overflow-x: auto;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey-mid);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover  { color: var(--black); }
.tab-btn.active { color: var(--black); border-bottom-color: var(--black); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease; }

/* ─── TABLE TOOLBAR ────────────────────────────────────────── */
.table-toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 0.85rem;
  border: var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.82rem;
  background: var(--white);
  color: var(--black);
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--black); }
.filter-select {
  padding: 0.55rem 0.85rem;
  border: var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.82rem;
  background: var(--white);
  color: var(--black);
  outline: none;
  cursor: pointer;
  min-width: 140px;
}
.filter-select:focus { border-color: var(--black); }

/* ─── TABLES ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: var(--border); border-radius: var(--radius-lg); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
thead tr {
  background: var(--black);
  color: var(--white);
}
thead th {
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody tr {
  border-bottom: var(--border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--white-off); }
tbody td {
  padding: 0.6rem 0.85rem;
  color: var(--black-mid);
  vertical-align: middle;
}
.td-date    { font-family: var(--font-mono); font-size: 0.75rem; white-space: nowrap; }
.td-desc    { max-width: 280px; }
.td-desc-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 280px; }
.td-amount  { font-family: var(--font-mono); font-size: 0.82rem; text-align: right; white-space: nowrap; }
.td-debit   { color: var(--black); font-weight: 600; }
.td-credit  { color: var(--grey-dark); font-weight: 600; }
.td-balance { font-family: var(--font-mono); font-size: 0.78rem; text-align: right; color: var(--grey-mid); }
.td-category {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--grey-ghost);
  color: var(--grey-dark);
  white-space: nowrap;
  display: inline-block;
}
.td-bank {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--grey-mid);
  white-space: nowrap;
}
.tfoot-row { background: var(--white-off); font-weight: 700; }
.tfoot-row td { border-top: 2px solid var(--black); font-size: 0.82rem; }

/* ─── LEDGER SEARCH ────────────────────────────────────────── */
.ledger-search-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ledger-count {
  font-size: 0.75rem;
  color: var(--grey-mid);
  white-space: nowrap;
}

/* ─── LEDGER CARDS ─────────────────────────────────────────── */
#ledgerContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}
.ledger-card {
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}
.ledger-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.ledger-card-header {
  background: var(--black);
  color: var(--white);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ledger-party-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ledger-txn-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--grey-light);
}
.ledger-card-body { padding: 0.85rem 1rem; background: var(--white); }
.ledger-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.ledger-stat label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-bottom: 2px;
}
.ledger-stat span {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
}
.ledger-card-footer {
  padding: 0.6rem 1rem;
  background: var(--white-off);
  border-top: var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ledger-category-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-mid);
}
.ledger-view-btn {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── RECONCILIATION ───────────────────────────────────────── */
.recon-table-wrap { margin-bottom: 1.5rem; }
.recon-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.recon-status.ok     { color: var(--black); }
.recon-status.ok::before     { content: '✓'; }
.recon-status.error  { color: var(--grey-dark); }
.recon-status.error::before  { content: '✗'; }

/* ─── TAX CARDS ────────────────────────────────────────────── */
.tax-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.tax-card {
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  background: var(--white);
}
.tax-card-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-bottom: 0.5rem;
}
.tax-card-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 0.25rem;
}
.tax-card-note {
  font-size: 0.72rem;
  color: var(--grey-mid);
}

/* ─── REPORT SECTIONS ──────────────────────────────────────── */
.report-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: var(--border);
}
.report-section:last-of-type { border-bottom: none; }
.report-section-title {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--black);
}
.pl-table, .bs-table, .tax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}
.pl-table th, .bs-table th, .tax-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--white-off);
  border-bottom: 2px solid var(--black);
}
.pl-table td, .bs-table td, .tax-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: var(--border);
  color: var(--black-mid);
}
.pl-table tr.section-head td {
  font-weight: 700;
  background: var(--white-off);
  color: var(--black);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pl-table tr.total-row td {
  font-weight: 700;
  border-top: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
  background: var(--black);
  color: var(--white);
  font-family: var(--font-mono);
}
.pl-table tr.subtotal-row td {
  font-weight: 700;
  border-top: var(--border-dark);
  background: var(--grey-ghost);
}
.amount-col { text-align: right; font-family: var(--font-mono); }

/* ─── TAX SUGGESTIONS ──────────────────────────────────────── */
.suggestion-list { display: flex; flex-direction: column; gap: 0.75rem; }
.suggestion-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
}
.suggestion-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--grey-mid);
  flex-shrink: 0;
  padding-top: 2px;
}
.suggestion-content h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.25rem;
  text-transform: none;
  letter-spacing: 0;
}
.suggestion-content p {
  font-size: 0.78rem;
  color: var(--grey-dark);
  line-height: 1.5;
}
.suggestion-saving {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--black);
  margin-top: 0.25rem;
}

/* ─── EXPORT PANEL ─────────────────────────────────────────── */
.export-panel {
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  background: var(--white);
}
.export-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}
.export-sub {
  font-size: 0.8rem;
  color: var(--grey-mid);
  margin-bottom: 1.5rem;
}
.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.export-group h4 { margin-bottom: 0.6rem; }
.export-btns { display: flex; flex-direction: column; gap: 0.4rem; }
.export-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border: var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--black);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  text-align: left;
}
.export-btn:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.export-icon { font-size: 0.85rem; }

/* ─── FOOTER DISCLAIMER ────────────────────────────────────── */
.footer-disclaimer {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--white-off);
}
.footer-disclaimer p {
  font-size: 0.75rem;
  color: var(--grey-dark);
  line-height: 1.6;
}
.footer-disclaimer strong { color: var(--black); }

/* ─── TOAST ────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--black);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
  pointer-events: auto;
  max-width: 320px;
}
.toast.success { background: var(--black); }
.toast.error   { background: var(--grey-dark); }
.toast.info    { background: var(--black-mid); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── MODAL ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: var(--border);
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--white);
}
.modal-close {
  background: none;
  border: none;
  color: var(--grey-light);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--white); }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ─── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--white-off); }
::-webkit-scrollbar-thumb { background: var(--grey-pale); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey-mid); }

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-content { padding: 1.5rem 1rem 3rem; }
  .header-inner { padding: 0 1rem; }
  .header-disclaimer { display: none; }
  .brand-tagline { display: none; }
  .step-nav-inner { padding: 0 1rem; }
  .step-label { display: none; }
  .charts-row { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .export-grid { grid-template-columns: 1fr; }
  #ledgerContainer { grid-template-columns: 1fr; }
  .tax-cards { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr; }
  .tax-cards { grid-template-columns: 1fr; }
  .step-actions { flex-direction: column; align-items: stretch; }
  .primary-btn, .ghost-btn { justify-content: center; }
}

/* ─── PRINT ────────────────────────────────────────────────── */
@media print {
  .site-header, .step-nav, .step-actions, .export-panel,
  .tab-bar, .table-toolbar { display: none !important; }
  .app-step { display: block !important; }
  body { font-size: 11px; }
}

/* ─── UTILITY ──────────────────────────────────────────────── */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-mono   { font-family: var(--font-mono); }
.text-muted  { color: var(--grey-mid); }
.text-bold   { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--grey-mid);
  font-size: 0.85rem;
}
.empty-state-icon { font-size: 2rem; margin-bottom: 0.75rem; opacity: 0.4; }
.divider {
  border: none;
  border-top: var(--border);
  margin: 1.5rem 0;
}
.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--grey-ghost);
  color: var(--grey-dark);
}
.badge.dr { background: var(--black); color: var(--white); }
.badge.cr { background: var(--grey-ghost); color: var(--black); }