:root {
  color-scheme: light;
  --bg: #0b1120;
  --panel: #0f172a;
  --card: rgba(255, 255, 255, 0.93);
  --glass: rgba(15, 23, 42, 0.65);
  --text: #0f172a;
  --text-dark: #e2e8f0;
  --muted: #94a3b8;
  --primary: #6366f1;
  --primary-strong: #4f46e5;
  --accent: #22c55e;
  --danger: #dc2626;
  --warning: #f97316;
  --border: rgba(148, 163, 184, 0.35);
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-xs: 8px;
}

* {
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1e293b 0%, #0b1120 45%, #020617 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(99, 102, 241, 0.35), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.25), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(34, 197, 94, 0.2), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Layout ───────────────────────────────────────────────────────────────── */

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 258px 1fr;
  min-height: 100vh;
  z-index: 1;
}

.side-panel {
  background: var(--glass);
  color: var(--text-dark);
  backdrop-filter: blur(18px);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.main-panel {
  padding: 28px clamp(20px, 3vw, 48px) 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-x: hidden;
}

/* ─── Brand ────────────────────────────────────────────────────────────────── */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  flex-shrink: 0;
}

.brand-name {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-size: 11px;
  margin: 0 0 4px;
}

/* ─── Navigation ───────────────────────────────────────────────────────────── */

.side-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dark);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}

/* ─── Account Switcher Panel ───────────────────────────────────────────────── */

.account-switcher-panel {
  background: rgba(15, 23, 42, 0.55);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.active-account-display {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 14px;
}

.account-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Side CTA ─────────────────────────────────────────────────────────────── */

.side-cta {
  background: rgba(15, 23, 42, 0.55);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  margin-top: auto;
}

.side-cta h3 {
  margin: 0;
  color: var(--text-dark);
}

/* ─── Top Bar ──────────────────────────────────────────────────────────────── */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  color: var(--text-dark);
}

.header-intro h1 {
  margin: 10px 0 8px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.subhead {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  font-size: 12px;
  font-weight: 600;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #86efac;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.header-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-dark);
  font-size: 12px;
  font-weight: 600;
}

.chip.highlight {
  background: rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.search-field {
  background: rgba(15, 23, 42, 0.65);
  border-radius: 999px;
  padding: 8px 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  align-items: center;
}

.search-field input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-dark);
  font-size: 14px;
  width: 180px;
}

.search-field input::placeholder {
  color: var(--muted);
}

/* ─── Currency Selector ──────────────────────────────────────────────────────── */

.currency-selector {
  display: flex;
  align-items: center;
}

.currency-selector select {
  background: rgba(15, 23, 42, 0.65);
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.currency-selector select:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(15, 23, 42, 0.75);
}

.currency-selector select:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.currency-selector select option {
  background: var(--panel);
  color: var(--text-dark);
  padding: 8px;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */

button {
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button.primary {
  background: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

button.ghost {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--text-dark);
}

button.ghost:hover {
  background: rgba(148, 163, 184, 0.1);
  transform: translateY(-1px);
}

button.ghost-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.icon-btn {
  background: transparent;
  border: none;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.15s, background 0.15s;
}

.icon-btn:hover {
  opacity: 1;
  background: rgba(148, 163, 184, 0.15);
  transform: none;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
}

/* ─── Profile Chip ─────────────────────────────────────────────────────────── */

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  cursor: pointer;
  transition: border-color 0.2s;
}

.profile-chip:hover {
  border-color: rgba(99, 102, 241, 0.5);
}

.profile-name {
  margin: 0;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 600;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  color: #0f172a;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* ─── Dashboard Grid ───────────────────────────────────────────────────────── */

.dashboard {
  display: contents;
}

.section-view {
  display: none;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.section-view.active {
  display: grid;
}

/* ─── Cards ────────────────────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.7);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

/* ─── Summary Grid ─────────────────────────────────────────────────────────── */

.summary-grid {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.summary-grid > div {
  padding: 4px 0;
}

.label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 600;
}

.summary-grid h2 {
  margin: 0 0 4px;
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.trend {
  color: #475569;
  font-size: 13px;
  margin: 4px 0 0;
}

.trend.positive {
  color: var(--accent);
}

.trend.negative {
  color: var(--warning);
}

/* ─── Chart Card ───────────────────────────────────────────────────────────── */

.chart-card {
  grid-column: span 7;
}

.chart-card-pie {
  grid-column: span 5;
}

.chart-container {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0));
  border-radius: var(--radius-sm);
  padding: 16px 8px 8px;
  position: relative;
}

.chart-container canvas {
  max-height: 220px;
}

.chart-container-pie canvas {
  max-height: 200px;
}

.chart-type-tabs {
  display: flex;
  gap: 4px;
}

.chart-tab {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
  border: 1px solid transparent;
}

.chart-tab.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-strong);
  border-color: rgba(99, 102, 241, 0.3);
}

.legend {
  display: flex;
  gap: 16px;
  font-size: 13px;
  margin-top: 12px;
  color: #475569;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.legend-dot.income {
  background: var(--primary-strong);
}

.legend-dot.expense {
  background: var(--warning);
}

/* ─── Budget Categories ────────────────────────────────────────────────────── */

.categories-card {
  grid-column: span 5;
}

.category-list {
  display: grid;
  gap: 14px;
  max-height: 260px;
  overflow-y: auto;
}

.category {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-lg {
  height: 12px;
}

.progress {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ─── Transactions Table ───────────────────────────────────────────────────── */

.transactions-card {
  grid-column: span 7;
}

.table {
  display: grid;
  gap: 4px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.8fr 1.1fr 1fr 0.9fr auto;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 13px;
  align-items: center;
}

.table-header {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.amount {
  text-align: right;
  font-weight: 700;
}

.negative-amount {
  color: var(--warning);
  font-weight: 700;
}

.row-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.15s;
}

.table-row:hover .row-actions {
  opacity: 1;
}

.empty-row {
  grid-template-columns: 1fr;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.category-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--badge-color, #94a3b8) 15%, transparent);
  color: color-mix(in srgb, var(--badge-color, #475569) 80%, #0f172a);
}

/* ─── Monthly Card ─────────────────────────────────────────────────────────── */

.monthly-card {
  grid-column: span 5;
}

.monthly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.monthly-grid h4 {
  margin: 4px 0 2px;
  font-size: 15px;
  font-weight: 700;
}

.positive {
  color: var(--accent);
}

.negative {
  color: var(--danger);
}

/* ─── Section Views (non-overview) ────────────────────────────────────────── */

.section-header-row {
  grid-column: span 12;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.section-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-dark);
}

/* ─── Budgets Grid ─────────────────────────────────────────────────────────── */

.budgets-grid {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.budget-detail-card {
  display: grid;
  gap: 10px;
}

.budget-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.budget-card-top h4 {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.budget-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.budget-actions {
  display: flex;
  gap: 2px;
}

.budget-amounts {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #475569;
}

.budget-remaining {
  font-size: 12px;
  margin: 0;
}

/* ─── Subscriptions ────────────────────────────────────────────────────────── */

.subs-summary-row {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.sub-stat {
  text-align: center;
}

.sub-stat h3 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.subs-list {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.sub-card {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-left: 4px solid transparent;
  overflow: hidden;
  position: relative;
}

.sub-color-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.sub-content {
  flex: 1;
  display: grid;
  gap: 8px;
}

.sub-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sub-main h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.sub-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}

.sub-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.sub-actions {
  display: flex;
  gap: 4px;
}

/* ─── Savings Goals ────────────────────────────────────────────────────────── */

.savings-grid {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.savings-card {
  display: grid;
  gap: 12px;
}

.savings-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.savings-card-top h4 {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.savings-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.savings-actions {
  display: flex;
  gap: 2px;
}

.savings-amounts {
  font-size: 22px;
  font-weight: 700;
}

.savings-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

/* ─── Accounts Grid ────────────────────────────────────────────────────────── */

.accounts-grid {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.account-card {
  display: grid;
  gap: 12px;
  transition: border-color 0.2s;
}

.account-card-active {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15), var(--shadow);
}

.account-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.account-info {
  flex: 1;
}

.account-info h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
}

.account-balance {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.account-stats {
  font-size: 12px;
}

.account-card-actions {
  display: flex;
  gap: 4px;
}

.active-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 700;
}

/* ─── Account Switcher Modal List ──────────────────────────────────────────── */

.account-switcher-list {
  display: grid;
  gap: 8px;
  padding: 16px 24px;
}

.account-switcher-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}

.account-switcher-item:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
  transform: none;
}

.account-switcher-item.switcher-item-active {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.35);
}

.account-switcher-item p {
  margin: 0;
  font-size: 14px;
}

/* ─── Modals ───────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.15s ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: #ffffff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.45);
  animation: slide-up 0.18s ease;
}

.modal-sm {
  max-width: 380px;
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--muted);
  padding: 0;
  line-height: 1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: #f1f5f9;
  color: var(--text);
  transform: none;
}

/* ─── Forms ────────────────────────────────────────────────────────────────── */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-full {
  grid-column: span 2;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.required {
  color: var(--danger);
}

.form-group input,
.form-group select {
  border: 1.5px solid #d1d5db;
  border-radius: var(--radius-xs);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  background: #fff;
}

.form-group input[type="color"] {
  padding: 4px 6px;
  height: 40px;
  cursor: pointer;
  border-radius: var(--radius-xs);
}

.field-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.field-error {
  font-size: 12px;
  color: var(--danger);
  font-weight: 500;
  min-height: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-actions-pad {
  padding: 8px 24px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-actions .ghost,
.modal-actions .primary {
  padding: 10px 22px;
}

.modal-actions .ghost {
  color: #374151;
  border-color: #d1d5db;
}

/* ─── Empty States ─────────────────────────────────────────────────────────── */

.empty-state {
  grid-column: span 12;
  text-align: center;
  padding: 32px 0;
  font-size: 14px;
  color: var(--muted);
}

.full-width {
  grid-column: 1 / -1;
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: 12px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

/* ─── Scrollbar ────────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
}

/* ─── Accessibility ────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

body.modal-open {
  overflow: hidden;
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1280px) {
  .chart-card {
    grid-column: span 12;
  }

  .chart-card-pie {
    grid-column: span 12;
  }

  .categories-card {
    grid-column: span 12;
  }

  .transactions-card {
    grid-column: span 12;
  }

  .monthly-card {
    grid-column: span 12;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 12px;
    overflow: visible;
  }

  .side-nav {
    grid-auto-flow: column;
    grid-template-columns: repeat(5, auto);
    width: auto;
    gap: 6px;
  }

  .account-switcher-panel,
  .side-cta {
    display: none;
  }
}

@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-field {
    flex: 1;
    min-width: 0;
  }

  .search-field input {
    width: 100%;
  }

  .profile-chip {
    width: 100%;
    justify-content: space-between;
  }

  .table-row {
    grid-template-columns: 1.4fr 1fr 0.8fr;
    grid-template-rows: auto auto;
  }

  .table-row .row-actions {
    grid-column: span 3;
    opacity: 1;
    justify-content: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group-full {
    grid-column: span 1;
  }

  .side-nav {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: initial;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .monthly-grid {
    grid-template-columns: 1fr 1fr;
  }

  .side-nav {
    grid-template-columns: 1fr 1fr;
  }
}
