/* Механик 1.11: quiet, utilitarian design system. Scoped visual rules only. */
:root{--ink:#172942;--slate:#566a81;--line:#e0e7f0;--canvas:#f3f6fa;--white:#fff;--blue:#245681;--blue-soft:#e9f1fa;--green:#19785e;--red:#b63946;--amber:#a76805;--shadow:0 4px 17px rgba(23,42,66,.045);font-synthesis:none}
html{scroll-padding-top:104px}body{background:var(--canvas);color:var(--ink);font:14px/1.5 system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;-webkit-font-smoothing:antialiased}
header{background:#fff;color:var(--ink);padding:12px max(20px,calc((100vw - 1460px)/2));border-bottom:1px solid var(--line);box-shadow:none;min-height:64px}
header .brand-title{font-size:22px;letter-spacing:-.7px;font-weight:760}header .brand-title:before{content:'';display:inline-block;width:8px;height:22px;background:#2c6b9b;border-radius:4px;vertical-align:-4px;margin-right:11px}header .brand-title small{color:#8595a8;letter-spacing:0;font-weight:550;font-size:12px;margin-left:7px}
header #logout{font-size:12px;color:#536981;background:#f1f5f9}
main{max-width:1500px;padding:16px 18px 60px}
.panel,.stat{background:var(--white);border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow)}
.panel{padding:18px 20px}.stat{padding:13px 15px;min-width:0}.stats{gap:9px}.stat strong{font-size:27px;letter-spacing:-.8px;line-height:1.23;margin-top:4px;font-variant-numeric:tabular-nums}.stat .muted{font-size:12px;color:#71829a}
.stat.clickable:hover{transform:translateY(-1px);box-shadow:0 5px 17px rgba(32,74,116,.10);border-color:#b8cadc}
.stat.clickable:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
#app>nav{background:var(--canvas);border-bottom:1px solid #dce5ef;gap:3px;margin:9px 0 13px;padding:5px 0 0;top:0;z-index:40}
#app>nav button{background:transparent;color:#667890;border-radius:0;padding:11px 12px 10px;font-size:13px;font-weight:550;min-height:40px;border-bottom:2px solid transparent;transition:color .1s,background .1s}
#app>nav button:hover{color:#173d62;background:#eaf0f7}#app>nav button.active{background:transparent;color:#164c7d;border-bottom-color:#276da3;font-weight:700}
button{border-radius:9px;padding:8px 12px;min-height:35px;background:#eaf0f6;color:#244363;font-size:13px;font-weight:600;transition:background .12s,box-shadow .12s,transform .12s}
button:hover:not(:disabled){background:#e0e9f4}button:active:not(:disabled){transform:translateY(1px)}button:focus-visible{outline:2px solid #397fb1;outline-offset:2px}.primary{background:#235a89;color:#fff}.primary:hover:not(:disabled){background:#1c4d75}.danger{color:var(--red)}.danger:hover:not(:disabled){background:#fbeded}
input,select,textarea{color:var(--ink);background:#fff;border:1px solid #ccd9e5;border-radius:9px;padding:8px 10px;min-height:39px;margin:4px 0 10px;font-size:14px;max-width:100%;outline:none}
input:focus,select:focus,textarea:focus{border-color:#4585b3;box-shadow:0 0 0 3px rgba(49,118,167,.11)}input::placeholder,textarea::placeholder{color:#92a1b3}
label{font-size:12px;color:#55697d;font-weight:570}label input,label select,label textarea{font-weight:450}textarea{resize:vertical}
h2{font-size:20px;letter-spacing:-.35px;font-weight:740;margin:0 0 12px}h3{letter-spacing:-.15px}.heading{gap:12px;flex-wrap:wrap}.muted{color:#75869c;font-size:12px}.actions{margin:8px 0;gap:6px}.grid{gap:10px}
.row{padding:12px 0;border-color:var(--line)}.reminder-row{min-height:45px;padding:7px 0;border-color:var(--line)}.reminder-title h3{font-size:14px}.compact-action{min-height:31px;padding:6px 9px}
.badge{font-weight:570;font-size:11px;padding:3px 8px;line-height:1.5;border-radius:7px}.green{background:#e4f4eb;color:#1e714c}.yellow{background:#fff2da;color:#92600f}.red{background:#ffe8e8;color:#a52e38}
.fleet-card{border:1px solid var(--line);box-shadow:none;border-radius:13px;padding:11px;gap:7px 11px;background:#fff}.fleet-card:hover{border-color:#b8cddf}.fleet-avatar{background:#eff4f9;border-radius:10px}.fleet-avatar-placeholder{filter:grayscale(.55);font-size:23px}.fleet-body h3,.vehicle-link{font-size:15px;letter-spacing:-.2px}.vehicle-link{color:#152b45;font-weight:750}.fleet-actions{gap:5px;display:flex;flex-wrap:wrap}.fleet-actions button{background:#eef3f8;color:#285178;padding:6px 8px;font-size:12px;min-height:34px}.fleet-meta{font-size:12px;color:#62768d}.fleet-status{margin:5px 0 2px}.fleet-maintenance{font-size:12px}
.vehicle-avatar-large{border-radius:11px}.cost-box{background:white;border-color:var(--line);box-shadow:none}.cost-box h3{font-size:14px}.cost-bar-track{background:#eaf0f6}.cost-bar-track span,.trend-bar span{background:#386f9c}.trend-bar{background:#edf3f8}
dialog{background:#fff;box-shadow:0 25px 80px rgba(22,44,67,.25);border:1px solid #e7eef5;max-height:min(90dvh,950px);width:min(600px,96vw)}dialog::backdrop{background:rgba(17,37,59,.52);backdrop-filter:blur(2px)}dialog h2{font-size:19px}
#notice{background:#fff4dd;color:#654a17;border:1px solid #f4dfb7;border-radius:9px;top:0;z-index:100;box-shadow:0 2px 12px #193c5610}
.camera-shutter{background:#235a89!important;color:white;box-shadow:0 4px 12px #234e7325}.checks{gap:7px}.checks label{background:#f6f8fa;border:1px solid #edf1f6;border-radius:10px;padding:8px}
/* Inspection vehicle search - source of truth is hidden #iv id */
.vehicle-finder{position:relative;max-width:820px;margin:0 0 12px}.vehicle-finder label{font-size:13px;color:var(--ink)}
.vehicle-finder-field{display:flex;align-items:center;position:relative}.vehicle-finder-field input{width:100%;padding:12px 48px 12px 14px;min-height:49px;background:#fbfdff;border:1px solid #c7d7e6;font-size:16px;font-weight:600;letter-spacing:.05px;margin:5px 0 4px}
.vehicle-finder-field input:focus{background:#fff}.vehicle-finder-field button{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:transparent;color:#71869e;font-size:23px;line-height:1;width:36px;height:36px;min-height:36px;padding:0;border-radius:8px}
.vehicle-finder-results{position:absolute;left:0;right:0;top:calc(100% - 17px);z-index:75;max-height:320px;overflow:auto;background:white;border:1px solid #cad9e8;border-radius:10px;box-shadow:0 18px 35px rgba(19,49,79,.17);padding:5px}
.vehicle-finder-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:11px;padding:11px 12px;width:100%;text-align:left;background:#fff;border-radius:7px;min-height:45px;color:#234466}
.vehicle-finder-item:hover,.vehicle-finder-item[aria-selected="true"]{background:#e9f3fc}.vehicle-finder-item strong{font-size:14px;color:#192f49}.vehicle-finder-item span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vehicle-finder-item small{font-size:11px;color:#7689a0;white-space:nowrap}.vehicle-finder-empty{padding:17px 13px;color:#677d93;font-size:13px}
.vehicle-selected{min-height:18px;margin-top:3px}.vehicle-selected.selected-ok{color:#19785e}
@media(min-width:1320px){#vehicles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){main{padding:11px 12px 40px}.panel{padding:14px}.cost-filters{gap:7px}.vehicle-finder-item{grid-template-columns:1fr auto}.vehicle-finder-item span{grid-column:1}.vehicle-finder-item small{grid-column:2;grid-row:1 / span 2}}
@media(max-width:700px){header{padding:10px 14px;min-height:56px}header .brand-title{font-size:19px}header .brand-title:before{height:18px;width:6px;vertical-align:-3px;margin-right:7px}main{padding:9px 10px 45px}.panel{padding:12px 13px;border-radius:13px}.stats{gap:7px}.stat{padding:11px 12px}.stat strong{font-size:23px}.stat .muted{font-size:11px}.fleet-card{padding:10px;grid-template-columns:56px minmax(0,1fr);gap:7px 9px}.fleet-avatar{width:56px;height:56px}.fleet-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.fleet-actions button{font-size:11px;padding:7px 3px;min-height:42px}.vehicle-finder-field input{font-size:16px}#app>nav{top:0;margin:9px 0 11px}#app>nav button{font-size:13px;padding:11px 12px}.checks{grid-template-columns:1fr}.camera-shutter{width:90px;height:90px}.reminder-row{align-items:center}.reminder-actions{max-width:48%}}
@media(pointer:coarse){.vehicle-finder-item{min-height:48px}.fleet-actions button{min-height:43px}}
@media(prefers-reduced-motion:reduce){button,.stat.clickable{transition:none}}
/* Wheel layouts */
.wheel-panel{background:#fbfdff;border:1px solid var(--line);border-radius:14px;margin:14px 0;padding:14px 16px}.wheel-panel .heading h3{margin:0;font-size:16px;color:#1c3855}.wheel-panel .heading p{margin:3px 0}.wheel-intro{padding:13px;border:1px dashed #c5d5e4;border-radius:10px;color:#60768d;background:#fff}
.wheel-summary{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:10px 0 6px}.wheel-summary b{display:inline-block;background:#e9f1f9;padding:5px 11px;border-radius:7px;color:#1e557f;font-size:15px}.wheel-summary span{font-size:12px;color:#60758b}
.axles-diagram{background:#fff;border:1px solid #e4ecf4;border-radius:12px;padding:12px 12px 4px}.wheel-front{text-align:center;font-size:10px;letter-spacing:1px;font-weight:750;color:#8ca0b4;margin:4px auto 13px}
.axle-unit{max-width:920px;margin:auto;border-top:1px solid #eaf0f5;padding:12px 0 15px}.axle-unit:first-of-type{border:0}.axle-heading{text-align:center;font-size:12px;font-weight:750;color:#354d65;margin-bottom:7px}.axle-heading span{font-weight:450;color:#8495a7;margin-left:9px}
.axle-body{display:grid;grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr);align-items:start;gap:8px}.axle-side{display:flex;justify-content:center;gap:10px;min-width:0}.axle-bridge{position:relative;height:76px}.axle-bridge:before{content:'';position:absolute;height:3px;background:#b7c9d9;top:34px;left:-7px;right:-7px}.axle-bridge span{position:absolute;width:24px;height:24px;top:24px;left:calc(50% - 12px);border-radius:50%;background:#e2ebf3;border:4px solid #bccbd9}
.tire-slot{min-width:0;width:min(100%,166px);display:flex;flex-direction:column;align-items:center;gap:4px;background:transparent!important;min-height:0;padding:5px;border-radius:9px;color:var(--ink)}.tire-slot:hover{background:#edf4fb!important}.tire-slot:focus-visible{outline:2px solid #2d77ad}.tire-visual{width:44px;height:67px;border:3px solid #344356;border-radius:10px;background:repeating-linear-gradient(48deg,#2f3c4b 0 3px,#566579 3px 6px,#2f3c4b 6px 10px);box-shadow:inset 5px 0 0 #1c2633,inset -5px 0 0 #1c2633;display:block;flex:0 0 auto}.tire-empty .tire-visual{background:#e8edf3;border-color:#b3c0ce;box-shadow:none}.tire-meta{width:100%;text-align:center;display:flex;flex-direction:column;gap:2px}.tire-meta b{font-size:11px;line-height:1.2;color:#203c5a}.tire-meta small{font-size:10px;line-height:1.3;color:#667d92;white-space:normal;overflow-wrap:anywhere;font-weight:460}.tire-empty .tire-meta small{color:#9aabba}
.wheel-spares{border-top:1px solid var(--line);margin-top:12px;padding:12px 0}.wheel-spares h4{font-size:12px;margin:0 0 5px}.wheel-spares>div{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-start}.wheel-spares .tire-slot{width:160px}.wheel-spares .tire-visual{transform:rotate(90deg);margin:15px 0}
.axle-config-row{display:flex;gap:15px;align-items:center;justify-content:space-between;margin:5px 0;border-bottom:1px solid #e5ecf3;padding:6px 0}.axle-config-row select{max-width:300px}.wheel-dialog{width:min(580px,96vw)}.tire-history>div{border-top:1px solid #e6edf5;padding:8px 0}.tire-history small{color:#8b9bac}
@media(max-width:700px){.wheel-panel{padding:10px;margin:12px 0}.axles-diagram{padding:8px 4px}.axle-body{grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);gap:2px}.axle-side{gap:0}.axle-bridge{height:60px}.axle-bridge:before{top:27px}.axle-bridge span{height:14px;width:14px;top:21px;left:calc(50% - 7px);border-width:2px}.tire-slot{padding:3px 1px;gap:2px;width:50%}.axle-side:has(.tire-slot:only-child) .tire-slot{width:100%}.tire-visual{height:55px;width:30px;border-radius:7px;border-width:2px}.tire-meta b{font-size:9px}.tire-meta small{font-size:9px;line-height:1.2}.wheel-spares .tire-slot{width:130px}.axle-config-row{display:block}.axle-config-row select{max-width:100%}}

/* Inspection images open inside the service, never as a new tab. */
.photos .inspection-photo-open{padding:0;margin:3px;border:0;background:transparent;min-height:0;display:inline-flex;overflow:hidden;border-radius:8px}
.photos .inspection-photo-open img{margin:0;width:100px;height:80px;object-fit:cover}
.inspection-photo-viewer{position:fixed;inset:0;z-index:3000;display:flex;flex-direction:column;align-items:stretch;background:rgba(8,19,32,.97);color:#fff;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);overscroll-behavior:contain}
.inspection-photo-viewer.hidden{display:none!important}
.inspection-photo-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:58px;padding:8px 16px;border-bottom:1px solid #ffffff24;font-size:14px;font-weight:650}
.inspection-photo-close{color:#fff;background:#ffffff25;min-height:44px;padding:10px 18px;font-size:15px}
.inspection-photo-close:hover{background:#ffffff35!important}
.inspection-photo-full{display:block;width:100%;height:calc(100% - 58px);min-height:0;object-fit:contain;touch-action:pan-x pan-y}
body.photo-viewer-active{overflow:hidden}

/* Compact exports and tire mileage helper (1.11.1). */
.fleet-report-tools{margin:8px 0 13px;padding:9px 12px;background:#f6f9fc;border:1px solid #e3ebf3;border-radius:10px}
.fleet-report-tools summary{cursor:pointer;font-size:13px;font-weight:650;color:#34506d}
.fleet-report-tools .actions{margin:9px 0 4px}.fleet-report-tools p{font-size:11px;margin:4px 0}
.tire-help{font-size:12px;line-height:1.4;margin:6px 0 10px}
.tire-replace{display:flex!important;flex-direction:row!important;align-items:center;gap:9px;font-size:13px;margin-bottom:10px}
.tire-replace input{width:16px!important;height:16px!important;margin:0}
/* 1.12 dispatch desk / tire stock: compact, smartphone-friendly layouts. */
.ops-page{max-width:1440px;margin-inline:auto}.ops-top{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}.ops-top h2{margin:0}.ops-top .muted{margin:.25rem 0}.ops-counters{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:9px;margin:13px 0}.ops-stat{padding:12px 15px;background:var(--surface,#fff);border:1px solid #dde4e8;border-radius:10px;display:flex;flex-direction:column;gap:3px}.ops-stat b{font-size:22px;color:#1b4556}.ops-stat span{font-size:12px;color:#5d6f77}.ops-columns{display:grid;grid-template-columns:1fr 1fr;gap:13px}.ops-columns section{border:1px solid #e0e6e9;border-radius:12px;padding:12px}.ops-columns h3{margin:0 0 10px}.ops-item{padding:10px 12px;border-bottom:1px solid #e5eaed;line-height:1.35}.ops-item:last-child{border-bottom:none}.ops-item-main{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.ops-list{border:1px solid #dbe4e7;border-radius:12px;margin-top:12px;overflow:hidden}.ops-item .muted{font-size:12px;margin-top:4px}.ops-tag{font-size:11px;padding:2px 7px;border-radius:12px;background:#edf4f6;color:#31566a}.ops-bar,.ops-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(195px,1fr));gap:10px}.ops-bar{margin:12px 0}.ops-bar label,.ops-fields label{min-width:0}.ops-form{border:1px solid #d9e3e7;border-radius:10px;padding:11px 14px;margin:10px 0}.ops-form summary{cursor:pointer;font-weight:600}.ops-form form{padding:12px 0 3px}.ops-actions{display:flex;gap:5px;flex-wrap:wrap}.ops-actions button{font-size:12px;padding:6px 9px;min-height:34px}.ops-wheel-link{margin:8px 0 12px}.ops-page input,.ops-page select{min-width:0;max-width:100%}#tireSwapSlots{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin:10px 0}
@media(max-width:760px){.ops-columns{grid-template-columns:1fr}.ops-counters{grid-template-columns:repeat(2,minmax(0,1fr))}.ops-top .actions{width:100%}.ops-item-main{align-items:flex-start}.ops-actions{width:100%}.ops-actions button{min-height:42px}.ops-fields{grid-template-columns:1fr}.ops-page{padding-inline:0}}

/* Tire gallery, mobile camera picker and unambiguous physical stock rows. */
.ops-tire-summary{display:flex;gap:10px;align-items:flex-start;min-width:0}
.ops-tire-summary>div{min-width:0}
.ops-tire-thumb{padding:0;background:transparent;flex:0 0 70px;overflow:hidden;border:1px solid #d4dfe8;border-radius:8px}
.ops-tire-thumb img{width:70px;height:70px;object-fit:cover;display:block}
.tire-photos-dialog{width:min(740px,96vw);max-height:90vh;overflow-y:auto}
.tire-photos-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:10px;margin:14px 0}
.tire-photo-item{border:1px solid #d9e3ed;border-radius:10px;padding:7px;min-width:0;overflow:hidden}
.tire-photo-item>button:first-child{display:block;border:0;padding:0;background:transparent;width:100%}
.tire-photo-item img{height:138px;width:100%;object-fit:cover;border-radius:7px}
.tire-photo-item p{font-size:12px;overflow-wrap:anywhere}
.tire-photo-item .danger{font-size:12px}
#tirePhotoActions{align-items:center;flex-wrap:wrap;gap:8px}
@media(max-width:650px){.tire-photos-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.tire-photo-item img{height:118px}.tire-photos-dialog .heading{align-items:flex-start}}
