@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./inter/inter-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./inter/inter-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./inter/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* The surfaces, navigation dimensions and controls follow the e-workers workspace. */
:root {
  color-scheme: light;
  --bg: hsl(220 33% 95%);
  --fg: hsl(222 47% 11%);
  --card: #fff;
  --muted: hsl(220 10% 45%);
  --border: hsl(220 16% 91%);
  --sidebar-border: hsl(218 27% 93%);
  --divider: rgb(0 0 0 / .055);
  --input-border: rgb(0 0 0 / .12);
  --tint: rgb(0 0 0 / .025);
  --hover: rgb(0 0 0 / .04);
  --segment: rgb(0 0 0 / .05);
  --primary: #0a84ff;
  --blue-text: #0868cf;
  --active: rgb(10 132 255 / .10);
  --active-border: rgb(10 132 255 / .25);
  --good: #187c39;
  --good-bg: rgb(52 199 89 / .12);
  --warn: #8e5800;
  --warn-bg: rgb(255 159 10 / .13);
  --danger: #ba3440;
  --danger-bg: rgb(255 59 48 / .09);
  --shadow-xs: 0 1px 3px rgb(24 32 42 / .06), 0 1px 2px rgb(24 32 42 / .04);
  --shadow: 0 2px 6px rgb(24 32 42 / .07), 0 1px 3px rgb(24 32 42 / .05);
  --shadow-md: 0 6px 20px rgb(24 32 42 / .09), 0 3px 8px rgb(24 32 42 / .06);
  --sidebar-shadow: 0 4px 24px rgb(15 23 42 / .06);
  --rail-width: 248px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
:root.dark {
  color-scheme: dark;
  --bg: hsl(222 54% 6%);
  --fg: hsl(210 20% 92%);
  --card: hsl(222 47% 11%);
  --muted: hsl(215 15% 65%);
  --border: hsl(222 25% 18%);
  --sidebar-border: hsl(217 33% 17%);
  --divider: rgb(255 255 255 / .075);
  --input-border: rgb(255 255 255 / .17);
  --tint: rgb(255 255 255 / .035);
  --hover: rgb(255 255 255 / .055);
  --segment: rgb(255 255 255 / .085);
  --blue-text: #5ca9ff;
  --active: rgb(10 132 255 / .16);
  --active-border: rgb(10 132 255 / .35);
  --good: #66d886;
  --warn: #ffc165;
  --danger: #ff7b83;
  --shadow-xs: 0 1px 3px rgb(0 0 0 / .30);
  --shadow: 0 2px 6px rgb(0 0 0 / .35);
  --shadow-md: 0 6px 20px rgb(0 0 0 / .45);
  --sidebar-shadow: none;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-size: 14px; line-height: 1.5; }
a { color: var(--blue-text); text-decoration: none; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
button, a, summary, input, select { touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; overflow-wrap: anywhere; }
h2 { font-size: 16px; line-height: 1.4; font-weight: 650; }
h3 { font-size: 14px; line-height: 1.45; font-weight: 600; }
.icon { display: inline-block; width: 16px; height: 16px; flex: 0 0 auto; vertical-align: middle; }
.muted, .field-note { color: var(--muted); }
.tabular, .measurements dd, .summary-tile strong, .norm-values b { font-variant-numeric: tabular-nums; }
.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: fixed; z-index: 1200; top: 8px; left: 8px; padding: 8px; background: var(--card); }
::selection { background: rgb(10 132 255 / .2); }

.shell { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); padding-left: 12px; min-height: 100dvh; align-items: start; }
.rail { position: sticky; top: 12px; display: flex; flex-direction: column; height: calc(100dvh - 24px); min-height: 270px; margin: 12px 0; overflow: hidden; background: var(--card); border: 1px solid var(--sidebar-border); border-radius: 20px; box-shadow: var(--sidebar-shadow); }
.rail-head { display: flex; height: 64px; flex: none; align-items: center; justify-content: space-between; gap: 2px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--sidebar-border); }
.brand, .mobile-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--fg); }
.plant-mark { display: inline-grid; flex: none; place-items: center; width: 34px; height: 36px; color: #fff; background: linear-gradient(145deg, #46a7ff, #0077f3 74%); border-radius: 10px; box-shadow: inset 0 0 0 1px rgb(0 93 200 / .16); }
.plant-mark .icon { width: 23px; height: 23px; stroke-width: 1.65; }
.brand-text, .profile-text { display: grid; min-width: 0; gap: 4px; }
.brand-text strong, .mobile-brand span:last-child { font-size: 13px; line-height: 1.1; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.brand-text strong { letter-spacing: .035em; }
.brand-text small, .profile-text small { color: var(--muted); font-size: 10.5px; line-height: 1.3; }
.icon-button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: inline-grid; flex: none; place-items: center; }
.icon-button:hover { background: var(--hover); color: var(--fg); }
.nav-items { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 8px; }
.nav-item, .nav-action { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 41px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 450; text-align: left; padding: 9px 12px; border: 1px solid transparent; border-radius: 12px; }
.nav-item { margin-bottom: 2px; }
.nav-item .icon, .nav-action .icon { width: 17px; height: 17px; }
.nav-item:hover, .nav-action:hover { color: var(--fg); background: var(--hover); }
.nav-item[aria-current] { background: var(--active); color: var(--blue-text); border-color: var(--active-border); font-weight: 600; }
.nav-label, .brand-text strong, .brand-text small, .profile-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-footer { flex: none; padding: 8px 10px 14px; border-top: 1px solid var(--sidebar-border); }
.profile { display: flex; align-items: center; gap: 10px; margin-top: 7px; padding: 10px; border: 1px solid var(--divider); border-radius: 16px; background: var(--tint); }
.profile-text b { font-size: 13px; font-weight: 600; }
.avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; color: white; font-size: 13px; font-weight: 700; background: linear-gradient(135deg, #349aff, #006be6); }
.logout:hover { color: var(--danger); background: var(--danger-bg); }
.mobile-header, .mobile-chevron, .when-open, .theme-light, .theme-dark { display: none; }
[data-theme-pref="light"] .theme-auto, [data-theme-pref="dark"] .theme-auto { display: none; }
[data-theme-pref="light"] .theme-light, [data-theme-pref="dark"] .theme-dark { display: block; }

.workspace { min-width: 0; padding: 16px 24px 48px; }
.workspace:focus:not(:focus-visible) { outline: none; }
.page-head { display: flex; align-items: flex-end; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head > div { min-width: 0; }
.subtitle { margin-top: 2px; color: var(--muted); font-size: 13px; }
.subtitle a { color: inherit; }
.subtitle a:hover, .text-link:hover, .stops a:hover, .contact-card a:hover { text-decoration: underline; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 14px; border: 1px solid transparent; border-radius: 12px; font-size: 13px; line-height: 1.4; font-weight: 550; text-align: center; transition: background .15s, border-color .15s; }
.button .icon { width: 15px; height: 15px; }
.primary { color: #fff; background: var(--primary); }
.primary:hover { background: #0a6ce0; }
.ghost { background: transparent; color: var(--fg); border-color: var(--input-border); }
.ghost:hover { background: var(--hover); }
.button.small { min-height: 32px; font-size: 12.5px; padding: 5px 11px; }
.danger { color: var(--danger); border-color: rgb(255 59 48 / .3); background: transparent; }
.danger:hover { background: var(--danger-bg); }
.button.square { min-width: 36px; padding: 7px; }
button:disabled { opacity: .55; cursor: wait; }
.head-actions, .block-head, .address-actions, .form-actions, .panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.panel { min-width: 0; background: var(--card); border: 1px solid var(--divider); border-radius: 20px; box-shadow: var(--shadow); }
.panel-head { justify-content: space-between; gap: 8px 12px; padding: 16px 18px 13px; }
.panel-head small { color: var(--muted); font-size: 11.5px; }
.panel-empty { padding: 5px 18px 18px; font-size: 13px; color: var(--muted); }
.text-link { color: var(--blue-text); font-size: 12.5px; font-weight: 500; }
.back-link { display: inline-flex; align-items: center; gap: 2px; margin-bottom: 9px; color: var(--muted); font-size: 13px; }
.back-link:hover { color: var(--blue-text); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 15px; margin-bottom: 16px; }
.segment-scroll { min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segment-scroll::-webkit-scrollbar { display: none; }
.segments { display: inline-flex; gap: 2px; width: max-content; padding: 4px; border-radius: 999px; background: var(--segment); }
.segment { display: block; position: relative; font-weight: 500; cursor: pointer; }
.segment input { position: absolute; width: 1px; height: 1px; inset: 50% auto auto 50%; padding: 0; opacity: 0; }
.segment > span { display: block; padding: 6px 13px; color: var(--muted); border-radius: 99px; white-space: nowrap; font-size: 13px; }
.filter-short { display: none; }
.segment input:checked + span { color: var(--blue-text); background: var(--card); box-shadow: var(--shadow-xs); }
.segment input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
.search-box { position: relative; width: 256px; max-width: 100%; margin-left: auto; }
.search-box button { display: grid; place-items: center; position: absolute; inset: 0 auto 0 1px; width: 33px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 12px; }
.search-box button .icon { width: 14px; height: 14px; }
.search-box input { padding-left: 33px; }
label { display: flex; min-width: 0; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 550; color: var(--muted); }
input:not([type=radio]), select { min-width: 0; max-width: 100%; width: 100%; height: 36px; padding: 7px 12px; background-color: var(--card); color: var(--fg); border: 1px solid var(--input-border); border-radius: 12px; font: inherit; font-size: 13px; font-weight: 400; }
input::placeholder { color: var(--muted); }
input:focus-visible, select:focus-visible { border-color: rgb(10 132 255 / .65); outline: 2px solid rgb(10 132 255 / .2); outline-offset: 0; }
.search-box input[type=search] { padding-left: 33px; }
select { appearance: none; padding-right: 30px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' stroke='%2394a3b8' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center / 15px; }
.table-frame { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.directory-table { min-width: 640px; font-size: 13px; }
.data-table th { padding: 9px 16px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--muted); background: var(--tint); border-bottom: 1px solid var(--divider); }
.data-table td { padding: 10px 16px; vertical-align: middle; border-bottom: 1px solid var(--divider); }
.data-table tr:last-child td { border-bottom: 0; }
.directory-table td:first-child { width: 23%; font-weight: 550; }
.directory-table td:nth-child(3) { max-width: 350px; overflow-wrap: anywhere; }
.directory-table [data-supplier-row] { cursor: pointer; }
.directory-table [data-supplier-row]:hover, .directory-table tr:focus-within { background: var(--tint); }
.row-link { color: var(--fg); }
.row-link:hover { color: var(--blue-text); }
.numeric { text-align: right; white-space: nowrap; }
.group-name { display: block; color: var(--blue-text); font-size: 12px; }
.mobile-directory { display: none; }
.empty-state { padding: 54px 20px; display: grid; justify-items: center; gap: 12px; text-align: center; }
.empty-state p { font-size: 13px; color: var(--muted); }
.norms-preview { margin-top: 20px; }
.norm-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 0 16px 16px; }
.norm-tile, .summary-tile, .contact-card { min-width: 0; background: var(--tint); border-radius: 16px; }
.norm-tile { padding: 12px 14px; }
.norm-values { display: grid; gap: 4px; list-style: none; padding: 0; margin: 7px 0 0; }
.norm-values li { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.norm-values b { font-weight: 600; white-space: nowrap; color: var(--fg); }

.summary-strip { padding: 12px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0 0 20px; }
.summary-tile { display: grid; gap: 5px; padding: 13px 14px; color: var(--fg); }
a.summary-tile:hover { background: var(--hover); }
.tile-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.tile-label .icon { width: 15px; height: 15px; }
.summary-tile strong { font-size: 22px; line-height: 1.22; font-weight: 700; letter-spacing: -.025em; }
.blue { color: var(--primary); }
.teal { color: #268ea8; }
.purple { color: #af52de; }
.orange { color: #d98100; }
.card-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(295px,1fr); gap: 18px; align-items: start; }
.supplier-info { display: grid; min-width: 0; gap: 18px; }
.offer-card { padding: 13px 18px; border-top: 1px solid var(--divider); }
.offer-title { display: flex; align-items: start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pill, .distance-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; line-height: 1.5; font-weight: 550; white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.bad { background: var(--warn-bg); color: var(--warn); }
.pill.pending { background: var(--segment); color: var(--muted); }
.measurements { display: flex; gap: 12px 26px; flex-wrap: wrap; margin-top: 9px; }
.measurements dt { font-size: 11.5px; color: var(--muted); }
.measurements dd { margin-top: 2px; font-size: 13.5px; font-weight: 600; }
.assessment, .route-note { margin: 10px 0 0; padding: 7px 10px; border-radius: 9px; font-size: 12.5px; list-style: none; color: var(--warn); background: var(--warn-bg); }
.assessment.pending { color: var(--muted); background: var(--tint); }
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(190px,100%),1fr)); gap: 10px; padding: 0 15px 15px; }
.contact-card { display: grid; align-content: start; justify-items: start; gap: 5px; padding: 12px; overflow-wrap: anywhere; }
.contact-card a { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: 12.5px; }
.contact-card a .icon { width: 13px; height: 13px; }
.route-panel { overflow: hidden; scroll-margin-top: 12px; }
.route-summary { align-items: baseline; }
.stops { display: grid; gap: 10px; padding: 0 18px 14px; }
.stops > div { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.stops > div > div { min-width: 0; display: grid; overflow-wrap: anywhere; font-size: 13px; }
.stops small, .map-footer small { color: var(--muted); font-size: 11.5px; }
.stop-mark { display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; color: var(--blue-text); background: var(--active); font-size: 11px; }
.stop-mark.plant { color: #8a44ae; background: rgb(175 82 222 / .13); }
.route-note { margin: 0 15px 12px; }
#route-map { width: 100%; height: 255px; position: relative; isolation: isolate; z-index: 0; background: var(--tint); }
.leaflet-container { font-family: inherit; }
.leaflet-marker-icon.map-pin { display: grid; place-items: center; background: #0a77e8; color: white; border: 2px solid white; border-radius: 50%; box-shadow: 0 1px 5px #44556a99; font: bold 13px/1 Inter,sans-serif; }
.leaflet-marker-icon.map-pin.to { background: #9b4bc2; border-radius: 7px; }
.dark .leaflet-tile-pane { filter: brightness(.85) saturate(.8); }
.map-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 13px 16px; }
.map-footer small { width: 100%; }
.route-options { flex: 1 1 auto; }
details > summary { width: fit-content; font-size: 12.5px; font-weight: 500; color: var(--blue-text); }
.route-options form { margin-top: 9px; }
.manual { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }

.edit-form { max-width: 920px; }
.form-block { padding: 18px 20px; }
.form-block + .form-block, .form-actions { border-top: 1px solid var(--divider); }
.form-block > h2, .block-head { margin-bottom: 12px; }
.group-heading { color: var(--blue-text); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .045em; }
.block-head { justify-content: space-between; }
.form-grid, .repeat-fields, .rule-inputs { display: grid; gap: 11px 14px; }
.form-grid label, .repeat-fields label, .rule-inputs label { justify-content: flex-end; }
.form-grid { grid-template-columns: minmax(0,1.6fr) minmax(140px,.8fr); }
.wide { grid-column: 1/-1; }
.address-actions, .coordinates { margin-top: 10px; }
.coordinates[open] label { margin-top: 10px; max-width: 350px; }
.field-note, .address-actions .muted { margin-top: 7px; font-size: 12px; }
.candidates { display: grid; gap: 4px; }
.candidates button { background: var(--tint); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; text-align: left; color: var(--blue-text); }
.candidates:not(:empty) { margin-top: 8px; }
.repeat-row { display: grid; grid-template-columns: minmax(0,1fr) 32px; gap: 8px; align-items: end; }
.repeat-row + .repeat-row { margin-top: 10px; }
.contact-row .repeat-fields { grid-template-columns: 1.35fr 1fr 1.35fr; }
.offer-row .repeat-fields { grid-template-columns: minmax(195px,2.35fr) repeat(3,minmax(74px,1fr)); }
.remove { width: 32px; height: 36px; }
.remove:hover { color: var(--danger); background: var(--danger-bg); }
.form-actions { justify-content: flex-end; padding: 14px 20px; }
.rule-inputs { grid-template-columns: repeat(3,minmax(0,1fr)); }
.rules-sheet { max-width: 1000px; }
.alert { padding: 10px 12px; display: flex; align-items: center; gap: 7px; border-radius: 12px; font-size: 13px; }
.alert.error { background: var(--danger-bg); color: var(--danger); }
.edit-form > .alert { margin: 16px 20px 0; }
.rules-form > .alert { margin-bottom: 12px; }
.confirm { max-width: 470px; padding: 22px; }
.confirm h1 { font-size: 20px; }
.confirm p { margin: 12px 0 18px; color: var(--muted); }
.confirm .form-actions { padding: 14px 0 0; }
.toast { position: fixed; z-index: 90; bottom: 20px; right: 20px; display: flex; align-items: center; gap: 9px; max-width: min(360px,calc(100% - 32px)); padding: 12px 16px; border: 1px solid var(--divider); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-md); font-size: 13px; pointer-events: none; }
.toast .icon { color: var(--good); }

.guest { min-height: 100svh; padding: 16px; display: grid; place-items: center; }
.login-wrap { width: min(100%,360px); }
.login-brand { margin-bottom: 25px; text-align: center; }
.login-brand .plant-mark { width: 66px; height: 72px; border-radius: 20px; margin: 0 auto 16px; box-shadow: 0 7px 18px rgb(10 132 255 / .16); }
.login-brand .plant-mark .icon { width: 43px; height: 43px; }
.login-brand h1 { font-size: 23px; line-height: 1.22; text-transform: uppercase; letter-spacing: .065em; }
.login-brand p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 14px; padding: 20px; box-shadow: var(--shadow-md); }
.login-form .button { min-height: 40px; margin-top: 4px; }

@media (min-width: 768px) {
  [data-rail="compact"] { --rail-width: 68px; }
  [data-rail="compact"] .brand-text,
  [data-rail="compact"] .nav-label,
  [data-rail="compact"] .nav-action span,
  [data-rail="compact"] .profile-text { display: none; }
  [data-rail="compact"] .rail-head { padding: 0 3px; gap: 0; }
  [data-rail="compact"] .rail-head .plant-mark { width: 30px; height: 32px; }
  [data-rail="compact"] .collapse-toggle { width: 24px; }
  [data-rail="compact"] .collapse-toggle .icon { transform: rotate(180deg); }
  [data-rail="compact"] .nav-item,
  [data-rail="compact"] .nav-action,
  [data-rail="compact"] .profile { justify-content: center; padding-inline: 0; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .card-layout { grid-template-columns: 1fr; }
  .summary-strip { gap: 8px; }
  .summary-tile { padding: 10px; }
  .offer-row .repeat-fields, .contact-row .repeat-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .offer-type { grid-column: 1/-1; }
  .norm-grid { grid-template-columns: repeat(auto-fit,minmax(min(190px,100%),1fr)); }
}
@media (max-width: 767px) {
  body { font-size: 15px; }
  .shell { display: block; padding: 0; }
  .workspace { padding: 16px 16px 40px; }
  .mobile-header { position: sticky; top: 0; z-index: 70; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--card); border-bottom: 1px solid var(--sidebar-border); }
  .menu-toggle { width: 40px; height: 40px; border-radius: 12px; background: var(--hover); color: var(--fg); }
  .menu-toggle .icon { width: 20px; height: 20px; }
  .mobile-brand { gap: 10px; }
  .mobile-brand > .plant-mark { width: 24px; height: 27px; border-radius: 7px; }
  .mobile-brand .icon { width: 18px; height: 18px; }
  .mobile-brand span:last-child { font-size: 14px; }
  .rail { position: static; height: auto; min-height: 0; margin: 0; border: none; border-radius: 0; box-shadow: none; }
  [data-enhanced] .rail { display: none; position: fixed; z-index: 65; inset: 60px 0 0; padding: 0 16px max(18px,env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
  [data-menu="open"] .rail { display: flex; animation: menu-in .14s ease; }
  [data-menu="open"] .when-closed { display: none; }
  [data-menu="open"] .when-open { display: inline-block; }
  [data-menu="open"] body { overflow: hidden; }
  .rail-head { display: none; }
  .nav-items { flex: 1 0 auto; padding: 4px 0; overflow: visible; }
  .nav-item { gap: 8px; min-height: 52px; padding: 13px 0; margin: 0; border: none; border-radius: 0; color: var(--fg); font-size: 18px; font-weight: 500; }
  .nav-item[aria-current] { background: transparent; color: var(--fg); font-weight: 550; }
  .nav-item[aria-current] .nav-label::after { content: ""; display: inline-block; width: 6px; height: 6px; vertical-align: middle; margin-left: 9px; border-radius: 50%; background: var(--primary); }
  .nav-icon { display: none; }
  .mobile-chevron { display: block; margin-left: auto; color: var(--muted); }
  .rail-footer { display: flex; flex-direction: column; gap: 9px; border: 0; padding: 22px 0 0; }
  .profile { order: -1; justify-content: center; margin: 0; padding: 4px; border: none; background: transparent; }
  .profile .avatar { display: none; }
  .profile-text { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
  .profile-text b, .profile-text small { font-size: 13px; font-weight: 450; }
  .profile-text small::before { content: "· "; }
  .rail-footer .nav-action { justify-content: center; min-height: 42px; border: 1px solid var(--input-border); border-radius: 999px; font-weight: 550; color: var(--fg); }
  .rail-footer .logout { color: var(--danger); }
  :root:not([data-enhanced]) .mobile-header, :root:not([data-enhanced]) .rail-footer { display: none; }
  :root:not([data-enhanced]) .nav-items { padding-inline: 16px; }
  .desktop-directory { display: none; }
  .mobile-directory { display: grid; gap: 10px; }
  .supplier-item { display: block; padding: 14px; color: var(--fg); }
  .supplier-item:active { background: var(--tint); }
  .supplier-top { display: flex; align-items: start; justify-content: space-between; gap: 9px; }
  .supplier-top strong { font-size: 15px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
  .distance-chip { color: var(--blue-text); background: var(--active); }
  .distance-chip .icon { width: 13px; height: 13px; }
  .supplier-details { display: grid; gap: 1px; margin-top: 7px; font-size: 13px; color: var(--muted); }
  .supplier-groups { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--divider); font-size: 13px; color: var(--blue-text); }
  .supplier-groups .icon { width: 14px; height: 14px; }
  .card-layout { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .supplier-info { display: contents; }
  .route-panel { order: -1; scroll-margin-top: 70px; }
  .summary-strip { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 14px; padding: 9px; }
  .summary-tile { padding: 11px 12px; }
  .offer-row .repeat-fields, .contact-row .repeat-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .offer-type, .contact-row label:first-child { grid-column: 1/-1; }
  .rule-inputs { grid-template-columns: repeat(auto-fit,minmax(min(135px,100%),1fr)); }
  #route-map { height: 222px; }
  .norm-grid { grid-template-columns: repeat(auto-fit,minmax(min(190px,100%),1fr)); }
  .toolbar .search-box { width: min(100%, 256px); }
  .toast { bottom: max(14px,env(safe-area-inset-bottom)); right: 14px; }
}
@media (max-width: 640px) {
  h1 { font-size: 24px; }
  h2 { font-size: 16px; }
  h3 { font-size: 15px; }
  .subtitle, .segment > span { font-size: 14px; }
  .segment > span { padding: 6px 10px; }
  .filter-full { display: none; }
  .filter-short { display: inline; }
  .toolbar { gap: 10px; }
  .search-box, .toolbar .search-box { width: 100%; }
  .button { min-height: 40px; font-size: 14px; }
  .button.small { min-height: 36px; font-size: 13px; }
  .button.square { min-width: 40px; }
  input:not([type=radio]), select { height: 40px; font-size: 16px; }
  label, .field-note, .coordinates summary, .back-link, .text-link, .tile-label { font-size: 13px; }
  .norm-grid { grid-template-columns: 1fr; gap: 7px; padding: 0 14px 14px; }
  .norm-tile { padding: 10px 12px; }
  .norm-values { margin-top: 5px; }
  .norm-values li { font-size: 13px; }
  .panel-head { padding: 14px; }
  .form-grid, .contact-row .repeat-fields { grid-template-columns: minmax(0,1fr); }
  .form-block { padding: 15px; }
  .repeat-row { position: relative; display: block; padding: 11px; background: var(--tint); border-radius: 13px; }
  .repeat-row .remove { position: absolute; top: 0; right: 5px; height: 28px; }
  .repeat-fields { gap: 10px; }
  .repeat-fields label:first-child { padding-top: 3px; }
  .form-actions { padding: 13px 15px; }
  .contacts-grid { grid-template-columns: minmax(0,1fr); }
  .stops > div > div { font-size: 14px; }
  .offer-card { padding: 13px 14px; }
  .empty-state { padding: 39px 18px; }
  .confirm { padding: 18px; }
}
@media (max-width: 350px) {
  .segment > span { font-size: 13px; padding-inline: 8px; }
  .workspace, .mobile-header { padding-inline: 12px; }
  .panel-head { align-items: flex-start; }
  .summary-tile { padding: 9px; }
  .form-actions { justify-content: stretch; }
  .form-actions > * { flex: 1 1 auto; }
}
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
