/* ══════════════════════════════════════════════════════════════
   VIRTUAL LAB & LMS — INFORMATIKA SMP  
   Master Design System v2.0 — Glassmorphism Edition
   ══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
    /* Brand Core */
    --primary:        #6366F1;
    --primary-dark:   #4F46E5;
    --primary-darker: #3730A3;
    --primary-light:  #A5B4FC;
    --primary-glow:   rgba(99, 102, 241, 0.35);

    --secondary:        #10B981;
    --secondary-dark:   #059669;
    --secondary-darker: #047857;
    --secondary-light:  #6EE7B7;

    --accent:     #F59E0B;
    --accent-dark:#D97706;
    --accent-glow:rgba(245, 158, 11, 0.3);

    /* Functional */
    --danger:  #EF4444;
    --danger-dark: #DC2626;
    --warning: #F97316;
    --info:    #3B82F6;
    --success: #22C55E;

    /* Neutrals */
    --dark:       #0F172A;
    --dark-2:     #1E293B;
    --gray-900:   #1E293B;
    --gray-800:   #334155;
    --gray-700:   #475569;
    --gray-600:   #64748B;
    --gray-500:   #94A3B8;
    --gray-400:   #CBD5E1;
    --gray-300:   #D1D5DB;
    --gray-200:   #E2E8F0;
    --gray-100:   #F1F5F9;
    --gray-50:    #F8FAFC;
    --white:      #FFFFFF;

    /* Glass */
    --glass-bg:    rgba(255, 255, 255, 0.72);
    --glass-bg-2:  rgba(255, 255, 255, 0.85);
    --glass-bg-3:  rgba(255, 255, 255, 0.08);
    --glass-border:rgba(255, 255, 255, 0.18);
    --glass-shadow:rgba(0, 0, 0, 0.06);

    /* Shadows — multi-layer for realism */
    --shadow-sm:
        0 1px 2px rgba(0,0,0,0.04),
        0 1px 3px rgba(0,0,0,0.02);
    --shadow:
        0 1px 3px rgba(0,0,0,0.05),
        0 2px 6px rgba(0,0,0,0.04),
        0 4px 12px rgba(0,0,0,0.03);
    --shadow-md:
        0 2px 4px rgba(0,0,0,0.04),
        0 4px 12px rgba(0,0,0,0.05),
        0 8px 24px rgba(0,0,0,0.04);
    --shadow-lg:
        0 4px 8px rgba(0,0,0,0.04),
        0 8px 24px rgba(0,0,0,0.05),
        0 16px 48px rgba(0,0,0,0.04);
    --shadow-xl:
        0 8px 16px rgba(0,0,0,0.05),
        0 16px 48px rgba(0,0,0,0.06),
        0 32px 64px rgba(0,0,0,0.05);
    --shadow-glow-primary:
        0 4px 20px rgba(99, 102, 241, 0.25);
    --shadow-glow-accent:
        0 4px 20px rgba(245, 158, 11, 0.25);

    /* Radii */
    --radius-xs:  4px;
    --radius-sm:  8px;
    --radius:     12px;
    --radius-md:  14px;
    --radius-lg:  18px;
    --radius-xl:  24px;
    --radius-full:9999px;

    /* Transitions */
    --transition:   all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
}

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

/* ─── Base ────────────────────────────────────────────────── */
body {
    font-family: var(--font);
    background: var(--gray-50);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; display: block; }

/* ─── Selection ───────────────────────────────────────────── */
::selection {
    background: var(--primary);
    color: white;
}

/* ══════════════════════════════════════════════════════════════
   AUTH PAGE — Immersive Glass Experience
   ══════════════════════════════════════════════════════════════ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 80% 60% at 0% 20%, rgba(99,102,241,0.15) 0%, transparent 50%),
        radial-gradient(ellipse 80% 60% at 100% 80%, rgba(16,185,129,0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(245,158,11,0.06) 0%, transparent 50%),
        linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #3730A3 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated floating orbs */
.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -200px;
    animation: authOrbA 12s ease-in-out infinite alternate;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -180px;
    left: -120px;
    animation: authOrbB 15s ease-in-out infinite alternate;
}

@keyframes authOrbA {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-60px, 40px) scale(1.1); }
}

@keyframes authOrbB {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, -30px) scale(1.15); }
}

.auth-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.05) inset;
    padding: 28px;
    animation: authEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authEntrance {
    0%   { opacity: 0; transform: translateY(30px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-logo {
    text-align: center;
    margin-bottom: 18px;
}

.auth-logo .logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--primary-darker));
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    margin-bottom: 10px;
    box-shadow: var(--shadow-glow-primary);
    transition: var(--transition-bounce);
}

.auth-logo h1 {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 2px;
    letter-spacing: -0.3px;
}

.auth-logo p {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
}

/* Auth form */
.auth-form .form-group {
    margin-bottom: 12px;
}

.auth-form label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--dark-2);
    margin-bottom: 3px;
    letter-spacing: 0.2px;
}

.auth-form .input-wrapper {
    position: relative;
}

.auth-form .input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 14px;
    transition: var(--transition);
    pointer-events: none;
    z-index: 2;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 9px 12px 9px 40px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font);
    transition: var(--transition);
    background: rgba(255,255,255,0.8);
}
.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
    background: white;
}
.auth-form input:focus + i,
.auth-form input:focus ~ i {
    color: var(--primary);
}
.auth-form input::placeholder {
    color: var(--gray-400);
}

.auth-form .input-wrapper select.form-control {
    padding-left: 40px;
}

.auth-form .btn {
    margin-top: 4px;
    padding: 11px;
    font-size: 13px;
    letter-spacing: 0.3px;
    border-radius: var(--radius-sm);
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: var(--gray-600);
}

.auth-footer a {
    font-weight: 600;
    color: var(--primary);
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS — Premium Interaction Design
   ══════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}

/* Ripple effect */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.15) 0%, transparent 80%);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-glow-primary);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99,102,241,0.35);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-block { width: 100%; }
.btn-lg  { padding: 14px 32px; font-size: 15px; border-radius: var(--radius-md); }
.btn-sm  { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-xs  { padding: 4px 10px; font-size: 11px; border-radius: 6px; font-weight: 600; }

.btn-secondary {
    background: var(--gray-100);
    color: var(--dark-2);
    border: 1px solid var(--gray-200);
}
.btn-secondary:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(16,185,129,0.25);
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16,185,129,0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(239,68,68,0.2);
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239,68,68,0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(245,158,11,0.2);
}
.btn-warning:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}
.btn-ghost:hover {
    background: rgba(0,0,0,0.04);
    color: var(--dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════
   LAYOUT — App Shell
   ══════════════════════════════════════════════════════════════ */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 50%, #f0f2f5 100%);
    color: #2d3748;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s ease;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 16px rgba(0,0,0,0.06);
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; transition: all 0.2s; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(180deg, #ffffff, #f8f9fa);
}

.sidebar-header .s-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102,126,234,0.2);
    transition: all 0.3s ease;
    color: white;
}

.sidebar-header .s-logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102,126,234,0.25);
}

.sidebar-header .s-title h2 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.2px;
    color: #1a202c;
}
.sidebar-header .s-title small {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: #718096;
}

.sidebar-nav {
    padding: 12px 8px;
}

.sidebar-nav .nav-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a0aec0;
    padding: 12px 12px 8px;
    font-weight: 700;
    margin-top: 4px;
}

.sidebar-nav .nav-item {
    margin-bottom: 1px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #4a5568;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    margin: 0 2px;
}

.sidebar-nav .nav-link:hover {
    background: #f7fafc;
    color: #2d3748;
}

.sidebar-nav .nav-link.active {
    background: #edf2f7;
    color: #2d3748;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #667eea;
}

.sidebar-nav .nav-link i {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.sidebar-nav .nav-link:hover i {
    opacity: 0.85;
}

.sidebar-nav .nav-link.active i {
    color: #667eea;
    opacity: 1;
}

.sidebar-nav .nav-badge {
    margin-left: auto;
    background: #fed7d7;
    color: #c53030;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 8px;
    min-width: 18px;
    text-align: center;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover .nav-badge {
    background: #fc8181;
    color: white;
}

.sidebar-nav .nav-link.active .nav-badge {
    background: #e0e7ff;
    color: #667eea;
}

/* ─── Topbar ──────────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.topbar {
    background: var(--glass-bg-2);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-left h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.3px;
}

#sidebarToggle {
    display: none !important;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gray-700);
    transition: var(--transition);
}
#sidebarToggle:hover {
    background: var(--gray-200);
    color: var(--dark);
}
#sidebarToggle.show-on-mobile {
    display: flex !important;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-right .notification-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gray-600);
    transition: var(--transition);
}
.topbar-right .notification-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.25);
}

.topbar-right .notification-btn .badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--danger), #E11D48);
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(239,68,68,0.3);
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px 4px 6px;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
}
.user-dropdown:hover {
    background: var(--gray-100);
    border-color: var(--gray-200);
}

.user-dropdown .avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.user-dropdown .avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

.user-dropdown .user-info {
    line-height: 1.25;
}
.user-dropdown .user-info .name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
}
.user-dropdown .user-info .role {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
}

/* ─── Page Content ────────────────────────────────────────── */
.page-content {
    padding: 20px 24px;
    animation: pageEntrance 0.35s ease;
}

@keyframes pageEntrance {
    0%   { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   NOTIFICATION DROPDOWN
   ══════════════════════════════════════════════════════════════ */

#notifDropdown {
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-xl) !important;
    border: 1px solid var(--gray-200) !important;
    overflow: hidden !important;
}
#notifDropdown::-webkit-scrollbar,
#notifList::-webkit-scrollbar { width: 4px; }
#notifDropdown::-webkit-scrollbar-thumb,
#notifList::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

/* ══════════════════════════════════════════════════════════════
   CARDS & STATS
   ══════════════════════════════════════════════════════════════ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--glass-bg-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.7);
    position: relative;
    overflow: hidden;
}

/* Subtle glass highlight */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,0.9);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: var(--transition-bounce);
}
.stat-card:hover .stat-icon {
    transform: scale(1.08);
}

.stat-card .stat-icon.blue   { background: linear-gradient(135deg, #EFF6FF, #DBEAFE);   color: var(--info); }
.stat-card .stat-icon.green  { background: linear-gradient(135deg, #ECFDF5, #D1FAE5);   color: var(--secondary); }
.stat-card .stat-icon.purple { background: linear-gradient(135deg, #EEF2FF, #E0E7FF);   color: var(--primary); }
.stat-card .stat-icon.orange { background: linear-gradient(135deg, #FFF7ED, #FFEDD5);   color: var(--warning); }
.stat-card .stat-icon.red    { background: linear-gradient(135deg, #FEF2F2, #FEE2E2);   color: var(--danger); }
.stat-card .stat-icon.pink   { background: linear-gradient(135deg, #FDF2F8, #FCE7F3);   color: #DB2777; }
.stat-card .stat-icon.cyan   { background: linear-gradient(135deg, #ECFEFF, #CFFAFE);   color: #0891B2; }

.stat-card .stat-info h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    letter-spacing: -0.5px;
}

.stat-card .stat-info p {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 2px;
    font-weight: 500;
}

/* ─── Generic Card ─────────────────────────────────────────── */
.card {
    background: var(--glass-bg-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.7);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
}

.card-body {
    padding: 18px;
}

/* ─── Chart Cards ──────────────────────────────────────────── */
.chart-card {
    background: var(--glass-bg-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.7);
    overflow: hidden;
    transition: var(--transition);
}
.chart-card:hover {
    box-shadow: var(--shadow-md);
}
.chart-card-header {
    padding: 16px 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chart-card-header h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
}
.chart-body {
    padding: 14px 18px 18px;
    height: 220px;
    position: relative;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* ══════════════════════════════════════════════════════════════
   TABLES — Clean & Airy
   ══════════════════════════════════════════════════════════════ */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--gray-600);
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.table td {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--dark-2);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.15s ease;
}
.table tbody tr:hover {
    background: rgba(99,102,241,0.025);
}
.table tbody tr:last-child td {
    border-bottom: none;
}

/* ══════════════════════════════════════════════════════════════
   BADGES & STATUS TAGS
   ══════════════════════════════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    gap: 4px;
    line-height: 1.3;
}

.badge-success {
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    color: #059669;
    border: 1px solid rgba(16,185,129,0.15);
}
.badge-danger {
    background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
    color: #DC2626;
    border: 1px solid rgba(239,68,68,0.15);
}
.badge-warning {
    background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
    color: #D97706;
    border: 1px solid rgba(245,158,11,0.15);
}
.badge-info {
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    color: #2563EB;
    border: 1px solid rgba(59,130,246,0.15);
}
.badge-purple {
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    color: #4F46E5;
    border: 1px solid rgba(99,102,241,0.15);
}

/* ══════════════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════════════ */

.alert {
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.35s ease;
    font-weight: 500;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    color: #065F46;
    border: 1px solid rgba(16,185,129,0.2);
}
.alert-danger {
    background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
    color: #991B1B;
    border: 1px solid rgba(239,68,68,0.2);
}
.alert-warning {
    background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
    color: #92400E;
    border: 1px solid rgba(245,158,11,0.2);
}
.alert-info {
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    color: #1E40AF;
    border: 1px solid rgba(59,130,246,0.2);
}

/* ══════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════ */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-2);
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font);
    transition: var(--transition);
    background: white;
    color: var(--dark);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}
.form-control::placeholder {
    color: var(--gray-400);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%2364748B' d='M7 9.5L2 4.5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════════════════════ */

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-100);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Animated shimmer */
.progress-bar .progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: shimmer 2s infinite;
}

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

/* ══════════════════════════════════════════════════════════════
   COURSE CARDS
   ══════════════════════════════════════════════════════════════ */

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.course-card {
    background: var(--glass-bg-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.7);
    overflow: hidden;
    transition: var(--transition);
}
.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.9);
}

.course-card .card-thumb {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
}

/* Decorative pattern on thumb */
.course-card .card-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.course-card .card-thumb .grade-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0,0,0,0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
}

.course-card .card-body {
    padding: 16px;
}

.course-card .card-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.course-card .card-body p {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.course-card .card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--gray-600);
}

.course-card .card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════ */

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--dark);
    margin-bottom: 6px;
    font-weight: 700;
}

.empty-state p {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 18px;
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD-SPECIFIC COMPONENTS
   ══════════════════════════════════════════════════════════════ */

.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    letter-spacing: -0.2px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* ─── Quick Actions ────────────────────────────────────────── */
.quick-actions,
.my-courses-section,
.featured-courses,
.recent-activity {
    background: var(--glass-bg-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.7);
    padding: 16px;
    transition: var(--transition);
}

.actions-grid {
    display: grid;
    gap: 8px;
}

.action-card {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}
.action-card:hover {
    background: var(--gray-100);
    border-color: var(--gray-200);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.action-card .action-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}
.action-card .action-icon.blue   { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.action-card .action-icon.green  { background: linear-gradient(135deg, #10B981, #059669); }
.action-card .action-icon.purple { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.action-card .action-icon.orange { background: linear-gradient(135deg, #F59E0B, #D97706); }
.action-card .action-icon.red    { background: linear-gradient(135deg, #EF4444, #DC2626); }

.action-card .action-text { flex: 1; }
.action-card .action-text strong {
    display: block;
    font-size: 13px;
    margin-bottom: 1px;
}
.action-card .action-text span {
    font-size: 11px;
    color: var(--gray-600);
}
.action-card .action-arrow {
    color: var(--gray-300);
    font-size: 14px;
    transition: var(--transition);
}
.action-card:hover .action-arrow {
    color: var(--gray-600);
    transform: translateX(3px);
}

/* ─── Course Mini Cards ────────────────────────────────────── */
.courses-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.course-mini-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}
.course-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--gray-200);
}

.course-mini-thumb {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
}

.course-mini-body {
    padding: 10px;
}

.course-mini-body h4 {
    font-size: 11px;
    font-weight: 600;
    margin: 0 0 3px;
    color: var(--dark);
    line-height: 1.3;
}

.course-mini-body p {
    font-size: 10px;
    color: var(--gray-600);
    margin: 0 0 10px;
}

.mini-progress {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}
.mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 0.5s ease;
}
.mini-progress-text {
    font-size: 10px;
    color: var(--gray-600);
    font-weight: 600;
}

/* ─── Featured & Activity ──────────────────────────────────── */
.featured-and-activity {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.featured-list,
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.featured-item,
.activity-item-card {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}
.featured-item:hover,
.activity-item-card:hover {
    background: var(--gray-100);
    border-color: var(--gray-200);
    transform: translateX(3px);
}

.featured-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #D97706);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

.featured-text { flex: 1; }
.featured-text strong {
    display: block;
    font-size: 12px;
    margin-bottom: 1px;
}
.featured-text p {
    font-size: 10px;
    color: var(--gray-600);
    margin: 0;
}

.activity-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 12px;
    flex-shrink: 0;
}
.activity-indicator.passed {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}
.activity-indicator.failed {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.activity-details { flex: 1; }
.activity-details strong {
    display: block;
    font-size: 12px;
    margin-bottom: 1px;
}
.activity-details p {
    font-size: 10px;
    color: var(--gray-600);
    margin: 0;
}

.activity-score {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
}

/* ─── Activity Items (Admin) ───────────────────────────────── */
.activity-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.activity-item:hover {
    background: var(--gray-100);
}

.activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-time {
    font-size: 11px;
    color: var(--gray-500);
    background: rgba(0,0,0,0.04);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════
   CODE EDITOR
   ══════════════════════════════════════════════════════════════ */

.code-editor-wrapper {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.code-editor-header {
    background: #1E1E1E;
    color: white;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}
.code-editor-header .lang-badge {
    background: var(--primary);
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 11px;
}

.code-editor textarea {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    border: none;
    resize: vertical;
    background: #1E1E1E;
    color: #D4D4D4;
    tab-size: 4;
}
.code-editor textarea:focus {
    outline: none;
}

.code-output {
    border-top: 2px solid var(--gray-200);
}
.code-output-header {
    padding: 10px 16px;
    background: var(--gray-100);
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}
.code-output-body {
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 13px;
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    background: #FAFAFA;
}
.code-output-body.success { color: var(--secondary); }
.code-output-body.error   { color: var(--danger); }

/* ══════════════════════════════════════════════════════════════
   MODAL — Glass Dialog
   ══════════════════════════════════════════════════════════════ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: var(--glass-bg-2);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 520px;
    margin: 20px;
    animation: modalEntrance 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes modalEntrance {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ══════════════════════════════════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════════════════════════════════ */

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════════ */

.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--gray-600); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.d-flex    { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-xs  { gap: 4px; }
.gap-sm  { gap: 8px; }
.gap-md  { gap: 16px; }
.gap-lg  { gap: 24px; }

.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════ */

/* ─── MOBILE (< 640px) ──────────────────────────────────── */
@media (max-width: 639px) {
    :root {
        --radius: 10px;
        --radius-sm: 6px;
        --radius-lg: 14px;
    }

    body { font-size: 14px; }

    #sidebarToggle {
        display: flex !important;
    }

    .sidebar {
        position: fixed;
        left: 0; top: 0;
        width: 80%;
        max-width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }
    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        padding: 0 12px;
        height: 56px;
    }

    .topbar-left h1 {
        font-size: 15px;
    }

    .page-content {
        padding: 14px;
        padding-bottom: 80px;
    }

    .card {
        border-radius: var(--radius-sm);
        margin-bottom: 12px;
    }
    .card-header {
        padding: 12px 14px;
        font-size: 13px;
    }
    .card-body {
        padding: 12px 14px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }
    .stat-card {
        padding: 12px;
        border-radius: 10px;
    }
    .stat-card .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    .stat-card .stat-info h3 {
        font-size: 20px;
        font-weight: 700;
    }
    .stat-card .stat-info p {
        font-size: 11px;
    }

    .quick-actions,
    .my-courses-section,
    .featured-courses,
    .recent-activity {
        padding: 12px 14px;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .section-title {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 12px;
    }

    .action-card {
        padding: 10px 12px;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    .action-card .action-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .action-card .action-text {
        font-size: 12px;
    }

    .courses-carousel {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 12px;
    }

    .course-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 12px;
    }
    .course-card {
        border-radius: 10px;
        overflow: hidden;
    }
    .course-card .card-thumb {
        height: 100px;
    }
    .course-card .card-body {
        padding: 10px 12px;
    }

    .featured-and-activity {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .section-header {
        margin-bottom: 10px;
    }

    .auth-card {
        padding: 20px 16px;
        border-radius: var(--radius);
        margin: 16px;
    }

    .auth-logo .logo-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .auth-logo h1 {
        font-size: 16px;
    }

    .topbar-right {
        gap: 8px;
    }

    .notification-btn {
        width: 40px;
        height: 40px;
    }

    .user-dropdown {
        display: none;
    }

    /* ─── DASHBOARD SPECIFIC MOBILE ─── */
    .dashboard-page .page-content {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .dashboard-intro {
        padding: 12px 14px;
        margin-bottom: 12px;
    }

    .dashboard-intro h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .dashboard-intro p {
        font-size: 12px;
        opacity: 0.8;
    }

    /* Improve button spacing on mobile */
    .btn {
        padding: 10px 14px;
        font-size: 13px;
        height: auto;
        min-height: 40px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
    }

    /* Improve table readability on mobile */
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 10px 8px;
    }

    /* Improve form spacing */
    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .form-control {
        font-size: 14px;
        padding: 10px 12px;
        height: 40px;
    }

    /* Better modal sizing on mobile */
    .modal-overlay {
        padding: 16px;
    }

    .confirm-box {
        max-width: 90%;
        padding: 20px 16px;
    }

    /* Improve spacing in lists */
    .list-item {
        padding: 10px 12px;
        margin-bottom: 6px;
    }

    .form-group {
        margin-bottom: 10px;
    }
    .form-control {
        padding: 10px 12px;
        font-size: 16px;
        height: 42px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
        height: 40px;
    }
    .btn-block { width: 100%; }
    .btn-sm { padding: 6px 10px; font-size: 12px; height: 32px; }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table { font-size: 12px; }
    .table th { padding: 8px 6px; }
    .table td { padding: 8px 6px; }

    .badge { font-size: 11px; padding: 3px 7px; }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
    }

    .code-editor-wrapper { display: block; }
    .code-editor { min-height: 200px; }
    .code-output { margin-top: 12px; max-height: 200px; }

    .charts-grid { grid-template-columns: 1fr; }
    .chart-body { height: 200px; }

    .actions-grid { grid-template-columns: 1fr; }

    .empty-state { padding: 40px 16px; }
}

/* ─── TABLET (640-1024px) ───────────────────────────────── */
@media (min-width: 640px) and (max-width: 1024px) {
    .sidebar { width: 240px; }
    .main-content { margin-left: 240px; }

    .page-content { padding: 24px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .course-grid { grid-template-columns: repeat(2, 1fr); }

    .topbar { padding: 0 20px; }

    .card-header { padding: 18px 20px; }
    .card-body   { padding: 18px 20px; }

    .actions-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── DESKTOP (> 1024px) ─────────────────────────────────── */
@media (min-width: 1025px) {
    .sidebar { width: 260px; }
    .main-content { margin-left: 260px; }

    .page-content { padding: 18px 24px; }

    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .course-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

    .card-header { padding: 12px 18px; }
    .card-body   { padding: 16px 18px; }

    .actions-grid { grid-template-columns: repeat(2, 1fr); }
    .courses-carousel { grid-template-columns: repeat(3, 1fr); }

    .topbar { padding: 0 20px; }

    .charts-grid { gap: 16px; }
}

/* ─── LARGE DESKTOP (> 1440px) ───────────────────────────── */
@media (min-width: 1441px) {
    .page-content {
        max-width: 1400px;
        margin: 0 auto;
    }
    .course-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* ─── LANDSCAPE MODE ─────────────────────────────────────── */
@media (orientation: landscape) and (max-height: 500px) {
    .topbar { height: 48px; }
    .page-content { padding: 12px; }
    .card { margin-bottom: 8px; }
}

/* ─── VERY SMALL PHONES (< 360px) ────────────────────────── */
@media (max-width: 359px) {
    .sidebar { width: 70%; }
    .stats-grid { grid-template-columns: 1fr; }
    .courses-carousel { grid-template-columns: 1fr; }
    .page-content { padding: 10px; }
    .form-control { padding: 8px 10px; font-size: 13px; }
    .btn { padding: 8px 12px; font-size: 12px; }
}

/* ─── UI refinement layer ─────────────────────────────────────────────── */
/* Keeps pages visually consistent, with clearer hierarchy and calmer surfaces. */
body {
    background:
        radial-gradient(circle at 100% 0, rgba(99, 102, 241, .08), transparent 28rem),
        radial-gradient(circle at 0 100%, rgba(16, 185, 129, .05), transparent 24rem),
        var(--gray-50);
}

.sidebar {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 8px 0 30px rgba(15, 23, 42, .05);
}

.sidebar-header { padding: 22px 18px; }
.sidebar-nav { padding: 14px 10px 24px; }
.sidebar-nav .nav-link { min-height: 42px; border-radius: 9px; }
.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, .12), rgba(99, 102, 241, .04));
    box-shadow: inset 3px 0 0 var(--primary);
}

.topbar {
    height: 64px;
    background: rgba(248, 250, 252, .82);
    border-bottom-color: rgba(203, 213, 225, .75);
}

.page-content { padding-top: 28px; padding-bottom: 32px; }

.card,
.quick-actions,
.my-courses-section,
.featured-courses,
.recent-activity {
    border-color: rgba(203, 213, 225, .75);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 10px 28px rgba(15, 23, 42, .035);
}

.btn:focus-visible,
.sidebar-nav .nav-link:focus-visible,
.user-dropdown:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(99, 102, 241, .32);
    outline-offset: 2px;
}

.account-menu {
    position: absolute;
    top: 48px;
    right: 0;
    width: min(280px, calc(100vw - 28px));
    overflow: hidden;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px);
    z-index: 200;
}

/* Student dashboard: the same intentional layout on desktop, tablet, and mobile. */
.student-dashboard-mobile { gap: 24px; max-width: 1240px; }
.dashboard-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    min-height: 92px;
    margin: 0;
    padding: 24px 28px;
    border: 1px solid rgba(165, 180, 252, .45);
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, #eef2ff, #f8faff 56%, #ecfdf5);
}
.greeting-title { margin: 0 0 5px; color: var(--dark); font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -.7px; }
.greeting-subtitle { margin: 0; color: var(--gray-600); font-size: 14px; }
.stats-grid-mobile { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0; }
.stat-card-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(203, 213, 225, .8);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .85);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card-mobile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon-mobile { flex: 0 0 auto; }
.stat-info-mobile h3 { margin: 0; color: var(--dark); font-size: 24px; line-height: 1.1; }
.stat-info-mobile p { margin: 4px 0 0; color: var(--gray-600); font-size: 12px; }
.quick-actions-mobile { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; }
.action-button-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .72);
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}
.action-button-full i { color: var(--primary); font-size: 17px; }
.action-button-full:hover { color: var(--primary-dark); background: #fff; border-color: var(--primary-light); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.section-mobile {
    padding: 20px;
    margin: 0;
    border: 1px solid rgba(203, 213, 225, .8);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .82);
    box-shadow: var(--shadow-sm);
}
.section-header-mobile { margin-bottom: 16px; }
.section-header-mobile h2 { margin: 0; color: var(--dark); font-size: 16px; }
.course-list-mobile, .featured-list-mobile, .activity-list-mobile { gap: 10px; }
.course-item-mobile, .activity-item-mobile {
    border-color: var(--gray-200);
    background: var(--gray-50);
    transition: var(--transition);
}
.course-item-mobile:hover { border-color: var(--primary-light); background: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.featured-item-mobile { border-color: #fde68a; transition: var(--transition); }
.featured-item-mobile:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

@media (max-width: 900px) {
    .stats-grid-mobile, .quick-actions-mobile { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 639px) {
    .topbar { height: 56px; }
    .page-content { padding-top: 16px; }
    .student-dashboard-mobile { gap: 16px; }
    .dashboard-header { min-height: auto; padding: 18px; border-radius: 14px; }
    .greeting-title { font-size: 24px; }
    .stats-grid-mobile { gap: 8px; }
    .stat-card-mobile { display: block; padding: 12px; text-align: center; }
    .quick-actions-mobile { gap: 8px; }
    .action-button-full { flex-direction: column; min-height: 74px; gap: 5px; padding: 10px 8px; font-size: 12px; }
    .section-mobile { padding: 14px; border-radius: 14px; }
}

/* ─── Mobile learning theme: soft neumorphism + clean minimalism ───────── */
:root {
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --primary-darker: #003d99;
    --primary-light: #b9d4ff;
    --primary-glow: rgba(0, 102, 255, .22);
    --dark: #172554;
    --dark-2: #1e293b;
    --gray-50: #f8faff;
    --gray-100: #f1f5fb;
    --gray-200: #e6edf7;
    --gray-600: #64748b;
    --font: 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 14px;
    --radius: 20px;
    --radius-md: 22px;
    --radius-lg: 28px;
    --shadow-sm: 6px 8px 20px rgba(38, 62, 105, .055), -4px -4px 16px rgba(255, 255, 255, .72);
    --shadow: 10px 14px 32px rgba(38, 62, 105, .065), -6px -6px 22px rgba(255, 255, 255, .78);
    --shadow-lg: 14px 20px 42px rgba(38, 62, 105, .09), -8px -8px 26px rgba(255, 255, 255, .8);
}

body {
    background:
        radial-gradient(31rem 22rem at -5% 8%, rgba(179, 222, 255, .36), transparent 72%),
        radial-gradient(27rem 23rem at 104% 14%, rgba(221, 207, 255, .34), transparent 72%),
        radial-gradient(29rem 22rem at 58% 105%, rgba(255, 221, 200, .32), transparent 74%),
        #f8faff;
}

.sidebar { background: rgba(255, 255, 255, .77); border-right-color: rgba(230, 237, 247, .8); }
.sidebar-header { background: transparent; border-bottom-color: rgba(230, 237, 247, .8); }
.sidebar-header .s-logo,
.user-dropdown .avatar {
    background: linear-gradient(145deg, #1982ff, #0066ff);
    border-radius: 16px;
    box-shadow: 7px 9px 20px rgba(0, 102, 255, .2), -3px -3px 12px rgba(255, 255, 255, .8);
}
.sidebar-nav .nav-link { border-radius: 15px; }
.sidebar-nav .nav-link.active { background: linear-gradient(135deg, #eaf3ff, #f7faff); box-shadow: 5px 6px 15px rgba(35, 96, 184, .08); }

.topbar { background: rgba(255, 255, 255, .62); border-bottom-color: rgba(230, 237, 247, .78); }
.btn { border-radius: var(--radius-full); font-weight: 700; }
.btn-primary { background: linear-gradient(135deg, #1682ff, #0066ff); box-shadow: 0 10px 24px rgba(0, 102, 255, .2); }
.btn-primary:hover { box-shadow: 0 14px 28px rgba(0, 102, 255, .26); }
.btn-secondary { background: rgba(255, 255, 255, .82); border-color: #e6edf7; box-shadow: var(--shadow-sm); }

.card, .stat-card, .course-card,
.quick-actions, .my-courses-section, .featured-courses, .recent-activity,
.section-mobile, .stat-card-mobile {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
}
.card, .course-card, .section-mobile { border-radius: 24px; }
.stat-card, .stat-card-mobile { border-radius: 20px; }
.course-card:hover, .stat-card:hover, .stat-card-mobile:hover { box-shadow: var(--shadow-lg); }

.form-control,
.auth-form input[type="text"], .auth-form input[type="email"], .auth-form input[type="password"] {
    border-color: transparent;
    border-radius: 16px;
    background: #f6f9fd;
    box-shadow: inset 2px 3px 7px rgba(51, 82, 128, .05), inset -2px -2px 7px rgba(255, 255, 255, .85);
}
.form-control:focus,
.auth-form input:focus { border-color: #b9d4ff; box-shadow: 0 0 0 4px rgba(0, 102, 255, .1); }

.progress-bar, .progress-bar-mobile, .mini-progress { background: #eaf1fb; }
.progress-bar .progress-fill, .progress-fill, .mini-progress-fill { background: linear-gradient(90deg, #1682ff, #0066ff); }
.action-button-full, .course-item-mobile, .activity-item-mobile {
    border-color: rgba(230, 237, 247, .78);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--shadow-sm);
}
.action-button-full:hover, .course-item-mobile:hover { border-color: #c7dcff; }
.account-menu { border-radius: 20px; border-color: rgba(230, 237, 247, .8); }

@media (max-width: 639px) {
    .page-content { padding: 16px 14px 92px; }
    .dashboard-header { border-radius: 24px; background: linear-gradient(135deg, rgba(231, 243, 255, .92), rgba(250, 247, 255, .9) 58%, rgba(255, 241, 232, .92)); }
    .stats-grid-mobile { gap: 12px; }
    .stat-card-mobile { border-radius: 20px; }
    .quick-actions-mobile { gap: 10px; }
    .action-button-full { border-radius: 18px; }
    .section-mobile { border-radius: 22px; }
    .bottom-navbar { background: rgba(255, 255, 255, .9); border-top-color: rgba(230, 237, 247, .8); box-shadow: 0 -8px 24px rgba(38, 62, 105, .06); }
    .bottom-navbar-item.active { color: var(--primary); }
}

/* Bottom navigation is a mobile-only control. */
.bottom-navbar { display: none !important; }

.admin-mobile-menu { display: none; }

/* Profile */
.profile-page { max-width: 920px; margin: 0 auto; display: grid; gap: 22px; }
.profile-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    min-height: 164px;
    padding: 28px 32px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 28px;
    background: linear-gradient(128deg, #eaf4ff, #f8f6ff 60%, #fff0e7);
    box-shadow: var(--shadow);
}
.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    flex: 0 0 auto;
    border: 5px solid rgba(255, 255, 255, .82);
    border-radius: 28px;
    color: white;
    background: linear-gradient(145deg, #1682ff, #0066ff);
    box-shadow: 8px 10px 20px rgba(0, 102, 255, .2);
    font-size: 32px;
    font-weight: 800;
}
.profile-avatar.teacher { background: linear-gradient(145deg, #8d65ff, #6840dd); box-shadow: 8px 10px 20px rgba(104, 64, 221, .2); }
.profile-avatar.admin-avatar { background: linear-gradient(145deg, #1682ff, #0066ff); }
.profile-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.profile-identity { min-width: 0; }
.profile-eyebrow { margin: 0 0 4px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.profile-identity h2 { margin: 0; color: var(--dark); font-size: 24px; line-height: 1.2; }
.profile-identity > p:not(.profile-eyebrow) { margin: 5px 0 10px; color: var(--gray-600); font-size: 13px; overflow-wrap: anywhere; }
.profile-role { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; color: #0066ff; background: rgba(255, 255, 255, .72); font-size: 11px; font-weight: 800; }
.profile-role.teacher { color: #6840dd; }
.profile-hero-art { margin-left: auto; padding-right: 12px; color: rgba(0, 102, 255, .17); font-size: 58px; transform: rotate(10deg); }
.profile-form-card { padding: 28px 32px; border: 1px solid rgba(255, 255, 255, .92); border-radius: 28px; background: rgba(255, 255, 255, .85); box-shadow: var(--shadow); }
.profile-form-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; }
.profile-heading-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 16px; color: var(--primary); background: #eaf3ff; font-size: 19px; }
.profile-form-heading h3, .profile-password-section h4 { margin: 0; color: var(--dark); font-size: 17px; }
.profile-form-heading p, .profile-password-section p { margin: 3px 0 0; color: var(--gray-600); font-size: 12px; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.profile-field-full { grid-column: 1 / -1; }
.profile-form-card .form-group { margin-bottom: 16px; }
.profile-form-card label { color: var(--dark-2); font-size: 12px; font-weight: 800; }
.profile-form-card small { display: block; margin-top: 5px; color: var(--gray-600); font-size: 11px; }
.profile-password-section { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 18px; margin: 10px 0 24px; padding: 20px 0 4px; border-top: 1px solid var(--gray-200); }
.profile-password-section .form-group { margin: 0; }
.profile-password-section h4 i { margin-right: 6px; color: var(--primary); }
.profile-save-button { min-width: 185px; }
.profile-role.admin { color: #0066ff; }
.avatar-upload-row { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding: 16px; border-radius: 20px; background: #f7faff; }
.avatar-upload-preview { display: flex; align-items: center; justify-content: center; width: 62px; height: 62px; flex: 0 0 auto; overflow: hidden; border: 3px solid white; border-radius: 20px; color: white; background: linear-gradient(145deg, #1682ff, #0066ff); box-shadow: var(--shadow-sm); font-size: 24px; font-weight: 800; }
.avatar-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-row h4 { margin: 0 0 3px; color: var(--dark); font-size: 14px; }
.avatar-upload-row p { margin: 0 0 9px; color: var(--gray-600); font-size: 11px; }

@media (max-width: 1023px) {
    .bottom-navbar { display: flex !important; }
    .main-content { padding-bottom: 72px; }

    .admin-mobile-menu {
        display: block;
        padding: 18px;
        border: 1px solid rgba(255, 255, 255, .92);
        border-radius: 24px;
        background: rgba(255, 255, 255, .82);
        box-shadow: var(--shadow);
    }
    .admin-mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 16px;
    }
    .admin-mobile-menu-header h2 { margin: 2px 0 0; color: var(--dark); font-size: 18px; line-height: 1.2; }
    .admin-mobile-menu-header > i { color: var(--primary); font-size: 20px; }
    .admin-mobile-eyebrow { margin: 0; color: var(--gray-600); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
    .admin-mobile-menu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; }
    .admin-mobile-menu-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 7px;
        min-width: 0;
        color: var(--dark-2);
        font-size: 10px;
        font-weight: 700;
        line-height: 1.15;
        text-align: center;
    }
    .admin-mobile-menu-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border-radius: 17px;
        font-size: 20px;
        box-shadow: 5px 7px 14px rgba(38, 62, 105, .08), -3px -3px 12px rgba(255, 255, 255, .84);
        transition: transform .2s ease, box-shadow .2s ease;
    }
    .admin-mobile-menu-item:active .admin-mobile-menu-icon { transform: scale(.92); box-shadow: inset 3px 4px 9px rgba(38, 62, 105, .1); }
    .admin-mobile-menu-icon.blue { color: #0066ff; background: #eaf3ff; }
    .admin-mobile-menu-icon.green { color: #0b9f6e; background: #e9fbf4; }
    .admin-mobile-menu-icon.purple { color: #7c3aed; background: #f1ebff; }
    .admin-mobile-menu-icon.peach { color: #e7683a; background: #fff0e9; }
    .admin-mobile-menu-icon.yellow { color: #d79700; background: #fff8dc; }
    .admin-mobile-menu-icon.teal { color: #0f9d9a; background: #e7fbfb; }
    .admin-mobile-menu-icon.sky { color: #2183dc; background: #e9f5ff; }
    .admin-mobile-menu-icon.gray { color: #64748b; background: #eef2f7; }
    .admin-mobile-menu ~ .quick-actions { display: none; }
    .profile-page { gap: 16px; }
    .profile-hero { min-height: auto; padding: 22px 18px; border-radius: 24px; gap: 14px; }
    .profile-avatar { width: 64px; height: 64px; border-width: 4px; border-radius: 22px; font-size: 25px; }
    .profile-identity h2 { font-size: 19px; }
    .profile-hero-art { display: none; }
    .profile-form-card { padding: 22px 18px; border-radius: 24px; }
    .profile-fields, .profile-password-section { grid-template-columns: 1fr; }
    .profile-password-section { gap: 14px; margin-top: 5px; padding-top: 19px; }
    .profile-save-button { width: 100%; min-height: 48px; }
    .avatar-upload-row { align-items: flex-start; padding: 14px; }

    /* User management becomes an app-like list instead of a wide table. */
    .users-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .users-stats-grid .stat-card { padding: 13px !important; gap: 9px; border-radius: 18px; }
    .users-stats-grid .stat-icon { width: 36px !important; height: 36px !important; font-size: 16px !important; border-radius: 13px; }
    .users-stats-grid .stat-number { font-size: 18px !important; }
    .users-stats-grid .stat-label { font-size: 10px !important; }
    .users-management .card-header { align-items: flex-start; gap: 13px; flex-direction: column; }
    .users-toolbar { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
    .users-toolbar .btn { min-width: 0; min-height: 39px; padding: 8px 9px; font-size: 11px; }
    .users-filter-tabs { display: flex; gap: 8px; margin: 0 -2px 14px; padding: 0 2px 6px; overflow-x: auto; scrollbar-width: none; }
    .users-filter-tabs::-webkit-scrollbar { display: none; }
    .filter-tab { flex: 0 0 auto; padding: 8px 12px !important; border: 1px solid var(--gray-200) !important; border-radius: 999px !important; background: #f7faff !important; font-size: 11px !important; margin: 0 !important; }
    .filter-tab.active { border-color: transparent !important; color: white !important; background: var(--primary) !important; }
    .users-search input { min-height: 45px; border-radius: 15px !important; background: #f7faff !important; }
    .users-management .table-responsive { overflow: visible; }
    .users-management .table, .users-management .table tbody, .users-management .table tr, .users-management .table td { display: block; width: 100%; }
    .users-management .table thead { display: none; }
    .users-management .table tbody { display: grid; gap: 12px; }
    .users-management .table tr { position: relative; padding: 13px 14px; border: 1px solid rgba(230, 237, 247, .95); border-radius: 18px; background: rgba(255, 255, 255, .82); box-shadow: var(--shadow-sm); }
    .users-management .table td { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 30px; padding: 5px 0 !important; border: 0 !important; text-align: right; font-size: 12px; }
    .users-management .table td::before { content: attr(data-label); flex: 0 0 78px; color: var(--gray-600); font-size: 10px; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: .03em; }
    .users-management .table td:first-child { position: absolute; top: 9px; right: 11px; min-height: auto; width: auto; }
    .users-management .table td:first-child::before { display: none; }
    .users-management .table td:nth-child(2) { display: block; padding: 2px 34px 8px 0 !important; color: var(--dark); text-align: left; font-size: 14px; }
    .users-management .table td:nth-child(2)::before { display: none; }
    .users-management .table td:nth-child(2) small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .users-management .table td:last-child { justify-content: flex-end; padding-top: 9px !important; border-top: 1px solid var(--gray-100) !important; }
    .users-management .table td:last-child::before { margin-right: auto; }
    .users-management .table td:last-child .btn { min-width: 38px; min-height: 36px; padding: 8px 10px; }
    .users-management #bulkBar { flex-wrap: wrap; gap: 9px; border-radius: 16px !important; }
}
