/* ---------- шрифт макетов, свои файлы (без внешних CDN) */
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/golos-text-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/golos-text-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/golos-text-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/golos-text-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 600; src: url(/fonts/golos-text-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 600; src: url(/fonts/golos-text-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/golos-text-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/golos-text-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- цвета — переменные; фирменные значения подставляет API компании (белая этикетка) */
:root {
  --brand: #8AC650;
  --brand-dark: #457A1B;
  --brand-soft: #eef7e3;
  --bg: #f4f6f4;
  --surface: #ffffff;
  --text: #1c2419;
  --muted: #64716a;
  --border: #e3e8e3;
  --danger: #e11d48;
  --danger-bg: #fff1f2;
  --warn: #b45309;
  --warn-bg: #fff7e6;
  --sandbox: #f59e0b;
  --radius: 14px;
  --font: 'Golos Text', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sidebar: 224px;
  --topbar: 58px;
  --bottomnav: 62px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.icon { flex: none; vertical-align: middle; }

#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- полоса контура */
/* Полоса всегда в одну строку (34px): шапка и боковая панель закреплены ровно под ней; лишнее обрезается многоточием. */
.banner { position: sticky; top: 0; z-index: 100; height: 34px; box-sizing: border-box; padding: 7px 16px; text-align: center; font-size: 13px; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner--sandbox { background: var(--sandbox); color: #1c1400; }
.banner code { font-family: ui-monospace, Consolas, monospace; background: rgba(0, 0, 0, 0.12); padding: 1px 6px; border-radius: 6px; }

/* ---------- базовые элементы */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 6px 20px rgba(28, 36, 25, 0.04); min-width: 0; }
.card + .card { margin-top: 14px; }
.field { display: block; margin: 0 0 14px; text-align: left; min-width: 0; }
.field__label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field__hint { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.input, .select { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; font: inherit; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); }
/* длинные подписи в выпадашке (машина · клиент) обрезаются, а не растягивают форму за экран */
select.select { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.input--static { background: var(--bg); color: var(--muted); }
.input:focus, .select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand-dark); }
.select { width: auto; padding-right: 30px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--brand-dark); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn--primary { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn--primary:hover { filter: brightness(1.08); }
.btn--danger { color: var(--danger); }
.btn--link { border: 0; background: none; color: var(--brand-dark); font-weight: 500; }
.btn--small { padding: 6px 10px; font-size: 13px; }
.btn--block { display: flex; justify-content: center; width: 100%; margin-top: 6px; }
.alert { padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; font-size: 15px; }
.alert--error { background: var(--danger-bg); color: var(--danger); }
a.alert--link { display: block; text-decoration: none; font-weight: 600; }
a.alert--link:hover { text-decoration: underline; }
.card--danger { border-color: var(--danger); }
.alert--info { background: var(--brand-soft); color: var(--brand-dark); }
.alert--danger { background: var(--danger-bg); color: #7f1d1d; border: 1px solid #fecdd3; }
.logo { object-fit: contain; display: block; margin: 0 auto 8px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; white-space: nowrap; }
.tag--muted { background: var(--bg); color: var(--muted); }
.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.props { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.props dt { color: var(--muted); }
.props dd { margin: 0; }
.list { display: grid; gap: 10px; }
.list__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: inherit; }
.list__item:hover { text-decoration: none; border-color: var(--brand-dark); }
.list__icon { color: var(--brand-dark); margin-right: 10px; }
.segmented { display: inline-flex; flex-wrap: wrap; max-width: 100%; background: var(--bg); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented__btn { font: inherit; font-size: 14px; font-weight: 500; border: 0; background: none; padding: 6px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; text-decoration: none; }
.segmented__btn.is-active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.segmented__btn:hover { text-decoration: none; color: var(--text); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; }
.table--rows tbody tr:hover { background: var(--bg); }
.kind { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.kind--handover { background: var(--brand-soft); color: var(--brand-dark); }
.kind--return { background: #e6f4ff; color: #0b5fa5; }
.kind--overdue { background: var(--danger-bg); color: var(--danger); }
.kind--issued { background: #eef2ee; color: var(--muted); }
.done { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }

/* ---------- страницы входа / пароля / первого запуска */
.auth { flex: 1; display: grid; place-items: center; padding: 24px; }
.auth__card { width: min(420px, 100%); text-align: center; padding: 32px 28px 24px; }
.auth__card--wide { width: min(520px, 100%); }
.auth__title { margin: 4px 0 2px; font-size: 26px; }
.auth__subtitle { margin: 0 0 18px; color: var(--muted); }
.auth__section { margin: 18px 0 10px; font-size: 13px; color: var(--muted); text-align: left; text-transform: uppercase; letter-spacing: 0.06em; }
.auth__powered { margin: 16px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- каркас: боковая панель + верхняя панель + страница */
.shell { flex: 1; display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 0; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; height: 100dvh; }
.banner ~ .shell .sidebar { top: 34px; height: calc(100vh - 34px); height: calc(100dvh - 34px); }
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; color: inherit; font-weight: 700; }
.sidebar__brand:hover { text-decoration: none; }
.sidebar__brand .logo { margin: 0; }
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 500; }
.sidebar__item:hover { background: var(--bg); text-decoration: none; }
.sidebar__item.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.sidebar__user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; color: inherit; }
.sidebar__user:hover { background: var(--bg); text-decoration: none; }
.sidebar__user-text { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar__user-text small { color: var(--muted); }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.banner ~ .shell .topbar { top: 34px; }
.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__logo { display: none; }
.topbar__logo .logo { margin: 0; }
.topbar__title { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { display: flex; align-items: center; gap: 10px; }
.topbar__branch { font-size: 14px; }
.page { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 20px 22px 40px; }
.bottomnav { display: none; }

/* ---------- «Сегодня» */
.today__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.today__date { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.today__clock { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; color: inherit; display: flex; flex-direction: column; gap: 2px; }
.tile:hover { text-decoration: none; border-color: var(--brand-dark); }
.tile__label { color: var(--muted); font-size: 13px; }
.tile__value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.tile__value small { font-size: 13px; font-weight: 500; color: var(--muted); }
.tile--danger .tile__value { color: var(--danger); }
.cols { display: grid; gap: 14px; align-items: start; }
.cols--2-1 { grid-template-columns: 2fr 1fr; }
.cols--1-1 { grid-template-columns: 1fr 1fr; margin-top: 14px; }
.block__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.block__head h2 { margin: 0; }
.block--link { display: block; color: inherit; }
.block--link:hover { text-decoration: none; border-color: var(--brand-dark); }
.block--link p { margin: 0; }
.quick { display: none; }

/* лента */
.timeline { position: relative; display: flex; flex-direction: column; gap: 8px; }
.timeline__now { display: flex; align-items: center; gap: 10px; color: var(--danger); font-size: 13px; font-weight: 600; }
.timeline__now::after { content: ''; flex: 1; border-top: 2px dashed var(--danger); opacity: 0.5; }
.bline { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.bline--issued { opacity: 0.65; }
.bline--late { border-color: #fdba74; background: var(--warn-bg); }
.bline--overdue { border-color: #fecdd3; background: var(--danger-bg); }
.bline__time { font-weight: 700; color: var(--text); }
.bline__title { font-weight: 600; }
.bline__car { color: var(--text); }
.bline__sub { font-size: 14px; }
.bline__client { color: var(--text); }
.bline__action { min-width: 0; }

/* просрочка */
.overdue { display: flex; gap: 12px; align-items: flex-start; }
.overdue__list { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.overdue__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.overdue a { color: inherit; }

/* доска */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
.col { background: var(--bg); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; border-top: 3px solid var(--border); }
.col--primary { border-top-color: var(--brand); }
.col--danger { border-top-color: var(--danger); }
.col--done { border-top-color: #cbd5cf; }
.col__head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; padding: 2px 4px 6px; color: var(--text); }
.col__head:hover { text-decoration: none; }
.col__empty { padding: 4px; }
.kcard { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.kcard__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kcard__car { font-weight: 700; color: var(--text); }
.kcard__client { color: var(--text); }
.kcard__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }

/* центр с помощником */
.assistant { margin-bottom: 14px; }
.assistant__row { display: flex; align-items: center; gap: 10px; }
.assistant__icon { color: var(--brand-dark); }
.assistant p { margin: 8px 0 0; }
.events { display: flex; flex-direction: column; gap: 6px; }
.event { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); }
.event--overdue { background: var(--danger-bg); border-color: #fecdd3; }
.event__time { font-weight: 700; }
.event__text a { color: var(--text); font-weight: 600; }

/* план смены («Астра») */
.plan { display: flex; flex-direction: column; }
.plan__row { display: grid; grid-template-columns: 84px 1.3fr 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--border); }
.plan__row:first-child { border-top: 0; }
.plan__time { display: flex; flex-direction: column; }
.plan__car { color: var(--text); font-weight: 600; display: block; }
.plan__row small { display: block; }
.plan__action { text-align: right; }

/* настройки компании и филиалы */
fieldset.card { border: 1px solid var(--border); min-width: 0; }
fieldset.card:disabled { opacity: 0.7; }
/* поля формы внутри карточки, блокируемые на время сохранения (форма тарифа): без рамки и отступов */
.fieldset-plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.fieldset-plain:disabled { opacity: 0.7; }
.settings .card + .card { margin-top: 14px; }
/* minmax(0, 1fr): колонка сжимается до ширины экрана, а не до самой длинной подписи в выпадашке */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
.grid-2 > * { min-width: 0; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.color-row { display: flex; align-items: center; gap: 8px; }
.color-row input[type="color"] { width: 44px; height: 42px; padding: 2px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.logo-row { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.logo-preview { width: 120px; height: 120px; border: 1px dashed var(--border); border-radius: 12px; display: grid; place-items: center; padding: 8px; text-align: center; background: #fff; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.branch { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.branch:first-child { border-top: 0; }
.branch--off { opacity: 0.6; }
.branch--edit { display: block; }
.branch__actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* сотрудники, токены, журнал */
.member { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.member:first-child { border-top: 0; }
.member--off { opacity: 0.6; }
.member--edit { display: block; }
.member__main { min-width: 0; }
.member__main .tag { margin-left: 6px; }
.member__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tag--danger { background: var(--danger-bg); color: var(--danger); }
.chip--check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.secret { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.secret__value { font-family: ui-monospace, Consolas, monospace; font-size: 17px; font-weight: 700; word-break: break-all; margin: 4px 0; user-select: all; }
.secret__actions { display: flex; gap: 6px; }
.filters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 12px; }
.json { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--bg); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; max-height: 320px; overflow: auto; }

/* заглушки */
.placeholder { max-width: 560px; margin: 24px auto; text-align: center; }
.placeholder__icon { color: var(--brand-dark); margin-bottom: 6px; }
.placeholder__when { margin: 10px 0 18px; }

/* ---------- телефон */
@media (max-width: 899px) {
  :root { --sidebar: 0px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 14px; }
  .topbar__logo { display: inline-flex; }
  .topbar__title { font-size: 18px; }
  .topbar__new { display: none; }
  .page { padding: 14px 12px calc(var(--bottomnav) + 20px); }
  .bottomnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: var(--bottomnav); background: var(--surface); border-top: 1px solid var(--border); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); }
  .bottomnav__item.is-active { color: var(--brand-dark); }
  .bottomnav__item:hover { text-decoration: none; }
  .quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
  .quick__btn { display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; padding: 16px 12px; border-radius: 14px; border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; }
  .quick__btn--primary { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tile { padding: 10px 12px; }
  .tile__value { font-size: 22px; }
  .cols--2-1, .cols--1-1 { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .bline { grid-template-columns: 48px 1fr; }
  .bline__action { grid-column: 2; }
  .plan__row { grid-template-columns: 64px 1fr; }
  .plan__action { grid-column: 2; text-align: left; }
  .event { grid-template-columns: 48px 1fr; }
  .table thead { display: none; }
  .table tr { display: block; border-bottom: 1px solid var(--border); padding: 6px 0; }
  .table td { display: block; border: 0; padding: 2px 0; }
  .table td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); }
  .props { grid-template-columns: 1fr; gap: 2px; }
  .props dt { margin-top: 8px; font-size: 13px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
}

/* ---------- money (step 9) */
.money-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.tile__rows { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; border-top: 1px solid var(--border); padding-top: 6px; }
.tile__row { display: flex; justify-content: space-between; gap: 8px; width: 100%; font: inherit; background: none; border: 0; padding: 2px 0; color: inherit; cursor: pointer; text-align: left; font-variant-numeric: tabular-nums; }
.tile__row:hover span { color: var(--brand-dark); }
.money-tiles .tile__value small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.money-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 8px; }
.money-mini div { display: flex; flex-direction: column; line-height: 1.25; }
.money-mini b { font-size: 16px; font-variant-numeric: tabular-nums; }
.money-form .actions { margin-top: 12px; }
.grid-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.grid-3 > * { min-width: 0; }
.money-form .select { width: 100%; }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount--in { color: var(--brand-dark); }
.amount--out { color: #b42318; }
.amount--reversal { color: var(--muted); }
.tag--danger { background: #fde8e8; color: #b42318; }
.row--muted td { color: var(--muted); }
.table th.num, .table td.num { text-align: right; white-space: nowrap; }
ul.plain { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
@media (max-width: 899px) {
  .money-tiles, .money-mini { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .table td.num { text-align: left; }
}

/* ---------- машины (шаг 12) */
.actions--inline { margin-top: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cars-filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 0 12px; align-items: start; }
.cars-filters__check { margin-top: 34px; white-space: nowrap; }
.car-cell { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.car-thumb { width: 44px; height: 32px; object-fit: cover; border-radius: 6px; background: var(--bg); flex: none; }
.car-thumb--empty { display: inline-grid; place-items: center; color: var(--muted); }
.car-table .table { font-size: 13px; }
.car-table .table th, .car-table .table td { padding: 6px 5px; }
.car-table tbody tr { cursor: pointer; }
.car-table .tag { margin-left: 0; margin-top: 3px; display: inline-block; font-size: 11px; }
.car-table .plate { white-space: nowrap; }
.state { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; font-weight: 600; }
.state--ready { background: var(--brand-soft); color: var(--brand-dark); }
.state--do_not_issue { background: #eef2ee; color: var(--muted); }
.state--repair, .state--needs_service { background: var(--warn-bg); color: var(--warn); }
.state--long_term { background: #e6f4ff; color: #0b5fa5; }
.state--withdrawn { background: var(--danger-bg); color: var(--danger); }
.car-cards { display: none; }
.car-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; color: inherit; }
.car-card:hover { text-decoration: none; border-color: var(--brand-dark); }
.car-card--muted { opacity: 0.65; }
.car-card .car-thumb { width: 72px; height: 54px; }
.car-card__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.car-card__tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.carhead { display: flex; gap: 18px; align-items: flex-start; }
.carhead__photo { width: 180px; height: 124px; flex: none; border-radius: 12px; background: var(--bg); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.carhead__photo img { width: 100%; height: 100%; object-fit: cover; }
.carhead__body { min-width: 0; flex: 1; }
.carhead__title { margin: 0 0 4px; font-size: 20px; }
.carhead__tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.carhead__withdrawn { margin: 10px 0 0; }
.stateform { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; margin-top: 12px; align-items: center; }
.stateform .select { width: auto; }
.tabs { margin: 14px 0; }
.props-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin-bottom: 14px; }
.props-groups .card + .card { margin-top: 0; }
.props--wide { margin-bottom: 12px; }
.pre { white-space: pre-wrap; margin: 0 0 12px; }
.price-table th:first-child, .price-table td:first-child { white-space: nowrap; }
.input--cell { width: 110px; padding: 6px 8px; font-size: 14px; text-align: right; }
.upload-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.upload-row .select { width: auto; }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.file-tile { border: 1px solid var(--border); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.file-tile--main { border-color: var(--brand-dark); box-shadow: 0 0 0 2px var(--brand-soft); }
.file-tile__preview { display: block; height: 120px; border-radius: 8px; overflow: hidden; background: var(--bg); }
.file-tile__preview img { width: 100%; height: 100%; object-fit: cover; }
.file-tile__doc { display: grid; place-items: center; height: 100%; font-weight: 700; color: var(--muted); }
.file-tile__name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-tile__actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 2px; }
.file-tile__actions .btn--link { padding: 2px 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 600; }
a.chip:hover { border-color: var(--brand-dark); text-decoration: none; }
.tariff-kinds .input { min-width: 160px; }
.conflicts { margin-bottom: 14px; }
.conflict { display: grid; grid-template-columns: 160px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.conflict:first-of-type { border-top: 0; }
.conflict__actions { display: flex; gap: 6px; }
.change { font-size: 14px; }
.change__field { color: var(--muted); }
.change__old { color: var(--muted); text-decoration: line-through; }
.history td { vertical-align: top; }
textarea.input { resize: vertical; min-height: 60px; font-family: inherit; }
@media (max-width: 899px) {
  .car-table { display: none; }
  .car-cards { display: grid; gap: 10px; }
  .cars-filters { grid-template-columns: 1fr 1fr; }
  .cars-filters__check { margin: 0 0 14px; grid-column: 1 / -1; }
  .carhead { flex-direction: column; }
  .carhead__photo { width: 100%; height: 180px; }
  .stateform { grid-template-columns: 1fr; }
  .stateform .select { width: 100%; }
  .conflict { grid-template-columns: 1fr; }
  .props-groups { grid-template-columns: 1fr; }
  /* таблицы цен и ступеней остаются таблицами с прокруткой, а не «строка = блок» */
  .price-table thead, .tariff-kinds thead { display: table-header-group; }
  .price-table tr, .tariff-kinds tr { display: table-row; padding: 0; }
  .price-table td, .price-table th, .tariff-kinds td, .tariff-kinds th { display: table-cell; padding: 8px 6px; }
  .table.price-table td.num { text-align: right; }
  .input--cell { width: 90px; }
}
