/* ===========================================================================
   Emidon — "Cozy Valley" theme
   A Stardew-Valley-inspired vibe: sunny farm sky, parchment panels with
   chunky rounded wood borders, carved wood buttons that physically press in,
   gold-coin numbers. Same toy-shading idea as yougameplay.com's /graphics
   skill (one light from above, lit rim + shadow band + extruded edge), warm
   rustic palette instead of deep space. Bootstrap 5 provides grid/behavior;
   every visual is overridden here.
   =========================================================================== */

:root {
  color-scheme: light;
  /* Grounds */
  --sky-hi: #9ed9f0;      /* morning sky */
  --sky-lo: #cdeec2;      /* meadow haze */
  --panel: #fff2c8;       /* parchment face */
  --panel-2: #ffe9ac;     /* parchment shadow half */
  --panel-deep: #f6dc95;  /* recessed parchment (wells, stripes) */
  --wood: #a05a2c;        /* plank */
  --wood-hi: #c9803f;     /* lit plank */
  --wood-dark: #7a3f14;   /* carved rim */
  --wood-edge: #5b2b0e;   /* the extruded edge everything presses into */
  /* Ink — measured on parchment */
  --ink: #4a2c15;
  --ink-soft: #7c5a35;
  --dim: #97764f;
  /* Accents */
  --grass: #3f9134;       /* income / success ink */
  --grass-soft: rgba(101, 190, 68, 0.16);
  --tomato: #c23b22;      /* expense / danger ink */
  --tomato-soft: rgba(194, 59, 34, 0.10);
  --gold: #d99b0d;        /* coins */
  --gold-deep: #8f6607;   /* coin ink on parchment */
  --sun: #ffd984;         /* highlight rim */

  --round: 12px;
  --cut: inset(0 round var(--round));

  --f-head: "Pixelify Sans", "Chakra Petch", system-ui, sans-serif;
  --f-mono: "VT323", ui-monospace, monospace;
  --f-body: "Nunito", "Inter", system-ui, sans-serif;

  --bs-primary: #a05a2c;
  --bs-primary-rgb: 160, 90, 44;
  --bs-body-color: #4a2c15;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  /* A day in the valley: sun bloom top-right, sky falling into meadow green. */
  background:
    radial-gradient(46% 38% at 84% -6%, rgba(255, 235, 160, 0.9), transparent 70%),
    radial-gradient(60% 30% at 12% 108%, rgba(120, 190, 90, 0.35), transparent 75%),
    linear-gradient(180deg, var(--sky-hi) 0%, #bfe6e2 52%, var(--sky-lo) 100%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-head);
  font-weight: 700;
  color: var(--ink);
}
h1 {
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55);
}

a { color: #9c5a1e; text-decoration: none; font-weight: 700; }
a:hover { color: var(--wood-dark); }

.text-muted { color: var(--ink-soft) !important; }
.text-success { color: var(--grass) !important; }
.text-danger { color: var(--tomato) !important; }
.text-warning { color: var(--gold-deep) !important; }
.border-top { border-top-color: rgba(122, 63, 20, 0.25) !important; }
footer { color: var(--ink-soft); }

/* --- Navbar: a carved wooden sign hung across the top ---------------------- */
.navbar.bg-primary {
  background: linear-gradient(180deg, var(--wood-hi), var(--wood) 55%, #8a4a20) !important;
  border-bottom: 4px solid var(--wood-edge);
  box-shadow: inset 0 2px 0 rgba(255, 226, 150, 0.45), 0 6px 14px rgba(74, 44, 21, 0.35);
}
.navbar-brand {
  font-family: var(--f-head);
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff2c8 !important;
  text-shadow: 0 2px 0 rgba(91, 43, 14, 0.8);
}
.navbar-brand i { color: var(--sun); }
.navbar .nav-link {
  font-family: var(--f-head);
  font-size: 0.95rem;
  color: #ffe9ac !important;
  text-shadow: 0 1px 0 rgba(91, 43, 14, 0.7);
  padding: 0.45rem 1rem;
  margin: 0.25rem;
  border-radius: var(--round);
  transition: background-color 0.15s, color 0.15s;
}
.navbar .nav-link:hover {
  color: #fff !important;
  background-color: rgba(91, 43, 14, 0.35);
}
.navbar-toggler { border-color: rgba(255, 233, 172, 0.5); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 242, 200, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
.nav-link-button {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-head);
  font-size: 0.95rem;
  padding: 0.45rem 1.25rem;
  border-radius: var(--round);
  background: linear-gradient(180deg, #ffe08a, var(--sun) 45%, #eab54d);
  color: var(--wood-edge);
  text-decoration: none;
  border: 2px solid var(--wood-dark);
  box-shadow: 0 3px 0 var(--wood-edge), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.12s, box-shadow 0.12s;
}
.nav-link-button:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--wood-edge), inset 0 1px 0 rgba(255, 255, 255, 0.7); color: var(--wood-edge); }
.nav-link-button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wood-edge); }

/* --- Ambient drifting icons (leaves, coins, produce vibes) ------------------ */
.animated-background {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1; overflow: hidden; pointer-events: none;
}
.symbols-container { position: absolute; width: 100%; height: 100%; }
.symbols-container i {
  position: absolute;
  font-size: 2rem;
  opacity: 0.14;
  color: #6f8f3c;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.4);
}
.symbols-container i:nth-child(even) { color: var(--gold); }
.symbols-container i:nth-child(1)  { animation: float1 20s infinite; top: 10%; left: 10%; }
.symbols-container i:nth-child(2)  { animation: float2 25s infinite; top: 20%; left: 20%; }
.symbols-container i:nth-child(3)  { animation: float3 30s infinite; top: 30%; left: 30%; }
.symbols-container i:nth-child(4)  { animation: float4 35s infinite; top: 40%; left: 40%; }
.symbols-container i:nth-child(5)  { animation: float5 40s infinite; top: 50%; left: 50%; }
.symbols-container i:nth-child(6)  { animation: float1 45s infinite; top: 60%; left: 60%; }
.symbols-container i:nth-child(7)  { animation: float2 50s infinite; top: 70%; left: 70%; }
.symbols-container i:nth-child(8)  { animation: float3 55s infinite; top: 80%; left: 80%; }
.symbols-container i:nth-child(9)  { animation: float4 60s infinite; top: 15%; left: 85%; }
.symbols-container i:nth-child(10) { animation: float5 65s infinite; top: 25%; left: 75%; }
.symbols-container i:nth-child(11) { animation: float1 70s infinite; top: 35%; left: 65%; }
.symbols-container i:nth-child(12) { animation: float2 75s infinite; top: 45%; left: 55%; }
@keyframes float1 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(100px, 100px) rotate(180deg); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-100px, 100px) rotate(-180deg); } }
@keyframes float3 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(100px, -100px) rotate(90deg); } }
@keyframes float4 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-150px, -150px) rotate(180deg); } }
@keyframes float5 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(100px, -100px) rotate(90deg) scale(1.1); }
  50% { transform: translate(200px, 0) rotate(180deg) scale(1); }
  75% { transform: translate(100px, 100px) rotate(270deg) scale(0.9); }
}

/* --- Panels: Stardew dialogue boxes ----------------------------------------
   Parchment face inside a chunky two-tone wood frame: a warm lit inner bevel,
   the carved brown rim, and the darker outer edge — all box-shadow rings so
   the radius stays soft and chunky. */
.card, .form-container {
  position: relative;
  border-radius: var(--round);
  background: linear-gradient(180deg, #fff7d9, var(--panel) 45%, var(--panel-2));
  border: 3px solid var(--wood-dark);
  box-shadow:
    inset 0 0 0 2px var(--sun),
    0 0 0 3px var(--wood),
    0 6px 0 2px var(--wood-edge),
    0 14px 22px rgba(74, 44, 21, 0.35);
  color: var(--ink);
}
.form-container { padding: 2rem; }
.card-header {
  background: linear-gradient(180deg, rgba(201, 128, 63, 0.22), rgba(201, 128, 63, 0.08));
  border-bottom: 2px solid rgba(122, 63, 20, 0.35);
  border-radius: calc(var(--round) - 4px) calc(var(--round) - 4px) 0 0;
}
.card-header h5 {
  font-family: var(--f-head);
  font-size: 1rem;
  color: var(--wood-dark);
  margin: 0;
}
.card-footer {
  background: transparent;
  border-top: 2px solid rgba(122, 63, 20, 0.25);
}

/* --- Buttons: carved wood keys --------------------------------------------- */
.btn {
  font-family: var(--f-head);
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  padding: 9px 20px;
  font-size: 0.95rem;
  border-radius: var(--round);
  border: 2px solid var(--wood-dark);
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s, color 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(2px); }
.btn-sm { padding: 4px 12px; font-size: 0.82rem; border-width: 2px; }
.btn-lg { padding: 13px 28px; font-size: 1.15rem; }

/* Primary: the golden "OK" button. */
.btn-primary, .btn-primary:focus {
  background: linear-gradient(180deg, #ffe08a, var(--sun) 45%, #eab54d);
  color: var(--wood-edge);
  border-color: var(--wood-dark);
  box-shadow: 0 4px 0 var(--wood-edge), inset 0 2px 0 rgba(255, 255, 255, 0.75);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #ffe9a4, #ffdf94 45%, #f0bc55);
  color: var(--wood-edge);
  border-color: var(--wood-dark);
  box-shadow: 0 6px 0 var(--wood-edge), inset 0 2px 0 rgba(255, 255, 255, 0.75);
}
.btn-primary:active {
  background: linear-gradient(180deg, #f4cf6d, #e8b64a) !important;
  color: var(--wood-edge) !important;
  border-color: var(--wood-dark) !important;
  box-shadow: 0 1px 0 var(--wood-edge), inset 0 2px 4px rgba(122, 63, 20, 0.35);
}

/* Secondary/ghost: plain wood plank. */
.btn-secondary, .btn-outline-primary, .btn-outline-secondary, .btn-outline-light,
.btn-secondary:focus, .btn-outline-primary:focus, .btn-outline-secondary:focus, .btn-outline-light:focus {
  background: linear-gradient(180deg, var(--wood-hi), var(--wood) 55%, #8a4a20);
  color: #fff2c8;
  border-color: var(--wood-edge);
  text-shadow: 0 1px 0 rgba(91, 43, 14, 0.7);
  box-shadow: 0 4px 0 var(--wood-edge), inset 0 2px 0 rgba(255, 226, 150, 0.4);
}
.btn-secondary:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-light:hover {
  background: linear-gradient(180deg, #d68d49, #b06432 55%, #945022);
  color: #fff;
  border-color: var(--wood-edge);
  box-shadow: 0 6px 0 var(--wood-edge), inset 0 2px 0 rgba(255, 226, 150, 0.4);
}
.btn-outline-secondary:disabled, .btn-outline-primary:disabled {
  background: #cbb089;
  color: #8c7350;
  border-color: #a88c62;
  box-shadow: none;
  text-shadow: none;
}

/* Danger: tomato-stained plank. */
.btn-danger, .btn-outline-danger, .btn-danger:focus, .btn-outline-danger:focus {
  background: linear-gradient(180deg, #e06546, #c23b22 55%, #a12e18);
  color: #ffe9dc;
  border-color: #6d1d0d;
  text-shadow: 0 1px 0 rgba(109, 29, 13, 0.7);
  box-shadow: 0 4px 0 #6d1d0d, inset 0 2px 0 rgba(255, 200, 170, 0.4);
}
.btn-danger:hover, .btn-outline-danger:hover {
  background: linear-gradient(180deg, #ea7357, #d24830 55%, #b03520);
  color: #fff;
  border-color: #6d1d0d;
  box-shadow: 0 6px 0 #6d1d0d, inset 0 2px 0 rgba(255, 200, 170, 0.4);
}

/* --- Forms: wells carved into the parchment -------------------------------- */
.form-control, .form-select {
  background-color: #fffaf0;
  border: 2px solid rgba(122, 63, 20, 0.45);
  border-radius: 10px;
  color: var(--ink);
  box-shadow: inset 0 2px 5px rgba(122, 63, 20, 0.25);
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  background-color: #fffdf6;
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: inset 0 2px 5px rgba(122, 63, 20, 0.2), 0 0 0 0.2rem rgba(217, 155, 13, 0.25);
}
.form-control::placeholder { color: var(--dim); font-weight: 400; }
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%237a3f14' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}
.form-label {
  font-family: var(--f-head);
  font-size: 0.85rem;
  color: var(--wood-dark);
  margin-bottom: 0.35rem;
}
.input-group-text {
  background: linear-gradient(180deg, #ffe08a, #eab54d);
  border: 2px solid rgba(122, 63, 20, 0.45);
  color: var(--gold-deep);
  font-family: var(--f-mono);
  font-size: 1.1rem;
}
.form-check-input { background-color: #fffaf0; border: 2px solid rgba(122, 63, 20, 0.45); }
.form-check-input:checked { background-color: var(--grass); border-color: var(--grass); }

.form-actions { margin-top: 1.5rem; display: flex; gap: 1rem; justify-content: center; }

/* --- Tables: the ledger ----------------------------------------------------- */
.table {
  color: var(--ink);
  border-color: rgba(122, 63, 20, 0.25);
  --bs-table-striped-color: var(--ink);
  --bs-table-striped-bg: rgba(122, 63, 20, 0.06);
  margin-bottom: 0;
}
.table > :not(caption) > * > * {
  background: transparent;
  color: var(--ink);
  border-bottom-color: rgba(122, 63, 20, 0.18);
  box-shadow: none;
}
.table thead th {
  font-family: var(--f-head);
  font-size: 0.9rem;
  color: var(--wood-dark);
  border-bottom: 2px solid rgba(122, 63, 20, 0.4);
  vertical-align: middle;
  background: transparent;
}
.table thead th a { color: var(--wood-dark); }
.table thead th a:hover { color: var(--gold-deep); }
.table tbody td { vertical-align: middle; }

/* Numbers are coins: the pixel-mono face in coin gold-brown. */
.balance-column { font-family: var(--f-mono); font-size: 1.25rem; color: var(--gold-deep); }
.badge { font-family: var(--f-mono); font-size: 0.95rem; letter-spacing: 0.5px; }

/* Income rows: fresh-grass band with a leaf-green rim. */
.income-row td { background-color: var(--grass-soft) !important; }
.income-row td:first-child { border-left: 4px solid #65be44; }
.compact-row td { padding: 0.35rem 0.5rem; }

/* --- Lists, badges, alerts -------------------------------------------------- */
.list-group-item {
  background: rgba(255, 250, 240, 0.55);
  border-color: rgba(122, 63, 20, 0.25);
  color: var(--ink);
}
.badge { border-radius: 8px; border: 2px solid; padding: 0.3em 0.6em; }
.badge.bg-primary { background: #fffaf0 !important; color: var(--gold-deep); border-color: var(--gold); }
.badge.bg-success { background: #eaf7df !important; color: var(--grass); border-color: #65be44; }
.badge.bg-danger { background: #fdeae5 !important; color: var(--tomato); border-color: #e06546; }

.alert {
  border-radius: var(--round);
  border: 3px solid;
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(74, 44, 21, 0.25);
}
.alert-success { background: #eaf7df; border-color: #65be44; color: #2e6d1f; }
.alert-danger { background: #fdeae5; border-color: #e06546; color: #98301b; }

/* --- Home menu: hanging wooden signs ---------------------------------------- */
.home-container { padding: 2rem; text-align: center; width: 100%; }
.home-container p { color: var(--ink); font-size: 1.15rem; font-weight: 700; }
.menu-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  padding: 0 1rem;
}
.home-menu-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 215px;
  height: 215px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff7d9, var(--panel) 45%, var(--panel-2));
  border: 3px solid var(--wood-dark);
  box-shadow:
    inset 0 0 0 2px var(--sun),
    0 0 0 3px var(--wood),
    0 7px 0 3px var(--wood-edge),
    0 16px 22px rgba(74, 44, 21, 0.4);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.home-menu-button .menu-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--wood);
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.6);
}
.home-menu-button .menu-text {
  font-family: var(--f-head);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--wood-dark);
}
.home-menu-button:hover {
  transform: translateY(-5px);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 2px var(--sun),
    0 0 0 3px var(--wood),
    0 10px 0 3px var(--wood-edge),
    0 20px 26px rgba(74, 44, 21, 0.45);
}
.home-menu-button:hover .menu-icon { color: var(--gold); }
.home-menu-button:active {
  transform: translateY(3px);
  box-shadow: inset 0 0 0 2px var(--sun), 0 0 0 3px var(--wood), 0 2px 0 3px var(--wood-edge);
}

/* =========================================================================
   New-layout components (dashboard-first redesign)
   ========================================================================= */

.page { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }
.page-wide { max-width: 1320px; margin: 0 auto; }
.app-main { padding: 1.75rem 0 3.5rem; min-height: calc(100vh - 200px); position: relative; z-index: 1; }

/* Header row on every page */
.dash-greeting {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.dash-actions { display: flex; gap: 0.75rem; }

/* --- Stat chips: coin counters --------------------------------------------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stat-chip {
  border-radius: var(--round);
  background: linear-gradient(180deg, #fff7d9, var(--panel) 45%, var(--panel-2));
  border: 3px solid var(--wood-dark);
  box-shadow: inset 0 0 0 2px var(--sun), 0 0 0 3px var(--wood), 0 5px 0 2px var(--wood-edge), 0 10px 16px rgba(74, 44, 21, 0.3);
  padding: 0.7rem 1rem 0.55rem;
}
.stat-label {
  font-family: var(--f-head);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.stat-value { font-family: var(--f-mono); font-size: 1.9rem; line-height: 1.1; color: var(--gold-deep); }
.stat-up .stat-value { color: var(--grass); }
.stat-down .stat-value { color: var(--tomato); }
.stat-plain .stat-value { color: var(--ink); }

/* --- Callouts --------------------------------------------------------------- */
.callout {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  border-radius: var(--round);
  padding: 0.8rem 1.1rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  border: 3px solid;
  box-shadow: 0 4px 0 rgba(74, 44, 21, 0.25);
}
.callout i { font-size: 1.5rem; }
.callout-warn { background: #fff3d6; border-color: var(--gold); color: #7c5a10; }
.callout-warn a { color: #9c5a1e; }

/* --- Upcoming list ----------------------------------------------------------- */
.upcoming { list-style: none; margin: 0; padding: 0; }
.upcoming li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 2px dashed rgba(122, 63, 20, 0.18);
}
.upcoming li:last-child { border-bottom: none; }
.up-icon {
  flex: none;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid;
  font-size: 0.85rem;
}
.up-in { background: #eaf7df; color: var(--grass); border-color: #65be44; }
.up-out { background: #fdeae5; color: var(--tomato); border-color: #e06546; }
.up-main { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.up-main a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-main small { color: var(--ink-soft); }
.up-amount { margin-left: auto; font-family: var(--f-mono); font-size: 1.2rem; white-space: nowrap; }

/* --- Account cards ----------------------------------------------------------- */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}
.account-grid-lg { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.account-card {
  display: block;
  border-radius: var(--round);
  background: linear-gradient(180deg, #fffaf0, #fff2c8);
  border: 2px solid rgba(122, 63, 20, 0.45);
  box-shadow: 0 3px 0 rgba(122, 63, 20, 0.35);
  padding: 0.8rem 1rem;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s;
}
a.account-card:hover { transform: translateY(-3px); box-shadow: 0 6px 0 rgba(122, 63, 20, 0.35); color: var(--ink); }
.account-card-full {
  border: 3px solid var(--wood-dark);
  box-shadow: inset 0 0 0 2px var(--sun), 0 0 0 3px var(--wood), 0 5px 0 2px var(--wood-edge), 0 10px 16px rgba(74, 44, 21, 0.3);
  background: linear-gradient(180deg, #fff7d9, var(--panel) 45%, var(--panel-2));
  padding: 1rem 1.1rem;
}
.ac-type {
  font-family: var(--f-head);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ac-name { font-family: var(--f-head); font-size: 1.1rem; font-weight: 700; margin: 0.1rem 0 0.25rem; }
.ac-balance { font-family: var(--f-mono); font-size: 1.5rem; color: var(--gold-deep); display: flex; align-items: center; gap: 0.35rem; }
.ac-meta { color: var(--ink-soft); font-size: 0.85rem; margin-top: 0.15rem; }
.ac-actions { display: flex; gap: 0.5rem; margin-top: 0.7rem; }

/* --- Ledger table ------------------------------------------------------------ */
.ledger thead th { white-space: nowrap; }
.ledger td small { line-height: 1.2; }
.ledger-edit { max-width: 210px; }
.ledger-edit .form-control { padding: 0.3rem 0.5rem; font-size: 0.9rem; }
.chip {
  display: inline-block;
  font-family: var(--f-head);
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(160, 90, 44, 0.12);
  border: 1.5px solid rgba(122, 63, 20, 0.35);
  color: var(--wood-dark);
  white-space: nowrap;
}
.btn-icon { padding: 4px 9px; }
.amt-in { color: var(--grass) !important; background: #eaf7df !important; }
.amt-out { color: var(--tomato) !important; background: #fdeae5 !important; }
.balance-neg { color: var(--tomato) !important; }
.balance-low { color: var(--gold-deep) !important; }
.balance-low::after { content: " ⚠"; }

/* --- Chart ------------------------------------------------------------------- */
.chart-wrap { width: 100%; }
.balance-chart {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, rgba(122, 63, 20, 0.06) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, #fffaf0, #fdf3d3);
  border: 2px solid rgba(122, 63, 20, 0.3);
  box-shadow: inset 0 2px 5px rgba(122, 63, 20, 0.15);
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.chart-legend .ms-auto { margin-left: auto; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.dot-green { background: #3f9134; }
.dot-gold { background: var(--gold); }

/* --- Empty states ------------------------------------------------------------ */
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--ink-soft); font-weight: 600; }
.empty-state p { margin: 0.75rem auto 1rem; max-width: 420px; }
.empty-state.small { padding: 1rem; }

/* --- Landing hero ------------------------------------------------------------ */
.hero { text-align: center; padding: 4rem 1.25rem 3rem; max-width: 760px; margin: 0 auto; }
.hero-art { margin-bottom: 0.5rem; filter: drop-shadow(0 6px 0 rgba(74, 44, 21, 0.25)); }
.hero-title {
  font-family: var(--f-head);
  font-size: clamp(3rem, 9vw, 5rem);
  letter-spacing: 3px;
  color: var(--wood-dark);
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.7), 0 6px 0 rgba(122, 63, 20, 0.25);
  margin-bottom: 0.5rem;
}
.hero-sub { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-bottom: 1.75rem; }
.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.25rem;
}
.hero-points div {
  font-family: var(--f-head);
  font-size: 0.9rem;
  background: linear-gradient(180deg, #fff7d9, var(--panel));
  border: 2px solid rgba(122, 63, 20, 0.45);
  box-shadow: 0 3px 0 rgba(122, 63, 20, 0.35);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  color: var(--wood-dark);
}
.hero-points i { color: var(--grass); margin-right: 0.35rem; }

/* --- Hills + footer ---------------------------------------------------------- */
.hills { position: fixed; left: 0; right: 0; bottom: 0; z-index: 0; pointer-events: none; }
.hills svg { display: block; width: 100%; height: 110px; }
footer {
  position: relative;
  z-index: 1;
  padding: 0.8rem 0;
  background: linear-gradient(180deg, var(--wood-hi), var(--wood) 55%, #8a4a20);
  border-top: 4px solid var(--wood-edge);
  color: #ffe9ac;
  font-family: var(--f-head);
  text-shadow: 0 1px 0 rgba(91, 43, 14, 0.7);
}

/* Sticky navbar sits above everything */
.sticky-top { z-index: 1030; }

/* Coin svg baseline alignment */
.coin { vertical-align: -3px; }

/* Stat numbers inside old-style cards (settings etc.) */
.card-body h2 { font-family: var(--f-mono); font-size: 2rem; }
.card-body h5 { font-size: 1rem; color: var(--ink-soft); }
