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

:root {
    /* Light Mode (default) */
    --bg-body: #f5f5f5;
    --bg-header: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f9f9f9;
    --bg-input: #f0f0f0;
    --bg-input-focus: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.5);

    --border: #e0e0e0;
    --border-hover: #c0c0c0;
    --border-focus: #f5a623;

    --text-primary: #0f0f0f;
    --text-secondary: #606060;
    --text-muted: #909090;
    --text-inverse: #ffffff;

    --accent: #f5a623;
    --accent-dark: #e09000;
    --accent-light: #ffc85c;
    --accent-glow: rgba(245, 166, 35, 0.15);
    --accent-subtle: rgba(245, 166, 35, 0.08);

    --success: #2ea043;
    --success-bg: rgba(46, 160, 67, 0.08);
    --success-border: rgba(46, 160, 67, 0.25);
    --error: #d1242f;
    --error-bg: rgba(209, 36, 47, 0.06);
    --error-border: rgba(209, 36, 47, 0.2);
    --info: #0969da;
    --info-bg: rgba(9, 105, 218, 0.06);
    --info-border: rgba(9, 105, 218, 0.2);
    --warning: #bf8700;
    --warning-bg: rgba(191, 135, 0, 0.06);
    --warning-border: rgba(191, 135, 0, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-accent: 0 4px 16px rgba(245, 166, 35, 0.25);

    --transition-fast: 150ms ease;
    --transition-smooth: 300ms ease;
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

    --header-h: 56px;
    --sidebar-w: 240px;
    --sidebar-w-collapsed: 72px;
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
    --bg-body: #0f0f0f;
    --bg-header: #212121;
    --bg-sidebar: #212121;
    --bg-card: #1a1a1a;
    --bg-card-hover: #262626;
    --bg-input: #272727;
    --bg-input-focus: #303030;
    --bg-overlay: rgba(0, 0, 0, 0.7);

    --border: #303030;
    --border-hover: #484848;
    --border-focus: #f5a623;

    --text-primary: #f1f1f1;
    --text-secondary: #aaaaaa;
    --text-muted: #717171;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    transition: background var(--transition-smooth), color var(--transition-smooth);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--accent-dark); }

/* ===== Top Header Bar ===== */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1001;
    transition: background var(--transition-smooth), border var(--transition-smooth);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}
.menu-toggle:hover { background: var(--accent-subtle); }
.menu-toggle svg { width: 22px; height: 22px; }

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.header-logo img {
    height: 32px;
    width: auto;
}

.header-logo span {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: color var(--transition-smooth);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Theme Toggle Button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}
.theme-toggle:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { position: absolute; transition: all var(--transition-smooth); }
.theme-toggle .icon-moon { opacity: 1; transform: scale(1); }
.theme-toggle .icon-sun { opacity: 0; transform: scale(0.5) rotate(-90deg); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: scale(0.5) rotate(90deg); }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: scale(1) rotate(0deg); }

/* User pill in header */
.user-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    border-radius: var(--radius-full);
    background: var(--accent-subtle);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    font-family: inherit;
    color: var(--text-primary);
}
.user-pill:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

/* User Dropdown */
.user-dropdown-wrapper {
    position: relative;
}

.dropdown-chevron {
    transition: transform var(--transition-fast);
    color: var(--text-muted);
}
.user-dropdown-wrapper.open .dropdown-chevron {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all var(--transition-fast);
    overflow: hidden;
}
.user-dropdown-wrapper.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
body.has-banner .user-dropdown {
    top: calc(100% + 8px + 36px);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
}
.dropdown-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}
.dropdown-email {
    font-size: 0.72rem;
    color: var(--text-muted);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-size: 0.82rem;
    text-decoration: none;
    transition: background var(--transition-fast);
}
.dropdown-item:hover {
    background: var(--accent-subtle);
    color: var(--text-primary);
}
.dropdown-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.dropdown-item--danger { color: var(--error); }
.dropdown-item--danger:hover { background: var(--error-bg); color: var(--error); }
.dropdown-item--danger svg { color: var(--error); }

.avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.user-pill > span:not(.avatar) {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-header {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
}
.btn-header-primary {
    background: var(--accent);
    color: #000;
}
.btn-header-primary:hover {
    background: var(--accent-dark);
    color: #000;
    box-shadow: var(--shadow-accent);
}
.btn-header-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-header-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: var(--sidebar-w);
    height: calc(100vh - var(--header-h));
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0;
    z-index: 90;
    transition: width var(--transition-smooth), background var(--transition-smooth), border var(--transition-smooth), transform var(--transition-smooth);
}

/* Scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section {
    padding: 0.5rem 0.75rem;
}

.sidebar-section + .sidebar-section {
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.sidebar-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.5rem 0.75rem 0.35rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: background var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.nav-item:hover {
    background: var(--accent-subtle);
}

.nav-item.active {
    background: var(--accent-subtle);
    font-weight: 600;
}
.nav-item.active svg {
    color: var(--accent);
}

.nav-item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Submenu admin */
.nav-item-group {
    position: relative;
}
.nav-item-group .nav-item {
    position: relative;
}
.nav-chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;
    opacity: 0.4;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    flex-shrink: 0;
}
.nav-item-group:hover .nav-chevron {
    opacity: 0.8;
    transform: rotate(180deg);
}
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.nav-item-group:hover .nav-submenu {
    max-height: 200px;
}
.nav-submenu-item {
    display: block;
    padding: 0.45rem 0.75rem 0.45rem 2.75rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.nav-submenu-item:hover {
    color: var(--accent);
    background: var(--bg-hover);
}
.nav-submenu-item.active {
    color: var(--accent);
    font-weight: 600;
}

/* Collapsed sidebar */
.sidebar.collapsed {
    width: var(--sidebar-w-collapsed);
}

.sidebar.collapsed .nav-item-text,
.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .nav-chevron,
.sidebar.collapsed .nav-submenu {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .sidebar-logo-mini {
    display: flex;
    justify-content: center;
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-w);
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
    padding: 1.5rem 2rem;
    transition: margin-left var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed ~ .main-content,
body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-w-collapsed);
}

.content-area {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.content-area--wide {
    max-width: 1200px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: background var(--transition-smooth), border var(--transition-smooth), box-shadow var(--transition-smooth);
    animation: fadeInUp 0.4s ease-out;
}

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

.card-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.card-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.card-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.card-footer a { font-weight: 600; }

/* ===== Auth page centering ===== */
.auth-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 2rem 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-logo img {
    height: 80px;
    width: auto;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.15rem;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-label .optional {
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    font-size: 0.78rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
}
.input-wrapper .input-icon svg {
    width: 18px;
    height: 18px;
}

.form-input {
    width: 100%;
    padding: 0.75rem 0.9rem 0.75rem 2.6rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: all var(--transition-fast);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:hover { border-color: var(--border-hover); }
.form-input:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-wrapper:focus-within .input-icon { color: var(--accent); }

.form-input.no-icon { padding-left: 0.9rem; }

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}
.password-toggle:hover { color: var(--text-primary); }
.password-toggle svg { width: 18px; height: 18px; }

.form-error {
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 0.3rem;
    display: none;
    align-items: center;
    gap: 0.25rem;
}
.form-error.visible { display: flex; }
.form-input.error { border-color: var(--error); }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(209, 36, 47, 0.1); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: #000;
    padding: 0.85rem 1.25rem;
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-dark);
    box-shadow: var(--shadow-accent);
    transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}
.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    padding: 0.65rem 1rem;
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
}

/* ===== Alert Messages ===== */
.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.3s ease-out;
}
.alert-icon { font-size: 1rem; flex-shrink: 0; line-height: 1.3; }
.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
}
.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
}
.alert-info {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    color: var(--info);
}
.alert-warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning);
}

/* ===== Dashboard ===== */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.welcome-banner {
    background: linear-gradient(135deg, #1a1a2e, #2d2a4a);
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}
.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -15%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.25) 0%, transparent 70%);
    pointer-events: none;
}
.welcome-banner h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    position: relative;
}
.welcome-banner p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    position: relative;
}

.stats-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    text-align: center;
    transition: all var(--transition-smooth);
}
.stat-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-icon { font-size: 1.4rem; margin-bottom: 0.4rem; display: block; }
.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.stat-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
}
.info-card .emoji { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.info-card h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.info-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ===== Verify Card ===== */
.verify-card { text-align: center; }
.verify-card .emoji { font-size: 3rem; display: block; margin-bottom: 0.75rem; }
.verify-card h1 { font-size: 1.3rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.verify-card p { color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.6; }

/* ===== Setup ===== */
.setup-card { max-width: 600px; margin: 0 auto; }
.setup-card h1 { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.setup-card .subtitle { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1.5rem; }

.check-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; }
.check-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: var(--bg-input);
}
.check-item.ok { color: var(--success); background: var(--success-bg); }
.check-item.fail { color: var(--error); background: var(--error-bg); }
.check-icon { font-size: 1rem; flex-shrink: 0; }

/* ===== Section Header ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: -0.25rem;
}
.section-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.section-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
}
.section-link:hover {
    color: var(--accent-dark);
}

/* ===== Video Grid ===== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    animation: fadeInUp 0.4s ease-out;
}

.video-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.video-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}
.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}
.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

.video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.video-card:hover .video-play {
    opacity: 1;
}
.video-play svg {
    width: 48px;
    height: 48px;
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.video-info {
    padding: 0.75rem;
}
.video-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.3rem;
}
.video-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ===== Small Video Grid (older videos) ===== */
.video-grid-sm {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
    animation: fadeInUp 0.4s ease-out;
}

.video-card-sm {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.video-card-sm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
}

.video-thumb-sm {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}
.video-thumb-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}
.video-card-sm:hover .video-thumb-sm img {
    transform: scale(1.05);
}

.video-play-sm {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.video-card-sm:hover .video-play-sm {
    opacity: 1;
}
.video-play-sm svg {
    width: 32px;
    height: 32px;
    color: white;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.video-info-sm {
    padding: 0.5rem 0.6rem;
}
.video-title-sm {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.2rem;
}

/* ===== Account Page ===== */
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.card-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
}
.account-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.account-value {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

/* ===== Nav Badge (sidebar) ===== */
.nav-badge {
    background: var(--accent);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
    margin-left: auto;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

/* ===== Messaging Layout ===== */
.msg-container {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: calc(100vh - var(--header-h) - 6rem);
    animation: fadeInUp 0.4s ease-out;
}
.msg-sidebar {
    width: 340px;
    min-width: 280px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.msg-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.msg-sidebar-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.btn-icon:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}
.btn-icon svg { width: 18px; height: 18px; }
.msg-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}
.msg-tab {
    flex: 1;
    padding: 0.65rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}
.msg-tab:hover { color: var(--text-primary); }
.msg-tab.active { color: var(--accent); font-weight: 600; }
.msg-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}
.msg-list { flex: 1; overflow-y: auto; }
.msg-loading, .msg-list-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.msg-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.msg-item:hover { background: var(--accent-subtle); }
.msg-item.active { background: var(--accent-glow); }
.msg-item.unread { background: rgba(245, 166, 35, 0.05); }
.msg-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.msg-item-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}
.msg-item-content { flex: 1; min-width: 0; }
.msg-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.15rem; }
.msg-item-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.msg-item-date { font-size: 0.68rem; color: var(--text-muted); flex-shrink: 0; }
.msg-item-subject { font-size: 0.78rem; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item-preview { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.1rem; }
.msg-item.unread .msg-item-name, .msg-item.unread .msg-item-subject { font-weight: 700; }
.msg-badge {
    background: var(--accent);
    color: #000;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
    align-self: center;
    flex-shrink: 0;
    line-height: 1.3;
}
.msg-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.msg-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; color: var(--text-muted); }
.msg-empty h3 { font-size: 1rem; font-weight: 500; color: var(--text-secondary); }
.msg-empty p { font-size: 0.82rem; }
.msg-compose { flex: 1; display: flex; flex-direction: column; padding: 1.25rem; }
.msg-compose-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.msg-compose-header h3 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.msg-textarea { resize: vertical; min-height: 120px; }
.msg-back-btn { display: none; }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius-md); padding: 1.25rem; text-align: center; transition: all var(--transition-fast); cursor: pointer; }
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-subtle); }
.dropzone svg { width: 32px; height: 32px; color: var(--text-muted); margin-bottom: 0.5rem; }
.dropzone p { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.dropzone-link { color: var(--accent); cursor: pointer; font-weight: 500; }
.dropzone-link:hover { text-decoration: underline; }
.dropzone-hint { font-size: 0.7rem; color: var(--text-muted); }

.attachment-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0.5rem 0 0;
    padding: 0;
}

.thread-pj-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 1.25rem;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.dropzone-sm { padding: 0.65rem; margin-top: 0.5rem; }
.dropzone-sm svg { display: none; }
.dropzone-sm p { font-size: 0.75rem; margin: 0; }
.file-list { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.5rem; }
.file-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.75rem; }
.file-icon { font-size: 0.9rem; }
.file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.file-size { color: var(--text-muted); font-size: 0.68rem; flex-shrink: 0; }
.file-remove { border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; padding: 0 0.2rem; transition: color var(--transition-fast); }
.file-remove:hover { color: var(--error); }
.msg-thread { flex: 1; display: flex; flex-direction: column; }
.msg-thread-header { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border); gap: 0.75rem; }
.msg-thread-header-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.msg-thread-header h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-thread-date { font-size: 0.7rem; color: var(--text-muted); }
.msg-messages { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; }
.msg-bubble { max-width: 85%; }
.msg-bubble.mine { align-self: flex-end; }
.msg-bubble-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; }
.msg-bubble-avatar { width: 24px; height: 24px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 700; flex-shrink: 0; }
.msg-bubble-avatar.admin { background: linear-gradient(135deg, #e85d3a, #d4472a); }
.msg-bubble-name { font-size: 0.72rem; font-weight: 600; color: var(--text-primary); }
.admin-badge { font-size: 0.6rem; background: linear-gradient(135deg, #e85d3a, #d4472a); color: white; padding: 0.05rem 0.35rem; border-radius: var(--radius-full); font-weight: 600; margin-left: 0.25rem; vertical-align: middle; }
.msg-bubble-time { font-size: 0.65rem; color: var(--text-muted); }
.msg-bubble-body { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.65rem 0.85rem; font-size: 0.82rem; line-height: 1.55; color: var(--text-primary); }
.msg-bubble.mine .msg-bubble-body { background: var(--accent-subtle); border-color: rgba(245, 166, 35, 0.2); }
.msg-attachments { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.msg-attachment { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.5rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.7rem; color: var(--accent); text-decoration: none; transition: all var(--transition-fast); }
.msg-attachment:hover { background: var(--accent-subtle); border-color: var(--accent); }
.msg-attachment span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-attachment-size { color: var(--text-muted); font-size: 0.65rem; }
.msg-reply { border-top: 1px solid var(--border); padding: 0.85rem 1.25rem; }

.form-input.no-icon {
    padding-left: 0.85rem;
}
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.78rem;
}

/* ===== Responsive Messaging ===== */
@media (max-width: 768px) {
    .msg-container { flex-direction: column; min-height: auto; }
    .msg-sidebar { width: 100%; min-width: auto; border-right: none; border-bottom: 1px solid var(--border); max-height: 50vh; }
    .msg-sidebar-hidden { display: none; }
    .msg-main-visible { display: flex !important; }
    .msg-back-btn { display: flex; }
}

/* ===== Footer ===== */
.site-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: auto;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}
.shake { animation: shake 0.35s ease-out; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-w);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--sidebar-w);
    }
    .main-content {
        margin-left: 0;
    }
    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }

    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        top: var(--header-h);
        background: var(--bg-overlay);
        z-index: 85;
    }
    .sidebar-overlay.visible {
        display: block;
        animation: fadeIn 0.2s ease-out;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 1rem;
    }
    .card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }
    .video-grid {
        grid-template-columns: 1fr;
    }
    .video-grid-sm {
        grid-template-columns: 1fr 1fr;
    }
    .account-grid {
        grid-template-columns: 1fr;
    }
    .user-pill span:not(.avatar) {
        display: none;
    }
    .dropdown-chevron {
        display: none;
    }
    .header-logo span {
        display: none;
    }
    .user-dropdown {
        width: 240px;
    }
}

@media (max-width: 380px) {
    .video-grid-sm {
        grid-template-columns: 1fr;
    }
    .msg-sidebar { max-height: 40vh; }
}

/* ===== Avatar System ===== */

/* Avatar img dans .avatar (header) */
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Section photo de profil (account page) */
.avatar-section {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid var(--border);
    transition: border-color var(--transition-fast);
}

.avatar-preview:hover {
    border-color: var(--accent);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initial {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.avatar-controls {
    flex: 1;
    min-width: 0;
}

.dropzone-avatar {
    padding: 0.75rem !important;
}

.dropzone-avatar svg {
    width: 24px !important;
    height: 24px !important;
    margin-bottom: 0.25rem !important;
}

.avatar-status {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    min-height: 1.2em;
}

.avatar-status.success { color: #4ade80; }
.avatar-status.error { color: #f87171; }
.avatar-status.info { color: var(--accent); }

/* Avatar image dans les bulles de message */
.msg-bubble-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Responsive avatar section */
@media (max-width: 480px) {
    .avatar-section {
        flex-direction: column;
        align-items: center;
    }
    .avatar-controls {
        width: 100%;
    }
}

/* ===== Scrolling Banner ===== */
.site-banner {
    background: var(--accent);
    color: #000;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    position: fixed;
    top: 56px; /* = header height */
    left: 0;
    right: 0;
    height: 36px;
    display: flex;
    align-items: center;
    z-index: 999;
}

/* Décaler contenu et sidebar quand le bandeau est actif */
body.has-banner .main-content {
    margin-top: calc(56px + 36px);
}
body.has-banner .sidebar {
    top: calc(56px + 36px);
    height: calc(100vh - 56px - 36px);
}

.banner-track {
    display: inline-flex;
    animation: bannerScroll 40s linear infinite;
    will-change: transform;
}

.banner-track span {
    padding: 0 2rem;
    display: inline-block;
    line-height: 34px;
}

.banner-track span::after {
    content: '  ✦  ';
    opacity: 0.5;
}

@keyframes bannerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Admin Panel ===== */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    transition: border-color var(--transition-fast), transform 0.2s ease;
}

.admin-stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.admin-conv-list {
    overflow: visible !important;
    max-height: none !important;
}

.admin-msg-count {
    font-size: 0.68rem;
    color: var(--text-muted);
    flex-shrink: 0;
    padding-left: 0.5rem;
    white-space: nowrap;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0 0.25rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem;
}

.btn-sm {
    font-size: 0.75rem !important;
    padding: 0.45rem 0.9rem !important;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-secondary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Modal — caché par défaut */
.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-modal.visible {
    display: flex;
}

.admin-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0,0,0,0.3);
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

.admin-modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.admin-modal-close {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    line-height: 1;
}

.admin-modal-close:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.admin-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}

/* ===== Toggle Switch ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--border);
    border-radius: 24px;
    transition: background-color 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Responsive admin */
@media (max-width: 600px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    .admin-modal-content {
        max-height: 92vh;
    }
}

