:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background: #10191b; color: #f2f5ef; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 50% 38%, #1a2c2d 0, #10191b 55%); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #d9f56d; outline-offset: 3px; }
[hidden] { display: none !important; }
.app-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar, .footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%; }
.topbar { min-height: 84px; padding: 20px clamp(24px, 5vw, 72px); border-bottom: 1px solid #ffffff13; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; background: #d9f56d; color: #15201a; font-size: 25px; font-weight: 900; letter-spacing: -5px; padding-right: 5px; }
.brand-mark span { font-size: 10px; margin-left: 1px; letter-spacing: 0; }
.brand-name { font-weight: 850; font-size: 17px; letter-spacing: .1em; white-space: nowrap; }
.brand-name span { color: #d9f56d; }
.topbar-right { display: flex; align-items: center; gap: 28px; color: #97aaa4; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
#clock { color: #f2f5ef; font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .025em; min-width: 60px; text-align: right; }
.kiosk { width: min(100% - 48px, 780px); margin: 0 auto; padding: clamp(32px, 5vh, 56px) 0 40px; }
.demo-banner { margin: 0 0 16px; padding: 10px 16px; border: 1px solid #e6c56d80; border-radius: 9px; background: #9d791d2b; color: #ffdea0; text-align: center; font-size: 13px; line-height: 1.4; }
.demo-banner strong { margin-right: 8px; letter-spacing: .08em; }
.intro { text-align: center; margin-bottom: 30px; }
.eyebrow { color: #d9f56d; font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d9f56d; margin-right: 7px; box-shadow: 0 0 13px #d9f56d90; }
h1 { font-size: clamp(29px, 4.6vw, 48px); letter-spacing: -.055em; line-height: 1.12; margin: 15px 0 10px; font-weight: 760; }
h1 em { color: #d9f56d; font-style: normal; }
.intro p { color: #a4b4ae; font-size: clamp(14px, 1.7vw, 17px); margin: 0; }
.scanner { border: 1px solid #ffffff22; border-radius: 20px; background: #1a2425; overflow: hidden; box-shadow: 0 24px 70px #00000040; }
.scanner-header, .scanner-footer { height: 54px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scanner-title { font-size: 11px; font-weight: 800; letter-spacing: .15em; display: flex; align-items: center; gap: 10px; }
.camera-indicator { width: 7px; height: 7px; border-radius: 50%; background: #d9f56d; box-shadow: 0 0 12px #d9f56d88; }
.camera-label { font-size: 12px; color: #9dada7; }
.camera-stage { position: relative; isolation: isolate; width: 100%; height: clamp(240px, 38vh, 400px); height: clamp(240px, 38dvh, 400px); background: radial-gradient(circle at center, #293a38, #101b1d 72%); overflow: hidden; }
.camera-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, #10191b44, transparent 23%, transparent 77%, #10191b44); z-index: 1; }
#camera { display: block; width: 100%; height: 100%; object-fit: cover; }
.camera-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; color: #a7bab0; font-size: 12px; }
.placeholder-icon { width: 86px; height: 86px; padding: 15px; border-radius: 20px; color: #d9f56d; background: #d9f56d12; border: 1px solid #d9f56d30; }
.placeholder-icon svg { width: 100%; height: 100%; }
.scan-target { position: absolute; top: 50%; left: 50%; height: min(72%, 228px); aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 2; pointer-events: none; }
.corner { position: absolute; width: 31px; height: 31px; border-color: #dcfa78; border-style: solid; filter: drop-shadow(0 0 7px #d9f56d66); }
.top-left { top: 0; left: 0; border-width: 4px 0 0 4px; border-radius: 8px 0 0 0; }
.top-right { top: 0; right: 0; border-width: 4px 4px 0 0; border-radius: 0 8px 0 0; }
.bottom-left { bottom: 0; left: 0; border-width: 0 0 4px 4px; border-radius: 0 0 0 8px; }
.bottom-right { bottom: 0; right: 0; border-width: 0 4px 4px 0; border-radius: 0 0 8px 0; }
.scan-line { position: absolute; top: 50%; left: 9%; width: 82%; height: 1px; background: linear-gradient(90deg, transparent, #d9f56d, transparent); box-shadow: 0 0 14px 2px #d9f56d55; animation: scan 3s ease-in-out infinite alternate; }
@keyframes scan { from { top: 23%; } to { top: 77%; } }
.camera-hint { position: absolute; z-index: 2; left: 0; right: 0; bottom: 19px; text-align: center; font-size: 12px; font-weight: 600; color: #e2eae3; text-shadow: 0 1px 9px #000; }
.camera-stage:not([data-camera-state="active"]) .camera-hint { display: none; }
.camera-stage[data-camera-state="unavailable"] .scan-target, .camera-stage[data-camera-state="unavailable"] .camera-hint { display: none; }
.scanner-footer { justify-content: center; color: #b1bdb7; font-size: 12px; font-weight: 600; flex-wrap: wrap; min-height: 54px; height: auto; padding-block: 10px; }
.step span { color: #d9f56d; margin-right: 6px; font-weight: 800; }
.step-divider { width: 28px; height: 1px; background: #596761; }
.camera-button { border: 1px solid #d9f56d70; background: #d9f56d14; color: #e4fba4; border-radius: 7px; padding: 7px 12px; font-size: 12px; font-weight: 700; }
.camera-button:hover { background: #d9f56d2b; }
.status-card { display: flex; align-items: center; gap: 18px; min-height: 88px; margin-top: 16px; padding: 17px 23px; background: #1a2828; border: 1px solid #c7ee7452; border-radius: 14px; transition: background .2s, border-color .2s; }
.status-icon { flex: none; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 12px; background: #d9f56d24; color: #d9f56d; font-size: 23px; font-weight: 800; }
.status-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.status-title { font-size: 16px; font-weight: 750; }
.status-message { font-size: 13px; color: #bacbc2; line-height: 1.4; }
.status-decoration { margin-left: auto; color: #d9f56d1c; font-size: 38px; font-weight: 900; letter-spacing: -.09em; }
.status-card[data-state="checking"] { border-color: #79bbf3; background: #1a2b35; }
.status-card[data-state="checking"] .status-icon { color: #9fd2ff; background: #8bc8ff1b; }
.status-card[data-state="approved"] { border-color: #a9ed8b; background: #1c362b; }
.status-card[data-state="denied"], .status-card[data-state="invalid"], .status-card[data-state="unavailable"] { border-color: #f3a998; background: #382827; }
.status-card[data-state="denied"] .status-icon, .status-card[data-state="invalid"] .status-icon, .status-card[data-state="unavailable"] .status-icon { color: #ffae9f; background: #ffae9f1c; }
.backup { margin-top: 18px; border: 1px solid #ffffff1d; border-radius: 11px; background: #ffffff08; color: #a4b3ac; }
.backup summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 17px 20px; cursor: pointer; font-size: 13px; list-style: none; }
.backup summary::-webkit-details-marker { display: none; }
.backup summary span { color: #d9f56d; font-size: 12px; font-weight: 700; }
.backup[open] summary { border-bottom: 1px solid #ffffff1d; }
#scanner-form { padding: 19px 20px 20px; }
#scanner-form label { display: block; margin-bottom: 10px; font-size: 12px; }
.input-row { display: flex; gap: 9px; }
#qr-token { min-width: 0; flex: 1; padding: 12px 13px; background: #10191b; border: 1px solid #52635b; border-radius: 7px; color: #fff; }
.input-row button { padding: 11px 17px; border: 0; border-radius: 7px; background: #d9f56d; color: #142019; font-weight: 800; }
.input-row button:hover { background: #e6ff91; }
.footer { margin-top: auto; padding: 22px clamp(24px, 5vw, 72px); color: #7d8f86; font-size: 11px; letter-spacing: .04em; }
.footer-dot { color: #d9f56d; margin: 0 5px; }
.feedback-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; background: #07130ded; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.feedback-panel { --feedback-color: #cffa80; width: min(100%, 620px); display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(26px, 6vh, 62px) clamp(22px, 5vw, 56px); border: 2px solid var(--feedback-color); border-radius: 25px; background: #183526; box-shadow: 0 24px 90px #0009, 0 0 70px #9be77d33; }
.feedback-overlay[data-state="denied"] .feedback-panel, .feedback-overlay[data-state="invalid"] .feedback-panel, .feedback-overlay[data-state="unavailable"] .feedback-panel { --feedback-color: #ffb3a5; background: #392421; box-shadow: 0 24px 90px #0009, 0 0 70px #e77d7d33; }
.feedback-eyebrow { color: var(--feedback-color); font-size: clamp(11px, 1.5vw, 14px); font-weight: 850; letter-spacing: .14em; }
.feedback-icon { display: grid; place-items: center; width: clamp(84px, 17vh, 130px); height: clamp(84px, 17vh, 130px); margin: 22px 0 16px; border: 3px solid var(--feedback-color); border-radius: 50%; color: var(--feedback-color); font-size: clamp(55px, 10vh, 82px); font-weight: 750; line-height: 1; }
.feedback-title { font-size: clamp(30px, 5.5vw, 52px); line-height: 1.08; color: #fff; }
.feedback-message { margin: 14px 0 0; font-size: clamp(16px, 2.5vw, 21px); line-height: 1.45; color: #e2eee0; }
.feedback-next { margin-top: 32px; color: #bed0bf; font-size: 13px; }
@media (max-width: 600px) {
    .topbar { min-height: 68px; }
    .topbar-label { display: none; }
    .kiosk { width: min(100% - 28px, 780px); padding-top: 29px; }
    .intro { margin-bottom: 24px; }
    .camera-stage { height: clamp(215px, 36vh, 390px); height: clamp(215px, 36dvh, 390px); }
    .backup summary { flex-direction: column; align-items: flex-start; }
    .footer { flex-direction: column; gap: 7px; text-align: center; }
}
@media (max-height: 800px) {
    .topbar { min-height: 58px; padding-block: 10px; }
    .kiosk { padding-top: 14px; padding-bottom: 12px; }
    .demo-banner { margin-bottom: 8px; padding: 6px 12px; font-size: 11px; }
    .intro { margin-bottom: 12px; }
    h1 { font-size: clamp(25px, 3.4vw, 36px); margin: 5px 0 3px; line-height: 1.08; }
    .intro p { font-size: 14px; }
    .scanner-header { height: 40px; }
    .scanner-footer { min-height: 40px; padding-block: 5px; }
    .camera-stage { height: clamp(145px, calc(100vh - 370px), 270px); height: clamp(145px, calc(100dvh - 370px), 270px); }
    .demo-mode .camera-stage { height: clamp(145px, calc(100vh - 425px), 230px); height: clamp(145px, calc(100dvh - 425px), 230px); }
    .camera-hint { bottom: 10px; }
    .placeholder-icon { width: 62px; height: 62px; padding: 10px; }
    .camera-placeholder { gap: 7px; text-align: center; padding-inline: 12px; }
    .status-card { min-height: 68px; margin-top: 10px; padding: 9px 16px; gap: 12px; }
    .status-icon { width: 38px; height: 38px; }
    .backup { margin-top: 10px; }
    .backup summary { padding: 12px 16px; }
    .footer { padding-block: 10px; }
}
@media (max-height: 800px) and (max-width: 600px) {
    .topbar { min-height: 58px; }
    .kiosk { padding-top: 14px; }
    .camera-stage { height: clamp(175px, calc(100vh - 425px), 250px); height: clamp(175px, calc(100dvh - 425px), 250px); }
    .demo-mode .camera-stage { height: clamp(150px, calc(100vh - 480px), 220px); height: clamp(150px, calc(100dvh - 480px), 220px); }
    .camera-hint { font-size: 11px; }
    .status-decoration { display: none; }
}
@media (max-height: 520px) {
    /* Na ekstremno niskim prozorima rezultat ostaje ispred kamere, umesto ispod pregiba. */
    .kiosk { display: flex; flex-direction: column; }
    .intro { order: 0; }
    .status-card { order: 1; margin: 0 0 10px; }
    .scanner { order: 2; }
    .backup { order: 3; }
    .topbar-label, .footer { display: none; }
}
@media (max-height: 520px) {
    .feedback-panel { padding-block: 14px; }
    .feedback-icon { width: 62px; height: 62px; margin: 10px 0; font-size: 42px; }
    .feedback-message { margin-top: 7px; }
    .feedback-next { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .scan-line { animation: none; } }
/* Landscape kiosk: kamera zauzima lijevu stranu, a informacije ostaju vidljive desno. */
@media (orientation: landscape) and (min-width: 600px) and (max-height: 600px) {
    .topbar { min-height: 42px; padding: 5px 16px; }
    .topbar-right { gap: 12px; }
    .footer { display: none; }
    .kiosk {
        width: calc(100% - 24px);
        max-width: 1400px;
        min-height: calc(100vh - 42px);
        min-height: calc(100dvh - 42px);
        margin: 0 auto;
        padding: 8px 0;
        display: grid;
        grid-template-columns: minmax(0, 3fr) minmax(220px, 2fr);
        grid-template-areas:
            "scanner banner"
            "scanner intro"
            "scanner status"
            "scanner backup";
        align-content: center;
        align-items: center;
        gap: 8px 14px;
    }
    .demo-banner { grid-area: banner; margin: 0; padding: 5px 8px; }
    .intro { grid-area: intro; margin: 0; text-align: left; }
    .intro .eyebrow { font-size: 10px; }
    h1 { font-size: clamp(20px, 2.8vw, 32px); margin: 3px 0; }
    .intro p { font-size: 12px; line-height: 1.3; }
    .scanner { grid-area: scanner; min-width: 0; }
    .scanner-header { height: 34px; padding-inline: 12px; }
    .scanner-footer { min-height: 34px; padding: 4px 8px; font-size: 11px; gap: 6px; }
    .step-divider { width: 12px; }
    .camera-stage, .demo-mode .camera-stage {
        height: clamp(120px, calc(100vh - 148px), 500px);
        height: clamp(120px, calc(100dvh - 148px), 500px);
    }
    .status-card { grid-area: status; margin: 0; min-height: 60px; padding: 8px 10px; gap: 8px; }
    .status-title { font-size: 14px; }
    .status-message { font-size: 11px; }
    .status-decoration { display: none; }
    .backup { grid-area: backup; margin: 0; }
    .backup summary { padding: 9px 10px; font-size: 11px; }
    .backup summary span { font-size: 11px; }
    #scanner-form { padding: 10px; }
}
