/*
 * Court Manager clean profile
 * This layer intentionally loads last. It converts legacy dark-only surfaces
 * into a complete light UI when the shared clean profile is selected.
 */
body[data-theme="clean_white_gold"] {
    color-scheme: light;
    background:
        radial-gradient(circle at 100% 0, rgba(37, 99, 235, .07), transparent 28rem),
        #f7f8fa !important;
    color: #172033 !important;
}

body[data-theme="clean_white_gold"] .main,
body[data-theme="clean_white_gold"] .content-shell,
body[data-theme="clean_white_gold"] .page,
body[data-theme="clean_white_gold"] .dashboard,
body[data-theme="clean_white_gold"] .dashboard-shell,
body[data-theme="clean_white_gold"] .workspace-shell,
body[data-theme="clean_white_gold"] .tournament-dashboard-main {
    background-color: transparent !important;
    color: #172033 !important;
}

body[data-theme="clean_white_gold"] .content-shell::before {
    background: rgba(255, 255, 255, .58) !important;
    border-color: rgba(216, 222, 233, .72) !important;
}

body[data-theme="clean_white_gold"] .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #d8c27a !important;
    box-shadow: 12px 0 32px rgba(15, 42, 73, .08) !important;
}

body[data-theme="clean_white_gold"] .sidebar .brand,
body[data-theme="clean_white_gold"] .sidebar-nav .sidebar-nav-section {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

body[data-theme="clean_white_gold"] .sidebar .brand strong,
body[data-theme="clean_white_gold"] .sidebar .brand span,
body[data-theme="clean_white_gold"] .brand-copy strong,
body[data-theme="clean_white_gold"] .brand-copy span {
    color: #102a49 !important;
}

body[data-theme="clean_white_gold"] .sidebar-nav .sidebar-section-title {
    color: #9a6b00 !important;
}

body[data-theme="clean_white_gold"] .sidebar-nav a,
body[data-theme="clean_white_gold"] .sidebar-nav .nav-link {
    color: #27364d !important;
}

body[data-theme="clean_white_gold"] .sidebar-nav a:hover,
body[data-theme="clean_white_gold"] .sidebar-nav .nav-link:hover,
body[data-theme="clean_white_gold"] .sidebar-nav a.active,
body[data-theme="clean_white_gold"] .sidebar-nav .nav-link.active {
    color: #0f3f80 !important;
    background: #eaf2ff !important;
}

body[data-theme="clean_white_gold"] :is(
    .card, .panel, .module-panel, .section-shell, .stat-card, .summary-item,
    .metric, .native-card, .activity-row, .stack-row, .compact-row,
    .workspace-action-card, .mobile-action-card, .program-card, .program-option,
    .choice-card, .date-card, .coach-calendar-day, .mobile-day-card,
    .payment-panel, .table-wrap, .modal-content, .theme-card,
    .admin-panel-toggle, .schedule-monitor-card, .finance-stat-box,
    .coach-schedule-card, .coach-schedule-summary, .coach-schedule-panel,
    .training-fee-card, .billing-editor-form, .category-section,
    .manager-zone, .public-info-card, .tournament-manager-card,
    .tournament-manager-create, .event-logo-panel, .support-original,
    .reply-item, .whatsapp-diagnostics-card, .court-reservation-preview,
    .empty, .empty-state-panel
) {
    background: #ffffff !important;
    color: #172033 !important;
    border-color: #d8c27a !important;
    box-shadow: 0 8px 24px rgba(15, 42, 73, .06);
}

body[data-theme="clean_white_gold"] :is(
    .page-header, .page-header-surface, .mobile-app-hero, .workspace-hero,
    .queue-hero, .tournament-manager-header
) {
    background:
        linear-gradient(135deg, rgba(255,255,255,.97), rgba(239,246,255,.94)) !important;
    color: #102a49 !important;
    border-color: #cbd8e8 !important;
    box-shadow: 0 12px 34px rgba(15, 42, 73, .08) !important;
}

body[data-theme="clean_white_gold"] :is(
    h1, h2, h3, h4, h5, h6, label, legend, strong, th,
    .card-title, .action-title, .panel-title, .metric strong,
    .summary-item strong, .theme-card strong
) {
    color: #172033 !important;
}

body[data-theme="clean_white_gold"] :is(
    p, li, td, small, .small-muted, .muted, .card p, .panel p,
    .theme-card p, .summary-item p, .metric span
) {
    color: #5b6474 !important;
}

body[data-theme="clean_white_gold"] :is(input, select, textarea) {
    color: #172033 !important;
    background: #ffffff !important;
    border-color: #b9c5d5 !important;
    box-shadow: none !important;
}

body[data-theme="clean_white_gold"] :is(input, textarea)::placeholder {
    color: #7b8798 !important;
    opacity: 1;
}

body[data-theme="clean_white_gold"] table,
body[data-theme="clean_white_gold"] thead,
body[data-theme="clean_white_gold"] tbody,
body[data-theme="clean_white_gold"] tr,
body[data-theme="clean_white_gold"] td {
    background: #ffffff !important;
    color: #27364d !important;
    border-color: #d8c27a !important;
}

body[data-theme="clean_white_gold"] th,
body[data-theme="clean_white_gold"] thead th {
    background: #edf4ff !important;
    color: #102a49 !important;
    border-color: #cbd8e8 !important;
}

body[data-theme="clean_white_gold"] table tr:nth-child(even) td {
    background: #f8fafc !important;
}

body[data-theme="clean_white_gold"] :is(
    .btn, .btn-dark, .btn-primary, button:not(.danger):not(.btn-danger),
    input[type="submit"], .small-button, .mini-button
) {
    background: #102a49 !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

body[data-theme="clean_white_gold"] :is(
    .btn, .btn-dark, .btn-primary, button:not(.danger):not(.btn-danger)
):hover {
    background: #174b89 !important;
    color: #ffffff !important;
}

body[data-theme="clean_white_gold"] :is(.primary, button.primary, .btn.primary) {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
}

body[data-theme="clean_white_gold"] :is(.danger, .btn-danger, button.danger) {
    background: #b91c1c !important;
    color: #ffffff !important;
    border-color: #991b1b !important;
}

body[data-theme="clean_white_gold"] :is(
    .badge.paid, .badge.success, .status-chip.success, .status-pill.paid
) {
    background: #dcfce7 !important;
    color: #166534 !important;
    border-color: #86efac !important;
}

body[data-theme="clean_white_gold"] :is(
    .badge.danger, .badge.unpaid, .status-chip.danger, .wallet-shortage-notice
) {
    background: #991b1b !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

body[data-theme="clean_white_gold"] .theme-card {
    min-width: 0;
}

body[data-theme="clean_white_gold"] .theme-card.selected {
    border: 2px solid #2563eb !important;
    background: #eff6ff !important;
}

body[data-theme="clean_white_gold"] .theme-card *,
body[data-theme="clean_white_gold"] .theme-card p {
    opacity: 1 !important;
}

body[data-theme="clean_white_gold"] :is(
    .global-announcement-card, .coach-floating-announcement-card
) {
    background: #ffffff !important;
    color: #172033 !important;
    border-color: #2563eb !important;
}

body[data-theme="clean_white_gold"] .developer-footer {
    background: #ffffff !important;
    color: #5b6474 !important;
    border-color: #d8c27a !important;
}

@media (max-width: 900px) {
    body[data-theme="clean_white_gold"] .sidebar {
        background: #ffffff !important;
    }
    body[data-theme="clean_white_gold"] .mobile-nav-toggle,
    body[data-theme="clean_white_gold"] .sidebar-mobile-head {
        background: #102a49 !important;
        color: #ffffff !important;
        border-color: #2563eb !important;
    }
}
