/* ── Layout ─────────────────────────────────────────────────────── */
html, body { height: 100%; margin: 0; }

.admin-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 220px;
    min-width: 220px;
    background: #0d1117;
    border-right: 1px solid #21262d;
    overflow-y: auto;
}

.sidebar-brand { font-size: 1rem; }

.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: #0d1117;
}

/* ── Nav pills ──────────────────────────────────────────────────── */
.sidebar .nav-link {
    color: #8b949e;
    font-size: .875rem;
    padding: .4rem .75rem;
    border-radius: .375rem;
    transition: background .15s, color .15s;
}
.sidebar .nav-link:hover  { background: #21262d; color: #e6edf3; }
.sidebar .nav-link.active { background: #1f6feb20; color: #58a6ff; }

/* ── Stat cards ─────────────────────────────────────────────────── */
.stat-card {
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: .75rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-card .stat-icon {
    font-size: 1.75rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: .8rem; color: #8b949e; margin-top: .2rem; }

/* ── Tables ─────────────────────────────────────────────────────── */
.admin-table { font-size: .85rem; }
.admin-table thead th {
    background: #161b22;
    color: #8b949e;
    font-weight: 500;
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .05em;
    border-bottom: 1px solid #21262d;
}
.admin-table tbody tr { border-bottom: 1px solid #21262d; }
.admin-table tbody tr:hover { background: #161b22; }
.admin-table td { vertical-align: middle; color: #e6edf3; }

/* ── Page header ────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.25rem; font-weight: 600; margin: 0; }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge-google  { background: #1a73e820; color: #58a6ff; }
.badge-email   { background: #2ea04320; color: #3fb950; }
.badge-guest   { background: #8b949e20; color: #8b949e; }

/* ── SPARQL editor ──────────────────────────────────────────────── */
.sparql-editor {
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    font-size: .85rem;
    background: #0d1117;
    color: #e6edf3;
    border: 1px solid #21262d;
    border-radius: .5rem;
    resize: vertical;
    min-height: 160px;
}
.sparql-editor:focus { outline: none; border-color: #1f6feb; box-shadow: 0 0 0 3px #1f6feb30; }

/* ── Loading spinner ────────────────────────────────────────────── */
.loading-overlay {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #8b949e;
    padding: 3rem 0;
}

/* ── Login page ─────────────────────────────────────────────────── */
.login-wrapper {
    display: flex;
    height: 100vh;
    align-items: center;
    justify-content: center;
    background: #0d1117;
}
.login-card {
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
}
