/* v3-settings.css — «Настройки» по design-canvas/Settings.dc.html и
   SetCompany/SetFleet/SetUsers/SetPrice/SetIntegr.dc.html (1 в 1). */
.v3s { display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: 0; --v3s-ink-av: #1c1c1e; }

/* ── Шапка ── */
.v3s-head { display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 24px; flex-shrink: 0; }
.v3s-head .v3-h1 { flex-shrink: 0; }
.v3s-find { display: flex; align-items: center; gap: 8px; height: 40px; width: 260px; box-sizing: border-box; padding: 0 14px;
  border-radius: 20px; background: var(--t-nested); border: 1px solid var(--t-line); flex-shrink: 0; color: var(--t-ink-3); }
.v3s-find input { border: 0; outline: none; background: transparent; flex-grow: 1; min-width: 0; font: inherit; font-size: 14px;
  color: var(--t-ink); padding: 0; height: auto; box-shadow: none; }
.v3s-ver { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: inherit; font-size: 13px;
  color: var(--t-ink-3); background: none; border: 0; padding: 0; cursor: pointer; }
.v3s-ver:hover { color: var(--t-blue); }
.v3s-ver .v3s-dot { position: static; width: 7px; height: 7px; border-radius: 4px; background: var(--t-blue); margin: 0; }

/* ── Две панели ── */
.v3s-body { flex-grow: 1; min-height: 0; display: flex; gap: 14px; }
.v3s-menu { width: 290px; flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden; }
.v3s-tabs { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.v3s-tab { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; color: var(--t-ink);
  background: none; border: 0; font: inherit; text-align: left; cursor: pointer; width: 100%; box-sizing: border-box; }
.v3s-tab[hidden] { display: none; }
.v3s-tab:hover { background: var(--t-row); }
.v3s-tab.on { background: rgba(10,111,224,.1); }
.v3s-tic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; background: var(--t-nested); color: var(--t-ink-2); }
.v3s-tab.on .v3s-tic { background: var(--t-blue); color: #fff; }
.v3s-tt { display: flex; flex-direction: column; min-width: 0; }
.v3s-tt b { font-weight: 600; color: var(--t-ink); }
.v3s-tab.on .v3s-tt b { font-weight: 700; color: var(--t-blue-ink); }
.v3s-tt span { font-size: 12.5px; color: var(--t-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3s-nohit { padding: 10px 12px; font-size: 13px; color: var(--t-ink-3); }
/* разделы платформы вне меню дизайна — тихим списком внизу */
.v3s-more { margin-top: auto; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 0 10px 14px;
  display: flex; flex-direction: column; gap: 1px; }
.v3s-more::-webkit-scrollbar { display: none; }
.v3s-more-h { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t-ink-3);
  padding: 12px 12px 5px; border-top: 1px solid var(--t-line); }
.v3s-more-b { text-align: left; font: inherit; font-size: 13.5px; font-weight: 550; color: var(--t-ink-2); background: none;
  border: 0; border-radius: 12px; padding: 6px 12px; cursor: pointer; }
.v3s-more-b:hover { background: var(--t-row); color: var(--t-ink); }

.v3s-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.v3s-scroll { padding: 24px 30px 30px; overflow: auto; flex-grow: 1; min-height: 0; display: flex; flex-direction: column; }
.v3s-load { color: var(--t-ink-3); padding: 4px 0; }
.v3s-foot { padding: 14px 22px; border-top: 1px solid rgba(60,66,78,.1); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.v3s-foot > span { font-size: 13px; color: var(--t-ink-3); flex-grow: 1; }

/* ── Кнопки ── */
.v3s-btn { display: flex; align-items: center; gap: 7px; white-space: nowrap; height: 40px; padding: 0 18px; border-radius: 20px;
  border: 1px solid var(--t-line); background: var(--t-surface); color: var(--t-ink); font: inherit; font-size: 14px;
  font-weight: 600; box-shadow: 0 1px 2px rgba(22,26,36,.06); cursor: pointer; flex-shrink: 0; box-sizing: border-box; }
.v3s-btn:hover { background: var(--t-row); }
.v3s-btn:disabled { opacity: .55; cursor: default; }
.v3s-btn.pri { justify-content: center; padding: 0 20px; border: 0; background: var(--t-blue-grad); color: #fff; font-size: 14.5px;
  font-weight: 650; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 20px -6px rgba(10,95,208,.85); }
.v3s-btn.pri:hover { background: linear-gradient(180deg, #5cb0ff, #1a7cea); }
.v3s-btn.sm { height: 32px; padding: 0 14px 0 10px; border-radius: 16px; font-size: 13px; }
.v3s-btn.sm.np { padding: 0 14px; }
.v3s-btn.sm svg { color: var(--t-blue); }
.v3s-btn.pri.sm { padding: 0 16px 0 12px; font-size: 13px; }
.v3s-btn.pri.sm svg { color: #fff; }
.v3s-link { font: inherit; font-size: 13.5px; font-weight: 650; color: var(--t-blue); background: none; border: 0; padding: 0;
  cursor: pointer; white-space: nowrap; }
.v3s-link:hover { text-decoration: underline; }
.v3s-dots { width: 30px; height: 30px; border-radius: 15px; border: 1px solid var(--t-line); background: var(--t-nested);
  color: var(--t-ink-2); box-shadow: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  cursor: pointer; padding: 0; }
.v3s-dots:hover { background: var(--t-row); }
.v3s-dd { position: relative; flex-shrink: 0; }
.v3s-dd .dd-menu { width: max-content; max-width: 320px; }

/* ── Заголовки и строки настроек ── */
.v3s-sect { display: flex; flex-direction: column; gap: 6px; }
.v3s-sect + .v3s-sect { margin-top: 26px; }
.v3s-h3 { display: flex; align-items: baseline; gap: 10px; }
.v3s-h3 h3 { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -.015em; flex-grow: 1; }
.v3s-h3 .v3s-link + .v3s-link { margin-left: 8px; }
.v3s-h3 .v3s-link + .v3s-btn { margin-left: 8px; }
.v3s-gap { margin-top: 26px; }
.v3s-note { font-size: 13.5px; color: var(--t-ink-3); }
.v3s-lead { padding: 4px 0 12px; }
.v3s-lead2 { padding: 4px 0 14px; }
.v3s-hint { font-size: 12.5px; color: var(--t-ink-3); font-weight: 500; }

.v3s-row { display: flex; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid rgba(60,66,78,.08); }
.v3s-row.c { padding: 15px 0; }
.v3s-card .v3s-row.last { border-bottom: 0; padding-bottom: 0; }
.v3s-rl { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.v3s-rl b { font-weight: 650; font-size: 15px; }
.v3s-rl span { font-size: 13px; color: var(--t-ink-3); }

/* тема: три карточки-превью (цвета — сами темы, поэтому литералами) */
.v3s-themes { display: flex; gap: 14px; padding: 14px 0 6px; }
.v3s-theme { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0;
  background: transparent; text-align: left; font: inherit; color: var(--t-ink); cursor: pointer; }
.v3s-tprev { height: 110px; border-radius: 20px; padding: 10px; box-sizing: border-box; display: flex; gap: 8px;
  box-shadow: 0 0 0 1px var(--t-line); }
.v3s-theme.on .v3s-tprev { box-shadow: 0 0 0 2px var(--t-blue), 0 0 0 5px rgba(10,95,208,.18); }
.v3s-tname { font-weight: 650; padding-left: 4px; }
.v3s-theme.on .v3s-tname { color: var(--t-blue-ink); }
.v3s-tprev .a { width: 40px; border-radius: 12px; }
.v3s-tprev .b { flex-grow: 1; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.v3s-tprev i { display: block; }
.v3s-tprev .l1 { height: 8px; width: 60%; border-radius: 4px; }
.v3s-tprev .l2 { height: 6px; width: 80%; border-radius: 3px; }
.v3s-tprev .l3 { height: 6px; width: 50%; border-radius: 3px; }
.v3s-tprev .bt { margin-top: auto; height: 14px; width: 44px; border-radius: 7px; background: #0a5fd0; }
.v3s-tprev.light { background: linear-gradient(180deg, #f4f5f8, #dfe2ea); }
.v3s-tprev.light .a, .v3s-tprev.light .b { background: #fff; }
.v3s-tprev.light .l1 { background: #1c1c1e; }
.v3s-tprev.light .l2, .v3s-tprev.light .l3 { background: #f2f2f7; }
.v3s-tprev.dark { background: linear-gradient(180deg, #1c1e22, #101215); }
.v3s-tprev.dark .a, .v3s-tprev.dark .b { background: #1f2126; }
.v3s-tprev.dark .l1 { background: #f2f3f5; }
.v3s-tprev.dark .l2, .v3s-tprev.dark .l3 { background: #26282e; }
.v3s-tprev.auto { padding: 0; background: linear-gradient(90deg, #eef0f4 50%, #16181b 50%); align-items: center; justify-content: center; }
.v3s-tsun { padding: 5px 10px; border-radius: 10px; background: #fff; font-size: 12px; font-weight: 700; color: #1c1c1e; }

/* масштаб, сегменты, переключатель */
.v3s-step { display: flex; align-items: center; gap: 8px; }
.v3s-step button { width: 36px; height: 36px; border-radius: 18px; border: 1px solid var(--t-line); background: var(--t-nested);
  font: inherit; font-size: 18px; font-weight: 600; color: var(--t-ink); cursor: pointer; padding: 0; display: flex;
  align-items: center; justify-content: center; }
.v3s-step button:hover { background: var(--t-row); }
.v3s-step b { min-width: 58px; text-align: center; font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.v3s-seg { display: flex; gap: 3px; padding: 3px; border-radius: 17px; background: var(--t-nested); border: 1px solid var(--t-line); flex-shrink: 0; }
.v3s-seg button { white-space: nowrap; border: 0; padding: 7px 12px; border-radius: 14px; font: inherit; font-size: 13.5px;
  font-weight: 650; background: transparent; color: var(--t-ink-2); cursor: pointer; }
.v3s-seg button.on { background: var(--t-surface); color: var(--t-blue-ink); box-shadow: 0 1px 3px rgba(22,26,36,.16); }
.v3s-sw { display: flex; align-items: center; border: 0; background: transparent; padding: 0; cursor: pointer; flex-shrink: 0; }
.v3s-sw i { display: block; position: relative; width: 51px; height: 31px; border-radius: 16px; background: rgba(120,120,128,.2);
  flex-shrink: 0; transition: background .2s; }
.v3s-sw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: left .2s; }
.v3s-sw.on i { background: var(--t-blue); }
.v3s-sw.on i::after { left: 22px; }

/* поля */
.v3s-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px 0 6px; }
.v3s-fld { display: flex; flex-direction: column; gap: 7px; width: 330px; max-width: 100%; }
.v3s-fld.w620 { width: 620px; }
.v3s-fld > span:first-child { font-size: 13px; font-weight: 600; color: var(--t-ink-2); }
.v3s-inp { width: 100%; height: 46px; box-sizing: border-box; padding: 0 15px; border-radius: 15px; border: 1.5px solid var(--t-line-2);
  box-shadow: none; background: var(--t-surface); color: var(--t-ink); font: inherit; font-size: 15px; font-weight: 550; outline: none; }
.v3s-inp[readonly] { background: var(--t-row); color: var(--t-ink-2); }
.v3s-numw { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.v3s-num { width: 90px; height: 42px; box-sizing: border-box; padding: 0 12px; border-radius: 13px; border: 1.5px solid var(--t-line-2);
  font: inherit; font-size: 15px; font-weight: 650; text-align: right; background: var(--t-surface); color: var(--t-ink); outline: none;
  font-variant-numeric: tabular-nums; }
.v3s-unit { font-size: 13.5px; color: var(--t-ink-3); white-space: nowrap; }
.v3s-inp:focus, .v3s-num:focus, .v3s-pinp:focus { border-color: var(--t-blue); }

/* ── Таблицы: машины, прайс ── */
.v3s-tbl { border-radius: 20px; border: 1px solid var(--t-line); }
.v3s-th, .v3s-tr { display: grid; gap: 12px; }
.v3s-th { padding: 8px 14px; font-size: 11.5px; font-weight: 700; color: var(--t-ink-3); background: var(--t-row); border-radius: 19px 19px 0 0; }
.v3s-th .r { text-align: right; }
.v3s-tr { align-items: center; padding: 11px 14px; border-bottom: 1px solid rgba(60,66,78,.08); }
.v3s-tr > * { min-width: 0; }
.v3s-tr .v3-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; box-sizing: border-box; }
.v3s-fleet .v3s-th, .v3s-fleet .v3s-tr { grid-template-columns: 80px minmax(0, 1fr) 180px 110px 110px 30px; }
.v3s-mc { display: flex; align-items: center; gap: 7px; font-weight: 750; white-space: nowrap; }
.v3s-mc i { width: 10px; height: 10px; border-radius: 5px; background: var(--mc); flex-shrink: 0; }
.v3s-cell2 { display: flex; flex-direction: column; }
.v3s-cell2 b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3s-cell2 span { font-size: 12.5px; color: var(--t-ink-3); }
.v3s-auto { font-size: 13px; color: var(--t-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3s-empty-row { grid-column: 1 / -1; color: var(--t-ink-3); }
.v3s .v3-pill.blue { background: rgba(10,95,208,.1); color: var(--t-blue-ink); }
.v3s .v3-pill.warn { background: rgba(232,137,12,.16); color: #8a4b00; }

.v3s-price .v3s-th, .v3s-price .v3s-tr { grid-template-columns: minmax(0, 1fr) 140px; }
.v3s-price .v3s-tr { padding: 8px 14px; }
.v3s-pname { font-weight: 650; }
.v3s-pinp { height: 38px; box-sizing: border-box; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--t-line-2);
  font: inherit; font-size: 14.5px; font-weight: 650; text-align: right; background: var(--t-surface); color: var(--t-ink);
  outline: none; width: 100%; font-variant-numeric: tabular-nums; }
.v3s-tgrp { padding: 8px 14px; font-size: 11.5px; font-weight: 700; color: var(--t-ink-3); background: var(--t-row);
  border-bottom: 1px solid rgba(60,66,78,.08); }
.v3s-tgrp:last-child, .v3s-tbl > .v3s-tr:last-child, .v3s-list > .v3s-li:last-child { border-radius: 0 0 19px 19px; }

/* ── Списки: пользователи, водители ── */
.v3s-list { border-radius: 20px; border: 1px solid var(--t-line); }
.v3s-li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid rgba(60,66,78,.08); }
.v3s-li.off > :not(.v3s-dd):not(.v3s-dots) { opacity: .55; }
.v3s-av { width: 36px; height: 36px; border-radius: 18px; background: var(--av, #5b6d86); color: #fff; font-size: 12.5px;
  font-weight: 750; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.v3s-lm { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.v3s-lm b { font-weight: 700; }
.v3s-lm span { font-size: 12.5px; color: var(--t-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3s-role { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 10px; background: var(--t-nested); white-space: nowrap; flex-shrink: 0; }
.v3s-role.bad { background: rgba(224,49,63,.12); color: #b3202e; }
.v3s-li .v3-mchip { flex-shrink: 0; }
.v3s-warn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(232,137,12,.14);
  color: #6e4300; margin-bottom: 12px; }
.v3s-warn > b { flex-grow: 1; font-weight: 650; }
.v3s-warn button { white-space: nowrap; height: 34px; display: flex; align-items: center; padding: 0 14px; border-radius: 17px;
  background: var(--t-surface); color: var(--t-ink); font: inherit; font-weight: 650; font-size: 13.5px; border: 1px solid var(--t-line); cursor: pointer; }
.v3s-weak { margin-bottom: 12px; }

/* ── Карточки связей ── */
.v3s-cards { display: flex; flex-direction: column; gap: 14px; }
.v3s-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 24px; border: 1px solid var(--t-line); }
.v3s-ch { display: flex; align-items: center; gap: 10px; }
.v3s-ch b { font-size: 16px; font-weight: 750; flex-grow: 1; }
.v3s-ctext { font-size: 13.5px; color: var(--t-ink-2); }
.v3s-sum { color: var(--t-ink-3); }
.v3s-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.v3s-card .v3-alert { font-size: 13.5px; }

/* ══ Любая ширина компьютера (861–1920+) ══
   Правая панель и таблица машин подстраиваются под СВОЮ ширину (контейнерные
   запросы): при 1440 с меню 236 всё как в макете, уже — перестраивается. */
/* по id: класс .v3s-main есть и у «Статистики» (v3-stats.css даёт ему своё имя контейнера) */
#v3s-main { container: v3sm / inline-size; }
/* подпись строки не сжимается в столбик: не хватает места — переключатель уходит под неё */
.v3s-row { flex-wrap: wrap; row-gap: 10px; }
.v3s-rl { flex: 1 1 220px; }
/* заголовок раздела: сжимается до переноса по словам, кнопки при нехватке места — строкой ниже, у правого края */
.v3s-h3 { flex-wrap: wrap; row-gap: 8px; justify-content: flex-end; }
.v3s-h3 h3 { flex: 1 1 150px; min-width: 0; }
.v3s-ch { flex-wrap: wrap; row-gap: 6px; }
.v3s-ch b { min-width: 0; }
.v3s-foot { flex-wrap: wrap; row-gap: 8px; justify-content: flex-end; }
.v3s-foot > span { flex: 1 1 160px; }
.v3s-warn { flex-wrap: wrap; row-gap: 8px; }
.v3s-warn > b { flex: 1 1 200px; }
/* строка сотрудника: длинная роль сокращается многоточием, «⋯» остаётся в строке */
.v3s-lm { flex: 1 1 140px; }
.v3s-role { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* широкий экран: колонка настроек не растягивается на 1300px — кнопки у своего текста */
.v3s-scroll > * { max-width: 980px; }
.v3s-foot { padding-right: max(22px, calc(100% - 1010px)); }

/* подвал: пояснение строкой выше, обе кнопки вместе — не по одной на строку */
@container v3sm (max-width: 540px) {
  .v3s-foot > span { flex-basis: 100%; }
}
@container v3sm (max-width: 620px) {
  .v3s-scroll { padding: 20px 20px 24px; }
  .v3s-foot { padding: 12px 16px; }
  .v3s-grid2 { grid-template-columns: minmax(0, 1fr); }
  .v3s-themes { gap: 10px; }
  .v3s-tprev { height: 92px; }
}
@container v3sm (max-width: 460px) {
  .v3s-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .v3s-seg::-webkit-scrollbar { display: none; }
}

/* таблица машин (по ширине панели): «Авто» уже, потом прячется; совсем узко — строка в две линии */
@container v3sm (max-width: 819px) {
  .v3s-fleet .v3s-th, .v3s-fleet .v3s-tr { grid-template-columns: 72px minmax(0, 1.2fr) minmax(0, 1fr) 104px 104px 30px; }
}
@container v3sm (max-width: 659px) {
  .v3s-fleet .v3s-th, .v3s-fleet .v3s-tr { grid-template-columns: 72px minmax(0, 1fr) 104px 104px 30px; }
  .v3s-fleet :is(.v3s-th > :nth-child(3), .v3s-auto) { display: none; }
}
@container v3sm (max-width: 529px) {
  .v3s-fleet .v3s-th { display: none; }
  .v3s-fleet .v3s-tr { grid-template-columns: 64px minmax(0, 1fr) minmax(0, max-content) 30px;
    grid-template-areas: "mc who md dd" "mc who st dd"; row-gap: 5px; }
  .v3s-fleet .v3s-tr > .v3s-mc { grid-area: mc; }
  .v3s-fleet .v3s-tr > .v3s-cell2 { grid-area: who; }
  .v3s-fleet .v3s-tr > :nth-child(4) { grid-area: md; justify-self: end; }
  .v3s-fleet .v3s-tr > :nth-child(5) { grid-area: st; justify-self: end; }
  .v3s-fleet .v3s-tr > .v3s-dd { grid-area: dd; }
}

/* ── Тёмная тема ── */
[data-theme="dark"] .v3s { --v3s-ink-av: #3a3d45; }
[data-theme="dark"] .v3s .v3-pill.warn, [data-theme="dark"] .v3s-warn { background: rgba(255,178,60,.14); color: #ffcf85; }
[data-theme="dark"] .v3s-role.bad { color: var(--t-bad-ink); background: rgba(255,90,100,.18); }
[data-theme="dark"] .v3s-sw:not(.on) i { background: rgba(120,120,128,.36); }

/* ════════ Телефон: MobSettings.dc.html и MobSet*.dc.html (390×844) ════════ */
@media (max-width: 860px) {
  .v3xm { display: flex; flex-direction: column; min-height: 100%; box-sizing: border-box; color: var(--t-ink); font-size: 15px;
    --v3s-ink-av: #1c1c1e; }
  /* подраздел: вкладки спрятаны — свой отступ снизу вместо общего под вкладки */
  .shell.detail-view .content:has(> .v3xm) { padding-bottom: 0; }
  .v3xm.sub:not(.has-foot) .v3xm-body { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }

  /* шапка */
  .v3xm-top { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
  .v3xm-bar { display: flex; align-items: center; gap: 10px; min-height: 40px; }
  .v3xm-bar .grow { font-size: 14px; font-weight: 650; color: var(--t-ink-3); }
  .v3xm-back, .v3xm-add { position: relative; width: 40px; height: 40px; border-radius: 20px; border: 0; padding: 0; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .v3xm-back::after, .v3xm-add::after { content: ''; position: absolute; inset: -4px; }   /* касание 48px */
  .v3xm-back { background: var(--t-surface); color: var(--t-ink); box-shadow: 0 1px 2px rgba(22,26,36,.08); }
  .v3xm-add { background: var(--t-blue-grad); color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 20px -6px rgba(10,95,208,.85); }
  .v3xm-title { font-size: 30px; font-weight: 760; letter-spacing: -.03em; line-height: 1.1; }

  .v3xm-body { flex-grow: 1; padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
  .v3xm-load { color: var(--t-ink-3); padding: 4px 6px; }
  /* «Сохранить» прибита к низу экрана (как .v3jm-foot в журнале); тело оставляет под неё место */
  .v3xm-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 14px calc(26px + env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; background: var(--t-nested); }
  .v3xm.has-foot .v3xm-body { padding-bottom: calc(106px + env(safe-area-inset-bottom, 0px)); }
  .v3xm-save { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border-radius: 28px; border: 0;
    font: inherit; font-size: 17px; font-weight: 700; background: var(--t-blue-grad); color: #fff; cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 20px -6px rgba(10,95,208,.85); }
  .v3xm-save:disabled { opacity: .6; }

  /* список подразделов */
  .v3xm-grp { border-radius: 20px; background: var(--t-surface); overflow: hidden; }
  .v3xm-row { display: flex; align-items: center; gap: 12px; min-height: 52px; width: 100%; padding: 0 14px; box-sizing: border-box;
    border: 0; border-bottom: 1px solid rgba(60,66,78,.08); background: none; font: inherit; text-align: left; color: var(--t-ink); cursor: pointer; }
  .v3xm-row:last-child { border-bottom: 0; }
  .v3xm-rico { width: 32px; height: 32px; border-radius: 10px; background: var(--t-nested); color: var(--t-blue); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; }
  .v3xm-rlbl { font-size: 16px; font-weight: 600; flex-grow: 1; min-width: 0; }
  .v3xm-chev { color: #8a8f98; flex-shrink: 0; }
  .v3xm-ver { align-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
    margin-top: -4px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--t-ink-3); cursor: pointer; }
  .v3xm-ver .v3s-dot { position: static; width: 7px; height: 7px; border-radius: 4px; background: var(--t-blue); margin: 0; }

  /* карточка, подписи, сегменты */
  .v3xm-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 22px; background: var(--t-surface); }
  .v3xm-lbl { font-size: 14px; font-weight: 600; color: var(--t-ink-2); }
  .v3xm-hint { font-size: 13px; color: var(--t-ink-3); }
  .v3xm-hint:empty { display: none; }
  .v3xm-seg { display: flex; gap: 3px; padding: 3px; border-radius: 17px; background: var(--t-nested); border: 1px solid var(--t-line); }
  .v3xm-seg button { white-space: nowrap; border: 0; padding: 8px 14px; min-height: 36px; border-radius: 14px; font: inherit;
    font-size: 13.5px; font-weight: 650; background: transparent; color: var(--t-ink-2); cursor: pointer; }
  .v3xm-seg button.on { background: var(--t-surface); color: var(--t-blue-ink); box-shadow: 0 1px 3px rgba(22,26,36,.16); }
  .v3xm-seg.sm { flex-shrink: 0; }
  .v3xm-seg.sm button { padding: 7px 10px; min-height: 34px; }
  .v3xm-caprow { display: flex; align-items: baseline; gap: 10px; padding: 6px 6px 0; }
  .v3xm-cap { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--t-ink-3); flex-grow: 1; }
  .v3xm-link { font: inherit; font-size: 13.5px; font-weight: 650; color: var(--t-blue); background: none; border: 0; padding: 0;
    cursor: pointer; white-space: nowrap; }
  .v3xm-caprow .v3xm-link { min-height: 32px; }
  .v3xm-note { font-size: 13.5px; color: var(--t-ink-3); padding: 0 6px; }

  /* строки группы */
  .v3xm-srow { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; box-sizing: border-box;
    border-bottom: 1px solid rgba(60,66,78,.08); }
  .v3xm-srow:last-child { border-bottom: 0; }
  .v3xm-sl { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
  .v3xm-sl b { font-size: 16px; font-weight: 600; }
  .v3xm-sl span { font-size: 13px; color: var(--t-ink-3); }
  .v3xm-tap { width: 100%; border-left: 0; border-right: 0; border-top: 0; background: none; font: inherit; text-align: left;
    color: var(--t-ink); cursor: pointer; }
  .v3xm .v3s-sw { min-height: 44px; }
  .v3xm-numw { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .v3xm-num { width: 78px; height: 40px; box-sizing: border-box; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--t-line-2);
    font: inherit; font-size: 16px; font-weight: 650; text-align: right; background: var(--t-surface); color: var(--t-ink); outline: none;
    box-shadow: none; font-variant-numeric: tabular-nums; }
  .v3xm-unit { font-size: 13.5px; color: var(--t-ink-3); white-space: nowrap; }

  /* поля */
  .v3xm-fld { display: flex; flex-direction: column; gap: 7px; }
  .v3xm-fld > span { font-size: 14px; font-weight: 600; color: var(--t-ink-2); }
  .v3xm-inp { width: 100%; height: 50px; box-sizing: border-box; padding: 0 15px; border-radius: 16px; border: 1.5px solid var(--t-line-2);
    font: inherit; font-size: 16px; background: var(--t-surface); color: var(--t-ink); outline: none; box-shadow: none; }
  .v3xm-inp[readonly] { background: var(--t-row); color: var(--t-ink-2); }
  .v3xm-inp:focus, .v3xm-num:focus, .v3xm-pin:focus { border-color: var(--t-blue); }

  /* кнопка второго плана во всю ширину (Integr: «Проверить сейчас») */
  .v3xm-btn2 { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 28px; width: 100%;
    font: inherit; font-size: 17px; font-weight: 700; background: var(--t-surface); color: var(--t-ink); border: 1px solid var(--t-line);
    cursor: pointer; flex-shrink: 0; }
  .v3xm-btn2:disabled { opacity: .55; }

  /* карточки-строки: машины, люди */
  .v3xm-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 20px; background: var(--t-surface);
    color: var(--t-ink); border: 0; width: 100%; box-sizing: border-box; font: inherit; text-align: left; cursor: pointer; min-height: 64px; }
  .v3xm-item.off > :not(.v3xm-chev) { opacity: .55; }
  .v3xm-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--mc); flex-shrink: 0; }
  .v3xm-av { width: 38px; height: 38px; border-radius: 19px; background: var(--av, #5b6d86); color: #fff; font-size: 13px; font-weight: 750;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .v3xm-im { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
  .v3xm-im b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v3xm-im span { font-size: 13.5px; color: var(--t-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v3xm-im span.bad { color: #b3202e; }
  .v3xm-item .v3-pill { flex-shrink: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
  .v3xm .v3-pill.blue { background: rgba(10,95,208,.1); color: var(--t-blue-ink); }
  .v3xm .v3-pill.warn { background: rgba(232,137,12,.16); color: #8a4b00; }
  .v3xm-warn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 48px; border-radius: 18px; border: 0;
    background: rgba(232,137,12,.14); color: #6e4300; font: inherit; font-weight: 650; text-align: left; width: 100%; cursor: pointer; }
  .v3xm-warn svg { flex-shrink: 0; }
  .v3xm-warn-t { font-size: 13.5px; opacity: .8; flex-shrink: 0; }

  /* прайс: карточка с сеткой подписанных полей */
  .v3xm-ptitle { font-weight: 750; }
  .v3xm-pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .v3xm-pf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .v3xm-pf > span { font-size: 12px; color: var(--t-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v3xm-pin { height: 42px; box-sizing: border-box; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--t-line-2);
    font: inherit; font-size: 15px; font-weight: 650; text-align: right; min-width: 0; width: 100%; background: var(--t-surface);
    color: var(--t-ink); outline: none; box-shadow: none; font-variant-numeric: tabular-nums; }

  /* связи */
  .v3xm-ch { display: flex; align-items: center; gap: 8px; }
  .v3xm-ch b { font-size: 16px; font-weight: 750; flex-grow: 1; min-width: 0; }
  .v3xm-ctext { font-size: 14px; color: var(--t-ink-2); }
  .v3xm-card .v3-alert { font-size: 13.5px; }

  [data-theme="dark"] .v3xm { --v3s-ink-av: #3a3d45; }
  [data-theme="dark"] .v3xm .v3-pill.warn, [data-theme="dark"] .v3xm-warn { background: rgba(255,178,60,.14); color: #ffcf85; }
  [data-theme="dark"] .v3xm-im span.bad { color: var(--t-bad-ink); }
}

/* Широкий телефон / планшет (600–860): машины и люди — в две колонки, а не растянутыми строками */
@media (min-width: 600px) and (max-width: 860px) {
  .v3xm-body:has(> .v3xm-item) { flex-flow: row wrap; align-content: flex-start; }
  .v3xm-body:has(> .v3xm-item) > * { flex: 1 1 100%; min-width: 0; }
  .v3xm-body > .v3xm-item { flex: 0 1 calc(50% - 5px); }
}

/* действия машины / сотрудника — список в нижней шторке (#m-generic) */
.v3xm-shsub { margin: -4px 0 0; font-size: 13.5px; color: var(--t-ink-3); }
.v3xm-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.v3xm-act { min-height: 50px; padding: 0 16px; border-radius: 16px; border: 1px solid var(--t-line); background: var(--t-surface);
  font: inherit; font-size: 16px; font-weight: 600; color: var(--t-ink); text-align: left; cursor: pointer; }
.v3xm-act:active { background: var(--t-row); }
.v3xm-act.bad { color: #e0313f; }
[data-theme="dark"] .v3xm-act.bad { color: var(--t-bad-ink); }
.v3s-tgrp-n { font-weight: 500; color: var(--t-ink-3); margin-left: 6px; text-transform: none; letter-spacing: 0; }
