@font-face {
  font-family:Inter;
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url("/assets/fonts/InterVariable.woff2") format("woff2");
}
@font-face {
  font-family:"tabler-icons";
  font-style:normal;
  font-weight:400;
  font-display:block;
  src:url("/assets/fonts/tabler-icons.woff2?v=3.46.0") format("woff2");
}
.ti { display:inline-block; font-family:"tabler-icons"!important; font-style:normal; font-weight:400; line-height:1; speak:none; }
.ti-chevron-down::before { content:"\ea5f"; }.ti-chevron-right::before { content:"\ea61"; }
.ti-dots::before { content:"\ea95"; }.ti-droplet::before { content:"\ea97"; }
.ti-gas-station::before { content:"\ec7d"; }.ti-parking::before { content:"\eb03"; }
.ti-road::before { content:"\f018"; }.ti-wheel::before { content:"\fc64"; }.ti-gavel::before { content:"\ef90"; }

/* Tokens */
:root {
  color-scheme:light;
  --canvas:#fff;
  --sidebar:#f7f7f8;
  --topbar:#fff;
  --inspector:#f7f7f8;
  --footer:#f7f7f8;
  --surface:#fff;
  --raised-1:#fff;
  --raised-2:#f7f7f8;
  --raised-3:#f0f0f2;
  --control-bg:#fff;
  --text:#202124;
  --muted:#6f7178;
  --subtle:#8b8d94;
  --line:#e5e5e7;
  --line-strong:#d7d7da;
  --hover:#f4f4f6;
  --selected:#f0f1ff;
  --accent:#4f5ae0;
  --accent-hover:#434dc5;
  --accent-soft:#eef0ff;
  --on-accent:#fff;
  --focus:#4f5ae0;
  --danger:#c23d4b;
  --ok-bg:#ecf8f1;
  --ok-fg:#23845b;
  --warn-bg:#fff7e6;
  --warn-fg:#a96d11;
  --conflict-bg:#fff2dd;
  --conflict-fg:#9b5e0b;
  --error-bg:#fff0f2;
  --error-fg:#b53443;
  --tertiary-bg:#f0f0f2;
  --tertiary-fg:#777981;
  --overlay:rgb(20 22 28 / 34%);
  --overlay-surface:rgb(247 247 248 / 90%);
  --shadow-floating:0 8px 24px rgb(16 18 24 / 14%);
  --bg:var(--canvas);
  --control-height:38px;
  --radius:6px;
  --space-related:8px;
  --space-group:16px;
  --space-section:24px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}
[data-theme="dark"] {
  color-scheme:dark;
  --canvas:#0b0c0e;
  --sidebar:#121318;
  --topbar:#121318;
  --inspector:#121318;
  --footer:#121318;
  --surface:#18191d;
  --raised-1:#18191d;
  --raised-2:#202126;
  --raised-3:#282a30;
  --control-bg:#18191d;
  --text:#f4f4f5;
  --muted:#a4a7ae;
  --subtle:#7d8089;
  --line:#2a2c32;
  --line-strong:#373a43;
  --hover:rgb(255 255 255 / 5%);
  --selected:rgb(110 121 240 / 20%);
  --accent:#6e79f0;
  --accent-hover:#7d87f5;
  --accent-soft:rgb(110 121 240 / 16%);
  --on-accent:#fff;
  --focus:#8d96ff;
  --danger:#ff7d8a;
  --ok-bg:rgb(52 168 116 / 15%);
  --ok-fg:#70d8a5;
  --warn-bg:rgb(214 151 45 / 16%);
  --warn-fg:#e7b85e;
  --conflict-bg:rgb(214 128 45 / 17%);
  --conflict-fg:#edb56b;
  --error-bg:rgb(218 74 91 / 17%);
  --error-fg:#ff929d;
  --tertiary-bg:#282a30;
  --tertiary-fg:#a4a7ae;
  --overlay:rgb(0 0 0 / 58%);
  --overlay-surface:rgb(24 25 29 / 90%);
  --shadow-floating:0 8px 24px rgb(0 0 0 / 34%);
}
/* Base */
* { box-sizing:border-box; }
body { margin:0; background:var(--canvas); color:var(--text); font-size:14px; }
body.modal-open { position:fixed; right:0; left:0; width:100%; overflow:hidden; overscroll-behavior:none; }
button,input,select,textarea { min-height:var(--control-height); color:var(--text); font:inherit; }
button { cursor:pointer; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.primary { padding:8px 14px; border:0; border-radius:var(--radius); color:var(--on-accent); background:var(--accent); font-weight:800; }
.primary:hover { background:var(--accent-hover); }
.hidden { display:none !important; }
/* Components */
#notice { position:fixed; z-index:30; top:18px; left:50%; transform:translateX(-50%); max-width:min(560px,calc(100% - 32px)); padding:12px 16px; border-radius:6px; color:var(--on-accent); background:var(--accent); box-shadow:var(--shadow-floating); font-weight:700; }
.eyebrow { margin:0 0 6px; color:var(--accent); font-size:12px; font-weight:800; letter-spacing:.13em; }
.login-shell { min-height:100vh; display:grid; place-items:center; padding:24px; background:var(--canvas); }
.login-card { width:min(420px,100%); padding:34px; border:1px solid var(--line); border-radius:6px; background:var(--surface); box-shadow:var(--shadow-floating); }
.login-card h1 { margin:0; font-size:34px; }
.login-card p { color:var(--muted); line-height:1.5; }
label { display:grid; gap:7px; margin:16px 0; color:var(--muted); font-size:13px; font-weight:700; }
input,select,textarea { width:100%; padding:7px 11px; border:1px solid var(--line); border-radius:var(--radius); background:var(--control-bg); }
input::placeholder,textarea::placeholder { color:var(--subtle); }
.entity-picker { position:relative; display:grid; gap:7px; min-width:0; margin:0; padding:10px 11px 9px 13px; overflow:hidden; border:1px solid var(--line-strong); border-radius:6px; color:var(--text); background:var(--surface); box-shadow:inset 3px 0 0 var(--accent); }
.entity-picker::after { position:absolute; inset:0; border-radius:inherit; box-shadow:0 0 0 0 var(--accent-soft); pointer-events:none; content:""; transition:box-shadow .14s ease; }
.entity-picker:hover { border-color:color-mix(in srgb,var(--line-strong),var(--accent) 24%); }
.entity-picker:focus-within { border-color:var(--focus); }
.entity-picker:focus-within::after { box-shadow:inset 0 0 0 2px var(--accent-soft); }
.entity-picker-head { display:flex; align-items:center; gap:8px; min-width:0; }
.entity-picker-head > .quiet-icon { flex:0 0 18px; width:18px; height:18px; color:var(--accent); }
.entity-picker-head > span { display:grid; min-width:0; gap:1px; }
.entity-picker-head strong { color:var(--text); font-size:13px; font-weight:800; line-height:1.2; }
.entity-picker-head small { color:var(--muted); font-size:12px; font-weight:550; line-height:1.25; }
.entity-picker input,.entity-picker select { min-height:44px !important; padding:9px 11px !important; border:1px solid var(--line-strong) !important; border-radius:5px !important; color:var(--text); background:var(--control-bg) !important; box-shadow:none !important; font-size:14px !important; font-weight:650; }
.entity-picker input:hover,.entity-picker select:hover { border-color:color-mix(in srgb,var(--line-strong),var(--accent) 30%) !important; }
.entity-picker input:focus-visible,.entity-picker select:focus-visible { outline:2px solid var(--focus) !important; outline-offset:1px; border-color:var(--focus) !important; box-shadow:none !important; }
.entity-picker input:disabled,.entity-picker select:disabled { color:var(--subtle); background:var(--raised-3) !important; }
.entity-picker:has([aria-invalid="true"]) { border-color:var(--error-fg); box-shadow:inset 3px 0 0 var(--error-fg); }
.entity-picker .field-note { min-height:15px; margin:0; color:var(--muted); font-size:12px; font-weight:550; line-height:1.3; overflow-wrap:anywhere; }
.secret-input { -webkit-text-security:disc; }
.login-card button { width:100%; padding:13px; border:0; border-radius:6px; color:var(--on-accent); background:var(--accent); font-weight:800; }
.error { min-height:20px; color:var(--danger) !important; }
.topbar { min-height:45px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:4px 20px; border-bottom:1px solid var(--line); color:var(--text); background:var(--topbar); }
.topbar h1 { margin:0; font-size:19px; }
.topbar .eyebrow { margin-bottom:1px; font-size:12px; }
.topbar-actions { display:flex; align-items:center; gap:8px; }
.profile-chip { padding:8px 11px; border:1px solid var(--line-strong); border-radius:999px; color:var(--muted); font-size:12px; }
.topbar button,.topbar .status { min-height:36px; padding:7px 10px; border-radius:6px; }
.theme-toggle { min-height:36px; padding:7px 10px; border:1px solid var(--line-strong); border-radius:6px; color:var(--muted); background:var(--surface); font-size:12px; font-weight:700; }
.theme-toggle:hover { color:var(--text); background:var(--hover); }
.login-card .theme-toggle { color:var(--muted); background:var(--surface); border:1px solid var(--line-strong); }
.secondary { border:1px solid var(--line-strong); color:var(--text); background:transparent; }
.secondary.light { color:var(--muted); border-color:var(--line); background:var(--surface); }
.ghost { border:0; color:var(--muted); background:transparent; }
.status { padding:8px 11px; border-radius:999px; color:var(--tertiary-fg); background:var(--tertiary-bg); font-size:12px; }
.status.ok { color:var(--ok-fg); background:var(--ok-bg); }
.status.error { color:var(--error-fg); background:var(--error-bg); }
.sidebar { display:flex; min-height:calc(100vh - 45px); flex-direction:column; padding:16px 10px 12px; overflow-y:auto; border-right:1px solid var(--line); background:var(--sidebar); }
.sidebar-group { display:grid; gap:2px; margin:0 0 18px; }
.sidebar-creation-group { display:grid; gap:2px; margin:2px 0 0; padding-left:8px; border-left:1px solid var(--line-strong); }
.sidebar-section-title { margin:0 8px 6px; color:var(--subtle); font-size:12px; font-weight:900; letter-spacing:.11em; line-height:1.35; text-transform:uppercase; }
.sidebar-subsection-title { margin:4px 10px; color:var(--subtle); font-size:12px; font-weight:800; }
.nav { display:grid; width:100%; min-height:34px; grid-template-columns:20px minmax(0,1fr); align-items:center; padding:0 9px; margin:0; border:0; border-radius:var(--radius); color:var(--muted); background:transparent; text-align:left; font-size:13px; font-weight:650; }
.nav:hover { color:var(--text); background:var(--hover); }
.nav.active { color:var(--accent); background:var(--selected); box-shadow:none; }
.nav-icon { display:grid; width:36px; height:36px; place-items:center; margin-left:-8px; color:var(--muted); }
.nav-icon svg,.quiet-icon { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.nav.active .nav-icon { color:inherit; }
.nav:disabled { cursor:not-allowed; opacity:.45; }
.sidebar-footer { display:grid; gap:8px; margin-top:auto; padding-top:12px; border-top:1px solid var(--line); }
.sidebar-user { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; padding:7px 8px; border-radius:6px; background:var(--raised-3); }
.sidebar-user .profile-chip { min-width:0; overflow:hidden; padding:0; border:0; border-radius:0; color:var(--muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-user .ghost { min-height:36px; padding:4px 6px; color:var(--muted); font-size:12px; }
/* Layouts */
.layout { min-height:calc(100vh - 45px); display:grid; grid-template-columns:200px minmax(0,1fr); }
.workspace { min-width:0; padding:20px 24px 28px; background:var(--canvas); }
.admin-grid { display:grid; grid-template-columns:repeat(2,minmax(260px,1fr)); gap:12px; margin-top:18px; }
.admin-card { padding:16px 18px; border:1px solid var(--line); border-radius:6px; background:var(--surface); box-shadow:none; }
.admin-card > span { display:block; margin-bottom:10px; color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.07em; }
.admin-card strong { display:block; margin-bottom:10px; font-size:18px; }
.admin-card p { margin:0; color:var(--muted); line-height:1.5; }
.admin-card.pending { border-style:dashed; background:var(--raised-2); }
.external-services-panel { margin-top:18px; }
.settings-panel { min-height:0; margin-top:12px; }
.admin-tabs { position:sticky; z-index:10; top:0; margin:14px 0 0; padding:8px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.admin-overview { padding:18px; }
.settings-overview-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.settings-overview-list article { padding:14px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.settings-overview-list span { display:block; margin-bottom:7px; color:var(--muted); font-size:12px; }
.settings-overview-list strong { font-size:16px; }
.settings-list { display:grid; gap:10px; }
.fleet-setting-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; width:100%; min-height:44px; padding:0 14px; border:1px solid var(--line); border-radius:6px; color:var(--text); background:var(--raised-2); text-align:left; cursor:pointer; }
.fleet-setting-row:hover { border-color:var(--line-strong); background:var(--hover); }
.fleet-setting-summary { display:grid; grid-template-columns:minmax(210px,1.2fr) auto minmax(110px,.55fr) minmax(125px,.65fr); gap:12px; align-items:center; min-width:0; }
.fleet-setting-name { display:grid; gap:3px; }
.fleet-setting-name small { color:var(--muted); }
.fleet-setting-fact { display:grid; gap:2px; color:var(--muted); font-size:12px; }
.fleet-setting-fact strong { color:var(--text); font-size:13px; }
.fleet-setting-form { display:grid; grid-template-columns:repeat(3,minmax(180px,1fr)); gap:2px 12px; padding:4px 16px 16px; border-top:1px solid var(--line); }
.fleet-setting-drawer-form { grid-template-columns:1fr; padding:8px 0 0; border-top:0; }
.fleet-setting-form label { margin:10px 0 0; }
.fleet-setting-form .toggle-field { display:flex; align-items:center; gap:9px; padding-top:18px; }
.fleet-setting-form .toggle-field input { width:auto; }
.fleet-setting-form button { align-self:end; justify-self:start; margin-top:10px; }
.inline-settings-form { display:grid; grid-template-columns:minmax(220px,360px) auto; gap:12px; align-items:end; }
.inline-settings-form label { margin:0; }
.inline-settings-form button { margin-bottom:0; }
.compact-heading { margin-bottom:12px; }
.external-services-list { display:grid; gap:8px; }
.external-service-card { position:relative; display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:8px 12px; min-height:0; padding:10px 12px; overflow:hidden; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.external-service-logo { grid-column:1; grid-row:1 / span 2; display:grid; width:36px; height:36px; place-items:center; border:1px solid var(--line); border-radius:6px; color:var(--muted); background:var(--raised-3); font-size:11px; font-weight:800; letter-spacing:.04em; }
.external-service-head { grid-column:2 / -1; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.external-service-head > div { min-width:0; }
.external-service-head strong { font-size:14px; }
.external-service-head p { margin:3px 0 0; color:var(--muted); font-size:12px; line-height:1.35; }
.external-service-body { grid-column:2; display:grid; grid-template-columns:minmax(0,1fr); gap:6px; min-width:0; }
.external-service-facts { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:8px 16px; margin:0; }
.external-service-facts div { min-width:0; padding:0; border:0; }
.external-service-facts dt { font-size:12px; letter-spacing:.04em; text-transform:uppercase; }
.external-service-facts dd { margin:3px 0 0; overflow-wrap:anywhere; font-size:12px; font-weight:700; }
.external-service-card label { display:block; margin:8px 0; color:var(--muted); font-size:12px; }
.external-service-card input { width:100%; margin-top:5px; }
.diadoc-settings-grid,.diadoc-metadata-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 12px; }
.diadoc-readiness-state { font-size:12px; color:var(--muted); }
.diadoc-readiness-state.error { color:var(--danger); }
.diadoc-readiness-state.notice { color:var(--warn-fg); }
.diadoc-authorization { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; color:var(--muted); font-size:12px; }
.diadoc-authorization strong { color:var(--text); }
.diadoc-organization-catalog { display:grid; gap:12px; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.diadoc-add-organization { border:1px solid var(--line); border-radius:10px; padding:10px 12px; }
.diadoc-add-organization form { display:grid; gap:12px; padding-top:12px; }
.diadoc-organization-cards { display:grid; gap:12px; }
.diadoc-organization-card { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; min-width:0; padding:14px 16px; overflow:hidden; border:1px solid var(--line); border-left:4px solid var(--line-strong); border-radius:10px; background:var(--surface); }
.diadoc-organization-card.selected { border-left-color:var(--primary); box-shadow:0 0 0 1px color-mix(in srgb, var(--primary) 24%, transparent); }
.diadoc-card-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; min-width:0; }
.diadoc-card-identity { min-width:0; }
.diadoc-card-identity strong { font-size:14px; }
.diadoc-card-identity p,.diadoc-stage-heading p { margin:3px 0 0; color:var(--muted); font-size:12px; line-height:1.4; }
.diadoc-card-controls { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; }
.diadoc-select-profile { min-height:28px; padding:5px 9px; white-space:nowrap; }
.diadoc-card-section,.diadoc-setup-stage { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; min-width:0; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--raised-2); }
.diadoc-setup-progress { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; min-width:0; }
.diadoc-setup-stage.blocked { background:var(--raised-3); }
.diadoc-setup-stage.complete { border-color:color-mix(in srgb,var(--ok-fg) 42%,var(--line)); }
.diadoc-stage-heading { display:grid; grid-template-columns:24px minmax(0,1fr); gap:8px; align-items:start; min-width:0; }
.diadoc-stage-heading > span { display:grid; width:24px; height:24px; place-items:center; border:1px solid var(--line-strong); border-radius:50%; color:var(--muted); font-size:12px; font-weight:800; }
.diadoc-stage-heading > div { min-width:0; }
.diadoc-stage-status { color:var(--muted); font-size:12px; font-weight:700; }
.diadoc-setup-stage > button { align-self:end; justify-self:start; }
.diadoc-card-actions { display:flex; justify-content:flex-start; flex-wrap:wrap; gap:6px; }
.diadoc-organization-card label { min-width:0; margin:4px 0; }
.diadoc-organization-card input { min-width:0; }
.diadoc-organization-card input:disabled { cursor:not-allowed; color:var(--muted); background:var(--raised-3); }
.diadoc-technical-details { min-width:0; border-top:1px solid var(--line); }
.diadoc-technical-details summary { padding:10px 0 4px; color:var(--muted); cursor:pointer; font-size:12px; font-weight:800; }
.diadoc-technical-details > div { display:grid; gap:10px; padding:6px 0 2px; min-width:0; }
.diadoc-technical-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; margin:0; }
.diadoc-technical-facts div { min-width:0; }
.diadoc-technical-facts dt { color:var(--muted); font-size:11px; letter-spacing:.04em; text-transform:uppercase; }
.diadoc-technical-facts dd { margin:3px 0 0; overflow-wrap:anywhere; font-size:12px; font-weight:700; }
.diadoc-document-matrix { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 12px; margin:0; padding:0; list-style:none; }
.diadoc-document-matrix li { display:flex; justify-content:space-between; gap:12px; min-width:0; font-size:12px; color:var(--muted); }
.diadoc-document-matrix li span { min-width:0; overflow-wrap:anywhere; }
.diadoc-document-matrix strong { color:var(--text); font-weight:600; }
.diadoc-document-browser { gap:10px; }
.diadoc-document-controls { display:flex; flex-wrap:wrap; align-items:end; gap:8px; }
.diadoc-document-controls label { flex:1 1 220px; }
.diadoc-document-results,.diadoc-document-detail { display:grid; gap:8px; }
.diadoc-document-item { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:8px; padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.diadoc-document-item span { grid-column:1; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.etrn-workspace { display:grid; align-content:start; gap:18px; }
.etrn-organization-control { min-width:min(320px,100%); display:grid; gap:4px; color:var(--muted); font-size:12px; }
.etrn-organization-control strong { color:var(--text); font-size:14px; }
.etrn-organization-control label { display:grid; gap:5px; font-weight:700; }
.etrn-organization-control select { min-height:40px; }
.etrn-view-switch { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; width:min(760px,100%); padding:4px; border:1px solid var(--line); border-radius:7px; background:var(--raised-2); }
.etrn-view-switch button { min-height:42px; border:0; background:transparent; color:var(--muted); font-weight:800; }
.etrn-view-switch button.active { background:var(--accent); color:var(--on-accent); }
.etrn-document-panel { display:grid; gap:14px; }
.etrn-document-panel .diadoc-document-browser { padding:0; border:0; background:transparent; }
.etrn-paper-dialog { inset:0; width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; padding:0; overflow:hidden; border:0; color:var(--text); background:var(--raised-2); }
.etrn-paper-dialog::backdrop { background:var(--overlay); }
.etrn-paper-shell { display:grid; grid-template-rows:auto minmax(0,1fr); height:100dvh; }
.etrn-paper-toolbar { position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:20px; min-width:0; padding:12px 20px; border-bottom:1px solid var(--line); background:var(--surface); box-shadow:0 2px 10px rgb(16 18 24 / 8%); }
.etrn-paper-toolbar > div:first-child { min-width:0; }
.etrn-paper-toolbar h2 { margin:0; overflow:hidden; font-size:20px; text-overflow:ellipsis; white-space:nowrap; }
.etrn-paper-toolbar .muted { margin:4px 0 0; }
.etrn-paper-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.etrn-paper-workspace { min-height:0; padding:28px; overflow:auto; overscroll-behavior:contain; background:#e7eaee; }
.etrn-paper-loading,.etrn-paper-unavailable { display:grid; place-content:center; justify-items:center; gap:12px; min-height:50vh; padding:32px; color:#30343a; text-align:center; }
.etrn-paper-sheet { width:min(100%,1080px); min-height:calc(min(100vw,1080px) * 1.3); margin:0 auto; padding:54px 60px; overflow:hidden; border:1px solid #cfd4da; background:#fff; color:#17191c; box-shadow:0 16px 42px rgb(29 36 45 / 18%); font-family:Arial,"Segoe UI",sans-serif; line-height:1.42; }
.etrn-paper-notice { margin:-22px 0 34px; padding:10px 12px; border:1px solid #d9c785; background:#fff9dc; color:#574b20; font-size:12px; }
.etrn-paper-document-head { padding-bottom:22px; border-bottom:2px solid #222; text-align:center; }
.etrn-paper-document-head p { margin:0 0 8px; font-size:12px; font-weight:700; letter-spacing:.08em; }
.etrn-paper-document-head h2 { margin:0; font-family:Arial,"Segoe UI",sans-serif; font-size:23px; }
.etrn-paper-sheet h3 { margin:30px 0 12px; font-family:Arial,"Segoe UI",sans-serif; font-size:16px; }
.etrn-paper-party-grid,.etrn-paper-facts-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; margin-top:24px; border-top:1px solid #73777c; border-left:1px solid #73777c; }
.etrn-paper-field { display:grid; align-content:start; gap:5px; min-width:0; padding:12px 14px; border-right:1px solid #73777c; border-bottom:1px solid #73777c; }
.etrn-paper-field.wide { grid-column:1 / -1; }
.etrn-paper-field span { color:#62676d; font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.etrn-paper-field strong { overflow-wrap:anywhere; font-size:14px; font-weight:600; }
.etrn-paper-table-scroll { max-width:100%; overflow-x:auto; border:1px solid #73777c; }
.etrn-paper-table { width:100%; min-width:820px; border-collapse:collapse; font-size:12px; }
.etrn-paper-table th,.etrn-paper-table td { padding:8px; border-right:1px solid #aaaeb3; border-bottom:1px solid #aaaeb3; text-align:left; vertical-align:top; }
.etrn-paper-table th { background:#f0f1f2; font-weight:700; }
.etrn-paper-table th:last-child,.etrn-paper-table td:last-child { border-right:0; }
.etrn-paper-totals { display:grid; grid-template-columns:minmax(280px,480px); justify-content:end; margin-top:20px; }
.etrn-paper-totals .etrn-paper-field:last-child { border-top:2px solid #222; }
.etrn-paper-empty { padding:20px; border:1px dashed #9da2a8; color:#62676d; text-align:center; }
.etrn-paper-signatures { margin-top:42px; padding-top:18px; border-top:1px solid #73777c; color:#51565c; font-size:12px; }
@media (max-width:700px) {
  .etrn-paper-toolbar { align-items:flex-start; padding:10px 12px; }
  .etrn-paper-toolbar .eyebrow,.etrn-paper-toolbar .muted { display:none; }
  .etrn-paper-toolbar h2 { max-width:58vw; font-size:16px; }
  .etrn-paper-actions .secondary { min-width:0; padding:7px 9px; font-size:12px; }
  .etrn-paper-workspace { padding:10px; }
  .etrn-paper-sheet { min-height:calc(100dvh - 70px); padding:34px 24px; }
  .etrn-paper-notice { margin:-12px 0 24px; }
  .etrn-paper-party-grid,.etrn-paper-facts-grid { grid-template-columns:1fr; }
  .etrn-paper-field.wide { grid-column:auto; }
}
.diadoc-foundation-boundary { margin:0; color:var(--warn-fg); font-size:12px; }
.external-service-actions { grid-column:3; display:flex; align-items:flex-end; justify-content:flex-end; flex-wrap:wrap; gap:6px; align-self:end; }
.service-state { display:inline-flex; align-items:center; gap:6px; min-height:28px; padding:5px 9px; border-radius:999px; color:var(--tertiary-fg); background:var(--tertiary-bg); font-size:12px; font-weight:800; white-space:nowrap; }
.service-state::before { width:10px; height:10px; flex:0 0 auto; border:2px solid currentcolor; border-radius:50%; background:transparent; content:""; }
.service-state b { display:none; }
.service-state.ready { background:var(--ok-bg); color:var(--ok-fg); }
.service-state.ready::before { background:currentcolor; box-shadow:inset 0 0 0 2px var(--ok-bg); }
.service-state.error { background:var(--error-bg); color:var(--error-fg); }
.service-state.error::before { border-radius:2px; background:currentcolor; transform:rotate(45deg) scale(.72); }
.service-state.pending,.service-state.warning { background:var(--warn-bg); color:var(--warn-fg); }
.service-state.pending::before,.service-state.warning::before { border:0; border-radius:0; background:currentcolor; clip-path:polygon(50% 0,100% 100%,0 100%); }
.service-state.notice { background:var(--conflict-bg); color:var(--conflict-fg); }
.service-state.notice::before { border-width:3px; }
.service-state.contract-required { background:var(--accent-soft); color:var(--accent); }
.service-state.contract-required::before { border-radius:2px; box-shadow:inset 0 0 0 2px var(--accent-soft); }
.external-service-card.ready { border-color:color-mix(in srgb,var(--ok-fg) 45%,var(--line)); }
.external-service-card.warning,.external-service-card.pending { border-color:color-mix(in srgb,var(--warn-fg) 48%,var(--line)); }
.external-service-card.notice { border-color:color-mix(in srgb,var(--conflict-fg) 48%,var(--line)); }
.external-service-card.contract-required { border-color:color-mix(in srgb,var(--accent) 48%,var(--line)); }
.external-service-card.error { border-color:var(--error-fg); animation:service-error-pulse 2.8s ease-in-out infinite; }
@keyframes service-error-pulse { 0%,100% { box-shadow:0 0 0 0 transparent; } 50% { box-shadow:0 0 0 3px color-mix(in srgb,var(--danger) 14%,transparent); } }
.semantic-state,.not-calculated,.tertiary-value,[data-value-state="not_calculated"] { display:inline-flex; align-items:center; gap:6px; width:max-content; max-width:100%; min-height:28px; padding:5px 9px; border-radius:999px; color:var(--tertiary-fg); background:var(--tertiary-bg); font-size:12px; font-weight:800; }
.semantic-state::before,.not-calculated::before,.tertiary-value::before,[data-value-state="not_calculated"]::before { width:8px; height:8px; flex:0 0 auto; border-radius:50%; background:currentcolor; content:""; }
.semantic-state.success { color:var(--ok-fg); background:var(--ok-bg); }
.semantic-state.warning { color:var(--warn-fg); background:var(--warn-bg); }
.semantic-state.error { color:var(--error-fg)!important; background:var(--error-bg); }
.provider-settings,.service-key-editor { margin:0; border-top:1px solid var(--line); }
.provider-settings summary,.service-key-editor summary { padding:8px 0 4px; color:var(--muted); cursor:pointer; font-size:12px; font-weight:800; }
.provider-settings > div,.service-key-editor > div { padding-bottom:4px; }
.service-key-field { max-width:560px; }
.registry-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:20px 0 14px; }
.registry-summary article { padding:16px; border:1px solid var(--line); border-radius:6px; background:var(--surface); box-shadow:none; }
.registry-summary span { display:block; margin-bottom:8px; color:var(--muted); font-size:12px; }
.registry-summary strong { font-size:18px; }
.road-expense-controls { margin:0 0 14px; padding:14px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.road-expense-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.road-expense-metrics article { padding:13px 14px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.road-expense-metrics span { display:block; margin-bottom:6px; color:var(--muted); font-size:12px; }
.road-expense-metrics strong { font-size:19px; }
.road-expense-filters { display:grid; grid-template-columns:repeat(3,minmax(160px,1fr)); gap:10px; margin-top:10px; }
.road-expense-filters label { margin:0; }
.road-expense-note { margin:12px 2px 0; color:var(--muted); font-size:12px; line-height:1.45; }
.road-expense-source { display:inline-flex; align-items:center; width:max-content; padding:4px 8px; border-radius:999px; background:var(--raised-3); color:var(--muted); font-size:12px; font-weight:800; }
.road-expense-source.platon { color:var(--ok-fg); background:var(--ok-bg); }
.road-expense-source.avtodor { color:var(--warn-fg); background:var(--warn-bg); }
.road-expense-source.dornet { color:var(--accent); background:var(--accent-soft); }
.toll-import-actions { display:flex; flex-wrap:wrap; align-items:center; gap:9px; margin-top:12px; }
.file-action { display:inline-flex; width:auto; align-items:center; margin:0; padding:10px 13px; border-radius:6px; cursor:pointer; font-size:13px; font-weight:800; }
.file-action input { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.toll-import-grid { display:grid; grid-template-columns:1fr; gap:14px; }
.toll-import-card { min-width:0; padding:18px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.toll-import-card > header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:8px; }
.toll-import-card h4,.toll-import-history-section h4 { margin:0; font-size:18px; }
.toll-import-card > p { color:var(--muted); font-size:13px; line-height:1.5; }
.toll-import-card .file-action { margin:6px 0 2px; }
.toll-import-preview { display:grid; gap:12px; margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.toll-preview-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.toll-preview-metrics article { padding:11px 12px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.toll-preview-metrics span { display:block; margin-bottom:5px; color:var(--muted); font-size:12px; }
.toll-preview-metrics strong { font-size:15px; }
.toll-preview-identifiers { display:grid; gap:7px; }
.toll-preview-row { display:grid; grid-template-columns:minmax(140px,.65fr) minmax(240px,1.2fr) minmax(150px,.55fr); gap:14px; align-items:center; padding:10px 12px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.toll-preview-row.is-unbound { border-color:var(--warn-fg); background:var(--warn-bg); }
.toll-preview-row > div { min-width:0; }
.toll-preview-identity,.toll-preview-analytics { display:grid; gap:3px; }
.toll-preview-identity span,.toll-preview-analytics span { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.06em; }
.toll-preview-mapping { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; align-items:center; }
.toll-preview-row select { margin:0; padding:9px 10px; }
.toll-preview-row button { white-space:nowrap; }
.toll-preview-analytics { grid-template-columns:auto 1fr; justify-self:stretch; padding-left:14px; border-left:1px solid var(--line); }
.toll-preview-analytics strong { text-align:right; }
.toll-preview-confirm { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:4px; }
.toll-preview-confirm span { color:var(--muted); font-size:12px; }
.toll-import-history-section { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.toll-import-history { display:grid; gap:8px; }
.toll-import-history article { display:grid; grid-template-columns:minmax(150px,.7fr) minmax(180px,1fr) auto auto; gap:12px; align-items:center; padding:11px 13px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.toll-import-history small { color:var(--muted); }
.registry-row[data-unbound="true"] { border-color:var(--warn-fg); background:var(--warn-bg); }
.road-expense-groups { display:grid; gap:10px; }
.vehicle-expense-group { overflow:hidden; border:1px solid var(--line); border-radius:6px; background:var(--surface); box-shadow:none; }
.vehicle-expense-group[data-unbound="true"] { border-color:var(--warn-fg); background:var(--warn-bg); }
.vehicle-expense-summary { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:13px 16px; list-style:none; background:var(--raised-2); cursor:pointer; }
.vehicle-expense-summary::-webkit-details-marker { display:none; }
.vehicle-expense-summary:hover,.vehicle-expense-summary:focus-visible { background:var(--hover); }
.vehicle-expense-group[open] > .vehicle-expense-summary { border-bottom:1px solid var(--line); }
.vehicle-expense-group[data-unbound="true"] > .vehicle-expense-summary { background:var(--warn-bg); }
.vehicle-expense-identity { display:flex; align-items:center; gap:13px; min-width:0; }
.vehicle-expense-identity > div { display:grid; gap:3px; min-width:0; }
.vehicle-expense-identity strong { overflow:hidden; text-overflow:ellipsis; font-size:16px; white-space:nowrap; }
.vehicle-expense-identity > div > span,.vehicle-expense-total > span { color:var(--muted); font-size:12px; }
.vehicle-expense-identity small { color:var(--subtle); font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.vehicle-expense-chevron { flex:0 0 auto; width:26px; color:var(--muted); font-size:27px; line-height:1; text-align:center; transition:transform .14s ease; }
.vehicle-expense-group[open] .vehicle-expense-chevron { transform:rotate(90deg); }
.vehicle-expense-total { display:grid; gap:3px; flex:0 0 auto; text-align:right; }
.vehicle-expense-total strong { font-size:18px; }
.expense-unbound-label { display:inline-flex; align-items:center; min-height:30px; padding:5px 9px; border-radius:6px; background:var(--warn-bg); color:var(--warn-fg); font-size:12px; font-weight:800; }
.vehicle-expense-rows { display:grid; }
.vehicle-expense-trip-heading { padding:8px 17px; border-top:1px solid var(--line); background:var(--raised-2); color:var(--muted); font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.vehicle-expense-trip-heading:first-child { border-top:0; }
.vehicle-expense-row { display:grid; grid-template-columns:minmax(130px,.7fr) minmax(220px,1.5fr) minmax(90px,.55fr) minmax(180px,.9fr); gap:14px; align-items:center; padding:12px 17px; border-top:1px solid var(--line); }
.vehicle-expense-row:first-child { border-top:0; }
.vehicle-expense-row time { color:var(--muted); font-size:13px; }
.vehicle-expense-row > div { display:grid; gap:3px; }
.vehicle-expense-row small { color:var(--muted); line-height:1.35; }
.vehicle-expense-row b { text-align:right; font-size:14px; }
.vehicle-expense-row.is-voided { opacity:.55; text-decoration:line-through; }
.road-expense-help { margin-top:7px; color:var(--muted); font-size:12px; }.road-expense-help summary { cursor:pointer; font-weight:800; }.road-expense-help p { margin:7px 0 0; }
.road-expense-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.road-expense-table-wrap.grouped { border:0; border-radius:0; }
.road-expense-table-head,.road-expense-table-row { display:grid; grid-template-columns:140px 145px minmax(150px,.8fr) minmax(220px,1.3fr) 120px 120px; gap:12px; align-items:center; min-width:940px; padding:9px 12px; text-align:left; }
.road-expense-table-head { position:sticky; z-index:2; top:0; color:var(--muted); background:var(--raised-3); font-size:12px; font-weight:800; text-transform:uppercase; }
.road-expense-table-row { width:100%; min-height:44px; border:0; border-top:1px solid var(--line); border-radius:0; color:var(--text); background:var(--surface); cursor:pointer; }
.road-expense-table-row:hover,.road-expense-table-row:focus-visible { background:var(--hover); }
.road-expense-table-row time,.road-expense-table-row span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); }
.road-expense-table-row b { text-align:right; }
.road-expense-table-row.is-voided { opacity:.58; text-decoration:line-through; }
.registry-panel { min-height:360px; }
.registry-list { display:grid; gap:10px; }
.counterparty-controls { display:grid; grid-template-columns:minmax(280px,1fr) minmax(190px,.35fr) minmax(190px,.35fr); gap:10px; margin:0 0 14px; }
.counterparty-controls input,.counterparty-controls select { min-height:42px; }
.vehicle-registry-controls { display:grid; grid-template-columns:minmax(260px,1fr) repeat(3,minmax(155px,.45fr)); gap:8px; margin:0 0 12px; }
.vehicle-registry-controls input,.vehicle-registry-controls select { min-height:38px; }
.counterparty-workspace { display:block; }
.counterparty-table-wrap { min-width:0; overflow-x:auto; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.counterparty-table-head,.counterparty-table-row { display:grid; grid-template-columns:minmax(190px,1.2fr) minmax(170px,1fr) minmax(135px,.72fr) minmax(145px,.78fr) minmax(155px,.86fr) minmax(115px,.65fr); gap:12px; align-items:center; min-width:960px; padding:11px 13px; text-align:left; }
.counterparty-table-head { position:sticky; top:0; z-index:2; border-bottom:1px solid var(--line); background:var(--raised-3); color:var(--muted); font-size:12px; font-weight:800; letter-spacing:.045em; text-transform:uppercase; }
.counterparty-table-row { width:100%; border:0; border-bottom:1px solid var(--line); border-radius:0; background:var(--surface); color:var(--text); font:inherit; cursor:pointer; }
.counterparty-table-row:last-child { border-bottom:0; }
.counterparty-table-row:hover { background:var(--hover); }
.counterparty-table-row.selected { background:var(--selected); box-shadow:none; }
.counterparty-table-row > span { min-width:0; overflow-wrap:anywhere; font-size:13px; }
.counterparty-name { display:grid; gap:3px; }
.counterparty-name strong { font-size:14px; }
.counterparty-name small { color:var(--muted); }
.counterparty-duplicate-label { color:var(--warn-fg) !important; font-weight:800; }
.counterparty-duplicate-note { margin:12px 0 0; padding:9px 11px; border-left:3px solid var(--warn-fg); border-radius:6px; color:var(--warn-fg); background:var(--warn-bg); font-size:12px; }
.counterparty-directions { display:flex; flex-wrap:wrap; gap:5px; }
.counterparty-direction { display:inline-flex; padding:4px 7px; border:1px solid var(--accent); border-radius:999px; background:var(--accent-soft); color:var(--accent); font-size:12px; font-weight:700; }
.counterparty-detail-dialog { inset:0 0 0 auto; width:min(680px,100vw); height:100dvh; max-width:none; max-height:none; margin:0; padding:0; overflow:hidden; border:0; border-left:1px solid var(--line); border-radius:6px 0 0 6px; background:var(--surface); box-shadow:var(--shadow-floating); }
.counterparty-detail-dialog::backdrop { background:var(--overlay); backdrop-filter:blur(2px); }
.counterparty-drawer-shell { display:grid; grid-template-rows:auto minmax(0,1fr); width:100%; height:100%; min-width:0; overflow:hidden; }
.counterparty-drawer-header { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:18px 20px 14px; border-bottom:1px solid var(--line); background:var(--surface); }
.counterparty-drawer-header p { margin:0 0 3px; }
.counterparty-detail { width:100%; height:100%; min-width:0; overflow:auto; overscroll-behavior:contain; padding:20px; background:var(--surface); }
.counterparty-detail-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.counterparty-detail-head > div { min-width:0; }
.counterparty-detail-head h3 { margin:2px 0 5px; overflow-wrap:anywhere; font-size:20px; }
.counterparty-detail-head p { margin:0; overflow-wrap:anywhere; color:var(--muted); }
.counterparty-state { display:inline-flex; align-items:center; gap:6px; flex:0 0 auto; padding:5px 8px; border-radius:999px; background:var(--tertiary-bg); color:var(--tertiary-fg); font-size:12px; font-weight:800; }
.counterparty-state::before { width:8px; height:8px; flex:0 0 auto; border-radius:50%; background:currentcolor; content:""; }
.counterparty-state.verified { background:var(--ok-bg); color:var(--ok-fg); }
.counterparty-state.review_required,.counterparty-state.unverified { background:var(--warn-bg); color:var(--warn-fg); }
.counterparty-state.suspended { background:var(--error-bg); color:var(--error-fg); }
.counterparty-detail-section { padding:12px 0; border-bottom:1px solid var(--line); }
.counterparty-detail-section h4 { margin:0 0 9px; font-size:13px; }
.counterparty-directions-list { display:grid; gap:7px; }
.counterparty-direction-row { display:grid; grid-template-columns:16px minmax(0,1fr); gap:9px; align-items:flex-start; min-width:0; margin:0; padding:8px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; }
.counterparty-direction-row:last-child { border-bottom:0; }
.counterparty-direction-row input { width:16px; height:16px; margin:2px 0 0; padding:0; accent-color:var(--accent); }
.counterparty-direction-row span { display:grid; min-width:0; gap:2px; }
.counterparty-direction-row strong,.counterparty-direction-row small { min-width:0; overflow-wrap:anywhere; }
.counterparty-direction-row small { color:var(--muted); font-size:12px; line-height:1.4; }
.counterparty-direction-row.unavailable { opacity:.62; }
.counterparty-boundary-note,.counterparty-source-note { margin:9px 0 0; padding:8px 10px; border-left:2px solid var(--line-strong); border-radius:0; background:transparent; color:var(--muted); font-size:12px; line-height:1.45; }
.counterparty-source-note { background:var(--warn-bg); color:var(--warn-fg); }
.counterparty-activity-grid,.counterparty-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-top:12px; }
.counterparty-activity-grid article,.counterparty-metric { display:grid; gap:4px; padding:8px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; }
.counterparty-activity-grid span,.counterparty-metric span { color:var(--muted); font-size:12px; }
.counterparty-activity-grid strong,.counterparty-metric strong { font-size:14px; }
.counterparty-metric small { color:var(--muted); font-size:12px; line-height:1.35; }
.counterparty-metric.unavailable { background:var(--raised-2); }
.counterparty-contract,.counterparty-route { display:grid; gap:3px; padding:8px 0; border-bottom:1px dashed var(--line); }
.counterparty-contract:last-child,.counterparty-route:last-child { border-bottom:0; }
.counterparty-contract span,.counterparty-contract small,.counterparty-route span { color:var(--muted); font-size:12px; }
.counterparty-create-note { display:grid; gap:4px; padding:11px; border:1px solid var(--accent); border-radius:6px; background:var(--accent-soft); }
.counterparty-create-note span { color:var(--muted); font-size:12px; line-height:1.45; }
.counterparty-contract-create { display:flex; justify-content:space-between; gap:12px; align-items:baseline; margin-top:4px; padding-top:12px; border-top:1px solid var(--line); }
.counterparty-contract-create span { color:var(--muted); font-size:12px; }
.registry-row { display:grid; grid-template-columns:minmax(180px,1.1fr) minmax(180px,1fr) minmax(160px,.8fr); gap:16px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.registry-row--interactive { cursor:pointer; transition:border-color .15s ease,background .15s ease,transform .15s ease; }
.registry-row--interactive:hover,.registry-row--interactive:focus-visible { border-color:var(--accent); background:var(--hover); transform:translateY(-1px); }
.registry-row strong,.registry-row span,.registry-row small { min-width:0; overflow-wrap:anywhere; }
.registry-row span,.registry-row small { color:var(--muted); }
.registry-row small { text-align:right; }
.vehicle-registry-row { grid-template-columns:minmax(285px,1fr) minmax(285px,1fr) minmax(285px,.9fr); gap:18px; min-height:86px; }
.vehicle-registry-unit { display:grid; align-content:center; gap:8px; min-width:0; }
.vehicle-registry-unit > strong { overflow:hidden; font-size:16px; text-overflow:ellipsis; white-space:nowrap; }
.vehicle-registry-unit-facts { display:flex; min-width:0; align-items:center; justify-content:space-between; gap:12px; }
.vehicle-registry-unit-facts > span { overflow:hidden; color:var(--muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.vehicle-registry-unit--empty { min-height:52px; }
.vehicle-registry-documents { display:grid; grid-template-columns:repeat(3,minmax(76px,1fr)); gap:7px; min-width:0; }
.vehicle-registry-document { display:grid; grid-template-columns:24px minmax(0,1fr); grid-template-rows:auto auto; column-gap:7px; align-items:center; min-width:0; padding:7px; border:1px solid var(--line); border-radius:6px; color:var(--muted); background:var(--raised-3); }
.vehicle-registry-document i { grid-row:1 / 3; display:grid; width:24px; height:24px; place-items:center; border-radius:50%; color:var(--on-accent); background:var(--subtle); font-size:12px; font-style:normal; font-weight:900; }
.vehicle-registry-document b,.vehicle-registry-document small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vehicle-registry-document b { color:inherit; font-size:12px; }
.vehicle-registry-document small { color:inherit; font-size:12px; text-align:left; }
.vehicle-registry-document.ready { border-color:var(--ok-fg); color:var(--ok-fg); background:var(--ok-bg); }
.vehicle-registry-document.ready i { background:var(--ok-fg); }
.vehicle-registry-document.warning { border-color:var(--warn-fg); color:var(--warn-fg); background:var(--warn-bg); }
.vehicle-registry-document.warning i { background:var(--warn-fg); }
.vehicle-registry-document.expired { border-color:var(--error-fg); color:var(--error-fg); background:var(--error-bg); }
.vehicle-registry-document.expired i { background:var(--error-fg); }
.vehicle-registry-document.unknown { color:var(--subtle); background:var(--raised-2); }
.vehicle-insurance-state { justify-self:start; padding:6px 9px; border-radius:999px; color:var(--muted); background:var(--raised-3); font-size:12px; font-weight:800; white-space:nowrap; }
.vehicle-insurance-state.ready { color:var(--ok-fg); background:var(--ok-bg); }
.vehicle-insurance-state.warning { color:var(--warn-fg); background:var(--warn-bg); }
.vehicle-insurance-state.expired { color:var(--error-fg); background:var(--error-bg); }
.vehicle-document-state { display:inline-flex; align-items:center; justify-self:start; gap:7px; color:var(--muted); font-size:12px; white-space:nowrap; }
.vehicle-document-state i { position:relative; display:block; width:16px; height:20px; border:1.5px solid currentcolor; border-radius:5px; background:var(--surface); }
.vehicle-document-state i::after { position:absolute; top:4px; right:3px; left:3px; height:1.5px; background:currentcolor; box-shadow:0 4px 0 currentcolor,0 8px 0 currentcolor; content:""; }
.vehicle-document-state b { font-size:12px; }
.vehicle-document-state.ready { color:var(--ok-fg); }
.license-plate { --plate-width:180px; --plate-height:39px; --plate-border:1.5px; display:grid; grid-template-columns:3fr 1fr; width:var(--plate-width); min-width:var(--plate-width); height:var(--plate-height); border:var(--plate-border) solid #111; border-radius:5px; color:#080808; background:#fff; box-shadow:none; overflow:hidden; vertical-align:middle; white-space:nowrap; }
.license-plate .license-plate__main,.license-plate .license-plate__region,.license-plate .license-plate__main span,.license-plate .license-plate__region span { color:#080808; }
.license-plate__main { display:flex; min-width:0; align-items:center; justify-content:space-evenly; gap:1px; padding:1px 8px 0; font-family:Arial,"Helvetica Neue",sans-serif; font-size:24px; font-weight:700; line-height:1; letter-spacing:0; }
.license-plate__digits { font-size:29px; font-weight:700; letter-spacing:-.025em; }
.license-plate__letter,.license-plate__trailer-series { padding-top:2px; }
.license-plate__trailer-series { letter-spacing:-.025em; }
.license-plate__region { display:grid; grid-template-rows:minmax(0,1fr) auto; place-items:center; min-width:0; padding:2px 3px 3px; border-left:var(--plate-border) solid #111; font-family:Arial,"Helvetica Neue",sans-serif; line-height:1; }
.license-plate__region b { align-self:end; font-size:19px; font-weight:700; letter-spacing:-.025em; }
.license-plate__region small { display:flex; align-items:center; justify-content:center; gap:3px; font-size:7px; font-weight:700; letter-spacing:.04em; }
.license-plate__region i { display:inline-block; width:13px; height:7px; border:.5px solid #777; background:linear-gradient(to bottom,#fff 0 33%,#1f57a5 33% 66%,#d4292f 66% 100%); }
.license-plate--trailer .license-plate__main { justify-content:center; gap:7px; }
.license-plate--compact { --plate-width:144px; --plate-height:31px; --plate-border:1.25px; border-radius:5px; }
.license-plate--compact .license-plate__main { padding:1px 6px 0; font-size:19px; }
.license-plate--compact .license-plate__digits { font-size:23px; }
.license-plate--compact .license-plate__region { padding:1px 2px 2px; }
.license-plate--compact .license-plate__region b { font-size:15px; }
.license-plate--compact .license-plate__region small { gap:2px; font-size:5.5px; }
.license-plate--compact .license-plate__region i { width:10px; height:5px; }
.license-plate--frameless { --plate-width:126px; --plate-height:27px; border:0; border-radius:0; background:transparent; box-shadow:none; overflow:visible; }
.license-plate--frameless .license-plate__main { padding:1px 5px 0 0; font-size:17px; }
.license-plate--frameless .license-plate__digits { font-size:20px; }
.license-plate--frameless .license-plate__region { padding:1px 0 1px 5px; border-left:1px solid #98a3aa; }
.license-plate--frameless .license-plate__region b { font-size:14px; }
.license-plate--frameless .license-plate__region small { gap:2px; font-size:5px; }
.license-plate--frameless .license-plate__region i { width:9px; height:4px; }
.license-plate-text { font-weight:800; letter-spacing:.02em; }
.mapping-bound-vehicle,.watched-vehicle { display:flex; align-items:center; gap:7px; }
.mapping-filters { grid-template-columns:minmax(240px,1fr) 180px 180px; justify-content:flex-end; }
.mapping-bulk-bar,.mapping-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0; color:var(--muted); font-size:12px; }
.mapping-pagination { justify-content:flex-end; margin-top:12px; }
.mapping-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.mapping-table-head,.mapping-table-row { display:grid; grid-template-columns:34px 90px minmax(170px,1.1fr) 120px 125px minmax(170px,1fr) 130px 95px; gap:10px; align-items:center; min-width:980px; padding:8px 10px; }
.mapping-table-head { position:sticky; z-index:2; top:0; border-bottom:1px solid var(--line); color:var(--muted); background:var(--raised-3); font-size:12px; font-weight:800; text-transform:uppercase; }
.mapping-table-row { min-height:44px; border-bottom:1px solid var(--line); font-size:13px; }
.mapping-table-row:last-child { border-bottom:0; }
.mapping-table-row > span,.mapping-table-row > strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ppr-transactions-panel { margin-top:16px; }
.ppr-transaction-table { overflow-x:auto; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.ppr-transaction-head,.ppr-transaction-row { display:grid; grid-template-columns:minmax(150px,1fr) 145px 120px minmax(180px,1.2fr) 130px minmax(190px,1.2fr); gap:10px; align-items:center; min-width:940px; padding:8px 10px; }
.ppr-transaction-head { color:var(--muted); background:var(--raised-3); font-size:12px; font-weight:800; text-transform:uppercase; }
.ppr-transaction-row { min-height:44px; border-top:1px solid var(--line); font-size:13px; }
.ppr-transaction-row > span,.ppr-transaction-row > strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mapping-select { display:flex; align-items:center; justify-content:center; margin:0; }
.mapping-select input { width:16px; height:16px; margin:0; }
.heading-row { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; }
.heading-actions { display:flex; align-items:center; gap:14px; }
.heading-row h2 { margin:0 0 5px; font-size:26px; letter-spacing:-.025em; }
.heading-row p,.muted { color:var(--muted); }
.heading-row p { margin:4px 0 0; font-size:13px; }
.request-create-launcher { display:flex; gap:4px; padding:3px; border:1px solid var(--line); border-radius:6px; background:var(--sidebar); }
.request-create-launcher button { min-height:36px; padding:7px 10px; border:0; border-radius:5px; color:var(--muted); background:transparent; font-size:12px; }
.request-create-launcher button:hover { color:var(--accent); background:var(--hover); }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:16px 0; }
.metrics article { padding:11px 13px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.metrics span { display:block; margin-bottom:4px; color:var(--muted); font-size:12px; }
.metrics strong { font-size:20px; }
.content { display:grid; grid-template-columns:minmax(0,1.85fr) minmax(320px,1fr); gap:10px; }
.panel { min-height:0; padding:14px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.content > .panel { min-height:0; }
.panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.panel-heading h3 { margin:0; font-size:18px; }
.panel-heading p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.compact-list .card { min-height:40px; }
.filters { display:grid; grid-template-columns:1fr 190px; gap:10px; margin-bottom:13px; }
.list { display:grid; gap:0; overflow:hidden; border:1px solid var(--line); border-radius:var(--radius); }
.card { width:100%; min-height:42px; padding:8px 11px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:var(--surface); color:inherit; text-align:left; }
.card:last-child { border-bottom:0; }
.card:hover { background:var(--hover); }
.card.selected { background:var(--selected); box-shadow:none; }
.card > div,.card footer,.detail-head,.trip { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.card p { margin:9px 0 5px; }
.card small,.card footer { color:var(--muted); }
.card footer { margin-top:11px; padding-top:10px; border-top:1px solid var(--line); font-size:12px; }
.request-row { display:grid; grid-template-columns:96px minmax(116px,.8fr) minmax(150px,1.25fr) auto; gap:10px; align-items:center; height:44px; min-height:44px; padding:0 11px; }
.request-row-number,.request-row-customer,.request-row-route { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.request-row-number { font-size:13px; }
.request-row-customer { font-weight:700; }
.request-row-route { color:var(--muted); font-size:12px; }
.request-row .badge { justify-self:end; }
.badge { padding:5px 8px; border-radius:999px; color:var(--accent); background:var(--accent-soft); font-size:12px; font-weight:800; }
.detail h3 { margin:3px 0 0; }
.detail h4 { margin:22px 0 8px; }
.detail-tabs { display:flex; gap:6px; margin:18px 0 14px; padding-bottom:10px; border-bottom:1px solid var(--line); overflow:auto; }
.detail-tabs button { flex:0 0 auto; padding:8px 10px; border:0; border-radius:6px; color:var(--muted); background:transparent; font-weight:700; }
.detail-tabs button.active { color:var(--accent); background:var(--selected); }
.detail-content { min-height:285px; }
.request-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
.request-facts div:nth-child(3) { grid-column:1 / -1; }
.cargo-list,.transportation-list,.journal { display:grid; gap:8px; }
.cargo-list article,.transportation-list article,.journal article { padding:11px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.cargo-list article { display:grid; grid-template-columns:1fr auto; gap:4px 12px; }
.cargo-list small { grid-column:1 / -1; color:var(--muted); }
.transportation-list article > div { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.transportation-list p { margin:7px 0 3px; }
.transportation-list small,.journal span,.journal small { color:var(--muted); }
.journal article { display:grid; gap:4px; }
.journal span { font-size:12px; }
.fulfillment-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.fulfillment-summary div { padding:10px; border-radius:6px; background:var(--raised-2); }
.fulfillment-summary span { display:block; margin-bottom:5px; color:var(--muted); font-size:12px; }
.execution-choice { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; margin-bottom:12px; padding:13px 14px; border-left:2px solid var(--accent); background:var(--accent-soft); }
.execution-choice div { display:grid; gap:4px; }
.execution-choice p { max-width:760px; margin:0; color:var(--muted); font-size:12px; line-height:1.45; }
.execution-choice button { min-height:40px; }
.progress { height:8px; margin:12px 0 5px; border-radius:999px; background:var(--raised-3); overflow:hidden; }
.progress span { display:block; height:100%; border-radius:inherit; background:var(--accent); }
.request-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }
.request-actions button { padding:9px 11px; border-radius:6px; }
.creation-result { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:14px 0; padding:12px 14px; border-left:2px solid var(--accent); background:var(--accent-soft); }
.creation-result div { display:grid; gap:4px; }
.creation-result span { color:var(--muted); font-size:12px; line-height:1.4; }
.transportation-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.execution-leg-list { display:grid; gap:6px; margin:10px 0 0; padding:9px 0 0; border-top:1px solid var(--line); list-style:none; }
.execution-leg-list li { display:grid; grid-template-columns:auto minmax(0,1fr); gap:3px 10px; align-items:baseline; padding-left:10px; border-left:2px solid var(--accent); }
.execution-leg-list li span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.execution-leg-list li b,.execution-leg-list li small { grid-column:1 / -1; }
.execution-leg-list li b { font-size:12px; font-weight:700; }
.execution-leg-list li small { color:var(--muted); }
.leg-cost-summary { display:block; margin-top:5px; }
.execution-leg-empty { margin:9px 0 0; padding-top:8px; border-top:1px solid var(--line); }
.danger-button { border:1px solid var(--error-fg); color:var(--danger); background:var(--error-bg); }
.confirm-card { margin:18px 0; padding:15px; border-radius:6px; background:var(--accent-soft); }
.confirm-card p { margin:7px 0 0; color:var(--muted); }
.confirm-card.danger { color:var(--error-fg); background:var(--error-bg); }
.confirm-card.danger p { color:var(--error-fg); }
.field-note { display:block; align-self:center; margin-top:5px; color:var(--muted); font-size:12px; font-weight:500; }
.empty.compact { min-height:108px; }
dl { display:grid; gap:10px; }
dl div { padding:10px 0; border-bottom:1px solid var(--line); }
dt { color:var(--muted); font-size:12px; }
dd { margin:4px 0 0; }
.trip { padding:10px 0; border-bottom:1px solid var(--line); }
.safe-actions { margin-top:22px; padding:13px; border-radius:6px; background:var(--raised-2); }
.safe-actions p { margin:7px 0; }
.safe-actions small,.empty span { color:var(--muted); }
.empty { min-height:128px; display:grid; place-content:center; gap:7px; text-align:center; color:var(--muted); }
.content > .panel > .empty { min-height:160px; }
.request-dialog,.counterparty-detail-dialog,.vehicle-workspace-dialog,.route-card-dialog { overscroll-behavior:contain; }
.request-dialog { width:min(760px,calc(100% - 28px)); max-height:calc(100vh - 28px); padding:0; border:1px solid var(--line); border-radius:6px; color:var(--text); background:var(--surface); box-shadow:var(--shadow-floating); }
.request-dialog::backdrop { background:var(--overlay); }
.request-dialog form { padding:24px; }
.request-composer-dialog,.forwarding-sheet-dialog { inset:0; width:calc(100vw - 16px); max-width:calc(100vw - 16px); margin:auto; border-radius:6px; }
.request-composer-dialog { height:auto; max-height:calc(100vh - 16px); }
.forwarding-sheet-dialog { height:calc(100vh - 16px); max-height:calc(100vh - 16px); }
@media (min-width:1025px) {
  .request-composer-dialog { inset:50% 0 auto; height:fit-content; overflow:hidden; transform:translateY(-50%); }
}
.forwarding-sheet-dialog form { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto auto auto; width:100%; max-width:100%; height:calc(100vh - 18px); max-height:calc(100vh - 18px); min-width:0; padding:0; overflow:hidden; background:var(--surface); }
.tm-workbar { display:grid; grid-template-columns:auto minmax(340px,1fr) auto; gap:12px; align-items:center; padding:8px 10px; border-bottom:1px solid var(--line-strong); background:var(--raised-2); }
.tm-workbar-title { min-width:175px; }
.tm-workbar-title .eyebrow { margin:0 0 2px; font-size:12px; letter-spacing:.13em; }
.tm-workbar-title h2 { margin:0; font-size:18px; line-height:1.1; }
.tm-workbar-facts { display:grid; grid-template-columns:repeat(4,minmax(78px,1fr)); gap:0; min-width:0; }
.tm-workbar-facts div { min-width:0; padding:2px 10px; border:0; border-left:1px solid var(--line); }
.tm-workbar-facts dt { font-size:12px; text-transform:uppercase; letter-spacing:.06em; }
.tm-workbar-facts dd { margin:1px 0 0; overflow:hidden; font-size:12px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.tm-mode-switch { margin:0; }
.tm-mode-switch button { min-height:36px; padding:7px 10px; border-radius:5px; font-size:12px; }
.tm-workbar-actions { display:flex; align-items:center; gap:6px; }
.tm-section-tabs { display:flex; gap:18px; min-width:0; overflow-x:auto; padding:0 12px; border-bottom:1px solid var(--line); background:var(--surface); }
.tm-section-tabs a { flex:0 0 auto; min-height:38px; padding:10px 0 8px; border:0; border-bottom:2px solid transparent; color:var(--muted); font-size:13px; font-weight:750; text-decoration:none; }
.tm-section-tabs a[aria-current="page"] { color:var(--accent); background:var(--surface); border-bottom-color:var(--accent); }
.tm-section-tabs a:focus-visible,.tm-section-tabs a:hover { color:var(--text); background:var(--surface); }
.forwarding-sheet-main { display:grid; grid-template-columns:minmax(0,1fr) 284px; gap:0; min-width:0; padding:0; overflow:hidden; }
.quiet-request-main { display:grid; min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:max-content; align-content:start; gap:0 10px; overflow:auto; overscroll-behavior:contain; padding:0 6px 10px; scroll-behavior:smooth; }
.quiet-request-main > .tm-section { grid-column:1 / -1; }
.tm-workspace.tm-has-carrier .quiet-request-main #tm-section-request { grid-column:1; grid-row:1; }
.tm-workspace.tm-has-carrier .quiet-request-main #quick-carrier-section { grid-column:2; grid-row:1; }
.quiet-request-main #tm-section-route { grid-row:2; }
.quiet-request-main #tm-section-transport { grid-row:3; }
.quiet-request-main #tm-section-cargo { grid-row:4; }
.quiet-request-main #tm-section-commercial { grid-row:5; }
.quiet-request-main #tm-section-other { grid-row:6; }
.forwarding-sheet-section { min-height:max-content; padding:10px 12px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:var(--surface); overflow:visible; scroll-margin-top:38px; }
.quiet-request-main #tm-section-request,.quiet-request-main #quick-carrier-section { margin:10px 0 6px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.quiet-request-main #tm-section-request { margin-left:4px; }
.quiet-request-main #quick-carrier-section { margin-right:4px; }
.tm-workspace:not(.tm-has-carrier) .quiet-request-main #tm-section-request { margin-right:4px; }
.quiet-request-main #tm-section-request > header,.quiet-request-main #quick-carrier-section > header { background:transparent; }
.forwarding-sheet-section:last-child { border-bottom:0; }
.forwarding-sheet-section > header { display:flex; align-items:center; gap:9px; min-height:36px; padding:0 0 8px; border-bottom:1px solid var(--line); background:var(--surface); }
.forwarding-sheet-section > header b { font-size:14px; }
.forwarding-sheet-section > header small { color:var(--muted); font-size:12px; }
.forwarding-sheet-section > header .compact-action { min-height:36px; margin-left:auto; padding:7px 10px; border-radius:5px; font-size:12px; }
.tm-party-grid { display:grid; grid-template-columns:1fr; gap:0; padding:0; }
.tm-party-card { min-width:0; padding:4px 8px 8px; border:0; border-radius:0; background:transparent; }
.tm-party-card > header { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:32px; padding:0 0 7px; border-bottom:1px solid var(--line); background:transparent; }
.tm-party-card > header b { font-size:13px; }
.tm-risk-neutral { color:var(--subtle); font-size:12px; font-weight:700; white-space:nowrap; }
.tm-party-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 10px; padding:6px 0; }
.tm-party-fields .wide { grid-column:1 / -1; }
.tm-party-fields label,.tm-request-strip label,.tm-commercial-grid label,.tm-vehicle-row label { min-width:0; margin:0; color:var(--muted); font-size:12px; }
.tm-party-fields input,.tm-party-fields select,.tm-request-strip input,.tm-request-strip select,.tm-commercial-grid input,.tm-commercial-grid select,.tm-vehicle-row select,.forwarding-edit-row input,.forwarding-edit-row select { min-height:38px; padding:7px 9px; border:1px solid var(--line); border-radius:5px; background:var(--control-bg); box-shadow:none; font-size:13px; }
.tm-party-fields input:hover,.tm-party-fields select:hover,.tm-request-strip input:hover,.tm-request-strip select:hover,.tm-commercial-grid input:hover,.tm-commercial-grid select:hover,.tm-vehicle-row select:hover,.forwarding-edit-row input:hover,.forwarding-edit-row select:hover { border-color:var(--line-strong); }
.tm-party-fields input:focus-visible,.tm-party-fields select:focus-visible,.tm-request-strip input:focus-visible,.tm-request-strip select:focus-visible,.tm-commercial-grid input:focus-visible,.tm-commercial-grid select:focus-visible,.tm-vehicle-row select:focus-visible,.forwarding-edit-row input:focus-visible,.forwarding-edit-row select:focus-visible { outline:2px solid var(--focus); outline-offset:1px; border-color:var(--focus); box-shadow:none; }
.tm-party-fields .field-note { margin-top:2px; font-size:12px; line-height:1.25; }
.tm-party-fields .action-row { margin-top:auto; }
.tm-compact-details { margin:0 6px 6px; border-top:1px solid var(--line); }
.tm-compact-details > summary { padding:8px 2px; color:var(--muted); font-size:12px; font-weight:750; cursor:pointer; }
.tm-compact-details .inline-draft-panel { margin:0 0 5px; padding:7px 0; border:0; border-radius:0; background:transparent; }
.tm-request-strip { display:grid; grid-template-columns:repeat(3,minmax(180px,1fr)); gap:8px 12px; padding:0 8px 8px; }
.tm-request-strip #quick-executing-org-field { grid-column:span 2; }
.forwarding-table-scroll { contain:paint; overflow-x:auto; overscroll-behavior-inline:contain; }
.forwarding-edit-table { display:grid; }
.tm-route-grid { min-width:1110px; }
.tm-cargo-grid { min-width:1300px; }
.tm-grid-head,.forwarding-edit-row { display:grid; gap:4px; align-items:center; }
.tm-grid-head { position:sticky; z-index:2; top:0; min-height:38px; padding:7px 6px; color:var(--muted); background:var(--raised-2); border-bottom:1px solid var(--line-strong); font-size:12px; font-weight:800; text-transform:none; letter-spacing:0; }
.tm-route-head,.tm-route-row { grid-template-columns:28px 112px 145px minmax(280px,1fr) 170px 70px 132px; }
.tm-cargo-head,.tm-cargo-row { grid-template-columns:28px minmax(190px,1fr) 78px 88px 78px 78px 112px minmax(310px,1.4fr) 105px 66px; }
.tm-cargo-head.simple,.simple-forwarding-cargo .tm-cargo-row { grid-template-columns:28px minmax(260px,1.6fr) 110px 100px minmax(145px,.8fr) minmax(145px,.8fr) 66px; }
.forwarding-edit-row { min-height:44px; padding:5px 6px; border-top:1px solid var(--line); background:var(--surface); }
.forwarding-edit-row:nth-child(odd) { background:var(--surface); }
.forwarding-edit-row:focus-within { position:relative; z-index:1; background:var(--accent-soft); box-shadow:none; }
.forwarding-edit-row > b { align-self:center; color:var(--muted); font-size:12px; text-align:center; }
.forwarding-edit-row label { min-width:0; margin:0; font-size:12px; }
.forwarding-edit-row .icon-button { width:36px; height:36px; align-self:center; border-radius:5px; font-size:14px; }
.forwarding-edit-row .row-actions { display:flex; align-items:center; justify-content:flex-end; gap:2px; }
.tm-route-head > :first-child,.tm-route-row > :first-child,.tm-cargo-head > :first-child,.tm-cargo-row > :first-child { position:sticky; z-index:3; left:0; background:inherit; }
.request-cargo-movements { display:grid; gap:3px; min-width:0; }
.request-cargo-movements > header { display:flex; justify-content:flex-end; }
.request-cargo-movements > header button { min-height:36px; padding:7px 10px; border-radius:5px; font-size:12px; }
.request-cargo-movement-row { display:grid; grid-template-columns:minmax(160px,1fr) 78px 27px; gap:3px; align-items:center; }
.tm-cargo-balance { display:block; padding:7px; border-radius:5px; font-size:12px; font-weight:800; text-align:center; }
.tm-cargo-balance.balanced { color:var(--ok-fg); background:var(--ok-bg); }
.tm-cargo-balance.unbalanced { color:var(--error-fg); background:var(--error-bg); }
.tm-vehicle-row { display:grid; grid-template-columns:190px repeat(3,minmax(170px,1fr)); gap:8px 12px; align-items:end; padding:6px 8px; }
.tm-assign-toggle { align-self:center; }
.tm-mode-note { margin:0; padding:8px; color:var(--muted); font-size:12px; }
.tm-execution-choice,.route-card-execution-choice { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:7px 8px; border-bottom:1px solid var(--line); }
.tm-execution-choice > span,.route-card-execution-choice > span { color:var(--muted); font-size:12px; font-weight:800; }
.tm-commercial-grid { display:grid; grid-template-columns:repeat(4,minmax(160px,1fr)); gap:8px 12px; padding:8px; }
.tm-commercial-grid .wide { grid-column:span 2; }
.tm-other-section > p,.tm-other-section > details { margin:6px; }
.tm-finance-strip { display:none; }
.tm-finance-strip > div { min-width:105px; padding:7px 8px; border-right:0; }
.tm-finance-strip span { display:block; overflow:hidden; color:var(--muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.tm-finance-strip b { display:block; margin-top:2px; overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.tm-finance-strip .tm-margin { color:var(--accent); background:var(--raised-2); }
.tm-finance-strip .tm-margin span { color:var(--muted); }
.tm-form-error { min-height:0; margin:0; padding:0 10px; background:var(--surface); }
.tm-form-error:not(:empty) { padding:7px 10px; }
.tm-form-error:empty,.request-composer-dialog .error:empty { display:none; }
.field-validation-error { display:grid; grid-column:1 / -1; grid-template-columns:16px minmax(0,1fr); gap:6px; align-items:start; min-width:0; max-width:100%; margin:4px 0 0; color:var(--error-fg); font-size:12px; font-weight:650; line-height:1.35; overflow-wrap:anywhere; }
.field-validation-error .quiet-icon { width:14px; height:14px; margin-top:1px; color:var(--error-fg); }
.field-validation-error span { min-width:0; }
.tm-action-bar { min-height:44px; margin:0; padding:4px 10px; border-top:0; background:var(--footer); }
.tm-action-bar button { min-height:36px; border-radius:5px; }
.visually-hidden { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.forwarding-sheet-assurance { margin:16px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.transport-form-switch { width:auto; margin:0; }
.counterparty-indicators { display:flex; align-items:center; gap:9px; min-height:34px; }
.otk-screening-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.otk-screening-row span { color:var(--muted); font-size:12px; line-height:1.4; }
.otk-screening-row button { flex:0 0 auto; }
.indicator { font-size:21px; line-height:1; text-shadow:0 0 0 currentColor; }
.indicator.information,.indicator.documents { color:var(--accent); }
.indicator.payment,.indicator.ati { color:var(--ok-fg); }
.indicator.disputes,.indicator.damage { color:var(--warn-fg); }
.indicator.no-experience { opacity:.28; }
.action-row { display:flex; flex-wrap:wrap; gap:8px; }
.draft-restored { color:var(--ok-fg); font-weight:700; }
.preview-ok { color:var(--ok-fg)!important; font-weight:700; }
.transportation-mode-switch { display:inline-flex; gap:4px; margin-top:10px; padding:4px; border:1px solid var(--line); border-radius:6px; background:var(--raised-3); }
.transportation-mode-switch button { border:0; border-radius:6px; padding:8px 12px; color:var(--muted); background:transparent; font-weight:800; cursor:pointer; }
.transportation-mode-switch button.active { color:var(--accent); background:var(--selected); box-shadow:none; }
.request-intent-switch { display:inline-flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:7px; background:var(--sidebar); }
.request-intent-switch button { min-height:36px; padding:7px 14px; border:0; border-radius:5px; color:var(--muted); background:transparent; font-weight:800; cursor:pointer; }
.request-intent-switch button.active { color:var(--text); background:var(--accent-soft); box-shadow:inset 2px 0 0 var(--accent); }
.mode-migration-warning { margin:8px 0 0; padding:9px 11px; border:1px solid var(--warn-fg); border-radius:6px; color:var(--warn-fg); background:var(--warn-bg); font-size:13px; font-weight:700; }
.request-composer-dialog form { display:grid; grid-template-rows:auto minmax(0,max-content) auto auto; width:100%; height:auto; max-height:calc(100vh - 18px); padding:0; overflow:hidden; }
.request-composer-dialog .dialog-head { padding:10px 14px; border-bottom:1px solid var(--line); background:var(--raised-2); }
.request-composer-dialog .dialog-head h2 { font-size:18px; }
.request-composer-dialog .request-step-caption { margin:2px 0 0; font-size:12px; }
.request-step-caption { margin:5px 0 0; }
.request-composer { display:grid; grid-template-columns:minmax(0,1fr) 324px; grid-template-rows:auto minmax(0,1fr); gap:0; height:auto; min-height:0; max-height:calc(100vh - 150px); margin:0; overflow:hidden; }
.request-composer-guide { grid-column:1; grid-row:1; display:flex; flex-wrap:wrap; gap:7px 14px; align-items:center; min-height:50px; padding:7px 22px; border-bottom:1px solid var(--line); background:var(--sidebar); color:var(--muted); font-size:12px; font-weight:700; }
.request-composer-guide small { flex:1 1 260px; line-height:1.35; }
.request-workflow-switch { display:inline-flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:7px; background:var(--surface); }
.request-workflow-switch button { min-height:34px; padding:6px 12px; border:0; border-radius:5px; color:var(--muted); background:transparent; font-weight:800; cursor:pointer; }
.request-workflow-switch button.active { color:var(--text); background:var(--accent-soft); box-shadow:inset 2px 0 0 var(--accent); }
.request-composer-steps { grid-column:1; grid-row:1; display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); align-content:start; gap:3px; padding:7px 10px; overflow-x:auto; border-right:0; border-bottom:1px solid var(--line); border-radius:0; background:var(--sidebar); }
.request-composer-steps button { display:grid; grid-template-columns:28px 1fr; gap:8px; align-items:center; min-height:48px; padding:7px 8px; border:0; border-radius:6px; color:var(--muted); background:transparent; text-align:left; cursor:pointer; }
.request-composer-steps button b { display:grid; width:28px; height:28px; place-items:center; border:1px solid var(--line-strong); border-radius:50%; font-size:12px; }
.request-composer-steps button span { display:grid; gap:2px; font-weight:800; }
.request-composer-steps button small { color:var(--muted); font-size:12px; font-weight:500; }
.request-composer-steps button.active { color:var(--accent); background:var(--selected); box-shadow:none; }
.request-composer-steps button.active b,.request-composer-steps button.complete b { border-color:var(--accent); color:var(--on-accent); background:var(--accent); }
.request-composer-body { grid-column:1; grid-row:2; display:grid; gap:14px; min-width:0; overflow:auto; overscroll-behavior:contain; padding:18px 22px 34px; background:var(--canvas); }
.request-composer-body > .request-step-panel { padding:18px; border:1px solid var(--line); border-radius:7px; background:var(--surface); }
.request-composer-body > .request-block-continuation { margin-top:-15px; border-top:0; border-radius:0 0 7px 7px; }
.request-composer-body > [data-request-panel="route"] { border-radius:7px 7px 0 0; }
.request-composer-body > [data-request-panel="execution"] { border-radius:7px 7px 0 0; }
.quiet-request-passport { grid-column:2; grid-row:1 / span 2; position:sticky; top:0; min-width:0; overflow:auto; overflow-x:hidden; padding:16px 18px; border-left:1px solid var(--line); background:var(--inspector); }
.quiet-request-passport > header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-bottom:10px; border-bottom:1px solid var(--line); }
.quiet-request-passport > header span { color:var(--muted); font-size:12px; font-weight:800; }
.quiet-request-passport > header strong { padding:4px 7px; border-radius:5px; color:var(--accent); background:var(--accent-soft); font-size:12px; }
.quiet-request-passport dl { display:grid; gap:0; margin:8px 0 12px; }
.quiet-request-passport dl > div { display:grid; gap:3px; padding:8px 0; border-bottom:1px solid var(--line); }
.quiet-request-passport dt,.quiet-request-passport > section > span { color:var(--subtle); font-size:12px; font-weight:800; }
.quiet-request-passport dd { margin:0; color:var(--text); font-size:13px; font-weight:700; line-height:1.35; overflow-wrap:anywhere; }
.quiet-request-passport > section { display:grid; gap:7px; }
.quiet-request-passport ol { display:grid; gap:5px; margin:0; padding-left:18px; color:var(--muted); font-size:12px; line-height:1.35; }
.request-composer-dialog > form > .preview-only-truth { margin:0; padding:5px 14px; border-top:1px solid var(--line); background:var(--raised-2); }
.request-composer-dialog > form > .dialog-actions { min-height:44px; margin:0; padding:4px 14px; border-top:1px solid var(--line); background:var(--footer); }
.request-composer-dialog > form > .dialog-actions button { min-width:0; }
.request-step-panel > header:first-child h3,.request-step-heading h3 { margin:0; font-size:20px; }
.request-step-panel > header:first-child p,.request-step-heading p { margin:4px 0 0; color:var(--muted); }
.request-block-number { color:var(--accent)!important; font-size:11px!important; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.request-step-heading { display:flex; justify-content:space-between; gap:16px; align-items:start; margin-bottom:14px; }
.request-route-layout { display:grid; grid-template-columns:minmax(480px,2fr) minmax(280px,1fr); gap:16px; }
.request-route-points,.request-cargo-items { display:grid; gap:0; }
.request-route-card,.request-cargo-card { padding:10px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; }
.request-route-card:last-child,.request-cargo-card:last-child { border-bottom:0; }
.request-route-card > header,.request-cargo-card > header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.request-route-card > header .row-actions,.request-cargo-card > header .row-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
.request-route-segment { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 14px; align-items:center; margin:0 0 10px; padding:9px 11px; border-left:2px solid var(--line-strong); background:var(--raised-2); }
.request-route-segment header { display:flex; flex-wrap:wrap; gap:6px 12px; align-items:center; justify-content:space-between; }
.request-route-segment header span { color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.03em; }
.request-route-segment header strong { color:var(--text); font-size:13px; }
.request-route-segment small { grid-column:1 / -1; color:var(--muted); line-height:1.35; }
.request-route-segment.is-editable { border-left-color:var(--accent); background:var(--accent-soft); }
.request-segment-switch { display:inline-flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:7px; background:var(--surface); }
.request-segment-switch button { min-height:32px; padding:5px 10px; border:0; border-radius:5px; color:var(--muted); background:transparent; font-weight:800; cursor:pointer; }
.request-segment-switch button[aria-pressed="true"] { color:var(--text); background:var(--selected); box-shadow:inset 2px 0 0 var(--accent); }
.icon-button.compact { width:36px; height:36px; font-size:19px; }
.request-route-card-grid,.request-cargo-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 10px; }
.request-route-card-grid label,.request-cargo-grid label { margin:0; }
.request-route-card-grid .wide,.request-cargo-grid .wide { grid-column:1 / -1; }
.request-route-map-panel { display:grid; align-content:start; gap:8px; position:sticky; top:0; }
.request-route-map-panel .compact-map { min-height:330px; }
.address-suggestions button small { display:block; margin-bottom:2px; color:var(--accent); font-size:12px; font-weight:800; }
.request-review { display:grid; gap:14px; margin-top:16px; }
.request-review-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.request-review-grid article { display:grid; gap:5px; min-height:88px; align-content:center; padding:13px; border-radius:6px; background:var(--raised-2); }
.request-review-grid span,.request-review-grid small { color:var(--muted); font-size:12px; }
.request-review-route,.request-review-cargo { padding:14px; border:1px solid var(--line); border-radius:6px; }
.request-review h4 { margin:0 0 9px; }
.request-review-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.review-edit-link { min-height:36px; padding:5px 8px; border:0; color:var(--accent); background:transparent; font-weight:800; text-decoration:underline; cursor:pointer; }
.request-review-grid article .review-edit-link { justify-self:start; margin-top:4px; }
.request-date-grid { margin:0 0 14px; }
.request-review-grid.compact article { min-height:0; align-content:start; }
.request-review-alert { margin-bottom:10px; padding:12px 14px; border:1px solid var(--warn-fg); border-radius:6px; background:var(--warn-bg); }
.request-review-alert strong { color:var(--warn-fg); }
.request-review-alert ul { margin:6px 0 0; padding-left:18px; color:var(--warn-fg); font-size:12px; }
.request-review-route.compact p,.request-review-cargo.compact p { padding-block:8px; }
.schedule-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.schedule-field { display:grid; grid-template-columns:repeat(2,minmax(130px,1fr)); gap:8px; min-width:0; margin:0; padding:10px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; }
.schedule-field legend { padding:0 6px; color:var(--text); font-weight:800; }
.schedule-field label { margin:0; }
.child-dialog-actions,.tm-child-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0; }
.tm-child-actions { padding-top:6px; }
.child-editor-dialog { width:min(680px,calc(100% - 32px)); }
.child-editor-dialog form { max-height:min(760px,calc(100vh - 40px)); overflow:auto; }
.child-lookup-button { align-self:end; min-height:42px; }
.contract-editor-dialog { width:min(820px,calc(100% - 32px)); }
.contract-file-boundary { display:flex; align-items:center; gap:12px; margin:14px 0; padding:12px; border:1px dashed var(--line-strong); border-radius:6px; background:var(--raised-2); color:var(--muted); font-size:12px; line-height:1.4; }
.contract-file-boundary button { flex:0 0 auto; }
.payment-matrix { margin-top:12px; border:1px solid var(--line); border-radius:6px; overflow:hidden; }
.payment-matrix header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; background:var(--raised-2); }
.payment-matrix h3,.payment-matrix p { margin:0; }
.payment-matrix p { margin-top:3px; color:var(--muted); font-size:12px; }
.payment-matrix header strong { color:var(--ok-fg); font-size:20px; }
.payment-matrix header strong.invalid { color:var(--danger); }
.payment-matrix-head,.payment-matrix label { display:grid; grid-template-columns:minmax(150px,1fr) 120px 150px; gap:8px; align-items:center; margin:0; padding:8px 14px; }
.payment-matrix-head { color:var(--muted); background:var(--raised-2); font-size:12px; font-weight:800; text-transform:uppercase; }
.payment-matrix label { border-top:1px solid var(--line); }
.payment-matrix input { padding:8px 10px; }
.request-review-route p { display:grid; grid-template-columns:24px 75px minmax(0,1fr) auto; gap:8px; align-items:center; margin:0; padding:9px 0; border-top:1px solid var(--line); }
.request-review-route p:first-of-type,.request-review-cargo p:first-of-type { border-top:0; }
.request-review-route p > b { display:grid; width:23px; height:23px; place-items:center; border-radius:50%; color:var(--on-accent); background:var(--accent); font-size:12px; }
.request-review-route p > span,.request-review-cargo p span,.request-review-cargo p small { color:var(--muted); font-size:12px; }
.route-resolution { justify-self:end; padding:5px 8px; border-radius:999px; color:var(--muted); background:var(--raised-3); font-size:12px; font-weight:800; }
.route-resolution.ready { color:var(--ok-fg); background:var(--ok-bg); }
.request-review-cargo p { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; margin:0; padding:9px 0; border-top:1px solid var(--line); }
.forwarding-transportation-fields { display:grid; gap:12px; margin-top:16px; padding:16px; border:1px solid var(--accent); border-radius:6px; background:var(--accent-soft); }
.own-fleet-transportation-fields { display:grid; gap:12px; margin-top:16px; padding:16px; border:1px solid var(--warn-fg); border-radius:6px; background:var(--warn-bg); }
.forwarding-transportation-fields header,.own-fleet-transportation-fields header { display:grid; gap:4px; }
.forwarding-transportation-fields h4,.forwarding-transportation-fields p,.own-fleet-transportation-fields h4,.own-fleet-transportation-fields p { margin:0; }
.forwarding-transportation-fields p,.own-fleet-transportation-fields p { color:var(--muted); font-size:12px; }
.own-fleet-organization-strip { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.own-fleet-organization-strip article { display:grid; gap:3px; padding:11px 12px; border:1px solid var(--warn-fg); border-radius:6px; background:var(--surface); }
.own-fleet-organization-strip span,.own-fleet-organization-strip small { color:var(--muted); font-size:12px; }
.request-sector-summary { display:grid; gap:8px; margin-top:12px; padding:14px; border:1px solid var(--accent); border-radius:6px; background:var(--accent-soft); }
.request-sector-summary header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.request-sector-summary header h4,.request-sector-summary header p { margin:0; }
.request-sector-summary header p { color:var(--muted); font-size:12px; }
.request-sector-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:7px; }
.request-sector-summary-grid article { display:grid; gap:3px; padding:10px; border-radius:6px; background:var(--surface); }
.request-sector-summary-grid span,.request-sector-summary-grid small { color:var(--muted); font-size:12px; }
.request-composer-dialog .request-cargo-movements { display:grid; gap:7px; grid-column:1 / -1; padding-top:4px; }
.request-composer-dialog .request-cargo-movements > header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.request-composer-dialog .request-cargo-movements > header span { color:var(--muted); font-size:12px; }
.request-composer-dialog .request-cargo-movement-row { display:grid; grid-template-columns:minmax(180px,1fr) minmax(120px,.45fr) auto; gap:8px; align-items:end; }
.dialog-actions-spacer { flex:1; }
.dialog-head,.dialog-actions { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.dialog-head > div { min-width:0; max-width:100%; }
.dialog-head-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.dialog-head h2 { margin:0; }
.icon-button { width:38px; height:38px; border:0; border-radius:50%; color:var(--muted); background:var(--raised-3); font-size:25px; line-height:1; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 14px; margin-top:18px; }
.form-grid label { margin:8px 0; }
.form-grid .wide { grid-column:1 / -1; }
.vehicle-sts-recognition { display:flex; align-items:center; gap:12px; padding:12px; border:1px solid var(--accent); border-radius:6px; background:var(--accent-soft); }
.vehicle-sts-recognition .muted { margin:0; }
.vehicle-sts-comparison { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.vehicle-sts-compare-group { display:grid; gap:8px; padding:12px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.vehicle-sts-compare-group > strong { font-size:.82rem; text-transform:uppercase; letter-spacing:.04em; }
.vehicle-sts-compare-group > div { display:grid; gap:2px; }
.vehicle-sts-compare-group span { font-weight:750; }
.vehicle-sts-compare-group small { color:var(--muted); overflow-wrap:anywhere; }
.vehicle-sts-compare-group.missing { border-color:var(--accent); background:var(--accent-soft); }
.vehicle-sts-compare-group.match { border-color:var(--line-strong); }
.vehicle-sts-compare-group.conflict { border-color:var(--warn-fg); background:var(--warn-bg); }
.confirmation-check { display:flex !important; align-items:center; gap:8px; align-self:end; }
.confirmation-check input { width:auto; }
.optional { color:var(--muted); font-size:12px; font-weight:500; }
.dialog-actions { justify-content:flex-end; margin-top:8px; padding-top:17px; border-top:1px solid var(--line); }
.dialog-actions button { min-width:145px; }
.map-host { min-height:460px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); overflow:hidden; }
.map-host[data-map-state="loading"]::after,.map-host[data-map-state="error"]::after { display:grid; position:absolute; z-index:5; inset:0; place-items:center; padding:24px; color:var(--muted); background:var(--overlay-surface); font-weight:800; text-align:center; content:"Загружаем карту…"; }
.map-host[data-map-state="error"]::after { color:var(--warn-fg); background:var(--warn-bg); content:"Карта сейчас недоступна\AИспользуйте список машин и повторите обновление"; white-space:pre-line; }
.fleet-map-panel .map-host { position:relative; }
.compact-map { min-height:250px; }
.monitoring-toolbar { display:grid; gap:8px; margin:14px 0 8px; }
.monitoring-filter-bar { display:grid; width:min(320px,100%); }
.monitoring-filter-bar label { display:grid; gap:4px; margin:0; color:var(--muted); font-size:12px; font-weight:700; }
.monitoring-filter-bar select { min-height:36px; padding:6px 9px; border-radius:5px; color:var(--text); background:var(--surface); font-size:13px; }
.monitoring-quick-views { display:flex; flex-wrap:wrap; gap:4px; padding:3px; border:1px solid var(--line); border-radius:6px; background:var(--sidebar); }
.monitoring-quick-views button { min-height:36px; padding:7px 10px; border:0; border-radius:5px; color:var(--muted); background:transparent; font-size:12px; font-weight:700; }
.monitoring-quick-views button b { margin-left:4px; color:inherit; font-variant-numeric:tabular-nums; }
.monitoring-quick-views button.active { color:var(--accent); background:var(--selected); }
.monitoring-grid { display:grid; grid-template-columns:minmax(0,1.9fr) minmax(284px,1fr); gap:10px; margin-top:0; }
.monitoring-context { display:grid; align-content:start; gap:10px; min-width:0; }
.monitoring-context .compact-panel { margin:0; padding:10px 12px; }
.monitoring-selection-summary header { display:flex; align-items:baseline; justify-content:space-between; gap:10px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.monitoring-selection-summary header span { color:var(--subtle); font-size:12px; font-weight:800; }
.monitoring-selection-summary header strong { max-width:65%; overflow:hidden; color:var(--text); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.monitoring-selection-summary dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:8px 0; }
.monitoring-selection-summary dl > div { min-width:0; padding:7px 8px 7px 0; border-bottom:1px solid var(--line); }
.monitoring-selection-summary dt { color:var(--subtle); font-size:12px; font-weight:750; }
.monitoring-selection-summary dd { overflow:hidden; margin:3px 0 0; color:var(--text); font-size:13px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.monitoring-selection-summary p { margin:8px 0 0; font-size:12px; }
.monitoring-context .map-host { min-height:380px; border-radius:6px; }
.fleet-map-panel { padding:8px; }
.fleet-map-panel > p { margin:7px 2px 1px; font-size:12px; line-height:1.35; }
.mapping-row { display:grid; grid-template-columns:140px minmax(220px,1fr) minmax(260px,1fr); gap:16px; align-items:center; }
.mapping-row > div { display:grid; gap:4px; }
.mapping-row small { color:var(--muted); overflow-wrap:anywhere; }
.mapping-source { align-content:start; }
.mapping-action { justify-items:stretch; }
.mapping-action select { width:100%; }
.status.unbound { background:var(--warn-bg); color:var(--warn-fg); }
.status.ambiguous { background:var(--conflict-bg); color:var(--conflict-fg); }
.status.bound { background:var(--ok-bg); color:var(--ok-fg); }
.fleet-registry-panel { padding:0; overflow:hidden; }
.fleet-registry-head,.fleet-row { display:grid; grid-template-columns:82px minmax(100px,1.1fr) minmax(82px,.85fr) minmax(74px,.72fr) minmax(116px,1.2fr) 84px; gap:8px; align-items:center; }
.fleet-registry-head { min-height:36px; padding:7px 10px; border-bottom:1px solid var(--line); color:var(--subtle); background:var(--raised-2); font-size:12px; font-weight:800; }
.fleet-list { display:grid; gap:0; margin:0; }
.fleet-sidebar { align-content:start; }
.fleet-sidebar h3 { margin:0 0 4px; }
.fleet-sidebar > p { margin:0; font-size:12px; }
.fleet-row { width:100%; min-height:44px; padding:6px 10px; border:0; border-bottom:1px solid var(--line); border-radius:0; color:var(--text); background:var(--surface); text-align:left; cursor:pointer; }
.fleet-row:last-child { border-bottom:0; }
.fleet-row:hover { background:var(--hover); }
.fleet-row.active { background:var(--selected); box-shadow:none; }
.fleet-row:focus { outline:0; }
.fleet-row:focus-visible { position:relative; z-index:1; outline:2px solid var(--focus); outline-offset:-2px; }
.fleet-row > span { min-width:0; overflow:hidden; color:var(--muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.fleet-row .fleet-state { display:inline-flex; align-items:center; gap:6px; color:var(--text); font-weight:750; }
.fleet-state::before { width:8px; height:8px; flex:0 0 auto; border-radius:50%; background:var(--subtle); content:""; }
.fleet-state.ok::before { background:var(--ok-fg); }
.fleet-state.warning::before,.fleet-state.attention::before { background:var(--warn-fg); }
.fleet-state.critical::before { background:var(--danger); }
.fleet-state.offline::before { background:var(--subtle); }
.fleet-row.state-critical { box-shadow:inset 2px 0 var(--danger); }
.fleet-row.state-critical.active { background:var(--selected); box-shadow:inset 2px 0 var(--danger); }
.fleet-row.new-critical .fleet-state::before { animation:quiet-critical-once 1.1s ease-out 1; }
@keyframes quiet-critical-once { 0% { box-shadow:0 0 0 0 color-mix(in srgb,var(--danger) 45%,transparent); } 100% { box-shadow:0 0 0 8px transparent; } }
.fleet-vehicle { display:grid; gap:2px; }
.fleet-vehicle strong { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.fleet-vehicle small,.fleet-cell small { display:block; overflow:hidden; color:var(--subtle); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.fleet-cell { min-width:0; }
.monitoring-refresh { display:flex; align-items:center; gap:9px; color:var(--muted); font-weight:700; }
.refresh-circle { width:42px; height:42px; padding:0; border:1px solid var(--line-strong); border-radius:50%; color:var(--accent); background:var(--surface); font-size:24px; line-height:1; }
.refresh-circle.spinning { animation:monitoring-spin .8s linear infinite; }
@keyframes monitoring-spin { to { transform:rotate(360deg); } }
.compact-panel { min-height:0; margin-top:16px; padding:13px 16px; }
.monitoring-controls { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; align-items:center; min-width:0; }
.monitoring-controls > * { min-width:0; }
.monitoring-controls > div:first-child { display:grid; gap:3px; }
.monitoring-controls > div:first-child span { color:var(--muted); font-size:12px; }
#history-days { width:100%; accent-color:var(--accent); background:repeating-linear-gradient(90deg,transparent 0,transparent calc(7.142% - 1px),var(--line-strong) calc(7.142% - 1px),var(--line-strong) 7.142%); }
.route-legend { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; gap:14px; color:var(--muted); font-size:12px; }
.route-legend span { display:flex; align-items:center; gap:6px; }
.route-legend i { width:20px; height:4px; border-radius:999px; background:var(--subtle); }
.route-legend i.loaded { background:var(--ok-fg); }.route-legend i.empty-route { background:var(--warn-fg); }
.route-legend strong { margin-left:auto; color:var(--text); }
.watched-section { margin-top:20px; }.watched-list { display:grid; gap:10px; }
.watched-card { border:1px solid var(--line); border-radius:6px; background:var(--surface); overflow:hidden; }
.watched-card summary { display:grid; grid-template-columns:auto minmax(150px,1fr) minmax(120px,auto) auto; gap:12px; align-items:center; padding:14px 16px; cursor:pointer; }
.watched-card summary::marker { display:none; }.watched-card .eye { color:var(--accent); font-size:20px; }
.watched-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px 16px; padding:0 16px 16px; border-top:1px solid var(--line); }
.watched-facts p,.watched-facts .progress,.watched-facts button { grid-column:1 / -1; }.watched-facts span { color:var(--muted); font-size:12px; }
.watch-button { margin-top:9px; border:0; color:var(--accent); background:transparent; font-weight:800; text-align:left; }
.address-field { position:relative; }
.address-suggestions { position:absolute; z-index:30; top:calc(100% - 2px); left:0; right:0; display:grid; max-height:240px; overflow-y:auto; border:1px solid var(--line-strong); border-radius:6px; background:var(--surface); box-shadow:var(--shadow-floating); }
.address-suggestions button { border:0; border-bottom:1px solid var(--line); background:var(--surface); padding:11px 12px; text-align:left; color:var(--text); cursor:pointer; }
.address-suggestions button:hover,.address-suggestions button:focus-visible { background:var(--hover); }
.tm-route-row .address-suggestions,.route-card-stop-fields .address-suggestions { min-width:320px; }
.route-preview { display:grid; gap:8px; }
.route-link { justify-self:start; padding:10px 13px; border:1px solid var(--accent); border-radius:6px; color:var(--accent); background:var(--accent-soft); font-size:13px; font-weight:800; text-decoration:none; }
.route-link:hover,.route-link:focus-visible { border-color:var(--accent); background:var(--accent-soft); }
.vehicle-workspace-dialog { width:min(1180px,calc(100% - 28px)); max-height:calc(100vh - 28px); padding:0; border:1px solid var(--line); border-radius:6px; color:var(--text); background:var(--surface); box-shadow:var(--shadow-floating); }
.vehicle-workspace-dialog::backdrop { background:var(--overlay); backdrop-filter:blur(2px); }
.vehicle-workspace-shell { padding:22px; }
.vehicle-workspace-header { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.vehicle-workspace-header .license-plate { margin:4px 0 7px; }
.vehicle-workspace-tabs { display:flex; gap:4px; margin:16px -4px 0; padding:0 4px 8px; overflow-x:auto; border-bottom:1px solid var(--line); scrollbar-width:thin; }
.vehicle-workspace-tabs button { flex:0 0 auto; padding:9px 13px; border:0; border-radius:6px; color:var(--muted); background:transparent; font-weight:800; white-space:nowrap; }
.vehicle-workspace-tabs button:hover,.vehicle-workspace-tabs button:focus-visible { color:var(--accent); background:var(--hover); outline:0; }
.vehicle-workspace-tabs button.active { color:var(--accent); background:var(--selected); }
.vehicle-period-controls { display:flex; flex-wrap:wrap; align-items:end; gap:8px; margin:18px 0; padding:9px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.vehicle-period-controls > button:not(.primary) { padding:9px 12px; border:0; border-radius:6px; color:var(--muted); background:transparent; font-weight:800; }
.vehicle-period-controls > button.active { color:var(--accent); background:var(--selected); box-shadow:none; }
.vehicle-period-controls label { width:170px; margin:0; }
.vehicle-period-controls input { padding:9px 10px; }
.vehicle-workspace-content { max-height:calc(100vh - 270px); overflow:auto; padding:2px 4px 12px 0; }
.vehicle-tab-panel { display:grid; gap:14px; }
.vehicle-tab-panel.hidden { display:none; }
.vehicle-overview-layout { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(230px,.45fr); gap:12px; }
.vehicle-overview-main,.vehicle-current-card,.vehicle-overview-section,.vehicle-tab-panel[data-vehicle-workspace-panel]:not([data-vehicle-workspace-panel="summary"]) { padding:16px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.vehicle-overview-heading,.vehicle-section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:12px; }
.vehicle-overview-heading > div,.vehicle-section-heading > div { display:grid; gap:3px; }
.vehicle-overview-heading span,.vehicle-section-heading span { color:var(--muted); font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.vehicle-overview-heading h3,.vehicle-section-heading h3 { margin:0; font-size:19px; }
.vehicle-section-heading > strong { font-size:20px; }
.vehicle-current-card { display:grid; align-content:center; gap:7px; color:var(--text); background:var(--raised-2); border-color:var(--line); }
.vehicle-current-card > span { font-size:12px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; opacity:.75; }
.vehicle-current-card > strong { font-size:20px; }
.vehicle-current-card p,.vehicle-current-card small { margin:0; color:inherit; }
.vehicle-current-card small { line-height:1.4; opacity:.78; }
.vehicle-summary-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.vehicle-summary-grid > div { display:grid; gap:5px; min-height:70px; align-content:center; padding:11px; border-radius:6px; background:var(--raised-2); }
.vehicle-summary-grid span { color:var(--muted); font-size:12px; }
.vehicle-summary-grid strong { overflow-wrap:anywhere; }
.vehicle-current-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.vehicle-current-strip > div { min-height:82px; display:grid; align-content:center; gap:6px; padding:13px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.vehicle-current-strip span,.vehicle-metrics span { color:var(--muted); font-size:12px; }
.workspace-status { display:inline-flex; align-items:center; gap:6px; width:max-content; max-width:100%; padding:6px 9px; border-radius:999px; background:var(--tertiary-bg); color:var(--tertiary-fg) !important; font-weight:800; }
.workspace-status::before { width:8px; height:8px; flex:0 0 auto; border-radius:50%; background:currentcolor; content:""; }
.workspace-status.ready { color:var(--ok-fg) !important; background:var(--ok-bg); }
.workspace-status.warning { color:var(--warn-fg) !important; background:var(--warn-bg); }
.vehicle-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:10px 0; }
.vehicle-metrics article { display:grid; gap:5px; min-height:92px; align-content:center; padding:14px; border:1px solid var(--line); border-radius:6px; color:var(--text); background:var(--raised-2); }
.vehicle-metrics span,.vehicle-metrics small,.vehicle-average-grid span,.vehicle-document-card > span,.vehicle-document-card small { color:var(--muted); font-size:12px; }
.vehicle-metrics strong { font-size:21px; }
.vehicle-average-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.vehicle-average-grid article { display:grid; gap:7px; padding:14px; border-radius:6px; background:var(--raised-2); }
.vehicle-average-grid strong { font-size:18px; }
.vehicle-document-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.vehicle-document-card { display:grid; gap:6px; min-height:118px; align-content:start; padding:14px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.vehicle-document-card strong { overflow-wrap:anywhere; }
.vehicle-document-card a { align-self:end; color:var(--accent); font-size:12px; font-weight:800; }
.vehicle-document-card.missing { border-style:dashed; background:var(--raised-2); }
.vehicle-document-sections { display:grid; gap:14px; }
.vehicle-document-section { display:grid; gap:10px; padding:14px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.vehicle-document-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.vehicle-document-section-heading > div { display:grid; gap:2px; }
.vehicle-document-section-heading span { color:var(--muted); font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.vehicle-document-section-heading h4,.vehicle-document-archive h5 { margin:0; }
.vehicle-document-current,.vehicle-document-archive-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; padding:12px; border-radius:6px; }
.vehicle-document-current { border:1px solid var(--accent); background:var(--accent-soft); }
.vehicle-document-archive { display:grid; gap:7px; padding-top:2px; }
.vehicle-document-archive h5 { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.vehicle-document-archive-row { border:1px solid var(--line); background:var(--raised-2); color:var(--subtle); }
.vehicle-document-copy { display:grid; gap:3px; min-width:0; }
.vehicle-document-copy strong,.vehicle-document-copy span,.vehicle-document-copy small { overflow-wrap:anywhere; }
.vehicle-document-copy small { color:inherit; }
.vehicle-document-badge { justify-self:start; padding:2px 7px; border-radius:999px; background:var(--ok-bg); color:var(--ok-fg); font-size:12px; font-weight:900; text-transform:uppercase; }
.vehicle-document-badge.archived { background:var(--raised-3); color:var(--muted); }
.vehicle-document-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; }
.vehicle-document-actions a { text-decoration:none; }
.vehicle-document-empty,.vehicle-document-archive-empty { display:grid; gap:3px; padding:12px; border:1px dashed var(--line-strong); border-radius:6px; color:var(--muted); }
.vehicle-document-archive-empty { padding:9px 12px; background:var(--raised-2); font-size:12px; }
.vehicle-history-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.vehicle-history-grid > section { padding:14px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.vehicle-history-grid > section.wide { grid-column:1 / -1; }
.vehicle-history-grid h3 { margin:0 0 10px; }
.vehicle-workspace-grid { display:grid; grid-template-columns:1.25fr .75fr; gap:10px; }
.vehicle-workspace-grid > section { padding:15px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.vehicle-workspace-grid h3 { margin:0 0 11px; font-size:16px; }
.vehicle-workspace-grid .vehicle-expenses { grid-column:1 / -1; }
.vehicle-document-upload { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.vehicle-document-upload button,.vehicle-document-upload p { grid-column:1 / -1; }
.ocr-preview { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:12px; border-radius:6px; background:var(--accent-soft); border:1px solid var(--accent); }
.ocr-preview div { display:grid; gap:2px; }
.ocr-preview span { color:var(--muted); font-size:.78rem; }
.ocr-preview strong { overflow-wrap:anywhere; }
.vehicle-document-review { display:grid; gap:10px; margin-top:18px; padding:12px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.vehicle-document-review h3 { margin:2px 0 0; }
.vehicle-document-table { overflow-x:auto; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.vehicle-document-table-head,.vehicle-document-review-row { display:grid; grid-template-columns:70px 130px minmax(190px,1fr) minmax(150px,.8fr) minmax(170px,.9fr) 100px; gap:10px; align-items:center; min-width:900px; padding:8px 10px; }
.vehicle-document-table-head { color:var(--muted); background:var(--raised-3); font-size:12px; font-weight:800; text-transform:uppercase; }
.vehicle-document-review-row { min-height:44px; border-top:1px solid var(--line); background:var(--surface); font-size:12px; }
.vehicle-document-review-row > span,.vehicle-document-review-row > a { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vehicle-document-review-row div { display:grid; gap:4px; }
.vehicle-document-review-row small { color:var(--muted); overflow-wrap:anywhere; }
.vehicle-document-settings { display:grid; gap:12px; margin-top:22px; padding-top:20px; border-top:1px solid var(--line); }
.vehicle-document-settings-toolbar { display:flex; align-items:end; justify-content:space-between; gap:16px; }
.vehicle-document-settings-toolbar label { width:min(280px,100%); margin:0; }
.vehicle-document-settings .vehicle-document-review { margin-top:0; }
.vehicle-document-settings .vehicle-document-review-row { grid-template-columns:70px 130px minmax(190px,1fr) minmax(150px,.8fr) minmax(170px,.9fr) 100px; }
.vehicle-document-view { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; white-space:nowrap; }
.vehicle-fact-list { display:grid; gap:7px; }
.vehicle-fact-list article { display:grid; grid-template-columns:minmax(150px,1fr) auto; gap:4px 12px; padding:11px; border-radius:6px; background:var(--raised-2); }
.vehicle-fact-list small { grid-column:1 / -1; color:var(--muted); }
.inline-draft-panel { display:grid; gap:9px; padding:12px; border:1px dashed var(--line-strong); border-radius:6px; background:var(--raised-2); }
.inline-draft-panel > header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.inline-draft-grid { display:grid; grid-template-columns:minmax(160px,.7fr) auto minmax(220px,1.3fr); gap:9px; align-items:end; }
.inline-draft-grid .wide { grid-column:auto; }
.draft-only-badge { padding:4px 8px; border-radius:999px; color:var(--warn-fg); background:var(--warn-bg); font-size:12px; font-weight:800; }
.risk-data-unavailable { margin:10px 0 0; padding:10px 12px; border-radius:6px; color:var(--muted); background:var(--raised-3); font-size:12px; }
.uat-telemetry-panel { display:grid; gap:7px; margin-top:12px; padding:11px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); font-size:12px; }
.uat-telemetry-panel span { color:var(--muted); line-height:1.4; }
.uat-telemetry-panel button { justify-self:start; }
.guided-uat-details { margin-top:12px; padding:8px 10px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.guided-uat-details > summary { color:var(--muted); font-size:12px; font-weight:800; cursor:pointer; }
.guided-uat-details .uat-telemetry-panel { margin-top:8px; padding:0; border:0; background:transparent; }
.cargo-route-warning { grid-column:1 / -1; margin:0 0 8px; padding:8px 10px; border:1px solid var(--warn-fg); border-radius:6px; color:var(--warn-fg); background:var(--warn-bg); font-size:12px; font-weight:700; }
.transport-surface-switches { display:inline-flex; align-items:stretch; gap:0; max-width:100%; padding:3px; overflow:hidden; border:1px solid var(--line); border-radius:6px; background:var(--raised-3); }
.transport-surface-switches .transport-form-switch { min-height:34px; padding:6px 10px; border:0; border-radius:0; color:var(--muted); background:transparent; box-shadow:none; font-size:12px; font-weight:700; white-space:nowrap; }
.transport-surface-switches .transport-form-switch:first-child { border-radius:4px 0 0 4px; }
.transport-surface-switches .transport-form-switch:last-child { border-radius:0 4px 4px 0; }
.transport-surface-switches .transport-form-switch + .transport-form-switch { border-left:1px solid var(--line); }
.transport-surface-switches .transport-form-switch:hover { color:var(--text); background:var(--hover); }
.transport-surface-switches .transport-form-switch.active,
.transport-surface-switches .transport-form-switch[aria-pressed="true"] { color:var(--accent); background:var(--selected); font-weight:800; }
.transport-surface-switches .transport-form-switch.active:hover,
.transport-surface-switches .transport-form-switch[aria-pressed="true"]:hover { color:var(--accent); background:var(--selected); }
.route-card-surface-switches { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
#route-card-passport-toggle { position:relative; min-height:36px; margin-left:5px; border-color:var(--line-strong); color:var(--muted); background:var(--surface); }
#route-card-passport-toggle::before { position:absolute; top:50%; left:-7px; width:1px; height:24px; transform:translateY(-50%); background:var(--line-strong); content:""; }
#route-card-passport-toggle:hover { color:var(--text); background:var(--hover); }
#route-card-passport-toggle[aria-expanded="true"] { color:var(--accent); border-color:var(--accent); background:var(--accent-soft); }
.route-card-dialog { inset:0; width:calc(100vw - 16px); max-width:calc(100vw - 16px); height:calc(100vh - 16px); max-height:calc(100vh - 16px); margin:auto; padding:0; border:1px solid var(--line); border-radius:6px; color:var(--text); background:var(--surface); box-shadow:var(--shadow-floating); }
.route-card-dialog::backdrop { background:var(--overlay); }
.route-card-dialog form { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; height:calc(100vh - 24px); max-height:calc(100vh - 24px); padding:0; overflow:hidden; }
.route-card-head { grid-row:1; display:grid; grid-template-columns:minmax(250px,1fr) auto; gap:14px; align-items:center; padding:12px 16px; border-bottom:1px solid var(--line); background:var(--raised-2); }
#route-card-legacy-mode-warning { grid-row:2; }
.route-card-head h2,.route-card-head p { margin:0; }
.route-card-layout { position:relative; grid-row:3; min-height:0; overflow:hidden; background:var(--raised-3); }
.route-card-main { display:grid; gap:0; overflow:auto; overscroll-behavior:contain; padding:8px; background:var(--canvas); }
.route-card-main > section,.route-card-passport > section,.route-card-disclosure { padding:10px 12px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; }
.route-card-passport { position:absolute; z-index:8; inset:0 0 0 auto; display:grid; width:min(284px,100%); grid-template-columns:minmax(0,1fr); grid-auto-rows:max-content; align-content:start; gap:8px; overflow:auto; overflow-x:hidden; padding:0 10px 10px; border-left:1px solid var(--line); background:var(--inspector); box-shadow:var(--shadow-floating); visibility:hidden; transform:translateX(100%); transition:transform .18s ease,visibility .18s; }
.route-card-passport.open { visibility:visible; transform:translateX(0); }
.route-card-passport-head { position:sticky; z-index:3; top:0; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0 9px; border-bottom:1px solid var(--line); background:var(--inspector); }
.route-card-passport-head h3 { margin:0; }
.route-card-passport > section { min-width:0; overflow-wrap:anywhere; }
.route-card-main input,.route-card-main select,.route-card-main textarea { border:1px solid var(--line); border-radius:5px; background:var(--control-bg); box-shadow:none; }
.route-card-main input:hover,.route-card-main select:hover,.route-card-main textarea:hover { border-color:var(--line-strong); }
.route-card-main input:focus-visible,.route-card-main select:focus-visible,.route-card-main textarea:focus-visible { outline:2px solid var(--focus); outline-offset:1px; border-color:var(--focus); box-shadow:none; }
.route-card-passport .route-card-party-grid,.route-card-passport .route-card-commercial-grid,.route-card-passport .route-card-resource-row { grid-template-columns:1fr; }.route-card-passport .route-card-party-grid .wide { grid-column:auto; }
.route-card-passport .route-card-section-title { display:grid; grid-template-columns:minmax(0,1fr); gap:4px; }
.route-card-passport .route-card-section-title .tm-risk-neutral { white-space:normal; overflow-wrap:break-word; word-break:normal; }
.route-card-passport .transportation-mode-switch { display:flex; flex-wrap:wrap; width:100%; max-width:100%; }
.route-card-passport .transportation-mode-switch button { flex:1 1 100px; min-width:0; padding-inline:7px; white-space:normal; }
.route-card-section-title { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:10px; }
.route-card-section-title > div { display:grid; gap:2px; }.route-card-section-title small { color:var(--muted); }
.route-card-party-grid,.route-card-commercial-grid { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:8px; align-items:end; }
.route-card-party-grid .wide { grid-column:span 2; }
.tm-party-fields > .entity-picker,.route-card-party-grid > .entity-picker,.form-grid > .entity-picker { padding:10px 11px 9px 13px; }
.tm-party-fields > .entity-picker input,.tm-party-fields > .entity-picker select,.route-card-party-grid > .entity-picker input,.route-card-party-grid > .entity-picker select { min-height:44px; padding:9px 11px; border:1px solid var(--line-strong); border-radius:5px; background:var(--control-bg); }
.tm-other-section { display:none; }
.tm-section-tabs a[href="#tm-section-other"] { display:none; }
.route-card-timeline { display:grid; gap:0; margin:0; padding:0; list-style:none; }
.route-card-stop { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:9px; min-width:720px; }
.route-card-stop-card { min-width:0; margin:0; padding:0; border:0; }.route-card-stop-card legend { padding:0 0 5px; color:var(--muted); font-size:12px; font-weight:800; }
.route-card-stop-marker { display:grid; grid-template-rows:30px minmax(18px,1fr); justify-items:center; }
.route-card-stop-marker b { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; color:var(--on-accent); background:var(--warn-fg); }
.route-card-stop.delivery .route-card-stop-marker b { background:var(--ok-fg); }
.route-card-stop-marker span { width:2px; background:var(--line-strong); }.route-card-stop:last-child .route-card-stop-marker span { background:transparent; }
.route-card-segment { display:grid; grid-template-columns:145px minmax(0,1fr) auto; gap:9px; align-items:center; min-width:720px; margin:0 0 8px 34px; padding:7px 10px; border:0; border-left:2px solid var(--line-strong); border-radius:0; background:transparent; }.route-card-segment span { color:var(--muted); font-size:12px; font-weight:800; }.route-card-segment b { overflow-wrap:anywhere; }
.route-card-stop-fields { display:grid; grid-template-columns:120px minmax(180px,1fr) 155px 145px 70px; gap:7px; padding:0 0 12px; }
.route-card-stop-fields .wide { grid-column:auto; }
.route-card-expand-stop { display:none; }
.route-card-row-menu { position:relative; align-self:start; }
.route-card-row-menu summary { min-height:36px; padding:7px 9px; border:1px solid var(--line); border-radius:6px; color:var(--muted); background:var(--surface); cursor:pointer; font-size:12px; font-weight:800; list-style:none; }
.route-card-row-menu summary::-webkit-details-marker { display:none; }
.route-card-row-menu[open] > div { position:absolute; z-index:5; top:calc(100% + 4px); right:0; display:grid; min-width:150px; padding:6px; border:1px solid var(--line); border-radius:6px; background:var(--surface); box-shadow:var(--shadow-floating); }
.route-card-row-menu button { width:100%; justify-content:flex-start; min-height:36px; border:0; border-radius:6px; color:var(--text); background:var(--surface); text-align:left; }
.route-card-row-menu button:hover,.route-card-row-menu button:focus-visible { background:var(--accent-soft); }
.route-card-row-menu button:disabled { cursor:not-allowed; opacity:.42; }
.route-card-cargo-list { display:grid; gap:0; }
.route-card-cargo { display:grid; gap:8px; padding:10px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; }
.route-card-cargo:last-child { border-bottom:0; }
.route-card-cargo > header { display:flex; justify-content:space-between; gap:10px; }
.route-card-cargo output.balanced { color:var(--ok-fg); }.route-card-cargo output.unbalanced { color:var(--danger); font-weight:800; }
.route-card-cargo-fields { display:grid; grid-template-columns:minmax(220px,1.5fr) repeat(5,minmax(110px,.7fr)); gap:7px; }.route-card-cargo-fields .wide { grid-column:auto; }
.route-card-cargo-fields.simple { grid-template-columns:minmax(240px,1.6fr) repeat(4,minmax(130px,.8fr)); }
.route-card-movements { display:flex; flex-wrap:wrap; gap:7px; align-items:end; }.route-card-movements > div { display:flex; gap:7px; align-items:end; }
.route-card-disclosure summary { cursor:pointer; font-weight:800; }.route-card-disclosure[open] summary { margin-bottom:10px; }
.route-card-resource-row { display:grid; grid-template-columns:repeat(4,minmax(160px,1fr)); gap:8px; align-items:end; }
.route-card-passport > .route-card-passport-overview { display:grid; min-width:0; grid-template-columns:minmax(0,1fr); align-content:start; gap:8px; overflow:hidden; padding:8px; }
.route-card-passport #route-card-validation-panel { order:-1; min-width:0; }
.route-card-passport #route-card-summary-facts { display:grid; min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; overflow:hidden; }
.route-card-passport #route-card-summary-facts > div { display:grid; min-width:0; gap:2px; padding:6px 8px; border-radius:6px; background:var(--raised-3); }
.route-card-passport #route-card-summary-facts > div:last-child:nth-child(odd) { grid-column:1 / -1; }
.route-card-passport #route-card-summary-facts span { color:var(--muted); font-size:12px; }
.route-card-passport #route-card-summary-facts b { min-width:0; line-height:1.3; overflow-wrap:break-word; word-break:normal; }
.route-card-validation-panel { position:relative; }
.route-card-validation-panel > summary { padding:9px 11px; border:1px solid var(--line); border-radius:6px; color:var(--muted); background:var(--surface); cursor:pointer; font-size:12px; font-weight:800; list-style:none; }
.route-card-validation-panel > summary::-webkit-details-marker { display:none; }
.route-card-validation-panel[open] .route-card-validation { display:block; }
.route-card-validation { display:none; padding:10px 0 2px; color:var(--text); }.route-card-validation ul { display:grid; gap:5px; margin:6px 0 0; padding:0; list-style:none; }.route-card-validation button { width:100%; min-height:36px; padding:6px 8px; border:0; border-radius:6px; color:var(--warn-fg); background:var(--warn-bg); text-align:left; }.validation-ok { margin:0; color:var(--ok-fg); font-weight:800; }
.route-card-passport .route-card-validation { max-height:none; overflow:visible; overflow-wrap:break-word; word-break:normal; }
.route-card-passport .route-card-validation button { white-space:normal; overflow-wrap:break-word; word-break:normal; line-height:1.3; }
.preview-only-truth { margin:6px 0; color:var(--muted); font-size:12px; line-height:1.35; }
.route-card-footer { grid-row:4; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; background:var(--footer); border-top:1px solid var(--line); }.route-card-footer > .error { margin:0 12px; }

:root {
  --exp-cat-road:#D85A30; --exp-cat-fuel:#EF9F27; --exp-cat-parking:#378ADD;
  --exp-cat-wash:#1D9E75; --exp-cat-tire:#7F77DD; --exp-cat-fine:#A96D11; --exp-cat-other:#888780;
  --exp-src-ppr-bg:#FAEEDA; --exp-src-ppr-fg:#633806;
  --exp-src-dornet-bg:#F1EFE8; --exp-src-dornet-fg:#444441;
  --exp-src-avtodor-bg:#EAF3DE; --exp-src-avtodor-fg:#27500A;
  --exp-src-platon-bg:#E6F1FB; --exp-src-platon-fg:#0C447C;
}
.road-expense-controls { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 10px; padding:8px 12px; background:var(--surface); }
.road-expense-filter-line { display:flex; align-items:center; gap:18px; min-width:0; }
.road-expense-period,.road-expense-grouping { display:flex; align-items:center; gap:8px; width:auto; margin:0; color:var(--muted); font-size:12px; font-weight:500; white-space:nowrap; }
.road-expense-period select { width:220px; min-height:32px; margin:0; padding:5px 8px; }
.road-expense-grouping input { width:16px; height:16px; margin:0; accent-color:var(--accent); }
.road-expense-overall { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums; }
.road-expense-overall strong { color:var(--text); font-size:13px; font-weight:500; }
.road-expense-groups { align-content:start; grid-auto-rows:min-content; gap:8px; }
.road-expense-groups.is-grouped { gap:14px; }
.road-expense-fleet-section { display:grid; gap:6px; min-width:0; }
.road-expense-fleet-header { display:flex; align-items:center; justify-content:space-between; min-height:32px; padding:6px 12px; border-bottom:1px solid var(--line-strong); color:var(--muted); background:var(--raised-2); font-size:12px; font-variant-numeric:tabular-nums; }
.road-expense-fleet-header div { display:flex; align-items:baseline; gap:8px; min-width:0; }
.road-expense-fleet-header strong { overflow:hidden; color:var(--text); font-size:13px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.road-expense-fleet-header b { color:var(--text); font-size:13px; font-weight:600; white-space:nowrap; }
.road-expense-fleet-items { display:grid; gap:6px; min-width:0; }
.vehicle-expense-group { border-radius:4px; }
.vehicle-expense-group.is-open { border-color:var(--accent); box-shadow:inset 2px 0 0 var(--accent); }
.vehicle-expense-summary { display:grid; grid-template-columns:18px 132px minmax(110px,160px) 128px minmax(120px,170px) minmax(430px,1fr) 128px; align-items:center; gap:10px; width:100%; min-width:1160px; min-height:32px; padding:6px 12px; border:0; border-radius:0; color:var(--text); font:inherit; background:var(--surface); }
.vehicle-expense-summary:hover,.vehicle-expense-summary:focus-visible { background:var(--hover); }
.vehicle-expense-group.is-open > .vehicle-expense-summary { border-bottom:1px solid var(--line-strong); background:var(--accent-soft); }
.vehicle-expense-group.is-open > .vehicle-expense-summary:hover,.vehicle-expense-group.is-open > .vehicle-expense-summary:focus-visible { background:var(--selected); }
.vehicle-expense-group.is-open > .expense-group-content { background:var(--surface); }
.vehicle-expense-plate { width:auto; max-width:180px; min-width:0; padding:0 6px; overflow:hidden; border:1px solid var(--line-strong); border-radius:4px; font-size:12.5px; font-weight:500; letter-spacing:.4px; text-overflow:ellipsis; white-space:nowrap; }
.vehicle-expense-model,.vehicle-expense-trailer,.vehicle-expense-driver { min-width:0; overflow:hidden; color:var(--muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.vehicle-expense-chevron { width:14px; color:var(--muted); font-size:15px; }
.vehicle-expense-total { display:flex; align-items:center; justify-content:flex-end; gap:5px; font-variant-numeric:tabular-nums; }
.vehicle-expense-total strong { font-size:13px; font-weight:500; white-space:nowrap; }
.cat-ROAD_TOLL { --expense-category-color:var(--exp-cat-road); color:var(--exp-cat-road); }.cat-FUEL { --expense-category-color:var(--exp-cat-fuel); color:var(--exp-cat-fuel); }
.cat-PARKING { --expense-category-color:var(--exp-cat-parking); color:var(--exp-cat-parking); }.cat-WASH { --expense-category-color:var(--exp-cat-wash); color:var(--exp-cat-wash); }
.cat-TIRE { --expense-category-color:var(--exp-cat-tire); color:var(--exp-cat-tire); }.cat-FINE { --expense-category-color:var(--exp-cat-fine); color:var(--exp-cat-fine); }.cat-OTHER { --expense-category-color:var(--exp-cat-other); color:var(--exp-cat-other); }
.expense-category-amounts { display:grid; grid-template-columns:repeat(7,minmax(58px,1fr)); align-items:center; gap:14px; min-width:0; width:100%; }
.expense-category-amount { display:grid; grid-template-columns:minmax(0,1fr) 15px; align-items:center; gap:5px; min-width:0; }
.expense-category-amount .ti { color:var(--expense-category-color)!important; font-size:14px; }
.expense-category-amount strong { min-width:0; overflow:hidden; color:var(--text); font-size:11.5px; font-weight:500; font-variant-numeric:tabular-nums; text-align:right; text-overflow:ellipsis; white-space:nowrap; }
.expense-category-amount.is-empty { opacity:.32; }
.expense-operation-category .ti { color:var(--expense-category-color); }
.road-expense-table-head,.road-expense-table-row { grid-template-columns:88px 130px minmax(220px,1.1fr) minmax(180px,.9fr) 52px 110px; min-width:860px; gap:0; padding:0; }
.road-expense-table-head { position:static; border-top:.5px solid var(--line); background:transparent; color:var(--subtle); font-size:11px; font-weight:500; letter-spacing:.04em; text-transform:uppercase; }
.road-expense-table-head > span,.road-expense-table-row > * { min-width:0; padding:7px 10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.road-expense-table-row { min-height:31px; border-top:.5px solid var(--line); font-size:12.5px; }
.road-expense-table-row time { display:flex; gap:4px; color:var(--text); }
.road-expense-table-row time small { color:var(--muted); font-size:inherit; }
.road-expense-table-row b { color:var(--text); font-weight:500; font-variant-numeric:tabular-nums; }
.road-expense-table-row b.is-refund { color:#1D9E75; }
.expense-operation > summary { list-style:none; cursor:pointer; }.expense-operation > summary::-webkit-details-marker { display:none; }
.expense-operation-category { display:flex; align-items:center; gap:5px; color:var(--text)!important; }
.expense-operation-category i { color:currentColor; font-style:normal; }
.expense-operation-category em { padding:1px 5px; border:1px solid var(--line); border-radius:99px; color:var(--muted); font-style:normal; font-size:11px; }
.expense-source { display:inline-flex; align-self:center; justify-self:start; width:auto; margin:4px 6px; padding:2px 6px!important; border-radius:6px; font-size:11px; font-weight:500; }
.source-ppr { color:var(--exp-src-ppr-fg)!important; background:var(--exp-src-ppr-bg); }
.source-dornet { color:var(--exp-src-dornet-fg)!important; background:var(--exp-src-dornet-bg); }
.source-avtodor { color:var(--exp-src-avtodor-fg)!important; background:var(--exp-src-avtodor-bg); }
.source-platon { color:var(--exp-src-platon-fg)!important; background:var(--exp-src-platon-bg); }
.expense-operation-details { display:grid; grid-template-columns:128px minmax(0,1fr); gap:3px 14px; margin:0; padding:9px 10px 11px 24px; background:var(--hover); font-size:12px; }
.expense-operation-details div { display:contents; }.expense-operation-details dt { color:var(--muted); }.expense-operation-details dd { margin:0; color:var(--text); }
.route-card-actions { min-height:44px; padding:4px 12px; border-top:0; background:var(--footer); }
@media (max-width:1200px) {
  .counterparty-controls { grid-template-columns:1fr 1fr; }
  .counterparty-controls input { grid-column:1 / -1; }
  .route-card-main { overflow:auto; }
  .route-card-party-grid,.route-card-commercial-grid { grid-template-columns:repeat(2,minmax(150px,1fr)); }
  .route-card-resource-row { grid-template-columns:repeat(2,minmax(160px,1fr)); }
  .route-card-cargo-section,.route-card-route-section { overflow-x:auto; }
}
@media (max-width:1320px) and (min-width:901px) {
  .monitoring-grid { grid-template-columns:minmax(570px,1fr) minmax(260px,280px); }
  .fleet-registry-head,.fleet-row { grid-template-columns:72px minmax(104px,1.15fr) minmax(82px,.9fr) minmax(74px,.75fr) minmax(120px,1.3fr) 76px; gap:6px; }
  .fleet-registry-head,.fleet-row { padding-inline:8px; }
}
@media (max-width:900px) {
  .layout { grid-template-columns:1fr; }
  .sidebar { position:static; z-index:auto; top:auto; display:flex; min-height:0; flex-direction:row; align-items:center; gap:10px; padding:8px 12px; overflow-x:auto; overflow-y:hidden; border-right:0; border-bottom:1px solid var(--line); box-shadow:none; }
  .sidebar-group,.sidebar-creation-group { display:flex; flex:0 0 auto; align-items:center; gap:4px; margin:0; }
  .sidebar-footer { flex:0 0 auto; margin:0; padding:0; border-top:0; }
  .sidebar-creation-group { padding-left:0; border-left:0; }
  .sidebar-section-title,.sidebar-subsection-title { max-width:105px; margin:0 3px; white-space:normal; }
  .sidebar .nav { flex:0 0 auto; width:auto; margin:0; padding:8px 10px; white-space:nowrap; }
  .metrics,.admin-grid,.registry-summary,.road-expense-metrics { grid-template-columns:repeat(2,1fr); }
  .content { grid-template-columns:1fr; }
  .topbar { align-items:flex-start; flex-direction:column; }
  .topbar-actions { width:100%; flex-wrap:wrap; }
  .workspace { padding:16px; }
  .road-expense-controls { align-items:stretch; flex-direction:column; }
  .road-expense-filter-line { flex-wrap:wrap; }
  .road-expense-overall { justify-content:flex-end; }
  .registry-row,.vehicle-expense-row,.mapping-row { grid-template-columns:1fr; }
  .registry-row small,.vehicle-expense-row b { text-align:left; }
  .vehicle-expense-summary { grid-template-columns:18px minmax(120px,1fr) max-content; grid-template-areas:"chevron plate total" ". model model" ". trailer trailer" ". driver driver" ". categories categories"; align-items:center; min-width:0; gap:4px 8px; }
  .vehicle-expense-chevron { grid-area:chevron; }
  .vehicle-expense-plate { grid-area:plate; }
  .vehicle-expense-model { grid-area:model; }
  .vehicle-expense-trailer { grid-area:trailer; }
  .vehicle-expense-driver { grid-area:driver; }
  .vehicle-expense-summary > .expense-category-amounts { grid-area:categories; grid-template-columns:repeat(7,minmax(68px,1fr)); overflow-x:auto; }
  .vehicle-expense-total { grid-area:total; align-self:start; text-align:right; }
  .vehicle-registry-controls,.mapping-filters { grid-template-columns:1fr 1fr; }
  .vehicle-registry-controls input,.mapping-filters input { grid-column:1 / -1; }
  .vehicle-registry-row { grid-template-columns:1fr; }
  .vehicle-registry-unit--empty { display:none; }
  .vehicle-registry-documents { max-width:420px; }
  .vehicle-overview-layout,.vehicle-average-grid,.vehicle-document-cards,.vehicle-workspace-grid { grid-template-columns:1fr; }
  .vehicle-summary-grid,.vehicle-current-strip,.vehicle-metrics { grid-template-columns:repeat(2,1fr); }
  .vehicle-workspace-grid .vehicle-expenses { grid-column:auto; }
  .settings-overview-list { grid-template-columns:1fr; }
  .fleet-setting-row summary { grid-template-columns:minmax(180px,1fr) auto auto; }
  .fleet-setting-row summary .fleet-setting-fact { display:none; }
  .fleet-setting-row summary::after { grid-column:4; }
  .fleet-setting-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .toll-preview-row,.toll-preview-mapping { grid-template-columns:1fr; }
  .toll-preview-mapping button { justify-self:start; }
  .toll-preview-analytics { grid-template-columns:auto 1fr; padding:9px 0 0; border-left:0; border-top:1px solid var(--line); }
  .toll-import-history article { grid-template-columns:1fr 1fr; }
  .monitoring-grid { grid-template-columns:1fr; }
  .map-host { min-height:360px; }
  .request-composer,.forwarding-sheet-main { grid-template-columns:1fr; }
  .request-composer-steps { grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); overflow-x:auto; }
  .request-route-layout,.request-review-grid,.own-fleet-organization-strip { grid-template-columns:1fr; }
  .request-route-map-panel { position:static; }
  .fleet-registry-panel { overflow-x:auto; }
  .fleet-registry-head,.fleet-row { min-width:720px; }
  .request-composer-dialog .quiet-request-passport,.forwarding-sheet-main > .quiet-request-passport { display:none; }
}
@media (max-width:1180px) and (min-width:901px) {
  .vehicle-registry-row { grid-template-columns:repeat(2,minmax(250px,1fr)); }
  .vehicle-registry-documents { grid-column:1 / -1; max-width:420px; }
  .request-composer { grid-template-columns:minmax(0,1fr) 284px; }
  .forwarding-sheet-main { grid-template-columns:minmax(0,1fr) 284px; }
  .quiet-request-main { grid-template-columns:1fr; }
  .tm-workspace.tm-has-carrier .quiet-request-main #tm-section-request,
  .tm-workspace.tm-has-carrier .quiet-request-main #quick-carrier-section,
  .quiet-request-main #tm-section-route,
  .quiet-request-main #tm-section-transport,
  .quiet-request-main #tm-section-cargo,
  .quiet-request-main #tm-section-commercial,
  .quiet-request-main #tm-section-other { grid-column:1; grid-row:auto; }
}
@media (max-width:1100px) {
  .tm-workbar { grid-template-columns:auto 1fr auto; }
  .tm-workbar-facts { grid-column:2; }
  .tm-mode-switch { grid-column:1 / 3; grid-row:2; }
  .tm-workbar-actions { grid-column:3; grid-row:1 / 3; }
  .tm-workspace { grid-template-columns:1fr; }
  .tm-workspace.tm-has-carrier #tm-section-request,
  .tm-workspace.tm-has-carrier #quick-carrier-section,
  .tm-workspace #tm-section-route,
  .tm-workspace #tm-section-transport,
  .tm-workspace #tm-section-cargo,
  .tm-workspace #tm-section-commercial,
  .tm-workspace #tm-section-other { grid-column:1; grid-row:auto; }
  .tm-party-grid { grid-template-columns:1fr; }
  .tm-request-strip { grid-template-columns:repeat(2,minmax(150px,1fr)); }
  .tm-commercial-grid { grid-template-columns:repeat(3,minmax(140px,1fr)); }
  .tm-vehicle-row { grid-template-columns:repeat(2,minmax(170px,1fr)); }
  .forwarding-sheet-dialog { max-width:calc(100vw - 18px); overflow:hidden; }
  .tm-action-bar { flex-wrap:wrap; }
  .tm-action-bar .dialog-actions-spacer { display:none; }
  .tm-action-bar button { flex:1 1 190px; min-width:0; }
  .fleet-setting-row { grid-template-columns:1fr 1fr; }
  .fleet-setting-row > div,.fleet-setting-row .toggle-field { grid-column:1 / -1; }
  .fleet-setting-row button { justify-self:start; }
}
@media (max-width:620px) {
  .topbar { min-height:45px; display:grid; grid-template-columns:minmax(88px,1fr) auto; align-items:center; gap:6px; padding:4px 8px; }
  .topbar > div:first-child { min-width:88px; }
  .topbar .eyebrow,.topbar .profile-chip { display:none; }
  .topbar h1 { overflow:visible; font-size:16px; text-overflow:clip; white-space:nowrap; }
  .topbar-actions { width:auto; min-width:0; flex-wrap:nowrap; gap:4px; overflow:visible; }
  .topbar #connection { display:none; }
  .topbar button { min-height:36px; padding-inline:8px; font-size:12px; }
  .layout { min-height:calc(100vh - 45px); }
  .sidebar { max-height:50px; min-height:50px; gap:4px; padding:6px 8px; overflow-x:auto; overflow-y:hidden; }
  .sidebar-group,.sidebar-footer,.sidebar-user { display:contents; }
  .sidebar-section-title,.sidebar-subsection-title,.sidebar-user .profile-chip { display:none; }
  .sidebar .nav,.sidebar-user .ghost { flex:0 0 auto; width:auto; min-height:36px; margin:0; padding:0 9px; white-space:nowrap; }
  .sidebar .nav { grid-template-columns:20px auto; }
  .sidebar-user .ghost { border-radius:6px; }
  .route-card-dialog { width:100%; height:100%; max-height:100%; border-radius:0; }
  .route-card-dialog form { height:100vh; max-height:100vh; }
  .route-card-head { grid-template-columns:1fr; padding:10px; }
  .route-card-surface-switches { grid-column:1; }
  .route-card-passport { width:100%; }
  .route-card-party-grid,.route-card-commercial-grid,.route-card-resource-row { grid-template-columns:1fr; }
  .route-card-party-grid .wide { grid-column:auto; }
  .route-card-main { padding:7px; }
  .route-card-route-section,.route-card-cargo-section { overflow-x:visible; }
  .route-card-stop,.route-card-segment { min-width:0; }
  .route-card-stop { grid-template-columns:28px minmax(0,1fr); }
  .route-card-stop .route-card-row-menu { grid-column:2; justify-self:start; }
  .route-card-expand-stop { display:inline-flex; }
  .route-card-stop:not(.active) .route-card-stop-fields { display:none; }
  .route-card-stop-fields,.route-card-cargo-fields { grid-template-columns:1fr; }
  .route-card-segment { grid-template-columns:1fr; margin-left:28px; }
  .route-card-footer > .error { max-height:42px; overflow:auto; font-size:12px; }
  .route-card-actions { flex-wrap:wrap; gap:6px; overflow:visible; padding:6px 8px; }
  .route-card-actions button { flex:1 1 135px; min-width:0; min-height:44px; }
  .route-card-actions .dialog-actions-spacer { display:none; }
  .tm-execution-choice,.route-card-execution-choice { align-items:flex-start; flex-direction:column; }
  .tm-execution-choice .tm-mode-switch,.route-card-execution-choice .transportation-mode-switch { display:flex; grid-column:auto; grid-row:auto; flex-wrap:wrap; width:100%; }
  .tm-execution-choice .tm-mode-switch button,.route-card-execution-choice .transportation-mode-switch button { flex:1 1 110px; min-width:0; white-space:normal; }
  .forwarding-sheet-dialog {
    inset:0;
    width:100vw;
    max-width:100vw;
    height:100%;
    max-height:100%;
    margin:0;
    overflow:hidden;
    border-radius:0;
  }
  .forwarding-sheet-dialog form,
  .forwarding-sheet-main,
  .quiet-request-main,
  .tm-workspace,
  .tm-section,
  .tm-workbar,
  .tm-section-tabs,
  .tm-finance-strip,
  .tm-action-bar {
    width:100%;
    max-width:100%;
    min-width:0;
  }
  .forwarding-sheet-dialog form { height:100vh; max-height:100vh; overflow:hidden; }
  .forwarding-sheet-main,.quiet-request-main,.tm-workspace,.tm-section { overflow-x:hidden; }
  .quiet-request-main { overflow-y:auto; }
  .tm-workbar { grid-template-columns:minmax(0,1fr); gap:7px; padding:9px; overflow-x:hidden; }
  .tm-workbar-title { grid-column:1; grid-row:1; min-width:0; }
  .tm-workbar-actions {
    grid-column:1;
    grid-row:2;
    display:grid;
    width:100%;
    min-width:0;
    grid-template-columns:minmax(0,1fr) 44px;
  }
  .transport-surface-switches { display:grid; width:100%; max-width:100%; min-width:0; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .transport-surface-switches .transport-form-switch { width:100%; max-width:none; min-width:0; padding-inline:6px; white-space:normal; }
  .dialog-head-actions,.route-card-surface-switches { width:100%; min-width:0; }
  .request-composer-dialog .dialog-head { align-items:stretch; flex-direction:column; gap:8px; }
  .request-composer-dialog .dialog-head-actions { display:grid; grid-template-columns:minmax(0,1fr) 38px; }
  .dialog-head-actions .transport-surface-switches {
    grid-column:1 / -1;
    flex:1 1 auto;
  }
  .request-composer-dialog .compact-passport-toggle {
    grid-column:1;
    width:100%;
    min-width:0;
  }
  .request-composer-dialog .dialog-head-actions > .icon-button {
    grid-column:2;
  }
  .tm-workbar-actions {
    display:grid;
    width:100%;
    min-width:0;
    grid-template-columns:minmax(0,1fr) 38px;
  }
  .tm-workbar-actions .transport-surface-switches {
    grid-column:1 / -1;
  }
  .tm-workbar-actions .compact-passport-toggle {
    grid-column:1;
    width:100%;
    min-width:0;
  }
  .tm-workbar-actions > .icon-button {
    grid-column:2;
  }
  .route-card-surface-switches .transport-surface-switches { flex:1 0 100%; }
  #route-card-passport-toggle { margin-left:0; }
  #route-card-passport-toggle::before { display:none; }
  .tm-workbar-facts { grid-column:1; grid-row:3; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tm-mode-switch {
    grid-column:1;
    grid-row:4;
    display:grid;
    width:100%;
    max-width:100%;
    min-width:0;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
    overflow:hidden;
  }
  .tm-mode-switch button { width:100%; min-width:0; white-space:normal; }
  .tm-section-tabs { flex-wrap:wrap; gap:4px; overflow-x:hidden; }
  .tm-section-tabs a { min-width:0; padding:7px 11px; }
  .forwarding-sheet-main { padding:5px; }
  .forwarding-table-scroll {
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:visible;
  }
  .tm-route-grid,.tm-cargo-grid { min-width:0; }
  .tm-grid-head { display:none; }
  .forwarding-edit-row,
  .tm-route-row,
  .tm-cargo-row,
  .tm-cargo-head.simple + .tm-cargo-row,
  .simple-forwarding-cargo .tm-cargo-row {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px 10px;
    min-width:0;
    margin:0 0 8px;
    padding:10px;
    border:1px solid var(--line);
    border-radius:6px;
    background:var(--surface);
  }
  .forwarding-edit-row > b { grid-column:1 / -1; justify-self:start; color:var(--text); font-size:13px; text-align:left; }
  .forwarding-edit-row label { display:grid; gap:4px; min-width:0; }
  .forwarding-edit-row label .visually-hidden {
    position:static !important;
    width:auto !important;
    height:auto !important;
    margin:0 !important;
    overflow:visible !important;
    clip:auto !important;
    white-space:normal !important;
    color:var(--muted);
    font-size:12px;
    font-weight:700;
  }
  .tm-route-row .address-field,
  .tm-cargo-row > label:first-of-type,
  .tm-cargo-row .request-cargo-movements,
  .tm-cargo-row .tm-cargo-balance,
  .tm-cargo-row .cargo-route-warning { grid-column:1 / -1; }
  .forwarding-edit-row .row-actions { grid-column:1 / -1; justify-content:flex-start; }
  .tm-party-fields,.tm-request-strip,.tm-commercial-grid,.tm-vehicle-row,.schedule-grid { grid-template-columns:1fr; }
  .tm-request-strip #quick-executing-org-field,.tm-commercial-grid .wide { grid-column:auto; }
  .inline-draft-grid { grid-template-columns:1fr; }
  .inline-draft-grid .wide { grid-column:auto; }
  .tm-finance-strip { grid-template-columns:repeat(2,minmax(0,1fr)); overflow-x:hidden; }
  .tm-finance-strip > * { min-width:0; }
  .tm-action-bar { flex-wrap:wrap; overflow-x:hidden; }
  .tm-action-bar .dialog-actions-spacer { display:none; }
  .tm-action-bar button { flex:1 1 135px; min-width:0; }
  .payment-matrix-head,.payment-matrix label { grid-template-columns:minmax(100px,1fr) 85px 105px; padding-inline:9px; }
  .contract-file-boundary { align-items:flex-start; flex-direction:column; }
  .monitoring-controls { grid-template-columns:1fr; }
  .watched-card summary,.watched-facts { grid-template-columns:1fr; }
  .admin-grid,.form-grid,.registry-summary,.road-expense-metrics,.road-expense-filters,.counterparty-controls,.counterparty-activity-grid,.counterparty-metrics { grid-template-columns:1fr; }
  .counterparty-controls input,.form-grid .wide { grid-column:auto; }
  .heading-row,.heading-actions { align-items:stretch; flex-direction:column; }
  .request-dialog form { padding:18px; }
  .counterparty-detail-dialog { width:100vw; border-left:0; border-radius:0; }
  .counterparty-drawer-header,.counterparty-detail { padding-inline:14px; }
  .vehicle-workspace-shell { padding:16px; }
  .vehicle-summary-grid,.vehicle-current-strip,.vehicle-metrics,.vehicle-history-grid,.vehicle-document-upload,.vehicle-document-review-row,.vehicle-document-settings .vehicle-document-review-row,.vehicle-document-current,.vehicle-document-archive-row { grid-template-columns:1fr; }
  .vehicle-document-actions { justify-content:flex-start; }
  .vehicle-history-grid > section.wide { grid-column:auto; }
  .vehicle-period-controls > button,.vehicle-period-controls label { width:100%; }
  .vehicle-workspace-content { max-height:calc(100vh - 330px); }
  .vehicle-document-settings-toolbar { align-items:stretch; flex-direction:column; }
  .fleet-setting-row,.inline-settings-form { grid-template-columns:1fr; }
  .fleet-setting-row > div,.fleet-setting-row .toggle-field { grid-column:auto; }
  .fleet-setting-row summary { grid-template-columns:1fr auto; }
  .fleet-setting-row summary .service-state { grid-column:1; justify-self:start; }
  .fleet-setting-row summary::after { grid-column:2; grid-row:1 / span 2; }
  .fleet-setting-form { grid-template-columns:1fr; }
  .request-facts,.fulfillment-summary,.execution-choice { grid-template-columns:1fr; }
  .execution-choice button { width:100%; }
  .request-facts div:nth-child(3) { grid-column:auto; }
  .request-actions button { width:100%; }
  .request-composer-dialog { inset:0; width:100vw; max-width:100vw; height:100%; max-height:100%; margin:0; border-radius:0; }
  .request-composer-dialog form { height:100vh; max-height:100vh; padding:0; }
  .request-composer { height:auto; min-height:0; margin-top:10px; }
  .request-composer-steps { grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; padding:6px 8px; overflow:visible; border-right:0; border-bottom:1px solid var(--line); }
  .request-composer-steps button { grid-template-columns:24px minmax(0,1fr); gap:5px; min-height:48px; padding:6px; }
  .request-composer-steps button b { width:24px; height:24px; }
  .request-composer-steps button span { min-width:0; font-size:12px; }
  .request-composer-steps button small { overflow-wrap:anywhere; font-size:12px; }
  .request-composer-body { padding:12px 12px 24px; }
  .request-composer-dialog .compact-request-passport.compact-passport-open,
  .forwarding-sheet-dialog .compact-request-passport.compact-passport-open {
    position:fixed;
    z-index:12;
    inset:0;
    display:block;
    width:100vw;
    height:100dvh;
    max-height:100dvh;
    padding:12px 14px 24px;
    overflow:auto;
    border:0;
    background:var(--inspector);
  }
  .request-route-card-grid,.request-cargo-grid,.request-review-route p,.request-review-cargo p { grid-template-columns:1fr; }
  .request-route-card-grid .wide,.request-cargo-grid .wide { grid-column:auto; }
  .request-route-segment { grid-template-columns:1fr; }
  .request-segment-switch { width:100%; }
  .request-segment-switch button { flex:1 1 0; }
  .request-route-map-panel .compact-map { min-height:220px; }
  .transportation-mode-switch { display:flex; flex-wrap:wrap; }
  .transportation-mode-switch button { flex:1 1 120px; min-height:44px; white-space:normal; }
  .dialog-actions { flex-wrap:wrap; padding-top:10px; background:var(--surface); }
  .dialog-actions-spacer { display:none; }
  .dialog-actions button { flex:1 1 130px; min-height:44px; }
  .request-review-heading { align-items:flex-start; flex-direction:column; }
}
@media (max-width:1024px) { .request-composer-dialog form { display:block; overflow-y:auto; }.request-composer-dialog .request-composer { height:auto; min-height:0; overflow:visible; }.request-composer-dialog .request-composer-body { overflow:visible; }.request-composer-dialog .dialog-actions { position:relative; z-index:2; margin-top:12px; padding:10px 0 0; background:var(--surface); }.request-composer-dialog .preview-only-truth { margin-bottom:14px; } }
@media (max-width:900px) { .diadoc-setup-progress { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) {
  .vehicle-sts-comparison,.inline-draft-grid { grid-template-columns:1fr; }
  .inline-draft-grid .wide { grid-column:auto; }
  .external-service-card { grid-template-columns:36px minmax(0,1fr); }
  .external-service-head,.external-service-body,.external-service-actions { grid-column:2; }
  .external-service-facts { grid-template-columns:1fr; }
  .external-service-actions { justify-content:flex-start; }
  .diadoc-setup-progress { grid-template-columns:minmax(0,1fr); }
}

@media (max-width:720px) {
  .creation-result { align-items:stretch; flex-direction:column; }
  .creation-result .primary { width:100%; }
  .diadoc-settings-grid,.diadoc-metadata-grid,.diadoc-technical-facts { grid-template-columns:minmax(0,1fr); }
  .diadoc-document-matrix { grid-template-columns:minmax(0,1fr); }
  .diadoc-document-item { grid-template-columns:minmax(0,1fr); align-items:stretch; }
  .diadoc-document-item span { grid-column:1; }
  .etrn-view-switch { grid-template-columns:1fr; }
  .diadoc-card-header { flex-direction:column; }
  .diadoc-card-controls { justify-content:flex-start; }
  .workspace { padding:14px; }
  .request-create-launcher { width:100%; overflow-x:auto; }
  .request-create-launcher button { flex:1 0 auto; }
  .monitoring-quick-views { width:100%; overflow-x:auto; flex-wrap:nowrap; }
  .monitoring-quick-views button { flex:0 0 auto; }
}

/* ATI load discovery and write-free backhaul test workspace */
.ati-workspace { display:grid; gap:16px; }
.ati-heading { margin:0; }
.ati-view-switch { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; width:min(720px,100%); padding:4px; border:1px solid var(--line); border-radius:7px; background:var(--raised-2); }
.ati-view-switch button { min-height:44px; border:0; background:transparent; color:var(--muted); font-weight:800; }
.ati-view-switch button.active { background:var(--accent); color:var(--on-accent); }
.ati-scope-note { margin:0; color:var(--muted); font-size:12px; }
.ati-scope-note.is-blocked { padding:8px 10px; border-left:3px solid var(--warn-fg); background:var(--warn-bg); color:var(--text); }
.ati-panel { min-width:0; }
.ati-main-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(280px,1fr); gap:16px; align-items:start; }
.ati-work-panel,.ati-status-panel { min-width:0; }
.ati-source-badge { display:inline-flex; align-items:center; min-height:28px; padding:4px 8px; border:1px solid var(--line); border-radius:999px; background:var(--raised-2); color:var(--muted); font-size:12px; font-weight:800; }
.ati-filter-grid { display:grid; grid-template-columns:repeat(4,minmax(130px,1fr)); gap:10px; align-items:end; }
.ati-filter-grid label { display:grid; gap:5px; min-width:0; }
.ati-filter-grid label > span { color:var(--muted); font-size:12px; font-weight:750; }
.ati-filter-grid input,.ati-filter-grid select { width:100%; min-width:0; }
.ati-filter-grid > button { min-height:44px; }
.ati-truth-note,.ati-test-banner { margin:14px 0; padding:10px 12px; border-left:4px solid var(--warn-fg); border-radius:5px; background:var(--warn-bg); color:var(--text); }
.ati-test-banner { margin:0 0 14px; }
.ati-status-panel { display:grid; gap:14px; }
.ati-sticky { position:sticky; top:16px; }
.ati-process-list,.ati-check-list { display:grid; gap:10px; margin:0; padding-left:20px; }
.ati-fact-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.ati-fact-grid > div { display:grid; gap:3px; padding:12px; border:1px solid var(--line); border-radius:6px; background:var(--raised-2); }
.ati-fact-grid span,.ati-fact-grid small { color:var(--muted); }
.ati-fact-grid strong { font-size:20px; }
.ati-empty-state { display:grid; justify-items:start; gap:7px; margin-top:14px; padding:18px; border:1px dashed var(--line-strong); border-radius:6px; background:var(--raised-2); }
.ati-empty-state h4,.ati-empty-state p { margin:0; }
.ati-backhaul-form { display:grid; gap:14px; }
.ati-backhaul-form fieldset { min-width:0; margin:0; padding:12px; border:1px solid var(--line); border-radius:6px; }
.ati-backhaul-form legend { padding:0 6px; font-weight:850; }
.ati-backhaul-form .ati-filter-grid { grid-template-columns:repeat(3,minmax(130px,1fr)); }
.ati-check { display:flex !important; min-height:40px; grid-template-columns:20px 1fr; align-items:center; gap:8px !important; }
.ati-check input { width:18px; height:18px; }
.ati-actions { display:flex; flex-wrap:wrap; gap:8px; }
.ati-actions button { min-height:44px; }
.ati-results { display:grid; gap:8px; margin-top:14px; }
.ati-result-summary { display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding:8px 10px; border-radius:5px; background:var(--raised-2); }
.ati-result-summary span { color:var(--muted); }
.ati-result-row { display:grid; grid-template-columns:minmax(190px,1.5fr) repeat(3,minmax(100px,.75fr)) minmax(180px,1.1fr); gap:10px; align-items:center; padding:10px 12px; border:1px solid var(--line); border-left:4px solid var(--line-strong); border-radius:6px; }
.ati-result-row.is-eligible { border-left-color:var(--ok-fg); }
.ati-result-row.is-rejected { opacity:.72; }
.ati-result-row > div { display:grid; gap:3px; min-width:0; }
.ati-result-row span,.ati-result-row small { color:var(--muted); font-size:12px; }
.ati-result-route strong { font-size:14px; }
.ati-result-decision { justify-items:start; }
.ati-decision { display:inline-flex; width:max-content; padding:3px 7px; border-radius:999px; font-weight:850; }
.ati-decision.ready { background:var(--ok-bg); color:var(--ok-fg); }
.ati-decision.blocked { background:var(--error-bg); color:var(--error-fg); }
.ati-rules { display:grid; gap:10px; margin:0; }
.ati-rules div { display:grid; gap:3px; padding-bottom:9px; border-bottom:1px solid var(--line); }
.ati-rules dt { color:var(--muted); font-size:12px; font-weight:800; }
.ati-rules dd { margin:0; }
.ati-work-queue { display:grid; gap:8px; padding-top:4px; }
.ati-work-items { display:grid; gap:6px; }
.ati-work-items > div { display:grid; gap:2px; padding:8px; border:1px solid var(--line); border-radius:5px; }
.ati-work-items small { color:var(--muted); }

@media (max-width:1100px) {
  .ati-main-grid { grid-template-columns:1fr; }
  .ati-status-panel { grid-row:1; }
  .ati-sticky { position:static; }
  .ati-filter-grid,.ati-backhaul-form .ati-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ati-result-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ati-result-route,.ati-result-decision { grid-column:1 / -1; }
}

@media (max-width:620px) {
  .ati-view-switch { grid-template-columns:1fr; }
  .ati-filter-grid,.ati-backhaul-form .ati-filter-grid,.ati-fact-grid { grid-template-columns:1fr; }
  .ati-result-row { grid-template-columns:1fr; }
  .ati-result-route,.ati-result-decision { grid-column:auto; }
  .ati-actions { flex-direction:column; }
  .ati-actions button { width:100%; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; }
  .fleet-row.new-critical .fleet-state::before,.external-service-card.error { animation:none; }
}

/* ЭТрН registry: role-aware rows; raw provider fields remain plain text. */
.etrn-register-scroll { overflow-x: auto; border: 1px solid var(--border, #dce3e8); border-radius: 10px; }
.etrn-register { width: 100%; min-width: 1380px; border-collapse: collapse; font-size: 13px; }
.etrn-register caption { text-align: left; padding: 12px 14px; color: #667486; font-size: 12px; }
.etrn-register th { text-align: left; padding: 12px; background: #f4f7fa; border-bottom: 1px solid #dce3e8; white-space: nowrap; }
.etrn-register td { padding: 10px 12px; border-bottom: 1px solid #e7edf1; vertical-align: top; }
.etrn-register tbody tr:hover { background: #f6f9fc; }
.etrn-register td > span, .etrn-register td > strong, .etrn-register td > small { display: block; margin-bottom: 5px; overflow-wrap: anywhere; }
.etrn-register th:nth-child(1) { width: 120px; }
.etrn-register th:nth-child(2) { width: 190px; }
.etrn-register th:nth-child(3) { width: 180px; }
.etrn-register th:nth-child(4),.etrn-register th:nth-child(5),.etrn-register th:nth-child(6) { width: 210px; }
.etrn-register th:nth-child(7) { width: 130px; }
.etrn-register th:nth-child(8) { width: 190px; }
.etrn-register td button { display: block; margin: 0 0 6px; white-space: nowrap; }
.etrn-document-number { max-width:180px; padding:0; border:0; background:transparent; color:var(--accent); font:inherit; font-weight:800; text-align:left; white-space:normal!important; overflow-wrap:anywhere; cursor:pointer; }
.etrn-document-number:hover,.etrn-document-number:focus-visible { text-decoration:underline; }
.etrn-document-number:disabled { color:var(--muted); cursor:wait; }
.etrn-document-download { padding:0; border:0; background:transparent; color:var(--muted); font:inherit; font-size:11px; text-decoration:underline; cursor:pointer; }
.etrn-document-download:disabled { cursor:wait; opacity:.65; }
.etrn-register small { color: #687786; font-size: 11px; line-height: 1.45; }
.etrn-file-name { max-width: 220px; }
.etrn-extraction-note { max-width: 160px; }
.etrn-extracted-detail { display: grid; grid-template-columns: minmax(160px, 1fr) 3fr; gap: 8px 20px; }
.etrn-extracted-detail dt { color: #667486; }
.etrn-extracted-detail dd { margin: 0; overflow-wrap: anywhere; }
.etrn-upd-lines-scroll { overflow-x: auto; border: 1px solid var(--border, #dce3e8); border-radius: 8px; }
.etrn-upd-lines { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 12px; }
.etrn-upd-lines th,.etrn-upd-lines td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #e7edf1; vertical-align: top; }
.etrn-upd-lines th { color: #667486; background: #f4f7fa; white-space: nowrap; }
.etrn-upd-lines td { overflow-wrap: anywhere; }
.etrn-upd-totals { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--border, #dce3e8); }

/* Native password masking must not depend on the downloaded variable font. */
input[type="password"] { font-family:system-ui,-apple-system,"Segoe UI",sans-serif; }

.expense-category-amount .quiet-icon { color:var(--expense-category-color); width:14px; height:14px; flex-shrink:0; }

/* Alternate compact EDO workspace. Keep the legacy ETRN registry unchanged. */
.etrn-interface-switch {
  display:inline-grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(118px,auto);
  gap:2px;
  max-width:100%;
  padding:3px;
  border:1px solid var(--line-strong);
  border-radius:6px;
  background:var(--raised-2);
}
.etrn-interface-switch button {
  min-height:34px;
  padding:6px 12px;
  border:1px solid transparent;
  border-radius:4px;
  color:var(--muted);
  background:transparent;
  font-size:12px;
  font-weight:750;
  white-space:nowrap;
}
.etrn-interface-switch button:hover { color:var(--text); background:var(--hover); }
.etrn-interface-switch button[aria-pressed="true"] {
  border-color:var(--line-strong);
  color:var(--text);
  background:var(--surface);
  box-shadow:0 1px 2px rgb(16 18 24 / 8%);
}

.edo-v2 {
  --edo-v2-header:#fff5bd;
  --edo-v2-header-hover:#ffef99;
  --edo-v2-row-hover:#fffbea;
  display:grid;
  gap:10px;
  min-width:0;
  color:var(--text);
}
[data-theme="dark"] .edo-v2 {
  --edo-v2-header:#3a321a;
  --edo-v2-header-hover:#4b3f1d;
  --edo-v2-row-hover:#242116;
}
.edo-v2-tabs {
  display:flex;
  align-items:center;
  gap:0;
  max-width:100%;
  overflow-x:auto;
  border-bottom:1px solid var(--line-strong);
  scrollbar-width:thin;
}
.edo-v2-tabs button {
  position:relative;
  flex:0 0 auto;
  min-height:36px;
  padding:7px 13px;
  border:0;
  border-radius:0;
  color:var(--muted);
  background:transparent;
  font-size:12px;
  font-weight:750;
  white-space:nowrap;
}
.edo-v2-tabs button:hover { color:var(--text); background:var(--hover); }
.edo-v2-tabs button[aria-pressed="true"] { color:var(--text); background:var(--edo-v2-header); }
.edo-v2-tabs button[aria-pressed="true"]::after {
  position:absolute;
  right:0;
  bottom:-1px;
  left:0;
  height:2px;
  background:var(--warn-fg);
  content:"";
}
.edo-v2-toolbar {
  display:flex;
  align-items:end;
  flex-wrap:wrap;
  gap:8px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:5px;
  background:var(--raised-2);
}
.edo-v2-toolbar label {
  display:grid;
  flex:1 1 160px;
  gap:4px;
  min-width:130px;
  margin:0;
  color:var(--muted);
  font-size:11px;
  font-weight:750;
}
.edo-v2-toolbar label:has(input[type="search"]) { flex-basis:260px; }
.edo-v2-toolbar input,.edo-v2-toolbar select {
  min-width:0;
  min-height:34px;
  padding:5px 9px;
  border-radius:4px;
  font-size:12px;
}
.edo-v2-toolbar button {
  flex:0 0 auto;
  min-height:34px;
  padding:5px 11px;
  border:1px solid var(--line-strong);
  border-radius:4px;
  color:var(--text);
  background:var(--surface);
  font-size:12px;
  font-weight:700;
}
.edo-v2-toolbar button:hover { background:var(--hover); }
.edo-v2-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:6px 16px;
  min-height:28px;
  padding:0 2px;
}
.edo-v2-summary { margin:0; color:var(--muted); font-size:12px; line-height:1.4; }
.edo-v2-summary strong { color:var(--text); font-variant-numeric:tabular-nums; }
.edo-v2-scroll {
  max-width:100%;
  overflow:auto;
  border:1px solid var(--line-strong);
  border-radius:5px;
  background:var(--surface);
  scrollbar-width:thin;
}
.edo-v2-table {
  width:100%;
  min-width:1100px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  font-size:12px;
}
.edo-v2-table th {
  position:sticky;
  z-index:2;
  top:0;
  height:38px;
  padding:7px 10px;
  border-right:1px solid color-mix(in srgb,var(--line-strong),transparent 30%);
  border-bottom:1px solid var(--line-strong);
  color:var(--text);
  background:var(--edo-v2-header);
  font-size:11px;
  font-weight:800;
  line-height:1.2;
  text-align:left;
  white-space:nowrap;
}
.edo-v2-table th:last-child { border-right:0; }
.edo-v2-table tbody tr { height:48px; }
.edo-v2-table tbody tr:hover { background:var(--edo-v2-row-hover); }
.edo-v2-table td {
  min-width:0;
  height:48px;
  padding:5px 10px;
  overflow:hidden;
  border-bottom:1px solid var(--line);
  color:var(--text);
  line-height:1.25;
  vertical-align:middle;
}
.edo-v2-table tbody tr:last-child td { border-bottom:0; }
.edo-v2-table th:nth-child(1) { width:92px; }
.edo-v2-table th:nth-child(2) { width:142px; }
.edo-v2-table th:nth-child(3) { width:128px; }
.edo-v2-table th:nth-child(4) { width:150px; }
.edo-v2-table th:nth-child(5) { width:150px; }
.edo-v2-table th:nth-child(6) { width:150px; }
.edo-v2-table th:nth-child(7) { width:116px; text-align:right; }
.edo-v2-table th:nth-child(8) { width:154px; }
.edo-v2-table td:nth-child(7) { font-variant-numeric:tabular-nums; text-align:right; white-space:nowrap; }
.edo-v2-primary,.edo-v2-secondary {
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.edo-v2-primary { color:var(--text); font-weight:700; }
.edo-v2-secondary { margin-top:2px; color:var(--muted); font-size:11px; font-weight:500; }
.edo-v2-open {
  display:block;
  width:100%;
  min-height:0;
  padding:0;
  overflow:hidden;
  border:0;
  color:var(--accent);
  background:transparent;
  font:inherit;
  font-weight:800;
  text-align:left;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.edo-v2-open:hover,.edo-v2-open:focus-visible { color:var(--accent-hover); text-decoration:underline; }
.edo-v2-download {
  display:inline-block;
  min-height:0;
  margin-top:2px;
  padding:0;
  border:0;
  color:var(--muted);
  background:transparent;
  font-size:11px;
  line-height:1.25;
  text-decoration:underline;
}
.edo-v2-download:hover,.edo-v2-download:focus-visible { color:var(--text); }
.edo-v2-open:disabled,.edo-v2-download:disabled { cursor:wait; opacity:.6; }
.edo-v2-status {
  display:inline-flex;
  align-items:center;
  max-width:100%;
  min-height:24px;
  padding:3px 7px;
  overflow:hidden;
  border:1px solid transparent;
  border-radius:999px;
  color:var(--tertiary-fg);
  background:var(--tertiary-bg);
  font-size:11px;
  font-weight:750;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.edo-v2-status[data-tone="success"] { border-color:color-mix(in srgb,var(--ok-fg),transparent 65%); color:var(--ok-fg); background:var(--ok-bg); }
.edo-v2-status[data-tone="warning"] { border-color:color-mix(in srgb,var(--warn-fg),transparent 65%); color:var(--warn-fg); background:var(--warn-bg); }
.edo-v2-status[data-tone="danger"] { border-color:color-mix(in srgb,var(--error-fg),transparent 65%); color:var(--error-fg); background:var(--error-bg); }
.edo-v2-status[data-tone="neutral"] { border-color:var(--line); color:var(--tertiary-fg); background:var(--tertiary-bg); }
.edo-v2-empty,.edo-v2-error {
  margin:0;
  padding:18px;
  border:1px dashed var(--line-strong);
  border-radius:5px;
  color:var(--muted);
  background:var(--raised-2);
  font-size:12px;
  line-height:1.5;
}
.edo-v2-error { border-color:color-mix(in srgb,var(--error-fg),transparent 45%); color:var(--error-fg); background:var(--error-bg); }

/* Fill the browser workspace only while the alternate EDO interface is active. */
body.edo-compact-active { height:100dvh; overflow:hidden; }
body.edo-compact-active #app {
  display:grid;
  height:100dvh;
  min-height:0;
  grid-template-rows:auto minmax(0,1fr);
  overflow:hidden;
}
body.edo-compact-active .topbar { min-height:40px; padding:2px 12px; }
body.edo-compact-active .topbar .eyebrow { display:none; }
body.edo-compact-active .topbar h1 { font-size:17px; }
body.edo-compact-active .topbar button,
body.edo-compact-active .topbar .status { min-height:32px; padding-block:5px; }
body.edo-compact-active .layout {
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden;
}
body.edo-compact-active .sidebar { min-height:0; padding-block:10px; }

#etrn-module.etrn-compact {
  width:100%;
  height:100%;
  min-height:0;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto auto minmax(0,1fr);
  grid-template-areas:
    "heading interface"
    "views views"
    "documents documents";
  align-content:stretch;
  gap:6px 12px;
  padding:8px 12px 10px;
  overflow:hidden;
}
#etrn-module.etrn-compact > .heading-row { grid-area:heading; align-items:center; min-width:0; gap:12px; }
#etrn-module.etrn-compact > .heading-row > div:first-child { min-width:0; }
#etrn-module.etrn-compact > .heading-row .eyebrow,
#etrn-module.etrn-compact > .heading-row > div:first-child > p:last-child { display:none; }
#etrn-module.etrn-compact > .heading-row h2 { margin:0; font-size:19px; line-height:1.2; }
#etrn-module.etrn-compact .etrn-organization-control {
  min-width:min(280px,46vw);
  grid-auto-flow:column;
  align-items:center;
  justify-content:end;
  gap:6px;
}
#etrn-module.etrn-compact .etrn-organization-control label { grid-auto-flow:column; align-items:center; gap:6px; margin:0; }
#etrn-module.etrn-compact .etrn-organization-control select { width:min(260px,32vw); min-height:32px; padding-block:4px; }
#etrn-module.etrn-compact .etrn-organization-control button { min-height:32px; padding:5px 9px; }
#etrn-module.etrn-compact > .etrn-interface-switch { grid-area:interface; align-self:center; }
#etrn-module.etrn-compact > .etrn-interface-switch button { min-height:30px; padding-block:4px; }
#etrn-module.etrn-compact > .etrn-view-switch {
  grid-area:views;
  width:100%;
  max-width:none;
  grid-template-columns:repeat(3,max-content);
  justify-content:start;
  padding:2px;
}
#etrn-module.etrn-compact > .etrn-view-switch button { min-height:30px; padding:4px 12px; font-size:12px; }
#etrn-module.etrn-compact > .etrn-document-panel {
  grid-area:documents;
  display:grid;
  min-width:0;
  min-height:0;
  grid-template-rows:auto minmax(0,1fr);
  gap:6px;
  padding:8px;
  overflow:hidden;
}
#etrn-module.etrn-compact > .etrn-document-panel > .heading-row { align-items:center; min-height:32px; margin:0; }
#etrn-module.etrn-compact > .etrn-document-panel > .heading-row h3 { margin:0; font-size:15px; }
#etrn-module.etrn-compact > .etrn-document-panel > .heading-row p { display:none; }
#etrn-module.etrn-compact > .etrn-document-panel > .heading-row button { min-height:30px; padding:4px 9px; }
#etrn-module.etrn-compact #etrn-document-browser,
#etrn-module.etrn-compact [data-diadoc-document-panel],
#etrn-module.etrn-compact .diadoc-document-results { min-width:0; min-height:0; height:100%; }
#etrn-module.etrn-compact #etrn-document-browser,
#etrn-module.etrn-compact .diadoc-document-results {
  display:flex;
  flex-direction:column;
  gap:4px;
}
#etrn-module.etrn-compact [data-diadoc-document-panel] {
  display:grid;
  grid-template-rows:minmax(0,1fr);
  gap:0;
  overflow:hidden;
}
#etrn-module.etrn-compact [data-diadoc-document-panel] > .diadoc-document-controls,
#etrn-module.etrn-compact [data-diadoc-document-panel] > .field-note { display:none; }
#etrn-module.etrn-compact .diadoc-document-results { overflow:hidden; }
#etrn-module.etrn-compact .edo-v2 {
  display:flex;
  min-width:0;
  min-height:0;
  flex:1 1 auto;
  flex-direction:column;
  gap:6px;
  overflow:hidden;
}
#etrn-module.etrn-compact #etrn-document-browser > button,
#etrn-module.etrn-compact .diadoc-document-results > button { flex:0 0 auto; min-height:30px; padding-block:4px; }
#etrn-module.etrn-compact .edo-v2-tabs button { min-height:30px; padding:5px 11px; }
#etrn-module.etrn-compact .edo-v2-toolbar { flex:0 0 auto; gap:6px; padding:6px 8px; }
#etrn-module.etrn-compact .edo-v2-toolbar label { gap:2px; font-size:10px; }
#etrn-module.etrn-compact .edo-v2-toolbar input,
#etrn-module.etrn-compact .edo-v2-toolbar select,
#etrn-module.etrn-compact .edo-v2-toolbar button { min-height:30px; padding-block:4px; }
#etrn-module.etrn-compact .edo-v2-summary { min-height:20px; line-height:1.25; }
#etrn-module.etrn-compact .edo-v2-scroll {
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overscroll-behavior:contain;
}
#etrn-module.etrn-compact .edo-v2-table caption { padding-block:5px; }
#etrn-module.etrn-compact .edo-v2-table th { top:0; height:32px; padding-block:5px; }
#etrn-module.etrn-compact .edo-v2-table tbody tr,
#etrn-module.etrn-compact .edo-v2-table td { height:42px; }

@media (max-width:900px) {
  body.edo-compact-active .layout { grid-template-rows:auto minmax(0,1fr); }
  body.edo-compact-active .sidebar { min-height:50px; padding-block:6px; }
  #etrn-module.etrn-compact {
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto auto minmax(0,1fr);
    grid-template-areas:"heading" "interface" "views" "documents";
    padding:7px 8px 8px;
  }
  #etrn-module.etrn-compact > .etrn-interface-switch { justify-self:start; }
}

@media (max-width:720px) {
  .etrn-interface-switch { display:grid; grid-auto-flow:row; grid-auto-columns:auto; width:100%; }
  .etrn-interface-switch button { width:100%; }
  .edo-v2-toolbar { align-items:stretch; }
  .edo-v2-toolbar label,.edo-v2-toolbar label:has(input[type="search"]) { flex-basis:100%; }
  .edo-v2-toolbar button { width:100%; }
  #etrn-module.etrn-compact > .heading-row { flex-direction:row; align-items:center; }
  #etrn-module.etrn-compact > .heading-row h2 { font-size:16px; }
  #etrn-module.etrn-compact .etrn-organization-control { min-width:0; grid-auto-flow:row; justify-content:end; font-size:10px; }
  #etrn-module.etrn-compact .etrn-organization-control label { grid-auto-flow:row; gap:2px; }
  #etrn-module.etrn-compact .etrn-organization-control select { width:min(50vw,240px); }
  #etrn-module.etrn-compact > .etrn-interface-switch {
    grid-auto-flow:column;
    grid-auto-columns:minmax(0,1fr);
    width:100%;
  }
  #etrn-module.etrn-compact > .etrn-interface-switch > span { display:none; }
  #etrn-module.etrn-compact > .etrn-view-switch { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #etrn-module.etrn-compact > .etrn-view-switch button { min-width:0; padding-inline:5px; white-space:normal; }
  #etrn-module.etrn-compact > .etrn-document-panel { padding:6px; }
  #etrn-module.etrn-compact > .etrn-document-panel > .heading-row { flex-direction:row; }
  #etrn-module.etrn-compact .edo-v2-toolbar {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #etrn-module.etrn-compact .edo-v2-toolbar label,
  #etrn-module.etrn-compact .edo-v2-toolbar label:has(input[type="search"]) { min-width:0; flex-basis:auto; }
  #etrn-module.etrn-compact .edo-v2-toolbar label:has(input[type="search"]) { grid-column:1 / -1; }
  #etrn-module.etrn-compact .edo-v2-toolbar button { min-width:0; }
  #etrn-module.etrn-compact .edo-v2-summary > span { display:none; }
}

.etrn-interface-switch > span { align-self:center; padding:0 10px; font-size:12px; color:var(--muted); }
.edo-v2-table caption { padding:8px 10px; text-align:left; color:var(--muted); font-size:11px; }
