/* Motty Modern — opt-in presentation layer. Screen-only in base.html.
   Keep semantic colours, element order, IDs, data attributes and business handlers.
   Every rule is scoped; selecting Default immediately removes this layer. */
html[data-motty-theme="modern"] {
  --mm-forest:#183e32; --mm-green:#246c4e; --mm-green-hover:#1c573f;
  --mm-paper:#fff; --mm-canvas:#f2f5f2; --mm-ink:#253c32; --mm-muted:#66796e;
  --mm-line:#dce5de; --mm-soft:#edf3ee; --mm-shadow:0 3px 14px #183e3207;
  --m-bg:var(--mm-canvas); --m-white:var(--mm-paper); --m-ink:var(--mm-ink); --m-ink-2:#43584c;
  --m-line:var(--mm-line); --m-green-500:#39865d; --m-green-600:var(--mm-green); --m-green-700:var(--mm-green-hover);
  --m-shadow:var(--mm-shadow); --m-glass:#fff;
  --bs-body-bg:#f2f5f2; --bs-body-color:#334c3e; --bs-secondary-color:#67796e;
  --bs-body-font-family:Inter,"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  --bs-border-color:#dce5de; --bs-border-color-translucent:#183e321f;
  --bs-primary:#246c4e; --bs-primary-rgb:36,108,78;
  --bs-success:#28724b; --bs-success-rgb:40,114,75;
  --bs-warning:#a77514; --bs-warning-rgb:167,117,20;
  --bs-danger:#b74250; --bs-danger-rgb:183,66,80;
  --bs-info:#326e89; --bs-info-rgb:50,110,137;
  --bs-secondary:#67776e; --bs-secondary-rgb:103,119,110;
  --bs-primary-bg-subtle:#e5f2e9; --bs-primary-text-emphasis:#205f40; --bs-primary-border-subtle:#bfdbc8;
  --bs-success-bg-subtle:#e9f4ec; --bs-success-text-emphasis:#286244; --bs-success-border-subtle:#c3ddca;
  --bs-warning-bg-subtle:#faf1dc; --bs-warning-text-emphasis:#865e13; --bs-warning-border-subtle:#ecdaae;
  --bs-danger-bg-subtle:#fbecef; --bs-danger-text-emphasis:#a13b49; --bs-danger-border-subtle:#efcbd2;
  --bs-info-bg-subtle:#eaf3f7; --bs-info-text-emphasis:#326981; --bs-info-border-subtle:#c7dde7;
  --bs-secondary-bg-subtle:#edf0ed; --bs-secondary-text-emphasis:#5a6a5e; --bs-secondary-border-subtle:#d5ddd6;
  --bs-light-bg-subtle:#f5f8f5; --bs-link-color:#246c4e; --bs-link-color-rgb:36,108,78;
  --bs-link-hover-color:#164b33; --bs-link-hover-color-rgb:22,75,51;
  --navbar-h:var(--motty-topbar-height,80px);
  color-scheme:light;
}
html[data-motty-theme="modern"] body { background:var(--mm-canvas);color:var(--mm-ink);font-family:var(--bs-body-font-family);font-size:14px;line-height:1.55;zoom:1 !important;-webkit-font-smoothing:antialiased; }
html[data-motty-theme="modern"] .accent-bar { height:3px;background:var(--mm-green);animation:none; }
html[data-motty-theme="modern"] :is(h1,h2,h3,h4,.page-title) { color:var(--mm-forest);font-weight:700;letter-spacing:-.035em; }
html[data-motty-theme="modern"] h3 { font-size:1.55rem; }
html[data-motty-theme="modern"] :is(h5,h6,.modal-title) { color:var(--mm-forest);font-weight:650;letter-spacing:-.02em; }
html[data-motty-theme="modern"] .fw-bold { font-weight:700 !important; }
html[data-motty-theme="modern"] :is(.text-muted,.form-text) { color:var(--mm-muted) !important; }
html[data-motty-theme="modern"] :is(.table,.kpi-value,.value) { font-variant-numeric:tabular-nums; }
/* Header: same controls and sequence, allowed to wrap at laptop zoom. */
html[data-motty-theme="modern"] body > .navbar { position:sticky;top:0;z-index:1030;background:#fff;border-bottom:1px solid var(--mm-line);box-shadow:0 2px 12px #183e3205;padding:14px 22px !important; }
html[data-motty-theme="modern"] .navbar > .container-fluid { padding:0;gap:12px; }
html[data-motty-theme="modern"] .navbar-brand { color:var(--mm-forest);font-size:1.04rem;letter-spacing:-.035em;font-weight:750;margin:0; }
html[data-motty-theme="modern"] .navbar-brand:hover { color:var(--mm-green); }
html[data-motty-theme="modern"] .navbar :is(.text-white,.text-white-50) { color:#64766a !important; }
html[data-motty-theme="modern"] .navbar .text-white.fw-semibold { color:#274734 !important; }
html[data-motty-theme="modern"] .navbar .role-badge { background:#edf2ee;color:#49624f !important;border:1px solid #dce5de;font-size:10px;letter-spacing:.015em; }
html[data-motty-theme="modern"] .navbar .btn { font-size:12px;min-height:34px;padding:6px 10px;border-radius:8px;box-shadow:none; }
html[data-motty-theme="modern"] .navbar .btn-outline-light { color:#425f4d;background:#fff;border-color:#d4ded6; }
html[data-motty-theme="modern"] .navbar .btn-outline-light:hover { color:#1e5436;background:#f0f5ef;border-color:#a9c1ae; }
html[data-motty-theme="modern"] .navbar .btn-warning { background:#f0f4ef;border-color:#dce6dc;color:#426046; }
html[data-motty-theme="modern"] .navbar .btn-warning:is(:hover,.active) { background:#dfecde;border-color:#b9d2b8;color:#285738; }
html[data-motty-theme="modern"] .kpi-badges { gap:7px;flex-wrap:wrap; }
html[data-motty-theme="modern"] .kpi-badge { background:#f5f7f3;border:1px solid #e2e8df;padding:7px 12px;border-radius:9px;gap:3px; }
html[data-motty-theme="modern"] .kpi-badge .label { color:#768472;font-size:9px;letter-spacing:.045em; }
html[data-motty-theme="modern"] .kpi-badge .value { color:#2d513a;font-size:13px;font-weight:700; }
/* Sidebar: comfortably wide text, discreet independent scroll to the final link. */
html[data-motty-theme="modern"] .layout { min-height:calc(100dvh - var(--navbar-h)); }
html[data-motty-theme="modern"] .layout > .row { --bs-gutter-x:0;--bs-gutter-y:0;margin:0; }
html[data-motty-theme="modern"] .layout > .row > aside { background:var(--mm-forest);padding:0; }
html[data-motty-theme="modern"] .sidebar { top:var(--navbar-h);height:calc(100vh - var(--navbar-h));height:calc(100dvh - var(--navbar-h));padding:24px 16px 32px;gap:17px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#587764 transparent; }
html[data-motty-theme="modern"] .sidebar::-webkit-scrollbar { width:4px; }
html[data-motty-theme="modern"] .sidebar::-webkit-scrollbar-thumb { background:#587764;border-radius:4px; }
html[data-motty-theme="modern"] .nav-section { font-size:10px;color:#a6bfac;letter-spacing:.11em;font-weight:600;margin:2px 12px -7px; }
html[data-motty-theme="modern"] .nav-grid { gap:4px; }
html[data-motty-theme="modern"] .nav-card { background:transparent;border:1px solid transparent;color:#d8e6dc;box-shadow:none;border-radius:9px;padding:9px 10px;gap:9px;min-height:42px;font-size:13px;line-height:1.4; }
html[data-motty-theme="modern"] .nav-card .label { min-width:0;overflow-wrap:break-word;font-weight:500; }
html[data-motty-theme="modern"] .nav-card .icon { width:22px;height:22px;flex-basis:22px;color:#a9c9b3;opacity:1;border:0;border-radius:0; }
html[data-motty-theme="modern"] .nav-card:hover { color:#fff;background:#ffffff0d;border-color:transparent; }
html[data-motty-theme="modern"] .nav-card.active { color:#fff;background:#36614a;border-color:#52795b;box-shadow:inset 3px 0 #b5d0a0; }
html[data-motty-theme="modern"] .nav-card.active .icon { color:#cee4b4; }
html[data-motty-theme="modern"] .nav-card small { color:#b7cdbb; }
html[data-motty-theme="modern"] .nav-card:is(.alert-card,.warn-card) { background:#594a26;border-color:#826b33;color:#f4e4b3; }
html[data-motty-theme="modern"] .nav-card:is(.alert-card,.warn-card) :is(.label,.icon) { color:#f4e4b3; }
html[data-motty-theme="modern"] .nav-card.ok-card { background:#254e3c;border-color:#3f6b4e;color:#d9edd9; }
html[data-motty-theme="modern"] .nav-card.ok-card .icon { color:#b8dca7; }
html[data-motty-theme="modern"] .nav-card.loading-card { background:#29473f;border-color:#456457;color:#d0dfd6; }
html[data-motty-theme="modern"] .offcanvas { --bs-offcanvas-width:min(330px,90vw);background:var(--mm-forest);color:#fff;border:0; }
html[data-motty-theme="modern"] .offcanvas-header { padding:20px;border-bottom:1px solid #ffffff20; }
html[data-motty-theme="modern"] .offcanvas-title { color:#edf5eb; }
html[data-motty-theme="modern"] .offcanvas .btn-close { filter:invert(1);opacity:.9; }
html[data-motty-theme="modern"] .offcanvas .offcanvas-body { overflow-y:auto;padding-bottom:env(safe-area-inset-bottom,0px); }
html[data-motty-theme="modern"] .offcanvas .sidebar { position:static;height:auto;min-height:100%;overflow:visible;padding:20px 16px 40px; }
html[data-motty-theme="modern"] .offcanvas .nav-card { min-height:46px;font-size:14px; }
/* Workspace & surfaces. The original container order stays intact. */
html[data-motty-theme="modern"] main { min-width:0; }
html[data-motty-theme="modern"] .layout > .row > main { padding:26px 28px !important; }
html[data-motty-theme="modern"] main > .card-soft { padding:0 !important;border:0;border-radius:0;background:transparent;box-shadow:none; }
html[data-motty-theme="modern"] .page-header { flex-wrap:wrap;gap:10px; }
html[data-motty-theme="modern"] .page-header:has(.page-actions:empty) { margin-bottom:0; }
html[data-motty-theme="modern"] .page-title .dot { display:none; }
html[data-motty-theme="modern"] :is(.card,.card-soft,.lo-card,.saved-order-detail-card,.best-period-card) { --bs-card-bg:#fff;--bs-card-border-color:var(--mm-line);border:1px solid var(--mm-line);border-radius:14px !important;background:#fff;box-shadow:var(--mm-shadow) !important; }
html[data-motty-theme="modern"] .card.border-0 { border:1px solid var(--mm-line) !important; }
html[data-motty-theme="modern"] :is(.card-header,.lo-head) { background:#fff;border-bottom:1px solid var(--mm-line);padding:15px 18px;color:#2b4936;font-size:13px;font-weight:650; }
html[data-motty-theme="modern"] .card-header:first-child { border-radius:13px 13px 0 0; }
html[data-motty-theme="modern"] .card-body { padding:18px; }
html[data-motty-theme="modern"] .card-footer { background:#f9fbf8;border-color:var(--mm-line);padding:12px 18px; }
html[data-motty-theme="modern"] .card-footer:last-child { border-radius:0 0 13px 13px; }
html[data-motty-theme="modern"] :is(.accordion-item,.list-group-item) { background:#fff;border-color:var(--mm-line);color:var(--mm-ink); }
html[data-motty-theme="modern"] .accordion-button { font-weight:600;color:var(--mm-ink);background:#fff; }
html[data-motty-theme="modern"] .accordion-button:not(.collapsed) { color:#225939;background:#edf5ee;box-shadow:inset 0 -1px var(--mm-line); }
/* Buttons: quieter shapes with a clear primary action and real disabled states. */
html[data-motty-theme="modern"] .btn { --bs-btn-font-size:.82rem;--bs-btn-font-weight:600;--bs-btn-border-radius:8px;--bs-btn-padding-x:.9rem;--bs-btn-padding-y:.5rem;--bs-btn-focus-shadow-rgb:80,135,101;font-weight:600;letter-spacing:0;border-radius:8px;min-height:36px;line-height:1.4;box-shadow:none;transition:background-color .15s,border-color .15s,color .15s; }
html[data-motty-theme="modern"] .btn-sm { font-size:.77rem;padding:.38rem .65rem;min-height:32px; }
html[data-motty-theme="modern"] :is(.btn-primary,.btn-motty) { --bs-btn-color:#fff;--bs-btn-bg:#246c4e;--bs-btn-border-color:#246c4e;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#1c573f;--bs-btn-hover-border-color:#1c573f;--bs-btn-active-color:#fff;--bs-btn-active-bg:#194e36;--bs-btn-active-border-color:#194e36;--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#246c4e;--bs-btn-disabled-border-color:#246c4e;color:#fff; }
html[data-motty-theme="modern"] .btn-motty { background:#246c4e;border-color:#246c4e; }
html[data-motty-theme="modern"] .btn-motty:hover { background:#1c573f;border-color:#1c573f; }
html[data-motty-theme="modern"] :is(.btn-outline-primary,.btn-outline-success) { --bs-btn-color:#276747;--bs-btn-border-color:#a9c6b3;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#246c4e;--bs-btn-hover-border-color:#246c4e;--bs-btn-active-bg:#246c4e;--bs-btn-active-border-color:#246c4e;--bs-btn-active-color:#fff;--bs-btn-disabled-color:#276747;--bs-btn-disabled-border-color:#a9c6b3; }
html[data-motty-theme="modern"] .btn-success { --bs-btn-bg:#327451;--bs-btn-border-color:#327451;--bs-btn-hover-bg:#255f40;--bs-btn-hover-border-color:#255f40;--bs-btn-active-bg:#205436;--bs-btn-active-border-color:#205436; }
html[data-motty-theme="modern"] :is(.btn-outline-secondary,.btn-outline-dark,.btn-ghost) { --bs-btn-color:#4e6656;--bs-btn-border-color:#ccd8ce;--bs-btn-hover-color:#294a35;--bs-btn-hover-bg:#edf2ec;--bs-btn-hover-border-color:#a6bda9;--bs-btn-active-color:#254d31;--bs-btn-active-bg:#dfeadf;--bs-btn-active-border-color:#a6bda9; }
html[data-motty-theme="modern"] .btn-ghost { background:#fff;color:#4e6656;border-color:#ccd8ce; }
html[data-motty-theme="modern"] .btn-warning { --bs-btn-color:#705312;--bs-btn-bg:#f6ebcc;--bs-btn-border-color:#e9d6a4;--bs-btn-hover-color:#65480b;--bs-btn-hover-bg:#eedca9;--bs-btn-hover-border-color:#d4b970;--bs-btn-active-color:#65480b;--bs-btn-active-bg:#e9d395;--bs-btn-active-border-color:#d4b970; }
html[data-motty-theme="modern"] .btn-danger { --bs-btn-bg:#b74250;--bs-btn-border-color:#b74250;--bs-btn-hover-bg:#98313f;--bs-btn-hover-border-color:#98313f; }
html[data-motty-theme="modern"] .btn-outline-danger { --bs-btn-color:#a73a48;--bs-btn-border-color:#dcacb3;--bs-btn-hover-bg:#ad3b49;--bs-btn-hover-border-color:#ad3b49;--bs-btn-active-bg:#ad3b49;--bs-btn-active-border-color:#ad3b49; }
html[data-motty-theme="modern"] .btn-location-purple { --bs-btn-color:#695087;--bs-btn-bg:#f4eff8;--bs-btn-border-color:#d8cde6;--bs-btn-hover-bg:#695087;--bs-btn-hover-border-color:#695087;font-weight:600; }
html[data-motty-theme="modern"] .btn-group:not(.btn-group-vertical) > .btn:not(:first-child) { border-top-left-radius:0;border-bottom-left-radius:0; }
html[data-motty-theme="modern"] .btn-group:not(.btn-group-vertical) > .btn:not(:last-child) { border-top-right-radius:0;border-bottom-right-radius:0; }
html[data-motty-theme="modern"] :is(button,a,input,select,textarea,[tabindex]):focus-visible { outline:3px solid #84af93;outline-offset:2px; }
html[data-motty-theme="modern"] :is(.btn:disabled,.btn.disabled) { opacity:.5;cursor:not-allowed; }
/* Fields. Leave validation, readonly and quantity-step behavior to the existing code. */
html[data-motty-theme="modern"] :is(.form-control,.form-select) { border:1px solid #ccd8ce;background-color:#fff;color:#2a4432;border-radius:8px;min-height:39px;font-size:14px;line-height:1.45;padding:.55rem .7rem;box-shadow:none; }
html[data-motty-theme="modern"] .form-select { padding-right:2.2rem; }
html[data-motty-theme="modern"] :is(.form-control,.form-select):focus { border-color:#5e9973;box-shadow:0 0 0 3px #80b18a22; }
html[data-motty-theme="modern"] :is(.form-control,.form-select):disabled { background-color:#edf1ed;color:#748375;opacity:1; }
html[data-motty-theme="modern"] .form-control[readonly] { background-color:#f5f7f3; }
html[data-motty-theme="modern"] .form-control::placeholder { color:#899689;opacity:1; }
html[data-motty-theme="modern"] .form-label { font-size:12px;font-weight:600;color:#536b57;letter-spacing:.01em;margin-bottom:6px; }
html[data-motty-theme="modern"] .form-text { font-size:11px;line-height:1.55; }
html[data-motty-theme="modern"] .input-group-text { border-color:#ccd8ce;background:#f3f6ef;color:#62755f;border-radius:8px;font-size:12px; }
html[data-motty-theme="modern"] .input-group > :not(:first-child) { border-top-left-radius:0;border-bottom-left-radius:0; }
html[data-motty-theme="modern"] .input-group > :not(:last-child) { border-top-right-radius:0;border-bottom-right-radius:0; }
html[data-motty-theme="modern"] .form-check-input { width:1.1em;height:1.1em;border-color:#a9bfac; }
html[data-motty-theme="modern"] .form-check-input:checked { background-color:#327451;border-color:#327451; }
html[data-motty-theme="modern"] .is-invalid { border-color:#b74250 !important; }
html[data-motty-theme="modern"] .is-valid { border-color:#327451 !important; }
/* Badges retain the status/payment colours; fewer heavy outlines and no oversized bubbles. */
html[data-motty-theme="modern"] :is(.badge,.badge-aging,.saved-status-badge,.status-chip .chip,.lo-money-pill,.lo-driver-pill,.kpi-chip,.finish-payment-pill,.finish-service-pill) { border-radius:6px !important;font-size:11px;font-weight:600;letter-spacing:.015em;line-height:1.35;padding:5px 8px;box-shadow:none;border-width:1px; }
html[data-motty-theme="modern"] :is(.badge-status,.saved-status-badge) { border:1px solid currentColor;border-color:color-mix(in srgb,currentColor 18%,transparent); }
html[data-motty-theme="modern"] :is(.badge.bg-success,.badge.text-bg-success) { background:#e6f2e9 !important;color:#276844 !important;border:1px solid #c4ddcd; }
html[data-motty-theme="modern"] :is(.badge.bg-primary,.badge.text-bg-primary) { background:#e6f0e8 !important;color:#2c6545 !important;border:1px solid #c5dbcb; }
html[data-motty-theme="modern"] :is(.badge.bg-warning,.badge.text-bg-warning) { background:#f8efd9 !important;color:#805f1d !important;border:1px solid #ebd9ad; }
html[data-motty-theme="modern"] :is(.badge.bg-danger,.badge.text-bg-danger) { background:#f8e9ec !important;color:#a03947 !important;border:1px solid #ecc8cf; }
html[data-motty-theme="modern"] :is(.badge.bg-info,.badge.text-bg-info) { background:#eaf2f5 !important;color:#356b7e !important;border:1px solid #cadde4; }
html[data-motty-theme="modern"] :is(.badge.bg-secondary,.badge.text-bg-secondary,.badge.bg-light,.badge.text-bg-light) { background:#eef1eb !important;color:#5a6f57 !important;border:1px solid #d8e1d3; }
html[data-motty-theme="modern"] .status-chip .chip { display:inline-flex;align-items:center;min-height:34px;border:1px solid #d8e2d9;background:#fff;color:#637b63;padding:7px 11px;border-radius:8px !important; }
html[data-motty-theme="modern"] .status-chip.active .chip { color:#205e3c;background:#e7f1e5;border-color:#a4c59e; }
html[data-motty-theme="modern"] .status-chip:focus-within .chip { outline:3px solid #84af93;outline-offset:2px; }
html[data-motty-theme="modern"] .status-chip input { display:block;position:absolute;opacity:0;width:1px;height:1px; }
html[data-motty-theme="modern"] .nav-pills { gap:6px; }
html[data-motty-theme="modern"] :is(.nav-pills,.nav-tabs) .nav-link { color:#5c735c;border-radius:8px;font-size:13px;font-weight:600;padding:9px 13px; }
html[data-motty-theme="modern"] .nav-pills .nav-link.active { color:#fff;background:#2c6c49; }
html[data-motty-theme="modern"] .nav-tabs { border-color:var(--mm-line); }
html[data-motty-theme="modern"] .nav-tabs .nav-link.active { background:#fff;color:#2b6342;border-color:var(--mm-line);border-bottom-color:#fff; }
html[data-motty-theme="modern"] .pagination { gap:4px; }
html[data-motty-theme="modern"] .page-link { border:1px solid #d5dfd4;border-radius:7px;color:#4c6a4a;background:#fff; }
html[data-motty-theme="modern"] .active > .page-link { background:#286b49;border-color:#286b49;color:#fff; }
/* Data tables: readable rows, stable widths, localized horizontal scrolling. */
html[data-motty-theme="modern"] .table-responsive { max-width:100%;border-radius:9px;scrollbar-width:thin;scrollbar-color:#bdcdbd #f3f6f0;overscroll-behavior-x:contain; }
html[data-motty-theme="modern"] .table { --bs-table-color:#39503d;--bs-table-bg:#fff;--bs-table-border-color:#e4ebe0;--bs-table-striped-bg:#f7f9f5;--bs-table-hover-bg:#f0f5ed;font-size:13px; }
html[data-motty-theme="modern"] .table > thead > tr > th { background:#f2f6ee;color:#687b5f;border-color:#dde7d7;font-weight:650;font-size:10px;text-transform:uppercase;letter-spacing:.06em;padding:12px 10px;line-height:1.5;white-space:nowrap; }
html[data-motty-theme="modern"] .table > tbody > tr > td { padding:12px 10px;vertical-align:middle; }
html[data-motty-theme="modern"] .table-light { --bs-table-bg:#f2f6ee;--bs-table-color:#4e6645;--bs-table-border-color:#dde7d7; }
html[data-motty-theme="modern"] .table :is(.table-primary,.table-active) { --bs-table-bg:#e7f0e3;--bs-table-active-bg:#e7f0e3; }
/* Operational modules, all in their original locations. */
html[data-motty-theme="modern"] .dispatcher-summary-toolbar { gap:8px; }
html[data-motty-theme="modern"] .dispatcher-visibility-chip { background:#f4f7f0;border:1px solid #dce5d5;color:#617456;border-radius:8px;padding:8px 12px;font-size:12px;font-weight:600;box-shadow:none; }
html[data-motty-theme="modern"] .dispatcher-visibility-chip.is-active { background:#e6f0e2;border-color:#b1c9a7;color:#365f37; }
html[data-motty-theme="modern"] .dispatcher-visibility-chip.is-alert { background:#faeded;border-color:#e3b9bb;color:#a0474b; }
html[data-motty-theme="modern"] .dispatcher-summary-section { border-color:#e0e8db; }
html[data-motty-theme="modern"] .dispatcher-summary-section-title { color:#698060;font-size:10px;letter-spacing:.08em; }
html[data-motty-theme="modern"] .orders-done .box { border:1px solid #dfe7d9;border-radius:9px;background:#f8faf5;padding:12px 14px;font-size:13px; }
html[data-motty-theme="modern"] :is(.dispatcher-map,.liveops-map) { border:1px solid #d9e4d3;border-radius:10px; }
html[data-motty-theme="modern"] .dispatcher-stock-table tbody tr.stock-size-group-row td { background:#eaf2e4 !important;color:#355631; }
html[data-motty-theme="modern"] .dispatcher-stock-table tbody tr.stock-location-group-row td { background:#f4f7ef !important; }
html[data-motty-theme="modern"] .dispatcher-stock-brand-pill { border-radius:5px;box-shadow:none; }
html[data-motty-theme="modern"] .saved-items-wrap .saved-item-row { background:#f7faf4;border-color:#dce7d6;border-radius:9px; }
html[data-motty-theme="modern"] .kpi-card { background:#fff;transform:none; }
html[data-motty-theme="modern"] .kpi-card:before { display:none; }
html[data-motty-theme="modern"] .kpi-card:hover { transform:none;box-shadow:0 5px 20px #284a2510 !important;border-color:#b9cdb3; }
html[data-motty-theme="modern"] .kpi-card .kpi-accent { height:2px;opacity:.7; }
html[data-motty-theme="modern"] .kpi-card .kpi-label { font-size:10px;letter-spacing:.08em;color:#788670; }
html[data-motty-theme="modern"] .kpi-card .kpi-value { color:#294b33;font-size:1.85rem;letter-spacing:-.055em;font-weight:650; }
html[data-motty-theme="modern"] .kpi-card .kpi-sub { color:#71826b;font-size:12px; }
html[data-motty-theme="modern"] .kpi-icon-bubble { background:#f1f5ed;border-color:#dfe7d9;border-radius:10px;box-shadow:none; }
html[data-motty-theme="modern"] .kpi-card .kpi-icon { font-size:1.3rem; }
html[data-motty-theme="modern"] .kpi-handle { border:1px solid #dce5d6;background:#f6f9f2;color:#7a8e71;border-radius:6px;font-size:10px; }
html[data-motty-theme="modern"] .lo-money-pill { background:#f1f5ec;border-color:#dde7d3;color:#4f6c40; }
html[data-motty-theme="modern"] .lo-driver-pill { border-radius:6px; }
html[data-motty-theme="modern"] .lo-collapse-toggle { border-radius:8px;background:#f4f7f0;border-color:#dce5d6;color:#4f6a43; }
html[data-motty-theme="modern"] :is(.action-belt,.order-actions) { gap:5px; }
/* Dialogs and feedback: no fixed heights on content, no clipped forms. */
html[data-motty-theme="modern"] .modal-content { border:1px solid #d7e1d2;border-radius:16px;background:#fff;box-shadow:0 20px 70px #1c3e2933;color:#3b5137; }
html[data-motty-theme="modern"] .modal-header { background:#fafcf7;border-bottom:1px solid #e0e8d9;padding:18px 22px;gap:10px;border-radius:15px 15px 0 0; }
html[data-motty-theme="modern"] .modal-body { padding:22px; }
html[data-motty-theme="modern"] .modal-footer { padding:14px 22px;background:#fafcf7;border-top-color:#e0e8d9;border-radius:0 0 15px 15px;gap:6px; }
html[data-motty-theme="modern"] .btn-close { flex:none; }
html[data-motty-theme="modern"] .dropdown-menu { border:1px solid #dce5d5;border-radius:12px;padding:6px;box-shadow:0 10px 35px #26462b16;background:#fff; }
html[data-motty-theme="modern"] .dropdown-item { border-radius:7px;color:#425d3a;font-size:13px;padding:9px 12px; }
html[data-motty-theme="modern"] .dropdown-item:hover { background:#edf4e8;color:#345f2c; }
html[data-motty-theme="modern"] .alert { border-radius:10px;box-shadow:none; }
html[data-motty-theme="modern"] .alert-glass { backdrop-filter:none; }
html[data-motty-theme="modern"] .alert-danger { background:#fbecef;color:#973c4a;border-color:#efcbd2; }
html[data-motty-theme="modern"] .alert-success { background:#e9f4ec;color:#286244;border-color:#c3ddca; }
html[data-motty-theme="modern"] .alert-warning { background:#faf1dc;color:#865e13;border-color:#ecdaae; }
@media(min-width:768px) {
  html[data-motty-theme="modern"] .layout { padding:0; }
  html[data-motty-theme="modern"] .layout > .row { display:grid;grid-template-columns:238px minmax(0,1fr); }
  html[data-motty-theme="modern"] .layout > .row > :is(aside,main) { width:auto;max-width:none; }
  html[data-motty-theme="modern"] .navbar > .container-fluid > .d-md-flex { flex:1;justify-content:flex-end;min-width:0;row-gap:8px !important; }
}
@media(min-width:1600px) {
  html[data-motty-theme="modern"] .layout > .row { grid-template-columns:252px minmax(0,1fr); }
  html[data-motty-theme="modern"] .layout > .row > main { padding:30px 36px !important; }
}
@media(min-width:768px) and (max-width:1199.98px) {
  html[data-motty-theme="modern"] .layout > .row { grid-template-columns:224px minmax(0,1fr); }
  html[data-motty-theme="modern"] .layout > .row > main { padding:20px !important; }
  html[data-motty-theme="modern"] .navbar > .container-fluid > .d-md-flex { flex-basis:100%;justify-content:flex-start; }
}
@media(max-width:767.98px) {
  html[data-motty-theme="modern"] body { font-size:14px; }
  html[data-motty-theme="modern"] body > .navbar { padding:10px 12px !important;padding-left:max(12px,env(safe-area-inset-left,0px)) !important;padding-right:max(12px,env(safe-area-inset-right,0px)) !important; }
  html[data-motty-theme="modern"] .navbar > .container-fluid { gap:6px;flex-wrap:nowrap; }
  html[data-motty-theme="modern"] .navbar > .container-fluid > div { gap:6px !important;min-width:0; }
  html[data-motty-theme="modern"] .navbar-brand { font-size:14px;line-height:1.3;white-space:normal;max-width:145px; }
  html[data-motty-theme="modern"] .navbar .btn { min-width:40px;min-height:44px;padding:8px;font-size:13px; }
  html[data-motty-theme="modern"] .navbar .motty-theme-trigger { min-width:75px; }
  html[data-motty-theme="modern"] .layout { padding:0; }
  html[data-motty-theme="modern"] .layout > .row > main { padding:16px 12px calc(24px + env(safe-area-inset-bottom,0px)) !important; }
  html[data-motty-theme="modern"] h3 { font-size:1.3rem; }
  html[data-motty-theme="modern"] .page-header { margin-bottom:10px; }
  html[data-motty-theme="modern"] .page-title { flex-wrap:wrap;gap:6px;font-size:1.1rem;width:100%; }
  html[data-motty-theme="modern"] .mobile-kpis { display:flex;flex-wrap:wrap;gap:6px 10px;margin:0 0 14px;font-size:11px;white-space:normal;line-height:1.5; }
  html[data-motty-theme="modern"] .mobile-kpis .item { gap:4px; }
  html[data-motty-theme="modern"] .mobile-kpis .val { color:#326544; }
  html[data-motty-theme="modern"] .mobile-kpis .sep { color:#9aaf93; }
  html[data-motty-theme="modern"] :is(.card-body,.card-body.px-4) { padding:14px !important; }
  html[data-motty-theme="modern"] :is(.card-header,.lo-head) { padding:13px 14px;gap:10px !important; }
  html[data-motty-theme="modern"] .card-header > div { min-width:0;max-width:100%; }
  html[data-motty-theme="modern"] .row { --bs-gutter-x:1rem; }
  html[data-motty-theme="modern"] :is(.row > [class*="col-"],.kpi-value,.input-group) { min-width:0; }
  html[data-motty-theme="modern"] :is(.btn,.btn-sm,.order-actions .btn,.action-belt .btn) { min-height:44px;font-size:13px;padding:9px 11px;line-height:1.4; }
  html[data-motty-theme="modern"] :is(.form-control,.form-select,.input-group-sm > .form-control,.input-group-sm > .form-select) { font-size:16px !important;min-height:44px;padding:10px; }
  html[data-motty-theme="modern"] .form-select { padding-right:2.1rem; }
  html[data-motty-theme="modern"] :is(.form-label,.form-text) { font-size:12px; }
  html[data-motty-theme="modern"] .input-group-text { font-size:12px;padding:8px; }
  html[data-motty-theme="modern"] .input-group > .form-control { min-width:0; }
  html[data-motty-theme="modern"] .form-check { min-height:32px;padding-top:3px; }
  html[data-motty-theme="modern"] .form-check-input { width:20px;height:20px;margin-top:1px; }
  html[data-motty-theme="modern"] .form-check-label { padding-left:3px; }
  html[data-motty-theme="modern"] .form-check.form-switch { padding-left:2.8em; }
  html[data-motty-theme="modern"] .form-switch .form-check-input { width:2em; }
  html[data-motty-theme="modern"] .table { font-size:13px; }
  html[data-motty-theme="modern"] .table > tbody > tr > td { padding:11px 9px;max-width:none;overflow:visible;text-overflow:clip;white-space:normal;min-width:70px; }
  html[data-motty-theme="modern"] .table > tbody > tr > td.text-nowrap { white-space:nowrap !important; }
  html[data-motty-theme="modern"] .table td .btn { white-space:nowrap; }
  html[data-motty-theme="modern"] :is(button.badge,.payment-details-pill) { min-height:44px;min-width:44px;padding:10px; }
  html[data-motty-theme="modern"] :is(.order-actions,.action-belt) { flex-wrap:wrap;min-width:140px; }
  html[data-motty-theme="modern"] :is(.nav-pills,.nav-tabs) { flex-wrap:wrap;gap:4px; }
  html[data-motty-theme="modern"] :is(.nav-pills,.nav-tabs) .nav-link { min-height:44px;padding:11px; }
  html[data-motty-theme="modern"] .status-chip .chip { min-height:44px;padding:10px 12px; }
  html[data-motty-theme="modern"] #statusFilters { max-width:100%;gap:7px !important;padding:3px 0 8px;scrollbar-width:thin; }
  html[data-motty-theme="modern"] .dispatcher-summary-toolbar { flex-wrap:wrap;gap:7px; }
  html[data-motty-theme="modern"] .dispatcher-visibility-chip { min-height:44px;padding:9px 11px;font-size:12px; }
  html[data-motty-theme="modern"] .orders-done { gap:8px; }
  html[data-motty-theme="modern"] .orders-done .box { padding:10px 12px; }
  html[data-motty-theme="modern"] .modal-dialog { margin:10px;max-width:calc(100% - 20px); }
  html[data-motty-theme="modern"] .modal-header { padding:15px;flex-wrap:wrap; }
  html[data-motty-theme="modern"] .modal-body { padding:15px;overflow-x:auto; }
  html[data-motty-theme="modern"] .modal-footer { padding:12px 15px calc(12px + env(safe-area-inset-bottom,0px));flex-wrap:wrap; }
  html[data-motty-theme="modern"] .modal .btn-close { min-width:32px;min-height:32px;background-size:13px; }
  html[data-motty-theme="modern"] .modal-dialog-scrollable { height:calc(100dvh - 20px); }
  html[data-motty-theme="modern"] .dropdown-menu { max-width:calc(100vw - 24px); }
  html[data-motty-theme="modern"] .dropdown-item { white-space:normal;min-height:44px; }
  html[data-motty-theme="modern"] .page-link { min-width:40px;min-height:44px;display:grid;place-items:center; }
}
@media(max-width:359.98px) {
  html[data-motty-theme="modern"] .navbar-brand { font-size:12px;max-width:110px; }
  html[data-motty-theme="modern"] .navbar .btn { padding:7px;min-width:36px; }
  html[data-motty-theme="modern"] .navbar .motty-theme-trigger { min-width:69px;font-size:12px; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-motty-theme="modern"] :is(.btn,.nav-card,.kpi-card) { transition:none;animation:none; }
}
