/* AP GLS Bilety: strona biletu i skaner (barwy GLS26). */
:root { --navy: #163d52; --teal: #2a6f86; --cream: #f7f3ea; --sand: #e8c896; --muted: #4b6573; --ok: #1f8a4c; --warn: #c77d0a; --bad: #c0392b; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif; color: var(--navy); background: var(--cream); -webkit-text-size-adjust: 100%; }
.agb-btn { display: inline-block; background: var(--navy); color: var(--cream); border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.agb-btn-ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.agb-btn-light { background: rgba(255,255,255,.92); color: var(--navy); }
.agb-muted { color: var(--muted); }
.agb-small { font-size: 13px; }
.agb-center { text-align: center; }

/* Strona biletu */
.agb-wrap { max-width: 520px; margin: 0 auto; padding: 0 16px 32px; }
.agb-top { background: var(--navy); margin: 0 -16px 16px; padding: 18px 16px; text-align: center; }
.agb-logo { width: 190px; max-width: 70%; height: auto; }
.agb-card { background: #fff; border: 1px solid #e3e0d6; border-radius: 18px; padding: 20px; box-shadow: 0 6px 24px rgba(22,61,82,.07); margin-bottom: 16px; }
.agb-card h1 { font-size: 24px; line-height: 1.2; margin: 8px 0 12px; }
.agb-card h2 { font-size: 18px; margin: 0 0 10px; }
.agb-tag { display: inline-block; background: var(--cream); color: var(--teal); font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 8px; }
.agb-qr { text-align: center; margin: 8px 0 4px; }
.agb-qr img { width: 100%; max-width: 320px; height: auto; image-rendering: pixelated; }
.agb-code { text-align: center; font-size: 28px; font-weight: 700; letter-spacing: 3px; margin: 6px 0 14px; }
.agb-zone { border-left: 4px solid var(--teal); padding: 4px 0 4px 10px; margin: 0 0 10px; }
.agb-zone b, .agb-zone span { display: block; }
.agb-zone span { color: var(--muted); font-size: 14px; }
.agb-zone em { color: var(--ok); font-style: normal; font-size: 13px; }
.agb-zone-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #eee9dc; }
.agb-zone-row small { color: var(--muted); }
.agb-zone-act { white-space: nowrap; }
.agb-pill { display: inline-block; background: #e6f4ec; color: var(--ok); font-weight: 700; border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.agb-verdict { border-radius: 16px; padding: 18px; color: #fff; margin-bottom: 14px; text-align: center; }
.agb-verdict-msg { font-size: 24px; font-weight: 700; line-height: 1.2; }
.agb-verdict-code { margin-top: 6px; opacity: .92; }
.agb-foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
.agb-state-ok { background: var(--ok); }
.agb-state-already { background: var(--warn); }
.agb-state-wrong_zone, .agb-state-online, .agb-state-void, .agb-state-unknown { background: var(--bad); }
.agb-card.agb-state-unknown { background: #fff; border-color: var(--bad); }

/* Skaner */
body.agb-scan { background: #0e2a39; color: #fff; min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
.agb-scan-bar { position: sticky; top: 0; z-index: 3; background: var(--navy); padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
.agb-scan-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.agb-scan-title img { width: 26px; height: 26px; }
.agb-count { margin-left: auto; background: var(--sand); color: var(--navy); border-radius: 999px; padding: 3px 10px; font-size: 14px; }
.agb-zones { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.agb-zone-btn { flex: 1 1 0; min-width: 0; background: rgba(255,255,255,.08); color: #fff; border: 2px solid rgba(255,255,255,.2); border-radius: 12px; padding: 8px 10px; text-align: left; font: inherit; cursor: pointer; }
.agb-zone-btn b { display: block; font-size: 13px; line-height: 1.2; }
.agb-zone-btn small { display: block; font-size: 10.5px; line-height: 1.25; opacity: .8; margin-top: 2px; }
.agb-zone-btn.is-on { background: var(--sand); color: var(--navy); border-color: var(--sand); }
.agb-cam { position: relative; background: #000; aspect-ratio: 3 / 4; max-height: 62vh; width: 100%; overflow: hidden; }
.agb-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.agb-frame { position: absolute; inset: 18% 14%; border: 3px solid rgba(232,200,150,.9); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); pointer-events: none; }
.agb-camhint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; font-weight: 600; background: rgba(14,42,57,.85); }
.agb-camhint[hidden] { display: none; }
.agb-result { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.agb-result[hidden] { display: none; }
.agb-result-msg { font-size: 34px; font-weight: 700; line-height: 1.15; }
.agb-result-sub { margin-top: 10px; font-size: 17px; opacity: .95; }
.agb-result-zones { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.agb-result-zones span { background: rgba(255,255,255,.18); border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.agb-result-zones span.is-done { background: rgba(255,255,255,.35); font-weight: 700; }
.agb-result-btns { margin-top: 28px; display: flex; gap: 10px; }
.agb-scan-tools { padding: 14px 12px 24px; }
.agb-manual { display: flex; gap: 8px; }
.agb-manual input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 12px; border-radius: 10px; border: 0; text-transform: uppercase; }
.agb-check { display: flex; gap: 8px; align-items: center; margin: 12px 0; font-size: 14px; }
.agb-history { display: grid; gap: 6px; margin: 8px 0 14px; }
.agb-hist { border-radius: 8px; padding: 7px 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.agb-scan .agb-muted { color: rgba(255,255,255,.7); }

/* Potwierdzenie udziału z zaproszenia */
.agb-form { display: grid; gap: 14px; margin: 16px 0 8px; }
.agb-form label { display: grid; gap: 6px; font-weight: 600; }
.agb-form label small { font-weight: 400; color: var(--muted); font-size: 13px; margin-top: -4px; }
.agb-form input[type=text], .agb-form input[type=email] { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #cfc9ba; border-radius: 10px; background: #fff; color: inherit; width: 100%; box-sizing: border-box; }
.agb-form input[type=text]:focus, .agb-form input[type=email]:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.agb-btn-wide { width: 100%; padding: 14px 18px; font-size: 16px; }
.agb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.agb-err { background: #fdecea; color: #8a1c12; border-radius: 10px; padding: 10px 14px; margin: 10px 0; font-weight: 600; }

/* Ankieta uczestnika (1.6.0) */
.agb-sv [hidden] { display: none !important; }
.agb-sv-h { font-size: 17px; font-weight: 700; margin: 10px 0 2px; padding: 0; }
.agb-sv-set { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.agb-sv-set legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.agb-form label.agb-opt { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; background: #fff; border: 1px solid #cfc9ba; border-radius: 10px; padding: 11px 12px; cursor: pointer; }
.agb-opt input { margin: 3px 0 0; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--navy); }
.agb-opt span { display: grid; gap: 2px; }
.agb-opt small { color: var(--muted); font-size: 13px; }
.agb-opt:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #f3f6f8; }
.agb-q { padding-top: 6px; }
.agb-qn { display: inline-block; font-size: 12px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.agb-colors { display: grid; gap: 8px; }
.agb-form label.agb-color { display: block; font-weight: 400; cursor: pointer; }
.agb-color input { position: absolute; opacity: 0; pointer-events: none; }
.agb-color span { display: block; border: 2px solid #e3e0d6; border-left: 10px solid var(--c); border-radius: 10px; padding: 10px 12px; background: #fff; }
.agb-color small { display: block; color: var(--muted); font-size: 13px; }
.agb-color input:checked + span { border-color: var(--c); box-shadow: 0 0 0 2px var(--c); }
.agb-color input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.agb-chip { display: inline-block; color: #fff; border-radius: 99px; padding: 1px 10px; font-size: 13px; font-weight: 600; }
.agb-sv-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; }
.agb-sv-act { display: flex; gap: 8px; flex-wrap: wrap; }
.agb-sv-result { display: flex; gap: 12px; align-items: center; border: 2px solid; border-radius: 12px; padding: 12px 14px; margin: 6px 0 10px; }
.agb-sv-dot { width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; }
.agb-offer { margin-top: 14px; padding: 14px; border-radius: 12px; background: #fbf6ea; border: 1px solid var(--sand); display: grid; gap: 8px; }
.agb-offer p { margin: 0; }

/* Kolor DISC biletu dla obsługi wejścia (od 1.10.1). Biała karta: kolor DISC nie może mylić się z kolorem werdyktu. */
.agb-disc { display: flex; align-items: center; gap: 14px; background: #fff; color: var(--navy); border-radius: 16px; padding: 14px 20px; margin: 0 0 14px; text-align: left; box-shadow: 0 6px 24px rgba(22,61,82,.12); }
.agb-disc[hidden] { display: none; }
.agb-disc-dot { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #c9c4b8; box-shadow: inset 0 0 0 3px rgba(0,0,0,.08); }
.agb-disc small { display: block; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.agb-disc b { display: block; font-size: 24px; line-height: 1.2; }
.agb-disc.is-none b { font-size: 17px; color: var(--muted); }
.agb-result .agb-disc { margin: 18px 0 0; min-width: min(320px, 100%); }
