/* ==========================================================================
   Aqlli Maktab (AI Education) — Modern Premium EdTech Design System
   ========================================================================== */

:root,
[data-theme="light"] {
    /* ======================================================================
       1. TALIMZ LIGHT MODE — SOFT BLUE / COOL SLATE PROFESSIONAL DESIGN TOKENS
       ====================================================================== */
    --bg-primary: #EEF2F6;
    --bg-secondary: #E3EBF4;
    --bg-card: #FAFDFE;
    --bg-card-hover: #FFFFFF;
    --bg-elevated: #F8FAFD;
    --bg-input: #E7EFF8;
    --bg-hover: #DFE8F4;
    --sidebar-bg: #F4F8FC;
    --header-bg: rgba(244, 248, 252, 0.94);

    /* Aliases for backward compatibility across all 126 templates */
    --bg-body: var(--bg-primary);
    --bg-main: var(--bg-primary);
    --background: var(--bg-primary);
    --card-bg: var(--bg-card);
    --bg-card-subtle: var(--bg-secondary);

    /* Text Hierarchy */
    --text-primary: #1A2536;
    --text-secondary: #485A72;
    --text-muted: #5C708A;
    --text-light: #899CB4;
    --text-white: #FFFFFF;
    --text-main: var(--text-primary);
    --foreground: var(--text-primary);

    /* Navigation & Menus */
    --nav-active-bg: rgba(37, 99, 235, 0.11);
    --nav-active-text: #1D4ED8;
    --nav-hover-bg: rgba(37, 99, 235, 0.06);
    --nav-hover-text: #2563EB;

    /* Icons */
    --icon-default: #5C708A;
    --icon-hover: #2563EB;
    --icon-active: #1D4ED8;

    /* Borders & Outlines */
    --border-color: #D2DFEE;
    --border-light: #E0EBF6;
    --border-focus: #2563EB;
    --border: var(--border-color);

    /* Primary Accent Colors */
    --accent-primary: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-soft: rgba(37, 99, 235, 0.10);
    --primary: var(--accent-primary);
    --primary-color: var(--accent-primary);
    --primary-hover: var(--accent-hover);
    --primary-light: var(--accent-soft);
    --primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    --magic-gradient: linear-gradient(135deg, #2563EB 0%, #3B82F6 50%, #06B6D4 100%);

    /* Semantic Status Tokens */
    --success: #10B981;
    --success-light: #E6F8F1;
    --success-border: #A7F3D0;

    --warning: #F59E0B;
    --warning-light: #FEF6E4;
    --warning-border: #FDE68A;

    --danger: #EF4444;
    --danger-light: #FDECEC;
    --danger-border: #FECACA;

    --purple: #8B5CF6;
    --purple-light: #F1EDFF;

    /* Dimensions & Radii */
    --sidebar-width: 260px;
    --topbar-height: 74px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Soft Balanced Shadows */
    --shadow-card: 0 2px 10px -2px rgba(26, 37, 54, 0.06), 0 1px 3px -1px rgba(26, 37, 54, 0.04);
    --shadow-hover: 0 10px 24px -4px rgba(37, 99, 235, 0.12), 0 4px 10px -2px rgba(26, 37, 54, 0.05);
    --shadow-dropdown: 0 14px 34px -4px rgba(26, 37, 54, 0.14), 0 4px 12px -2px rgba(26, 37, 54, 0.06);
    --shadow-magic: 0 8px 24px rgba(37, 99, 235, 0.30);
}

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

/* ==========================================================================
   Universal Sleek Themed Scrollbar
   ========================================================================== */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 9999px;
    border: 1px solid transparent;
    background-clip: padding-box;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.55);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

[data-theme="dark"] * {
    scrollbar-color: rgba(148, 163, 184, 0.22) transparent;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.45);
}

html, body {
    max-width: 100vw;
    overflow-x: clip !important;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
    max-width: 100vw;
    width: 100%;
    overflow-x: clip !important;
}

/* ==========================================================================
   Sidebar (Modern Clean White Floating Style)
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
}

.brand-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.brand-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text-main);
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-link:hover .nav-icon {
    color: var(--primary);
}

.nav-item.active .nav-link {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.nav-item.active .nav-icon {
    color: var(--primary);
}

/* ==========================================================================
   TALIMZ UNIVERSAL NESTED SIDEBAR SYSTEM (Exclusive Accordion & Clean UI)
   ========================================================================== */

/* 1. Main Accordion Group Container */
.nav-group {
    list-style: none;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease;
}

/* 2. Group Header Button */
.nav-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.22s ease;
    user-select: none;
    font-family: inherit;
}

.nav-group-header::before,
.nav-group-header::after {
    content: none !important;
    display: none !important;
}

.nav-group-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    background: transparent !important;
}

.nav-group-header .nav-icon,
.nav-link .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.nav-group-header .nav-icon::before,
.nav-group-header .nav-icon::after,
.nav-arrow::before,
.nav-arrow::after {
    content: none !important;
    display: none !important;
}

.nav-group-header .nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
    background: transparent !important;
}

.nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    flex-shrink: 0;
}

.nav-group-header:hover {
    background-color: var(--primary-light) !important;
    color: var(--primary);
}

.nav-group-header:hover .nav-icon,
.nav-group-header:hover .nav-arrow {
    color: var(--primary);
    background: transparent !important;
    background-color: transparent !important;
}

/* Active group (contains currently active child) */
.nav-group.active-group > .nav-group-header {
    color: var(--primary);
    font-weight: 700;
}

.nav-group.active-group > .nav-group-header .nav-icon,
.nav-group.active-group > .nav-group-header .nav-arrow {
    color: var(--primary);
    background: transparent !important;
    background-color: transparent !important;
}

/* When group is expanded/open */
.nav-group.open > .nav-group-header .nav-arrow {
    transform: rotate(180deg);
}

/* 3. Sublist (Collapsible Accordion Body) */
.nav-sublist {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    padding: 0 0 0 28px;
    margin: 0;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, padding 0.22s ease;
    position: relative;
}

.nav-sublist::before,
.nav-sublist::after {
    content: none !important;
    display: none !important;
}

.nav-group.open > .nav-sublist {
    max-height: 600px;
    opacity: 1;
    padding: 4px 0 6px 28px;
}

/* 4. Sublist Items & Links */
.nav-subitem {
    margin: 2px 0;
    position: relative;
    list-style: none;
}

.nav-sublink {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.87rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

/* Keraksiz dekorativ nuqta va bloklar o'chirilgan */
.nav-subdot {
    display: none !important;
}

.nav-sublink:hover {
    color: var(--primary);
    background-color: var(--primary-light);
    transform: translateX(2px);
}

/* Active subitem */
.nav-subitem.active .nav-sublink {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    font-weight: 700;
}

/* Dark mode overrides for nested sidebar */
[data-theme="dark"] .nav-group-header:hover,
[data-theme="dark"] .nav-sublink:hover {
    background-color: rgba(56, 189, 248, 0.1) !important;
    color: #38bdf8;
}

[data-theme="dark"] .nav-group-header:hover .nav-icon,
[data-theme="dark"] .nav-group-header:hover .nav-arrow {
    color: #38bdf8;
    background: transparent !important;
    background-color: transparent !important;
}

[data-theme="dark"] .nav-group.active-group > .nav-group-header {
    color: #38bdf8;
}

[data-theme="dark"] .nav-group.active-group > .nav-group-header .nav-icon,
[data-theme="dark"] .nav-group.active-group > .nav-group-header .nav-arrow {
    color: #38bdf8;
    background: transparent !important;
    background-color: transparent !important;
}

[data-theme="dark"] .nav-subitem.active .nav-sublink {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-ai-magic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 20px;
    border-radius: var(--radius-full);
    background: var(--magic-gradient);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: var(--shadow-magic);
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-ai-magic:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(22, 104, 232, 0.45);
}

.logout-form {
    width: 100%;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* ==========================================================================
   Main Content Area & Topbar
   ========================================================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow-x: clip !important;
}

.topbar {
    height: var(--topbar-height);
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky !important;
    top: 0 !important;
    z-index: 950 !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ==========================================================================
   Modern Hamburger Menu Button (.sidebar-toggle)
   ========================================================================== */
.sidebar-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.sidebar-toggle:hover {
    background-color: var(--bg-card-subtle);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(22, 104, 232, 0.18);
}

.sidebar-toggle:active {
    transform: scale(0.96);
}

.sidebar-toggle svg {
    transition: transform 0.2s ease;
}

.sidebar-toggle:hover svg line:nth-child(2) {
    x2: 18;
    transition: all 0.2s ease;
}

[data-theme="dark"] .sidebar-toggle {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .sidebar-toggle:hover {
    background-color: #27354a;
    border-color: #3b82f6;
    color: #60a5fa;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   Modern Universal Form Entries & Option Menus (Inputs, Selects, Textareas)
   ========================================================================== */
.form-control,
.form-input-modern,
.form-select-modern,
input[type="text"]:not(.search-input):not(.topbar-search-input),
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="date"],
select.form-control,
select.form-select-modern,
textarea.form-control {
    width: 100%;
    height: 44px;
    padding: 10px 16px;
    border-radius: var(--radius-md, 12px);
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-input);
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}

.form-control::placeholder,
.form-input-modern::placeholder,
.form-input::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-light);
    opacity: 1;
}

textarea.form-control,
textarea {
    height: auto !important;
    min-height: 96px;
    padding: 12px 16px;
    line-height: 1.6;
    resize: vertical;
}

.form-control:focus,
.form-input-modern:focus,
.form-select-modern:focus,
input:focus:not(.search-input):not(.topbar-search-input),
select:focus,
textarea:focus {
    border-color: var(--accent-primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.14);
}

/* Premium Option Menus (Select Dropdowns) */
select,
select.form-control,
select.form-select-modern {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
    padding-right: 42px !important;
    cursor: pointer;
    font-weight: 600;
}

select[multiple] {
    background-image: none !important;
    padding: 8px 12px !important;
    height: auto !important;
}

select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
    padding: 10px 14px;
    font-weight: 500;
    font-size: 0.92rem;
}

/* File Upload Inputs */
input[type="file"],
input[type="file"].form-control {
    padding: 7px 12px;
    height: auto;
    cursor: pointer;
    background: var(--bg-card-subtle);
    border-radius: var(--radius-md, 12px);
    border: 1.5px dashed var(--border-color);
}

input[type="file"]::file-selector-button {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    margin-right: 14px;
    box-shadow: 0 2px 8px rgba(22, 104, 232, 0.25);
    transition: all 0.15s ease;
}

input[type="file"]::file-selector-button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* Dark Theme Support for Form Entries & Option Menus */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-input-modern,
[data-theme="dark"] .form-select-modern,
[data-theme="dark"] input[type="text"]:not(.search-input):not(.topbar-search-input),
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] select,
[data-theme="dark"] select.form-control,
[data-theme="dark"] select.form-select-modern,
[data-theme="dark"] textarea {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-input-modern:focus,
[data-theme="dark"] .form-select-modern:focus,
[data-theme="dark"] input:focus:not(.search-input):not(.topbar-search-input),
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    background-color: #1e293b;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.2);
    color: #ffffff;
}

[data-theme="dark"] select,
[data-theme="dark"] select.form-control,
[data-theme="dark"] select.form-select-modern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2360a5fa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] select option {
    background-color: #1e293b;
    color: #f8fafc;
}

[data-theme="dark"] input[type="file"],
[data-theme="dark"] input[type="file"].form-control {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

/* Desktop Sidebar Collapsed State */
@media (min-width: 1025px) {
    .sidebar {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    .main-content {
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    body.sidebar-desktop-collapsed .sidebar,
    html.sidebar-desktop-collapsed .sidebar {
        transform: translateX(-100%) !important;
    }
    body.sidebar-desktop-collapsed .main-content,
    html.sidebar-desktop-collapsed .main-content {
        margin-left: 0 !important;
    }
    body.sidebar-desktop-collapsed .sidebar-toggle,
    html.sidebar-desktop-collapsed .sidebar-toggle {
        color: var(--primary);
        border-color: var(--primary);
        background-color: rgba(37, 99, 235, 0.08);
    }
}

.topbar-search {
    position: relative;
    width: 360px;
}

.topbar-search .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.topbar-search .search-input {
    width: 100%;
    height: 44px;
    padding: 0 20px 0 46px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
    font-size: 0.92rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.topbar-search .search-input:focus {
    border-color: var(--border-focus);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

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

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background-color: var(--bg-hover);
    color: var(--primary);
    border-color: var(--primary);
}

.notification-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger);
    position: absolute;
    top: 10px;
    right: 10px;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background-color: var(--bg-input);
    border: 1px solid var(--border-light);
}

/* --- New Profile Widget Wrapper (clickable, opens dropdown) --- */
.profile-widget-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    border-radius: var(--radius-full);
    background-color: var(--bg-input);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.profile-widget-wrapper:hover {
    border-color: var(--primary);
    background-color: var(--bg-card);
}

.profile-chevron {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.profile-widget-wrapper:has(#profileDropdown.open) .profile-chevron {
    transform: rotate(180deg);
}

/* Avatar */
.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.avatar-circle img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    overflow: hidden !important;
}

/* Admin glowing gold ring + crown aura */
.avatar-circle.avatar-admin {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
    box-shadow: 0 0 0 2.5px #fbbf24, 0 0 16px rgba(245, 158, 11, 0.7) !important;
    position: relative;
}

.avatar-circle.avatar-admin::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -6px;
    width: 15px;
    height: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='%23fbbf24' stroke='%23b45309' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.avatar-circle-lg {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Desktop-only: visible on ≥1025px, hidden on mobile */
.desktop-only {
    display: flex !important;
}

/* Topbar theme button — visible on all devices (desktop + mobile) */
.topbar-theme-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.15rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.topbar-theme-btn .sun-icon {
    display: none !important;
    line-height: 1;
}

.topbar-theme-btn .moon-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: var(--text-primary);
}

.topbar-theme-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.05);
}

.topbar-theme-btn:hover .moon-icon {
    color: var(--accent-primary);
}

[data-theme="dark"] .topbar-theme-btn {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.25) !important;
}

[data-theme="dark"] .topbar-theme-btn .sun-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #fbbf24 !important;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.45));
}

[data-theme="dark"] .topbar-theme-btn .moon-icon {
    display: none !important;
}

/* --- Profile Dropdown --- */
.profile-dropdown {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    min-width: 250px !important;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 45px -5px rgba(0, 0, 0, 0.4), 0 8px 16px -2px rgba(0, 0, 0, 0.2) !important;
    z-index: 9999 !important;
    overflow: hidden !important;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card-subtle);
}

.profile-dropdown-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.profile-dropdown-role {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 2px;
}

.profile-dropdown-username {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.profile-dropdown-divider {
    height: 1px;
    background-color: var(--border-light);
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease;
}

.profile-dropdown-item:hover {
    background-color: var(--bg-input);
    color: var(--primary);
}

.profile-dropdown-logout {
    color: var(--danger);
}

.profile-dropdown-logout:hover {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* Mobile table column hiding */
.mobile-hidden {
    display: table-cell;
}




.content-wrapper {
    padding: 32px;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: clip !important;
}

/* ==========================================================================
   Hero Welcome Banner (BilimAI Style)
   ========================================================================== */
.hero-banner {
    background: linear-gradient(135deg, #F5F8FE 0%, #E9F0FC 100%);
    border: 1px solid #D3E0F5;
    border-radius: var(--radius-xl);
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 620px;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background-color: #dbeafe;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.hero-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-title em {
    font-style: italic;
    color: var(--primary);
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-visual {
    width: 240px;
    height: 180px;
    border-radius: 20px;
    background: linear-gradient(135deg, #091e42 0%, #172b4d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 36px rgba(9, 30, 66, 0.25);
    position: relative;
}

.hero-visual-icon {
    font-size: 4rem;
    filter: drop-shadow(0 8px 16px rgba(0, 195, 255, 0.4));
}

/* ==========================================================================
   Stats Grid Cards (3 Key Metrics)
   ========================================================================== */
.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-box-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-box-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-icon-blue { background: #eff6ff; color: #2563eb; }
.stat-icon-green { background: #ecfdf5; color: #10b981; }
.stat-icon-orange { background: #fff7ed; color: #f97316; }
.stat-icon-purple { background: #f5f3ff; color: #8b5cf6; }

.stat-chip {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
}

.stat-chip-blue { background: #dbeafe; color: #1e40af; }
.stat-chip-green { background: #d1fae5; color: #065f46; }
.stat-chip-orange { background: #ffedd5; color: #9a3412; }
.stat-chip-purple { background: #ede9fe; color: #5b21b6; }

.stat-box-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-box-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

/* ==========================================================================
   Cards, Grid & General UI
   ========================================================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    max-width: 100% !important;
    width: 100%;
    min-width: 0;
    box-sizing: border-box !important;
    overflow: hidden;
}

.card-header {
    padding: 20px 26px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 26px;
}

.dashboard-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.dashboard-2col > * {
    min-width: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

/* ==========================================================================
   Buttons & Badges (Modern Pill Design)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(22, 104, 232, 0.28);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(22, 104, 232, 0.38);
}

.btn-outline {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-success {
    background-color: var(--success);
    color: #ffffff !important;
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff !important;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    line-height: 1.2;
}

.badge-blue { background: #eff6ff; color: #2563eb; }
.badge-green, .badge-success { background: #ecfdf5; color: #059669; }
.badge-orange, .badge-warning { background: #fffbeb; color: #d97706; }
.badge-red, .badge-danger { background: #fef2f2; color: #dc2626; }
.badge-purple { background: #f5f3ff; color: #7c3aed; }
.badge-gray, .badge-info { background: #f1f5f9; color: #475569; }

/* ==========================================================================
   AI Suggestion Card (Aqlu-Zakovati Tavsiya)
   ========================================================================== */
.ai-suggestion-card {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.10);
    position: relative;
    overflow: hidden;
}

.ai-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
}

.ai-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 12px;
}

.ai-card-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ==========================================================================
   AI Insight Banners (Student Detail Page - Image 3)
   ========================================================================== */
.insight-box {
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.insight-blue {
    background-color: #f0f7ff;
    border-left: 4px solid #2563eb;
}

.insight-red {
    background-color: #fff5f5;
    border-left: 4px solid #ef4444;
}

.insight-green {
    background-color: #f0fdf4;
    border-left: 4px solid #10b981;
}

.insight-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.insight-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   Modern Tables
   ========================================================================== */
.table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    box-sizing: border-box !important;
}

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

.table th {
    padding: 14px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 16px 20px;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-primary);
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: var(--bg-secondary);
}

/* User cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-cell-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Progress bar inside table */
.progress-bar-bg {
    width: 100%;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: var(--border-color);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    transition: width 0.4s ease;
}

/* ==========================================================================
   File Upload Drag & Drop Zone (Image 2)
   ========================================================================== */
.dropzone-container {
    border: 2px dashed #93c5fd;
    border-radius: var(--radius-xl);
    padding: 50px 30px;
    text-align: center;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropzone-container:hover {
    border-color: var(--primary);
    background-color: var(--accent-soft);
}

.dropzone-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: #dbeafe;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 16px;
}

/* ==========================================================================
   Modern Form Inputs & Selects
   ========================================================================== */
.form-input-modern, .form-select-modern, .form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-input);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.form-select-modern {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 42px;
    cursor: pointer;
}

.form-input-modern:focus, .form-select-modern:focus, .form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    background-color: var(--bg-card);
}

.form-select-modern:disabled, .form-input-modern:disabled {
    background-color: var(--bg-secondary);
    color: var(--text-light);
    cursor: not-allowed;
    border-color: var(--border-light);
}

/* Multi-select Checkbox Grid / Container */
.teacher-select-container {
    max-height: 160px;
    overflow-y: auto;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-input);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.teacher-select-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.teacher-select-card:hover {
    background: rgba(22, 104, 232, 0.08);
}

.teacher-select-card input[type="checkbox"],
.form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ==========================================================================
   Sidebar Theme Sliding Switch & Dark Mode Styles
   ========================================================================== */
.sidebar-theme-switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background-color: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.theme-switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    user-select: none;
}

.theme-mode-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin: 0;
    cursor: pointer;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: var(--primary-gradient);
}

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

.sidebar-close-btn {
    display: none;
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}


/* Date Badge component */
.date-badge {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.date-badge-month {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: block;
    text-transform: uppercase;
}

.date-badge-day {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* AI Sublink component */
.ai-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.ai-sublink:hover {
    background: var(--accent-soft);
    color: var(--accent-primary);
    border-color: #bfdbfe;
    transform: translateX(3px);
}

/* Topic Card components */
.topic-item-card {
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.topic-item-card:hover {
    border-color: #bfdbfe;
    background: var(--accent-soft);
}

.topic-name-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.topic-empty-card {
    grid-column: 1 / -1;
    padding: 18px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

/* AI Quota Box component */
.ai-quota-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}

/* ==========================================================================
   2. TALIMZ DARK MODE — UNIFIED & BALANCED DEEP SLATE TOKENS
   ========================================================================== */
[data-theme="dark"] {
    --bg-primary: #0B1120;
    --bg-secondary: #1B273D;
    --bg-card: #131C2E;
    --bg-card-hover: #19243A;
    --bg-elevated: #1B273D;
    --bg-input: #182338;
    --bg-hover: #22314C;
    --sidebar-bg: #0F172A;
    --header-bg: rgba(15, 23, 42, 0.94);

    /* Aliases */
    --bg-body: var(--bg-primary);
    --bg-main: var(--bg-primary);
    --background: var(--bg-primary);
    --card-bg: var(--bg-card);
    --bg-card-subtle: var(--bg-secondary);

    /* Text Hierarchy */
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #94A3B8;
    --text-light: #64748B;
    --text-white: #FFFFFF;
    --text-main: var(--text-primary);
    --foreground: var(--text-primary);

    /* Navigation & Menus */
    --nav-active-bg: rgba(56, 189, 248, 0.14);
    --nav-active-text: #38BDF8;
    --nav-hover-bg: rgba(56, 189, 248, 0.08);
    --nav-hover-text: #38BDF8;

    /* Icons */
    --icon-default: #94A3B8;
    --icon-hover: #38BDF8;
    --icon-active: #38BDF8;

    /* Borders & Outlines */
    --border-color: #26354D;
    --border-light: #1E293B;
    --border-focus: #3B82F6;
    --border: var(--border-color);

    /* Primary Accent Colors */
    --accent-primary: #3B82F6;
    --accent-hover: #60A5FA;
    --accent-soft: rgba(59, 130, 246, 0.16);
    --primary: var(--accent-primary);
    --primary-color: var(--accent-primary);
    --primary-hover: var(--accent-hover);
    --primary-light: var(--accent-soft);
    --primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    --magic-gradient: linear-gradient(135deg, #2563EB 0%, #3B82F6 50%, #06B6D4 100%);

    /* Semantic Status Tokens */
    --success-light: rgba(16, 185, 129, 0.15);
    --success-border: rgba(16, 185, 129, 0.32);

    --warning-light: rgba(245, 158, 11, 0.15);
    --warning-border: rgba(245, 158, 11, 0.32);

    --danger-light: rgba(239, 68, 68, 0.15);
    --danger-border: rgba(239, 68, 68, 0.32);

    --purple-light: rgba(139, 92, 246, 0.15);

    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.45), 0 2px 6px -1px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 12px 30px -4px rgba(0, 0, 0, 0.65);
    --shadow-dropdown: 0 20px 45px -8px rgba(0, 0, 0, 0.7);
    --shadow-magic: 0 8px 24px rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6,
[data-theme="dark"] strong,
[data-theme="dark"] b {
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar {
    background-color: var(--sidebar-bg);
    border-right-color: var(--border-color);
}

[data-theme="dark"] .sidebar-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .brand-title {
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar .nav-link {
    color: var(--text-secondary);
}

[data-theme="dark"] .sidebar .nav-link:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar .nav-item.active .nav-link {
    background-color: var(--bg-secondary);
    color: var(--accent-hover);
}

[data-theme="dark"] .topbar {
    background-color: var(--header-bg);
    border-bottom-color: var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .topbar-search {
    background: transparent;
    border: none;
}

[data-theme="dark"] .topbar-search .search-input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .topbar-search .search-input:focus {
    background-color: var(--bg-secondary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

[data-theme="dark"] .icon-btn {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .icon-btn:hover {
    background-color: var(--bg-hover);
    color: #ffffff;
}

[data-theme="dark"] .user-profile-widget {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .user-profile-widget .profile-name {
    color: var(--text-primary);
}

[data-theme="dark"] .profile-widget-wrapper {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .profile-widget-wrapper:hover {
    background-color: var(--bg-hover);
    border-color: var(--accent-primary);
}

[data-theme="dark"] .profile-dropdown {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.55) !important;
}

[data-theme="dark"] .profile-dropdown-header {
    background-color: var(--sidebar-bg);
}

[data-theme="dark"] .profile-dropdown-name {
    color: var(--text-primary);
}

[data-theme="dark"] .profile-dropdown-username {
    color: var(--text-light);
}

[data-theme="dark"] .profile-dropdown-divider {
    background-color: var(--border-color);
}

[data-theme="dark"] .profile-dropdown-item {
    color: #cbd5e1;
}

[data-theme="dark"] .profile-dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--accent-hover);
}


[data-theme="dark"] .card {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .card-header {
    border-bottom-color: var(--border-color);
    background-color: transparent !important;
}

[data-theme="dark"] .card-header h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .table th {
    background-color: var(--bg-secondary);
    border-bottom-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .table td {
    border-bottom-color: var(--border-light);
    color: #cbd5e1;
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.06);
}

[data-theme="dark"] .stat-box {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .stat-box-label {
    color: var(--text-secondary);
}

[data-theme="dark"] .stat-box-value {
    color: var(--text-primary);
}

[data-theme="dark"] .user-cell-avatar {
    background: var(--bg-secondary);
    color: #93c5fd;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .stat-icon-blue { background: rgba(59, 130, 246, 0.2); border: 1px solid rgba(59, 130, 246, 0.4); }
[data-theme="dark"] .stat-icon-green { background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.4); }
[data-theme="dark"] .stat-icon-orange { background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(245, 158, 11, 0.4); }
[data-theme="dark"] .stat-icon-purple { background: rgba(139, 92, 246, 0.2); border: 1px solid rgba(139, 92, 246, 0.4); }

[data-theme="dark"] .stat-chip-blue { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
[data-theme="dark"] .stat-chip-green { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
[data-theme="dark"] .stat-chip-orange { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
[data-theme="dark"] .stat-chip-purple { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; }

[data-theme="dark"] .date-badge {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .date-badge-month {
    color: var(--text-secondary);
}

[data-theme="dark"] .date-badge-day {
    color: var(--text-primary);
}

[data-theme="dark"] .ai-suggestion-card {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .ai-card-title {
    color: var(--text-primary);
}

[data-theme="dark"] .ai-card-desc {
    color: var(--text-secondary);
}

[data-theme="dark"] .ai-sublink {
    background: var(--bg-secondary);
    color: #cbd5e1;
    border-color: var(--border-color);
}

[data-theme="dark"] .ai-sublink:hover {
    background: var(--bg-hover);
    color: #ffffff;
    border-color: var(--accent-primary);
}

[data-theme="dark"] .topic-item-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .topic-item-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

[data-theme="dark"] .topic-name-text {
    color: var(--text-primary);
}

[data-theme="dark"] .topic-empty-card {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
}

[data-theme="dark"] .ai-quota-box {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .hero-banner {
    background: linear-gradient(135deg, #162238 0%, #0F172A 100%);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .hero-title {
    color: var(--text-primary);
}

[data-theme="dark"] .hero-desc {
    color: var(--text-secondary);
}

[data-theme="dark"] .form-input-modern, 
[data-theme="dark"] .form-select-modern, 
[data-theme="dark"] .form-input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-input-modern:focus, 
[data-theme="dark"] .form-select-modern:focus, 
[data-theme="dark"] .form-input:focus {
    background-color: var(--bg-secondary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

[data-theme="dark"] .form-select-modern:disabled, 
[data-theme="dark"] .form-input-modern:disabled {
    background-color: var(--sidebar-bg);
    border-color: var(--border-light);
    color: var(--text-light);
}

[data-theme="dark"] .insight-blue {
    background-color: rgba(37, 99, 235, 0.15);
    border-left-color: #3b82f6;
}

[data-theme="dark"] .insight-red {
    background-color: rgba(239, 68, 68, 0.15);
    border-left-color: #ef4444;
}

[data-theme="dark"] .insight-green {
    background-color: rgba(16, 185, 129, 0.15);
    border-left-color: #10b981;
}

[data-theme="dark"] .insight-title {
    color: #93c5fd;
}

[data-theme="dark"] .insight-text {
    color: #e2e8f0;
}

.quiz-option-card {
    padding: 14px 18px;
    border-radius: 14px;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.quiz-option-card.correct {
    border-color: #10b981;
    background-color: var(--success-light);
}

.quiz-option-card .option-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.quiz-option-card.correct .option-text {
    color: #065f46;
}

[data-theme="dark"] .quiz-option-card {
    border-color: var(--border-color);
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .quiz-option-card.correct {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.18);
}

[data-theme="dark"] .quiz-option-card .option-text {
    color: #f1f5f9;
}

[data-theme="dark"] .quiz-option-card.correct .option-text {
    color: #34d399;
}

[data-theme="dark"] .teacher-select-container {
    background-color: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .teacher-select-card {
    color: #f8fafc;
}

[data-theme="dark"] .teacher-select-card:hover {
    background: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .form-card h3 {
    color: #f8fafc !important;
}

[data-theme="dark"] .btn-outline {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .btn-outline:hover {
    background-color: #334155;
    color: #ffffff;
    border-color: #475569;
}

[data-theme="dark"] .link-primary,
[data-theme="dark"] a.link-primary {
    color: #60a5fa;
}

[data-theme="dark"] .link-primary:hover {
    color: #93c5fd;
}

[data-theme="dark"] .badge-blue {
    background-color: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .badge-green {
    background-color: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .badge-purple {
    background-color: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.3);
}

[data-theme="dark"] .badge-soon {
    background-color: #1e293b;
    color: #94a3b8;
    border-color: #334155;
}

[data-theme="dark"] .btn-disabled {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #64748b !important;
}

[data-theme="dark"] .card-disabled {
    background-color: #0f172a;
    border-color: #1e293b;
}

[data-theme="dark"] .drop-zone {
    background-color: #111827;
    border-color: #334155;
}

[data-theme="dark"] .drop-zone:hover, 
[data-theme="dark"] .drop-zone.dragover {
    background-color: rgba(37, 99, 235, 0.08);
    border-color: var(--primary);
}

[data-theme="dark"] .progress-bar-bg {
    background-color: #1e293b;
}

[data-theme="dark"] .alert-info {
    background-color: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.3);
    color: #93c5fd;
}

[data-theme="dark"] .insight-blue {
    background-color: rgba(37, 99, 235, 0.12);
    border-left-color: #3b82f6;
}

[data-theme="dark"] .insight-red {
    background-color: rgba(239, 68, 68, 0.12);
    border-left-color: #ef4444;
}

[data-theme="dark"] .insight-green {
    background-color: rgba(16, 185, 129, 0.12);
    border-left-color: #10b981;
}

[data-theme="dark"] .insight-title {
    color: #f8fafc;
}

[data-theme="dark"] .insight-text {
    color: #cbd5e1;
}

[data-theme="dark"] code {
    background-color: #1e293b;
    color: #93c5fd;
    border-color: #334155;
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */
.messages-container {
    margin-bottom: 24px;
}

.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    border: 1px solid transparent;
}

.alert-success { background: var(--success-light); border-color: var(--success-border); color: #065f46; }
.alert-error, .alert-danger { background: var(--danger-light); border-color: var(--danger-border); color: #991b1b; }
.alert-warning { background: var(--warning-light); border-color: var(--warning-border); color: #92400e; }
.alert-info { background: var(--primary-light); border-color: #bfdbfe; color: #1e40af; }

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}

.alert-close:hover { opacity: 1; }

.flex-gap { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* Desktop Default Visibility Rules */
.sidebar-theme-switch-container {
    display: none !important; /* Hidden on desktop */
}

.topbar-theme-btn {
    display: flex !important; /* Visible on desktop */
}

.sidebar-close-btn {
    display: none !important; /* Hidden on desktop */
}

.desktop-only {
    display: flex !important;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 1024px) {
    /* Theme Toggle Switch vs Topbar Button */
    .sidebar-theme-switch-container {
        display: flex !important; /* Visible inside sidebar on mobile/tablet */
    }

    .topbar-theme-btn {
        display: flex !important; /* Visible on topbar on mobile and desktop! */
    }

    /* Topbar Profile on Mobile: only Avatar icon, hide text */
    .desktop-only {
        display: none !important;
    }

    .profile-widget-wrapper {
        padding: 2px !important;
        background: transparent !important;
        border-color: transparent !important;
        gap: 0 !important;
        box-shadow: none !important;
    }

    .profile-widget-wrapper:hover {
        background: transparent !important;
    }

    .profile-dropdown {
        right: 0 !important;
        min-width: 260px !important;
    }

    /* Mobile Sidebar Drawer */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        width: 280px !important;
        z-index: 1001 !important;
        transform: translateX(-100%) !important;
        box-shadow: none;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .sidebar.sidebar-open {
        transform: translateX(0) !important;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.7) !important;
    }

    .sidebar-close-btn {
        display: none !important;
    }

    .sidebar.sidebar-open .sidebar-close-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

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

    .sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        border: 1.5px solid var(--border-color);
        background-color: var(--bg-card);
        color: var(--text-main);
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    }

    .dashboard-2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Tables on Mobile: hide status & actions column, optimize user cell */
    .mobile-hidden {
        display: none !important;
    }

    .table th, .table td {
        padding: 10px 8px !important;
        font-size: 0.82rem !important;
    }

    .user-cell {
        gap: 8px !important;
    }

    .user-cell-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 0 12px;
        gap: 8px;
    }

    .topbar-right {
        gap: 8px;
        min-width: 0;
    }

    .topbar-search {
        display: none;
    }

    .hero-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px 14px;
        align-items: stretch;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
    }

    .hero-title {
        font-size: 1.55rem;
        line-height: 1.25;
        margin-bottom: 10px;
    }

    .hero-desc {
        font-size: 0.92rem;
        line-height: 1.5;
        margin-bottom: 16px;
    }

    .hero-actions, .teacher-hero-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .hero-actions .btn,
    .hero-actions a.btn,
    .teacher-hero-actions .btn,
    .teacher-hero-actions a.btn,
    .teacher-hero-btn {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 12px 14px !important;
        font-size: 13.5px !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }

    .hero-visual, .teacher-hero-banner .hero-visual {
        display: none !important;
    }

    .content-wrapper {
        padding: 10px 8px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
    }

    .director-main-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 1.25rem !important;
    }
    .director-main-grid > div {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

/* ==========================================================================
   Responsive Utilities for Dashboard & Admin Lists
   ========================================================================== */
.director-stats-grid {
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.director-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.card-search-filter {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card-subtle);
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .director-main-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
}

@media (max-width: 768px) {
    .director-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
        margin-bottom: 1.25rem !important;
    }
    .content-wrapper {
        padding: 12px 10px !important;
    }
}

@media (max-width: 640px) {
    .card-header {
        padding: 14px 12px !important;
    }
    .card-header.flex-between {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .card-header .flex-gap {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .card-header .flex-gap .btn,
    .card-header .flex-gap a.btn {
        flex: 1 1 auto !important;
        text-align: center !important;
        justify-content: center !important;
        white-space: normal !important;
    }
    .card-header form {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    .card-header form input,
    .card-header form select,
    .card-header form button {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
    .card-search-filter {
        padding: 12px 10px !important;
    }
    .card-search-filter form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .card-search-filter form > div {
        min-width: 0 !important;
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    .card-search-filter .flex-gap {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }
    .card-search-filter .flex-gap .btn,
    .card-search-filter .flex-gap a.btn {
        flex: 1 !important;
        text-align: center !important;
        justify-content: center !important;
    }
}




/* ==========================================================================
   TALIMZ UNIVERSAL LUCIDE SVG ICON UTILITIES
   ========================================================================== */
.tz-icon {
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
    pointer-events: none;
}

/* ==========================================================================
   3. TALIMZ THEME-AWARE UTILITY LAYER (For Parent, Director CRM/Ranking,
      Subscriptions, Attendance & All Role Panels)
   ========================================================================== */
.max-w-7xl { max-width: 80rem; }
.max-w-xl { max-width: 36rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xs { max-width: 20rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-0\.5 { margin-bottom: 0.125rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mr-2 { margin-right: 0.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pl-10 { padding-left: 2.5rem; }
.pr-4 { padding-right: 1rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.self-start { align-self: flex-start; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-3\.5 { gap: 0.875rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:items-center { align-items: center; }
    .sm\:justify-between { justify-content: space-between; }
    .sm\:self-auto { align-self: auto; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sm\:p-5 { padding: 1.25rem; }
    .sm\:p-8 { padding: 2rem; }
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:text-right { text-align: right; }
    .sm\:text-sm { font-size: 0.875rem; }
    .sm\:text-2xl { font-size: 1.5rem; }
    .sm\:text-3xl { font-size: 1.875rem; }
}

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:items-center { align-items: center; }
    .md\:items-start { align-items: flex-start; }
    .md\:justify-between { justify-content: space-between; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:flex { display: flex; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

.w-full { width: 100%; }
.w-px { width: 1px; }
.w-1\.5 { width: 0.375rem; }
.w-2 { width: 0.5rem; }
.w-6 { width: 1.5rem; }
.w-7 { width: 1.75rem; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-24 { width: 6rem; }
.w-36 { width: 9rem; }
.min-w-\[200px\] { min-width: 200px; }

.h-full { height: 100%; }
.h-fit { height: fit-content; }
.h-1 { height: 0.25rem; }
.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.top-3 { top: 0.75rem; }
.top-4 { top: 1rem; }
.right-4 { right: 1rem; }
.left-3\.5 { left: 0.875rem; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.cursor-pointer { cursor: pointer; }

.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; border-style: solid; border-color: var(--border-color); }
.border-t { border-top: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }
.divide-y > * + * { border-top: 1px solid var(--border-light); }

.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.underline { text-decoration: underline; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04); }
.shadow-md { box-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.06); }
.shadow-lg, .shadow-xl, .shadow-2xl { box-shadow: var(--shadow-card); }
.transition, .transition-all, .transition-colors, .transition-transform { transition: all 0.2s ease; }

/* Theme-Aware Surface Mappings for Tailwind Classes */
.bg-card,
.bg-white,
.bg-gray-800,
.bg-gray-800\/80,
.bg-gray-800\/60,
.bg-gray-800\/40,
.bg-slate-800 {
    background-color: var(--bg-card);
}

.bg-background,
.bg-slate-50,
.bg-slate-100,
.bg-gray-900,
.bg-gray-900\/80,
.bg-gray-900\/70,
.bg-gray-900\/60,
.bg-gray-900\/50,
.bg-gray-900\/40,
.bg-slate-900\/60,
.bg-gray-700,
.bg-gray-700\/60 {
    background-color: var(--bg-secondary);
}

.hover\:bg-gray-800:hover,
.hover\:bg-gray-700:hover,
.hover\:bg-gray-700\/80:hover,
.hover\:bg-gray-700\/30:hover,
.hover\:bg-gray-600:hover,
.hover\:bg-slate-100:hover,
.hover\:bg-slate-50\/50:hover {
    background-color: var(--bg-hover);
}

/* Header Banner Gradients (Adaptive to Light Soft Slate & Dark Deep Slate) */
.bg-gradient-to-r,
.bg-gradient-to-br {
    background: linear-gradient(135deg, #E6EFF8 0%, #D8E5F4 100%) !important;
    border-color: var(--border-color) !important;
}

.bg-gradient-to-r h1, .bg-gradient-to-r h2, .bg-gradient-to-r h3,
.bg-gradient-to-br h1, .bg-gradient-to-br h2, .bg-gradient-to-br h3 {
    color: var(--text-primary) !important;
}

.bg-gradient-to-r p, .bg-gradient-to-br p {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .bg-gradient-to-r,
[data-theme="dark"] .bg-gradient-to-br {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.35) 0%, rgba(19, 28, 46, 0.92) 100%) !important;
    border-color: rgba(59, 130, 246, 0.28) !important;
}

[data-theme="dark"] .bg-gradient-to-r h1, [data-theme="dark"] .bg-gradient-to-r h2, [data-theme="dark"] .bg-gradient-to-r h3,
[data-theme="dark"] .bg-gradient-to-br h1, [data-theme="dark"] .bg-gradient-to-br h2, [data-theme="dark"] .bg-gradient-to-br h3 {
    color: #F1F5F9 !important;
}

[data-theme="dark"] .bg-gradient-to-r p, [data-theme="dark"] .bg-gradient-to-br p {
    color: #94A3B8 !important;
}

/* Solid Action Gradients & Colored Buttons */
.from-blue-500,
.from-blue-700,
.bg-primary,
.bg-blue-600,
.bg-blue-500 {
    background: var(--primary-gradient) !important;
    color: #FFFFFF !important;
}

.hover\:bg-blue-500:hover,
.hover\:bg-blue-600:hover,
.hover\:bg-primary:hover,
.hover\:bg-primary\/90:hover {
    background: var(--accent-hover) !important;
    color: #FFFFFF !important;
}

.bg-emerald-600,
.bg-emerald-500 {
    background-color: #10B981 !important;
    color: #FFFFFF !important;
}

.bg-purple-600,
.bg-purple-500 {
    background-color: #8B5CF6 !important;
    color: #FFFFFF !important;
}

.bg-amber-500,
.bg-amber-400 {
    background-color: #F59E0B !important;
    color: #FFFFFF !important;
}

.bg-rose-500 {
    background-color: #EF4444 !important;
    color: #FFFFFF !important;
}

/* Soft Tint Backgrounds for Badges & Icon Boxes */
.bg-blue-500\/10,
.bg-blue-500\/20,
.bg-blue-500\/30,
.bg-blue-600\/20,
.bg-blue-600\/30,
.bg-blue-950\/20,
.bg-blue-950\/30,
.bg-blue-950\/40 {
    background-color: rgba(37, 99, 235, 0.12);
}

.bg-emerald-50,
.bg-emerald-100,
.bg-emerald-500\/10,
.bg-emerald-500\/20,
.bg-emerald-950\/30 {
    background-color: rgba(16, 185, 129, 0.12);
}

.bg-amber-50,
.bg-amber-100,
.bg-amber-500\/10,
.bg-amber-500\/20,
.bg-amber-800\/20,
.bg-yellow-500\/20,
.bg-yellow-950\/30 {
    background-color: rgba(245, 158, 11, 0.14);
}

.bg-purple-500\/10,
.bg-purple-500\/20,
.bg-purple-600\/30 {
    background-color: rgba(139, 92, 246, 0.14);
}

.bg-rose-50,
.bg-rose-50\/50,
.bg-rose-100,
.bg-rose-500\/20,
.bg-rose-950\/30 {
    background-color: rgba(239, 68, 68, 0.12);
}

.bg-black\/70 {
    background-color: rgba(15, 23, 42, 0.68);
}

/* Theme-Aware Borders */
.border-border,
.border-gray-700,
.border-gray-700\/80,
.border-gray-700\/60,
.border-gray-700\/50,
.border-gray-700\/40,
.border-gray-600,
.border-gray-400\/40 {
    border-color: var(--border-color);
}

.border-blue-500\/20,
.border-blue-500\/30,
.border-blue-500\/40,
.border-blue-500\/50,
.border-blue-700\/30,
.border-sky-300 {
    border-color: rgba(37, 99, 235, 0.30);
}

.border-emerald-300,
.border-emerald-500\/20,
.border-emerald-500\/30,
.border-emerald-500\/40 {
    border-color: rgba(16, 185, 129, 0.32);
}

.border-amber-300,
.border-amber-500\/20,
.border-amber-500\/30,
.border-amber-500\/40,
.border-amber-800\/40,
.border-yellow-500\/30,
.border-yellow-600\/40 {
    border-color: rgba(245, 158, 11, 0.35);
}

.border-purple-500\/30,
.border-purple-500\/40 {
    border-color: rgba(139, 92, 246, 0.32);
}

.border-rose-300,
.border-rose-500\/20,
.border-rose-500\/30 {
    border-color: rgba(239, 68, 68, 0.32);
}

/* Theme-Aware Typography Colors */
.text-white,
.text-foreground,
.text-slate-900,
.text-gray-200 {
    color: var(--text-primary);
}

.text-muted,
.text-foreground\/80,
.text-gray-300,
.text-gray-400,
.text-gray-500 {
    color: var(--text-secondary);
}

/* Keep white text on solid colored buttons/badges */
.bg-blue-600.text-white,
.bg-blue-600 .text-white,
.bg-blue-500.text-white,
.bg-blue-500 .text-white,
.btn-primary,
.btn-primary *,
.btn-primary .text-white,
.bg-emerald-600.text-white,
.bg-emerald-600 .text-white,
.bg-emerald-500.text-white,
.bg-emerald-500 .text-white,
.bg-purple-600.text-white,
.bg-purple-600 .text-white,
.bg-purple-500.text-white,
.bg-purple-500 .text-white,
.bg-rose-500.text-white,
.bg-rose-500 .text-white,
.bg-rose-600.text-white,
.bg-rose-600 .text-white,
.bg-amber-500.text-white,
.bg-amber-500 .text-white,
.bg-primary.text-white,
.bg-primary .text-white,
.from-blue-500 .text-white,
.from-blue-700 .text-white {
    color: #FFFFFF !important;
}

/* Universal Modals & Dropdowns Light & Dark Theme Adaptation */
.modal-content,
.modal-card,
.modal-box,
.dialog-box {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-dropdown) !important;
}

.dropdown-menu,
.dropdown-panel,
.dropdown-content,
.popover-content {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-dropdown) !important;
}

/* Semantic Text Accents (Readable in both Light & Dark Mode) */
.text-primary,
.text-blue-600,
.text-blue-400,
.text-blue-300,
.text-blue-200,
.text-sky-600,
.text-sky-700 {
    color: var(--accent-primary);
}

[data-theme="dark"] .text-blue-400,
[data-theme="dark"] .text-blue-300,
[data-theme="dark"] .text-blue-200 {
    color: #60A5FA;
}

.text-emerald-500,
.text-emerald-600,
.text-emerald-700,
.text-emerald-800,
.text-emerald-400,
.text-emerald-400\/80,
.text-emerald-400\/70,
.text-emerald-300 {
    color: #059669;
}

[data-theme="dark"] .text-emerald-400,
[data-theme="dark"] .text-emerald-400\/80,
[data-theme="dark"] .text-emerald-400\/70,
[data-theme="dark"] .text-emerald-300,
[data-theme="dark"] .text-emerald-500 {
    color: #34D399;
}

.text-amber-600,
.text-amber-700,
.text-amber-800,
.text-amber-400,
.text-amber-300,
.text-yellow-400,
.text-yellow-400\/80,
.text-yellow-400\/70,
.text-yellow-300,
.text-yellow-300\/80,
.text-yellow-200 {
    color: #D97706;
}

[data-theme="dark"] .text-amber-400,
[data-theme="dark"] .text-amber-300,
[data-theme="dark"] .text-yellow-400,
[data-theme="dark"] .text-yellow-300,
[data-theme="dark"] .text-yellow-200 {
    color: #FBBF24;
}

.text-purple-600,
.text-purple-400,
.text-purple-300,
.text-purple-200,
.text-indigo-300 {
    color: #7C3AED;
}

[data-theme="dark"] .text-purple-400,
[data-theme="dark"] .text-purple-300,
[data-theme="dark"] .text-purple-200,
[data-theme="dark"] .text-indigo-300 {
    color: #A78BFA;
}

.text-rose-600,
.text-rose-700,
.text-rose-800,
.text-rose-400,
.text-rose-400\/70,
.text-rose-300 {
    color: #DC2626;
}

[data-theme="dark"] .text-rose-400,
[data-theme="dark"] .text-rose-400\/70,
[data-theme="dark"] .text-rose-300 {
    color: #F87171;
}

/* Automatic Soft-Slate / Deep-Slate Adaptation for Inline Card Surfaces */
[data-theme="light"] .content-wrapper [style*="background: #ffffff"]:not(.brand-logo-icon):not(.mockup-logo-box):not(.current-logo-img-wrap):not(.mockup-login-logo),
[data-theme="light"] .content-wrapper [style*="background:#ffffff"]:not(.brand-logo-icon):not(.mockup-logo-box):not(.current-logo-img-wrap):not(.mockup-login-logo),
[data-theme="light"] .content-wrapper [style*="background: #fff"]:not(.brand-logo-icon):not(.mockup-logo-box):not(.current-logo-img-wrap):not(.mockup-login-logo),
[data-theme="light"] .content-wrapper [style*="background:#fff"]:not(.brand-logo-icon):not(.mockup-logo-box):not(.current-logo-img-wrap):not(.mockup-login-logo) {
    background-color: var(--bg-card) !important;
}

[data-theme="light"] .content-wrapper [style*="background: #f8fafc"],
[data-theme="light"] .content-wrapper [style*="background:#f8fafc"],
[data-theme="light"] .content-wrapper [style*="background: #f1f5f9"],
[data-theme="light"] .content-wrapper [style*="background:#f1f5f9"] {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .content-wrapper [style*="background: #ffffff"]:not(.brand-logo-icon):not(.mockup-logo-box):not(.current-logo-img-wrap):not(.mockup-login-logo),
[data-theme="dark"] .content-wrapper [style*="background:#ffffff"]:not(.brand-logo-icon):not(.mockup-logo-box):not(.current-logo-img-wrap):not(.mockup-login-logo),
[data-theme="dark"] .content-wrapper [style*="background: #fff"]:not(.brand-logo-icon):not(.mockup-logo-box):not(.current-logo-img-wrap):not(.mockup-login-logo),
[data-theme="dark"] .content-wrapper [style*="background:#fff"]:not(.brand-logo-icon):not(.mockup-logo-box):not(.current-logo-img-wrap):not(.mockup-login-logo) {
    background-color: var(--bg-card) !important;
}

[data-theme="dark"] .content-wrapper [style*="background: #f8fafc"],
[data-theme="dark"] .content-wrapper [style*="background:#f8fafc"],
[data-theme="dark"] .content-wrapper [style*="background: #f1f5f9"],
[data-theme="dark"] .content-wrapper [style*="background:#f1f5f9"] {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .content-wrapper [style*="color: #0f172a"],
[data-theme="dark"] .content-wrapper [style*="color:#0f172a"],
[data-theme="dark"] .content-wrapper [style*="color: #1e293b"],
[data-theme="dark"] .content-wrapper [style*="color:#1e293b"] {
    color: var(--text-primary) !important;
}



/* ==========================================
   UNIFIED EDTECH RESPONSIVE & SPACING SYSTEM
   ========================================== */
@media (max-width: 768px) {
    .hero-banner {
        flex-direction: column;
        text-align: center;
        padding: 22px 16px;
        border-radius: 18px;
        margin-bottom: 20px;
    }
    .hero-visual {
        margin-top: 16px;
        width: 100%;
        max-width: 200px;
    }
    .hero-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .hero-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    .content-wrapper {
        padding: 16px 14px !important;
    }
    .card {
        border-radius: 16px !important;
        margin-bottom: 18px !important;
    }
    .card-header,
    .card-body {
        padding: 16px 16px !important;
    }
    .card-header.flex-between {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .card-header.flex-between > div:last-child,
    .card-header.flex-between .flex-gap {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .card-header.flex-between .flex-gap .btn {
        flex: 1 1 auto !important;
        text-align: center !important;
        justify-content: center !important;
        padding: 8px 12px !important;
    }
    .stats-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
    .stat-box {
        padding: 16px 14px !important;
        border-radius: 16px !important;
    }
    .stat-box-value {
        font-size: 1.55rem !important;
    }
}

@media (max-width: 380px) {
    .stats-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .topbar {
        padding: 0 10px;
    }
}
