/* Portfólió & Költségvetés — dizájn rendszer. Sötét az alap, világos mód támogatott. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "Inter Tight", "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  --bg: #000; --bg-elev: #0b0b0d; --card: #111113; --card-2: #1c1c1e; --card-3: #2c2c2e;
  --hair: rgba(255,255,255,.08); --hair-2: rgba(255,255,255,.14);
  --text: #f5f5f7; --text-2: rgba(235,235,245,.64); --text-3: rgba(235,235,245,.4);
  --track: rgba(255,255,255,.08);
  --accent: #0a84ff; --green: #30d158; --orange: #ff9f0a; --red: #ff453a; --purple: #bf5af2; --teal: #64d2ff;
  --primary-bg: #f5f5f7; --primary-fg: #000;
  --glass: rgba(18,18,20,.72);
  --shadow: 0 20px 60px rgba(0,0,0,.55);
  --r-xl: 28px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --ease: cubic-bezier(.32,.72,0,1); --spring: cubic-bezier(.34,1.36,.64,1);
  --tabbar-h: calc(58px + env(safe-area-inset-bottom));
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f2f2f7; --bg-elev: #fff; --card: #fff; --card-2: #f2f2f7; --card-3: #e5e5ea;
  --hair: rgba(0,0,0,.08); --hair-2: rgba(0,0,0,.14);
  --text: #000; --text-2: rgba(60,60,67,.7); --text-3: rgba(60,60,67,.5); --track: rgba(0,0,0,.07);
  --accent: #007aff; --green: #28b14c; --orange: #f08c00; --red: #ff3b30; --purple: #af52de;
  --primary-bg: #000; --primary-fg: #fff; --glass: rgba(249,249,251,.78); --shadow: 0 20px 60px rgba(0,0,0,.14);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body { font-size: 16px; line-height: 1.35; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
[hidden] { display: none !important; }

/* ---------- váz ---------- */
#app { position: relative; max-width: 520px; margin: 0 auto; min-height: 100%; }
.view { padding: calc(env(safe-area-inset-top) + 18px) 20px calc(var(--tabbar-h) + 36px); animation: viewIn .42s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.title { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: -.035em; margin: 4px 0 22px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.head .title { margin-bottom: 22px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; margin-bottom: 26px; transition: transform .15s var(--ease), background .2s; }
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { width: 18px; height: 18px; }
.section-label { display: flex; justify-content: space-between; align-items: baseline; margin: 30px 4px 12px; }
.section-label h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.section-label .link { color: var(--accent); font-size: 15px; font-weight: 500; }

.card { background: var(--card); border-radius: var(--r-xl); padding: 22px; position: relative; overflow: hidden; }
:root[data-theme="light"] .card { box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 8px 24px rgba(0,0,0,.04); }
.card + .card { margin-top: 12px; }
.card.flush { padding: 6px 0; }
.tap { transition: transform .18s var(--ease), opacity .18s; }
.tap:active { transform: scale(.975); opacity: .85; }

/* ---------- nagy számok ---------- */
.big { font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -.045em; line-height: 1.02; }
.big .unit { font-size: .46em; font-weight: 600; color: var(--text-2); letter-spacing: -.01em; margin-left: .22em; }
.mid { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.035em; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.small { font-size: 13px; } .tiny { font-size: 11px; }
.pos { color: var(--green); } .neg { color: var(--red); } .warn { color: var(--orange); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--card-2); }
.pill.pos { background: color-mix(in srgb, var(--green) 16%, transparent); }
.pill.neg { background: color-mix(in srgb, var(--red) 16%, transparent); }

/* ---------- hero ---------- */
.hero { padding: 26px 22px 24px; background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 55%), var(--card); }
.hero .row { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.split .card { margin: 0; padding: 18px; border-radius: var(--r-lg); }
.kv .k { font-size: 13px; color: var(--text-2); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.kv .v { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.03em; }

/* ---------- gyűrű / budget ---------- */
.budget-hero { display: flex; align-items: center; gap: 22px; }
.ring-wrap { position: relative; flex: none; }
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-center b { font-family: var(--display); font-size: 26px; letter-spacing: -.04em; display: block; }
.ring-center span { font-size: 11px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }
.ring-fg { transition: stroke-dashoffset 1.1s var(--ease); }
.budget-meta .line { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 6px 0; }
.budget-meta .line + .line { border-top: .5px solid var(--hair); }
.budget-meta { flex: 1; min-width: 0; }

.bar { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease); }

/* ---------- listák ---------- */
.list { background: var(--card); border-radius: var(--r-xl); overflow: hidden; }
.list + .list { margin-top: 12px; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; position: relative; width: 100%; text-align: left; transition: background .2s; }
.row-item:active { background: var(--card-2); }
.row-item + .row-item::before { content: ""; position: absolute; top: 0; left: 70px; right: 0; height: .5px; background: var(--hair); }
.row-item.plain + .row-item.plain::before { left: 18px; }
.emoji { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; background: var(--card-2); }
.row-main { flex: 1; min-width: 0; }
.row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.row-title { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.015em; }
.row-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; display: flex; justify-content: space-between; gap: 10px; }
.row-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.02em; }
.row-item .bar { margin-top: 9px; height: 5px; }
.chev { color: var(--text-3); flex: none; width: 8px; }
.day-head { font-size: 13px; font-weight: 600; color: var(--text-3); margin: 22px 6px 8px; letter-spacing: .02em; display: flex; justify-content: space-between; }

/* ---------- vezérlők ---------- */
.seg { display: flex; background: var(--card-2); border-radius: 12px; padding: 3px; margin-bottom: 18px; position: relative; }
.seg button { flex: 1; padding: 8px 0; font-size: 14px; font-weight: 600; border-radius: 9px; color: var(--text-2); position: relative; z-index: 1; transition: color .25s; }
.seg button.on { color: var(--text); }
.seg .thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 9px; background: var(--card-3); box-shadow: 0 3px 8px rgba(0,0,0,.25); transition: transform .35s var(--ease); }
:root[data-theme="light"] .seg .thumb { background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.month-nav { display: flex; align-items: center; justify-content: space-between; margin: -6px 0 18px; }
.month-nav b { font-size: 17px; letter-spacing: -.02em; }
.month-nav button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); transition: background .2s; }
.month-nav button:active { background: var(--card-2); }
.month-nav svg { width: 16px; height: 16px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card-2); border-radius: 12px; padding: 0 12px; height: 40px; margin-bottom: 12px; }
.search svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.search input { flex: 1; background: none; border: 0; outline: 0; font-size: 16px; min-width: 0; }
.search input::placeholder { color: var(--text-3); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px 4px; padding: 0 20px 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--card-2); font-size: 14px; font-weight: 600; color: var(--text-2); transition: all .2s var(--ease); white-space: nowrap; }
.chip.on { background: var(--primary-bg); color: var(--primary-fg); }
.chip:active { transform: scale(.94); }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px; border-radius: 16px; font-size: 17px; font-weight: 600; background: var(--primary-bg); color: var(--primary-fg); transition: transform .15s var(--ease), opacity .2s; letter-spacing: -.01em; }
.btn:active { transform: scale(.97); }
.btn.secondary { background: var(--card-2); color: var(--text); }
.btn.danger { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.btn:disabled { opacity: .35; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.empty { text-align: center; padding: 46px 20px 40px; }
.empty .glyph { font-size: 44px; margin-bottom: 14px; }
.empty h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.02em; }
.empty p { margin: 0 0 22px; color: var(--text-2); font-size: 15px; }

/* ---------- űrlap ---------- */
.field { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 18px; min-height: 52px; position: relative; }
.field + .field::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; height: .5px; background: var(--hair); }
.field label { font-size: 16px; flex: none; }
.field input, .field select { background: none; border: 0; outline: 0; text-align: right; font-size: 16px; color: var(--text-2); min-width: 0; flex: 1; padding: 14px 0; }
.field input:focus { color: var(--text); }
.field select { appearance: none; -webkit-appearance: none; direction: rtl; }
.field-note { font-size: 13px; color: var(--text-3); margin: 8px 18px 18px; line-height: 1.45; }
.toggle { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 99px; background: var(--card-3); position: relative; flex: none; transition: background .25s; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.3); transition: transform .3s var(--spring); }
.toggle:checked { background: var(--green); }
.toggle:checked::after { transform: translateX(20px); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 18px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; position: relative; transition: transform .2s var(--spring); }
.swatch.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px currentColor; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 10px 12px 14px; }
.emoji-grid button { aspect-ratio: 1; border-radius: 10px; font-size: 22px; transition: background .15s, transform .15s; }
.emoji-grid button.on { background: var(--card-3); transform: scale(1.06); }

/* ---------- tab bar + FAB ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border-top: .5px solid var(--hair); }
.tabbar nav { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; height: 58px; padding: 0 6px; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 10px; font-weight: 600; letter-spacing: .01em; transition: color .2s; }
.tab svg { width: 25px; height: 25px; transition: transform .3s var(--spring); }
.tab.on { color: var(--text); }
.tab:active svg { transform: scale(.86); }
/* középső gyors bevitel gomb a tab barban */
.tab-add-wrap { display: grid; place-items: center; }
.tab-add { width: 50px; height: 50px; border-radius: 50%; background: var(--primary-bg); color: var(--primary-fg); display: grid; place-items: center; margin-top: -6px; box-shadow: 0 8px 22px rgba(0,0,0,.35), 0 0 0 .5px var(--hair-2); transition: transform .25s var(--spring); }
.tab-add:active { transform: scale(.88); }
.tab-add svg { width: 24px; height: 24px; }
:root[data-theme="light"] .tab-add { box-shadow: 0 8px 20px rgba(0,0,0,.18); }

/* ---------- lapok (sheet) ---------- */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .35s var(--ease); }
.backdrop.in { opacity: 1; }
.sheet { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; max-height: 94%; display: flex; flex-direction: column; background: var(--bg-elev); border-radius: 30px 30px 0 0; transform: translateY(105%); transition: transform .5s var(--ease); box-shadow: var(--shadow); padding-bottom: env(safe-area-inset-bottom); }
:root[data-theme="light"] .sheet { background: var(--bg); }
.sheet.in { transform: none; }
.sheet .grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--hair-2); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 8px; flex: none; }
.sheet-head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.sheet-head button { color: var(--accent); font-size: 17px; font-weight: 500; min-width: 64px; }
.sheet-head button.right { text-align: right; font-weight: 600; }
.sheet-body { overflow-y: auto; padding: 8px 20px 28px; -webkit-overflow-scrolling: touch; }
.sheet .list, .sheet .card { background: var(--card); }
:root:not([data-theme="light"]) .sheet .list { background: var(--card-2); }

/* ---------- gyors bevitel ---------- */
.qa-amount { text-align: center; padding: 18px 0 6px; }
.qa-amount .big { font-size: 60px; transition: transform .18s var(--spring); }
.qa-amount .big.bump { transform: scale(1.04); }
.qa-amount .big.zero { color: var(--text-3); }
.qa-amount .big.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.qa-type { display: flex; justify-content: center; margin: 6px 0 14px; }
.qa-type .seg { width: 220px; margin: 0; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.key { height: 60px; border-radius: 18px; background: var(--card-2); font-size: 28px; font-weight: 500; font-family: var(--display); transition: transform .12s var(--ease), background .15s; display: grid; place-items: center; }
:root[data-theme="light"] .key { background: #fff; }
.key:active { transform: scale(.92); background: var(--card-3); }
.key.ghost { background: transparent; font-size: 20px; color: var(--text-2); }
.key svg { width: 24px; height: 24px; }
.qa-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.qa-cat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 18px; background: var(--card-2); transition: transform .15s var(--ease), background .2s; min-width: 0; }
:root[data-theme="light"] .qa-cat { background: #fff; }
.qa-cat:active { transform: scale(.92); }
.qa-cat .e { font-size: 24px; line-height: 1; }
.qa-cat .n { font-size: 11px; line-height: 13px; height: 26px; font-weight: 600; color: var(--text-2); max-width: 100%; overflow: hidden; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: break-word; hyphens: auto; }
.qa-step { font-size: 13px; color: var(--text-3); text-align: center; margin: 16px 0 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.qa-done { display: grid; place-items: center; padding: 50px 0 40px; }
.check { width: 84px; height: 84px; border-radius: 50%; background: var(--green); display: grid; place-items: center; animation: pop .5s var(--spring); }
.check svg { width: 42px; height: 42px; color: #fff; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- grafikonok ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.axis { fill: var(--text-3); font-size: 10.5px; font-family: var(--font); font-weight: 500; }
.axis.hl { fill: var(--text); font-weight: 700; }
.bar-target { fill: var(--track); }
.bar-v { fill: var(--text-3); transition: y .9s var(--ease), height .9s var(--ease); }
.bar-v.hl { fill: var(--accent); }
.bar-v.over { fill: var(--red); }
.line-draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease); }
.in .line-draw { stroke-dashoffset: 0; }
.area { opacity: 0; transition: opacity 1s .35s; } .in .area { opacity: 1; }
.dot { opacity: 0; transition: opacity .3s 1.1s; } .in .dot { opacity: 1; }
.zero { stroke: var(--hair-2); stroke-dasharray: 3 4; }
.net.pos { fill: color-mix(in srgb, var(--green) 55%, transparent); } .net.neg { fill: color-mix(in srgb, var(--red) 60%, transparent); }
.cursor { stroke: var(--hair-2); opacity: 0; } .cursor.on { opacity: 1; }
.donut-wrap { position: relative; flex: none; }
.donut-seg { transition: stroke-dasharray 1s var(--ease); }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut-center b { font-family: var(--display); font-size: 22px; letter-spacing: -.035em; display: block; }
.donut-center span { font-size: 11px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }
.legend { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.legend .li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.legend .sw { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.legend .vl { font-weight: 600; font-variant-numeric: tabular-nums; }
.donut-row { display: flex; align-items: center; gap: 22px; }
.spark { width: 110px; height: 36px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.stat-grid .card { margin: 0; padding: 18px; border-radius: var(--r-lg); }

/* ---------- előrejelzés ---------- */
.fc-pick { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 8px; }
.month-cards { display: flex; flex-direction: column; gap: 10px; }
.mcard { background: var(--card); border-radius: var(--r-lg); padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; text-align: left; width: 100%; transition: transform .18s var(--ease); }
.mcard:active { transform: scale(.98); }
.mcard .m { font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.mcard .bal { font-family: var(--display); font-weight: 700; font-size: 19px; text-align: right; letter-spacing: -.03em; }
.mcard .io { font-size: 13px; color: var(--text-2); }
.mcard .net { font-size: 13px; text-align: right; font-weight: 600; }
.mcard.now { box-shadow: inset 0 0 0 1px var(--hair-2); }

/* ---------- értesítő sáv ---------- */
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; margin-bottom: 12px; background: color-mix(in srgb, var(--orange) 13%, var(--card)); width: 100%; text-align: left; animation: viewIn .5s var(--ease) both; }
.banner.red { background: color-mix(in srgb, var(--red) 14%, var(--card)); }
.banner.blue { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.banner .bi { font-size: 22px; flex: none; }
.banner b { display: block; font-size: 15px; letter-spacing: -.01em; }
.banner span { font-size: 13px; color: var(--text-2); }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--tabbar-h) + 18px); transform: translate(-50%, 20px); opacity: 0; background: var(--card-3); color: var(--text); padding: 12px 16px 12px 18px; border-radius: 16px; font-size: 15px; font-weight: 500; display: flex; gap: 16px; align-items: center; box-shadow: var(--shadow); transition: all .35s var(--spring); white-space: nowrap; }
.toast.in { transform: translate(-50%, 0); opacity: 1; }
.toast button { color: var(--accent); font-weight: 600; }

/* ---------- zár ---------- */
.lock { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; animation: viewIn .4s var(--ease); }
.lock .logo { width: 64px; height: 64px; border-radius: 18px; margin-bottom: 22px; }
.lock h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.02em; }
.lock p { color: var(--text-2); margin: 0 0 26px; font-size: 15px; min-height: 20px; text-align: center; }
.dots { display: flex; gap: 16px; margin-bottom: 34px; }
.dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--text-2); transition: background .15s; }
.dots i.on { background: var(--text); border-color: var(--text); }
.dots.shake { animation: shake .4s; }
.lock .keypad { width: 280px; gap: 16px 22px; }
.lock .key { height: 78px; width: 78px; border-radius: 50%; justify-self: center; font-size: 32px; }

.settings-group { margin-bottom: 26px; }
.settings-group > .eyebrow { margin: 0 18px 8px; display: block; }
.row-item .val { color: var(--text-2); font-size: 15px; white-space: nowrap; }
.row-item .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 16px; flex: none; color: #fff; }
.row-item.plain .ic + .row-main { margin-left: 0; }
.reorder { display: flex; gap: 4px; }
.reorder button { width: 32px; height: 32px; border-radius: 8px; background: var(--card-2); color: var(--text-2); display: grid; place-items: center; }
.reorder svg { width: 14px; height: 14px; }
.foot { text-align: center; color: var(--text-3); font-size: 12px; margin: 30px 0 0; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- gyors bevitel képernyő ---------- */
.qa.view { display: flex; flex-direction: column; min-height: 100dvh; padding: calc(env(safe-area-inset-top) + 12px) 18px calc(env(safe-area-inset-bottom) + 16px); }
.qa-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qa-top .seg { width: 190px; margin: 0; }
.qa-top .seg button { padding: 7px 0; font-size: 13px; }
.qa-home { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 11px; border-radius: 99px; background: var(--card-2); font-size: 14px; font-weight: 600; }
.qa-home svg { width: 17px; height: 17px; }
.qa-alert { display: flex; align-items: center; gap: 8px; align-self: center; margin-top: 14px; padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--orange) 15%, transparent); color: var(--orange); }
.qa-alert.red { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }
.qa-alert span:first-child { font-size: 8px; }
.qa-amount { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 150px; padding: 8px 0; }
.qa-meta { display: flex; gap: 8px; margin-top: 14px; }
.qa-meta .pill { padding: 6px 12px; color: var(--text-2); font-weight: 500; position: relative; }
.qa-date-in { position: absolute; inset: 0; opacity: 0; width: 100%; }
.qa-cats { opacity: .5; transition: opacity .3s var(--ease); margin-bottom: 14px; }
.qa-cats.ready, .qa-cats.all { opacity: 1; }
.qa-cats.all { margin-bottom: 0; }
.qa-cat .e { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--accent)) 20%, transparent); }
.qa-cat.more .e { background: var(--card-3); font-size: 13px; letter-spacing: 1px; color: var(--text-2); }
.qa .keypad { gap: 8px; }
.qa .key { height: 56px; }
.qa-empty { text-align: center; margin-bottom: 16px; }
.qa-empty p { color: var(--text-2); margin: 0 0 4px; }
.qa-done { flex: none; padding: 9vh 0 28px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.qa-done .mid { font-size: 40px; }
.qa-left { margin-bottom: 12px; }
.qa-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.link-btn { color: var(--text-2); font-size: 15px; font-weight: 500; padding: 10px; }
.chips.wrap { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
.chips.wrap .chip { font-size: 13px; padding: 6px 12px; }
.big-emoji { width: 76px; height: 76px; border-radius: 24px; font-size: 38px; }
.field .pill { flex: none; color: var(--accent); }
.emoji.ticker { font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.icon-btn.spin svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo-mark { width: 68px; height: 68px; border-radius: 20px; margin-bottom: 22px; background: url("../icons/mark.svg") center / cover no-repeat; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.pin-setup { display: flex; flex-direction: column; align-items: center; padding-bottom: 10px; }
.pin-setup .keypad { width: 270px; gap: 12px 18px; }
.pin-setup .key { width: 72px; height: 72px; border-radius: 50%; justify-self: center; }
.pin-setup .dots { margin-bottom: 26px; }
.steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px; align-items: start; }
.steps li::before { content: counter(st); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.steps b { font-size: 15px; } .steps span { font-size: 14px; color: var(--text-2); line-height: 1.45; }
.rem { font-size: 15px; line-height: 1.4; }
.foot { white-space: pre-line; }
:root[data-theme="light"] .pill, :root[data-theme="light"] .qa-home, :root[data-theme="light"] .seg, :root[data-theme="light"] .chip:not(.on),
:root[data-theme="light"] .search, :root[data-theme="light"] .icon-btn, :root[data-theme="light"] .reorder button { background: rgba(118,118,128,.12); }
:root[data-theme="light"] .key.ghost { background: transparent; }
:root[data-theme="light"] .emoji { background: rgba(118,118,128,.1); }

.amt-unit { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; flex: none; }
.amt-unit b { font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.amt-unit small { font-size: 12px; color: var(--text-3); font-weight: 500; }
.amt-unit.neg b, .amt-unit.neg small { color: var(--red); }
.amt-unit.pos small { color: var(--green); font-weight: 600; font-size: 13px; }
.row-sub.num span { font-variant-numeric: tabular-nums; }
.back-link { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 17px; font-weight: 500; margin: 0 0 2px -6px; height: 32px; }
.back-link svg { width: 20px; height: 20px; }

.field input.input-title { text-align: left; color: var(--text); font-size: 17px; font-weight: 500; }
.donut-stack { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.donut-stack .legend { width: 100%; gap: 0; }
.donut-stack .li { padding: 10px 2px; border-top: .5px solid var(--hair); }
.donut-stack .li:first-child { border-top: 0; }
.donut-stack .nm { color: var(--text); font-weight: 500; }
.legend .pc { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; width: 52px; text-align: right; }
.donut-stack .vl { min-width: 92px; text-align: right; }
.donut-center b { font-size: 20px; }
.donut-stack .nm { white-space: normal; overflow: visible; line-height: 1.25; }

/* ---- biztonsági kiegészítések (v0.2) ---- */
.selectable, .steps, .steps * { -webkit-user-select: text; user-select: text; }
.privacy-cover { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.privacy-cover .logo-mark { width: 72px; height: 72px; }
.code-entry { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 340px; }
.code-entry .btn { margin-top: 14px; }
.pass-input { width: 100%; height: 52px; border-radius: 14px; border: 0; padding: 0 16px; font-size: 17px; background: var(--card-2); color: var(--text); margin-top: 8px; }
.lock-hint { font-size: 12px; color: var(--text-3, var(--text-2)); text-align: center; margin: 16px 8px 0; line-height: 1.4; max-width: 300px; }
.update-banner { position: fixed; z-index: 90; left: 50%; top: calc(env(safe-area-inset-top) + 10px); transform: translateX(-50%); background: var(--card-3); color: var(--text); border-radius: 16px; padding: 12px 16px; font-size: 15px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.update-banner span { color: var(--accent); margin-left: 10px; }
.setup { min-height: 100%; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 40px) 22px calc(env(safe-area-inset-bottom) + 28px); max-width: 520px; margin: 0 auto; }
.setup .logo-mark { width: 64px; height: 64px; margin-bottom: 18px; }
.setup h1 { font-size: 32px; letter-spacing: -.03em; margin: 0 0 8px; }
.setup .lead { color: var(--text-2); font-size: 16px; line-height: 1.5; margin: 0 0 26px; }
.setup .card { margin-bottom: 14px; }
.setup .card h3 { margin: 0 0 6px; font-size: 17px; }
.setup .card p { margin: 0 0 14px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.setup .spacer { flex: 1; min-height: 20px; }
.setup .toggle-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.privacy { margin-top: 18px; }
.lock p.lock-hint { margin: 18px 8px 0; font-size: 12px; min-height: 0; }
