/* SHAOKE Blue: the one and only TMS look (Light).
   Applies to every page that loads this sheet, with or without html[data-accent].
   `html:root` keeps the same specificity (0,1,1) as the former
   html[data-accent="shaoke-blue"] gate, so the cascade against other sheets is unchanged.
   Layout, spacing and typography are not modified.
   Semantic reds (error, danger, warning, missing, overdue) are left as they are. */

html:root {
  --shaoke: #242c48;
  --shaoke-hover: #333c5a;
  --shaoke-text: #242c48;
  --shaoke-tint: #e8eaf1;
  --shaoke-tint-strong: #d9dce8;
  --shaoke-border: #c5c9d6;
  --shaoke-focus: #5c6584;
  --shaoke-on: #ffffff;
  --shaoke-shadow: #242c481a;
  --red: #242c48;
  --brand: #242c48;
  --primary: #242c48;
  --accent: #242c48;
  --cq-red: #242c48;
}

/* Primary actions, brand mark and hover. Danger / delete stay red. */
html:root :is(button.primary, .primary):not(.danger):hover:not(:disabled) {
  background: var(--shaoke-hover);
  border-color: var(--shaoke-hover);
}
html:root button.primary:not(.danger) {
  box-shadow: 0 1px 2px var(--shaoke-shadow);
}
html:root .brand-mark {
  box-shadow: 0 3px 7px var(--shaoke-shadow);
}

/* Focus rings that currently use the burgundy/pink accent. */
html:root :is(button, input, select, textarea):focus-visible,
html:root input:focus,
html:root select:focus,
html:root textarea:focus {
  outline-color: var(--shaoke-focus);
}
html:root .column-sort:focus-visible {
  outline: 2px solid var(--shaoke-focus);
  outline-offset: 3px;
}
html:root .global-work-actions:has(button:focus-visible) {
  outline-color: var(--shaoke-focus);
}

/* Navigation, queues, tabs, chips and other selected chrome. */
html:root nav .nav-main.active {
  background: var(--shaoke-tint);
  color: var(--shaoke-text);
}
html:root .order-queues button.active {
  background: var(--shaoke-tint);
  color: var(--shaoke-text);
}
html:root .current-section > .nav-section-toggle {
  background: var(--shaoke-tint);
  color: var(--shaoke-text);
}
html:root .nav-section-items > .nav-item.active {
  box-shadow: inset 3px 0 var(--shaoke);
}
html:root .segmented button.active {
  border-color: var(--shaoke-border);
  background: var(--shaoke-tint);
  color: var(--shaoke-text);
}
html:root .tab-count {
  background: var(--shaoke-tint);
}
html:root .dossier-tabs button.active {
  color: var(--shaoke-text);
  border-bottom-color: var(--shaoke);
}
html:root .task-workspace-tabs button[aria-pressed="true"] {
  background: var(--shaoke-tint);
  color: var(--shaoke-text);
  border-color: var(--shaoke);
}
html:root .task-mode-notice {
  border-left-color: var(--shaoke);
  background: var(--shaoke-tint);
}
html:root .transport-category-tabs > button[aria-pressed="true"],
html:root body.design-workspace .planning-categories button.active {
  border-color: var(--shaoke-border);
  box-shadow: inset 0 -2px var(--shaoke);
  color: var(--shaoke-text);
}
html:root .design-workspace .transport-workspace-views > button.active {
  color: var(--shaoke-text);
}
html:root .nav-inline-editor .nav-order-row.drop-target {
  border-color: var(--shaoke);
  background: var(--shaoke-tint);
}

/* Order number links, AWB tokens, source links and selection chips. */
html:root .order-link {
  border-color: var(--shaoke-border);
  background: var(--shaoke-tint);
  color: var(--shaoke-text);
}
html:root .design-workspace .order-link {
  background: transparent;
  color: var(--shaoke-text);
}
html:root .source-link {
  color: var(--shaoke-text);
  background: var(--shaoke-tint);
  border-color: var(--shaoke-border);
}
html:root .awb-token {
  border-color: var(--shaoke-border);
  background: var(--shaoke-tint);
  color: var(--shaoke-text);
}
html:root .awb-remove {
  color: var(--shaoke-text);
}
html:root .entity-switch select {
  border-color: var(--shaoke-border);
  background: var(--shaoke-tint);
  color: var(--shaoke-text);
}
html:root .user-initial {
  background: var(--shaoke-tint);
  color: var(--shaoke-text);
}
html:root .timeline-item {
  border-left-color: var(--shaoke-border);
}
html:root .sales-selection-badge {
  background: var(--shaoke-tint);
  color: var(--shaoke-text);
}
html:root .arrangement-option:has(input:checked) {
  border-color: var(--shaoke);
  background: var(--shaoke-tint);
}

/* Actions menu count, earlier-stops toggle, decision headings. */
html:root .global-action-count {
  color: var(--shaoke-text);
}
html:root body.design-workspace .planning-earlier-stops {
  color: var(--shaoke-text);
  border-color: var(--shaoke-border);
  background: var(--shaoke-tint);
}
html:root body.design-workspace .planning-earlier-stops[aria-pressed="true"] {
  background: var(--shaoke);
  color: var(--shaoke-on);
  border-color: var(--shaoke);
}
html:root .decision-card strong {
  color: var(--shaoke-text);
}

/* Calendar selection uses --accent, with a navy fallback in the base CSS. */
html:root .week-calendar-row[aria-pressed="true"],
html:root .day-calendar-grid button.day-selected,
html:root .day-calendar-grid button[aria-pressed="true"] {
  background: var(--shaoke);
  color: var(--shaoke-on);
}
html:root .day-calendar-grid button.day-in-range {
  background: var(--shaoke-tint);
}
html:root :is(
  .week-calendar .week-calendar-row:hover,
  .week-calendar .week-calendar-row:focus-visible,
  .day-calendar-grid button:hover:not(:disabled),
  .day-calendar-grid button:focus-visible
) {
  outline-color: var(--shaoke);
}

/* Carrier-quality selection chrome (not urgent / overdue / negative status). */
html:root .cq-stat:hover,
html:root .cq-stat.selected {
  border-color: var(--shaoke);
  box-shadow: 0 0 0 1px var(--shaoke-shadow);
}
html:root .cq-tabs button.selected {
  color: var(--shaoke-text);
}
html:root .cq-transport-tabs [role="tab"][aria-selected="true"] {
  background: var(--shaoke-tint);
}
html:root .cq-outcome:has(input:checked) {
  border-color: var(--shaoke);
  background: var(--shaoke-tint);
}
html:root .cq-selected-row {
  background: var(--shaoke-tint);
}

/* Re-assert semantic reds so a --red remap cannot leak into status or danger. */
html:root .danger:not(button):not(.primary) {
  color: #a1263d;
}
html:root :is(button.danger, .primary.danger, button.primary.danger) {
  background: #b82435 !important;
  border-color: #b82435 !important;
  color: #fff !important;
}
html:root .form-error {
  color: #b52839;
}
html:root .date-format-error {
  color: var(--danger, #a12640);
}
html:root .price-summary .field-warning {
  color: #a12a3c;
}
html:root body.design-workspace .planning-blocker,
html:root body .planning-blocker,
html:root body.design-workspace td small.attention.planning-blocker {
  color: #b42332 !important;
}
html:root .badge.red {
  color: #b25564;
  background: #fff0f3;
  border-color: #f1d9df;
}
html:root .design-workspace .badge.red {
  background: #fbe8ec;
  color: #a0243b;
}
html:root .design-workspace .cmr-status.missing {
  color: var(--danger, #b52232);
}
html:root #order-error:not(:empty) {
  border-color: #edcbd2;
  background: #fff2f4;
  color: #922c40;
}
html:root #order-panel [aria-invalid="true"] {
  border-color: #a32d42;
  box-shadow: 0 0 0 2px #f5d8df;
}
html:root .cmr-drop-card.missing {
  border-color: #c9354c;
  background: #fff7f8;
}
html:root .cmr-drop-card.missing .cmr-drop-heading > strong {
  color: #a51d35;
}
html:root .cmr-drop-card.missing .cmr-drop-zone {
  border-color: #c9354c;
}
html:root .design-workspace .cmr-missing-action {
  border-color: #e4a8b1;
}
html:root .design-workspace .cmr-missing-action:hover {
  background: #fce4e9;
  border-color: #a12b43;
}
html:root .cmr-match-dialog .red {
  border-left-color: #b91c1c;
  background: #fef2f2;
}
html:root .sales-action-error:not([hidden]) {
  border-color: #bf4c5d;
  border-left-color: #a43349;
  background: #fff3f4;
}
html:root .row-delete {
  color: #a1263d;
  border-color: #e3b8c1;
}
html:root .order-save-problems li {
  border-left-color: #b32b47;
}
html:root .request-feedback[data-kind="error"] {
  border-left-color: #b33b4d;
}
html:root .data-freshness .freshness-error {
  color: #a12c3b;
}
html:root .invoice-intake-currency-warning {
  color: #a0374a;
}
html:root .planning-card.overdue {
  border-left-color: #bc5669;
}
html:root .sps-header-status[data-sps-tone="error"],
html:root .sps-dialog-state[data-sps-tone="error"] {
  background: #fef2f2;
  color: #7f1d1d;
}
html:root .sps-header-status[data-sps-tone="error"] {
  border-color: #b91c1c;
}
html:root .cq-stat.cq-urgent {
  background: #fff5f4;
}
html:root .cq-stat.cq-urgent strong,
html:root .cq-status.red,
html:root .cq-overdue,
html:root .cq-impact.negative {
  color: #b82435;
}
html:root .cq-status.red {
  background: #fff0ef;
}
html:root .cq-decision.negative {
  background: #fff2f0;
  border-color: #edd2ce;
}
html:root #sales-workspace .sales-order-row.sales-older-open {
  background: #fff0f1;
  border-left-color: #d77a86;
}
html:root #sales-workspace .sales-older-label {
  color: #9e3544;
}
html:root .customer-loading-attention {
  background: #fff5f5;
  border-color: #edcbd2;
  color: #8c3344;
}
