/*
 * ProjectManager palette: the one source of colors and font for every screen
 * (work item 001695). Screens read these variables instead of their own values.
 * Load it first on every page. Dark is the default; body.theme-light-clean switches to Light.
 * Screen variables built from these must be set on body (or below), where the theme class is.
 */
:root {
    --pm-bg: #1b1e26;
    --pm-surface: #22252d;
    --pm-border: #2b2e36;
    /* Field outlines need 3:1 contrast on the surface to stay visible. */
    --pm-field-border: #6b7280;
    --pm-text: #f4f4f4;
    --pm-text-secondary: #b4bac4;
    /* Fills that set something apart inside text or a panel (table headers, code, quotes)
       and the fill of a hovered row or button. */
    --pm-subtle: #262a33;
    /* Selected rows and items: a tint of the action blue under normal text. */
    --pm-selected: rgba(37, 99, 235, 0.22);
    /* The inside of fields (inputs, selects, text areas). */
    --pm-field-bg: #1b1e26;
    --pm-link: #60a5fa;
    --pm-focus: #60a5fa;
    /* White text needs 4.5:1 on the action color; lighter blues fall short. */
    --pm-action: #2563eb;
    --pm-action-hover: #1d4ed8;
    --pm-action-text: #ffffff;
    --pm-error: #ef4444;
    --pm-error-text: #fca5a5;
    --pm-success: #22c55e;
    --pm-success-text: #86efac;
    /* Warnings (stale items, high priority, reversible risks): amber marks, readable amber text. */
    --pm-warning: #f59e0b;
    --pm-warning-text: #fcd34d;
    --pm-radius: 10px;
    --pm-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --pm-font-size: 16px;
}

/* Light: the same roles on light surfaces. Action, field border and status colors stay as in
   Dark; error, success and warning text turn darker to stay readable on white. */
body.theme-light-clean {
    --pm-bg: #f8fafc;
    --pm-surface: #ffffff;
    --pm-border: #e2e8f0;
    --pm-text: #1e293b;
    --pm-text-secondary: #64748b;
    --pm-subtle: #f1f5f9;
    --pm-selected: rgba(37, 99, 235, 0.1);
    --pm-field-bg: #ffffff;
    --pm-error-text: #b91c1c;
    --pm-success-text: #15803d;
    --pm-warning-text: #b45309;
    /* The light link blue falls short on white; links and focus use the action blue. */
    --pm-link: #2563eb;
    --pm-focus: #2563eb;
}
