:root{
  --bg:#0D1117;
  --bg2:#161B26;
  --bg3:#1E2433;
  --bg4:#252D40;
  --accent:#2B7FEB;
  --accent-dim:rgba(43,127,235,0.15);
  --accent-dark:#1A6FD4;
  --dgreen:#1A7A4A;
  --dgreen-dim:rgba(26,122,74,0.18);
  --dgreen-bright:#22A05A;
  --text:#E8EAF0;
  --text2:#8A8F9E;
  --text3:#4A5568;
  --red:#FF5252;
  --red-dim:rgba(255,82,82,0.13);
  --green:#25D366;
  --green-dim:rgba(37,211,102,0.13);
  --amber:#FFB300;
  --amber-dim:rgba(255,179,0,0.13);
  --r:16px;
  --r-sm:10px;
  --grd-blue:linear-gradient(135deg,#1A2744 0%,#1E2D50 100%);
  --grd-green:linear-gradient(135deg,#0D2118 0%,#122A1E 100%);
  --grd-card:linear-gradient(160deg,#161B26 0%,#1A2030 100%);
  --grd-profit:linear-gradient(145deg,#0F1E3A 0%,#152848 60%,#1A3055 100%);
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased}
html,body{height:100%;overflow:hidden;background:#000}
body{font-family:'Plus Jakarta Sans',sans-serif;color:var(--text);display:flex;justify-content:center;align-items:center}
.shell{
  width:100%;max-width:420px;height:100dvh;
  display:flex;flex-direction:column;
  background:var(--bg);
  position:relative;overflow:hidden;
}

/* ── TOPBAR ── */
.topbar{
  padding:16px 16px 10px;
  display:flex;align-items:center;justify-content:space-between;
  flex-shrink:0;z-index:10;
  background:linear-gradient(180deg,#0D1117 0%,rgba(13,17,23,0.95) 100%);
  
}
.app-name{font-size:22px;font-weight:700;letter-spacing:-0.5px}
.app-name .nora{color:var(--accent)}
.app-name .flow{color:var(--dgreen)}
.page-title{font-size:17px;font-weight:700;color:#fff;letter-spacing:-0.2px}
.topbar-right{display:flex;align-items:center;gap:10px}
.tb-icon{width:36px;height:36px;border-radius:50%;background:var(--bg3);display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;transition:background 0.15s}
.tb-icon:active{background:var(--bg4)}
.tb-icon svg{width:18px;height:18px;stroke:var(--text2);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.profile-btn{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#2B7FEB,#1A5FC0);display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;font-size:14px;font-weight:800;color:#fff;box-shadow:0 2px 6px rgba(0,0,0,0.3)}

/* ── SEARCH BAR (slides in) ── */
.search-bar{
  display:flex;align-items:center;gap:10px;
  margin:0 16px 10px;
  background:rgba(0,0,0,0.28);
  border-radius:var(--r-sm);padding:10px 14px;
  box-shadow:inset 0 1px 3px rgba(0,0,0,0.3);
}
.search-bar svg{width:16px;height:16px;stroke:var(--text3);fill:none;stroke-width:2;stroke-linecap:round;flex-shrink:0}
.search-bar input{flex:1;background:none;border:none;outline:none;font-size:14px;color:var(--text);font-family:inherit}
.search-bar input::placeholder{color:var(--text3)}

/* ── PAGES — horizontal swipe ── */
.pages-wrap{
  flex:1;display:flex;overflow:hidden;position:relative;
}
.pages-track {
  display: flex;
  width: 400%;
  height: 100%;
  flex: 0 0 400%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.page {
  width: 25%;
  min-width: 25%;
  max-width: 25%;
  flex: 0 0 25%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 100px;
  background: linear-gradient(
    180deg,
    rgba(43,127,235,0.04) 0%,
    transparent 120px
  );
}
.page::-webkit-scrollbar{display:none}

/* ── FLOATING NAV ── */
.floatnav{
  position:absolute;bottom:20px;left:50%;transform:translateX(-50%);
  display:flex;align-items:center;gap:2px;
  background:rgba(16,22,36,0.92);
  backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);
  border-radius:100px;
  padding:6px 6px 6px 12px;
  z-index:100;
  box-shadow:0 8px 32px rgba(0,0,0,0.6),inset 0 1px 0 rgba(255,255,255,0.05);
}
.nav-item{
  display:flex;flex-direction:column;align-items:center;
  padding:8px 14px;border-radius:100px;cursor:pointer;
  color:var(--text3);transition:all 0.2s;border:none;background:none;
  gap:3px;
}
.nav-item.active{color:#fff}
.nav-item svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-item span{font-size:9px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase}
.nav-add{
  width:48px;height:48px;border-radius:50%;
  background:linear-gradient(135deg,#2B7FEB,#1A5FC0);display:flex;align-items:center;justify-content:center;
  cursor:pointer;border:none;margin-left:6px;flex-shrink:0;
  box-shadow:0 4px 12px rgba(0,0,0,0.4);
  transition:transform 0.15s;
}
.nav-add:active{transform:scale(0.94)}
.nav-add svg{width:22px;height:22px;stroke:#fff;fill:none;stroke-width:2.5;stroke-linecap:round}

/* ── SECTION CARDS ── */
.sec{background:var(--grd-card);border-radius:var(--r);margin:0 12px 10px;padding:18px;box-shadow:0 2px 12px rgba(0,0,0,0.3)}
.sec-sm{background:var(--grd-card);border-radius:var(--r);margin:0 12px 10px;padding:14px 16px;box-shadow:0 2px 12px rgba(0,0,0,0.3)}
.sec-bare{margin:0 12px 10px}
.sec-title{font-size:11px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:0.08em;margin-bottom:10px}
.sec-heading{font-size:18px;font-weight:800;color:#fff;margin-bottom:6px;letter-spacing:-0.3px}

/* ── HOME PAGE ── */
.profile-hero{padding:4px 12px 14px;display:flex;align-items:center;gap:14px}
.profile-avatar{width:54px;height:54px;border-radius:50%;background:var(--dgreen);display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;color:#fff;flex-shrink:0}
.profile-info .name{font-size:17px;font-weight:700;color:#fff;letter-spacing:-0.2px}
.profile-info .biz{font-size:13px;color:var(--text2);margin-top:2px}
.profile-info .loc{font-size:12px;color:var(--text3);margin-top:1px;display:flex;align-items:center;gap:4px}

/* Total profit big card */
.profit-hero{background:var(--grd-profit);border-radius:var(--r);margin:0 12px 10px;padding:20px;box-shadow:0 4px 16px rgba(0,0,0,0.4);}
.profit-hero .label{font-size:11px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:0.08em;margin-bottom:8px}
.profit-hero .amount{font-size:34px;font-weight:700;color:#fff;letter-spacing:-1px;line-height:1}
.profit-hero .sub{font-size:13px;color:var(--text2);margin-top:6px}
.profit-hero .stats-row{display:flex;gap:0;margin-top:16px;padding-top:14px;border-top:1px solid rgba(255,255,255,0.05)}
.stat-item{flex:1;text-align:center}
.stat-item:not(:last-child){border-right:1px solid rgba(255,255,255,0.05)}
.stat-item .sv{font-size:15px;font-weight:600;color:#fff}
.stat-item .sl{font-size:10px;color:var(--text3);margin-top:2px}

/* Break-even */
.be-row{display:flex;align-items:center;gap:16px;padding:0 12px 10px}
.be-ring-wrap{position:relative;width:70px;height:70px;flex-shrink:0}
.be-ring-svg{width:70px;height:70px;transform:rotate(-90deg)}
.be-track{fill:none;stroke:var(--bg3);stroke-width:7}
.be-fill{fill:none;stroke-width:7;stroke-linecap:round;transition:stroke-dashoffset 0.8s ease}
.be-ring-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;color:#fff}
.be-info .be-title{font-size:15px;font-weight:600;color:#fff}
.be-info .be-sub{font-size:12px;color:var(--text2);margin-top:3px;line-height:1.5}

/* Chart */
.chart-sec{background:var(--grd-card);border-radius:var(--r);margin:0 12px 10px;padding:18px;box-shadow:0 2px 16px rgba(0,0,0,0.35)}
.chart-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.chart-header .ch-title{font-size:15px;font-weight:600;color:#fff}
.chart-header .ch-sub{font-size:11px;color:var(--text3)}
canvas.linechart{width:100%;height:110px;display:block}

/* Month accordion */
.month-group{margin:0 12px 8px}
.month-btn{width:100%;display:flex;align-items:center;justify-content:space-between;background:var(--grd-card);border-radius:var(--r-sm);padding:14px 16px;cursor:pointer;border:none;color:inherit;box-shadow:0 2px 8px rgba(0,0,0,0.25)}
.month-btn .mb-name{font-size:15px;font-weight:600;color:#fff}
.month-btn .mb-amt{font-size:14px;font-weight:700;color:var(--accent)}
.month-btn .mb-chev{width:16px;height:16px;stroke:var(--text3);fill:none;stroke-width:2;stroke-linecap:round;transition:transform 0.2s}
.month-body{display:none;background:rgba(20,27,42,0.9);border-radius:0 0 var(--r-sm) var(--r-sm);overflow:hidden}
.month-body.open{display:block}
.month-day-row{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-top:1px solid rgba(255,255,255,0.04)}
.mdr-date{font-size:13px;color:var(--text2)}
/* OG history row style */
.og-hist-row{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid rgba(255,255,255,0.04)}
.og-hist-row:last-child{border-bottom:none}
.og-hist-left{flex:1;min-width:0}
.og-hist-profit{font-size:15px;font-weight:600;color:var(--text)}
.og-hist-tzs{font-size:12px;font-weight:400;color:var(--text2)}
.og-hist-date{font-size:12px;color:var(--text2);margin-top:3px}
.og-hist-pct{font-size:12px;font-weight:700;padding:3px 10px;border-radius:100px;flex-shrink:0;margin-left:10px}
body.light-theme .og-hist-row{border-bottom:1px solid rgba(0,0,0,0.05)}
body.light-theme .og-hist-profit{color:#0D1117}
body.light-theme .og-hist-tzs{color:#6B7280}
body.light-theme .og-hist-date{color:#3A4255}
.mdr-profit{font-size:14px;font-weight:700;color:#fff}
.mdr-pct{font-size:11px;font-weight:700;padding:2px 8px;border-radius:100px;background:var(--green-dim);color:var(--green)}

/* ── PROFIT PAGE ── */
.profit-main-card{background:var(--grd-profit);border-radius:var(--r);margin:0 12px 10px;padding:20px;box-shadow:0 4px 24px rgba(43,127,235,0.15),0 1px 0 rgba(43,127,235,0.2)}

.pmc-profit{font-size:52px;font-weight:700;color:#fff;letter-spacing:-2px;line-height:1}
.pmc-profit.dim{color:var(--text3)}
.pmc-divider{height:1px;background:rgba(255,255,255,0.06);margin:18px 0}
/* Loading bar animation */
@keyframes calcPulse{
  0%{width:0%;opacity:1}
  60%{width:85%;opacity:1}
  90%{width:95%;opacity:0.6}
  100%{width:100%;opacity:0}
}
@keyframes calcFadeIn{
  from{opacity:0;transform:translateY(4px)}
  to{opacity:1;transform:translateY(0)}
}
.calc-loader-wrap{text-align:center;padding:8px 0 4px}
.calc-loader-bar-wrap{height:3px;background:rgba(255,255,255,0.06);border-radius:100px;overflow:hidden;margin:10px 0 8px}
.calc-loader-bar{height:100%;background:linear-gradient(90deg,var(--dgreen),var(--accent));border-radius:100px;width:0%;animation:calcPulse 1.1s cubic-bezier(0.4,0,0.2,1) forwards}
.calc-loader-dots span{display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--text3);margin:0 3px;animation:dotBounce 0.9s infinite ease-in-out}
.calc-loader-dots span:nth-child(2){animation-delay:0.15s}
.calc-loader-dots span:nth-child(3){animation-delay:0.3s}
@keyframes dotBounce{0%,80%,100%{transform:scale(0.6);opacity:0.3}40%{transform:scale(1);opacity:1}}
.calc-result{animation:calcFadeIn 0.35s ease forwards}
.pmc-input-wrap{background:rgba(0,0,0,0.4);border-radius:var(--r-sm);padding:12px 14px 14px;box-shadow:inset 0 2px 4px rgba(0,0,0,0.5);transition:border-color 0.2s,background 0.2s;border:1.5px solid rgba(255,255,255,0.05)}
.pmc-input-wrap.active{background:rgba(0,0,0,0.55);border-color:rgba(43,127,235,0.5)}
.pmc-input-label{font-size:10px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:0.07em;margin-bottom:6px}
.pmc-input{width:100%;background:none;border:none;outline:none;font-size:18px;font-weight:700;color:#fff;font-family:inherit}
.pmc-input::placeholder{color:var(--text3)}
.save-btn{width:100%;margin-top:12px;padding:15px;background:var(--accent);border:none;border-radius:var(--r-sm);font-size:15px;font-weight:600;color:#fff;cursor:pointer;font-family:inherit;transition:opacity 0.15s}
.save-btn:disabled{opacity:0.3;cursor:default}
.save-btn:not(:disabled):active{opacity:0.85}

/* Recent week */
.week-row{display:flex;align-items:center;padding:16px 16px;gap:12px;min-height:58px}
.wr-day{width:32px;font-size:11px;font-weight:700;color:var(--text3);text-transform:uppercase}
.wr-bar-wrap{flex:1;height:4px;background:var(--bg3);border-radius:100px;overflow:hidden}
.wr-bar{height:100%;background:linear-gradient(90deg,#1A7A4A,#22A05A);border-radius:100px;transition:width 0.4s ease}
.wr-amt{font-size:14px;font-weight:700;color:#fff;text-align:right;min-width:80px}
.wr-edit{font-size:11px;color:var(--accent);cursor:pointer;padding:2px 6px}
.wr-blank{font-size:12px;color:var(--text3);font-style:italic;padding:6px 0;cursor:pointer}
.wr-countdown{font-size:10px;color:var(--amber);margin-top:3px;line-height:1.4}

/* ── PRODUCTS PAGE ── */
.prod-item{display:flex;align-items:center;padding:13px 16px;gap:13px;cursor:pointer;transition:background 0.1s;border-radius:var(--r-sm);margin:0 4px}
.prod-item:active{background:var(--bg3)}
.prod-avatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,rgba(43,127,235,0.2),rgba(43,127,235,0.08));display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;color:var(--accent);flex-shrink:0}
.prod-info{flex:1;min-width:0}
.prod-name{font-size:15px;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.prod-sub{font-size:12px;color:var(--text2);margin-top:2px;display:flex;align-items:center;gap:6px}
.tag-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
.pct-badge{font-size:12px;font-weight:700;padding:3px 9px;border-radius:100px}
.pct-good{background:var(--green-dim);color:var(--green)}
.pct-mid{background:var(--amber-dim);color:var(--amber)}
.pct-bad{background:var(--red-dim);color:var(--red)}
.prod-fab{position:absolute;bottom:90px;right:20px;width:48px;height:48px;border-radius:50%;background:var(--bg3);display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,0.4);z-index:20}
.prod-fab svg{width:20px;height:20px;stroke:var(--accent);fill:none;stroke-width:2.2;stroke-linecap:round}

/* ── SEASONS PAGE ── */
.seasons-section-title{font-size:20px;font-weight:800;color:#fff;padding:18px 16px 10px;letter-spacing:-0.3px}
.expense-row{display:flex;align-items:center;justify-content:space-between;padding:12px 0}
.expense-row:not(:last-child){border-bottom:1px solid rgba(255,255,255,0.05)}
.exp-name{font-size:14px;font-weight:500;color:#fff}
.exp-amount{font-size:14px;font-weight:700;color:var(--red)}
.exp-del{background:none;border:none;color:var(--text3);cursor:pointer;font-size:16px;padding:4px}
.season-card{background:var(--grd-green);border-radius:var(--r);margin:0 12px 8px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,0.3)}
.sc-header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;cursor:pointer}
.sc-name{font-size:15px;font-weight:600;color:#fff}
.sc-note{font-size:12px;color:var(--text2);margin-top:2px}
.sc-pills{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 14px}
.m-pill{font-size:11px;font-weight:700;padding:4px 10px;border-radius:100px;background:var(--dgreen-dim);color:var(--dgreen)}
.goal-card{background:var(--grd-card);border-radius:var(--r);margin:0 12px 8px;padding:16px;box-shadow:0 2px 12px rgba(0,0,0,0.3)}
.goal-name{font-size:16px;font-weight:600;color:#fff}
.goal-sub{font-size:12px;color:var(--text2);margin-top:2px;margin-bottom:10px}
.pbar-wrap{background:var(--bg3);border-radius:100px;height:6px;overflow:hidden;margin:8px 0}
.pbar-fill{height:100%;border-radius:100px;background:linear-gradient(90deg,#1A7A4A,#22A05A);transition:width 0.4s}
.pbar-fill.done{background:linear-gradient(90deg,#1A9A4A,#25D366)}
.goal-row{display:flex;justify-content:space-between;font-size:12px;color:var(--text2);margin-top:4px}
.goal-save-notice{background:var(--amber-dim);border-radius:var(--r-sm);padding:8px 12px;font-size:12px;color:var(--amber);margin-top:8px}
.goal-done-notice{background:var(--green-dim);border-radius:var(--r-sm);padding:8px 12px;font-size:12px;color:var(--green);margin-top:8px}
.add-ghost{width:100%;padding:13px;background:rgba(0,0,0,0.2);border:none;border-radius:var(--r-sm);font-size:13px;font-weight:600;color:var(--text2);cursor:pointer;font-family:inherit;text-align:center;transition:background 0.15s;margin-top:6px;box-shadow:inset 0 1px 0 rgba(255,255,255,0.05)}
.add-ghost:active{background:var(--bg4)}

/* ── SETTINGS PAGE (modal) ── */
.settings-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.7);z-index:300;display:none;align-items:flex-end;justify-content:center}
.settings-overlay.open{display:flex}
.settings-sheet{background:linear-gradient(180deg,#1A2236 0%,#141B26 100%);border-radius:20px 20px 0 0;width:100%;max-width:420px;padding:24px 20px 36px;animation:slideUp 0.25s ease;box-shadow:0 -4px 40px rgba(0,0,0,0.6)}
@keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
.settings-title{font-size:17px;font-weight:700;color:#fff;margin-bottom:20px}
.settings-field{margin-bottom:14px}
.settings-label{font-size:11px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:0.07em;margin-bottom:7px}
.settings-input{width:100%;background:rgba(0,0,0,0.3);border:none;border-radius:var(--r-sm);padding:13px 14px;font-size:15px;color:#fff;font-family:inherit;outline:none}
.settings-input:focus{box-shadow:0 0 0 2px var(--accent)}
.wa-list{margin-top:4px}
.wa-item{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid rgba(255,255,255,0.05);cursor:pointer}
.wa-icon{width:40px;height:40px;border-radius:50%;background:var(--bg3);display:flex;align-items:center;justify-content:center}
.wa-icon svg{width:20px;height:20px;stroke:var(--accent);fill:none;stroke-width:2;stroke-linecap:round}
.wa-text .wt{font-size:15px;font-weight:600;color:#fff}
.wa-text .ws{font-size:12px;color:var(--text2);margin-top:1px}
.wa-chev{margin-left:auto;width:16px;height:16px;stroke:var(--text3);fill:none;stroke-width:2;stroke-linecap:round}

/* ── MODAL — generic ── */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.7);z-index:200;display:none;align-items:flex-end;justify-content:center}
.modal-overlay.open{display:flex}
.modal{background:linear-gradient(180deg,#1A2236 0%,#141B26 100%);border-radius:20px 20px 0 0;box-shadow:0 -4px 40px rgba(0,0,0,0.6);width:100%;max-width:420px;padding:24px 20px 32px;animation:slideUp 0.22s ease;max-height:90dvh;overflow-y:auto}
.modal::-webkit-scrollbar{display:none}
.modal-title{font-size:17px;font-weight:700;color:#fff;margin-bottom:18px}
.field{margin-bottom:14px}
.field label{font-size:11px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:0.07em;display:block;margin-bottom:7px}
.field input,.field select{width:100%;background:rgba(0,0,0,0.3);border:none;border-radius:var(--r-sm);padding:13px 14px;font-size:15px;color:#fff;font-family:inherit;outline:none;transition:box-shadow 0.15s}
.field input:focus,.field select:focus{box-shadow:0 0 0 2px var(--accent)}
.field input::placeholder{color:var(--text3)}
.field select option{background:var(--bg3)}
.preview-pill{text-align:center;background:var(--bg3);border-radius:var(--r-sm);padding:12px;margin-bottom:14px}
.preview-pill .pl{font-size:11px;color:var(--text2);margin-bottom:4px}
.preview-pill .pv{font-size:28px;font-weight:800}
.tag-selector{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.tag-opt{padding:7px 14px;border-radius:100px;font-size:12px;font-weight:700;cursor:pointer;border:1.5px solid var(--bg4);color:var(--text2);background:none;transition:all 0.15s;font-family:inherit}
.tag-opt.sel-fast{background:var(--green-dim);color:var(--green);border-color:var(--green)}
.tag-opt.sel-normal{background:var(--accent-dim);color:var(--accent);border-color:var(--accent)}
.tag-opt.sel-slow{background:var(--amber-dim);color:var(--amber);border-color:var(--amber)}
.btn-row{display:flex;gap:10px;margin-top:4px}
.btn-acc{flex:1;padding:14px;background:linear-gradient(135deg,#2B7FEB,#1A5FC0);border:none;border-radius:var(--r-sm);font-size:14px;font-weight:700;color:#fff;cursor:pointer;font-family:inherit;box-shadow:0 3px 10px rgba(0,0,0,0.3)}
.btn-ghost-sm{flex:1;padding:14px;background:var(--bg3);border:none;border-radius:var(--r-sm);font-size:14px;font-weight:600;color:var(--text2);cursor:pointer;font-family:inherit}
.btn-danger{flex:1;padding:14px;background:var(--red-dim);border:none;border-radius:var(--r-sm);font-size:14px;font-weight:700;color:var(--red);cursor:pointer;font-family:inherit}
.month-picker{display:flex;flex-wrap:wrap;gap:7px;margin-top:6px}
.mp-pill{font-size:11px;font-weight:700;padding:5px 11px;border-radius:100px;background:var(--bg3);color:var(--text3);cursor:pointer;transition:all 0.15s;border:none;font-family:inherit}
.mp-pill.sel{background:var(--accent-dim);color:var(--accent)}
.day-picker{display:flex;flex-wrap:wrap;gap:7px;margin-top:6px}
.dp-pill{font-size:11px;font-weight:700;padding:5px 11px;border-radius:100px;background:var(--bg3);color:var(--text3);cursor:pointer;transition:all 0.15s;border:none;font-family:inherit}
.dp-pill.sel{background:var(--amber-dim);color:var(--amber)}

/* Settings full page */
.settings-page{
  position:fixed;inset:0;z-index:400;
  background:var(--bg);
  display:none;flex-direction:column;
  overflow-y:auto;
}
.settings-page.open{display:flex}
.settings-topbar{
  display:flex;align-items:center;gap:14px;
  padding:16px 16px 12px;
  background:var(--bg2);
  flex-shrink:0;
}
.settings-back{width:36px;height:36px;border-radius:50%;background:var(--bg3);
  display:flex;align-items:center;justify-content:center;
  border:none;cursor:pointer;flex-shrink:0}
.settings-back svg{width:18px;height:18px;stroke:var(--text);fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.settings-page-title{font-size:18px;font-weight:700;color:#fff}
.settings-body{padding:16px;flex:1}
.settings-group{background:var(--grd-card);border-radius:var(--r);margin-bottom:14px;overflow:hidden}
.settings-group-label{font-size:11px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:0.08em;padding:14px 16px 6px}
.s-field{padding:0 16px 14px}
.s-field label{font-size:11px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:0.06em;display:block;margin-bottom:6px}
.s-field input{width:100%;background:rgba(0,0,0,0.3);border:none;border-radius:var(--r-sm);padding:12px 14px;font-size:15px;color:#fff;font-family:inherit;outline:none;transition:border-color 0.2s;border:1.5px solid transparent}
.s-field input:focus{border-color:rgba(43,127,235,0.4)}
.s-wa-item{display:flex;align-items:center;gap:14px;padding:14px 16px;cursor:pointer;transition:background 0.15s}
.s-wa-item:not(:last-child){border-bottom:1px solid rgba(255,255,255,0.04)}
.s-wa-item:active{background:rgba(255,255,255,0.03)}
.s-wa-icon{width:38px;height:38px;border-radius:50%;background:var(--bg3);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.s-wa-icon svg{width:18px;height:18px;stroke:var(--accent);fill:none;stroke-width:2;stroke-linecap:round}
.s-wa-text .wt{font-size:15px;font-weight:500;color:#fff}
.s-wa-text .ws{font-size:12px;color:var(--text2);margin-top:1px}
.s-wa-right{margin-left:auto;display:flex;align-items:center;gap:8px}
.s-wa-chev{width:16px;height:16px;stroke:var(--text3);fill:none;stroke-width:2;stroke-linecap:round}
/* Theme toggle switch */
.theme-switch{position:relative;width:46px;height:26px;flex-shrink:0}
.theme-switch input{opacity:0;width:0;height:0}
.theme-slider{position:absolute;inset:0;background:var(--bg4);border-radius:100px;cursor:pointer;transition:background 0.3s}
.theme-slider:before{content:'';position:absolute;width:20px;height:20px;left:3px;top:3px;background:#fff;border-radius:50%;transition:transform 0.3s;box-shadow:0 1px 4px rgba(0,0,0,0.4)}
.theme-switch input:checked + .theme-slider{background:var(--accent)}
.theme-switch input:checked + .theme-slider:before{transform:translateX(20px)}
/* Light theme */
body.light-theme{
  --bg:#F0F2F5;
  --bg2:#FFFFFF;
  --bg3:#E4E8EF;
  --bg4:#D8DCE5;
  --text:#0D1117;
  --text2:#3A4255;
  --text3:#6B7280;
  --grd-card:linear-gradient(160deg,#ffffff 0%,#f4f6f9 100%);
  --grd-profit:linear-gradient(145deg,#1A3A6A 0%,#1E4080 60%,#1A4A8A 100%);
  --grd-green:linear-gradient(135deg,#0D2118 0%,#122A1E 100%);
  --border-light:rgba(0,0,0,0.07);
}
body.light-theme .shell{background:var(--bg)}
body.light-theme .topbar{background:linear-gradient(180deg,#F0F2F5 0%,rgba(240,242,245,0.97) 100%);box-shadow:0 1px 0 rgba(0,0,0,0.08)}
body.light-theme .page{background:linear-gradient(180deg,rgba(43,127,235,0.03) 0%,transparent 120px)}
body.light-theme .floatnav{background:rgba(255,255,255,0.92);box-shadow:0 8px 32px rgba(0,0,0,0.15),inset 0 1px 0 rgba(255,255,255,0.9)}
body.light-theme .nav-item{color:#9AA0B0}
body.light-theme .nav-item.active{color:var(--accent)}
body.light-theme .tb-icon{background:#E4E8EF}
body.light-theme .tb-icon svg{stroke:#3A4255}

/* Cards */
body.light-theme .sec,
body.light-theme .sec-sm,
body.light-theme .chart-sec,
body.light-theme .goal-card,
body.light-theme .month-btn{
  background:linear-gradient(160deg,#ffffff 0%,#f4f6f9 100%);
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
}
body.light-theme .month-body{background:#EAEEF4}
body.light-theme .month-day-row{border-top:1px solid rgba(0,0,0,0.06)}
body.light-theme .season-card{background:linear-gradient(135deg,#e8f5ee 0%,#dff0e8 100%);box-shadow:0 2px 8px rgba(0,0,0,0.07)}
body.light-theme .profit-hero{box-shadow:0 4px 16px rgba(0,0,0,0.1)}

/* Text overrides for readability */
body.light-theme .sec-title,
body.light-theme .chart-header .ch-sub,
body.light-theme .wr-day,
body.light-theme .mdr-date,
body.light-theme .goal-sub,
body.light-theme .sc-note,
body.light-theme .goal-row,
body.light-theme .pmc-profit-label{color:#6B7280}
body.light-theme .mb-name,
body.light-theme .ch-title,
body.light-theme .be-title,
body.light-theme .sc-name,
body.light-theme .goal-name,
body.light-theme .exp-name,
body.light-theme .prod-name,
body.light-theme .profile-info .name,
body.light-theme .wr-amt,
body.light-theme .mdr-profit,
body.light-theme .stat-item .sv,
body.light-theme .sec-heading{color:#0D1117}
body.light-theme .be-sub,
body.light-theme .prod-sub,
body.light-theme .profile-info .biz,
body.light-theme .profile-info .loc{color:#3A4255}

/* Input fields */
body.light-theme .pmc-input-wrap{background:rgba(0,0,0,0.06);border-color:rgba(0,0,0,0.1)}
body.light-theme .pmc-input-wrap.active{background:rgba(0,0,0,0.08);border-color:rgba(43,127,235,0.5)}
body.light-theme .pmc-input{color:#0D1117}
body.light-theme .pmc-input::placeholder{color:#9AA0B0}
body.light-theme .add-ghost{background:rgba(0,0,0,0.05);color:#3A4255}
body.light-theme .btn-ghost-sm{background:#E4E8EF;color:#3A4255}
body.light-theme .field input,
body.light-theme .field select{background:rgba(0,0,0,0.06);color:#0D1117}
body.light-theme .mp-pill{background:#E4E8EF;color:#3A4255}
body.light-theme .mp-pill.sel{background:rgba(43,127,235,0.12);color:var(--accent)}
body.light-theme .dp-pill{background:#E4E8EF;color:#3A4255}
body.light-theme .dp-pill.sel{background:rgba(255,179,0,0.12);color:var(--amber)}

/* Settings page */
body.light-theme .settings-page{background:#F0F2F5}
body.light-theme .settings-topbar{background:#fff;box-shadow:0 1px 0 rgba(0,0,0,0.08)}
body.light-theme .settings-back{background:#E4E8EF}
body.light-theme .settings-back svg{stroke:#0D1117}
body.light-theme .settings-page-title{color:#0D1117}
body.light-theme .settings-group{background:linear-gradient(160deg,#ffffff 0%,#f4f6f9 100%);box-shadow:0 2px 8px rgba(0,0,0,0.08)}
body.light-theme .settings-group-label{color:#6B7280}
body.light-theme .s-field label{color:#6B7280}
body.light-theme .s-field input{background:rgba(0,0,0,0.05);color:#0D1117;border-color:rgba(0,0,0,0.08)}
body.light-theme .s-wa-item{border-bottom:1px solid rgba(0,0,0,0.05)}
body.light-theme .s-wa-icon{background:#E4E8EF}
body.light-theme .s-wa-text .wt{color:#0D1117}
body.light-theme .s-wa-text .ws{color:#6B7280}
body.light-theme .s-wa-chev{stroke:#9AA0B0}
body.light-theme .theme-slider{background:#D8DCE5}

/* Modal */
body.light-theme .modal{background:linear-gradient(180deg,#ffffff 0%,#f4f6f9 100%)}
body.light-theme .modal-title{color:#0D1117}
body.light-theme .field label{color:#6B7280}
body.light-theme .preview-pill{background:#E4E8EF}
body.light-theme .preview-pill .pl{color:#6B7280}
body.light-theme .tag-opt{color:#6B7280;border-color:#D8DCE5}

/* Week rows */
body.light-theme .wr-bar-wrap{background:#D8DCE5}
body.light-theme .wr-blank{color:#9AA0B0}
body.light-theme .wr-edit{color:var(--accent)}

/* Pbar */
body.light-theme .pbar-wrap{background:#E4E8EF}

/* Expense */
body.light-theme .expense-row{border-bottom:1px solid rgba(0,0,0,0.06)}
body.light-theme .exp-del{color:#9AA0B0}
/* Seasons section titles */
body.light-theme .seasons-section-title{color:#0D1117}
/* Page title in topbar */
body.light-theme .page-title{color:#0D1117}
/* App name */
body.light-theme .app-name .flow{color:var(--dgreen)}
/* Seasons cards deeper text */
body.light-theme .m-pill{background:rgba(26,122,74,0.12);color:var(--dgreen)}
body.light-theme .goal-save-notice{background:rgba(255,179,0,0.1);color:#B07A00}
body.light-theme .goal-done-notice{background:rgba(37,211,102,0.1);color:#1A8040}
body.light-theme .pbar-fill{background:linear-gradient(90deg,#1A7A4A,#22A05A)}
body.light-theme .exp-amount{color:var(--red)}
/* History/month accordion */
body.light-theme .mb-amt{color:var(--accent)}
body.light-theme .mb-chev{stroke:#6B7280}

/* ── NOTIFICATION BADGE ── */
.notif-badge{
  position:absolute;top:-4px;right:-4px;
  width:18px;height:18px;border-radius:50%;
  background:var(--red);color:#fff;
  font-size:10px;font-weight:800;
  display:flex;align-items:center;justify-content:center;
  border:2px solid var(--bg);
  pointer-events:none;
  animation:badgePop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes badgePop{from{transform:scale(0)}to{transform:scale(1)}}

/* ── NOTIFICATION PANEL ── */
.notif-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,0.5);
  z-index:300;display:none;align-items:flex-start;justify-content:center;
}
.notif-overlay.open{display:flex}
.notif-panel{
  background:linear-gradient(180deg,#1A2236 0%,#141B26 100%);
  border-radius:0 0 20px 20px;
  width:100%;max-width:420px;
  max-height:75dvh;
  display:flex;flex-direction:column;
  animation:slideDown 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow:0 8px 40px rgba(0,0,0,0.5);
  overflow:hidden;
}
@keyframes slideDown{from{transform:translateY(-100%)}to{transform:translateY(0)}}
.notif-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px 14px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  flex-shrink:0;
}
.notif-header-title{font-size:17px;font-weight:700;color:#fff}
.notif-clear{
  font-size:12px;font-weight:600;color:var(--accent);
  background:none;border:none;cursor:pointer;padding:4px 8px;
  font-family:inherit;
}
.notif-list{overflow-y:auto;flex:1}
.notif-list::-webkit-scrollbar{display:none}
.notif-item{
  display:flex;align-items:flex-start;gap:12px;
  padding:14px 20px;border-bottom:1px solid rgba(255,255,255,0.04);
  cursor:pointer;transition:background 0.15s;
  position:relative;
}
.notif-item:active{background:rgba(255,255,255,0.03)}
.notif-item.unread::before{
  content:'';position:absolute;left:8px;top:50%;transform:translateY(-50%);
  width:5px;height:5px;border-radius:50%;background:var(--accent);
}
.notif-icon-wrap{
  width:40px;height:40px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;margin-top:1px;
}
.ni-blue{background:var(--accent-dim)}
.ni-green{background:var(--dgreen-dim)}
.ni-amber{background:rgba(255,179,0,0.12)}
.ni-red{background:rgba(255,82,82,0.12)}
.notif-icon-wrap svg{width:18px;height:18px;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.notif-body{flex:1;min-width:0}
.notif-title{font-size:14px;font-weight:600;color:#fff;margin-bottom:3px;line-height:1.4}
.notif-msg{font-size:12px;color:var(--text2);line-height:1.5}
.notif-time{font-size:10px;color:var(--text3);margin-top:5px}
.notif-empty{
  padding:48px 24px;text-align:center;
  color:var(--text3);font-size:14px;line-height:1.6;
}
.notif-empty svg{width:40px;height:40px;stroke:var(--text3);fill:none;stroke-width:1.4;margin-bottom:12px}

/* misc */
.empty{padding:40px 24px;text-align:center;color:var(--text3);font-size:14px;line-height:1.6}
.fmt-tzs{font-size:11px;font-weight:400;color:var(--text2);margin-left:2px}

/* ── ONBOARDING (first-run setup wizard) ─────────────────────────────────── */
.onboarding-overlay{
  position:absolute;inset:0;z-index:900;
  display:none;flex-direction:column;
  background:var(--bg);
}
.onboarding-overlay.open{display:flex}
.ob-shell{flex:1;display:flex;flex-direction:column;min-height:0}
.ob-topbar{
  flex-shrink:0;display:flex;align-items:center;gap:10px;
  padding:16px 16px 6px;
}
.ob-back{
  width:34px;height:34px;border-radius:50%;background:var(--bg3);border:none;
  display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;
  visibility:hidden;
}
.ob-back svg{width:16px;height:16px;stroke:var(--text2);fill:none}
.ob-back.show{visibility:visible}
.ob-progress{flex:1;display:flex;gap:6px}
.ob-progress .dot{flex:1;height:4px;border-radius:2px;background:var(--bg4)}
.ob-progress .dot.done{background:var(--accent)}
.ob-skip{
  background:none;border:none;color:var(--text3);font-size:13px;font-weight:600;
  cursor:pointer;font-family:inherit;padding:6px 2px;flex-shrink:0;
}
.ob-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:20px 20px 24px}
.ob-step{display:none}
.ob-step.active{display:block;animation:obFadeIn 0.25s ease}
@keyframes obFadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.ob-hero-icon{
  width:64px;height:64px;border-radius:20px;margin:12px 0 22px;
  background:var(--grd-blue);display:flex;align-items:center;justify-content:center;
}
.ob-hero-icon svg{width:30px;height:30px;stroke:var(--accent);fill:none}
.ob-hero-icon-done{background:var(--grd-green)}
.ob-hero-icon-done svg{stroke:var(--dgreen-bright)}
.ob-title{font-size:22px;font-weight:800;color:#fff;letter-spacing:-0.3px;margin-bottom:10px;line-height:1.25}
.ob-sub{font-size:14px;color:var(--text2);line-height:1.55;margin-bottom:22px}
.ob-bullets{display:flex;flex-direction:column;gap:14px;margin-top:8px}
.ob-bullet{display:flex;align-items:center;gap:10px;font-size:13.5px;color:var(--text);font-weight:500}
.ob-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.ob-dot-blue{background:var(--accent)}
.ob-dot-green{background:var(--green)}
.ob-dot-amber{background:var(--amber)}
.ob-hint{font-size:12px;color:var(--text3);line-height:1.6;margin-top:-6px}
.ob-sales-row{
  display:flex;gap:8px;align-items:flex-end;margin-bottom:12px;
  background:rgba(255,255,255,0.02);border-radius:var(--r-sm);padding:10px;
}
.ob-sales-row .field{margin-bottom:0;flex:1}
.ob-row-del{
  width:38px;height:44px;border-radius:var(--r-sm);border:none;background:var(--red-dim);
  color:var(--red);font-size:18px;font-weight:700;cursor:pointer;flex-shrink:0;line-height:1;
}
.ob-add-row-btn{
  width:100%;padding:13px;border-radius:var(--r-sm);border:1.5px dashed var(--bg4);
  background:none;color:var(--text2);font-size:13px;font-weight:700;cursor:pointer;font-family:inherit;
}
.ob-add-row-btn:active{background:var(--bg3)}
.ob-footer{flex-shrink:0;padding:12px 20px 22px}
.ob-next-btn{width:100%;padding:15px;font-size:15px}

body.light-theme .onboarding-overlay{background:#F0F2F5}
body.light-theme .ob-back{background:#E4E7EC}
body.light-theme .ob-back svg{stroke:#4A5568}
body.light-theme .ob-progress .dot{background:#D9DEE6}
body.light-theme .ob-title{color:#0D1117}
body.light-theme .ob-sub{color:#5B6472}
body.light-theme .ob-bullet{color:#1A2030}
body.light-theme .ob-sales-row{background:rgba(0,0,0,0.03)}
body.light-theme .ob-add-row-btn{border-color:#D9DEE6;color:#6B7280}
