/* ══════════════════════════════════════════════
   FinTrack  |  style.css
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --p:       #6366f1;
  --p2:      #818cf8;
  --green:   #10b981;
  --red:     #ef4444;
  --amber:   #f59e0b;
  --cyan:    #06b6d4;
  --pink:    #ec4899;

  --bg:      #09090b;
  --bg2:     #111116;
  --bg3:     #18181e;
  --bg4:     #232329;
  --bg5:     #2e2e36;
  --text:    #f4f4f5;
  --text2:   #a1a1aa;
  --text3:   #52525b;
  --border:  rgba(255,255,255,.07);
  --border2: rgba(255,255,255,.12);
  --radius:  12px;
  --font:    'Inter', system-ui, sans-serif;
  --trans:   all .2s cubic-bezier(.4,0,.2,1);
  --shadow:  0 20px 60px rgba(0,0,0,.5);
  --shadow-sm: 0 4px 16px rgba(0,0,0,.3);
}

body.light {
  --bg:      #f5f5f7;
  --bg2:     #ffffff;
  --bg3:     #f0f0f3;
  --bg4:     #e8e8ed;
  --bg5:     #dcdce3;
  --text:    #18181b;
  --text2:   #52525b;
  --text3:   #a1a1aa;
  --border:  rgba(0,0,0,.07);
  --border2: rgba(0,0,0,.12);
  --shadow:  0 20px 60px rgba(0,0,0,.12);
  --shadow-sm: 0 4px 16px rgba(0,0,0,.08);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .25s, color .25s;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); color: inherit; }
select, input { font-family: var(--font); }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 3px; }

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(9,9,11,.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
body.light .header { background: rgba(245,245,247,.9); }

.header-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 20px; height: 60px;
  display: flex; align-items: center; gap: 16px;
}

.logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 1.15rem; font-weight: 800;
  color: var(--text); flex-shrink: 0;
  transition: opacity .2s;
}
.logo:hover { opacity: .8; }

.nav-tabs {
  display: flex; gap: 2px; flex: 1; overflow-x: auto;
  margin-left: 16px;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px;
  font-size: .83rem; font-weight: 600; color: var(--text2);
  transition: var(--trans); white-space: nowrap; flex-shrink: 0;
}
.nav-btn svg { opacity: .7; }
.nav-btn:hover { color: var(--text); background: var(--bg3); }
.nav-btn.active { color: var(--text); background: rgba(99,102,241,.15); }
.nav-btn.active svg { opacity: 1; color: var(--p); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.currency-select {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 8px;
  padding: 5px 10px; font-size: .78rem; font-weight: 600;
  outline: none; cursor: pointer; transition: var(--trans);
}
.currency-select:hover { border-color: var(--border2); }

.icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); transition: var(--trans); flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--border2); }

.hamburger { display: none; flex-direction: column; gap: 4px; }
.hamburger span {
  display: block; width: 16px; height: 1.5px;
  background: var(--text2); border-radius: 1px; transition: var(--trans);
}
.hamburger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-nav {
  display: flex; overflow-x: auto; gap: 4px;
  padding: 8px 16px 10px;
  border-top: 1px solid var(--border);
}
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav-btn {
  padding: 7px 14px; border-radius: 8px; flex-shrink: 0;
  font-size: .82rem; font-weight: 600; color: var(--text2);
  transition: var(--trans);
}
.mobile-nav-btn:hover { color: var(--text); background: var(--bg3); }
.mobile-nav-btn.active { color: var(--text); background: rgba(99,102,241,.15); color: var(--p2); }

/* ══════════════════════════════════════════════
   MAIN
══════════════════════════════════════════════ */
.main-container {
  max-width: 1400px; margin: 0 auto;
  padding: 28px 20px 80px;
}

.tab-content { display: none; animation: fadeUp .35s ease both; }
.tab-content.active { display: block; }

@keyframes fadeUp {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:none; }
}

/* ══════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 16px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
  transition: var(--trans);
  animation: fadeUp .4s ease both;
  animation-delay: var(--delay, 0s);
  cursor: default;
}
.stat-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.income-card  .stat-icon { background: rgba(16,185,129,.12); color: var(--green); }
.expense-card .stat-icon { background: rgba(239,68,68,.12);  color: var(--red); }
.balance-card .stat-icon { background: rgba(99,102,241,.12); color: var(--p); }
.savings-card .stat-icon { background: rgba(245,158,11,.12); color: var(--amber); }

.stat-body { flex: 1; min-width: 0; }
.stat-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 4px; }
.stat-value { font-size: 1.55rem; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.stat-sub   { font-size: .75rem; color: var(--text3); font-weight: 500; }

.income-card  .stat-value { color: var(--green); }
.expense-card .stat-value { color: var(--red); }
.balance-card .stat-value { color: var(--p2); }
.savings-card .stat-value { color: var(--amber); }

/* ══════════════════════════════════════════════
   INSIGHTS BAR
══════════════════════════════════════════════ */
.insights-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.insight-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--bg2); border: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; color: var(--text2);
}
.insight-chip svg { color: var(--p); flex-shrink: 0; }

/* ══════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════ */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .2s;
  animation: fadeUp .4s ease both;
}
.card:hover { border-color: var(--border2); }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.card-header h2 {
  font-size: 1.05rem; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
.card-header h3 { font-size: 1rem; font-weight: 700; }

.text-link {
  font-size: .82rem; font-weight: 700; color: var(--p2);
  transition: color .15s;
}
.text-link:hover { color: var(--p); }

/* ══════════════════════════════════════════════
   CHARTS
══════════════════════════════════════════════ */
.charts-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 16px;
}

.chart-card { position: relative; }
.chart-wrap { position: relative; }
canvas { max-width: 100%; height: auto !important; display: block; }

.chart-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 50px 20px; color: var(--text3); text-align: center;
}
.chart-empty p { font-size: .85rem; }

/* ══════════════════════════════════════════════
   RECENT TRANSACTIONS LIST
══════════════════════════════════════════════ */
.recent-list { display: flex; flex-direction: column; gap: 8px; }

.recent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 8px;
  background: var(--bg3); border: 1px solid transparent;
  transition: var(--trans);
}
.recent-item:hover { border-color: var(--border); }

.recent-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; flex-shrink: 0;
  background: var(--bg4);
}
.recent-body { flex: 1; min-width: 0; }
.recent-cat { font-size: .88rem; font-weight: 700; }
.recent-desc { font-size: .75rem; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-amount { font-size: .95rem; font-weight: 800; flex-shrink: 0; }
.recent-amount.income  { color: var(--green); }
.recent-amount.expense { color: var(--red); }

/* ══════════════════════════════════════════════
   TRANSACTION FORM
══════════════════════════════════════════════ */
.transactions-layout {
  display: grid; grid-template-columns: 340px 1fr; gap: 16px;
}
.form-card { height: fit-content; position: sticky; top: 76px; }

.transaction-form { display: flex; flex-direction: column; gap: 14px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .78rem; font-weight: 700; color: var(--text2); }

.form-group input,
.form-group select {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px;
  padding: 10px 12px; font-size: .88rem;
  outline: none; transition: var(--trans);
  min-height: 42px;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.form-group input::placeholder { color: var(--text3); }

/* type toggle */
.type-toggle { display: flex; gap: 6px; }
.type-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px; border-radius: 8px;
  font-size: .82rem; font-weight: 700;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); transition: var(--trans);
}
.type-btn:hover { color: var(--text); border-color: var(--border2); }
.type-btn.active.income-btn  { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3); color: var(--green); }
.type-btn.active.expense-btn { background: rgba(239,68,68,.12);  border-color: rgba(239,68,68,.3);  color: var(--red); }

/* checkbox */
.checkbox-row { flex-direction: row; align-items: center; }
.checkbox-label {
  display: flex; align-items: center; gap: 10px;
  font-size: .85rem; font-weight: 500; color: var(--text2); cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px; min-height: unset;
  padding: 0; accent-color: var(--p); cursor: pointer;
}
.checkmark { display: none; }

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px; border-radius: 8px;
  background: var(--p); color: #fff;
  font-size: .88rem; font-weight: 700;
  transition: var(--trans); width: 100%;
}
.btn-primary:hover { background: var(--p2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,.35); }
.btn-primary:active { transform: none; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); font-size: .85rem; font-weight: 600;
  transition: var(--trans);
}
.btn-secondary:hover { color: var(--text); border-color: var(--border2); }

.btn-sm { width: auto; padding: 7px 14px; font-size: .78rem; }

/* ══════════════════════════════════════════════
   TRANSACTIONS LIST
══════════════════════════════════════════════ */
.transactions-card { min-height: 400px; }

.filter-bar {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.search-wrap {
  flex: 1; min-width: 180px;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 0 12px;
  transition: var(--trans);
}
.search-wrap:focus-within { border-color: var(--p); }
.search-wrap svg { color: var(--text3); flex-shrink: 0; }
.search-wrap input {
  background: none; border: none; outline: none;
  color: var(--text); font-size: .85rem; width: 100%;
  padding: 9px 0;
}
.search-wrap input::placeholder { color: var(--text3); }

.filter-select {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 8px;
  padding: 8px 10px; font-size: .82rem; font-weight: 600;
  outline: none; cursor: pointer; transition: var(--trans);
}
.filter-select:hover { border-color: var(--border2); }

.tx-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: rgba(99,102,241,.15); color: var(--p2);
  font-size: .72rem; font-weight: 800;
}

.transactions-list-wrap { max-height: 620px; overflow-y: auto; }
.tx-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.tx-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px; border-radius: 8px;
  background: var(--bg3); border: 1px solid transparent;
  transition: var(--trans); animation: fadeUp .3s ease both;
}
.tx-item:hover { border-color: var(--border); }

.tx-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
  background: var(--bg4);
}
.tx-info { flex: 1; min-width: 0; }
.tx-cat  { font-size: .88rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tx-desc { font-size: .75rem; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recurring-tag {
  font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(245,158,11,.12); color: var(--amber);
  border: 1px solid rgba(245,158,11,.2);
}
.tx-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tx-amount { font-size: .95rem; font-weight: 800; min-width: 75px; text-align: right; }
.tx-amount.income  { color: var(--green); }
.tx-amount.expense { color: var(--red); }

.tx-date { font-size: .72rem; color: var(--text3); text-align: right; }

.tx-actions { display: flex; gap: 4px; }
.tx-action-btn {
  width: 30px; height: 30px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); transition: var(--trans);
  background: transparent;
}
.tx-action-btn:hover.edit  { color: var(--p2);  background: rgba(99,102,241,.12); }
.tx-action-btn:hover.del   { color: var(--red);  background: rgba(239,68,68,.1); }

/* ══════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 50px 20px; color: var(--text3); text-align: center;
}
.empty-state h3 { font-size: 1rem; font-weight: 700; color: var(--text2); }
.empty-state p  { font-size: .85rem; }

/* ══════════════════════════════════════════════
   BUDGETS
══════════════════════════════════════════════ */
.budgets-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.budget-item {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px;
  transition: var(--trans);
}
.budget-item:hover { border-color: var(--border2); }

.budget-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.budget-cat {
  display: flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 700;
}
.budget-emoji {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg4); display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.budget-del {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); transition: var(--trans);
}
.budget-del:hover { color: var(--red); background: rgba(239,68,68,.1); }

.budget-nums {
  display: flex; justify-content: space-between;
  font-size: .8rem; font-weight: 600; color: var(--text2);
  margin-bottom: 8px;
}
.budget-pct { font-weight: 800; }

.budget-bar {
  height: 7px; border-radius: 4px;
  background: var(--bg5); overflow: hidden; margin-bottom: 8px;
}
.budget-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--p), var(--p2));
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.budget-item.over .budget-bar-fill { background: linear-gradient(90deg, var(--red), #f87171); }

.budget-status {
  font-size: .75rem; font-weight: 600;
}
.budget-status.ok   { color: var(--green); }
.budget-status.warn { color: var(--amber); }
.budget-status.over { color: var(--red); }

/* ══════════════════════════════════════════════
   REPORTS
══════════════════════════════════════════════ */
.reports-topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.reports-topbar h2 { font-size: 1.3rem; font-weight: 800; }
.report-actions { display: flex; gap: 8px; align-items: center; }

.reports-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 16px;
}
.reports-grid .card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 16px; }

.monthly-summary { overflow-x: auto; }
.summary-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.summary-table th,
.summary-table td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--border); }
.summary-table th { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); text-align: left; background: none; }
.summary-table td:first-child { text-align: left; font-weight: 600; }
.summary-table tr:hover td { background: var(--bg3); }

/* ══════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════ */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal.hidden { display: none; }

.modal-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
}

.modal-box {
  position: relative; z-index: 1;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; width: min(440px, 100%);
  box-shadow: var(--shadow);
  animation: modalIn .28s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes modalIn {
  from { opacity:0; transform:scale(.92) translateY(16px); }
  to   { opacity:1; transform:none; }
}

.modal-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-topbar h3 { font-size: 1rem; font-weight: 800; }

.modal-form { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-actions { display: flex; gap: 8px; }
.modal-actions .btn-primary,
.modal-actions .btn-secondary { flex: 1; width: auto; }

/* Quick-add form */
.quick-form {
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.quick-input {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px;
  padding: 10px 12px; font-size: .95rem; font-family: var(--font);
  outline: none; transition: var(--trans); width: 100%;
}
.quick-input:focus { border-color: var(--p); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.quick-input::placeholder { color: var(--text3); }

.quick-form select {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 8px;
  padding: 10px 12px; font-size: .88rem; font-family: var(--font);
  outline: none; transition: var(--trans); flex: 1;
}
.quick-form input[type="date"] {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 8px;
  padding: 10px 12px; font-size: .88rem; font-family: var(--font);
  outline: none; transition: var(--trans); flex: 1;
}
.quick-form .form-row { display: flex; gap: 8px; }

/* ══════════════════════════════════════════════
   FAB
══════════════════════════════════════════════ */
.fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 300;
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--p); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(99,102,241,.45);
  transition: var(--trans);
}
.fab:hover { background: var(--p2); transform: translateY(-3px) scale(1.05); }
.fab:active { transform: scale(.95); }

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
.toast-wrap {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; gap: 8px;
  z-index: 9999; pointer-events: none;
}
.toast {
  background: var(--bg4); color: var(--text);
  padding: 10px 18px; border-radius: 8px;
  font-size: .85rem; font-weight: 600;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
  animation: toastIn .22s ease;
}
.toast.out { animation: toastOut .22s ease forwards; }
.toast.success svg { color: var(--green); }
.toast.danger  svg { color: var(--red); }
@keyframes toastIn  { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@keyframes toastOut { to   { opacity:0; transform:translateY(8px); } }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-tabs { display: none; }
  .hamburger { display: flex; }
  .charts-grid  { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
  .transactions-layout { grid-template-columns: 1fr; }
  .form-card { position: static; }
}

@media (max-width: 600px) {
  .header-inner { padding: 0 12px; gap: 8px; }
  .main-container { padding: 16px 12px 80px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 1.2rem; }
  .card { padding: 16px; }
  .filter-bar { flex-direction: column; }
  .filter-bar .search-wrap { min-width: unset; }
  .form-row { grid-template-columns: 1fr; }
  .fab { bottom: 20px; right: 16px; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .currency-select { display: none; }
}
