@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,700;1,700&family=JetBrains+Mono:wght@400;500&display=swap');

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

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    --primary:        #2563eb;
    --primary-hover:  #1d4ed8;
    --primary-faint:  rgba(37,99,235,.08);
    --bg:             #ffffff;
    --bg-muted:       #f8fafc;
    --bg-subtle:      #f1f5f9;
    --border:         #e2e8f0;
    --border-strong:  #cbd5e1;
    --text:           #0f172a;
    --text-2:         #475569;
    --text-3:         #94a3b8;
    --header-bg:      #111827;
    --header-text:    #f9fafb;
    --success:        #059669;
    --error:          #dc2626;
    --warn:           #d97706;
    --purple:         #7c3aed;
    --code-bg:        #f1f5f9;
    --radius-sm:      3px;
    --radius:         5px;
    --radius-lg:      8px;
    --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
    --shadow:         0 4px 12px rgba(0,0,0,.1);

    /* Overridable by appearance panel */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --base-font-size: 14px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body {
    font-family: var(--font-family);
    font-size: var(--base-font-size);
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 0 1.25rem;
    height: 44px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    color: var(--header-text);
}

.logo img {
    max-height: 28px;
    max-width: 120px;
    object-fit: contain;
}

.breadcrumbs {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    overflow-x: auto;
    white-space: nowrap;
    color: rgba(249,250,251,.5);
}

.breadcrumbs a {
    color: rgba(249,250,251,.75);
    text-decoration: none;
    transition: color .15s;
}
.breadcrumbs a:hover { color: var(--header-text); }
.breadcrumbs .separator { opacity: .4; }

.header-actions {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.user-email {
    font-size: 0.75rem;
    color: rgba(249,250,251,.65);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 44px);
}

.content-area {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ── Left Sidebar ────────────────────────────────────────────────────────── */
.sidebar {
    width: 230px;
    background: var(--bg-muted);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-2);
}

.tree {
    padding: 0.4rem 0.5rem;
    font-size: 0.82rem;
}

.tree-item-container { margin: 0; }

.tree-item {
    padding: 0.18rem 0.4rem;
    border-radius: var(--radius-sm);
    user-select: none;
    position: relative;
    margin: 0.05rem 0;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.tree-item.active .tree-name {
    font-weight: 600;
    color: var(--primary);
}

.tree-expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-3);
    cursor: pointer;
    flex-shrink: 0;
    transition: color .15s, transform .15s;
}
.tree-expand-icon:hover { color: var(--primary); }

.tree-name {
    cursor: pointer;
    flex: 1;
    padding: 0.08rem 0.2rem;
    border-radius: var(--radius-sm);
    transition: background .12s;
    color: var(--text);
}
.tree-name:hover { background: rgba(0,0,0,.05); }
.tree-item.active .tree-name:hover { background: var(--primary-faint); }

.tree-item::before {
    content: '';
    position: absolute;
    left: -0.6rem;
    top: 50%;
    width: 0.6rem;
    height: 1px;
    background: var(--border-strong);
    opacity: .5;
}

.tree-children {
    margin-left: 0.65rem;
    padding-left: 0.4rem;
    border-left: 1px solid var(--border);
    display: none;
}
.tree-children.expanded { display: block; }

/* ── Main Content ────────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
}

.content-view {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.content-wrapper {
    flex: 1;
    max-width: 860px;
}

/* ── Article Typography ──────────────────────────────────────────────────── */
.content-view article {
    line-height: 1.7;
}

.content-view h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.4rem;
    line-height: 1.2;
}

.content-view h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.45rem;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.content-view h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
}

.content-view h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.content-view p { margin-bottom: 0.75rem; }

.content-view ul, .content-view ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-view li { margin-bottom: 0.3rem; }

.content-view code {
    background: var(--code-bg);
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    color: var(--primary);
}

.content-view pre {
    background: var(--header-bg);
    color: #e2e8f0;
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
}

.content-view pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.content-view blockquote {
    border-left: 3px solid var(--primary);
    padding: 0.2rem 0 0.2rem 0.9rem;
    margin: 0.75rem 0;
    color: var(--text-2);
    font-style: italic;
}

.content-view a { color: var(--primary); text-decoration: none; }
.content-view a:hover { text-decoration: underline; }

.content-view a.wikilink { color: var(--primary); font-weight: 500; }
.content-view a.wikilink-new { color: #b45309; font-weight: 500; }
.content-view a.wikilink-new:hover { color: #92400e; }

.content-view img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 0.75rem 0;
}

.content-view table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.75rem 0;
    font-size: 0.88rem;
}

.content-view th, .content-view td {
    border: 1px solid var(--border);
    padding: 0.4rem 0.65rem;
    text-align: left;
}

.content-view th {
    background: var(--bg-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-2);
}

.content-view hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* ── Right Sidebar ───────────────────────────────────────────────────────── */
.right-sidebar {
    width: 210px;
    flex-shrink: 0;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    align-self: flex-start;
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    font-size: 0.82rem;
}

.right-sidebar h2, .right-sidebar h3 {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin: 0.75rem 0 0.35rem;
}
.right-sidebar h2:first-child, .right-sidebar h3:first-child { margin-top: 0; }

.right-sidebar ul { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.right-sidebar li { margin: 0.15rem 0; }
.right-sidebar a { color: var(--text-2); text-decoration: none; }
.right-sidebar a:hover { color: var(--primary); text-decoration: underline; }

/* ── Page Footer ─────────────────────────────────────────────────────────── */
.page-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: 0.8rem;
}

.global-footer {
    background: var(--bg-muted);
    border-top: 1px solid var(--border);
    padding: 0.6rem 1.25rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-3);
    flex-shrink: 0;
}

/* ── Editor ──────────────────────────────────────────────────────────────── */
.content-edit {
    height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
}

.editor-path {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 0.78rem;
}

.path-label { font-weight: 600; color: var(--text-3); }

.path-value {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
    font-size: 0.78rem;
}

#editor {
    flex: 1;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.85rem;
    resize: none;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}
#editor:focus { outline: none; }

.editor-toolbar {
    display: flex;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--bg-muted);
    align-items: center;
}

.help-link {
    margin-left: auto;
    color: var(--text-3);
    text-decoration: none;
    font-size: 0.78rem;
    transition: color .15s;
}
.help-link:hover { color: var(--primary); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    transition: background .12s, border-color .12s, color .12s;
    white-space: nowrap;
    line-height: 1.4;
}
.btn:hover { background: var(--bg-subtle); border-color: var(--border-strong); }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-danger { background: var(--error); color: #fff; border-color: var(--error); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

.btn-small { padding: 0.22rem 0.55rem; font-size: 0.75rem; }

.btn-admin { background: var(--purple); color: #fff; border-color: var(--purple); }
.btn-admin:hover { background: #6d28d9; border-color: #6d28d9; }

.btn-icon {
    padding: 0.2rem 0.4rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-3);
    transition: color .15s;
}
.btn-icon:hover { color: var(--text); }

/* ── Admin Panel ─────────────────────────────────────────────────────────── */

.admin-session-banner {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    border-radius: 6px;
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.admin-session-banner a {
    color: #92400e;
    font-weight: 600;
    text-decoration: underline;
}

.admin-view {
    padding: 1.25rem 1.5rem;
    max-width: 720px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.admin-header h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.admin-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Each admin section is a compact card */
.admin-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.admin-section h3 {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 0.45rem 0.75rem;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border);
    margin: 0;
}

/* Apply section body padding to div/form containers, never to naked buttons */
.admin-section > div,
.admin-section > form {
    padding: 0.75rem;
}

/* Special pages list — horizontal rows */
.special-pages-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.special-page-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.special-page-item:last-child { border-bottom: none; }

.page-icon { font-size: 0.9rem; }

.page-name {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
}

/* Logo controls */
.logo-controls {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.logo-preview {
    padding: 0.6rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-preview img { max-width: 100%; max-height: 60px; object-fit: contain; }

.logo-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* Appearance controls */
.appearance-controls {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.control-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Auth config */
.auth-config {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.auth-status-row {
    display: flex;
    gap: 1.25rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.auth-status-item { color: var(--text-2); }

.auth-save-row { padding-top: 0.2rem; }

.supabase-config-body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.supabase-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.2rem;
}

.supabase-links {
    display: flex;
    gap: 0.75rem;
    font-size: 0.78rem;
}

.supabase-links a {
    color: var(--primary);
    text-decoration: none;
}
.supabase-links a:hover { text-decoration: underline; }

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.82rem;
    font-weight: 500;
}

.toggle-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Info box — used for supabase setup/management */
.info-box {
    padding: 0.75rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}

.info-box h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-2);
    margin: 0 0 0.5rem;
}

.info-box ol, .info-box ul {
    margin: 0.35rem 0;
    padding-left: 1.25rem;
}

.info-box li { margin: 0.2rem 0; }

.info-box pre {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    margin: 0.4rem 0;
}

.info-box code {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}

.info-box a { color: var(--primary); text-decoration: none; }
.info-box a:hover { text-decoration: underline; }

/* Form inputs */
.select-input, .text-input {
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.82rem;
    font-family: inherit;
    transition: border-color .12s, box-shadow .12s;
    width: 100%;
    box-sizing: border-box;
}

.text-input { font-family: 'JetBrains Mono', monospace; }

.select-input { cursor: pointer; }

.select-input:hover, .text-input:hover { border-color: var(--border-strong); }

.select-input:focus, .text-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-faint);
}

/* Text helpers */
.help-text {
    font-size: 0.75rem;
    color: var(--text-3);
    line-height: 1.4;
    margin: 0;
}

.warning-text { font-size: 0.8rem; color: var(--warn); }
.error-text { font-size: 0.8rem; color: var(--error); }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }

.modal-content {
    background: var(--bg);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.modal-content.modal-large { max-width: 740px; }

.modal-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-3);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background .12s, color .12s;
}
.modal-close:hover { background: var(--bg-subtle); color: var(--text); }

.modal-body {
    padding: 0.85rem 1rem;
}

.modal-body label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-body input[type="text"],
.modal-body input[type="file"],
.modal-body textarea {
    width: 100%;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: border-color .12s;
}

.modal-body input[type="text"]:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-faint);
}

.modal-body input[type="file"] { padding: 0.35rem 0; }

.modal-body textarea {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    resize: vertical;
    line-height: 1.5;
}

.modal-footer {
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    background: var(--bg-muted);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* References / warnings in modals */
.references-info {
    margin-top: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.references-list {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    max-height: 120px;
    overflow-y: auto;
}

.references-list div {
    padding: 0.15rem 0;
    color: var(--text-2);
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 0.35rem 0.75rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-3);
    transition: color .12s, border-color .12s;
    margin-bottom: -1px;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Image list ─────────────────────────────────────────────────────────── */
.image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.4rem;
}

.image-item {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color .15s;
}
.image-item:hover { border-color: var(--primary); }
.image-item img { width: 100%; height: 72px; object-fit: cover; display: block; }

/* ── Notification ────────────────────────────────────────────────────────── */
.notification {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    padding: 0.55rem 1rem;
    background: var(--header-bg);
    color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s;
    z-index: 1001;
}
.notification.show { opacity: 1; transform: translateY(0); }
.notification.success { background: var(--success); }
.notification.error { background: var(--error); }

/* ── OAuth Buttons ───────────────────────────────────────────────────────── */
.btn-oauth {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .15s;
}
.btn-oauth:hover { opacity: .88; }

.btn-github { background: #24292e; color: #fff; border-color: #24292e; }
.btn-discord { background: #5865F2; color: #fff; border-color: #5865F2; }

/* ── User Management Table ───────────────────────────────────────────────── */
.user-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.user-table th { text-align: left; padding: 0.3rem 0.5rem; color: var(--text-3); font-weight: 600; border-bottom: 1px solid var(--border); }
.user-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--bg-subtle); }
.user-table tr:last-child td { border-bottom: none; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -230px;
        height: 100%;
        transition: left .25s;
        z-index: 99;
    }
    .sidebar.open { left: 0; }
    .main-content { padding: 1rem; }
    .header-content { gap: 0.5rem; }
    .breadcrumbs { font-size: 0.72rem; }
    .right-sidebar { display: none; }
}
