:root {
    color-scheme: light;
    --ink: #10213d;
    --muted: #52627b;
    --blue: #2563eb;
    --purple: #7c3aed;
    --line: #dce5f1;
    --surface: rgba(255, 255, 255, 0.88);
}

* { box-sizing: border-box; }

body, body.bg-slate-100 {
    color: var(--ink);
    background:
        radial-gradient(ellipse at 8% 8%, rgba(186, 230, 253, 0.58), transparent 32rem),
        radial-gradient(ellipse at 94% 15%, rgba(233, 213, 255, 0.52), transparent 30rem),
        linear-gradient(180deg, #f8fbff 0%, #fff 55%, #f8fafc 100%);
    font-family: "Montserrat", sans-serif;
}

button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #0e7490;
    outline-offset: 3px;
}

.glass-panel {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 8px 32px rgba(16, 33, 61, 0.08);
    backdrop-filter: blur(16px);
}

.glass-inner {
    border-color: var(--line);
    background: rgba(248, 250, 252, 0.9);
}

.btn-gradient-blue {
    border: 0;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 5px 16px rgba(16, 33, 61, 0.16);
}

.btn-gradient-blue:hover { background: #263e67; }

.queue-item.active {
    border-left-color: var(--blue);
    background: rgba(239, 246, 255, 0.88);
    box-shadow: inset 3px 0 0 rgba(37, 99, 235, 0.08);
}

body::before { content: none; }

body.bg-slate-100 main {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
    padding: 32px 0 56px;
}

body.bg-slate-100 main > header { margin-bottom: 22px; }
body.bg-slate-100 main > header h1 { color: var(--ink); font-size: clamp(1.6rem, 3vw, 2rem); }
body.bg-slate-100 main > header p { color: var(--muted); line-height: 1.65; }

body.bg-slate-100 main > section {
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 32px rgba(16, 33, 61, 0.06);
}

body.bg-slate-100 main > section h2 {
    color: var(--ink);
    font-weight: 800;
}

body.bg-slate-100 #start {
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    padding: 11px 20px;
    font-weight: 700;
}

body.bg-slate-100 #start:hover:not(:disabled) { background: #263e67; }

body.bg-slate-100 input, body.bg-slate-100 select {
    border-color: #cbd5e1;
    border-radius: 9px;
    background-color: #fff;
    color: var(--ink);
}

.admin-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
}

.admin-topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid rgba(203, 213, 225, 0.72);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
}

.admin-topbar-inner {
    display: flex;
    width: min(1280px, calc(100% - 40px));
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 auto;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.admin-brand img { width: 48px; height: 48px; object-fit: contain; }

.admin-wrap {
    width: min(1280px, calc(100% - 40px));
    margin: 32px auto 64px;
}

.admin-eyebrow {
    margin: 0 0 10px;
    color: #4f46a5;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.admin-title {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.admin-muted { color: var(--muted); }

.admin-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(16, 33, 61, 0.06);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.admin-stat {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
}

.admin-stat-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-stat-value {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 1.65rem;
    font-weight: 800;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-tab {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.admin-tab:hover { background: #f1f5f9; }

.admin-tab[aria-selected="true"] {
    border-color: #bfdbfe;
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-input, .admin-select {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font-size: 0.85rem;
}

.admin-search { width: min(320px, 100%); }

.admin-table-wrap { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 13px 16px;
    background: rgba(248, 250, 252, 0.9);
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table td {
    padding: 15px 16px;
    border-top: 1px solid #edf1f7;
    color: #334155;
    font-size: 0.82rem;
    vertical-align: middle;
}

.admin-table tr:hover td { background: rgba(248, 250, 252, 0.72); }

.admin-user-name { color: var(--ink); font-weight: 700; }
.admin-user-email { margin-top: 3px; color: var(--muted); font-size: 0.72rem; }

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid #dce5f1;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-badge--approved, .admin-badge--active {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.admin-badge--pending {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.admin-badge--rejected, .admin-badge--inactive {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }

.admin-button {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-button:hover:not(:disabled) { border-color: #94a3b8; background: #f8fafc; }
.admin-button:disabled { cursor: not-allowed; opacity: 0.5; }
.admin-button--primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.admin-button--primary:hover:not(:disabled) { border-color: #263e67; background: #263e67; }
.admin-button--danger { border-color: #fecaca; color: #b91c1c; }
.admin-button--danger:hover:not(:disabled) { background: #fef2f2; }

.admin-notice {
    padding: 12px 15px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.78rem;
    line-height: 1.6;
}

.admin-status {
    display: none;
    margin-bottom: 18px;
    padding: 12px 15px;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    background: #f0fdf4;
    color: #166534;
    font-size: 0.82rem;
}

.admin-status[data-kind="error"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.admin-status[data-visible="true"] { display: block; }

.admin-empty {
    padding: 44px 20px;
    color: var(--muted);
    text-align: center;
}

.admin-dialog {
    width: min(480px, calc(100% - 28px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(16, 33, 61, 0.24);
}

.admin-dialog::backdrop { background: rgba(15, 23, 42, 0.48); backdrop-filter: blur(3px); }
.admin-dialog-inner { padding: 24px; }
.admin-field { display: grid; gap: 7px; margin: 16px 0; }
.admin-field label { color: #334155; font-size: 0.76rem; font-weight: 700; }
.admin-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }

.admin-login {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.admin-login-card {
    width: min(500px, 100%);
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 16px 48px rgba(16, 33, 61, 0.12);
}

@media (max-width: 760px) {
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-topbar-inner { width: min(100% - 28px, 1280px); min-height: 68px; }
    .admin-wrap { width: min(100% - 28px, 1280px); margin-top: 22px; }
    .admin-toolbar { align-items: stretch; }
    .admin-search { width: 100%; }
}

@media (max-width: 420px) {
    .admin-stats { gap: 9px; }
    .admin-stat { padding: 14px; }
    .admin-stat-value { font-size: 1.4rem; }
    .admin-topbar-inner { gap: 10px; }
}
