/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1f2328;
    min-height: 100vh;
    line-height: 1.6;
}

/* ============================================================
   LAYOUT CONTAINER
   ============================================================ */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============================================================
   CARD  (gast pagina's)
   ============================================================ */
.card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    padding: 2rem 1.5rem;
    width: 100%;
}

.card h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #3b1f6b;
    margin-bottom: 0.75rem;
}

.card p {
    color: #4b5563;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Card varianten */
.card-success {
    border-top: 6px solid #7c3aed;
}

.card-error {
    border-top: 6px solid #ef4444;
}

.card-warning {
    border-top: 6px solid #f59e0b;
}

/* ============================================================
   VRAAG & OPTIES  (index.html)
   ============================================================ */
.question-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2328;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Verberg het echte radio-button */
.option-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-label {
    display: block;
    cursor: pointer;
}

.option-text {
    display: block;
    padding: 0.9rem 1.1rem;
    background: #f3f0ff;
    border: 2px solid #e0d7ff;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #3b1f6b;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.option-label:hover .option-text {
    background: #ede9ff;
    border-color: #7c3aed;
    transform: translateY(-1px);
}

.option-label input[type="radio"]:checked + .option-text {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #ffffff;
}

/* ============================================================
   KNOPPEN  (gast)
   ============================================================ */
.btn {
    display: inline-block;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    text-align: center;
    min-height: 48px;
    transition: transform 0.1s, opacity 0.15s;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #ffffff;
    width: 100%;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #f3f0ff;
    color: #3b1f6b;
    border: 2px solid #c4b5fd;
    width: 100%;
}

.btn-secondary:hover {
    background: #ede9ff;
}

/* ============================================================
   QR CONTAINER  (success.html)
   ============================================================ */
.qr-wrapper {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.25rem 0;
    text-align: center;
    border: 2px dashed #c4b5fd;
}

.qr-code {
    max-width: 220px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.token-fallback {
    font-size: 0.85rem;
    color: #6b7280;
    word-break: break-all;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.token-fallback code {
    font-family: monospace;
    font-size: 0.9em;
    color: #7c3aed;
}

.muted {
    color: #9ca3af;
    font-size: 0.85rem;
}

.info-card {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: left;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.info-card-icon {
    font-size: 1.1rem;
}

.info-card-text {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
    white-space: pre-line;
}

/* ============================================================
   COUNTDOWN  (cooldown.html)
   ============================================================ */
.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 2rem;
    font-weight: 800;
    margin: 1.25rem 0;
    color: #ef4444;
}

.countdown-number {
    background: #fef2f2;
    border-radius: 10px;
    padding: 0.25rem 0.6rem;
    min-width: 2.4ch;
    text-align: center;
}

/* ============================================================
   BARMAN THEME  (.barman-theme)
   ============================================================ */
body:has(.barman-theme) {
    background: #0f0f23;
}

.barman-theme {
    background: #1a1a2e;
    color: #e2e8f0;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.barman-theme h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #00d4aa;
    margin-bottom: 0.75rem;
}

.barman-theme h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #a5b4fc;
    margin: 1.25rem 0 0.5rem;
}

.barman-theme p {
    color: #94a3b8;
    margin-bottom: 1rem;
}

.barman-theme label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 0.35rem;
}

.barman-theme a {
    color: #00d4aa;
    text-decoration: none;
    font-weight: 600;
}

.barman-theme a:hover {
    text-decoration: underline;
}

/* PIN input */
.pin-input,
.barman-theme input[type="password"],
.barman-theme input[type="text"] {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 2px solid #2d2d4e;
    background: #16213e;
    color: #e2e8f0;
    font-family: 'Nunito', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.15s;
}

.barman-theme input:focus {
    border-color: #00d4aa;
}

.barman-theme form {
    display: grid;
    gap: 0.75rem;
}

/* Barman login/submit button */
.barman-theme button[type="submit"] {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: none;
    background: #00d4aa;
    color: #0f0f23;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    min-height: 48px;
    transition: opacity 0.15s, transform 0.1s;
}

.barman-theme button[type="submit"]:hover {
    opacity: 0.9;
}

.barman-theme button[type="submit"]:active {
    transform: scale(0.97);
}

/* Camera video */
.barman-theme video {
    width: 100%;
    border-radius: 10px;
    margin: 0.75rem 0;
    background: #0f0f23;
    border: 2px solid #2d2d4e;
}

/* Dranken */
.drink-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.drink-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 2px solid #2d2d4e;
    background: #16213e;
    color: #e2e8f0;
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 56px;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.drink-button:hover {
    background: #1e3a5f;
    border-color: #00d4aa;
}

.drink-button:active {
    transform: scale(0.97);
}

/* Status resultaat */
.result {
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.result h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.result p {
    margin-bottom: 0.25rem;
}

.result-success,
.status-success {
    background: #064e3b;
    border: 2px solid #00d4aa;
    color: #a7f3d0;
}

.result-success h1 {
    color: #00d4aa;
}

.result-error,
.status-error {
    background: #450a0a;
    border: 2px solid #ef4444;
    color: #fca5a5;
}

.result-error h1 {
    color: #f87171;
}

/* Bevestigingsscherm */
.result-confirm {
    background: #1a1a3e;
    border: 2px solid #a78bfa;
    color: #ede9fe;
    text-align: center;
    margin-bottom: 1.25rem;
}

.confirm-drink-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #c4b5fd;
    margin: 0.4rem 0 0.1rem;
}

.confirm-drink-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #a78bfa;
    margin-bottom: 0;
}

.btn-confirm {
    display: block;
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 2px solid #00d4aa;
    background: #064e3b;
    color: #a7f3d0;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    min-height: 56px;
}

.btn-confirm:hover {
    background: #065f46;
    border-color: #34d399;
}

.btn-confirm:active {
    transform: scale(0.97);
}

.btn-back {
    display: block;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    border: 2px solid #4b5563;
    background: #1f2937;
    color: #9ca3af;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    min-height: 52px;
}

.btn-back:hover {
    background: #374151;
    border-color: #6b7280;
    color: #d1d5db;
}

.btn-back:active {
    transform: scale(0.97);
}

/* Stats tabel */
.barman-theme table,
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0 1.5rem;
    font-size: 0.95rem;
}

.barman-theme th,
.stats-table th {
    text-align: left;
    padding: 0.65rem 0.75rem;
    background: #16213e;
    color: #a5b4fc;
    font-weight: 700;
    border-bottom: 2px solid #2d2d4e;
}

.barman-theme td,
.stats-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #2d2d4e;
    color: #e2e8f0;
    vertical-align: middle;
}

.barman-theme tr:last-child td,
.stats-table tr:last-child td {
    border-bottom: none;
}

/* ============================================================
   ADMIN THEME  (.admin-theme)
   Admin pagina's hebben eigen inline stijlen; deze klassen
   zijn beschikbaar als override / aanvulling.
   ============================================================ */
body:has(.admin-wrap) {
    background: #f8f9fa;
}

/* Maak de container breder voor admin-pagina's */
body:has(.admin-wrap) .container {
    max-width: 960px;
    justify-content: flex-start;
    padding-top: 1.5rem;
}

/* Barman container: laat .barman-theme de breedte bepalen */
body:has(.barman-theme) .container {
    justify-content: flex-start;
    padding-top: 2rem;
}

/* Consistente knopstijlen (ook bruikbaar buiten admin) */
.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-success:hover {
    background: #047857;
}

/* Waarschuwingsband */
.warning-banner {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* ============================================================
   RESPONSIVE — mobile-first aanpassingen
   ============================================================ */
@media (max-width: 420px) {
    .container {
        padding: 1rem 0.75rem 2rem;
    }

    .card,
    .barman-theme {
        padding: 1.5rem 1.1rem;
    }

    .card h1,
    .barman-theme h1 {
        font-size: 1.35rem;
    }

    .countdown {
        font-size: 1.65rem;
    }

    .qr-code {
        max-width: 180px;
    }
}
