/* ===========================================================================
   Elistra — komponensek
   Forrás: „Elistra — Arculati kézikönyv v1.0" + `elistra-mockup-notion-brand.html`
   NINCS benne nyers érték: minden a tokens.css-ből jön.
   =========================================================================== */
@import url("tokens.css");
@import url("inter.css");

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--shell);
  font-family: var(--font);
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: 1.55;
  padding: 34px 20px 90px;
}

h1 { font-weight: 800; font-size: var(--fs-h1); margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-weight: 800; font-size: var(--fs-h2); margin: 0 0 10px; letter-spacing: -0.005em; }
h3 { font-weight: 700; font-size: var(--fs-h3); margin: 0; }
p  { margin: 0 0 14px; }
a  { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-field); }

.sub    { color: var(--muted); font-size: var(--fs-body); margin: 0; }
.muted  { color: var(--muted); }
.small  { font-size: var(--fs-sm); }
.xs     { font-size: var(--fs-xs); }
.data   { font-weight: 700; }          /* azonosító / dátum — 700-as súly, nem mono */
.right  { text-align: right; }
.nowrap { white-space: nowrap; }
.hide   { display: none !important; }
.row    { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.grow   { flex: 1 1 auto; min-width: 0; }
.spread { display: flex; justify-content: space-between; align-items: center;
          gap: 16px; flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }
.mt   { margin-top: var(--gap-section); }
.mt-s { margin-top: 16px; }

.kicker { font-weight: 700; font-size: var(--fs-kicker); text-transform: uppercase;
          letter-spacing: var(--tracking-kicker); color: var(--muted); }

/* ===========================================================================
   Külső keret — a mockup „frame" mintája
   =========================================================================== */
.canvas { max-width: 1080px; margin: 0 auto; }
.screen-label { font-weight: 800; font-size: var(--fs-kicker);
  letter-spacing: var(--tracking-kicker); text-transform: uppercase;
  color: var(--muted); margin: 0 0 12px 4px; }
.frame { background: var(--paper); border-radius: 18px; overflow: hidden;
         box-shadow: var(--shadow-frame); }

/* --- topbar + modul-fülek ------------------------------------------------ */
.topbar { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 30px; border-bottom: 1px solid var(--line);
  background: var(--surface); }
.logo { font-weight: 800; font-size: 1.05rem; color: var(--ink);
        text-decoration: none; display: flex; align-items: center; gap: 9px; }
/* A mark a modul akcentusát veszi fel, a wordmark ink marad — így a logó
   is jelzi, melyik modulban vagyunk. */
.logo svg { display: block; color: var(--accent); }

.tabs { display: flex; gap: 6px; }
.tab { font-weight: 700; font-size: var(--fs-btn); color: var(--muted);
  padding: 9px 16px; border-radius: var(--r-pill); text-decoration: none;
  white-space: nowrap; }
.tab:hover { background: #F1F2F0; }
.tab[aria-current="page"] { color: #fff; background: var(--tab-color, var(--accent)); }
.tab[data-m="handover"]  { --tab-color: var(--steel); }
.tab[data-m="verify"]    { --tab-color: var(--verified); }
.tab[data-m="campaigns"] { --tab-color: var(--amber); }
.tab[data-m="data"], .tab[data-m="system"] { --tab-color: var(--neutral); }

.who { font-size: var(--fs-sm); color: var(--muted); font-weight: 600;
       text-align: right; line-height: 1.4; }
.who a { color: var(--muted); }

/* --- tartalom ------------------------------------------------------------ */
.content { padding: 34px 30px 46px; }

.hero { display: flex; align-items: center; gap: 20px; margin-bottom: 26px;
        flex-wrap: wrap; }
.spot { width: var(--spot-size); height: var(--spot-size); border-radius: var(--r-spot);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--accent-tint); color: var(--accent); }
.spot svg { width: 32px; height: 32px; }
.hero .hero-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* --- almenü -------------------------------------------------------------- */
.subnav { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.subtab { font-weight: 700; font-size: var(--fs-sm); padding: 8px 15px;
  border-radius: var(--r-pill); color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; white-space: nowrap; }
.subtab:hover { background: #F5F6F4; }
.subtab[aria-current="page"] { background: var(--accent); color: #fff;
                               border-color: var(--accent); }

/* ===========================================================================
   Komponensek
   =========================================================================== */

/* --- gomb (kézikönyv 6.) ------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: var(--fs-btn);
  padding: 11px 22px; min-height: var(--control-h);
  border-radius: var(--r-btn); border: none; cursor: pointer;
  background: var(--accent); color: #fff; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(0.92); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { filter: none; background: #F5F6F4; }
.btn.danger { background: var(--surface); color: var(--brick); border: 1px solid var(--brick); }
.btn.danger:hover { filter: none; background: var(--brick-tint); }
.btn.sm { padding: 8px 16px; font-size: var(--fs-sm); min-height: 0; }
.btn.lg { min-height: var(--touch); font-size: 0.95rem; padding: 13px 26px; }
.btn.block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* --- kártya -------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--r-card); overflow: hidden; }
.card > h3 { padding: 18px var(--pad-card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; }
.card .pad { padding: 20px var(--pad-card); }
.grid2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; }
.grid-even { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* --- statisztika --------------------------------------------------------- */
.stat-row { display: flex; gap: 16px; margin-bottom: var(--gap-section); flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--r-card); padding: 16px 20px; flex: 1; min-width: 130px; }
.stat .n { font-weight: 800; font-size: 1.5rem; line-height: 1.15; }
.stat .l { font-size: var(--fs-label); color: var(--muted); font-weight: 600; margin-top: 2px; }

.report-summary { display: flex; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.report-chip { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 14px 20px; flex: 1; min-width: 140px; }
.report-chip .n { font-weight: 800; font-size: 1.4rem; }
.report-chip .l { font-size: var(--fs-label); color: var(--muted); font-weight: 600; }

/* --- haladásjelző -------------------------------------------------------- */
.bar-track { height: 8px; background: var(--line); border-radius: var(--r-pill);
             overflow: hidden; margin-bottom: 28px; display: flex; }
.bar-fill { height: 100%; background: var(--accent); }
.bar-fill.ok   { background: var(--verified); }
.bar-fill.wait { background: var(--amber); }
.bar-fill.bad  { background: var(--brick); }

/* --- szűrő-pill ---------------------------------------------------------- */
.filters { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap;
           align-items: center; }
.filter-pill { font-weight: 600; font-size: var(--fs-sm); color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: var(--r-pill); }
select.filter-pill, input.filter-pill { min-height: 36px; }

/* --- táblázat („ledger") ------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: var(--cell-y) var(--cell-x); text-align: left; font-size: var(--fs-data);
         vertical-align: top; }
th { font-weight: 700; font-size: var(--fs-kicker); text-transform: uppercase;
     letter-spacing: var(--tracking-label); color: var(--muted);
     background: var(--surface-sub); white-space: nowrap; }
tr:not(:last-child) td { border-bottom: 1px solid var(--line); }
td.data { font-weight: 700; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-sub); }
.row-hint { color: var(--accent); font-weight: 700; font-size: var(--fs-sm); }
.empty-cell { padding: 44px var(--cell-x); text-align: center; color: var(--muted); }

/* --- tag / státusz (kézikönyv 6.) ---------------------------------------- */
.tag { display: inline-block; font-weight: 700; font-size: var(--fs-tag);
       padding: 4px 12px; border-radius: var(--r-tag); white-space: nowrap;
       background: var(--neutral-tint); color: var(--muted); }
.tag.ok   { background: var(--verified-tint); color: var(--verified); }
.tag.wait { background: var(--amber-tint);    color: var(--amber); }
.tag.bad  { background: var(--brick-tint);    color: var(--brick); }
.tag.done { background: var(--steel-tint);    color: var(--steel); }

/* --- lista --------------------------------------------------------------- */
.list { list-style: none; margin: 0; padding: 0 var(--pad-card) 20px; }
.list li { display: flex; align-items: center; gap: 10px; padding: 12px 0;
           border-top: 1px solid var(--line); font-size: var(--fs-data); }
.list li:first-child { border-top: none; }
.list .name { font-weight: 700; }
.list .date { margin-left: auto; color: var(--muted); font-size: var(--fs-sm); }

/* --- form ---------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: var(--fs-label); font-weight: 700;
                 color: var(--muted); margin-bottom: 5px; }
.field .hint { font-weight: 500; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=search], select, textarea, .input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-field);
  padding: 9px 12px; font-size: 0.9rem; font-family: var(--font);
  background: var(--field-bg); color: var(--ink); min-height: var(--control-h);
}
textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-card);
           padding: 16px 18px; margin: 0 0 16px; }
legend { font-size: var(--fs-label); font-weight: 700; color: var(--muted);
         padding: 0 6px; text-transform: uppercase; letter-spacing: var(--tracking-label); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-data);
         font-weight: 400; margin-bottom: 12px; line-height: 1.6; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0;
               flex: 0 0 auto; accent-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }

/* --- radio / chip választó ----------------------------------------------- */
.radio-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.radio-opt { border: 1px solid var(--line); border-radius: var(--r-btn);
  padding: 12px 16px; font-size: var(--fs-data); font-weight: 600; cursor: pointer;
  flex: 1; background: var(--surface); }
.radio-opt.selected, .radio-opt:has(input:checked) {
  border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.radio-opt input { display: none; }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: var(--fs-data); font-weight: 600; cursor: pointer; background: var(--surface); }
.chip.selected, .chip:has(input:checked) {
  background: var(--accent-tint); border-color: var(--accent); color: var(--accent); }
.chip input { display: none; }

/* --- wizard lépésjelölő -------------------------------------------------- */
.steps { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.step-dot { width: 30px; height: 30px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: var(--fs-sm);
  background: var(--surface); border: 2px solid var(--line); color: var(--muted);
  flex-shrink: 0; text-decoration: none; }
.step-dot.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-dot.done { border-color: var(--accent); color: var(--accent); }
.step-track { flex: 1; height: 2px; background: var(--line); }
.wizard-actions { display: flex; justify-content: space-between; margin-top: 26px; gap: 10px; }

/* --- üres állapot -------------------------------------------------------- */
.empty { text-align: center; padding: 64px 24px; background: var(--surface);
  border: 1.5px dashed var(--line); border-radius: var(--r-card); }
.empty svg { width: 52px; height: 52px; color: var(--accent); margin-bottom: 16px; }
.empty h4 { margin: 0 0 6px; font-weight: 800; font-size: 1.05rem; }
.empty p { color: var(--muted); font-size: var(--fs-data); margin: 0 0 20px; }

/* --- scanbox (kizárólag Verify) ------------------------------------------ */
.scanbox { border: 1.5px dashed var(--accent); border-radius: var(--r-doc);
  padding: 18px; display: flex; gap: 16px; align-items: center;
  margin: 0 var(--pad-card) 20px; }
.scanbox svg { width: 52px; height: 52px; color: var(--accent); flex-shrink: 0; }
.scanbox .verdict { font-weight: 800; font-size: 0.92rem; }
.scanbox .conf { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }

/* --- értesítés ----------------------------------------------------------- */
.note { border: 1px solid var(--line); border-left: 3px solid var(--muted);
  background: var(--surface-sub); padding: 14px 18px;
  border-radius: 0 var(--r-field) var(--r-field) 0; font-size: var(--fs-data);
  margin-bottom: 20px; line-height: 1.65; }
.note.ok   { border-left-color: var(--verified); background: var(--verified-tint); }
.note.wait { border-left-color: var(--amber);    background: var(--amber-tint); }
.note.bad  { border-left-color: var(--brick);    background: var(--brick-tint); }
.note p:last-child { margin-bottom: 0; }

/* --- nyilatkozat-doboz (dokumentum-analóg) ------------------------------- */
.statement { background: var(--surface-sub); border: 1px solid var(--line);
  border-radius: var(--r-doc); padding: 18px 20px; font-size: var(--fs-data);
  line-height: 1.7; margin-bottom: var(--gap-section); }

/* --- bizonyíték-adatok ---------------------------------------------------
   Nincs mono betű (kézikönyv 3.): a lenyomatok 700-as súllyal különülnek el,
   `tabular-nums` + `break-all` teszi őket összevethetővé. */
.evi { background: var(--accent-tint); border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-field) var(--r-field) 0; padding: 18px 20px; }
.evi dl { display: grid; grid-template-columns: minmax(150px, auto) 1fr;
          gap: 8px 24px; margin: 0; align-items: baseline; }
.evi dt { font-size: var(--fs-kicker); font-weight: 700; text-transform: uppercase;
          letter-spacing: var(--tracking-label); color: var(--muted); }
.evi dd { margin: 0; font-weight: 700; font-size: var(--fs-sm);
          font-variant-numeric: tabular-nums; word-break: break-all; line-height: 1.5; }

/* --- idővonal ------------------------------------------------------------ */
.tl { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); }
.tl li { position: relative; padding: 0 0 16px 10px; }
.tl li::before { content: ""; position: absolute; left: -27px; top: 7px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tl li.hi::before { background: var(--accent); }
.tl .when { font-weight: 700; font-size: var(--fs-xs); color: var(--muted);
            font-variant-numeric: tabular-nums; }

/* --- fotó bizonyíték sor ------------------------------------------------- */
.evidence-line { display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-data); color: var(--muted); margin-bottom: 20px; }
.evidence-line svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }

.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb { position: relative; width: 78px; height: 78px; border-radius: var(--r-tag);
  overflow: hidden; border: 1px solid var(--line); background: var(--surface-sub); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .badge { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px;
  font-weight: 700; text-align: center; padding: 2px 0;
  background: var(--verified); color: #fff; }
.thumb .badge.bad  { background: var(--brick); }
.thumb .badge.wait { background: var(--amber); }

/* ===========================================================================
   Átvevő / dolgozó felület — mobil, bejelentkezés nélkül
   =========================================================================== */
.pub-shell { max-width: 620px; margin: 0 auto; }
.pub { background: var(--surface); border-radius: var(--r-card);
       box-shadow: var(--shadow-frame); overflow: hidden; }
.pub-bar { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 24px; background: var(--accent-tint);
  border-bottom: 1px solid var(--line); }
.pub-bar .doc-logo { font-weight: 800; font-size: 0.98rem; color: var(--accent);
                     display: flex; align-items: center; gap: 8px; }
.pub-bar .doc-id { font-weight: 700; font-size: var(--fs-sm); color: var(--accent); }
.pub-sheet { padding: 30px 26px 130px; }
.pub-sheet h1 { font-size: 1.4rem; margin-bottom: 6px; }

.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -2px 14px rgba(27, 36, 48, .1);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.actionbar .inner { max-width: 620px; margin: 0 auto; display: flex; gap: 10px; }
.actionbar .btn { flex: 1 1 auto; min-height: var(--touch); }

/* aláírómező */
.sigbox { position: relative; border: 1.5px dashed var(--line);
  border-radius: var(--r-doc); background: var(--field-bg); touch-action: none; }
.sigbox canvas { display: block; width: 100%; height: 160px; touch-action: none;
                 border-radius: var(--r-doc); }
.sigbox .base { position: absolute; left: 8%; right: 8%; bottom: 34px;
  border-bottom: 1px solid var(--line); pointer-events: none; }
.sigbox .ph { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center;
  font-size: var(--fs-xs); font-weight: 600; color: var(--muted); pointer-events: none; }
.sigbox.signed { border-style: solid; border-color: var(--accent); }

/* kamera */
.cam { position: relative; background: var(--ink); border-radius: var(--r-doc);
       overflow: hidden; aspect-ratio: 3 / 4; }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam .frame-guide { position: absolute; inset: 12% 8% 26%;
  border: 2px solid rgba(255,255,255,.9); border-radius: var(--r-tag);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.35); pointer-events: none; }
.cam .guide { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center;
  color: #fff; font-size: var(--fs-data); font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,.7); padding: 0 16px; pointer-events: none; }
.cam .shutter { position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 24px; width: 64px; height: 64px; border-radius: 50%;
  border: 4px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; }

/* eszközkártya a verifikációs oldalon */
.asset-card { border: 1px solid var(--line); border-radius: var(--r-doc);
  background: var(--surface); padding: 18px 20px; }
.asset-card + .asset-card { margin-top: 14px; }
.asset-card.done { border-color: var(--accent); background: var(--accent-tint); }
.asset-card .name { font-weight: 800; font-size: 1rem; margin-bottom: 3px; }
.asset-card .ids { font-weight: 700; font-size: var(--fs-sm); color: var(--muted); }

/* ===========================================================================
   Belépés
   =========================================================================== */
.auth { max-width: 420px; margin: 0 auto; }
.auth .frame { padding: 0; }
.auth .pad { padding: 30px 28px 32px; background: var(--surface); }

/* ===========================================================================
   Reszponzív — töréspont 640px (kézikönyv 7.)
   =========================================================================== */
@media (max-width: 640px) {
  body { padding: 20px 10px 70px; }
  .canvas { max-width: 100%; }
  .screen-label { padding: 0 6px; }
  .frame { border-radius: 14px; }

  .topbar { flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
  .logo { order: 1; }
  .who { order: 2; margin-left: auto; }
  .tabs { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
          flex-wrap: nowrap; }
  .tab { flex-shrink: 0; }

  .content { padding: 22px 16px 32px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero .hero-actions { margin-left: 0; width: 100%; }
  .hero .hero-actions .btn { flex: 1 1 auto; }
  .spot { width: 52px; height: 52px; }
  .spot svg { width: 26px; height: 26px; }
  h1 { font-size: 1.35rem; }

  .subnav { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .subtab { flex-shrink: 0; }

  .grid2, .grid-even { grid-template-columns: 1fr; }
  .stat-row { gap: 10px; }
  .stat { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .report-chip { flex: 1 1 calc(50% - 5px); }

  table { min-width: 560px; }
  th, td { padding: 12px 16px; }

  .steps { gap: 6px; }
  .step-dot { width: 26px; height: 26px; font-size: var(--fs-xs); }
  .radio-row { flex-wrap: wrap; }
  .radio-opt { flex: 1 1 100%; }
  .wizard-actions { flex-direction: column-reverse; }
  .wizard-actions .btn { width: 100%; }
  .empty { padding: 44px 18px; }

  .evi dl { grid-template-columns: 1fr; gap: 2px 0; }
  .evi dd { margin-bottom: 8px; }

  .pub-sheet { padding: 24px 18px 130px; }
}

@media print {
  body { background: #fff; padding: 0; }
  .topbar, .subnav, .actionbar, .btn, .hero-actions { display: none !important; }
  .frame { box-shadow: none; border-radius: 0; }
}
