/* Contrast comes from separate page, card and control surfaces, in both themes. */
@media screen {
 :root {
  --bg:#edf0f6;--surface:#fff;--surface-2:#f1f3f8;--text:#172e4c;
  --muted:#58677c;--line:#cdd5e1;--border:var(--line);--input-border:#b9c5d5;
  --accent:#086f9f;--red:#ac2436;--surface-hover:#eaf2f8;--surface-selected:#dff1f8;
  --panel:var(--surface);--soft:var(--surface-2);--hover:var(--surface-hover);
  --danger:var(--red);--blue:var(--accent);--theme-shadow:0 2px 5px #132a4310;
  --notice-bg:#e4f0fc;--notice-text:#214b70;--notice-border:#8fb3d4;
  --success-bg:#e1f2e8;--success-text:#175d38;--success-border:#86b79d;
  --warning-bg:#fff0d3;--warning-text:#7c4b0b;--warning-border:#c8a062;
  --error-bg:#fbe7ea;--error-text:#a22639;--error-border:#cd8d98;
  --tone-blue-bg:#deebff;--tone-blue-fg:#175bbb;
  --tone-teal-bg:#d7f3ec;--tone-teal-fg:#096650;
  --tone-amber-bg:#fff0cd;--tone-amber-fg:#8a5500;
  --tone-violet-bg:#eae3ff;--tone-violet-fg:#6741b0;
  --sidebar-bg:#fff;--sidebar-text:#455a73;--nav-selected:#e8edf4;--nav-active:#172e4c;
  /* Match the two diagonal color stops in the CORD logo. */
  --action-blue:#0873d8;--brand-gradient:linear-gradient(135deg,#2cc8e8,#0873d8);
  --action-text:#06111c;--action-border:#163853;--action-hover:var(--brand-gradient);
 }
 :root[data-theme=dark] {
  --bg:#0c1420;--surface:#182434;--surface-2:#223248;--text:#eef3fb;
  --muted:#b1c0d2;--line:#465b74;--input-border:#647e9a;
  --accent:#91c6ff;--red:#ff9aaa;--surface-hover:#2a405c;--surface-selected:#234b73;
  --dark:#090f18;--theme-shadow:0 3px 10px #0004;
  --notice-bg:#1d3853;--notice-text:#c0defb;--notice-border:#527da5;
  --success-bg:#183e32;--success-text:#a2e8bd;--success-border:#488568;
  --warning-bg:#443519;--warning-text:#f6d28d;--warning-border:#9d7b41;
  --error-bg:#482631;--error-text:#ffc1ca;--error-border:#a15f6d;
  --action-focus:#acd5ff;
  --tone-blue-bg:#203f65;--tone-blue-fg:#9bc8ff;
  --tone-teal-bg:#17463c;--tone-teal-fg:#8ee0c7;
  --tone-amber-bg:#4a3716;--tone-amber-fg:#ffda91;
  --tone-violet-bg:#3b2c5c;--tone-violet-fg:#d5baff;
  --sidebar-bg:#142133;--sidebar-text:#becde1;--nav-selected:#2a3c53;--nav-active:#eef3fb;
  --action-border:#66d7ef;
 }
 html,body { background:var(--bg);color:var(--text); }
 /* Loading is deliberately neutral until the account and its preference arrive. */
 .boot { min-height:100vh;min-height:100dvh;background:#182434;color:#eef3fb; }
 .boot p { color:#b1c0d2; }
 /* Pakovia's quiet navigation and work canvas, in CORD's own palette. */
 :root[data-theme] .sidebar { background:var(--sidebar-bg);color:var(--text);border-right:1px solid var(--line);width:240px;padding:25px 16px 16px;overflow:hidden; }
 :root[data-theme] .logo { color:var(--text);font-size:24px;letter-spacing:-.4px;padding:0 10px;margin-bottom:0;flex:none; }
 :root[data-theme] .logo img { width:32px;height:32px; }
 :root[data-theme] .logo-sub { display:block;flex:none;color:var(--muted);font-size:11px;line-height:1.5;max-width:none;margin:8px 10px 20px; }
 :root[data-theme] :is(.nav-label,.sidebar-bottom p) { display:none; }
 :root[data-theme] .demo-label { color:var(--muted);font-size:11px; }
 :root[data-theme] .nav { display:grid;gap:3px; }
 :root[data-theme] .nav-main { flex:1;min-height:0;overflow-y:auto;align-content:start;scrollbar-width:thin; }
 :root[data-theme] .nav:not(.nav-main) { flex:none;margin-top:4px; }
 :root[data-theme] .nav a { color:var(--sidebar-text);gap:13px;border:1px solid transparent;padding:11px 12px;min-height:44px;font-size:14px;border-radius:11px; }
 :root[data-theme] .nav a>svg { padding:0;background:transparent;color:currentColor;border-radius:0;width:20px;height:20px;flex:none; }
 :root[data-theme] .nav a:hover { color:var(--text);background:var(--surface-2); }
 :root[data-theme] .nav a.active { color:var(--nav-active);background:var(--nav-selected);font-weight:750; }
 :root[data-theme] .nav .count { background:var(--surface-2);color:var(--muted);font-weight:650;border-radius:20px;min-width:22px;text-align:center; }
 :root[data-theme] .nav a.active .count { background:var(--surface);color:var(--text); }
 :root[data-theme] .sidebar-bottom { flex:none;padding:16px 8px 0;margin-top:0; }
 :root[data-theme] .btn.sidebar-create { margin:14px 0 0;flex:none;min-height:44px;width:100%;border:2px solid var(--action-border);border-radius:12px;background:var(--brand-gradient);color:var(--action-text);font-size:15px;font-weight:750; }
 :root[data-theme] .btn.sidebar-create:hover:not(:disabled) { background:var(--action-hover); }
 :root[data-theme] .settings-grid>.panel { align-self:start; }
 :root[data-theme] .top-tools button.profile { padding:5px 12px 5px 5px;border:1px solid var(--line);border-radius:32px;background:var(--surface);font-weight:700; }
 :root[data-theme] .top-tools .profile-name { white-space:nowrap;line-height:1.2; }
 :root[data-theme] .avatar { width:34px;height:34px; }
 :root[data-theme] .footnote { font-size:11px;opacity:.8; }
 @media(min-width:801px) {
  :root[data-theme] .shell { grid-template-columns:240px minmax(0,1fr); }
  :root[data-theme] .topbar { height:64px;padding-inline:28px;background:var(--bg); }
  :root[data-theme] .breadcrumb>span,:root[data-theme] .breadcrumb>svg { display:none; }
  :root[data-theme] .breadcrumb b { color:var(--muted);font-size:13px; }
  :root[data-theme] .top-tools { gap:12px; }
  :root[data-theme] .top-tools>svg { display:none; }
  :root[data-theme] .shell:has(.personal-overview) .breadcrumb { visibility:hidden; }
  :root[data-theme] .top-tools>[data-action=profile-language] { border:0;background:transparent; }
  :root[data-theme] .content:not(.order-list-content):not(:has(>.order-workspace)):not(:has(>.orders-register-page)) { padding:28px 32px 36px;max-width:none; }
  :root[data-theme] .page-head { margin-bottom:22px;align-items:center; }
  :root[data-theme] .page-head h1 { font-size:28px;line-height:1.25;letter-spacing:-.7px;font-weight:800; }
  :root[data-theme] .page-head p { font-size:14px;line-height:1.5;margin-top:6px; }
  :root[data-theme] .mobile-sheet { inset:0;margin:auto;width:min(640px,calc(100% - 48px));height:fit-content;max-height:90dvh;border-radius:18px;padding:20px; }
  :root[data-theme] .mobile-sheet-handle { display:none; }
  :root[data-theme] .mobile-sheet-heading { padding:0 0 16px;margin-bottom:16px;border-bottom:1px solid var(--line); }
 }
 :root[data-theme] :is(.panel,.metric,.workflow-tile,.warehouse-tile,.auth-card,.task-inbox) {
  background:var(--surface);border-color:var(--line);box-shadow:var(--theme-shadow);
 }
 :root[data-theme] .metric.featured { background:#132941;color:#fff;border-color:#35516c; }
 :root[data-theme] .metric.featured :is(.metric-top,.metric-foot,small) { color:#c1cfde; }
 :root[data-theme] :is(.topbar,dialog,.mobile-sheet,.stock-product-drawer,.assignment-drawer,.freight-drawer) {
  background:var(--surface);color:var(--text);border-color:var(--line);
 }
 :root[data-theme] :is(.panel-head,.modal-head,.modal-foot,.wide-dialog .modal-head,.template-dialog .modal-head,.assignment-drawer .modal-head,.stock-product-drawer .modal-head) {
  background:var(--surface);color:var(--text);border-color:var(--line);
 }
 :root[data-theme] dialog::backdrop { background:#182c4a70;backdrop-filter:blur(2px); }
 :root[data-theme] :is(input,textarea,select):not([type=checkbox]):not([type=radio]):not([type=color]):not(.order-status-color-control):not(.doc-source-editor) {
  background:var(--surface);color:var(--text);border-color:var(--input-border);
 }
 :root[data-theme] :is(input,textarea)::placeholder { color:var(--muted);opacity:1; }
 :root[data-theme] :is(input,select,textarea):focus-visible { outline:2px solid var(--accent);outline-offset:2px; }
 :root[data-theme] .top-tools select { background:transparent!important; }
 :root[data-theme] :is(.bulk-table input[readonly],.order-workspace .order-card-form select:disabled,.order-workspace .order-card-form input:disabled) {
  background:var(--surface-2);color:var(--muted);opacity:1;
 }
 :root[data-theme] .btn { background:var(--surface);color:var(--text);border-color:var(--input-border); }
 :root[data-theme] .btn:hover:not(:disabled) { background:var(--surface-hover);border-color:var(--accent); }
 :root[data-theme] .btn.primary { background:var(--brand-gradient);border-color:var(--action-border);color:var(--action-text);filter:none;font-weight:750; }
 :root[data-theme] .btn.primary:hover:not(:disabled) { background:var(--action-hover);border-color:var(--action-border); }
 /* All explicit searches share the primary action palette. Use control markers,
    not every button beside a search field (filters and row actions stay neutral). */
 :root[data-theme] .btn:where(
  [data-list-search-submit],
  [data-page-search-submit],
  [data-warehouse-search-submit],
  [data-attendance-search-submit],
  [data-task-search-submit],
  [data-assignment-people-search-submit],
  [data-audit-search-submit],
  [data-source-purchase-search-submit],
  [data-freight-search-submit],
  [data-manufacture-search-submit],
  [data-purchase-detail-search-submit],
  [data-inbound-search-submit],
  [data-inbound-goods-search-submit],
  [data-inbound-receipt-search-submit],
  [data-mobile-freight-search-submit],
  [data-role-search-submit],
  [data-repair-model-search-submit],
  [data-preview-order-search],
  [data-lookup-search],
  [data-sku-find],
  [data-remote-sku-find],
  [data-lookup-idno],
  #doc-variable-search-submit
 ):not(:disabled) {
  background:var(--brand-gradient);border-color:var(--action-border);color:var(--action-text);filter:none;font-weight:750;
 }
 :root[data-theme] .btn:where(
  [data-list-search-submit],
  [data-page-search-submit],
  [data-warehouse-search-submit],
  [data-attendance-search-submit],
  [data-task-search-submit],
  [data-assignment-people-search-submit],
  [data-audit-search-submit],
  [data-source-purchase-search-submit],
  [data-freight-search-submit],
  [data-manufacture-search-submit],
  [data-purchase-detail-search-submit],
  [data-inbound-search-submit],
  [data-inbound-goods-search-submit],
  [data-inbound-receipt-search-submit],
  [data-mobile-freight-search-submit],
  [data-role-search-submit],
  [data-repair-model-search-submit],
  [data-preview-order-search],
  [data-lookup-search],
  [data-sku-find],
  [data-remote-sku-find],
  [data-lookup-idno],
  #doc-variable-search-submit
 ):hover:not(:disabled) { background:var(--action-hover);border-color:var(--action-border); }
 :root[data-theme] .btn.success { background:#167347;border-color:#46906b;color:#fff; }
 :root[data-theme] .btn.success:hover:not(:disabled) { background:#105c38;border-color:#80b99b; }
 :root[data-theme] .btn.danger { background:var(--error-bg);color:var(--error-text);border-color:var(--error-border); }
 :root[data-theme] .btn.danger:hover:not(:disabled) { background:var(--error-bg);border-color:var(--error-text); }
 :root[data-theme] .btn.primary.danger { background:#a92235;color:#fff;border-color:#cf6c7a; }
 :root[data-theme] .btn.lime { background:var(--notice-bg);color:var(--notice-text);border-color:var(--notice-border); }
 :root[data-theme] .btn:disabled { background:var(--surface-2);color:var(--muted);border-color:var(--line);opacity:.75; }
 :root[data-theme] .icon-btn:hover { background:var(--surface-hover); }
 :root[data-theme] .icon-btn.danger { color:var(--red); }
 :root[data-theme] :is(.text-link,.product-link,details>summary) { color:var(--accent); }
 :root[data-theme] :is(.tabs,.list-rule,.list-tools,.demand-source,.list-check-options,.repair-device-fields,.editor-toolbar,.doc-editor-toolbar,.doc-custom-row,.transfer-place-picker) {
  background:var(--surface-2);border-color:var(--line);color:var(--text);
 }
 :root[data-theme] :is(.tabs button.active,.settings-nav button.active) {
  background:var(--surface);color:var(--accent);box-shadow:inset 0 0 0 1px var(--input-border);
 }
 :root[data-theme] :is(th,.bulk-table th,.procurement-dialog .bulk-table th) { background:var(--surface-2);color:var(--muted);border-color:var(--line); }
 :root[data-theme] :is(td,.cord-data-list.dense-list td,.watch-item,.feed) { border-color:var(--line); }
 :root[data-theme] .cord-data-list.dense-list tbody tr:nth-child(odd) { background:var(--surface); }
 :root[data-theme] :is(tbody tr[data-open]:hover,.cord-data-list.dense-list tbody tr:hover) { background:var(--surface-hover); }
 :root[data-theme] :is(tr.line-dirty td,.order-item-dirty td) { background:var(--surface-selected); }
 :root[data-theme] :is(.warehouse-chip,.list-filter-chip,.profile-choice,.client-hits>button,.line-product-options,.line-product-options button,.task-inbox-item,.doc-variable-list button) {
  background:var(--surface);color:var(--text);border-color:var(--line);
 }
 :root[data-theme] :is(.warehouse-chip:hover,.list-filter-chip:hover,.profile-choice:hover,.client-hits>button:hover,.line-product-options button:hover,.line-product-options button[aria-selected=true],.task-inbox-item:hover,.doc-variable-list button:hover) { background:var(--surface-hover); }
 :root[data-theme] .warehouse-chip b { color:var(--text); }
 :root[data-theme] .doc-image-controls { background:var(--surface-2);color:var(--text);border-color:var(--line); }
 :root[data-theme] :is(.inline-note,.notice,.rate-note,.purchase-rate-summary,.demand-actions,.inbound-note,.freight-parcel-panel,.inbound-receipt-result) {
  background:var(--notice-bg);color:var(--notice-text);border-color:var(--notice-border);
 }
 :root[data-theme] :is(.rate-note small,.demand-actions>span,.freight-parcel-panel .muted) { color:var(--notice-text); }
 :root[data-theme] :is(.integrity,.purchase-sku-entry.received) { background:var(--success-bg);color:var(--success-text);border-color:var(--success-border); }
 :root[data-theme] .integrity :is(h3,p) { color:var(--success-text); }
 :root[data-theme] .integrity.error :is(h3,p) { color:var(--error-text); }
 :root[data-theme] :is(.integrity.error,.rate-note.error,.form-error:not(:empty),.bulk-problems) { background:var(--error-bg);color:var(--error-text);border-color:var(--error-border); }
 :root[data-theme] .field-error,:root[data-theme] form.was-validated :is(input,select,textarea):invalid { background:var(--error-bg)!important;color:var(--error-text)!important;border-color:var(--error-border)!important; }
 :root[data-theme] .field-error-text { color:var(--error-text)!important; }
 :root[data-theme] .badge:not(.status-color-badge) { background:var(--surface-2);color:var(--text); }
 :root[data-theme] .badge.green { background:var(--success-bg);color:var(--success-text); }
 :root[data-theme] .badge:is(.blue,.dark) { background:var(--notice-bg);color:var(--notice-text); }
 :root[data-theme] .badge.orange { background:var(--warning-bg);color:var(--warning-text); }
 :root[data-theme] .badge.red { background:var(--error-bg);color:var(--error-text); }
 :root[data-theme] :is(.watch-icon,.avatar,.brand-mark,.order-comment-avatar) { background:var(--notice-bg);color:var(--notice-text); }
 :root[data-theme] .bar { background:var(--surface-2); }
 :root[data-theme] .purchase-stats { background:var(--surface);border-color:var(--line);box-shadow:var(--theme-shadow); }
 :root[data-theme] .purchase-sku-entry { background:var(--surface-2);border-color:var(--line); }
 :root[data-theme] :is(.purchase-detail-meta b,.purchase-stat strong,.procurement-dialog .bulk-total,.procurement-dialog .bulk-toolbar>span) { color:var(--text); }
 :root[data-theme] :is(.order-fold,.order-fold>summary,.order-workspace .panel-head,.order-finance-footer,.order-activity .order-comment-composer,.order-workspace .order-lock-note) { background:var(--surface-2);color:var(--text);border-color:var(--line); }
 :root[data-theme] :is(.role-master-option,.role-permission-group>summary) { background:var(--surface-2);color:var(--text);border-color:var(--line); }
 :root[data-theme] :is(.exchange-providers>section,.inbound-goods-row,.inbound-sku-option) { background:var(--surface);border-color:var(--line); }
 :root[data-theme] :is(.inbound-sku-option:has(input:checked),.inbound-goods-row:has([data-inbound-goods-check]:checked)) { background:var(--surface-selected); }
 :root[data-theme] :is(.order-lock-note,.order-comment-time,.doc-variable-list code,.warehouse-tile small,.workflow-tile>span) { color:var(--muted); }
 :root[data-theme] .unit-usd { color:var(--accent)!important; }
 :root[data-theme] .cost-incomplete { color:var(--warning-text); }
 :root[data-theme] .footnote { color:var(--muted); }
 /* Attendance keeps its semantic colors and visible day boundaries. */
 :root[data-theme] .attendance-calendar :is(thead th,.attendance-person,tbody .attendance-day,tbody .attendance-balance) { background:var(--surface);color:var(--text);border-color:var(--line); }
 :root[data-theme] .attendance-calendar :is(thead .attendance-person,.attendance-day.is-weekend) { background:var(--surface-2); }
 :root[data-theme] .attendance-calendar :is(thead .attendance-day.is-today,.attendance-available,tbody .attendance-available) { background:var(--notice-bg);color:var(--notice-text); }
 :root[data-theme] .attendance-calendar tbody tr:hover :is(.attendance-person,.attendance-balance) { background:var(--surface-hover); }
 :root[data-theme] :is(.attendance-work,.attendance-vacation) { background:var(--success-bg);color:var(--success-text);border-color:var(--success-border); }
 :root[data-theme] :is(.attendance-sick,.attendance-absent) { background:var(--error-bg);color:var(--error-text);border-color:var(--error-border); }
 :root[data-theme] :is(.attendance-period-preview,.people-role-labels span) { background:var(--surface-2);color:var(--text); }
 /* Mobile chrome and row disclosures use the same surfaces as desktop. */
 :root[data-theme] :is(.mobile-action-tile,.mobile-freight-choice) { background:var(--surface-2);border-color:var(--line);color:var(--text); }
 :root[data-theme] :is(.mobile-action-copy>small,.mobile-section-link>svg,.mobile-freight-choice small) { color:var(--muted); }
 :root[data-theme] :is(.mobile-action-icon,.mobile-section-link[aria-current=page]) { background:var(--notice-bg);color:var(--notice-text); }
 :root[data-theme] :is(.mobile-action-tile:hover,.mobile-freight-choice:hover,.mobile-section-link:hover) { background:var(--surface-hover); }
 :root[data-theme] .mobile-sheet-handle { background:var(--input-border); }
 @media(max-width:800px) {
  :root[data-theme] body.mobile-app-ready :is(.topbar,.modal-foot,.mobile-bottom-nav) { background:var(--surface);border-color:var(--line); }
  :root[data-theme] body.mobile-app-ready .mobile-nav-item { color:var(--muted); }
  :root[data-theme] body.mobile-app-ready .mobile-nav-item.active { color:var(--accent);background:var(--surface-2); }
  :root[data-theme] body.mobile-app-ready .mobile-disclosure-table>tbody>tr[data-mobile-row] { background:var(--surface);border-color:var(--line); }
  :root[data-theme] body.mobile-app-ready .mobile-row-toggle { background:var(--surface-2);color:var(--accent); }
  :root[data-theme] body.mobile-app-ready .mobile-disclosure-table>tbody>tr.bulk-selected { background:var(--surface-selected); }
 }
 @media(min-width:801px) { :root[data-theme] .workspace>.topbar { background:var(--bg); } }
 :root[data-theme] .bulk-toolbar:has([data-bulk-choice]:disabled):has([data-bulk-notice][hidden]) { display:none; }
 /* Shared surfaces: clear dividers, folder tabs and round dismiss controls. */
 :root[data-theme] :is(.panel,.orders-register-results,.warehouse-tile,.workflow-tile) { border-radius:14px; }
 :root[data-theme] .panel-head { padding:16px 18px;background:var(--surface); }
 :root[data-theme] .panel-head h2 { font-size:16px;font-weight:750; }
 /* Order and repair cards share a header size, with or without actions. */
 :root[data-theme] .order-workspace .panel-head { min-height:64px;padding:8px 18px;align-items:center;flex-wrap:nowrap; }
 :root[data-theme] .order-workspace .panel-head>.btn { white-space:normal;line-height:1.25; }
 :root[data-theme] .order-workspace .workflow-tile { background:transparent;border:0;border-radius:0;box-shadow:none; }
 :root[data-theme] .btn { border-radius:9px; }
 :root[data-theme] .supplier-input-group>select:not(:only-child) { border-right:0;border-radius:8px 0 0 8px; }
 :root[data-theme] .supplier-input-group>.supplier-add { margin-left:0;border-radius:0 8px 8px 0;background:var(--surface-2);color:var(--muted); }
 :root[data-theme] .supplier-input-group>.supplier-add:hover:not(:disabled) { background:var(--nav-selected);color:var(--text);border-color:var(--input-border); }
 :root[data-theme] .badge { border-radius:20px;font-weight:650; }
 /* The People section's folder tabs are shared by every section and mode switch. */
 :root[data-theme] .tabs {
  display:flex;align-items:stretch;flex-wrap:nowrap;gap:2px;min-width:0;max-width:100%;padding:0;border:0;border-radius:0;
  background:linear-gradient(var(--line),var(--line)) left bottom / 100% 1px no-repeat var(--bg);box-shadow:none;
  overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;-webkit-overflow-scrolling:touch;
 }
 :root[data-theme] .tabs>button {
  flex:none;min-height:46px;margin:0;padding:11px 17px;border:1px solid transparent;border-bottom-color:var(--line);
  border-radius:9px 9px 0 0;background:transparent;color:var(--muted);font-size:13px;font-weight:550;line-height:1.4;white-space:nowrap;box-shadow:none;
 }
 :root[data-theme] .tabs>button:hover:not(.active):not(:disabled) { background:var(--surface-hover);color:var(--text); }
 :root[data-theme] .tabs>button.active { border-color:var(--line);border-bottom-color:var(--surface);background:var(--surface);color:var(--text);font-weight:700;box-shadow:none; }
 :root[data-theme] .tabs>button:focus-visible { outline:2px solid var(--accent);outline-offset:-4px; }
 :root[data-theme] .tabs.document-settings-tabs { padding:12px 20px 0; }
 /* A folder tab and its complete panel share one surface, including the tools. */
 :root[data-theme] :is(.section-tab-content,.settings-tabs-workspace,[role=tabpanel]) { background:var(--surface); }
 :root[data-theme] .section-tab-content :is(.list-tools,.list-filter-panel,.list-rule,.list-check-options,.list-config-title,.demand-actions) { background:var(--surface); }
 :root[data-theme] .settings-tabs-workspace { margin-bottom:0; }
 :root[data-theme] .settings-tabs-workspace>.tabs { padding:12px 20px 0; }
 :root[data-theme] .settings-tabs-workspace>.section-tab-content { padding:0;border:0;border-radius:0; }
 :root[data-theme] .settings-tabs-workspace .setting-card { background:var(--surface); }
 .warehouse-settings-workspace { min-width:0; }
 .settings-grid>.panel:has(>.warehouse-settings-workspace) { min-width:0; }
 .warehouse-settings-location-head { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 22px;border-bottom:1px solid var(--line); }
 .warehouse-settings-location-head h3 { margin:0;font-size:14px; }
 .warehouse-settings-locations .setting-card { padding-top:13px;padding-bottom:13px; }
 .warehouse-settings-workspace .setting-card>div:first-child { min-width:0;overflow-wrap:anywhere; }
 .warehouse-settings-workspace .actions { flex-wrap:wrap;flex-shrink:0; }
 @media(max-width:600px) { .warehouse-settings-workspace .setting-card { flex-wrap:wrap;gap:10px;padding-left:16px;padding-right:16px; }.warehouse-settings-location-head { padding-left:16px;padding-right:16px;flex-wrap:wrap; } }
 :root[data-theme] .doc-editor-switch { align-items:end;gap:0;margin:0;background:var(--bg); }
 :root[data-theme] .doc-editor-switch>.tabs { flex:1; }
 :root[data-theme] .doc-editor-switch>label { align-self:stretch;margin:0;padding:6px 10px;border-bottom:1px solid var(--line); }
 :root[data-theme] .doc-editor-content { padding:14px; }
 :root[data-theme] .doc-editor-content :is(.doc-editor-toolbar,.doc-image-toolbar,.doc-image-controls,.doc-rich-editor,.doc-source-editor) { background:var(--surface);color:var(--text); }
 :root[data-theme] .doc-editor-content>.modal-hint { margin-top:12px; }
 :root[data-theme] .list-filter-panel:has(>.tabs.list-scope) { background:var(--surface); }
 :root[data-theme] .list-filter-panel>.tabs.list-scope { margin:0;border-bottom:0; }
 :root[data-theme] .list-filter-panel>.tabs.list-scope~* { background:var(--surface); }
 :root[data-theme] .orders-register-page>.toolbar:empty { display:none; }
 :root[data-theme] .orders-register-results>.order-register-actions { justify-content:flex-end;padding:12px 18px; }
 :root[data-theme] .orders-register-results>.list-tools { background:var(--surface); }
 :root[data-theme] .orders-register-results .list-tools-top { display:flex;align-items:center;flex-wrap:nowrap;gap:10px; }
 :root[data-theme] .orders-register-results .list-tools-top>.list-search { flex:1;min-width:140px;max-width:none; }
 :root[data-theme] .orders-register-results .list-search input { min-height:44px;padding:10px 13px;font-size:14px; }
 :root[data-theme] .orders-register-results .list-tools-top>[data-list-count] { display:none; }
 :root[data-theme] .order-register-actions { flex:none;flex-wrap:nowrap;gap:10px; }
 :root[data-theme] .order-register-actions>.btn { min-height:44px; }
 :root[data-theme] .manufacture-history .panel-head p { margin:6px 0 0;font-size:12px; }
 :root[data-theme] :is(.manufacture-history-search,.manufacture-history-status) { padding:12px 18px;margin:0; }
 :root[data-theme] .manufacture-history-status:empty { display:none; }
 :root[data-theme] [data-manufacture-retry]:not([hidden]) { margin:0 18px 16px; }
 @media(max-width:800px) {
  :root[data-theme] .orders-register-results .list-tools-top { flex-wrap:wrap; }
  :root[data-theme] .orders-register-results .list-tools-top>.list-search { min-width:0;flex-basis:calc(100% - 140px); }
  :root[data-theme] .order-register-actions { margin-left:auto; }
  :root[data-theme] .doc-editor-switch>label { width:100%;border:1px solid var(--line);border-top:0;background:var(--surface); }
 }
 :root[data-theme] :is(.modal-head,.mobile-sheet-heading)>.icon-btn { width:34px;height:34px;align-items:center;justify-content:center;border-radius:50%;background:var(--nav-selected);color:var(--text);flex:none; }
 :root[data-theme] .modal-head h2 { font-size:19px;font-weight:800;letter-spacing:-.3px; }
 :root[data-theme] .mobile-action-tile { min-height:112px;padding:16px;gap:8px;border-radius:12px; }
 :root[data-theme] .mobile-action-tile>.mobile-action-icon { display:none; }
 :root[data-theme] .mobile-action-copy>strong { font-size:16px;font-weight:750; }
 :root[data-theme] .mobile-action-copy>small { font-size:13px;line-height:1.5; }
 :root[data-theme] .mobile-nav-create { color:var(--action-text);border:1px solid var(--action-border);box-shadow:none; }
 @media(max-width:800px) {
  :root[data-theme] body.mobile-app-ready .content { background:var(--bg); }
  :root[data-theme] .tabs>button { min-height:44px;padding:11px 14px; }
  :root[data-theme] body.mobile-app-ready .tabs button { min-height:44px; }
  :root[data-theme] body.mobile-simple .tabs button { min-height:52px; }
  :root[data-theme] body.mobile-app-ready .mobile-nav-item.active { background:transparent; }
  :root[data-theme] body.mobile-app-ready .topbar { background:var(--bg); }
  :root[data-theme] body.mobile-app-ready .top-tools .profile { padding:4px;border:0;background:transparent; }
  :root[data-theme] .mobile-action-tile { min-height:116px;padding:14px; }
  :root[data-theme] body.mobile-simple .mobile-action-tile { min-height:140px; }
 }
 /* The stealth control is intentionally visually inert in either theme. */
 :root[data-theme] .demo-label .company-view-toggle:is(:hover,:focus,:focus-visible,:active) { background:transparent;box-shadow:none;outline:none; }
 /* Document content is paper, independently of the surrounding application. */
 :root[data-theme] :is(.document-editor,.doc-rich-editor,.doc-source-editor,.document-preview) { background:#fff;color:#142238;color-scheme:light; }
 :root[data-theme] :is(.document-editor,.doc-rich-editor,.document-preview) :is(td,th) { color:#142238;border-color:#b8c5d1;background:#fff; }
 :root[data-theme] :is(.document-editor,.doc-rich-editor,.document-preview) th { background:#edf1f5; }
 :root[data-theme] :is(.document-editor,.doc-rich-editor,.document-preview) :is(small,.muted) { color:#526277; }
 :root[data-theme] :is(.order-document-preview-frame,#doc-preview-frame,#doc-generation-frame,.template-content iframe) { background:#fff;color-scheme:light; }
}
@media print { :root { color-scheme:light!important; } }

/* Country tabs share the warehouse panel header; warehouse tabs remain below. */
.settings-grid>.panel:has(.warehouse-settings-country-tabs)>.panel-head{align-items:flex-end;flex-wrap:wrap;gap:10px 20px;padding-bottom:0}
.settings-grid>.panel:has(.warehouse-settings-country-tabs)>.panel-head>h2{align-self:center;margin-bottom:12px}
:root[data-theme] .tabs.warehouse-settings-country-tabs{flex:1;justify-content:flex-end;min-width:180px;background:transparent}
:root[data-theme] .warehouse-settings-country-tabs>button{min-height:42px;padding:9px 15px}
@media(max-width:600px){:root[data-theme] .tabs.warehouse-settings-country-tabs{flex-basis:100%;justify-content:flex-start}.settings-grid>.panel:has(.warehouse-settings-country-tabs)>.panel-head>h2{margin-bottom:0}}
