/* Calm palette for the work sections (the dashboard has its own block in dashboard-ux.css).
   Rule: colour only where it carries meaning — an overdue number or date, a small risk marker.
   Chips are outlined without tinted fills, captions stay secondary. Loaded last. */

/* ---------- Задачи ---------- */
/* Priority / blocked chips: neutral outline, a small dot carries the signal */
:root[data-theme] #app :is(#page, #modal-root) .task-urgent {
  background: transparent; border-color: var(--line); color: var(--secondary);
}
:root[data-theme] #app :is(#page, #modal-root) .task-urgent::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%;
  background: var(--warning-text); vertical-align: middle;
}
/* Overdue date: outlined, red text, no pink fill */
:root[data-theme] #app :is(#page, #modal-root) .task-due.is-overdue {
  background: transparent; border-color: color-mix(in srgb, var(--danger-text) 35%, var(--line)); color: var(--danger-text);
}
/* «Просрочены N»: the counter is a neutral chip with a red number */
:root[data-theme] #app #page .task-focus-tabs [data-task-work="focus"].is-alert b { background: var(--surface-3); color: var(--danger-text); font-weight: 700; }
/* Task card: overdue due date without the pink field */
:root[data-theme] #modal-root .tc-field.tc-overdue :is(.tc-edit, .tc-readonly) { background: transparent; }

/* ---------- Проекты ---------- */
/* Deadlines: the date carries the colour, the note under it stays secondary */
:root[data-theme] #page .project-deadline-column .pd-note:is(.pd-soon, .pd-late) { color: var(--secondary); }
:root[data-theme] #page .project-deadline-column .pd-date.pd-soon { color: var(--ink); }
:root[data-theme] #page .project-deadline-column .pd-date.pd-soon::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; border-radius: 50%;
  background: var(--warning-text); vertical-align: middle;
}
/* project-list.css paints every .project-overdue red with !important; captions under counts go back to secondary */
:root[data-theme] #page .project-progress-column small.project-overdue,
:root[data-theme] #page .project-task-list td small.project-overdue,
:root[data-theme] #page .pc-simple-tasks .project-overdue { color: var(--secondary) !important; }
/* Summary tiles and card figures: red number only, caption and border neutral */
:root[data-theme] #page .pl-kpi.pl-kpi-late > small,
:root[data-theme] #page .pc-kpi.pc-kpi-late > small { color: var(--secondary); font-weight: 500; }
:root[data-theme] #page .pc-kpi.pc-kpi-late { border-color: var(--line); }

/* ---------- Сделки (card facts) ---------- */
:root[data-theme] #modal-root .dc-facts .dc-fact-late { border-color: var(--line); }
