/* ==========================================================================
   Light Theme Overrides for Classic Portal Style
   Converts the modern dark portal to a clean, flat, legacy-friendly look.
   Only loaded when data-theme="light" (affiliate-alt pages).
   ========================================================================== */

/* ---------- CSS Variable Overrides ---------- */

[data-theme="light"] {
    --lrn-card-bg: #fff;
    --lrn-card-bg-hover: #f8f9fa;
    --lrn-card-border: #e0e4e8;

    --lrn-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --lrn-shadow-md: 0 2px 6px rgba(0, 0, 0, 0.08);
    --lrn-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --lrn-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06);
    --lrn-shadow-card-hover: 0 2px 8px rgba(0, 0, 0, 0.1);
    --lrn-shadow-primary: 0 2px 6px rgba(74, 158, 255, 0.15);
    --lrn-shadow-glow: none;

    --lrn-gradient-mesh: none;
    --lrn-gradient-primary: none;
    --lrn-gradient-secondary: none;
    --lrn-gradient-card: none;
    --lrn-gradient-purple: none;
    --lrn-gradient-pink: none;
    --lrn-gradient-cyan: none;
    --lrn-gradient-emerald: none;
    --lrn-gradient-amber: none;

    --lrn-accent-emerald: #10b981;
    --lrn-accent-amber: #f59e0b;
    --lrn-accent-purple: #a855f7;
    --lrn-accent-rose: #f43f5e;

    --lrn-border-primary: #d0d7de;
    --lrn-border-secondary: #d0d7de;
}

/* ---------- Base ---------- */

[data-theme="light"] body,
body.light-theme {
    background-color: #f5f7fa;
    color: #292929;
    font-family: Arial, Helvetica, sans-serif;
}

[data-theme="light"] .lrn-main-content {
    background: #f5f7fa !important;
}

/* ---------- Kill ALL gradient mesh backgrounds on page sections ---------- */

[data-theme="light"] .station-details,
[data-theme="light"] .talent-profile,
[data-theme="light"] .calendar-weekly,
[data-theme="light"] .calendar-day,
[data-theme="light"] .edit-tasks,
[data-theme="light"] .new-task,
[data-theme="light"] .task-view,
[data-theme="light"] .logs-hub,
[data-theme="light"] .view-log,
[data-theme="light"] .affiliate-support,
[data-theme="light"] .affiliate-landing {
    background: #f5f7fa !important;
}

/* ---------- Header Cards (the big gradient banner at top of each page) ---------- */

[data-theme="light"] .station-header-card,
[data-theme="light"] .profile-header-card,
[data-theme="light"] .calendar-header-card,
[data-theme="light"] .day-header-card,
[data-theme="light"] .edit-header-card,
[data-theme="light"] .task-header-card,
[data-theme="light"] .view-header-card,
[data-theme="light"] .logs-header-card,
[data-theme="light"] .log-header-card {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* Kill the ::before gradient accent bars */
[data-theme="light"] .station-header-card::before,
[data-theme="light"] .profile-header-card::before,
[data-theme="light"] .calendar-header-card::before,
[data-theme="light"] .day-header-card::before,
[data-theme="light"] .edit-header-card::before,
[data-theme="light"] .task-header-card::before,
[data-theme="light"] .view-header-card::before,
[data-theme="light"] .logs-header-card::before,
[data-theme="light"] .log-header-card::before {
    background: #4a9eff !important;
}

/* ---------- Icon Wrappers (gradient circles/boxes with icons) ---------- */

[data-theme="light"] .station-logo-wrapper,
[data-theme="light"] .avatar-placeholder,
[data-theme="light"] .calendar-icon-wrapper,
[data-theme="light"] .day-icon-wrapper,
[data-theme="light"] .edit-icon-wrapper,
[data-theme="light"] .task-icon-wrapper,
[data-theme="light"] .view-icon-wrapper,
[data-theme="light"] .logs-icon-wrapper,
[data-theme="light"] .log-icon-wrapper,
[data-theme="light"] .contact-card-icon,
[data-theme="light"] .icon-wrapper {
    background: #4a9eff !important;
    box-shadow: none !important;
}

/* ---------- Kill ALL Animations ---------- */

[data-theme="light"] .animate-fade-in,
[data-theme="light"] .fade-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

[data-theme="light"] [class*="animate-delay-"] {
    animation-delay: 0s !important;
}

/* ---------- Kill Hover Transforms ---------- */

[data-theme="light"] .contact-card:hover,
[data-theme="light"] .quick-link:hover,
[data-theme="light"] .station-card:hover,
[data-theme="light"] .day-card:hover,
[data-theme="light"] .log-item:hover,
[data-theme="light"] .task-card:hover,
[data-theme="light"] .scheduler-quick-card:hover,
[data-theme="light"] .day-box:hover,
[data-theme="light"] .btn-view:hover,
[data-theme="light"] .btn-edit:hover,
[data-theme="light"] .btn-delete:hover,
[data-theme="light"] .btn-download:hover,
[data-theme="light"] .audio-link:hover,
[data-theme="light"] .btn-action:hover,
[data-theme="light"] .btn-success-modern:hover,
[data-theme="light"] .btn-danger-modern:hover,
[data-theme="light"] .btn-primary-modern:hover {
    transform: none !important;
}

/* ---------- Flatten Shadows on Hover ---------- */

[data-theme="light"] .contact-card:hover,
[data-theme="light"] .day-card:hover,
[data-theme="light"] .log-item:hover,
[data-theme="light"] .day-box:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* ---------- Cards and Panels ---------- */

[data-theme="light"] .lrn-card,
[data-theme="light"] .card-modern,
[data-theme="light"] .card-body-modern,
[data-theme="light"] .contact-card {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .contact-card:hover {
    border-color: #4a9eff !important;
    background: #f8fbff !important;
}

/* ---------- Stat Cards ---------- */

[data-theme="light"] .stat-card {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    border-radius: 8px !important;
}

/* ---------- Buttons: Flatten Gradients ---------- */

[data-theme="light"] .btn-action.btn-primary,
[data-theme="light"] .btn-primary-modern {
    background: #4a9eff !important;
    box-shadow: none !important;
}

[data-theme="light"] .btn-action.btn-primary:hover,
[data-theme="light"] .btn-primary-modern:hover {
    background: #3a8eef !important;
    box-shadow: none !important;
}

[data-theme="light"] .btn-action.btn-secondary,
[data-theme="light"] .btn-secondary,
[data-theme="light"] .btn-modern.btn-secondary-modern {
    background: #f8f9fa !important;
    color: #495057 !important;
    border-color: #dee2e6 !important;
}

[data-theme="light"] .btn-action.btn-secondary:hover {
    background: #e9ecef !important;
}

[data-theme="light"] .btn-success-modern {
    background: #10b981 !important;
}

[data-theme="light"] .btn-danger-modern,
[data-theme="light"] .btn-delete-confirm {
    background: #ef4444 !important;
}

[data-theme="light"] .btn-replace-delete {
    background: #ef4444 !important;
}

/* Small action buttons in tables */
[data-theme="light"] .btn-view,
[data-theme="light"] .btn-edit,
[data-theme="light"] .btn-download {
    background: #e3f2fd !important;
    color: #1565c0 !important;
    border: 1px solid #bbdefb !important;
}

[data-theme="light"] .btn-delete {
    background: #ffebee !important;
    color: #c62828 !important;
    border: 1px solid #ffcdd2 !important;
}

/* ---------- Semi-transparent Badges → Solid Light Colors ---------- */

[data-theme="light"] .meta-badge {
    background: #e3f2fd !important;
    color: #1565c0 !important;
    border: 1px solid #bbdefb !important;
}

[data-theme="light"] .meta-badge.meta-format {
    background: #f3e8ff !important;
    color: #7c3aed !important;
    border: 1px solid #e9d5ff !important;
}

[data-theme="light"] .meta-badge.meta-limit {
    background: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fef3c7 !important;
}

[data-theme="light"] .meta-badge.meta-total {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #d1fae5 !important;
}

[data-theme="light"] .badge-local {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

[data-theme="light"] .badge-network {
    background: #dbeafe !important;
    color: #1e40af !important;
}

[data-theme="light"] .badge-empty {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

[data-theme="light"] .status-badge,
[data-theme="light"] .priority-badge {
    border-radius: 4px !important;
}

/* ---------- Header Stat Boxes ---------- */

[data-theme="light"] .header-stat {
    background: #f0f4f8 !important;
    border: 1px solid #e0e4e8 !important;
}

/* ---------- Task Stat Cards ---------- */

[data-theme="light"] .task-stat-card {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    border-radius: 8px !important;
}

[data-theme="light"] .task-stat-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .task-stat-fill {
    background: #4a9eff !important;
}

[data-theme="light"] .task-stat-card.available .task-stat-fill {
    background: #10b981 !important;
}

/* ---------- Tables ---------- */

[data-theme="light"] .lrn-table th,
[data-theme="light"] .data-table-modern th,
[data-theme="light"] .tasks-table th,
[data-theme="light"] .files-table th,
[data-theme="light"] .log-table th {
    background: #f0f2f5 !important;
    color: #495057 !important;
    border-color: #e0e4e8 !important;
}

[data-theme="light"] .lrn-table td,
[data-theme="light"] .data-table-modern td,
[data-theme="light"] .tasks-table td,
[data-theme="light"] .files-table td,
[data-theme="light"] .log-table td {
    border-color: #e9ecef !important;
    color: #212529 !important;
}

/* Table row hover */
[data-theme="light"] .lrn-table tbody tr:hover td,
[data-theme="light"] .data-table-modern tbody tr:hover,
[data-theme="light"] .tasks-table tbody tr:hover,
[data-theme="light"] .files-table tbody tr:hover,
[data-theme="light"] .log-table tbody tr:hover,
[data-theme="light"] .schedule-row:hover {
    background: #f0f5ff !important;
}

/* Colored row highlights → solid light backgrounds */
[data-theme="light"] .row-network,
[data-theme="light"] .tasks-table tbody tr.network-task {
    background: #eff6ff !important;
}

[data-theme="light"] .row-local,
[data-theme="light"] .tasks-table tbody tr.local-task {
    background: #fef2f2 !important;
}

[data-theme="light"] .row-weather,
[data-theme="light"] .tasks-table tbody tr.weather-task {
    background: #ecfdf5 !important;
}

[data-theme="light"] .row-shuffle {
    background: #fffbeb !important;
}

[data-theme="light"] .voicetrack-row {
    background: #f5f3ff !important;
}

[data-theme="light"] .log-table tr:nth-child(even) {
    background: #f8f9fa !important;
}

/* ---------- Forms ---------- */

[data-theme="light"] .form-control,
[data-theme="light"] .lrn-input,
[data-theme="light"] .lrn-select,
[data-theme="light"] .form-select,
[data-theme="light"] .task-select,
[data-theme="light"] select,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="tel"],
[data-theme="light"] input[type="url"],
[data-theme="light"] textarea {
    background: #fff !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
    border-radius: 6px !important;
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .lrn-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .task-select:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    border-color: #4a9eff !important;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2) !important;
}

[data-theme="light"] .checkbox-label:hover {
    background: #f0f5ff !important;
}

/* ---------- Modals ---------- */

[data-theme="light"] .modal-overlay,
[data-theme="light"] .lrn-modal-backdrop {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: none !important;
}

[data-theme="light"] .modal-container,
[data-theme="light"] .modal-content,
[data-theme="light"] .lrn-modal,
[data-theme="light"] .lrn-modal-content {
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .modal-header {
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
}

[data-theme="light"] .modal-footer {
    background: #f8f9fa !important;
    border-top: 1px solid #e9ecef !important;
}

/* ---------- Info Banners ---------- */

[data-theme="light"] .info-banner {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1e40af !important;
}

/* ---------- Quick Links ---------- */

[data-theme="light"] .quick-link {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
}

[data-theme="light"] .quick-link:hover {
    background: #f0f5ff !important;
    border-color: #4a9eff !important;
}

/* ---------- Log Items ---------- */

[data-theme="light"] .log-item {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
}

[data-theme="light"] .log-item:hover {
    background: #f8fbff !important;
    border-color: #4a9eff !important;
}

[data-theme="light"] .log-item:hover .log-arrow {
    transform: none !important;
}

[data-theme="light"] .log-icon {
    background: #f0f4f8 !important;
    color: #4a9eff !important;
}

/* ---------- Calendar Day Cards ---------- */

[data-theme="light"] .day-card {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
    border-radius: 8px !important;
}

[data-theme="light"] .day-header {
    background: #4a9eff !important;
}

[data-theme="light"] .day-footer {
    background: #f8f9fa !important;
    border-top: 1px solid #e9ecef !important;
}

/* ---------- Calendar Day View (schedule rows) ---------- */

[data-theme="light"] .time-slot {
    background: #e3f2fd !important;
    color: #1565c0 !important;
}

/* ---------- Breadcrumbs ---------- */

[data-theme="light"] .breadcrumb-nav {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
}

/* ---------- Page Header ---------- */

[data-theme="light"] .page-header-modern {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
}

/* ---------- Section Headers ---------- */

[data-theme="light"] .section-header {
    border-bottom-color: #e0e4e8 !important;
}

/* ---------- Top Nav Header (fully light) ---------- */

[data-theme="light"] .lrn-admin-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e0e4e8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* Top-bar nav buttons (Home / Alerts / Support / Editor …) */
[data-theme="light"] .lrn-nav-btn,
[data-theme="light"] .lrn-nav-btn span,
[data-theme="light"] .lrn-nav-btn i {
    color: #495057 !important;
}
[data-theme="light"] .lrn-nav-btn:hover {
    background: #f0f5ff !important;
}
[data-theme="light"] .lrn-nav-btn:hover,
[data-theme="light"] .lrn-nav-btn:hover span,
[data-theme="light"] .lrn-nav-btn:hover i {
    color: #1565c0 !important;
}

/* User chip (name / role / dropdown caret) */
[data-theme="light"] .lrn-admin-header .lrn-user-info .lrn-username,
[data-theme="light"] .lrn-username {
    color: #1f2937 !important;
}
[data-theme="light"] .lrn-admin-header .lrn-user-info .lrn-role,
[data-theme="light"] .lrn-role,
[data-theme="light"] .lrn-dropdown-icon {
    color: #6c757d !important;
}
[data-theme="light"] .lrn-user-menu-toggle:hover {
    background: #f0f5ff !important;
}
/* keep the avatar circle on-brand (blue bg, white initial) */
[data-theme="light"] .lrn-user-avatar {
    background: #4a9eff !important;
    color: #fff !important;
}

/* ---------- Left Sidebar (fully light) ---------- */

[data-theme="light"] .lrn-side-nav {
    background: #ffffff !important;
    border-right: 1px solid #e0e4e8 !important;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.04) !important;
}

/* Section titles (AFFILIATE/FORMAT, TALENT, CONTENT) */
[data-theme="light"] .lrn-side-nav-title,
[data-theme="light"] .lrn-side-nav-title.collapsible {
    background: transparent !important;
    color: #6c757d !important;
    -webkit-text-fill-color: #6c757d !important;
}
[data-theme="light"] .lrn-side-nav-title.collapsible:hover {
    background: #f0f2f5 !important;
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
}

/* Nav links */
[data-theme="light"] .lrn-nav-link,
[data-theme="light"] .lrn-nav-group li a {
    color: #495057 !important;
    background: transparent !important;
}
[data-theme="light"] .lrn-nav-link i,
[data-theme="light"] .lrn-nav-group li a i {
    color: #6c757d !important;
}
[data-theme="light"] .lrn-nav-link:hover,
[data-theme="light"] .lrn-nav-group li a:hover {
    background: #f0f5ff !important;
    color: #1565c0 !important;
}
[data-theme="light"] .lrn-nav-link:hover i,
[data-theme="light"] .lrn-nav-group li a:hover i {
    color: #1565c0 !important;
}
[data-theme="light"] .lrn-nav-link.active,
[data-theme="light"] .lrn-nav-group li a.active {
    background: #e3f2fd !important;
    color: #1565c0 !important;
}
[data-theme="light"] .lrn-nav-link.active i,
[data-theme="light"] .lrn-nav-group li a.active i {
    color: #1565c0 !important;
}

/* Sidebar search box */
[data-theme="light"] .lrn-nav-search {
    background: #f0f2f5 !important;
    border-color: #e0e4e8 !important;
}
[data-theme="light"] .lrn-search-input {
    background: #ffffff !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
}
[data-theme="light"] .lrn-search-input:focus {
    border-color: #4a9eff !important;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2) !important;
}
[data-theme="light"] .lrn-search-input::placeholder {
    color: #adb5bd !important;
}
[data-theme="light"] .lrn-search-clear {
    color: #6c757d !important;
}
[data-theme="light"] .lrn-search-clear:hover {
    background: #e9ecef !important;
}

/* Collapse toggle (the hamburger / chevron at the sidebar foot) */
[data-theme="light"] .lrn-side-nav-toggle,
[data-theme="light"] .lrn-nav-collapse-toggle {
    color: #495057 !important;
    background: #f0f2f5 !important;
    border: 1px solid #e0e4e8 !important;
}
[data-theme="light"] .lrn-side-nav-toggle:hover,
[data-theme="light"] .lrn-nav-collapse-toggle:hover {
    background: #e9ecef !important;
}
[data-theme="light"] .lrn-nav-collapse-toggle .toggle-line,
[data-theme="light"] .lrn-side-nav-toggle .toggle-line {
    background: #495057 !important;
}

/* ---------- Scheduler Quick Cards (affiliate landing) ---------- */

[data-theme="light"] .scheduler-quick-card {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
}

[data-theme="light"] .scheduler-quick-card:hover {
    border-color: #4a9eff !important;
    background: #f8fbff !important;
}

/* ---------- Station Cards (modern affiliate landing) ---------- */

[data-theme="light"] .station-card {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .station-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border-color: #4a9eff !important;
}

[data-theme="light"] .station-card-header {
    background: #4a9eff !important;
}

[data-theme="light"] .station-card-header::before {
    display: none !important;
}

[data-theme="light"] .station-card-footer {
    background: #f8f9fa !important;
    border-top: 1px solid #e9ecef !important;
}

/* ---------- Scrollbar ---------- */

[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f0f2f5;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #c1c7cd;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #a0a8b0;
}

/* ---------- Misc ---------- */

[data-theme="light"] .empty-state .empty-icon {
    color: #adb5bd;
}

[data-theme="light"] pre,
[data-theme="light"] code {
    background: #f0f2f5 !important;
    color: #212529 !important;
}

[data-theme="light"] .dropdown-menu {
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* ---------- Reduce All Border Radius to Classic ---------- */

[data-theme="light"] .card-modern,
[data-theme="light"] .modal-container,
[data-theme="light"] .lrn-modal-content {
    border-radius: 8px !important;
}

/* ==========================================================================
   Modern-page fixes — light theme is now user-selectable on MODERN/admin
   pages (not just classic -alt). These restore contrast where the modern
   dark components assumed a gradient/white-on-dark treatment.
   ========================================================================== */

/* Card headers use a dark gradient + white text by default; light kills the
   gradient, which left white-on-white. Give them a clean light header bar. */
[data-theme="light"] .lrn-card-header {
    background: #eef1f5 !important;
    border-bottom: 1px solid var(--lrn-border-color) !important;
}
[data-theme="light"] .lrn-card-header,
[data-theme="light"] .lrn-card-header h1,
[data-theme="light"] .lrn-card-header h2,
[data-theme="light"] .lrn-card-header h3,
[data-theme="light"] .lrn-card-header i {
    color: #1f2937 !important;
}

/* Page titles can use gradient-clipped text (transparent fill) for the dark
   look — force a solid dark fill in light so they're readable. */
[data-theme="light"] .page-title,
[data-theme="light"] .page-title *,
[data-theme="light"] .page-header-modern .page-title,
[data-theme="light"] .page-header-modern .page-title * {
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
    background: none !important;
}
/* keep the title's icon chip on-brand (it has its own gradient bg + white icon) */
[data-theme="light"] .page-title .title-icon,
[data-theme="light"] .page-title .title-icon * {
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
}

/* ==========================================================================
   Modern-component coverage — round 2. The unscoped dark rules in
   lrn-dark-theme-enhanced.css paint these bare framework classes with dark
   gradients / white text that leak onto light. Restore light treatment.
   ========================================================================== */

/* ---------- Bare buttons (not the -modern variants already handled) ---------- */
/* --lrn-gradient-primary is `none` on light, so `.btn-primary { background: var(--lrn-gradient-primary) }`
   renders transparent — give these explicit solid fills. */
[data-theme="light"] .btn-primary,
[data-theme="light"] .button.blue {
    background: #4a9eff !important;
    color: #fff !important;
    border: 1px solid #4a9eff !important;
}
[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .button.blue:hover {
    background: #3a8eef !important;
    border-color: #3a8eef !important;
}
[data-theme="light"] .btn-success {
    background: #10b981 !important;
    color: #fff !important;
    border: 1px solid #10b981 !important;
}
[data-theme="light"] .btn-success:hover { background: #059669 !important; }
[data-theme="light"] .btn-danger {
    background: #ef4444 !important;
    color: #fff !important;
    border: 1px solid #ef4444 !important;
}
[data-theme="light"] .btn-danger:hover { background: #dc2626 !important; }

/* generic .btn base (when used without a colour variant) */
[data-theme="light"] .btn {
    box-shadow: none !important;
}

/* ---------- Bare badges (otherwise white-text-on-transparent = invisible) ---------- */
[data-theme="light"] .badge-primary {
    background: #e3f2fd !important;
    color: #1565c0 !important;
}
[data-theme="light"] .badge-success {
    background: #ecfdf5 !important;
    color: #047857 !important;
}
[data-theme="light"] .badge-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
}
[data-theme="light"] .badge-warning,
[data-theme="light"] .badge-warning-modern {
    background: #fffbeb !important;
    color: #b45309 !important;
}
/* Role badges (affiliate / talent / scheduler / admin …) */
[data-theme="light"] .badge-affiliate,
[data-theme="light"] .badge-talent,
[data-theme="light"] .badge-scheduler,
[data-theme="light"] .badge-admin,
[data-theme="light"] .badge-accounting,
[data-theme="light"] .badge-sales {
    background: #eef2f7 !important;
    color: #334155 !important;
    border: 1px solid #d0d7de !important;
}

/* ---------- Inputs the original light pass missed ---------- */
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="search"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="datetime-local"],
[data-theme="light"] input[type="time"] {
    background: #fff !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
    border-radius: 6px !important;
}
[data-theme="light"] input[type="password"]:focus,
[data-theme="light"] input[type="search"]:focus,
[data-theme="light"] input[type="date"]:focus {
    border-color: #4a9eff !important;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2) !important;
}

/* ---------- Form labels & helper text (guarantee readable contrast) ---------- */
[data-theme="light"] .lrn-form-group label,
[data-theme="light"] .form-group label,
[data-theme="light"] .lrn-form label,
[data-theme="light"] .lrn-checkbox-label,
[data-theme="light"] .lrn-checkbox-label span {
    color: #1f2937 !important;
}
[data-theme="light"] .lrn-form-help,
[data-theme="light"] .form-text,
[data-theme="light"] small.text-muted {
    color: #6c757d !important;
}

/* ---------- List / detail rows that leak a dark fill ---------- */
[data-theme="light"] .detail-list-item,
[data-theme="light"] .note-item,
[data-theme="light"] .active-user-item {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    color: #212529 !important;
}

/* ---------- Generic table class + ensure rows sit on white ---------- */
[data-theme="light"] .data-table th {
    background: #f0f2f5 !important;
    color: #495057 !important;
    border-color: #e0e4e8 !important;
}
[data-theme="light"] .data-table td {
    border-color: #e9ecef !important;
    color: #212529 !important;
}
[data-theme="light"] .lrn-table tbody tr,
[data-theme="light"] .data-table tbody tr {
    background: #ffffff !important;
}
[data-theme="light"] .lrn-table tbody tr:hover,
[data-theme="light"] .data-table tbody tr:hover {
    background: #f0f5ff !important;
}

/* ---------- Generic card + modal backdrop the first pass missed ---------- */
[data-theme="light"] .card {
    background: #fff !important;
    border: 1px solid #e0e4e8 !important;
}
[data-theme="light"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.4) !important;
}

/* ---------- Gradient-clipped text → solid (transparent fill is invisible when
   --lrn-gradient-primary is `none` on light) ---------- */
[data-theme="light"] .gradient-text {
    background: none !important;
    -webkit-text-fill-color: #1f2937 !important;
    color: #1f2937 !important;
}

/* ---------- Footer (was a dark strip) ---------- */
[data-theme="light"] .lrn-footer,
[data-theme="light"] .portal-footer {
    background: #ffffff !important;
    border-top: 1px solid #e0e4e8 !important;
    color: #6c757d !important;
}
[data-theme="light"] .lrn-footer a,
[data-theme="light"] .portal-footer a {
    color: #1565c0 !important;
}

/* ==========================================================================
   MODERN LIGHT THEME — soft ("less light") palette.
   Fenced to data-theme="light" pages that are NOT data-theme-locked, i.e.
   the MODERN portal only. Classic/legacy -alt pages render
   data-theme="light" data-theme-locked and are intentionally excluded, so
   none of this softening reaches Classic View. (See the CLASSIC VIEW block
   below, which restores the original dark chrome on locked pages.)
   These rules load LAST and use :not([...]) (extra specificity), so they
   win over the bright-white rules above on modern pages.
   ========================================================================== */

[data-theme="light"]:not([data-theme-locked]) {
    --lrn-text-muted: #667085;            /* was #adb5bd (~1.9:1) — now readable */
    --lrn-bg-hover: #d9e0e9;
    --lrn-bg-elevated: #e2e8f0;
    --lrn-glass-bg: #e2e8f0;
    --lrn-glass-border: #bcc6d3;
    --lrn-accent-pink: #ec4899;
    --lrn-accent-cyan: #06b6d4;
    --lrn-gradient-elevated: none;
    --lrn-gradient-success: linear-gradient(135deg, #10b981, #059669);
    --lrn-gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);
    --lrn-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
    --lrn-shadow-xl: 0 8px 24px rgba(16, 24, 40, 0.10);
    --lrn-shadow-hover: 0 4px 12px rgba(16, 24, 40, 0.08);
    --lrn-shadow-float: 0 6px 18px rgba(16, 24, 40, 0.08);
    --lrn-shadow-inset: inset 0 1px 2px rgba(16, 24, 40, 0.05);
    --lrn-card-bg: #e2e8f0;
    --lrn-card-bg-hover: #d9e0e9;
    --lrn-card-border: #bcc6d3;
    --lrn-border-color: #bcc6d3;
    --lrn-border-primary: #bcc6d3;
    --lrn-border-secondary: #bcc6d3;
}

/* Canvas — soft grey; kill the body teal gradient (shorthand) + waves */
[data-theme="light"]:not([data-theme-locked]) body {
    background: #cdd5e0 !important;
    color: #292929;
}
[data-theme="light"]:not([data-theme-locked]) .lrn-main-content,
[data-theme="light"]:not([data-theme-locked]) .lrn-main-with-sidenav {
    background: transparent !important;
}
[data-theme="light"]:not([data-theme-locked]) .lrn-background-waves,
[data-theme="light"]:not([data-theme-locked]) .login-background,
[data-theme="light"]:not([data-theme-locked]) .wave,
[data-theme="light"]:not([data-theme-locked]) .lrn-bg-wave {
    display: none !important;
}

/* Surfaces — soft off-white (not stark #fff) */
[data-theme="light"]:not([data-theme-locked]) .lrn-card,
[data-theme="light"]:not([data-theme-locked]) .card,
[data-theme="light"]:not([data-theme-locked]) .card-modern,
[data-theme="light"]:not([data-theme-locked]) .card-body-modern,
[data-theme="light"]:not([data-theme-locked]) .contact-card,
[data-theme="light"]:not([data-theme-locked]) .stat-card,
[data-theme="light"]:not([data-theme-locked]) .task-stat-card,
[data-theme="light"]:not([data-theme-locked]) .station-card,
[data-theme="light"]:not([data-theme-locked]) .scheduler-quick-card,
[data-theme="light"]:not([data-theme-locked]) .day-card,
[data-theme="light"]:not([data-theme-locked]) .quick-link,
[data-theme="light"]:not([data-theme-locked]) .log-item,
[data-theme="light"]:not([data-theme-locked]) .breadcrumb-nav,
[data-theme="light"]:not([data-theme-locked]) .page-header-modern,
[data-theme="light"]:not([data-theme-locked]) .station-header-card,
[data-theme="light"]:not([data-theme-locked]) .profile-header-card,
[data-theme="light"]:not([data-theme-locked]) .modal-content,
[data-theme="light"]:not([data-theme-locked]) .modal-container,
[data-theme="light"]:not([data-theme-locked]) .lrn-modal,
[data-theme="light"]:not([data-theme-locked]) .lrn-modal-content,
[data-theme="light"]:not([data-theme-locked]) .dropdown-menu {
    background: #e2e8f0 !important;
    border-color: #bcc6d3 !important;
}
/* Card header bar — a touch deeper than the card face */
[data-theme="light"]:not([data-theme-locked]) .lrn-card-header {
    background: #d7dde6 !important;
}

/* Chrome — soft light (top bar / sidebar / footer) */
[data-theme="light"]:not([data-theme-locked]) .lrn-admin-header {
    background: #d3dae4 !important;
    border-bottom: 1px solid #bcc6d3 !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06) !important;
}
[data-theme="light"]:not([data-theme-locked]) .lrn-side-nav {
    background: #d3dae4 !important;
    border-right: 1px solid #bcc6d3 !important;
    box-shadow: 1px 0 3px rgba(16, 24, 40, 0.04) !important;
}
[data-theme="light"]:not([data-theme-locked]) .lrn-footer,
[data-theme="light"]:not([data-theme-locked]) .portal-footer {
    background: #d3dae4 !important;
    border-top: 1px solid #bcc6d3 !important;
}
[data-theme="light"]:not([data-theme-locked]) .lrn-nav-search {
    background: #c8d1dd !important;
}

/* Table header — slightly deeper than the soft card */
[data-theme="light"]:not([data-theme-locked]) .lrn-table th,
[data-theme="light"]:not([data-theme-locked]) .data-table th,
[data-theme="light"]:not([data-theme-locked]) .data-table-modern th,
[data-theme="light"]:not([data-theme-locked]) .tasks-table th,
[data-theme="light"]:not([data-theme-locked]) .files-table th,
[data-theme="light"]:not([data-theme-locked]) .log-table th {
    background: #d0d8e2 !important;
}
/* Table body sits on the soft card, not stark white */
[data-theme="light"]:not([data-theme-locked]) .lrn-table tbody tr,
[data-theme="light"]:not([data-theme-locked]) .data-table tbody tr {
    background: #e2e8f0 !important;
}

/* ==========================================================================
   CLASSIC VIEW PRESERVATION
   Legacy "-alt" pages (affiliate-alt / talent-alt / jack-alt / …) render
   <html data-theme="light" data-theme-locked="1">. They must keep their
   ORIGINAL look — the modern light overhaul (light + softened chrome) must
   NOT reach them. These [data-theme-locked] rules have higher specificity
   than the modern chrome rules above, so on locked pages they win and
   restore the classic dark top bar / footer with readable light text.
   ========================================================================== */

[data-theme="light"][data-theme-locked] .lrn-admin-header {
    background: #262626 !important;
    border-bottom: 1px solid #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}
[data-theme="light"][data-theme-locked] .lrn-nav-btn,
[data-theme="light"][data-theme-locked] .lrn-nav-btn span,
[data-theme="light"][data-theme-locked] .lrn-nav-btn i {
    color: rgba(255, 255, 255, 0.85) !important;
}
[data-theme="light"][data-theme-locked] .lrn-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="light"][data-theme-locked] .lrn-admin-header .lrn-user-info .lrn-username,
[data-theme="light"][data-theme-locked] .lrn-username {
    color: #ffffff !important;
}
[data-theme="light"][data-theme-locked] .lrn-admin-header .lrn-user-info .lrn-role,
[data-theme="light"][data-theme-locked] .lrn-role,
[data-theme="light"][data-theme-locked] .lrn-dropdown-icon {
    color: rgba(255, 255, 255, 0.6) !important;
}
[data-theme="light"][data-theme-locked] .lrn-user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="light"][data-theme-locked] .lrn-footer,
[data-theme="light"][data-theme-locked] .portal-footer {
    background: #262626 !important;
    border-top: 1px solid #333 !important;
    color: rgba(255, 255, 255, 0.7) !important;
}
[data-theme="light"][data-theme-locked] .lrn-footer a,
[data-theme="light"][data-theme-locked] .portal-footer a {
    color: #6bb0ff !important;
}
