/* Global light palette. The dark 2Desk sidebar remains as a brand anchor. */
html[data-theme="light"] {
    color-scheme: light;
    color: #17263c;
    background: #f3f6fb;
    --blue: #174b82;
    --muted: #61738c;
    --line: #d9e2ee;
    --surface: #fff;
    --surface-raised: #fff;
    --surface-sunken: #edf2f8;
    --tone-info: #1764a5;
    --tone-info-bg: #e5f2ff;
    --tone-info-border: #bfdbf5;
    --tone-success: #18734c;
    --tone-success-bg: #e5f6ed;
    --tone-success-border: #b8e5ca;
    --tone-warning: #8a5a00;
    --tone-warning-bg: #fff4d8;
    --tone-warning-border: #f3d38a;
    --tone-danger: #a33345;
    --tone-danger-bg: #ffeaed;
    --tone-danger-border: #f2c2ca;
    --tone-neutral: #56677d;
    --tone-neutral-bg: #edf1f6;
    --tone-neutral-border: #d6deea;
}

html[data-theme="light"],
html[data-theme="light"] body {
    min-height: 100%;
    color: #17263c;
    background: #f3f6fb;
}

html[data-theme="light"] body {
    background: linear-gradient(145deg, #f7f9fc, #eef3f9 62%, #e9f0f8);
}

html[data-theme="light"] a { color: #145da0; }
html[data-theme="light"] a:hover { color: #0d477f; }
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] strong,
html[data-theme="light"] b,
html[data-theme="light"] legend { color: #14243a; }
html[data-theme="light"] p,
html[data-theme="light"] .muted,
html[data-theme="light"] .help,
html[data-theme="light"] .small,
html[data-theme="light"] .empty { color: #61738c; }
html[data-theme="light"] ::selection { color: #fff; background: #1764a5; }
html[data-theme="light"] hr { border-top-color: #d9e2ee; }

html[data-theme="light"] button,
html[data-theme="light"] .button {
    color: #fff;
    background: linear-gradient(105deg, #1764b5, #315fc0);
    box-shadow: 0 4px 12px #183d6817;
}
html[data-theme="light"] button:hover,
html[data-theme="light"] .button:hover { color: #fff; background: linear-gradient(105deg, #15599f, #294fa8); }
html[data-theme="light"] button.secondary,
html[data-theme="light"] .button.secondary,
html[data-theme="light"] .secondary {
    color: #24415f;
    background: #edf3fa;
    border-color: #cbd9e9;
    box-shadow: none;
}
html[data-theme="light"] button.secondary:hover,
html[data-theme="light"] .button.secondary:hover,
html[data-theme="light"] .secondary:hover { color: #173b62; background: #e1ebf6; }
html[data-theme="light"] button.danger,
html[data-theme="light"] .danger { color: #9d3041; background: #fff0f2; border-color: #edc5cc; }
html[data-theme="light"] button.danger:hover,
html[data-theme="light"] .danger:hover { background: #ffe3e7; }

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    color: #17263c;
    background-color: #fff;
    border-color: #cbd7e5;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #8796a9; }
html[data-theme="light"] input:disabled,
html[data-theme="light"] select:disabled,
html[data-theme="light"] textarea:disabled { color: #74849a; background: #eff3f8; }
html[data-theme="light"] input[type="checkbox"],
html[data-theme="light"] input[type="radio"] { accent-color: #1764b5; }
html[data-theme="light"] label { color: #314760; }
html[data-theme="light"] .help,
html[data-theme="light"] .field-help,
html[data-theme="light"] .form-hint { color: #647790; }
html[data-theme="light"] .field-error { color: #a33345; }
html[data-theme="light"] .readonly-field { color: #344a63; background: #edf2f8; border-color: #d5dfeb; }

/* The persistent controls remain legible in both themes. */
html[data-theme="light"] .theme-toggle {
    min-height: 40px;
    gap: 7px;
    padding: 8px 11px;
    color: #24415f;
    background: #edf3fa;
    border: 1px solid #cbd9e9;
    font-size: 12px;
    white-space: nowrap;
}
html[data-theme="light"] .theme-toggle:hover { background: #e1ebf6; }
html[data-theme="light"] .theme-toggle [data-theme-icon] { font-size: 15px; line-height: 1; }
.auth-main { position: relative; }
.auth-theme-toggle { position: absolute; top: 22px; right: 24px; z-index: 1; width: auto !important; }
@media (max-width: 750px) {
    .auth-theme-toggle { top: 12px; right: 14px; }
}
@media (max-width: 480px) {
    .theme-toggle [data-theme-label] {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

@media (max-width: 380px) {
    .topbar { gap: 8px; padding-right: 12px; padding-left: 12px; }
    .account { min-width: 0; gap: 5px; }
    .account-name { max-width: 84px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .account-name small { display: none; }
    .account form button { min-height: 40px; padding: 8px 9px; font-size: 11px; }
    .theme-toggle { min-width: 40px; min-height: 40px; padding: 8px 9px; }
    .notification-bell { min-width: 40px; width: 40px; min-height: 40px; }
}

/* Authenticated pages keep the branded navy navigation, with light work areas. */
html[data-theme="light"] .workspace { background: transparent; }
html[data-theme="light"] .topbar,
html[data-theme="light"] body.company-dashboard-page .topbar,
html[data-theme="light"] body.analytics-platform-page .topbar {
    color: #17263c;
    background: #fff;
    border-color: #d9e2ee;
}
html[data-theme="light"] .topbar .context,
html[data-theme="light"] .account-name small,
html[data-theme="light"] .platform-admin .topbar .context,
html[data-theme="light"] .platform-admin .account-name small { color: #61738c; }
html[data-theme="light"] .account-name,
html[data-theme="light"] .platform-admin .account-name { color: #17263c; }
html[data-theme="light"] .avatar { color: #174b82; background: #e7eef7; }
html[data-theme="light"] .notification-bell,
html[data-theme="light"] .platform-admin .notification-bell {
    color: #24415f;
    background: #f1f5fa;
    border-color: #d3deeb;
}
html[data-theme="light"] .notification-bell:hover { color: #123b68; background: #e7eef7; }
html[data-theme="light"] .notification-count { color: #fff; background: #1764a5; }

/* Dashboard-specific dark styling must yield to the active light theme. */
html[data-theme="light"] body.company-dashboard-page .topbar .account-name,
html[data-theme="light"] body.analytics-platform-page .topbar .account-name { color: #17263c; }
html[data-theme="light"] body.company-dashboard-page .topbar .account-name small,
html[data-theme="light"] body.analytics-platform-page .topbar .account-name small { color: #61738c; }
html[data-theme="light"] body.company-dashboard-page .topbar .avatar,
html[data-theme="light"] body.analytics-platform-page .topbar .avatar { color: #174b82; background: #e7eef7; }
html[data-theme="light"] body.company-dashboard-page .topbar .notification-bell,
html[data-theme="light"] body.analytics-platform-page .topbar .notification-bell {
    color: #24415f;
    background: #f1f5fa;
    border-color: #d3deeb;
}
html[data-theme="light"] body.company-dashboard-page .topbar .notification-bell:hover,
html[data-theme="light"] body.analytics-platform-page .topbar .notification-bell:hover { color: #123b68; background: #e7eef7; }
html[data-theme="light"] body.company-dashboard-page .topbar form button.secondary,
html[data-theme="light"] body.analytics-platform-page .topbar form button.secondary {
    color: #24415f;
    background: #edf3fa;
    border-color: #cbd9e9;
    box-shadow: none;
}
html[data-theme="light"] body.company-dashboard-page .topbar form button.secondary:hover,
html[data-theme="light"] body.analytics-platform-page .topbar form button.secondary:hover { color: #173b62; background: #e1ebf6; }

html[data-theme="light"] .content,
html[data-theme="light"] .platform-admin .content,
html[data-theme="light"] body.company-dashboard-page .content,
html[data-theme="light"] body.analytics-platform-page .content { color: #17263c; background: transparent; }
html[data-theme="light"] .page-head h1,
html[data-theme="light"] .platform-admin .page-head h1,
html[data-theme="light"] .platform-admin h2 { color: #14243a; }
html[data-theme="light"] .page-head p,
html[data-theme="light"] .platform-admin .page-head p { color: #61738c; }
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .company-dashboard .eyebrow { color: #155e9f; }

html[data-theme="light"] .auth-page { color: #24374f; background: #f3f6fb; }
html[data-theme="light"] .auth-main { background: #fff; }
html[data-theme="light"] .auth-form { color: #24374f; }
html[data-theme="light"] .auth-form h1,
html[data-theme="light"] .auth-form h2 { color: #17263c; }
html[data-theme="light"] .auth-form p,
html[data-theme="light"] .auth-form .footnote { color: #61738c; }
html[data-theme="light"] .auth-form a { color: #145da0; }

html[data-theme="light"] .panel,
html[data-theme="light"] .stat,
html[data-theme="light"] .company-card,
html[data-theme="light"] .knowledge-card,
html[data-theme="light"] .notification-card,
html[data-theme="light"] .company-access,
html[data-theme="light"] .company-access .panel,
html[data-theme="light"] .platform-company-list,
html[data-theme="light"] .platform-create,
html[data-theme="light"] .monitor-card,
html[data-theme="light"] .monitor-note,
html[data-theme="light"] .attachment-card,
html[data-theme="light"] .work-history-change,
html[data-theme="light"] .ops-filters-panel,
html[data-theme="light"] .company-invite,
html[data-theme="light"] .ticket-detail,
html[data-theme="light"] .asset-detail,
html[data-theme="light"] .contract-detail {
    color: #24374f;
    background: #fff;
    border-color: #d9e2ee;
    box-shadow: 0 5px 18px #183d6809;
}
html[data-theme="light"] .panel p,
html[data-theme="light"] .stat .label,
html[data-theme="light"] .company-card p,
html[data-theme="light"] .knowledge-card p,
html[data-theme="light"] .notification-card p,
html[data-theme="light"] .company-dashboard .panel p,
html[data-theme="light"] .company-dashboard .panel .small,
html[data-theme="light"] .company-dashboard .panel .muted { color: #61738c; }
html[data-theme="light"] .panel h2,
html[data-theme="light"] .panel h3,
html[data-theme="light"] .notification-card h2,
html[data-theme="light"] .knowledge-card h2 { color: #17263c; }
html[data-theme="light"] .company-icon { color: #155e9f; background: #e7f1fc; }

html[data-theme="light"] .stat { --card-tone: #61738c; }
html[data-theme="light"] .stat.tone-info { --card-tone: #1764a5; background: linear-gradient(150deg, #edf6ff, #fff 78%); }
html[data-theme="light"] .stat.tone-success { --card-tone: #18734c; background: linear-gradient(150deg, #edf9f2, #fff 78%); }
html[data-theme="light"] .stat.tone-warning { --card-tone: #8a5a00; background: linear-gradient(150deg, #fff8e8, #fff 78%); }
html[data-theme="light"] .stat.tone-danger { --card-tone: #a33345; background: linear-gradient(150deg, #fff1f3, #fff 78%); }
html[data-theme="light"] .stat.tone-neutral { --card-tone: #56677d; background: linear-gradient(150deg, #f2f5f9, #fff 78%); }
html[data-theme="light"] .stat .tag,
html[data-theme="light"] .stat .card-action { color: var(--card-tone, #1764a5); }
html[data-theme="light"] .stat .value { color: #14243a; }
html[data-theme="light"] a.stat-link:hover { box-shadow: 0 12px 28px #183d681c; }

html[data-theme="light"] .pill { color: #56677d; background: #edf1f6; }
html[data-theme="light"] .pill.green,
html[data-theme="light"] .pill.status-resolved,
html[data-theme="light"] .pill.status-closed,
html[data-theme="light"] .pill.status-done,
html[data-theme="light"] .pill.status-available,
html[data-theme="light"] .pill.status-active { color: #176341; background: #def3e7; }
html[data-theme="light"] .pill.blue,
html[data-theme="light"] .pill.tone-info,
html[data-theme="light"] .pill.status-open,
html[data-theme="light"] .pill.status-in-progress,
html[data-theme="light"] .pill.status-in_progress,
html[data-theme="light"] .pill.status-in_use,
html[data-theme="light"] .pill.status-in-use,
html[data-theme="light"] .pill.status-todo,
html[data-theme="light"] .pill.status-trial,
html[data-theme="light"] .pill.priority-normal { color: #15568e; background: #e1f0ff; }
html[data-theme="light"] .pill.tone-warning,
html[data-theme="light"] .pill.status-waiting,
html[data-theme="light"] .pill.status-maintenance,
html[data-theme="light"] .pill.status-due,
html[data-theme="light"] .pill.status-suspended,
html[data-theme="light"] .pill.priority-high { color: #805400; background: #fff1c9; }
html[data-theme="light"] .pill.tone-danger,
html[data-theme="light"] .pill.status-blocked,
html[data-theme="light"] .pill.status-overdue,
html[data-theme="light"] .pill.priority-urgent { color: #982e41; background: #ffe5e9; }
html[data-theme="light"] .pill.status-cancelled,
html[data-theme="light"] .pill.status-retired,
html[data-theme="light"] .pill.status-paused,
html[data-theme="light"] .pill.status-draft,
html[data-theme="light"] .pill.status-ended,
html[data-theme="light"] .pill.priority-low { color: #56677d; background: #edf1f6; }
html[data-theme="light"] .overdue,
html[data-theme="light"] .sla-warning { color: #a33345; }
html[data-theme="light"] .due-soon { color: #8a5a00; }
html[data-theme="light"] .sla-met { color: #18734c; }

html[data-theme="light"] .notice { color: #176341; background: #e8f7ee; border-color: #bde4cb; }
html[data-theme="light"] .notice.error { color: #982e41; background: #fff0f2; border-color: #efc6cd; }
html[data-theme="light"] .notice.info { color: #174f80; background: #eaf4ff; border-color: #c6def5; }
html[data-theme="light"] .check,
html[data-theme="light"] .checks { color: #344a63; background: #f2f5f9; }
html[data-theme="light"] .empty { color: #61738c; }

html[data-theme="light"] table { color: #344a63; }
html[data-theme="light"] th { color: #53677f; background: #f0f4f9; border-color: #d6e0eb; }
html[data-theme="light"] td { color: #344a63; border-color: #e3e9f0; }
html[data-theme="light"] tbody tr:hover { background: #edf4fb; }
html[data-theme="light"] .dashboard-row[data-card-clickable]:hover { background: #edf4fb; }
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .responsive-table tr { border-color: #d9e2ee; }
html[data-theme="light"] .responsive-table td::before { color: #61738c; }
html[data-theme="light"] .inline-form select { color: #17263c; background: #fff; border-color: #cbd7e5; }
html[data-theme="light"] .pagination { color: #53677f; }
html[data-theme="light"] .pagination a { color: #145da0; }

html[data-theme="light"] .kanban-column,
html[data-theme="light"] .kanban-column[data-status] { --lane-bg: #f3f6fa; color: #24374f; border-color: #d9e2ee; background: var(--lane-bg); }
html[data-theme="light"] .kanban-column[data-status="todo"] { --lane-tone: #1764a5; --lane-bg: #edf6ff; }
html[data-theme="light"] .kanban-column[data-status="in_progress"] { --lane-tone: #7452ad; --lane-bg: #f4effd; }
html[data-theme="light"] .kanban-column[data-status="blocked"] { --lane-tone: #a33345; --lane-bg: #fff0f2; }
html[data-theme="light"] .kanban-column[data-status="done"] { --lane-tone: #18734c; --lane-bg: #eaf7ef; }
html[data-theme="light"] .kanban-column[data-status="cancelled"] { --lane-tone: #56677d; --lane-bg: #edf1f6; }
html[data-theme="light"] .kanban-column > summary,
html[data-theme="light"] .kanban-card h3 { color: #17263c; }
html[data-theme="light"] .kanban-card { color: #344a63; background: #fff; border-color: #d9e2ee; box-shadow: 0 5px 14px #183d680c; }

html[data-theme="light"] .calendar-grid { background: #d9e2ee; border-color: #d9e2ee; }
html[data-theme="light"] .calendar-weekday { color: #53677f; background: #edf2f8; }
html[data-theme="light"] .calendar-day { color: #344a63; background: #fff; }
html[data-theme="light"] .calendar-day.outside-month { color: #8796a9; background: #f3f6fa; }
html[data-theme="light"] .calendar-day.is-today { background: #eaf4ff; box-shadow: inset 0 0 0 1px #84b7e5; }
html[data-theme="light"] .calendar-entry { color: #344a63; background: #edf2f8; }
html[data-theme="light"] .calendar-appointment { color: #5a4384; background: #f1ebfb; }
html[data-theme="light"] .calendar-task { color: #15568e; background: #e1f0ff; }
html[data-theme="light"] .calendar-task.calendar-done { color: #176341; background: #def3e7; }
html[data-theme="light"] .calendar-task.calendar-overdue { color: #982e41; background: #ffe5e9; }
html[data-theme="light"] .calendar-toolbar h2 { color: #17263c; }

html[data-theme="light"] .dashboard-row,
html[data-theme="light"] .ticket-message,
html[data-theme="light"] .contract-service,
html[data-theme="light"] .stock-entry,
html[data-theme="light"] .work-history-entry,
html[data-theme="light"] .notification-rule,
html[data-theme="light"] .notification-choice-group,
html[data-theme="light"] .sla-target,
html[data-theme="light"] .checklist-step { border-color: #d9e2ee; }
html[data-theme="light"] .dashboard-row .help,
html[data-theme="light"] .notification-meta,
html[data-theme="light"] .audit-detail { color: #61738c; }
html[data-theme="light"] .attachment-thumbnail { color: #53677f; background: #edf2f8; }
html[data-theme="light"] .attachment-card,
html[data-theme="light"] .attachment-thumbnail img { border-color: #d3deeb; }
html[data-theme="light"] .stock-entry .message-body,
html[data-theme="light"] .message-body { color: #344a63; background: #f1f5fa; }
html[data-theme="light"] .ticket-internal { border-color: #d3deeb; }
html[data-theme="light"] .ticket-internal summary { color: #405976; }
html[data-theme="light"] .notification-unread { border-left-color: #1764a5; }
html[data-theme="light"] .notification-filters a,
html[data-theme="light"] .work-history-changes summary { color: #145da0; }
html[data-theme="light"] .notification-rule h2 { color: #17263c; }
html[data-theme="light"] .sla-priority-heading { color: #53677f; }
html[data-theme="light"] .sla-weekdays { color: #344a63; background: #f1f5fa; border-color: #d3deeb; }
html[data-theme="light"] .knowledge-summary { color: #405976; border-color: #d9e2ee; }
html[data-theme="light"] .knowledge-body { color: #344a63; }
html[data-theme="light"] .ops-filters-panel > summary,
html[data-theme="light"] .company-access summary,
html[data-theme="light"] .contract-service summary { color: #24374f; }
html[data-theme="light"] .ops-filters-panel[open] { background: #fff; }
html[data-theme="light"] .role-row { border-color: #d9e2ee; }
html[data-theme="light"] .role-row span { color: #61738c; }

/* Platform administration, analytics and monitoring use the same light surfaces. */
html[data-theme="light"] .platform-admin,
html[data-theme="light"] .platform-admin .content { color: #17263c; background: #f3f6fb; }
html[data-theme="light"] .platform-admin .panel,
html[data-theme="light"] .platform-admin .platform-company-list,
html[data-theme="light"] .platform-admin .platform-create,
html[data-theme="light"] .platform-admin .monitor-card,
html[data-theme="light"] .platform-admin .monitor-note,
html[data-theme="light"] .platform-admin .platform-access > .panel {
    color: #24374f;
    background: #fff;
    border-color: #d9e2ee;
}
html[data-theme="light"] .platform-admin .platform-companies th,
html[data-theme="light"] .platform-admin .monitor-table th { color: #53677f; background: #f0f4f9; border-color: #d6e0eb; }
html[data-theme="light"] .platform-admin .platform-companies td,
html[data-theme="light"] .platform-admin .monitor-table td { color: #344a63; border-color: #e3e9f0; }
html[data-theme="light"] .platform-admin .platform-companies td::before { color: #61738c; }
html[data-theme="light"] .platform-admin .platform-companies strong,
html[data-theme="light"] .platform-admin .monitor-value { color: #17263c; }
html[data-theme="light"] .platform-admin .button.secondary,
html[data-theme="light"] .platform-admin button.secondary,
html[data-theme="light"] .platform-admin .secondary { color: #24415f; background: #edf3fa; border-color: #cbd9e9; }
html[data-theme="light"] .platform-admin .company-status { color: #56677d; }
html[data-theme="light"] .platform-admin .company-status.is-active { color: #18734c; }
html[data-theme="light"] .platform-admin .platform-row-actions a,
html[data-theme="light"] .platform-admin .platform-section-head > a { color: #145da0; }
html[data-theme="light"] .platform-admin .platform-create > summary,
html[data-theme="light"] .platform-admin .plan-modules legend { color: #24374f; }
html[data-theme="light"] .platform-admin .platform-access { color: #24374f; }
html[data-theme="light"] .platform-admin .monitor-label,
html[data-theme="light"] .platform-admin .monitor-meta,
html[data-theme="light"] .platform-admin .monitor-chart-caption { color: #61738c; }
html[data-theme="light"] .platform-admin .monitor-meter { background: #e0e7ef; }
html[data-theme="light"] .platform-admin .monitor-alert { color: #805400; background: #fff4d8; border-color: #e6c87f; }
html[data-theme="light"] .platform-admin .monitor-alert.is-critical { color: #982e41; background: #ffeaed; border-color: #e7aeb8; }
html[data-theme="light"] .platform-admin .monitor-alert.is-ok { color: #176341; background: #e5f6ed; border-color: #a9d9bc; }
html[data-theme="light"] .platform-admin .monitor-chart { border-color: #d9e2ee; }
html[data-theme="light"] .platform-admin .monitor-chart-panel { color: #24374f; background: #f7f9fc; border-color: #d9e2ee; }
html[data-theme="light"] .platform-admin .monitor-periods .is-selected { color: #174d82; border-color: #7ca9d5; background: #e8f2fc; }
html[data-theme="light"] .platform-admin .monitor-chart-bar { background: #edf2f8; }
html[data-theme="light"] .platform-admin .monitor-chart-bar.is-empty { background: transparent; }
html[data-theme="light"] .platform-admin .monitor-note { color: #53677f; }
html[data-theme="light"] .platform-admin .plan-modules { color: #344a63; background: #f5f8fb; border-color: #d3deeb; }
html[data-theme="light"] .platform-admin .mobile-nav { color: #344a63; background: #fff; border-color: #d9e2ee; }
html[data-theme="light"] .platform-admin .mobile-nav > summary { color: #24374f; background: #edf3fa; border-color: #d3deeb; }
html[data-theme="light"] .platform-admin .mobile-nav .nav { background: #fff; }

html[data-theme="light"] .service-analytics {
    --analytics-panel: #fff;
    --analytics-card: #f6f9fc;
    --analytics-line: #d9e2ee;
    color: #24374f;
    border-color: #d9e2ee;
    background: radial-gradient(ellipse at 88% 0%, #dceeff 0, transparent 36%), linear-gradient(145deg, #fff, #f5f8fc 72%);
    box-shadow: 0 12px 32px #183d6810;
}
html[data-theme="light"] .service-analytics-head h2,
html[data-theme="light"] .platform-analytics-dashboard h1,
html[data-theme="light"] .platform-analytics-dashboard h2 { color: #17263c; }
html[data-theme="light"] .service-analytics-head p,
html[data-theme="light"] .platform-analytics-dashboard .analytics-dashboard-hero p,
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-section-head p { color: #61738c; }
html[data-theme="light"] .service-analytics-head .eyebrow,
html[data-theme="light"] .platform-analytics-dashboard .analytics-kicker { color: #155e9f; }
html[data-theme="light"] .analytics-scope { color: #244f78; background: #eaf4ff; border-color: #bad4ed; }
html[data-theme="light"] .service-analytics-card { color: #24374f; border-color: #d9e2ee; background: linear-gradient(155deg, #fff, #f6f9fc 78%); box-shadow: 0 4px 14px #183d6808; }
html[data-theme="light"] .service-analytics-card:hover { border-color: color-mix(in srgb, var(--analytics-tone) 50%, #d9e2ee); background: #fff; box-shadow: 0 10px 24px #183d6817; }
html[data-theme="light"] .analytics-value { color: #17263c; }
html[data-theme="light"] .analytics-caption { color: #344a63; }
html[data-theme="light"] .analytics-detail,
html[data-theme="light"] .analytics-legend span { color: #61738c; }
html[data-theme="light"] .analytics-stacked-bar { background: #e1e8f0; }
html[data-theme="light"] .analytics-legend strong { color: #24374f; }

html[data-theme="light"] .platform-analytics-dashboard {
    --analytics-dark-bg: #f3f6fb;
    --analytics-dark-panel: #fff;
    --analytics-dark-card: #f6f9fc;
    --analytics-dark-line: #d9e2ee;
    --analytics-text: #24374f;
    --analytics-muted: #61738c;
    color: #24374f;
    background: radial-gradient(ellipse at 78% -6%, #dbeeff 0, transparent 35%), radial-gradient(ellipse at 5% 58%, #eee8fb 0, transparent 35%), linear-gradient(145deg, #f8fafc, #f0f4f9 70%);
}
html[data-theme="light"] .platform-admin.analytics-platform-page .content { background: #f3f6fb; }
html[data-theme="light"] .platform-analytics-dashboard .analytics-dashboard-hero p,
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-section-head p,
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-muted { color: #61738c; }
html[data-theme="light"] .platform-admin .platform-analytics-dashboard .platform-analytics-kpi,
html[data-theme="light"] .platform-admin .platform-analytics-dashboard .platform-service-card {
    color: #24374f;
    background: linear-gradient(150deg, #fff, #f6f9fc 78%);
    border-color: #d9e2ee;
    box-shadow: 0 4px 14px #183d6808;
}
html[data-theme="light"] .platform-admin .platform-analytics-dashboard .platform-analytics-kpi > strong,
html[data-theme="light"] .platform-admin .platform-analytics-dashboard .platform-service-card > strong { color: #17263c; }
html[data-theme="light"] .platform-admin .platform-analytics-dashboard .platform-analytics-kpi > small,
html[data-theme="light"] .platform-admin .platform-analytics-dashboard .platform-service-card > small { color: #61738c; }
html[data-theme="light"] .platform-admin .platform-analytics-dashboard .platform-analytics-section { background: #fff; border-color: #d9e2ee; box-shadow: 0 6px 18px #183d6808; }
html[data-theme="light"] .platform-analytics-dashboard .platform-adoption-row { border-color: #d9e2ee; background: #f6f9fc; }
html[data-theme="light"] .platform-analytics-dashboard .platform-adoption-row strong { color: #24374f; }
html[data-theme="light"] .platform-analytics-dashboard .platform-adoption-row span,
html[data-theme="light"] .platform-analytics-dashboard .platform-adoption-row > b { color: #61738c; }
html[data-theme="light"] .platform-analytics-dashboard .platform-adoption-track { background: #e0e7ef; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-search label { color: #405976; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-search input { color: #17263c; background: #fff; border-color: #cbd7e5; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-search input::placeholder { color: #8796a9; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-search button.secondary { color: #24415f; background: #edf3fa; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-search > a,
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-actions a { color: #145da0; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-table { color: #344a63; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-table th { color: #53677f; background: #f0f4f9; border-bottom-color: #d6e0eb; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-table td { border-bottom-color: #e3e9f0; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-table td > strong { color: #17263c; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-table td > small,
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-table td::before { color: #61738c; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-badge { color: #53677f; background: #edf1f6; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-badge.is-operator { color: #604593; background: #f0eafd; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-badge.is-active { color: #176341; background: #def3e7; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-badge.is-inactive { color: #982e41; background: #ffe5e9; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-actions span { color: #982e41; }
html[data-theme="light"] .platform-analytics-dashboard .platform-analytics-table tr { border-color: #d9e2ee; }
html[data-theme="light"] .platform-analytics-dashboard .pagination,
html[data-theme="light"] .platform-analytics-dashboard .pagination a,
html[data-theme="light"] .platform-analytics-dashboard .pagination span { color: #53677f; }

/* The company overview has its own dark gradient, so replace it explicitly too. */
html[data-theme="light"] .company-dashboard {
    --company-dashboard-line: #d9e2ee;
    --company-dashboard-panel: #fff;
    color: #24374f;
    background: radial-gradient(ellipse at 83% -5%, #dceeff 0, transparent 34%), radial-gradient(ellipse at 8% 47%, #eee8fb 0, transparent 35%), linear-gradient(145deg, #f8fafc, #f0f4f9 70%);
}
html[data-theme="light"] .company-dashboard h1,
html[data-theme="light"] .company-dashboard h2,
html[data-theme="light"] .company-dashboard h3 { color: #17263c; }
html[data-theme="light"] .company-dashboard .page-head p { color: #61738c; }
html[data-theme="light"] .company-dashboard .eyebrow,
html[data-theme="light"] .company-dashboard .stat .tag { color: #155e9f; }
html[data-theme="light"] .company-dashboard .pill.green { color: #176341; background: #def3e7; }
html[data-theme="light"] .company-dashboard .panel {
    color: #24374f;
    border-color: #d9e2ee;
    background: linear-gradient(145deg, #fff, #f7f9fc 78%);
    box-shadow: 0 8px 22px #183d680a;
}
html[data-theme="light"] .company-dashboard .panel a:not(.button),
html[data-theme="light"] .company-dashboard .member-name { color: #145da0; }
html[data-theme="light"] .company-dashboard .panel a:not(.button):hover,
html[data-theme="light"] .company-dashboard .member-name:hover { color: #0d477f; }
html[data-theme="light"] .company-dashboard .ticket-actions .button { color: #fff; background: linear-gradient(105deg, #1764b5, #5267d5); }
html[data-theme="light"] .company-dashboard .ticket-actions .button:hover { background: linear-gradient(105deg, #15599f, #4658bd); }
html[data-theme="light"] .company-dashboard .ticket-actions .button.secondary,
html[data-theme="light"] .company-dashboard .button.secondary { color: #24415f; background: #edf3fa; border-color: #cbd9e9; }
html[data-theme="light"] .company-dashboard .ticket-actions .button.secondary:hover,
html[data-theme="light"] .company-dashboard .button.secondary:hover { background: #e1ebf6; }
html[data-theme="light"] .company-dashboard .stat { color: #24374f; border-color: #d9e2ee; background: #fff; box-shadow: 0 4px 14px #183d6808; }
html[data-theme="light"] .company-dashboard .stat.tone-info { --card-tone: #1764a5; background: linear-gradient(150deg, #edf6ff, #fff 78%); }
html[data-theme="light"] .company-dashboard .stat.tone-success { --card-tone: #18734c; background: linear-gradient(150deg, #edf9f2, #fff 78%); }
html[data-theme="light"] .company-dashboard .stat.tone-warning { --card-tone: #8a5a00; background: linear-gradient(150deg, #fff8e8, #fff 78%); }
html[data-theme="light"] .company-dashboard .stat.tone-danger { --card-tone: #a33345; background: linear-gradient(150deg, #fff1f3, #fff 78%); }
html[data-theme="light"] .company-dashboard .stat.tone-neutral { --card-tone: #56677d; }
html[data-theme="light"] .company-dashboard .stat .value { color: #17263c; }
html[data-theme="light"] .company-dashboard .stat .label { color: #61738c; }
html[data-theme="light"] .company-dashboard .stat .card-action { color: var(--card-tone); }
html[data-theme="light"] .company-dashboard a.stat-link:hover { box-shadow: 0 12px 26px #183d681c; }
html[data-theme="light"] .company-dashboard .dashboard-row { border-color: #d9e2ee; }
html[data-theme="light"] .company-dashboard .dashboard-row .help { color: #61738c; }
html[data-theme="light"] .company-dashboard .dashboard-row .help.overdue,
html[data-theme="light"] .company-dashboard .overdue { color: #a33345; }
html[data-theme="light"] .company-dashboard .dashboard-row .help.due-soon { color: #8a5a00; }
html[data-theme="light"] .company-dashboard .knowledge-quick-search input { color: #17263c; background: #fff; border-color: #cbd7e5; }
html[data-theme="light"] .company-dashboard .knowledge-quick-search input::placeholder { color: #8796a9; }
html[data-theme="light"] .company-dashboard .knowledge-quick-search label { color: #405976; }

html[data-theme="light"] .inventory-search-bar {
    color: #24374f;
    background: #fff;
    border-color: #d9e2ee;
    box-shadow: 0 6px 20px #183d680c;
}
html[data-theme="light"] .inventory-search-bar label { color: #314760; }
html[data-theme="light"] .inventory-advanced-filters { background: linear-gradient(150deg, #fff, #f7f9fc 78%); }
html[data-theme="light"] .asset-quick-status select { color: #17263c; background: #fff; border-color: #cbd7e5; }
html[data-theme="light"] .asset-quick-status select:focus { border-color: #4a91cf; }
html[data-theme="light"] .app-toast { color: #176341; background: #e5f6ed; border-color: #9bd4b3; box-shadow: 0 12px 30px #183d681f; }
html[data-theme="light"] .app-toast-error { color: #982e41; background: #ffeaed; border-color: #e7aeb8; }
html[data-theme="light"] select[data-inventory-status][data-status="available"] { color: #176341; border-color: #8dcaa6; }
html[data-theme="light"] select[data-inventory-status][data-status="in_use"] { color: #15568e; border-color: #8bbce7; }
html[data-theme="light"] select[data-inventory-status][data-status="maintenance"] { color: #805400; border-color: #e7c46f; }
html[data-theme="light"] select[data-inventory-status][data-status="retired"] { color: #56677d; border-color: #c4cfdd; }
html[data-theme="light"] select[data-inventory-status] option[value="available"] { color: #176341; background: #e5f6ed; }
html[data-theme="light"] select[data-inventory-status] option[value="in_use"] { color: #15568e; background: #e1f0ff; }
html[data-theme="light"] select[data-inventory-status] option[value="maintenance"] { color: #805400; background: #fff1c9; }
html[data-theme="light"] select[data-inventory-status] option[value="retired"] { color: #56677d; background: #edf1f6; }

@media (max-width: 750px) {
    html[data-theme="light"] .sidebar,
    html[data-theme="light"] .platform-admin .sidebar { background: #060b1e; border-color: #263958; }
    html[data-theme="light"] .mobile-nav,
    html[data-theme="light"] .platform-admin .mobile-nav { color: #dfeafa; background: #0d1b33; border-color: #263958; }
    html[data-theme="light"] .mobile-nav > summary,
    html[data-theme="light"] .platform-admin .mobile-nav > summary { color: #eaf4ff; background: #142440; border-color: #304767; }
    html[data-theme="light"] .mobile-nav .nav,
    html[data-theme="light"] .platform-admin .mobile-nav .nav { background: #0d1b33; }
}
html[data-theme="light"] button.sales-table-card { color: #17263c; background: #fff; border: 1px solid #d9e2ee; box-shadow: none; }
html[data-theme="light"] button.sales-table-card:hover { color: #173b62; background: #f2f7fc; }
html[data-theme="light"] button.sales-table-card.is-selected { color: #173b62; background: #e5f2ff; border-color: #1764a5; box-shadow: 0 0 0 3px #1764a533; }
