/* Centralized Orchid Admin theme variables and light-mode overrides. */
:root,
:root[data-theme="dark"] {
    --bg-primary: hsl(222 47% 11%);
    --bg-secondary: #0b1220;
    --card-bg: #1a2332;
    --text-primary: #e2e8f0;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.06);
    --accent-color: #f38118;
    --field-bg: #111828;
    --field-border: rgba(255, 255, 255, 0.12);
    --placeholder-color: rgba(255, 255, 255, 0.35);
    --soft-surface: rgba(255, 255, 255, 0.04);
    --text-on-dark: hsl(0 0% 100%);
    --text-on-light: hsl(0 0% 0%);
    --text-on-accent: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --hover-bg: rgba(255, 255, 255, 0.06);
}

:root[data-theme="light"] {
    --bg-primary: #F8FAFC;
    --bg-secondary: #F1F5F9;
    --card-bg: hsl(0 0% 100%);
    --text-primary: hsl(222 47% 11%);
    --text-secondary: #475569;
    --border-color: #E2E8F0;
    --accent-color: #F38118;
    --success: #16A34A;
    --warning: #D97706;
    --danger: #DC2626;
    --hover-bg: #F1F5F9;
    --orchid-gold: #F38118;
    --orchid-gold-light: #FF9500;
    --primary: #F38118;
    --primary-hover: #E06F0A;
    --primary-light: #FFF4E5;
    --primary-gradient: linear-gradient(135deg, #FF9500 0%, #F38118 100%);
    --navbar-bg: var(--card-bg);
    --body-bg: #F8FAFC;
    --border: #E2E8F0;
    --text-light: #64748B;
    --success-light: #DCFCE7;
    --warning-light: #FEF3C7;
    --danger-light: #FEE2E2;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 56px rgba(15, 23, 42, 0.14);
    --field-bg: var(--card-bg);
    --field-border: hsl(213 27% 84%);
    --placeholder-color: hsl(215 20% 65%);
    --modal-overlay-bg: rgba(15, 23, 42, 0.36);
    --soft-surface: #F8FAFC;
    --login-input-bg: var(--card-bg);
    --login-input-text: var(--text-primary);
    --text-on-dark: var(--text-primary);
    --text-on-light: var(--text-primary);
    --text-on-accent: #ffffff;
    --button-primary-bg: var(--accent-color);
    --button-secondary-bg: var(--card-bg);
    --button-text: var(--text-on-accent);
}

:root[data-theme="light"],
:root[data-theme="light"] body {
    color-scheme: light;
}

:root[data-theme="dark"],
:root[data-theme="dark"] body {
    color-scheme: dark;
}

body.admin-academy,
body.admin-academy *,
.login-body,
.login-body * {
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--orchid-gold);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theme-toggle i {
    transform: rotate(0deg) scale(1);
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(18deg) scale(1.08);
}

.theme-toggle-login {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 20;
}

:root[data-theme="light"] body.admin-academy {
    background: var(--bg-primary);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .sidebar {
    background: #FFFFFF;
    border-right-color: var(--border-color);
}

:root[data-theme="light"] body.admin-academy .main-content,
:root[data-theme="light"] body.admin-academy .page-body,
:root[data-theme="light"] body.admin-academy .academy-topbar {
    background: var(--bg-primary);
}

:root[data-theme="light"] body.admin-academy .card,
:root[data-theme="light"] body.admin-academy .stat-card,
:root[data-theme="light"] body.admin-academy .academy-stat,
:root[data-theme="light"] body.admin-academy .academy-panel,
:root[data-theme="light"] body.admin-academy .academy-hero,
:root[data-theme="light"] body.admin-academy .instr-table-card,
:root[data-theme="light"] body.admin-academy .modal,
:root[data-theme="light"] body.admin-academy .modal-theme,
:root[data-theme="light"] body.admin-academy .modal-instructor-dark,
:root[data-theme="light"] body.admin-academy .confirm-box,
:root[data-theme="light"] body.admin-academy .toast,
:root[data-theme="light"] body.admin-academy .academy-quick-links li a {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

:root[data-theme="light"] body.admin-academy .sidebar-brand,
:root[data-theme="light"] body.admin-academy .sidebar-bottom-links,
:root[data-theme="light"] body.admin-academy .academy-topbar,
:root[data-theme="light"] body.admin-academy .academy-footer,
:root[data-theme="light"] body.admin-academy .card-header,
:root[data-theme="light"] body.admin-academy .card-footer,
:root[data-theme="light"] body.admin-academy .modal-header,
:root[data-theme="light"] body.admin-academy .modal-footer,
:root[data-theme="light"] body.admin-academy .instr-table-footer,
:root[data-theme="light"] body.admin-academy .academy-panel-head {
    border-color: var(--border-color);
}

:root[data-theme="light"] body.admin-academy .sidebar-brand-text,
:root[data-theme="light"] body.admin-academy .academy-user-text strong,
:root[data-theme="light"] body.admin-academy .page-header h2,
:root[data-theme="light"] body.admin-academy .academy-dash-head h1,
:root[data-theme="light"] body.admin-academy .instr-page-head h1,
:root[data-theme="light"] body.admin-academy .academy-stat-value,
:root[data-theme="light"] body.admin-academy .academy-hero h2,
:root[data-theme="light"] body.admin-academy .academy-enroll-user strong,
:root[data-theme="light"] body.admin-academy .academy-instructor-info strong,
:root[data-theme="light"] body.admin-academy .instr-cell-instructor strong,
:root[data-theme="light"] body.admin-academy .instr-rating,
:root[data-theme="light"] body.admin-academy .view-value-primary,
:root[data-theme="light"] body.admin-academy .view-line-label,
:root[data-theme="light"] body.admin-academy .confirm-title,
:root[data-theme="light"] body.admin-academy .modal-header h3,
:root[data-theme="light"] body.admin-academy .view-modal-header h3 {
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .sidebar-brand-text span,
:root[data-theme="light"] body.admin-academy .sidebar-nav a,
:root[data-theme="light"] body.admin-academy .sidebar-link-muted,
:root[data-theme="light"] body.admin-academy .academy-user-text span,
:root[data-theme="light"] body.admin-academy .academy-dash-head p,
:root[data-theme="light"] body.admin-academy .instr-page-head p,
:root[data-theme="light"] body.admin-academy .academy-stat-label,
:root[data-theme="light"] body.admin-academy .academy-stat-trend.neutral,
:root[data-theme="light"] body.admin-academy .academy-hero p,
:root[data-theme="light"] body.admin-academy .academy-panel-head h3,
:root[data-theme="light"] body.admin-academy .academy-enroll-user span,
:root[data-theme="light"] body.admin-academy .academy-instructor-info span,
:root[data-theme="light"] body.admin-academy .academy-empty,
:root[data-theme="light"] body.admin-academy .academy-subtle,
:root[data-theme="light"] body.admin-academy .instr-count,
:root[data-theme="light"] body.admin-academy .instr-page-size,
:root[data-theme="light"] body.admin-academy .instr-cell-instructor > div span,
:root[data-theme="light"] body.admin-academy .instr-cell-contact,
:root[data-theme="light"] body.admin-academy .instr-empty,
:root[data-theme="light"] body.admin-academy .view-label,
:root[data-theme="light"] body.admin-academy .view-value,
:root[data-theme="light"] body.admin-academy .view-line-value,
:root[data-theme="light"] body.admin-academy .view-muted,
:root[data-theme="light"] body.admin-academy .confirm-message,
:root[data-theme="light"] body.admin-academy .table-info,
:root[data-theme="light"] body.admin-academy .academy-footer,
:root[data-theme="light"] body.admin-academy .form-hint {
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy .sidebar-nav a i,
:root[data-theme="light"] body.admin-academy .sidebar-link-muted i,
:root[data-theme="light"] body.admin-academy .academy-panel-head h3 i,
:root[data-theme="light"] body.admin-academy .academy-panel-link,
:root[data-theme="light"] body.admin-academy .academy-instructor-rating,
:root[data-theme="light"] body.admin-academy .instr-rating i,
:root[data-theme="light"] body.admin-academy .theme-toggle,
:root[data-theme="light"] body.admin-academy .academy-topbar-brand {
    color: var(--accent-color);
}

:root[data-theme="light"] body.admin-academy .academy-topbar-search input,
:root[data-theme="light"] body.admin-academy .form-input,
:root[data-theme="light"] body.admin-academy .form-select,
:root[data-theme="light"] body.admin-academy .form-textarea,
:root[data-theme="light"] body.admin-academy select,
:root[data-theme="light"] body.admin-academy .instr-search-input,
:root[data-theme="light"] body.admin-academy .instr-page-size select,
:root[data-theme="light"] body.admin-academy .membership-json-box,
:root[data-theme="light"] body.admin-academy .edit-skills-box,
:root[data-theme="light"] body.admin-academy .edit-skill-input {
    background-color: #FFFFFF;
    border-color: var(--border-color);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .academy-topbar-search input::placeholder,
:root[data-theme="light"] body.admin-academy .form-input::placeholder,
:root[data-theme="light"] body.admin-academy .form-textarea::placeholder,
:root[data-theme="light"] body.admin-academy .instr-search-input::placeholder,
:root[data-theme="light"] body.admin-academy .edit-skill-input::placeholder {
    color: #94A3B8;
}

:root[data-theme="light"] body.admin-academy .academy-topbar-search i,
:root[data-theme="light"] body.admin-academy .instr-search-wrap i,
:root[data-theme="light"] body.admin-academy .edit-input-wrap > i {
    color: #64748B;
}

:root[data-theme="light"] body.admin-academy .academy-notify,
:root[data-theme="light"] body.admin-academy .academy-settings,
:root[data-theme="light"] body.admin-academy .theme-toggle,
:root[data-theme="light"] body.admin-academy .btn-menu-toggle,
:root[data-theme="light"] body.admin-academy .btn-instr-tool,
:root[data-theme="light"] body.admin-academy .btn-outline,
:root[data-theme="light"] body.admin-academy .btn-confirm-cancel,
:root[data-theme="light"] body.admin-academy .btn-modal-cancel,
:root[data-theme="light"] body.admin-academy .btn-edit-cancel,
:root[data-theme="light"] body.admin-academy .instr-actions .btn-icon,
:root[data-theme="light"] body.admin-academy .pagination button,
:root[data-theme="light"] body.admin-academy .instr-pagination button {
    background: #FFFFFF;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy .academy-notify:hover,
:root[data-theme="light"] body.admin-academy .academy-settings:hover,
:root[data-theme="light"] body.admin-academy .theme-toggle:hover,
:root[data-theme="light"] body.admin-academy .sidebar-nav a:hover,
:root[data-theme="light"] body.admin-academy .sidebar-link-muted:hover,
:root[data-theme="light"] body.admin-academy .btn-instr-tool:hover,
:root[data-theme="light"] body.admin-academy .btn-outline:hover,
:root[data-theme="light"] body.admin-academy .btn-confirm-cancel:hover,
:root[data-theme="light"] body.admin-academy .btn-modal-cancel:hover,
:root[data-theme="light"] body.admin-academy .btn-edit-cancel:hover,
:root[data-theme="light"] body.admin-academy .instr-actions .btn-icon:hover,
:root[data-theme="light"] body.admin-academy .data-table tbody tr:hover,
:root[data-theme="light"] body.admin-academy .academy-table tbody tr:hover,
:root[data-theme="light"] body.admin-academy .instr-table tbody tr:hover,
:root[data-theme="light"] body.admin-academy .academy-quick-links li a:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .sidebar-nav a.active {
    background: #FFF7DB;
    color: var(--text-primary);
    border-left-color: var(--accent-color);
}

:root[data-theme="light"] body.admin-academy .data-table thead,
:root[data-theme="light"] body.admin-academy .data-table th,
:root[data-theme="light"] body.admin-academy .academy-table th,
:root[data-theme="light"] body.admin-academy .instr-table thead th {
    background: #F8FAFC;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy .data-table td,
:root[data-theme="light"] body.admin-academy .academy-table td,
:root[data-theme="light"] body.admin-academy .instr-table tbody td {
    border-color: var(--border-color);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .academy-notify::after {
    border-color: #FFFFFF;
}

:root[data-theme="light"] body.admin-academy .academy-user-avatar,
:root[data-theme="light"] body.admin-academy .academy-stat-icon,
:root[data-theme="light"] body.admin-academy .academy-enroll-initials,
:root[data-theme="light"] body.admin-academy .academy-instructor-avatar,
:root[data-theme="light"] body.admin-academy .instr-avatar,
:root[data-theme="light"] body.admin-academy .view-photo-placeholder,
:root[data-theme="light"] body.admin-academy .profile-upload-preview,
:root[data-theme="light"] body.admin-academy .edit-photo-ring {
    background: #FFF7DB;
    border-color: rgba(212, 160, 23, 0.35);
    color: var(--accent-color);
}

:root[data-theme="light"] body.admin-academy .academy-dash-status,
:root[data-theme="light"] body.admin-academy .academy-badge.active {
    background: #DCFCE7;
    border-color: rgba(22, 163, 74, 0.25);
    color: var(--success);
}

:root[data-theme="light"] body.admin-academy .academy-badge.pending,
:root[data-theme="light"] body.admin-academy .instr-status.active {
    background: #FEF3C7;
    border-color: rgba(217, 119, 6, 0.28);
    color: var(--warning);
}

:root[data-theme="light"] body.admin-academy .academy-badge.inactive,
:root[data-theme="light"] body.admin-academy .instr-status.leave,
:root[data-theme="light"] body.admin-academy .badge-muted {
    background: #F1F5F9;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy .modal-overlay,
:root[data-theme="light"] body.admin-academy .modal-theme-overlay,
:root[data-theme="light"] body.admin-academy .confirm-overlay {
    background: rgba(15, 23, 42, 0.36);
}

/* Shared create/update modal overrides for Domain, Category, Course, Instructor, and future CRUD forms. */
:root[data-theme="light"] body.admin-academy #domainModal.modal-overlay,
:root[data-theme="light"] body.admin-academy #categoryModal.modal-overlay,
:root[data-theme="light"] body.admin-academy #courseModal.modal-overlay,
:root[data-theme="light"] body.admin-academy #createModal.modal-overlay,
:root[data-theme="light"] body.admin-academy #editModal.modal-overlay,
:root[data-theme="light"] body.admin-academy #viewModal.modal-overlay {
    background: var(--modal-overlay-bg);
}

:root[data-theme="light"] body.admin-academy #domainModal .modal-instructor-dark,
:root[data-theme="light"] body.admin-academy #categoryModal .modal-instructor-dark,
:root[data-theme="light"] body.admin-academy #courseModal .modal-instructor-dark,
:root[data-theme="light"] body.admin-academy #courseViewModal .modal-instructor-dark,
:root[data-theme="light"] body.admin-academy #createModal .modal-instructor-dark,
:root[data-theme="light"] body.admin-academy #editModal .modal-instructor-dark,
:root[data-theme="light"] body.admin-academy #viewModal .modal-instructor-dark,
:root[data-theme="light"] body.admin-academy .edit-instructor-modal,
:root[data-theme="light"] body.admin-academy .view-instructor-modal {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

:root[data-theme="light"] body.admin-academy #domainModal .modal-header,
:root[data-theme="light"] body.admin-academy #categoryModal .modal-header,
:root[data-theme="light"] body.admin-academy #courseModal .modal-header,
:root[data-theme="light"] body.admin-academy #createModal .modal-header,
:root[data-theme="light"] body.admin-academy #editModal .modal-header,
:root[data-theme="light"] body.admin-academy #viewModal .modal-header {
    border-color: var(--border-color);
}

:root[data-theme="light"] body.admin-academy #domainModal .modal-footer,
:root[data-theme="light"] body.admin-academy #categoryModal .modal-footer,
:root[data-theme="light"] body.admin-academy #courseModal .modal-footer,
:root[data-theme="light"] body.admin-academy #createModal .modal-footer,
:root[data-theme="light"] body.admin-academy #editModal .modal-footer,
:root[data-theme="light"] body.admin-academy #viewModal .modal-footer,
:root[data-theme="light"] body.admin-academy #editModal .edit-modal-footer {
    background: var(--soft-surface);
    border-color: var(--border-color);
}

:root[data-theme="light"] body.admin-academy #domainModal .form-group label,
:root[data-theme="light"] body.admin-academy #categoryModal .form-group label,
:root[data-theme="light"] body.admin-academy #courseModal .form-group label,
:root[data-theme="light"] body.admin-academy #createModal .form-group label,
:root[data-theme="light"] body.admin-academy #editModal .form-group label,
:root[data-theme="light"] body.admin-academy .domain-active-check,
:root[data-theme="light"] body.admin-academy .edit-field-label,
:root[data-theme="light"] body.admin-academy .edit-section-title,
:root[data-theme="light"] body.admin-academy .view-section-title {
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy #domainModal .form-input,
:root[data-theme="light"] body.admin-academy #categoryModal .form-input,
:root[data-theme="light"] body.admin-academy #courseModal .form-input,
:root[data-theme="light"] body.admin-academy #createModal .form-input,
:root[data-theme="light"] body.admin-academy #editModal .form-input,
:root[data-theme="light"] body.admin-academy #viewModal .form-input,
:root[data-theme="light"] body.admin-academy #domainModal .domain-file-wrap,
:root[data-theme="light"] body.admin-academy #createModal .profile-upload-box,
:root[data-theme="light"] body.admin-academy #createModal .profile-upload-preview,
:root[data-theme="light"] body.admin-academy #editModal .edit-skills-box,
:root[data-theme="light"] body.admin-academy #editModal .edit-input-wrap .form-input {
    background: var(--field-bg);
    border-color: var(--field-border);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy #editModal .edit-skill-tag,
:root[data-theme="light"] body.admin-academy .edit-skill-tag {
    background: rgba(243, 129, 24, 0.14);
    border: 1px solid rgba(243, 129, 24, 0.32);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy #editModal .edit-skill-remove,
:root[data-theme="light"] body.admin-academy .edit-skill-remove {
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy #editModal .edit-skill-remove:hover,
:root[data-theme="light"] body.admin-academy .edit-skill-remove:hover {
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy #viewModal .view-skill-pill {
    background: rgba(243, 129, 24, 0.12);
    border-color: rgba(243, 129, 24, 0.28);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy #domainModal .form-input::placeholder,
:root[data-theme="light"] body.admin-academy #categoryModal .form-input::placeholder,
:root[data-theme="light"] body.admin-academy #courseModal .form-input::placeholder,
:root[data-theme="light"] body.admin-academy #createModal .form-input::placeholder,
:root[data-theme="light"] body.admin-academy #editModal .form-input::placeholder {
    color: var(--placeholder-color);
}

:root[data-theme="light"] body.admin-academy #domainModal .form-input:focus,
:root[data-theme="light"] body.admin-academy #categoryModal .form-input:focus,
:root[data-theme="light"] body.admin-academy #courseModal .form-input:focus,
:root[data-theme="light"] body.admin-academy #createModal .form-input:focus,
:root[data-theme="light"] body.admin-academy #editModal .form-input:focus {
    background: var(--field-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.14);
}

:root[data-theme="light"] body.admin-academy #categoryModal select.form-input option,
:root[data-theme="light"] body.admin-academy #courseModal select.form-input option {
    background: var(--field-bg);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy #domainModal .modal-close,
:root[data-theme="light"] body.admin-academy #categoryModal .modal-close,
:root[data-theme="light"] body.admin-academy #courseModal .modal-close,
:root[data-theme="light"] body.admin-academy #createModal .modal-close,
:root[data-theme="light"] body.admin-academy #editModal .modal-close,
:root[data-theme="light"] body.admin-academy #viewModal .modal-close,
:root[data-theme="light"] body.admin-academy #domainModal .domain-file-name,
:root[data-theme="light"] body.admin-academy #domainModal .domain-preview-label,
:root[data-theme="light"] body.admin-academy #domainModal .domain-preview-placeholder,
:root[data-theme="light"] body.admin-academy #categoryModal .category-preview-placeholder,
:root[data-theme="light"] body.admin-academy .profile-file-name,
:root[data-theme="light"] body.admin-academy .modal-subtitle,
:root[data-theme="light"] body.admin-academy .edit-muted {
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy #domainModal .domain-preview-frame,
:root[data-theme="light"] body.admin-academy #categoryModal .category-preview-frame,
:root[data-theme="light"] body.admin-academy .category-card,
:root[data-theme="light"] body.admin-academy .course-view-desc,
:root[data-theme="light"] body.admin-academy .view-card,
:root[data-theme="light"] body.admin-academy .edit-panel {
    background: var(--soft-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .category-card h3,
:root[data-theme="light"] body.admin-academy .category-desc,
:root[data-theme="light"] body.admin-academy .category-meta,
:root[data-theme="light"] body.admin-academy .course-view-item span,
:root[data-theme="light"] body.admin-academy .course-view-desc {
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .category-drag,
:root[data-theme="light"] body.admin-academy .category-index,
:root[data-theme="light"] body.admin-academy .course-view-item label {
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy #domainModal .btn-modal-cancel,
:root[data-theme="light"] body.admin-academy #categoryModal .btn-modal-cancel,
:root[data-theme="light"] body.admin-academy #courseModal .btn-modal-cancel,
:root[data-theme="light"] body.admin-academy #createModal .btn-modal-cancel,
:root[data-theme="light"] body.admin-academy #editModal .btn-edit-cancel {
    background: var(--field-bg);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy #domainModal .domain-file-btn,
:root[data-theme="light"] body.admin-academy #categoryModal input[type="file"].form-input::file-selector-button,
:root[data-theme="light"] body.admin-academy .btn-choose-file {
    background: var(--primary-light);
    border-color: rgba(212, 160, 23, 0.35);
    color: var(--accent-color);
}

:root[data-theme="light"] body.admin-academy .domain-title-cell small,
:root[data-theme="light"] body.admin-academy .domain-thumb-placeholder {
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy .domain-thumb,
:root[data-theme="light"] body.admin-academy .category-card {
    border-color: var(--border-color);
}

:root[data-theme="light"] body.admin-academy .category-card:hover {
    background: var(--primary-light);
    border-color: rgba(212, 160, 23, 0.45);
}

:root[data-theme="light"] body.admin-academy .modal-footer,
:root[data-theme="light"] body.admin-academy .modal-theme .modal-footer,
:root[data-theme="light"] body.admin-academy .edit-modal-footer,
:root[data-theme="light"] body.admin-academy .view-modal-footer {
    background: #F8FAFC;
}

:root[data-theme="light"] body.admin-academy select option,
:root[data-theme="light"] body.admin-academy select optgroup {
    background: #FFFFFF;
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .toast {
    border-left-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

:root[data-theme="light"] body.admin-academy .toast.success {
    border-left-color: var(--success);
}

:root[data-theme="light"] body.admin-academy .toast.error {
    border-left-color: var(--danger);
}

:root[data-theme="light"] body.admin-academy .toast.warning {
    border-left-color: var(--warning);
}

:root[data-theme="light"] body.admin-academy .btn-primary,
:root[data-theme="light"] body.admin-academy .btn-new-session,
:root[data-theme="light"] body.admin-academy .btn-academy-gold,
:root[data-theme="light"] body.admin-academy .btn-instr-add,
:root[data-theme="light"] body.admin-academy .btn-modal-create,
:root[data-theme="light"] body.admin-academy .btn-edit-save,
:root[data-theme="light"] body.admin-academy .btn-confirm-primary,
:root[data-theme="light"] body.admin-academy .pagination button.active,
:root[data-theme="light"] body.admin-academy .instr-pagination button.active {
    background: var(--accent-color);
    color: #ffffff;
}

:root[data-theme="light"] body.admin-academy .btn-danger,
:root[data-theme="light"] body.admin-academy .btn-confirm-danger {
    background: var(--danger);
    color: #FFFFFF;
}

:root[data-theme="light"] body.admin-academy * {
    scrollbar-color: rgba(212, 160, 23, 0.75) #E2E8F0;
}

:root[data-theme="light"] body.admin-academy *::-webkit-scrollbar-track {
    background: #E2E8F0;
}

:root[data-theme="light"] body.admin-academy *::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(212, 160, 23, 0.88) 0%, rgba(217, 119, 6, 0.88) 100%);
    border-color: #F8FAFC;
}

/* Light Theme fixes for helper text and helper components */
:root[data-theme="light"] body.admin-academy .edit-photo-hint,
:root[data-theme="light"] body.admin-academy .form-hint,
:root[data-theme="light"] #editModal .edit-photo-hint {
    color: var(--text-secondary);
}

/* Light Theme pagination text visibility */
:root[data-theme="light"] body.admin-academy .instr-count strong,
:root[data-theme="light"] body.admin-academy .pagination-info,
:root[data-theme="light"] body.admin-academy .instr-pagination button {
    color: var(--text-primary);
}

/* Light Theme landing page mentor and course names */
:root[data-theme="light"] .public-orchid .course-catalog-card__title,
:root[data-theme="light"] .public-orchid .mentor-name,
:root[data-theme="light"] .public-orchid .instructor-name,
:root[data-theme="light"] .public-orchid .feature-title,
:root[data-theme="light"] .public-orchid h3 {
    color: var(--pub-text);
}

:root[data-theme="light"] .login-body,
:root[data-theme="light"] .login-panel {
    background: var(--bg-primary);
}

:root[data-theme="light"] .login-brand-text strong,
:root[data-theme="light"] .login-welcome {
    color: var(--text-primary);
}

:root[data-theme="light"] .login-brand-text span,
:root[data-theme="light"] .login-subtitle,
:root[data-theme="light"] .login-remember,
:root[data-theme="light"] .login-help,
:root[data-theme="light"] .login-legal a {
    color: var(--text-secondary);
}

:root[data-theme="light"] .login-input-wrap input {
    background: #FFFFFF;
    border-color: var(--border-color);
    color: var(--text-primary);
}

:root[data-theme="light"] .login-input-wrap input::placeholder {
    color: #94A3B8;
}

:root[data-theme="light"] .login-input-wrap input:-webkit-autofill,
:root[data-theme="light"] .login-input-wrap input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset;
    -webkit-text-fill-color: var(--text-primary);
    caret-color: var(--text-primary);
}

:root[data-theme="light"] .login-alert {
    background: #FEE2E2;
    border-color: rgba(220, 38, 38, 0.22);
    color: var(--danger);
}

:root[data-theme="light"] .login-submit {
    background: var(--accent-color);
    color: #1A1408;
}

:root[data-theme="light"] .login-toggle-pw:hover,
:root[data-theme="light"] .login-legal a:hover {
    color: var(--text-primary);
}

:root[data-theme="light"] .theme-toggle-login .theme-toggle {
    background: #FFFFFF;
    border-color: var(--border-color);
    color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

:root[data-theme="light"] body.admin-academy .cb-header h1,
:root[data-theme="light"] body.admin-academy .cb-course-summary h2,
:root[data-theme="light"] body.admin-academy .cb-topic-head-left strong,
:root[data-theme="light"] body.admin-academy .cb-view-item span,
:root[data-theme="light"] body.admin-academy .cb-view-item a,
:root[data-theme="light"] body.admin-academy .cb-lesson-detail-title-row h4,
:root[data-theme="light"] body.admin-academy .cb-video-source-row a,
:root[data-theme="light"] body.admin-academy .cb-resource-item,
:root[data-theme="light"] body.admin-academy .cb-resource-text strong,
:root[data-theme="light"] body.admin-academy .cb-topic-view-item span,
:root[data-theme="light"] body.admin-academy .course-view-item span,
:root[data-theme="light"] body.admin-academy .membership-page,
:root[data-theme="light"] body.admin-academy .membership-price,
:root[data-theme="light"] body.admin-academy .membership-switch-card h4,
:root[data-theme="light"] body.admin-academy .stat-card h3,
:root[data-theme="light"] body.admin-academy .um-user-meta h3,
:root[data-theme="light"] body.admin-academy .um-plan-head h4,
:root[data-theme="light"] body.admin-academy .um-plan-row dd {
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .cb-header p,
:root[data-theme="light"] body.admin-academy .cb-empty,
:root[data-theme="light"] body.admin-academy .cb-course-summary p,
:root[data-theme="light"] body.admin-academy .cb-topic-head-left small,
:root[data-theme="light"] body.admin-academy .drag-handle,
:root[data-theme="light"] body.admin-academy .cb-topic-head button,
:root[data-theme="light"] body.admin-academy .cb-lesson-actions button,
:root[data-theme="light"] body.admin-academy .cb-lesson-meta small,
:root[data-theme="light"] body.admin-academy .cb-file-note,
:root[data-theme="light"] body.admin-academy .cb-block-label,
:root[data-theme="light"] body.admin-academy .cb-view-item label,
:root[data-theme="light"] body.admin-academy .cb-view-desc,
:root[data-theme="light"] body.admin-academy .cb-modal-subtitle,
:root[data-theme="light"] body.admin-academy .cb-resource-text small,
:root[data-theme="light"] body.admin-academy .cb-resource-download,
:root[data-theme="light"] body.admin-academy .cb-resource-empty,
:root[data-theme="light"] body.admin-academy .cb-view-meta,
:root[data-theme="light"] body.admin-academy .cb-admin-note p,
:root[data-theme="light"] body.admin-academy .cb-admin-note--compact p,
:root[data-theme="light"] body.admin-academy .cb-admin-progress,
:root[data-theme="light"] body.admin-academy .cb-topic-view-item label,
:root[data-theme="light"] body.admin-academy .cb-topic-view-desc,
:root[data-theme="light"] body.admin-academy .course-view-item label,
:root[data-theme="light"] body.admin-academy .course-view-desc,
:root[data-theme="light"] body.admin-academy .membership-header p,
:root[data-theme="light"] body.admin-academy .stat-card p,
:root[data-theme="light"] body.admin-academy .search-box input::placeholder,
:root[data-theme="light"] body.admin-academy .search-box i,
:root[data-theme="light"] body.admin-academy .um-user-card--empty,
:root[data-theme="light"] body.admin-academy .um-user-code,
:root[data-theme="light"] body.admin-academy .um-btn-menu,
:root[data-theme="light"] body.admin-academy .um-plan-row dt,
:root[data-theme="light"] body.admin-academy .um-plan-created,
:root[data-theme="light"] body.admin-academy .membership-switch-card p {
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy .cb-course-summary,
:root[data-theme="light"] body.admin-academy .cb-left,
:root[data-theme="light"] body.admin-academy .cb-topic-item,
:root[data-theme="light"] body.admin-academy .cb-topic-head,
:root[data-theme="light"] body.admin-academy .cb-lesson-item,
:root[data-theme="light"] body.admin-academy .cb-view-desc,
:root[data-theme="light"] body.admin-academy .cb-view-desc--full,
:root[data-theme="light"] body.admin-academy .cb-video-source-row,
:root[data-theme="light"] body.admin-academy .cb-resource-item,
:root[data-theme="light"] body.admin-academy .cb-view-preview-empty,
:root[data-theme="light"] body.admin-academy .cb-topic-view-desc,
:root[data-theme="light"] body.admin-academy .course-view-desc,
:root[data-theme="light"] body.admin-academy .membership-switch-card,
:root[data-theme="light"] body.admin-academy .stat-card,
:root[data-theme="light"] body.admin-academy .um-user-card,
:root[data-theme="light"] body.admin-academy .um-plan-card {
    background: #FFFFFF;
    border-color: var(--border-color);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .cb-empty,
:root[data-theme="light"] body.admin-academy .cb-add-lesson-row {
    background: #FFFFFF;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

:root[data-theme="light"] body.admin-academy .cb-lesson-item:hover,
:root[data-theme="light"] body.admin-academy .cb-add-lesson-row:hover,
:root[data-theme="light"] body.admin-academy .cb-resource-item-link:hover,
:root[data-theme="light"] body.admin-academy .um-btn-menu:hover {
    background: var(--hover-bg);
    border-color: rgba(212, 160, 23, 0.45);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .cb-filter-label,
:root[data-theme="light"] body.admin-academy .cb-add-lesson-row:hover,
:root[data-theme="light"] body.admin-academy .cb-badge,
:root[data-theme="light"] body.admin-academy .cb-admin-note h4,
:root[data-theme="light"] body.admin-academy .membership-header h1,
:root[data-theme="light"] body.admin-academy .um-active-count,
:root[data-theme="light"] body.admin-academy .um-btn-view {
    color: var(--accent-color);
}

:root[data-theme="light"] body.admin-academy .cb-pill,
:root[data-theme="light"] body.admin-academy .um-plan-badge.active,
:root[data-theme="light"] body.admin-academy .membership-badge.active,
:root[data-theme="light"] body.admin-academy .um-pay-status.success {
    background: #DCFCE7;
    border-color: rgba(22, 163, 74, 0.25);
    color: var(--success);
}

:root[data-theme="light"] body.admin-academy .um-plan-badge.expired,
:root[data-theme="light"] body.admin-academy .membership-badge.inactive,
:root[data-theme="light"] body.admin-academy .um-pay-status.failed {
    background: #FEE2E2;
    border-color: rgba(220, 38, 38, 0.25);
    color: var(--danger);
}

:root[data-theme="light"] body.admin-academy .cb-badge,
:root[data-theme="light"] body.admin-academy .cb-admin-note,
:root[data-theme="light"] body.admin-academy .um-btn-view,
:root[data-theme="light"] body.admin-academy .membership-action-btn.toggle,
:root[data-theme="light"] body.admin-academy .um-pay-status.pending {
    background: #FEF3C7;
    border-color: rgba(217, 119, 6, 0.28);
    color: var(--warning);
}

:root[data-theme="light"] body.admin-academy .search-box input,
:root[data-theme="light"] body.admin-academy .cb-filter-field select,
:root[data-theme="light"] body.admin-academy .course-domain-filter {
    background: #FFFFFF;
    border-color: var(--border-color);
    color: var(--text-primary);
}

:root[data-theme="light"] body.admin-academy .export-btn,
:root[data-theme="light"] body.admin-academy .btn-add-topic {
    background: var(--accent-color);
    color: #ffffff;
}

:root[data-theme="light"] body.admin-academy .um-avatar--placeholder {
    background: var(--accent-color);
    color: #ffffff;
}

:root[data-theme="light"] .select2-container--default .select2-selection--single {
    background: #FFFFFF !important;
    border-color: #E2E8F0 !important;
}

:root[data-theme="light"] .select2-container--default .select2-selection__rendered,
:root[data-theme="light"] .select2-results__option,
:root[data-theme="light"] .select2-search__field {
    color: var(--text-primary) !important;
}

:root[data-theme="light"] .select2-dropdown,
:root[data-theme="light"] .select2-search__field {
    background: #FFFFFF !important;
    border-color: #E2E8F0 !important;
}

:root[data-theme="light"] .select2-results__option--highlighted {
    background: #F1F5F9 !important;
    color: var(--text-primary) !important;
}

:root[data-theme="light"] .select2-container--default .select2-selection--single .select2-selection__clear {
    color: #475569 !important;
}
