@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f7f9f8;
  --ink: #17211d;
  --muted: #718078;
  --card: #ffffff;
  --line: #e3eae6;
  --green: #16835f;
  --green-dark: #106b4d;
  --green-light: #e4f4ed;
  --red: #c2414d;
  --red-light: #fce9eb;
  --shadow-sm: 0 1px 2px rgba(23, 33, 29, 0.04);
  --shadow: 0 8px 24px rgba(23, 33, 29, 0.06);
  --shadow-lg: 0 18px 45px rgba(23, 33, 29, 0.12);
  --radius: 14px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  padding-bottom: 24px;
}

h1, h2 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}

h1 { font-size: 22px; }
h2 { font-size: 16px; }

/* --- Header / Topbar --- */
header.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 247, 246, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-text h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  border: none;
  background: transparent;
  color: var(--ink);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.menu-toggle:hover { background: rgba(0,0,0,0.05); }

.profile-button {
  border: none;
  background: var(--card);
  color: var(--green);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transition: all 0.2s;
}

.profile-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* --- Main Content --- */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Side Navigation --- */
.side-nav {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  width: 280px;
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  transform: translateX(-105%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

body.menu-open .side-nav { transform: translateX(0); }

.side-nav-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.nav-logo {
  width: 36px;
  height: 36px;
  background: var(--green);
  color: white;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
}

.nav-brand {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.side-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav button {
  border: none;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.side-nav button svg { opacity: 0.6; transition: opacity 0.2s; }

.side-nav button:hover {
  background: var(--bg);
  color: var(--ink);
}

.side-nav button.active {
  background: var(--green-light);
  color: var(--green);
  font-weight: 600;
}

.side-nav button.active svg { opacity: 1; stroke: var(--green); }

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
}

body.menu-open .nav-scrim {
  display: block;
  opacity: 1;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 20px 25px -5px rgba(5, 150, 105, 0.15), 0 10px 10px -5px rgba(5, 150, 105, 0.08);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.hero .label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero .amount {
  font-size: 36px;
  font-weight: 800;
  margin: 8px 0 12px;
  letter-spacing: -0.03em;
}

.hero small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

/* --- Metrics Grid --- */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #d1d5db;
}

.metric .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  margin-top: 8px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* --- Panels & Grid --- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.panel h2 {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-head h2 { margin-bottom: 0; }

/* --- Tables --- */
.table-wrap {
  overflow-x: auto;
  margin: 0 -24px;
  padding: 0 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

th, td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

th {
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f9fafb;
}

td.number, th.number { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9fafb; }

.positive { color: var(--green); font-weight: 600; }
.negative { color: var(--red); font-weight: 600; }

/* --- Forms --- */
form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full { grid-column: 1 / -1; }

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: all 0.2s;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

input::placeholder { color: #9ca3af; }

button.primary {
  grid-column: 1 / -1;
  border: none;
  background: var(--green);
  color: white;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button.primary:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.secondary, .custom-add button, .small-button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.secondary:hover, .custom-add button:hover, .small-button:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-light);
}

.link-button {
  border: none;
  background: none;
  color: var(--green);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
  text-decoration: none;
}

.link-button:hover { text-decoration: underline; }

/* --- Row Actions --- */
.row-actions {
  display: flex;
  gap: 8px;
}

.row-actions button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--muted);
}

.row-actions button:hover {
  border-color: var(--green);
  color: var(--green);
}

.row-actions button:last-child:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}

/* --- Auth Screens --- */
.auth-mode header, .auth-mode .side-nav, .auth-mode .nav-scrim, .auth-mode #profile-button { display: none !important; }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(to bottom, #f4f7f6, #e5e7eb);
}

.auth-card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.auth-card .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 8px;
}

.auth-card h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.auth-card .muted {
  display: block;
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 14px;
}

.auth-card form { grid-template-columns: 1fr; }

.setup-card { max-width: 680px; width: 100%; }
.setup-card h1 { margin-bottom: 8px; }

.setup-list {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 16px;
}

.setup-list h2 { font-size: 15px; margin-bottom: 12px; }
.setup-group h3 { font-size: 12px; color: var(--green); margin: 16px 0 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.simple-check {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink);
}

.simple-check input { width: auto; accent-color: var(--green); }
.mode-option { display:flex; align-items:flex-start; gap:12px; padding:16px; border:1px solid var(--line); border-radius:12px; cursor:pointer; }
.mode-option input { width:auto; min-height:0; margin-top:5px; accent-color:var(--green); }
.mode-option span { display:flex; flex-direction:column; gap:4px; }
.mode-option small { color:var(--muted); font-weight:400; }
.mode-profile { margin-bottom:18px; }
.mode-profile small { margin-top:4px; }
.side-nav button[hidden] { display:none !important; }

.custom-add {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.custom-add input { flex: 1; }

.balance-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.money-input { text-align: right; font-variant-numeric: tabular-nums; }

/* Keep income-entry forms aligned and visually consistent. */
.income-entry { max-width: 860px; }
.income-entry form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.income-entry form .field { min-width: 0; }
.income-entry form .primary { width: 100%; }
@media (max-width: 767px) {
  .income-entry { max-width: none; }
  .income-entry form { grid-template-columns: minmax(0, 1fr); }
  .income-entry form .field.full { grid-column: auto; }
}

/* --- Profile --- */
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.profile-row:last-child { border-bottom: none; }
.profile-row span { display: flex; flex-direction: column; gap: 2px; }
.profile-row small { color: var(--muted); font-size: 12px; }

.danger-link {
  border: none;
  background: none;
  color: var(--red);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.15s;
}

.danger-link:hover { background: var(--red-light); }

.logout {
  width: 100%;
  border: 1px solid var(--red);
  background: transparent;
  color: var(--red);
  border-radius: 8px;
  padding: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 24px;
}

.logout:hover {
  background: var(--red);
  color: white;
}

.reset-button {
  width: 100%;
  border: 1px solid #2563eb;
  background: transparent;
  color: #2563eb;
  border-radius: 8px;
  padding: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 24px;
}
.reset-button:hover { background: #2563eb; color: #fff; }

/* --- Modals --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.close-modal {
  border: none;
  background: var(--bg);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.close-modal:hover {
  background: var(--red-light);
  color: var(--red);
}

#modal-root form { margin-top: 20px; }

/* --- Toast --- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: white;
  padding: 12px 24px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 50;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- Loading State --- */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: var(--muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 32px 16px;
  font-size: 13px;
}

.muted { color: var(--muted); font-size: 13px; }

/* --- Animations --- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* --- Responsive --- */
@media (min-width: 768px) {
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .dashboard-grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 20px; }
}

@media (max-width: 767px) {
  header.topbar { padding: 12px 16px; }
  .content { padding: 0 16px; }
    .brand-text h1 { font-size: 21px; }
  .hero { padding: 24px; border-radius: var(--radius); }
  .hero .amount { font-size: 28px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .panel { padding: 20px; }
  form { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .balance-row { grid-template-columns: 1fr 140px; }
  .auth-card { padding: 24px; }
  .metric strong { font-size: 18px; }
  table { min-width: 400px; }
}

/* Refined contemporary finance dashboard theme */
:root {
  --bg: #f4f6f5;
  --ink: #18231f;
  --muted: #78857f;
  --card: #ffffff;
  --line: #e6ebe8;
  --green: #087f5b;
  --green-dark: #066747;
  --green-light: #e8f4ee;
  --red: #c14450;
  --red-light: #fff0f1;
  --shadow-sm: 0 1px 3px rgba(20, 38, 30, .035), 0 4px 14px rgba(20, 38, 30, .025);
  --shadow: 0 12px 30px rgba(20, 38, 30, .07);
  --shadow-lg: 0 24px 64px rgba(20, 38, 30, .16);
  --radius: 16px;
  --radius-lg: 22px;
}

body { background: #f4f6f5; color: var(--ink); letter-spacing: -.018em; }
header.topbar { max-width: none; padding: 16px max(28px, calc((100vw - 1280px) / 2)); background: rgba(244,246,245,.88); border-bottom: 1px solid rgba(224,232,227,.8); }
.brand-text h1 { font-size: 22px; font-weight: 750; letter-spacing: -.045em; }
.menu-toggle { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.content { max-width: 1280px; padding: 8px 32px 32px; }
.side-nav { width: 288px; border: 0; padding: 28px 18px; }
.side-nav-header { border-bottom-color: #edf0ee; }
.nav-logo { border-radius: 12px; background: linear-gradient(145deg,#0c8a62,#066747); box-shadow: 0 6px 14px rgba(8,127,91,.22); }
.side-nav button { padding: 13px 15px; border-radius: 11px; }
.hero { background: linear-gradient(112deg,#103f31 0%,#087554 62%,#13946b 100%); border-radius: 22px; padding: 34px 38px; box-shadow: 0 18px 38px rgba(8,91,64,.14); }
.hero::before { width: 380px; height: 380px; top: -62%; right: -4%; background: radial-gradient(circle,rgba(255,255,255,.12),rgba(255,255,255,0) 68%); }
.hero .label { font-size: 11px; letter-spacing: .12em; }
.hero .amount { font-size: clamp(32px,4vw,44px); letter-spacing: -.055em; }
.metrics { gap: 14px; }
.metric, .panel { border-color: #e7ece9; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.metric { padding: 22px; }
.metric:hover { transform: translateY(-3px); border-color: #d5e2da; box-shadow: var(--shadow); }
.metric .label { font-size: 10px; letter-spacing: .09em; }
.metric strong { font-size: clamp(18px,2vw,23px); letter-spacing: -.04em; }
.panel { padding: 26px; margin-bottom: 18px; }
.panel h2 { font-size: 16px; letter-spacing: -.025em; margin-bottom: 22px; }
th, td { padding: 15px 16px; }
th { background: #f7f9f8; font-size: 10px; letter-spacing: .09em; }
td { color: #36443d; }
tr:hover td { background: #f8faf9; }
input, select { min-height: 44px; border-radius: 10px; border-color: #dfe6e2; background-color: #fff; }
input:focus, select:focus { border-color: #13805d; box-shadow: 0 0 0 4px rgba(8,127,91,.09); }
button.primary { min-height: 46px; border-radius: 10px; background: linear-gradient(135deg,#09815c,#087151); box-shadow: 0 5px 12px rgba(8,127,91,.12); }
button.primary:hover { background: #066747; box-shadow: 0 8px 18px rgba(8,127,91,.2); }
.row-actions button { border-radius: 8px; padding: 7px 11px; background: #fff; }
.auth-wrap { background: radial-gradient(ellipse at 50% 0%,#e4f0e9 0%,#f5f7f5 52%,#edf1ee 100%); }
.auth-card { border-color: rgba(224,232,227,.9); border-radius: 22px; box-shadow: 0 24px 70px rgba(23,50,36,.11); }
.modal { border: 1px solid var(--line); }
#toast { border-radius: 12px; }
@media (max-width: 767px) {
  header.topbar { padding: 12px 16px; }
  .content { padding: 6px 16px 24px; }
  .hero { padding: 25px; }
  .panel { padding: 19px; }
  .metric { padding: 17px; }
  .table-wrap { margin: 0 -19px; padding: 0 19px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Direction 02 — editorial ledger: warm paper, ink navy, signal amber */
:root {
  --bg: #f3f0e9;
  --ink: #17252b;
  --muted: #738087;
  --card: #fffefa;
  --line: #e6e0d5;
  --green: #b65b2a;
  --green-dark: #91431e;
  --green-light: #f7e9dd;
  --red: #bb4042;
  --red-light: #fae8e5;
  --shadow-sm: 0 2px 8px rgba(42,38,30,.045);
  --shadow: 0 14px 34px rgba(42,38,30,.09);
  --shadow-lg: 0 24px 64px rgba(18,31,36,.2);
  --radius: 12px;
  --radius-lg: 18px;
}
body { background: var(--bg); color: var(--ink); font-family: 'Inter', sans-serif; letter-spacing: -.025em; }
header.topbar { position: sticky; max-width: none; padding: 16px 36px 16px 300px; background: rgba(243,240,233,.94); border-bottom: 1px solid #e4ded2; }
.brand-text h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 25px; font-weight: 700; letter-spacing: -.045em; }
.menu-toggle { display: none; }
.profile-button { width: 42px; height: 42px; border-radius: 12px; color: #fff; background: #17252b; border: 0; box-shadow: none; }
.content { max-width: 1440px; padding: 28px 38px 48px 300px; }
.side-nav { width: 260px; transform: none; background: #17252b; color: #f7f2e9; padding: 28px 16px; border: 0; box-shadow: 8px 0 28px rgba(20,32,35,.08); }
.side-nav-header { border-bottom: 1px solid rgba(255,255,255,.13); padding-bottom: 25px; margin-bottom: 28px; }
.nav-logo { background: #d1763f; color: #17252b; border-radius: 10px; box-shadow: none; }
.nav-brand { color: #fffefa; font-family: Georgia, 'Times New Roman', serif; font-size: 18px; }
.side-nav button { color: #b4c0c1; border-radius: 9px; padding: 13px 14px; }
.side-nav button:hover { color: #fff; background: rgba(255,255,255,.08); }
.side-nav button.active { color: #fff; background: #293b40; box-shadow: inset 3px 0 #df8c53; }
.side-nav button.active svg { stroke: #e5a16f; }
.nav-scrim { display: none !important; }
.hero { color: #fdfaf4; background: #17252b; border-radius: 16px; padding: 36px 40px; box-shadow: none; border: 1px solid #26383d; }
.hero::before { top: auto; bottom: -65%; right: -2%; width: 390px; height: 390px; background: radial-gradient(circle,rgba(223,140,83,.28),transparent 68%); }
.hero .label { color: #d8a681; letter-spacing: .14em; }
.hero .amount { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(38px,5vw,54px); font-weight: 600; letter-spacing: -.055em; }
.hero small { color: #bac4c1; }
.metrics { gap: 12px; }
.metric { background: #fffefa; border: 1px solid #e6e0d5; border-radius: 12px; box-shadow: none; padding: 21px; }
.metric:hover { transform: translateY(-2px); border-color: #d7b99f; box-shadow: 0 10px 24px rgba(65,49,31,.08); }
.metric .label { color: #85847c; letter-spacing: .12em; font-size: 10px; }
.metric strong { font-family: Georgia, 'Times New Roman', serif; font-size: 25px; color: #17252b; letter-spacing: -.04em; }
.panel { background: #fffefa; border: 1px solid #e6e0d5; border-radius: 12px; box-shadow: none; padding: 26px; }
.panel h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 19px; font-weight: 700; letter-spacing: -.025em; }
.section-head { border-bottom: 1px solid #eee8dd; padding-bottom: 16px; }
th { color: #7b817d; background: #f5f2eb; font-size: 10px; letter-spacing: .12em; }
th, td { padding: 15px 14px; }
td { color: #334146; border-bottom-color: #eee9df; }
tr:hover td { background: #fbf7ef; }
input, select { background: #fffefa; border: 1px solid #ded8cc; border-radius: 8px; min-height: 46px; }
input:focus, select:focus { border-color: #c97542; box-shadow: 0 0 0 3px rgba(193,103,52,.12); }
button.primary { color: #fffaf2; background: #b65b2a; border-radius: 8px; box-shadow: none; min-height: 47px; }
button.primary:hover { background: #91431e; box-shadow: 0 7px 16px rgba(145,67,30,.19); }
.secondary, .custom-add button, .small-button { border-radius: 8px; }
.row-actions button { border-radius: 7px; }
.auth-wrap { background: radial-gradient(circle at 85% 15%,#ead6c5,transparent 29%),#f3f0e9; }
.auth-card { background: #fffefa; border: 1px solid #e5ddd1; border-radius: 16px; box-shadow: 0 25px 70px rgba(38,42,39,.12); }
.auth-card h1, .setup-card h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 30px; }
.auth-card .eyebrow { color: #b65b2a; }
.modal { background: #fffefa; border: 1px solid #e6e0d5; border-radius: 16px; }
#toast { background: #17252b; border-radius: 9px; }
@media (min-width: 768px) {
  .dashboard-grid { gap: 16px; }
  .side-nav { transform: none !important; }
  body.menu-open .nav-scrim { display: none !important; }
}
@media (max-width: 767px) {
  header.topbar { padding: 12px 16px; }
  .menu-toggle { display: grid; background: #fffefa; }
  .content { padding: 18px 16px 32px; }
  .side-nav { width: min(290px, 86vw); transform: translateX(-105%); }
  body.menu-open .side-nav { transform: translateX(0); }
  body.menu-open .nav-scrim { display: block !important; }
  .hero { padding: 26px 24px; }
  .hero .amount { font-size: 37px; }
  .panel { padding: 20px; }
  .table-wrap { margin: 0 -20px; padding: 0 20px; }
  .metric strong { font-size: 20px; }
}

/* Direction 03 — alpine glass with calm forest green */
:root {
  color-scheme: light;
  --bg: #f1f5f2;
  --ink: #182b24;
  --muted: #75857c;
  --card: rgba(255,255,255,.9);
  --line: rgba(195,210,200,.68);
  --green: #39745b;
  --green-dark: #2d5d49;
  --green-light: #e6efe8;
  --red: #ba4f5d;
  --red-light: #fcebed;
  --shadow-sm: 0 4px 16px rgba(35,63,48,.04);
  --shadow: 0 14px 36px rgba(35,63,48,.075);
  --shadow-lg: 0 28px 70px rgba(28,48,37,.16);
  --radius: 18px;
  --radius-lg: 26px;
}
body { background: radial-gradient(ellipse at 82% 2%,rgba(199,218,202,.38),transparent 28%),radial-gradient(ellipse at 3% 45%,rgba(219,230,219,.46),transparent 30%),#f1f5f2; color: var(--ink); letter-spacing: -.025em; }
header.topbar { max-width: none; padding: 16px max(28px,calc((100vw - 1320px)/2)); background: rgba(244,249,246,.72); border-bottom: 1px solid rgba(174,204,190,.42); backdrop-filter: blur(20px); }
.brand-text h1 { font-size: 23px; font-weight: 750; letter-spacing: -.055em; color: #263d31; }
.menu-toggle { background: rgba(255,255,255,.72); border: 1px solid rgba(175,204,190,.6); box-shadow: var(--shadow-sm); }
.profile-button { color: #087f68; background: rgba(255,255,255,.76); border-color: rgba(175,204,190,.6); }
.content { max-width: 1320px; padding: 20px 34px 44px; }
.side-nav { width: 276px; background: linear-gradient(165deg,#284c3d 0%,#203e33 62%,#1b362d 100%); border: 0; padding: 26px 16px; box-shadow: 12px 0 38px rgba(8,51,39,.14); }
.side-nav-header { border-bottom-color: rgba(218,246,231,.13); }
.nav-logo { color: #284536; background: linear-gradient(145deg,#d8e9d9,#a7c9b0); border-radius: 12px; box-shadow: 0 7px 18px rgba(104,218,175,.22); }
.nav-brand { color: #edfff5; letter-spacing: -.035em; }
.side-nav button { color: #a7c3b8; border-radius: 12px; padding: 13px 15px; }
.side-nav button:hover { color: #effff6; background: rgba(190,242,218,.08); }
.side-nav button.active { color: #eafff2; background: linear-gradient(100deg,rgba(178,211,184,.17),rgba(178,211,184,.06)); box-shadow: inset 3px 0 #a4c7ad; }
.side-nav button.active svg { stroke: #b5d5be; }
.nav-scrim { background: rgba(4,28,23,.48); backdrop-filter: blur(6px); }
.hero { isolation: isolate; color: #effff8; background: linear-gradient(112deg,#294e3d 0%,#376b52 55%,#57826a 100%); border: 1px solid rgba(202,255,227,.15); border-radius: 26px; padding: 38px 42px; box-shadow: 0 22px 55px rgba(8,91,66,.2); }
.hero::before { z-index: -1; width: 520px; height: 520px; top: -105%; right: -1%; background: radial-gradient(circle at 35% 65%,rgba(231,242,229,.19),rgba(231,242,229,.035) 46%,transparent 67%); border: 1px solid rgba(235,244,232,.11); box-shadow: 0 0 0 35px rgba(235,244,232,.025),0 0 0 70px rgba(228,255,239,.02); }
.hero .label { color: #d0e1d2; font-size: 10px; letter-spacing: .16em; }
.hero .amount { font-size: clamp(36px,4.5vw,52px); font-weight: 750; letter-spacing: -.065em; text-shadow: 0 3px 22px rgba(0,32,23,.16); }
.hero small { color: rgba(239,247,237,.76); }
.metrics { gap: 15px; }
.metric, .panel { background: rgba(255,255,255,.76); border: 1px solid rgba(175,204,190,.5); border-radius: 18px; box-shadow: 0 6px 22px rgba(18,70,53,.045); backdrop-filter: blur(12px); }
.metric { padding: 22px; transition: transform .28s cubic-bezier(.2,.8,.2,1),box-shadow .28s,border-color .28s; }
.metric:hover { transform: translateY(-5px); border-color: rgba(57,116,91,.28); box-shadow: 0 18px 38px rgba(17,88,62,.12); }
.metric .label { color: #779188; font-size: 10px; letter-spacing: .12em; }
.metric strong { color: #263d31; font-size: clamp(19px,2vw,24px); letter-spacing: -.045em; }
.panel { padding: 26px; margin-bottom: 18px; }
.panel h2 { color: #163d32; font-size: 17px; letter-spacing: -.035em; }
th { color: #71877e; background: rgba(237,246,241,.85); font-size: 10px; letter-spacing: .1em; }
th,td { padding: 15px 16px; }
td { color: #345148; border-bottom-color: rgba(190,211,200,.54); }
tr:hover td { background: rgba(233,246,238,.66); }
input,select { min-height: 46px; border-radius: 11px; border-color: rgba(175,199,185,.7); background: rgba(255,255,255,.88); }
input:focus,select:focus { border-color: #56856b; box-shadow: 0 0 0 4px rgba(57,116,91,.11); }
button.primary { min-height: 47px; border-radius: 11px; background: linear-gradient(110deg,#39745b,#4b8062); box-shadow: 0 8px 20px rgba(57,116,91,.14); }
button.primary:hover { background: linear-gradient(110deg,#2d5d49,#39745b); box-shadow: 0 10px 24px rgba(57,116,91,.18); }
.secondary,.custom-add button,.small-button { border-radius: 10px; background: rgba(255,255,255,.78); }
.row-actions button { border-radius: 9px; background: rgba(255,255,255,.84); }
.auth-wrap { background: radial-gradient(ellipse at 78% 10%,rgba(194,215,194,.5),transparent 30%),radial-gradient(ellipse at 15% 88%,rgba(213,226,211,.48),transparent 34%),#edf4f0; }
.auth-card { background: rgba(255,255,255,.8); border: 1px solid rgba(195,210,200,.68); border-radius: 24px; box-shadow: 0 28px 80px rgba(36,63,46,.1); backdrop-filter: blur(18px); }
.auth-card h1,.setup-card h1 { color: #263d31; letter-spacing: -.045em; }
.auth-card .eyebrow { color: #39745b; }
.modal-backdrop { background: rgba(26,43,34,.38); backdrop-filter: blur(9px); }
.modal { background: rgba(255,255,255,.96); border: 1px solid rgba(195,210,200,.72); border-radius: 22px; }
#toast { background: #284c3d; border: 1px solid rgba(218,235,216,.16); box-shadow: 0 16px 42px rgba(31,58,42,.2); border-radius: 12px; }
.spinner { border-color: #dce7dd; border-top-color: #56856b; }
@keyframes softRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.content > .hero,.content > .metrics,.content > .panel,.content > .grid { animation: softRise .55s both; }
.content > *:nth-child(2) { animation-delay: .07s; }
.content > *:nth-child(3) { animation-delay: .13s; }
@media (min-width: 768px) { .content { padding-top: 24px; } }
@media (max-width: 767px) {
  header.topbar { padding: 12px 16px; }
  .content { padding: 14px 16px 30px; }
  .side-nav { width: min(292px,86vw); }
  .hero { padding: 27px 24px; border-radius: 21px; }
  .hero .amount { font-size: 36px; }
  .panel { padding: 19px; }
  .table-wrap { margin: 0 -19px; padding: 0 19px; }
  .metric { padding: 17px; }
  .metric strong { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .content > * { animation: none !important; } .metric { transition: none; } }

/* Soft, eye-comfort forest green palette */
:root { --bg:#f3f6f3; --ink:#25352d; --muted:#7a8980; --card:rgba(255,255,255,.94); --line:#e1e9e2; --green:#4f8065; --green-dark:#3c6a52; --green-light:#e9f1e9; --shadow-sm:0 3px 14px rgba(36,62,45,.035); --shadow:0 12px 32px rgba(36,62,45,.07); --shadow-lg:0 28px 70px rgba(28,48,37,.14); }
body { background:radial-gradient(ellipse at 82% 0%,rgba(218,231,216,.48),transparent 30%),#f3f6f3; color:#25352d; }
.side-nav { background:linear-gradient(165deg,#345746,#293f34); box-shadow:10px 0 34px rgba(32,54,39,.1); }
.nav-logo { background:linear-gradient(145deg,#e2ede1,#c2d8c5); color:#345746; box-shadow:none; }
.side-nav button.active { background:rgba(204,226,207,.13); box-shadow:inset 3px 0 #b1ccb3; }
.side-nav button.active svg { stroke:#c5dcc7; }
.hero { color:#f7faf6; background:linear-gradient(115deg,#365b47,#4b765b); border-color:rgba(255,255,255,.16); box-shadow:0 18px 42px rgba(48,83,59,.13); }
.hero::before { background:radial-gradient(circle,rgba(229,239,223,.15),transparent 68%); border-color:rgba(239,246,235,.1); box-shadow:0 0 0 35px rgba(239,246,235,.02),0 0 0 70px rgba(239,246,235,.015); }
.hero .label { color:#d7e7d8; }
.hero small { color:rgba(244,249,241,.76); }
.metric,.panel { background:rgba(255,255,255,.88); border-color:#e2e9e2; box-shadow:0 5px 20px rgba(40,65,48,.035); backdrop-filter:blur(8px); }
.metric strong,.panel h2 { color:#30483a; }
.metric .label { color:#829087; }
th { color:#7d8a81; background:#f3f6f2; }
td { color:#405349; border-bottom-color:#e8ede7; }
tr:hover td { background:#f7f9f6; }
input,select { border-color:#dfe7df; background:rgba(255,255,255,.95); }
input:focus,select:focus { border-color:#7fa58a; box-shadow:0 0 0 4px rgba(79,128,101,.1); }
button.primary { background:linear-gradient(110deg,#4f8065,#5b896e); box-shadow:0 6px 16px rgba(62,111,79,.12); }
button.primary:hover { background:#3c6a52; box-shadow:0 8px 18px rgba(62,111,79,.16); }
.metric:hover { border-color:#cbdacb; box-shadow:0 14px 30px rgba(40,65,48,.08); }
.auth-wrap { background:radial-gradient(ellipse at 78% 10%,rgba(218,231,216,.5),transparent 32%),#f3f6f3; }
.auth-card { border-color:#e1e9e2; box-shadow:0 24px 68px rgba(42,68,48,.09); }
.auth-card .eyebrow { color:#4f8065; }
#toast { background:#345746; }
.spinner { border-color:#dce7dc; border-top-color:#668d70; }

.side-nav-menu [data-view="help"] { margin-top: auto; border-top: 1px solid rgba(255,255,255,.14); border-radius: 0 0 12px 12px; padding-top: 18px; }
#app .content > .panel > p:not(.muted) { line-height: 1.65; color: var(--ink); }

/* Short contextual onboarding tips shown once per menu. */
.user-guide { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; padding:16px 18px; margin-bottom:18px; border:1px solid #d8e6d9; border-left:4px solid var(--green); border-radius:12px; background:rgba(255,255,255,.82); }
.user-guide strong { display:block; margin-bottom:4px; color:var(--ink); font-size:14px; }
.user-guide p { color:var(--muted); font-size:13px; line-height:1.55; }
.guide-dismiss { flex:none; border:0; background:transparent; color:var(--green-dark); font:inherit; font-size:12px; font-weight:600; cursor:pointer; padding:4px 0; }
.guide-dismiss:hover { text-decoration:underline; }
@media (max-width: 767px) { .user-guide { gap:10px; padding:14px; } }

/* Align menu rows and their icons consistently across all navigation items. */
.side-nav-menu { gap: 6px; overflow-y: auto; padding: 2px 0 12px; }
.side-nav button { width: 100%; min-height: 46px; flex: 0 0 46px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; column-gap: 12px; padding: 0 14px; }
.side-nav button svg { width: 20px; height: 20px; justify-self: center; flex: none; }
.side-nav button > span:first-child { width: 22px; min-width: 22px; display: inline-flex; justify-content: center; align-items: center; font-size: 18px; line-height: 1; }
.side-nav button > span:last-child { min-width: 0; text-align: left; }
.side-nav-header { flex: 0 0 auto; }
@media (max-width: 767px) {
  .side-nav-menu { gap: 5px; }
  .side-nav button { min-height: 48px; flex-basis: 48px; }
}

/* Use the same slide-out navigation behavior on desktop and mobile. */
@media (min-width: 768px) {
  header.topbar { padding: 16px 28px; }
  .menu-toggle { display: grid; background: rgba(255,255,255,.72); border: 1px solid rgba(175,204,190,.6); box-shadow: var(--shadow-sm); }
  .side-nav { width: 276px; transform: translateX(-105%) !important; }
  body.menu-open .side-nav { transform: translateX(0) !important; }
  .nav-scrim { display: none; }
  body.menu-open .nav-scrim { display: block !important; }
  .content { max-width: 1320px; padding: 20px 34px 44px; }
}















