/* Light colors stay at their existing component values; only an explicit dark preference overrides them. */
html[data-mantine-color-scheme="dark"] {
  color-scheme: dark;
  --fish-page: #111821;
  --fish-surface: #1c2633;
  --fish-subtle: #232f3f;
  --fish-hover: #2c3c50;
  --fish-text: #e5edf6;
  --fish-link: #80c6ff;
  --fish-success-text: #a9dfb7;
  --fish-muted: #acbbcf;
  --fish-border: #415166;
  --fish-table-head: #253f5d;
  --fish-selected: #244c70;
  --fish-accent-soft: #203c56;
  --fish-success-soft: #243e30;
  --fish-danger-soft: #482c34;
  --mantine-color-body: #111821;
  --mantine-color-text: #e5edf6;
  --mantine-color-dimmed: #acbbcf;
  --white-0: #1c2633;
  --gray-2: #232f3f;
  --blue-0: #203c56;
  --blue-1: #253f5d;
  --blue-2: #28547a;
}
html[data-mantine-color-scheme="light"] { color-scheme: light; }
[data-mantine-color-scheme="dark"] body { background: var(--fish-page); color: var(--fish-text); }
[data-mantine-color-scheme="dark"] :is(.mantine-Paper-root,.mantine-Modal-content,.mantine-Drawer-content,.mantine-Popover-dropdown,.mantine-Menu-dropdown) { background: var(--fish-surface); color: var(--fish-text); }
[data-mantine-color-scheme="dark"] :is(.mantine-Table-th,.mantine-Table-td,.mantine-Input-input,.mantine-Accordion-item) { border-color: var(--fish-border); }
[data-mantine-color-scheme="dark"] .mantine-Table-table { --table-hover-color: var(--fish-hover); --table-striped-color: var(--fish-subtle); }
[data-mantine-color-scheme="dark"] :is(.booking-save-bar,.booking-description-v2,.booking-description,.booking-additional,.booking-add-service,.service-edit-card,.fish-mobile-cards article) { background: var(--fish-surface)!important; border-color: var(--fish-border)!important; }
[data-mantine-color-scheme="dark"] :is(.booking-additional p,.booking-description>div:first-child p) { color:var(--fish-text)!important;-webkit-text-fill-color:var(--fish-text)!important; }
[data-mantine-color-scheme="dark"] :is(.operation-paul-header,.operation-paul-bubble) { background: #342e47; }
[data-mantine-color-scheme="dark"] :is(.fish-order-page section,dialog) { background:var(--fish-surface);color:var(--fish-text);border-color:var(--fish-border); }
[data-mantine-color-scheme="dark"] :is(.fish-order-page,dialog) :is(input,select,textarea) { background:var(--fish-subtle);color:var(--fish-text);border-color:var(--fish-border); }
[data-mantine-color-scheme="dark"] :is(.fish-order-page,dialog) :is(th,td) { border-color:var(--fish-border); }
[data-mantine-color-scheme="dark"] :is(.fish-order-page,dialog) a { color:#80c6ff; }
[data-mantine-color-scheme="dark"] #mixedWarning { background:#493a20!important; color:#ffe0a1; }
[data-mantine-color-scheme="dark"] #error { color:#ffaaa5; }
[data-mantine-color-scheme="dark"] .fish-pdf-preview { background:var(--fish-surface)!important;color:var(--fish-text)!important;border-color:var(--fish-border)!important; }
[data-mantine-color-scheme="dark"] .fish-pdf-preview [data-pages] { background:var(--fish-page)!important; }
[data-mantine-color-scheme="dark"] .fish-pdf-preview button { background:var(--fish-subtle)!important;color:var(--fish-text)!important;border-color:var(--fish-border)!important; }
@media print { [data-fish-appearance] { display:none!important; } }

[data-mantine-color-scheme="dark"] #navbar svg :is([fill="#2B3441"],[fill="#2b3441"]) { fill:var(--fish-text); }
[data-mantine-color-scheme="dark"] #navbar svg :is([stroke="#2B3441"],[stroke="#2b3441"]) { stroke:var(--fish-text); }
[data-mantine-color-scheme="dark"] .fish-order-page button:not(.primary),[data-mantine-color-scheme="dark"] dialog button:not(.primary) { color:#80c6ff; }
[data-mantine-color-scheme="dark"] .mantine-Input-input::placeholder { color:#9aabc0; opacity:1; }

[data-mantine-color-scheme="dark"] .paul-welcome-bubble { color:var(--fish-text); }
[data-mantine-color-scheme="dark"] :is(.booking-extra-options summary,.booking-state-options summary,.booking-inline-passengers h3,.booking-inline-passengers summary span) { color:var(--fish-muted); }

/* Shared selection for lists, operational orders and their mobile cards. */
:root {
  --fish-selection-border: #1d4ed8;
  --fish-selection-marker: #1d4ed8;
}
html[data-mantine-color-scheme="dark"] {
  --fish-selection-border: #93c5fd;
  --fish-selection-marker: #93c5fd;
}
:is(table > tbody > tr[aria-selected="true"], table > tbody > tr[data-fish-selected="true"], .fish-order-page tr:has(input[data-row]:checked), .fish-order-page tr:has(input[data-add]:checked)) > :is(td, th) {
  background-color: var(--fish-selected, #dbeafe) !important;
  box-shadow: inset 0 2px var(--fish-selection-border), inset 0 -2px var(--fish-selection-border);
}
:is(table > tbody > tr[aria-selected="true"], table > tbody > tr[data-fish-selected="true"], .fish-order-page tr:has(input[data-row]:checked), .fish-order-page tr:has(input[data-add]:checked)) > :is(td, th):first-child {
  box-shadow: inset 5px 0 var(--fish-selection-marker), inset 0 2px var(--fish-selection-border), inset 0 -2px var(--fish-selection-border);
}
.fish-mobile-cards > article[data-fish-selected="true"] {
  background-color: var(--fish-selected, #dbeafe) !important;
  outline: 2px solid var(--fish-selection-border);
  border-left: 5px solid var(--fish-selection-marker);
}
@media print {
  .fish-selection-toolbar { display: none !important; }
  table > tbody > tr:is([aria-selected="true"], [data-fish-selected="true"]) > :is(td, th),
  .fish-order-page tr:has(input:checked) > :is(td, th),
  .fish-mobile-cards > article[data-fish-selected="true"] {
    background-color: inherit !important;
    box-shadow: none !important;
    outline: none !important;
    border-left: none !important;
  }
}

/* Passenger breakdown must remain readable, including narrow and selected rows. */
.fish-operation-pax { min-width: max-content; }
.fish-operation-pax .mantine-Badge-root {
  width: max-content;
  max-width: none;
  flex-shrink: 0;
  height: auto;
  min-height: 24px;
  padding: 3px 7px;
  font-size: 13px;
  line-height: 1.3;
  text-transform: none;
  color: #17385c !important;
  background: #eaf2fb !important;
  border-color: #90aac7 !important;
}
.fish-operation-pax .mantine-Badge-label { overflow: visible; white-space: nowrap; text-overflow: clip; }
[data-mantine-color-scheme="dark"] .fish-operation-pax .mantine-Badge-root {
  color: #f0f6ff !important;
  background: #29425e !important;
  border-color: #91aac6 !important;
}
