:root {
    --primary: #1a2f4d;
    --primary-dark: #122035;
    --primary-light: #e8eef5;
    --accent: #14b8a6;
    --accent-dark: #0d9488;
    --brand-navy: #1a2f4d;
    --brand-teal: #14b8a6;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --super: #1a2f4d;
    --super-dark: #122035;
    --bg: #f8fafc;
    --bg-dark: #122035;
    --card: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
    --shadow: 0 4px 24px rgba(15,23,42,.08);
    --shadow-lg: 0 12px 40px rgba(15,23,42,.12);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --nav-h: 64px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --content-max: 100%;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

/* ─── Layout ─── */
.app-main, .container, .admin-container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 16px;
    padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
}

.container { padding-bottom: calc(32px + var(--safe-bottom)); }

/* ─── Cards ─── */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.card h2, .card h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.card-desc { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }

/* ─── Headers ─── */
.hero-header {
    background: linear-gradient(145deg, #122035 0%, #1a2f4d 55%, #0d9488 100%);
    color: #fff;
    padding: calc(32px + var(--safe-top)) 20px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.08) 0%, transparent 50%);
}

.hero-header > * { position: relative; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-header h1 { font-size: clamp(20px, 4.5vw, 32px); font-weight: 800; letter-spacing: -.3px; }
.hero-sub { opacity: .85; font-size: clamp(14px, 2.5vw, 16px); margin-top: 4px; }

.app-header {
    background: var(--bg-dark);
    color: #fff;
    padding: calc(16px + var(--safe-top)) 20px 16px;
}

.app-header.compact, .super-header.compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.app-header.compact h1, .super-header.compact h1 { font-size: 18px; font-weight: 700; }

.header-top { display: flex; justify-content: space-between; align-items: flex-start; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.header-sub { font-size: 13px; color: #94a3b8; margin-top: 2px; }

.admin-header-bar {
    background: linear-gradient(135deg, #122035, #1a2f4d);
    color: #fff;
    padding: calc(16px + var(--safe-top)) 20px 20px;
}

.admin-header-bar .header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.admin-header-bar h1 { font-size: 20px; font-weight: 800; }
.admin-header-bar .barber-name { font-size: 13px; color: #94a3b8; margin-top: 2px; }

.header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,.1);
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

/* ─── Now Serving Hero ─── */
.serving-hero {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-light), #fff);
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.serving-hero::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 100px; height: 100px;
    background: var(--primary);
    opacity: .06;
    border-radius: 50%;
}

.serving-hero .label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.live-dot {
    width: 7px; height: 7px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(.8); }
}

.token-display {
    font-size: clamp(40px, 10vw, 72px);
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--primary);
    line-height: 1;
}

.token-display.sm { font-size: clamp(36px, 8vw, 56px); }

/* ─── Stats ─── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.stats-grid.three-col { grid-template-columns: repeat(3, 1fr); }

.stat-tile {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-tile.accent { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border: none; }
.stat-tile.accent .stat-lbl { color: rgba(255,255,255,.75); }

.stat-num { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; }
.stat-lbl { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 500; }

.stat-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-box .num { font-size: 36px; font-weight: 800; color: var(--primary); display: block; }
.stat-box .lbl { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ─── Forms ─── */
.form-stack { display: flex; flex-direction: column; gap: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-group .hint { font-weight: 400; color: var(--muted); font-size: 12px; }

.form-group input, .form-group select {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    cursor: pointer;
}

.checkbox-label input { width: 18px; height: 18px; accent-color: var(--primary); }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
    -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.3); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success { background: var(--success); color: #fff; box-shadow: 0 2px 8px rgba(16,185,129,.3); }
.btn-success:hover { background: var(--success-dark); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-outline { background: #fff; border: 1.5px solid var(--border); color: var(--text); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 16px; font-size: 16px; border-radius: var(--radius-sm); }

.btn-call-next {
    margin-top: 16px;
    font-size: 17px;
    padding: 18px;
    border-radius: var(--radius);
    gap: 8px;
}

/* ─── Queue List ─── */
.section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
    flex-wrap: wrap;
}

.section-bar h2 { font-size: 17px; font-weight: 700; }

.queue-list { list-style: none; }

.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.queue-item:last-child { border-bottom: none; }
.queue-item.empty { justify-content: center; color: var(--muted); font-size: 14px; padding: 20px 0; }

.queue-item.serving, .queue-item.is-serving {
    background: linear-gradient(90deg, var(--primary-light), transparent);
    margin: 0 -14px;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    border-bottom: none;
}

.queue-num {
    font-weight: 800;
    font-size: 17px;
    min-width: 52px;
    color: var(--primary);
    letter-spacing: .5px;
}

.queue-info { flex: 1; min-width: 0; }
.queue-info .name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-info .phone { font-size: 12px; color: var(--muted); }

.queue-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f1f5f9;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.queue-tag.now { background: var(--success); color: #fff; }
.queue-tag.next { background: var(--accent); color: #fff; }

/* legacy class support */
.queue-token { font-weight: 800; font-size: 17px; min-width: 52px; color: var(--primary); }
.queue-name { flex: 1; font-weight: 600; }
.queue-phone { display: block; font-size: 12px; color: var(--muted); }
.queue-badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: #f1f5f9; white-space: nowrap; }

/* ─── Status Banner ─── */
.status-card { text-align: center; }

.status-pill-banner {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 14px;
}

.status-pill-banner.waiting { background: #fef3c7; color: #92400e; }
.status-pill-banner.serving { background: #d1fae5; color: #065f46; }
.status-pill-banner.done { background: #e0e7ff; color: #3730a3; }

/* ─── Alerts ─── */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.inline-alert { display: inline-block; margin: 0; }

/* ─── Auth / Login (all screens) ─── */
.auth-page { overflow-x: hidden; }

.auth-screen, .page-center, .install-page {
    min-height: 100dvh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: max(12px, var(--safe-top)) max(12px, var(--safe-right)) max(12px, var(--safe-bottom)) max(12px, var(--safe-left));
    background: linear-gradient(160deg, #122035 0%, #1a2f4d 55%, #0d9488 100%);
    overflow-y: auto;
}

.auth-shell {
    width: 100%;
    max-width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.auth-brand-panel { display: none; }

.auth-card, .auth-card-pro {
    width: 100%;
    min-width: 0;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: clamp(20px, 5vw, 32px);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-logo-mobile {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.auth-form-wrap {
    width: 100%;
    min-width: 0;
}

.auth-card h1 {
    font-size: clamp(22px, 5vw, 28px);
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.auth-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: clamp(13px, 3vw, 15px);
    margin-bottom: 20px;
    line-height: 1.45;
}

.auth-card .form-group input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.auth-hint {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.auth-hint p { margin-bottom: 4px; }

.auth-mobile-footer {
    display: block;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.85);
    line-height: 1.6;
    padding: 0 8px 8px;
}

.auth-mobile-footer p { margin: 2px 0; }

.auth-panel-tagline {
    font-size: clamp(16px, 2.5vw, 20px);
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.35;
}

.auth-panel-desc {
    font-size: 14px;
    line-height: 1.6;
    opacity: .85;
    margin-bottom: 20px;
}

.auth-panel-business {
    font-size: clamp(18px, 2.8vw, 24px);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 6px;
}

.auth-panel-user {
    font-size: 15px;
    opacity: .9;
    margin-bottom: 20px;
}

.auth-mobile-business {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 12px;
    text-align: center;
}

.auth-mobile-user {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: center;
}

.auth-panel-contact { margin-top: auto; font-size: 14px; line-height: 1.8; }
.auth-panel-contact p { margin-bottom: 4px; }

.si-link-light { color: #5eead4; font-weight: 600; text-decoration: none; }
.si-link-light:hover { text-decoration: underline; color: #99f6e4; }

/* Tablet+ — split login card */
@media (min-width: 768px) {
    .auth-screen {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-content: center;
        padding: 24px;
    }

    .auth-shell {
        max-width: min(960px, 96vw);
        flex-direction: row;
        align-items: stretch;
        background: #fff;
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-lg);
    }

    .auth-brand-panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1 1 42%;
        min-width: 260px;
        padding: clamp(28px, 4vw, 44px);
        background: linear-gradient(160deg, #122035, #1a2f4d);
        color: #fff;
    }

    .auth-card, .auth-card-pro {
        flex: 1 1 58%;
        min-width: 280px;
        border-radius: 0;
        box-shadow: none;
        padding: clamp(28px, 4vw, 44px);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-logo-mobile { display: none; }

    .auth-card h1, .auth-sub, .auth-hint { text-align: left; }

    .auth-mobile-footer { display: none; }
}

@media (min-width: 1024px) {
    .auth-shell { max-width: min(1000px, 92vw); }
}

@media (max-width: 767px) {
    .auth-screen { justify-content: flex-start; padding-top: max(20px, var(--safe-top)); }
}

@media (max-height: 700px) and (max-width: 767px) {
    .auth-screen { justify-content: flex-start; }
    .auth-card, .auth-card-pro { padding: 18px 16px; }
    .auth-logo-mobile { margin-bottom: 10px; }
    .auth-logo-mobile .auth-brand-logo { max-width: 160px; }
}

.auth-logo { text-align: center; margin-bottom: 20px; }

.logo-icon {
    width: 52px; height: 52px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.logo-icon.gold { background: #fef3c7; color: var(--accent-dark); }
.logo-text { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }


/* ─── Admin Notifications ─── */
.notif-badge {
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notif-toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    z-index: 1000;
    max-width: calc(100% - 32px);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 500;
    animation: slideDown .3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.notif-panel { border-left: 4px solid var(--primary); }
.notif-list { list-style: none; }

.notif-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.notif-item:last-child { border-bottom: none; }
.notif-item.empty { justify-content: center; color: var(--muted); }
.notif-icon { font-size: 18px; flex-shrink: 0; }
.notif-msg { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.action-feedback { margin-top: 10px; font-size: 13px; font-weight: 600; min-height: 18px; text-align: center; }
.action-feedback.success { color: var(--success); }
.action-feedback.error { color: var(--danger); }

/* ─── Super Admin ─── */
.super-page { background: #f0f4f8; }
.super-header { background: linear-gradient(135deg, #122035, #1a2f4d); }

.barber-cards { display: flex; flex-direction: column; gap: 12px; }

.barber-card { margin-bottom: 0; }
.barber-card.inactive { opacity: .65; }

.barber-card-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.barber-avatar {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--super));
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.barber-info { flex: 1; min-width: 0; }
.barber-info h3 { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barber-info p { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.status-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 4px;
}

.status-pill.active { background: #d1fae5; color: #065f46; }
.status-pill.off { background: #fee2e2; color: #991b1b; }

.mini-qr { border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }

.barber-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-bottom: 12px;
    text-align: center;
}

.barber-stats-row strong { display: block; font-size: 18px; font-weight: 800; color: var(--primary); }
.barber-stats-row span { font-size: 11px; color: var(--muted); }

.barber-actions { display: flex; gap: 8px; }
.barber-actions .btn { flex: 1; }

.empty-state { text-align: center; padding: 32px 20px; }
.empty-icon { color: var(--muted); margin-bottom: 12px; }
.empty-state h3 { font-size: 17px; margin-bottom: 4px; }
.empty-state p { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }

.detail-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.detail-list div { display: flex; justify-content: space-between; align-items: center; font-size: 13px; gap: 8px; }
.detail-list span { color: var(--muted); flex-shrink: 0; }
.detail-list a { color: var(--primary); word-break: break-all; text-align: right; font-size: 12px; }

/* ─── Bottom Nav ─── */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    background: #fff;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    box-shadow: 0 -4px 20px rgba(15,23,42,.06);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    padding: 8px 16px;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item.nav-fab {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--brand-teal), var(--accent-dark));
    color: #fff;
    border-radius: 50%;
    margin-top: -20px;
    box-shadow: 0 4px 16px rgba(20,184,166,.4);
    justify-content: center;
    font-size: 0;
}

/* ─── QR Preview ─── */
.qr-card { text-align: center; }
.qr-wrap { background: #f8fafc; border-radius: var(--radius); padding: 20px; margin: 14px 0; }
.qr-wrap img { border-radius: 8px; max-width: 100%; height: auto; }
.qr-cta { font-size: 18px; font-weight: 800; margin-top: 10px; }
.qr-link { font-size: 11px; color: var(--muted); word-break: break-all; margin-top: 6px; display: block; }

.qr-preview { display: flex; gap: 16px; align-items: center; margin: 14px 0; }
.qr-label { font-size: 18px; font-weight: 700; }
.qr-url { font-size: 11px; word-break: break-all; color: var(--muted); }

/* ─── Print ─── */
.print-bar {
    max-width: 480px;
    margin: 16px auto;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    flex-wrap: wrap;
}

.print-sheet { max-width: 400px; margin: 20px auto; padding: 0 16px; }

.print-inner {
    background: #fff;
    border: 3px solid var(--bg-dark);
    border-radius: 12px;
    padding: 36px 28px;
    text-align: center;
}

.print-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.print-logo-icon { color: var(--primary); }
.print-title { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.print-subtitle { color: var(--text-secondary); margin-bottom: 24px; font-size: 14px; }
.print-qr-wrap { margin-bottom: 20px; }
.print-qr-img { width: 240px; height: 240px; border-radius: 8px; }
.print-cta { font-size: 30px; font-weight: 900; margin-bottom: 6px; }
.print-tagline { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }
.print-divider { height: 2px; background: var(--border); margin: 16px 0; }
.print-url { font-size: 10px; color: var(--muted); word-break: break-all; }

@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .print-inner { box-shadow: none; }
}

/* ─── Footer ─── */
.app-footer {
    text-align: center;
    padding: 20px 16px 32px;
    color: var(--muted);
    font-size: 13px;
}

.app-footer .brand-line { font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 4px; }

/* ─── Misc legacy ─── */
.label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.muted { color: var(--muted); font-size: 14px; }
.token-big { font-size: 56px; font-weight: 900; letter-spacing: 3px; color: var(--primary); line-height: 1; }
.badge { background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-header h2 { font-size: 17px; font-weight: 700; }
.serving-panel { text-align: center; }
.now-serving-card { text-align: center; border: 2px solid var(--primary); background: linear-gradient(135deg, var(--primary-light), #fff); }
.top-header { background: linear-gradient(145deg, #0f172a, #2563eb); color: #fff; text-align: center; padding: 28px 16px; }
.brand, .brand-small, .brand-badge { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; opacity: .85; }
.subtitle { opacity: .85; margin-top: 4px; }
.footer { text-align: center; padding: 24px 16px; color: var(--muted); font-size: 13px; }
.login-wrapper { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, #0f172a, #2563eb); }
.login-card { width: 100%; max-width: 400px; }
.admin-page .admin-header { background: var(--bg-dark); color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; }
.admin-queue .queue-item { align-items: flex-start; }

@media (max-width: 380px) {
    .stats-grid.three-col { grid-template-columns: repeat(3, 1fr); }
    .stat-num { font-size: 22px; }
    .qr-preview { flex-direction: column; text-align: center; }
}

.save-link-card { border: 1.5px dashed var(--primary); background: #f8faff; }
.saved-url-box { display: flex; gap: 8px; margin-top: 10px; }
.saved-url-box input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    background: #fff;
    color: var(--text-secondary);
    min-width: 0;
}
.copy-feedback { font-size: 13px; margin-top: 8px; min-height: 18px; font-weight: 500; }
.copy-feedback.success { color: var(--success); }

.grace-timer {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-dark);
    margin: 10px 0 4px;
    min-height: 18px;
}

.btn-decline {
    margin-top: 8px;
    border-color: var(--danger) !important;
    color: var(--danger) !important;
}

.btn-decline:not(:disabled) {
    background: #fef2f2;
}

.btn-decline:disabled {
    opacity: 0.45;
}

.compact-header .header-row { align-items: center; }
.back-btn-dark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,.12);
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

/* ─── Logo chip (white bg on dark headers) ─── */
.logo-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 8px 14px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    line-height: 0;
}

.logo-chip img, .logo-chip-img, .admin-top-logo, .auth-panel-logo, .print-brand-logo {
    max-width: 180px;
    width: auto;
    height: auto;
    max-height: 52px;
    object-fit: contain;
    display: block;
    filter: none !important;
}

/* ─── Barber app — full screen token + bottom nav ─── */
.barber-app-page { background: var(--bg); }
.admin-top-bar {
    background: linear-gradient(135deg, #122035, #1a2f4d);
    color: #fff;
    padding: calc(10px + var(--safe-top)) 16px 10px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-top-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}
.admin-top-text { flex: 1; min-width: 0; }
.admin-top-text h1 {
    font-size: clamp(15px, 3.5vw, 20px);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-top-text p { font-size: 12px; color: #94a3b8; }
.admin-top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.admin-top-bar .logo-chip { margin-bottom: 0; padding: 6px 10px; }
.admin-top-bar .logo-chip img { max-height: 36px; }

.barber-app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    padding-bottom: calc(72px + var(--safe-bottom));
    min-height: calc(100dvh - 60px);
}

.barber-panel { display: none; padding: 16px; }
.barber-panel.active { display: block; }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.panel-head h2 {
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.token-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100dvh - 220px);
    padding: 20px 12px;
    background: linear-gradient(160deg, var(--primary-light) 0%, #fff 50%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    border: 2px solid var(--primary);
    margin-bottom: 14px;
}
.token-screen-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
}
.token-screen-num {
    font-size: clamp(72px, 22vw, 180px);
    font-weight: 900;
    line-height: 1;
    color: var(--primary);
    letter-spacing: 4px;
    margin: 8px 0 16px;
}
.token-screen-name {
    font-size: clamp(22px, 5vw, 36px);
    font-weight: 800;
    color: var(--text);
}
.token-screen-phone {
    font-size: clamp(16px, 3vw, 20px);
    color: var(--muted);
    margin-top: 6px;
}
.token-screen-actions { max-width: 480px; margin: 0 auto; width: 100%; }
.btn-ghost-sound {
    margin-top: 10px;
    background: #f0f9ff;
    border: 1px dashed var(--accent);
    color: var(--primary);
    font-size: 13px;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    width: 100%;
    font-family: var(--font);
    font-weight: 600;
}

.barber-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    background: #fff;
    border-top: 1px solid var(--border);
    height: calc(64px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(15,23,42,.08);
}
.barber-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: none;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    padding: 8px 4px;
    -webkit-tap-highlight-color: transparent;
}
.barber-nav-item.active { color: var(--primary); }
.barber-nav-item svg { width: 22px; height: 22px; }

.qr-card-inline { text-align: center; }

@media (min-width: 768px) {
    .barber-bottom-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: min(1200px, 100%);
        border-radius: var(--radius) var(--radius) 0 0;
    }
    .token-screen { min-height: 55vh; }
    .barber-panel { padding: 20px 24px; }
}

@media (min-width: 992px) {
    #panelToken.active {
        display: grid;
        grid-template-columns: 1fr minmax(280px, 360px);
        gap: 20px;
        align-items: start;
    }
    #panelToken .token-screen { min-height: 60vh; margin-bottom: 0; }
    #panelToken .token-screen-actions { padding-top: 20px; }
}

/* ─── Solutions Indicator Branding ─── */
.brand-logo, .auth-brand-logo, .hero-brand-logo { max-width: 220px; width: 100%; height: auto; display: block; object-fit: contain; filter: none !important; }
.brand-logo-sm { max-width: 160px; height: auto; display: block; object-fit: contain; filter: none !important; }
.header-brand-logo { max-width: 140px; margin-bottom: 8px; filter: none !important; }
.auth-brand-logo { margin: 0 auto 12px; max-width: 200px; }
.hero-brand-wrap { margin-bottom: 12px; display: flex; justify-content: center; }
.hero-brand-logo { max-width: 200px; }
.compact-hero { padding: 20px 20px 16px !important; }
.hero-welcome { margin-top: 8px; font-size: 14px; opacity: .9; }

.si-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.si-link:hover { text-decoration: underline; }
.si-brand-footer { text-align: center; padding: 24px 16px; margin-top: 8px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); }
.si-footer-title { font-size: 13px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--primary); margin-top: 10px; }
.si-footer-desc { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.si-footer-contact, .si-contact-compact, .si-own-text { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.si-contact-compact { text-align: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }

.billing-note { font-size: 13px; color: var(--text-secondary); margin: -6px 0 14px; padding: 10px 12px; background: #fff8e6; border-radius: var(--radius-sm); border: 1px solid #fde68a; }
.billing-toggle-row { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.btn-danger-outline { background: #fff; border: 1.5px solid var(--danger); color: var(--danger); }
.btn-danger-outline:hover { background: #fef2f2; }
.btn-danger { background: var(--danger); border: 1.5px solid var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.danger-zone { border: 1.5px solid #fecaca; background: #fffafb; }
.danger-zone h2 { color: var(--danger); }

.form-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ─── Professional QR Print (landscape split) ─── */
.print-page { background: #eef2f7; }
.print-sheet-pro { max-width: 900px; margin: 20px auto; padding: 0 16px; }
.print-sheet-inner { background: #fff; border: 3px solid var(--brand-navy); border-radius: 12px; overflow: hidden; }
.print-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 480px; }
.print-brand-col { background: linear-gradient(160deg, #122035, #1a2f4d); color: #fff; padding: 32px 28px; display: flex; flex-direction: column; justify-content: center; }
.print-qr-col { padding: 32px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.print-brand-logo { max-width: 200px; margin-bottom: 20px; }
.print-own-heading { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.print-own-text { font-size: 14px; line-height: 1.6; opacity: .92; margin-bottom: 18px; }
.print-contact-block { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.print-contact-link { color: var(--brand-teal); font-weight: 700; text-decoration: none; font-size: 15px; }
.print-powered { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; opacity: .65; margin-top: auto; }
.print-shop-name { font-size: 26px; font-weight: 900; color: var(--brand-navy); margin-bottom: 4px; }
.print-barber-name { color: var(--text-secondary); margin-bottom: 16px; }
.print-qr-frame { padding: 12px; border: 3px solid var(--brand-navy); border-radius: 12px; margin-bottom: 16px; }
.print-qr-img-pro { width: min(220px, 70vw); height: min(220px, 70vw); display: block; max-width: 100%; }
.print-cta-pro { font-size: 28px; font-weight: 900; color: var(--brand-navy); margin-bottom: 6px; }
.print-scan-text { color: var(--text-secondary); font-size: 14px; margin-bottom: 12px; }
.print-url-pro { font-size: 10px; color: var(--muted); word-break: break-all; max-width: 280px; }

@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .print-sheet-pro { max-width: 100%; margin: 0; padding: 0; }
    .print-sheet-inner { border-width: 2px; }
    .print-split { min-height: auto; }
}

@media (max-width: 700px) {
    .print-split { grid-template-columns: 1fr; }
    .print-brand-col { padding: 24px 20px; }
    .print-qr-col { padding: 24px 20px; }
}

.status-pill-banner.cancelled { background: #fee2e2; color: #991b1b; }

.form-group input[type="color"] { height: 48px; padding: 4px; cursor: pointer; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile · Tablet · Desktop · Large screens
   ═══════════════════════════════════════════════════════════════ */

/* Small phones */
@media (max-width: 359px) {
    .app-main, .container, .admin-container { padding: 12px; }
    .card { padding: 16px; }
    .hero-header { padding: 24px 14px 20px; }
    .auth-card, .auth-card-pro { padding: 24px 18px; }
    .header-actions { gap: 4px; }
    .btn-icon { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
    .queue-num { min-width: 42px; font-size: 15px; }
    .barber-actions { flex-wrap: wrap; }
    .barber-actions .btn { min-width: calc(50% - 4px); }
    .saved-url-box { flex-direction: column; }
    .saved-url-box .btn { width: 100%; }
    .print-bar { padding: 0 10px; }
    .si-brand-footer { padding: 18px 12px; }
}

/* Phones */
@media (max-width: 479px) {
    .form-row { grid-template-columns: 1fr; }
    .admin-header-bar h1 { font-size: 17px; }
    .header-brand-logo { max-width: 110px; margin-bottom: 6px; }
    .admin-header-bar .header-row { align-items: flex-start; }
    .detail-list div { flex-direction: column; align-items: flex-start; }
    .detail-list a { text-align: left; }
}

/* Tablets portrait */
@media (min-width: 600px) {
    :root { --content-max: 560px; }

    .app-main, .container, .admin-container {
        padding: 20px 24px;
        padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 24px);
    }

    .container { padding-bottom: calc(40px + var(--safe-bottom)); }

    .card { padding: 22px; margin-bottom: 16px; }
    .hero-header { padding: 36px 24px 30px; }
    .stat-box .num { font-size: 42px; }
    .stat-num { font-size: 32px; }
    .print-bar { max-width: 900px; }
    .print-sheet-pro { max-width: 900px; }
}

/* Tablets landscape & small laptops */
@media (min-width: 768px) {
    :root { --content-max: 720px; --nav-h: 68px; }

    .barber-cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .barber-card { margin-bottom: 0; }

    .stats-grid.three-col { gap: 14px; }

    .print-split { grid-template-columns: 1fr 1fr; }
    .print-qr-img-pro { width: 240px; height: 240px; }

    .auth-screen, .page-center, .install-page { padding: 32px 24px; }

    .qr-wrap img { width: 200px !important; height: 200px !important; }

    .section-bar h2 { font-size: 18px; }
}

/* Desktop */
@media (min-width: 992px) {
    :root { --content-max: 960px; }

    .super-page .app-main { max-width: 1100px; }

    .barber-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

  /* Barber dashboard — 2 column layout */
    .admin-page .admin-container {
        max-width: 1200px;
        display: block;
        padding-bottom: calc(80px + var(--safe-bottom));
    }

    .admin-page .admin-container > .serving-hero,
    .admin-page .admin-container > .notif-panel,
    .admin-page .admin-container > .card:not(.serving-hero):not(.notif-panel) {
        grid-column: auto;
    }

    .customer-page .container {
        max-width: 640px;
    }

    .print-sheet-pro { max-width: 960px; }
    .print-split { min-height: 520px; }
    .print-qr-img-pro { width: 260px; height: 260px; }
}

/* Large desktop & TV */
@media (min-width: 1200px) {
    :root { --content-max: 1100px; }

    .super-page .app-main { max-width: 1280px; }

    .barber-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .customer-page .container { max-width: 680px; }

    .admin-page .admin-container { max-width: 1200px; }

    .hero-header { padding: 40px 32px 34px; }
    .hero-brand-logo { max-width: 220px; }
}

/* Wide screens — center bottom nav with content */
@media (min-width: 768px) {
    .bottom-nav,
    .barber-bottom-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        border-radius: var(--radius) var(--radius) 0 0;
    }
}

/* Landscape phones — reduce vertical padding */
@media (max-height: 500px) and (orientation: landscape) {
    .auth-screen, .page-center, .install-page {
        align-items: flex-start;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .hero-header { padding: 20px 16px 16px; }
    .hero-brand-logo { max-width: 140px; }
    .auth-card, .auth-card-pro { margin: 12px 0; }
}

/* Hover states — desktop only */
@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover { transform: translateY(-1px); }
    .btn-outline:hover { border-color: var(--primary); color: var(--primary); }
    .barber-card:hover { box-shadow: var(--shadow); }
    .si-link:hover { color: var(--accent-dark); }
}

/* Print stays optimized */
@media print {
    body { padding: 0; overflow: visible; }
    .print-split { grid-template-columns: 1fr 1fr !important; }
}

/* ─── Bank-style counter & token display ─── */
.bank-live-board {
    background: linear-gradient(180deg, #0b1628 0%, #122035 55%, #1a2f4d 100%);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(15, 23, 42, .25);
}

.bank-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.bank-board-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    color: #94a3b8;
}

.bank-board-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #5eead4;
}

.bank-counters-grid {
    display: grid;
    gap: 12px;
}

.bank-counters-grid.single { grid-template-columns: 1fr; }
.bank-counters-grid.multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.bank-counter-tile {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: 14px 12px;
    text-align: center;
}

.admin-counter-select {
    cursor: pointer;
    width: 100%;
    color: inherit;
    font: inherit;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.admin-counter-select.active,
.admin-counter-select:hover {
    border-color: #14b8a6;
    box-shadow: 0 0 0 1px rgba(20,184,166,.35);
}

.bank-counter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.bank-counter-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.bank-counter-wait {
    font-size: 10px;
    font-weight: 700;
    color: #5eead4;
    white-space: nowrap;
}

.bank-token-led {
    font-size: clamp(36px, 8vw, 56px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: .06em;
    font-variant-numeric: tabular-nums;
    color: #fef08a;
    text-shadow: 0 0 18px rgba(250,204,21,.35), 0 2px 0 rgba(0,0,0,.25);
    padding: 8px 0;
}

.bank-counter-name {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bank-active-panel { margin-top: 12px; }
.bank-active-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.bank-manage-screen { background: #f8fafc; border-radius: 14px; padding: 16px; }
.bank-led-manage { color: var(--primary); text-shadow: none; font-size: clamp(48px, 14vw, 72px); }

.counter-pick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.counter-pick-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 12px;
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.counter-pick-card input { position: absolute; opacity: 0; pointer-events: none; }
.counter-pick-card:has(input:checked),
.counter-pick-card.recommended {
    border-color: var(--accent);
    background: #f0fdfa;
}

.counter-pick-title { font-size: 14px; font-weight: 800; color: var(--primary); }
.counter-pick-wait, .counter-pick-est { font-size: 12px; color: var(--text-secondary); }
.counter-pick-badge {
    margin-top: 4px;
    align-self: flex-start;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    padding: 3px 8px;
    border-radius: 999px;
}

.counter-queue-block { margin-bottom: 16px; }
.counter-queue-block:last-child { margin-bottom: 0; }
.counter-queue-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.counter-queue-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}
.bank-queue-num { font-weight: 900; letter-spacing: .04em; }
.queue-empty-msg { text-align: center; padding: 12px 0; }

.bank-status-hero {
    text-align: center;
    background: linear-gradient(180deg, #0b1628, #1a2f4d);
    color: #fff;
    border: none;
}
.bank-status-counter {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #5eead4;
    margin-bottom: 8px;
}
.bank-status-label { color: #94a3b8; }
.bank-status-token { margin: 8px 0; }
.bank-status-name { font-size: 16px; font-weight: 700; color: #e2e8f0; }

.bank-submit-btn { font-weight: 800; letter-spacing: .02em; }

@media (min-width: 768px) {
    .bank-counters-grid.multi { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .counter-pick-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

@media (min-width: 1024px) {
    .admin-bank-board { margin-bottom: 0; }
}

/* ─── Page back bar (all screens) ─── */
.page-back-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 250, 252, .95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
}

.page-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.page-back-link:hover { color: var(--accent-dark); }
.page-back-bottom { margin-top: 8px; }

.auth-screen > .page-back-bar {
    position: relative;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    border-radius: var(--radius) var(--radius) 0 0;
}

/* ─── Turn / status hero ─── */
.turn-hero {
    text-align: center;
    padding: 18px 16px;
    border: 2px solid var(--border);
}

.turn-hero.waiting { border-color: #93c5fd; background: #eff6ff; }
.turn-hero.serving { border-color: #6ee7b7; background: #ecfdf5; }
.turn-hero.done, .turn-hero.cancelled { border-color: #cbd5e1; background: #f8fafc; }

.turn-hero-label {
    font-size: clamp(22px, 5vw, 32px);
    font-weight: 900;
    color: var(--primary);
    line-height: 1.2;
}

.turn-hero-detail {
    margin-top: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-box.highlight {
    border: 2px solid var(--accent);
    background: #f0fdfa;
}

.stat-box.highlight .num { color: var(--accent-dark); }

.live-update-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    margin: 10px 0 14px;
}

.queue-item.is-mine {
    border: 2px solid var(--accent);
    background: #f0fdfa;
}

.bank-board-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: -4px 0 12px;
    text-align: center;
}

.counter-pick-tile {
    cursor: pointer;
    width: 100%;
    color: inherit;
    font: inherit;
    text-align: center;
    transition: border-color .2s, box-shadow .2s;
}

.counter-pick-tile.selected,
.counter-pick-card.selected {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, .25);
}

.counter-pick-card:has(input:checked) {
    border-color: var(--accent);
    background: #f0fdfa;
}

.stats-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 480px) {
    .stats-grid.three-col { grid-template-columns: 1fr; }
}
