/* BITS HRISP - public kiosk screen (no Filament, no login)
   Brand colours mirror public/css/admin.css. */
:root {
    --bits-blue-50:  #EAF1FA;
    --bits-blue-100: #D3E2F4;
    --bits-blue-300: #7BA3D1;
    --bits-blue-500: #2A5BA6;
    --bits-blue-600: #17428C;
    --bits-blue-700: #123573;
    --bits-blue-800: #0F2A5C;
    --bits-blue-900: #0B1F45;
    --bits-navy:    #17428C;
    --bits-navy-deep: #0F2A5C;
    --bits-success: #10B981;
    --bits-warning: #F59E0B;
    --bits-danger:  #EF4444;
    --bits-bg:      #F5F8FD;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

.bits-kiosk-body {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    color: var(--bits-blue-900);
    background:
        radial-gradient(1200px 800px at 10% 0%, #EAF1FA 0%, transparent 60%),
        radial-gradient(1000px 700px at 100% 100%, #D3E2F4 0%, transparent 60%),
        var(--bits-bg);
    min-height: 100vh;
}

.bits-kiosk {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px clamp(16px, 4vw, 48px) 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.bits-kiosk-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}
.bits-kiosk-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.bits-kiosk-mark { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.bits-kiosk-title { font-size: 20px; font-weight: 700; color: var(--bits-navy-deep); letter-spacing: -0.01em; }
.bits-kiosk-subtitle { font-size: 13px; color: #4B5C7A; }

.bits-kiosk-clock { text-align: right; }
.bits-kiosk-clock-time {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    color: var(--bits-navy-deep);
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.bits-kiosk-clock-date { font-size: 16px; color: #4B5C7A; margin-top: 6px; }

.bits-kiosk-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: stretch;
}
@media (max-width: 880px) {
    .bits-kiosk-main { grid-template-columns: 1fr; }
}

.bits-kiosk-action {
    background: #fff;
    border-radius: 24px;
    padding: clamp(24px, 4vw, 48px);
    box-shadow: 0 20px 60px -30px rgba(15,42,92,0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    border: 1px solid #E2EAF7;
}
.bits-kiosk-prompt { font-size: clamp(18px, 2vw, 22px); color: #2B3A5C; text-align: center; max-width: 28ch; line-height: 1.45; }
.bits-kiosk-btn {
    background: linear-gradient(135deg, var(--bits-blue-600), var(--bits-blue-800));
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 28px 48px;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 18px 40px -18px rgba(15,42,92,0.6);
    transition: transform .12s ease, box-shadow .12s ease;
    min-width: 280px;
    justify-content: center;
}
.bits-kiosk-btn:hover { transform: translateY(-2px); box-shadow: 0 22px 48px -18px rgba(15,42,92,0.7); }
.bits-kiosk-btn:active { transform: translateY(0); }
.bits-kiosk-btn-icon { font-size: 32px; }
.bits-kiosk-hint { font-size: 14px; color: #6B7896; }

.bits-kiosk-qrwrap {
    background: #fff;
    border-radius: 24px;
    padding: clamp(24px, 4vw, 40px);
    box-shadow: 0 20px 60px -30px rgba(15,42,92,0.35);
    border: 1px solid #E2EAF7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.bits-kiosk-qr {
    width: 260px; height: 260px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border-radius: 16px; padding: 8px;
    border: 1px solid #E2EAF7;
}
.bits-kiosk-qr img, .bits-kiosk-qr canvas { width: 240px !important; height: 240px !important; }
.bits-kiosk-countdown {
    font-size: 14px; font-weight: 600; color: var(--bits-navy);
    background: var(--bits-blue-50); padding: 6px 14px; border-radius: 999px;
    font-variant-numeric: tabular-nums;
}
.bits-kiosk-fallback {
    font-size: 12px; color: #6B7896; text-align: center; line-height: 1.5;
    word-break: break-all; max-width: 32ch;
}
.bits-kiosk-fallback code { background: #F1F5FB; padding: 2px 6px; border-radius: 6px; font-size: 11px; }

.bits-kiosk-foot {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: #6B7896; padding-top: 12px;
    border-top: 1px solid #E2EAF7; flex-wrap: wrap; gap: 8px;
}

/* Scan page (mobile-first) */
.bits-scan {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 16px 32px;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.bits-scan-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 60px -30px rgba(15,42,92,0.35);
    border: 1px solid #E2EAF7;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.bits-scan-card-narrow { max-width: 480px; margin: 0 auto; }
.bits-scan-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bits-blue-600); }
.bits-scan-title { font-size: 24px; font-weight: 800; color: var(--bits-navy-deep); margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
.bits-scan-text { font-size: 15px; color: #2B3A5C; line-height: 1.5; margin: 0; }
.bits-scan-bullets { margin: 0; padding-left: 20px; color: #2B3A5C; font-size: 14px; line-height: 1.6; }

.bits-scan-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #4B5C7A; font-weight: 600; }
.bits-scan-input {
    border: 1.5px solid #D3E2F4; border-radius: 12px; padding: 14px 16px;
    font-size: 18px; color: var(--bits-blue-900); background: #fff;
    width: 100%; font-family: inherit; outline: none;
}
.bits-scan-input:focus { border-color: var(--bits-blue-600); box-shadow: 0 0 0 3px rgba(23,66,140,0.15); }
.bits-scan-err { color: var(--bits-danger); font-size: 13px; font-weight: 500; }

.bits-scan-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.bits-scan-btn-primary {
    background: linear-gradient(135deg, var(--bits-blue-600), var(--bits-blue-800));
    color: #fff; border: none; border-radius: 12px; padding: 14px 20px;
    font-size: 16px; font-weight: 700; cursor: pointer; flex: 1; min-width: 160px;
    box-shadow: 0 14px 30px -16px rgba(15,42,92,0.55);
}
.bits-scan-btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.bits-scan-btn-ghost {
    background: #fff; color: var(--bits-blue-700); border: 1.5px solid #D3E2F4;
    border-radius: 12px; padding: 14px 20px; font-size: 16px; font-weight: 700; cursor: pointer;
    flex: 1; min-width: 140px;
}
.bits-scan-btn-ghost:disabled { opacity: .55; cursor: not-allowed; }

.bits-scan-error { text-align: center; padding: 16px 8px; }
.bits-scan-error-icon {
    width: 56px; height: 56px; border-radius: 50%; background: #FEE2E2; color: var(--bits-danger);
    font-size: 28px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
}
.bits-scan-error-title { font-size: 20px; font-weight: 700; color: var(--bits-navy-deep); margin: 0 0 8px; }
.bits-scan-error-text { color: #4B5C7A; }

.bits-scan-camera-stub {
    position: relative; aspect-ratio: 1/1; background: #0B1F45; border-radius: 18px;
    display: flex; align-items: center; justify-content: center; color: #B7C7E0;
    font-size: 13px; text-align: center; padding: 16px;
    overflow: hidden;
}
.bits-scan-facecircle {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 60%; aspect-ratio: 1/1; border: 2px dashed rgba(255,255,255,0.6);
    border-radius: 50%;
}
.bits-scan-camera { position: relative; width: 100%; aspect-ratio: 1/1; background: #0B1F45; border-radius: 18px; overflow: hidden; }
.bits-scan-video, .bits-scan-canvas { width: 100%; height: 100%; object-fit: cover; }
.bits-scan-meta { position: absolute; bottom: 10px; left: 14px; right: 14px; color: #B7C7E0; font-size: 12px; }
.bits-scan-success { align-items: center; text-align: center; }
.bits-scan-success-icon { width: 72px; height: 72px; border-radius: 50%; background: #D1FAE5; color: #047857; font-size: 36px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 8px auto 0; }
.bits-scan-warn { color: #92400E; background: #FEF3C7; padding: 6px 10px; border-radius: 8px; display: inline-block; font-size: 13px; }
