/* Korél Vision Lab — app globals
 * Belépő stíluslap: behúzza a design-system tokeneket + @font-face-eket,
 * majd ráteszi az app-keret (mobil shell) globálokat. Az oldalak ezt linkelik.
 * Vizuális forrás-igazság: docs/design/DESIGN-GUIDE.md + a referencia-képernyők
 * docs/design/reference/ alatt.
 */
@import url("design/styles.css");

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
}

* { -webkit-tap-highlight-color: transparent; }

/* Kép sose lógjon ki a konténeréből (mobilon ne törje a layoutot) */
img { max-width: 100%; height: auto; }

/* Mobil-keret: a tartalom nagy kijelzőn középre, max 448px (--content-max) */
.app-shell {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Görgethető tartalom-terület a fix top bar és alsó nav között */
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.scroll::-webkit-scrollbar { width: 3px; }
.scroll::-webkit-scrollbar-thumb { background: var(--stone-300); border-radius: var(--radius-pill); }

/* Űrlapmezők */
input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--ring-focus); }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Bottom-sheet animációk (a mockupokból) */
@keyframes kvScrimIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes kvSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ───────── Top bar ───────── */
.topbar { height: var(--topbar-h); display: flex; align-items: center; gap: var(--space-3);
  padding: 0 var(--space-4); background: var(--surface); border-bottom: var(--border-w) solid var(--border); flex-shrink: 0; }
.topbar__title { flex: 1; font-family: var(--font-display); font-size: var(--text-lg);
  font-weight: var(--fw-bold); letter-spacing: var(--ls-snug); color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate-pill { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px;
  background: var(--surface-sunken); border: var(--border-w) solid var(--border);
  border-radius: var(--radius-pill); color: var(--text-secondary); font-size: var(--text-xs);
  font-weight: var(--fw-medium); cursor: pointer; font-family: var(--font-sans); }
.rate-pill i { width: 13px; height: 13px; }

/* ───────── Bottom nav ───────── */
.bottom-nav { display: flex; height: var(--bottom-nav-h); background: var(--surface);
  border-top: var(--border-w) solid var(--border); box-shadow: 0 -2px 12px rgba(42,37,31,0.06); flex-shrink: 0; }
.bottom-nav__item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-muted); text-decoration: none; font-size: var(--text-2xs);
  font-family: var(--font-sans); transition: color var(--dur-fast) var(--ease-out); }
.bottom-nav__item i { width: 20px; height: 20px; }
.bottom-nav__item.active { color: var(--accent); font-weight: var(--fw-semibold); }

/* ───────── FAB ───────── */
.fab { position: absolute; right: var(--fab-offset); bottom: calc(var(--bottom-nav-h) + var(--fab-offset));
  z-index: 30; height: var(--fab-size); padding: 0 var(--space-5); display: inline-flex; align-items: center;
  gap: var(--space-2); background: var(--accent); color: var(--text-on-accent); border: none;
  border-radius: var(--radius-pill); box-shadow: var(--shadow-fab); font-family: var(--font-sans);
  font-weight: var(--fw-semibold); font-size: var(--text-base); cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.fab:active { transform: scale(0.97); background: var(--accent-press); }
.fab i { width: 22px; height: 22px; }

/* ───────── Cards / summary ───────── */
.card { background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  border: var(--border-w) solid var(--border); overflow: hidden; }
.overline { font-size: var(--text-2xs); font-weight: var(--fw-semibold); letter-spacing: var(--ls-caps);
  text-transform: uppercase; color: var(--text-muted); font-family: var(--font-sans); }
.amount { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: var(--ls-tight); }
.hero-amount { font-family: var(--font-mono); font-size: var(--text-4xl); font-weight: var(--fw-bold);
  color: var(--text-primary); font-variant-numeric: tabular-nums; letter-spacing: var(--ls-tight); line-height: 1.05; }
.progress { height: 7px; background: var(--surface-sunken); border-radius: var(--radius-pill); overflow: hidden; }
.progress__bar { height: 100%; background: var(--accent); border-radius: var(--radius-pill);
  transition: width 0.5s var(--ease-out); }

/* ───────── Item row ───────── */
.item-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--surface); border-bottom: var(--border-w) solid var(--border); cursor: pointer; }
.item-thumb { width: var(--thumb-sm); height: var(--thumb-sm); border-radius: var(--radius-xs);
  background: var(--surface-sunken); border: var(--border-w) solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: var(--stone-400);
  object-fit: cover; overflow: hidden; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-row__name { font-family: var(--font-sans); font-weight: var(--fw-medium); font-size: var(--text-base);
  color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row__meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

/* ───────── Status pill ───────── */
.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  border-radius: var(--radius-pill); font-size: var(--text-2xs); font-weight: var(--fw-semibold);
  font-family: var(--font-sans); line-height: 1.4; }
.status-pill__dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.status-paid    { background: var(--status-paid-bg);    color: var(--status-paid-fg); }
.status-paid    .status-pill__dot { background: var(--status-paid-dot); }
.status-due     { background: var(--status-due-bg);     color: var(--status-due-fg); }
.status-due     .status-pill__dot { background: var(--status-due-dot); }
.status-planned { background: var(--status-planned-bg); color: var(--status-planned-fg); }
.status-planned .status-pill__dot { background: var(--status-planned-dot); }

/* ───────── Alternatíva badge ───────── */
.alt-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: var(--radius-pill);
  background: var(--accent-tint); color: var(--accent-on-tint); font-size: var(--text-2xs);
  font-weight: var(--fw-semibold); font-family: var(--font-sans); }

/* ───────── Favicon link pill ───────── */
.link-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--radius-pill);
  background: var(--surface-sunken); border: var(--border-w) solid var(--border); color: var(--text-secondary);
  font-size: var(--text-xs); text-decoration: none; font-family: var(--font-sans); }
.link-pill img { width: 14px; height: 14px; border-radius: 3px; }

/* ───────── Bottom sheet ───────── */
.sheet-root { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); animation: kvScrimIn var(--dur) var(--ease-out) both; }
.sheet { position: relative; background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-sheet); max-height: 90vh; display: flex; flex-direction: column;
  animation: kvSheetUp var(--dur-slow) var(--ease-spring) both; }
.sheet__grip { width: 36px; height: 4px; background: var(--border-strong); border-radius: var(--radius-pill);
  margin: 12px auto 0; flex-shrink: 0; }
.sheet__head { display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-4) var(--space-3); }
.sheet__title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-snug); color: var(--text-primary); }
.sheet__close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-sunken); border: none; border-radius: var(--radius-pill); color: var(--text-muted); cursor: pointer; }
.sheet__body { flex: 1; overflow-y: auto; padding: 0 var(--space-4) var(--space-4); }
.sheet__foot { padding: var(--space-3) var(--space-4); border-top: var(--border-w) solid var(--border); flex-shrink: 0;
  display: flex; gap: var(--space-2); }

/* ───────── Form controls ───────── */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--space-4); }
.field > label { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-secondary); }
.input { width: 100%; height: var(--tap-comfort); padding: 0 var(--space-3); font-family: var(--font-sans);
  font-size: var(--text-base); color: var(--text-primary); background: var(--surface-sunken);
  border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); }
.btn { height: var(--tap-comfort); padding: 0 var(--space-4); border-radius: var(--radius-pill); border: none;
  font-family: var(--font-sans); font-weight: var(--fw-semibold); font-size: var(--text-base); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: var(--text-on-accent); }
.btn--primary:active { background: var(--accent-press); }
.btn--ghost { background: var(--surface-sunken); color: var(--text-secondary); }
.btn--danger { background: transparent; color: var(--danger); }

/* ───────── Currency columns (IKEA) ───────── */
.cur-col { border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); border: 1.5px solid var(--border);
  background: var(--surface-sunken); }
.cur-col.ron-win { background: var(--ron-bg); border-color: var(--ron-fg); }
.cur-col.huf-win { background: var(--huf-bg); border-color: var(--huf-fg); }
.cur-col.dimmed { opacity: 0.65; }

/* ───────── Toast ───────── */
.toast { position: fixed; left: 50%; bottom: var(--space-6); transform: translateX(-50%);
  background: var(--stone-900); color: #fff; padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  font-size: var(--text-sm); font-family: var(--font-sans); z-index: 300; box-shadow: var(--shadow-lg);
  animation: kvScrimIn var(--dur) var(--ease-out) both; }

/* ───────── Add-row (új tétel egy szobában) ───────── */
.add-row { width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: var(--space-2);
  padding: var(--space-3) var(--space-4); background: var(--accent-tint); color: var(--accent-on-tint);
  border: none; border-bottom: var(--border-w) solid var(--border); cursor: pointer; text-align: left;
  font-family: var(--font-sans); font-weight: var(--fw-medium); font-size: var(--text-sm); }
.add-row svg { width: 16px; height: 16px; }

/* ───────── Szoba-szekció fej (rendezett flex) ───────── */
.room-head { width: 100%; display: flex; align-items: center; gap: var(--space-2); padding: 12px var(--space-4);
  background: var(--surface); border: none; border-bottom: var(--border-w) solid var(--border); cursor: pointer; text-align: left; }
.room-head__main { flex: 1; min-width: 0; }
.room-head__name { font-family: var(--font-sans); font-weight: var(--fw-semibold); font-size: var(--text-base); color: var(--text-primary); }
.room-head__total { font-family: var(--font-mono); font-weight: var(--fw-semibold); font-size: var(--text-sm);
  color: var(--text-secondary); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.room-edit { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: var(--radius-pill); color: var(--text-muted); cursor: pointer; }
.room-edit svg { width: 16px; height: 16px; }
.room-chev { color: var(--text-muted); flex-shrink: 0; transition: transform .18s var(--ease-out); display: flex; }
.room-chev svg { width: 16px; height: 16px; }

/* ───────── "Új szoba" gomb a lista alján ───────── */
.add-room { display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  width: calc(100% - 2 * var(--space-4)); margin: var(--space-4); padding: var(--space-3);
  background: transparent; color: var(--accent); border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md); cursor: pointer; font-family: var(--font-sans);
  font-weight: var(--fw-semibold); font-size: var(--text-sm); }
.add-room svg { width: 18px; height: 18px; }

/* ───────── Alternatívák szekció (tétel-sheetben) ───────── */
.alt-section { margin-top: var(--space-2); padding-top: var(--space-4); border-top: var(--border-w) solid var(--border); }
.alt-section__title { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--fw-semibold);
  color: var(--text-secondary); margin-bottom: var(--space-3); display: flex; align-items: center; gap: 6px; }
.alt-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-3); }
.alt-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3);
  background: var(--surface-sunken); border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); }
.alt-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong);
  flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.alt-radio.on { border-color: var(--accent); }
.alt-radio.on::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.alt-item__main { flex: 1; min-width: 0; cursor: pointer; }
.alt-item__name { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--fw-medium);
  color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alt-item__price { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.alt-item__fo { font-size: var(--text-2xs); font-weight: var(--fw-bold); color: var(--accent-on-tint);
  background: var(--accent-tint); padding: 1px 7px; border-radius: var(--radius-pill); flex-shrink: 0; }
.alt-add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: var(--space-2);
  background: var(--accent-tint); color: var(--accent-on-tint); border: none; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font-sans); font-weight: var(--fw-semibold); font-size: var(--text-sm); }
.alt-add svg { width: 16px; height: 16px; }

/* ───────── Összehasonlító doboz (tétel-sheetben, élő) ───────── */
.comp-box { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); border: 1.5px solid; margin-bottom: var(--space-4); }
.comp-box.ron { background: var(--ron-bg); border-color: var(--ron-fg); }
.comp-box.huf { background: var(--huf-bg); border-color: var(--huf-fg); }
.comp-box__side { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.comp-box.ron .comp-box__side { color: var(--ron-fg); }
.comp-box.huf .comp-box__side { color: var(--huf-fg); }
.comp-box__amt { font-family: var(--font-mono); font-weight: var(--fw-bold); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.comp-box__approx { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

/* ───────── Olcsóbb-oldal badge (tétel-sorban) ───────── */
.cheap-badge { font-family: var(--font-sans); font-size: var(--text-2xs); font-weight: var(--fw-bold);
  padding: 1px 7px; border-radius: var(--radius-pill); }
.cheap-badge.ron { background: var(--ron-bg); color: var(--ron-fg); }
.cheap-badge.huf { background: var(--huf-bg); color: var(--huf-fg); }

/* ═════════ Desktop / nagyobb képernyő (mobile-first, de használható nagyban is) ═════════ */
@media (min-width: 768px) {
  body { padding: var(--space-6) 0; }
  .app-shell { max-width: 900px; min-height: calc(100dvh - 2 * var(--space-6));
    border: var(--border-w) solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
  /* szoba-lista: több oszlopos masonry-szerű elrendezés, kihasználja a szélességet */
  .rooms { column-width: 380px; column-gap: var(--space-4); padding: var(--space-1) var(--space-4) var(--space-4); }
  .rooms > .room { break-inside: avoid; margin-bottom: var(--space-4);
    border: var(--border-w) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); overflow: hidden; }
  /* hero-összeg ne legyen túl óriás desktopon */
  .hero-amount { font-size: var(--text-3xl); }
  /* bottom-sheet → középre igazított modal */
  .sheet-root { justify-content: center; align-items: center; }
  .sheet { max-width: 480px; width: 100%; border-radius: var(--radius-lg); max-height: 86vh; margin: 0 auto; }
  .sheet__grip { display: none; }
}

/* ═════════ "Kis élet" — ikonok, szintek, kiemelések, finom mozgás ═════════ */

/* Kategória-ikon chip a tételcsoport-fejen */
.room-ico { width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent-on-tint); }
.room-ico svg { width: 20px; height: 20px; }
.room.is-open .room-ico { background: var(--accent); color: var(--text-on-accent); }

/* Szobánkénti mini haladás-sáv a fejlécben */
.room-prog { height: 4px; margin-top: 6px; background: var(--surface-sunken);
  border-radius: var(--radius-pill); overflow: hidden; max-width: 180px; }
.room-prog__bar { height: 100%; background: var(--status-paid-dot); border-radius: var(--radius-pill);
  transition: width .5s var(--ease-out); }

/* Több szint: nyitott csoport kiemelése */
.room.is-open > .room-head { background: var(--accent-tint); }
.room.is-open > .room-head .room-head__name { color: var(--accent-on-tint); }

/* Tétel-sor: bal oldali státusz-akcent (gyors vizuális különbség) */
.item-row { position: relative; transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.item-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.item-row.s-kifizetett::before { background: var(--status-paid-dot); }
.item-row.s-fizetendo::before  { background: var(--status-due-dot); }
.item-row.s-tervezett::before  { background: var(--status-planned-dot); }
.item-row.s-kifizetett { opacity: .82; }       /* kifizetett = "lezárt", halványabb */
.item-row.s-kifizetett .item-row__name { text-decoration: none; color: var(--text-secondary); }

/* Típus-ikon a thumbnailben (ha nincs termékkép) */
.item-thumb svg { width: 18px; height: 18px; }

/* Finom hover-emelés (desktop) */
@media (hover: hover) and (pointer: fine) {
  .item-row:hover { background: var(--surface-hover); transform: translateY(-1px); }
  .room-head:hover { background: var(--surface-hover); }
  .room.is-open > .room-head:hover { background: var(--accent-tint-2); }
}

/* Tétel-belépés finom kaszkáddal (csoport nyitásakor) */
@keyframes kvRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.room-body .item-row, .room-body .add-row {
  animation: kvRise .32s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 28ms);
}

/* "Fizetendő" státusz-pötty finom lüktetés (figyelemfelhívás, ami fizetésre vár) */
@keyframes kvPulse { 0%,100% { box-shadow: 0 0 0 0 var(--status-due-bg); } 50% { box-shadow: 0 0 0 3px var(--status-due-bg); } }
.status-due .status-pill__dot { animation: kvPulse 2.4s var(--ease-in-out) infinite; }

@media (prefers-reduced-motion: reduce) {
  .room-body .item-row, .room-body .add-row { animation: none; }
  .status-due .status-pill__dot { animation: none; }
}

/* ───────── Link-preview popup ───────── */
.preview-thumb { width: 100%; height: 170px; border-radius: var(--radius-md); overflow: hidden;
  background: var(--surface-sunken); margin-bottom: var(--space-3); display: flex; align-items: center; justify-content: center; }
.preview-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-row { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0;
  border-bottom: var(--border-w) solid var(--border); }
.preview-row:last-child { border-bottom: none; }
.preview-row__k { font-size: var(--text-sm); color: var(--text-muted); flex-shrink: 0; }
.preview-row__v { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--fw-medium);
  color: var(--text-primary); text-align: right; word-break: break-word; }

/* ───────── Al-tételek (szülő-tétel alatti komponensek) ───────── */
.subitem-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: var(--radius-pill);
  background: var(--secondary-tint); color: var(--secondary-on-tint); font-size: var(--text-2xs);
  font-weight: var(--fw-semibold); font-family: var(--font-sans); }
.subitem-badge svg { width: 11px; height: 11px; }
.sub-item { display: flex; flex-direction: column; gap: 4px; padding: var(--space-2) var(--space-3);
  background: var(--surface-sunken); border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); }
.sub-item__top { display: flex; align-items: center; gap: var(--space-2); }
.sub-item__name { flex: 1; min-width: 0; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.sub-item__price { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--fw-semibold);
  color: var(--text-secondary); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.sub-item__links { display: flex; gap: 6px; flex-wrap: wrap; }
.sub-item__links .link-pill { padding: 3px 8px; font-size: var(--text-2xs); }
.field > textarea.input { height: auto; min-height: 88px; padding: var(--space-2) var(--space-3); resize: vertical;
  line-height: var(--lh-normal); font-family: var(--font-sans); }

/* ───────── Input + megnyitás-gomb sor ───────── */
.input-row { display: flex; gap: 6px; align-items: stretch; }
.input-row .input { flex: 1; min-width: 0; }
.input-open { flex-shrink: 0; width: var(--tap-comfort); height: var(--tap-comfort); display: flex;
  align-items: center; justify-content: center; background: var(--surface-sunken);
  border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary);
  cursor: pointer; transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.input-open:active { transform: scale(0.96); background: var(--surface-pressed); }
.input-open svg { width: 18px; height: 18px; }

/* ───────── Szülő-tétel ár-összesítő (al-tételekből, nem szerkeszthető) ───────── */
.parent-sum { background: var(--surface-sunken); border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.parent-sum__row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0;
  font-size: var(--text-sm); color: var(--text-secondary); }
.parent-sum__row .amount { font-weight: var(--fw-semibold); color: var(--text-primary); }
.parent-sum .comp-box { margin-top: var(--space-2); margin-bottom: 0; }
.parent-note { font-size: var(--text-xs); color: var(--text-muted); margin-top: 4px; }

/* ───────── Al-tétel thumbnail ───────── */
.sub-thumb { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius-xs); overflow: hidden;
  background: var(--surface); border: var(--border-w) solid var(--border); display: flex; align-items: center;
  justify-content: center; color: var(--stone-400); }
.sub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sub-thumb svg { width: 16px; height: 16px; }

/* ───────── Al-tétel kettős ár (RON + HUF + % különbség) ───────── */
.sub-item__prices { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: baseline; }
.sub-price { display: inline-flex; align-items: baseline; gap: 5px; font-size: var(--text-xs); color: var(--text-muted); }
.sub-price__cur { font-size: var(--text-2xs); font-weight: var(--fw-bold); color: var(--text-muted); }
.sub-price .amount { font-weight: var(--fw-semibold); color: var(--text-secondary); }
.sub-price__approx { font-family: var(--font-mono); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sub-price.win .amount { color: var(--text-primary); }
.sub-price.win .sub-price__cur { color: var(--accent); }

/* ───────── Sheet vissza-gomb ───────── */
.sheet__back { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-sunken); border: none; border-radius: var(--radius-pill); color: var(--text-secondary);
  cursor: pointer; flex-shrink: 0; }
.sheet__back svg { width: 18px; height: 18px; }
.sheet__head .sheet__title { flex: 1; }

/* ───────── Hiányzó-ár jelölés ───────── */
.flag-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: var(--radius-pill);
  background: var(--secondary-tint); color: var(--secondary-on-tint); font-size: var(--text-2xs);
  font-weight: var(--fw-semibold); font-family: var(--font-sans); }
.flag-badge svg { width: 11px; height: 11px; }

/* ───────── Részletes RO vs HU megtakarítás-sáv ───────── */
.savings-detail { border-top: var(--border-w) solid var(--border); background: var(--stone-50);
  padding: var(--space-2) var(--space-4) var(--space-3); }
.savings-detail__head { margin-bottom: 6px; }
.savings-detail__row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2);
  padding: 3px 0; font-size: var(--text-xs); color: var(--text-muted); }
.savings-detail__row .sd-side { display: inline-flex; align-items: center; gap: 5px; }
.savings-detail__row .amount { font-size: var(--text-xs); color: var(--text-secondary); }
.savings-detail__row.win { color: var(--text-primary); }
.savings-detail__row.win .amount { color: var(--text-primary); font-weight: var(--fw-bold); }
.savings-detail__save { display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px; padding-top: 6px; border-top: var(--border-w) dashed var(--border);
  font-size: var(--text-xs); color: var(--text-muted); }
.savings-detail__save .amount { font-weight: var(--fw-bold); color: var(--accent); }

/* ───────── Kosár-pipa (listában) ───────── */
.cart-check { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--radius-xs);
  border: 1.5px solid var(--border); background: var(--surface); color: var(--stone-400);
  cursor: pointer; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.cart-check i { width: 17px; height: 17px; }
.cart-check.on { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.cart-check:active { transform: scale(0.92); }
.cart-progress { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  border-radius: var(--radius-pill); font-size: var(--text-2xs); font-weight: var(--fw-semibold);
  background: var(--surface-sunken); color: var(--text-muted); }
.cart-progress.done { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.cart-progress i { width: 12px; height: 12px; }

/* ───────── IKEA kosár nézet ───────── */
.kosar-head { padding: var(--space-4) var(--space-4) var(--space-2); }
.kosar-room { margin: 0 var(--space-4) var(--space-4); background: var(--surface);
  border: var(--border-w) solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow: hidden; }
.kosar-room__head { display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); background: var(--surface-sunken);
  border-bottom: var(--border-w) solid var(--border); }
.kosar-room__ico { width: 34px; height: 34px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: var(--surface);
  border: var(--border-w) solid var(--border); color: var(--accent); }
.kosar-room__ico i { width: 18px; height: 18px; }
.kosar-room__name { flex: 1; font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--text-base); color: var(--text-primary); }
.kosar-room__count { font-size: var(--text-2xs); font-weight: var(--fw-semibold);
  color: var(--text-muted); white-space: nowrap; }
.kosar-room__bar { height: 5px; background: var(--surface-sunken); }
.kosar-room__bar > span { display: block; height: 100%; background: var(--accent);
  transition: width 0.4s var(--ease-out); }
.kosar-item { display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-bottom: var(--border-w) solid var(--border); }
.kosar-item:last-child { border-bottom: none; }
.kosar-item.is-in { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.kosar-item__main { flex: 1; min-width: 0; }
.kosar-item__name { font-family: var(--font-sans); font-weight: var(--fw-medium);
  font-size: var(--text-sm); color: var(--text-primary); }
.kosar-item.is-in .kosar-item__name { color: var(--text-muted); text-decoration: line-through; }
.kosar-item__meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kosar-item__prices { display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  text-align: right; white-space: nowrap; }
.kosar-item__ron { font-family: var(--font-mono); font-weight: var(--fw-semibold);
  font-size: var(--text-sm); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.kosar-item__huf { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-muted);
  font-variant-numeric: tabular-nums; }
.kosar-room__foot { display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-3) var(--space-4); border-top: var(--border-w) solid var(--border);
  font-size: var(--text-xs); color: var(--text-secondary); }
.kosar-room__foot .amount { font-weight: var(--fw-bold); }
.kosar-room__foot .done { color: var(--accent); }
.kosar-empty { text-align: center; color: var(--text-muted); padding: var(--space-8) var(--space-4);
  font-size: var(--text-sm); }
