/* IBM Plex Sans (SIL OFL 1.1, static/fonts/OFL-LICENSE.txt) — один и тот же шрифт на iPhone, Android и компьютере */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-ext-400-normal.a6b932e088f5.woff2") format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-400-normal.28878623fbda.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-400-normal.0e2c71ca88ef.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.0ceb759015a6.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: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-ext-500-normal.18beaa988dd6.woff2") format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-500-normal.00b082966f42.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-500-normal.9e50dcc81c7e.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.767677e47513.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: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-ext-600-normal.adb29c43081c.woff2") format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-600-normal.c86ba42fcb25.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-600-normal.4267dfb25bc2.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.e78568807d10.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: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-ext-700-normal.cbd0ac2853e4.woff2") format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-700-normal.961e005d664f.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-700-normal.0f2d41d2b986.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-700-normal.f9b6356e32a9.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; }

/* Carsel — общий стиль, вариант «Гараж»: графит + жёлтый. Цвета меняются в одном месте: :root */
:root {
  --bg: #ECEEF0;
  --surface: #FFFFFF;
  --ink: #1E2124;
  --muted: #5B6168;
  --line: #D9DCE0;
  --line-soft: #E9EBED;
  --field: #C3C8CE;
  --accent: #25292D;        /* графит: выбранное, рамки фокуса, ссылки */
  --accent-dark: #15181B;
  --accent-soft: #FFF4CC;   /* светло-жёлтый фон выбранного */
  --yellow: #F2B705;        /* главная кнопка, активный пункт меню */
  --yellow-dark: #DCA500;
  --ok: #1E6B45;
  --ok-soft: #E3F1E8;
  --warn: #7A4F00;
  --warn-soft: #FBF0D9;
  --danger: #8A2B2B;
  --danger-soft: #F7E4E1;
  --header: #25292D;
  --radius: 12px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--bg);
  min-height: 100vh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
a { color: var(--accent); text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); text-decoration-color: var(--yellow-dark); }
h1 { font-size: 28px; font-weight: 700; margin: 0; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Шапка ---------- */
.topbar {
  background: var(--header);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  min-height: 60px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { color: #fff; font-weight: 700; font-size: 20px; text-decoration: none; display: flex; align-items: center; gap: 10px; line-height: 1.1; }
.brand > span { display: flex; flex-direction: column; }
.brand small { font-weight: 400; font-size: 11px; color: #AEB3B8; }
.brand:hover { color: #fff; }
/* знак: жёлтый квадрат с «окошком», как табличка/инструмент */
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--yellow); position: relative; flex-shrink: 0; display: inline-block; }
.brand-mark::after { content: ""; position: absolute; inset: 8px 6px; border: 3px solid var(--header); border-radius: 3px; }
.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; align-self: stretch; }
.nav a { color: #C9CDD2; padding: 0 11px; display: flex; align-items: center; text-decoration: none; font-size: 15px; font-weight: 500; min-height: 60px; }
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; box-shadow: inset 0 -4px 0 var(--yellow); }
.top-new { background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 15px; padding: 9px 16px; border-radius: 9px; text-decoration: none; white-space: nowrap; }
.top-new:hover { background: var(--yellow-dark); color: var(--ink); }
.nav .badge { background: #C0392B; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.topbar-right a, .topbar-right button.link { color: #fff; }
.org-chip { color: #D5D7DA; text-decoration: none; }
.lang-form { display: flex; }
.lang-form button {
  background: none; border: 1px solid #5A6066; color: #D5D7DA; font: inherit; font-size: 12px; font-weight: 600;
  padding: 4px 8px; cursor: pointer;
}
.lang-form button:first-child { border-radius: 5px 0 0 5px; }
.lang-form button:last-child { border-radius: 0 5px 5px 0; border-left: 0; }
.lang-form button.on { background: #fff; color: var(--ink); border-color: #fff; }
button.link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.menu-toggle { display: none; }

/* ---------- Раскладка ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { flex: 1 1 auto; }   /* заголовок не сжимается в две строки — соседние блоки переносятся ниже */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
/* госномер — как настоящая табличка */
.plate { display: inline-block; border: 1.5px solid var(--ink); border-radius: 4px; padding: 0 6px; background: #fff; color: var(--ink); font-weight: 700; font-size: 12.5px; line-height: 1.5; letter-spacing: .02em; white-space: nowrap; }
.card + .card { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 8px; }

/* ---------- Формы ---------- */
label, .label { display: block; font-size: 13px; font-weight: 500; color: #4A4E53; margin-bottom: 6px; }
input:not([type]), input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=date], input[type=file], select, textarea {
  -webkit-appearance: none; appearance: none;   /* iPhone не добавляет свои тени и скругления */
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px — чтобы iPhone не увеличивал страницу при вводе */
  padding: 10px 12px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
select:not([multiple]) { padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235B6168' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 12px center; }
select[multiple] { padding: 6px; min-height: 44px; }
input[type=date] { min-height: 46px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.field { margin-bottom: 14px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .err, .errorlist { color: var(--danger); font-size: 13px; margin: 4px 0 0; padding: 0; list-style: none; }
.radio-row { display: flex; gap: 0; border: 1px solid var(--accent); border-radius: 8px; overflow: hidden; }
.radio-row label { flex: 1; margin: 0; text-align: center; padding: 11px; font-size: 15px; font-weight: 600; color: var(--accent); cursor: pointer; }
.radio-row input { position: absolute; opacity: 0; }
.radio-row label:has(input:checked) { background: var(--accent); color: #fff; }
.checkbox { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--ink); }
.checkbox input { width: 18px; height: 18px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 15px; font-weight: 600;
  min-height: 44px; padding: 10px 18px;
  border-radius: 9px; border: 1px solid var(--yellow);
  background: var(--yellow); color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); color: var(--ink); }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }
.btn-plain { background: #fff; color: var(--ink); border-color: var(--field); }
.btn-plain:hover { background: #F6F5F1; color: var(--ink); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #154F33; border-color: #154F33; color: #fff; }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--field); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-dashed { background: #fff; color: var(--ink); border: 1.5px dashed var(--accent); }
.btn-dashed:hover { background: var(--accent-soft); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
form.inline { display: inline; }

/* ---------- Таблицы ---------- */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 13px; font-weight: 600; color: var(--muted); text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
/* цветная полоса слева = статус заказа */
.table tr.st-new td:first-child { box-shadow: inset 5px 0 0 var(--yellow); }
.table tr.st-paid td:first-child { box-shadow: inset 5px 0 0 #2E9E5B; }
.table tr.st-cancelled td:first-child { box-shadow: inset 5px 0 0 #C2413A; }
.table tr[class^="st-"] td:first-child { padding-left: 16px; }
.table td .sub .plate { margin-top: 3px; }
.table td { font-size: 14px; padding: 12px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .sub { display: block; color: var(--muted); font-size: 13px; }
.table tfoot td { font-weight: 700; }

/* ---------- Метки ---------- */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.tag-new, .tag-pending { background: #FFF1BF; color: #6E5200; }
.tag-paid, .tag-active { background: var(--ok-soft); color: var(--ok); }
.tag-rejected { background: var(--line-soft); color: #4A4E53; }
.tag-cancelled { background: #FDECEC; color: #B42318; font-weight: 700; }
.chip { display: inline-block; font-size: 13px; padding: 3px 8px; background: #E4E7EA; border-radius: 4px; margin: 2px 4px 2px 0; }

/* ---------- Сообщения ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; font-size: 14px; }
.msg-success { background: var(--ok-soft); color: #154F33; }
.msg-error, .msg-danger { background: var(--danger-soft); color: var(--danger); }
.msg-warning, .msg-info { background: var(--warn-soft); color: #5A3B00; }
.note { background: var(--warn-soft); color: #5A3B00; border-radius: 10px; padding: 14px 16px; font-size: 13px; }

/* ---------- Вкладки ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 12px 16px; font-size: 15px; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--yellow); }

/* ---------- Фильтры ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input[type=search] { flex: 1; min-width: 220px; }
.filters select, .filters input[type=date] { width: auto; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills a { padding: 7px 13px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink); }
.pills a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; align-items: center; font-size: 14px; }

/* ---------- Экран входа ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top { display: flex; justify-content: flex-end; padding: 16px 24px; }
.auth-top .lang-form button { border-color: var(--ink); color: var(--ink); background: #fff; font-size: 14px; padding: 8px 12px; }
.auth-top .lang-form button.on { background: var(--ink); color: #fff; }
.auth-box { width: 100%; max-width: 440px; margin: 20px auto 60px; padding: 0 16px; }
.auth-box.wide { max-width: 540px; }
.auth-logo { font-size: 24px; font-weight: 700; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; }
.auth-logo .brand-mark::after { border-color: var(--ink); }
.auth-logo small { flex: 0 0 100%; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; }

/* ---------- Карточки организаций ---------- */
.org-card { display: flex; flex-direction: column; gap: 14px; }
.org-head { display: flex; gap: 14px; align-items: center; }
.org-logo { width: 48px; height: 48px; border-radius: 10px; background: var(--yellow); color: var(--ink); font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.org-logo img { width: 100%; height: 100%; object-fit: cover; }
.stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat b { display: block; font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
@media (max-width: 720px) { .stat b { font-size: 18px; } }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.kpi span { display: block; font-size: 13px; color: var(--muted); }
.kpi b { font-size: 24px; }

/* ---------- Заказ ---------- */
.remove-line { border: 0; background: none; font-size: 22px; color: var(--danger); cursor: pointer; width: 40px; height: 40px; }
.total { font-size: 20px; font-weight: 700; }
.history-item { padding-top: 10px; border-top: 1px solid var(--line-soft); margin-top: 10px; }
.new-car { background: #F4F5F6; border-radius: 10px; padding: 14px; margin-top: 10px; }
.found { color: var(--ok); font-size: 13px; font-weight: 500; margin-top: 4px; }
.car-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.car-pill { flex: 1; min-width: 140px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); }
.car-pill.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.car-pill small { display: block; color: #4A4E53; }
.next-box { background: var(--accent); color: #fff; border-radius: var(--radius); padding: 16px 20px; }
.next-box h2 { color: #fff; font-size: 16px; }
.next-box .row-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 15px; }

/* ---------- Смартфон ---------- */
@media (max-width: 900px) {
  .with-aside { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .page { padding: 16px; }
  h1 { font-size: 22px; }
  .topbar { flex-wrap: wrap; padding: 8px 12px 8px 16px; gap: 8px; min-height: 56px; }
  .brand small { display: none; }
  .top-new { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; background: none; border: 0; color: #fff; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
  .nav, .topbar-right { display: none; width: 100%; }
  .topbar.open .nav { display: flex; flex-direction: column; flex: 0 0 100%; }
  .topbar.open .topbar-right { display: flex; flex-wrap: wrap; padding: 8px 0 12px; }
  .nav a { padding: 12px; font-size: 16px; min-height: 48px; border-radius: 8px; }
  .nav a.active { box-shadow: inset 4px 0 0 var(--yellow); background: #30353A; }
  .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .actions .btn { flex: 1; }
  .filters select, .filters input[type=date] { flex: 1; }

  /* Таблицы превращаются в карточки */
  .table-wrap.cards { background: none; border: 0; padding: 0; }
  .cards table.table, .cards .table tbody, .cards .table tr, .cards .table td { display: block; width: 100%; }
  .cards .table thead { display: none; }
  .cards .table tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 10px; }
  .cards .table tr.st-new { border-left: 6px solid var(--yellow); }
  .cards .table tr.st-paid { border-left: 6px solid #2E9E5B; }
  .cards .table tr.st-cancelled { border-left: 6px solid #C2413A; }
  .cards .table tr[class^="st-"] td:first-child { box-shadow: none; padding-left: 0; }
  .cards .table td { border: 0; padding: 4px 0; text-align: left !important; }
  .cards .table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .cards .table tfoot { display: block; }

}

/* ---------- Печать ---------- */
@media print {
  .topbar, .actions, .no-print { display: none !important; }
  body { background: #fff; }
}

/* Поле «Марка и модель» с подсказками */
.car-search { position: relative; }
.car-options {
  position: absolute; left: 0; right: 0; z-index: 20; margin: 4px 0 0; padding: 4px 0; list-style: none;
  max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.car-options li { padding: 11px 14px; cursor: pointer; font-size: 15px; }
.car-options li:hover, .car-options li.active { background: var(--accent-soft); color: var(--accent-dark); }
.mileage-field { margin-top: 14px; }
.mileage-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 12px; margin-top: 14px; }
.mileage-row .field { margin-bottom: 0; }
.mileage-row .warn-text { grid-column: 1 / -1; }
.due-overdue { color: #8A2B2B !important; font-weight: 600; }
.due-soon { color: #7A4F00 !important; }

[hidden] { display: none !important; }  /* скрытые элементы не показываем, даже если у них свой display */

/* Обязательные поля */
label.req::after { content: " *"; color: #B42318; font-weight: 700; }
form.was-validated input:invalid { border-color: #B42318; background: #FFF6F5; }
.warn-text { color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 6px 10px; margin-top: 6px; font-size: 13px; }


/* «Мои товары»: массовое добавление и цены */
.bulk-filters { padding: 12px; margin-bottom: 10px; position: sticky; top: 60px; z-index: 5; }
.type-chips { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chip-btn { flex-shrink: 0; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--ink); }
.chip-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.bulk-list, .price-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 76px; }
.bulk-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); cursor: pointer; margin: 0; font-size: 15px; }
.bulk-item input { width: 20px; height: 20px; flex-shrink: 0; margin: 0; }
.bulk-item:has(input:checked:not(:disabled)) { background: var(--accent-soft); }
.bulk-item.is-have { opacity: .55; cursor: default; }
.bulk-name { flex: 1; min-width: 0; }
.bulk-type { display: block; font-size: 12px; color: var(--muted); }
.bulk-price { color: var(--muted); font-size: 13px; white-space: nowrap; }
.bulk-have { color: var(--ok); font-size: 12px; white-space: nowrap; }
.bulk-submit { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.price-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.price-row.is-off { opacity: .55; }
.price-name { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.price-input { display: flex; align-items: center; gap: 6px; width: 140px; flex-shrink: 0; }
.price-input input { text-align: right; font-weight: 600; }
.price-input input:placeholder-shown { background: var(--warn-soft); }
.link { background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }
@media (max-width: 720px) {
  .price-input { width: 118px; }
}
.nowrap { white-space: nowrap; }
.plist { margin-bottom: 16px; }
.plist .row-check { width: 20px; height: 20px; flex-shrink: 0; margin: 0; }
.plist a.price-name { text-decoration: none; }
.plist-price { white-space: nowrap; font-weight: 600; font-size: 14px; }

/* Автомобиль клиента: список с отметкой ✓, выбор одного */
.car-choice { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.car-opt { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--field); border-radius: 10px; background: #fff; cursor: pointer; margin: 0; font-weight: 500; }
.car-opt input { position: absolute; opacity: 0; pointer-events: none; }
.car-tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--field); flex-shrink: 0; display: grid; place-items: center; font-size: 13px; color: #fff; }
.car-opt:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); padding: 10px 13px; }
.car-opt:has(input:checked) .car-tick { background: var(--accent); border-color: var(--accent); }
.car-opt:has(input:checked) .car-tick::after { content: "✓"; font-weight: 700; }
.car-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.car-text small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
#new-car-btn.on { background: var(--accent-soft); border-width: 2px; }
.car-opt { font-size: 16px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.car-text small { font-size: 13px; }

/* Бонусы в заказе */
.bonus-box { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #FBF6EA; border: 1px solid #EBDDBB; display: flex; flex-direction: column; gap: 8px; }
.bonus-box .bonus-head { font-size: 15px; }
.bonus-box input { max-width: 180px; font-weight: 600; }
.bonus-sum { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.bonus-tag { color: #8A5A00; font-weight: 600; white-space: nowrap; }
.bonus-cards { display: flex; gap: 8px; flex-wrap: wrap; }
.bonus-card { flex: 1; min-width: 150px; background: #FBF6EA; border: 1px solid #EBDDBB; border-radius: 10px; padding: 10px 14px; }
.bonus-card b { font-size: 20px; display: block; }
.bonus-card small { color: var(--muted); }


/* Выбор товаров в заказе (Android, компьютер): кнопка-поле + окно с галочками */
.line-products.enhanced { display: none !important; }
.prod-btn { -webkit-tap-highlight-color: transparent; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; min-height: 46px; padding: 8px 36px 8px 10px;
  font: inherit; font-size: 15px; text-align: left; color: var(--ink); cursor: pointer; border: 1px solid var(--field); border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235E6369' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 12px center; }
.prod-btn:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.prod-placeholder { color: var(--muted); }
.prod-chip { display: inline-block; max-width: 100%; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 14px; line-height: 1.35; }
body.sheet-open { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 24, 28, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none !important; }
.sheet-panel { background: var(--surface); width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
  border-radius: 16px 16px 0 0; box-shadow: 0 -6px 30px rgba(0,0,0,.18); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-panel { border-radius: 16px; max-height: 80vh; } }
@media (max-width: 699px) { .sheet-panel { height: 88vh; height: 88dvh; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; font-size: 17px; }
.sheet-close { border: 0; background: none; font-size: 28px; line-height: 1; width: 44px; height: 44px; margin: -8px -10px -8px 0; color: var(--muted); cursor: pointer; }
.sheet-search { margin: 0 16px 8px; width: auto !important; }
.sheet-list { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 8px; flex: 1; }
.sheet-group { position: sticky; top: 0; background: var(--surface); padding: 10px 8px 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; z-index: 1; }
.sheet-item { -webkit-tap-highlight-color: transparent; user-select: none; display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; align-items: start; padding: 11px 8px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.sheet-item[hidden] { display: none; }
.sheet-item input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); grid-row: span 2; }
.sheet-name { font-size: 15px; line-height: 1.35; word-break: break-word; }
.sheet-price { grid-column: 2; font-size: 13px; color: var(--muted); }
.sheet-item:has(input:checked) { background: var(--accent-soft); border-radius: 8px; }
.sheet-empty { padding: 16px 8px; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.sheet-sum { font-size: 14px; color: var(--muted); }
.sheet-done { min-width: 120px; }

/* ---------- Отчёты ---------- */
.ink { color: var(--ink); }
.back-link { display: inline-block; margin-bottom: 8px; font-size: 14px; text-decoration: none; }
.report-filters { align-items: center; }
.report-dates { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.report-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.report-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 40px 16px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.report-card:hover { border-color: var(--accent); }
.report-card:active { background: var(--accent-soft); }
.report-card-title { font-weight: 600; font-size: 16px; }
.report-card-title .tag { background: var(--line-soft); color: var(--muted); font-weight: 500; margin-left: 4px; vertical-align: 1px; }
.report-card-desc { font-size: 13px; color: var(--muted); line-height: 1.4; }
.report-card-kpis { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.report-card-kpis small { display: block; font-size: 12px; color: var(--muted); }
.report-card-kpis b { font-size: 17px; }
.report-card-go { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 26px; color: var(--muted); }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.report-head h2 { margin: 0 0 4px; }
.report-head p { margin: 0; }
.report-period { margin: -6px 0 14px; font-size: 14px; }
.report-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.report-kpis .kpi { padding: 12px 16px; }
.report-kpis .kpi b { font-size: 20px; overflow-wrap: anywhere; }
.rtable td.num, .rtable th.right { white-space: nowrap; }
.rtable .neg { color: var(--danger); }
.rtable .pos { color: var(--ok); }
.rtable tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.report-note { margin-top: 12px; max-width: 760px; }

@media (max-width: 720px) {
  .report-grid { grid-template-columns: 1fr; gap: 10px; }
  .report-bar .btn, .report-head .btn { width: 100%; justify-content: center; }
  .report-dates { width: 100%; }
  .report-dates input[type=date] { flex: 1; min-width: 0; }
  .report-dates .btn { width: 100%; }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .report-kpis .kpi { padding: 10px 12px; }
  .report-kpis .kpi b { font-size: 17px; }
  /* Таблица отчёта на телефоне — карточки: подпись слева, значение справа */
  .rtable { background: none; border: 0; padding: 0; overflow: visible; }
  .rtable table, .rtable tbody, .rtable tfoot, .rtable tr { display: block; width: 100%; }
  .rtable thead { display: none; }
  .rtable tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; margin-bottom: 10px; }
  .rtable td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0 !important;
    padding: 5px 0; text-align: right !important; white-space: normal !important; overflow-wrap: anywhere; }
  .rtable td::before { content: attr(data-label); flex: 0 0 auto; max-width: 55%; text-align: left; font-size: 13px; color: var(--muted); font-weight: 400; }
  .rtable td:first-child { display: block; text-align: left !important; font-weight: 600; font-size: 16px; padding-bottom: 6px;
    border-bottom: 1px solid var(--line-soft) !important; margin-bottom: 2px; }
  .rtable td:first-child::before { display: none; }
  .rtable td:empty { display: none; }
  .rtable tfoot tr { background: var(--accent-soft); border-color: var(--accent-soft); }
  .rtable tfoot td { border-top: 0; }
  .rtable tfoot td.empty { display: none; }
  /* Сводка: одна строка на показатель, прошлый период — мелко под ней */
  .rtable-compact tbody { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 14px; }
  .rtable-compact tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; border: 0; border-radius: 0;
    padding: 10px 0; margin: 0; background: none; border-bottom: 1px solid var(--line-soft); }
  .rtable-compact tr:last-child { border-bottom: 0; }
  .rtable-compact td:first-child { font-size: 15px; font-weight: 400; padding: 0; border: 0 !important; margin: 0; }
  .rtable-compact td:nth-child(2) { display: block; padding: 0; font-weight: 700; font-size: 16px; }
  .rtable-compact td:nth-child(2)::before { display: none; }
  .rtable-compact td:nth-child(n+3) { grid-column: 1 / -1; display: inline; padding: 2px 0 0; font-size: 13px; color: var(--muted); text-align: left !important; }
  .rtable-compact td:nth-child(n+3)::before { display: inline; font-size: 13px; margin-right: 6px; }
  .rtable-compact td:nth-child(3) { grid-row: 2; grid-column: 1; }
  .rtable-compact td:nth-child(4) { grid-row: 2; grid-column: 2; text-align: right !important; }
  .rtable-compact td:nth-child(4)::before { display: none; }
  .rtable-compact td.pos { color: var(--ok); } .rtable-compact td.neg { color: var(--danger); }
}

/* Ссылки на документы под формами входа и регистрации */
.auth-links { text-align: center; margin: 18px auto 0; color: var(--muted); max-width: 420px; line-height: 1.8; }
.auth-links a { color: var(--muted); text-decoration-color: #B9BEC4; text-decoration-thickness: 1px; }

/* Сообщения: отправка в WhatsApp */
.btn-wa { background: #1FA855; border-color: #1FA855; color: #fff; }
.btn-wa:hover { background: #178A45; border-color: #178A45; color: #fff; }
tr.wa-pending td { background: #F3FBF5; }
@media (max-width: 720px) { .cards .table tr.wa-pending { background: #F3FBF5; border-color: #BFE3CB; } .cards .table tr.wa-pending td { background: none; } .btn-wa { width: 100%; justify-content: center; min-height: 44px; } }

/* Кабинет клиента: страница «Удалить авто» */
.car-remove { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.car-remove .btn { min-height: 44px; }

/* Скачать все данные */
.export-box { max-width: 640px; }
.export-period { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.export-period legend { font-weight: 600; margin-bottom: 6px; }
.export-period .radio { display: flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.export-period .radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.export-dates[hidden] { display: none; }
.export-list { margin: 0 0 12px; padding-left: 20px; line-height: 1.55; }
.export-list li + li { margin-top: 4px; }
.report-bar-btns, .page-head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .report-bar-btns, .page-head-btns { width: 100%; flex-direction: column; }
  .report-bar-btns .btn, .page-head-btns .btn { width: 100%; justify-content: center; }
}

/* Работы без справочника */
.link-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-form select { min-width: 220px; flex: 1; }
@media (max-width: 720px) { .link-form { width: 100%; } .link-form select, .link-form .btn { width: 100%; } }
.wa-hint { margin: 14px 0 0; color: var(--muted); }
.wa-hint a { color: #178A45; font-weight: 600; }
@media (max-width: 720px) { .works-head { flex-direction: column; align-items: stretch; gap: 12px; } .works-head .btn { width: 100%; justify-content: center; } }
/* Мои работы: цена и интервал в одной строке */
.work-inputs { display: flex; gap: 8px; flex-shrink: 0; }
.work-inputs .price-input { width: 130px; }
@media (max-width: 720px) {
  .work-row { flex-wrap: wrap; }
  .work-row .price-name { flex: 1 1 100%; }
  .work-inputs { width: 100%; }
  .work-inputs .price-input { flex: 1; width: auto; }
}
.work-more { display: block; margin: -6px 0 14px; }

/* Галочки согласия с документами (вход, регистрация, страница согласия, заказ) */
.docs-checks { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.docs-checks .checkbox { align-items: flex-start; font-weight: 400; font-size: 12.5px; line-height: 1.45; color: var(--ink-2, #3E4349); cursor: pointer; }
.docs-checks .checkbox a { padding: 2px 0; }   /* ссылка остаётся удобной для пальца */
.docs-checks .checkbox input { flex-shrink: 0; margin-top: 1px; }
.docs-checks.has-error { outline: 2px solid #B42318; outline-offset: 6px; border-radius: 6px; }
.consent-ok { font-size: 13px; color: #1A7F37; }

/* ---------- Позиции заказа (вариант D): голубая плашка «Работа» 🔧 и песочная «Товары» 🛢 ---------- */
.lines-list { display: grid; gap: 12px; }
.line-row { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.line-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.line-head b { font-size: 17px; }
.line-head .remove-line { width: 36px; height: 36px; margin: -8px -8px -8px 0; }
.line-panes { display: grid; gap: 10px; }
.pane { border-radius: 12px; padding: 12px; min-width: 0; }
.pane-work { background: #EAF2F5; }
.pane-prod { background: #F8F1E2; }
.pane-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 8px; color: var(--ink); }
.pane-ico { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: #fff; flex-shrink: 0; }
.pane-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pane-work .pane-ico { background: #1E5B74; }
.pane-prod .pane-ico { background: #B8913F; }
.pane-amt { margin-left: auto; font-size: 16px; white-space: nowrap; }
.pane select, .pane .prod-btn { background-color: #fff; }
.pane-cost { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 0; font-size: 14px; font-weight: 500; color: #4A4E53; }
.pane-cost input { width: 130px; text-align: right; font-weight: 700; padding: 8px 10px; }
.line-next-cell { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 4px 0; font-size: 14px; font-weight: 500; color: #4A4E53; }
.line-next-cell input { width: 130px; text-align: right; font-weight: 700; font-size: 17px; color: #123E50; border: 2px solid #A9C6D3; padding: 7px 10px; }
.prod-hint:empty { display: none; }
.prod-hint { margin-top: 6px; }
/* стоимость — только когда выбрано, за что платить; «Следующая замена» — только у работы */
.line-row:not(.has-work) .cell-wprice, .line-row:not(.has-work) .line-next-cell,
.line-row:not(.has-products) .cell-pprice { display: none; }
.line-row:not(.has-work) .pane-work { opacity: .8; }
@media (min-width: 721px) {
  .line-panes { grid-template-columns: 1fr 1fr; }
  .line-next-cell { justify-content: flex-end; }
}
.pane-cost span, .line-next-cell span { white-space: nowrap; }
.pane-cost input, .line-next-cell input { width: 120px; flex-shrink: 0; }

/* ---------- Нижнее меню на телефоне (вариант «Гараж») ---------- */
.tabbar { display: none; }
@media (max-width: 720px) {
  body.has-tabbar { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: flex-end; justify-content: space-around;
    background: var(--header); padding: 4px max(6px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    box-shadow: 0 -2px 12px rgba(0,0,0,.18); }
  .tabbar a { flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 4px 2px; color: #B9BEC4; font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .tabbar a.active { color: var(--yellow); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
  .tabbar .tab-plus span { width: 58px; height: 58px; border-radius: 17px; background: var(--yellow); color: var(--ink); display: flex; align-items: center; justify-content: center;
    margin-top: -26px; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
  .tabbar .tab-plus svg { width: 30px; height: 30px; stroke-width: 2.8; }
  .tabbar .tab-plus.active span { background: var(--yellow-dark); }
  body.kb-open .tabbar, body.sheet-open .tabbar { display: none; }
  /* на экранах массового выбора внизу своя панель «Отмена / Добавить» — нижнее меню там не показываем */
  body.has-tabbar:has(.bulk-submit) .tabbar { display: none; }
}
@media print { .tabbar, .top-new { display: none !important; } }

/* Список заказов на телефоне: компактная карточка
   № ........ сумма
   клиент ... дата
   авто [госномер]
   работы ... статус */
@media (max-width: 720px) {
  .cards .orders-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding: 12px 14px; }
  .cards .orders-table td { padding: 0; }
  .cards .orders-table td[data-label]::before { display: none; }
  .cards .orders-table td:nth-child(1) { grid-area: 1 / 1; font-size: 16px; }
  .cards .orders-table td:nth-child(6) { grid-area: 1 / 2; font-size: 16px; text-align: right !important; }
  .cards .orders-table td:nth-child(3) { grid-area: 2 / 1; font-weight: 600; margin-top: 4px; }
  .cards .orders-table td:nth-child(3) .sub { font-weight: 400; }
  .cards .orders-table td:nth-child(2) { grid-area: 2 / 2; font-size: 13px; color: var(--muted); text-align: right !important; margin-top: 4px; }
  .cards .orders-table td:nth-child(4) { grid-column: 1 / -1; margin-top: 6px; }
  .cards .orders-table td:nth-child(4) .sub { display: inline; margin-left: 8px; }
  .cards .orders-table td:nth-child(5) { grid-column: 1; font-size: 13px; color: var(--muted); margin-top: 6px; align-self: center; }
  .cards .orders-table td:nth-child(7) { grid-column: 2; margin-top: 6px; text-align: right !important; align-self: center; }
  .cards .orders-table td[colspan] { grid-column: 1 / -1; }
}

/* «Нет в списке?» в блоке «Товары» заказа */
.prod-new-link { display: block; margin: 8px 0 0 auto; font-size: 14px; font-weight: 500; padding: 4px 0; }
.prod-new { margin-top: 10px; }
.prod-new label { font-size: 13px; }
.prod-new-row { display: flex; gap: 6px; align-items: center; }
.prod-new-row input { background: #fff; }
.prod-new-x { flex-shrink: 0; width: 40px; height: 40px; border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; }
.prod-new .small { margin-top: 4px; }
