:root {
    --bg: #f3f6fb;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --border: rgba(15, 23, 42, 0.08);
    --text: #0f172a;
    --muted: #64748b;
    --brand: #0f766e;
    --brand-dark: #134e4a;
    --brand-soft: #ccfbf1;
    --accent: #f97316;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 26%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.14), transparent 28%),
        var(--bg);
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px 1fr;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 1.25rem;
    background: linear-gradient(180deg, #0f172a 0%, #112641 100%);
    color: #e2e8f0;
    position: sticky;
    top: 0;
    min-height: 100vh;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.sidebar-title {
    margin: 1rem 0 0.25rem;
    font-size: 1.25rem;
}

.sidebar-subtitle,
.footer-note,
.eyebrow {
    color: #94a3b8;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    transition: 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.content-area {
    padding: 2rem;
}

.content-topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: clamp(1.7rem, 2vw, 2.4rem);
    font-weight: 700;
}

.panel,
.stat-card,
.login-card,
.public-card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 24px;
    backdrop-filter: blur(12px);
}

.panel {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.35rem;
    height: 100%;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

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

.table thead th {
    background: rgba(15, 23, 42, 0.04);
    color: var(--muted);
    border-bottom-width: 1px;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-soft {
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-weight: 600;
}

.qr-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.filter-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.login-shell,
.public-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-card,
.public-card {
    width: min(100%, 520px);
    padding: 2rem;
}

.login-hero {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
}

.public-card {
    text-align: center;
}

.public-pill {
    display: inline-flex;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.scanner-shell {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1.2fr 0.8fr;
}

.scanner-box {
    min-height: 320px;
    border: 2px dashed rgba(15, 118, 110, 0.3);
    border-radius: 24px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(240, 253, 250, 0.92));
}

.theme-swatch {
    width: 100%;
    height: 66px;
    border-radius: 18px;
    border: 1px solid var(--border);
}

.timeline-bar {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.timeline-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}

@media (max-width: 991px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        min-height: auto;
    }

    .content-area {
        padding: 1rem;
    }

    .scanner-shell {
        grid-template-columns: 1fr;
    }
}
