/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
  --bg:         #0f0f0f;
  --bg2:        #161616;
  --bg3:        #1e1e1e;
  --surface:    #1a1a1a;
  --surface2:   #242424;
  --border:     rgba(255,255,255,0.07);
  --border2:    rgba(255,255,255,0.12);
  --gold:       #c9a84c;
  --gold-light: #e2c97e;
  --gold-dim:   rgba(201,168,76,0.15);
  --rose:       #e06c75;
  --rose-dim:   rgba(224,108,117,0.15);
  --sage:       #6aaf8a;
  --sage-dim:   rgba(106,175,138,0.15);
  --sky:        #5c9fc7;
  --lavender:   #9d7cd8;
  --peach:      #d4956a;
  --text:       #e8e3d8;
  --text2:      #9a9284;
  --text3:      #5e5952;
  --sidebar-w:  220px;
  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.6);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono:    'DM Mono', monospace;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

[data-theme="light"] {
  --bg:         #f5f2ec;
  --bg2:        #ede9e0;
  --bg3:        #e4dfd4;
  --surface:    #fff;
  --surface2:   #f9f7f2;
  --border:     rgba(0,0,0,0.07);
  --border2:    rgba(0,0,0,0.12);
  --gold:       #a07828;
  --gold-light: #c9a84c;
  --gold-dim:   rgba(160,120,40,0.1);
  --rose:       #c0454e;
  --rose-dim:   rgba(192,69,78,0.1);
  --sage:       #3a7f59;
  --sage-dim:   rgba(58,127,89,0.1);
  --text:       #1a1612;
  --text2:      #6b6058;
  --text3:      #a09488;
  --shadow:     0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.15);
}

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition), background var(--transition);
}

.sidebar-logo {
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--text);
}

.sidebar-nav {
  flex: 1;
  padding: 1.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text2);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  position: relative;
}

.nav-item .nav-icon {
  font-size: 0.9rem;
  width: 1.2rem;
  text-align: center;
}

.nav-item:hover {
  color: var(--text);
  background: var(--border);
}

.nav-item.active {
  color: var(--gold);
  background: var(--gold-dim);
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}

.sidebar-footer {
  padding: 1.25rem 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.role-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text3);
  display: block;
  margin-bottom: 0.35rem;
}

.role-switcher select,
.filter-select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239a9284'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 1.8rem;
  transition: border-color var(--transition);
}

.role-switcher select:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--gold);
}

.theme-btn {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}

.theme-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ─── MOBILE HEADER ──────────────────────────────────────── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 1rem;
  z-index: 200;
  gap: 1rem;
}

.hamburger {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
}

.mobile-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  flex: 1;
}

.mobile-role select {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 0.35rem 1.5rem 0.35rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%239a9284'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  cursor: pointer;
}

/* ─── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding: 2rem 2.5rem;
  max-width: 1400px;
}

/* ─── PAGES ──────────────────────────────────────────────── */
.page { display: none; animation: fadeUp 0.35s ease; }
.page.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.header-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text3);
  text-align: right;
  line-height: 1.6;
}

/* ─── SUMMARY CARDS ──────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card--balance {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--surface) 60%, var(--gold-dim));
  border-color: rgba(201,168,76,0.2);
}

.card-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--text3);
  display: block;
  margin-bottom: 0.6rem;
}

.card-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.card--balance .card-amount { font-size: 2.6rem; color: var(--gold-light); }

.card-sub {
  font-size: 0.78rem;
  color: var(--text2);
}

.card-sub.positive { color: var(--sage); }
.card-sub.negative { color: var(--rose); }

.card-icon {
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  font-size: 1.5rem;
  color: var(--sage);
  opacity: 0.6;
}

.expense-icon { color: var(--rose); }

.card-sparkline {
  margin-top: 0.75rem;
  height: 48px;
}

.savings-bar-wrap {
  margin-top: 0.85rem;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.savings-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}

/* ─── CHARTS ─────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: background var(--transition);
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.chart-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--text3);
  margin-bottom: 0.3rem;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text2);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.chart-wrap {
  height: 220px;
  position: relative;
}

.donut-wrap { height: 180px; }

.donut-legend {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text2);
}

.donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.donut-legend-label { flex: 1; }

.donut-legend-pct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text3);
}

.view-all {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-decoration: none;
  transition: opacity var(--transition);
}

.view-all:hover { opacity: 0.7; }

/* ─── TRANSACTION LIST ───────────────────────────────────── */
.tx-list { display: flex; flex-direction: column; }

.tx-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.tx-item:last-child { border-bottom: none; }

.tx-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.tx-icon.income { background: var(--sage-dim); color: var(--sage); }
.tx-icon.expense { background: var(--rose-dim); color: var(--rose); }

.tx-info { flex: 1; min-width: 0; }

.tx-desc {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-meta {
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 0.15rem;
}

.tx-category {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--surface2);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--text2);
  flex-shrink: 0;
}

.tx-amount {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: right;
  flex-shrink: 0;
}

.tx-amount.income { color: var(--sage); }
.tx-amount.expense { color: var(--rose); }

/* ─── FILTERS BAR ────────────────────────────────────────── */
.filters-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 0.75rem 0.55rem 2.2rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color var(--transition);
}

.search-input::placeholder { color: var(--text3); }
.search-input:focus { outline: none; border-color: var(--gold); }

.filters-bar .filter-select {
  width: auto;
  min-width: 130px;
  padding: 0.55rem 1.8rem 0.55rem 0.75rem;
  border-radius: var(--radius);
  background-color: var(--surface);
}

/* ─── TRANSACTIONS TABLE ─────────────────────────────────── */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tx-table {
  width: 100%;
  border-collapse: collapse;
}

.tx-table thead tr {
  border-bottom: 1px solid var(--border);
}

.tx-table th {
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text3);
  font-weight: 500;
}

.tx-table td {
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.tx-table tbody tr:hover td { background: var(--surface2); }
.tx-table tbody tr:last-child td { border-bottom: none; }

.type-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.type-badge.income { background: var(--sage-dim); color: var(--sage); }
.type-badge.expense { background: var(--rose-dim); color: var(--rose); }

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text3);
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text3);
}

.empty-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.empty-sub { font-size: 0.78rem; margin-top: 0.25rem; }

.action-btns { display: flex; gap: 0.5rem; }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 0.3rem 0.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all var(--transition);
}

.btn-icon:hover { border-color: var(--gold); color: var(--gold); }
.btn-icon.delete:hover { border-color: var(--rose); color: var(--rose); }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn-primary {
  background: var(--gold);
  color: #0f0f0f;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ─── INSIGHTS ───────────────────────────────────────────── */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.35s ease;
}

.insight-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  opacity: 0;
  transition: opacity var(--transition);
}

.insight-card:hover::before { opacity: 1; }

.insight-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold-light);
  margin: 0.5rem 0 0.25rem;
  line-height: 1;
}

.insight-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--text3);
}

.insight-desc {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ─── CATEGORY TABLE ─────────────────────────────────────── */
.category-table { display: flex; flex-direction: column; gap: 0; }

.cat-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.cat-row:last-child { border-bottom: none; }

.cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.cat-name { flex: 1; font-size: 0.875rem; }

.cat-bar-wrap {
  width: 120px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.cat-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.cat-amount {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  width: 80px;
  text-align: right;
}

.cat-pct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text3);
  width: 40px;
  text-align: right;
}

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  transition: color var(--transition);
}

.modal-close:hover { color: var(--text); }

.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text3);
}

.form-group input,
.form-group select {
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239a9284'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 2rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ─── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  z-index: 1000;
  animation: slideIn 0.25s ease;
  border-left: 3px solid var(--gold);
}

/* ─── UTILITIES ──────────────────────────────────────────── */
.hidden { display: none !important; }
.admin-only { }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .card--balance { grid-column: span 2; }
  .charts-row { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .mobile-header { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    top: 56px;
    z-index: 150;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content {
    margin-left: 0;
    padding: 1rem 1rem 1rem;
    padding-top: 72px;
  }
  .cards-grid { grid-template-columns: 1fr; }
  .card--balance { grid-column: span 1; }
  .page-title { font-size: 1.7rem; }
  .card-amount { font-size: 1.5rem; }
  .card--balance .card-amount { font-size: 2rem; }
  .insight-grid { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; }
  .search-wrap { min-width: 100%; }
  .tx-table th:nth-child(3),
  .tx-table td:nth-child(3) { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .charts-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .tx-table th:nth-child(4),
  .tx-table td:nth-child(4) { display: none; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
