/* ═══════════════════════════════════════════════════════════════
   QUEUE SYSTEM — MAIN STYLESHEET
   Premium Light Theme · Futuristic Blue Accents
   Font Awesome Icons · CI4 Layout System
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@300;400;500;600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

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

:root {
    /* Core Palette */
    --bg:           #f0f4ff;
    --bg-alt:       #e8eef9;
    --surface:      #ffffff;
    --surface2:     #f5f8ff;
    --surface3:     #edf1fb;

    /* Borders */
    --border:       #dce4f5;
    --border-bright:#b8caee;
    --border-glow:  rgba(59,130,246,0.35);

    /* Blue Accent System */
    --blue-50:      #eff6ff;
    --blue-100:     #dbeafe;
    --blue-200:     #bfdbfe;
    --blue-400:     #60a5fa;
    --blue-500:     #3b82f6;
    --blue-600:     #2563eb;
    --blue-700:     #1d4ed8;
    --accent:       #2563eb;
    --accent-light: #3b82f6;
    --accent-glow:  rgba(37,99,235,0.12);
    --accent-glow2: rgba(37,99,235,0.06);
    --cyan:         #0891b2;
    --cyan-light:   #06b6d4;

    /* Semantic */
    --success:      #059669;
    --success-bg:   rgba(5,150,105,0.08);
    --warning:      #d97706;
    --warning-bg:   rgba(217,119,6,0.08);
    --danger:       #dc2626;
    --danger-bg:    rgba(220,38,38,0.08);

    /* Text */
    --text:         #0f172a;
    --text-sub:     #1e3a5f;
    --text-muted:   #64748b;
    --text-dim:     #94a3b8;

    /* Shadows */
    --shadow-sm:    0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.06);
    --shadow-md:    0 4px 16px rgba(15,23,42,0.08), 0 2px 6px rgba(15,23,42,0.05);
    --shadow-lg:    0 12px 40px rgba(15,23,42,0.10), 0 4px 12px rgba(15,23,42,0.06);
    --shadow-blue:  0 4px 20px rgba(37,99,235,0.20);
    --shadow-blue-lg: 0 8px 32px rgba(37,99,235,0.25);

    /* Layout */
    --navbar-h:     64px;
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-lg:    18px;
    --radius-xl:    24px;

    /* Fonts */
    --font-display: 'Syne', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* Futuristic grid overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(37,99,235,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,99,235,0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
    z-index: 0;
}

/* Top glow edge */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--blue-400) 20%,
        var(--accent) 50%,
        var(--cyan-light) 80%,
        transparent 100%
    );
    z-index: 999;
}

/* ── SCROLLBAR ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface2); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-light); }

/* ── LAYOUT WRAPPER ────────────────────────────────────────────── */
.layout-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 480px; margin: 0 auto; padding: 0 24px; }

.main-content {
    flex: 1;
    padding: 36px 0 48px;
}

/* ── NAVBAR ────────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 3px;
    z-index: 100;
    height: var(--navbar-h);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 var(--border), 0 2px 16px rgba(37,99,235,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

/* Animated blue scan line on navbar bottom */
.navbar::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    height: 2px;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--accent), var(--cyan-light), transparent);
    animation: navScan 4s ease-in-out infinite;
}

@keyframes navScan {
    0%   { left: -40%; opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    letter-spacing: -0.3px;
    text-decoration: none;
}

.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--cyan-light));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 15px;
    box-shadow: var(--shadow-blue);
    flex-shrink: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 6px 16px 6px 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
}

.user-chip .avatar {
    width: 26px; height: 26px;
    background: linear-gradient(135deg, var(--accent), var(--cyan-light));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-body);
    padding: 7px 16px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.logout-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-bg);
}

/* ── PAGE HEADER ───────────────────────────────────────────────── */
.page-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.page-header-left h1 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: var(--text);
    line-height: 1.1;
}

.page-header-left p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Blue accent line before h1 */
.page-header-left h1::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--accent), var(--cyan-light));
    border-radius: 2px;
    margin-right: 12px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* ── ALERTS ────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
    animation: alertSlide 0.3s ease;
}

@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid rgba(5,150,105,0.25);
    color: var(--success);
}

.alert-error {
    background: var(--danger-bg);
    border: 1px solid rgba(220,38,38,0.25);
    color: var(--danger);
}

.alert-info {
    background: var(--accent-glow);
    border: 1px solid rgba(37,99,235,0.25);
    color: var(--accent);
}

/* ── CARDS ─────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Left blue border accent */
.card::before {
    content: '';
    position: absolute;
    top: 20%; left: 0;
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, var(--accent), var(--cyan-light));
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity 0.25s;
}

.card:hover {
    border-color: var(--border-bright);
    box-shadow: var(--shadow-md);
}

.card:hover::before { opacity: 1; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.card-icon.blue  { background: var(--blue-50); color: var(--accent); border: 1px solid var(--blue-200); }
.card-icon.cyan  { background: rgba(8,145,178,0.08); color: var(--cyan); border: 1px solid rgba(8,145,178,0.2); }
.card-icon.green { background: var(--success-bg); color: var(--success); border: 1px solid rgba(5,150,105,0.2); }
.card-icon.amber { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(217,119,6,0.2); }

.card-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

.count-badge {
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    border-radius: 99px;
    padding: 3px 12px;
    font-size: 12px;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--accent);
}

/* ── GRID LAYOUTS ──────────────────────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .navbar { padding: 0 16px; }
}

.section { margin-bottom: 24px; }

/* ── FORMS ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }

.form-label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 7px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.input-wrap { position: relative; }

.input-icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    font-size: 14px;
    display: flex;
    align-items: center;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
}

input.has-icon, select.has-icon { padding-left: 40px; }

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder { color: var(--text-dim); }

select option { background: var(--surface); color: var(--text); }

input[type="date"]::-webkit-calendar-picker-indicator {
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0.6;
}

.eye-btn {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s;
}
.eye-btn:hover { color: var(--accent); }

/* ── BUTTONS ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.1px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
    background: var(--blue-700);
    box-shadow: var(--shadow-blue-lg);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    border: 1.5px solid var(--border-bright);
    color: var(--text-sub);
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow2);
}

.btn-ghost {
    background: var(--surface2);
    border: 1.5px solid var(--border);
    color: var(--text-muted);
}
.btn-ghost:hover {
    border-color: var(--cyan-light);
    color: var(--cyan);
    background: rgba(6,182,212,0.06);
}

.btn-danger {
    background: var(--danger-bg);
    border: 1.5px solid rgba(220,38,38,0.25);
    color: var(--danger);
}
.btn-danger:hover {
    background: rgba(220,38,38,0.15);
    border-color: var(--danger);
}

.btn-sm   { padding: 7px 14px; font-size: 13px; }
.btn-lg   { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }
.btn:active { transform: translateY(0) !important; }

/* ── TABLE ─────────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

thead tr {
    background: var(--surface2);
    border-bottom: 2px solid var(--border);
}

thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover { background: var(--surface2); }

tbody tr.is-called {
    background: var(--blue-50);
    border-left: 3px solid var(--accent);
}

tbody td {
    padding: 13px 16px;
    color: var(--text-muted);
}

tbody td:first-child {
    font-weight: 600;
    color: var(--text);
}

.mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }

/* ── STATUS BADGES ─────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 600;
}

.badge-blue  { background: var(--blue-50); color: var(--accent); border: 1px solid var(--blue-200); }
.badge-cyan  { background: rgba(8,145,178,0.08); color: var(--cyan); border: 1px solid rgba(8,145,178,0.2); }
.badge-green { background: var(--success-bg); color: var(--success); border: 1px solid rgba(5,150,105,0.2); }
.badge-amber { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(217,119,6,0.2); }
.badge-red   { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(220,38,38,0.2); }

.badge .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.badge-blue .dot-pulse  { animation: dotPulse 1.5s infinite; }
@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

/* ── STAT BADGE ────────────────────────────────────────────────── */
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.stat-badge strong {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

/* ── FILTER ROW ────────────────────────────────────────────────── */
.filter-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.filter-row .form-group { flex: 1; margin-bottom: 0; }
.filter-row .btn { flex-shrink: 0; }

/* ── INLINE TABLE ACTIONS ──────────────────────────────────────── */
.action-cell { min-width: 300px; }

.inline-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.inline-grid .full { grid-column: 1 / -1; }

.inline-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

/* ── QUEUE HERO ────────────────────────────────────────────────── */
.queue-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

/* Diagonal stripe decoration */
.queue-hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 280px; height: 100%;
    background: linear-gradient(135deg,
        transparent 40%,
        rgba(37,99,235,0.04) 40%,
        rgba(37,99,235,0.04) 60%,
        transparent 60%
    );
    background-size: 24px 24px;
    pointer-events: none;
}

/* Top scanning line */
.queue-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cyan-light), var(--accent));
    border-radius: 99px 99px 0 0;
}

.queue-hero-left { display: flex; flex-direction: column; gap: 8px; }

.queue-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
}

.queue-number {
    font-family: var(--font-mono);
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -3px;
}

.queue-number.active {
    background: linear-gradient(135deg, var(--accent), var(--cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(37,99,235,0.25));
}

.queue-number.empty { color: var(--border-bright); }

.queue-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}

.queue-status-pill.serving {
    background: var(--success-bg);
    border: 1px solid rgba(5,150,105,0.25);
    color: var(--success);
}

.queue-status-pill.serving .pulse-dot {
    width: 7px; height: 7px;
    background: var(--success);
    border-radius: 50%;
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.5; }
}

.queue-status-pill.idle {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.action-group { display: flex; gap: 10px; flex-shrink: 0; }

/* ── AUTH PAGE ─────────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* decorative orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(70px);
}
.orb-1 {
    width: 500px; height: 500px;
    background: rgba(37,99,235,0.08);
    top: -180px; left: -150px;
}
.orb-2 {
    width: 400px; height: 400px;
    background: rgba(8,145,178,0.06);
    bottom: -120px; right: -120px;
}

.auth-card {
    position: relative;
    z-index: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: cardAppear 0.5s cubic-bezier(0.34,1.4,0.64,1) both;
}

@keyframes cardAppear {
    from { opacity: 0; transform: scale(0.94) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Top rainbow line */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 32px; right: 32px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--cyan-light), transparent);
    border-radius: 0 0 99px 99px;
}

.auth-logo {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--accent), var(--cyan-light));
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 26px;
    box-shadow: var(--shadow-blue-lg);
    margin: 0 auto 24px;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: center;
    color: var(--text);
    margin-bottom: 5px;
}

.auth-sub {
    font-size: 13.5px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 30px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}

/* ── KIOSK PAGE ────────────────────────────────────────────────── */
.kiosk-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    text-align: center;
    padding: 48px 24px 40px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.kiosk-header-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--accent), var(--cyan-light));
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 32px;
    margin: 0 auto 18px;
    box-shadow: var(--shadow-blue-lg);
}

.kiosk-header h1 {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text);
    margin-bottom: 6px;
}

.kiosk-header p { font-size: 15px; color: var(--text-muted); }

/* Tenant grid */
.tenant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.tenant-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.tenant-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cyan-light));
    opacity: 0;
    transition: opacity 0.25s;
}

.tenant-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-blue-lg);
}

.tenant-card:hover::after { opacity: 1; }

.tenant-card form { display: block; }

.tenant-card button {
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 28px 22px;
    text-align: left;
    font-family: var(--font-body);
}

.tenant-icon {
    width: 48px; height: 48px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 14px;
    transition: all 0.25s;
}

.tenant-card:hover .tenant-icon {
    background: var(--blue-50);
    border-color: var(--blue-200);
}

.tenant-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: block;
    margin-bottom: 5px;
}

.tenant-cta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.tenant-card:hover .tenant-cta { color: var(--accent); }

/* ── SUCCESS / TICKET PAGE ─────────────────────────────────────── */
.ticket-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Animated glow bg */
.ticket-glow {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(5,150,105,0.07) 0%, transparent 60%);
    pointer-events: none;
    animation: glowBreath 2.5s ease-in-out infinite;
}

@keyframes glowBreath {
    0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.7; }
    50%       { transform: translate(-50%,-50%) scale(1.12); opacity: 1; }
}

.ticket-card {
    position: relative;
    z-index: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 52px 44px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: cardAppear 0.5s cubic-bezier(0.34,1.4,0.64,1) both;
}

/* Ticket perforation top */
.ticket-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--accent) 0px,
        var(--accent) 12px,
        transparent 12px,
        transparent 18px,
        var(--cyan-light) 18px,
        var(--cyan-light) 30px,
        transparent 30px,
        transparent 36px
    );
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.success-ring {
    width: 88px; height: 88px;
    margin: 0 auto 26px;
    position: relative;
}

.success-ring svg { width: 88px; height: 88px; }

.ring-bg { fill: none; stroke: var(--surface2); stroke-width: 4; }

.ring-fill {
    fill: none;
    stroke: var(--success);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 245;
    stroke-dashoffset: 245;
    animation: ringDraw 0.8s 0.2s ease forwards;
    filter: drop-shadow(0 0 6px rgba(5,150,105,0.5));
}

@keyframes ringDraw { to { stroke-dashoffset: 0; } }

.check-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: var(--success);
    font-size: 28px;
    animation: popIn 0.4s 0.85s cubic-bezier(0.34,1.5,0.64,1) both;
    opacity: 0;
}

@keyframes popIn {
    from { opacity: 0; transform: translate(-50%,-50%) scale(0); }
    to   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}

.ticket-tenant {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ticket-number {
    font-family: var(--font-mono);
    font-size: 88px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -5px;
    background: linear-gradient(135deg, var(--success), var(--cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    animation: numSlide 0.5s 0.6s ease both;
}

@keyframes numSlide {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ticket-num-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 28px;
    animation: fadeUp 0.4s 0.9s ease both;
    opacity: 0;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ticket-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
    position: relative;
}

/* Dashed line like ticket stub */
.ticket-divider::before {
    content: '';
    position: absolute;
    top: -5px; left: -28px; right: -28px;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        transparent, transparent 10px,
        var(--border) 10px, var(--border) 12px
    );
}

.counter-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 22px;
    margin-bottom: 26px;
}

.counter-icon-wrap {
    width: 40px; height: 40px;
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 16px;
    flex-shrink: 0;
}

.counter-info { text-align: left; }

.counter-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.counter-value {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.3;
}

.ticket-thanks {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
    animation: fadeUp 0.4s 1s ease both;
    opacity: 0;
}

.ticket-thanks-sub {
    font-size: 13px;
    color: var(--text-muted);
    animation: fadeUp 0.4s 1.1s ease both;
    opacity: 0;
}

.progress-wrap { margin-top: 30px; }

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.progress-track {
    height: 4px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--cyan-light));
    border-radius: 99px;
    width: 0%;
    animation: progAnim 2s 0.3s linear forwards;
}

@keyframes progAnim {
    from { width: 0%; }
    to   { width: 100%; }
}

/* ── DISPLAY BOARD ─────────────────────────────────────────────── */
.display-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.display-navbar {
    flex-shrink: 0;
    height: 64px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
}

.display-navbar::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    height: 2px;
    width: 35%;
    background: linear-gradient(90deg, var(--accent), var(--cyan-light), transparent);
    animation: navScan 3.5s ease-in-out infinite;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 5px 14px;
    transition: all 0.3s;
}

.live-indicator.connected {
    color: var(--success);
    background: var(--success-bg);
    border-color: rgba(5,150,105,0.25);
}

.live-indicator.disconnected {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: rgba(220,38,38,0.25);
}

.live-indicator::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.live-indicator.connected::before { animation: pulseDot 1.5s infinite; }

.board-clock {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    letter-spacing: 1px;
}

.board-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

/* Board tenant card */
.board-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s;
    position: relative;
}

.board-card:hover {
    border-color: var(--border-bright);
    box-shadow: var(--shadow-md);
}

.board-card-stripe {
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--cyan-light));
    opacity: 0.3;
    transition: opacity 0.3s;
}

.board-card:hover .board-card-stripe { opacity: 0.7; }

.board-card-body { padding: 22px; }

.board-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.board-tenant-avatar {
    width: 38px; height: 38px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 16px;
}

.board-tenant-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.board-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.board-called-number {
    font-family: var(--font-mono);
    font-size: 54px;
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 1;
    margin-bottom: 4px;
}

.board-called-number.has-queue {
    background: linear-gradient(135deg, var(--accent), var(--cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.board-called-number.no-queue { color: var(--border-bright); }

.board-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.waiting-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-muted);
    animation: chipPop 0.2s ease both;
}

@keyframes chipPop {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); }
}

.no-waiting {
    font-size: 12.5px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Spotlight animation on board card */
.board-spotlight {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15), var(--shadow-blue-lg) !important;
    transform: translateY(-4px) scale(1.01);
    z-index: 2;
}

.board-spotlight .board-card-stripe {
    opacity: 1;
    animation: stripeFlash 1.5s ease;
}

.board-spotlight .board-called-number.has-queue {
    animation: numberGlow 1.5s ease;
}

@keyframes stripeFlash {
    0% { opacity: 0.3; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0.7; }
}

@keyframes numberGlow {
    0%, 100% { filter: brightness(1); }
    30%       { filter: brightness(1.3) drop-shadow(0 0 10px rgba(37,99,235,0.5)); }
}

/* Board skeletons */
.skeleton-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 180px;
}

.skeleton-stripe { height: 4px; background: var(--surface2); }

.skeleton-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; }

.skeleton-line {
    background: var(--surface2);
    border-radius: 6px;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1; }
}

/* Offline banner */
.offline-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220,38,38,0.08);
    border: 1px solid rgba(220,38,38,0.25);
    border-radius: var(--radius-md);
    padding: 10px 22px;
    font-size: 13px;
    color: var(--danger);
    display: none;
    align-items: center;
    gap: 9px;
    z-index: 200;
    backdrop-filter: blur(10px);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── EMPTY STATES ──────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    width: 64px; height: 64px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    color: var(--text-dim);
    margin: 0 auto 14px;
}

.empty-state p { font-size: 14px; }

/* ── KIOSK FOOTER ──────────────────────────────────────────────── */
.kiosk-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-dim);
    background: var(--surface);
}

/* ── SECTION LABEL ─────────────────────────────────────────────── */
.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

/* ── UTILITIES ─────────────────────────────────────────────────── */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.justify-between { justify-content: space-between; }

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .queue-hero { flex-direction: column; align-items: flex-start; }
    .queue-number { font-size: 48px; }
    .action-group { flex-direction: column; width: 100%; }
    .action-group .btn { width: 100%; }
    .tenant-grid { grid-template-columns: 1fr 1fr; }
    .auth-card { padding: 32px 24px; }
    .ticket-card { padding: 36px 24px; }
    .ticket-number { font-size: 64px; }
}

@media (max-width: 400px) {
    .tenant-grid { grid-template-columns: 1fr; }
}