:root {
    /* Improving brand palette (matches GuestCheckin/Utilities/Theme.swift) */
    --brand:           #005596;
    --brand-light:     #4597D3;
    --brand-dark:      #0A1628;
    --brand-tint:      #E8F1F8;
    --brand-tint-hover: #DAE7F2;

    --accent-green:    #5BC2A7;
    --accent-green-bg: #E8F7F2;
    --accent-orange:   #F5BB41;
    --accent-orange-bg:#FDF3DC;
    --accent-purple:   #9D1D96;
    --accent-red:      #DC2626;
    --accent-red-bg:   #FEF2F2;

    --surface:         #F6F8FB;
    --surface-2:       #EEF1F6;
    --card:            #FFFFFF;
    --border:          #E5E9F0;
    --border-light:    #F1F3F8;

    --ink:             #0A1628;
    --text:            #111827;
    --text-secondary:  #4B5563;
    --text-muted:      #9CA3AF;

    --radius:          14px;
    --radius-sm:       10px;
    --radius-xs:       6px;

    --shadow-sm:       0 1px 2px rgba(10,22,40,0.04);
    --shadow:          0 2px 6px rgba(10,22,40,0.05), 0 1px 2px rgba(10,22,40,0.04);
    --shadow-md:       0 8px 24px -8px rgba(10,22,40,0.10), 0 3px 8px -4px rgba(10,22,40,0.06);
    --shadow-lg:       0 20px 40px -12px rgba(10,22,40,0.14), 0 8px 16px -8px rgba(10,22,40,0.08);
    --shadow-xl:       0 30px 60px -15px rgba(10,22,40,0.20);

    --transition:      180ms cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: 120ms ease-out;

    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

@import url('https://rsms.me/inter/inter.css');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { font-family: var(--font-display); }

body {
    background: var(--surface);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
}

::selection {
    background: rgba(0, 85, 150, 0.18);
    color: var(--brand-dark);
}

.screen { display: none; }
.screen.active { display: block; }

/* ── Login ──────────────────────────────────── */

#login-screen {
    min-height: 100vh;
    background:
        radial-gradient(1200px circle at 18% 25%, rgba(69, 151, 211, 0.18) 0%, transparent 55%),
        radial-gradient(900px circle at 88% 78%, rgba(0, 85, 150, 0.22) 0%, transparent 50%),
        radial-gradient(700px circle at 50% 100%, rgba(157, 29, 150, 0.10) 0%, transparent 60%),
        linear-gradient(160deg, #061222 0%, #0A1628 65%, #061222 100%);
    position: relative;
    overflow: hidden;
}

#login-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
    mask-image: radial-gradient(900px circle at center, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(900px circle at center, black 0%, transparent 75%);
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--card);
    border-radius: 24px;
    padding: 52px 48px 36px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.login-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-light) 50%, var(--accent-purple) 100%);
}

.login-brand {
    text-align: center;
    margin-bottom: 36px;
}

.logo-mark {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
    border-radius: 18px;
    margin: 0 auto 20px;
    position: relative;
    box-shadow: 0 8px 24px -6px rgba(0, 85, 150, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-mark::after {
    content: "i";
    color: white;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px;
    letter-spacing: -1.5px;
    line-height: 1;
    margin-top: 2px;
}

.logo-mark.sm {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    margin: 0;
    box-shadow: 0 4px 12px -2px rgba(0, 85, 150, 0.35);
}

.logo-mark.sm::after { font-size: 18px; margin-top: 1px; }

.login-brand h1 {
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.6px;
    margin-bottom: 2px;
}

.login-brand p {
    color: var(--text-muted);
    font-size: 14px;
}

.btn-ms-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: var(--card);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid #8C8C8C;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-ms-signin:hover { background: #F5F5F5; border-color: #5E5E5E; transform: translateY(-1px); }
.btn-ms-signin:active { transform: translateY(0); background: #E0E0E0; }
.btn-ms-signin:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.field-error {
    color: var(--accent-red);
    font-size: 13px;
    margin-top: 14px;
    line-height: 1.4;
}

.field-error.center { text-align: center; }

.login-fineprint {
    margin-top: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* ── Buttons ────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 8px 14px;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 85, 150, 0.2);
}

.btn-primary:hover { background: #00467D; box-shadow: 0 4px 12px -2px rgba(0, 85, 150, 0.4); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border-radius: var(--radius);
}

.btn-outline {
    background: var(--card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-tint);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.btn-sm {
    font-size: 12px;
    padding: 5px 11px;
    border-radius: var(--radius-xs);
}

.btn-action-primary {
    background: var(--brand);
    color: white;
}
.btn-action-primary:hover { background: #00467D; }

.btn-action-success {
    background: var(--accent-green);
    color: white;
}
.btn-action-success:hover { background: #4FAE94; }

/* ── Header ─────────────────────────────────── */

header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
}

.header-inner {
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-text {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-nav {
    display: flex;
    gap: 4px;
    margin-right: 8px;
}

.nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active {
    color: var(--brand);
    background: var(--brand-tint);
    font-weight: 600;
}

.nav-link[hidden] { display: none !important; }

/* Form labels (used in the User Group modal) */
.form-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-label small { font-weight: 400; }

.form-label input,
.form-label select,
.form-label textarea {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--card);
    outline: none;
    transition: all var(--transition-fast);
    resize: vertical;
}

.form-label input:focus,
.form-label select:focus,
.form-label textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 85, 150, 0.10);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 14px 4px 4px;
    background: var(--surface-2);
    border-radius: 999px;
    border: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.user-chip:hover { border-color: var(--border); }

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.user-name {
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Main ───────────────────────────────────── */

main {
    max-width: 1560px;
    margin: 0 auto;
    padding: 28px 32px 56px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text);
    margin-bottom: 20px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: -16px;
    margin-bottom: 24px;
}

/* ── Stats Grid ─────────────────────────────── */

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px 22px 20px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--brand);
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card:hover::before { opacity: 1; }

.stat-card .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: var(--brand-tint);
    color: var(--brand);
}

.stat-card.today .stat-icon { background: var(--brand-tint); color: var(--brand); }
.stat-card.active .stat-icon { background: var(--accent-green-bg); color: var(--accent-green); }
.stat-card.verified .stat-icon { background: var(--accent-green-bg); color: var(--accent-green); }
.stat-card.unverified .stat-icon { background: var(--accent-orange-bg); color: #B97D0E; }

.stat-card .stat-icon svg { width: 18px; height: 18px; }

.stat-value {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.8px;
    line-height: 1.1;
    color: var(--text);
    font-feature-settings: "tnum";
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ── Charts Row ─────────────────────────────── */

.charts-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 22px 24px 18px;
    transition: box-shadow var(--transition);
}

.chart-card:hover { box-shadow: var(--shadow-md); }

.chart-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.chart-card-head h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.1px;
}

.chart-card-head .chart-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.chart-canvas-wrap {
    height: 220px;
    position: relative;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* ── Panel / Table ──────────────────────────── */

.panel {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.panel:hover { box-shadow: var(--shadow); }

.panel-toolbar {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, var(--card), rgba(246, 248, 251, 0.4));
}

.panel-toolbar h2 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
    white-space: nowrap;
    color: var(--text);
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    padding: 7px 12px 7px 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    width: 260px;
    outline: none;
    transition: all var(--transition-fast);
    color: var(--text);
    background: var(--card);
}

.search-box input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 85, 150, 0.10);
}

.select-control {
    padding: 7px 32px 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--card);
    color: var(--text);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color var(--transition-fast);
}

.select-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 85, 150, 0.10); }

/* ── Table ──────────────────────────────────── */

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

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--surface);
    position: sticky;
    top: 0;
}

th {
    padding: 11px 18px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.th-actions { text-align: right; }

td {
    padding: 14px 18px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text);
}

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

tbody tr {
    transition: background var(--transition-fast);
}

tbody tr:hover td { background: rgba(0, 85, 150, 0.025); }

.cell-name {
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cell-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-tint) 0%, var(--surface-2) 100%);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    text-transform: uppercase;
}

.cell-secondary {
    color: var(--text-secondary);
}

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

.cell-mono {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 80px 20px !important;
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Badges ─────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.badge-active { background: var(--accent-green-bg); color: #0F8A6E; }
.badge-active::before { background: var(--accent-green); }

.badge-out { background: var(--surface-2); color: var(--text-muted); }
.badge-out::before { background: var(--text-muted); }

.badge-auto { background: var(--accent-orange-bg); color: #B97D0E; }
.badge-auto::before { background: var(--accent-orange); }

.badge-manual {
    background: var(--accent-red-bg);
    color: #991B1B;
    cursor: help;
}
.badge-manual::before { background: #DC2626; }

.badge-verified {
    background: var(--accent-green-bg);
    color: #0F8A6E;
    cursor: help;
}
.badge-verified::before { background: var(--accent-green); }

.badge-unverified {
    background: var(--surface-2);
    color: var(--text-muted);
}
.badge-unverified::before { background: var(--text-muted); }

.badge-mini {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.badge-mini.auto {
    background: var(--accent-orange-bg);
    color: #B07B0F;
}

/* ── Action Cells ───────────────────────────── */

.actions-cell {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* ── Panel Footer ───────────────────────────── */

.panel-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-muted);
    background: var(--card);
}

/* ── Modal ──────────────────────────────────── */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal[hidden] { display: none; }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-dialog {
    position: relative;
    background: var(--card);
    border-radius: 20px;
    max-width: 940px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 0;
}

.modal-head h3 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.modal-verify-meta {
    margin: 12px 28px 0;
    padding: 10px 14px;
    background: var(--accent-green-bg);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: #0F8A6E;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-verify-meta.unverified {
    background: var(--surface-2);
    color: var(--text-secondary);
}

.modal-verify-meta.skipped {
    background: var(--accent-red-bg);
    color: #991B1B;
    border: 1px solid rgba(220, 38, 38, 0.25);
    font-weight: 600;
    padding: 14px 16px;
    margin: 16px 28px 28px;
    line-height: 1.5;
}

.modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.modal-close-btn:hover { background: var(--border); color: var(--text); }

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

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

.photo-frame {
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

.photo-placeholder {
    color: var(--text-muted);
    font-size: 13px;
}

.photo-label {
    display: block;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ── Host Verify View ───────────────────────── */

#verify-screen {
    min-height: 100vh;
    background:
        radial-gradient(1200px circle at 20% 20%, rgba(69, 151, 211, 0.15) 0%, transparent 55%),
        radial-gradient(900px circle at 80% 80%, rgba(0, 85, 150, 0.18) 0%, transparent 50%),
        linear-gradient(160deg, #061222 0%, #0A1628 65%, #061222 100%);
    padding: 24px;
}

.verify-container {
    max-width: 1000px;
    margin: 0 auto;
}

.verify-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px 28px;
}

.verify-topbar .header-brand .brand-text { color: white; }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-right .user-chip {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}
.topbar-right .user-name { color: rgba(255, 255, 255, 0.9); }
.topbar-right .btn-ghost { color: rgba(255, 255, 255, 0.75); }
.topbar-right .btn-ghost:hover { color: white; background: rgba(255, 255, 255, 0.08); }

.verify-content {
    background: var(--card);
    border-radius: 24px;
    padding: 40px 40px 32px;
    box-shadow: var(--shadow-xl);
}

.verify-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 80px 20px;
    font-size: 15px;
}

.verify-eyebrow {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--brand);
}

.verify-heading {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-top: 6px;
    color: var(--text);
    line-height: 1.2;
}

.verify-sub {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
    max-width: 640px;
}

.visitor-info {
    margin-top: 28px;
    padding: 22px 24px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.visitor-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
}

.visitor-meta {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 13.5px;
    color: var(--text-secondary);
}

.meta-sep { color: var(--text-muted); }

.verify-photos {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1.4fr;
    gap: 18px;
    margin-top: 24px;
}

.verify-photo {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.verify-photo .photo-label {
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    color: var(--text-muted);
}

.verify-photo .photo-frame {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: zoom-in;
    transition: all var(--transition);
}

.verify-photo .photo-frame:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.verify-photo.selfie .photo-frame {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    max-width: 200px;
    margin: 0 auto;
}

.verify-photo.selfie .photo-label { text-align: center; }

.verify-photo.license .photo-frame { aspect-ratio: 16 / 10; }

.verify-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 300ms ease;
}

.verify-photo img.loaded { opacity: 1; }

.verify-photo .photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 16px;
    text-align: center;
}

.verify-fineprint {
    margin-top: 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

.verify-actions {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.btn-block-large {
    padding: 16px;
    font-size: 16px;
    border-radius: var(--radius);
}

.btn-verify {
    background: var(--accent-green);
    color: white;
    transition: all var(--transition);
}

.btn-verify:hover {
    background: #4FAE94;
    box-shadow: 0 8px 16px -4px rgba(91, 194, 167, 0.35);
    transform: translateY(-1px);
}

.btn-verify:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.verify-status {
    margin-top: 24px;
    padding: 16px 18px;
    background: var(--accent-green-bg);
    color: #0F8A6E;
    border: 1px solid rgba(91, 194, 167, 0.3);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
}

.verify-status .status-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex: 0 0 auto;
}

.verify-status .status-detail {
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: auto;
    font-size: 12px;
}

.verify-error {
    margin-top: 24px;
    padding: 18px;
    background: var(--accent-red-bg);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius);
    color: #991B1B;
    font-size: 14px;
    line-height: 1.5;
}

.verify-error h3 {
    font-size: 15px;
    margin-bottom: 4px;
}

.verify-error.skipped {
    padding: 24px;
    border-left: 6px solid #DC2626;
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    font-size: 15px;
}

.verify-error.skipped h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.verify-error.skipped p {
    margin-top: 6px;
}

/* Lightbox for zooming photos */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(10, 22, 40, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
    border-radius: 10px;
}

/* ── Toast ──────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 22px;
    background: var(--ink);
    color: white;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    animation: toastIn 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.toast[hidden] { display: none; }
.toast.success { background: var(--accent-green); }
.toast.error { background: var(--accent-red); }

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

/* ── Responsive ─────────────────────────────── */

@media (max-width: 1280px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .charts-row { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
    .search-box input { width: 200px; }
}

@media (max-width: 768px) {
    main { padding: 16px; }
    .stats-row { grid-template-columns: 1fr; }
    .panel-toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-controls { flex-direction: column; }
    .search-box input { width: 100%; }
    .select-control { width: 100%; }
    .photo-grid { grid-template-columns: 1fr; }
    .verify-photos { grid-template-columns: 1fr; }
    .verify-photo.selfie .photo-frame { max-width: 240px; }
    .verify-content { padding: 24px 20px; }
    .header-inner { padding: 0 16px; }
    th:nth-child(4), td:nth-child(4),
    th:nth-child(5), td:nth-child(5) { display: none; }
}
