/* Кабинет автосалона (vw.ozimqilaman.uz) — дизайн-система v2, 10.11.2026.

   Владелец: «перегружено, текст не по центру, подсказки везде, детский дизайн»
   и полная свобода. Принципы:
   - одна страница — один главный вопрос и одно главное действие;
   - монохром: чернила + холодные серые; цвет только у статусов (точка + слово);
   - никаких эмодзи и поясняющих подсказок под полями — подпись поля и так ясна;
   - одно дерево разметки на компьютер и телефон: на ≥1024 px панель слева,
     уже — нижние вкладки;
   - всё по сетке 4 px, текст в строках — по центру по вертикали (min-height + flex).

   Со стилем Ozim (tw.css, app.css) не смешиваем. Печатные документы (акт,
   сводный отчёт) — свои стили в шаблонах, этот файл их не касается. */

:root{
  --bg:#F6F6F7;
  --surface:#FFFFFF;
  --surface-2:#FAFAFB;
  --hover:#F2F2F4;
  --press:#EBEBEE;
  --line:#E6E6EA;
  --line-2:#D6D6DC;

  --text:#0D0D12;
  --text-2:#3A3A44;
  --muted:#6E6E78;
  --faint:#A0A0A9;

  --ink:#0D0D12;
  --ink-2:#25252D;
  --accent:#2F5BEA;
  --accent-bg:#EEF2FE;

  /* статусы: точка / фон / текст */
  --acc:#3D6FE0;   --acc-bg:#EEF3FD;  --acc-fg:#2A55B8;
  --work:#D08A0E;  --work-bg:#FBF3E2; --work-fg:#8A5A06;
  --prob:#DB4437;  --prob-bg:#FDEEEC; --prob-fg:#B3261E;
  --ready:#1E9E62; --ready-bg:#E7F6EE; --ready-fg:#146C43;
  --out:#9A9AA3;   --out-bg:#F1F1F3;  --out-fg:#55555E;

  --r-xs:6px; --r-s:8px; --r-m:10px; --r-l:14px; --r-xl:18px;
  --sh-1:0 1px 2px rgba(13,13,18,.05);
  --sh-2:0 1px 2px rgba(13,13,18,.04),0 8px 24px -8px rgba(13,13,18,.12);
  --sh-3:0 2px 6px rgba(13,13,18,.06),0 24px 60px -16px rgba(13,13,18,.24);
  --ring:0 0 0 3px rgba(47,91,234,.22);
  --ease:cubic-bezier(.2,.8,.2,1);

  --side:248px;
  --font:"Geist",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}

/* ---------- основа ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font:400 14px/1.5 var(--font);
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"ss01","cv11"}
:where(a){color:inherit;text-decoration:none}
:where(button,input,select,textarea){font:inherit;color:inherit}
:where(button){cursor:pointer;background:none;border:0;padding:0}
:where(h1,h2,h3,h4,p,ul,ol,dl,dd,figure,fieldset){margin:0}
:where(ul,ol){padding:0;list-style:none}
img{display:block;max-width:100%}
svg{flex:none}
[hidden]{display:none!important}
::selection{background:rgba(47,91,234,.18)}
:focus-visible{outline:none;box-shadow:var(--ring);border-radius:var(--r-s)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:12px;top:-60px;z-index:50;background:var(--ink);color:#fff;padding:8px 12px;border-radius:var(--r-s)}
.skip:focus{top:12px}

/* ---------- текст ---------- */
.h1{font-size:26px;line-height:1.15;font-weight:600;letter-spacing:-.022em;text-wrap:balance}
.h2{font-size:15px;line-height:1.3;font-weight:600;letter-spacing:-.008em}
.h3{font-size:14px;line-height:1.35;font-weight:600}
.lead{font-size:15px;color:var(--text-2)}
.sm{font-size:13px}
.xs{font-size:12px}
.muted{color:var(--muted)}
.faint{color:var(--faint)}
.strong{font-weight:600}
.med{font-weight:500}
.mono{font-family:var(--mono);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.num{font-variant-numeric:tabular-nums}
.ell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.nowrap{white-space:nowrap}
.link{color:var(--accent);font-weight:500}
.link:hover{text-decoration:underline;text-underline-offset:3px}
.vin{font-family:var(--mono);font-size:.92em;letter-spacing:.02em;color:var(--muted);white-space:nowrap}
.vin b{color:var(--text);font-weight:500}
.label{font-size:12px;font-weight:500;color:var(--muted)}
.tbd{color:var(--faint);font-family:var(--mono);font-size:.92em}

/* ---------- раскладка ---------- */
.row{display:flex;align-items:center;gap:8px;min-width:0}
.col{display:flex;flex-direction:column;min-width:0}
.wrap{flex-wrap:wrap}
.grow{flex:1 1 auto;min-width:0}
.sp{flex:1 1 auto}
.g2{gap:2px}.g4{gap:4px}.g10{gap:10px}.g6{gap:6px}.g8{gap:8px}.g12{gap:12px}.g16{gap:16px}.g20{gap:20px}.g24{gap:24px}.g32{gap:32px}
.stack{display:flex;flex-direction:column;gap:16px;min-width:0}
.stack-l{display:flex;flex-direction:column;gap:24px;min-width:0}
.split{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media (max-width:1100px){.split{grid-template-columns:minmax(0,1fr)}}
@media (max-width:640px){.grid2,.grid3{grid-template-columns:minmax(0,1fr)}}

/* ---------- оболочка ---------- */
.app{min-height:100dvh}
.side{position:fixed;inset:0 auto 0 0;width:var(--side);display:flex;flex-direction:column;gap:4px;padding:16px 12px 12px;
  border-right:1px solid var(--line);background:var(--bg);z-index:5}
.main{margin-left:var(--side);min-width:0}
.content{max-width:1180px;margin:0 auto;padding:28px 40px 64px;display:flex;flex-direction:column;gap:20px}
.content.narrow{max-width:760px}
.content.wide{max-width:1440px}

.brand{display:flex;align-items:center;gap:10px;height:40px;padding:0 8px;margin-bottom:6px}
.brand-mark{width:28px;height:28px;border-radius:8px;flex:none}
.brand-name{font-size:14px;font-weight:600;letter-spacing:-.01em;line-height:1.15}
.brand-sub{font-size:11.5px;color:var(--muted);line-height:1.2}

.dealer-pick{position:relative;display:flex;align-items:center;gap:10px;height:44px;padding:0 10px;margin:0 0 6px;
  border-radius:var(--r-m);background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.dealer-pick select{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.dealer-pick .dot{width:8px;height:8px;border-radius:50%;background:var(--ready);flex:none}
.dealer-pick:hover{background:var(--surface-2)}
.dealer-pick:focus-within{box-shadow:inset 0 0 0 1px var(--accent),var(--ring)}

.nav{display:flex;flex-direction:column;gap:2px;margin-top:6px}
.nav a{display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border-radius:var(--r-s);color:var(--text-2);font-weight:500;
  transition:background .15s var(--ease),color .15s var(--ease)}
.nav a:hover{background:var(--hover);color:var(--text)}
.nav a[aria-current="page"]{background:var(--surface);color:var(--text);box-shadow:inset 0 0 0 1px var(--line),var(--sh-1)}
.nav a .i{color:var(--muted)}
.nav a[aria-current="page"] .i{color:var(--text)}
.nav .count{margin-left:auto;font-family:var(--mono);font-size:12px;color:var(--muted)}
.nav .count.alert{color:var(--prob-fg)}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:8px;padding-top:12px;border-top:1px solid var(--line)}
.me-link{display:flex;align-items:center;gap:10px;min-height:44px;padding:4px 8px;border-radius:var(--r-s)}
.me-link:hover{background:var(--hover)}

.ava{width:30px;height:30px;border-radius:9px;background:var(--ink);color:#fff;display:grid;place-items:center;
  font-size:11.5px;font-weight:600;letter-spacing:.02em;flex:none}
.ava.l{width:44px;height:44px;border-radius:12px;font-size:14px}

/* телефон: шапка и вкладки */
.m-top{display:none}
.tabbar{display:none}
@media (max-width:1023px){
  body{font-size:15px}
  .side{display:none}
  .main{margin-left:0;padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .content{padding:12px 16px 32px;gap:16px}
  .m-top{display:flex;align-items:center;gap:10px;height:52px;padding:calc(env(safe-area-inset-top)) 16px 0;box-sizing:content-box}
  .m-top .dealer-pick{flex:1 1 auto;height:36px;margin:0;background:transparent;box-shadow:none;padding:0 4px;min-width:0}
  .tabbar{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;position:fixed;left:0;right:0;bottom:0;z-index:10;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:rgba(255,255,255,.86);
    -webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-top:1px solid var(--line)}
  .tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:50px;border-radius:var(--r-m);
    font-size:10.5px;font-weight:500;color:var(--muted)}
  .tabbar a[aria-current="page"]{color:var(--text)}
  .tabbar .plus{align-self:center;justify-self:center;width:46px;height:46px;border-radius:14px;background:var(--ink);color:#fff;gap:0}
  .tabbar .plus:active{transform:scale(.96)}
}

/* ---------- шапка страницы ---------- */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;min-height:44px}
.page-head .titles{display:flex;flex-direction:column;gap:4px;min-width:0}
.page-head .sub{color:var(--muted);font-size:13.5px}
.page-head .actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.back{display:inline-flex;align-items:center;gap:4px;height:28px;color:var(--muted);font-size:13px;font-weight:500;align-self:flex-start;margin:-4px 0 -8px -2px}
.back:hover{color:var(--text)}
@media (max-width:1023px){
  .h1{font-size:28px}
  .page-head{align-items:flex-start}
  .page-head .actions{width:100%}
  .page-head .actions:empty{display:none}
}

/* ---------- иконки ---------- */
.i{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.i14{width:14px;height:14px}.i16{width:16px;height:16px}.i20{width:20px;height:20px}.i22{width:22px;height:22px}.i24{width:24px;height:24px}

/* ---------- кнопки ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:36px;padding:0 14px;border-radius:var(--r-m);
  font-size:13.5px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;border:0;
  transition:background .15s var(--ease),box-shadow .15s var(--ease),transform .1s var(--ease),color .15s var(--ease)}
.btn:active{transform:scale(.98)}
.btn[disabled],.btn[aria-disabled="true"]{opacity:.45;pointer-events:none}
.btn-primary{background:var(--ink);color:#fff;box-shadow:0 1px 2px rgba(13,13,18,.2),inset 0 1px 0 rgba(255,255,255,.08)}
.btn-primary:hover{background:var(--ink-2)}
.btn-secondary{background:var(--surface);color:var(--text);box-shadow:inset 0 0 0 1px var(--line-2),var(--sh-1)}
.btn-secondary:hover{background:var(--surface-2);box-shadow:inset 0 0 0 1px #C8C8D0,var(--sh-1)}
.btn-ghost{background:transparent;color:var(--text-2)}
.btn-ghost:hover{background:var(--hover);color:var(--text)}
.btn-danger{background:var(--surface);color:var(--prob-fg);box-shadow:inset 0 0 0 1px var(--line-2)}
.btn-danger:hover{background:var(--prob-bg);box-shadow:inset 0 0 0 1px #F3C9C4}
.btn-danger-solid{background:var(--prob-fg);color:#fff}
.btn-danger-solid:hover{background:#9A1F18}
/* группа полей с подписью и строка-переключатель (листы машины, талон) */
fieldset.fs{border:0;padding:0;margin:0;min-width:0}
.fs>legend{padding:0;margin:0 0 8px;font-size:13px;font-weight:500;color:var(--text-2)}
.sw-row{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 14px;border-radius:var(--r-l);box-shadow:inset 0 0 0 1px var(--line);cursor:pointer}
.btn-accent{background:var(--accent);color:#fff}
.btn-accent:hover{background:#2850D2}
.btn-sm{height:30px;padding:0 10px;font-size:12.5px;border-radius:var(--r-s)}
.btn-lg{height:44px;padding:0 18px;font-size:15px;border-radius:12px}
.btn-block{width:100%}
.btn-icon{width:36px;padding:0}
.btn-icon.btn-sm{width:30px}
@media (max-width:1023px){.btn{height:40px}.btn-sm{height:34px}.btn-icon{width:40px}.btn-icon.btn-sm{width:34px}.btn-lg{height:48px}}

/* ---------- поля ---------- */
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field>label,.field>.label{font-size:13px;font-weight:500;color:var(--text-2)}
.input,.select,.textarea{width:100%;min-width:0;height:38px;padding:0 12px;border-radius:var(--r-m);background:var(--surface);color:var(--text);
  border:1px solid var(--line-2);outline:none;font-size:14px;transition:border-color .15s var(--ease),box-shadow .15s var(--ease)}
.textarea{height:auto;min-height:84px;padding:10px 12px;line-height:1.5;resize:vertical}
.input::placeholder,.textarea::placeholder{color:var(--faint)}
.input:hover,.select:hover,.textarea:hover{border-color:#C6C6CE}
.input:focus,.select:focus,.textarea:focus{border-color:var(--accent);box-shadow:var(--ring)}
.select{appearance:none;padding-right:34px;background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236E6E78' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E") no-repeat right 10px center}
.input.mono{font-family:var(--mono);letter-spacing:.04em}
.input.big{height:48px;font-size:17px;border-radius:12px}
.field-err{font-size:12.5px;color:var(--prob-fg)}
.form-err{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:var(--r-m);background:var(--prob-bg);color:var(--prob-fg);font-size:13.5px}
@media (max-width:1023px){.input,.select{height:44px;font-size:16px}.textarea{font-size:16px}}

/* поиск */
.search{position:relative;display:flex;align-items:center;min-width:0}
.search .i{position:absolute;left:11px;color:var(--faint);pointer-events:none}
.search .input{padding-left:36px;padding-right:36px}
.search .kbd{position:absolute;right:8px}
.kbd{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:5px;background:var(--hover);
  box-shadow:inset 0 0 0 1px var(--line);font:500 11px/1 var(--mono);color:var(--muted)}
@media (max-width:1023px){.search .kbd{display:none}}

/* переключатели: сегменты, вкладки, фильтры */
.seg{display:inline-flex;align-items:center;gap:2px;padding:3px;border-radius:var(--r-m);background:#ECECEF;min-width:0}
.seg>a,.seg>button,.seg>label{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:28px;padding:0 12px;border-radius:7px;
  font-size:13px;font-weight:500;color:var(--muted);white-space:nowrap;cursor:pointer;transition:background .15s var(--ease),color .15s var(--ease)}
.seg>a:hover,.seg>button:hover,.seg>label:hover{color:var(--text)}
.seg>.on,.seg>[aria-current="true"],.seg>[aria-pressed="true"],.seg>label:has(input:checked){background:var(--surface);color:var(--text);box-shadow:var(--sh-1),0 0 0 1px rgba(13,13,18,.04)}
.seg .n{font-family:var(--mono);font-size:11.5px;color:var(--faint)}
.seg>.on .n,.seg>label:has(input:checked) .n{color:var(--muted)}
.seg.block{display:flex}.seg.block>*{flex:1 1 0}
@media (max-width:1023px){.seg>a,.seg>button,.seg>label{height:32px}}

.tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tabs a{position:relative;display:inline-flex;align-items:center;gap:6px;height:40px;color:var(--muted);font-weight:500;white-space:nowrap}
.tabs a:hover{color:var(--text)}
.tabs a[aria-current="page"]{color:var(--text)}
.tabs a[aria-current="page"]::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:var(--ink)}
.tabs .n{font-family:var(--mono);font-size:12px;color:var(--faint)}

.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 11px;border-radius:999px;background:var(--surface);
  box-shadow:inset 0 0 0 1px var(--line-2);font-size:13px;font-weight:500;color:var(--text-2);white-space:nowrap;cursor:pointer;
  transition:background .15s var(--ease),box-shadow .15s var(--ease),color .15s var(--ease)}
.chip:hover{background:var(--surface-2)}
.chip.on,.chip[aria-pressed="true"],.chip[aria-current="true"],label.chip:has(input:checked){background:var(--ink);color:#fff;box-shadow:none}
.chip .n{font-family:var(--mono);font-size:11.5px;opacity:.6}
@media (max-width:1023px){.chips.scroll{flex-wrap:nowrap;overflow-x:auto;margin:0 -16px;padding:0 16px;scrollbar-width:none}.chip{height:34px}}

/* тумблер: <label class="switch"><input type="checkbox" class="sr"><span class="sw"></span></label> */
.sw{position:relative;width:40px;height:24px;border-radius:999px;background:#D9D9DF;flex:none;transition:background .2s var(--ease);cursor:pointer}
.sw::after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;
  box-shadow:0 1px 3px rgba(13,13,18,.25);transition:transform .25s var(--ease)}
input:checked+.sw{background:var(--ready)}
input:checked+.sw::after{transform:translateX(16px)}
input:disabled+.sw{opacity:.45;cursor:default}
input:focus-visible+.sw{box-shadow:var(--ring)}

/* флажок: <label class="check"><input type="checkbox" class="sr"><span class="box"></span>…</label> */
.check{display:flex;align-items:center;gap:10px;cursor:pointer;min-height:24px}
.check .box{width:18px;height:18px;border-radius:5px;flex:none;background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--line-2);
  display:grid;place-items:center;transition:background .15s var(--ease),box-shadow .15s var(--ease)}
.check .box::after{content:"";width:10px;height:6px;border:2px solid #fff;border-top:0;border-right:0;transform:translateY(-1px) rotate(-45deg) scale(0);transition:transform .15s var(--ease)}
.check input:checked+.box{background:var(--ink);box-shadow:none}
.check input:checked+.box::after{transform:translateY(-1px) rotate(-45deg) scale(1)}
.check input:indeterminate+.box{background:var(--ink);box-shadow:none}
.check input:indeterminate+.box::after{width:8px;height:0;border-left:0;border-bottom:2px solid #fff;transform:none}
.check input:focus-visible+.box{box-shadow:var(--ring)}

/* ---------- поверхности ---------- */
.card{position:relative;background:var(--surface);border-radius:var(--r-l);min-width:0}
.card::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px var(--line);pointer-events:none;z-index:1}
.card-h{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:0 16px;border-bottom:1px solid var(--line)}
.card-h.plain{border-bottom:0;padding-top:4px}
.card-b{padding:16px}
.card-f{display:flex;align-items:center;gap:8px;padding:12px 16px;border-top:1px solid var(--line)}
.well{background:var(--surface-2);border-radius:var(--r-m);box-shadow:inset 0 0 0 1px var(--line)}
.divider{height:1px;background:var(--line);border:0;margin:0}

/* строки списка */
.list{display:flex;flex-direction:column}
.item{display:flex;align-items:center;gap:14px;min-height:64px;padding:10px 16px;border-top:1px solid var(--line);transition:background .12s var(--ease);min-width:0}
.list>.item:first-child,.list>:first-child>.item{border-top:0}
a.item:hover,.item.link-row:hover{background:var(--surface-2)}
.item .main-t{font-weight:500;color:var(--text)}
.item .chev{color:var(--faint);margin-left:4px}
@media (max-width:1023px){.item{gap:12px}}

/* группа в списке */
.group-h{display:flex;align-items:center;gap:8px;height:36px;padding:0 16px;background:var(--surface-2);border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);font-size:12.5px;font-weight:500;color:var(--muted)}
.list>.group-h:first-child{border-top:0;border-radius:var(--r-l) var(--r-l) 0 0}
.group-h .n{font-family:var(--mono);color:var(--faint)}
.group-h+.item{border-top:0}

/* ключ — значение */
.kv{display:flex;flex-direction:column}
.kv>div{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;padding:8px 0;border-top:1px solid var(--line)}
.kv>div:first-child{border-top:0}
.kv dt,.kv .k{color:var(--muted);font-size:13.5px;flex:none}
.kv dd,.kv .v{margin:0;text-align:right;font-weight:500;min-width:0}

/* таблица */
.table-wrap{overflow-x:auto}
.table{width:100%;border-collapse:collapse;font-size:13.5px}
.table th{height:40px;padding:0 14px;text-align:left;font-size:12px;font-weight:500;color:var(--muted);white-space:nowrap;border-bottom:1px solid var(--line);background:var(--surface-2)}
.table th:first-child{border-top-left-radius:var(--r-l)}
.table th:last-child{border-top-right-radius:var(--r-l)}
.table td{height:60px;padding:8px 14px;vertical-align:middle;border-top:1px solid var(--line)}
.table tbody tr:first-child td{border-top:0}
.table tr.rowlink{cursor:pointer}
.table tr.rowlink:hover td{background:var(--surface-2)}
.table .r{text-align:right}
.table .c{text-align:center}
.table .sub td{height:40px;background:var(--surface-2);font-size:12.5px;font-weight:500;color:var(--muted)}
.table tfoot td{height:48px;font-weight:600;background:var(--surface-2)}

/* ---------- статус машины ---------- */
.badge{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 9px 0 8px;border-radius:7px;font-size:12.5px;font-weight:500;
  white-space:nowrap;background:var(--out-bg);color:var(--out-fg);line-height:1}
.badge i{width:6px;height:6px;border-radius:50%;background:var(--out);flex:none}
.badge.acc{background:var(--acc-bg);color:var(--acc-fg)}.badge.acc i{background:var(--acc)}
.badge.work{background:var(--work-bg);color:var(--work-fg)}.badge.work i{background:var(--work)}
.badge.prob{background:var(--prob-bg);color:var(--prob-fg)}.badge.prob i{background:var(--prob)}
.badge.ready{background:var(--ready-bg);color:var(--ready-fg)}.badge.ready i{background:var(--ready)}
.badge.out{background:var(--out-bg);color:var(--out-fg)}.badge.out i{background:var(--out)}
.badge.paid{background:var(--ready-bg);color:var(--ready-fg)}.badge.paid i{background:var(--ready)}
.badge.unpaid{background:var(--work-bg);color:var(--work-fg)}.badge.unpaid i{background:var(--work)}
.badge.draft{background:var(--out-bg);color:var(--out-fg)}.badge.draft i{background:var(--out)}
.badge.l{height:28px;padding:0 11px 0 10px;font-size:13.5px}
.dot{width:8px;height:8px;border-radius:50%;flex:none;background:var(--out)}
.dot.acc{background:var(--acc)}.dot.work{background:var(--work)}.dot.prob{background:var(--prob)}.dot.ready{background:var(--ready)}

/* путь машины: Принята → В работе → Готова → Выдана */
.path{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.path .step{display:flex;flex-direction:column;gap:6px;min-width:0}
.path .bar{height:4px;border-radius:2px;background:var(--line)}
.path .step.done .bar{background:var(--ink)}
.path .step.cur .bar{background:var(--ink)}
.path .step.cur.prob .bar{background:var(--prob)}
.path .t{font-size:12.5px;font-weight:500;color:var(--faint)}
.path .step.done .t,.path .step.cur .t{color:var(--text)}
.path .d{font-size:12px;color:var(--muted)}

/* лента событий */
.feed{display:flex;flex-direction:column}
.feed .ev{position:relative;display:grid;grid-template-columns:20px minmax(0,1fr);gap:12px;padding-bottom:18px}
.feed .ev::before{content:"";position:absolute;left:9.5px;top:16px;bottom:0;width:1px;background:var(--line)}
.feed .ev:last-child{padding-bottom:0}.feed .ev:last-child::before{display:none}
.feed .ev .mk{width:20px;height:20px;display:grid;place-items:center}
.feed .ev .mk .dot{width:8px;height:8px;box-shadow:0 0 0 4px var(--surface)}
.feed .ev .body{display:flex;flex-direction:column;gap:2px;min-width:0}
.feed .ev .txt{white-space:pre-line;overflow-wrap:anywhere}
.feed .ev .meta{font-size:12.5px;color:var(--muted)}

/* ---------- машина: миниатюра ---------- */
.thumb{position:relative;width:64px;height:44px;border-radius:9px;overflow:hidden;background:#EFEFF2;flex:none}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb.drawn img{object-fit:cover}
.thumb.l{width:88px;height:60px;border-radius:11px}
.thumb.xl{width:100%;height:auto;aspect-ratio:16/10;border-radius:12px}

/* фото: сетка и плитки */
.photos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.photo{position:relative;display:block;aspect-ratio:4/3;border-radius:10px;overflow:hidden;background:#EFEFF2}
.photo img{width:100%;height:100%;object-fit:cover;transition:transform .4s var(--ease)}
a.photo:hover img{transform:scale(1.03)}
.photo .cap{position:absolute;left:6px;bottom:6px;max-width:calc(100% - 12px);padding:3px 7px;border-radius:6px;background:rgba(13,13,18,.62);
  color:#fff;font-size:11.5px;font-weight:500;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.photo.prob{box-shadow:0 0 0 2px var(--prob)}
.photo.empty{display:grid;place-items:center;background:var(--surface-2);outline:1px dashed var(--line-2);outline-offset:-1px;color:var(--faint)}
@media (max-width:640px){.photos{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---------- пустое состояние ---------- */
.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px;padding:48px 24px;color:var(--muted)}
.empty .ic{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:var(--hover);color:var(--muted);margin-bottom:6px}
.empty .t{font-size:15px;font-weight:600;color:var(--text)}
.empty .d{max-width:36ch;font-size:13.5px}
.empty .btn{margin-top:10px}

/* ---------- сообщение после действия ---------- */
.toast{position:fixed;top:calc(env(safe-area-inset-top) + 16px);left:50%;z-index:40;display:flex;align-items:center;gap:10px;
  max-width:calc(100% - 32px);padding:10px 14px 10px 12px;border-radius:12px;background:var(--ink);color:#fff;font-size:13.5px;font-weight:500;
  box-shadow:var(--sh-3);transform:translateX(-50%);animation:toast 4.2s var(--ease) forwards}
.toast .i{color:#5EE0A0}
.toast.err{background:#fff;color:var(--prob-fg);box-shadow:inset 0 0 0 1px #F3C9C4,var(--sh-3)}
.toast.err .i{color:var(--prob)}
@keyframes toast{0%{opacity:0;transform:translate(-50%,-10px)}7%,85%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-10px);visibility:hidden}}

/* ---------- лист / диалог ----------
   <div class="vw-sheet" id="sheet-x" hidden role="dialog" aria-modal="true" aria-labelledby="sheet-x-t">
     <div class="sheet-scrim" data-close></div>
     <div class="sheet-panel"><header class="sheet-head">…<button data-close>…</button></header><div class="sheet-body">…</div></div>
   </div>
   На компьютере — окно по центру, на телефоне — лист снизу. Открывает vw.js по [data-sheet]. */
.vw-sheet{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:24px}
.sheet-scrim{position:absolute;inset:0;background:rgba(13,13,18,.32);animation:fade .2s var(--ease)}
.sheet-panel{position:relative;width:min(480px,100%);max-height:calc(100dvh - 48px);overflow:auto;background:var(--surface);border-radius:var(--r-xl);
  box-shadow:var(--sh-3);animation:pop .22s var(--ease)}
.sheet-panel.wide{width:min(640px,100%)}
.sheet-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:12px;min-height:56px;padding:0 12px 0 20px;background:var(--surface);border-bottom:1px solid var(--line)}
.sheet-head .h2{flex:1 1 auto}
.sheet-body{padding:20px;display:flex;flex-direction:column;gap:16px}
.sheet-foot{position:sticky;bottom:0;display:flex;gap:8px;padding:14px 20px;background:var(--surface);border-top:1px solid var(--line)}
@keyframes fade{from{opacity:0}}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.985)}}
@keyframes rise{from{transform:translateY(100%)}}
@media (max-width:1023px){
  .vw-sheet{place-items:end stretch;padding:0}
  .sheet-panel,.sheet-panel.wide{width:100%;max-height:92dvh;border-radius:20px 20px 0 0;animation:rise .28s var(--ease);padding-bottom:env(safe-area-inset-bottom)}
  .sheet-head{padding:0 8px 0 18px}
  .sheet-body{padding:16px 18px 20px}
  .sheet-foot{padding:12px 18px calc(12px + env(safe-area-inset-bottom))}
}

/* вопрос «Точно?» (vw.js → vwAsk) */
.vw-ask{z-index:35}
.ask-panel{width:min(400px,100%)}
.ask-b{display:flex;flex-direction:column;gap:6px;padding:24px 24px 4px}
.ask-d{color:var(--muted);font-size:14px;line-height:1.5;text-wrap:pretty}
.ask-f{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:20px 24px 24px}
@media (max-width:1023px){.ask-b{padding:22px 18px 4px}.ask-f{padding:18px 18px 16px}}

/* выпадающее окошко у кнопки (срок выдачи и т. п.) */
.pop{position:absolute;z-index:20;min-width:280px;padding:14px;background:var(--surface);border-radius:var(--r-l);box-shadow:inset 0 0 0 1px var(--line),var(--sh-3)}

/* нижняя панель действия на телефоне (приёмка, расчёт) */
.dock{position:sticky;bottom:0;z-index:6;display:flex;gap:8px;padding:12px 0 calc(12px + env(safe-area-inset-bottom));
  background:linear-gradient(to top,var(--bg) 70%,rgba(246,246,247,0))}
@media (max-width:1023px){.dock{bottom:calc(62px + env(safe-area-inset-bottom));padding-bottom:12px}}

/* ---------- вход ---------- */
.auth{min-height:100dvh;display:grid;grid-template-rows:auto 1fr auto;padding:20px 24px calc(20px + env(safe-area-inset-bottom))}
.auth-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.auth-box{width:min(380px,100%);margin:auto;display:flex;flex-direction:column;gap:24px;padding:40px 0}
.auth-foot{text-align:center;font-size:13px;color:var(--muted)}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* ---------- строка машины (ui.car_row) ---------- */
.car-row{display:grid;grid-template-columns:minmax(0,1fr) 168px 128px;gap:0;padding:0;align-items:center}
.car-row.has-act,.list.acts .car-row{grid-template-columns:minmax(0,1fr) 168px 128px 156px}
.car-row .car-link{display:flex;align-items:center;gap:14px;min-width:0;min-height:68px;padding:10px 12px 10px 16px}
.car-row .car-name{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;min-width:0}
.car-row .car-due{padding:0 12px;color:var(--text-2)}
.car-row .car-due.muted{color:var(--faint)}
.car-row .car-act{display:flex;justify-content:flex-end;padding-right:16px}
.car-row:hover{background:var(--surface-2)}
.prob-t{color:var(--prob-fg)}
@media (max-width:1023px){
  .car-row,.car-row.has-act,.list.acts .car-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"link st" "due act"}
  .car-row .car-link{grid-area:link;padding:12px 10px 4px 16px;min-height:0;align-items:flex-start}
  .car-row .car-st{grid-area:st;padding:12px 16px 0 0;align-self:start}
  .car-row .car-due{grid-area:due;padding:0 0 12px 92px;font-size:13px}
  .car-row .car-act{grid-area:act;padding:0 16px 10px 0}
  .car-row .car-act .btn{height:32px}
}
.car-head{display:grid;grid-template-columns:minmax(0,1fr) 168px 128px;align-items:center;height:38px;padding:0;border-bottom:1px solid var(--line);
  background:var(--surface-2);border-radius:var(--r-l) var(--r-l) 0 0;font-size:12px;font-weight:500;color:var(--muted)}
.car-head.has-act{grid-template-columns:minmax(0,1fr) 168px 128px 156px}
.car-head>span:first-child{padding-left:16px}
.car-head>span{padding:0 12px}
.car-head>span:first-child{padding-left:94px}
@media (max-width:1023px){.car-head{display:none}}
.hide-m{}
@media (max-width:1023px){.hide-m{display:none!important}}
.hide-d{display:none!important}
@media (max-width:1023px){.hide-d{display:revert!important}}
.ic-tile{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:var(--hover);color:var(--text-2);flex:none}
.page-head .search{width:300px}
@media (max-width:1023px){.page-head .search{width:100%}}
.content>.seg,.content>.chips{align-self:flex-start;max-width:100%}
@media (max-width:1023px){.content>.seg{overflow-x:auto;scrollbar-width:none;align-self:stretch}.content>.seg::-webkit-scrollbar{display:none}.content>.seg>*{flex:1 0 auto;padding:0 10px}.content>.seg .dot{display:none}}

/* фото VIN на приёмке: плитка-кнопка; камера или галерея — выбирает телефон */
.vin-shot{position:relative;display:flex;align-items:center;gap:12px;min-height:60px;padding:8px 14px 8px 8px;border-radius:12px;cursor:pointer;
  background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);transition:background .15s var(--ease),box-shadow .15s var(--ease)}
.vin-shot:hover{background:var(--hover)}
.vin-shot:active{transform:scale(.995)}
.vin-shot:focus-within{box-shadow:inset 0 0 0 1px var(--accent),var(--ring)}
.vin-shot .vs-img{position:relative;width:64px;height:44px;border-radius:8px;overflow:hidden;flex:none;display:grid;place-items:center;background:var(--hover);color:var(--muted)}
.vin-shot .vs-img img{width:100%;height:100%;object-fit:cover}
.vin-shot .vs-t{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
.vin-shot .vs-t b{font-size:14px;font-weight:500;color:var(--text)}
.vin-shot .vs-st{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis}
.vin-shot .vs-go{font-size:13px;font-weight:500;color:var(--accent);white-space:nowrap}
.vin-shot.empty{justify-content:center;gap:10px;padding:8px 14px;background:var(--surface);box-shadow:none;outline:1.5px dashed var(--line-2);outline-offset:-1.5px;color:var(--text);font-weight:500}
.vin-shot.empty:hover{background:var(--surface-2);outline-color:#BDBDC6}
.vin-shot.empty .vs-img,.vin-shot.empty .vs-t,.vin-shot.empty .vs-go{display:none}
.vin-shot:not(.empty) .vs-add{display:none}
.vin-shot .vs-add{display:inline-flex;align-items:center;gap:10px}
.vin-shot.need{outline-color:var(--prob);color:var(--prob-fg)}
.vin-shot.ok .vs-st{color:var(--ready-fg)}
.vin-shot.warn .vs-st{color:var(--work-fg)}
.vin-shot.err .vs-st{color:var(--prob-fg)}
.vin-shot .vs-spin{display:none}
.vin-shot.busy .vs-img::after{content:"";position:absolute;inset:0;background:rgba(13,13,18,.42)}
.vin-shot.busy .vs-spin{display:block;position:absolute;left:50%;top:50%;margin:-9px 0 0 -9px;z-index:1}
.spin{width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:spin .7s linear infinite}
.spin.dark{border-color:rgba(13,13,18,.14);border-top-color:var(--text-2)}
@keyframes spin{to{transform:rotate(360deg)}}
.vin-none{font-size:12.5px;color:var(--faint);white-space:nowrap}
.input.warn{border-color:var(--work);box-shadow:0 0 0 3px rgba(208,138,14,.16)}
.input.bad{border-color:var(--prob);box-shadow:0 0 0 3px rgba(219,68,55,.14)}
@media (prefers-reduced-motion:reduce){.spin{animation-duration:2s}}

/* печатные листы А4 (акт, сводный отчёт) живут со своими стилями — классы оболочки их не трогают */
.doc .split{display:block}
.doc{font-feature-settings:normal}
