/* GradeGenius Complete Dark Mode Patch v4 */

/* SECTION 0: OVERRIDE PAGE-LEVEL :root VARIABLES
   Pages define --bg-body, --glass-bg, --text-main etc in their own
   :root block. We re-declare them on html[data-theme="dark"] to win. */
html[data-theme="dark"] {
    --bg-body:            #090d16 !important;
    --glass-bg:           rgba(15,23,42,0.82) !important;
    --glass-border:       rgba(255,255,255,0.08) !important;
    --glass-shadow:       0 8px 32px rgba(0,0,0,0.45) !important;
    --text-main:          #f1f5f9 !important;
    --text-sub:           #94a3b8 !important;
    --light-bg:           #090d16 !important;
    --text-dark:          #f1f5f9 !important;
    --text-light:         #94a3b8 !important;
    --card-glass-bg:      rgba(15,23,42,0.88) !important;
    --card-glass-border:  rgba(255,255,255,0.06) !important;
    --card-glass-shadow:  rgba(0,0,0,0.4) !important;
    --headline-color:     #f1f5f9 !important;
    --subtext-color:      #94a3b8 !important;
    --analytics-inner-bg:     rgba(25,135,84,0.10) !important;
    --analytics-inner-border: rgba(25,135,84,0.22) !important;
    --bg:                 #090d16 !important;
    --text:               #f1f5f9 !important;
    --card-bg:            #0f172a !important;
    --border-color:       rgba(255,255,255,0.08) !important;
    --bg-container:       #090d16 !important;
    --surface:            #0f172a !important;
    --surface2:           #1e293b !important;
    --border:             rgba(255,255,255,0.08) !important;
    --text2:              #94a3b8 !important;
    --text3:              #64748b !important;
    --var-bg:             #f8f9fa;
}

/* SECTION 1: BODY */
html[data-theme="dark"] body {
    background-color: #090d16 !important;
    background-image: none !important;
    color: #f1f5f9 !important;
}
html[data-theme="dark"] .dashboard-container,
html[data-theme="dark"] .analytics-container,
html[data-theme="dark"] .hub-container,
html[data-theme="dark"] .exam-layout,
html[data-theme="dark"] .result-container,
html[data-theme="dark"] .page-wrap,
html[data-theme="dark"] .profile-container,
html[data-theme="dark"] .wrap,
html[data-theme="dark"] .container,
html[data-theme="dark"] .container-custom,
html[data-theme="dark"] .wizard-container,
html[data-theme="dark"] .policy-container,
html[data-theme="dark"] .terms-container { background: transparent !important; }

/* SECTION 2: GLASS PANELS */
html[data-theme="dark"] .glass-panel {
    background: rgba(15,23,42,0.82) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45) !important;
}
html[data-theme="dark"] .student-banner.glass-panel { background: rgba(15,23,42,0.92) !important; }
html[data-theme="dark"] .banner-content h1 {
    background: linear-gradient(135deg,#ff6b8b,#64cedc) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
html[data-theme="dark"] .banner-content p { color: #94a3b8 !important; }

/* SECTION 3: ALL CARDS */
html[data-theme="dark"] .card,
html[data-theme="dark"] .dash-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .stat-box,
html[data-theme="dark"] .subject-card,
html[data-theme="dark"] .subject-card.glass-panel,
html[data-theme="dark"] .price-card,
html[data-theme="dark"] .value-card,
html[data-theme="dark"] .logic-card,
html[data-theme="dark"] .q-card,
html[data-theme="dark"] .q-card-editor,
html[data-theme="dark"] .quiz-card,
html[data-theme="dark"] .paper-card,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .horizontal-notify-card,
html[data-theme="dark"] .question-block-card,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .modern-modal,
html[data-theme="dark"] .side-panel,
html[data-theme="dark"] .panel-header,
html[data-theme="dark"] .highlight-box,
html[data-theme="dark"] .data-table-wrapper,
html[data-theme="dark"] .history-section,
html[data-theme="dark"] .audience-section,
html[data-theme="dark"] .profile-header,
html[data-theme="dark"] .wizard-card,
html[data-theme="dark"] .setup-card,
html[data-theme="dark"] .assign-item,
html[data-theme="dark"] .msg-item,
html[data-theme="dark"] .teacher-row,
html[data-theme="dark"] .sub-topic-card,
html[data-theme="dark"] .parent-card,
html[data-theme="dark"] .detail-box,
html[data-theme="dark"] .feedback-box,
html[data-theme="dark"] .q-row,
html[data-theme="dark"] .hw-dropdown,
html[data-theme="dark"] .hw-item,
html[data-theme="dark"] .cta-banner,
html[data-theme="dark"] .student-card,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .roadmap-node {
    background-color: #0f172a !important;
    border-color: rgba(255,255,255,0.07) !important;
    color: #f1f5f9 !important;
}
html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .stat-card:hover,
html[data-theme="dark"] .subject-card:hover,
html[data-theme="dark"] .quiz-card:hover,
html[data-theme="dark"] .paper-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.5) !important; }

/* SECTION 4: SECTION BACKGROUNDS */
html[data-theme="dark"] .dashboard-preview-section,
html[data-theme="dark"] .features-section,
html[data-theme="dark"] .subjects-section,
html[data-theme="dark"] .stats-bar,
html[data-theme="dark"] .audience-section { background-color: #0f172a !important; }
html[data-theme="dark"] .rollout-section,
html[data-theme="dark"] .pricing-section  { background-color: #090d16 !important; }
html[data-theme="dark"] .info-box         { background: rgba(16,185,129,0.08) !important; border-color: rgba(16,185,129,0.25) !important; color: #6ee7b7 !important; }
html[data-theme="dark"] .info-box.alert   { background: rgba(239,68,68,0.08) !important; border-color: rgba(239,68,68,0.25) !important; color: #fca5a5 !important; }
html[data-theme="dark"] .warning-box      { background: rgba(249,115,22,0.08) !important; border-color: rgba(249,115,22,0.25) !important; color: #fdba74 !important; }

/* SECTION 5: TYPOGRAPHY */
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,
html[data-theme="dark"] h4,html[data-theme="dark"] h5,html[data-theme="dark"] h6 { color: #f1f5f9 !important; }
html[data-theme="dark"] p  { color: #94a3b8 !important; }
html[data-theme="dark"] li { color: #94a3b8 !important; }
html[data-theme="dark"] .card-title,html[data-theme="dark"] .user-name,
html[data-theme="dark"] .school-name-text,html[data-theme="dark"] .teacher-name,
html[data-theme="dark"] .assign-name,html[data-theme="dark"] .notify-card-title,
html[data-theme="dark"] .stat-num,html[data-theme="dark"] .stat-val,
html[data-theme="dark"] .stat-value,html[data-theme="dark"] .stat-number,
html[data-theme="dark"] .footer-stat-val,html[data-theme="dark"] .detail-stat-num,
html[data-theme="dark"] .hub-title,html[data-theme="dark"] .subj-link,
html[data-theme="dark"] .student-name,html[data-theme="dark"] .h-name,
html[data-theme="dark"] .banner-text h1,html[data-theme="dark"] .section-title { color: #f1f5f9 !important; }
html[data-theme="dark"] .stat-label,html[data-theme="dark"] .card-status,
html[data-theme="dark"] .assign-meta,html[data-theme="dark"] .teacher-subj,
html[data-theme="dark"] .notify-card-msg,html[data-theme="dark"] .notify-card-time,
html[data-theme="dark"] .content-text,html[data-theme="dark"] .user-email,
html[data-theme="dark"] .q-comment,html[data-theme="dark"] .q-max,
html[data-theme="dark"] .msg-text,html[data-theme="dark"] .parent-email,
html[data-theme="dark"] .section-label,html[data-theme="dark"] .detail-stat-lbl,
html[data-theme="dark"] .footer-stat-lbl,html[data-theme="dark"] .barcode-code,
html[data-theme="dark"] .barcode-number,html[data-theme="dark"] .logic-desc,
html[data-theme="dark"] .detail-box-title,html[data-theme="dark"] .progress-label span { color: #64748b !important; }
html[data-theme="dark"] a:not([class]) { color: #818cf8 !important; }
html[data-theme="dark"] a:not([class]):hover { color: #a5b4fc !important; }

/* SECTION 6: FORMS */
html[data-theme="dark"] input[type="text"],html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] textarea,html[data-theme="dark"] select,
html[data-theme="dark"] .form-control,html[data-theme="dark"] .modern-input,
html[data-theme="dark"] .inline-editor,html[data-theme="dark"] .hw-input,
html[data-theme="dark"] .grid-cell,html[data-theme="dark"] .chat-input-row textarea,
html[data-theme="dark"] .input-answer-field,html[data-theme="dark"] .input-clean,
html[data-theme="dark"] .q-target-text,html[data-theme="dark"] .mc-opt-a,
html[data-theme="dark"] .mc-opt-b,html[data-theme="dark"] .mc-opt-c,
html[data-theme="dark"] .mc-opt-d,html[data-theme="dark"] .ds-correct-word,
html[data-theme="dark"] .cm-correct-key,html[data-theme="dark"] input.bg-gray-100 {
    background-color: #1e293b !important;
    border-color: rgba(255,255,255,0.10) !important;
    color: #f1f5f9 !important;
}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder { color: #475569 !important; opacity: 1 !important; }
html[data-theme="dark"] input:focus,html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus,html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .modern-input:focus { border-color: #6d58f0 !important; box-shadow: 0 0 0 3px rgba(109,88,240,0.20) !important; outline: none !important; }
html[data-theme="dark"] label,html[data-theme="dark"] .form-group label { color: #94a3b8 !important; }
html[data-theme="dark"] select option { background-color: #1e293b !important; color: #f1f5f9 !important; }

/* SECTION 7: BUTTONS */
html[data-theme="dark"] .btn-notes,html[data-theme="dark"] .add-btn,
html[data-theme="dark"] .btn-tool,html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .expand-btn,html[data-theme="dark"] .back-btn,
html[data-theme="dark"] .hero-back,html[data-theme="dark"] button.back-btn {
    background-color: #1e293b !important; border-color: rgba(255,255,255,0.12) !important; color: #f1f5f9 !important;
}
html[data-theme="dark"] .btn-notes:hover,html[data-theme="dark"] .add-btn:hover { background-color: #334155 !important; }
html[data-theme="dark"] .btn-disabled,html[data-theme="dark"] button:disabled { background-color: #1e293b !important; color: #475569 !important; border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .school-option-card { background: #1e293b !important; border-color: rgba(255,255,255,0.10) !important; }
html[data-theme="dark"] .school-option-card.active { border-color: #ff6b8b !important; background: rgba(255,107,139,0.10) !important; }
html[data-theme="dark"] .role-card { border-color: rgba(255,255,255,0.10) !important; background: #1e293b !important; color: #94a3b8 !important; }
html[data-theme="dark"] .role-card.selected { border-color: #ff6b8b !important; background: rgba(255,107,139,0.10) !important; color: #ff6b8b !important; }

/* SECTION 8: TABS */
html[data-theme="dark"] .hub-tabs-row { border-color: rgba(255,255,255,0.07) !important; }
html[data-theme="dark"] .filter-tab { color: #64748b !important; background: transparent !important; }
html[data-theme="dark"] .filter-tab:hover { background: #1e293b !important; color: #6d58f0 !important; }
html[data-theme="dark"] .filter-tab.active { background: #6d58f0 !important; color: #fff !important; }
html[data-theme="dark"] .tabs { background: #0f172a !important; border: 1px solid rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .tab-btn { color: #64748b !important; background: transparent !important; }
html[data-theme="dark"] .tab-btn:hover { background: #1e293b !important; color: #ec4899 !important; }
html[data-theme="dark"] .tab-btn.active { background: linear-gradient(135deg,#ec4899,#f472b6) !important; color: #fff !important; }
html[data-theme="dark"] .stat-pill { background: #0f172a !important; border-color: rgba(255,255,255,0.05) !important; }
html[data-theme="dark"] .stat-pill.active { border-color: #ec4899 !important; }
html[data-theme="dark"] .stat-pill .num { color: #ec4899 !important; }
html[data-theme="dark"] .stat-pill .lbl { color: #64748b !important; }
html[data-theme="dark"] .stat-pill .sub-num { color: #475569 !important; }

/* SECTION 9: TABLES */
html[data-theme="dark"] table { color: #f1f5f9 !important; }
html[data-theme="dark"] th { background-color: #1e293b !important; color: #64748b !important; border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] td { border-color: rgba(255,255,255,0.05) !important; color: #f1f5f9 !important; }
html[data-theme="dark"] tr:hover td { background-color: rgba(255,255,255,0.03) !important; }
html[data-theme="dark"] .content-table table,html[data-theme="dark"] .responsive-table-render table,
html[data-theme="dark"] .interactive-matrix-table { background: #0f172a !important; }
html[data-theme="dark"] .content-table th,html[data-theme="dark"] .responsive-table-render th { background: #1e293b !important; color: #6d58f0 !important; border-color: rgba(255,255,255,0.07) !important; }
html[data-theme="dark"] .content-table td,html[data-theme="dark"] .responsive-table-render td { border-color: rgba(255,255,255,0.06) !important; color: #f1f5f9 !important; }

/* SECTION 10: MODALS */
html[data-theme="dark"] .modal-overlay,html[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,0.82) !important; }
html[data-theme="dark"] .modal,html[data-theme="dark"] .modal-box,html[data-theme="dark"] .modern-modal { background: #0f172a !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .modal-body,html[data-theme="dark"] .modal-footer { background: #0f172a !important; border-color: rgba(255,255,255,0.06) !important; }

/* SECTION 11: TAILWIND (admin_dashboard.php) */
html[data-theme="dark"] .bg-white { background-color: #0f172a !important; }
html[data-theme="dark"] .bg-gray-50 { background-color: #090d16 !important; }
html[data-theme="dark"] .bg-gray-100 { background-color: #1e293b !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .text-gray-900 { color: #f1f5f9 !important; }
html[data-theme="dark"] .text-gray-700 { color: #cbd5e1 !important; }
html[data-theme="dark"] .text-gray-600,html[data-theme="dark"] .text-gray-500 { color: #94a3b8 !important; }
html[data-theme="dark"] .border-gray-200,html[data-theme="dark"] .border-gray-100 { border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .divide-y > * + * { border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .table-row:hover { background-color: rgba(255,255,255,0.03) !important; }

/* SECTION 12: INDEX PAGE */
html[data-theme="dark"] .feature-card { background: #0f172a !important; border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .feature-card:hover { border-color: #ff8fab !important; }
html[data-theme="dark"] .feature-card h3 { color: #f1f5f9 !important; }
html[data-theme="dark"] .feature-card p  { color: #94a3b8 !important; }
html[data-theme="dark"] .stats-bar { background: #0f172a !important; box-shadow: 0 20px 60px rgba(0,0,0,0.4) !important; }
html[data-theme="dark"] .stat-num  { color: #ff8fab !important; }
html[data-theme="dark"] .stat-label { color: #64748b !important; }
html[data-theme="dark"] .laptop-frame  { background: #1e293b !important; }
html[data-theme="dark"] .laptop-screen { background: #0f172a !important; }
html[data-theme="dark"] .logic-card { background: #1e293b !important; border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .logic-card:hover { background: #0f172a !important; }

/* SECTION 13: ABOUT / POLICY / TERMS */
html[data-theme="dark"] .grid-2 .text-block h2 { color: #818cf8 !important; }
html[data-theme="dark"] .grid-2 .text-block p  { color: #94a3b8 !important; }
html[data-theme="dark"] .grid-2 ul li          { color: #94a3b8 !important; }
html[data-theme="dark"] .value-icon            { background: rgba(109,88,240,0.12) !important; }
html[data-theme="dark"] .policy-section,html[data-theme="dark"] .terms-section { border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .policy-section p,html[data-theme="dark"] .policy-section li,
html[data-theme="dark"] .terms-section p,html[data-theme="dark"] .terms-section li { color: #94a3b8 !important; }
html[data-theme="dark"] .policy-meta,html[data-theme="dark"] .terms-meta { background: rgba(255,255,255,0.10) !important; }

/* SECTION 14: SUBJECT VIEW */
html[data-theme="dark"] .universe { background-color: #090d16 !important; background-image: radial-gradient(#1e293b 1.5px, transparent 1.5px) !important; }
html[data-theme="dark"] .roadmap-node { background: #0f172a !important; border-color: rgba(255,255,255,0.08) !important; }
html[data-theme="dark"] .roadmap-node h3 { color: #f1f5f9 !important; }
html[data-theme="dark"] .roadmap-node div { color: #64748b !important; }
html[data-theme="dark"] .node-sub { background: #1e293b !important; border-color: rgba(255,255,255,0.08) !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .edit-badge { background: #1e293b !important; border-color: rgba(255,255,255,0.10) !important; }
html[data-theme="dark"] .edit-badge svg { fill: #f1f5f9 !important; }
html[data-theme="dark"] .side-panel { background: #0f172a !important; }
html[data-theme="dark"] .add-bar { border-color: rgba(255,255,255,0.08) !important; }
html[data-theme="dark"] .add-btn { background: #1e293b !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .add-btn:hover { background: #f1f5f9 !important; color: #1e293b !important; }
html[data-theme="dark"] .editor-toolbar { background: rgba(15,23,42,0.95) !important; }
html[data-theme="dark"] .hw-dropdown { background: #0f172a !important; border-color: rgba(255,255,255,0.08) !important; }
html[data-theme="dark"] .hw-dropdown h3 { color: #f1f5f9 !important; border-color: rgba(255,255,255,0.08) !important; }
html[data-theme="dark"] .hw-input { background: #1e293b !important; border-color: rgba(255,255,255,0.10) !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .hw-item:hover { background: #1e293b !important; }
html[data-theme="dark"] .hw-item span { color: #f1f5f9 !important; }
html[data-theme="dark"] .hw-item.completed span { color: #475569 !important; }
html[data-theme="dark"] .table-generator-grid { background: rgba(255,255,255,0.02) !important; border-color: rgba(255,255,255,0.08) !important; }

/* SECTION 15: EXAM BUILDER */
html[data-theme="dark"] .sticky-meta-header { background: rgba(15,23,42,0.95) !important; border-color: rgba(255,255,255,0.08) !important; }
html[data-theme="dark"] .q-card-editor { background: #0f172a !important; border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .remove-pill-trigger { background: rgba(214,48,49,0.10) !important; border-color: rgba(214,48,49,0.30) !important; color: #fca5a5 !important; }
html[data-theme="dark"] .remove-pill-trigger:hover { background: #d63031 !important; color: #fff !important; }
html[data-theme="dark"] .automark-row { color: #f1f5f9 !important; }
html[data-theme="dark"] .image-dropzone-box { background: rgba(255,255,255,0.02) !important; border-color: rgba(255,255,255,0.10) !important; color: #94a3b8 !important; }

/* SECTION 16: QUIZ */
html[data-theme="dark"] .q-card { background: #0f172a !important; }
html[data-theme="dark"] .q-card.mc { border-left-color: #0984e3 !important; }
html[data-theme="dark"] .q-card.tf { border-left-color: #00f260 !important; }
html[data-theme="dark"] .q-card.fw { border-left-color: #f093fb !important; }
html[data-theme="dark"] .radio-tile { background: rgba(255,255,255,0.02) !important; border-color: rgba(255,255,255,0.08) !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .radio-tile:hover { background: rgba(255,255,255,0.05) !important; }
html[data-theme="dark"] .radio-tile.selected { border-color: #0984e3 !important; background: rgba(9,132,227,0.10) !important; color: #93c5fd !important; }
html[data-theme="dark"] .opt-label { border-color: rgba(255,255,255,0.08) !important; background: #1e293b !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .timer-fixed-card { background: #0f172a !important; border-color: #198754 !important; color: #34d399 !important; }
html[data-theme="dark"] #timer,html[data-theme="dark"] #clockDigits { color: #34d399 !important; }

/* SECTION 17: PARENT DASHBOARD */
html[data-theme="dark"] .card-face.card-front { background: #0f172a !important; }
html[data-theme="dark"] .h-card-body { background: linear-gradient(135deg,#0f172a 50%,#1e293b 100%) !important; }
html[data-theme="dark"] .h-name { color: #f1f5f9 !important; }
html[data-theme="dark"] .h-meta-box span { color: #94a3b8 !important; }
html[data-theme="dark"] .h-meta-box label { color: #475569 !important; }
html[data-theme="dark"] .chat-header { border-color: rgba(255,255,255,0.08) !important; }
html[data-theme="dark"] .bubble.teacher { background: #1e293b !important; border-color: rgba(255,255,255,0.06) !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .chat-input-row { border-color: rgba(255,255,255,0.08) !important; }
html[data-theme="dark"] .teacher-row:hover { background: #1e293b !important; }
html[data-theme="dark"] .assign-item { background: #1e293b !important; border-color: rgba(255,255,255,0.07) !important; }
html[data-theme="dark"] .assign-name { color: #f1f5f9 !important; }
html[data-theme="dark"] .msg-item { background: #1e293b !important; border-color: rgba(255,255,255,0.07) !important; border-left-color: #0d9488 !important; }
html[data-theme="dark"] .msg-from { color: #0d9488 !important; }
html[data-theme="dark"] .type-tag { background: #1e293b !important; color: #94a3b8 !important; }
html[data-theme="dark"] .bar-wrap { background: #1e293b !important; }
html[data-theme="dark"] .footer-stat { border-color: rgba(255,255,255,0.08) !important; }

/* SECTION 18: OTP PAGE */
html[data-theme="dark"] .box { background: #0f172a !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .otp-digit { background: #1e293b !important; border-color: rgba(255,255,255,0.10) !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .otp-digit:focus { border-color: #ff8fab !important; background: rgba(255,107,139,0.10) !important; }
html[data-theme="dark"] .otp-digit.filled { border-color: #64cedc !important; }
html[data-theme="dark"] .otp-digit:disabled { background: #0f172a !important; color: #475569 !important; }
html[data-theme="dark"] .email-pill { background: rgba(255,107,139,0.10) !important; }

/* SECTION 19: BARCODES */
html[data-theme="dark"] .school-row { border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .card-type-label { color: #ec4899 !important; }
html[data-theme="dark"] .student-meta { color: #64748b !important; }
html[data-theme="dark"] .no-barcode { background: rgba(245,158,11,0.10) !important; color: #fcd34d !important; }
html[data-theme="dark"] .badge-issued { background: rgba(16,185,129,0.15) !important; color: #6ee7b7 !important; }
html[data-theme="dark"] .badge-pending { background: rgba(245,158,11,0.15) !important; color: #fcd34d !important; }

/* SECTION 20: SCHOOL MEMBERS */
html[data-theme="dark"] .card-header { background: #0f172a !important; border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .notice { background: rgba(251,191,36,0.07) !important; border-color: rgba(251,191,36,0.20) !important; color: #fcd34d !important; }
html[data-theme="dark"] .tag-subject  { background: rgba(139,92,246,0.15) !important; color: #a78bfa !important; }
html[data-theme="dark"] .tag-grade    { background: rgba(59,130,246,0.15) !important;  color: #93c5fd !important; }
html[data-theme="dark"] .tag-active   { background: rgba(16,185,129,0.15) !important;  color: #6ee7b7 !important; }
html[data-theme="dark"] .tag-inactive { background: rgba(239,68,68,0.15) !important;   color: #fca5a5 !important; }
html[data-theme="dark"] .btn-dereg { background: transparent !important; border-color: rgba(245,158,11,0.35) !important; color: #fcd34d !important; }
html[data-theme="dark"] .btn-react { background: transparent !important; border-color: rgba(16,185,129,0.35) !important; color: #34d399 !important; }
html[data-theme="dark"] .btn-hdel  { background: transparent !important; border-color: rgba(239,68,68,0.35) !important;  color: #fca5a5 !important; }
html[data-theme="dark"] .btn-card  { background: transparent !important; border-color: rgba(99,102,241,0.35) !important; color: #a5b4fc !important; }
html[data-theme="dark"] .btn-dereg:hover { background: rgba(245,158,11,0.10) !important; }
html[data-theme="dark"] .btn-react:hover { background: rgba(16,185,129,0.10) !important; }
html[data-theme="dark"] .btn-hdel:hover  { background: rgba(239,68,68,0.10)  !important; }
html[data-theme="dark"] .btn-card:hover  { background: rgba(99,102,241,0.10) !important; }
html[data-theme="dark"] .teacher-detail-row td { background: rgba(255,255,255,0.01) !important; }
html[data-theme="dark"] .detail-inner .detail-box { background: #0f172a !important; border-color: rgba(255,255,255,0.06) !important; }

/* SECTION 21: ALERTS & BADGES */
html[data-theme="dark"] .alert-success { background: rgba(16,185,129,0.10) !important; color: #6ee7b7 !important; border-color: rgba(16,185,129,0.20) !important; }
html[data-theme="dark"] .alert-error,html[data-theme="dark"] .alert-danger { background: rgba(239,68,68,0.10) !important; color: #fca5a5 !important; border-color: rgba(239,68,68,0.20) !important; }
html[data-theme="dark"] .badge-success { background: rgba(16,185,129,0.15) !important; color: #34d399 !important; }
html[data-theme="dark"] .badge-warning { background: rgba(245,158,11,0.15) !important;  color: #fcd34d !important; }
html[data-theme="dark"] .badge-danger  { background: rgba(239,68,68,0.15) !important;   color: #fca5a5 !important; }
html[data-theme="dark"] .score-badge.score-high { background: rgba(16,185,129,0.15) !important; color: #34d399 !important; }
html[data-theme="dark"] .score-badge.score-med  { background: rgba(245,158,11,0.15) !important;  color: #fcd34d !important; }
html[data-theme="dark"] .score-badge.score-low  { background: rgba(239,68,68,0.15) !important;   color: #fca5a5 !important; }
html[data-theme="dark"] .pill-homework { background: rgba(245,158,11,0.14) !important;  color: #fcd34d !important; }
html[data-theme="dark"] .pill-exam     { background: rgba(16,172,132,0.14) !important;   color: #34d399 !important; }
html[data-theme="dark"] .pill-quiz     { background: rgba(6,182,212,0.14) !important;    color: #67e8f9 !important; }
html[data-theme="dark"] .pill-general  { background: rgba(100,116,139,0.14) !important;  color: #94a3b8 !important; }

/* SECTION 22: NOTIFICATIONS */
html[data-theme="dark"] .notify-homework .icon-wrapper-frame { background: rgba(245,158,11,0.12) !important; }
html[data-theme="dark"] .notify-exam     .icon-wrapper-frame { background: rgba(16,172,132,0.12) !important; }
html[data-theme="dark"] .notify-quiz     .icon-wrapper-frame { background: rgba(6,182,212,0.12)  !important; }
html[data-theme="dark"] .notify-general  .icon-wrapper-frame { background: rgba(100,116,139,0.12) !important; }
html[data-theme="dark"] .hub-action-btn { background: transparent !important; border-color: rgba(255,255,255,0.10) !important; color: #f1f5f9 !important; }
html[data-theme="dark"] .hub-action-btn:hover { background: #6d58f0 !important; border-color: #6d58f0 !important; color: #fff !important; }

/* SECTION 23: MISC */
html[data-theme="dark"] hr { border-color: rgba(255,255,255,0.06) !important; }
html[data-theme="dark"] .empty-state-notice,html[data-theme="dark"] .empty,
html[data-theme="dark"] .empty-state { background: #0f172a !important; border-color: rgba(255,255,255,0.06) !important; color: #64748b !important; }
html[data-theme="dark"] .back-link { color: #94a3b8 !important; }
html[data-theme="dark"] .back-link:hover { color: #6d58f0 !important; }
html[data-theme="dark"] .progress-track,html[data-theme="dark"] .bar-wrap,
html[data-theme="dark"] .progress-bar-bg,html[data-theme="dark"] .q-bar-wrap { background: #1e293b !important; }
html[data-theme="dark"] .stats-row .stat-card,html[data-theme="dark"] .stats-row .stat-box { background: #0f172a !important; }
html[data-theme="dark"] .progress-bar-bg { background: #1e293b !important; }
html[data-theme="dark"] .dash-card { background: rgba(15,23,42,0.88) !important; border-color: rgba(255,255,255,0.06) !important; }

/* SCROLLBAR */
html[data-theme="dark"] ::-webkit-scrollbar { width:6px; height:6px; }
html[data-theme="dark"] ::-webkit-scrollbar-track  { background:#090d16; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb  { background:#1e293b; border-radius:3px; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background:#334155; }

/* SMOOTH TRANSITIONS */
html[data-theme="dark"] *,html[data-theme="light"] * {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.20s ease, box-shadow 0.25s ease !important;
}