/* Graphite and midnight surfaces, warm brand accents, restrained semantic colours. */
@media screen {
html[data-theme="dark"] {
 color-scheme:dark;
 --app-bg:#101720;--app-paper:#18222f;--app-white:#18222f;--app-ink:#e5ebf3;--app-muted:#a0afc2;
 --app-border:#2e3c4e;--app-navy:#dbe5f3;--app-blue:#b5cce6;--app-night:#111d2b;--app-blue-wash:#233144;
 --app-orange:#e99a62;--app-orange-wash:#342a23;--app-gold:#edb77c;
 --app-success:#87cfa9;--app-success-wash:#1c362d;--app-warning:#e2bf87;--app-warning-wash:#342d23;--app-danger:#e8a3a0;
 --app-shadow:0 3px 15px #050b1415;
 --focus-border:#8f9cac;--focus-ring:#a8b6c41c;--selection-bg:#3c4b5d;--selection-ink:#f1f4f8;--focus-surface:#202d3d;
}
html[data-theme="dark"] body {background:var(--app-bg);color:var(--app-ink);}
html[data-theme="dark"] .sidebar {
  --sidebar-border: #3a4b5f;
  --sidebar-muted: #a9bbce;
  --sidebar-icon: #9cb2ca;
  --sidebar-hover: #9cbbdf14;
  --sidebar-selected: #28384d;
  --sidebar-accent: #efa878;
  background: linear-gradient(155deg,#111b29,#192738 76%,#162233);
}
html[data-theme="dark"] .brand-name {color:#f5f8fc;}
html[data-theme="dark"] .brand-caption {color:#a8b9cd;}
html[data-theme="dark"] .brand-mark {background:#fff;box-shadow:0 2px 12px #0002;}
html[data-theme="dark"] .topbar {background:#141e2bed;border-color:#2b394b;backdrop-filter:blur(14px);}
html[data-theme="dark"] :is(.card,.editor-panel,.contact-toolbar,.table-scroll,.list-table,.acc-filters,.acc-account-context,.acc-breakdown,.acc-company-shortcut,.recent-orders,dialog,.directory-results,.extra-service-results,.customer-summary,.pricing-totals,.acc-secondary,.acc-setup-card) {background:var(--app-paper);color:var(--app-ink);border-color:var(--app-border);box-shadow:var(--app-shadow);}
html[data-theme="dark"] .row-card {background:#151f2c;border-color:#2c3b4e;box-shadow:none;}
html[data-theme="dark"] :is(h1,h2,h3,.acc-reference,.activity-ref,.acc-breakdown>summary,.acc-company-title strong) {color:var(--app-ink);}
html[data-theme="dark"] .eyebrow {color:#e9ad80;}
html[data-theme="dark"] :is(.field,.muted,.meta,.acc-help,.acc-invoice-description,.acc-metric>span,.acc-metric>small,.acc-company-shortcuts h2,.acc-company-shortcut small,.contact-details,.activity-actor,.system-log-summary,.activity-kind,.acc-secondary>summary,.acc-history>summary,.acc-more>summary,.acc-breakdown>summary small,.acc-company-card>p,.acc-account-counts,.acc-source-label,.acc-company-stat small,.acc-common-fund small,.program-price-row dt,.program-price-heading p,.program-rate-note,.stay-cost-line) {color:var(--app-muted);}
html[data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]),select,textarea,.time-controls,.date-controls) {background:#111c29!important;color:#e5edf6!important;border-color:#35455b!important;box-shadow:none;}
html[data-theme="dark"] :is(input,textarea)::placeholder {color:#899bb0!important;opacity:1;}
html[data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]),select,textarea):focus,html[data-theme="dark"] :is(.time-controls,.date-controls):focus-within {border-color:var(--focus-border)!important;box-shadow:0 0 0 3px var(--focus-ring);}
html[data-theme="dark"] :is(.btn-secondary,.btn-quiet) {background:#202d3e;color:#d0dce9;border-color:#35445a;box-shadow:none;}
html[data-theme="dark"] .btn:hover {background:#2b3b50;color:#f2f6fa;border-color:#506079;}
html[data-theme="dark"] .btn-primary {background:#365677;color:#f5f8fc;border-color:#48698c;box-shadow:0 2px 5px #060d1515;}
html[data-theme="dark"] .btn-primary:hover {background:#416587;border-color:#6084a5;}
html[data-theme="dark"] :is([data-action="save-itinerary"],[data-action="new-trip"]) {background:#b65c2c;color:#fff5ed;border-color:#cb7748;}
html[data-theme="dark"] :is([data-action="save-itinerary"],[data-action="new-trip"]):hover {background:#c76d3b;border-color:#df956a;}
html[data-theme="dark"] .btn:disabled {opacity:.45;}
html[data-theme="dark"] :is(.lookup-toggle,.calendar-toggle.btn) {background:transparent;border:0;color:#a2b4c9;box-shadow:none;}
html[data-theme="dark"] :is(.lookup-toggle,.calendar-toggle.btn):hover {background:#28374b;color:#eff4fa;}
html[data-theme="dark"] :is(.editor-nav,.acc-tabs,.order-tabs,.library-tabs) {background:transparent;border-color:var(--app-border);}
html[data-theme="dark"] :is(.editor-nav,.acc-tabs,.order-tabs,.library-tabs) .btn {background:transparent;color:#9fadc0;border-color:transparent;box-shadow:none;}
html[data-theme="dark"] :is(.editor-nav,.acc-tabs,.order-tabs,.library-tabs) .btn:hover {background:#202d3d;color:#e2eaf5;}
html[data-theme="dark"] :is(.acc-tabs,.order-tabs,.library-tabs) [aria-pressed="true"],html[data-theme="dark"] .editor-nav [aria-current="page"] {background:#263448;color:#edf3fa;border-color:#3a4a60;box-shadow:none;}
html[data-theme="dark"] .editor-nav [aria-current="page"] .ui-icon {color:#e5ad84;}
html[data-theme="dark"] :is(.library-subnav,.order-status-options,.stay-cost-summary,.program-price-grand-total,.acc-flow .acc-total,.extra-bed-panel,.text-library-row) {background:#1c2939;color:var(--app-ink);border-color:var(--app-border);}
html[data-theme="dark"] .library-subnav .btn[aria-pressed="true"] {background:#334154;color:#f1f5fa;border-color:#46556b;}
html[data-theme="dark"] .order-statusbar {background:linear-gradient(110deg,#18222f,#1c2837);border-color:#334256;}
html[data-theme="dark"] .order-status-options [aria-pressed="true"] {background:#344153;color:#edf2f7;}
html[data-theme="dark"] .order-status-options [data-value="quoted"][aria-pressed="true"] {background:#3c3225;color:#edc794;border-color:#5d4c34;}
html[data-theme="dark"] .order-status-options [data-value="cancelled"][aria-pressed="true"] {background:#3c2930;color:#eeb5b0;border-color:#63414a;}
html[data-theme="dark"] .order-confirm-control .btn {background:#1c332b;color:#a3d8b9;border-color:#3d6653;}
html[data-theme="dark"] .order-confirm-control [aria-pressed="true"] {background:#2a674c;color:#effbf4;border-color:#4a8b6b;}
html[data-theme="dark"] :is(.acc-metric,.dashboard-metric) {background:#1a2635;color:var(--app-ink);border-color:#344358;}
html[data-theme="dark"] :is(.acc-metric strong,.metric-value) {background:transparent;color:#edf3fa;}
html[data-theme="dark"] .acc-metric::before {opacity:.8;}
html[data-theme="dark"] :is(.acc-positive,.acc-paid-label,.acc-money-in) {color:#8ad0aa;}
html[data-theme="dark"] :is(.acc-negative,.acc-money-out,.dashboard-due) {color:#e9aaa5;}
html[data-theme="dark"] :is(.list-table th,.acc-breakdown[open]>summary,dialog form>.actions) {background:#202e40;color:#b9cadd;border-color:var(--app-border);}
html[data-theme="dark"] .list-table :is(td,th) {border-color:#2c3a4c;}
html[data-theme="dark"] .list-table tbody tr:hover {background:#202e40;}
html[data-theme="dark"] :is(.directory-result,.time-period-options) {background:#1b2736;color:#dce6f2;border-color:var(--app-border);}
html[data-theme="dark"] :is(.directory-result:hover,.directory-result:focus-within,.acc-order-results>button:hover,.acc-order-results>button:focus-visible) {background:#2b3a4e;color:#f1f5fa;}
html[data-theme="dark"] .time-period-options :is(.btn:hover,.btn:focus-visible,[aria-pressed="true"]) {background:var(--selection-bg);color:var(--selection-ink);border-color:var(--focus-border);}
html[data-theme="dark"] :is(.callout,.acc-alert,.acc-balance-due,.acc-status-unpaid,.acc-status-part-paid,.order-status-template,.balance-stage-1) {background:#332d24;color:#dfbd8b!important;border-color:#554832!important;}
html[data-theme="dark"] :is(.acc-balance-paid,.acc-status-paid,.acc-status-capital,.order-status-confirmed,.text-choice.is-selected) {background:#1c332b;color:#98d2af;border-color:#365946;}
html[data-theme="dark"] :is(.btn-danger,.acc-status-voided,.acc-status-withdrawal,.order-status-cancelled,.balance-stage-0) {background:#392930;color:#eab0ac!important;border-color:#60424b;}
html[data-theme="dark"] :is(.order-status-draft,.pill,.system-profile-name,.acc-status-neutral,.acc-status-expense,.balance-stage) {background:#283649;color:#bbcadc;}
html[data-theme="dark"] .text-choice {background:#182532;color:#b9cadb;border-color:#33475a;}
html[data-theme="dark"] .sales-channel-options [data-action="direct-sale"][aria-pressed="true"] {background:#1c332b;color:#c7e8d4;border-color:#385a49;}
html[data-theme="dark"] .sales-channel-options [data-action="direct-sale"]::before {color:#8bd0a9;}
html[data-theme="dark"] .acc-cancellation-note {background:#2d2923;color:#dcc5a2;border-color:#544734;border-left-color:#ba9862;}
html[data-theme="dark"] :is(.acc-cancellation-review,.acc-cancelled-list) {color:#cdb089!important;}
html[data-theme="dark"] .system-activity>.activity-entry {background:#1a2635;color:var(--app-ink);border-color:#314155;--activity-wash:#29394d;--activity-color:#bacfe4;}
html[data-theme="dark"] .system-activity>.activity-tone-success {--activity-wash:#254236;--activity-color:#a1d6b7;}
html[data-theme="dark"] .system-activity>.activity-tone-warning {--activity-wash:#413626;--activity-color:#e4c38e;}
html[data-theme="dark"] .system-activity>.activity-tone-danger {--activity-wash:#432e34;--activity-color:#edb0ab;}
html[data-theme="dark"] .system-unread {border-left-color:#dda578!important;}
html[data-theme="dark"] :is(.acc-history>summary,.acc-supplier-item>.acc-secondary>summary) {background:#202d3e;color:#bacadd;border-color:#34445a;}
html[data-theme="dark"] .acc-supplier-item+.acc-supplier-item {border-color:var(--app-border);}
html[data-theme="dark"] .acc-setup-card :is(p:not(.eyebrow),.eyebrow) {color:var(--app-muted);}
html[data-theme="dark"] .acc-setup-icon {background:#25364a;color:#d0e1f1;border-color:#3a516b;}
html[data-theme="dark"] .editor-savebar {background:#192432f5;color:var(--app-ink);border-color:#36465c;box-shadow:0 -3px 20px #050b1424;backdrop-filter:blur(12px);}
html[data-theme="dark"] :is(.status-line,.status-line[data-state="saved"]) {color:#9bd1b2;}
html[data-theme="dark"] .status-line[data-state="unsaved"] {color:#e3bc83;}
html[data-theme="dark"] dialog {box-shadow:0 22px 80px #02060d80;border-color:#3c4d64;}
html[data-theme="dark"] dialog::backdrop {background:#060c16a8;backdrop-filter:blur(4px);}
html[data-theme="dark"] :is(.preview-bar,#notification-panel) {background:#192534;color:var(--app-ink);border-color:#3a4b62;}
html[data-theme="dark"] :is(.preview-view,.acc-preview,.hotel-voucher-preview) {background:#101720;}
html[data-theme="dark"] .itinerary-document {color-scheme:light;background:#fff;color:var(--itinerary-ink);}
html[data-theme="dark"] .itinerary-document :is(h1,h2,h3) {color:var(--itinerary-ink);}
html[data-theme="dark"] :is(.dashboard-metric,.acc-company-dashboard):hover {border-color:#50627a;}
html[data-theme="dark"] .hero {background:linear-gradient(125deg,#21334b,#182638);border:1px solid #34465e;box-shadow:none;}
html[data-theme="dark"] .hero :is(h1,h2,p) {color:#e3edf8;}

html[data-theme="dark"] .acc-tabs[aria-label] .btn[aria-pressed="true"] {background:#263448;color:#edf3fa;border-color:#3a4a60;}
html[data-theme="dark"] .acc-tabs[aria-label="Invoice payment status"] [data-value="Paid"][aria-pressed="true"] {background:#1c332b;color:#98d2af;border-color:#365946;}
html[data-theme="dark"] .acc-tabs[aria-label="Invoice payment status"] :is([data-value="Unpaid"],[data-value="Part paid"])[aria-pressed="true"] {background:#332d24;color:#dfbd8b;border-color:#554832;}
html[data-theme="dark"] .status-line[data-state="unsaved"] {color:#e4be88;background:#382e22;border:1px solid #5c4a31;}
html[data-theme="dark"] .toast {background:#253348;color:#dce7f5;border-color:#42556f;box-shadow:0 8px 30px #030a1440;}
html[data-theme="dark"] .toast[data-kind="success"] {background:#1d382d;color:#a6dcbc;border-color:#406b52;}
html[data-theme="dark"] .toast[data-kind="error"] {background:#3d2930;color:#efbab4;border-color:#70484f;}
html[data-theme="dark"] input::file-selector-button {background:#2c3c50;color:#dce7f5;border:1px solid #475c74;border-radius:5px;padding:5px 9px;margin-right:9px;font:inherit;}
html[data-theme="dark"] .payment-amount-control.is-locked input {background:#202a37!important;color:#7d8b9e!important;border-color:#354152!important;box-shadow:none;}
html[data-theme="dark"] :is(.leg-match-warnings,.travel-link-summary) {background:#302c24;border-color:#544832;color:#ddc394;}
html[data-theme="dark"] .leg-match-warnings p {color:#ddc394;}
}

@media screen {
html[data-theme="dark"] :is(.duration-warning,.leg-match-warnings,.travel-link-summary,#save-warning-indicator .btn) {background:#39282f!important;border-color:#70434d!important;color:#f0b8bf!important;}
html[data-theme="dark"] .leg-match-warnings p {color:#f0b8bf;}
html[data-theme="dark"] #save-warning-indicator .btn:hover {background:#493039!important;border-color:#94606b!important;}
}

@media screen {html[data-theme="dark"] .acc-proof-warning{color:#e6a9b2;}html[data-theme="dark"] .acc-proof-warning>span{background:#493039;color:#efb7c0;}}

@media screen {html[data-theme="dark"] .acc-duplicate-warning {background:#39282f;border-color:#70434d;color:#f0b8bf;}}

@media screen {html[data-theme="dark"] #open-files-dock{background:#192432f5;border-color:#36465c;box-shadow:0 6px 28px #050b1440;}html[data-theme="dark"] .open-file-card{background:#202d3d;border-color:#3c4d63;}html[data-theme="dark"] .open-file-card.is-active{border-color:#759e8d;}html[data-theme="dark"] .open-file-restore .is-unsaved{color:#e0bc83;}html[data-theme="dark"] .open-file-control:hover{background:#493039;color:#efb7c0;}}

@media screen {html[data-theme="dark"] #order-actions-menu{background:#202d3d;border-color:#3c4d63;color:var(--app-ink);}html[data-theme="dark"] #order-actions-menu [data-action="delete-trip"]{color:#e7a6b0;}}

@media screen {html[data-theme="dark"] .order-list-wrap{background:#192432;border-color:#36465c;}html[data-theme="dark"] .order-list-row:hover{background:#202d3d;}html[data-theme="dark"] .order-balance-alert{color:#efb7c0;}html[data-theme="dark"] .order-balance-alert>span:first-child{background:#493039;}html[data-theme="dark"] .order-balance-paid{color:#a6dcbc;}}

@media screen {
html[data-theme="dark"] .order-list-wrap {background:transparent;border:0;}
html[data-theme="dark"] .order-list th {background:transparent;}
html[data-theme="dark"] .order-list td {background:#192432;border-color:#2e3e51;}
html[data-theme="dark"] .order-list-row:hover {background:transparent;}
html[data-theme="dark"] .order-list-row:hover td {background:#202e3e;border-color:#4a5c71;}
html[data-theme="dark"] .order-list .order-reference {background:#253548;color:#d2dfec;border-color:#35495e;}
html[data-theme="dark"] .order-list-date {color:#9badc0;}
html[data-theme="dark"] .order-list .order-balance-alert {background:#35272e;border-color:#59404a;color:#edb6bf;}
html[data-theme="dark"] .order-list .order-balance-alert small {color:#cb919c;}
html[data-theme="dark"] .order-list .order-balance-paid {background:#20362d;border-color:#345646;color:#add8bf;}
}

@media screen {html[data-theme="dark"] .order-list thead th {background:#253548;color:#d4e1ee;border-color:#3a4e65;}}

@media screen {html[data-theme="dark"] .order-list .order-list-date {color:#b2c2d4;}html[data-theme="dark"] .order-list .order-seller {color:#c9d7e6;}html[data-theme="dark"] .order-list .order-seller-type {color:#94a7bd;}}

@media screen {html[data-theme="dark"] .driver-pdf-warning{color:#efb7c0;background:#39282f;border-color:#70434d;}}

@media screen {html[data-theme="dark"] .contact-view-due{color:#ecb1ba;}html[data-theme="dark"] .contact-view-paid{color:#add8bf;}}

@media screen {html[data-theme="dark"] .dashboard-quick-card .order-reference-link{background:#293b50;color:#d2dfec;border-color:#405770;}html[data-theme="dark"] .order-list .order-reference-link:hover,html[data-theme="dark"] .dashboard-quick-card .order-reference-link:hover{background:#344b63;border-color:#70869c;}}

@media screen {html[data-theme="dark"] .country-picker .country-results {background:#202d3d;color:#dce7f5;border-color:#465b72;box-shadow:0 8px 26px #02081160;opacity:1;}}

@media screen {html[data-theme="dark"] #acc-entry-menu{background:#202d3d;color:var(--app-ink);border-color:#3c4d63;}}

@media screen {html[data-theme="dark"] .invoice-price-review{background:#39282f;color:#efb7c0;border-color:#70434d;}html[data-theme="dark"] .acc-price-review-flag{color:#efb7c0!important;}}

@media screen {html[data-theme="dark"] .orders-view-tabs>button{color:#9cadc1;}html[data-theme="dark"] .orders-view-tabs>button:hover{background:#253548;color:#dce7f5;}html[data-theme="dark"] .orders-view-tabs>button[aria-pressed="true"]{color:#e5af86;}html[data-theme="dark"] .orders-tab-count{background:#29394c;color:#a7b7ca;}html[data-theme="dark"] .orders-view-tabs>button[aria-pressed="true"] .orders-tab-count{background:#47362c;color:#e5af86;}html[data-theme="dark"] .orders-quick-search{background:#1c2939;border-color:#3a4d63;color:#93a7be;}}

@media screen {html[data-theme="dark"] :where(button,a,input,select,textarea,summary,[tabindex]):focus-visible {outline-color:#a2b3c5;}}
@media screen {
  html[data-theme="dark"] #app {
    --workspace-accent: #f0b488;
    --workspace-accent-wash: #453126;
    --workspace-banner: linear-gradient(112deg, #192b41, #28455e);
  }

  html[data-theme="dark"] #app .sidebar {
    background: linear-gradient(155deg, #101a28, #18293b 66%, #142234);
  }

  html[data-theme="dark"] .topbar .global-search input,
  html[data-theme="dark"] .topbar .global-search input:focus {
    background: transparent !important;
  }

  html[data-theme="dark"] .workspace .acc-tabs .btn[aria-selected="true"] {
    background: #28384c;
    border-color: #40536b;
    color: #eef4fc;
  }

  html[data-theme="dark"] .workspace .so-status-confirmed,
  html[data-theme="dark"] .workspace .so-status-completed {
    background: var(--app-success-wash);
    color: var(--app-success);
  }

  html[data-theme="dark"] .workspace .so-status-draft {
    background: #283649;
    color: #c1d0e1;
  }

  html[data-theme="dark"] .workspace .so-status-cancelled {
    background: #392930;
    color: #eab0ac;
  }

  html[data-theme="dark"] .dashboard-metric > .btn {
    background: #243346;
    color: #dce7f5;
  }

  html[data-theme="dark"] .dashboard-metric > .btn:hover {
    background: #2e4158;
    color: #f4f8fd;
  }

  html[data-theme="dark"] .workspace :is([data-action="save-itinerary"], [data-action="new-trip"]) {
    background: #9f481c;
    border-color: #c57751;
  }

  html[data-theme="dark"] .workspace :is([data-action="save-itinerary"], [data-action="new-trip"]):hover {
    background: #a94c20;
    border-color: #d18b65;
  }

  @media (max-width: 730px) {
    html[data-theme="dark"] .workspace:is([data-page="dashboard"], [data-page="trips"], [data-page="services"]) .order-list :is(.order-list-row, tr:has([data-action="so-open"])) > td {
      background: transparent;
    }
  }
}
