/* ============================================================
   VJP Study Road — study.vjpinfotech.in
   Redesigned design system (dark + light themes)
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
    /* Brand */
    --primary: #7c86ff;
    --primary-dark: #5b5ff2;
    --primary-light: #a9b2ff;
    --primary-hover: #939dff;
    --primary-glow: rgba(124, 134, 255, 0.26);
    --secondary: #34d399;
    --secondary-dark: #10b981;
    --danger: #f87171;
    --danger-dark: #ef4444;
    --warning: #fbbf24;
    --warning-dark: #f59e0b;
    --purple: #a78bfa;
    --pink: #f472b6;
    --cyan: #22d3ee;
    --success: #34d399;

    /* Surfaces (dark theme = default) */
    --bg-primary: #0a0c12;
    --bg-secondary: #0e1119;
    --bg-card: #131724;
    --bg-card-hover: #181d2e;
    --bg-elevated: #1e2437;
    --bg-input: #0d1018;
    --card-bg: #131724;

    /* Borders */
    --border: #232b40;
    --border-light: #303a56;
    --border-focus: #7c86ff;

    /* Text */
    --text: #c9d3e5;
    --text-bright: #f1f5fb;
    --text-muted: #8b96ad;
    --text-dim: #5d6a84;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 12px 34px rgba(0, 0, 0, 0.46);
    --shadow-xl: 0 22px 60px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 24px var(--primary-glow);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 24px;

    /* Motion */
    --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --nav-height: 104px;

    /* Gradient brand */
    --gradient-brand: linear-gradient(135deg, #818cf8 0%, #a78bfa 55%, #c084fc 100%);
    --gradient-brand-strong: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #a855f7 100%);
}

[data-theme="light"] {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.16);
    --secondary: #059669;
    --secondary-dark: #047857;
    --danger: #dc2626;
    --danger-dark: #b91c1c;
    --warning: #d97706;
    --warning-dark: #b45309;
    --purple: #7c3aed;
    --pink: #db2777;
    --cyan: #0891b2;
    --success: #059669;

    --bg-primary: #f4f5fb;
    --bg-secondary: #eceef7;
    --bg-card: #ffffff;
    --bg-card-hover: #fbfcff;
    --bg-elevated: #eef0f8;
    --bg-input: #f7f8fd;
    --card-bg: #ffffff;

    --border: #e3e6f0;
    --border-light: #cfd5e6;
    --border-focus: #6366f1;

    --text: #303a52;
    --text-bright: #0f1526;
    --text-muted: #5c6580;
    --text-dim: #8a93ab;

    --shadow-sm: 0 1px 3px rgba(23, 30, 54, 0.07);
    --shadow-md: 0 6px 18px rgba(23, 30, 54, 0.09);
    --shadow-lg: 0 12px 34px rgba(23, 30, 54, 0.12);
    --shadow-xl: 0 22px 60px rgba(23, 30, 54, 0.16);
    --shadow-glow: 0 0 24px rgba(79, 70, 229, 0.14);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
}

::selection { background: var(--primary); color: #fff; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; border: 2px solid var(--bg-secondary); }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; }
hr { border: none; border-top: 1px solid var(--border); }

/* ============================================================
   3. ICONS
   ============================================================ */
.icon {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: -3px;
}
.icon + span, .btn .icon, .nav-link .icon { margin-right: 6px; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* ============================================================
   4. ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -40px) scale(1.08); }
    50% { transform: translate(-30px, 30px) scale(0.94); }
    75% { transform: translate(30px, 15px) scale(1.04); }
}
@keyframes pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   5. ANIMATED BACKGROUND
   ============================================================ */
.animated-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: -1;
    background: var(--bg-primary);
    transition: background 0.3s ease;
}
.animated-bg::before {
    content: '';
    position: absolute;
    width: 640px;
    height: 640px;
    top: -220px;
    right: -180px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    animation: float 22s ease-in-out infinite;
}
.animated-bg::after {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    bottom: -180px;
    left: -160px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.10) 0%, transparent 70%);
    animation: float 26s ease-in-out infinite reverse;
}
[data-theme="light"] .animated-bg::before { background: radial-gradient(circle, rgba(99, 102, 241, 0.10) 0%, transparent 70%); }
[data-theme="light"] .animated-bg::after { background: radial-gradient(circle, rgba(5, 150, 105, 0.08) 0%, transparent 70%); }

/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.92em;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    position: relative;
    white-space: nowrap;
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.btn-primary {
    background: var(--gradient-brand-strong);
    color: #fff;
    box-shadow: 0 4px 16px var(--primary-glow), var(--shadow-sm);
}
.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow), var(--shadow-md);
    filter: brightness(1.06);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    color: var(--text-bright);
    border-color: var(--border-light);
    transform: translateY(-1px);
    background: var(--bg-card-hover);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}
.btn-success:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.06); }

.btn-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.28);
}
.btn-danger:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.06); }

.btn-warning {
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.28);
}
.btn-warning:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.05); }

.btn-add { background: var(--secondary); color: #fff; }
.btn-del { background: rgba(239, 68, 68, 0.12); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

.btn-sm { padding: 7px 14px; font-size: 0.82em; border-radius: 8px; }
.btn-lg { padding: 14px 30px; font-size: 1.02em; }
.btn-xs { padding: 4px 10px; font-size: 0.74em; border-radius: 6px; }
.btn-rel { position: relative; }

/* Active / toggle state */
.btn.active,
.filter-btn.active {
    background: var(--gradient-brand-strong) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 14px var(--primary-glow) !important;
}

/* ============================================================
   7. FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-bright);
    font-weight: 600;
    font-size: 0.83em;
    letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 15px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.94em;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b96ad' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
}

.form-input { resize: vertical; min-height: 150px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full-width { grid-column: 1 / -1; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.form-actions .btn { width: auto; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.full-w { width: 100%; }

.otp-input {
    text-align: center !important;
    font-size: 1.6em !important;
    letter-spacing: 10px !important;
    font-weight: 700 !important;
    font-family: 'JetBrains Mono', 'Courier New', monospace !important;
}

.recipient-info { color: var(--text-muted); font-size: 0.85em; margin-top: 5px; }
.recipient-info strong { color: var(--text); }

/* ============================================================
   8. ALERTS
   ============================================================ */
.alert {
    padding: 13px 17px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    font-size: 0.88em;
    animation: slideDown 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}
.alert-error {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.28);
    color: var(--danger);
}
.alert-success {
    background: rgba(16, 185, 129, 0.10);
    border-color: rgba(16, 185, 129, 0.28);
    color: var(--success);
}
.alert-info {
    background: rgba(99, 102, 241, 0.10);
    border-color: rgba(99, 102, 241, 0.28);
    color: var(--primary);
}
.alert-warning {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

/* ============================================================
   9. AUTH PAGES (Login / Register / Forgot)
   ============================================================ */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px 16px;
    position: relative;
}

.auth-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 42px 38px;
    width: 100%;
    max-width: 460px;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease;
    box-shadow: var(--shadow-xl), 0 0 90px var(--primary-glow);
    backdrop-filter: blur(10px);
}
.auth-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-brand);
}
.auth-container::after {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

.auth-container .logo { text-align: center; margin-bottom: 30px; position: relative; z-index: 1; }
.auth-container .logo .logo-icon { font-size: 2.8em; margin-bottom: 10px; display: block; }
.auth-container .logo h1 {
    color: var(--text-bright);
    font-size: 1.9em;
    font-weight: 800;
    letter-spacing: -0.7px;
}
.auth-container .logo h1 span {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-container .logo p { color: var(--text-muted); font-size: 0.88em; margin-top: 6px; }

.auth-page .theme-toggle-floating {
    position: fixed;
    top: 18px; right: 18px;
    z-index: 1000;
}

.auth-desc { color: var(--text-muted); text-align: center; margin-bottom: 20px; font-size: 0.9em; }
.auth-desc strong { color: var(--text-bright); }

.auth-link { text-align: center; margin-top: 18px; color: var(--text-muted); font-size: 0.88em; }
.auth-link a { color: var(--primary); font-weight: 600; }
.auth-link a:hover { color: var(--primary-hover); }

.auth-links { margin-top: 16px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 0.85em; }
.auth-links a { color: var(--text-muted); }
.auth-links a:hover { color: var(--text-bright); }
.resend-link { cursor: pointer; }

/* ============================================================
   10. HEADER / NAVIGATION
   ============================================================ */
.top-nav {
    background: var(--bg-secondary);
    background: color-mix(in srgb, var(--bg-secondary) 82%, transparent);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}
[data-theme="light"] .top-nav { box-shadow: 0 4px 24px rgba(23, 30, 54, 0.06); }

.nav-inner {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}
.nav-actions { min-width: 0; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.12em;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text-bright);
    flex-shrink: 0;
}
.brand:hover { color: var(--text-bright); }
.brand-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--gradient-brand-strong);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.brand-text span {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Second row — every nav option always visible, scrolls sideways only if needed */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 44px;
    padding: 0 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    background: color-mix(in srgb, var(--bg-secondary) 92%, transparent);
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links .nav-link { height: 100%; border-radius: 0; border-bottom: 2px solid transparent; }
.nav-links .nav-link:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.nav-links .nav-link.active { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.nav-links .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2.5px;
    border-radius: 2px 2px 0 0;
    background: var(--gradient-brand);
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 9px;
    color: var(--text-muted);
    font-size: 0.86em;
    font-weight: 550;
    white-space: nowrap;
    position: relative;
}
.nav-link:hover { color: var(--text-bright); background: var(--bg-elevated); }
.nav-link.active { color: var(--text-bright); background: var(--bg-elevated); }
.nav-link.active::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px; bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient-brand);
}
.nav-link.admin { color: var(--warning); }

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--danger);
    color: #fff;
    font-size: 0.62em;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}
.nav-badge.warning { background: var(--warning); color: #1a1305; box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4); }

/* Legacy alias */
.notif-badge {
    position: absolute;
    top: -5px; right: -5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 0.62em;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}
.notif-badge.warning { background: var(--warning); color: #1a1305; }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.icon-btn:hover { color: var(--text-bright); border-color: var(--border-light); background: var(--bg-card-hover); }
.icon-btn.logout:hover { color: var(--danger); border-color: rgba(239, 68, 68, 0.4); }
.icon-btn svg { display: block; margin: auto; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 12px 4px 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.nav-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--gradient-brand-strong);
    color: #fff;
    font-size: 0.7em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-user-info { display: flex; flex-direction: column; line-height: 1.15; }
.nav-user-info strong { color: var(--text-bright); font-size: 0.8em; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-info .exp-mini { font-size: 0.62em; margin: 0; padding: 1px 7px; align-self: flex-start; }



/* ============================================================
   11. READING PROGRESS
   ============================================================ */
.reading-progress {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    height: 3px;
    background: var(--gradient-brand);
    z-index: 99;
    transition: width 0.1s linear;
    width: 0;
    box-shadow: 0 0 12px var(--primary-glow);
}

/* ============================================================
   12. FOOTER
   ============================================================ */
.site-footer {
    text-align: center;
    padding: 36px 24px 44px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
    background: var(--bg-secondary);
}
.site-footer p { color: var(--text-muted); font-size: 0.84em; margin: 4px 0; }
.site-footer strong { color: var(--text); }
.site-footer .footer-divider {
    width: 56px; height: 2px;
    background: var(--gradient-brand);
    margin: 12px auto;
    border-radius: 2px;
}
.site-footer .footer-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-bright); margin-bottom: 6px; }

/* ============================================================
   13. LAYOUT CONTAINERS
   ============================================================ */
.dashboard-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px 24px 60px;
    animation: fadeIn 0.4s ease;
}
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 60px;
    animation: fadeIn 0.4s ease;
}

.dashboard-header { margin-bottom: 28px; text-align: center; padding: 34px 0 14px; }
.dashboard-header h1 {
    color: var(--text-bright);
    font-size: 2em;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.2;
}
.dashboard-header p { color: var(--text-muted); margin-top: 6px; font-size: 1em; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h1 {
    color: var(--text-bright);
    font-size: 1.7em;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-header h1 .icon { color: var(--primary); }
.page-subtitle { color: var(--text-muted); margin-top: 4px; font-size: 0.9em; }

.header-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-badge {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8em;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}

/* ============================================================
   14. STATS ROW
   ============================================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 18px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-brand);
    opacity: 0.35;
}
.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg);
}
.stat-card .stat-number {
    font-size: 2em;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.stat-card .stat-label { color: var(--text-muted); font-size: 0.84em; margin-top: 6px; }

/* ============================================================
   15. FILTER BAR / SEARCH
   ============================================================ */
.exp-filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-bottom: 22px;
    transition: var(--transition);
}
.exp-filter-bar:hover { border-color: var(--border-light); box-shadow: var(--shadow-md); }

.search-input {
    width: 100%;
    padding: 13px 17px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.98em;
    font-family: 'Inter', sans-serif;
    margin-bottom: 12px;
    transition: var(--transition);
    outline: none;
}
.search-input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-glow); }
.search-input::placeholder { color: var(--text-dim); }

.search-box { position: relative; }
.search-box .search-icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    display: flex;
}
.search-box input { padding-left: 40px; width: 100%; }

.filter-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.issues-filters { margin-bottom: 18px; }
.filter-form select {
    padding: 11px 14px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.88em;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}
.filter-form select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-glow); }

.results-count { margin: 14px 0; color: var(--text-muted); font-size: 0.9em; }
.results-count strong { color: var(--text-bright); }

/* ============================================================
   16. TOPIC GRID (Dashboard)
   ============================================================ */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 16px;
}
.topic-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    display: block;
    text-decoration: none !important;
    color: var(--text) !important;
    animation: fadeIn 0.5s ease;
    animation-fill-mode: backwards;
    overflow: hidden;
}
.topic-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2.5px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: var(--transition);
}
.topic-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-xl), 0 0 34px var(--primary-glow);
    background: var(--bg-card-hover);
}
.topic-card:hover::before { opacity: 1; }

.topic-card .topic-number {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border);
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72em;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    transition: var(--transition);
}
.topic-card:hover .topic-number {
    background: var(--gradient-brand-strong);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.topic-card .topic-icon {
    width: 52px; height: 52px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--primary-glow), transparent);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7em;
    margin-bottom: 14px;
    transition: var(--transition);
}
.topic-card:hover .topic-icon { transform: scale(1.06); }

.topic-card h3 {
    color: var(--text-bright);
    font-size: 1.05em;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}
.topic-card p { color: var(--text-muted); font-size: 0.83em; line-height: 1.6; }

.topic-card .topic-meta { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.topic-card .topic-meta .badge { padding: 3px 11px; border-radius: 999px; font-size: 0.7em; font-weight: 600; }

.topic-card .completed-badge {
    display: none;
    position: absolute;
    bottom: 14px; right: 14px;
    color: var(--success);
    font-weight: 600;
    font-size: 0.8em;
    align-items: center;
    gap: 4px;
}
.topic-card.completed { border-color: rgba(16, 185, 129, 0.35); }
.topic-card.completed .completed-badge { display: flex; }
.topic-card.topic-locked { opacity: 0.55; }

/* Category badges */
.badge { display: inline-flex; align-items: center; gap: 4px; }
.badge-core { background: rgba(99, 102, 241, 0.14); color: var(--primary); }
.badge-net { background: rgba(6, 182, 212, 0.14); color: var(--cyan); }
.badge-sec { background: rgba(139, 92, 246, 0.14); color: var(--purple); }
.badge-ops { background: rgba(245, 158, 11, 0.14); color: var(--warning); }
.badge-tshoot { background: rgba(239, 68, 68, 0.14); color: var(--danger); }
.badge-storage { background: rgba(139, 92, 246, 0.14); color: var(--purple); }
.badge-dr { background: rgba(99, 102, 241, 0.14); color: var(--primary); }
.badge-auto { background: rgba(245, 158, 11, 0.14); color: var(--warning); }
.badge-web { background: rgba(16, 185, 129, 0.14); color: var(--secondary); }
.badge-virt { background: rgba(139, 92, 246, 0.14); color: var(--purple); }

/* Experience badges */
.exp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72em;
    font-weight: 600;
    margin-left: 5px;
}
.exp-mini {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.68em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.exp-fresher { background: rgba(16, 185, 129, 0.14); color: var(--secondary); }
.exp-junior { background: rgba(99, 102, 241, 0.14); color: var(--primary); }
.exp-senior { background: rgba(245, 158, 11, 0.14); color: var(--warning); }
.exp-lead { background: rgba(139, 92, 246, 0.14); color: var(--purple); }

.exp-level-indicator {
    padding: 5px 12px;
    border-radius: 9px;
    font-size: 0.78em;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.exp-level-indicator.accessible { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.28); color: var(--success); }
.exp-level-indicator.current { background: rgba(99, 102, 241, 0.14); border: 1px solid var(--primary); color: var(--primary); }
.exp-level-indicator.locked { opacity: 0.4; border: 1px dashed var(--border-light); }

/* ============================================================
   17. TOPIC VIEW
   ============================================================ */
.topic-view {
    max-width: 1000px;
    margin: 0 auto;
    padding: 28px 24px 60px;
    animation: fadeIn 0.4s ease;
}

.topic-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 34px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.topic-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-brand);
}
.topic-header::after {
    content: '';
    position: absolute;
    top: -100px; right: -80px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
}
.topic-header .back-link {
    color: var(--text-muted);
    font-size: 0.88em;
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}
.topic-header .back-link:hover { color: var(--text-bright); transform: translateX(-4px); }
.topic-header h1 {
    color: var(--text-bright);
    font-size: 1.7em;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}
.topic-header .topic-hero-icon {
    width: 54px; height: 54px;
    border-radius: 14px;
    background: var(--gradient-brand-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    flex-shrink: 0;
    box-shadow: 0 6px 18px var(--primary-glow);
}
.topic-header p { color: var(--text-muted); margin-top: 8px; font-size: 0.93em; position: relative; z-index: 1; }

/* Topic nav tabs */
.topic-nav {
    display: flex;
    gap: 3px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 7px;
    position: sticky;
    top: calc(var(--nav-height) + 10px);
    z-index: 50;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.topic-nav a {
    padding: 7px 13px;
    border-radius: 9px;
    color: var(--text-muted);
    font-size: 0.8em;
    font-weight: 550;
    transition: var(--transition);
    white-space: nowrap;
}
.topic-nav a:hover, .topic-nav a.active {
    background: var(--bg-elevated);
    color: var(--text-bright);
}
.topic-nav a.active { box-shadow: inset 0 0 0 1px var(--border-light); }

/* Content sections */
.content-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 30px 32px;
    margin-bottom: 18px;
    transition: var(--transition);
    animation: fadeIn 0.4s ease;
    box-shadow: var(--shadow-sm);
}
.content-section:hover { border-color: var(--border-light); }

.content-section .section-label {
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: 999px;
}
.label-what { background: rgba(99, 102, 241, 0.14); color: var(--primary); }
.label-use { background: rgba(16, 185, 129, 0.14); color: var(--success); }
.label-example { background: rgba(245, 158, 11, 0.14); color: var(--warning); }
.label-command { background: rgba(139, 92, 246, 0.14); color: var(--purple); }
.label-problem { background: rgba(239, 68, 68, 0.14); color: var(--danger); }
.label-resolution { background: rgba(16, 185, 129, 0.14); color: var(--success); }
.label-gpo { background: rgba(99, 102, 241, 0.14); color: var(--primary); }
.label-powershell { background: rgba(6, 182, 212, 0.14); color: var(--cyan); }

.content-section h2 {
    color: var(--text-bright);
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}
.content-section h3 { color: var(--text-bright); font-size: 1.06em; font-weight: 650; margin: 22px 0 10px; }
.content-section h4 { color: var(--text); font-size: 0.98em; font-weight: 600; margin: 14px 0 8px; }
.content-section p { margin: 10px 0; line-height: 1.8; }
.content-section ul, .content-section ol { margin: 12px 0; padding-left: 24px; }
.content-section li { margin: 6px 0; line-height: 1.75; }
.content-section strong { color: var(--text-bright); }

.content-section code {
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.84em;
    color: var(--cyan);
}

/* Code blocks */
.content-section .cmd-box {
    background: #0b0e17;
    border: 1px solid #232b40;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.8em;
    line-height: 1.65;
    margin: 16px 0;
    overflow-x: auto;
    white-space: pre;
    color: #a5b4fc;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.content-section .cmd-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-brand);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.content-section .cmd-box .cc { color: #5d6a84; font-style: italic; }
.content-section .cmd-box .kw { color: #f472b6; }
.content-section .cmd-box .str { color: #6ee7b7; }
.content-section .cmd-box .out { color: var(--secondary); }
.content-section .cmd-box .err { color: var(--danger); }

/* Special boxes */
.content-section .real-problem-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.07), rgba(239, 68, 68, 0.02));
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin: 16px 0;
}
.content-section .real-problem-box .problem-label {
    color: var(--danger);
    font-weight: 700;
    font-size: 0.84em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.content-section .real-problem-box h4 { color: var(--text-bright); font-size: 1.05em; margin-bottom: 10px; }

.content-section .enterprise-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.07), rgba(139, 92, 246, 0.03));
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin: 16px 0;
}
.content-section .enterprise-box .ent-label {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.84em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Resolution steps */
.content-section .resolution-steps { counter-reset: step; margin: 16px 0; }
.content-section .resolution-steps .step {
    counter-increment: step;
    padding: 10px 16px 10px 48px;
    position: relative;
    border-left: 2px solid rgba(16, 185, 129, 0.3);
    margin-left: 16px;
    line-height: 1.65;
}
.content-section .resolution-steps .step:last-child { border-color: transparent; }
.content-section .resolution-steps .step::before {
    content: counter(step);
    position: absolute;
    left: -18px; top: 10px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78em;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.instructions-box {
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.03));
    border-color: rgba(99, 102, 241, 0.3);
}
.instructions-box ol { line-height: 1.8; margin-top: 10px; }

/* ============================================================
   18. ISSUES & RESOLUTIONS
   ============================================================ */
.issues-list { display: flex; flex-direction: column; gap: 16px; }

.issue-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 0;
    border-left: 4px solid var(--border);
    transition: var(--transition);
}
.issue-card:hover {
    border-color: var(--border-light);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}
.issue-card.severity-critical { border-left-color: var(--danger); }
.issue-card.severity-high { border-left-color: var(--warning); }
.issue-card.severity-medium { border-left-color: var(--primary); }
.issue-card.severity-low { border-left-color: var(--secondary); }

.issue-card .issue-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}
.issue-card .issue-header h3 { color: var(--text-bright); font-size: 1.02em; font-weight: 700; }
.issue-card .issue-topic { font-size: 0.8em; color: var(--text-muted); display: block; margin-top: 4px; }

.issue-card .issue-severity {
    padding: 4px 13px;
    border-radius: 999px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.issue-card .symptoms, .issue-card .cause, .issue-card .resolution {
    margin: 10px 0;
    font-size: 0.88em;
    line-height: 1.65;
}
.issue-card .symptoms strong, .issue-card .cause strong, .issue-card .resolution strong {
    color: var(--text-bright);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.issue-card .commands {
    background: #0b0e17;
    border: 1px solid #232b40;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.76em;
    line-height: 1.55;
    margin-top: 12px;
    color: #a5b4fc;
    white-space: pre-wrap;
    overflow-x: auto;
}

.issue-topic-badge {
    background: rgba(99, 102, 241, 0.14);
    color: var(--primary);
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.72em;
    font-weight: 600;
}
.issue-title { font-size: 1.08em; margin: 0 0 10px 0; color: var(--text-bright); font-weight: 700; }
.issue-category { color: var(--text-muted); font-size: 0.8em; display: inline-flex; align-items: center; gap: 5px; }

.issue-details { margin-top: 6px; }
.issue-details summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 550;
    padding: 8px 0;
    user-select: none;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.issue-details summary::-webkit-details-marker { display: none; }
.issue-details summary::before {
    content: '';
    width: 8px; height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
}
.issue-details[open] summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.issue-details summary:hover { color: var(--primary-hover); }

.issue-section { margin-top: 14px; }
.issue-section h4 {
    font-size: 0.82em;
    margin: 0 0 6px 0;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.issue-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px 15px;
    line-height: 1.65;
    font-size: 0.88em;
    color: var(--text);
}
.issue-content.root-cause { border-left: 3px solid var(--warning); }
.issue-content.resolution { border-left: 3px solid var(--success); }

.command-block {
    background: #0b0e17;
    border: 1px solid #232b40;
    border-radius: 8px;
    padding: 14px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.84em;
    line-height: 1.5;
    white-space: pre;
    color: #a5b4fc;
}
.commands-section { margin-top: 14px; }
.copy-btn { margin-top: 8px; }

/* ============================================================
   19. COURSES
   ============================================================ */
.course-hero {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, var(--bg-card)) 0%, var(--bg-card) 55%, var(--bg-secondary) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 26px;
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.5s ease;
    box-shadow: var(--shadow-md);
}
.course-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-brand);
}
.course-hero::after {
    content: '';
    position: absolute;
    top: -50%; right: -15%;
    width: 380px; height: 380px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.course-hero-content {
    display: flex;
    gap: 28px;
    align-items: center;
    padding: 32px 36px;
    position: relative;
    z-index: 1;
}
.course-hero-icon {
    font-size: 3.6em;
    line-height: 1;
    min-width: 76px;
    text-align: center;
    animation: float 7s ease-in-out infinite;
}
.course-hero-text { flex: 1; }
.course-hero-text h1 { font-size: 1.7em; font-weight: 800; color: var(--text-bright); letter-spacing: -0.5px; margin: 0; }
.course-hero-text .hero-subtitle { color: var(--text-muted); font-size: 0.98em; margin-top: 6px; }
.course-hero-text .hero-desc { color: var(--text); font-size: 0.88em; line-height: 1.7; margin-top: 10px; max-width: 680px; }
.course-hero-meta { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.course-hero-meta .meta-item { display: flex; align-items: center; gap: 6px; font-size: 0.84em; color: var(--text-muted); }
.course-hero-actions { display: flex; gap: 10px; flex-direction: column; min-width: 180px; }
.course-hero-actions .btn { width: 100%; }

.course-grid { display: flex; flex-direction: column; gap: 18px; margin-top: 22px; }
.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    position: relative;
    transition: var(--transition);
    animation: slideUp 0.45s ease;
    animation-fill-mode: backwards;
    box-shadow: var(--shadow-sm);
}
.course-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: var(--transition);
}
.course-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 30px var(--primary-glow);
    background: var(--bg-card-hover);
}
.course-card:hover::before { opacity: 1; }
.course-card.course-coming { opacity: 0.72; }

.course-coming-badge {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--warning);
    color: #1a1305;
    padding: 4px 13px;
    border-radius: 999px;
    font-size: 0.72em;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.course-card-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.course-card-icon-wrap {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary-glow), transparent);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    flex-shrink: 0;
}
.course-card-header h2 { margin: 0; font-size: 1.2em; color: var(--text-bright); font-weight: 700; }
.course-card-header .course-subtitle { margin: 3px 0 0 0; color: var(--text-muted); font-size: 0.86em; }

.course-meta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.course-meta-row .badge-group { display: flex; gap: 6px; }
.course-desc { color: var(--text); font-size: 0.88em; line-height: 1.7; margin: 0 0 12px 0; }

.course-progress { margin: 12px 0 8px; }
.course-progress-bar {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.course-progress-fill {
    height: 100%;
    background: var(--gradient-brand-strong);
    border-radius: 999px;
    transition: width 0.6s ease;
    box-shadow: 0 0 10px var(--primary-glow);
}
.course-progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: 6px;
}
.course-card-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.status-label { font-size: 0.8em; font-weight: 600; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.skill-tag {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.78em;
    font-weight: 600;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    transition: var(--transition);
}
.skill-tag:hover { border-color: var(--border-focus); color: var(--primary); transform: translateY(-1px); }
.skill-tag.skill-ad { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.skill-tag.skill-gpo { background: rgba(139, 92, 246, 0.1); color: var(--purple); }
.skill-tag.skill-vmware { background: rgba(6, 182, 212, 0.1); color: var(--cyan); }
.skill-tag.skill-ps { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.skill-tag.skill-dns { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }
.skill-tag.skill-sec { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.skill-tag.skill-backup { background: rgba(99, 102, 241, 0.1); color: var(--primary); }

/* ============================================================
   20. CHAT
   ============================================================ */
.chat-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 620px;
    max-height: 82vh;
    margin-top: 8px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.4s ease;
}

/* Sidebar */
.chat-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-sidebar-header {
    padding: 15px 17px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    gap: 10px;
}
.chat-sidebar-header h2 {
    font-size: 0.98em;
    font-weight: 700;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-sidebar-header .unread-total {
    background: var(--danger);
    color: #fff;
    font-size: 0.68em;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
}
.chat-conversations { flex: 1; overflow-y: auto; overflow-x: hidden; }
.chat-sidebar .empty-msg { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 0.88em; }

.chat-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 17px;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border);
    position: relative;
    text-decoration: none !important;
    color: var(--text) !important;
}
.chat-conv-item:hover { background: var(--bg-card-hover); }
.chat-conv-item.active {
    background: var(--bg-card);
    background: color-mix(in srgb, var(--primary) 9%, var(--bg-card));
    box-shadow: inset 3px 0 0 var(--primary);
}
.chat-conv-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient-brand-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05em;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 10px var(--primary-glow);
}
.chat-conv-info { flex: 1; min-width: 0; }
.chat-conv-name {
    font-weight: 600;
    color: var(--text-bright);
    font-size: 0.88em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chat-conv-preview {
    font-size: 0.77em;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.chat-conv-meta { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-conv-time { font-size: 0.66em; color: var(--text-dim); }
.chat-conv-unread {
    background: var(--primary);
    color: #fff;
    font-size: 0.64em;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

/* Main panel */
.chat-main { display: flex; flex-direction: column; overflow: hidden; background: var(--bg-card); }
.chat-main-header {
    padding: 13px 19px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
}
.chat-main-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--gradient-brand-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 10px var(--primary-glow);
}
.chat-main-info { flex: 1; min-width: 0; }
.chat-main-name { font-weight: 700; color: var(--text-bright); font-size: 0.93em; display: flex; align-items: center; gap: 7px; }
.chat-main-status { font-size: 0.71em; color: var(--text-muted); }

/* Messages */
.chat-messages {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background:
        radial-gradient(circle at 18% 50%, var(--primary-glow) 0%, transparent 45%),
        radial-gradient(circle at 82% 50%, rgba(16, 185, 129, 0.06) 0%, transparent 45%),
        var(--bg-secondary);
}
.chat-date-divider { text-align: center; margin: 14px 0 8px; }
.chat-date-divider span {
    background: var(--bg-elevated);
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.7em;
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-weight: 600;
}

.msg-row {
    display: flex;
    width: 100%;
    flex-shrink: 0;
    margin-bottom: 6px;
    gap: 10px;
    animation: msgIn 0.15s ease;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.msg-avatar-sm {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--gradient-brand-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72em;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.msg-row.sent { justify-content: flex-end; gap: 0; }
.msg-body { display: flex; flex-direction: column; max-width: 65%; min-width: 0; }
.msg-row.received .msg-body { align-items: flex-start; }
.msg-row.sent .msg-body { align-items: flex-end; }

.msg-sender-name { font-size: 0.76em; font-weight: 650; color: var(--primary); margin-bottom: 2px; line-height: 1.2; }

.msg-text {
    font-size: 0.89em;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: var(--text);
    width: 100%;
    padding: 9px 13px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.msg-row.received .msg-text {
    border-bottom-left-radius: 4px;
    color: var(--text);
}
.msg-row.sent .msg-text {
    background: var(--bg-card);
    background: color-mix(in srgb, var(--primary) 14%, var(--bg-card));
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
    color: var(--text-bright);
    text-align: left;
    border-bottom-right-radius: 4px;
}

.msg-meta { display: flex; align-items: center; gap: 4px; margin-top: 3px; padding: 0 4px; }
.msg-row.received .msg-meta { justify-content: flex-start; }
.msg-row.sent .msg-meta { justify-content: flex-end; }
.msg-time { font-size: 0.6em; color: var(--text-dim); line-height: 1; }
.msg-read-status { font-size: 0.62em; color: var(--primary); font-weight: 700; }
.msg-edited { font-size: 0.64em; color: var(--text-dim); font-style: italic; margin-left: 4px; }

.msg-edit-btn {
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
    margin-left: 2px;
    user-select: none;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
}
.msg-row.sent:hover .msg-edit-btn { opacity: 0.6; }
.msg-row.sent .msg-edit-btn:hover { opacity: 1; color: var(--primary); }

.msg-edit-input {
    width: 100%;
    padding: 7px 11px;
    background: var(--bg-input);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88em;
    font-family: 'Inter', sans-serif;
    resize: none;
    outline: none;
    line-height: 1.4;
}
.msg-edit-input:focus { box-shadow: 0 0 0 3px var(--primary-glow); }
.msg-edit-actions { display: flex; gap: 6px; margin-top: 5px; justify-content: flex-end; }
.msg-edit-actions button {
    padding: 3px 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.72em;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.15s;
}
.msg-edit-actions button:hover { opacity: 0.82; }
.msg-edit-save { background: var(--primary); color: #fff; }
.msg-edit-cancel { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border) !important; }

/* Input */
.chat-input-area {
    padding: 13px 19px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
}
.chat-input-form { display: flex; gap: 10px; align-items: flex-end; }
.chat-input-form textarea {
    flex: 1;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 0.88em;
    font-family: 'Inter', sans-serif;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    outline: none;
    transition: var(--transition);
    line-height: 1.5;
}
.chat-input-form textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.chat-input-form textarea::placeholder { color: var(--text-dim); }

.chat-send-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient-brand-strong);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.chat-send-btn:hover { transform: scale(1.08); filter: brightness(1.08); box-shadow: 0 6px 20px var(--primary-glow); }
.chat-send-btn:active { transform: scale(0.94); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.chat-send-btn svg { display: block; margin: auto; }

/* Empty state */
.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    padding: 40px;
    text-align: center;
}
.chat-empty-state .empty-icon {
    width: 84px; height: 84px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2em;
    margin-bottom: 18px;
    color: var(--primary);
}
.chat-empty-state h3 { color: var(--text-bright); font-size: 1.15em; margin-bottom: 8px; }
.chat-empty-state p { font-size: 0.88em; max-width: 400px; line-height: 1.65; }

/* Typing */
.typing-indicator {
    display: none;
    padding: 6px 20px 8px;
    font-size: 0.76em;
    color: var(--primary);
    font-style: italic;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--primary) 5%, transparent);
    animation: pulse 1.5s ease-in-out infinite;
}
.typing-dots { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; }
.typing-dots span {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--primary);
    animation: dotBounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* ============================================================
   21. LEGACY MESSAGES (compat)
   ============================================================ */
.msg-card {
    cursor: default;
    padding: 15px 19px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.msg-card.unread { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-glow); }
.msg-card .msg-info { flex: 1; min-width: 0; }
.msg-card .msg-sender { color: var(--text-bright); font-weight: 500; font-size: 0.92em; }
.msg-card .msg-sender strong { font-weight: 700; }
.msg-card .msg-sender .unread-dot { color: var(--primary); }
.msg-card .msg-preview { color: var(--text-muted); font-size: 0.8em; display: block; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.msg-card .msg-date { text-align: right; font-size: 0.78em; color: var(--text-dim); white-space: nowrap; }
.msg-view-header { display: flex; gap: 20px; margin-bottom: 18px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.msg-view-body { line-height: 1.8; white-space: pre-wrap; }
.msg-view-actions { margin-top: 24px; display: flex; gap: 10px; }

/* ============================================================
   22. FRIENDS
   ============================================================ */
.friend-card { cursor: default; padding: 15px 18px; margin-bottom: 10px; }
.friend-card .friend-name { color: var(--text-bright); font-size: 1em; font-weight: 650; }
.friend-card .friend-username { color: var(--text-muted); font-size: 0.84em; }
.friend-card .friend-job { color: var(--text-muted); font-size: 0.78em; margin-top: 5px; }
.friend-card .friend-actions { display: flex; gap: 8px; align-items: center; }
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }

/* ============================================================
   23. PROFILE / DEVICES
   ============================================================ */
.session-list { display: flex; flex-direction: column; gap: 10px; }
.session-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    transition: var(--transition);
}
.session-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.session-card.current { border-color: var(--primary); }

/* ============================================================
   24. UPDATES / ANNOUNCEMENTS
   ============================================================ */
.announcement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px 26px;
    margin-bottom: 18px;
    transition: var(--transition);
    animation: slideUp 0.4s ease;
    box-shadow: var(--shadow-sm);
}
.announcement-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-md); }
.ann-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.ann-title { font-size: 1.15em; font-weight: 700; color: var(--text-bright); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ann-priority-badge {
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.68em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.ann-priority-badge.priority-low { background: rgba(16, 185, 129, 0.14); color: var(--success); }
.ann-priority-badge.priority-normal { background: rgba(99, 102, 241, 0.14); color: var(--primary); }
.ann-priority-badge.priority-high { background: rgba(245, 158, 11, 0.14); color: var(--warning); }
.ann-priority-badge.priority-urgent { background: rgba(239, 68, 68, 0.14); color: var(--danger); }
.ann-meta { color: var(--text-muted); font-size: 0.78em; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.ann-content { color: var(--text); font-size: 0.9em; line-height: 1.75; margin-top: 10px; white-space: pre-wrap; }
.ann-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

.comments-section { margin-top: 16px; }
.comments-toggle { cursor: pointer; color: var(--primary); font-size: 0.82em; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.comments-list { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.comment-item { display: flex; gap: 11px; }
.comment-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--gradient-brand-strong);
    color: #fff;
    font-size: 0.7em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.comment-body {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
}
.comment-author { font-weight: 650; color: var(--text-bright); font-size: 0.83em; }
.comment-time { color: var(--text-dim); font-size: 0.7em; margin-left: 8px; }
.comment-text { color: var(--text); font-size: 0.85em; margin-top: 3px; line-height: 1.6; }
.comment-form { display: flex; gap: 10px; margin-top: 14px; align-items: flex-start; }
.comment-form textarea {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.86em;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    min-height: 60px;
    outline: none;
    transition: var(--transition);
}
.comment-form textarea:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-glow); }

/* Reactions */
.reaction-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.reaction-btn {
    padding: 3px 11px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    font-size: 0.82em;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
}
.reaction-btn:hover { border-color: var(--border-focus); transform: translateY(-1px); }
.reaction-btn.active { background: rgba(99, 102, 241, 0.14); border-color: var(--primary); color: var(--primary); }

/* ============================================================
   25. GPO / EDITOR PAGES
   ============================================================ */
.gpo-editor-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.gpo-content-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.gpo-content-topbar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.gpo-content-body { padding: 18px; }

.editor-area { width: 100%; min-height: 420px; resize: vertical; font-family: 'JetBrains Mono', monospace; font-size: 0.84em; line-height: 1.6; }
.editor-label {
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.command-block { margin: 8px 0; }

/* ============================================================
   26. ADMIN
   ============================================================ */
.admin-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
}
.admin-nav .btn { white-space: nowrap; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.admin-table th {
    background: var(--bg-elevated);
    color: var(--text-bright);
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.78em;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88em;
    transition: var(--transition-fast);
    vertical-align: middle;
}
.admin-table tr:hover td { background: color-mix(in srgb, var(--primary) 3%, transparent); }
.admin-table tr:last-child td { border-bottom: none; }

.status-pending { color: var(--warning); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.status-approved { color: var(--success); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.status-rejected { color: var(--danger); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.status-suspended { color: var(--text-muted); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

.pending-badge {
    background: var(--danger);
    color: #fff;
    font-size: 0.6em;
    padding: 2px 10px;
    border-radius: 999px;
    vertical-align: middle;
    display: inline-block;
}

/* ============================================================
   27. QUICK ACTIONS / MISC
   ============================================================ */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 34px;
}
.quick-actions .btn { min-width: 200px; padding: 16px 28px; }

.tab-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-bar .btn { width: auto; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state h3 { color: var(--text-bright); margin: 10px 0 6px; font-size: 1.1em; }
.empty-state p { color: var(--text-muted); }
.empty-icon {
    font-size: 3em;
    opacity: 0.5;
    display: block;
    margin-bottom: 12px;
}

.back-link {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    transition: var(--transition);
    font-size: 0.88em;
}
.back-link:hover { color: var(--text-bright); transform: translateX(-4px); }

/* ============================================================
   28. UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.mt-2 { margin-top: 10px; }
.mt-4 { margin-top: 20px; }
.mb-4 { margin-bottom: 20px; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

/* ============================================================
   29. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .gpo-editor-layout { grid-template-columns: 1fr; }
    .chat-layout { grid-template-columns: 300px 1fr; }
}

@media (max-width: 900px) {
    .topic-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
    .chat-layout { grid-template-columns: 1fr; max-height: none; min-height: auto; border-radius: var(--radius-lg); }
    .course-hero-content { flex-direction: column; align-items: flex-start; }
    .course-hero-actions { flex-direction: row; min-width: 0; width: 100%; }
}

@media (max-width: 900px) {
    .nav-user-info { display: none; }
    .nav-user { padding: 4px; background: transparent; border: none; }
    .nav-avatar { width: 34px; height: 34px; }
    .brand-text { font-size: 0.95em; }
}

@media (max-width: 768px) {
    :root { --nav-height: 96px; }
    .auth-container { padding: 30px 22px; margin: 8px; }
    .auth-container .logo h1 { font-size: 1.5em; }
    .dashboard-header h1 { font-size: 1.5em; }
    .dashboard-header { padding: 22px 0 12px; }
    .topic-grid { grid-template-columns: 1fr; }
    .topic-header h1 { font-size: 1.25em; }
    .topic-header { padding: 24px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .nav-inner { padding: 0 14px; height: 56px; }
    .nav-links { padding: 0 14px; height: 40px; }
    .nav-links .nav-link { padding: 7px 10px; font-size: 0.8em; }
    .topic-view { padding: 16px 12px 40px; }
    .dashboard-container { padding: 16px 12px 40px; }
    .content-section { padding: 22px; }
    .topic-nav { position: relative; top: 0; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }
    .topic-nav a { flex-shrink: 0; }
    .msg-body { max-width: 85%; }
    .form-grid, .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .quick-actions .btn { min-width: 0; width: 100%; padding: 13px 20px; }
    .chat-main { min-height: 70vh; }
    .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
    .brand-mark { width: 32px; height: 32px; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 15px; }
    .stat-card .stat-number { font-size: 1.6em; }
    .auth-container { padding: 22px 16px; }
    .topic-card { padding: 18px; }
    .nav-user { display: none; }
    .chat-sidebar-header h2 { font-size: 0.9em; }
    .page-header h1 { font-size: 1.4em; }
}

/* ============================================================
   30. PRINT
   ============================================================ */
@media print {
    .top-nav, .site-footer, .reading-progress, .animated-bg, .topic-nav, .quick-actions,
    .chat-sidebar, .chat-input-area, .comment-form, .ann-actions { display: none !important; }
    body { background: #fff; color: #111; }
    .content-section, .topic-header, .issue-card, .announcement-card, .course-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    a { color: #111; }
}