/* התקציב שלנו v1.2 – "Midnight Luxe": dark glass UI (default) + soft light mode. Font: Rubik (bundled). Icons: lucide. */
@font-face { font-family: Rubik; font-style: normal; font-display: swap; font-weight: 300 900; src: url(../fonts/rubik-hebrew-wght-normal.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Rubik; font-style: normal; font-display: swap; font-weight: 300 900; src: url(../fonts/rubik-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {   /* light ("soft premium") */
  --sat: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); --sab: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --p2: #0F766E; --pb: #2DD4BF; --acc: #FF7A59; --p: var(--p2);
  --bg: #F4EFE6; --bg2: #F4EFE6; --ink: #1F2A2E; --gray: #7A8584; --card: #FFFFFF; --cardb: transparent; --track: #EFE8DC; --line: #EEE7DB;
  --glass: #ffffffe6; --fieldbg: #F3EDE3; --sheet: #FBF8F3; --key: #FFFFFF; --field: #E3DBCD; --shadow: 0 10px 26px -16px #3d2c1870;
  --warn: #D98A00; --over: #E0452F; --good: #0F766E;
  --hero: linear-gradient(140deg, color-mix(in srgb, var(--p2) 70%, white) 0%, var(--p2) 55%, color-mix(in srgb, var(--p2) 60%, black) 100%);
  --heroink: #fff; --ring1: #fff;
}
html.dark {   /* "midnight luxe" */
  --p: var(--pb); --ring1: var(--pb); --bg: #070B14; --bg2: #0B1220; --ink: #EEF3F8; --gray: #8A96A8; --card: #ffffff0b; --cardb: #ffffff12; --track: #ffffff14; --line: #ffffff0f;
  --glass: #141c2cd9; --fieldbg: #ffffff0d; --sheet: #0E1524; --key: #ffffff0d; --field: #ffffff1f; --shadow: none;
  --warn: #FBBF24; --over: #FF7A66; --good: #5EEAD4;
  --hero: linear-gradient(150deg, #ffffff16, #ffffff05);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
html.dark { background: radial-gradient(120% 50% at 85% -8%, color-mix(in srgb, var(--p2) 55%, #0B1220) 0%, #0B1220 55%, #070B14 100%) fixed, #070B14; }
body { margin: 0; color: var(--ink); font-family: Rubik, system-ui, "Segoe UI", Arial, sans-serif; font-size: 16px; font-feature-settings: "tnum"; min-height: 100vh;
  padding: var(--sat) 0 calc(110px + var(--sab)); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.i.emo { display: inline-flex; align-items: center; justify-content: center; width: auto; height: auto; vertical-align: 0; }
main { padding: 0 18px 30px; }
main.in { animation: viewIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } }
.press { transition: transform .15s; } .press:active { transform: scale(.97); }

/* top */
.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 4px; }
.hi small { display: block; font-size: 13px; color: var(--gray); font-weight: 500; }
.hi b { font-size: 22px; font-weight: 700; }
.avs { display: flex; padding-inline-start: 10px; }
.avs span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; margin-inline-start: -10px;
  background: var(--card); border: 2px solid var(--bg2); box-shadow: 0 0 0 1px var(--cardb), var(--shadow); }
html:not(.dark) .avs span { background: #fff; border-color: var(--bg); }
.month { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 0 12px; }
.month h1 { font-size: 15px; font-weight: 600; margin: 0; min-width: 120px; text-align: center; }
.month.off { display: none; }
.arrow { color: var(--gray); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.arrow:active { background: var(--track); }

/* glass card */
.card { background: var(--card); border: 1px solid var(--cardb); border-radius: 24px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card.tight { padding: 2px 14px; }
.card h2 { font-size: 16px; font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.card h2 .i { color: var(--p); }
.sec { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 4px 10px; }
.sec h3 { font-size: 17px; font-weight: 700; margin: 0; }
.sec a, .sec button { font-size: 13px; font-weight: 600; color: var(--p); }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: 30px; padding: 22px 20px 18px; color: var(--heroink); background: var(--hero); }
html.dark .hero { border: 1px solid #ffffff1c; box-shadow: 0 30px 60px -24px #000c, inset 0 1px 0 #ffffff22; }
html:not(.dark) .hero { box-shadow: 0 24px 40px -20px color-mix(in srgb, var(--p2) 75%, transparent); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 280px; height: 280px; left: -90px; top: -130px; background: radial-gradient(color-mix(in srgb, var(--p) 40%, transparent), transparent 65%); }
.hero::after { width: 240px; height: 240px; right: -100px; bottom: -140px; background: radial-gradient(color-mix(in srgb, var(--acc) 32%, transparent), transparent 65%); }
html:not(.dark) .hero::before { background: #ffffff18; } html:not(.dark) .hero::after { background: color-mix(in srgb, var(--acc) 30%, transparent); }
.hero > * { position: relative; z-index: 1; }
.hero.pop { animation: pop .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { 35% { transform: scale(1.025); } }
.h-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h-lbl { font-size: 13px; font-weight: 500; opacity: .75; }
.h-big { font-size: 44px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin: 4px 0 2px; white-space: nowrap; }
.h-big small { font-size: 24px; font-weight: 600; opacity: .8; margin-inline-start: 4px; }
html.dark .h-big { background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--p) 45%, white)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html.dark .h-big.neg { background: linear-gradient(90deg, #fff, #ffb4a6); -webkit-background-clip: text; background-clip: text; }
.h-sub { font-size: 13px; opacity: .7; }
.ring-w { width: 116px; height: 116px; position: relative; flex: none; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-fg { transition: stroke-dasharray 1.1s cubic-bezier(.2, .8, .2, 1); }
.ring-c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: 22px; line-height: 1.1; }
.ring-c small { display: block; font-size: 10px; font-weight: 500; opacity: .7; }
.stats { display: flex; gap: 8px; margin-top: 18px; }
.st { flex: 1; border-radius: 18px; padding: 10px 11px; background: #ffffff0f; border: 1px solid #ffffff14; min-width: 0; }
html:not(.dark) .st { background: #ffffff22; border: 0; }
.st small { font-size: 11px; opacity: .75; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st b { font-size: 15px; font-weight: 700; white-space: nowrap; }

/* fun strip */
.strip { display: flex; gap: 8px; overflow-x: auto; margin: 12px -18px 0; padding: 2px 18px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.badge { display: flex; align-items: center; gap: 7px; white-space: nowrap; padding: 8px 12px 8px 14px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--card); border: 1px solid var(--cardb); box-shadow: var(--shadow); }
.badge .i { color: var(--c, var(--p)); width: 17px; height: 17px; }
.badge.hot .i { animation: flick 1.6s ease-in-out infinite; }
@keyframes flick { 50% { transform: scale(1.18) rotate(-6deg); } }

.pill { display: flex; gap: 10px; align-items: center; border-radius: 18px; padding: 12px 14px; margin-top: 10px; font-size: 14px; border: 1px solid var(--cardb); }
.pill .i { flex: none; width: 20px; height: 20px; }
.pill.good { background: color-mix(in srgb, var(--good) 13%, transparent); } .pill.good .i { color: var(--good); }
.pill.bad, .pill.o { background: color-mix(in srgb, var(--over) 14%, transparent); } .pill.bad .i, .pill.o .i { color: var(--over); }
.pill.w { background: color-mix(in srgb, var(--warn) 14%, transparent); } .pill.w .i { color: var(--warn); }
html:not(.dark) .pill { background-color: #fff; }

/* icon squircles */
.ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; flex: none; font-size: 22px;
  color: var(--c, var(--p)); background: color-mix(in srgb, var(--c, var(--p)) 16%, transparent); }
html.dark .ic { box-shadow: inset 0 1px 0 #ffffff14; }
.ic .i { width: 22px; height: 22px; }
.ic.sm { width: 38px; height: 38px; border-radius: 12px; } .ic.sm .i { width: 19px; height: 19px; }
.ic.lg { width: 60px; height: 60px; border-radius: 20px; } .ic.lg .i { width: 28px; height: 28px; }

/* categories */
.cat { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; }
.cat .m { flex: 1; min-width: 0; }
.cat .n { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; font-size: 15px; }
.cat .n span { font-weight: 500; font-size: 13px; color: var(--gray); white-space: nowrap; }
.cat .n span.warn { color: var(--warn); } .cat .n span.over { color: var(--over); }
.bar { height: 7px; border-radius: 9px; margin-top: 9px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 9px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.small { font-size: 12px; color: var(--gray); }
.ok { color: var(--good); } .warn { color: var(--warn); } .over { color: var(--over); }

/* who */
.owe { display: flex; align-items: center; gap: 12px; }
.owe .t { flex: 1; font-size: 14px; color: var(--gray); }
.owe .t b { display: block; font-size: 19px; color: var(--ink); margin-top: 2px; }
.owe .arr { color: var(--acc); width: 24px; height: 24px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(-5px); } }
.av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; flex: none; background: var(--track); }
.who { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.who-t { flex: 1; }
.split { display: flex; height: 8px; border-radius: 9px; overflow: hidden; margin: 10px 0 6px; background: var(--acc); }
.split i { display: block; height: 100%; background: linear-gradient(90deg, var(--p2), var(--p)); transition: width 1s; }

/* list */
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--cardb); box-shadow: var(--shadow); }
.search .i { color: var(--gray); }
.search input { border: 0; background: none; padding: 13px 0; outline: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; border: 1px solid var(--field); border-radius: 99px; padding: 7px 14px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; transition: background .2s; }
.chip.on { background: color-mix(in srgb, var(--p) 18%, transparent); border-color: color-mix(in srgb, var(--p) 55%, transparent); color: var(--p); font-weight: 700; }
html.dark .chip.on { color: var(--ink); }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 4px 0; }
.sum-row b { font-size: 22px; font-weight: 800; }
.day { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--gray); margin: 16px 6px 8px; }
.swipe { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.swipe:last-child { border-bottom: 0; }
.swipe .del-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding: 0 18px; color: #fff; background: linear-gradient(270deg, transparent, var(--over) 60%); opacity: 0; }
.exp { position: relative; display: flex; gap: 12px; align-items: center; padding: 11px 0; cursor: pointer; touch-action: pan-y; background: transparent; }
.exp-t { flex: 1; min-width: 0; } .exp-t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-t .small { margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt { white-space: nowrap; font-weight: 700; }
.empty { color: var(--gray); text-align: center; padding: 26px 10px; }
.empty .ic { margin: 0 auto 12px; }

/* insights */
.donut-w { display: flex; align-items: center; gap: 14px; }
.donut { width: 150px; flex: none; overflow: visible; }
.donut circle.seg { transition: stroke-dasharray 1s cubic-bezier(.2, .8, .2, 1); }
.d-t { font-size: 20px; font-weight: 800; fill: var(--ink); } .d-s { font-size: 12px; fill: var(--gray); }
.legend { flex: 1; font-size: 13px; } .legend div { display: flex; align-items: center; gap: 7px; padding: 4px 0; }
.legend i { width: 10px; height: 10px; border-radius: 4px; flex: none; } .legend b { margin-inline-start: auto; }
.cmp { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; gap: 8px; }
.cmp:last-child { border: 0; }
.cmp span { display: flex; align-items: center; gap: 6px; }
.yr { position: relative; display: flex; align-items: flex-end; gap: 5px; height: 140px; margin: 6px 0 12px; direction: ltr; }
.yb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: pointer; }
.yb i { display: block; width: 100%; max-width: 20px; border-radius: 7px 7px 3px 3px; min-height: 3px; transition: height 1s cubic-bezier(.2, .8, .2, 1); }
.yb span { font-size: 10px; color: var(--gray); margin-top: 4px; height: 14px; }
.yb.on span { color: var(--ink); font-weight: 800; }
.yl { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--acc); opacity: .7; pointer-events: none; }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.bdg { text-align: center; font-size: 11px; line-height: 1.25; color: var(--gray); }
.bdg .ic { margin: 0 auto 6px; border-radius: 50%; }
.bdg.got { color: var(--ink); font-weight: 600; }
.bdg.got .ic { color: #fff; background: linear-gradient(145deg, var(--c), color-mix(in srgb, var(--c) 55%, black)); box-shadow: 0 6px 18px -4px var(--c); }
.bdg:not(.got) .ic { color: var(--gray); background: var(--track); opacity: .6; }

/* settings */
input { font: inherit; color: var(--ink); width: 100%; padding: 14px 16px; border: 1px solid transparent; border-radius: 16px; background: var(--fieldbg); transition: background .2s, box-shadow .2s; }
input:focus { outline: none; border-color: color-mix(in srgb, var(--p) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p) 18%, transparent); }
input::placeholder { color: var(--gray); }
input[type=date] { color-scheme: light; } html.dark input[type=date] { color-scheme: dark; }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.row input.name { flex: 1; } .row input.num { width: 92px; flex: none; }
.row2 { display: flex; gap: 8px; } .row2 > * { flex: 1; min-width: 0; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px; border-radius: 16px; color: #fff; font-weight: 600; margin-top: 4px;
  background: linear-gradient(145deg, var(--p), var(--p2)); box-shadow: 0 10px 24px -10px var(--p); transition: transform .15s; }
html.dark .btn { color: #04201c; } html.dark .btn .i { color: inherit; }
.btn:active { transform: scale(.97); }
.btn.out { background: none; color: var(--p); border: 1px solid var(--field); box-shadow: none; }
html.dark .btn.out { color: var(--ink); }
.mt6 { margin-top: 10px; }
.seg { display: flex; background: var(--track); border-radius: 14px; padding: 3px; margin-top: 6px; }
.seg button { flex: 1; padding: 9px; border-radius: 11px; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--card); font-weight: 700; box-shadow: 0 1px 4px #0003; }
html.dark .seg button.on { background: #ffffff1c; }
.swatches { display: flex; gap: 12px; margin: 8px 0 4px; }
.sw { width: 44px; height: 44px; border-radius: 50%; position: relative; border: 3px solid transparent; transition: transform .2s; }
.sw.on { border-color: var(--ink); transform: scale(1.08); }
.sw i { position: absolute; width: 15px; height: 15px; border-radius: 50%; bottom: -2px; left: -2px; border: 2px solid var(--bg2); }
.tg { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 8px; cursor: pointer; }
.tg input { display: none; }
.tg i { width: 50px; height: 30px; border-radius: 99px; background: var(--track); position: relative; transition: background .2s; flex: none; }
.tg i::after { content: ""; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: right .25s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 1px 4px #0005; }
.tg input:checked + i { background: var(--p); } .tg input:checked + i::after { right: 23px; }
.ver { text-align: center; font-size: 12px; color: var(--gray); margin: 18px 0; }
.ci.pick { width: 50px; height: 50px; border-radius: 16px; font-size: 24px; display: grid; place-items: center; flex: none; }
.ci.pick.av { border-radius: 50%; background: var(--track); }

/* floating nav */
.tabs { position: fixed; z-index: 5; left: 16px; right: 16px; bottom: calc(14px + var(--sab)); height: 70px; border-radius: 26px; display: flex; align-items: center; justify-content: space-around; padding: 0 6px;
  background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--cardb); box-shadow: 0 18px 40px -8px #0007; }
html:not(.dark) .tabs { box-shadow: 0 16px 40px -12px #3d2c1850; }
.tabs .t { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--gray); width: 58px; transition: color .2s; }
.tabs .t .i { width: 23px; height: 23px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.tabs .t.on { color: var(--p); }
.tabs .t.on .i { transform: translateY(-2px) scale(1.08); filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--p) 60%, transparent)); }
.fab { width: 62px; height: 62px; border-radius: 22px; display: grid; place-items: center; margin-top: -36px; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--acc) 70%, white), var(--acc)); box-shadow: 0 12px 30px -6px var(--acc), inset 0 1px 0 #ffffff66; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
html.dark .fab { background: linear-gradient(145deg, var(--p), var(--p2)); box-shadow: 0 10px 30px -4px color-mix(in srgb, var(--p) 60%, transparent), inset 0 1px 0 #ffffff55; }
.fab .i { width: 30px; height: 30px; stroke-width: 2.5; }
.fab:active { transform: scale(.9) rotate(90deg); }

/* dialogs & sheets */
#dlg { position: fixed; inset: 0; background: #0009; backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; z-index: 10; animation: fade .2s; }
#dlg[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; background: var(--sheet); border-radius: 30px 30px 0 0; padding: 10px 18px calc(18px + var(--sab)); width: 100%; max-width: 520px; max-height: 94vh; overflow: auto;
  animation: up .35s cubic-bezier(.2, .9, .25, 1); border-top: 1px solid var(--cardb); }
.grab { width: 44px; height: 5px; border-radius: 9px; background: var(--field); margin: 0 auto 10px; }
@keyframes up { from { transform: translateY(100%); } }
.sh-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.sh-top h3, .box h3 { margin: 0; font-size: 20px; font-weight: 700; }
.x { color: var(--gray); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.x:active { background: var(--track); }
.box { background: var(--sheet); border: 1px solid var(--cardb); border-radius: 30px; padding: 22px; width: calc(100% - 32px); max-width: 420px; max-height: 90vh; overflow: auto; margin: auto; animation: zoom .3s cubic-bezier(.2, .9, .25, 1); }
@keyframes zoom { from { transform: scale(.9); opacity: 0; } }
.box h3 { margin-bottom: 12px; }
.amt-big { text-align: center; font-size: 50px; font-weight: 800; margin: 4px 0 10px; direction: ltr; letter-spacing: -1px; }
.amt-big small { font-size: 26px; font-weight: 600; opacity: .7; }
.amt-big.ph { opacity: .3; }
html.dark .amt-big:not(.ph) { text-shadow: 0 0 30px color-mix(in srgb, var(--p) 50%, transparent); }
.amt-big.bump { animation: bump .18s; }
@keyframes bump { 50% { transform: scale(1.06); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; direction: ltr; margin-bottom: 14px; }
.pad button { padding: 13px 0; font-size: 23px; font-weight: 600; border-radius: 16px; background: var(--key); border: 1px solid var(--cardb); box-shadow: var(--shadow); transition: transform .1s, background .1s; }
.pad button:active { transform: scale(.93); background: color-mix(in srgb, var(--p) 22%, transparent); }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.cg { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 2px; border-radius: 18px; font-size: 12px; font-weight: 500; line-height: 1.15; border: 1.5px solid transparent; transition: background .2s, transform .15s; }
.cg .ic { width: 40px; height: 40px; border-radius: 13px; }
.cg.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); font-weight: 700; }
.cg.on .ic { color: #fff; background: linear-gradient(145deg, var(--c), color-mix(in srgb, var(--c) 60%, black)); box-shadow: 0 6px 16px -4px var(--c); }
.cg:active { transform: scale(.94); }
.quick .chip { background: var(--key); border-color: var(--cardb); }
.quick .chip .i { color: var(--c); width: 16px; height: 16px; }
.acts { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 18px; }
.acts > button:not(.btn) { color: var(--gray); font-weight: 600; padding: 10px 14px; border-radius: 99px; }
.acts .btn.save { width: auto; flex: 1; max-width: 200px; margin: 0; padding: 14px; font-size: 17px; }
.acts .del { color: var(--over) !important; margin-inline-end: auto; display: flex; align-items: center; gap: 6px; }
.emo { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.emo button { font-size: 26px; padding: 8px 0; border-radius: 14px; display: grid; place-items: center; }
.emo button .ic { width: 44px; height: 44px; }
.emo button:active { background: var(--track); }
.ob { text-align: center; } .ob .row, .ob input { text-align: right; }
.ob-art { width: 110px; height: 110px; margin: 0 auto 6px; display: block; }
.ob p { margin: 6px 0 16px; }
.cd-hero { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.cd-hero b { font-size: 26px; font-weight: 800; display: block; }
.mini { display: flex; align-items: flex-end; gap: 6px; height: 70px; direction: ltr; margin: 8px 0 4px; }
.mini div { flex: 1; text-align: center; font-size: 10px; color: var(--gray); display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.mini i { display: block; border-radius: 6px 6px 2px 2px; margin: 0 auto 3px; width: 70%; min-height: 3px; }

#toast { position: fixed; bottom: calc(100px + var(--sab)); left: 50%; transform: translateX(-50%); background: #1A2335f2; color: #fff; padding: 12px 16px; border-radius: 18px;
  display: flex; gap: 14px; align-items: center; z-index: 20; box-shadow: 0 10px 30px #0006; max-width: calc(100% - 32px); border: 1px solid #ffffff1a; backdrop-filter: blur(16px); animation: toastIn .35s cubic-bezier(.3, 1.4, .5, 1); white-space: nowrap; }
@keyframes toastIn { from { transform: translate(-50%, 30px); opacity: 0; } }
#toast[hidden] { display: none; }
#toast button { color: #7DE3D3; font-weight: 700; }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
#fx span { position: absolute; top: -40px; animation: fall 2.4s cubic-bezier(.3, .2, .6, 1) forwards; }
#fx i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.6s cubic-bezier(.3, .2, .6, 1) forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(var(--r, 300deg)); opacity: .3; } }
#fx b { position: absolute; width: 8px; height: 8px; border-radius: 50%; animation: spark .7s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

#lock, #splash { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--bg); }
html.dark #lock, #splash { background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--p2) 60%, #0B1220) 0%, #0B1220 60%, #070B14 100%); }
#lock[hidden] { display: none; }
.lock-i { width: 84px; height: 84px; margin: 0 auto; border-radius: 28px; display: grid; place-items: center; color: var(--p); background: color-mix(in srgb, var(--p) 16%, transparent); }
.lock-i .i { width: 40px; height: 40px; }
.lock-in h2 { margin: 16px 0 0; } .lock-in .btn { margin-top: 22px; padding: 14px 28px; }
#splash { color: #fff; transition: opacity .5s, transform .5s; z-index: 50; }
#splash.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
#splash img { width: 108px; height: 108px; border-radius: 30px; animation: spIn .9s cubic-bezier(.3, 1.5, .5, 1); box-shadow: 0 20px 60px -10px #2dd4bf80; }
@keyframes spIn { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
#splash h2 { margin: 20px 0 6px; font-size: 28px; font-weight: 800; animation: viewIn .6s .25s both; }
#splash p { margin: 0; opacity: .85; font-size: 17px; animation: viewIn .6s .4s both; }
html:not(.dark) .ic, html:not(.dark) .badge .i, html:not(.dark) .quick .chip .i { color: color-mix(in srgb, var(--c, var(--p)) 72%, black); }
html:not(.dark) .cg.on .ic { color: #fff; }

/* v1.3 – allocation line, per-category fill lines, notifications, recurring, widget */
.alloc { border-radius: 20px; padding: 14px; background: color-mix(in srgb, var(--p) 9%, transparent); border: 1px solid color-mix(in srgb, var(--p) 22%, transparent); }
.al-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.al-top small { color: var(--gray); font-size: 12px; }
.al-top b { font-size: 22px; font-weight: 800; }
.al-pc { font-size: 34px; font-weight: 800; line-height: 1; color: var(--p); letter-spacing: -1px; }
html.dark .al-pc { text-shadow: 0 0 24px color-mix(in srgb, var(--p) 55%, transparent); }
.al-pc.over { color: var(--over); }
.stack { display: flex; gap: 3px; height: 14px; border-radius: 9px; overflow: hidden; background: var(--track); margin: 12px 0 8px; }
.stack i { height: 100%; border-radius: 4px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.crow { padding: 10px 0; border-bottom: 1px solid var(--line); }
.crow:last-of-type { border-bottom: 0; }
.crow .row { margin-bottom: 4px; }
.cmeta { padding-inline-start: 58px; padding-inline-end: 4px; }
.cmeta .bar { margin-top: 2px; height: 7px; }
.cm-t { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--gray); margin-top: 5px; }
.cm-t b { font-size: 13px; color: var(--ink); } .cm-t b.warn { color: var(--warn); } .cm-t b.over { color: var(--over); }
.nt { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.nt:last-of-type { border-bottom: 0; }
.nt-t { flex: 1; min-width: 0; } .nt-t b { font-weight: 600; font-size: 15px; }
.nt .tg { padding: 0; }
.tm { width: 96px; padding: 6px 6px; font-size: 13px; border-radius: 10px; flex: none; }
html.dark .tm { color-scheme: dark; }
.mini-b { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--track); color: var(--gray); flex: none; }
.mini-b.ok { background: color-mix(in srgb, var(--good) 20%, transparent); color: var(--good); }
.mini-b:active { transform: scale(.92); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 8px 0 4px; }
.days button { height: 36px; border-radius: 11px; font-size: 14px; font-weight: 600; background: var(--key); border: 1px solid var(--cardb); }
.days button.on { background: linear-gradient(145deg, var(--p), var(--p2)); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -6px var(--p); }
html.dark .days button.on { color: #04201c; }
.tight-list .exp { border-bottom: 1px solid var(--line); } .tight-list .exp:last-child { border-bottom: 0; }
.wprev { display: block; width: 100%; border-radius: 22px; margin: 12px 0; }
html.dark .h-big small { color: color-mix(in srgb, var(--p) 45%, white); -webkit-text-fill-color: color-mix(in srgb, var(--p) 45%, white); }

/* v1.3.1 – cleaner settings: tappable total, category rows without boxes, editor sheets */
.tot { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.tot-n { font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin: 2px 0; }
.tot-n small { font-size: 22px; font-weight: 600; opacity: .7; margin-inline-start: 4px; }
html.dark .tot-n { background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--p) 45%, white)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html.dark .tot-n small { color: color-mix(in srgb, var(--p) 45%, white); -webkit-text-fill-color: color-mix(in srgb, var(--p) 45%, white); }
.edit-b { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--p) 16%, transparent); color: var(--p); flex: none; }
.clist { margin-top: 8px; }
.crow { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.crow:last-child { border-bottom: 0; }
.crow:active { background: var(--track); }
.cr-m { flex: 1; min-width: 0; }
.cr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cr-top b { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-b { font-size: 17px; font-weight: 700; white-space: nowrap; }
.cr-b small { font-size: 12px; font-weight: 500; color: var(--gray); }
.crow .bar { margin-top: 8px; height: 7px; }
.crow .cm-t { margin-top: 5px; }
.chev { color: var(--gray); opacity: .6; flex: none; }
.chev .i { width: 18px; height: 18px; }
.ce-head { display: flex; align-items: center; gap: 12px; margin: 10px 0 8px; }
.ce-ic { position: relative; flex: none; }
.ce-ic i { position: absolute; bottom: -4px; left: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--p); color: #fff; border: 2px solid var(--sheet); }
html.dark .ce-ic i { color: #04201c; }
.ce-ic i .i { width: 12px; height: 12px; }
.ce-name { font-size: 18px; font-weight: 600; }
.ce-grid { margin: 6px 0 12px; padding: 10px; border-radius: 18px; background: var(--fieldbg); animation: viewIn .25s; }
.ce-grid .ic.on { color: #fff; background: linear-gradient(145deg, var(--c), color-mix(in srgb, var(--c) 60%, black)); }
.ce-info { text-align: center; font-size: 13px; color: var(--gray); margin: -4px 0 12px; }
.pad span { display: block; }

/* v1.4 – cloud sync */
.avs { position: relative; }
.sync-dot { position: absolute; bottom: 0; left: -2px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--bg2); background: #4ADE80; box-shadow: 0 0 8px #4ADE80aa; }
.sync-dot.off { background: var(--warn); box-shadow: none; }
.sync-dot.busy { background: var(--p); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.7); opacity: .6; } }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.cloud { position: relative; overflow: hidden; }
.cloud::after { content: ""; position: absolute; width: 200px; height: 200px; left: -80px; top: -110px; border-radius: 50%; background: radial-gradient(color-mix(in srgb, var(--p) 22%, transparent), transparent 70%); pointer-events: none; }
.cl-art { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 10px; }
.cl-art .av { width: 54px; height: 54px; font-size: 28px; }
.cl-line { display: flex; align-items: center; gap: 6px; color: var(--p); }
.cl-line i { display: block; width: 26px; height: 2px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--p) 0 5px, transparent 5px 9px); animation: flow 1s linear infinite; background-size: 18px 2px; }
@keyframes flow { to { background-position: -18px 0; } }
.cl-line .i { width: 26px; height: 26px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--p) 60%, transparent)); }
.cl-txt { text-align: center; margin-bottom: 12px; line-height: 1.5; }
.cl-st { font-size: 14px; margin: -2px 0 10px; } .cl-st .i { width: 16px; height: 16px; }
.cl-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 18px; background: var(--fieldbg); }
.cl-code small { display: block; font-size: 12px; color: var(--gray); }
.cl-code b { font-size: 26px; font-weight: 800; letter-spacing: 3px; direction: ltr; display: inline-block; }
.cl-code.big { justify-content: center; text-align: center; margin: 14px 0 6px; flex-direction: column; gap: 4px; }
.cl-code.big b { font-size: 34px; color: var(--p); }
.cl-more { display: flex; justify-content: space-between; margin-top: 12px; }
.cl-more button { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray); padding: 6px 4px; }
.cl-more button:last-child { color: var(--over); }
.code-in { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 4px; direction: ltr; text-transform: uppercase; padding: 16px; }
.who-pick { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }
.who-pick button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 20px; background: var(--fieldbg); font-weight: 700; font-size: 16px; border: 1.5px solid transparent; }
.who-pick button:active { border-color: var(--p); transform: scale(.97); }
.who-pick .av { width: 60px; height: 60px; font-size: 32px; }
.steps { text-align: right; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.steps div { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--p) 20%, transparent); color: var(--p); }
.steps .i { width: 18px; height: 18px; color: #3B82F6; }
.btn:disabled { opacity: .7; }
.ob-art { border-radius: 28px; box-shadow: 0 16px 40px -12px #2dd4bf66; }
