/* ajánlatAId – a BizonylatAId stílusából átvéve, kiegészítve.
   Színvilágok: felhasználónként választható (Beállítások → Megjelenés); alapértelmezett a világos.
   Színek a Bitclick arculati kézikönyvéből (az ajánlatAId a Bitclick Kft. terméke):
   Bitclick Blue #4A8CD2 (kiemelés), Blue Dark #2F66A6 (gomb, link), Graphite #231F20 (szöveg),
   állapotszínek: siker #1B7F4B, figyelmeztetés #9A5B00, hiba #C0342B, másodlagos szöveg #5A6067, szegély #D7DCE1. */
:root, :root[data-theme="vilagos"] {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #d7dce1;
  --text: #231f20;
  --muted: #5a6067;
  --primary: #2f66a6;
  --primary-ink: #ffffff;
  --primary-soft: #e4eef9;
  --accent: #4a8cd2;
  --ai: #2f66a6;
  --ok: #1b7f4b;
  --ok-soft: #dcf3e6;
  --warn: #9a5b00;
  --warn-soft: #fbefd9;
  --uncertain: #fff3b0;
  --uncertain-border: #eab308;
  --danger: #c0342b;
  --danger-soft: #fbe3e1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(35, 31, 32, .06), 0 4px 16px rgba(35, 31, 32, .05);
  color-scheme: light;
}
/* a sötét témák közös állapotszínei */
:root[data-theme="grafit"], :root[data-theme="meleg"], :root[data-theme="kekes"] {
  --primary-ink: #0c1a2c;
  --primary-soft: #4a8cd22e;
  --accent: #6ea6e2;
  --ok: #4ade80;
  --ok-soft: #14532d66;
  --warn: #facc15;
  --warn-soft: #713f1266;
  --uncertain: #5b4a0a;
  --uncertain-border: #ca8a04;
  --danger: #f87171;
  --danger-soft: #7f1d1d55;
  --shadow: none;
  color-scheme: dark;
}
:root[data-theme="grafit"] {
  --bg: #141414;
  --surface: #1e1e1f;
  --surface-2: #18181a;
  --border: #303032;
  --text: #ececec;
  --muted: #a1a1a1;
  --primary: #7fb2ea;
  --ai: #7fb2ea;
}
:root[data-theme="meleg"] {
  --bg: #171513;
  --surface: #221f1c;
  --surface-2: #1c1a17;
  --border: #36322d;
  --text: #eee8e0;
  --muted: #a89f94;
  --primary: #86b6ea;
  --ai: #86b6ea;
}
:root[data-theme="kekes"] {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #0f172a;
  --border: #1f2a3d;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #7fb2ea;
  --ai: #7fb2ea;
}
/* logó: világos témán a sötét feliratú, sötét témán a világos feliratú változat */
/* csak rejtünk – a látható logó a saját (.header-logo / .auth-logo) megjelenítését tartja meg */
:root:not([data-theme="grafit"]):not([data-theme="meleg"]):not([data-theme="kekes"]) .logo-on-dark { display: none !important; }
:root[data-theme="grafit"] .logo-on-light, :root[data-theme="meleg"] .logo-on-light, :root[data-theme="kekes"] .logo-on-light { display: none !important; }

/* Megjelenés-választó a Beállításokban */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.theme-opt { border: 2px solid var(--border); border-radius: 12px; padding: 8px; cursor: pointer; display: block; }
.theme-opt:has(input:checked) { border-color: var(--accent); }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt .sw { border-radius: 8px; padding: 10px; height: 74px; display: flex; flex-direction: column; gap: 6px; }
.theme-opt .sw i { display: block; height: 10px; border-radius: 4px; }
.theme-opt .name { display: flex; justify-content: space-between; margin-top: 6px; font-weight: 600; font-size: 13px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h2 { font-size: 18px; margin: 0 0 8px; }
h3 { font-size: 15px; margin: 0 0 10px; }
p { margin: 0 0 12px; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- fejléc */
.topbar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; flex-direction: column; }
.header-logo { height: 30px; width: auto; display: block; margin-bottom: 3px; }
.auth-logo { width: min(360px, 100%); height: auto; display: block; }
.logo { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.logo b { color: var(--ai); }
.tagline { font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 4px; flex: 1; }
.tabs button {
  white-space: nowrap;
  border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
}
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs button.active { background: var(--primary-soft); color: var(--primary); }
.period-pick { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }

main { max-width: 1280px; margin: 0 auto; padding: 20px 24px 80px; }
.tab { display: none; }
.tab.active { display: block; }

.banner { padding: 10px 24px; font-size: 13px; }
.banner.info { background: var(--primary-soft); border-bottom: 1px solid var(--border); }
.banner a { color: var(--primary); font-weight: 600; }
.usermenu { display: flex; align-items: center; gap: 8px; color: var(--muted); }

/* ---------- belépés */
.auth { min-height: 100vh; }
/* halvány, lassan mozgó színfoltok a belépőoldal hátterében */
.auth { position: relative; overflow: hidden; }
.auth::before, .auth::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .22;
  pointer-events: none; animation: drift 22s ease-in-out infinite alternate; }
.auth::before { width: 520px; height: 520px; background: var(--accent); top: -160px; left: -140px; }
.auth::after { width: 460px; height: 460px; background: #2f66a6; bottom: -180px; right: -120px; animation-delay: -11s; }
:root:not([data-theme="vilagos"]) .auth::after { background: var(--primary); opacity: .14; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.12); } }

/* felső sáv: logó + Belépés */
.auth-top, .auth-page, .auth-page-footer { position: relative; z-index: 1; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px;
  margin: 0 auto; padding: 18px 20px; }
.auth-top-logo { height: 44px; width: auto; display: block; }
.auth-top-actions { display: flex; gap: 8px; }
.auth-page { max-width: 1120px; margin: 0 auto; padding: 16px 20px 26px; }
.auth-page-footer { text-align: center; padding: 0 16px 28px; }
.promo { line-height: 1.55; }
.promo-hero { max-width: 780px; margin: 6px auto 26px; text-align: center; }
.promo-hero .promo-lead { margin: 0; }
.promo > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.promo > :nth-child(2) { animation-delay: .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }


.promo h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 800; }
.promo h1 .grad { background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.promo-lead { color: var(--muted); font-size: 17px; margin: 0 0 24px; }

.promo-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 26px; display: grid; gap: 12px;
  animation: none !important; }
.promo-steps li { counter-increment: step; position: relative; display: flex; flex-direction: column; gap: 4px;
  background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px 14px 56px;
  opacity: 0; transition: transform .2s, box-shadow .2s, border-color .2s; }
/* a lépések és a mottó akkor indulnak, amikor a képernyőre kerülnek (.in – main.js) */
.promo-steps.in li { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.1s + var(--i) * .12s); }
.promo-steps li:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--accent) 45%, transparent); }
.promo-steps li::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px;
  border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 700;
  display: grid; place-items: center; font-size: 14px; }
.promo-steps span { color: var(--muted); font-size: 14px; }

/* „A boldog könyvelő jó könyvelő.” – szavanként beúszik, a végén kirajzolódik az aláhúzás */
.promo-motto { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 22px; animation: none !important; }
.promo-motto .w { display: inline-block; opacity: 0; }
.promo-motto.in .w { animation: word .55s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(.5s + var(--i) * .18s); }
.promo-motto .hl { position: relative; color: var(--primary); }
.promo-motto svg { position: absolute; left: -2%; bottom: -10px; width: 104%; height: 14px; overflow: visible; }
.promo-motto path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 220; stroke-dashoffset: 220; }
.promo-motto.in path { animation: draw .8s ease-out forwards; animation-delay: 1.5s; }
@keyframes word { from { opacity: 0; transform: translateY(10px) rotate(-3deg); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.promo-note { background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px dashed var(--border);
  border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; font-size: 14px; animation-delay: 1.2s !important; }
.promo-value { font-size: 15px; margin: 0 0 16px; padding-left: 14px; border-left: 3px solid var(--accent); }
/* nyugta-sáv („Nyugtával dicsérd a napot.”) a lépések alatt, teljes szélességben */
.promo-bands { display: grid; gap: 18px; margin: 0 0 22px; }
.promo-band { padding: 22px 24px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: 18px; line-height: 1.55;
  box-shadow: 0 10px 30px -18px color-mix(in srgb, var(--accent) 50%, transparent); }
.promo-ticks b { color: var(--text); }
.promo-band .promo-motto { margin: 2px 0 14px; color: var(--text); font-size: 24px; }
.auth-page > .promo-note { max-width: 760px; margin: 0 auto; text-align: center; }
.promo-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 2px 9px; margin-bottom: 8px; }
.promo-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14.5px; }
.promo-ticks li { position: relative; padding-left: 26px; }
.promo-ticks li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; }
.promo-value b { color: var(--text); }
@media (min-width: 900px) {
  .promo h1 { font-size: 40px; }
  .promo-steps { grid-template-columns: repeat(4, 1fr); }
  .promo-bands { grid-template-columns: 1fr 1fr; }
  .promo-motto { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth::before, .auth::after { animation: none; }
  .auth-box, .promo > *, .promo-band, .promo-steps li, .promo-motto .w, .promo-motto path { animation: none !important; opacity: 1 !important;
    stroke-dashoffset: 0; transform: none; }
}
/* témától független, mindig jól látható piros sáv */
.auth-notice { position: relative; z-index: 2; background: #b91c1c; color: #fff; font-weight: 600; text-align: center;
  padding: 8px 14px; line-height: 1.4; font-size: 14px; }
/* belépés / regisztráció felugró ablakban */
.auth-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 20px 16px; overflow-y: auto; }
.auth-modal[hidden] { display: none; }
.auth-modal-backdrop { position: fixed; inset: 0; background: rgba(19, 38, 79, .35); backdrop-filter: blur(3px); }
.auth-modal .auth-box { position: relative; width: min(420px, 100%); margin: auto; padding: 26px 24px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(19, 38, 79, .45); animation: rise .35s cubic-bezier(.2, .7, .2, 1) both; }
.auth-modal .auth-brand { margin-bottom: 8px; }
.auth-modal .auth-logo { width: 200px; }
.auth-modal .auth-form { border: 0; box-shadow: none; padding: 0; background: none; }
.auth-close { position: absolute; top: 10px; right: 10px; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.auth-close:hover { background: var(--surface-2); }
.auth-close:hover { color: var(--text); }
body.modal-open { overflow: hidden; }
/* nyitóoldal: Funkciók és Árak felugró ablakban */
.auth-modal .info-box { width: min(900px, 100%); padding: 26px 26px 20px; }
.info-box h2 { margin: 0 0 6px; font-size: 22px; }
.info-lead { margin: 0 0 16px; }
.info-foot { margin: 14px 0 0; }
.feature-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 14px; }
.feature-groups section { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.feature-groups h3 { margin: 0 0 8px; font-size: 15px; color: var(--primary); }
.feature-groups ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.feature-groups li { position: relative; padding-left: 20px; line-height: 1.45; }
.feature-groups li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.pricing-wrap { overflow-x: auto; margin: 0 -4px; }
.pricing-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pricing-table th, .pricing-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.pricing-table tbody th { text-align: left; font-weight: 400; min-width: 180px; }
.pricing-table td { text-align: center; width: 17%; }
.pricing-table thead th { vertical-align: bottom; border-bottom: 2px solid var(--border); }
.pt-plan { text-align: center; padding-bottom: 12px !important; }
.pt-plan b { display: block; font-size: 16px; margin-bottom: 4px; }
.pt-price { display: block; font-size: 20px; font-weight: 800; white-space: nowrap; }
.pt-price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.pt-year { display: block; font-size: 12px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.pricing-table .pt-base { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.pricing-table thead .pt-base { border-radius: 10px 10px 0 0; }
.pt-group th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding-top: 16px; border-bottom: 0; }
.pt-yes { color: var(--ok); font-weight: 800; font-size: 16px; }
.pt-no { color: var(--muted); opacity: .55; }
.pt-text { font-weight: 600; font-size: 13px; white-space: nowrap; }
@media (max-width: 560px) {
  .auth-top-logo { height: 34px; }
  .auth-top-actions .btn.ghost { display: none; }
  .auth-top-actions .btn.ghost.auth-info { display: inline-flex; padding: 6px 8px; }
  .auth-top { padding: 14px 16px 4px; gap: 10px; flex-wrap: wrap; justify-content: center; }
  .auth-top-actions { gap: 6px; width: 100%; justify-content: center; }
  .auth-modal .info-box { padding: 22px 16px 16px; }
  .pricing-table { font-size: 13px; }
  .pricing-table th, .pricing-table td { padding: 7px 5px; }
  .pricing-table tbody th { min-width: 0; }
  .pt-plan b { font-size: 14px; }
  .pt-price { font-size: 14px; }
  .pt-price small { display: block; font-size: 11px; }
  .pt-year, .pt-text { white-space: normal; font-size: 11px; }
  .promo-band { padding: 20px; }
}
.auth-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 18px; text-align: center; }
.auth-brand .logo { font-size: 30px; }
.auth-form { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.auth-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-form input { font-size: 15px; padding: 9px 11px; }
.auth-form .btn { justify-content: center; padding: 10px; }
.auth-form p { margin: 0; text-align: center; }
.auth-error { background: var(--danger-soft); color: var(--danger); padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.auth-ok { background: var(--ok-soft); color: var(--ok); padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.auth-form label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 400;
  color: var(--text); background: var(--primary-soft); border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 12px; cursor: pointer; }
.auth-form label.check input { flex: none; width: 20px; height: 20px; margin: 0; padding: 0; cursor: pointer;
  accent-color: var(--primary); }
.auth-form label.check a { font-weight: 600; }
.auth-form .small.muted:not(p) { font-weight: 400; }
.company-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.company-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.company-grid .wide { grid-column: span 2; }
.company-grid .full { grid-column: 1 / -1; }
.company-sub { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 860px) { .company-grid { grid-template-columns: 1fr; } .company-grid .wide { grid-column: auto; } }
.pill.muted-pill { background: var(--surface-2); color: var(--muted); }
.banner.warn { background: var(--warn-soft); color: var(--text); border-bottom: 1px solid var(--uncertain-border); }

/* ---------- elemek */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  padding: 7px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
textarea { width: 100%; }
label.check { display: flex; align-items: center; gap: 6px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.spacer { flex: 1; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 12px; align-items: center; }
.filters input[type=search] { width: 260px; }
.stats { display: flex; gap: 16px; color: var(--muted); }
.stats b { color: var(--text); }

/* ---------- táblázatok */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card .table-wrap { border: 0; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.grid td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
#doc-table tbody tr { cursor: pointer; }
#doc-table tbody tr:hover { background: var(--surface-2); }
td.unc { background: var(--uncertain); box-shadow: inset 3px 0 var(--uncertain-border); }
.empty { padding: 40px; text-align: center; color: var(--muted); }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--primary-soft); color: var(--primary); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.status-dot.processing { background: var(--primary); animation: pulse 1s infinite alternate; }
.status-dot.ready { background: var(--ok); }
.status-dot.error { background: var(--danger); }
/* ---------- szerkesztő */
.modal { position: fixed; inset: 0; background: rgba(2, 6, 23, .55); z-index: 50; display: flex; padding: 24px; }
.modal[hidden] { display: none; }
.modal-box {
  margin: auto; width: min(1280px, 100%); height: min(860px, 100%); display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); background: var(--surface); border-radius: 14px; overflow: hidden;
}
.preview { background: #525659; display: flex; align-items: center; justify-content: center; overflow: auto; }
.preview iframe { width: 100%; height: 100%; border: 0; }
.preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ed-form { padding: 18px 22px; overflow-y: auto; overflow-x: hidden; min-width: 0; display: flex; flex-direction: column; }
.ed-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ed-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ed-grid label.check { flex-direction: row; color: var(--text); font-size: 13px; align-self: end; padding-bottom: 6px; }
.ed-grid .wide { grid-column: 1 / -1; }
.ed-grid input, .ed-grid select { font-size: 14px; font-weight: 400; }
.ed-grid .unc input, .ed-grid .unc select { background: var(--uncertain); border-color: var(--uncertain-border); }
.ed-grid .unc::after { content: "ellenőrizd"; font-size: 10px; color: var(--warn); font-weight: 600; }
.ed-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; flex-wrap: wrap; }
.alert { padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 13px; }
.alert.warn { background: var(--warn-soft); }
.alert.err { background: var(--danger-soft); }
.alert.ok-alert { background: var(--ok-soft); }
.alert.info { background: var(--surface-2); border: 1px solid var(--border); }
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12px; }
.stat.warn .v { color: var(--warn); }
.stat.bad .v { color: var(--danger); }
.stat.good .v { color: var(--ok); }
.subtabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.subtabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.subtabs button.active { background: var(--primary-soft); color: var(--primary); }
.merge { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.merge select { max-width: 280px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 8px; box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .topbar { padding: 10px 16px; gap: 10px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  main { padding: 16px; }
  .modal { padding: 0; }
  .modal-box { grid-template-columns: 1fr; grid-template-rows: 40vh 1fr; height: 100%; border-radius: 0; }
  .ed-grid { grid-template-columns: 1fr; }
  .filters input[type=search] { width: 100%; }
  .file-list { columns: 1; }
}

a { color: var(--ai); }
.auth-form a { font-weight: 600; }
.auth-page-footer a { color: var(--muted); }
.danger-zone { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; }

.close-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
/* súgó */
.help { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.help-toc { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.help-toc b { margin-bottom: 6px; }
.help-toc a { color: var(--muted); text-decoration: none; padding: 3px 0; font-size: 14px; }
.help-toc a:hover { color: var(--primary); }
.help-body { max-width: 820px; line-height: 1.6; }
.help-body .card { scroll-margin-top: 90px; }
@media (max-width: 1240px) { .help-toc { top: 140px; } .help-body .card { scroll-margin-top: 140px; } }
.help-body ul, .help-body ol { padding-left: 22px; margin: 6px 0 10px; }
.help-body li { margin-bottom: 4px; }
.help-body p { margin: 0 0 10px; }
.help-faq dt { font-weight: 600; margin-top: 12px; }
.help-faq dd { margin: 2px 0 0; color: var(--muted); }
@media (max-width: 860px) {
  .help { grid-template-columns: 1fr; }
  .help-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .help-toc b { width: 100%; margin-bottom: 0; }
}

/* kapcsolat */
.contact { max-width: 820px; }
.contact-people { display: grid; gap: 24px; }
.contact-people p { margin: 0 0 6px; }
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.contact-form > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
@media (max-width: 860px) { .contact-people { grid-template-columns: 1fr; gap: 8px; } }
/* ---------- a belépőoldal színvilága a programban is (visszafogottabban) */
#app-root { --radius: 14px; position: relative; isolation: isolate; }
#app-root::before, #app-root::after { content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(80px);
  pointer-events: none; }
#app-root::before { width: 560px; height: 560px; background: var(--accent); opacity: .12; top: -200px; left: -180px; }
#app-root::after { width: 520px; height: 520px; background: #2f66a6; opacity: .08; bottom: -220px; right: -160px; }
:root:not([data-theme="vilagos"]) #app-root::after { background: var(--primary); opacity: .07; }

#app-root .topbar { background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
#app-root .card, #app-root .stat { background: color-mix(in srgb, var(--surface) 92%, transparent); }
#app-root h2 { font-weight: 800; letter-spacing: -.015em; }
#app-root .tabs button.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }

.btn.primary { background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent;
  transition: transform .15s, box-shadow .15s, filter .15s; }
.btn.primary:hover { filter: brightness(1.05); transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 70%, transparent); }

/* összesítő csempék: vékony színátmenetes csík felül */
.stat { position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); opacity: .75; }
.stat.warn::before { background: var(--warn); }
.stat.bad::before { background: var(--danger); }
.stat.good::before { background: var(--ok); }

/* fülváltáskor finom beúszás */
#app-root .tab.active { animation: rise .35s cubic-bezier(.2, .7, .2, 1) both; }
@media (prefers-reduced-motion: reduce) {
  #app-root .tab.active { animation: none; }
  .btn.primary:hover { transform: none; }
}

/* ============================================================ ajánlatAId */
/* logó: a kék kör maga az „a” betű, utána „jánlat” + kék „AI” + „d” (fájlok: static/brand/, tools/gen_logo.py) */
.wordmark { display: inline-flex; align-items: center; font-size: 24px; font-weight: 700; letter-spacing: -.02em;
  color: var(--text); text-decoration: none; line-height: 1; }
.wordmark .wm-icon { height: 1.05em; width: 1.05em; flex: none; margin-right: .07em; position: relative; top: .04em; }
.wordmark b { color: #4a8cd2; font-weight: inherit; }
.auth-top .wordmark { font-size: 30px; }
.auth-brand .wordmark { font-size: 32px; }

/* állapotok */
.pill.st-draft { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); }
.pill.st-final { background: var(--primary-soft); color: var(--primary); }
.pill.st-sent { background: #dbeafe; color: #1d4ed8; }
.pill.st-opened { background: #ede9fe; color: #6d28d9; }
.pill.st-accepted { background: var(--ok-soft); color: var(--ok); }
.pill.st-rejected { background: var(--danger-soft); color: var(--danger); }
.pill.st-expired { background: var(--warn-soft); color: var(--warn); }
:root[data-theme="grafit"] .pill.st-sent, :root[data-theme="meleg"] .pill.st-sent, :root[data-theme="kekes"] .pill.st-sent { background: #1e3a8a66; color: #93c5fd; }
:root[data-theme="grafit"] .pill.st-opened, :root[data-theme="meleg"] .pill.st-opened, :root[data-theme="kekes"] .pill.st-opened { background: #4c1d9566; color: #c4b5fd; }

/* listák */
table.grid.click tbody tr { cursor: pointer; }
table.grid.click tbody tr:hover td { background: var(--surface-2); }
.grid td .sub { display: block; color: var(--muted); font-size: 12px; }
tr.old td { opacity: .6; }
.list-empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.list-empty .btn { margin-top: 10px; }

/* űrlap-rács (ügyfél, tétel, cégadatok) */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.form-grid label, .q-head label, .q-side label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label.check { flex-direction: row; align-items: center; color: var(--text); font-size: 13px; font-weight: 500; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* felugró ablak (ügyfél, tétel, küldés) */
.dlg { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px 16px; overflow-y: auto; }
.dlg[hidden] { display: none; }
.dlg-backdrop { position: fixed; inset: 0; background: rgba(19, 38, 79, .35); backdrop-filter: blur(3px); }
.dlg-box { position: relative; width: min(640px, 100%); margin: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 24px 60px -20px rgba(19, 38, 79, .45);
  animation: rise .3s cubic-bezier(.2, .7, .2, 1) both; }
.dlg-box h2 { margin-bottom: 14px; }
.dlg-actions { display: flex; gap: 8px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.dlg-error { margin-top: 10px; }

/* ---------- árajánlat-szerkesztő */
.q-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.q-bar h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.q-saved { color: var(--muted); font-size: 12px; }
.q-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.q-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; }
.q-side .card { margin: 0; }
@media (max-width: 1100px) { .q-layout { grid-template-columns: 1fr; } .q-side { position: static; } }
.q-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.q-head .span2 { grid-column: span 2; }
.q-head .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .q-head { grid-template-columns: 1fr 1fr; } .q-head .span2 { grid-column: 1 / -1; } }
.partner-card { grid-column: 1 / -1; font-size: 13px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.partner-card b { color: var(--text); }
.partner-pick { display: flex; gap: 6px; }
.partner-pick input { flex: 1; }

.q-items { width: 100%; border-collapse: collapse; }
.q-items th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted);
  padding: 6px 5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.q-items th.num { text-align: right; }
.q-items td { padding: 5px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.q-items input, .q-items select, .q-items textarea { width: 100%; padding: 5px 7px; font-size: 13px; }
.q-items textarea { resize: vertical; min-height: 34px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.q-items .n input { text-align: right; }
.q-items td.c-no { width: 26px; color: var(--muted); padding-top: 11px; text-align: right; }
.q-items td.c-qty { width: 74px; }
.q-items td.c-unit { width: 86px; }
.q-items td.c-price { width: 110px; }
.q-items td.c-disc { width: 64px; }
.q-items td.c-vat { width: 78px; }
.q-items td.c-net { width: 110px; text-align: right; padding-top: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-items td.c-act { width: 74px; white-space: nowrap; padding-top: 8px; }
.q-items .icon-btn { font-size: 15px; padding: 0 3px; }
.q-items .icon-btn:hover { color: var(--text); }
.q-items-wrap { overflow-x: auto; }
.q-items-wrap table { min-width: 760px; }
.q-add { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sku-line { display: flex; align-items: center; gap: 6px; margin: 3px 0; font-size: 11px; font-weight: 600; color: var(--muted); }
.q-items .sku-line input { width: 150px; padding: 3px 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.kind-tag { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
body.vat-aam .no-aam { display: none !important; }
fieldset.ro { border: 0; padding: 0; margin: 0; min-width: 0; }

.q-sum { width: 100%; font-variant-numeric: tabular-nums; }
.q-sum td { padding: 3px 0; }
.q-sum td:last-child { text-align: right; white-space: nowrap; }
.q-sum tr.total td { border-top: 2px solid var(--accent); padding-top: 7px; font-weight: 800; font-size: 17px; }
.q-sum tr.muted td { color: var(--muted); font-size: 12.5px; }
.q-actions { display: flex; flex-direction: column; gap: 8px; }
.q-actions .btn { justify-content: center; }
.q-problems { margin: 0; padding-left: 18px; color: var(--warn); font-size: 12.5px; }
.q-sends { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.q-send { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.q-send .row-actions { margin-top: 6px; gap: 6px; }
.q-send.revoked { opacity: .55; }
.q-versions a { margin-right: 8px; }
.q-decision { border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.q-decision.accepted { background: var(--ok-soft); }
.q-decision.rejected { background: var(--danger-soft); }
/* visszaigazolás / lezárás (a döntés doboza alatt; a listában pipa vagy „vár” címke) */
.q-confirm-btn { width: 100%; justify-content: center; margin-top: 10px; }
.q-confirmed { margin-top: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.confirm-preview { border-left: 3px solid var(--border); padding: 4px 10px; margin-top: 6px; font-size: 13px; color: var(--text); }
.confirm-preview p { margin: 0 0 6px; }
.confirm-preview h3 { font-size: 14px; margin: 8px 0 4px; }
.confirm-tick { color: var(--ok); font-weight: 800; margin-left: 4px; }
.confirm-box { width: min(760px, 100%); }
/* megrendelések */
/* listák fölötti állapotkártyák (ajánlatok, megrendelések): kisebbek, kattintásra szűrnek */
.list-cards { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin-bottom: 12px; }
.list-cards .stat { cursor: pointer; padding: 9px 12px; }
.list-cards .stat .v { font-size: 18px; }
.list-cards .stat.active { outline: 2px solid var(--primary); }
.ov-head { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.o-status { display: flex; flex-wrap: wrap; gap: 6px; }
/* megrendelés sora: teljesíthető (zöld), kiszállítva / igazolva, belső megjegyzés */
.q-items tr.row-ready td { background: color-mix(in srgb, var(--ok-soft) 70%, transparent); }
.q-items tr.row-ready td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.o-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.o-ready { font-weight: 700; color: var(--ok); }
.q-items textarea.o-note { margin-top: 4px; background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); font-size: 12px; }
.fulfil-box { width: min(820px, 100%); }
.fulfil-items .fulfil-qty { width: 80px; text-align: right; }
.fulfil-items tr.muted td { opacity: .5; }
.late { color: var(--danger); font-weight: 600; }
.pill.st-new { background: var(--primary-soft); color: var(--primary); }
.pill.st-in_progress { background: #ede9fe; color: #6d28d9; }
.pill.st-completed { background: var(--ok-soft); color: var(--ok); }
.pill.st-closed { background: var(--surface-2); color: var(--muted); }
.pill.st-cancelled { background: var(--danger-soft); color: var(--danger); }
:root[data-theme="grafit"] .pill.st-in_progress, :root[data-theme="meleg"] .pill.st-in_progress, :root[data-theme="kekes"] .pill.st-in_progress { background: #4c1d9566; color: #c4b5fd; }
.confirm-sig { margin: 8px 0; }
.rich-editor { min-height: 0; }
.rich-editor .letter-edit { max-height: 45vh; }
.link-box { display: flex; gap: 6px; margin-top: 8px; }
.link-box input { flex: 1; font-size: 12px; }

/* beállítások: logó, szín, előtagok */
.logo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.logo-prev { max-height: 64px; max-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 44px; height: 34px; padding: 2px; }
.prefix-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.prefix-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.prefix-grid .soon { font-weight: 400; }
.settings-sub { margin-bottom: 14px; }

/* áttekintés */
.ov-cards .stat { cursor: pointer; }
.ov-cards .stat .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* ---------- kísérőlevél (Claudie) */
.letter-box { width: min(1100px, 100%); }
.claudie { border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 70%, var(--surface)), var(--surface) 70%); }
.claudie label { display: block; font-size: 12.5px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.claudie textarea { resize: vertical; }
.claudie-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.letter-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; }
@media (max-width: 860px) { .letter-layout { grid-template-columns: 1fr; } }
.letter-items { display: flex; flex-direction: column; gap: 8px; }
.li-row { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 7px; }
.li-thumb { width: 46px; height: 46px; flex: none; border-radius: 7px; object-fit: cover; border: 1px solid var(--border); background: #fff; }
.li-empty { width: 46px; height: 46px; flex: none; border-radius: 7px; border: 1px dashed var(--border); display: grid;
  place-items: center; font-size: 10px; color: var(--muted); cursor: pointer; text-align: center; line-height: 1.2; }
.li-name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-name span { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.li-name span.ok { color: var(--ok); }
.li-acts { display: flex; flex-direction: column; gap: 3px; }
.letter-editor { border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; min-height: 420px; }
.letter-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px 8px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); border-radius: 10px 10px 0 0; }
.letter-toolbar button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px;
  padding: 3px 8px; font: inherit; font-size: 12.5px; cursor: pointer; }
.letter-toolbar button:hover { border-color: var(--primary); }
.letter-toolbar select { font-size: 12.5px; padding: 3px 6px; }
.letter-toolbar .sep { width: 1px; align-self: stretch; background: var(--border); margin: 2px 3px; }
.letter-edit { flex: 1; padding: 18px 22px; overflow-y: auto; max-height: 60vh; line-height: 1.6; outline: none;
  background: #fff; color: #1c1917; border-radius: 0 0 10px 10px; }
.letter-edit:empty::before { content: attr(data-placeholder); color: #999; }
.letter-edit h3 { font-size: 16px; margin: 14px 0 4px; color: var(--primary); }
.letter-edit p { margin: 0 0 8px; }
.letter-edit hr { border: 0; border-top: 2px dashed #bbb; margin: 18px 0; position: relative; }
.letter-edit hr::after { content: "oldaltörés"; position: absolute; left: 50%; top: -9px; transform: translateX(-50%);
  background: #fff; padding: 0 6px; font-size: 10px; color: #999; }
.letter-busy { opacity: .5; pointer-events: none; }

/* Ügyfelek importja */
.pimport-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; counter-reset: st; font-size: 12px; }
.pimport-steps li { flex: 1; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); color: var(--muted); counter-increment: st; }
.pimport-steps li::before { content: counter(st) ". "; }
.pimport-steps li.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.pimport-steps li.done { color: var(--ok); }
.pimport-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; margin-top: 12px;
  border: 2px dashed var(--border); border-radius: 12px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.pimport-drop:hover, .pimport-drop.over { border-color: var(--primary); background: var(--primary-soft); }
.pimport-fname { font-size: 13px; font-weight: 600; color: var(--primary); }
.pimport-fname:empty { display: none; }
.pimport-sum { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 10px; }
#pimport-upd-wrap { align-items: flex-start; margin-bottom: 10px; }
#pimport-upd-wrap input { margin-top: 2px; }
.pimport-list { margin-bottom: 10px; }
.pimport-list summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 4px 0; }
.pimport-list ul { margin: 4px 0 0; padding-left: 18px; max-height: 180px; overflow-y: auto; font-size: 13px; }
.pimport-list li .muted { margin-left: 4px; }

/* Tételek: kép a listában és a tétel ablakban */
.grid .c-img-col { width: 52px; padding-right: 0; }
.c-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; display: block; background: var(--surface-2); }
.c-image { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.c-image-label { grid-column: 1 / -1; font-size: 13px; font-weight: 600; }
.c-image-box { width: 96px; height: 96px; border: 1px dashed var(--border); border-radius: 10px; display: flex;
  align-items: center; justify-content: center; overflow: hidden; text-align: center; }
.c-image-box img { width: 100%; height: 100%; object-fit: contain; }
.c-image-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.c-image-acts .small.muted { flex-basis: 100%; }

/* Legördülő kereső (core.js picker) – pl. az ajánlat ügyfélmezője */
.picker { position: fixed; z-index: 60; max-height: 300px; overflow-y: auto; max-width: calc(100vw - 16px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px -12px rgba(19, 38, 79, .35); }
.picker-item { padding: 7px 10px; cursor: pointer; font-size: 13px; font-weight: 400; color: var(--text); }
.picker-item .sub { display: block; font-size: 12px; color: var(--muted); }
.picker-item.active, .picker-item:hover { background: var(--primary-soft); }
.picker-more { padding: 7px 10px; font-size: 12px; color: var(--muted); }
.picker-row { display: flex; gap: 8px; align-items: center; }
.picker-row img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; flex: none; }

/* Választós ajánlat: a tételsor szerepe (alap / választható / opcionális) */
.choice-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.q-items .choice-line select { width: auto; font-size: 12px; padding: 3px 6px; color: var(--muted); }
.q-items .choice-line.on select { color: var(--primary); font-weight: 600; }
.q-items .choice-line input[data-k=choice_group] { width: 170px; font-size: 12px; padding: 3px 6px; }
.q-items .choice-line label.check { font-size: 12px; color: var(--muted); }
.q-items .choice-line label.check input { width: auto; }

/* Döntés rögzítése ablak */
.decide-pick { display: flex; gap: 18px; margin: 4px 0 12px; }
.decide-choices { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.decide-choices label.check { font-size: 13px; }
.decide-qty { width: 60px; padding: 2px 6px; text-align: right; }

/* ============================================================ nyitóoldal: bemutató, folyamat, előnyök */
.lp-sec { max-width: 1080px; margin: 64px auto 0; }
.lp-sec h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 4px 0 12px; }
.lp-head { text-align: center; max-width: 720px; margin: 0 auto 24px; }
.lp-head .promo-lead { margin: 0; font-size: 16px; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.lp-flow li, .lp-feats > div { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: 16px; }

/* bemutató: bal oldalt a lépések, jobbra az „ablak” – data-step szerint vált (main.js: demoLoop) */
.lp-demo { display: grid; gap: 26px; align-items: center; }
.demo-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; counter-reset: ds; }
.demo-steps li { counter-increment: ds; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px;
  padding: 11px 14px 13px 52px; border: 1px solid transparent; border-radius: 14px; cursor: pointer;
  transition: background .3s, border-color .3s; }
.demo-steps li::before { content: counter(ds); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px;
  border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); transition: .3s; }
.demo-steps span { color: var(--muted); font-size: 14px; }
.demo-steps li.on { background: color-mix(in srgb, var(--surface) 85%, transparent); border-color: var(--border); }
.demo-steps li.on::before { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }
.demo-steps li.on::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent)); transform-origin: left;
  animation: demoBar var(--demo-dur, 4.5s) linear both; }
.lp-demo.paused .demo-steps li.on::after { animation: none; }
@keyframes demoBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.demo-win { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--primary) 55%, transparent), 0 2px 6px rgba(0, 0, 0, .05); }
.demo-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); }
.demo-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.demo-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 12px; }
.demo-body { position: relative; height: 290px; font-size: 14px; }
.demo-scr { position: absolute; inset: 18px 20px; opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .45s;
  pointer-events: none; }
.demo-win[data-step="0"] .scr-0, .demo-win[data-step="1"] .scr-1,
.demo-win[data-step="2"] .scr-2, .demo-win[data-step="3"] .scr-3 { opacity: 1; transform: none; }
.d-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.d-head span { color: var(--muted); }
.d-pill { margin-left: auto; font-style: normal; font-size: 12px; border: 1px dashed var(--border); color: var(--muted);
  border-radius: 999px; padding: 2px 10px; }
.d-pill.d-ai { border: 0; background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.d-row { display: grid; grid-template-columns: 1fr auto 96px; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.d-row span:nth-child(2) { color: var(--muted); }
.d-row b { text-align: right; }
.d-tot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 18px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.d-tot b { color: var(--text); }
.d-gross { flex-basis: 100%; text-align: right; font-size: 17px; color: var(--text); }
.d-gross b { color: var(--primary); }
.demo-win[data-step="0"] .d-row { animation: dIn .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.35s + var(--r) * .5s); }
.demo-win[data-step="0"] .d-tot { animation: dIn .5s both 1.9s; }
.d-letter { margin: 0; line-height: 1.6; }
.d-letter span { display: block; margin-bottom: 8px; }
.demo-win[data-step="1"] .d-letter span { animation: dType .9s linear both; animation-delay: calc(.3s + var(--l) * .85s); }
.d-field { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; margin-bottom: 8px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); }
.d-field small { color: var(--muted); min-width: 60px; }
.d-send { display: flex; justify-content: flex-end; margin: 6px 0 12px; }
.d-btn { background: var(--primary); color: var(--primary-ink); font-weight: 600; border-radius: 10px; padding: 7px 18px; }
.demo-win[data-step="2"] .d-btn { animation: dPress .5s both .9s; }
.d-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.d-log li { color: var(--ok); font-weight: 600; }
.d-log small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.demo-win[data-step="2"] .d-log li { animation: dIn .45s both; animation-delay: calc(1.4s + var(--g) * 1.1s); }
.d-client { text-align: center; padding: 18px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.d-client small { display: block; color: var(--muted); }
.d-client > b { display: block; font-size: 26px; margin: 4px 0 14px; }
.d-choice { display: flex; justify-content: center; gap: 10px; }
.d-choice span { border-radius: 10px; padding: 7px 16px; font-weight: 600; border: 1px solid var(--border); }
.d-yes { background: var(--primary); color: var(--primary-ink); border-color: transparent !important; }
.demo-win[data-step="3"] .d-yes { animation: dYes .6s both .8s; }
.d-toast { position: absolute; left: 8%; right: 8%; bottom: 0; background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--ok); border-radius: 12px; padding: 10px 14px; font-size: 13.5px;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .35); opacity: 0; }
.d-toast b { color: var(--ok); }
.d-toast small { display: block; color: var(--muted); margin-top: 2px; }
.demo-win[data-step="3"] .d-toast { animation: dToast .55s cubic-bezier(.2, .7, .2, 1) both 1.5s; }
@keyframes dIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dType { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes dPress { 40% { transform: scale(.92); filter: brightness(.85); } 100% { transform: none; } }
@keyframes dYes { 40% { transform: scale(.92); } 100% { transform: none; background: var(--ok); color: #fff; } }
@keyframes dToast { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* a folyamat hat lépése */
.lp-flow { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: fl;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.lp-flow li { counter-increment: fl; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.55;
  transition: transform .2s, border-color .2s; }
.lp-flow li::before { content: counter(fl, decimal-leading-zero); font-size: 26px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text;
  color: transparent; }
.lp-flow li b { font-size: 16px; }
.lp-flow li span { color: var(--muted); font-size: 14.5px; }
.lp-flow li:hover, .lp-feats > div:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }

/* további előnyök */
.lp-feats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.lp-feats > div { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; transition: transform .2s, border-color .2s; }
.lp-feats svg { width: 40px; height: 40px; padding: 8px; border-radius: 11px; background: var(--primary-soft); fill: none;
  stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.lp-feats span { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* záró felhívás */
.lp-cta { max-width: 1080px; margin: 64px auto 8px; text-align: center; padding: 44px 24px; border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, var(--surface)), color-mix(in srgb, var(--accent) 10%, var(--surface))); }
.lp-cta-motto { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-cta .promo-lead { margin: 0 0 20px; }
.lp-cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.lp-cta-btns .btn { padding: 10px 22px; font-size: 15px; }

@media (min-width: 900px) {
  .lp-demo { grid-template-columns: .85fr 1.15fr; gap: 40px; }
  .lp-sec h2 { font-size: 32px; }
  .lp-cta-motto { font-size: 38px; }
}
@media (max-width: 520px) {
  .demo-body { height: 320px; font-size: 13px; }
  .demo-scr { inset: 14px; }
  .d-row { grid-template-columns: 1fr auto 82px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .demo-win *, .demo-steps li::after { animation: none !important; }
  .demo-win[data-step="3"] .d-toast { opacity: 1; }
}
