/* =========================================================
   LOGICAL ACCOUNTING — TRUE BLACK DARK MODE v3
   Covers: Home, About, Resources, Past Papers, Contact,
   Classes, Quiz, Dashboard, History, Profile, Admin
========================================================= */

[data-theme="dark"] {
    color-scheme: dark;
}

/* ========== GLOBAL BASE ========== */
[data-theme="dark"] html,
[data-theme="dark"] body {
    background: #000000 !important;
    color: #e5e5e5 !important;
}

[data-theme="dark"] main,
[data-theme="dark"] .history-page,
[data-theme="dark"] .dashboard-page,
[data-theme="dark"] .quiz-page,
[data-theme="dark"] .profile-page,
[data-theme="dark"] .login-page,
[data-theme="dark"] .admin-dashboard,
[data-theme="dark"] .about-modern,
[data-theme="dark"] .about-modern-hero,
[data-theme="dark"] .resources-modern,
[data-theme="dark"] .resources-modern-hero,
[data-theme="dark"] .contact-modern,
[data-theme="dark"] .contact-modern-hero,
[data-theme="dark"] .pp-page,
[data-theme="dark"] .pp-hero,
[data-theme="dark"] .classes-page {
    background: #000000 !important;
    color: #e5e5e5 !important;
}

/* Kill light hero gradients */
[data-theme="dark"] .resources-modern-hero,
[data-theme="dark"] .contact-modern-hero,
[data-theme="dark"] .about-modern-hero,
[data-theme="dark"] .pp-hero,
[data-theme="dark"] .la-hero {
    background: #000000 !important;
}

[data-theme="dark"] .resources-glow,
[data-theme="dark"] .contact-glow,
[data-theme="dark"] .about-hero-glow,
[data-theme="dark"] .la-hero-bg,
[data-theme="dark"] .la-hero-overlay,
[data-theme="dark"] .pp-hero::before,
[data-theme="dark"] .pp-hero::after,
[data-theme="dark"] .resources-modern-hero::before,
[data-theme="dark"] .resources-modern-hero::after {
    opacity: 0.08 !important;
    background: transparent !important;
}

/* ========== HEADER ========== */
[data-theme="dark"] .main-header,
[data-theme="dark"] header.main-header {
    background: #0a0a0a !important;
    border-bottom: 1px solid #1f1f1f !important;
    color: #e5e5e5 !important;
}

[data-theme="dark"] .main-header a,
[data-theme="dark"] .nav-links a,
[data-theme="dark"] .brand,
[data-theme="dark"] .brand b,
[data-theme="dark"] .brand small {
    color: #e5e5e5 !important;
}

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-user {
    color: #2dd4bf !important;
}

[data-theme="dark"] .menu-toggle {
    color: #e5e5e5 !important;
    background: #141414 !important;
    border-color: #333 !important;
}

[data-theme="dark"] .nav-links,
[data-theme="dark"] .nav-links.open {
    background: #0a0a0a !important;
}

[data-theme="dark"] .brand-logo {
    background: #fff !important;
}

/* ========== FOOTER ========== */
[data-theme="dark"] footer {
    background: #050505 !important;
    color: #a3a3a3 !important;
    border-top: 1px solid #1a1a1a !important;
}

[data-theme="dark"] footer a,
[data-theme="dark"] .footer-brand,
[data-theme="dark"] footer h4,
[data-theme="dark"] .copyright {
    color: #d4d4d4 !important;
}

[data-theme="dark"] footer p {
    color: #737373 !important;
}

/* ========== UNIVERSAL CARD RULE ========== */
[data-theme="dark"] .card-surface,
[data-theme="dark"] .history-surface,
[data-theme="dark"] .history-stat,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .analytics-card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .admin-panel,
[data-theme="dark"] .admin-stat,
[data-theme="dark"] .admin-action-card,
[data-theme="dark"] .admin-welcome,
[data-theme="dark"] .login-box,
[data-theme="dark"] .login-panel,
[data-theme="dark"] .login-quote-box,
[data-theme="dark"] .resource-card,
[data-theme="dark"] .resource-modern-card,
[data-theme="dark"] .class-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .la-feature-card,
[data-theme="dark"] .la-hero-card,
[data-theme="dark"] .la-process-card,
[data-theme="dark"] .about-profile-card,
[data-theme="dark"] .about-philosophy-card,
[data-theme="dark"] .about-final-card,
[data-theme="dark"] .achievement-card,
[data-theme="dark"] .principle,
[data-theme="dark"] .contact-location-card,
[data-theme="dark"] .contact-feature-card,
[data-theme="dark"] .contact-method-card,
[data-theme="dark"] .contact-hero-card,
[data-theme="dark"] .resources-hero-card,
[data-theme="dark"] .resources-count-card,
[data-theme="dark"] .resources-info-card,
[data-theme="dark"] .resources-filter-bar,
[data-theme="dark"] .resources-empty,
[data-theme="dark"] .pp-year-card,
[data-theme="dark"] .pp-empty,
[data-theme="dark"] .pp-mini-stat,
[data-theme="dark"] .missed-item,
[data-theme="dark"] .missed-row,
[data-theme="dark"] .dash-welcome,
[data-theme="dark"] .motivation-card,
[data-theme="dark"] .past-paper-section,
[data-theme="dark"] .trend-insight,
[data-theme="dark"] .summary-card,
[data-theme="dark"] .classes-cta,
[data-theme="dark"] .la-final-cta-inner,
[data-theme="dark"] .quiz-empty,
[data-theme="dark"] .quiz-top,
[data-theme="dark"] .question-card,
[data-theme="dark"] .timer-box,
[data-theme="dark"] .la-achievement {
    background: #111111 !important;
    border-color: #2a2a2a !important;
    color: #e5e5e5 !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45) !important;
}

/* ========== TEXT HIERARCHY ========== */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] strong {
    color: #f5f5f5 !important;
}

[data-theme="dark"] p,
[data-theme="dark"] small,
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .surface-subtitle {
    color: #a3a3a3 !important;
}

/* Force readable text on light-looking heroes */
[data-theme="dark"] .resources-hero-copy h1,
[data-theme="dark"] .resources-hero-copy h1 span,
[data-theme="dark"] .contact-hero-copy h1,
[data-theme="dark"] .contact-hero-copy h1 span,
[data-theme="dark"] .about-modern-hero h1,
[data-theme="dark"] .pp-hero h1,
[data-theme="dark"] .la-hero h1 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .resources-hero-copy p,
[data-theme="dark"] .contact-hero-copy p,
[data-theme="dark"] .about-modern-hero p,
[data-theme="dark"] .pp-hero p,
[data-theme="dark"] .la-hero p {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .resources-hero-copy .eyebrow,
[data-theme="dark"] .contact-hero-copy .eyebrow,
[data-theme="dark"] .about-section-label,
[data-theme="dark"] .resources-section-label,
[data-theme="dark"] .contact-section-label,
[data-theme="dark"] .pp-badge {
    color: #2dd4bf !important;
    background: #1a2e2a !important;
    border-color: #1a3a30 !important;
}

/* ========== RESOURCES PAGE ========== */
[data-theme="dark"] .resource-modern-card {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .resource-modern-card h3,
[data-theme="dark"] .resource-card-body h3 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .resource-modern-card p,
[data-theme="dark"] .resource-card-body p,
[data-theme="dark"] .resource-number,
[data-theme="dark"] .resource-date,
[data-theme="dark"] .resource-no-description {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .resource-type {
    background: #1a2e2a !important;
    color: #2dd4bf !important;
    border: none !important;
}

[data-theme="dark"] .resource-file-icon {
    background: #1a2e2a !important;
    color: #2dd4bf !important;
}

[data-theme="dark"] .resource-download {
    background: #2dd4bf !important;
    color: #000000 !important;
}

[data-theme="dark"] .resources-filter-bar {
    background: #141414 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .resources-filter-title,
[data-theme="dark"] .resources-filter-title strong {
    color: #e5e5e5 !important;
}

[data-theme="dark"] .resource-tabs a,
[data-theme="dark"] .resource-tabs button {
    color: #a3a3a3 !important;
    background: transparent !important;
}

[data-theme="dark"] .resource-tabs a.active,
[data-theme="dark"] .resource-tabs .active {
    background: #2dd4bf !important;
    color: #000000 !important;
}

[data-theme="dark"] .resources-hero-card,
[data-theme="dark"] .resources-count-card {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
    color: #e5e5e5 !important;
}

[data-theme="dark"] .resources-hero-card strong,
[data-theme="dark"] .resources-count-card strong,
[data-theme="dark"] .resources-card-bottom,
[data-theme="dark"] .resources-card-top {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .resources-empty {
    background: #111111 !important;
    border-color: #2a2a2a !important;
}

[data-theme="dark"] .resources-empty h2,
[data-theme="dark"] .resources-empty .eyebrow {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .resources-empty p {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .resources-library-head h2 {
    color: #f5f5f5 !important;
}

/* ========== PAST PAPERS PAGE ========== */
[data-theme="dark"] .pp-hero {
    background: #000000 !important;
}

[data-theme="dark"] .pp-hero h1 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .pp-hero p {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .pp-empty {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .pp-empty h2 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .pp-empty p {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .pp-empty-icon {
    background: #1a2e2a !important;
}

[data-theme="dark"] .pp-year-card {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .pp-year-card h2 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .pp-year-card .pp-description,
[data-theme="dark"] .pp-meta-item {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .pp-start-btn {
    background: #2dd4bf !important;
    color: #000000 !important;
}

[data-theme="dark"] .pp-section-heading h2 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .pp-section-heading p {
    color: #a3a3a3 !important;
}

/* ========== CONTACT PAGE ========== */
[data-theme="dark"] .contact-modern-hero {
    background: #000000 !important;
}

[data-theme="dark"] .contact-hero-copy h1 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .contact-hero-copy p {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .contact-hero-card {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
    color: #e5e5e5 !important;
}

[data-theme="dark"] .contact-method-card {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .contact-method-card h3,
[data-theme="dark"] .contact-method-body h3 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .contact-method-card p,
[data-theme="dark"] .contact-method-body p {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .contact-location-card {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .contact-intro h2 {
    color: #f5f5f5 !important;
}

/* ========== ABOUT PAGE ========== */
[data-theme="dark"] .about-modern-hero {
    background: #000000 !important;
}

[data-theme="dark"] .achievement-card {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .achievement-card strong {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .achievement-card small {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .achievement-icon {
    background: #1a2e2a !important;
    color: #2dd4bf !important;
}

[data-theme="dark"] .achievement-card.active {
    background: #0f1f1a !important;
    border-color: #2dd4bf !important;
}

[data-theme="dark"] .principle {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .principle h3 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .principle p {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .principle.featured {
    background: #0f1f1a !important;
    border-color: #1a3a30 !important;
}

[data-theme="dark"] .principle-top span {
    background: #1a2e2a !important;
    color: #2dd4bf !important;
}

[data-theme="dark"] .about-profile-card,
[data-theme="dark"] .about-philosophy-card,
[data-theme="dark"] .about-final-card {
    background: #111111 !important;
    border-color: #2a2a2a !important;
}

[data-theme="dark"] .about-profile-info h1,
[data-theme="dark"] .about-profile-info h2 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .about-profile-info p,
[data-theme="dark"] .about-philosophy-card p {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .about-cta-button {
    background: #2dd4bf !important;
    color: #000 !important;
}

/* ========== HOME — tutor points / achievements ========== */
[data-theme="dark"] .la-achievement {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .la-achievement strong {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .la-achievement span {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .la-tutor-points,
[data-theme="dark"] .la-tutor-content {
    color: #e5e5e5 !important;
}

[data-theme="dark"] .la-feature-card {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .la-feature-card h3 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .la-feature-card p {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .la-feature-link {
    color: #2dd4bf !important;
}

[data-theme="dark"] .la-feature-number {
    color: #525252 !important;
}

[data-theme="dark"] .la-features-section,
[data-theme="dark"] .la-process-section,
[data-theme="dark"] .la-tutor-section,
[data-theme="dark"] .la-final-cta {
    background: #000000 !important;
}

[data-theme="dark"] .la-section-heading h2,
[data-theme="dark"] .la-process-heading h2,
[data-theme="dark"] .la-final-cta h2 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .la-eyebrow,
[data-theme="dark"] .la-eyebrow.la-dark {
    color: #2dd4bf !important;
}

[data-theme="dark"] .la-final-cta-inner,
[data-theme="dark"] .classes-cta {
    background: #141414 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .la-final-cta-inner h2,
[data-theme="dark"] .la-final-cta-inner p,
[data-theme="dark"] .la-final-cta-inner .la-eyebrow,
[data-theme="dark"] .classes-cta h2,
[data-theme="dark"] .classes-cta p {
    color: #e5e5e5 !important;
    opacity: 1 !important;
}

/* ========== QUIZ ========== */
[data-theme="dark"] .quiz-empty {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .quiz-empty h2,
[data-theme="dark"] .quiz-empty .eyebrow,
[data-theme="dark"] .quiz-empty .eyebrow.dark {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .quiz-empty p {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .quiz-empty .empty-icon {
    background: #1a2e2a !important;
    color: #2dd4bf !important;
}

[data-theme="dark"] .quiz-empty .btn,
[data-theme="dark"] .quiz-empty .btn.primary {
    background: #2dd4bf !important;
    color: #000 !important;
}

[data-theme="dark"] .quiz-top {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .quiz-top h1,
[data-theme="dark"] .quiz-top strong {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .quiz-top p,
[data-theme="dark"] .quiz-top small {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .timer-box {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
}

[data-theme="dark"] .timer-box small {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .timer-box strong {
    color: #2dd4bf !important;
}

[data-theme="dark"] .question-card {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}

[data-theme="dark"] .question-card h2 {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .question-number {
    background: #1a2e2a !important;
    color: #2dd4bf !important;
}

[data-theme="dark"] .option-label {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #e5e5e5 !important;
}

[data-theme="dark"] .option-label:hover {
    background: #222 !important;
    border-color: #2dd4bf !important;
}

[data-theme="dark"] .option-label:has(input:checked) {
    background: #0f1f1a !important;
    border-color: #2dd4bf !important;
}

[data-theme="dark"] .option-letter {
    background: #2a2a2a !important;
    color: #e5e5e5 !important;
}

[data-theme="dark"] .option-label:has(input:checked) .option-letter {
    background: #2dd4bf !important;
    color: #000 !important;
}

[data-theme="dark"] .option-content,
[data-theme="dark"] .option-content span,
[data-theme="dark"] .option-content p {
    color: #e5e5e5 !important;
}

/* ========== DASHBOARD / HISTORY ========== */
[data-theme="dark"] .history-stat,
[data-theme="dark"] .stat-card {
    background: #141414 !important;
}

[data-theme="dark"] .history-stat strong,
[data-theme="dark"] .stat-card strong {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .history-stat span,
[data-theme="dark"] .history-stat small {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .history-table th,
[data-theme="dark"] .admin-table th {
    background: #0a0a0a !important;
    color: #a3a3a3 !important;
    border-bottom-color: #2a2a2a !important;
}

[data-theme="dark"] .history-table td,
[data-theme="dark"] .admin-table td {
    border-bottom-color: #1f1f1f !important;
    color: #d4d4d4 !important;
    background: transparent !important;
}

[data-theme="dark"] .history-table tbody tr:hover td,
[data-theme="dark"] .admin-table tbody tr:hover td {
    background: #1a1a1a !important;
}

[data-theme="dark"] .score-pill {
    background: #1a2e2a !important;
    color: #2dd4bf !important;
}

[data-theme="dark"] .trend-insight {
    background: #141414 !important;
}

[data-theme="dark"] .trend-insight .label {
    color: #a3a3a3 !important;
}

[data-theme="dark"] .trend-insight .value {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .trend-insight.best .value {
    color: #4ade80 !important;
}

[data-theme="dark"] .trend-insight.worst .value {
    color: #f87171 !important;
}

[data-theme="dark"] .history-empty,
[data-theme="dark"] .admin-empty,
[data-theme="dark"] .missed-empty {
    background: #111111 !important;
    border-color: #2a2a2a !important;
    color: #a3a3a3 !important;
}

[data-theme="dark"] .history-empty-icon {
    background: #1a2e2a !important;
    color: #2dd4bf !important;
}

[data-theme="dark"] .missed-empty {
    background: #0f1f1a !important;
    color: #6ee7b7 !important;
}

[data-theme="dark"] .missed-item,
[data-theme="dark"] .missed-row {
    background: #141414 !important;
    border-color: #2a2a2a !important;
}

[data-theme="dark"] .missed-row strong {
    color: #e5e5e5 !important;
}

[data-theme="dark"] .missed-row span {
    color: #a3a3a3 !important;
}

/* ========== FORMS ========== */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #0a0a0a !important;
    color: #e5e5e5 !important;
    border-color: #333 !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #737373 !important;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: #2dd4bf !important;
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.2) !important;
}

/* ========== BUTTONS ========== */
[data-theme="dark"] .download-btn,
[data-theme="dark"] .profile-btn,
[data-theme="dark"] .la-btn-primary,
[data-theme="dark"] .btn.primary,
[data-theme="dark"] .resource-download,
[data-theme="dark"] .pp-start-btn,
[data-theme="dark"] .about-cta-button,
[data-theme="dark"] .missed-btn {
    background: #2dd4bf !important;
    color: #000000 !important;
}

[data-theme="dark"] .la-btn-outline {
    border-color: #2dd4bf !important;
    color: #2dd4bf !important;
    background: transparent !important;
}

[data-theme="dark"] a {
    color: #2dd4bf;
}

[data-theme="dark"] a:hover {
    color: #5eead4;
}

/* ========== THEME TOGGLE ========== */
[data-theme="dark"] .theme-option {
    background: #111111 !important;
    border-color: #333 !important;
    color: #e5e5e5 !important;
}

[data-theme="dark"] .theme-option.active {
    border-color: #2dd4bf !important;
    background: #0f1f1a !important;
}

[data-theme="dark"] .theme-option strong {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .theme-option span {
    color: #a3a3a3 !important;
}

/* ========== NOTICES / STATUS ========== */
[data-theme="dark"] .profile-notice.success {
    background: #0f1f1a !important;
    color: #6ee7b7 !important;
}

[data-theme="dark"] .profile-notice.error {
    background: #1f0a0a !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .status-graded {
    background: #0f1f1a !important;
    color: #6ee7b7 !important;
}

[data-theme="dark"] .status-submitted {
    background: #0a1a2a !important;
    color: #7dd3fc !important;
}

/* ========== SCROLLBAR ========== */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #000;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 8px;
}

/* ========== NUCLEAR: any remaining white/light boxes ========== */
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background:white"],
[data-theme="dark"] [style*="background: #f"],
[data-theme="dark"] [style*="background:#f"] {
    background: #111111 !important;
    color: #e5e5e5 !important;
}


/* =========================================================
   DARK MODE v5 — FULL SITE SURFACE SWEEP
   Auto-covers all known light cards/panels/pages site-wide
========================================================= */

[data-theme="dark"] /* light surfaces → true black cards */ .about-cta-button,
[data-theme="dark"] .about-final-card,
[data-theme="dark"] .about-profile-card,
[data-theme="dark"] .achievement-card,
[data-theme="dark"] .achievement-icon,
[data-theme="dark"] .admin-action-card,
[data-theme="dark"] .admin-alert,
[data-theme="dark"] .admin-btn-light,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .admin-field,
[data-theme="dark"] .admin-filter-card,
[data-theme="dark"] .admin-form,
[data-theme="dark"] .admin-message,
[data-theme="dark"] .admin-mini-stat,
[data-theme="dark"] .admin-panel,
[data-theme="dark"] .admin-results-card,
[data-theme="dark"] .admin-stat,
[data-theme="dark"] .admin-stat-card,
[data-theme="dark"] .ai-answer-box,
[data-theme="dark"] .ai-card-top,
[data-theme="dark"] .ai-empty,
[data-theme="dark"] .ai-field,
[data-theme="dark"] .ai-filter,
[data-theme="dark"] .ai-filters,
[data-theme="dark"] .ai-flag,
[data-theme="dark"] .ai-review-card,
[data-theme="dark"] .ai-stat,
[data-theme="dark"] .answer-explanation,
[data-theme="dark"] .answer-row,
[data-theme="dark"] .bulk-toolbar,
[data-theme="dark"] .card-surface,
[data-theme="dark"] .classes-final-card,
[data-theme="dark"] .classes-hero-card,
[data-theme="dark"] .classes-method-card,
[data-theme="dark"] .classes-showcase,
[data-theme="dark"] .classes-syllabus-card,
[data-theme="dark"] .contact-feature-card,
[data-theme="dark"] .contact-hero-card,
[data-theme="dark"] .contact-location-card,
[data-theme="dark"] .contact-method-card,
[data-theme="dark"] .count-pill,
[data-theme="dark"] .csv-format,
[data-theme="dark"] .dash-welcome,
[data-theme="dark"] .empty-box,
[data-theme="dark"] .empty-import,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .file-box,
[data-theme="dark"] .hero-floating-card,
[data-theme="dark"] .history-stat,
[data-theme="dark"] .history-surface,
[data-theme="dark"] .hp-benefit-item,
[data-theme="dark"] .hp-feature,
[data-theme="dark"] .hp-feature-icon,
[data-theme="dark"] .hp-hero-panel,
[data-theme="dark"] .hp-stat,
[data-theme="dark"] .hp-step,
[data-theme="dark"] .hp-strip,
[data-theme="dark"] .image-badge,
[data-theme="dark"] .import-card,
[data-theme="dark"] .import-meta,
[data-theme="dark"] .la-feature-card,
[data-theme="dark"] .la-hero-card,
[data-theme="dark"] .la-tutor-points,
[data-theme="dark"] .login-field,
[data-theme="dark"] .login-quote-box,
[data-theme="dark"] .mail-card,
[data-theme="dark"] .mail-field,
[data-theme="dark"] .mail-info,
[data-theme="dark"] .mail-notice,
[data-theme="dark"] .mail-stat,
[data-theme="dark"] .mail-student-list,
[data-theme="dark"] .missed-item,
[data-theme="dark"] .missed-row,
[data-theme="dark"] .option-box,
[data-theme="dark"] .option-label,
[data-theme="dark"] .philosophy-number,
[data-theme="dark"] .platform-feature,
[data-theme="dark"] .platform-number,
[data-theme="dark"] .pp-answer-box,
[data-theme="dark"] .pp-empty,
[data-theme="dark"] .pp-field,
[data-theme="dark"] .pp-instructions,
[data-theme="dark"] .pp-log-card,
[data-theme="dark"] .pp-message,
[data-theme="dark"] .pp-meta-item,
[data-theme="dark"] .pp-mini-stat,
[data-theme="dark"] .pp-qcard,
[data-theme="dark"] .pp-question-card,
[data-theme="dark"] .pp-question-head,
[data-theme="dark"] .pp-result-card,
[data-theme="dark"] .pp-side,
[data-theme="dark"] .pp-stat,
[data-theme="dark"] .pp-summary-card,
[data-theme="dark"] .pp-year-card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .profile-field,
[data-theme="dark"] .profile-notice,
[data-theme="dark"] .q-image-mini,
[data-theme="dark"] .question-card,
[data-theme="dark"] .question-field,
[data-theme="dark"] .question-form,
[data-theme="dark"] .questions-card,
[data-theme="dark"] .questions-stat,
[data-theme="dark"] .quick-action,
[data-theme="dark"] .quiz-admin-card,
[data-theme="dark"] .quiz-answer,
[data-theme="dark"] .quiz-attempt-stat,
[data-theme="dark"] .quiz-date-day,
[data-theme="dark"] .quiz-date-day-head,
[data-theme="dark"] .quiz-date-empty,
[data-theme="dark"] .quiz-date-stat,
[data-theme="dark"] .quiz-empty,
[data-theme="dark"] .quiz-field,
[data-theme="dark"] .quiz-stat,
[data-theme="dark"] .quiz-students-panel,
[data-theme="dark"] .quiz-submit,
[data-theme="dark"] .quiz-top,
[data-theme="dark"] .register-benefit-icon,
[data-theme="dark"] .register-field,
[data-theme="dark"] .register-label,
[data-theme="dark"] .register-notice,
[data-theme="dark"] .resource-badge,
[data-theme="dark"] .resource-card,
[data-theme="dark"] .resource-field,
[data-theme="dark"] .resource-file,
[data-theme="dark"] .resource-modern-card,
[data-theme="dark"] .resource-notice,
[data-theme="dark"] .resource-search,
[data-theme="dark"] .resource-stat,
[data-theme="dark"] .resources-count-card,
[data-theme="dark"] .resources-empty,
[data-theme="dark"] .resources-filter-bar,
[data-theme="dark"] .resources-hero-card,
[data-theme="dark"] .resources-info-card,
[data-theme="dark"] .resources-info-number,
[data-theme="dark"] .result-card,
[data-theme="dark"] .result-ring,
[data-theme="dark"] .result-stat,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .stat-icon,
[data-theme="dark"] .student-card,
[data-theme="dark"] .student-field,
[data-theme="dark"] .student-history-panel,
[data-theme="dark"] .student-history-stat,
[data-theme="dark"] .student-notice,
[data-theme="dark"] .student-search,
[data-theme="dark"] .student-stat,
[data-theme="dark"] .system-card,
[data-theme="dark"] .template-box,
[data-theme="dark"] .theme-option,
[data-theme="dark"] .timer-box,
[data-theme="dark"] .trend-insight,
[data-theme="dark"] .classes-page,
[data-theme="dark"] .dashboard-page,
[data-theme="dark"] .history-page,
[data-theme="dark"] .login-page,
[data-theme="dark"] .quiz-page,
[data-theme="dark"] .result-page,
[data-theme="dark"] .register-page,
[data-theme="dark"] .ai-page,
[data-theme="dark"] .pp-page,
[data-theme="dark"] .pp-admin-page,
[data-theme="dark"] .questions-admin-page,
[data-theme="dark"] .quiz-admin-page,
[data-theme="dark"] .student-history-page,
[data-theme="dark"] .quiz-date-page,
[data-theme="dark"] .quiz-students-page {
    background: #111111 !important;
    border-color: #2a2a2a !important;
    color: #e5e5e5 !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.45) !important;
}

/* Page shells */
[data-theme="dark"] .classes-page,
[data-theme="dark"] .dashboard-page,
[data-theme="dark"] .history-page,
[data-theme="dark"] .login-page,
[data-theme="dark"] .quiz-page,
[data-theme="dark"] .result-page,
[data-theme="dark"] .register-page,
[data-theme="dark"] .ai-page,
[data-theme="dark"] .pp-page,
[data-theme="dark"] .pp-admin-page,
[data-theme="dark"] .questions-admin-page,
[data-theme="dark"] .quiz-admin-page,
[data-theme="dark"] .student-history-page,
[data-theme="dark"] .quiz-date-page,
[data-theme="dark"] .quiz-students-page,
[data-theme="dark"] .resources-modern,
[data-theme="dark"] .about-modern,
[data-theme="dark"] .contact-modern,
[data-theme="dark"] .admin-dashboard,
[data-theme="dark"] .students-admin,
[data-theme="dark"] .profile-page {
    background: #000000 !important;
    color: #e5e5e5 !important;
}

/* Soft section backgrounds */
[data-theme="dark"] .la-features-section,
[data-theme="dark"] .la-tutor-section,
[data-theme="dark"] .hp-section-soft,
[data-theme="dark"] .hp-section-white,
[data-theme="dark"] .classes-section {
    background: #0a0a0a !important;
}

/* Text on those surfaces */
[data-theme="dark"] .classes-section-heading h2,
[data-theme="dark"] .classes-syllabus-card h3,
[data-theme="dark"] .student-card-head h2,
[data-theme="dark"] .student-stat-value,
[data-theme="dark"] .history-stat strong,
[data-theme="dark"] .stat-card strong,
[data-theme="dark"] .admin-stat strong,
[data-theme="dark"] .result-stat strong,
[data-theme="dark"] .quiz-stat strong {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .classes-section-heading p,
[data-theme="dark"] .classes-topic-list li,
[data-theme="dark"] .student-card-head p,
[data-theme="dark"] .student-stat-label,
[data-theme="dark"] .student-muted,
[data-theme="dark"] .history-stat span,
[data-theme="dark"] .history-stat small,
[data-theme="dark"] .surface-subtitle,
[data-theme="dark"] .resources-info-steps p {
    color: #a3a3a3 !important;
}

/* Resource how-to steps */
[data-theme="dark"] .resources-info-steps > div {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
}
[data-theme="dark"] .resources-info-steps span {
    background: #0f1f1a !important;
    color: #2dd4bf !important;
}
[data-theme="dark"] .resources-info-main h2 { color: #f5f5f5 !important; }
[data-theme="dark"] .resources-info-main h2 span { color: #2dd4bf !important; }
[data-theme="dark"] .resources-info-number {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #2dd4bf !important;
}

/* Quiz submit bar */
[data-theme="dark"] .quiz-submit {
    background: #111111 !important;
    border: 1px solid #2a2a2a !important;
}
[data-theme="dark"] .quiz-submit .btn,
[data-theme="dark"] .quiz-submit button {
    background: #2dd4bf !important;
    color: #000 !important;
}

/* Option labels */
[data-theme="dark"] .option-label {
    background: #141414 !important;
    border: 1px solid #333 !important;
    color: #e5e5e5 !important;
}
[data-theme="dark"] .option-label:hover {
    background: #1f1f1f !important;
    border-color: #2dd4bf !important;
}
[data-theme="dark"] .option-label:has(input:checked) {
    background: #0f1f1a !important;
    border-color: #2dd4bf !important;
}
[data-theme="dark"] .option-letter {
    background: #2a2a2a !important;
    color: #e5e5e5 !important;
}
[data-theme="dark"] .option-label:has(input:checked) .option-letter {
    background: #2dd4bf !important;
    color: #000 !important;
}
[data-theme="dark"] .option-content,
[data-theme="dark"] .option-content span {
    color: #e5e5e5 !important;
}

/* Tables everywhere */
[data-theme="dark"] table,
[data-theme="dark"] .student-table,
[data-theme="dark"] .history-table,
[data-theme="dark"] .admin-table,
[data-theme="dark"] .quiz-students-table,
[data-theme="dark"] .quiz-table,
[data-theme="dark"] .questions-table,
[data-theme="dark"] .resource-table,
[data-theme="dark"] .mail-table,
[data-theme="dark"] .admin-results-table,
[data-theme="dark"] .quiz-date-table,
[data-theme="dark"] .student-history-table {
    background: #111 !important;
    color: #e5e5e5 !important;
}
[data-theme="dark"] table th,
[data-theme="dark"] .student-table th,
[data-theme="dark"] .history-table th,
[data-theme="dark"] .admin-table th,
[data-theme="dark"] .quiz-students-table th,
[data-theme="dark"] .quiz-table th,
[data-theme="dark"] .questions-table th,
[data-theme="dark"] .resource-table th,
[data-theme="dark"] .mail-table th {
    background: #0a0a0a !important;
    color: #a3a3a3 !important;
    border-color: #2a2a2a !important;
}
[data-theme="dark"] table td,
[data-theme="dark"] .student-table td,
[data-theme="dark"] .history-table td,
[data-theme="dark"] .admin-table td,
[data-theme="dark"] .quiz-students-table td,
[data-theme="dark"] .quiz-table td,
[data-theme="dark"] .questions-table td,
[data-theme="dark"] .resource-table td,
[data-theme="dark"] .mail-table td {
    background: #111 !important;
    color: #d4d4d4 !important;
    border-color: #1f1f1f !important;
}

/* Forms */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input:not([type]),
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .student-field input,
[data-theme="dark"] .student-field select,
[data-theme="dark"] .quiz-field input,
[data-theme="dark"] .quiz-field select,
[data-theme="dark"] .quiz-field textarea,
[data-theme="dark"] .admin-field input,
[data-theme="dark"] .admin-field select,
[data-theme="dark"] .admin-field textarea,
[data-theme="dark"] .login-field input,
[data-theme="dark"] .register-field input,
[data-theme="dark"] .profile-field input,
[data-theme="dark"] .pp-field input,
[data-theme="dark"] .pp-field select,
[data-theme="dark"] .pp-field textarea,
[data-theme="dark"] .resource-field input,
[data-theme="dark"] .resource-field select,
[data-theme="dark"] .resource-search input {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #e5e5e5 !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #737373 !important;
}

/* Buttons that were light */
[data-theme="dark"] .admin-btn-light,
[data-theme="dark"] .la-btn-white,
[data-theme="dark"] .hp-btn-white {
    background: #2dd4bf !important;
    color: #000 !important;
}

/* Status pills */
[data-theme="dark"] .missed-btn.pending,
[data-theme="dark"] .request-status.pending,
[data-theme="dark"] .quiz-status-expired {
    background: #3d2e00 !important;
    color: #fbbf24 !important;
}
[data-theme="dark"] .request-status.granted,
[data-theme="dark"] .status-graded {
    background: #0f1f1a !important;
    color: #6ee7b7 !important;
}
[data-theme="dark"] .request-status.rejected,
[data-theme="dark"] .student-notice.error,
[data-theme="dark"] .profile-notice.error,
[data-theme="dark"] .register-notice.error,
[data-theme="dark"] .mail-notice.error,
[data-theme="dark"] .admin-alert.error {
    background: #1f0a0a !important;
    color: #fca5a5 !important;
    border-color: #7f1d1d !important;
}
[data-theme="dark"] .student-notice.success,
[data-theme="dark"] .profile-notice.success,
[data-theme="dark"] .mail-notice.success,
[data-theme="dark"] .admin-alert.success {
    background: #0f1f1a !important;
    color: #6ee7b7 !important;
    border-color: #14532d !important;
}

/* Admin header strip */
[data-theme="dark"] .pp-admin-header,
[data-theme="dark"] .admin-topbar {
    background: #0a0a0a !important;
    border-color: #1f1f1f !important;
    color: #e5e5e5 !important;
}

/* Resource tabs */
[data-theme="dark"] .resource-tabs a {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #d4d4d4 !important;
}
[data-theme="dark"] .resource-tabs a.active,
[data-theme="dark"] .resource-tabs a:hover {
    background: #0f1f1a !important;
    border-color: #2dd4bf !important;
    color: #2dd4bf !important;
}

/* Past paper specific */
[data-theme="dark"] .pp-btn:not(.primary):not(.danger) {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #e5e5e5 !important;
}
[data-theme="dark"] .pp-check {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

/* Result answer coloring keep readable */
[data-theme="dark"] .answer-wrong {
    background: #1f0a0a !important;
    border-color: #7f1d1d !important;
}
[data-theme="dark"] .answer-explanation {
    background: #0a1628 !important;
    border-color: #1e3a5f !important;
    color: #d4d4d4 !important;
}

/* Classes topic list */
[data-theme="dark"] .classes-syllabus-card header span {
    background: #0f1f1a !important;
    color: #2dd4bf !important;
}
[data-theme="dark"] .classes-topic-list li {
    color: #c4c4c4 !important;
}

/* Homepage hp accents already variable-based; force panel */
[data-theme="dark"] .hp-hero-panel {
    background: #111111 !important;
    color: #e5e5e5 !important;
}
[data-theme="dark"] .hp-hero-panel h3 { color: #f5f5f5 !important; }
[data-theme="dark"] .hp-panel-list li { color: #c4c4c4 !important; }

/* Nuclear inline white backgrounds (common in admin inline style blocks) */
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background:white"],
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background:#fbf"],
[data-theme="dark"] [style*="background:#f8f"],
[data-theme="dark"] [style*="background:#f5f"],
[data-theme="dark"] [style*="background:#f4f"],
[data-theme="dark"] [style*="background:#f7f"],
[data-theme="dark"] [style*="background: #fbf"],
[data-theme="dark"] [style*="background: #f8f"],
[data-theme="dark"] [style*="background: #f5f"],
[data-theme="dark"] [style*="background: #f4f"],
[data-theme="dark"] [style*="background: #f7f"] {
    background: #111111 !important;
    color: #e5e5e5 !important;
}

/* Inline light text colors that become invisible */
[data-theme="dark"] [style*="color:#173"],
[data-theme="dark"] [style*="color: #173"],
[data-theme="dark"] [style*="color:#111"],
[data-theme="dark"] [style*="color: #111"],
[data-theme="dark"] [style*="color:#101"],
[data-theme="dark"] [style*="color:#344"],
[data-theme="dark"] [style*="color:#667"] {
    color: #e5e5e5 !important;
}

