/* Semantic palette. Keep literal colors here, not in component rules. */
:root {
  --page: #f7f8fb;
  --surface: #ffffff;
  --sidebar-surface: #ffffff;
  --surface-muted: #f2f3f7;
  --border-strong: #c9cfd8;
  --primary-active: #5026a9;
  --kpi-overdue: #9c382f;
  --kpi-completed: #536e5f;
  --surface-elevated: #ffffff;
  --text-primary: #111b2e;
  --text-secondary: #4e5968;
  --text-muted: #697586;
  --border: #e0e4ea;
  --control-border: #7c8696;
  --input-surface: #ffffff;
  --primary: #6f33d8;
  --primary-hover: #6029c4;
  --brand-text: #6029c4;
  --on-primary: #ffffff;
  --focus: #6f33d8;
  --success: #176542;
  --success-surface: #eaf7ef;
  --warning: #755016;
  --warning-surface: #fff5df;
  --danger: #9c382f;
  --danger-surface: #fff0ed;
  --information: #305e89;
  --information-surface: #edf4fc;
  --visit: #73518e;
  --visit-surface: #f5effa;
  --overlay: #111b2eb8;
  --shadow: #111b2e21;
  --row-hover: #f2f3f7;
  --selected: #f0eafe;
  --selected-text: #5026a9;
  --calendar-outside: #f7f8fb;
  --calendar-today: #6f33d8;
  --disabled-surface: #eef0f4;
  --disabled-text: #697586;
  color-scheme: light;
  color: var(--text-primary);
  background: var(--page);
}
:root[data-theme="dark"] {
  --page: #15191c;
  --surface: #20262b;
  --sidebar-surface: #191e22;
  --surface-muted: #1b2024;
  --border-strong: #46515a;
  --primary-active: #6f33d8;
  --kpi-overdue: #e2b65e;
  --kpi-completed: #65cf91;
  --surface-elevated: #272e34;
  --text-primary: #f1f3f4;
  --text-secondary: #c0c8ce;
  --text-muted: #98a3ab;
  --border: #343c43;
  --control-border: #7d8993;
  --input-surface: #1b2024;
  --primary: #7c41ec;
  --primary-hover: #8752ee;
  --brand-text: #c3a2ff;
  --on-primary: #ffffff;
  --focus: #b793ff;
  --success: #65cf91;
  --success-surface: #20362b;
  --warning: #e2b65e;
  --warning-surface: #362d1f;
  --danger: #e27676;
  --danger-surface: #352426;
  --information: #72a7d8;
  --information-surface: #202e3c;
  --visit: #baa0db;
  --visit-surface: #302939;
  --overlay: #0b0e11d6;
  --shadow: #00000033;
  --row-hover: #2b3339;
  --selected: #2b2140;
  --selected-text: #c3a2ff;
  --calendar-outside: #1b2024;
  --calendar-today: #7c41ec;
  --disabled-surface: #272e34;
  --disabled-text: #98a3ab;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --page: #15191c;
    --surface: #20262b;
    --sidebar-surface: #191e22;
    --surface-muted: #1b2024;
    --border-strong: #46515a;
    --primary-active: #6f33d8;
    --kpi-overdue: #e2b65e;
    --kpi-completed: #65cf91;
    --surface-elevated: #272e34;
    --text-primary: #f1f3f4;
    --text-secondary: #c0c8ce;
    --text-muted: #98a3ab;
    --border: #343c43;
    --control-border: #7d8993;
    --input-surface: #1b2024;
    --primary: #7c41ec;
    --primary-hover: #8752ee;
    --brand-text: #c3a2ff;
    --on-primary: #ffffff;
    --focus: #b793ff;
    --success: #65cf91;
    --success-surface: #20362b;
    --warning: #e2b65e;
    --warning-surface: #362d1f;
    --danger: #e27676;
    --danger-surface: #352426;
    --information: #72a7d8;
    --information-surface: #202e3c;
    --visit: #baa0db;
    --visit-surface: #302939;
    --overlay: #0b0e11d6;
    --shadow: #00000033;
    --row-hover: #2b3339;
    --selected: #2b2140;
    --selected-text: #c3a2ff;
    --calendar-outside: #1b2024;
    --calendar-today: #7c41ec;
    --disabled-surface: #272e34;
    --disabled-text: #98a3ab;
    color-scheme: dark;
  }
}
@media print {
  :root,
  :root[data-theme="dark"],
  :root[data-theme="light"] {
    --page: #f7f8fb;
    --surface: #ffffff;
    --sidebar-surface: #ffffff;
    --surface-muted: #f2f3f7;
    --border-strong: #c9cfd8;
    --primary-active: #5026a9;
    --kpi-overdue: #9c382f;
    --kpi-completed: #536e5f;
    --surface-elevated: #ffffff;
    --text-primary: #111b2e;
    --text-secondary: #4e5968;
    --text-muted: #697586;
    --border: #e0e4ea;
    --control-border: #7c8696;
    --input-surface: #ffffff;
    --primary: #6f33d8;
    --primary-hover: #6029c4;
    --brand-text: #6029c4;
    --on-primary: #ffffff;
    --focus: #6f33d8;
    --success: #176542;
    --success-surface: #eaf7ef;
    --warning: #755016;
    --warning-surface: #fff5df;
    --danger: #9c382f;
    --danger-surface: #fff0ed;
    --information: #305e89;
    --information-surface: #edf4fc;
    --visit: #73518e;
    --visit-surface: #f5effa;
    --overlay: #111b2eb8;
    --shadow: #111b2e21;
    --row-hover: #f2f3f7;
    --selected: #f0eafe;
    --selected-text: #5026a9;
    --calendar-outside: #f7f8fb;
    --calendar-today: #6f33d8;
    --disabled-surface: #eef0f4;
    --disabled-text: #697586;
    --page: #ffffff;
    color-scheme: light;
  }
}
