:root{
  --bg: #0b0d0c;
  --bg-elev: #141715;
  --bg-elev-2: #1b1f1c;
  --line: #262b27;
  --text: #e9efe9;
  --text-dim: #8a9690;
  --text-faint: #566158;
  --accent: #e5484d;
  --accent-dim: #e5484daa;
  --accent-glow: #e5484d30;
  --warn: #ffb84d;
  --danger: #ff5d5d;
  --good: #6fe3a0;
  --radius: 14px;
  --radius-sm: 8px;
  font-family: 'JetBrains Mono', monospace;
}

[data-theme="light"]{
  --bg: #ffffff;
  --bg-elev: #f7f7f7;
  --bg-elev-2: #ececec;
  --line: #e0e0e0;
  --text: #17181a;
  --text-dim: #63666b;
  --text-faint: #9a9da2;
}

*{box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent;}

html,body{
  height:100%;
  background: var(--bg);
  color: var(--text);
  overflow-x:hidden;
  font-family:'JetBrains Mono', monospace;
}

body{
  background-image:
    radial-gradient(circle at 15% 0%, rgba(180,255,57,0.05), transparent 40%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px);
}

.scan{ display:none; }

#app{ max-width:520px; margin:0 auto; min-height:100vh; position:relative; }

.hidden{ display:none !important; }

/* ---------- ONBOARDING ---------- */
#onboarding{
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  padding:24px;
}
.onboard-inner{ width:100%; max-width:400px; }

.brand{ display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.brand-mark{ color:var(--accent); font-size:20px; text-shadow:0 0 12px var(--accent-glow); }
.brand-mark.small{ font-size:16px; }
h1{
  font-family:'JetBrains Mono', monospace;
  font-weight:700;
  font-size:32px;
  letter-spacing:4px;
  color:var(--text);
}
.tag{
  color:var(--text-dim);
  font-size:13px;
  letter-spacing:0.5px;
  margin-bottom:36px;
}

.field-group{ margin-bottom:24px; }
.field-group label{
  display:block;
  font-size:11px;
  letter-spacing:1.5px;
  color:var(--text-faint);
  text-transform:uppercase;
  margin-bottom:10px;
  font-weight:600;
}
.row{ display:flex; align-items:center; gap:10px; }
.per{ color:var(--text-dim); font-size:13px; white-space:nowrap; }

.input-wrap{
  display:flex; align-items:center;
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:0 14px;
  transition:border-color 0.15s;
  flex:1;
}
.input-wrap:focus-within{ border-color:var(--accent-dim); }
.input-wrap.small{ flex:0 0 90px; }
.input-wrap.large{
  padding:18px 20px;
  margin-bottom:20px;
  border-radius:var(--radius);
}
.input-wrap .prefix{ color:var(--text-dim); font-size:16px; margin-right:6px; font-weight:600; }
.input-wrap.large .prefix{ font-size:28px; }
.input-wrap input{
  background:none; border:none; outline:none;
  color:var(--text);
  font-family:'JetBrains Mono', monospace;
  font-size:16px;
  font-weight:600;
  padding:14px 0;
  width:100%;
}
.input-wrap.large input{ font-size:32px; padding:0; }

.input-wrap.shake{ animation: shake-x 0.35s ease; border-color:var(--danger); }
@keyframes shake-x{
  0%,100%{ transform:translateX(0); }
  20%{ transform:translateX(-6px); }
  40%{ transform:translateX(5px); }
  60%{ transform:translateX(-4px); }
  80%{ transform:translateX(3px); }
}

.btn-primary{
  width:100%;
  background:var(--accent);
  color:#0b0d0c;
  border:none;
  border-radius:var(--radius-sm);
  padding:16px;
  font-family:'JetBrains Mono', monospace;
  font-weight:700;
  font-size:14px;
  letter-spacing:1.5px;
  cursor:pointer;
  margin-top:8px;
  transition:transform 0.1s, box-shadow 0.15s;
  box-shadow:0 0 0 rgba(180,255,57,0);
}
.btn-primary:active{ transform:scale(0.98); }
.btn-primary:hover{ box-shadow:0 4px 20px var(--accent-glow); }

.btn-ghost{
  width:100%;
  background:none;
  border:1px solid var(--line);
  color:var(--text-dim);
  border-radius:var(--radius-sm);
  padding:14px;
  font-family:'JetBrains Mono', monospace;
  font-weight:600;
  font-size:13px;
  letter-spacing:1px;
  cursor:pointer;
  margin-top:10px;
}
.btn-ghost:active{ background:var(--bg-elev); }

.btn-danger{
  width:100%;
  background:none;
  border:1px solid rgba(255,93,93,0.3);
  color:var(--danger);
  border-radius:var(--radius-sm);
  padding:14px;
  font-family:'JetBrains Mono', monospace;
  font-weight:600;
  font-size:13px;
  letter-spacing:1px;
  cursor:pointer;
  margin-top:10px;
}

#settings-sheet .field-group{ margin-bottom:16px; }
#settings-sheet .sheet-panel h2{ margin-bottom:14px; }

/* ---------- SETTINGS SHEET LAYOUT ---------- */
#settings-sheet .sheet-panel{
  display:flex; flex-direction:column;
  padding-bottom:0;
}
.settings-scroll{
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  max-height:60vh;
  padding-bottom:4px;
}
.settings-section{
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  margin-bottom:10px;
  background:var(--bg-elev-2);
  overflow:hidden;
}
.settings-section summary{
  list-style:none;
  cursor:pointer;
  padding:14px 16px;
  font-weight:700;
  font-size:12px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:var(--text-dim);
  display:flex; align-items:center; justify-content:space-between;
  -webkit-tap-highlight-color:transparent;
}
.settings-section summary::-webkit-details-marker{ display:none; }
.settings-section summary::after{
  content:"›";
  transform:rotate(90deg);
  transition:transform 0.15s;
  color:var(--text-faint);
  font-size:16px;
}
.settings-section[open] summary::after{ transform:rotate(-90deg); }
.settings-section[open] summary{ color:var(--text); border-bottom:1px solid var(--line); }
.settings-section-body{ padding:16px; }
.settings-section-body .field-group:last-child{ margin-bottom:0; }
.settings-section.danger-section{ background:rgba(255,93,93,0.05); }
.settings-section.danger-section .btn-danger:first-child{ margin-top:0; }

.settings-footer{
  position:sticky; bottom:0;
  background:var(--bg-elev);
  padding:14px 0 24px;
  border-top:1px solid var(--line);
  margin-top:4px;
}
.settings-footer .btn-ghost{ margin-top:8px; }

.appearance-row{
  display:flex; align-items:center; gap:10px;
  flex-wrap:nowrap;
  overflow-x:auto;
}
.appearance-divider{
  width:1px; align-self:stretch; min-height:38px;
  background:var(--line);
  flex:0 0 auto;
}
.appearance-row .theme-icon-toggle{ margin-bottom:0; flex:0 0 auto; }
.appearance-row .accent-picker{ margin-bottom:0; flex:0 0 auto; }

.btn-danger.severe{
  background:rgba(255,93,93,0.12);
  border-color:var(--danger);
  font-weight:700;
}

/* ---------- TOPBAR ---------- */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 20px 10px;
}
.topbar-left{ display:flex; align-items:center; gap:8px; }
.brand-name{ font-weight:700; letter-spacing:3px; font-size:15px; }
.icon-btn{
  background:var(--bg-elev);
  border:1px solid var(--line);
  color:var(--text-dim);
  width:36px; height:36px;
  border-radius:var(--radius-sm);
  font-size:15px;
  cursor:pointer;
}

/* ---------- TABBAR ---------- */
.tabbar{
  display:flex; gap:6px;
  margin:14px 20px 4px;
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:10px;
  padding:4px;
}
.tab-btn{
  flex:1;
  background:none; border:none;
  color:var(--text-faint);
  font-family:'JetBrains Mono', monospace;
  font-weight:700;
  font-size:11px;
  letter-spacing:1.2px;
  padding:10px 0;
  border-radius:7px;
  cursor:pointer;
}
.tab-btn.active{
  background:var(--accent-glow);
  color:var(--accent);
}
.tab-panel.hidden{ display:none; }

/* ---------- CALENDAR ---------- */
.cal-card{
  margin:16px 20px 0;
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
}
.cal-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.icon-btn.small{ width:30px; height:30px; font-size:14px; }
.cal-month-label{ font-weight:700; letter-spacing:1.5px; font-size:13px; }
.cal-weekdays{
  display:grid; grid-template-columns:repeat(7,1fr);
  text-align:center; font-size:10px; color:var(--text-faint); font-weight:700;
  margin-bottom:8px;
}
.cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.cal-day{
  aspect-ratio:1;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  border-radius:8px;
  font-size:12px;
  font-weight:600;
  color:var(--text-dim);
  cursor:pointer;
  position:relative;
  background:var(--bg-elev-2);
}
.cal-day.empty{ background:none; cursor:default; }
.cal-day.today{ box-shadow:inset 0 0 0 1px var(--accent-dim); }
.cal-day.selected{ background:var(--accent-glow); color:var(--accent); }
.cal-day .dot{
  width:5px; height:5px; border-radius:50%;
  margin-top:3px;
  background:var(--good);
}
.cal-day .dot.warn{ background:var(--warn); }
.cal-day .dot.danger{ background:var(--danger); }
.cal-legend{
  display:flex; align-items:center; gap:6px;
  margin-top:14px; font-size:10px; color:var(--text-faint);
}
.legend-dot{ width:6px; height:6px; border-radius:50%; background:var(--good); }
.legend-dot.warn{ background:var(--warn); margin-left:10px; }

/* ---------- STATS ---------- */
.stats-grid{
  display:grid; grid-template-columns:1fr 1fr;
  gap:10px; padding:16px 20px 0;
}
.stat-card{
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:16px;
}
.stat-card .stat-label{ font-size:10px; letter-spacing:1px; color:var(--text-faint); font-weight:600; margin-bottom:8px; }
.stat-card .stat-value{ font-size:22px; font-weight:700; font-family:'JetBrains Mono', monospace; }
.stat-card .stat-value.good{ color:var(--good); }
.stat-card .stat-value.accent{ color:var(--accent); }

.history-list{ padding:0 20px 100px; display:flex; flex-direction:column; gap:8px; }
.history-item{
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:14px 16px;
  display:flex; justify-content:space-between; align-items:center;
}
.history-left .history-date{ font-size:13px; font-weight:600; }
.history-left .history-sub{ font-size:11px; color:var(--text-faint); margin-top:2px; }
.history-leftover{ font-family:'JetBrains Mono', monospace; font-weight:700; font-size:14px; }
.history-leftover.neg{ color:var(--danger); }
.history-leftover.pos{ color:var(--good); }

/* ---------- QUICK AMOUNTS ---------- */
.quick-amounts{ display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.quick-chip{
  padding:8px 14px;
  border-radius:20px;
  border:1px solid var(--line);
  background:var(--bg-elev-2);
  color:var(--text-dim);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  font-family:'JetBrains Mono', monospace;
}
.quick-chip:active{ background:var(--accent-glow); color:var(--accent); border-color:var(--accent-dim); }

/* ---------- ACCENT PICKER ---------- */
.accent-picker{ display:flex; gap:8px; flex-wrap:nowrap; margin-bottom:12px; }
.accent-swatch{
  width:28px; height:28px; border-radius:50%;
  cursor:pointer;
  border:2px solid transparent;
  flex:0 0 auto;
}
.accent-swatch.selected{ border-color:var(--text); }

/* ---------- THEME ICON TOGGLE ---------- */
.theme-icon-toggle{ display:flex; gap:8px; margin-bottom:14px; }
.theme-icon-btn{
  width:38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  border-radius:10px;
  border:1px solid var(--line);
  background:var(--bg-elev-2);
  color:var(--text-dim);
  cursor:pointer;
  flex:0 0 auto;
}
.theme-icon-btn svg{ width:18px; height:18px; }
.theme-icon-btn.selected{
  background:var(--accent-glow);
  border-color:var(--accent-dim);
  color:var(--accent);
}

.auto-save-btn{
  width:auto; flex:0 0 auto;
  margin-top:0;
  padding:0 14px;
  white-space:nowrap;
  font-size:11px;
}

.env-edit-row input.env-color{
  flex:0 0 40px;
  padding:4px;
  border:1px solid var(--line);
  background:var(--bg-elev-2);
  border-radius:8px;
  height:38px;
}

/* ---------- CYCLE CARD ---------- */
.cycle-card{
  margin:8px 20px 0;
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:20px;
  position:relative;
  overflow:hidden;
}
.cycle-card::before{
  content:"";
  position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg, transparent, var(--accent-dim), transparent);
}
.cycle-top{ display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:16px; }
.eyebrow{
  font-size:10px; letter-spacing:2px; color:var(--text-faint); font-weight:600; margin-bottom:4px;
}
.cycle-days{ font-size:20px; font-weight:700; letter-spacing:0.5px; }
.cycle-status{
  font-size:10px; letter-spacing:1px; font-weight:700;
  background:rgba(111,227,160,0.12);
  color:var(--good);
  padding:6px 10px;
  border-radius:20px;
  white-space:nowrap;
}
.cycle-status.warn{ background:rgba(255,184,77,0.12); color:var(--warn); }
.cycle-status.danger{ background:rgba(255,93,93,0.12); color:var(--danger); }

.cycle-bar-wrap{
  height:8px;
  background:var(--bg-elev-2);
  border-radius:20px;
  overflow:hidden;
  margin-bottom:20px;
}
.cycle-bar{
  height:100%;
  background:linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius:20px;
  width:0%;
  transition:width 0.4s ease;
}
.cycle-bar.warn{ background:linear-gradient(90deg, #b8862f, var(--warn)); }
.cycle-bar.danger{ background:linear-gradient(90deg, #a83f3f, var(--danger)); }

.cycle-nums{ display:flex; justify-content:space-between; }
.num-block{ text-align:left; }
.num-label{ font-size:9px; letter-spacing:1.5px; color:var(--text-faint); margin-bottom:4px; font-weight:600; }
.num-value{ font-size:18px; font-weight:700; font-family:'JetBrains Mono', monospace; }
.num-value.accent{ color:var(--accent); }
.num-value.good{ color:var(--good); }

.rec-per-day{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--line);
  font-size:11px;
  letter-spacing:0.3px;
  color:var(--text-faint);
  font-family:'JetBrains Mono', monospace;
  text-align:center;
}
.rec-per-day .rec-amt{ color:var(--accent); font-weight:700; font-size:13px; }
.rec-per-day.over .rec-amt{ color:var(--danger); }

/* ---------- SECTIONS ---------- */
.section-label{
  font-size:11px; letter-spacing:2px; color:var(--text-faint); font-weight:700;
  margin:28px 20px 12px;
}

.envelopes{ padding:0 20px; display:flex; flex-direction:column; gap:10px; }

.envelope-card{
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:14px 16px;
}
.envelope-top{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.envelope-name{ font-weight:600; font-size:14px; letter-spacing:0.3px; display:flex; align-items:center; gap:8px; }
.envelope-dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.envelope-nums{ font-family:'JetBrains Mono', monospace; font-size:12px; color:var(--text-dim); }
.envelope-nums .used{ color:var(--text); }
.envelope-bar-wrap{ height:5px; background:var(--bg-elev-2); border-radius:20px; overflow:hidden; }
.envelope-bar{ height:100%; background:var(--accent-dim); border-radius:20px; transition:width 0.3s; }
.envelope-bar.over{ background:var(--danger); }
.envelope-left{ margin-top:6px; font-size:10px; letter-spacing:0.3px; color:var(--text-faint); font-family:'JetBrains Mono', monospace; text-align:right; }
.envelope-left.over{ color:var(--danger); }

/* ---------- LOG ---------- */
.log-list{ padding:0 20px 100px; display:flex; flex-direction:column; gap:8px; }
.log-empty{ color:var(--text-faint); font-size:13px; padding:20px 0; text-align:center; }

.search-input{
  margin:0 20px 12px;
  width:calc(100% - 40px);
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:10px 14px;
  color:var(--text);
  font-family:'JetBrains Mono', monospace;
  font-size:13px;
  outline:none;
}
.search-input:focus{ border-color:var(--accent-dim); }
.search-input::placeholder{ color:var(--text-faint); }

.log-item-wrap{
  position:relative;
  overflow:hidden;
  border-radius:var(--radius-sm);
}
.log-item-delete-bg{
  position:absolute;
  inset:0;
  background:var(--danger);
  border-radius:var(--radius-sm);
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding-right:18px;
  color:#fff;
  font-size:12px;
  font-weight:700;
  letter-spacing:0.5px;
}
.log-item{
  display:flex; align-items:center; justify-content:space-between;
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  position:relative;
  transition:transform 0.15s ease;
  touch-action:pan-y;
}
.log-item.recurring{ border-left:2px solid var(--accent-dim); }
.log-left{ display:flex; flex-direction:column; gap:2px; }
.log-note{ font-size:13px; font-weight:600; }
.log-meta{ font-size:11px; color:var(--text-faint); }
.log-amount{ font-family:'JetBrains Mono', monospace; font-weight:600; font-size:14px; }
.log-del{ background:none; border:none; color:var(--text-faint); font-size:16px; margin-left:10px; cursor:pointer; }

/* ---------- STATS CHART ---------- */
.chart-card{
  margin:0 20px 8px;
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:16px 14px 6px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:6px;
  height:140px;
}
.chart-bar-wrap{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  height:100%;
  gap:6px;
}
.chart-bar{
  width:100%;
  max-width:22px;
  border-radius:4px 4px 0 0;
  background:var(--accent-dim);
  min-height:2px;
  transition:height 0.3s ease;
}
.chart-bar.over{ background:var(--danger); }
.chart-bar-label{ font-size:9px; color:var(--text-faint); font-family:'JetBrains Mono', monospace; white-space:nowrap; }
.chart-empty{ color:var(--text-faint); font-size:13px; text-align:center; width:100%; }

/* ---------- SETTINGS EXTRAS ---------- */
.settings-hint{ font-size:11px; color:var(--text-faint); margin-top:8px; line-height:1.5; }
.recurring-edit-row{
  display:flex; gap:8px; margin-bottom:8px; align-items:center;
}
.recurring-edit-row input.rec-name{ flex:1.3; }
.recurring-edit-row select.rec-env{
  background:var(--bg-elev-2);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:10px 8px;
  color:var(--text);
  font-family:'JetBrains Mono', monospace;
  font-size:12px;
  outline:none;
  flex:1;
}
.recurring-edit-row input.rec-amt{ flex:0.8; }
.recurring-edit-row input{
  background:var(--bg-elev-2);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:10px 12px;
  color:var(--text);
  font-family:'JetBrains Mono', monospace;
  font-size:13px;
  outline:none;
}
.recurring-edit-row button{
  background:none; border:none; color:var(--text-faint); font-size:16px; cursor:pointer; padding:0 6px;
}

/* ---------- FAB ---------- */
.fab{
  position:fixed;
  bottom:28px; left:50%; transform:translateX(-50%);
  width:60px; height:60px;
  border-radius:50%;
  background:var(--accent);
  color:#0b0d0c;
  border:none;
  font-size:28px;
  font-weight:700;
  box-shadow:0 6px 24px var(--accent-glow), 0 2px 8px rgba(0,0,0,0.4);
  cursor:pointer;
  z-index:100;
}
.fab:active{ transform:translateX(-50%) scale(0.94); }

/* ---------- SHEETS ---------- */
.sheet{ position:fixed; inset:0; z-index:200; }
.sheet-backdrop{
  position:absolute; inset:0;
  background:rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
}
.sheet-panel{
  position:absolute; bottom:0; left:0; right:0;
  max-width:520px; margin:0 auto;
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-bottom:none;
  border-radius:20px 20px 0 0;
  padding:12px 20px 32px;
  max-height:92vh;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  animation: sheet-up 0.25s ease;
}
@keyframes sheet-up{ from{ transform:translateY(100%);} to{ transform:translateY(0);} }
.sheet-handle{
  width:36px; height:4px; background:var(--line); border-radius:4px;
  margin:6px auto 18px;
}
.sheet-panel h2{
  font-size:15px; letter-spacing:2px; font-weight:700; margin-bottom:20px;
}

.envelope-picker{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.env-chip{
  padding:9px 14px;
  border-radius:20px;
  border:1px solid var(--line);
  background:var(--bg-elev-2);
  color:var(--text-dim);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  font-family:'JetBrains Mono', monospace;
}
.env-chip.selected{
  background:var(--accent-glow);
  border-color:var(--accent-dim);
  color:var(--accent);
}

.note-input{
  width:100%;
  background:var(--bg-elev-2);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:14px;
  color:var(--text);
  font-family:'JetBrains Mono', monospace;
  font-size:14px;
  margin-bottom:16px;
  outline:none;
}
.note-input:focus{ border-color:var(--accent-dim); }

.date-field{ margin-bottom:16px; }
.date-input{
  width:100%;
  background:var(--bg-elev-2);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  color:var(--text);
  font-family:'JetBrains Mono', monospace;
  font-size:13px;
  outline:none;
  color-scheme:dark;
}
.date-input:focus{ border-color:var(--accent-dim); }
[data-theme="light"] .date-input{ color-scheme:light; }

.env-edit-row{
  display:flex; gap:8px; margin-bottom:8px;
}
.env-edit-row input{
  background:var(--bg-elev-2);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:10px 12px;
  color:var(--text);
  font-family:'JetBrains Mono', monospace;
  font-size:13px;
  outline:none;
}
.env-edit-row input.env-name{ flex:1.4; }
.env-edit-row input.env-amt{ flex:1; }
.env-edit-row button{
  background:none; border:none; color:var(--text-faint); font-size:16px; cursor:pointer; padding:0 6px;
}

@media (min-width: 600px){
  #app{ padding-bottom:20px; }
}

.undo-toast{
  position:fixed;
  left:50%;
  bottom:28px;
  transform:translate(-50%, 12px);
  background:var(--bg-elev);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:12px 14px 12px 16px;
  display:flex;
  align-items:center;
  gap:16px;
  font-size:13px;
  color:var(--text);
  box-shadow:0 8px 24px rgba(0,0,0,0.35);
  opacity:0;
  transition:opacity 0.2s ease, transform 0.2s ease;
  z-index:200;
}
.undo-toast.hidden{ display:none; }
.undo-toast.show{ opacity:1; transform:translate(-50%, 0); }
.undo-toast button{
  background:none;
  border:none;
  color:var(--accent);
  font-weight:700;
  letter-spacing:0.5px;
  font-size:13px;
  cursor:pointer;
  padding:0;
}