/* Kupon — basit, sakin, okunaklı. Bağımlılık yok. */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e5e9f2;
  --brand: #4f46e5;
  --brand-ink: #3730a3;
  --brand-soft: #eef0ff;
  --ok: #15803d;      --ok-soft: #e8f7ee;   --ok-line: #b7e4c7;
  --warn: #b45309;    --warn-soft: #fff4e0; --warn-line: #fbd89a;
  --bad: #b91c1c;     --bad-soft: #fdecec;  --bad-line: #f5b5b5;
  --info: #1d4ed8;    --info-soft: #e8f0ff; --info-line: #b9cffa;
  --violet: #6d28d9;  --violet-soft: #f1ebff; --violet-line: #d5c4fa;
  --mode: #7c3aed;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px -12px rgba(15,23,42,.12);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.right { text-align: right; } .nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 16px; } .stack-lg > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

/* ---------- Butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; transition: .15s; text-decoration: none; }
.btn:hover { background: #f8faff; border-color: #cfd7ea; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-danger { color: var(--bad); border-color: var(--bad-line); background: var(--bad-soft); }
.btn-danger:hover { background: #fbdcdc; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Form ---------- */
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d5dcec; border-radius: 10px; background: #fff; font: inherit; color: var(--ink); transition: .15s; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 84px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79,70,229,.14); }
.hint { font-size: 12.5px; color: var(--ink-3); }
.err { font-size: 13px; color: var(--bad); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- Kart, tablo, rozet ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbff; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.b-pasif { background: #f1f5f9; color: #475569; border-color: #dfe5ee; }
.b-aktif { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.b-kullanildi { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.b-suresi_doldu { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.b-iptal, .b-bilinmiyor { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.b-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.b-hata { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.b-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }

.alert { padding: 12px 16px; border-radius: 12px; border: 1px solid; font-weight: 600; }
.alert-ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.alert-bad { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.alert-info { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.alert code { font-family: var(--mono); font-weight: 500; word-break: break-all; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { padding: 18px; }
.stat .label { font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.stat .num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.stat .sub { font-size: 13px; color: var(--ink-2); }
.stat.accent-ok .num { color: var(--ok); } .stat.accent-warn .num { color: var(--warn); } .stat.accent-info .num { color: var(--info); } .stat.accent-bad .num { color: var(--bad); }
.pager { padding: 14px 20px; border-top: 1px solid var(--line); }
.pager nav > div:first-child { display: none; }
.pager svg { width: 18px; height: 18px; }
.pager nav a, .pager nav span[aria-current] > span { padding: 6px 10px; }
.pager nav .hidden { display: block; }
.pager p { color: var(--ink-3); font-size: 13px; margin-bottom: 8px; }

/* ---------- Yönetim düzeni ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side { background: #0f172a; color: #cbd5e1; padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #22d3ee); display: grid; place-items: center; }
.brand .logo svg { width: 20px; height: 20px; color: #fff; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #cbd5e1; font-weight: 600; text-decoration: none; position: relative; }
.nav a svg { width: 19px; height: 19px; opacity: .85; flex: none; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.on { background: rgba(99,102,241,.22); color: #fff; }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #818cf8; }
.nav .count { margin-left: auto; background: #f59e0b; color: #1f1300; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.nav .sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 6px; }
.side .me { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.side .me b { display: block; color: #fff; }
.side .me button { background: none; border: 0; color: #94a3b8; font: inherit; cursor: pointer; padding: 0; margin-top: 4px; }
.side .me button:hover { color: #fff; }
.main { padding: 32px clamp(18px, 3.5vw, 44px) 56px; max-width: 1200px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { color: var(--ink-2); margin-top: 4px; }
.topbar-m { display: none; }

/* ---------- Giriş / karşılama ---------- */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1000px 500px at 80% -10%, #dfe3ff 0, transparent 60%), radial-gradient(800px 400px at -10% 110%, #d4f5f2 0, transparent 60%), var(--bg); }
.auth { width: 100%; max-width: 400px; padding: 32px; }
.auth .brand { color: var(--ink); padding: 0 0 20px; }

/* ---------- Kasa ---------- */
.kasa { min-height: 100vh; display: flex; flex-direction: column; --mode: var(--brand); --mode-soft: var(--brand-soft); }
.kasa.m-ver { --mode: #2563eb; --mode-soft: var(--info-soft); }
.kasa.m-indirim { --mode: #16a34a; --mode-soft: var(--ok-soft); }
.kasa.m-durum { --mode: #7c3aed; --mode-soft: var(--violet-soft); }
.ktop { background: #0f172a; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ktabs { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.ktab { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 12px; color: #cbd5e1; font-weight: 700; font-size: 17px; text-decoration: none; background: rgba(255,255,255,.06); border: 2px solid transparent; }
.ktab:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.ktab i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ktab.t-ver i { background: #3b82f6; } .ktab.t-indirim i { background: #22c55e; } .ktab.t-durum i { background: #a78bfa; }
.ktab.on { background: #fff; color: var(--ink); }
.kdev { color: #94a3b8; font-size: 13px; font-weight: 600; }
.kbar { height: 6px; background: var(--mode); }
.kbody { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 24px 18px 48px; display: grid; gap: 18px; align-content: start; }
.scan { display: grid; gap: 8px; }
.scan label { font-weight: 800; font-size: 14px; color: var(--mode); text-transform: uppercase; letter-spacing: .08em; }
.scan input { height: 68px; font-size: 26px; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 0 20px; border-radius: 16px; border: 3px solid var(--mode); background: #fff; width: 100%; color: var(--ink); }
.scan input:focus { outline: none; box-shadow: 0 0 0 6px color-mix(in srgb, var(--mode) 18%, transparent); }
.scan input::placeholder { color: #b6bfd1; letter-spacing: .02em; font-family: var(--font); text-transform: none; font-size: 22px; }

.verdict { border-radius: 22px; border: 3px solid; padding: 28px 28px 26px; text-align: center; }
.verdict .big { font-size: clamp(32px, 6vw, 56px); font-weight: 900; letter-spacing: -.02em; line-height: 1.05; }
.verdict .sub { font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; margin-top: 10px; }
.verdict .note { font-size: 16px; font-weight: 600; margin-top: 10px; opacity: .85; }
.v-ok { background: var(--ok-soft); border-color: #4cb872; color: #0f5f2e; }
.v-bad { background: var(--bad-soft); border-color: #e57373; color: #8f1414; }
.v-warn { background: var(--warn-soft); border-color: #f2b04c; color: #8a4208; }
.v-idle { background: #fff; border-color: var(--line); color: var(--ink-3); border-style: dashed; }
.v-idle .big { font-size: clamp(24px, 4vw, 34px); font-weight: 800; }
.v-info { background: var(--info-soft); border-color: #7ea6f2; color: #173f9c; }
.v-violet { background: var(--violet-soft); border-color: #a98cf0; color: #4c1d95; }
.verdict .code { margin-top: 12px; font-family: var(--mono); font-size: 18px; opacity: .8; }
.pop { animation: pop .22s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: .4; } to { transform: none; opacity: 1; } }

.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.counter { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px; text-align: center; }
.counter b { display: block; font-size: 38px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.counter span { font-size: 13px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.counter.c-valid b { color: var(--ok); } .counter.c-invalid b { color: var(--bad); }

.last { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 16px; border: 2px solid; }
.last .ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 24px; font-weight: 900; color: #fff; }
.last .t { font-size: 20px; font-weight: 800; line-height: 1.2; }
.last .d { font-size: 15px; font-weight: 600; opacity: .85; }
.last.l-ok { background: var(--ok-soft); border-color: #7ccf9b; color: #0f5f2e; } .last.l-ok .ico { background: #16a34a; }
.last.l-bad { background: var(--bad-soft); border-color: #eaa0a0; color: #8f1414; } .last.l-bad .ico { background: #dc2626; }
.last.l-warn { background: var(--warn-soft); border-color: #f2c47c; color: #8a4208; } .last.l-warn .ico { background: #d97706; }

.list { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.list-head { padding: 12px 18px; font-size: 12.5px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.li.ok .dot { background: #16a34a; } .li.bad .dot { background: #dc2626; }
.li .c { font-family: var(--mono); font-weight: 600; font-size: 16px; }
.li .x { margin-left: auto; font-size: 14px; font-weight: 600; text-align: right; }
.li.ok .x { color: var(--ok); } .li.bad .x { color: var(--bad); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; text-align: left; margin-top: 22px; }
.fact { background: rgba(255,255,255,.7); border-radius: 14px; padding: 12px 16px; border: 1px solid rgba(0,0,0,.06); }
.fact span { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .65; }
.fact b { font-size: 20px; font-weight: 800; }
.fact.wide { grid-column: 1 / -1; }

.undo { display: inline-flex; align-items: center; gap: 8px; }
.undo .left { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 13px; font-weight: 600; }

.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: none; place-items: center; padding: 20px; z-index: 50; backdrop-filter: blur(3px); }
.modal-bg.open { display: grid; }
.modal { background: #fff; border-radius: 20px; padding: 24px; width: 100%; max-width: 460px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.modal h3 { font-size: 20px; margin-bottom: 6px; }

/* ---------- Yazdırma (58 mm) ---------- */
.ticket-sheet { max-width: 900px; margin: 0 auto; padding: 24px; }
.tickets { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.tickets img { width: 58mm; background: #fff; image-rendering: pixelated; border: 1px dashed #aab; }
.print-bar { position: sticky; top: 0; background: #0f172a; color: #fff; padding: 10px 20px; display: flex; gap: 14px; align-items: center; z-index: 5; flex-wrap: wrap; }
.print-bar .btn { height: 34px; }
@media print {
  @page { size: 58mm auto; margin: 0; }
  body { background: #fff; }
  .no-print { display: none !important; }
  .ticket-sheet { padding: 0; max-width: none; }
  .tickets { display: block; }
  .tickets img { border: 0; width: 58mm; display: block; page-break-after: always; break-after: page; }
}

/* ---------- Fiş şablon editörü ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 20px; align-items: start; }
.preview-col { position: sticky; top: 16px; }
.preview-paper { background: repeating-linear-gradient(45deg, #eef1f8, #eef1f8 8px, #e6eaf4 8px, #e6eaf4 16px); border-radius: 12px; padding: 18px 0; display: grid; justify-items: center; max-height: calc(100vh - 220px); overflow: auto; }
#preview canvas { display: block; background: #fff; box-shadow: 0 6px 20px -8px rgba(15,23,42,.45); }
.blk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.blk-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbff; border-radius: var(--radius) var(--radius) 0 0; }
.blk-head .btn { width: 32px; padding: 0; }
.blk-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; padding: 14px; }
.blk-body .field:first-child:has(textarea), .blk-body .field:has(textarea) { grid-column: 1 / -1; }
.check.sm { font-weight: 600; font-size: 14px; align-self: end; height: 42px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-family: var(--mono); font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--brand-soft); color: var(--brand-ink); cursor: pointer; }
.chip:hover { border-color: var(--brand); }

.printer { max-width: 900px; margin: 20px auto 0; padding: 0 24px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.pr-canvas { text-align: center; }
.pr-canvas canvas { width: 384px; max-width: 100%; border: 1px dashed #aab; background: #fff; }

/* ---------- Mobil ---------- */
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } .preview-col { position: static; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: .2s; height: 100vh; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(15,23,42,.5); }
  .topbar-m { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #0f172a; color: #fff; font-weight: 800; position: sticky; top: 0; z-index: 30; }
  .topbar-m button { background: rgba(255,255,255,.1); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 10px; font-size: 20px; cursor: pointer; }
  .main { padding-top: 22px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .counters { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .ktab { padding: 0 16px; font-size: 15px; height: 44px; }
}

/* Sıra sıra yazdırma paneli */
.seq { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 18px 20px; border: 2px solid var(--primary, #4f46e5); border-radius: 14px; background: rgba(79,70,229,.06); }
.seq-count { display: flex; flex-direction: column; align-items: center; min-width: 110px; }
.seq-count b { font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; }
.seq-info { flex: 1; min-width: 200px; }
.seq-code { font: 700 28px/1.2 ui-monospace, monospace; letter-spacing: .06em; margin: 4px 0; }

/* Onay penceresi */
.dlg { border: 0; border-radius: 18px; padding: 26px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(15,23,42,.35); }
.dlg::backdrop { background: rgba(15,23,42,.55); backdrop-filter: blur(2px); }
.dlg-ico { width: 46px; height: 46px; border-radius: 50%; background: #fee2e2; color: #dc2626; display: grid; place-items: center; font: 800 24px/1 sans-serif; margin-bottom: 12px; }
.dlg h2 { margin: 0 0 10px; }
.dlg ul { margin: 0 0 20px; padding-left: 20px; display: grid; gap: 6px; color: #475569; }

/* Cihaz eşleştirme */
.pair-card { text-align: center; display: grid; gap: 10px; border: 2px dashed #4f46e5; }
.pair-code { font: 800 64px/1.1 ui-monospace, monospace; letter-spacing: .12em; color: #4f46e5; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pad button { height: 78px; font: 700 32px/1 sans-serif; border-radius: 16px; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; }
.pad button:active { background: #eef2ff; }
.dots { display: flex; justify-content: center; gap: 12px; }
.dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #4f46e5; }
.dots i.on { background: #4f46e5; }

/* Hızlı işlem (PWA) */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #e8eaf6; padding: 5px; border-radius: 14px; }
.seg button { border: 0; background: transparent; padding: 14px 6px; border-radius: 10px; font: 700 15px/1.2 inherit; color: #475569; cursor: pointer; }
.seg button.on { background: #fff; color: #4f46e5; box-shadow: 0 2px 8px rgba(15,23,42,.12); }
.hint.warn { color: #b45309; font-weight: 600; }
.cam { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; max-width: 560px; }
.cam video { width: 100%; height: 100%; object-fit: cover; }
.cam-frame { position: absolute; inset: 26% 8%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
.flash { padding: 16px; border-radius: 14px; font: 800 20px/1.25 inherit; text-align: center; }
.flash.ok { background: #dcfce7; color: #166534; }
.flash.bad { background: #fee2e2; color: #991b1b; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kv span { display: block; font-size: 12px; color: #64748b; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } }

/* Telefon/PWA: 16px altındaki alanlara odaklanınca iOS/Android sayfayı yakınlaştırır; bunu önler */
@media (max-width: 900px), (pointer: coarse) {
  input, select, textarea, .input, select.input, textarea.input { font-size: 16px; }
}
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }

/* Hızlı modlarda okuma onayı */
.hit { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; color: #fff; }
.hit.ok { background: #16a34a; } .hit.bad { background: #dc2626; }
.hit-ico { font: 900 150px/1 sans-serif; } .hit-title { font: 900 38px/1.1 inherit; } .hit-sub { font: 700 22px/1.3 ui-monospace, monospace; opacity: .95; }
.hit-next { margin-top: 14px; padding: 12px 22px; border-radius: 999px; background: rgba(255,255,255,.22); font: 800 20px/1 inherit; }
.cam-status { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 10px; border-radius: 12px; background: rgba(15,23,42,.72); color: #fff; text-align: center; font-weight: 800; }
.cam-status.ok { background: #16a34a; } .cam-status.bad { background: #dc2626; }
.cam-tally { position: absolute; top: 10px; left: 10px; padding: 6px 12px; border-radius: 999px; background: #4f46e5; color: #fff; font-weight: 800; }

/* hidden özniteliği display kurallarına yenilmesin */
[hidden] { display: none !important; }
