/* ============================================================
   Admin Panel Styles
   Add this to your site.css or include as a separate stylesheet.
   ============================================================ */

/* ============================================================
   Picklly Admin Shell — CSS Variables
   ============================================================ */
:root {
    --adm-bg: #0f1117;
    --adm-surface: #181c27;
    --adm-surface-2: #1e2335;
    --adm-border: rgba(255, 255, 255, 0.07);
    --adm-border-hover: rgba(255, 255, 255, 0.14);
    --adm-gold: #fead01;
    --adm-gold-dim: rgba(254, 173, 1, 0.12);
    --adm-gold-glow: rgba(254, 173, 1, 0.28);
    --adm-cyan: #69defd;
    --adm-cyan-dim: rgba(105, 222, 253, 0.1);
    --adm-blue: #017ed1;
    --adm-text: #f2f4f8;
    --adm-text-muted: #a0a8bf;
    --adm-text-dim: #6b7494;
    --adm-topbar-h: 64px;
    --adm-sidebar-w: 224px;
    --adm-radius: 8px;
    --adm-transition: 0.22s ease;
}

/* ============================================================
   Picklly Admin Shell
   Replaces .admin-layout — outer wrapper for the new layout
   ============================================================ */
.admin-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--adm-bg);
    color: var(--adm-text);
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 15px;
}

    /* ── Top Navbar ── */
    .admin-shell .admin-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--adm-topbar-h);
        background: var(--adm-surface);
        border-bottom: 1px solid var(--adm-border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1.25rem;
        z-index: 300;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
    }

    .admin-shell .admin-topbar-left {
        display: flex;
        align-items: center;
        gap: 0.9rem;
    }

    .admin-shell .admin-topbar-right {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    /* Hamburger toggle */
    .admin-shell .sidebar-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
        border-radius: 6px;
        flex-shrink: 0;
        transition: background var(--adm-transition);
    }

        .admin-shell .sidebar-toggle:hover {
            background: rgba(255, 255, 255, 0.07);
        }

    .admin-shell .toggle-bar {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--adm-text-muted);
        border-radius: 1px;
        transition: background var(--adm-transition);
    }

    .admin-shell .sidebar-toggle:hover .toggle-bar {
        background: var(--adm-text);
    }

    /* Logo */
    .admin-shell .admin-brand {
        display: flex;
        align-items: center;
        text-decoration: none;
        flex-shrink: 0;
    }

    .admin-shell .admin-logo {
        height: 48px;
        width: auto;
        display: block;
        mix-blend-mode: lighten;
        transition: opacity var(--adm-transition);
    }

    .admin-shell .admin-brand:hover .admin-logo {
        opacity: 0.85;
    }

    /* Role badge */
    .admin-shell .admin-brand-label {
        font-size: 0.67rem;
        font-weight: 700;
        letter-spacing: 0.13em;
        text-transform: uppercase;
        color: var(--adm-gold);
        background: var(--adm-gold-dim);
        border: 1px solid rgba(254, 173, 1, 0.28);
        padding: 3px 9px;
        border-radius: 5px;
        white-space: nowrap;
        line-height: 1.6;
    }

    /* Back to site link */
    .admin-shell .admin-back-link {
        font-size: 0.82rem;
        font-weight: 500;
        color: var(--adm-text-muted);
        text-decoration: none;
        padding: 5px 10px;
        border-radius: 6px;
        transition: color var(--adm-transition), background var(--adm-transition);
        white-space: nowrap;
    }

        .admin-shell .admin-back-link:hover {
            color: var(--adm-text);
            background: rgba(255, 255, 255, 0.06);
        }

    /* Logout — overrides the global .btn-admin-logout below for the topbar context */
    .admin-shell .admin-logout-form {
        margin: 0;
    }

    .admin-shell .btn-admin-logout {
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--adm-text-muted);
        background: none;
        border: 1px solid var(--adm-border);
        padding: 5px 14px;
        border-radius: 6px;
        cursor: pointer;
        width: auto;
        transition: color var(--adm-transition), border-color var(--adm-transition), background var(--adm-transition);
        white-space: nowrap;
    }

        .admin-shell .btn-admin-logout:hover {
            color: #ef4444;
            border-color: rgba(239, 68, 68, 0.4);
            background: rgba(239, 68, 68, 0.06);
        }

    /* ── Body (topbar offset + flex row) ── */
    .admin-shell .admin-body {
        display: flex;
        padding-top: var(--adm-topbar-h);
        min-height: 100vh;
    }

    /* ── Sidebar ── */
    .admin-shell .admin-sidebar {
        position: fixed;
        top: var(--adm-topbar-h);
        left: 0;
        bottom: 0;
        width: var(--adm-sidebar-w);
        background: var(--adm-surface);
        border-right: 1px solid var(--adm-border);
        display: flex;
        flex-direction: column;
        padding: 0.75rem 0 1.5rem;
        overflow-y: auto;
        overflow-x: hidden;
        transition: width var(--adm-transition), border-color var(--adm-transition);
        z-index: 200;
        /* reset legacy values from old .admin-sidebar */
        height: auto;
        width: var(--adm-sidebar-w);
        scrollbar-width: thin;
        scrollbar-color: var(--adm-border) transparent;
    }

    .admin-shell.sidebar-collapsed .admin-sidebar {
        width: 0;
        border-right-color: transparent;
    }

    /* Section group labels */
    .admin-shell .sidebar-section-header {
        font-size: 0.63rem;
        font-weight: 700;
        letter-spacing: 0.13em;
        text-transform: uppercase;
        color: var(--adm-text-dim);
        padding: 1.1rem 1.25rem 0.3rem;
        white-space: nowrap;
        overflow: hidden;
        border-top: 1px solid var(--adm-border);
        margin-top: 0.5rem;
        pointer-events: none;
        user-select: none;
    }

        .admin-shell .sidebar-section-header:first-child {
            margin-top: 0;
            border-top: none;
        }

    /* Section wrapper */
    .admin-shell .sidebar-section {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 0 0.5rem;
    }

    /* Nav links — targets both NavLink <a> tags and .sidebar-link elements.
   Prefixed with .admin-shell so it never leaks to the public site. */
    .admin-shell .sidebar-link,
    .admin-shell .admin-sidebar a {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        padding: 0.55rem 0.85rem;
        border-radius: var(--adm-radius);
        text-decoration: none;
        color: var(--adm-text-muted);
        font-size: 0.875rem;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        transition: background var(--adm-transition), color var(--adm-transition);
        position: relative;
    }

        .admin-shell .sidebar-link:hover,
        .admin-shell .admin-sidebar a:hover {
            background: rgba(255, 255, 255, 0.05);
            color: var(--adm-text);
        }

        /* Blazor NavLink adds .active on the rendered <a> */
        .admin-shell .sidebar-link.active,
        .admin-shell .admin-sidebar a.active {
            background: var(--adm-gold-dim);
            color: var(--adm-gold);
            font-weight: 600;
        }

            .admin-shell .sidebar-link.active::before,
            .admin-shell .admin-sidebar a.active::before {
                content: "";
                position: absolute;
                left: 0;
                top: 18%;
                bottom: 18%;
                width: 3px;
                background: var(--adm-gold);
                border-radius: 0 3px 3px 0;
                box-shadow: 0 0 8px var(--adm-gold-glow);
            }

    .admin-shell .sidebar-icon {
        font-size: 1rem;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }

    .admin-shell .sidebar-label {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ── Main content ── */
    .admin-shell .admin-main {
        flex: 1;
        margin-left: var(--adm-sidebar-w);
        min-height: calc(100vh - var(--adm-topbar-h));
        padding: 2rem 2.5rem;
        background: var(--adm-bg);
        transition: margin-left var(--adm-transition);
        overflow-y: auto;
    }

    .admin-shell.sidebar-collapsed .admin-main {
        margin-left: 0;
    }

    .admin-shell .admin-main h1 {
        color: var(--adm-text);
        font-size: 1.6rem;
        margin-top: 0;
    }

    .admin-shell .admin-main h2 {
        color: var(--adm-text);
        font-size: 1.2rem;
        margin-top: 2rem;
    }

    /* ── Footer ── */
    .admin-shell .admin-footer {
        margin-left: var(--adm-sidebar-w);
        transition: margin-left var(--adm-transition);
        padding: 0.85rem 2.5rem;
        border-top: 1px solid var(--adm-border);
        background: var(--adm-bg);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.78rem;
        color: var(--adm-text-dim);
    }

    .admin-shell.sidebar-collapsed .admin-footer {
        margin-left: 0;
    }

    .admin-shell .admin-footer a {
        color: var(--adm-text-muted);
        text-decoration: none;
        transition: color var(--adm-transition);
    }

        .admin-shell .admin-footer a:hover {
            color: var(--adm-gold);
        }

    .admin-shell .admin-footer-divider {
        color: var(--adm-text-dim);
    }

    /* ── Error panel ── */
    .admin-shell .admin-error-panel {
        padding: 3rem;
        text-align: center;
        color: var(--adm-text-muted);
    }

        .admin-shell .admin-error-panel h2 {
            color: #ef4444;
            margin-bottom: 0.5rem;
        }

    /* ============================================================
   Dark theme overrides — content components inside .admin-shell
   These re-scope the light-themed classes below so pages using
   .admin-shell automatically get the dark look without any
   markup changes.
   ============================================================ */

    /* Headings */
    .admin-shell h1,
    .admin-shell h2,
    .admin-shell h3 {
        color: var(--adm-text);
    }

    /* Stat cards */
    .admin-shell .admin-stat-card {
        background: var(--adm-surface);
        border: 1px solid var(--adm-border);
        box-shadow: none;
    }

        .admin-shell .admin-stat-card:hover {
            border-color: var(--adm-border-hover);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        }

    .admin-shell .admin-stat-number {
        color: var(--adm-text);
    }

    .admin-shell .admin-stat-label {
        color: var(--adm-text-muted);
    }

    .admin-shell .admin-stat-link {
        color: var(--adm-cyan);
    }

    /* Header row */
    .admin-shell .admin-header-row h1 {
        color: var(--adm-text);
    }

    /* Page header */
    .admin-shell .admin-page-header h1 {
        color: var(--adm-text);
    }

    /* Tables */
    .admin-shell .admin-table {
        background: var(--adm-surface);
        box-shadow: none;
        border: 1px solid var(--adm-border);
    }

        .admin-shell .admin-table th {
            background: var(--adm-surface-2);
            color: var(--adm-text-muted);
            border-bottom: 1px solid var(--adm-border);
        }

        .admin-shell .admin-table td {
            color: var(--adm-text);
            border-top: 1px solid var(--adm-border);
        }

        .admin-shell .admin-table tbody tr:hover {
            background: var(--adm-surface-2);
        }

    /* Settings sections */
    .admin-shell .admin-settings-section {
        background: var(--adm-surface);
        border: 1px solid var(--adm-border);
        box-shadow: none;
    }

        .admin-shell .admin-settings-section h2 {
            color: var(--adm-text);
            border-bottom-color: var(--adm-border);
        }

    /* Empty state */
    .admin-shell .admin-empty-state {
        background: var(--adm-surface);
        color: var(--adm-text-muted);
        border: 1px solid var(--adm-border);
    }

    /* Section divider */
    .admin-shell .admin-section-divider {
        background: var(--adm-border);
    }

    /* Upload section */
    .admin-shell .admin-upload-section {
        background: var(--adm-surface);
        border-color: var(--adm-border);
    }

        .admin-shell .admin-upload-section h3 {
            color: var(--adm-text);
        }

    /* Modal */
    .admin-shell .admin-modal {
        background: var(--adm-surface);
        border: 1px solid var(--adm-border);
    }

        .admin-shell .admin-modal h3 {
            color: var(--adm-text);
        }

    /* Forms */
    .admin-shell .admin-form-group label {
        color: var(--adm-text-muted);
    }

    .admin-shell .admin-input,
    .admin-shell .admin-input-sm {
        background: var(--adm-surface-2);
        border-color: var(--adm-border);
        color: var(--adm-text);
    }

        .admin-shell .admin-input:focus,
        .admin-shell .admin-input-sm:focus {
            border-color: var(--adm-cyan);
            box-shadow: 0 0 0 2px var(--adm-cyan-dim);
        }

    .admin-shell .admin-form-actions {
        border-top-color: var(--adm-border);
    }

    /* Photo cards */
    .admin-shell .admin-photo-card {
        background: var(--adm-surface);
        border-color: var(--adm-border);
        box-shadow: none;
    }

    .admin-shell .admin-photo-details input {
        background: var(--adm-surface-2);
        border-color: var(--adm-border);
        color: var(--adm-text);
    }

    .admin-shell .admin-photo-meta {
        color: var(--adm-text-dim);
    }

    /* Tabs */
    .admin-shell .admin-tabs {
        border-bottom-color: var(--adm-border);
    }

    .admin-shell .admin-tab {
        color: var(--adm-text-muted);
    }

        .admin-shell .admin-tab:hover {
            color: var(--adm-text);
        }

    .admin-shell .admin-tab-active {
        color: var(--adm-gold);
        border-bottom-color: var(--adm-gold);
    }

    .admin-shell .admin-tab-count {
        background: var(--adm-surface-2);
        color: var(--adm-text-muted);
    }

    .admin-shell .admin-tab-active .admin-tab-count {
        background: var(--adm-gold);
        color: #1a0f00;
    }

    /* Buttons — primary gets gold treatment inside shell */
    .admin-shell .btn-admin-primary {
        background: var(--adm-gold);
        color: #1a0f00;
    }

        .admin-shell .btn-admin-primary:hover {
            background: #f5a400;
            box-shadow: 0 0 14px var(--adm-gold-glow);
        }

    .admin-shell .btn-admin-secondary {
        background: var(--adm-surface-2);
        color: var(--adm-text);
        border-color: var(--adm-border);
    }

        .admin-shell .btn-admin-secondary:hover {
            background: var(--adm-surface);
            border-color: var(--adm-border-hover);
        }

    .admin-shell .btn-admin-sm {
        background: var(--adm-surface-2);
        border-color: var(--adm-border);
        color: var(--adm-text);
    }

        .admin-shell .btn-admin-sm:hover {
            background: var(--adm-surface);
        }

    /* Photo tag picker */
    .admin-shell .admin-photo-tag-picker {
        background: var(--adm-surface-2);
        border-color: var(--adm-border);
    }

    .admin-shell .admin-photo-tag-results {
        background: var(--adm-surface);
        border-color: var(--adm-border);
    }

    .admin-shell .admin-photo-tag-result {
        color: var(--adm-text);
        border-bottom-color: var(--adm-border);
    }

        .admin-shell .admin-photo-tag-result:hover {
            background: var(--adm-surface-2);
            color: var(--adm-gold);
        }

/* ── Responsive: mobile ── */
@media (max-width: 767px) {
    .admin-shell .admin-sidebar {
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    /* Sidebar starts collapsed on mobile */
    .admin-shell .admin-main {
        margin-left: 0 !important;
        padding: 1.25rem 1rem;
    }

    .admin-shell .admin-footer {
        margin-left: 0 !important;
        padding: 0.85rem 1rem;
    }

    .admin-shell .admin-topbar {
        padding: 0 0.9rem;
    }
}

/* ============================================================
   Legacy .admin-layout — preserved for any pages not yet
   migrated to .admin-shell
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: #1a1a2e;
    color: #ccc;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

    .admin-sidebar-brand a {
        color: #888;
        text-decoration: none;
        font-size: 0.8rem;
        display: block;
        margin-bottom: 0.5rem;
    }

        .admin-sidebar-brand a:hover {
            color: #fff;
        }

    .admin-sidebar-brand h3 {
        margin: 0;
        color: #fff;
        font-size: 1.1rem;
    }

.admin-nav {
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
    flex: 1;
}

    .admin-nav li a {
        display: block;
        padding: 0.6rem 1.5rem;
        color: #bbb;
        text-decoration: none;
        font-size: 0.9rem;
        transition: background 0.15s, color 0.15s;
    }

        .admin-nav li a:hover {
            background: rgba(255, 255, 255, 0.06);
            color: #fff;
        }

        .admin-nav li a.active {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            font-weight: 600;
            border-left: 3px solid var(--color-accent, #00AEEF);
        }

.admin-sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-admin-logout {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #aaa;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    width: 100%;
}

    .btn-admin-logout:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #fff;
    }

.admin-main {
    flex: 1;
    padding: 2rem 2.5rem;
    background: #f8f9fa;
    overflow-y: auto;
}

    .admin-main h1 {
        color: #1a1a2e;
        font-size: 1.6rem;
        margin-top: 0;
    }

    .admin-main h2 {
        color: #1a1a2e;
        font-size: 1.2rem;
        margin-top: 2rem;
    }

/* --- Admin Header Row --- */
.admin-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

    .admin-header-row h1 {
        margin: 0;
    }

/* --- Admin Stats --- */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.admin-stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.admin-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a2e;
}

.admin-stat-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.admin-stat-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--color-accent, #00AEEF);
    text-decoration: none;
    font-weight: 600;
}

    .admin-stat-link:hover {
        text-decoration: underline;
    }

/* --- Admin Table --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

    .admin-table th {
        background: #f0f1f3;
        text-align: left;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        font-weight: 700;
        color: #555;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .admin-table td {
        padding: 0.75rem 1rem;
        border-top: 1px solid #eee;
        font-size: 0.9rem;
    }

    .admin-table tbody tr:hover {
        background: #f8f9fb;
    }

/* --- Admin Badges --- */
.admin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-badge-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.admin-badge-draft {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

/* --- Admin Actions --- */
.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-admin-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    transition: background 0.15s;
}

    .btn-admin-sm:hover {
        background: #f0f1f3;
    }

/* --- Admin Buttons --- */
.btn-admin-primary {
    background: #1a1a2e;
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1.3rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s;
}

    .btn-admin-primary:hover {
        background: #2d2d4e;
    }

    .btn-admin-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-admin-secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    font-weight: 500;
    padding: 0.6rem 1.3rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

    .btn-admin-secondary:hover {
        background: #f5f5f5;
    }

.btn-admin-danger,
.btn.btn-admin-danger {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fca5a5;
    cursor: pointer;
}

    .btn-admin-danger:hover,
    .btn.btn-admin-danger:hover {
        background: #fef2f2;
    }

/* --- Admin Forms --- */
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.5rem;
}

.admin-form-full {
    grid-column: 1 / -1;
}

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

    .admin-form-group label {
        font-size: 0.85rem;
        font-weight: 600;
        color: #444;
    }

.admin-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
    transition: border-color 0.15s;
}

    .admin-input:focus {
        outline: none;
        border-color: var(--color-accent, #00AEEF);
        box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.15);
    }

.admin-input-sm {
    padding: 0.35rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
}

.admin-textarea {
    resize: vertical;
    min-height: 80px;
}

.admin-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.admin-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* --- Admin Alerts --- */
.admin-alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.admin-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.admin-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* --- Admin Modal --- */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.admin-modal {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

    .admin-modal h3 {
        margin-top: 0;
        color: #1a1a2e;
    }

.admin-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* --- Admin Image Preview --- */
.admin-image-preview {
    margin-top: 0.75rem;
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

    .admin-image-preview img {
        max-width: 200px;
        max-height: 150px;
        border-radius: 6px;
        border: 1px solid #ddd;
    }

/* --- Admin Photo Grid --- */
.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.admin-photo-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.admin-photo-thumb-wrap {
    aspect-ratio: 4/3;
    overflow: hidden;
}

    .admin-photo-thumb-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.admin-photo-details {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

    .admin-photo-details input {
        padding: 0.35rem 0.5rem;
        border: 1px solid #e5e7eb;
        border-radius: 4px;
        font-size: 0.82rem;
    }

.admin-photo-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #888;
}

.admin-photo-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

/* --- Admin Upload Section --- */
.admin-upload-section {
    background: #fff;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

    .admin-upload-section h3 {
        margin-top: 0;
        color: #1a1a2e;
    }

.admin-uploading {
    color: var(--color-accent, #00AEEF);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* --- Admin Settings Sections --- */
.admin-settings-section {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

    .admin-settings-section h2 {
        margin-top: 0;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #eee;
    }

/* --- Admin Empty State --- */
.admin-empty-state {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 10px;
    color: #888;
}

.admin-section-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 2rem 0;
}

/* --- Admin Login Page --- */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f1f3;
}

.admin-login-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

    .admin-login-card h1 {
        text-align: center;
        margin-bottom: 1.5rem;
    }

/* --- Responsive Admin --- */
@media (max-width: 767px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .admin-nav {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
        gap: 0.25rem;
    }

        .admin-nav li a {
            white-space: nowrap;
            padding: 0.5rem 1rem;
            border-radius: 4px;
        }

    .admin-main {
        padding: 1.25rem;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-photo-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   User Manager — Tabs, Provider Badges, Toolbar
   ============================================================ */

/* Page header with count */
.admin-page-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

    .admin-page-header h1 {
        margin: 0;
    }

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.admin-tab {
    padding: 0.65rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #888;
    transition: color 0.2s, border-color 0.2s;
}

    .admin-tab:hover {
        color: #1a1a2e;
    }

.admin-tab-active {
    color: #1a1a2e;
    border-bottom-color: #1a1a2e;
    font-weight: 600;
}

.admin-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #e5e7eb;
    color: #555;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 0.35rem;
}

.admin-tab-active .admin-tab-count {
    background: #1a1a2e;
    color: #fff;
}

/* Toolbar / Search */
.admin-toolbar {
    margin-bottom: 1rem;
}

.admin-search-input {
    max-width: 320px;
}

/* Warning button */
.btn-admin-warning,
.btn.btn-admin-warning {
    background: #F59E0B;
    color: #fff;
    border: none;
}

    .btn-admin-warning:hover,
    .btn.btn-admin-warning:hover {
        background: #D97706;
    }

/* Alert warning */
.admin-alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left: 4px solid #F59E0B;
}

/* Badge variants */
.admin-badge-muted {
    background: #e5e7eb;
    color: #6b7280;
}

/* Provider login badges */
.admin-badge-provider {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 3px;
}

.admin-badge-google {
    background: #FEE2E2;
    color: #DC2626;
}

.admin-badge-facebook {
    background: #DBEAFE;
    color: #2563EB;
}

.admin-badge-email {
    background: #E5E7EB;
    color: #4B5563;
}

/* League Manager badge */
.admin-badge-league-mgr {
    background: #DBEAFE;
    color: #1D4ED8;
}

/* Accent button */
.btn-admin-accent {
    background: #2563EB;
    color: #fff;
    border: none;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}

    .btn-admin-accent:hover {
        background: #1D4ED8;
    }

/* Outline button */
.btn-admin-outline {
    background: none;
    border: 1px dashed #d4a0ad;
    color: #7A1530;
    font-size: 0.82rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

    .btn-admin-outline:hover {
        border-color: #7A1530;
        background: #fdf2f4;
        border-style: solid;
    }

/* Link style in tables */
.admin-link {
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
}

    .admin-link:hover {
        text-decoration: underline;
    }

/* ============================================================
   Inline Form Feedback — errors, success, hints, upload status
   ============================================================ */
.admin-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    border-left: 4px solid #ef4444;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    animation: admin-feedback-fadein 0.25s ease;
}

.admin-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-left: 4px solid #10b981;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    animation: admin-feedback-fadein 0.25s ease;
}

.admin-form-hint {
    display: block;
    font-size: 0.82rem;
    color: #8891aa;
    margin-top: 0.35rem;
    line-height: 1.4;
}

/* Upload spinner / loading state */
.admin-upload-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
    animation: admin-feedback-fadein 0.25s ease;
}

    .admin-upload-status::before {
        content: "";
        display: inline-block;
        width: 16px;
        height: 16px;
        border: 2.5px solid #bfdbfe;
        border-top-color: #3b82f6;
        border-radius: 50%;
        animation: admin-spinner 0.6s linear infinite;
    }

@keyframes admin-spinner {
    to {
        transform: rotate(360deg);
    }
}

@keyframes admin-feedback-fadein {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   Admin Photo Tagging
   ============================================================ */
.admin-photo-tags {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid #eee;
}

.admin-photo-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.admin-photo-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #7A1530 0%, #5C0F24 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 3px rgba(122, 21, 48, 0.2);
}

.admin-photo-tag-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: 0.68rem;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}

    .admin-photo-tag-remove:hover {
        color: #fff;
    }

.admin-photo-tag-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f8f6f7;
    border: 1px solid #e8dfe2;
    border-radius: 8px;
}

.admin-photo-tag-results {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e8dfe2;
}

.admin-photo-tag-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.75rem;
    background: none;
    border: none;
    border-bottom: 1px solid #f5f0f1;
    text-align: left;
    cursor: pointer;
    font-size: 0.85rem;
    color: #1a1a2e;
    transition: background-color 0.12s;
}

    .admin-photo-tag-result:last-child {
        border-bottom: none;
    }

    .admin-photo-tag-result:hover {
        background: #fdf2f4;
        color: #7A1530;
    }

    .admin-photo-tag-result .tag-check {
        color: #00AEEF;
        font-weight: 700;
        font-size: 0.9rem;
    }

.admin-photo-tag-empty {
    padding: 0.75rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.82rem;
    font-style: italic;
}

/* ============================================================
   Sidebar nav heading — legacy class, kept for compatibility
   ============================================================ */
.admin-nav-heading {
    list-style: none;
    padding: 1rem 1.25rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    user-select: none;
    pointer-events: none;
}

    .admin-nav-heading:first-child {
        margin-top: 0;
        border-top: none;
    }

/* ============================================================
   Admin Dashboard — adm-dash-* classes
   Scoped with adm- prefix, dark-theme native
   ============================================================ */

.adm-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ── Page header ── */
.adm-dash-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--adm-border);
}

/* ── Stat grid ── */
.adm-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.adm-stat-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    padding: 1.25rem 1.4rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    transition: border-color var(--adm-transition), box-shadow var(--adm-transition), transform var(--adm-transition);
    position: relative;
    overflow: hidden;
}

    .adm-stat-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--adm-border);
        transition: background var(--adm-transition);
    }

    .adm-stat-card:hover {
        border-color: var(--adm-border-hover);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
        transform: translateY(-2px);
    }

/* Accent top-bar colors */
.adm-stat-gold::before {
    background: var(--adm-gold);
}

.adm-stat-cyan::before {
    background: var(--adm-cyan);
}

.adm-stat-green::before {
    background: #22c55e;
}

.adm-stat-default::before {
    background: var(--adm-border-hover);
}

.adm-stat-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.adm-stat-icon {
    font-size: 0.95rem;
    opacity: 0.75;
}

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

.adm-stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--adm-text);
    line-height: 1;
    letter-spacing: -0.02em;
}

.adm-stat-gold .adm-stat-number {
    color: var(--adm-gold);
}

.adm-stat-cyan .adm-stat-number {
    color: var(--adm-cyan);
}

.adm-stat-green .adm-stat-number {
    color: #22c55e;
}

.adm-stat-link {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--adm-text-dim);
    text-decoration: none;
    margin-top: 0.5rem;
    transition: color var(--adm-transition);
}

.adm-stat-card:hover .adm-stat-link {
    color: var(--adm-text-muted);
}

.adm-stat-gold:hover .adm-stat-link {
    color: var(--adm-gold);
}

.adm-stat-cyan:hover .adm-stat-link {
    color: var(--adm-cyan);
}

.adm-stat-green:hover .adm-stat-link {
    color: #22c55e;
}

/* ── Two-column panels ── */
.adm-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.adm-panel {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    overflow: hidden;
}

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

.adm-panel-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--adm-text);
}

.adm-panel-action {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--adm-cyan);
    text-decoration: none;
    transition: color var(--adm-transition);
}

    .adm-panel-action:hover {
        color: #fff;
    }

.adm-panel-empty {
    padding: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--adm-text-dim);
    font-style: italic;
}

/* ── Player rows ── */
.adm-player-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1.4rem;
    border-bottom: 1px solid var(--adm-border);
    transition: background var(--adm-transition);
}

    .adm-player-row:last-child {
        border-bottom: none;
    }

    .adm-player-row:hover {
        background: var(--adm-surface-2);
    }

.adm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.adm-player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.adm-player-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--adm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adm-player-meta {
    font-size: 0.72rem;
    color: var(--adm-text-muted);
}

/* ── Event rows ── */
.adm-event-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.4rem;
    border-bottom: 1px solid var(--adm-border);
    transition: background var(--adm-transition);
}

    .adm-event-row:last-child {
        border-bottom: none;
    }

    .adm-event-row:hover {
        background: var(--adm-surface-2);
    }

.adm-date-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 38px;
    flex-shrink: 0;
    line-height: 1;
}

.adm-date-month {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--adm-text-muted);
    text-transform: uppercase;
}

.adm-date-day {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--adm-text);
    letter-spacing: -0.02em;
}

.adm-event-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.adm-event-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--adm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adm-event-location {
    font-size: 0.72rem;
    color: var(--adm-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Shared badges ── */
.adm-badge {
    font-size: 0.67rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.adm-badge-new {
    background: var(--adm-gold-dim);
    color: var(--adm-gold);
    border: 1px solid rgba(254, 173, 1, 0.25);
}

.adm-badge-active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.adm-badge-live {
    background: var(--adm-cyan-dim);
    color: var(--adm-cyan);
    border: 1px solid rgba(105, 222, 253, 0.2);
}

.adm-badge-draft {
    background: rgba(255, 255, 255, 0.04);
    color: var(--adm-text-dim);
    border: 1px solid var(--adm-border);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .adm-stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .adm-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .adm-panels {
        grid-template-columns: 1fr;
    }

    .adm-dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   Album Manager — adm-album-* and adm-photo-assign-* classes
   ============================================================ */

.adm-albums {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ── Form card ── */
.adm-form-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.adm-form-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--adm-text);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--adm-border);
}

.adm-form-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 1rem;
}

.adm-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

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

.adm-label-opt {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--adm-text-dim);
    font-size: 0.7rem;
}

.adm-input {
    background: var(--adm-bg);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    color: var(--adm-text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color var(--adm-transition), box-shadow var(--adm-transition);
    width: 100%;
    box-sizing: border-box;
}

    .adm-input:focus {
        outline: none;
        border-color: var(--adm-cyan);
        box-shadow: 0 0 0 3px var(--adm-cyan-dim);
    }

    .adm-input::placeholder {
        color: #8891aa;
    }

.adm-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8099' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.25rem;
    cursor: pointer;
}

    .adm-select option {
        background: var(--adm-surface);
        color: var(--adm-text);
    }

.adm-form-error {
    font-size: 0.82rem;
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
}

.adm-form-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--adm-border);
}

/* ── Empty / loading states ── */
.adm-loading,
.adm-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--adm-text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

.adm-empty-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

/* ── Album card grid ── */
.adm-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.adm-album-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--adm-transition), box-shadow var(--adm-transition), transform var(--adm-transition);
}

    .adm-album-card:hover {
        border-color: var(--adm-border-hover);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
        transform: translateY(-2px);
    }

.adm-album-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--adm-surface-2);
    overflow: hidden;
}

    .adm-album-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.35s ease;
    }

.adm-album-card:hover .adm-album-cover img {
    transform: scale(1.04);
}

.adm-album-cover-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    opacity: 0.25;
}

.adm-album-count-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
}

.adm-album-info {
    padding: 0.85rem 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.adm-album-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--adm-text);
    line-height: 1.3;
}

.adm-album-meta {
    font-size: 0.72rem;
    color: var(--adm-text-muted);
}

.adm-badge {
    display: inline-block;
    font-size: 0.67rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    width: fit-content;
}

.adm-badge-cyan {
    background: var(--adm-cyan-dim);
    color: var(--adm-cyan);
    border: 1px solid rgba(105, 222, 253, 0.2);
}

.adm-album-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--adm-border);
}

/* ── Modal ── */
.adm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: adm-fade-in 0.18s ease;
}

@keyframes adm-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.adm-modal {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: adm-modal-up 0.22s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.adm-modal-wide {
    max-width: 920px;
}

@keyframes adm-modal-up {
    from {
        transform: translateY(16px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.adm-modal-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--adm-border);
    flex-shrink: 0;
}

    .adm-modal-header h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
        color: var(--adm-text);
    }

.adm-modal-subtitle {
    font-size: 0.8rem;
    color: var(--adm-text-muted);
    flex: 1;
}

.adm-modal-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--adm-text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color var(--adm-transition), background var(--adm-transition);
}

    .adm-modal-close:hover {
        color: var(--adm-text);
        background: var(--adm-surface-2);
    }

.adm-modal-body {
    padding: 1.25rem 1.5rem;
    color: var(--adm-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

    .adm-modal-body strong {
        color: var(--adm-text);
    }

.adm-modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--adm-border);
    flex-shrink: 0;
}

/* ── Photo assign layout ── */
.adm-photo-assign-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.adm-photo-assign-col {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 60vh;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
}

    .adm-photo-assign-col:first-child {
        border-right: 1px solid var(--adm-border);
    }

.adm-assign-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--adm-text-muted);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--adm-border);
    flex-shrink: 0;
}

.adm-assign-col-count {
    background: var(--adm-surface-2);
    color: var(--adm-text-muted);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid var(--adm-border);
}

.adm-assign-empty {
    font-size: 0.82rem;
    color: var(--adm-text-dim);
    font-style: italic;
    text-align: center;
    padding: 1.5rem 0;
}

.adm-assign-toolbar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.adm-assign-toolbar-top {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--adm-border);
}

/* Thumbnail grid */
.adm-photo-assign-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.adm-photo-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--adm-transition), transform var(--adm-transition);
}

    .adm-photo-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .adm-photo-thumb:hover {
        border-color: var(--adm-border-hover);
        transform: scale(1.03);
    }

.adm-thumb-selected {
    border-color: var(--adm-cyan) !important;
}

.adm-thumb-cover {
    border-color: var(--adm-gold) !important;
}

.adm-thumb-check {
    position: absolute;
    inset: 0;
    background: rgba(105, 222, 253, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.adm-thumb-cover-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--adm-gold);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Week groups in uncategorized panel */
.adm-week-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.adm-week-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: var(--adm-surface-2);
    border: 1px solid var(--adm-border);
    border-radius: 7px;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    transition: background var(--adm-transition), border-color var(--adm-transition);
    color: var(--adm-text);
}

    .adm-week-header:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: var(--adm-border-hover);
    }

.adm-week-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--adm-text-muted);
}

.adm-week-count {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 20px;
    font-size: 0.65rem;
    padding: 1px 7px;
    color: var(--adm-text-dim);
}

.adm-week-chevron {
    font-size: 0.7rem;
    color: var(--adm-text-dim);
}

/* ── Shared small buttons ── */
.btn-admin-sm {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--adm-border);
    background: var(--adm-surface-2);
    color: var(--adm-text-muted);
    cursor: pointer;
    transition: background var(--adm-transition), color var(--adm-transition), border-color var(--adm-transition);
    white-space: nowrap;
}

    .btn-admin-sm:hover {
        background: rgba(255, 255, 255, 0.07);
        color: var(--adm-text);
        border-color: var(--adm-border-hover);
    }

.btn-admin-danger {
    border-color: rgba(248, 113, 113, 0.3);
    color: #f87171;
}

    .btn-admin-danger:hover {
        background: rgba(248, 113, 113, 0.1);
        border-color: rgba(248, 113, 113, 0.5);
        color: #fca5a5;
    }

/* ── Responsive ── */
@media (max-width: 767px) {
    .adm-form-row {
        grid-template-columns: 1fr;
    }

    .adm-photo-assign-layout {
        grid-template-columns: 1fr;
    }

    .adm-photo-assign-col:first-child {
        border-right: none;
        border-bottom: 1px solid var(--adm-border);
    }

    .adm-photo-assign-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Ensure all inputs inside admin shell have readable placeholder text */
.admin-shell input::placeholder,
.admin-shell textarea::placeholder {
    color: #8891aa;
}

/* ============================================================
   Player Editor — form layout, avatar preview, linked account
   Dark-theme overrides for existing light-theme classes
   ============================================================ */

/* Two-column layout: main form + sidebar preview */
.admin-form-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 1.5rem;
}

.admin-form-main {
    min-width: 0;
}

.admin-form-sidebar {
    position: sticky;
    top: calc(var(--adm-topbar-h) + 1.5rem);
}

    .admin-form-sidebar h3 {
        margin: 0 0 1rem;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--adm-text-muted);
    }

.admin-card-preview {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    justify-content: center;
}

/* Avatar preview image (replaces inline max-width/border-radius) */
.admin-avatar-preview {
    max-width: 150px;
    width: 100%;
    border-radius: 8px;
    display: block;
}

/* Small inline feedback — replaces style="margin-top:0.5rem; font-size:0.85rem" */
.admin-feedback-sm {
    margin-top: 0.5rem;
    font-size: 0.85rem !important;
}

/* Linked account row */
.admin-linked-account {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: var(--adm-surface-2);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--adm-text-muted);
    flex-wrap: wrap;
}

.admin-linked-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
    white-space: nowrap;
}

/* Link account dropdown + button row */
.admin-link-account-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.admin-link-account-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

    .admin-link-account-row .admin-input {
        flex: 1;
    }

/* Dark-theme overrides for existing light-theme feedback classes */
.admin-shell .admin-error {
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.25);
    border-left-color: #ef4444;
}

.admin-shell .admin-upload-status {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.25);
    border-left-color: #3b82f6;
}

.admin-shell .admin-alert-warning {
    background: rgba(245, 158, 11, 0.08);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.25);
    border-left-color: #f59e0b;
}

.admin-shell .admin-form-actions {
    border-top-color: var(--adm-border);
}

.admin-shell .admin-checkbox {
    color: var(--adm-text-muted);
}

    .admin-shell .admin-checkbox:hover {
        color: var(--adm-text);
    }

/* Responsive */
@media (max-width: 900px) {
    .admin-form-layout {
        grid-template-columns: 1fr;
    }

    .admin-form-sidebar {
        position: static;
    }
}

/* ============================================================
   Card Frame Picker — card-picker-* classes
   ============================================================ */

.card-picker-section {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--adm-border);
}

.card-picker-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--adm-text);
}

.card-picker-subtitle {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--adm-text-muted);
}

/* ── Tagline ── */
.card-picker-tagline {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.card-picker-tagline-select {
    max-width: 400px;
}

/* ── Tabs ── */
.card-picker-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--adm-border);
}

.card-picker-tab {
    padding: 0.6rem 1.2rem;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    font-weight: 500;
    color: var(--adm-text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    margin-bottom: -2px;
    transition: color var(--adm-transition), border-color var(--adm-transition);
    white-space: nowrap;
}

    .card-picker-tab:hover {
        color: var(--adm-text);
    }

    .card-picker-tab.active {
        font-weight: 700;
        color: var(--adm-gold);
        border-bottom-color: var(--adm-gold);
    }

/* ── Card grid ── */
.card-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 1.25rem;
}

.card-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: border-color var(--adm-transition), background var(--adm-transition);
}

    .card-picker-item:hover {
        background: var(--adm-surface-2);
        border-color: var(--adm-border-hover);
    }

    .card-picker-item.selected {
        border-color: var(--adm-gold);
        background: var(--adm-gold-dim);
    }

.card-picker-item-name {
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--adm-text-muted);
    transition: color var(--adm-transition);
}

    .card-picker-item-name.selected {
        color: var(--adm-gold);
    }

.card-picker-item-desc {
    font-size: 0.68rem;
    color: var(--adm-text-dim);
    text-align: center;
    line-height: 1.3;
}

/* ── Large preview ── */
.card-picker-preview {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--adm-border);
    text-align: center;
}

.card-picker-preview-label {
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--adm-text-muted);
    margin: 0 0 1rem;
}

.card-picker-preview-card {
    display: inline-block;
}

/* ============================================================
   Page Header — admin-page-title / admin-page-subtitle
   ============================================================ */

.admin-page-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--adm-text);
    line-height: 1.2;
}

.admin-page-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--adm-text-muted);
}

/* adm-dash-header bottom margin (pages use it as a standalone header) */
.adm-dash-header {
    margin-bottom: 2rem;
}

/* ============================================================
   Players List — adm-player-list-* and clickable card cell
   ============================================================ */

.adm-player-list-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.adm-search-input {
    max-width: 320px;
    flex: 1;
}

.adm-result-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--adm-text-dim);
    white-space: nowrap;
}

.adm-players-table td {
    vertical-align: middle;
}

.adm-cell-muted {
    color: var(--adm-text-muted);
    font-size: 0.875rem;
}

.adm-player-name-link {
    font-weight: 600;
    color: var(--adm-text);
    text-decoration: none;
    transition: color var(--adm-transition);
}

    .adm-player-name-link:hover {
        color: var(--adm-cyan);
    }

.adm-player-card-cell {
    padding: 0.5rem !important;
    width: 1%;
    white-space: nowrap;
}

.adm-player-card-link {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--adm-transition);
}

    .adm-player-card-link:hover {
        transform: scale(1.04);
    }

.adm-player-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--adm-transition);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03em;
}

.adm-player-card-link:hover .adm-player-card-overlay {
    opacity: 1;
}

/* ── Fix: Tag Chips — admin blue instead of frontend maroon ── */
.admin-shell .admin-photo-tag-chip {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

/* ── Fix: Tag Picker — dark theme ── */
.admin-shell .admin-photo-tag-picker {
    background: var(--adm-surface-2);
    border-color: var(--adm-border);
}

.admin-shell .admin-photo-tag-results {
    background: var(--adm-surface);
    border-color: var(--adm-border);
}

.admin-shell .admin-photo-tag-result {
    color: var(--adm-text);
    border-bottom-color: var(--adm-border);
}

    .admin-shell .admin-photo-tag-result:hover {
        background: var(--adm-surface-2);
        color: var(--adm-cyan);
    }

    .admin-shell .admin-photo-tag-result .tag-check {
        color: var(--adm-cyan);
    }

/* ── Fix: Tags border ── */
.admin-shell .admin-photo-tags {
    border-top-color: var(--adm-border);
}

/* ── Fix: Photo Actions — stacked layout ── */
.admin-shell .admin-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.admin-photo-actions-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Photo Uploader Info ── */
.admin-photo-uploader {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--adm-text-muted);
    padding: 0.35rem 0.6rem;
    background: var(--adm-surface-2);
    border: 1px solid var(--adm-border);
    border-radius: 6px;
    flex-wrap: wrap;
}

.admin-approval-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.admin-approval-approved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.admin-approval-pending {
    background: rgba(254, 173, 1, 0.15);
    color: var(--adm-gold);
}

.admin-approval-rejected {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

/* ── Photo Approval Filter Tabs ── */
.admin-filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-filter-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--adm-border);
    border-radius: 6px;
    background: var(--adm-surface);
    color: var(--adm-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .admin-filter-tab:hover {
        border-color: var(--adm-cyan);
        color: var(--adm-cyan);
    }

.admin-filter-tab-active {
    background: var(--adm-cyan);
    color: #000;
    border-color: var(--adm-cyan);
    font-weight: 600;
}

.admin-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.35rem;
}

.admin-filter-tab-active .admin-badge-count {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* ── Approval Buttons ── */
.admin-shell .btn-admin-approve {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

    .admin-shell .btn-admin-approve:hover {
        background: rgba(34, 197, 94, 0.25);
        border-color: rgba(34, 197, 94, 0.5);
        color: #4ade80;
    }

.admin-shell .btn-admin-reject {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

    .admin-shell .btn-admin-reject:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.4);
        color: #fca5a5;
    }

/* ── Bulk Action Bar ── */
.admin-bulk-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--adm-cyan-dim);
    border: 1px solid rgba(105, 222, 253, 0.2);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--adm-cyan);
    flex-wrap: wrap;
}

/* ── Photo Selection Checkbox ── */
.admin-photo-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 18px;
    height: 18px;
    z-index: 2;
    accent-color: var(--adm-cyan);
    cursor: pointer;
}

.admin-photo-thumb-wrap {
    position: relative;
}

.admin-photo-selected {
    outline: 2px solid var(--adm-cyan);
    outline-offset: -2px;
}

/* ── Sidebar Badge ── */
.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: auto;
}

/* ── Dashboard Warning Stat Card ── */
.adm-stat-warning::before {
    background: #f59e0b;
}

.adm-stat-warning .adm-stat-number {
    color: #fbbf24;
}

.adm-stat-warning:hover .adm-stat-link {
    color: #fbbf24;
}

/* ── Settings Toggle Switches ── */
.admin-toggle-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--adm-border);
    background: var(--adm-surface);
    transition: border-color var(--adm-transition);
}

    .admin-toggle:hover {
        border-color: var(--adm-border-hover);
    }

    .admin-toggle input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-top: 2px;
        flex-shrink: 0;
        accent-color: var(--adm-cyan);
        cursor: pointer;
    }

.admin-toggle-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--adm-text);
}

.admin-toggle-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--adm-text-muted);
    margin-top: 0.15rem;
}

/* ── Preset Palette Grid ── */
.theme-presets {
    margin-bottom: 1.5rem;
}

.theme-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.theme-preset-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 0.75rem;
    background: var(--adm-surface-2);
    border: 2px solid var(--adm-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color var(--adm-transition), background var(--adm-transition), transform var(--adm-transition);
    text-align: center;
}

    .theme-preset-card:hover {
        border-color: var(--adm-border-hover);
        background: rgba(255, 255, 255, 0.04);
        transform: translateY(-1px);
    }

.theme-preset-active {
    border-color: var(--adm-gold) !important;
    background: var(--adm-gold-dim) !important;
}

.theme-preset-swatches {
    display: flex;
    gap: 4px;
    margin-bottom: 0.25rem;
}

.theme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.theme-preset-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--adm-text);
}

.theme-preset-desc {
    font-size: 0.68rem;
    color: var(--adm-text-muted);
    line-height: 1.3;
}

.theme-preset-active .theme-preset-name {
    color: var(--adm-gold);
}

/* ── Individual Color Pickers ── */
.theme-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.theme-color-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem;
    background: var(--adm-surface-2);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
}

.theme-color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.theme-color-input {
    width: 40px;
    height: 40px;
    border: 2px solid var(--adm-border);
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: var(--adm-surface);
    flex-shrink: 0;
}

    .theme-color-input::-webkit-color-swatch-wrapper {
        padding: 0;
    }

    .theme-color-input::-webkit-color-swatch {
        border: none;
        border-radius: 5px;
    }

    .theme-color-input::-moz-color-swatch {
        border: none;
        border-radius: 5px;
    }

.theme-color-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.theme-color-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--adm-text);
}

.theme-color-hint {
    font-size: 0.7rem;
    color: var(--adm-text-muted);
    line-height: 1.3;
}

.theme-color-hex {
    font-family: "SF Mono", "Cascadia Code", monospace;
    font-size: 0.78rem !important;
    padding: 0.3rem 0.5rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    max-width: 110px;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .theme-preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .theme-color-grid {
        grid-template-columns: 1fr;
    }
}

.settings-image-upload {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.settings-image-preview {
    width: 100%;
    max-width: 200px;
    max-height: 100px;
    border-radius: 8px;
    border: 1px solid var(--adm-border);
    object-fit: contain;
    background: var(--adm-surface-2);
    padding: 0.5rem;
}

.settings-image-hero {
    max-width: 380px;
    max-height: 120px;
    object-fit: cover;
    padding: 0;
    border-radius: 6px;
}

.settings-image-placeholder {
    max-width: 380px;
    padding: 1.25rem 1rem;
    border: 2px dashed var(--adm-border);
    border-radius: 8px;
    text-align: center;
    color: var(--adm-text-dim);
    font-size: 0.82rem;
    font-style: italic;
}

@media (max-width: 767px) {
    .settings-image-upload {
        max-width: 100%;
    }

    .settings-image-preview {
        max-width: 160px;
        max-height: 80px;
    }

    .settings-image-hero {
        max-width: 100%;
        max-height: 100px;
    }
}








































