/* Cark app — sötét „műszerfal” kinézet. Színek csak tokenekből. */
:root {
  --bg: #0D0E11;
  --bg-2: #131519;
  --surface: #181B20;
  --surface-2: #20242B;
  --line: #262A32;
  --line-2: #323844;
  --text: #F3F2EE;
  --text-2: #B4B8C0;
  --muted: #7C828D;
  --accent: #FF7A1A;
  --accent-2: #FFA45C;
  --accent-ink: #1A0E04;
  --pos: #3DDC84;
  --neg: #FF5A52;
  --warn: #FFC23D;
  --plan: #8FA7FF;
  --plate-blue: #1F47B8;
  --radius: 14px;
  --radius-s: 9px;
  --tab-h: 64px;
  --top-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --f-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-num: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 400 16px/1.4 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
[hidden] { display: none !important; }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; }

/* ---------- fejléc ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 16px 0;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(var(--bg) 70%, rgba(13,14,17,0));
}
.brand { display: flex; align-items: center; gap: 9px; font: italic 800 26px/1 var(--f-num); letter-spacing: .01em; text-transform: uppercase; }
.brand em { font-style: italic; color: var(--accent); }
.brand-mark { width: 30px; height: 30px; color: var(--accent); }
.topbar-right { display: flex; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface);
  display: grid; place-items: center;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.view { padding: 0 16px calc(var(--tab-h) + var(--safe-b) + 28px); }

/* ---------- alsó sáv ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30;
  width: 100%; max-width: 560px;
  height: calc(var(--tab-h) + var(--safe-b)); padding: 0 8px var(--safe-b);
  display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: center;
  background: rgba(19,21,25,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.tabbar a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--text); }
.tabbar a.on svg { stroke: var(--accent); }
.tab-add {
  justify-self: center; width: 56px; height: 56px; margin-top: -22px; border-radius: 18px; border: 0;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 24px -6px rgba(255,122,26,.55), inset 0 1px 0 rgba(255,255,255,.35);
  display: grid; place-items: center; transition: transform .15s;
}
.tab-add:active { transform: scale(.94); }
.tab-add svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.badge { position: absolute; top: -4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--neg); color: #fff; font: 700 11px/18px var(--f-body); text-align: center; }

/* ---------- számok, címkék ---------- */
.num { font-family: var(--f-num); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .005em; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.muted { color: var(--muted); }
.cap { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h2.sec { margin: 30px 0 10px; font: 700 13px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; }
h2.sec a, h2.sec button { font: 600 14px var(--f-body); letter-spacing: 0; text-transform: none; color: var(--accent); background: none; border: 0; padding: 0; }

/* ---------- garázs: összegző ---------- */
.hero { padding: 6px 0 4px; }
.hero-main .cap { display: block; margin-bottom: 2px; }
.hero-big { font: 700 58px/1 var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hero-big small { font-size: 26px; font-weight: 600; color: var(--text-2); margin-left: 4px; }
.hero-row { display: flex; gap: 0; margin-top: 14px; border-top: 1px solid var(--line); }
.hero-row > div { flex: 1; padding: 12px 0 0; }
.hero-row > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.hero-row > div:first-child { padding-right: 14px; }
.hero-row .v { font: 700 25px/1.1 var(--f-num); font-variant-numeric: tabular-nums; margin-top: 3px; }
.hero-row .v small { font-size: 15px; color: var(--text-2); font-weight: 600; }

.alert {
  display: flex; gap: 12px; align-items: center; margin: 18px 0 0; padding: 12px 14px;
  border-radius: var(--radius); background: linear-gradient(90deg, rgba(255,90,82,.16), rgba(255,90,82,.04));
  border: 1px solid rgba(255,90,82,.35);
}
.alert.soft { background: rgba(255,194,61,.08); border-color: rgba(255,194,61,.3); }
.alert-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--neg); color: #fff; font: 800 18px var(--f-num); }
.alert.soft .alert-ico { background: var(--warn); color: #261a00; }
.alert b { display: block; font-weight: 600; }
.alert span { font-size: 14px; color: var(--text-2); }
.alert .go { margin-left: auto; color: var(--text-2); font-size: 22px; }

/* ---------- szűrő chipek ---------- */
.chips { display: flex; gap: 7px; overflow-x: auto; margin: 22px -16px 4px; padding: 0 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.chip i { font-style: normal; color: var(--muted); margin-left: 5px; font-weight: 500; }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip.on i { color: #555; }

.search { margin: 14px 0 0; position: relative; }
.search input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 14px 0 40px; font-size: 16px; }
.search svg { position: absolute; left: 13px; top: 12px; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; }

/* ---------- autólista ---------- */
.cars { list-style: none; margin: 8px 0 0; padding: 0; }
.car-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.car-row:active { background: var(--bg-2); }
.thumb { width: 74px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--surface-2); position: relative; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ini { font: italic 800 22px/1 var(--f-num); color: var(--line-2); text-transform: uppercase; letter-spacing: .02em; }
.car-name { font-weight: 600; font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-name span { color: var(--muted); font-weight: 500; }
.car-meta { display: flex; align-items: center; gap: 7px; margin-top: 6px; flex-wrap: wrap; }
.car-money { text-align: right; }
.car-money .v { font: 700 21px/1 var(--f-num); font-variant-numeric: tabular-nums; }
.car-money .l { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; }

.plate {
  display: inline-flex; align-items: stretch; height: 21px; border-radius: 4px; overflow: hidden;
  background: #F4F4F0; color: #111; border: 1px solid #0006; font: 700 13px/19px var(--f-num); letter-spacing: .06em;
}
.plate::before { content: 'H'; width: 12px; background: var(--plate-blue); color: #fff; font-size: 9px; line-height: 27px; text-align: center; letter-spacing: 0; }
.plate b { padding: 0 6px; font-weight: 700; }
.plate.big { height: 34px; font-size: 22px; line-height: 32px; border-radius: 6px; border-width: 2px; }
.plate.big::before { width: 19px; font-size: 13px; line-height: 44px; }
.plate.big b { padding: 0 10px; }
.plate.none { background: var(--surface-2); color: var(--muted); border-color: var(--line-2); }
.plate.none::before { display: none; }

.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-terv { color: var(--plan); }
.st-keszlet { color: var(--text-2); }
.st-felujitas { color: var(--warn); }
.st-elado { color: var(--accent-2); }
.st-eladva { color: var(--pos); }
.tag-due { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: rgba(255,90,82,.18); color: var(--neg); }
.tag-due.soon { background: rgba(255,194,61,.15); color: var(--warn); }

.empty { padding: 56px 8px 20px; text-align: center; }
.empty .big { font: italic 800 34px/1 var(--f-num); text-transform: uppercase; }
.empty p { color: var(--text-2); margin: 10px auto 22px; max-width: 300px; }
.empty .row { display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* ---------- gombok ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border-radius: 14px; border: 0; font-weight: 600; font-size: 16px;
  background: var(--surface-2); color: var(--text);
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); }
.btn.danger { background: rgba(255,90,82,.14); color: var(--neg); }
.btn.block { width: 100%; }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* ---------- autó adatlap ---------- */
.detail-hero { position: relative; margin: 0 -16px; height: 260px; background: var(--surface); overflow: hidden; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .ph { position: absolute; inset: 0; display: grid; place-items: center; font: italic 800 96px/1 var(--f-num); text-transform: uppercase; color: var(--surface-2); letter-spacing: -.02em; overflow: hidden; white-space: nowrap; }
.detail-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,14,17,.55) 0%, rgba(13,14,17,0) 32%, rgba(13,14,17,0) 45%, var(--bg) 100%); pointer-events: none; }
.detail-hero .photo-btn { position: absolute; right: 16px; bottom: 76px; z-index: 2; height: 34px; padding: 0 12px; border-radius: 10px; border: 0; background: rgba(13,14,17,.65); backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.detail-hero .photo-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.detail-head { position: relative; z-index: 2; margin-top: -66px; }
.detail-head h1 { margin: 0; font: 700 34px/1 var(--f-num); letter-spacing: .005em; }
.detail-head h1 span { color: var(--text-2); font-weight: 600; }
.detail-head .sub { display: flex; gap: 10px; align-items: center; margin-top: 10px; color: var(--text-2); font-size: 14px; }

.has-hero .topbar { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; background: none; }
.has-hero .topbar .brand { visibility: hidden; }
.has-hero .icon-btn { background: rgba(13,14,17,.6); backdrop-filter: blur(8px); }
.back-btn { position: fixed; top: calc(var(--safe-t) + 8px); z-index: 25; }

/* állapot léptető */
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 22px 0 0; }
.stepper button { border: 0; background: none; padding: 0; text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; }
.stepper button::before { content: ''; display: block; height: 4px; border-radius: 2px; background: var(--line-2); margin-bottom: 7px; }
.stepper button.done::before { background: var(--text-2); }
.stepper button.cur { color: var(--text); }
.stepper button.cur::before { background: var(--accent); box-shadow: 0 0 12px rgba(255,122,26,.6); }
.stepper button.cur.s-eladva::before { background: var(--pos); box-shadow: 0 0 12px rgba(61,220,132,.5); }

/* a matek */
.math { margin-top: 26px; padding: 18px 16px 6px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.math-head { display: flex; justify-content: space-between; align-items: flex-end; }
.math-result .v { font: 700 46px/1 var(--f-num); font-variant-numeric: tabular-nums; }
.math-result .v small { font-size: 22px; font-weight: 600; margin-left: 3px; }
.math-kpis { text-align: right; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.math-kpis b { font: 700 18px var(--f-num); color: var(--text); }
.math-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 16px 0 6px; background: var(--surface-2); gap: 2px; }
.math-bar i { display: block; height: 100%; }
.ml { list-style: none; margin: 10px 0 0; padding: 0; }
.ml li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.ml li.click:active { background: var(--surface-2); }
.ml .op { font: 700 18px/1 var(--f-num); color: var(--muted); text-align: center; }
.ml .nm small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.ml .am { font: 700 19px/1 var(--f-num); font-variant-numeric: tabular-nums; text-align: right; }
.ml .am small { display: block; font: 500 12px var(--f-body); color: var(--muted); margin-top: 3px; }
.ml li.sub { padding-left: 22px; font-size: 14px; }
.ml li.sub .am { font-size: 17px; }
.ml li.total { border-top: 2px solid var(--line-2); }
.ml li.total .nm { font-weight: 700; }
.ml li.total .am { font-size: 24px; }
.ml li.add { grid-template-columns: 1fr; padding: 4px 0 10px; border-top: 0; }
.tag-plan { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; border: 1px dashed var(--plan); color: var(--plan); font-size: 10px; font-weight: 700; letter-spacing: .06em; vertical-align: 2px; }
.is-plan .am { color: var(--plan); }
.planvs { display: flex; justify-content: space-between; gap: 10px; margin: 12px 0 0; padding: 12px 0 10px; border-top: 1px dashed var(--line-2); font-size: 14px; color: var(--text-2); }
.planvs b { font: 700 17px var(--f-num); color: var(--text); }
.planvs b.pos { color: var(--pos); }
.planvs b.neg { color: var(--neg); }
.note-warn { margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; background: rgba(143,167,255,.1); color: var(--plan); font-size: 14px; }

/* határidő-kártyák az adatlapon */
.duebox { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.duebox .d { width: 54px; flex: none; text-align: center; }
.duebox .d b { display: block; font: 700 26px/1 var(--f-num); }
.duebox .d span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.duebox .t { flex: 1; min-width: 0; }
.duebox .t b { display: block; font-weight: 600; }
.duebox .t span { font-size: 13px; color: var(--text-2); }
.duebox.over .d b { color: var(--neg); }
.duebox.soon .d b { color: var(--warn); }
.duebox.ok .d b { color: var(--text-2); }
.duebox.done { opacity: .55; }

dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; }
dl.facts dt, dl.facts dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
dl.facts dt { color: var(--muted); font-size: 14px; padding-right: 16px; }
dl.facts dd { text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; color: var(--text-2); margin: 0; padding: 12px 0; }
.actions { display: flex; gap: 10px; margin-top: 28px; }
.actions .btn { flex: 1; }

/* ---------- napló ---------- */
.period-big { margin-top: 18px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; border-top: 1px solid var(--line); }
.kpis > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.kpis > div:nth-child(odd) { padding-right: 14px; border-right: 1px solid var(--line); }
.kpis > div:nth-child(even) { padding-left: 14px; }
.kpis .v { font: 700 24px/1.1 var(--f-num); font-variant-numeric: tabular-nums; margin-top: 3px; }
.kpis .v small { font-size: 14px; color: var(--text-2); font-weight: 600; }

.chart-wrap { margin-top: 8px; position: relative; }
.chart-wrap svg text { font: 500 11px var(--f-body); fill: var(--muted); }
.chart-wrap .grid { stroke: var(--line); stroke-width: 1; }
.chart-wrap .zero { stroke: var(--line-2); stroke-width: 1; }
.chart-wrap .hit { fill: transparent; cursor: pointer; }
.chart-wrap .bar-pos { fill: var(--pos); }
.chart-wrap .bar-neg { fill: var(--neg); }
.chart-wrap .bar.dim { opacity: .35; }
.tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; white-space: nowrap; transform: translate(-50%, -100%); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.tip b { display: block; font: 700 18px var(--f-num); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.seg { letter-spacing: 0; text-transform: none; }
h2.sec .seg button, .seg button { border: 0; background: none; padding: 5px 10px; border-radius: 7px; font: 600 13px var(--f-body); color: var(--muted); }
h2.sec .seg button.on, .seg button.on { background: var(--surface-2); color: var(--text); }
table.mt { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
table.mt th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
table.mt td { padding: 9px 0; border-bottom: 1px solid var(--line); }
table.mt td.r, table.mt th.r { text-align: right; }
table.mt td.num { font-size: 17px; }

.log { list-style: none; margin: 0; padding: 0; }
.log-month { margin: 22px 0 4px; font-size: 13px; font-weight: 700; color: var(--text-2); display: flex; justify-content: space-between; }
.log-month span { font: 700 15px var(--f-num); }
.log li.ev { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ev .day { font: 700 20px/1 var(--f-num); text-align: center; color: var(--text-2); }
.ev .day small { display: block; font: 600 10px var(--f-body); color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.ev .what { min-width: 0; }
.ev .what b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .what span { font-size: 13px; color: var(--muted); }
.ev .amt { font: 700 18px/1 var(--f-num); font-variant-numeric: tabular-nums; text-align: right; }
.ev .amt small { display: block; font: 600 12px var(--f-body); margin-top: 3px; }
.k-sale .what span { color: var(--pos); }
.k-buy .what span { color: var(--accent-2); }

/* ---------- határidők ---------- */
.due-group { margin-top: 8px; }

/* ---------- beállítások ---------- */
.set-list { list-style: none; margin: 0; padding: 0; }
.set-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-list li > div b { display: block; font-weight: 600; }
.set-list li > div span { font-size: 13px; color: var(--muted); }
.set-list input[type=number] { width: 74px; height: 42px; text-align: center; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font: 700 19px var(--f-num); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 15px; background: var(--line-2); transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }
.foot { margin: 36px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.foot .brand { justify-content: center; font-size: 20px; color: var(--text-2); margin-bottom: 6px; }
.foot .brand-mark { width: 22px; height: 22px; }

/* ---------- lapok (sheet) ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .22s; }
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 51; width: 100%; max-width: 560px;
  max-height: calc(100dvh - var(--safe-t) - 24px); overflow-y: auto; overscroll-behavior: contain;
  transform: translate(-50%, 100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  background: var(--bg-2); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line-2);
  padding: 8px 16px calc(20px + var(--safe-b));
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-back.open { opacity: 1; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 12px; }
.sheet h3 { margin: 0 0 16px; font: 700 26px/1.1 var(--f-num); }
.sheet h3 small { display: block; font: 500 14px var(--f-body); color: var(--muted); margin-top: 4px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.field label .seg { padding: 2px; border-radius: 8px; }
.field label .seg button { padding: 1px 8px; font-size: 12px; }
.fgrid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 6px; }
.field input, .field select, .field textarea {
  width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  padding: 0 14px; font-size: 17px; outline: none; transition: border-color .15s;
}
.field textarea { height: 90px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field .money { position: relative; }
.field .money input { padding-right: 46px; font: 700 22px var(--f-num); font-variant-numeric: tabular-nums; }
.field .money::after { content: 'Ft'; position: absolute; right: 14px; top: 15px; color: var(--muted); font-weight: 600; }
.field input.upper { text-transform: uppercase; font-family: var(--f-num); font-weight: 700; font-size: 20px; letter-spacing: .06em; }
.fsec { grid-column: 1 / -1; margin: 10px 0 -2px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toggle2 { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); gap: 4px; }
.toggle2 button { height: 42px; border: 0; border-radius: 10px; background: none; font-weight: 600; color: var(--muted); }
.toggle2 button.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.toggle2 button.on.plan { color: var(--plan); }
.quick { display: flex; flex-wrap: wrap; gap: 7px; }
.quick button { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: none; font-size: 14px; font-weight: 600; color: var(--text-2); }
.quick button.on { border-color: var(--accent); color: var(--accent); }
.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-actions .btn { flex: 1; }
.calc-preview { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--surface); display: flex; justify-content: space-between; align-items: center; }
.calc-preview b { font: 700 26px var(--f-num); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: all .25s;
  padding: 11px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* belépő animáció */
.view > * { animation: rise .32s cubic-bezier(.2,.8,.2,1) both; }
.view > *:nth-child(2) { animation-delay: .03s; }
.view > *:nth-child(3) { animation-delay: .06s; }
.view > *:nth-child(4) { animation-delay: .09s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .view > * { animation: none; } .sheet, .sheet-back, .toast { transition: none; } }

@media (min-width: 600px) {
  .detail-hero { margin: 0; border-radius: 0 0 22px 22px; }
}

/* felhő-állapot */
.icon-btn.cloud svg { fill: none; stroke: var(--text-2); }
.icon-btn.cloud[data-state=ok] svg, .icon-btn.cloud[data-state=idle] svg { stroke: var(--pos); }
.icon-btn.cloud[data-state=busy] svg { stroke: var(--accent); animation: pulse 1s ease-in-out infinite; }
.icon-btn.cloud[data-state=error] svg, .icon-btn.cloud[data-state=auth] svg { stroke: var(--neg); }
.icon-btn.cloud[data-state=offline] svg { stroke: var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }
.sync-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--pos); }
.sync-dot[data-state=busy] { background: var(--accent); }
.sync-dot[data-state=error], .sync-dot[data-state=auth] { background: var(--neg); }
.sync-dot[data-state=offline] { background: var(--muted); }
