/* ==========================================================================
   ConnectED Global Theme Variables & Resets
   ========================================================================== */
:root {
    --brand-darkest:  #004756;
    --brand-primary:  #006a7a;
    --brand-secondary:#188f9f;
    --brand-hover:    #42b6c6;
    --brand-light:    #70dde9;
    --brand-lightest: #9bffff;
    --bg-main:        #f4f6f7;
    --bg-card:        #ffffff;
    --sidebar-width:  240px;
    --topbar-height:  64px;
    --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-stack);
    background-color: var(--bg-main);
    color: #1a1a2e;
    overflow-x: hidden;
    margin: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--brand-darkest);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
    z-index: 1030;
    transition: transform 0.3s ease;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
}

/* Section labels */
.sidebar-section-label {
    list-style: none;
    padding: 0.35rem 1.5rem 0.2rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
}

.sidebar-menu {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    flex-grow: 0; /* don't stretch — let sidebar scroll to reach profile card */
}

.menu-divider {
    height: 1px;
    background-color: rgba(255,255,255,0.08);
    margin: 0.5rem 1.25rem;
}

.sidebar-icon {
    margin-right: 0.65rem;
    font-size: 1rem;
    width: 20px;
    text-align: center;
    opacity: 0.75;
    flex-shrink: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}
.sidebar-link:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.07);
    border-left-color: rgba(255,255,255,0.2);
}
.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon {
    opacity: 1;
}
.sidebar-link.active {
    color: #ffffff;
    background-color: rgba(155,255,255,0.1);
    border-left-color: var(--brand-lightest);
    font-weight: 600;
}

/* Sidebar profile card */
.sidebar-profile-card {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1rem;
    margin: 0.75rem 1rem;
    flex-shrink: 0; /* never compress — always scrollable to on mobile */
}
.profile-card-img {
    width: 48px; height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--brand-light);
}
.profile-card-avatar-fallback {
    width: 48px; height: 48px;
    line-height: 44px;
    border-radius: 50%;
    background-color: var(--brand-primary);
    border: 2px solid var(--brand-light);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

/* ==========================================================================
   Main Wrapper + Topbar
   ========================================================================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background-color: var(--bg-card);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-page-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-darkest);
    letter-spacing: 0.2px;
}

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

.topbar-icon-btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(0,71,86,0.06);
    color: var(--brand-darkest);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.2s ease;
    position: relative;
}
.topbar-icon-btn:hover {
    background: rgba(0,71,86,0.12);
    color: var(--brand-darkest);
}

.topbar-badge {
    position: absolute;
    top: 4px; right: 4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 16px; height: 16px;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    border-radius: 12px;
    background: rgba(0,71,86,0.05);
    border: 1px solid rgba(0,71,86,0.08);
    transition: background 0.2s ease;
    cursor: pointer;
}
.topbar-user:hover { background: rgba(0,71,86,0.1); }

.topbar-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-light);
}
.topbar-avatar-fallback {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--brand-light);
    flex-shrink: 0;
}
.topbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.topbar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-darkest);
}
.topbar-user-role {
    font-size: 0.68rem;
    color: #888;
}

/* Main content area */
.main-content {
    padding: 1.75rem 2rem;
    flex-grow: 1;
}

/* Mobile header */
.mobile-header {
    display: none;
    background-color: var(--brand-darkest);
    color: #ffffff;
    padding: 0.9rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1040;
}

/* ==========================================================================
   Auth Split Layout
   ========================================================================== */
.auth-page-bg {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main);
    padding: 2rem 1rem;
}
.auth-split-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    min-height: 600px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.auth-panel-left {
    position: relative;
    min-height: 400px;
}
.auth-panel-right {
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
}
.auth-form-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--brand-darkest);
    margin-bottom: 0.4rem;
}
.auth-panel-right .form-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: #555;
    margin-bottom: 0.35rem;
}
.auth-panel-right .form-control {
    padding: 0.7rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.93rem;
    transition: all 0.2s ease;
}
.auth-panel-right .form-control:focus {
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 4px rgba(24,143,159,0.12);
    outline: none;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background-color: var(--bg-card);
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}

/* Stat hero card */
.stat-hero-card {
    background: linear-gradient(135deg, var(--brand-darkest) 0%, var(--brand-primary) 100%);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}
.stat-hero-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155,255,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.stat-hero-number {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-lightest);
}
.stat-hero-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.55);
    font-weight: 600;
}
.stat-hero-sublabel {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.25rem;
}

/* Small stat card */
.stat-mini-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}
.stat-mini-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.stat-mini-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-darkest);
    line-height: 1;
}
.stat-mini-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
    box-shadow: 0 0 0 0.25rem rgba(66,182,198,0.25);
}
.btn-light-accent {
    background-color: rgba(255,255,255,0.12);
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.18);
    font-size: 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.btn-light-accent:hover {
    background-color: var(--brand-lightest);
    color: var(--brand-darkest) !important;
    border-color: var(--brand-lightest);
}

/* ==========================================================================
   Notification Badge
   ========================================================================== */
.notification-badge {
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}
.pulse-animation {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
    70%  { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239,68,68,0); }
    100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ==========================================================================
   Skeleton Loader
   ========================================================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
    .auth-split-card { grid-template-columns: 1fr; max-width: 480px; }
    .auth-panel-left { display: none !important; }
    .auth-panel-right { padding: 2.5rem 1.75rem; }
}

@media (max-width: 767.98px) {
    .mobile-header { display: flex; justify-content: space-between; align-items: center; }
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        width: 270px;
        height: 100vh;
        height: 100dvh; /* dynamic viewport height — accounts for mobile browser chrome */
        top: 0;
        bottom: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch; /* smooth momentum scroll on iOS */
    }
    .sidebar.show { transform: translateX(0); }
    .main-wrapper { margin-left: 0; width: 100%; }
    .main-content { padding: 1.25rem; }
    .topbar { padding: 0 1.25rem; }
    .sidebar-overlay {
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 1025;
    }
}

/* ==========================================================================
   Font Size — controlled via data-font-size on <html>
   ========================================================================== */
html[data-font-size="small"]  { font-size: 14px; }
html[data-font-size="medium"] { font-size: 16px; }
html[data-font-size="large"]  { font-size: 18px; }

/* ==========================================================================
   Dark Mode — applied to <html class="dark-mode"> so it cascades globally
   ========================================================================== */
html.dark-mode {
    --bg-main: #0f1923;
    --bg-card: #1a2535;
}

html.dark-mode body {
    background-color: var(--bg-main);
    color: #e2e8f0;
}

/* Topbar */
html.dark-mode .topbar {
    background-color: #1a2535;
    border-bottom-color: rgba(255,255,255,0.07);
}
html.dark-mode .topbar-page-title { color: #e2e8f0; }
html.dark-mode .topbar-user-name  { color: #e2e8f0; }
html.dark-mode .topbar-user-role  { color: #94a3b8; }
html.dark-mode .topbar-icon-btn   { background: rgba(255,255,255,0.08); color: #e2e8f0; }
html.dark-mode .topbar-icon-btn:hover { background: rgba(255,255,255,0.13); }
html.dark-mode .topbar-user       { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }

/* Cards */
html.dark-mode .card,
html.dark-mode .stat-mini-card {
    background-color: var(--bg-card);
    color: #e2e8f0;
}
html.dark-mode .stat-mini-number { color: #e2e8f0; }
html.dark-mode .stat-mini-label  { color: #94a3b8; }

/* Text utilities */
html.dark-mode .text-dark   { color: #e2e8f0 !important; }
html.dark-mode .text-muted  { color: #94a3b8 !important; }
html.dark-mode h1, html.dark-mode h2,
html.dark-mode h3, html.dark-mode h4,
html.dark-mode h5, html.dark-mode h6 { color: #e2e8f0; }

/* Forms */
html.dark-mode .form-control,
html.dark-mode .form-select {
    background-color: #0f1923;
    border-color: rgba(255,255,255,0.12);
    color: #e2e8f0;
}
html.dark-mode .form-control:focus,
html.dark-mode .form-select:focus {
    background-color: #0f1923;
    border-color: var(--brand-secondary);
    color: #e2e8f0;
}
html.dark-mode .form-label { color: #94a3b8; }

/* Tables */
html.dark-mode table          { color: #e2e8f0; }
html.dark-mode thead          { background: #1e2d3d !important; }
html.dark-mode .table-hover tbody tr:hover { background: rgba(255,255,255,0.04); }
html.dark-mode .leaderboard-you { background: rgba(24,143,159,0.1) !important; }

/* Borders & dividers */
html.dark-mode .border-top,
html.dark-mode .border-bottom { border-color: rgba(255,255,255,0.08) !important; }
html.dark-mode hr              { border-color: rgba(255,255,255,0.08); }

/* Backgrounds used inline via style= */
html.dark-mode [style*="background:#f8fafb"],
html.dark-mode [style*="background: #f8fafb"] {
    background: rgba(255,255,255,0.04) !important;
}
html.dark-mode [style*="background:rgba(0,71,86,0.0"],
html.dark-mode [style*="background: rgba(0,71,86,0.0"] {
    background: rgba(255,255,255,0.05) !important;
}

/* Alerts */
html.dark-mode .alert { border-color: rgba(255,255,255,0.1); }

/* Settings nav */
html.dark-mode .settings-nav-link       { color: #94a3b8; }
html.dark-mode .settings-nav-link:hover { background: rgba(255,255,255,0.06); color: #e2e8f0; }
html.dark-mode .font-size-option        { border-color: rgba(255,255,255,0.15); color: #94a3b8; }
html.dark-mode .font-size-option:hover  { color: #e2e8f0; }

/* Notification list */
html.dark-mode .notification-unread { background: rgba(24,143,159,0.08); }

/* Scope pills on leaderboard */
html.dark-mode .scope-pill {
    background: rgba(255,255,255,0.07);
    color: #e2e8f0;
}
html.dark-mode .scope-pill.active {
    background: var(--brand-primary);
    color: white;
}

/* ==========================================================================
   Dark Mode — Extended fixes for tables, badges, inline backgrounds
   ========================================================================== */

/* Table rows — tbody background was transparent, showing white card bg */
html.dark-mode tbody tr {
    background-color: var(--bg-card);
    border-color: rgba(255,255,255,0.06);
}
html.dark-mode .table {
    --bs-table-bg: var(--bg-card);
    --bs-table-striped-bg: rgba(255,255,255,0.03);
    --bs-table-hover-bg: rgba(255,255,255,0.05);
    --bs-table-border-color: rgba(255,255,255,0.07);
    color: #e2e8f0;
}
html.dark-mode .table td,
html.dark-mode .table th { border-color: rgba(255,255,255,0.07); }

/* Thead text */
html.dark-mode thead th { color: #94a3b8 !important; }

/* Table row hover override for leaderboard brand-hover color */
html.dark-mode .leaderboard-row:hover {
    background: var(--brand-primary) !important;
    color: white !important;
}

/* Badges — light backgrounds become invisible on dark */
html.dark-mode .badge[style*="background:rgba(0,71,86"] {
    background: rgba(155,255,255,0.1) !important;
    color: var(--brand-lightest) !important;
}
html.dark-mode .badge[style*="background:rgba(16,185,129"] {
    background: rgba(16,185,129,0.15) !important;
    color: #6ee7b7 !important;
}
html.dark-mode .badge[style*="background:rgba(239,68,68"] {
    background: rgba(239,68,68,0.15) !important;
    color: #fca5a5 !important;
}
html.dark-mode .badge[style*="background:rgba(245,158,11"] {
    background: rgba(245,158,11,0.15) !important;
    color: #fcd34d !important;
}
html.dark-mode .badge[style*="background:rgba(0,0,0"] {
    background: rgba(255,255,255,0.1) !important;
    color: #94a3b8 !important;
}

/* White inline backgrounds — cards and rows with style="background:white" or "#ffffff" */
html.dark-mode [style*="background:white"],
html.dark-mode [style*="background: white"],
html.dark-mode [style*="background:#ffffff"],
html.dark-mode [style*="background: #ffffff"],
html.dark-mode [style*="background-color:#ffffff"],
html.dark-mode [style*="background-color: #ffffff"] {
    background: var(--bg-card) !important;
}

/* bg-white Bootstrap class */
html.dark-mode .bg-white { background-color: var(--bg-card) !important; }

/* bg-light Bootstrap class */
html.dark-mode .bg-light { background-color: rgba(255,255,255,0.05) !important; }

/* table-light thead Bootstrap class */
html.dark-mode .table-light,
html.dark-mode .table-light th { 
    background-color: #1e2d3d !important;
    color: #94a3b8 !important;
}

/* Inline style backgrounds used in management templates — f8fafb rows */
html.dark-mode [style*="background:#f8fafb"],
html.dark-mode [style*="background: #f8fafb"],
html.dark-mode [style*="background-color:#f8fafb"] {
    background: rgba(255,255,255,0.04) !important;
}

/* Inline borders */
html.dark-mode [style*="border:1px solid rgba(0,0,0"] {
    border-color: rgba(255,255,255,0.07) !important;
}
html.dark-mode [style*="border: 1px solid rgba(0,0,0"] {
    border-color: rgba(255,255,255,0.07) !important;
}

/* Inline text colors — dark text on white backgrounds */
html.dark-mode [style*="color:#1a1a2e"],
html.dark-mode [style*="color: #1a1a2e"],
html.dark-mode [style*="color:#333"],
html.dark-mode [style*="color: #333"],
html.dark-mode [style*="color:#444"],
html.dark-mode [style*="color: #444"],
html.dark-mode [style*="color:#555"],
html.dark-mode [style*="color: #555"] {
    color: #e2e8f0 !important;
}
html.dark-mode [style*="color:#666"],
html.dark-mode [style*="color: #666"],
html.dark-mode [style*="color:#777"],
html.dark-mode [style*="color: #777"],
html.dark-mode [style*="color:#888"],
html.dark-mode [style*="color: #888"],
html.dark-mode [style*="color:#999"],
html.dark-mode [style*="color: #999"] {
    color: #94a3b8 !important;
}

/* Avatar initials circles */
html.dark-mode [style*="background:rgba(0,71,86,0.1)"],
html.dark-mode [style*="background: rgba(0,71,86,0.1)"] {
    background: rgba(155,255,255,0.08) !important;
    color: var(--brand-lightest) !important;
}
html.dark-mode [style*="background:rgba(0,71,86,0.08)"],
html.dark-mode [style*="background: rgba(0,71,86,0.08)"] {
    background: rgba(155,255,255,0.06) !important;
}
html.dark-mode [style*="background:rgba(0,71,86,0.07)"],
html.dark-mode [style*="background: rgba(0,71,86,0.07)"] {
    background: rgba(155,255,255,0.06) !important;
}
html.dark-mode [style*="background:rgba(0,71,86,0.06)"],
html.dark-mode [style*="background: rgba(0,71,86,0.06)"] {
    background: rgba(255,255,255,0.05) !important;
}
html.dark-mode [style*="background:rgba(0,71,86,0.05)"],
html.dark-mode [style*="background: rgba(0,71,86,0.05)"] {
    background: rgba(255,255,255,0.04) !important;
}
html.dark-mode [style*="background:rgba(0,71,86,0.04)"],
html.dark-mode [style*="background: rgba(0,71,86,0.04)"] {
    background: rgba(255,255,255,0.03) !important;
}

/* Dashed empty states */
html.dark-mode [style*="border:1.5px dashed"],
html.dark-mode [style*="border: 1.5px dashed"] {
    border-color: rgba(255,255,255,0.12) !important;
    background: rgba(255,255,255,0.02) !important;
}

/* Stat hero cards — keep gradient, fix subtext */
html.dark-mode .stat-hero-card .stat-hero-sublabel { color: rgba(255,255,255,0.6); }

/* Quick action buttons in dashboards */
html.dark-mode [style*="background:rgba(0,71,86,0.06)"],
html.dark-mode [style*="background: rgba(0,71,86,0.06)"] {
    background: rgba(255,255,255,0.07) !important;
    color: #e2e8f0 !important;
}

/* Submission method labels in challenge form */
html.dark-mode .submission-method-label:hover {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.15) !important;
}

/* Top3 leaderboard rows */
html.dark-mode .top3-row {
    border-bottom-color: rgba(255,255,255,0.06);
}
html.dark-mode .top3-row:hover {
    background: rgba(66,182,198,0.12) !important;
}
html.dark-mode .top3-you {
    background: rgba(24,143,159,0.08) !important;
}
html.dark-mode .top3-pts { color: var(--brand-lightest); }
html.dark-mode .top3-rank-num { color: #94a3b8; }

/* Password toggle buttons */
html.dark-mode .password-toggle { color: #94a3b8; }
html.dark-mode .password-toggle:hover { color: var(--brand-lightest); }

/* Mini profile card in sidebar — already dark, no changes needed */

/* Landing page — not affected by dark mode (guest content) */

