/* ============================================================
   HR → SI QR  ·  Pretvornik plačilnih kod
   Design tokens → layout → components → screens → print
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
            "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono",
            "Roboto Mono", Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --sp: clamp(16px, 4.4vw, 26px);          /* horizontal gutter */
  --wrap: 620px;

  --ease: cubic-bezier(.22, .68, .32, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .16s var(--ease);
  --t: .28s var(--ease);
  --t-slow: .55s var(--ease-out);

  --grad-brand: linear-gradient(115deg, #ff4d6d 0%, #b45cff 46%, #4d8bff 100%);
  --grad-cta:   linear-gradient(120deg, #5b7cff 0%, #7f5bff 55%, #a855f7 100%);
}

/* dark (default) */
:root, [data-theme="dark"] {
  --bg:        #070a12;
  --bg-2:      #0b1020;
  --surface:   rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .07);
  --line:      rgba(255, 255, 255, .09);
  --line-2:    rgba(255, 255, 255, .16);
  --txt:       #eaeefb;
  --txt-2:     #a7b1c9;
  --txt-3:     #6f7b96;
  --accent:    #7f9cff;
  --accent-2:  #c084fc;
  --ok:        #34d399;
  --warn:      #fbbf24;
  --err:       #fb7185;
  --shadow:    0 24px 60px -24px rgba(0, 0, 0, .85), 0 2px 8px rgba(0, 0, 0, .4);
  --blob-1: #4338ca; --blob-2: #0891b2; --blob-3: #be123c;
  --blob-a: .40;
  --grain-o: .05;
}

[data-theme="light"] {
  --bg:        #f2f4fb;
  --bg-2:      #e9ecf8;
  --surface:   rgba(255, 255, 255, .78);
  --surface-2: rgba(255, 255, 255, .95);
  --line:      rgba(16, 24, 48, .09);
  --line-2:    rgba(16, 24, 48, .18);
  --txt:       #101728;
  --txt-2:     #4a5573;
  --txt-3:     #7a85a3;
  --accent:    #4f6ef7;
  --accent-2:  #9333ea;
  --ok:        #059669;
  --warn:      #b45309;
  --err:       #e11d48;
  --shadow:    0 20px 50px -22px rgba(24, 34, 68, .35), 0 1px 3px rgba(24, 34, 68, .08);
  --blob-1: #6366f1; --blob-2: #22d3ee; --blob-3: #fb7185;
  --blob-a: .30;
  --grain-o: .035;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--txt);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  padding-bottom: env(safe-area-inset-bottom);
}

body.is-locked { overflow: hidden; }

h1, h2, h3 { margin: 0; font-weight: 640; letter-spacing: -.025em; line-height: 1.12; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
svg { display: block; width: 100%; height: 100%; }
canvas { display: block; }
::selection { background: var(--accent); color: #fff; }

:where(a, button, input, textarea, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed; top: -60px; left: var(--sp); z-index: 200;
  padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--accent); color: #fff; text-decoration: none;
  transition: top var(--t);
}
.skip-link:focus { top: calc(env(safe-area-inset-top) + 10px); }

/* ---------- 3. Background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.aurora::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, transparent 20%, var(--bg) 78%);
}
.blob {
  position: absolute; display: block;
  width: 78vmax; height: 78vmax; border-radius: 50%;
  filter: blur(90px); opacity: var(--blob-a);
  will-change: transform;
}
.blob--1 { background: var(--blob-1); top: -34vmax; left: -22vmax; animation: drift1 26s var(--ease) infinite alternate; }
.blob--2 { background: var(--blob-2); top: -12vmax; right: -34vmax; animation: drift2 32s var(--ease) infinite alternate; }
.blob--3 { background: var(--blob-3); bottom: -46vmax; left: 12vmax; opacity: calc(var(--blob-a) * .7); animation: drift3 38s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate3d(14vmax, 10vmax, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-12vmax, 16vmax, 0) scale(.88); } }
@keyframes drift3 { to { transform: translate3d(16vmax, -12vmax, 0) scale(1.1); } }

.grain {
  position: absolute; inset: -50%; opacity: var(--grain-o); pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 4. Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 12px) var(--sp) 12px;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand__mark {
  width: 38px; height: 38px; flex: none; padding: 6px;
  border-radius: 12px; color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 6px 18px -6px rgba(180, 92, 255, .7);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text b { font-size: 15px; font-weight: 680; letter-spacing: -.01em; }
.brand__text small { font-size: 11px; color: var(--txt-3); letter-spacing: .02em; }

.topbar__tools { display: flex; align-items: center; gap: 8px; }

.seg {
  display: flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface);
}
.seg__btn {
  padding: 5px 11px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 640; letter-spacing: .04em;
  color: var(--txt-3); transition: color var(--t-fast), background var(--t-fast);
}
.seg__btn.is-active { color: var(--txt); background: var(--surface-2); }

.icon-btn {
  width: 38px; height: 38px; flex: none; padding: 9px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--txt-2);
  transition: transform var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.icon-btn:active { transform: scale(.93); }
.icon-btn:hover { color: var(--txt); border-color: var(--line-2); }
.icon-btn--solid {
  background: rgba(8, 10, 18, .6); border-color: rgba(255, 255, 255, .18); color: #fff;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.ico--sun { display: none; }
[data-theme="light"] .ico--moon { display: none; }
[data-theme="light"] .ico--sun { display: block; }

/* ---------- 5. Stepper ---------- */
.stepper {
  position: relative;
  max-width: var(--wrap); margin: 0 auto; padding: 18px var(--sp) 0;
}
.stepper ol { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.step { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.step__dot {
  width: 22px; height: 22px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-2);
  font-size: 11px; font-weight: 660; color: var(--txt-3);
  transition: all var(--t);
}
.step__label {
  font-size: 12px; font-weight: 560; color: var(--txt-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color var(--t);
}
.step.is-active .step__dot,
.step.is-done .step__dot { color: #fff; border-color: transparent; background: var(--grad-cta); }
.step.is-active .step__label,
.step.is-done .step__label { color: var(--txt); }
.step.is-done .step__dot { font-size: 0; }
.step.is-done .step__dot::after { content: "✓"; font-size: 11px; }

.stepper__rail {
  display: block; height: 2px; margin-top: 12px; border-radius: 2px;
  background: var(--line); overflow: hidden;
}
.stepper__rail i {
  display: block; height: 100%; width: 33.33%;
  background: var(--grad-cta); border-radius: 2px;
  transition: width var(--t-slow);
}

/* ---------- 6. Views ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp) 60px; }

.view { padding-top: 26px; }
.view[hidden] { display: none; }
.view.is-entering > * { animation: rise .5s var(--ease-out) both; }
.view.is-entering > *:nth-child(2) { animation-delay: .05s; }
.view.is-entering > *:nth-child(3) { animation-delay: .1s; }
.view.is-entering > *:nth-child(4) { animation-delay: .15s; }
.view.is-entering > *:nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } }

.view__title { font-size: clamp(25px, 6.4vw, 32px); margin-bottom: 8px; }
.view__sub { color: var(--txt-2); font-size: 15px; margin-bottom: 22px; }

.back {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 18px; padding: 7px 13px 7px 10px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--txt-2);
  font-size: 13.5px; font-weight: 560;
  transition: transform var(--t-fast), color var(--t-fast);
}
.back:active { transform: scale(.96); }
.back:hover { color: var(--txt); }

/* ---------- 7. Hero ---------- */
.hero { margin-bottom: 30px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 16px; padding: 6px 13px 6px 10px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 11.5px; font-weight: 580; letter-spacing: .04em;
  color: var(--txt-2); text-transform: uppercase;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 70%, transparent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero h1 {
  font-size: clamp(34px, 10vw, 54px);
  letter-spacing: -.04em; font-weight: 700;
  background: linear-gradient(180deg, var(--txt) 40%, color-mix(in srgb, var(--txt) 55%, transparent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}
.lede { color: var(--txt-2); font-size: clamp(15px, 4vw, 17px); max-width: 46ch; }

/* ---------- 8. Action cards ---------- */
.actions { display: grid; gap: 11px; margin-bottom: 18px; }

.action {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px;
  width: 100%; padding: 17px 18px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform var(--t-fast), border-color var(--t), background var(--t);
}
.action::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--grad-cta); opacity: 0; transition: opacity var(--t);
  mix-blend-mode: soft-light; pointer-events: none;
}
.action:hover { border-color: var(--line-2); }
.action:hover::before { opacity: .5; }
.action:active { transform: scale(.985); }

.action__icon {
  width: 46px; height: 46px; padding: 11px; flex: none;
  border-radius: 14px; color: var(--txt-2);
  border: 1px solid var(--line); background: var(--surface-2);
  transition: color var(--t), background var(--t);
}
.action__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.action__body b { font-size: 15.5px; font-weight: 620; letter-spacing: -.012em; }
.action__body small { font-size: 12.5px; color: var(--txt-3); line-height: 1.35; }
.action__chev { color: var(--txt-3); font-size: 17px; transition: transform var(--t), color var(--t); }
.action:hover .action__chev { transform: translateX(3px); color: var(--txt); }

.action--primary { border-color: transparent; background: var(--grad-cta); color: #fff; }
.action--primary::before { display: none; }
.action--primary .action__icon { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .22); color: #fff; }
.action--primary .action__body small { color: rgba(255, 255, 255, .78); }
.action--primary .action__chev { color: rgba(255, 255, 255, .8); }
.action--primary { box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--accent) 90%, transparent); }

/* ---------- 9. Panels, facts ---------- */
.panel {
  padding: 18px; margin-bottom: 22px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
  animation: rise .35s var(--ease-out) both;
}
.panel[hidden] { display: none; }
.panel__row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }

.facts { display: grid; gap: 2px; margin: 26px 0 0; padding: 0; list-style: none; }
.facts li {
  display: grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: baseline;
  padding: 14px 4px; border-top: 1px solid var(--line);
}
.facts__k {
  font-size: 15px; font-weight: 680; letter-spacing: -.02em;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.facts__v { font-size: 13.5px; color: var(--txt-2); line-height: 1.45; }

/* ---------- 10. Notices ---------- */
.notices { display: grid; gap: 9px; margin-bottom: 20px; }
.notices:empty { display: none; }
.notice {
  display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: start;
  padding: 13px 15px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; line-height: 1.45; color: var(--txt-2);
  animation: rise .35s var(--ease-out) both;
}
.notice b { display: block; color: var(--txt); font-weight: 620; margin-bottom: 1px; }
.notice__ico { width: 18px; height: 18px; margin-top: 2px; }
.notice--warn { border-color: color-mix(in srgb, var(--warn) 42%, transparent); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.notice--warn .notice__ico { color: var(--warn); }
.notice--err  { border-color: color-mix(in srgb, var(--err) 45%, transparent);  background: color-mix(in srgb, var(--err) 9%, var(--surface)); }
.notice--err .notice__ico { color: var(--err); }
.notice--info .notice__ico { color: var(--accent); }
.notice--ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.notice--ok .notice__ico { color: var(--ok); }

/* ---------- 11. Form ---------- */
.card {
  position: relative;
  margin: 0 0 14px; padding: 20px 18px 18px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card__legend {
  display: flex; align-items: center; gap: 10px;
  padding: 0; margin-bottom: 16px;
  font-size: 14px; font-weight: 640; letter-spacing: -.01em;
}
.card__num {
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 600;
  padding: 3px 7px; border-radius: 7px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.card__opt {
  margin-left: auto; font-size: 11px; font-weight: 500; color: var(--txt-3);
  padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--line);
}

.field { position: relative; margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .grid-2 { grid-template-columns: 1fr; gap: 15px; } }

.lbl {
  display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 580; letter-spacing: .01em; color: var(--txt-2);
}

.inp, .ta {
  width: 100%; padding: 13px 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--bg-2) 55%, transparent);
  color: var(--txt); font-size: 16px; /* ≥16px stops iOS zoom-on-focus */
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  appearance: none; -webkit-appearance: none;
}
.inp::placeholder, .ta::placeholder { color: var(--txt-3); opacity: .7; }
.inp:focus, .ta:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 20%, transparent);
}
.inp--mono { font-family: var(--f-mono); font-size: 15px; letter-spacing: .02em; }
.inp.is-bad { border-color: var(--err); }
.inp.is-bad:focus { box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--err) 22%, transparent); }
.inp[type="date"] { min-height: 48px; }
.ta { font-family: var(--f-mono); font-size: 13px; line-height: 1.5; resize: vertical; }

.amount-wrap { position: relative; }
.inp--amount {
  font-size: clamp(26px, 7vw, 32px); font-weight: 660; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; padding: 12px 74px 12px 14px;
}
.amount-cur {
  position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  font-size: 13px; font-weight: 620; letter-spacing: .05em; color: var(--txt-3);
  pointer-events: none;
}

.count {
  position: absolute; right: 2px; top: 0;
  font-size: 10.5px; font-family: var(--f-mono); color: var(--txt-3);
  font-variant-numeric: tabular-nums;
}
.count.is-max { color: var(--warn); }

.hint { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--txt-3); min-height: 0; }
.hint:empty { display: none; }
.hint.is-bad { color: var(--err); }
.hint.is-ok { color: var(--ok); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.chip {
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: transparent;
  font-size: 12px; font-weight: 580; color: var(--txt-2);
  transition: all var(--t-fast);
}
.chip[hidden] { display: none; }
.chip:active { transform: scale(.95); }
.chip.is-active { color: #fff; border-color: transparent; background: var(--grad-cta); }

.switch { display: flex; align-items: center; gap: 11px; cursor: pointer; margin-top: 4px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  width: 42px; height: 25px; flex: none; padding: 3px;
  border-radius: var(--r-pill); background: var(--line-2);
  transition: background var(--t);
}
.switch__thumb {
  display: block; width: 19px; height: 19px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  transition: transform var(--t);
}
.switch input:checked + .switch__track { background: var(--grad-cta); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(17px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 3px; }
.switch__label { font-size: 13px; color: var(--txt-2); }

/* ---------- 12. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 20px; border-radius: var(--r-md);
  font-size: 14.5px; font-weight: 620; letter-spacing: -.01em;
  border: 1px solid transparent;
  transition: transform var(--t-fast), background var(--t), border-color var(--t), opacity var(--t);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn--solid {
  color: #fff; background: var(--grad-cta);
  box-shadow: 0 14px 32px -14px color-mix(in srgb, var(--accent) 95%, transparent);
}
.btn--ghost { color: var(--txt-2); border-color: var(--line-2); background: var(--surface); }
.btn--ghost:hover { color: var(--txt); border-color: var(--txt-3); }
.btn--glass {
  color: #fff; border-color: rgba(255, 255, 255, .25); background: rgba(10, 12, 20, .55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.btn--lg { width: 100%; padding: 16px 22px; font-size: 16px; border-radius: var(--r-lg); }
.btn--sm { padding: 9px 14px; font-size: 13px; }
.btn__arrow { transition: transform var(--t); }
.btn--lg:hover .btn__arrow { transform: translateX(4px); }

.sticky-bar {
  position: sticky; bottom: 0; z-index: 30;
  margin: 18px calc(var(--sp) * -1) 0;
  padding: 14px var(--sp) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 55%, transparent);
}

/* ---------- 13. Result ---------- */
.result-head { text-align: center; margin-bottom: 22px; }
.result-head .view__sub { max-width: 40ch; margin-inline: auto; }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 14px; padding: 6px 14px 6px 10px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 620;
}
.badge svg { width: 14px; height: 14px; }
.badge--ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent);
}

.qr-card {
  position: relative; overflow: hidden;
  padding: 22px 22px 0; margin-bottom: 20px;
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: var(--shadow);
  animation: pop .5s var(--ease-out) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } }
/* Koda se prikaže kot <img>, ne kot <canvas>: le tako jo je na iOS mogoče
   pridržati in shraniti med fotografije, na namizju pa z desnim klikom.
   Platno ostane samo zaledje za izris in se nikoli ne prikaže — pravilo
   mora biti ločeno, sicer prevlada nad atributom hidden in kodi se
   podvojita. */
.qr-card canvas { display: none; }

.qr-card img {
  display: block;
  width: 100%; height: auto; max-width: 340px; margin: 0 auto;
  image-rendering: pixelated;
  -webkit-touch-callout: default;
}

.longpress {
  margin: -8px 0 18px; padding: 0 6px;
  font-size: 12.5px; line-height: 1.45; color: var(--txt-3); text-align: center;
}
.longpress[hidden] { display: none; }

.xborder {
  display: grid; grid-template-columns: auto 1fr; gap: 13px; align-items: center;
  margin-bottom: 20px; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--warn) 42%, transparent);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--warn) 9%, var(--surface));
  font-size: 13px; line-height: 1.45; color: var(--txt-2);
}
.xborder[hidden] { display: none; }
.xborder b { display: block; color: var(--txt); font-weight: 620; margin-bottom: 1px; }
.xborder__flag {
  font-family: var(--f-mono); font-size: 13px; font-weight: 700; letter-spacing: .04em;
  padding: 7px 10px; border-radius: 9px;
  color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}
.qr-card__foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding: 12px 2px; border-top: 1px dashed rgba(16, 24, 48, .16);
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: #8892a8;
}
.qr-card__sheen {
  position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: skewX(-18deg); pointer-events: none;
  animation: sheen 1.5s .35s var(--ease-out) 1;
}
@keyframes sheen { to { left: 130%; } }

.summary { margin: 0 0 22px; padding: 4px 0; display: grid; gap: 0; }
.summary div {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: baseline;
  padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.summary dt { font-size: 12.5px; color: var(--txt-3); }
.summary dd {
  margin: 0; font-size: 14px; font-weight: 560; text-align: right;
  word-break: break-word; max-width: 62%;
}
.summary dd.is-mono { font-family: var(--f-mono); font-size: 13px; letter-spacing: .01em; }
.summary dd.is-big {
  font-size: 19px; font-weight: 680; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 26px; }
.result-actions .btn--solid { grid-column: 1 / -1; }

.raw { margin-bottom: 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.raw summary {
  padding: 14px 16px; font-size: 13.5px; font-weight: 560; color: var(--txt-2);
  cursor: pointer; list-style: none;
}
.raw summary::-webkit-details-marker { display: none; }
.raw summary::after { content: "＋"; float: right; color: var(--txt-3); }
.raw[open] summary::after { content: "－"; }
.raw__body { padding: 0 16px 16px; display: grid; gap: 14px; }
.raw__block h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--txt-3); margin-bottom: 7px; }
.raw pre {
  margin: 0; padding: 12px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
  font-family: var(--f-mono); font-size: 11.5px; line-height: 1.6; color: var(--txt-2);
  white-space: pre-wrap; word-break: break-all;
}
.raw .btn { justify-self: start; }

.disclaimer { font-size: 12px; line-height: 1.5; color: var(--txt-3); text-align: center; max-width: 44ch; margin-inline: auto; }

.footer { padding: 20px var(--sp) calc(26px + env(safe-area-inset-bottom)); text-align: center; }
.footer p { font-size: 11.5px; color: var(--txt-3); letter-spacing: .02em; }

/* ---------- 14. Scanner ---------- */
.scanner { position: fixed; inset: 0; z-index: 100; background: #000; animation: fade .25s var(--ease) both; }
.scanner[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.scanner video { width: 100%; height: 100%; object-fit: cover; }

.scanner__mask {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
}
/* Okvir je širok: HUB 3A nosi PDF417, ki je precej širši od QR kode. */
.scanner__hole {
  position: relative;
  width: min(92vw, 460px); aspect-ratio: 4 / 3;
  border-radius: 28px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .58);
  overflow: hidden;
}
.c { position: absolute; width: 34px; height: 34px; border: 3.5px solid #fff; border-radius: 4px; }
.c--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 16px; }
.c--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 16px; }
.c--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 16px; }
.c--br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 16px; }
.laser {
  position: absolute; left: 6%; right: 6%; height: 2px; top: 0;
  background: linear-gradient(90deg, transparent, #7f9cff, #c084fc, transparent);
  box-shadow: 0 0 14px 2px rgba(127, 156, 255, .8);
  animation: sweep 2.6s var(--ease) infinite;
}
@keyframes sweep { 0%, 100% { top: 4%; } 50% { top: 95%; } }
.scanner.is-hit .scanner__hole { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .58), inset 0 0 0 4px var(--ok); }
.scanner.is-hit .laser { opacity: 0; }

.scanner__top {
  position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 14px; right: 14px;
  display: flex; justify-content: space-between;
}
.scanner__hint {
  position: absolute; left: 0; right: 0; top: calc(50% + min(37vw, 160px) + 26px);
  text-align: center; color: rgba(255, 255, 255, .9); font-size: 14px; font-weight: 540;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8); padding: 0 24px;
}
.scanner__bottom {
  position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 26px);
  display: flex; justify-content: center;
}

/* ---------- 15. Toast ---------- */
.toast {
  position: fixed; z-index: 300;
  left: 50%; bottom: calc(env(safe-area-inset-bottom) + 22px);
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 20px; border-radius: var(--r-pill);
  background: rgba(14, 17, 28, .94); color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  font-size: 13.5px; font-weight: 540; text-align: center;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7);
  animation: toastIn .34s var(--ease-out) both;
}
.toast[hidden] { display: none; }
.toast.is-err { background: rgba(60, 12, 26, .95); border-color: rgba(251, 113, 133, .45); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px) scale(.94); } }

/* ---------- 15b. Prekrivalo med branjem ---------- */
.busy {
  position: fixed; inset: 0; z-index: 250;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: fade .2s var(--ease) both;
}
.busy[hidden] { display: none; }
.busy__box {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 30px 34px; max-width: 78vw; text-align: center;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface-2); box-shadow: var(--shadow);
}
.busy__box p { font-size: 15px; font-weight: 600; }
.busy__box small { font-size: 12px; color: var(--txt-3); line-height: 1.4; }
.busy__ring {
  width: 30px; height: 30px; margin-bottom: 6px; border-radius: 50%;
  border: 2.5px solid var(--line-2); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.busy__track {
  width: 172px; height: 3px; margin-top: 8px; border-radius: 2px;
  background: var(--line); overflow: hidden;
}
.busy__track i {
  display: block; height: 100%; width: 0;
  background: var(--grad-cta); transition: width .2s linear;
}

/* ---------- 16. Print slip ---------- */
.slip { display: none; }

@media print {
  .aurora, .topbar, .stepper, main, .footer, .scanner, .toast, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .slip { display: block; padding: 12mm; font-family: var(--f-sans); }
  .slip__head {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-bottom: 4mm; margin-bottom: 6mm; border-bottom: 1.5pt solid #000;
    font-size: 12pt; letter-spacing: .1em; text-transform: uppercase;
  }
  .slip__body { display: flex; gap: 10mm; align-items: flex-start; }
  .slip__body img { width: 52mm; height: 52mm; flex: none; }
  .slip table { width: 100%; border-collapse: collapse; font-size: 10pt; }
  .slip td { padding: 2mm 0; border-bottom: .4pt solid #bbb; vertical-align: top; }
  .slip td:first-child { width: 34mm; color: #555; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .04em; }
  .slip td:last-child { font-weight: 600; }
  @page { margin: 0; size: A4 portrait; }
}

/* ---------- 17. Responsive / a11y ---------- */
@media (min-width: 560px) {
  .actions { gap: 12px; }
  .facts li { grid-template-columns: 78px 1fr; }
}

@media (hover: none) {
  .action:hover::before { opacity: 0; }
  .action:hover .action__chev { transform: none; }
}

/* Na dotičnih zaslonih povečamo drobne kontrole na priporočeno velikost. */
@media (pointer: coarse) {
  .seg__btn { padding: 9px 14px; }
  .icon-btn { width: 44px; height: 44px; padding: 11px; }
  .chip { padding: 9px 15px; }
  .back { padding: 10px 16px 10px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .blob { animation: none; }
}
