/* ============================================================
   EPU v0.1 — UX-005 premium polish
   Egy accent + egy semleges "ink" skála + halk szemantikus színek.
   Apple / Stripe / Linear: lágy mélység, sok levegő, finom mozgás.
   ============================================================ */
:root {
  /* accent — egyetlen márkaszín */
  --accent: #1c64f2; --accent-2: #4f86f7; --accent-press: #1551cc;
  --accent-soft: #e8f0fe; --accent-tint: #8fb4f9;

  /* semleges "ink" skála (enyhén hűvös) */
  --ink-900: #16181d; --ink-700: #3a3d46; --ink-500: #6b7180; --ink-400: #9097a3; --ink-300: #c2c7d0;
  --ink-100: #eceef2; --ink-50: #f4f6f9;

  --bg: #f7f4ef; --card: #ffffff; --text: var(--ink-900); --muted: var(--ink-500); --muted-2: var(--ink-400);
  --line: rgba(20,24,33,.07); --line-2: rgba(20,24,33,.045);

  /* sötét sidebar */
  --side-bg: #f6f3ee; --side-fg: #3a3d46; --side-fg-2: #868c98; --side-active: #efe9e1;

  /* halk szemantikus színek (deszaturált) */
  --pos: #3f9b6e; --pos-bg: #eef7f2;
  --amb: #b88a2e; --amb-bg: #faf5ea;
  --crit: #c25450; --crit-bg: #fbeeee;

  --radius: 20px; --radius-sm: 14px; --radius-xs: 10px;

  /* Apple-szerű lágy, réteges árnyékok */
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 3px rgba(16,24,40,.04), 0 10px 28px -10px rgba(16,24,40,.12);
  --shadow-md: 0 2px 6px rgba(16,24,40,.05), 0 16px 36px -12px rgba(16,24,40,.16);
  --shadow-lg: 0 28px 60px -16px rgba(16,24,40,.22);

  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --ease: cubic-bezier(.22,.78,.22,1);
  --sidebar-w: 212px; --topbar-h: 70px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font); color: var(--text);
  /* meleg homok-alaptónus + nagy, diffúz, szinte láthatatlan fény-foltok (prémium hangulat) */
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 760px at 88% -8%, rgba(235, 221, 199, .55), transparent 68%),
    radial-gradient(820px 820px at -12% 28%, rgba(28, 100, 242, .045), transparent 64%),
    radial-gradient(760px 760px at 62% 112%, rgba(236, 221, 212, .42), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  line-height: 1.5; letter-spacing: -.006em;
}
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.app { min-height: 100dvh; display: flex; }

/* ---------- LIGHT SIDEBAR (háttérszereplő) ---------- */
.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--side-bg); color: var(--side-fg); display: flex; flex-direction: column; padding: 26px 14px; position: sticky; top: 0; height: 100dvh; border-right: 1px solid var(--line-2); }
.sidebar .brand { color: var(--ink-900); font-weight: 650; font-size: 15.5px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; padding: 4px 10px 30px; }
.sidebar .logo { width: 26px; height: 26px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; font-size: 13px; border-radius: 8px; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-radius: 12px; color: var(--side-fg-2); text-decoration: none; font-weight: 550; font-size: 14.5px; transition: background .2s var(--ease), color .2s var(--ease); }
.nav-item .ico { width: 19px; height: 19px; }
.nav-item:hover { background: var(--side-active); color: var(--side-fg); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.sidebar-foot { margin-top: auto; color: var(--side-fg-2); font-size: 11px; line-height: 1.5; padding: 16px 10px 4px; opacity: .75; }

.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- HEADER ---------- */
.topbar { height: var(--topbar-h); display: flex; align-items: center; gap: 16px; padding: 0 30px; background: rgba(247,244,239,.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line-2); position: sticky; top: 0; z-index: 30; }
.topbar-title h1 { font-size: 19px; font-weight: 700; letter-spacing: -.022em; }
.topbar-sub { font-size: 12.5px; color: var(--muted); letter-spacing: -.004em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.nav-toggle { display: none; font-size: 20px; background: transparent; border: 0; cursor: pointer; color: var(--text); }
.ibtn-wrap { position: relative; }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.6); border-radius: 12px; color: var(--muted); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.icon-btn .ico { width: 19px; height: 19px; }
.icon-btn:hover { color: var(--text); background: #fff; box-shadow: var(--shadow-sm); }
.icon-btn:active { transform: scale(.94); }
.badge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 5px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 999px; box-shadow: 0 0 0 2px var(--bg); }
.avatar { width: 40px; height: 40px; border-radius: 12px; border: 0; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; cursor: pointer; box-shadow: 0 4px 12px -3px rgba(28,100,242,.5); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.avatar:hover { box-shadow: 0 6px 18px -4px rgba(28,100,242,.6); }
.avatar:active { transform: scale(.94); }

/* popover — scale+fade animáció */
.popover { position: absolute; top: 50px; right: 0; min-width: 248px; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px; z-index: 40; transform-origin: top right; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.97); pointer-events: none; transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s var(--ease); }
.popover.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.pop-title { font-weight: 650; font-size: 13.5px; margin-bottom: 12px; letter-spacing: -.01em; }
.pop-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13.5px; }
.pop-foot, .pop-note { color: var(--muted-2); font-size: 11.5px; margin-top: 10px; line-height: 1.5; }
.notif-item { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.notif-item:last-child { border-bottom: 0; }
.notif-item .ni-amt { font-weight: 650; }
.notif-item .ni-days { color: var(--muted); font-size: 11.5px; }

/* segmented control */
.seg { display: inline-flex; background: var(--ink-50); border: 1px solid var(--line-2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: transparent; border: 0; padding: 6px 12px; cursor: pointer; border-radius: 8px; transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease); }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--card); color: var(--accent); box-shadow: var(--shadow-sm); }

/* ---------- CONTENT ---------- */
.content { padding: 32px; max-width: 1480px; }
/* ---------- UX-006 vizuális hierarchia ---------- */
.overview-stack { display: flex; flex-direction: column; gap: 30px; }
.hello-row { font-size: 14px; color: var(--muted); font-weight: 550; margin-bottom: -14px; letter-spacing: -.005em; }

/* L1 — hero sor (aszimmetrikus): óriás "marad" + sötét következő-kötelezettség */
.hero-row { display: grid; grid-template-columns: 1.75fr 1fr; gap: 26px; align-items: stretch; }
.hero { position: relative; overflow: hidden; background: linear-gradient(150deg, #fff 38%, var(--accent-soft)); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 32px 34px; display: flex; flex-direction: column; }
.hero::before { content: ""; position: absolute; top: -42%; right: -8%; width: 340px; height: 340px; background: radial-gradient(circle, rgba(28,100,242,.13), transparent 70%); pointer-events: none; }
.hero-label { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.hero-main { display: flex; align-items: baseline; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.hero-value { font-size: clamp(40px, 5.4vw, 56px); font-weight: 800; letter-spacing: -.04em; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.hero .kpi-chip { font-size: 13px; padding: 4px 11px; }
.hero-seg { align-self: flex-start; margin-top: 22px; }
.hero-inputs { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line-2); }
.hi-field { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); font-weight: 550; }
.hi-eur { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; color: var(--text); }
.hi-eur input { width: 76px; font: inherit; font-size: 15px; font-weight: 650; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-variant-numeric: tabular-nums; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.hi-eur input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hi-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.hi-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.hero-row .insight-card { box-shadow: var(--shadow-md); }

/* ---------- BIZTONSÁGI ZÓNA (MLV hős) ---------- */
.zone-claim { font-size: 23px; font-weight: 750; letter-spacing: -.025em; color: var(--ink-900); line-height: 1.25; max-width: 22ch; }
.zone-figures { display: flex; gap: 30px; margin-top: 20px; flex-wrap: wrap; align-items: flex-end; }
.zfig { display: flex; flex-direction: column; gap: 5px; }
.zfig-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.zfig-val { font-size: 21px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink-900); line-height: 1; }
.zfig-val.zv-locked { color: var(--muted); }
.zfig-hero .zfig-val.zv-free { font-size: 50px; font-weight: 800; color: var(--accent); letter-spacing: -.04em; }
.zone-bar { position: relative; height: 48px; margin: 30px 0 6px; }
.zone-track { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); height: 18px; border-radius: 999px; overflow: hidden; display: flex; box-shadow: inset 0 1px 2px rgba(16,24,40,.1); }
.zone-fill-free { height: 100%; background: linear-gradient(90deg, #46a578, #3f9b6e); }
.zone-fill-locked { height: 100%; background: var(--ink-100); }
.zone-limit { position: absolute; top: 6px; bottom: 6px; width: 2px; background: var(--ink-400); transform: translateX(-50%); border-radius: 2px; }
.zone-limit-label { position: absolute; top: -2px; transform: translateX(-50%); font-size: 10px; font-weight: 650; color: var(--ink-500); white-space: nowrap; pointer-events: none; }
.zone-handle { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.zone-handle:focus { outline: none; }
.zone-handle::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 999px; background: #fff; border: 3.5px solid var(--accent); box-shadow: var(--shadow-md); cursor: grab; transition: border-color .15s var(--ease), transform .12s var(--ease); }
.zone-handle::-webkit-slider-thumb:active { transform: scale(1.12); cursor: grabbing; }
.zone-handle::-moz-range-thumb { width: 30px; height: 30px; border-radius: 999px; background: #fff; border: 3.5px solid var(--accent); box-shadow: var(--shadow-md); cursor: grab; }
.zone-bar.over .zone-handle::-webkit-slider-thumb { border-color: var(--crit); }
.zone-bar.over .zone-handle::-moz-range-thumb { border-color: var(--crit); }
.zone-status { margin-top: 14px; font-size: 14px; font-weight: 650; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 8px 14px; border-radius: 999px; }
.zone-status::before { content: "●"; font-size: 9px; }
.zone-status.safe { background: var(--pos-bg); color: var(--pos); }
.zone-status.tight { background: var(--amb-bg); color: var(--amb); }
.zone-status.danger { background: var(--crit-bg); color: var(--crit); }
.zone-hint { margin-top: 10px; font-size: 13.5px; color: var(--muted); min-height: 18px; line-height: 1.5; }
.zone-inputs { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line-2); }

/* L2 — nagy, látványos grafikon */
.chart-panel { padding: 22px 24px 14px; box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.chart-panel .chart-plot svg { height: 224px; }
.chart-panel .chart-yaxis { width: 38px; }

/* L3 — kisebb KPI-k + donut + szimulátor (bento, halkabb) */
.l3-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
.l3-grid .panel { box-shadow: var(--shadow-sm); }
.l3-grid .kpi-card { box-shadow: none; border: 1px solid var(--line-2); padding: 22px; gap: 12px; }
.l3-grid .kpi-card:hover { box-shadow: var(--shadow-sm); transform: none; }
.l3-grid .kpi-ico { background: transparent; color: var(--ink-300); width: 28px; height: 28px; }
.l3-grid .kpi-ico .ico { width: 19px; height: 19px; }
.l3-grid .kpi-value { font-size: 27px; font-weight: 750; letter-spacing: -.035em; }

/* L4 — periféria (leghalkabb) */
.lower-grid { display: grid; grid-template-columns: 1.9fr 1fr; gap: 24px; align-items: start; }
.lower-grid .panel { box-shadow: var(--shadow-sm); }
.lower-left { display: flex; flex-direction: column; gap: 24px; }
/* jobb oszlop: éves projekció (2/3) a kövesd havonta (1/3) fölött, a kötelezettségek magasságához igazítva */
.l4-side { display: flex; flex-direction: column; gap: 24px; }

/* ════════════ MŰSZERFAL (UX-019) ════════════ */
/* műszer (bal, behúzva) + KPI-oszlop (jobb) — desktopon egy sorban */
.instrument-row { display: grid; grid-template-columns: 1.9fr 1fr; gap: 24px; align-items: stretch; }
.kpi-col { display: flex; flex-direction: column; gap: 16px; }
.kpi-col .kpi-card { box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); padding: 22px; flex: 1; }
.kpi-col .kpi-ico { background: transparent; color: var(--ink-300); width: 28px; height: 28px; }
.kpi-col .kpi-value { font-size: 27px; font-weight: 750; letter-spacing: -.035em; }

/* FŐ MŰSZER — egyetlen elegáns egység: verdikt + fő mérő + akció */
.instrument { position: relative; overflow: hidden; background: linear-gradient(165deg, #ffffff 38%, #fcf9f4); border: 1px solid var(--line-2); border-radius: 24px; box-shadow: var(--shadow-md); padding: 36px 40px; }
.instrument::before { content: ""; position: absolute; top: -45%; right: -6%; width: 380px; height: 380px; background: radial-gradient(circle, rgba(28,100,242,.10), transparent 70%); pointer-events: none; }

/* 1 — VERDIKT (állapot) */
.verdict { display: flex; align-items: flex-start; gap: 14px; }
.verdict-dot { width: 12px; height: 12px; border-radius: 999px; margin-top: 10px; flex-shrink: 0; }
.verdict-dot.safe { background: var(--pos); box-shadow: 0 0 0 4px var(--pos-bg); }
.verdict-dot.tight { background: var(--amb); box-shadow: 0 0 0 4px var(--amb-bg); }
.verdict-dot.danger { background: var(--crit); box-shadow: 0 0 0 4px var(--crit-bg); }
.verdict-main { font-size: 28px; font-weight: 750; letter-spacing: -.03em; color: var(--ink-900); line-height: 1.15; }
.verdict-sub { font-size: 15px; color: var(--muted); margin-top: 4px; }

/* 2 — FŐ MÉRŐ */
.gauge { margin-top: 30px; }
.gauge-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gauge-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.gauge-value { font-size: 52px; font-weight: 800; letter-spacing: -.045em; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.gauge .zone-bar { margin: 22px 0 12px; }
.gauge-readout { display: flex; gap: 26px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gauge-readout .ro-label { color: var(--muted-2); }
.gauge-readout b { color: var(--ink-700); font-weight: 650; margin-left: 2px; }

/* akció — CTA + "biztonságosan kivehető" */
.instrument-action { margin-top: 24px; }
.instrument-action .in-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 13px 20px; font: inherit; font-weight: 650; cursor: pointer; box-shadow: 0 8px 18px -6px rgba(28,100,242,.45); transition: transform .2s var(--ease), background .2s var(--ease); }
.instrument-action .in-cta:hover { background: var(--accent-2); transform: translateY(-1px); }
.instrument-action .in-cta:active { transform: translateY(0); background: var(--accent-press); }
.instrument-action .in-safe { margin-top: 18px; padding: 16px 18px; background: var(--pos-bg); border-radius: 14px; max-width: 420px; }
.instrument-action .in-safe-label { font-size: 11.5px; font-weight: 600; color: var(--pos); text-transform: uppercase; letter-spacing: .04em; }
.instrument-action .in-safe-amt { font-size: 30px; font-weight: 800; color: var(--pos); letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.instrument-action .in-safe-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 8px; }

/* a műszer bemenete (diszkrét) */
.instrument .zone-inputs { margin-top: 28px; }

/* 3 — FIGYELMEZTETŐ LÁMPA (halk sor, nem sötét tömb) */
.warn-light { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); font-size: 14px; color: var(--muted); }
.warn-light .wl-dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.warn-light.ok .wl-dot { background: var(--pos); }
.warn-light.warn .wl-dot { background: var(--crit); }
.warn-light .wl-text { flex: 1; min-width: 0; }
.warn-light .wl-label { font-weight: 650; color: var(--ink-700); }
.warn-light .wl-text b { color: var(--ink-900); font-weight: 650; }
.warn-light .wl-status { font-weight: 650; white-space: nowrap; }
.warn-light.ok .wl-status { color: var(--pos); }
.warn-light.warn .wl-status { color: var(--crit); }

/* 4 — HÁTTÉR (halk) */
.background-layer { display: flex; flex-direction: column; gap: 24px; }
.bg-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.background-layer .panel { box-shadow: var(--shadow-sm); }
.view { display: none; } .view.active { display: block; animation: fade-up .45s var(--ease) both; }
.content h1 { font-size: 24px; font-weight: 700; margin-bottom: 16px; letter-spacing: -.025em; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.panel { background: linear-gradient(180deg, #ffffff, #fdfbf9); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.panel h2 { font-size: 15.5px; font-weight: 650; letter-spacing: -.018em; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.placeholder { color: var(--muted-2); font-size: 14px; }

/* control-panel */
.control-panel { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 26px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.input-eur { display: flex; align-items: center; gap: 7px; }
.input-eur input { font: inherit; font-size: 18px; font-weight: 650; width: 132px; font-variant-numeric: tabular-nums; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ink-50); transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease); }
.input-eur input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3.5px var(--accent-soft); }
.input-eur span { color: var(--muted); font-weight: 650; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; align-self: flex-end; padding-bottom: 11px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- KPI — Apple Wallet kártya ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi-card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 10px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; line-height: 1.4; }
.kpi-chip .arr { font-size: 8px; }
.kpi-chip.pos { background: var(--pos-bg); color: var(--pos); }
.kpi-chip.amb { background: var(--amb-bg); color: var(--amb); }
.kpi-chip.crit { background: var(--crit-bg); color: var(--crit); }
.kpi-chip.neutral { background: var(--ink-50); color: var(--muted); }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-ico { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink-50); color: var(--ink-400); border-radius: 11px; }
.kpi-ico .ico { width: 17px; height: 17px; }
.kpi-label { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-top: auto; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.05; white-space: nowrap; }
/* az accent-hangsúlyt a hero viszi — az L3 KPI-k semlegesek */
.kpi-grid.kpi-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- CHART — Apple Fitness / Stripe ---------- */
.chart { position: relative; width: 100%; }
.chart-body { display: flex; align-items: stretch; gap: 8px; }
.chart-yaxis { position: relative; width: 36px; flex-shrink: 0; }
.chart-yaxis span { position: absolute; right: 0; transform: translateY(-50%); font-size: 10px; font-weight: 550; color: var(--muted-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-plot { position: relative; flex: 1; min-width: 0; }
.chart-plot svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart .grid-line { stroke: var(--line-2); stroke-width: 1; }
.chart .area { fill: url(#chartGrad); }
.chart .line { fill: none; stroke: url(#chartStroke); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .line.draw { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: chart-draw 1s var(--ease) forwards; }
@keyframes chart-draw { to { stroke-dashoffset: 0; } }
.chart .marker.pay { fill: var(--card); stroke: var(--accent-tint); stroke-width: 2; }
.chart .cursor-line { stroke: var(--ink-300); stroke-width: 1.25; opacity: 0; transition: opacity .12s var(--ease); }
.chart .dot-halo { fill: var(--accent); opacity: 0; transition: opacity .14s var(--ease); }
.chart .dot { fill: var(--accent); stroke: #fff; stroke-width: 3; opacity: 0; transition: opacity .14s var(--ease); }
.chart .hot { fill: transparent; cursor: pointer; }
.chart-tip { position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); background: var(--ink-900); color: #fff; font-size: 12.5px; font-weight: 600; padding: 8px 12px; border-radius: 11px; white-space: nowrap; opacity: 0; transition: opacity .14s var(--ease), transform .14s var(--ease); box-shadow: var(--shadow-md); letter-spacing: -.01em; }
.chart-tip::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 9px; height: 9px; background: var(--ink-900); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.chart-tip.show { opacity: 1; }
.chart-tip small { display: block; opacity: .65; font-weight: 500; margin-top: 1px; }
.chart-axis { display: flex; justify-content: space-between; margin: 10px 0 0 44px; padding: 0 2px; color: var(--muted-2); font-size: 10.5px; font-weight: 550; }
.chart-axis span { flex: 1; text-align: center; }

/* ---------- INSIGHT (sötét kiemelt) ---------- */
.insight-card { background: linear-gradient(155deg, #20232e, #15171e); color: #e9ebf0; border: 0; box-shadow: var(--shadow-md); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.insight-card::before { content: ""; position: absolute; top: -30%; right: -12%; width: 280px; height: 280px; background: radial-gradient(circle, rgba(28,100,242,.34), transparent 70%); pointer-events: none; }
.insight-card .in-label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: #888e9c; margin-bottom: 14px; }
.insight-card .in-head { font-size: 15px; font-weight: 600; color: #cdd1da; }
.insight-card .in-amt-big { font-size: 36px; font-weight: 800; color: #fff; letter-spacing: -.035em; line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.insight-card .in-meta { font-size: 13px; color: #888e9c; margin-top: 10px; }
.insight-card .in-status { margin-top: 16px; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; padding: 7px 13px; border-radius: 999px; }
.insight-card .in-status::before { content: "●"; font-size: 9px; }
.insight-card .in-status.ok { background: rgba(63,155,110,.2); color: #74d3a4; } .insight-card .in-status.warn { background: rgba(194,84,80,.2); color: #e8a3a0; }
.insight-card .in-cta { margin-top: auto; display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; background: #fff; color: var(--ink-900); border: 0; border-radius: 11px; padding: 12px 18px; font: inherit; font-weight: 650; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.insight-card .in-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(0,0,0,.4); }
.insight-card .in-cta:active { transform: translateY(0); }
.insight-card .in-safe { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); }
.insight-card .in-safe-label { font-size: 11px; font-weight: 600; color: #888e9c; text-transform: uppercase; letter-spacing: .04em; }
.insight-card .in-safe-amt { font-size: 30px; font-weight: 800; color: #74d3a4; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.insight-card .in-safe-note { font-size: 12.5px; color: #9aa0ad; line-height: 1.5; margin-top: 8px; }

/* ---------- DONUT (monokróm) ---------- */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.donut svg { width: 108px; height: 108px; transform: rotate(-90deg); }
.donut svg circle { transition: stroke-dasharray .6s var(--ease); }
.donut .d-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3px; line-height: 1; }
.donut .d-pct { font-size: 21px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.donut .d-cap { font-size: 9.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; line-height: 1; }
.proj-legend { display: flex; flex-direction: column; gap: 11px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.leg-item { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.leg-item b { color: var(--text); font-weight: 650; margin-left: auto; }
.leg-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* ---------- SZIMULÁTOR ---------- */
.sim-inputs { display: flex; flex-direction: column; gap: 18px; margin-bottom: 18px; }
.sim-slider-field input[type="range"] { width: 100%; accent-color: var(--accent); margin-top: 10px; }
.sim-result { display: flex; flex-direction: column; gap: 11px; }
.sim-line { font-size: 14.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.sim-line b { color: var(--text); font-weight: 650; }
.sim-status { font-size: 13.5px; font-weight: 600; padding: 13px 15px; border-radius: var(--radius-sm); }
.sim-status.ok { background: var(--pos-bg); color: var(--pos); } .sim-status.warn { background: var(--crit-bg); color: var(--crit); }

/* ---------- DEADLINE lista ---------- */
.deadline-list { list-style: none; }
.deadline-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--line-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.deadline-row:last-child { border-bottom: 0; }
.d-date { color: var(--muted); } .d-amount { font-weight: 650; }
.d-badge { font-size: 11.5px; font-weight: 650; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.d-badge.urgent { background: var(--crit-bg); color: var(--crit); } .d-badge.soon { background: var(--amb-bg); color: var(--amb); } .d-badge.ok { background: var(--pos-bg); color: var(--pos); }

/* ---------- NAPTÁR ---------- */
.deadline-calendar { }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cal-month { font-weight: 650; font-size: 14.5px; letter-spacing: -.01em; text-transform: capitalize; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: 9px; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease); }
.cal-nav button:hover { color: var(--text); box-shadow: var(--shadow-sm); }
.cal-nav button:active { transform: scale(.92); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { text-align: center; font-size: 10.5px; font-weight: 650; color: var(--muted-2); padding: 2px 0 6px; text-transform: uppercase; letter-spacing: .03em; }
.cal-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 11px; font-size: 13px; font-weight: 500; color: var(--text); position: relative; transition: background .2s var(--ease); }
.cal-cell.other { color: var(--ink-300); }
.cal-cell.today { background: var(--accent-soft); color: var(--accent); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--accent-tint); }
.cal-cell.has { font-weight: 650; }
.cal-dot { width: 5px; height: 5px; border-radius: 999px; position: absolute; bottom: 7px; }
.cal-dot.urgent { background: var(--crit); } .cal-dot.soon { background: var(--amb); } .cal-dot.ok { background: var(--pos); }
.cal-foot { margin-top: 14px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; min-height: 20px; }
.cal-foot .cf-dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; }
.cal-foot b { color: var(--text); font-weight: 650; }
.cal-foot.cal-empty { color: var(--muted-2); justify-content: center; }

/* ---------- FAKE-DOOR ---------- */
.signup { background: var(--ink-50); border-color: var(--line-2); }
.signup-row { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.signup-row input { font: inherit; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.signup-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-soft); }
.signup-row button { font: inherit; font-weight: 650; width: 100%; background: var(--accent); color: #fff; border: 0; border-radius: var(--radius-sm); padding: 12px 19px; cursor: pointer; box-shadow: 0 8px 18px -6px rgba(28,100,242,.5); transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease); }
.signup-row button:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgba(28,100,242,.6); }
.signup-row button:active { transform: translateY(0); background: var(--accent-press); }
.signup-done { color: var(--pos); font-weight: 650; padding: 8px 0; }

/* HU-ág / scrim */
.scrim { position: fixed; inset: 0; background: rgba(20,24,33,.42); backdrop-filter: blur(2px); z-index: 19; }
#hu-branch { display: none; } .country-hu #hu-branch { display: block; } .country-hu .view { display: none !important; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .hero-row { grid-template-columns: 1fr; }
  .l3-grid { grid-template-columns: 1fr; }
  .l3-donut, .l3-sim { grid-column: auto; }
  .content { padding: 26px; }
}
/* a műszer+KPI-oszlop és a kötelezettség+oldalsáv 860px-ig egy sorban marad */
@media (max-width: 860px) {
  .instrument-row { grid-template-columns: 1fr; }
  .lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 20; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .nav-toggle { display: block; }
  .topbar { padding: 0 18px; }
  .content { padding: 18px; }
  .kpi-value { font-size: 24px; }
  .popover { position: fixed; left: 14px; right: 14px; top: 70px; min-width: 0; }
  /* mobil KPI: tartalom középre rendezve */
  .kpi-card { align-items: center; text-align: center; }
  .kpi-top { width: 100%; justify-content: center; gap: 10px; }
  .kpi-label { margin-top: 6px; }
  /* mobilon a 12 hónap összefolyik — minden 2. címke látszik (pozíció megtartva) */
  .chart-axis span:nth-child(even) { visibility: hidden; }
  /* a 3 kis KPI egymás alá mobilon */
  .kpi-grid.kpi-3 { grid-template-columns: 1fr; }
  .hero { padding: 26px 24px; }
  /* éves projekció: donut + számok a kártya közepén */
  .donut-wrap { flex-direction: column; align-items: center; text-align: center; }
  .proj-legend { width: 100%; max-width: 280px; }
  /* műszer mobilon */
  .instrument { padding: 26px 22px; border-radius: 20px; }
  .verdict-main { font-size: 23px; }
  .gauge-value { font-size: 42px; }
  .warn-light { font-size: 13px; padding: 12px 16px; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-col { flex-direction: column; }
  .deadline-row { grid-template-columns: 1fr auto; row-gap: 3px; }
  .d-date { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
