:root{--green:#0f5132;--green2:#147a4b;--bg:#f3f6f8;--card:#fff;--text:#17212b;--muted:#697586;--line:#dbe3e9;--orange:#d97706;--red:#b42318;--blue:#2563eb}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:Segoe UI,Arial,sans-serif}button,input,textarea,select{font:inherit}a{color:inherit}.topbar{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:28px;padding:10px max(12px,calc((100vw - 1500px)/2))}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-size:20px;font-weight:800}.brandbox{background:#f0a000;color:white;font-weight:900;line-height:.78;padding:7px}.brandbox.big{display:inline-block;font-size:36px;padding:11px}.topbar nav{display:flex;gap:6px;flex:1}.topbar nav a{text-decoration:none;padding:10px 12px;border-radius:9px}.topbar nav a:hover{background:#eef3f5}.page{width:min(1500px,100%);margin:auto;padding:18px}.page-title{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:16px}.page-title h1{margin:0 0 4px;font-size:28px}.muted{color:var(--muted)}.filters{display:flex;gap:8px}.filters select,.filters input,input,textarea,select{min-height:46px;border:1px solid #bbc7d1;border-radius:10px;background:#fff;padding:9px 11px}button,.button{border:0;border-radius:10px;padding:10px 14px;min-height:44px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;font-weight:700}.primary{background:var(--green2);color:#fff}.secondary{background:#fff;color:#184e77;border:1px solid #a8bfd2}.ghost{background:#fff;border:1px solid var(--line)}.xl{min-height:54px;padding:13px 20px;font-size:16px}.wide{width:100%}.login{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{width:min(440px,100%);background:#fff;border-radius:22px;padding:28px;box-shadow:0 20px 50px #1020301c}.stack{display:grid;gap:15px}.stack label,.field,.panel label,.sign-card label{display:grid;gap:6px;font-weight:600}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.kpis>div{background:#fff;border:1px solid var(--line);border-radius:15px;padding:17px;display:grid}.kpis b{font-size:28px}.kpis span{color:var(--muted)}.danger-card{border-color:#f5a39b!important;background:#fff6f5!important}.cards{display:grid;gap:10px}.op-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:14px;display:flex;align-items:center;gap:14px}.container-card{border-left:6px solid var(--orange)}.time{font-size:24px;font-weight:800;min-width:70px}.op-main{flex:1}.op-main h3{margin:5px 0}.op-main p{margin:0;color:var(--muted)}.badges{display:flex;gap:6px}.badge{font-size:12px;background:#eef3f5;padding:4px 8px;border-radius:999px}.badge.orange{background:#fff0dc;color:#9a4f00}.empty{background:#fff;border:1px dashed #b9c5ce;border-radius:14px;padding:24px;color:var(--muted)}.toolbar,.bottom-actions{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}.accept-lines{display:grid;gap:10px}.accept-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px}.accept-head{display:flex;justify-content:space-between;gap:10px;align-items:start}.accept-head h3{margin:0}.qty-grid{display:grid;grid-template-columns:repeat(7,minmax(110px,1fr));gap:8px;margin-top:12px}.qty{display:grid;gap:4px}.qty span{font-size:12px;color:var(--muted)}.qty input{width:100%}.fact{font-size:22px;font-weight:800}.sync-pill{background:#e6f5eb;color:#16633f;border-radius:999px;padding:8px 12px}.sync-pill.offline{background:#fff0dc;color:#924b00}.table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:14px}.act-table{border-collapse:collapse;width:100%;min-width:850px}.act-table th,.act-table td{border-bottom:1px solid var(--line);padding:9px;text-align:center}.act-table td:first-child{text-align:left}.act-table th{background:#edf2f6}.sign-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.sign-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px}.sign-card canvas{width:100%;height:210px;border:2px dashed #9aa8b5;border-radius:10px;background:#fff;touch-action:none;display:block;margin:10px 0}.signed{display:grid;gap:8px;background:#e5f6eb;border:1px solid #8ac69e;border-radius:14px;padding:16px;margin:14px 0}.signed code{overflow-wrap:anywhere}.legend{display:flex;gap:16px;flex-wrap:wrap;margin:10px 0}.legend span{display:flex;align-items:center;gap:5px}.sq{width:16px;height:16px;border:1px solid #889;display:inline-block}.sq.free{background:#e7f6ec}.sq.busy{background:#9aa5b1}.sq.container{background:#d97706}.sq.off{background:#991b1b}.schedule-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:14px}.schedule-table{border-collapse:collapse;min-width:1400px;width:100%}.schedule-table th,.schedule-table td{border:1px solid var(--line);height:42px;text-align:center;padding:0}.schedule-table th{background:#eef2f5;font-size:12px}.crewhead{position:sticky;left:0;background:#f8fafb!important;min-width:100px;z-index:2}.slot{height:40px;display:flex;align-items:center;justify-content:center;font-size:10px;overflow:hidden}.slot.free{background:#e7f6ec}.slot.busy{background:#9aa5b1;color:#fff}.slot.container{background:#d97706;color:#fff;font-weight:700}.slot.off{background:repeating-linear-gradient(-45deg,#7f1d1d,#7f1d1d 7px,#b91c1c 7px,#b91c1c 14px);color:#fff;font-weight:700}.crew-grid{display:grid;grid-template-columns:minmax(320px,480px) 1fr;gap:14px}.panel{background:#fff;border:1px solid var(--line);border-radius:15px;padding:16px;display:grid;gap:12px}.panel h2{margin:0}.crew-event{display:grid;grid-template-columns:140px 100px 1fr;gap:8px;padding:10px;border-radius:10px;background:#e7f6ec}.off-event{background:#fff0ef}.alert{padding:10px;border-radius:9px}.alert.error{background:#fee4e2;color:#912018}.back{text-decoration:none;color:#195b8f}@media(max-width:900px){.topbar{gap:10px}.topbar nav{overflow:auto}.topbar nav a{white-space:nowrap}.page{padding:10px}.page-title{display:grid}.filters{width:100%}.filters>*{flex:1}.kpis{grid-template-columns:1fr 1fr}.op-card{align-items:flex-start}.qty-grid{grid-template-columns:repeat(2,1fr)}.sign-grid,.crew-grid{grid-template-columns:1fr}.bottom-actions>*{flex:1}.brand span:last-child{display:none}}@media(max-width:520px){.op-card{display:grid;grid-template-columns:62px 1fr}.op-card>.button{grid-column:1/-1}.topbar{padding:8px}.page-title h1{font-size:24px}}
.op-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.arrival-btn{background:#1769aa;color:#fff}.finish-btn{background:#9b2c2c;color:#fff}.sync-note{font-size:12px;color:#527062;margin:4px 0}.sync-note.warning{color:#9a5a00}.status-start_pending,.status-finish_pending{background:#fff1c7;color:#855900}@media(max-width:700px){.op-actions{grid-column:1/-1}.op-actions>*{flex:1;min-height:50px}}


/* v0.3 identity + admin */
.mobile-nav{display:none}.user-menu{position:relative}.user-menu summary{list-style:none;display:flex;align-items:center;gap:9px;cursor:pointer;min-width:220px;padding:5px 7px;border-radius:12px}.user-menu summary::-webkit-details-marker{display:none}.user-menu summary:hover{background:#f4f7f8}.avatar{width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#e2f2e9;color:#0f6540;font-weight:800;flex:0 0 auto}.avatar.large{width:46px;height:46px}.user-text{display:grid;min-width:0;flex:1}.user-text b,.user-text small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-text small,.user-popover small{color:var(--muted);font-size:11px}.chev{color:var(--muted)}.user-popover{position:absolute;right:0;top:calc(100% + 8px);width:300px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:8px;box-shadow:0 18px 45px #17212b24;z-index:100}.user-popover-head{display:flex;gap:10px;padding:10px;border-bottom:1px solid var(--line);margin-bottom:5px}.user-popover-head>div{display:grid}.user-popover>a,.user-popover button{width:100%;display:flex;text-decoration:none;background:none;border:0;justify-content:flex-start;padding:10px;border-radius:8px;font-weight:600}.user-popover>a:hover,.user-popover button:hover{background:#f1f5f6}
.login-v2{display:block;background:radial-gradient(circle at top left,#dcefe4 0,#f3f6f8 42%,#edf3f5 100%)}.login-shell{width:min(1100px,100%);margin:5vh auto;background:#fff;border:1px solid #dfe7eb;border-radius:24px;padding:24px;box-shadow:0 28px 70px #1734241c}.login-brand{display:flex;align-items:center;gap:14px;padding-bottom:20px;border-bottom:1px solid var(--line)}.login-brand h1{margin:0;font-size:25px}.login-brand p{margin:4px 0;color:var(--muted)}.login-step{margin-top:20px}.step-title{display:flex;gap:12px;align-items:center}.step-title>span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#e4f3e9;color:#17603f;font-weight:800}.step-title h2,.step-title p{margin:0}.step-title p{color:var(--muted);margin-top:2px}.people-search{width:100%;margin:15px 0}.people-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}.person-card{position:relative;text-align:left;background:#fff;border:1px solid var(--line);border-radius:15px;padding:12px;display:flex;align-items:center;gap:12px;min-height:82px;transition:.15s}.person-card:hover,.person-card.selected{border-color:#52a176;background:#f1fbf5;box-shadow:0 0 0 2px #8fd4ac44}.xl-avatar{width:52px;height:52px;font-size:18px}.person-main{display:grid;min-width:0}.person-main b,.person-main small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.person-main small{color:var(--muted);font-weight:400}.local-mark{position:absolute;right:9px;top:8px;font-size:10px;color:#6b7280;background:#eef1f3;border-radius:999px;padding:2px 6px}.pin-sheet{margin-top:22px;border-top:1px solid var(--line);padding-top:20px}.pin-form{display:flex;gap:10px;margin-top:14px}.pin-form input{flex:1;text-align:center;font-size:28px;letter-spacing:8px;min-height:58px}.link-button{background:none;color:#27618a;padding-left:0}.hidden{display:none!important}
.narrow{max-width:900px}.profile-card{display:flex;align-items:center;gap:18px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;margin-bottom:14px}.profile-avatar{width:74px;height:74px;font-size:28px}.profile-card h2,.profile-card p{margin:3px 0}.form-grid{display:grid;gap:11px}.form-grid.two{grid-template-columns:1fr 1fr}.ok-text{color:#167544;font-weight:700}.error-text{color:#b42318;font-weight:700}.operator-line{margin:4px 0!important;color:#3d6653}.alert.warning{background:#fff3d6;color:#825500;margin-bottom:12px}
.admin-tabs{display:flex;gap:5px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:13px;padding:5px;margin-bottom:14px}.admin-tabs a{text-decoration:none;padding:9px 12px;border-radius:9px;white-space:nowrap}.admin-tabs a.active{background:#e4f3e9;color:#0e5d39;font-weight:700}.service-chip{display:flex;align-items:center;gap:7px;border-radius:999px;padding:8px 12px;background:#fff;border:1px solid var(--line);font-weight:600}.service-chip i,.health-dot{display:inline-block;width:10px;height:10px;border-radius:50%}.service-chip.good i,.health-dot.good{background:#22a060;box-shadow:0 0 0 4px #22a0601c}.service-chip.bad i,.health-dot.bad{background:#d34236;box-shadow:0 0 0 4px #d342361c}.admin-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:14px}.admin-kpis>div{display:grid;background:#fff;border:1px solid var(--line);border-radius:14px;padding:15px}.admin-kpis span{font-size:12px;color:var(--muted)}.admin-kpis b{font-size:27px}.warn-kpi{background:#fff5f3!important;border-color:#f1b3aa!important}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.panel-title{display:flex;justify-content:space-between;align-items:center;gap:10px}.panel-title h2,.panel-title p{margin:0}.health-row{display:flex;align-items:center;gap:10px;padding:9px;border-radius:10px;background:#f7faf8}.health-row>div{display:grid}.health-row small{color:var(--muted)}.command-mini{display:flex;gap:8px;flex-wrap:wrap}.command-mini span{display:grid;background:#f2f5f6;border-radius:9px;padding:7px 10px;min-width:68px}.command-mini b{font-size:18px}.command-mini span{font-size:10px;color:var(--muted)}.admin-action{display:grid;text-decoration:none;border:1px solid var(--line);border-radius:11px;padding:11px}.admin-action:hover{border-color:#8cbca2;background:#f3faf6}.admin-action span{font-size:12px;color:var(--muted)}.admin-table-wrap{overflow:auto}.admin-table{width:100%;border-collapse:collapse;min-width:1050px}.admin-table th,.admin-table td{text-align:left;padding:9px;border-bottom:1px solid var(--line);vertical-align:middle}.admin-table th{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;background:#f8fafb}.admin-table.compact{min-width:900px}.admin-table.compact td{font-size:12px}.user-cell{display:flex;align-items:center;gap:8px;min-width:210px}.user-cell>div{display:grid}.user-cell small{color:var(--muted)}.admin-table select{min-height:38px;max-width:220px}.pin-state{font-size:11px;padding:4px 7px;border-radius:999px}.pin-state.personal{background:#e5f5eb;color:#17663e}.pin-state.shared{background:#fff2d9;color:#895900}.switch input{display:none}.switch span{display:block;width:42px;height:24px;border-radius:999px;background:#b9c2c8;position:relative;cursor:pointer}.switch span:after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:.15s}.switch input:checked+span{background:#2b9b62}.switch input:checked+span:after{left:21px}.row-actions{display:flex;gap:5px}.cmd-status{font-size:10px;font-weight:800;padding:4px 6px;border-radius:999px;background:#edf1f3}.cmd-done{background:#e4f5e9;color:#17633d}.cmd-error{background:#fee6e3;color:#a3281f}.cmd-new{background:#e5effc;color:#265f9d}.cmd-leased{background:#fff2d8;color:#895b00}.result-cell{max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-list{display:grid;grid-template-columns:140px 1fr;gap:8px}.settings-list dt{color:var(--muted)}.settings-list dd{margin:0}.sync-row{display:grid;border-bottom:1px solid var(--line);padding:8px 0}.sync-row span,.sync-row small{color:var(--muted);font-size:11px}
.modal{position:fixed;inset:0;background:#17212b66;z-index:200;display:grid;place-items:center;padding:15px}.modal-card{position:relative;background:#fff;border-radius:18px;padding:20px;width:min(620px,100%);box-shadow:0 30px 80px #0004}.small-modal{width:min(420px,100%)}.modal-close{position:absolute;right:10px;top:8px;background:none;font-size:24px}.modal-card label{display:grid;gap:5px}.modal-card h2{margin-top:0}
@media(max-width:1000px){.admin-kpis{grid-template-columns:repeat(3,1fr)}.admin-grid{grid-template-columns:1fr}.user-text{display:none}.user-menu summary{min-width:auto}.desktop-nav{gap:1px!important}.desktop-nav a{padding:9px 7px!important}}
@media(max-width:760px){body{padding-bottom:72px}.desktop-nav{display:none!important}.mobile-nav{position:fixed;display:flex;left:0;right:0;bottom:0;z-index:80;background:#fff;border-top:1px solid var(--line);padding:5px max(6px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom));justify-content:space-around;box-shadow:0 -8px 24px #17212b12}.mobile-nav a{display:grid;place-items:center;gap:1px;text-decoration:none;font-size:10px;min-width:54px;padding:4px}.mobile-nav a span{font-size:20px;line-height:1}.topbar{justify-content:space-between}.topbar .brand{flex:1}.login-shell{margin:0;border-radius:0;min-height:100vh;padding:15px}.people-grid{grid-template-columns:1fr}.person-card{min-height:76px}.pin-form{position:sticky;bottom:0;background:#fff;padding:8px 0;z-index:2}.form-grid.two{grid-template-columns:1fr}.admin-kpis{grid-template-columns:1fr 1fr}.admin-page{padding-bottom:20px}.service-chip{font-size:12px}}


/* v0.3.1 mobile hotfix */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:hidden}
img,svg{max-width:100%}
input,select,textarea,button{max-width:100%}
input[type="date"],input[type="datetime-local"]{min-width:0;width:100%}
.mobile-identity{display:none}
.mobile-nav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.user-menu summary::marker{content:""}.user-menu summary::-webkit-details-marker{display:none}
.settings-list dd,.sync-row,.result-cell{overflow-wrap:anywhere;word-break:break-word}
.modal-card{max-height:calc(100dvh - 30px);overflow:auto}
.admin-users-mobile{display:none}

@media(max-width:760px){
 body{padding-bottom:76px}
 .topbar{height:62px;padding:7px 12px;gap:8px;position:sticky;top:0}
 .topbar .brand{flex:0 0 auto;min-width:0}.topbar .brand>span:last-child{display:none}
 .brandbox{font-size:16px;line-height:.78;padding:7px 8px;border-radius:4px}
 .desktop-nav{display:none!important}
 .user-menu{margin-left:auto}.user-menu summary{min-width:0!important;width:46px;height:46px;padding:6px;justify-content:center;border:1px solid var(--line);background:#f8faf9}
 .user-menu summary .user-text{display:none!important}.user-menu summary .avatar{width:32px;height:32px}
 .user-popover{position:fixed;left:10px;right:10px;top:68px;width:auto;max-width:none}
 .mobile-identity{display:grid;background:#fff;border-bottom:1px solid var(--line);padding:7px 12px 8px;line-height:1.15}
 .mobile-identity-name{font-size:13px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .mobile-identity-meta{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
 .mobile-nav{height:auto;gap:2px;padding:6px 6px calc(6px + env(safe-area-inset-bottom));justify-content:stretch}
 .mobile-nav a{flex:1;min-width:0;padding:5px 2px 4px;border-radius:10px;color:#66727e;font-size:10px;font-weight:650}
 .mobile-nav a span{font-size:10px;line-height:1.1}.mobile-nav a svg{display:block;margin:0 auto 2px}.mobile-nav a.active{background:#e9f6ee;color:#12623d}
 .page{padding:12px 12px 18px;max-width:100%;overflow:hidden}
 .page-title{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-bottom:12px}.page-title>div{min-width:0}
 .page-title h1{font-size:25px;line-height:1.15;overflow-wrap:anywhere}.page-title p{margin:5px 0;line-height:1.35}
 .filters{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(135px,42%);gap:8px;width:100%;min-width:0}
 .filters>*{width:100%!important;min-width:0!important;max-width:100%}.filters select,.filters input{font-size:16px;padding:9px 10px}
 .panel{padding:14px;min-width:0;overflow:hidden}.panel h2{font-size:22px;line-height:1.15}
 .crew-grid{grid-template-columns:minmax(0,1fr)!important;width:100%}.crew-grid .panel label,.form-grid label{min-width:0}
 .crew-grid input,.crew-grid select,.crew-grid textarea,.form-grid input,.form-grid select,.form-grid textarea{width:100%;min-width:0}
 .crew-event{grid-template-columns:1fr auto;gap:4px 10px}.crew-event small{grid-column:1/-1}
 .toolbar{display:grid;grid-template-columns:1fr 1fr;width:100%}.toolbar>*{width:100%;min-width:0}
 .bottom-actions{display:grid;grid-template-columns:1fr;width:100%}.bottom-actions>*{width:100%}
 .kpis{gap:8px}.kpis>div{padding:13px}.kpis b{font-size:24px}
 .op-card{border-radius:13px;padding:12px;gap:10px}.time{font-size:20px;min-width:56px}
 .op-main{min-width:0}.op-main h3{font-size:16px;overflow-wrap:anywhere}.op-main p{font-size:13px}.badges{flex-wrap:wrap}
 .qty-grid{grid-template-columns:1fr 1fr;gap:8px}.accept-head{display:grid}.fact{font-size:18px}.sync-pill{font-size:12px;justify-self:start}
 .sign-grid{grid-template-columns:1fr}.sign-card canvas{height:180px}
 .schedule-wrap{border-radius:12px;max-width:100%}.schedule-table{min-width:1080px}.legend{gap:8px;font-size:12px}
 .profile-card{align-items:flex-start;padding:14px;gap:12px}.profile-avatar{width:54px;height:54px;font-size:20px}.profile-card h2{font-size:19px}
 .admin-page{padding:10px 10px 18px;overflow:visible}.admin-page .service-chip{justify-self:start}
 .admin-tabs{position:sticky;top:105px;z-index:35;margin:0 -10px 12px;padding:6px 10px;border-left:0;border-right:0;border-radius:0;scrollbar-width:none}.admin-tabs::-webkit-scrollbar{display:none}
 .admin-tabs a{padding:9px 11px;font-size:13px}
 .admin-kpis{grid-template-columns:1fr 1fr;gap:8px}.admin-kpis>div{padding:12px}.admin-kpis b{font-size:23px}
 .admin-grid{grid-template-columns:1fr;gap:10px}.panel-title{display:grid;grid-template-columns:1fr;align-items:start}.panel-title>.primary{width:100%}
 .admin-table-wrap{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.admin-table{min-width:850px}.admin-table.compact{min-width:760px}
 .settings-list{grid-template-columns:1fr;gap:2px}.settings-list dt{margin-top:8px;font-size:12px}.settings-list dd{padding:7px 9px;background:#f6f8f9;border-radius:8px}
 .modal{padding:8px;align-items:end}.modal-card,.small-modal{width:100%;max-width:none;border-radius:18px 18px 0 0;padding:20px 14px calc(18px + env(safe-area-inset-bottom));max-height:88dvh}
 .modal-close{width:42px;height:42px;border-radius:50%;background:#f0f3f4;right:10px;top:8px}
 .form-grid.two{grid-template-columns:1fr}
 .login-shell{min-height:100dvh;padding:14px}.login-brand{padding-bottom:14px}.login-brand h1{font-size:22px}.step-title{align-items:flex-start}.step-title h2{font-size:20px}
 .pin-form{display:grid;grid-template-columns:1fr}.pin-form button{width:100%}
 .admin-users-desktop{display:none}.admin-users-mobile{display:grid;gap:10px}
 .admin-user-card{display:grid;gap:11px;background:#f9fbfa;border:1px solid var(--line);border-radius:14px;padding:12px;min-width:0}
 .admin-user-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center}.admin-user-head>div{display:grid;min-width:0}
 .admin-user-head b,.admin-user-head small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-user-head small{color:var(--muted);font-size:11px}
 .admin-user-card>label{display:grid;gap:5px;font-weight:650;min-width:0}.admin-user-card select{width:100%;min-width:0}
 .admin-user-access{display:flex;justify-content:space-between;align-items:center;padding:7px 0}.admin-user-meta{font-size:11px;color:var(--muted)}
 .admin-user-card .row-actions{display:grid;grid-template-columns:1fr 1fr}.admin-user-card .row-actions>*{width:100%}
}
@media(max-width:430px){
 .filters{grid-template-columns:1fr}
 .toolbar{grid-template-columns:1fr}
 .qty-grid{grid-template-columns:1fr 1fr}
}

/* v0.3.2 acceptance mobile input */
.accept-card input[type="number"]{font-variant-numeric:tabular-nums}
@media(max-width:760px){
 .accept-card input[type="number"]{font-size:18px;min-height:52px;padding:10px 12px}
 .accept-card .fact{white-space:nowrap}
}

/* v0.3.3 */
.accept-state-wrap{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.build-badge{font-size:10px;line-height:1;background:#e9edf0;color:#64717c;border-radius:999px;padding:5px 7px;font-weight:700}
@media(max-width:760px){.accept-state-wrap{justify-self:start}}

/* v0.3.5 — compact equal acceptance fields */
.acceptance .toolbar{
  display:flex;
  flex-wrap:nowrap;
  gap:8px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}
.acceptance .toolbar > *{
  flex:0 0 auto;
  white-space:nowrap;
}
.accept-card .qty-grid{
  display:grid !important;
  grid-template-columns:repeat(7,92px) !important;
  gap:6px !important;
  width:max-content;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  padding-bottom:2px;
  margin-top:10px;
}
.accept-card .qty{
  width:92px;
  min-width:92px;
  gap:3px;
}
.accept-card .qty span{
  display:block;
  width:92px;
  font-size:11px;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.accept-card .qty input[type="number"]{
  box-sizing:border-box;
  width:92px !important;
  min-width:92px !important;
  max-width:92px !important;
  min-height:44px !important;
  height:44px;
  padding:7px 9px !important;
  font-size:16px !important;
  font-variant-numeric:tabular-nums;
  appearance:textfield;
  -moz-appearance:textfield;
}

.accept-card .qty-derived input.derived-qty{
  background:#edf2f6 !important;
  color:#344054 !important;
  border-color:#d0d9e0 !important;
  cursor:not-allowed;
  font-weight:700;
}
.accept-card .qty-derived span{
  color:#475467;
  font-weight:600;
}

.accept-card .qty input[type="number"]::-webkit-outer-spin-button,
.accept-card .qty input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
@media(max-width:760px){
  .acceptance .toolbar{gap:6px;margin:10px 0}
  .acceptance .toolbar > *{min-height:42px;padding:8px 11px;font-size:13px}
  .accept-card .qty-grid{
    grid-template-columns:repeat(7,92px) !important;
    gap:6px !important;
  }
  .accept-card .qty,
  .accept-card .qty span{
    width:92px;
    min-width:92px;
  }
  .accept-card .qty input[type="number"]{
    width:92px !important;
    min-width:92px !important;
    max-width:92px !important;
    min-height:44px !important;
    height:44px;
    padding:7px 9px !important;
    font-size:17px !important;
  }
}
@media(max-width:430px){
  .accept-card .qty-grid{
    grid-template-columns:repeat(7,92px) !important;
  }
}

/* v0.4.1 — compact acceptance header */

.accept-title-line {
    margin: 0 0 7px 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.2;
    white-space: nowrap !important;
}

.accept-item-name {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accept-plan,
.accepted-stat {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 15px;
}

.accept-plan b,
.accepted-stat b,
.shipped-stat b {
    font-size: 16px;
}

.acceptance .toolbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center;
    gap: 6px !important;
    margin: 8px 0 10px !important;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.acceptance .toolbar > button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 5px 12px !important;
    border-radius: 8px;
    font-size: 12px !important;
    line-height: 1;
    white-space: nowrap;
}

.manual-item-name {
    width: min(420px, 100%);
    min-height: 38px !important;
}

.shipment-toolbar {
    display: flex;
    gap: 6px;
    margin: 8px 0 10px;
}

.compact-action {
    min-height: 34px !important;
    height: 34px;
    padding: 5px 10px !important;
    font-size: 12px !important;
    border-radius: 8px;
}

.shipment-entry {
    margin-top: 9px;
}

.shipment-qty {
    width: 150px !important;
    min-width: 150px !important;
}

.shipment-qty span {
    font-size: 11px;
    color: var(--muted);
}

.shipment-qty input[type="number"] {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    height: 44px;
    min-height: 44px !important;
    font-size: 17px !important;
    font-variant-numeric: tabular-nums;
    appearance: textfield;
    -moz-appearance: textfield;
}

.shipment-qty input::-webkit-inner-spin-button,
.shipment-qty input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Планшет */
@media (max-width: 1100px) {
    .accept-title-line {
        gap: 9px !important;
        font-size: 16px;
    }

    .accept-item-name {
        max-width: 58%;
    }

    .accept-plan,
    .accepted-stat {
        font-size: 13px;
    }

    .accept-plan b,
    .accepted-stat b {
        font-size: 14px;
    }

    .acceptance .toolbar {
        gap: 5px !important;
    }

    .acceptance .toolbar > button {
        padding: 4px 9px !important;
        font-size: 11px !important;
        height: 32px !important;
        min-height: 32px !important;
    }
}

/* Телефон */
@media (max-width: 600px) {
    .accept-title-line {
        gap: 6px !important;
        font-size: 14px;
    }

    .accept-item-name {
        max-width: 50%;
    }

    .accept-plan,
    .accepted-stat {
        font-size: 11px;
    }

    .accept-plan b,
    .accepted-stat b {
        font-size: 12px;
    }
}


/* v0.4.4 — source warehouse controls acceptance mode */
.simple-acceptance-card .accept-title-line{margin-bottom:5px!important}
.simple-acceptance-entry{margin-top:6px}
.simple-acceptance-card{padding-bottom:12px}

/* v0.4.5 — приемка: KPI-фильтры, русские статусы, состояние обмена */
.kpis>.kpi-filter{
  background:#fff;
  border:1px solid var(--line);
  border-radius:15px;
  padding:17px;
  display:grid;
  text-decoration:none;
  color:inherit;
  min-width:0;
  transition:border-color .15s,box-shadow .15s,background .15s,transform .15s;
}
.kpis>.kpi-filter b{font-size:28px}
.kpis>.kpi-filter span{color:var(--muted)}
.kpis>.kpi-filter:hover{border-color:#8ebba3;box-shadow:0 4px 16px #17342412;transform:translateY(-1px)}
.kpis>.kpi-filter.active{border-color:#4c9b70;background:#f1faf5;box-shadow:0 0 0 2px #4c9b7024}
.kpis>.kpi-filter.active span{color:#17603f;font-weight:700}

.status-planned{background:#eef3f5;color:#52606d}
.status-in_progress,.status-in_acceptance{background:#e6f5eb;color:#16633f}
.status-signed,.status-done,.status-closed{background:#ddf4e5;color:#12623d}
.status-error,.status-conflict{background:#fee4e2;color:#912018}
.status-start_pending,.status-finish_pending{background:#fff1c7;color:#855900}

.card-sync{margin-top:8px;width:max-content;max-width:100%;font-size:12px;font-weight:700;border-radius:8px;padding:6px 9px}
.card-sync-pending{background:#fff4d8;color:#845900;border:1px solid #efd08a}
.card-sync-processing{background:#eaf2ff;color:#285f9d;border:1px solid #b7cdee}
.card-sync-error{background:#fff0ee;color:#9a271e;border:1px solid #efa69f;padding:0;overflow:hidden}
.card-sync-error summary{cursor:pointer;list-style:none;padding:6px 9px;user-select:none}
.card-sync-error summary::-webkit-details-marker{display:none}
.card-sync-error summary::after{content:'▾';margin-left:6px;font-size:10px}
.card-sync-error[open] summary::after{content:'▴'}
.card-sync-detail{border-top:1px solid #efa69f;padding:8px 9px;background:#fff8f7;max-width:min(720px,75vw);font-weight:500;line-height:1.35;overflow-wrap:anywhere}
.card-sync-detail b{display:block;margin-bottom:3px}

@media(max-width:760px){
  .kpis>.kpi-filter{padding:13px}
  .kpis>.kpi-filter b{font-size:24px}
  .card-sync{width:100%;max-width:none}
  .card-sync-detail{max-width:none}
}


/* v0.4.8 — операционная админка */
.service-chip.warn i{background:#d99214;box-shadow:0 0 0 4px #d992141c}
.admin-health-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:14px}
.health-card{display:grid;gap:3px;text-decoration:none;color:inherit;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;min-width:0}
.health-card>span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.health-card>b{font-size:22px;line-height:1.15;overflow-wrap:anywhere}
.health-card>small{font-size:11px;color:var(--muted)}
.health-online{border-color:#a6d5b8;background:#f4fbf7}.health-warning{border-color:#efcf87;background:#fffaf0}.health-offline{border-color:#efaaa3;background:#fff7f6}.health-neutral{background:#fff}
.health-card:hover{box-shadow:0 5px 18px #17212b10;transform:translateY(-1px)}
.ops-summary,.diagnostic-list{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:7px 14px;margin:0}.ops-summary dt,.diagnostic-list dt{color:var(--muted)}.ops-summary dd,.diagnostic-list dd{margin:0;text-align:right;font-weight:650;overflow-wrap:anywhere}
.admin-alert{display:grid;gap:3px;margin-top:12px;border-radius:10px;padding:10px 12px}.admin-alert.bad{background:#fff0ee;border:1px solid #efa69f;color:#8e231b}.admin-alert.warn{background:#fff7e6;border:1px solid #efd08a;color:#7d5706}.admin-alert span{font-size:12px}
.text-danger{color:#a3281f!important}.table-sub{display:block;margin-top:2px;color:var(--muted);font-size:10px}.stuck-note{display:block;color:#a3281f;font-size:10px;margin-top:3px}.row-stuck{background:#fff9f7}
.inline-filter{display:flex;gap:7px}.inline-filter select{min-width:150px}
.command-modal-card{width:min(980px,100%)}.command-meta{font:12px ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--muted);margin-bottom:10px;overflow-wrap:anywhere}.command-json-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.command-json-grid h3{margin:0 0 6px}.command-json-grid pre{margin:0;background:#111b22;color:#d7e2e8;border-radius:10px;padding:12px;max-height:55vh;overflow:auto;font-size:11px;white-space:pre-wrap;overflow-wrap:anywhere}
.pdg-search{display:flex;gap:8px;margin-top:12px}.pdg-search input{flex:1;min-width:0}.pdg-search-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px;margin-top:12px}.pdg-result{display:grid;text-decoration:none;color:inherit;border:1px solid var(--line);border-radius:10px;padding:10px}.pdg-result:hover,.pdg-result.active{border-color:#77ae8f;background:#f3faf6}.pdg-result small{color:var(--muted)}
.pdg-diagnostic-grid{margin-top:14px}.timeline-row{display:flex;gap:9px;align-items:flex-start;padding:8px 0;border-bottom:1px solid var(--line)}.timeline-row>div{display:grid;min-width:0}.timeline-row small{font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.segmented{display:flex;border:1px solid var(--line);border-radius:9px;padding:3px;background:#f7f9f8}.segmented a{text-decoration:none;padding:6px 10px;border-radius:6px;color:inherit}.segmented a.active{background:#fff;box-shadow:0 1px 4px #17212b14;font-weight:700}
.session-state{font-size:10px;font-weight:800;border-radius:999px;padding:4px 7px}.session-active{background:#e4f5e9;color:#17633d}.session-revoked{background:#fee6e3;color:#a3281f}.session-expired{background:#edf1f3;color:#66727a}.ua-short{max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.feature-list{display:grid;gap:8px}.feature-row{display:flex;justify-content:space-between;gap:18px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:13px}.feature-row>div{min-width:0}.feature-row p{margin:3px 0;color:var(--muted);font-size:12px}.feature-row small{color:var(--muted);font-size:10px}.switch.big span{width:50px;height:28px}.switch.big span:after{width:22px;height:22px}.switch.big input:checked+span:after{left:25px}
.manual-origin-badge{display:inline-flex;align-items:center;margin-left:7px;padding:3px 6px;border-radius:999px;background:#fff1d7;color:#8b5b00;font-size:10px;font-weight:800;vertical-align:middle}

@media(max-width:1250px){.admin-health-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.admin-health-grid{grid-template-columns:1fr 1fr}.health-card{padding:11px}.health-card>b{font-size:18px}.command-json-grid{grid-template-columns:1fr}.pdg-search{display:grid;grid-template-columns:1fr}.pdg-search .primary{width:100%}.feature-row{align-items:flex-start}.diagnostic-list{grid-template-columns:1fr}.diagnostic-list dd{text-align:left;padding-bottom:7px}.ops-summary{grid-template-columns:1fr auto}}

/* v0.4.9 — PWA install + signed PDF acts */
.install-row{display:flex;align-items:center;gap:14px}.install-icon{width:72px;height:72px;border-radius:16px;flex:0 0 auto;box-shadow:0 6px 18px #0001}.install-copy{display:grid;gap:4px;flex:1}.install-copy span{font-size:13px;color:var(--muted)}.pdf-meta{display:grid;gap:4px;font-size:12px;color:var(--muted);margin-top:8px}.pdf-meta code{overflow-wrap:anywhere}.act-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.badge.pdf-ready{background:#e7f6ec;color:#16633f}.badge.pdf-missing{background:#fff0dc;color:#924b00}@media(max-width:700px){.install-row{align-items:flex-start;flex-wrap:wrap}.install-icon{width:58px;height:58px}.install-row>button{width:100%;min-height:50px}.act-actions{width:100%}.act-actions>*{flex:1}}


/* v0.5.0 — полный справочник сотрудников 1С + выдача доступа */
.user-directory-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}.user-directory-stats>div{display:grid;gap:2px;border:1px solid var(--line);background:#f8faf9;border-radius:11px;padding:10px 12px}.user-directory-stats b{font-size:20px}.user-directory-stats span{font-size:11px;color:var(--muted)}
.user-directory-filter{display:grid;grid-template-columns:minmax(220px,1fr) 180px 160px auto auto;gap:7px;align-items:center;margin:10px 0 14px}.user-directory-filter input,.user-directory-filter select{min-width:0}
.source-pill{display:inline-flex;align-items:center;border-radius:999px;padding:3px 7px;font-size:10px;font-weight:850}.source-onec{background:#e8f2ff;color:#245d95}.source-local{background:#f0eef8;color:#65508a}.access-state{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:850;white-space:nowrap}.access-on{background:#e5f5ea;color:#17633d}.access-off{background:#f1f3f4;color:#68737a}.row-access-off{background:#fbfcfc}.access-not-granted{border-style:dashed}.grant-user-name{font-size:18px;font-weight:800;margin:0 0 12px}.admin-user-card .grant-user{width:100%;margin-top:9px}
@media(max-width:1000px){.user-directory-stats{grid-template-columns:1fr 1fr}.user-directory-filter{grid-template-columns:1fr 1fr}.user-directory-filter input{grid-column:1/-1}.user-directory-filter .primary,.user-directory-filter .button{width:100%}}
@media(max-width:600px){.user-directory-stats{grid-template-columns:1fr 1fr}.user-directory-filter{grid-template-columns:1fr}.user-directory-filter input{grid-column:auto}}

/* v0.5.1 — фотографии приемки и отгрузки */
.operation-photos{margin:10px 0 14px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:13px 14px}
.operation-photos-head{display:flex;justify-content:space-between;gap:16px;align-items:center}
.operation-photos-head h2{margin:0 0 3px;font-size:16px}.operation-photos-head p{margin:0;font-size:12px}
.operation-photos-actions{display:flex;gap:6px;flex:0 0 auto}.photo-file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.operation-photo-status{margin-top:9px;font-size:11px;color:var(--muted)}.operation-photo-status.photo-error{color:#a3281f;font-weight:700}
.operation-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-top:8px}
.operation-photo-card{position:relative;min-width:0;border:1px solid var(--line);border-radius:11px;overflow:hidden;background:#f8faf9}
.operation-photo-preview{display:block;aspect-ratio:4/3;background:#eef2f0;overflow:hidden}.operation-photo-preview img{display:block;width:100%;height:100%;object-fit:cover}
.operation-photo-meta{display:grid;padding:7px 8px 8px;min-width:0}.operation-photo-meta span{font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.operation-photo-meta small{font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.photo-delete{position:absolute;top:6px;right:6px;border:0;background:#fffffff0;color:#9b271f;border-radius:8px;padding:5px 7px;font-size:10px;font-weight:800;box-shadow:0 1px 5px #0002;min-height:0}.photo-delete:hover{background:#fff0ee}.photo-delete:disabled{opacity:.5}
@media(max-width:700px){.operation-photos{padding:11px}.operation-photos-head{align-items:flex-start;flex-direction:column}.operation-photos-actions{width:100%}.operation-photos-actions button{flex:1;min-height:42px!important;height:auto!important}.operation-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}}

/* v0.5.7 — поиск, месяц и отметка отправки электронных актов клиенту */
.act-filter-panel{display:grid;grid-template-columns:minmax(260px,1fr) minmax(170px,220px) minmax(200px,260px) 100px;gap:10px;align-items:end;background:#fff;border:1px solid var(--line);border-radius:15px;padding:12px 14px;margin-bottom:12px}
.act-search-field,.act-filter-field{display:grid;gap:5px;min-width:0}.act-search-field>span,.act-filter-field>span,.act-filter-count>span{font-size:11px;font-weight:700;color:var(--muted)}
.act-search-field input,.act-filter-field select{width:100%;min-width:0}.act-filter-count{display:grid;gap:2px;align-content:center;min-height:46px;padding:5px 10px;border-left:1px solid var(--line)}.act-filter-count b{font-size:22px}
.act-list-card{transition:opacity .15s,border-color .15s,background .15s}.act-list-card.act-saving{opacity:.68}.act-list-card[hidden]{display:none!important}
.badge.client-sent{background:#e4f5e9;color:#17633d}.badge.client-not-sent{background:#f1f3f4;color:#66727a}.act-sent-meta{display:block;margin-top:5px;color:var(--muted);font-size:10px}
.act-sent-check{display:flex;align-items:center;gap:9px;min-width:155px;padding:9px 10px;border:1px solid #b6c9bd;background:#f5fbf7;border-radius:11px;cursor:pointer;user-select:none}.act-sent-check:hover{border-color:#6aa683;background:#eef8f2}.act-sent-check.is-disabled{opacity:.55;cursor:not-allowed;background:#f4f5f5;border-color:var(--line)}
.act-sent-check input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}.act-check-box{width:24px;height:24px;flex:0 0 24px;border:2px solid #8ca098;border-radius:6px;background:#fff;position:relative}.act-sent-check input:checked+.act-check-box{background:var(--green2);border-color:var(--green2)}.act-sent-check input:checked+.act-check-box:after{content:'';position:absolute;left:6px;top:2px;width:7px;height:12px;border:solid #fff;border-width:0 3px 3px 0;transform:rotate(45deg)}
.act-sent-check input:focus-visible+.act-check-box{outline:3px solid #2d7fc733;outline-offset:2px}.act-sent-check input:disabled+.act-check-box{background:#eef0f1}.act-check-copy{display:grid;line-height:1.05}.act-check-copy b{font-size:12px}.act-check-copy small{font-size:10px;color:var(--muted);margin-top:3px}
.act-filter-empty{margin-top:10px}
@media(max-width:1050px){.act-filter-panel{grid-template-columns:1fr 1fr}.act-filter-count{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);grid-template-columns:auto 1fr;align-items:center;min-height:0;padding:8px 2px 0}.act-filter-count b{text-align:right}.act-list-card{flex-wrap:wrap}.act-sent-check{order:3;flex:1;min-width:180px}.act-actions{order:4}}
@media(max-width:560px){.act-filter-panel{grid-template-columns:1fr;padding:10px}.act-filter-count{grid-column:auto}.act-list-card{display:grid!important;grid-template-columns:1fr}.act-list-card[hidden]{display:none!important}.act-sent-check{order:initial;width:100%}.act-actions{order:initial;width:100%}.act-actions>*{flex:1}}

/* v0.5.14 — удаление электронных актов */
.danger{background:#fff;color:#a3281f;border:1px solid #e0a39d}.danger:hover{background:#fff3f1;border-color:#ca6b61}.act-delete-button:disabled{opacity:.55;cursor:wait}
/* v0.6.0 */
.line-photo-requirements{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:10px 0 8px;padding:9px 10px;background:#f8faf9;border:1px solid var(--line);border-radius:10px}.line-photo-requirements>b{font-size:12px;margin-right:3px}.line-photo-requirements.empty-photo-req{color:var(--muted);font-size:11px}.line-photo-btn{min-height:36px;padding:7px 10px;border-radius:9px;border:1px solid #d0d9dd;background:#fff;font-size:11px;font-weight:700}.line-photo-btn.required{border-color:#e3aa58;background:#fff8e9;color:#7d5000}.line-photo-btn.ok{border-color:#8fc9a5;background:#eaf7ef;color:#17613d}.line-photo-file{display:none}.catalog-picker{position:relative;min-width:280px}.catalog-search{width:min(560px,100%);font:inherit;font-weight:700;border:1px solid #bac9d1;border-radius:8px;padding:7px 9px}.catalog-results{position:absolute;left:0;top:100%;z-index:30;width:min(600px,90vw);max-height:280px;overflow:auto;background:#fff;border:1px solid #b9c7cd;border-radius:10px;box-shadow:0 10px 30px #24323a24}.catalog-results:empty{display:none}.catalog-results button{display:grid;width:100%;text-align:left;background:#fff;color:#111;border:0;border-bottom:1px solid #edf0f1;border-radius:0;padding:9px 11px}.catalog-results button:hover{background:#f2f8f4}.catalog-results small{color:var(--muted)}.manual-origin-badge.warning{background:#fff0d5;color:#825600}.destination-choice{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;margin:12px 0}.destination-choice .field{display:grid;grid-template-columns:minmax(180px,280px) 1fr;gap:5px 12px;align-items:center}.destination-choice .field b,.destination-choice .field span{grid-column:1}.destination-choice select{grid-column:2;grid-row:1/3;min-height:48px}.repair-stock-panel{margin-bottom:14px}.repair-search{min-height:42px;min-width:260px}.repair-stock-list{display:grid;gap:8px;margin:12px 0}.repair-stock-row{display:grid;grid-template-columns:minmax(260px,1fr) 130px 130px;gap:12px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff}.repair-item,.repair-available{display:grid}.repair-item small,.repair-available span{color:var(--muted);font-size:11px}.repair-available b{font-size:20px}.repair-qty input{width:100%;min-height:42px}.repair-history{display:grid;gap:7px}.repair-history article{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:10px 0;border-bottom:1px solid var(--line)}.repair-history article>div{display:flex;gap:8px}.repair-history article small{grid-column:1/-1;color:var(--muted)}
@media(max-width:700px){.line-photo-requirements{align-items:stretch}.line-photo-btn{flex:1 1 46%;min-height:44px}.catalog-picker{min-width:0}.destination-choice .field{display:grid;grid-template-columns:1fr}.destination-choice .field>*{grid-column:1!important;grid-row:auto!important}.repair-stock-row{grid-template-columns:1fr 95px}.repair-qty{grid-column:1/-1}.repair-search{min-width:0;width:100%}}

/* v0.6.1: отметка отправки клиенту прямо в списке приемок */
.today-act-sent-check{flex:0 0 160px;justify-content:flex-start;margin-left:auto}
.today-act-sent-check.act-saving{opacity:.65;pointer-events:none}
@media(max-width:900px){.today-act-sent-check{flex:1 1 180px;order:3;margin-left:0}.op-card>.today-act-sent-check{grid-column:auto}}
@media(max-width:700px){.today-act-sent-check{grid-column:1/-1;width:100%;order:initial}}

/* v0.6.3 — справочник номенклатуры и фото в строках приемки */
.catalog-open-btn{display:grid;gap:2px;width:min(620px,100%);min-height:44px;text-align:left;padding:8px 11px;border:1px solid #aebdc5;border-radius:9px;background:#fff;color:var(--text);font:inherit;font-weight:800}
.catalog-open-btn:hover{background:#f4f8f6;border-color:#7ea894}.catalog-open-btn.selected{border-color:#74a88c;background:#f3faf6}.catalog-open-btn small{font-size:10px;font-weight:500;color:var(--muted)}
.manual-free-entry{margin-top:6px;font-size:10px;color:var(--muted)}.manual-free-entry summary{cursor:pointer;user-select:none}.manual-free-entry input{display:block;width:min(560px,100%);margin-top:5px;padding:7px 9px;border:1px solid #c5d0d5;border-radius:8px;font:inherit;color:var(--text);background:#fff}
.catalog-dialog{width:min(1040px,94vw);max-width:none;border:0;padding:0;border-radius:16px;box-shadow:0 24px 70px #10212d55;background:#fff;color:var(--text)}.catalog-dialog::backdrop{background:#17232b80;backdrop-filter:blur(2px)}
.catalog-dialog-shell{display:grid;grid-template-rows:auto auto minmax(260px,62vh) auto;max-height:90vh}.catalog-dialog-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:18px 20px 12px;border-bottom:1px solid var(--line)}.catalog-dialog-head h2{margin:0 0 4px;font-size:22px}.catalog-dialog-head p{margin:0}.catalog-dialog-close{width:40px;height:40px;min-height:40px;padding:0;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:28px;line-height:1;color:#5d6970}
.catalog-dialog-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:12px;align-items:center;padding:12px 20px}.catalog-dialog-toolbar input{width:100%;min-height:46px;padding:10px 13px;border:1px solid #9fb0ba;border-radius:10px;font-size:16px}.catalog-dialog-table-wrap{overflow:auto;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.catalog-dialog-table{width:100%;border-collapse:collapse;font-size:13px}.catalog-dialog-table th{position:sticky;top:0;z-index:1;background:#f3f5f4;text-align:left;padding:9px 12px;border-bottom:1px solid #cdd6da}.catalog-dialog-table td{padding:8px 12px;border-bottom:1px solid #edf0f1;vertical-align:middle}.catalog-dialog-table tbody tr{cursor:pointer}.catalog-dialog-table tbody tr:hover{background:#eef7f1}.catalog-dialog-table th:first-child,.catalog-dialog-table td:first-child{width:150px}.catalog-dialog-table th:nth-child(3),.catalog-dialog-table td:nth-child(3){width:80px}.catalog-dialog-table th:last-child,.catalog-dialog-table td:last-child{width:105px;text-align:right}.catalog-code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#55636b}.catalog-select{min-height:34px;padding:6px 10px;border-radius:8px;border:1px solid #88ad99;background:#f2faf5;color:#165b3b;font-weight:800}.catalog-loading,.catalog-empty{text-align:center!important;color:var(--muted);padding:28px!important}.catalog-dialog-foot{padding:9px 20px 13px}
.line-photo-groups{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start;flex:1 1 600px}.line-photo-group{display:grid;gap:5px;min-width:0}.line-photo-actions{display:flex;gap:5px;align-items:stretch}.line-photo-gallery-btn{min-height:36px;padding:7px 9px;border-radius:9px;border:1px solid #b9cbd4;background:#f5fafc;color:#245166;font-size:11px;font-weight:800;white-space:nowrap}.line-photo-gallery-btn:hover{background:#eaf5f9}.line-photo-attached{display:flex;gap:5px;flex-wrap:wrap}.line-photo-thumb{position:relative;width:70px;height:54px;border:1px solid #ccd6da;border-radius:8px;overflow:hidden;background:#edf1ef}.line-photo-thumb a,.line-photo-thumb img{display:block;width:100%;height:100%}.line-photo-thumb img{object-fit:cover}.line-photo-delete{position:absolute;right:3px;top:3px;width:22px;height:22px;min-height:22px;padding:0;border:0;border-radius:6px;background:#fffdf5ed;color:#a3261e;font-size:17px;font-weight:900;line-height:20px;box-shadow:0 1px 4px #0003}.line-photo-delete:hover{background:#fff0ee}.line-photo-delete:disabled{opacity:.45}
@media(max-width:700px){.catalog-dialog{width:96vw}.catalog-dialog-shell{grid-template-rows:auto auto minmax(300px,65vh) auto}.catalog-dialog-head{padding:13px 14px 10px}.catalog-dialog-head h2{font-size:19px}.catalog-dialog-toolbar{grid-template-columns:1fr;padding:10px 14px}.catalog-dialog-table{min-width:680px}.catalog-dialog-table th:first-child,.catalog-dialog-table td:first-child{width:125px}.catalog-dialog-foot{padding:8px 14px 11px}.catalog-open-btn{min-height:48px}.line-photo-groups{display:grid;grid-template-columns:1fr;width:100%}.line-photo-group{width:100%}.line-photo-actions{display:grid;grid-template-columns:minmax(0,1fr) auto}.line-photo-btn{width:100%;text-align:left}.line-photo-gallery-btn{min-width:96px}.line-photo-thumb{width:82px;height:62px}}

/* v0.6.11 — read-only PDF status for receiver + compact tablet control */
.act-sent-check.is-readonly{cursor:default;background:#f7f9f8;border-color:#d3ddda}
.act-sent-check.is-readonly:hover{background:#f7f9f8;border-color:#d3ddda}
.act-sent-check.is-readonly input:checked+.act-check-box{background:#6e9d86;border-color:#6e9d86}
.act-sent-check.is-readonly input:disabled+.act-check-box{background:#fff;border-color:#a7b6b0}
.act-sent-check.is-readonly input:checked:disabled+.act-check-box{background:#6e9d86;border-color:#6e9d86}
.today-act-sent-check{flex-basis:132px;min-width:132px;padding:6px 7px;gap:6px;border-radius:9px}
.today-act-sent-check .act-check-box{width:20px;height:20px;flex-basis:20px;border-radius:5px}
.today-act-sent-check input:checked+.act-check-box:after{left:5px;top:2px;width:6px;height:10px;border-width:0 2px 2px 0}
.today-act-sent-check .act-check-copy b{font-size:10px}
.today-act-sent-check .act-check-copy small{font-size:8px;margin-top:2px}
@media(max-width:1100px){.today-act-sent-check{flex:0 0 124px;min-width:124px;padding:5px 6px}.today-act-sent-check .act-check-copy b{font-size:9.5px}}
@media(max-width:700px){.today-act-sent-check{width:auto;min-width:118px;justify-self:start}}

/* v0.6.20: архив ошибок команд */
.cmd-dismissed{background:#eef0f2;color:#66727e}.command-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.command-toolbar .inline-filter{margin:0}.row-actions .danger{white-space:nowrap}@media(max-width:720px){.command-toolbar{justify-content:stretch}.command-toolbar>*{flex:1}.command-toolbar select,.command-toolbar button{width:100%}}

/* v0.6.20: обзор последней ошибки */
.admin-alert-link{text-decoration:none}.admin-alert-link small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;color:inherit;opacity:.88;overflow-wrap:anywhere}.admin-alert-link em{font-style:normal;font-size:11px;font-weight:750;margin-top:3px}.admin-alert-link:hover{filter:brightness(.985);box-shadow:0 3px 12px #17212b0d}

/* v0.6.21 — grouped 1C errors, command context and auto-resolved history */
.cmd-resolved{background:#e7f3ec;color:#24623f}
.command-type-cell,.command-context-cell{display:grid;gap:2px;min-width:150px}.command-type-cell small,.command-context-cell small{color:var(--muted);font-size:10px}.command-context-cell span{font-size:11px}.command-open-pdg{font-size:10px;font-weight:800;margin-top:2px}
.error-group-list{display:grid;gap:12px}.error-group-card{border:1px solid #e4c2be;border-radius:14px;background:#fffaf9;padding:14px}.error-group-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.error-group-title{display:flex;gap:10px;align-items:center}.error-group-title h3{margin:0 0 2px;font-size:16px}.error-count{display:grid;place-items:center;min-width:38px;height:38px;padding:0 7px;border-radius:10px;background:#ffe6e2;color:#a6271d;font-size:18px;font-weight:900}.error-group-message{margin:10px 0 8px;white-space:pre-wrap;overflow-wrap:anywhere;color:#7d241d}.error-group-meta{display:flex;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:10px}.error-pdg-list{display:grid;gap:6px;margin-top:10px}.error-pdg{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #eadeda;border-radius:10px;background:#fff;padding:9px 10px}.error-pdg>div:first-child{display:grid;gap:1px}.error-pdg span{font-size:11px}.error-pdg small{color:var(--muted);font-size:10px}.error-group-details{margin-top:10px}.error-group-details>summary{cursor:pointer;font-weight:800;color:#5b6670}.admin-last-error{display:grid;gap:4px}.admin-last-error code{font-size:10px}.admin-alert-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:4px}.admin-alert-actions a{font-size:11px;font-weight:800;color:inherit}.error-copy{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:760px){.error-group-head,.error-pdg{align-items:stretch;flex-direction:column}.error-group-head .row-actions,.error-pdg .row-actions{width:100%}.error-group-head .row-actions>* ,.error-pdg .row-actions>*{flex:1}.command-type-cell,.command-context-cell{min-width:130px}}

/* v0.6.23 warehouse visibility */
.warehouse-admin-table .warehouse-inactive{opacity:.58;background:#f5f6f7}.warehouse-admin-table code{font-size:11px}.badge.green{background:#e7f7ed;color:#176b39}.table-sub{display:block;color:#7b8794;margin-top:3px}

/* Repair work v0.6.26 — tablet layout, workers, stable controls */
.repair-work-page{overflow:visible}
.repair-tabs{display:inline-flex;align-items:center;gap:4px;margin:0 0 18px;padding:4px;background:#fff;border:1px solid var(--line);border-radius:14px;max-width:100%;overflow:auto}
.repair-tabs a{display:block;white-space:nowrap;padding:10px 16px;border:1px solid transparent;border-radius:10px;text-decoration:none;color:var(--text);font-weight:800}
.repair-tabs a.active{background:#e9f7ef;border-color:#8dceaa;color:#075f31}
.repair-work-title{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(330px,460px)!important;gap:18px!important;align-items:end!important;margin-bottom:18px!important}
.repair-work-title .filters{display:grid!important;grid-template-columns:minmax(0,1fr) 150px!important;width:100%;gap:8px}
.repair-work-title .filters>*{width:100%;min-width:0}
.repair-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:0 0 16px}
.repair-kpis article{background:#fff;border:1px solid #dbe3e9;border-radius:16px;padding:18px;min-width:0}
.repair-kpis strong{display:block;font-size:30px;line-height:1}
.repair-kpis span{display:block;color:#64748b;margin-top:8px;line-height:1.25}
.repair-kpis .good{background:#f1fbf5;border-color:#a7d9bc}.repair-kpis .warn{background:#fff8ed;border-color:#f2ce91}
.repair-workers-panel{display:grid!important;grid-template-columns:minmax(260px,1fr) minmax(560px,1.55fr);gap:18px!important;align-items:center!important;overflow:visible!important}
.repair-workers-copy p{margin:6px 0 0}
.repair-worker-tools{display:grid;grid-template-columns:minmax(260px,1.15fr) minmax(260px,1fr) auto;gap:10px;align-items:center;min-width:0}
.repair-worker-select-row,.repair-worker-add-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;min-width:0}
.repair-worker-tools select,.repair-worker-tools input{width:100%;min-width:0;min-height:46px}
.repair-secondary-button,.repair-danger-button{min-height:46px;padding:10px 16px;border:1px solid var(--line);background:#f4f6f7;color:var(--text);white-space:nowrap}
.repair-danger-button{background:#fff6f5;border-color:#f0b7b1;color:#a52b22}
.repair-danger-button:disabled{opacity:.45;cursor:default}
.repair-free-fact-button{min-height:46px;padding-inline:18px;white-space:nowrap}
.repair-requests{display:grid;gap:14px;margin:16px 0}.repair-request-card{background:#fff;border:1px solid #dbe3e9;border-radius:18px;overflow:hidden}.repair-request-card>header{display:flex;justify-content:space-between;gap:16px;padding:18px 20px}.repair-request-card h2{margin:4px 0}.repair-request-number{font-size:12px;font-weight:800;color:#b36b00;text-transform:uppercase}.repair-progress-head{text-align:right}.repair-progress-head b{font-size:24px;display:block}.repair-progress-head span{color:#64748b}.repair-progress{height:5px;background:#edf1f4}.repair-progress i{display:block;height:100%;background:#159353}.repair-line{padding:18px 20px;border-top:1px solid #edf1f4}.repair-line-main{display:flex;justify-content:space-between;gap:16px;align-items:center}.repair-line-main small{display:block;color:#64748b;margin-top:4px}.repair-line-numbers{display:flex;gap:22px}.repair-line-numbers span{text-align:right;min-width:64px}.repair-line-numbers small{display:block;font-size:11px;text-transform:uppercase}.repair-line-numbers b{font-size:20px}.repair-line-numbers .good b{color:#0b7a40}.repair-line-numbers .over b,.over-plan{color:#b36b00}.over-plan{display:block;margin-top:4px}.repair-1c-baseline{font-size:12px;color:#64748b;margin-top:8px}
.repair-work-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin-top:14px}.repair-work-action{border:1px solid #d9e2e7;border-radius:12px;background:#f9fbfc;padding:10px 12px;text-align:left;cursor:pointer;min-height:68px}.repair-work-action span,.repair-work-action small{display:block}.repair-work-action b{font-size:20px}.repair-work-action small{color:#6b7280}.repair-work-action.output{background:#effaf3;border-color:#9bd0ae}.repair-work-action:disabled{opacity:.45;cursor:default}
.repair-fact-dialog{border:0;border-radius:18px;padding:22px;max-width:520px;width:calc(100% - 30px);box-shadow:0 24px 80px #0004}.repair-fact-dialog::backdrop{background:#0f172a88}.dialog-close{float:right;border:0;background:transparent;font-size:28px}.repair-fact-dialog .field{margin-top:12px}.repair-fact-dialog input,.repair-fact-dialog select,.repair-fact-dialog textarea{width:100%}
.quick-qty{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:8px 0 14px;width:100%}.quick-qty button{min-height:44px;padding:8px 14px;background:#f2f4f5;border:1px solid #e1e6e9}
.repair-facts{display:grid;gap:8px}.repair-facts article{display:grid;grid-template-columns:1fr auto;gap:4px 14px;border-bottom:1px solid #edf1f4;padding:10px 0}.repair-facts article div span{display:block;color:#475569}.repair-facts article small{color:#64748b}.repair-fact-delete{grid-row:1/3;grid-column:2;border:0;background:transparent;color:#a33;cursor:pointer}.text-danger{color:#b42318}.sync-note.warning{color:#b42318}.repair-item-results{display:grid;gap:4px;max-height:220px;overflow:auto;margin-top:6px}.repair-item-results button{border:1px solid #dbe3e9;background:#fff;border-radius:10px;padding:9px 10px;text-align:left;cursor:pointer}.repair-item-results button small{display:block;color:#64748b;margin-top:2px}
@media(max-width:1180px){.repair-kpis{grid-template-columns:repeat(3,1fr)}.repair-workers-panel{grid-template-columns:1fr}.repair-worker-tools{grid-template-columns:1fr 1fr auto}}
@media(max-width:900px){.repair-work-title{grid-template-columns:1fr!important}.repair-work-title .filters{grid-template-columns:minmax(0,1fr) 150px!important}.repair-kpis{grid-template-columns:1fr 1fr}.repair-worker-tools{grid-template-columns:1fr}.repair-worker-select-row,.repair-worker-add-row{grid-template-columns:minmax(0,1fr) auto}.repair-free-fact-button{width:100%}.repair-line-main{display:block}.repair-line-numbers{margin-top:12px;justify-content:space-between;flex-wrap:wrap}.repair-request-card>header{align-items:flex-start}.repair-progress-head b{font-size:20px}}
@media(max-width:560px){.repair-tabs{display:grid;grid-template-columns:1fr 1fr;width:100%}.repair-tabs a{text-align:center;padding:9px 8px}.repair-work-title .filters{grid-template-columns:1fr!important}.repair-kpis{grid-template-columns:1fr 1fr}.repair-worker-select-row,.repair-worker-add-row{grid-template-columns:1fr}.repair-worker-select-row button,.repair-worker-add-row button{width:100%}.repair-work-grid{grid-template-columns:1fr 1fr}.repair-line-numbers span{min-width:72px}.quick-qty{grid-template-columns:repeat(3,1fr)}}


/* v0.6.27 — repair work grid hotfix */
.repair-line{
  overflow:hidden;
}
.repair-work-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr)) !important;
  gap:10px !important;
  align-items:stretch;
}
.repair-work-action{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:4px !important;
  width:100% !important;
  min-width:0 !important;
  min-height:96px !important;
  padding:12px 14px !important;
  line-height:1.15 !important;
  white-space:normal !important;
  overflow:hidden;
}
.repair-work-action span,
.repair-work-action b,
.repair-work-action small{
  display:block !important;
  width:100% !important;
  white-space:normal !important;
}
.repair-work-action span{
  font-size:14px;
  font-weight:800;
}
.repair-work-action b{
  font-size:28px !important;
  line-height:1 !important;
  margin:2px 0;
}
.repair-work-action small{
  font-size:12px !important;
  color:#6b7280 !important;
}
.repair-work-action.output{
  background:#effaf3;
  border-color:#9bd0ae;
}
.repair-line-main{
  align-items:flex-start !important;
}
.repair-line-numbers{
  flex-wrap:wrap;
  row-gap:8px;
  justify-content:flex-end;
}
.repair-line-numbers span{
  min-width:72px;
}
@media(max-width:900px){
  .repair-work-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:560px){
  .repair-work-grid{
    grid-template-columns:1fr !important;
  }
  .repair-work-action{
    min-height:88px !important;
  }
}



/* v0.6.31 — печать дневного факта ремонта */
.repair-title-actions{
  display:flex;
  gap:8px;
  align-items:stretch;
  justify-content:flex-end;
  min-width:0;
}
.repair-title-actions .filters{
  flex:1 1 auto;
  min-width:0;
}
.repair-print-day{
  white-space:nowrap;
  min-height:46px;
}
@media(max-width:900px){
  .repair-title-actions{width:100%}
}
@media(max-width:560px){
  .repair-title-actions{display:grid;grid-template-columns:1fr}
  .repair-print-day{width:100%}
}


/* v0.6.36 — Склад: dashboard + Приход/Расход */
.warehouse-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:0 0 14px;
}
.warehouse-summary-card{
  display:grid;
  grid-template-columns:1fr auto;
  gap:4px 12px;
  align-items:end;
  padding:18px 20px;
  border:1px solid #d7e0e6;
  border-radius:16px;
  background:#fff;
  color:#111;
  text-decoration:none;
}
.warehouse-summary-card span{
  align-self:start;
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.warehouse-summary-card b{
  grid-row:1 / span 2;
  grid-column:2;
  font-size:34px;
  line-height:1;
}
.warehouse-summary-card small{color:#69788a}
.warehouse-summary-card.incoming{border-color:#91ceb0;background:#f2fbf6}
.warehouse-summary-card.outgoing{border-color:#9dc5e8;background:#f4f9fd}
.warehouse-summary-card.repair{border-color:#e8c78f;background:#fff9ef}

.warehouse-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.warehouse-dashboard-panel{min-width:0}
.warehouse-dashboard-panel.repair-panel{grid-column:1/-1}
.warehouse-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.warehouse-panel-head h2{margin:2px 0 0}
.warehouse-panel-kicker{
  color:#667789;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
}
.warehouse-filter-links{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
}
.warehouse-filter-links.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.warehouse-filter-links.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.warehouse-filter-links a{
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
  padding:10px 12px;
  border:1px solid #dbe3e8;
  border-radius:12px;
  color:#111;
  text-decoration:none;
  background:#fafcfd;
}
.warehouse-filter-links b{font-size:20px}
.warehouse-filter-links span{font-size:12px;color:#647487}
.warehouse-mini-list{display:grid;gap:7px}
.warehouse-mini-list>a{
  display:grid;
  grid-template-columns:62px minmax(0,1fr);
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid #e1e7eb;
  border-radius:10px;
  color:#111;
  text-decoration:none;
}
.warehouse-mini-list>a:hover{background:#f7fafb}
.warehouse-mini-list time{font-weight:800;color:#465666}
.warehouse-mini-list span{display:grid;min-width:0}
.warehouse-mini-list b{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.warehouse-mini-list small{color:#69788a;margin-top:2px}
.empty.compact{padding:14px}

.shipment-type-filters{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.op-actions .arrival-btn,
.op-actions .finish-btn{
  white-space:nowrap;
}

@media(max-width:980px){
  .warehouse-dashboard-grid{grid-template-columns:1fr}
  .warehouse-dashboard-panel.repair-panel{grid-column:auto}
}
@media(max-width:760px){
  .warehouse-summary-grid{grid-template-columns:1fr}
  .warehouse-filter-links,
  .warehouse-filter-links.two,
  .warehouse-filter-links.three,
  .shipment-type-filters{grid-template-columns:1fr}
}


/* v0.6.38 — выравнивание статуса акта выдачи */
.repair-history-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
.repair-history-actions .badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 12px;
  white-space:nowrap;
}
.repair-history-actions .repair-resend{
  min-height:36px;
}

/* v0.6.44 — одинаковые KPI-карточки расхода */
.shipment-type-filters > .kpi-filter{
  min-height:96px;
  display:flex !important;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:4px;
}
.shipment-type-filters > .kpi-filter b{
  display:block;
  font-size:28px;
  line-height:1;
  min-height:28px;
}
.shipment-type-filters > .kpi-filter span{
  display:block;
  line-height:1.25;
}


/* v0.6.46 — планшетная раскладка карточек Приход / Расход */

/*
  До этого op-card оставался flex почти до телефонного breakpoint.
  На планшете длинные кнопки и отметка электронного акта забирали
  ширину у op-main, из-за чего название контрагента схлопывалось
  до нескольких пикселей и начинало идти вертикально.
*/
@media (max-width:1100px){
  .cards .op-card{
    display:grid !important;
    grid-template-columns:72px minmax(0,1fr);
    grid-template-areas:
      "time main"
      "sent sent"
      "actions actions";
    align-items:start !important;
    column-gap:12px !important;
    row-gap:10px !important;
    width:100%;
    min-width:0;
  }

  .cards .op-card > .time{
    grid-area:time;
    min-width:0 !important;
    width:auto;
    padding-top:2px;
    white-space:nowrap;
  }

  .cards .op-card > .op-main{
    grid-area:main;
    min-width:0 !important;
    width:100%;
  }

  .cards .op-card > .op-main h3{
    min-width:0;
    max-width:100%;
    margin:5px 0;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
  }

  .cards .op-card > .op-main p{
    min-width:0;
    max-width:100%;
    white-space:normal;
    word-break:normal;
    overflow-wrap:break-word;
  }

  .cards .op-card > .op-main .badges{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    min-width:0;
  }

  .cards .op-card > .today-act-sent-check{
    grid-area:sent;
    justify-self:start;
    width:auto !important;
    max-width:100%;
    min-width:0 !important;
    margin-left:0 !important;
    order:initial !important;
  }

  .cards .op-card > .op-actions{
    grid-area:actions;
    display:flex !important;
    justify-content:flex-end;
    align-items:stretch;
    flex-wrap:wrap;
    gap:8px;
    width:100%;
    min-width:0;
  }

  .cards .op-card > .op-actions > *{
    min-width:0;
    min-height:48px;
  }

  .cards .op-card > .op-actions .arrival-btn,
  .cards .op-card > .op-actions .finish-btn{
    flex:0 1 auto;
    white-space:normal !important;
    line-height:1.2;
  }

  .cards .op-card > .op-actions .button{
    flex:0 0 auto;
    white-space:nowrap;
  }
}

/* Планшет в портретной ориентации: действия занимают отдельную строку
   и равномерно делят доступную ширину. */
@media (max-width:820px){
  .cards .op-card{
    grid-template-columns:64px minmax(0,1fr);
    padding:12px !important;
  }

  .cards .op-card > .time{
    font-size:21px;
  }

  .cards .op-card > .op-main h3{
    font-size:16px;
    line-height:1.25;
  }

  .cards .op-card > .op-main p{
    font-size:13px;
    line-height:1.35;
  }

  .cards .op-card > .op-actions{
    display:grid !important;
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
    justify-content:stretch;
  }

  .cards .op-card > .op-actions > *{
    width:100%;
    min-height:50px;
  }

  .cards .op-card > .today-act-sent-check{
    width:100% !important;
  }
}

/* Телефон: без попыток удержать время и описание в одной строке. */
@media (max-width:540px){
  .cards .op-card{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:
      "time"
      "main"
      "sent"
      "actions";
  }

  .cards .op-card > .time{
    font-size:20px;
  }

  .cards .op-card > .op-actions{
    grid-template-columns:1fr;
  }

  .cards .op-card > .op-actions > *{
    width:100%;
  }
}


/* v0.6.47 — новая архитектура раздела Ремонт */
.repair-main-tabs{margin-bottom:8px}
.repair-subtabs{
  display:flex;
  gap:6px;
  width:max-content;
  max-width:100%;
  margin:0 0 14px;
  padding:4px;
  border:1px solid #d8e1e7;
  border-radius:12px;
  background:#fff;
}
.repair-subtabs a{
  padding:9px 14px;
  border-radius:9px;
  color:#17202a;
  text-decoration:none;
  font-weight:700;
}
.repair-subtabs a.active{
  background:#eaf7ef;
  color:#0b6537;
}

.repair-plan-kpis,
.repair-request-kpis{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.repair-plan-section{margin-top:14px}
.repair-request-list{display:grid;gap:10px}
.repair-plan-request{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  grid-template-areas:
    "main numbers action"
    "bar bar bar";
  gap:12px 18px;
  align-items:center;
  padding:15px;
  border:1px solid #dbe3e8;
  border-radius:14px;
  background:#fff;
}
.repair-plan-request-main{grid-area:main;min-width:0}
.repair-plan-request-main h3{margin:6px 0 3px;font-size:18px}
.repair-plan-request-main p{margin:0;color:#6a798a}
.repair-plan-request-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.repair-plan-request-progress{
  grid-area:numbers;
  display:flex;
  gap:16px;
  align-items:center;
}
.repair-plan-request-progress>div{display:grid;gap:2px;text-align:right}
.repair-plan-request-progress span{font-size:11px;color:#69798a;text-transform:uppercase}
.repair-plan-request-progress b{font-size:20px}
.repair-plan-request-progress .over b{color:#b54708}
.repair-plan-request>.button{grid-area:action;white-space:nowrap}
.repair-plan-request-bar{
  grid-area:bar;
  height:5px;
  overflow:hidden;
  border-radius:999px;
  background:#edf1f4;
}
.repair-plan-request-bar i{
  display:block;height:100%;
  background:#15824f;border-radius:inherit;
}
.repair-request-status.status-new{background:#eef2f5;color:#5c6977}
.repair-request-status.status-in_progress{background:#fff3dc;color:#956000}
.repair-request-status.status-done{background:#e5f7ec;color:#116b3a}

.repair-request-back{margin-bottom:10px}
.repair-request-back a{color:#486275;text-decoration:none;font-weight:700}
.repair-output-lines{display:grid;gap:8px;margin-top:10px}
.repair-output-line{
  display:grid;
  grid-template-columns:minmax(260px,1fr) auto auto;
  gap:16px;
  align-items:center;
  padding:13px 14px;
  border:1px solid #dce4e9;
  border-radius:12px;
}
.repair-output-item{display:grid;min-width:0}
.repair-output-item b{font-size:15px}
.repair-output-item small{margin-top:3px;color:#738293}
.repair-output-numbers{display:flex;gap:14px}
.repair-output-numbers>div{display:grid;text-align:right}
.repair-output-numbers span{font-size:10px;text-transform:uppercase;color:#738293}
.repair-output-numbers b{font-size:19px}
.repair-output-numbers .good b{color:#087d43}
.repair-output-numbers .over b{color:#b54708}
.repair-output-add{white-space:nowrap}

.repair-output-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.repair-output-actions h2{margin:0}

.repair-employee-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:10px;
  margin-top:10px;
}
.repair-employee-card{
  padding:14px;
  border:1px solid #dce4e9;
  border-radius:12px;
  background:#fff;
}
.repair-employee-card header{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.repair-employee-card header h3{margin:0}
.repair-employee-card header>b{font-size:24px}
.repair-employee-works{
  display:flex;flex-wrap:wrap;gap:7px;margin-top:10px;
}
.repair-employee-works span{
  display:flex;align-items:center;gap:6px;
  padding:6px 8px;border-radius:8px;background:#f3f6f8;
}
.repair-employee-works small{color:#647487}
.repair-employee-works b{font-size:14px}

@media(max-width:980px){
  .repair-plan-request{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "main action"
      "numbers numbers"
      "bar bar";
  }
  .repair-plan-request-progress{justify-content:flex-start}
  .repair-plan-request-progress>div{text-align:left}
  .repair-output-line{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "item action"
      "numbers numbers";
  }
  .repair-output-item{grid-area:item}
  .repair-output-numbers{grid-area:numbers;justify-content:flex-start;flex-wrap:wrap}
  .repair-output-numbers>div{text-align:left}
  .repair-output-add{grid-area:action}
}
@media(max-width:760px){
  .repair-main-tabs,
  .repair-subtabs{
    width:100%;
    overflow:auto;
  }
  .repair-plan-kpis,
  .repair-request-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .repair-plan-request{
    grid-template-columns:1fr;
    grid-template-areas:
      "main"
      "numbers"
      "bar"
      "action";
  }
  .repair-plan-request>.button{width:100%}
  .repair-plan-request-progress{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .repair-output-line{
    grid-template-columns:1fr;
    grid-template-areas:"item" "numbers" "action";
  }
  .repair-output-add{width:100%}
  .repair-output-actions{align-items:stretch;flex-direction:column}
  .repair-output-actions button{width:100%}
}

/* v0.6.50 — явная подпись физического склада во всех основных фильтрах */
.warehouse-filter-label{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  min-height:44px;
  font-weight:700;
  color:#536679;
  white-space:nowrap;
}
.filters .warehouse-filter-label + select[name="warehouse_id"]{
  min-width:220px;
}

@media(max-width:760px){
  .warehouse-filter-label{
    min-height:auto;
  }
}

/* v0.6.53 — единый экран фактического ремонта */
.repair-plan-request-link{
  color:inherit;
  text-decoration:none;
  cursor:pointer;
  transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
.repair-plan-request-link:hover{
  border-color:#8fc9aa;
  box-shadow:0 4px 14px rgba(25,98,62,.08);
  transform:translateY(-1px);
}
.repair-plan-request-open{
  grid-area:action;
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  color:#087d43;
  font-weight:800;
  white-space:nowrap;
}

.repair-actual-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.repair-request-priority-panel{
  margin-top:14px;
  border-color:#a8d9bc;
  background:linear-gradient(180deg,#f5fcf8 0,#fff 150px);
}
.repair-priority-title{align-items:flex-start}
.repair-priority-kicker{
  display:inline-block;
  margin-bottom:3px;
  color:#087d43;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
}
.repair-actual-requests{display:grid;gap:12px}
.repair-actual-request{
  padding:14px;
  border:1px solid #d9e4df;
  border-radius:14px;
  background:#fff;
}
.repair-actual-request.selected{
  border:2px solid #178653;
  box-shadow:0 0 0 3px rgba(23,134,83,.09);
}
.repair-actual-request>header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding-bottom:11px;
}
.repair-actual-request>header h3{margin:6px 0 3px}
.repair-actual-request>header p{margin:0;color:#69798a}
.repair-selected-badge{background:#dcf5e7;color:#09683a}
.repair-request-summary{
  display:flex;
  gap:16px;
  flex:0 0 auto;
}
.repair-request-summary span{
  display:grid;
  gap:2px;
  text-align:right;
}
.repair-request-summary small,
.repair-request-line-metrics small{
  color:#6f7f8f;
  font-size:10px;
  text-transform:uppercase;
}
.repair-request-summary b{font-size:20px}

.repair-actual-lines{
  display:grid;
  gap:7px;
  padding-top:10px;
  border-top:1px solid #e4ebe7;
}
.repair-request-line{
  display:grid;
  grid-template-columns:minmax(260px,1fr) auto 150px;
  gap:16px;
  align-items:center;
  padding:11px 12px;
  border:1px solid #e0e7e3;
  border-radius:11px;
  background:#fbfdfc;
}
.repair-request-line-metrics{
  display:flex;
  align-items:center;
  gap:14px;
}
.repair-request-line-metrics span{
  display:grid;
  min-width:72px;
  text-align:right;
}
.repair-request-line-metrics b{font-size:18px}
.repair-request-line-metrics .good b{color:#087d43}
.repair-request-line-metrics .stock{
  padding-left:12px;
  border-left:1px solid #d8e1dd;
}
.repair-request-line-metrics .stock b{color:#1b567e}

.repair-other-stock-panel{margin-top:14px}
.repair-actual-submit{margin-top:14px}
.repair-actual-submit .bottom-actions{margin-top:10px}

@media(max-width:1100px){
  .repair-request-line{
    grid-template-columns:minmax(0,1fr) 160px;
    grid-template-areas:
      "item qty"
      "metrics metrics";
  }
  .repair-request-line>.repair-item{grid-area:item}
  .repair-request-line>.repair-request-line-metrics{
    grid-area:metrics;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
  .repair-request-line>.repair-qty{grid-area:qty}
}
@media(max-width:800px){
  .repair-actual-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .repair-actual-request>header{
    display:grid;
    grid-template-columns:1fr;
  }
  .repair-request-summary{justify-content:flex-start;flex-wrap:wrap}
  .repair-request-summary span{text-align:left}
  .repair-request-line{
    grid-template-columns:1fr;
    grid-template-areas:"item" "metrics" "qty";
  }
  .repair-request-line>.repair-qty{width:100%}
  .repair-request-line>.repair-qty input{width:100%}
  .repair-plan-request-open{
    justify-content:flex-start;
  }
}


/* v0.6.54 — KPI шапка dashboard в стиле Приход / Расход */
.warehouse-dashboard-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:0 0 14px;
}

.warehouse-dashboard-kpis .warehouse-summary-card{
  display:grid;
  align-content:center;
  gap:7px;
  min-width:0;
  min-height:96px;
  padding:17px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
  color:inherit;
  text-decoration:none;
  transition:border-color .15s,box-shadow .15s,background .15s,transform .15s;
}

.warehouse-dashboard-kpis .warehouse-summary-card b{
  display:block;
  grid-row:auto;
  grid-column:auto;
  font-size:28px;
  line-height:1;
}

.warehouse-dashboard-kpis .warehouse-summary-card span{
  display:block;
  align-self:auto;
  color:var(--muted);
  font-size:inherit;
  font-weight:400;
  text-transform:none;
  letter-spacing:normal;
  line-height:1.25;
}

.warehouse-dashboard-kpis .warehouse-summary-card:hover{
  border-color:#8ebba3;
  box-shadow:0 4px 16px #17342412;
  transform:translateY(-1px);
}

/* Первый KPI сохраняет знакомый зеленый акцент "Всего",
   как на экранах Приход/Расход. */
.warehouse-dashboard-kpis .warehouse-summary-card:first-child{
  border-color:#4c9b70;
  background:#f1faf5;
  box-shadow:0 0 0 2px #4c9b7024;
}
.warehouse-dashboard-kpis .warehouse-summary-card:first-child span{
  color:#17603f;
  font-weight:700;
}

@media(max-width:760px){
  .warehouse-dashboard-kpis{
    grid-template-columns:1fr;
  }
}


/* v0.6.55 — число сверху, подпись снизу в KPI dashboard */
.warehouse-dashboard-kpis .warehouse-summary-card{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;
  grid-auto-flow:row !important;
  justify-items:start !important;
  align-content:center !important;
  text-align:left !important;
}

.warehouse-dashboard-kpis .warehouse-summary-card > b{
  grid-column:1 !important;
  grid-row:1 !important;
  justify-self:start !important;
  align-self:end !important;
  margin:0 !important;
}

.warehouse-dashboard-kpis .warehouse-summary-card > span{
  grid-column:1 !important;
  grid-row:2 !important;
  justify-self:start !important;
  align-self:start !important;
  margin:0 !important;
  text-align:left !important;
}


/* v0.6.56 — прокрутка списков Приход / Расход на dashboard */
.warehouse-dashboard-grid > .warehouse-dashboard-panel:not(.repair-panel) .warehouse-mini-list{
  max-height:320px;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-gutter:stable;
  padding-right:4px;
  overscroll-behavior:contain;
}

/* Чтобы последняя строка не прилипала к нижней границе при прокрутке */
.warehouse-dashboard-grid > .warehouse-dashboard-panel:not(.repair-panel) .warehouse-mini-list > :last-child{
  margin-bottom:2px;
}

/* Более удобный scrollbar для desktop/tablet */
.warehouse-dashboard-grid > .warehouse-dashboard-panel:not(.repair-panel) .warehouse-mini-list{
  scrollbar-width:thin;
}

@media(max-width:760px){
  .warehouse-dashboard-grid > .warehouse-dashboard-panel:not(.repair-panel) .warehouse-mini-list{
    max-height:360px;
  }
}


/* =========================================================
   v0.6.58 — ГЛОБАЛЬНАЯ МОБИЛЬНАЯ АДАПТАЦИЯ
   Только UI/CSS. Бизнес-логика не меняется.
   ========================================================= */

/* ---------- Touch / global ---------- */
@media screen and (max-width:760px){
  html,
  body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  body{
    padding-bottom:calc(72px + env(safe-area-inset-bottom));
    -webkit-text-size-adjust:100%;
  }

  *{
    min-width:0;
  }

  img,
  video,
  canvas{
    max-width:100%;
  }

  .page,
  .page.narrow{
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    padding:12px 10px 20px !important;
    overflow:visible !important;
  }

  .page h1{
    margin-top:0;
    font-size:26px;
    line-height:1.15;
    overflow-wrap:anywhere;
  }

  .page h2{
    font-size:21px;
    line-height:1.2;
    overflow-wrap:anywhere;
  }

  .page h3{
    overflow-wrap:anywhere;
  }

  .muted,
  .page p,
  .page small{
    overflow-wrap:anywhere;
  }

  .panel{
    padding:12px !important;
    border-radius:14px !important;
  }

  .page-title{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
    align-items:stretch !important;
    margin-bottom:12px !important;
  }

  .page-title > *{
    min-width:0;
  }

  .page-title .filters,
  .filters{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:8px !important;
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
  }

  .filters .warehouse-filter-label,
  .warehouse-filter-label{
    display:block !important;
    min-height:auto !important;
    margin:0 0 -2px !important;
    font-size:12px;
    line-height:1.2;
  }

  .filters select,
  .filters input,
  .filters button,
  .page-title select,
  .page-title input{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    min-height:46px !important;
    font-size:16px !important;
  }

  input,
  select,
  textarea{
    max-width:100%;
    font-size:16px !important; /* iOS: не увеличивать страницу при фокусе */
  }

  textarea{
    min-height:96px;
  }

  .primary,
  .secondary,
  .ghost,
  .danger,
  a.button,
  button.button{
    touch-action:manipulation;
  }

  .primary:not(.compact-action),
  .secondary:not(.compact-action),
  a.button:not(.compact-action),
  button.button:not(.compact-action){
    min-height:46px;
  }

  .back{
    display:inline-flex;
    margin-bottom:6px;
    min-height:34px;
    align-items:center;
  }

  /* Локальные горизонтальные скроллы вместо прокрутки всей страницы */
  .table-wrap,
  .admin-table-wrap,
  .schedule-wrap{
    width:100%;
    max-width:100%;
    overflow:auto !important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
  }

  pre,
  code{
    max-width:100%;
    overflow:auto;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
  }

  /* ---------- Header ---------- */
  .topbar{
    position:sticky !important;
    top:0;
    z-index:70;
    width:100%;
    height:58px !important;
    padding:6px 10px !important;
    gap:8px !important;
    background:#fff;
  }

  .topbar .brand{
    flex:0 1 auto !important;
    gap:7px !important;
    min-width:0 !important;
    font-size:18px !important;
  }

  .topbar .brandbox{
    width:40px !important;
    min-width:40px !important;
    height:40px !important;
    font-size:14px !important;
    line-height:.85 !important;
  }

  .desktop-nav{
    display:none !important;
  }

  .user-text{
    display:none !important;
  }

  .user-menu{
    margin-left:auto;
    flex:0 0 auto;
  }

  .user-menu summary{
    min-width:44px;
    min-height:44px;
    justify-content:center;
  }

  .user-popover{
    position:fixed !important;
    top:62px !important;
    right:8px !important;
    left:8px !important;
    width:auto !important;
    max-width:none !important;
    z-index:100;
  }

  .mobile-identity{
    display:none !important;
  }

  /* На телефоне нижнее меню прокручивается горизонтально:
     6-7 ролей больше не сжимаются в микроскопические кнопки. */
  .mobile-nav{
    display:flex !important;
    position:fixed !important;
    left:0;
    right:0;
    bottom:0;
    z-index:90;
    justify-content:flex-start !important;
    gap:2px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    padding:5px 6px calc(5px + env(safe-area-inset-bottom)) !important;
    background:#fff;
    border-top:1px solid var(--line);
    box-shadow:0 -8px 24px #17212b12;
  }

  .mobile-nav::-webkit-scrollbar{
    display:none;
  }

  .mobile-nav a{
    flex:0 0 70px !important;
    min-width:70px !important;
    min-height:54px !important;
    padding:5px 3px !important;
    scroll-snap-align:start;
    border-radius:10px;
    font-size:10px !important;
    line-height:1.1;
  }

  .mobile-nav a svg{
    width:22px;
    height:22px;
  }

  /* ---------- KPI ---------- */
  .kpis,
  .repair-kpis,
  .repair-plan-kpis,
  .repair-request-kpis,
  .repair-actual-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }

  .kpi-filter,
  .kpis > *,
  .repair-kpis > *{
    min-height:88px !important;
    padding:12px !important;
  }

  .kpi-filter b,
  .kpis > * b,
  .repair-kpis > * strong{
    font-size:25px !important;
  }

  .shipment-type-filters{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  /* Dashboard */
  .warehouse-dashboard-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }

  .warehouse-dashboard-kpis .warehouse-summary-card:first-child{
    grid-column:1/-1;
  }

  .warehouse-dashboard-kpis .warehouse-summary-card{
    min-height:88px !important;
    padding:13px !important;
  }

  .warehouse-dashboard-grid{
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
  }

  .warehouse-panel-head{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:8px !important;
    align-items:stretch !important;
  }

  .warehouse-panel-head .button{
    width:100%;
  }

  .warehouse-filter-links,
  .warehouse-filter-links.two,
  .warehouse-filter-links.three{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .warehouse-mini-list > a{
    grid-template-columns:52px minmax(0,1fr) !important;
    gap:8px !important;
    padding:10px !important;
  }

  .warehouse-mini-list b{
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    overflow-wrap:anywhere;
  }

  /* ---------- Приход / Расход ---------- */
  .cards{
    gap:9px !important;
  }

  .cards .op-card{
    overflow:visible !important;
  }

  .cards .op-card > .op-main h3{
    overflow-wrap:anywhere !important;
    word-break:normal !important;
  }

  .cards .op-card > .op-actions{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    width:100% !important;
  }

  .cards .op-card > .op-actions > *{
    width:100% !important;
    min-height:48px !important;
    white-space:normal !important;
  }

  .cards .op-card > .today-act-sent-check{
    width:100% !important;
    max-width:none !important;
  }

  .today-act-sent-check,
  .act-sent-check{
    min-width:0 !important;
    white-space:normal !important;
  }

  .badge,
  .badges{
    max-width:100%;
  }

  .badges{
    display:flex;
    flex-wrap:wrap;
  }

  /* ---------- Карточка Приход / Расход ---------- */
  .accept-state-wrap{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-start !important;
    gap:6px;
  }

  .operation-photos{
    padding:11px !important;
  }

  .operation-photos-head{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:9px !important;
  }

  .operation-photos-actions{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
    gap:7px;
  }

  .operation-photos-actions > *{
    width:100% !important;
    min-width:0 !important;
    white-space:normal !important;
  }

  .operation-photo-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .accept-card{
    padding:11px !important;
  }

  .accept-title-line{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:5px !important;
  }

  .accept-item-name{
    overflow-wrap:anywhere;
  }

  /* Матрица количеств остается горизонтально скроллируемой —
     лучше скролл, чем поля шириной по 30 пикселей. */
  .accept-card .qty-grid,
  .qty-grid{
    max-width:100% !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
  }

  .catalog-picker{
    width:100% !important;
    min-width:0 !important;
  }

  .catalog-results{
    max-width:calc(100vw - 40px) !important;
  }

  .line-photo-requirements{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
  }

  .line-photo-btn{
    width:100%;
  }

  .acceptance .toolbar,
  .shipment-toolbar{
    max-width:100%;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
  }

  .destination-choice{
    padding:10px !important;
  }

  .bottom-actions{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:8px !important;
    width:100%;
  }

  .bottom-actions > *{
    width:100% !important;
  }

  /* ---------- Акты ---------- */
  .act-filter-panel{
    grid-template-columns:minmax(0,1fr) !important;
    gap:8px !important;
    padding:10px !important;
  }

  .act-filter-panel label,
  .act-filter-panel input,
  .act-filter-panel select{
    width:100%;
    min-width:0;
  }

  .act-filter-count{
    display:flex;
    justify-content:space-between;
    align-items:center;
    min-height:46px;
  }

  .act-list-card{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
  }

  .act-list-card .act-sent-check{
    width:100% !important;
  }

  .act-list-card .act-actions,
  .page-title .act-actions{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    width:100%;
  }

  .act-list-card .act-actions > *,
  .page-title .act-actions > *{
    width:100%;
    min-width:0;
  }

  .act-table{
    min-width:640px;
    font-size:13px;
  }

  .sign-grid{
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
  }

  .sign-card{
    padding:11px !important;
  }

  .sign-card canvas{
    width:100% !important;
    max-width:100% !important;
    touch-action:none;
  }

  .primary.xl.wide,
  #signAct{
    width:100% !important;
    white-space:normal !important;
  }

  .signed,
  .pdf-meta{
    min-width:0;
    overflow-wrap:anywhere;
  }

  /* ---------- Ремонт ---------- */
  .repair-tabs,
  .repair-main-tabs{
    display:flex !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    gap:3px !important;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }

  .repair-tabs::-webkit-scrollbar{
    display:none;
  }

  .repair-tabs a{
    flex:0 0 auto;
    min-height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    white-space:nowrap;
  }

  .repair-plan-request,
  .repair-plan-request-link{
    padding:12px !important;
  }

  .repair-plan-request-progress{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }

  .repair-plan-request-progress > div{
    text-align:left !important;
    padding:7px 8px;
    background:#f7f9fa;
    border-radius:8px;
  }

  .repair-actual-request{
    padding:11px !important;
  }

  .repair-request-summary{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    width:100%;
    gap:7px !important;
  }

  .repair-request-summary span{
    text-align:left !important;
    padding:7px;
    border-radius:8px;
    background:#f6f8f9;
  }

  .repair-request-line{
    padding:10px !important;
  }

  .repair-request-line-metrics{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px !important;
    width:100%;
  }

  .repair-request-line-metrics span{
    min-width:0 !important;
    text-align:left !important;
    padding:7px;
    background:#f6f8f9;
    border-radius:8px;
  }

  .repair-request-line-metrics .stock{
    padding-left:7px !important;
    border-left:0 !important;
  }

  .repair-qty{
    width:100% !important;
  }

  .repair-qty input{
    width:100% !important;
    min-height:48px;
  }

  .repair-other-stock-panel .panel-title,
  .repair-priority-title{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:8px !important;
  }

  .repair-search{
    width:100% !important;
  }

  .repair-stock-row,
  .repair-fact-row{
    min-width:0;
  }

  .repair-workers-panel{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
  }

  .repair-worker-tools,
  .repair-worker-select-row,
  .repair-worker-add-row{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    width:100%;
    gap:7px !important;
  }

  .repair-worker-tools > *,
  .repair-worker-select-row > *,
  .repair-worker-add-row > *{
    width:100% !important;
  }

  .repair-employee-summary{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .repair-facts article{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:7px !important;
  }

  .repair-fact-delete{
    width:100%;
    min-height:44px;
  }

  .repair-title-actions{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    width:100% !important;
  }

  .repair-title-actions .repair-print-day{
    width:100%;
  }

  /* Modals / dialogs */
  dialog,
  .repair-fact-dialog{
    box-sizing:border-box;
    width:calc(100vw - 16px) !important;
    max-width:560px !important;
    max-height:calc(100dvh - 16px) !important;
    margin:auto !important;
    padding:0 !important;
    border-radius:18px !important;
  }

  dialog > form,
  .repair-fact-dialog > form{
    max-height:calc(100dvh - 16px);
    overflow-y:auto;
    padding:18px !important;
    overscroll-behavior:contain;
  }

  .dialog-close{
    min-width:44px;
    min-height:44px;
  }

  .quick-qty{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }

  .quick-qty button{
    min-height:46px;
  }

  /* ---------- График ---------- */
  .legend{
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:12px !important;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }

  .legend::-webkit-scrollbar{
    display:none;
  }

  .legend > *{
    flex:0 0 auto;
    white-space:nowrap;
  }

  #schedule{
    width:100%;
    max-width:100%;
    overflow:hidden;
  }

  .schedule-wrap{
    margin:0 -10px;
    padding:0 10px 8px;
  }

  .schedule-table{
    min-width:760px !important;
  }

  /* ---------- Бригады ---------- */
  .crew-grid{
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
  }

  .crew-grid .panel label{
    display:grid;
    gap:5px;
  }

  .crew-grid input,
  .crew-grid select,
  .crew-grid textarea,
  .crew-grid button{
    width:100%;
  }

  .crew-event{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:5px 8px !important;
    align-items:start !important;
  }

  .crew-event small{
    grid-column:1/-1;
  }

  /* ---------- Admin ---------- */
  .admin-tabs{
    position:sticky !important;
    top:58px !important;
    z-index:50 !important;
    display:flex !important;
    flex-wrap:nowrap !important;
    width:calc(100% + 20px) !important;
    margin:0 -10px 12px !important;
    padding:6px 10px !important;
    overflow-x:auto !important;
    border-radius:0 !important;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }

  .admin-tabs::-webkit-scrollbar{
    display:none;
  }

  .admin-tabs a{
    flex:0 0 auto;
    white-space:nowrap;
    min-height:40px;
    display:flex;
    align-items:center;
  }

  .admin-grid,
  .admin-grid.pdg-diagnostic-grid,
  .admin-health-grid,
  .exchange-health{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .admin-users-desktop{
    display:none !important;
  }

  .admin-users-mobile{
    display:grid !important;
    gap:9px;
  }

  .admin-user-card{
    min-width:0;
  }

  .admin-user-head{
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) !important;
    gap:8px !important;
  }

  .admin-action,
  .admin-alert-actions{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
  }

  .admin-action > *,
  .admin-alert-actions > *{
    flex:1 1 160px;
    min-height:44px;
  }

  .admin-table{
    min-width:720px;
  }

  .admin-table.compact{
    min-width:620px;
  }

  /* ---------- Profile ---------- */
  .profile-card{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    justify-items:start;
    gap:10px !important;
  }

  .install-row{
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) !important;
    gap:10px !important;
  }

  .install-row #installPwa{
    grid-column:1/-1;
    width:100%;
  }

  .form-grid.two{
    grid-template-columns:minmax(0,1fr) !important;
  }

  /* ---------- Login ---------- */
  .login{
    width:100%;
    min-height:100dvh;
    padding:0 !important;
  }

  .login-shell{
    width:100% !important;
    min-height:100dvh !important;
    margin:0 !important;
    padding:14px 10px 20px !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }

  .login-brand{
    align-items:center;
  }

  .login-brand h1{
    font-size:24px;
  }

  .people-grid{
    grid-template-columns:minmax(0,1fr) !important;
    gap:8px !important;
  }

  .person-card{
    min-height:74px;
    text-align:left;
  }

  .people-search,
  .pin-form input,
  .pin-form button{
    width:100%;
    min-height:50px;
  }

  .pin-form{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:8px !important;
  }
}

/* Очень узкие телефоны */
@media screen and (max-width:390px){
  .page{
    padding-left:8px !important;
    padding-right:8px !important;
  }

  .kpis,
  .repair-kpis,
  .repair-plan-kpis,
  .repair-request-kpis,
  .repair-actual-kpis,
  .shipment-type-filters{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .warehouse-dashboard-kpis{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .warehouse-dashboard-kpis .warehouse-summary-card:first-child{
    grid-column:auto;
  }

  .operation-photos-actions{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .act-list-card .act-actions,
  .page-title .act-actions{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .repair-request-summary,
  .repair-request-line-metrics{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .repair-plan-request-progress{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .mobile-nav a{
    flex-basis:68px !important;
    min-width:68px !important;
  }
}

/* Touch-only devices: нормальные цели нажатия, но не ломаем desktop */
@media (hover:none) and (pointer:coarse){
  a,
  button,
  input,
  select,
  textarea,
  summary{
    touch-action:manipulation;
  }

  .badge{
    user-select:none;
  }
}


/* v0.6.59 — поиск номенклатуры факта работ только по остатку Под ремонт */
.repair-item-results{
  width:100%;
  max-width:100%;
  max-height:280px;
  overflow-y:auto;
  overflow-x:hidden;
  box-sizing:border-box;
  scrollbar-gutter:stable;
}

.repair-item-results .repair-item-result{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;
  gap:4px !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box !important;
  align-items:start !important;
  justify-items:stretch !important;
  padding:10px 11px !important;
  text-align:left !important;
  white-space:normal !important;
  overflow:hidden !important;
}

.repair-item-results .repair-item-result-name{
  display:block !important;
  grid-column:1 !important;
  grid-row:1 !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  margin:0 !important;
  font-size:14px;
  line-height:1.25;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
}

.repair-item-results .repair-item-result-meta{
  display:block !important;
  grid-column:1 !important;
  grid-row:2 !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  margin:0 !important;
  color:#64748b !important;
  font-size:12px !important;
  line-height:1.25;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}

.repair-item-results-empty{
  padding:12px;
  color:#64748b;
  font-size:13px;
  line-height:1.35;
}

@media screen and (max-width:760px){
  .repair-fact-dialog .repair-item-results{
    max-height:min(260px,32dvh);
    margin-top:6px;
    border-radius:10px;
  }

  .repair-item-results .repair-item-result{
    min-height:58px !important;
    padding:10px !important;
  }

  .repair-item-results .repair-item-result-name{
    font-size:14px !important;
  }

  .repair-item-results .repair-item-result-meta{
    font-size:11px !important;
  }
}


/* =========================================================
   v0.6.60 — поиск факта работ: карточки + sticky submit
   ========================================================= */

/* Результаты поиска компактные: название сверху, мета и остаток снизу */
.repair-item-results{
  max-height:250px !important;
  padding:4px !important;
  box-sizing:border-box !important;
}

.repair-item-results .repair-item-result{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box !important;
  min-height:0 !important;
  padding:8px 10px !important;
  margin:0 !important;
  text-align:left !important;
  white-space:normal !important;
  overflow:hidden !important;
}

.repair-item-results .repair-item-result + .repair-item-result{
  margin-top:4px !important;
}

.repair-item-results .repair-item-result-name{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  margin:0 0 4px !important;
  padding:0 !important;
  font-size:14px !important;
  line-height:1.22 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
}

.repair-item-result-footer{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  width:100% !important;
  min-width:0 !important;
}

.repair-item-results .repair-item-result-meta{
  display:block !important;
  flex:1 1 auto !important;
  min-width:0 !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  color:#64748b !important;
  font-size:11px !important;
  line-height:1.2 !important;
  white-space:normal !important;
  overflow:visible !important;
  overflow-wrap:anywhere !important;
}

.repair-item-result-stock{
  display:inline-flex !important;
  flex:0 0 auto !important;
  align-items:center !important;
  gap:3px !important;
  min-width:0 !important;
  max-width:50% !important;
  padding:3px 7px !important;
  border-radius:999px !important;
  background:#eef8f2 !important;
  color:#17603f !important;
  font-size:11px !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
}

.repair-item-result-stock b{
  font-size:11px !important;
  line-height:1 !important;
}

/* Кнопка сохранения всегда видна внизу прокручиваемой модалки */
.repair-fact-dialog > form{
  position:relative;
  padding-bottom:0 !important;
}

.repair-fact-dialog-actions{
  position:sticky !important;
  left:0;
  right:0;
  bottom:0;
  z-index:8;
  margin:12px -18px 0 !important;
  padding:10px 18px calc(12px + env(safe-area-inset-bottom)) !important;
  border-top:1px solid #e2e8f0;
  background:rgba(255,255,255,.97) !important;
  backdrop-filter:blur(8px);
}

.repair-fact-dialog-actions .primary{
  width:100% !important;
  min-height:48px !important;
  margin:0 !important;
}

/* В мобильной модалке список не занимает половину всего экрана */
@media screen and (max-width:760px){
  .repair-item-results{
    max-height:min(220px,29dvh) !important;
  }

  .repair-item-results .repair-item-result{
    padding:8px 9px !important;
  }

  .repair-item-result-footer{
    align-items:center !important;
  }

  .repair-item-result-stock{
    max-width:54% !important;
    padding:3px 6px !important;
    font-size:10px !important;
  }
}

/* На очень узком экране мета и остаток честно становятся двумя строками */
@media screen and (max-width:390px){
  .repair-item-result-footer{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:4px !important;
  }

  .repair-item-result-stock{
    justify-self:start !important;
    max-width:100% !important;
  }
}


/* =========================================================
   v0.6.61 — FIX: результаты поиска не ужимаются grid-контейнером
   ========================================================= */

/* Важно: раньше этот блок был display:grid.
   При max-height и большом количестве найденных позиций grid
   начинал сжимать auto-rows. Теперь обычный вертикальный поток. */
.repair-item-results{
  display:block !important;
  height:auto !important;
  min-height:0 !important;
  max-height:250px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:4px !important;
}

/* Каждая карточка занимает естественную высоту по содержимому. */
.repair-item-results .repair-item-result{
  display:block !important;
  position:relative !important;
  width:100% !important;
  height:auto !important;
  min-height:54px !important;
  max-height:none !important;
  padding:8px 10px !important;
  overflow:visible !important;
  flex:none !important;
}

/* Отступы задаем через margin, grid-gap больше не нужен. */
.repair-item-results .repair-item-result + .repair-item-result{
  margin-top:5px !important;
}

/* Название не режем даже в 2-3 строки. */
.repair-item-results .repair-item-result-name{
  display:block !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  margin:0 0 5px !important;
  padding:0 !important;
  line-height:1.25 !important;
  white-space:normal !important;
  overflow:visible !important;
}

/* Нижняя строка отдельно от названия. */
.repair-item-result-footer{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  width:100% !important;
  min-width:0 !important;
  height:auto !important;
}

/* Код не занимает место остатка. */
.repair-item-results .repair-item-result-meta{
  flex:1 1 0 !important;
  min-width:0 !important;
  overflow-wrap:anywhere !important;
}

/* Остаток всегда целиком виден. */
.repair-item-result-stock{
  flex:0 0 auto !important;
  max-width:none !important;
}

/* На телефоне оставляем примерно 3-4 видимых результата. */
@media screen and (max-width:760px){
  .repair-item-results{
    max-height:min(235px,31dvh) !important;
  }

  .repair-item-results .repair-item-result{
    min-height:56px !important;
  }
}

/* На очень узком экране мета и остаток расходятся по строкам. */
@media screen and (max-width:390px){
  .repair-item-result-footer{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:4px !important;
  }

  .repair-item-result-stock{
    justify-self:start !important;
  }
}

/* v0.6.62 — пакетный ввод выполненных работ */
.repair-section-hint{margin:-4px 0 14px;font-size:13px}
.repair-batch-open{white-space:nowrap}
.repair-batch-dialog{width:min(920px,calc(100vw - 28px)) !important;max-width:920px !important}
.repair-batch-help{margin:-4px 0 12px}
.repair-batch-rows{display:grid;gap:10px;margin:12px 0}
.repair-batch-row{padding:12px;border:1px solid #dbe4ea;border-radius:13px;background:#f9fbfc}
.repair-batch-row-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.repair-batch-remove{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:1px solid #efc7c4;border-radius:9px;background:#fff6f5;color:#a93027;font-size:20px;cursor:pointer}
.repair-batch-remove:disabled{opacity:.35;cursor:not-allowed}
.repair-batch-row-fields{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:10px}
.repair-batch-results{max-height:190px !important}
.repair-batch-quick{max-width:360px;margin-top:7px}
.repair-batch-add-row{width:100%;min-height:44px;margin-bottom:12px}
.repair-batch-dialog .repair-fact-dialog-actions{margin-top:14px !important}
@media screen and (max-width:760px){.repair-batch-dialog{width:calc(100vw - 12px) !important;max-width:none !important}.repair-batch-row{padding:10px}.repair-batch-row-fields{grid-template-columns:minmax(0,1fr) !important;gap:7px}.repair-batch-results{max-height:min(190px,25dvh) !important}.repair-batch-quick{max-width:none}}


/* =========================================================
   v0.6.63 — компактная панель сотрудников (desktop + mobile)
   ========================================================= */

/* ---------- Desktop ---------- */
.repair-workers-panel-compact{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) !important;
  align-items:center !important;
  gap:18px !important;
  min-height:0 !important;
  padding:12px 16px !important;
  overflow:visible !important;
}

.repair-workers-panel-compact .repair-workers-copy{
  min-width:max-content !important;
}

.repair-workers-panel-compact .repair-workers-copy h2{
  margin:0 !important;
  font-size:24px !important;
  line-height:1.1 !important;
  white-space:nowrap !important;
}

.repair-workers-panel-compact .repair-worker-tools{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
  width:100% !important;
  min-width:0 !important;
}

.repair-workers-panel-compact .repair-worker-select-row,
.repair-workers-panel-compact .repair-worker-add-row{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  min-width:0 !important;
}

.repair-workers-panel-compact .repair-worker-select-row{
  flex:1 1 300px !important;
  max-width:390px !important;
}

.repair-workers-panel-compact .repair-worker-add-row{
  flex:1 1 280px !important;
  max-width:350px !important;
}

.repair-workers-panel-compact #repairWorkerDefault,
.repair-workers-panel-compact #repairWorkerName{
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  height:42px !important;
  min-height:42px !important;
}

.repair-workers-panel-compact #deleteRepairWorker,
.repair-workers-panel-compact #addRepairWorker,
.repair-workers-panel-compact #addRepairWorkBatch,
.repair-workers-panel-compact #addRepairWorkFact{
  flex:0 0 auto !important;
  width:auto !important;
  min-width:0 !important;
  min-height:42px !important;
  height:42px !important;
  padding:8px 14px !important;
  margin:0 !important;
  white-space:nowrap !important;
  line-height:1 !important;
}

.repair-workers-panel-compact #addRepairWorkFact{
  min-width:122px !important;
}

/* Ноутбуки / узкие desktop: разрешаем аккуратный перенос,
   без старой гигантской второй строки. */
@media screen and (max-width:1280px) and (min-width:761px){
  .repair-workers-panel-compact{
    grid-template-columns:auto minmax(0,1fr) !important;
    align-items:start !important;
  }

  .repair-workers-panel-compact .repair-worker-tools{
    flex-wrap:wrap !important;
    justify-content:flex-end !important;
  }

  .repair-workers-panel-compact .repair-worker-select-row{
    flex:1 1 300px !important;
    max-width:none !important;
  }

  .repair-workers-panel-compact .repair-worker-add-row{
    flex:1 1 280px !important;
    max-width:none !important;
  }
}

/* ---------- Phone / tablet ---------- */
@media screen and (max-width:760px){
  .repair-workers-panel-compact{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
    padding:12px !important;
  }

  .repair-workers-panel-compact .repair-workers-copy{
    min-width:0 !important;
  }

  .repair-workers-panel-compact .repair-workers-copy h2{
    font-size:20px !important;
    white-space:normal !important;
  }

  .repair-workers-panel-compact .repair-worker-tools{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:8px !important;
    width:100% !important;
  }

  /* строка 1: сотрудник + удалить */
  .repair-workers-panel-compact .repair-worker-select-row{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:8px !important;
    grid-column:1 / -1 !important;
    width:100% !important;
    max-width:none !important;
  }

  /* строка 2: новый сотрудник + добавить */
  .repair-workers-panel-compact .repair-worker-add-row{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:8px !important;
    grid-column:1 / -1 !important;
    width:100% !important;
    max-width:none !important;
  }

  .repair-workers-panel-compact #repairWorkerDefault,
  .repair-workers-panel-compact #repairWorkerName{
    width:100% !important;
    min-width:0 !important;
    height:46px !important;
    min-height:46px !important;
    font-size:16px !important;
  }

  .repair-workers-panel-compact #deleteRepairWorker,
  .repair-workers-panel-compact #addRepairWorker{
    width:auto !important;
    min-height:46px !important;
    height:46px !important;
    padding:8px 13px !important;
  }

  /* строка 3: два основных действия */
  .repair-workers-panel-compact #addRepairWorkBatch,
  .repair-workers-panel-compact #addRepairWorkFact{
    width:100% !important;
    height:auto !important;
    min-height:48px !important;
    padding:10px 12px !important;
    white-space:normal !important;
  }

  .repair-workers-panel-compact #addRepairWorkBatch{
    grid-column:1 !important;
    grid-row:auto !important;
  }

  .repair-workers-panel-compact #addRepairWorkFact{
    grid-column:2 !important;
    grid-row:auto !important;
    min-width:0 !important;
  }
}

/* Очень узкий телефон: основные действия тоже становятся друг под другом. */
@media screen and (max-width:380px){
  .repair-workers-panel-compact .repair-worker-tools{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .repair-workers-panel-compact #addRepairWorkBatch,
  .repair-workers-panel-compact #addRepairWorkFact{
    grid-column:1 !important;
  }

  .repair-workers-panel-compact .repair-worker-select-row,
  .repair-workers-panel-compact .repair-worker-add-row{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .repair-workers-panel-compact #deleteRepairWorker,
  .repair-workers-panel-compact #addRepairWorker{
    width:100% !important;
  }
}


/* =========================================================
   v0.6.69 — ровный логотип FORA на телефоне / планшете
   ========================================================= */

/*
   brandbox — теперь всегда геометрический квадрат.
   Внутри него отдельный brandbox-text, поэтому FO / RA
   больше не зависят от padding и baseline браузера.
*/
.topbar .brandbox{
  box-sizing:border-box;
  overflow:hidden;
  text-align:center;
  vertical-align:middle;
}

.topbar .brandbox-text{
  display:block;
  margin:0;
  padding:0;
  font:inherit;
  font-weight:900;
  text-align:center;
  white-space:normal;
}

/* На планшетах слово "Склад" уже скрывается старым правилом,
   поэтому сам квадрат логотипа должен иметь стабильный размер. */
@media(max-width:900px){
  .topbar .brand{
    align-items:center !important;
  }

  .topbar .brandbox{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    width:44px !important;
    min-width:44px !important;
    max-width:44px !important;
    height:44px !important;
    min-height:44px !important;
    max-height:44px !important;

    flex:0 0 44px !important;

    margin:0 !important;
    padding:0 !important;

    border-radius:6px !important;

    font-size:15px !important;
    line-height:1 !important;
  }

  .topbar .brandbox-text{
    width:100%;
    line-height:.82 !important;
    letter-spacing:0 !important;
    transform:none !important;
  }
}

/* Телефон: тот же квадрат, он точно помещается
   в текущую шапку 58px с padding 6px. */
@media(max-width:760px){
  .topbar .brandbox{
    width:44px !important;
    min-width:44px !important;
    max-width:44px !important;
    height:44px !important;
    min-height:44px !important;
    max-height:44px !important;
    flex-basis:44px !important;
  }
}


/* =========================================================
   v0.6.70 — корректный логотип FORA на mobile + desktop fix
   ========================================================= */

/* Базово центрируем содержимое квадрата, но не ломаем desktop spacing. */
.topbar .brandbox{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:6px;
}

.topbar .brandbox-text{
  display:block !important;
  line-height:.78;
}

/* Старые мобильные правила скрывали .brand span:last-child, из-за чего
   на телефоне прятался не только текст "Склад", но и inner span brandbox-text.
   Жестко скрываем только прямой второй span у ссылки brand. */
@media(max-width:900px){
  .brand span:last-child{display:initial !important;}
  .topbar .brand > span:last-child{display:none !important;}

  .topbar .brandbox{
    width:44px !important;
    min-width:44px !important;
    max-width:44px !important;
    height:44px !important;
    min-height:44px !important;
    max-height:44px !important;
    flex:0 0 44px !important;
    margin:0 !important;
    padding:0 !important;
    font-size:15px !important;
    line-height:1 !important;
  }

  .topbar .brandbox-text{
    width:100%;
    line-height:.82 !important;
    letter-spacing:0 !important;
  }
}

/* Desktop/large screens: сохраняем подпись "Склад" и убираем ощущение сдвига. */
@media(min-width:901px){
  .topbar .brand{
    gap:12px;
  }

  .topbar .brandbox{
    min-width:44px;
    height:44px;
    padding:0 6px;
    font-size:16px;
    line-height:1;
  }

  .topbar .brandbox-text{
    line-height:.78;
  }
}


/* =========================================================
   v0.6.81 — пакет работ: итоги + почасовая работа без ТМЦ
   ========================================================= */
#workFactItemField[hidden],
.repair-batch-row [data-batch-item-field][hidden]{display:none!important;}
.repair-batch-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:10px 0 14px;
}
.repair-batch-summary>span{
  min-width:0;
  border:1px solid var(--border,#d8e0e8);
  border-radius:12px;
  padding:10px 12px;
  background:#f8fafb;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.repair-batch-summary small{color:#667586;font-size:12px;line-height:1.2;}
.repair-batch-summary b{font-size:18px;white-space:nowrap;}
@media(max-width:760px){
  .repair-batch-summary{grid-template-columns:1fr;gap:7px;margin:8px 0 12px;}
  .repair-batch-summary>span{padding:9px 11px;}
}


/* =========================================================
   v0.6.82 — tablet UX:
   1) нижняя навигация равномерно распределена на планшете;
   2) Номенклатура + План + Принято/Отгружено снова в одну строку.
   Телефонный режим ниже 600px не меняем.
   ========================================================= */

@media (min-width:600px) and (max-width:900px){

  /* ---------- Нижняя навигация планшета ---------- */
  .mobile-nav{
    justify-content:space-evenly !important;
    align-items:stretch !important;
    gap:4px !important;

    overflow-x:hidden !important;
    overflow-y:hidden !important;

    padding-left:10px !important;
    padding-right:10px !important;

    scroll-snap-type:none !important;
  }

  .mobile-nav a{
    flex:1 1 0 !important;
    width:auto !important;
    min-width:0 !important;
    max-width:112px !important;
    min-height:56px !important;

    padding:5px 4px !important;

    display:grid !important;
    place-items:center !important;
    align-content:center !important;

    scroll-snap-align:none !important;
  }

  .mobile-nav a svg{
    width:23px !important;
    height:23px !important;
  }

  /* ---------- Строка номенклатуры Приход / Расход ---------- */
  .accept-title-line{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;

    align-items:baseline !important;
    justify-content:flex-start !important;

    gap:8px !important;
    width:100% !important;
    min-width:0 !important;

    white-space:nowrap !important;
    overflow:hidden !important;
  }

  /* Поддерживаем обе версии разметки:
     h3 использовался раньше, .accept-item-name используется сейчас. */
  .accept-title-line > h3,
  .accept-title-line > .accept-item-name,
  .accept-item-name{
    flex:1 1 auto !important;

    min-width:0 !important;
    max-width:none !important;

    margin:0 !important;

    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;

    font-size:16px !important;
    line-height:1.25 !important;
  }

  .accept-inline-stats{
    display:flex !important;
    flex:0 0 auto !important;

    align-items:baseline !important;
    justify-content:flex-end !important;

    gap:10px !important;
    margin-left:auto !important;

    white-space:nowrap !important;
    min-width:max-content !important;

    font-size:13px !important;
  }

  .accept-inline-stats span,
  .accept-plan,
  .accepted-stat,
  .shipped-stat{
    display:inline !important;
    flex:0 0 auto !important;

    width:auto !important;
    min-width:0 !important;

    white-space:nowrap !important;

    font-size:13px !important;
    line-height:1.2 !important;
  }

  .accept-inline-stats b,
  .accept-plan b,
  .accepted-stat b,
  .shipped-stat b{
    font-size:14px !important;
    white-space:nowrap !important;
  }
}

/* Узкий телефон оставляем намеренно мобильным:
   нижнее меню может прокручиваться, заголовок карточки складывается. */
@media (max-width:599px){
  .mobile-nav{
    justify-content:flex-start !important;
    overflow-x:auto !important;
  }
}

/* === FORA v0.6.83 TABLET COMPACT START ===
   Tablet-only dense layout.
   Desktop >= 1200px: unchanged.
   Phone <= 760px: unchanged.
   Tablet 761..1199px: compact operator layout.
*/
@media (min-width: 761px) and (max-width: 1199px) {

    /* Общая плотность */
    .page {
        padding: 8px 10px 12px !important;
    }

    .topbar {
        gap: 9px !important;
        padding: 6px 10px !important;
        min-height: 50px !important;
    }

    .brand {
        gap: 6px !important;
        font-size: 16px !important;
        min-width: 0;
    }

    .brandbox {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        padding: 0 !important;
        display: grid !important;
        place-items: center !important;
        line-height: .78 !important;
        flex: 0 0 36px !important;
    }

    .topbar nav {
        gap: 2px !important;
        min-width: 0;
    }

    .topbar nav a {
        padding: 6px 7px !important;
        border-radius: 7px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }

    .user-menu summary {
        min-width: 0 !important;
        padding: 4px 6px !important;
    }

    /* Заголовок + фильтры в одну компактную строку */
    .page-title {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 8px !important;
        margin-bottom: 8px !important;
    }

    .page-title > div {
        min-width: 0;
    }

    .page-title h1 {
        margin: 0 0 2px !important;
        font-size: 21px !important;
        line-height: 1.05 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-title p,
    .page-title .muted {
        margin: 0 !important;
        font-size: 11px !important;
        line-height: 1.15 !important;
    }

    .filters {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 5px !important;
        width: auto !important;
        min-width: 0;
    }

    .filters > * {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: 190px !important;
    }

    .filters select,
    .filters input,
    input,
    textarea,
    select {
        min-height: 34px !important;
        padding: 5px 8px !important;
        border-radius: 7px !important;
        font-size: 12px !important;
    }

    button,
    .button {
        min-height: 32px !important;
        padding: 5px 9px !important;
        border-radius: 7px !important;
        font-size: 11px !important;
        line-height: 1.05 !important;
    }

    .xl {
        min-height: 38px !important;
        padding: 7px 12px !important;
        font-size: 13px !important;
    }

    /* KPI: всегда одна строка вместо 2x2 */
    .kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
    }

    .kpis > div {
        min-width: 0;
        min-height: 54px !important;
        padding: 7px 9px !important;
        border-radius: 9px !important;
    }

    .kpis b {
        font-size: 20px !important;
        line-height: 1 !important;
    }

    .kpis span {
        font-size: 10px !important;
        line-height: 1.1 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Общие панели */
    .panel {
        gap: 7px !important;
        padding: 9px 10px !important;
        border-radius: 10px !important;
    }

    .panel h2 {
        font-size: 17px !important;
        line-height: 1.05 !important;
    }

    .panel-title {
        gap: 6px !important;
    }

    .cards,
    .accept-lines {
        gap: 5px !important;
    }

    /* Приход / Расход: 2 строки, никаких вертикальных букв */
    .op-card {
        display: grid !important;
        grid-template-columns: 52px minmax(0, 1fr) auto !important;
        grid-template-rows: auto auto !important;
        align-items: center !important;
        gap: 2px 7px !important;
        padding: 6px 8px !important;
        border-radius: 9px !important;
        min-height: 0 !important;
    }

    .op-card .time,
    .op-card > .time {
        grid-column: 1 !important;
        grid-row: 1 / 3 !important;
        align-self: center !important;
        min-width: 0 !important;
        font-size: 17px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .op-card .op-main,
    .op-card > .op-main {
        grid-column: 2 !important;
        grid-row: 1 / 3 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .op-main h3,
    .op-card h3 {
        margin: 0 0 2px !important;
        min-width: 0 !important;
        font-size: 13px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    .op-main p,
    .op-card p {
        margin: 0 !important;
        min-width: 0 !important;
        font-size: 10.5px !important;
        line-height: 1.12 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    .op-card .badges,
    .op-card > .badges {
        grid-column: 3 !important;
        grid-row: 1 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        min-width: 0;
        white-space: nowrap;
    }

    .badge {
        padding: 2px 5px !important;
        border-radius: 999px !important;
        font-size: 9.5px !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
    }

    .op-card .op-actions,
    .op-card > .op-actions {
        grid-column: 3 !important;
        grid-row: 2 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        margin: 0 !important;
        white-space: nowrap;
    }

    .op-actions > *,
    .op-card > .button,
    .op-card button {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        min-height: 27px !important;
        height: 27px !important;
        padding: 3px 7px !important;
        border-radius: 6px !important;
        font-size: 9.5px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .sync-note {
        margin: 1px 0 !important;
        font-size: 9.5px !important;
        line-height: 1.1 !important;
    }

    /* Тулбары не раздувают страницу по вертикали */
    .toolbar,
    .bottom-actions,
    .shipment-toolbar {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 4px !important;
        margin: 5px 0 6px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    .toolbar > *,
    .bottom-actions > *,
    .shipment-toolbar > * {
        flex: 0 0 auto !important;
        width: auto !important;
        min-height: 30px !important;
        padding: 4px 8px !important;
        font-size: 10.5px !important;
        white-space: nowrap !important;
    }

    /* Приемка: 7 полей помещаются без лишнего горизонтального скролла */
    .accept-card {
        padding: 7px 8px !important;
        border-radius: 9px !important;
    }

    .accept-head {
        gap: 5px !important;
    }

    .accept-title-line {
        margin: 0 0 4px !important;
        gap: 6px !important;
        font-size: 13px !important;
        line-height: 1.1 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
    }

    .accept-item-name {
        max-width: 54% !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    .accept-plan,
    .accepted-stat,
    .shipped-stat {
        font-size: 10.5px !important;
        white-space: nowrap !important;
    }

    .accept-plan b,
    .accepted-stat b,
    .shipped-stat b {
        font-size: 12px !important;
    }

    .accept-card .qty-grid {
        grid-template-columns: repeat(7, 78px) !important;
        gap: 4px !important;
        margin-top: 5px !important;
        padding-bottom: 0 !important;
    }

    .accept-card .qty,
    .accept-card .qty span {
        width: 78px !important;
        min-width: 78px !important;
    }

    .accept-card .qty {
        gap: 2px !important;
    }

    .accept-card .qty span {
        font-size: 9px !important;
        line-height: 1.05 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .accept-card .qty input[type="number"] {
        width: 78px !important;
        min-width: 78px !important;
        max-width: 78px !important;
        height: 36px !important;
        min-height: 36px !important;
        padding: 4px 6px !important;
        font-size: 14px !important;
        border-radius: 7px !important;
    }

    .fact {
        font-size: 16px !important;
    }

    .sync-pill,
    .build-badge {
        padding: 3px 6px !important;
        font-size: 9px !important;
    }

    /* Отгрузка */
    .shipment-entry {
        margin-top: 5px !important;
    }

    .shipment-qty {
        width: 108px !important;
        min-width: 108px !important;
    }

    .shipment-qty span {
        font-size: 9.5px !important;
    }

    .shipment-qty input[type="number"] {
        width: 108px !important;
        min-width: 108px !important;
        max-width: 108px !important;
        height: 36px !important;
        min-height: 36px !important;
        padding: 4px 6px !important;
        font-size: 14px !important;
    }

    .compact-action {
        min-height: 28px !important;
        height: 28px !important;
        padding: 3px 7px !important;
        font-size: 10px !important;
    }

    /* Таблицы: меньше высота строк и меньше минимальная ширина */
    .act-table {
        min-width: 720px !important;
    }

    .act-table th,
    .act-table td,
    .admin-table th,
    .admin-table td {
        padding: 5px 6px !important;
        font-size: 10.5px !important;
        line-height: 1.15 !important;
    }

    .table-wrap,
    .schedule-wrap,
    .admin-table-wrap {
        border-radius: 9px !important;
    }

    /* Модалки и формы */
    .modal {
        padding: 8px !important;
    }

    .modal-card {
        padding: 12px !important;
        border-radius: 12px !important;
        max-height: calc(100dvh - 16px) !important;
    }

    .modal-card h2 {
        margin: 0 36px 7px 0 !important;
        font-size: 18px !important;
    }

    .modal-close {
        width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        padding: 0 !important;
    }

    /* Ремонты и длинные номера: не даём тексту становиться вертикальным */
    [class*="repair"] h3,
    [class*="repair"] .number,
    [class*="repair"] [class*="number"],
    [class*="repair"] [class*="title"] {
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    [class*="repair"] .number,
    [class*="repair"] [class*="number"] {
        min-width: 110px !important;
        white-space: nowrap !important;
    }

    /* Убираем лишнюю вертикальную высоту у пустых состояний */
    .empty {
        padding: 12px !important;
        border-radius: 9px !important;
        font-size: 11px !important;
    }
}

/* Узкий portrait-планшет: ещё чуть плотнее, но всё ещё не мобильная верстка */
@media (min-width: 761px) and (max-width: 900px) and (orientation: portrait) {
    .topbar nav a {
        padding-left: 5px !important;
        padding-right: 5px !important;
        font-size: 11px !important;
    }

    .page-title {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 5px !important;
    }

    .filters {
        justify-content: flex-start !important;
        overflow-x: auto !important;
        padding-bottom: 1px;
    }

    .op-card {
        grid-template-columns: 48px minmax(0, 1fr) auto !important;
        gap: 2px 5px !important;
    }

    .op-card .time,
    .op-card > .time {
        font-size: 16px !important;
    }

    .op-main h3,
    .op-card h3 {
        font-size: 12px !important;
    }

    .op-main p,
    .op-card p {
        font-size: 10px !important;
    }

    .op-actions > *,
    .op-card > .button,
    .op-card button {
        padding-left: 5px !important;
        padding-right: 5px !important;
        font-size: 9px !important;
    }

    .kpis > div {
        padding-left: 7px !important;
        padding-right: 7px !important;
    }

    .kpis b {
        font-size: 18px !important;
    }

    .accept-card .qty-grid {
        grid-template-columns: repeat(7, 72px) !important;
    }

    .accept-card .qty,
    .accept-card .qty span {
        width: 72px !important;
        min-width: 72px !important;
    }

    .accept-card .qty input[type="number"] {
        width: 72px !important;
        min-width: 72px !important;
        max-width: 72px !important;
    }
}
/* === FORA v0.6.83 TABLET COMPACT END === */

/* === FORA v0.6.85 ACT ACTIONS HOTFIX START === */
.act-toolbar-v0685{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:6px;
    width:auto;
    max-width:100%;
    margin-left:auto;
}
.act-toolbar-v0685 .button,
.act-toolbar-v0685 a{
    flex:0 0 auto;
    width:auto;
    min-width:0;
    white-space:nowrap;
}

@media (min-width:761px) and (max-width:1199px){
    .act-toolbar-v0685{gap:4px}
    .act-toolbar-v0685 .button,
    .act-toolbar-v0685 a{
        min-height:30px!important;
        height:30px!important;
        padding:4px 8px!important;
        border-radius:7px!important;
        font-size:10.5px!important;
        line-height:1!important;
    }
}

@media (max-width:760px){
    .act-toolbar-v0685{
        display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));
        width:100%;
        gap:5px;
        margin-left:0;
    }
    .act-toolbar-v0685 .button,
    .act-toolbar-v0685 a{
        width:100%!important;
        min-width:0!important;
        min-height:36px!important;
        padding:5px!important;
        font-size:10.5px!important;
        line-height:1.05!important;
        text-align:center!important;
    }
}
@media (max-width:430px){
    .act-toolbar-v0685{grid-template-columns:1fr 1fr}
    .act-toolbar-v0685 .act-action-print-v0685{grid-column:1/-1}
}
/* === FORA v0.6.85 ACT ACTIONS HOTFIX END === */

/* === FORA v0.6.87 NOMENCLATURE DIALOG FIX START === */
.catalog-dialog {
    width: min(920px, calc(100vw - 24px));
    max-width: 920px;
    max-height: 88vh;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: var(--panel, #fff);
    color: inherit;
    box-shadow: 0 20px 70px rgba(0,0,0,.28);
    overflow: hidden;
}
.catalog-dialog::backdrop {
    background: rgba(15,23,42,.42);
    backdrop-filter: blur(2px);
}
.catalog-dialog-card {
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    min-height: 360px;
}
.catalog-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(128,128,128,.22);
}
.catalog-dialog-head h2 { margin: 0 0 2px; font-size: 21px; }
.catalog-dialog-head p { margin: 0; }
.catalog-dialog-search {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
}
.catalog-dialog-search input { width: 100%; min-width: 0; }
.catalog-dialog-table-wrap {
    overflow: auto;
    padding: 0 16px 16px;
    -webkit-overflow-scrolling: touch;
}
.catalog-dialog-table { width: 100%; border-collapse: collapse; }
.catalog-dialog-table th,
.catalog-dialog-table td {
    padding: 9px 8px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid rgba(128,128,128,.18);
}
.catalog-dialog-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--panel, #fff);
    font-size: 12px;
}
.catalog-dialog-table .catalog-code { white-space: nowrap; width: 1%; }
.catalog-dialog-table td:last-child,
.catalog-dialog-table th:last-child { width: 1%; white-space: nowrap; }
.catalog-dialog-table .catalog-select { min-width: 84px; }
.catalog-loading,
.catalog-empty { padding: 20px 8px !important; text-align: center !important; }

@media (min-width:761px) and (max-width:1199px) {
    .catalog-dialog {
        width: min(860px, calc(100vw - 18px));
        max-height: 92vh;
        border-radius: 10px;
    }
    .catalog-dialog-card { max-height: 92vh; min-height: 300px; }
    .catalog-dialog-head { padding: 9px 11px 7px; }
    .catalog-dialog-head h2 { font-size: 17px; }
    .catalog-dialog-search { padding: 7px 11px; gap: 7px; }
    .catalog-dialog-table-wrap { padding: 0 11px 10px; }
    .catalog-dialog-table th,
    .catalog-dialog-table td { padding: 6px; font-size: 11px; }
    .catalog-dialog-table .catalog-select {
        min-width: 70px;
        min-height: 30px !important;
        height: 30px !important;
        padding: 4px 8px !important;
        font-size: 10.5px !important;
    }
}

@media (max-width:760px) {
    .catalog-dialog {
        width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
        border-radius: 10px;
    }
    .catalog-dialog-card { max-height: calc(100dvh - 12px); min-height: 0; }
    .catalog-dialog-head { padding: 9px 10px 7px; }
    .catalog-dialog-head h2 { font-size: 17px; }
    .catalog-dialog-search { grid-template-columns: 1fr; padding: 7px 10px; gap: 4px; }
    .catalog-dialog-table-wrap { padding: 0 8px 8px; }
    .catalog-dialog-table th,
    .catalog-dialog-table td { padding: 6px 5px; font-size: 11px; }
    .catalog-dialog-table th:nth-child(3),
    .catalog-dialog-table td:nth-child(3) { display: none; }
    .catalog-dialog-table .catalog-select {
        min-width: 64px;
        padding: 5px 7px !important;
        font-size: 10.5px !important;
    }
}
/* === FORA v0.6.87 NOMENCLATURE DIALOG FIX END === */

/* === FORA v0.6.88 RECOVERY: v0.6.71 REPAIR NUMBER LAYOUT START ===
   Restores the repair dashboard layout lost when app.css was replaced in v0.6.81:
   desktop number column 130px; tablet 140px; phone number/name on separate rows.
*/
.warehouse-dashboard-panel.repair-panel .warehouse-mini-list>a{
  grid-template-columns:130px minmax(0,1fr);
  align-items:start;
}
.warehouse-dashboard-panel.repair-panel .warehouse-mini-list>a>time{
  min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.2;
}
@media(min-width:761px) and (max-width:1199px){
  .warehouse-dashboard-panel.repair-panel .warehouse-mini-list>a{
    grid-template-columns:140px minmax(0,1fr)!important;
  }
}
@media(max-width:760px){
  .warehouse-dashboard-panel.repair-panel .warehouse-mini-list>a{
    grid-template-columns:minmax(0,1fr)!important;
    gap:3px!important;
  }
  .warehouse-dashboard-panel.repair-panel .warehouse-mini-list>a>time{
    grid-column:1;grid-row:1;width:100%;
  }
  .warehouse-dashboard-panel.repair-panel .warehouse-mini-list>a>span{
    grid-column:1;grid-row:2;width:100%;
  }
}
/* === FORA v0.6.88 RECOVERY: v0.6.71 REPAIR NUMBER LAYOUT END === */

/* === FORA v0.6.116 ACTS REAL-SOURCE LAYOUT FIX START ===
   Actual-source fix after inspecting app.zip.
   v0.6.83 tablet CSS globally converts every .op-card into a
   time/content/actions grid. /acts cards have another DOM shape, so the
   automatic status and manual sent control were forced into narrow tracks.
   /acts now has one flex-wrap layout at every width. No JS layout layer.
*/
.acts-page .act-filter-panel{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:flex-end!important;
  gap:10px!important;
  grid-template-columns:none!important;
}
.acts-page .act-filter-panel .act-search-field{
  flex:4 1 360px!important;
  min-width:min(100%,260px)!important;
}
.acts-page .act-filter-panel .act-filter-field{
  flex:1 1 190px!important;
  min-width:min(100%,170px)!important;
  max-width:280px!important;
}
.acts-page .act-filter-panel .act-filter-count{
  flex:0 0 100px!important;
  grid-column:auto!important;
  min-width:90px!important;
  border-top:0!important;
  border-left:1px solid var(--line)!important;
  padding:5px 10px!important;
}

.acts-page #actsList.cards{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:10px!important;
  width:100%!important;
}

/* === FORA v0.6.144 ACT FILTER VISIBILITY FIX START ===
   v0.6.116 forces act cards to display:flex!important. That overrides
   the browser's built-in [hidden]{display:none}, so JS filters changed
   the hidden attribute but cards stayed visible. Keep both an attribute
   and an explicit class guard so future layout !important rules cannot
   break filtering again. */
.acts-page #actsList > .act-list-card[hidden],
.acts-page #actsList > .act-list-card.act-filter-hidden{
  display:none!important;
}
/* === FORA v0.6.144 ACT FILTER VISIBILITY FIX END === */

.acts-page #actsList > .act-list-card{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px 14px!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  padding:12px 14px!important;
  grid-template-columns:none!important;
  grid-template-rows:none!important;
  overflow:visible!important;
}

.acts-page #actsList > .act-list-card > .op-main{
  order:1!important;
  flex:999 1 340px!important;
  min-width:min(100%,260px)!important;
  width:auto!important;
  max-width:none!important;
  grid-column:auto!important;
  grid-row:auto!important;
  overflow:visible!important;
}
.acts-page #actsList > .act-list-card > .op-main .badges{
  display:flex!important;
  justify-content:flex-start!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  white-space:normal!important;
}
.acts-page #actsList > .act-list-card > .op-main h3{
  margin:5px 0!important;
  font-size:16px!important;
  line-height:1.2!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}
.acts-page #actsList > .act-list-card > .op-main p{
  margin:0!important;
  font-size:13px!important;
  line-height:1.2!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}

.acts-page #actsList > .act-list-card > .act-card-tools{
  order:2!important;
  position:static!important;
  inset:auto!important;
  flex:0 1 520px!important;
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0 0 0 auto!important;
  padding:0!important;
  grid-column:auto!important;
  grid-row:auto!important;
  overflow:visible!important;
}

.acts-page #actsList > .act-list-card > .act-card-tools > .act-sent-check{
  order:1!important;
  position:static!important;
  inset:auto!important;
  flex:0 1 170px!important;
  width:auto!important;
  min-width:min(100%,160px)!important;
  max-width:190px!important;
  min-height:42px!important;
  margin:0!important;
}

.acts-page #actsList > .act-list-card > .act-card-tools > .act-actions{
  order:2!important;
  position:static!important;
  inset:auto!important;
  flex:1 1 330px!important;
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  white-space:normal!important;
  overflow:visible!important;
}
.acts-page #actsList > .act-list-card > .act-card-tools > .act-actions > *{
  position:static!important;
  inset:auto!important;
  flex:0 1 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  min-height:40px!important;
  height:auto!important;
  margin:0!important;
  padding:8px 12px!important;
  font-size:12px!important;
  line-height:1.1!important;
  white-space:nowrap!important;
}
.acts-page #actsList > .act-list-card > .act-card-tools > .act-actions > .fora-send-act-btn-v06103{
  flex:1 1 170px!important;
  min-width:min(100%,160px)!important;
  max-width:280px!important;
}
.acts-page #actsList > .act-list-card > .act-card-tools > .act-actions > a[href$="/pdf"]{
  flex:0 0 auto!important;
  min-width:58px!important;
}

.acts-page #actsList > .act-list-card > .fora-send-act-status-v06103{
  order:3!important;
  position:static!important;
  inset:auto!important;
  flex:0 0 100%!important;
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:auto!important;
  margin:0!important;
  padding:8px 10px!important;
  grid-column:1/-1!important;
  grid-row:auto!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  line-height:1.35!important;
  overflow:visible!important;
}
.acts-page #actsList > .act-list-card > .fora-send-act-status-v06103 *{
  max-width:none!important;
  min-width:0!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}
/* === FORA v0.6.116 ACTS REAL-SOURCE LAYOUT FIX END === */

/* v0.6.119 — image logo in topbar */
.brandbox.brandbox-image{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  padding:0;
  background:transparent;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 2px 8px rgba(15,33,43,.08);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.brandbox.brandbox-image:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(15,33,43,.14);
}
.brandbox-logo{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  user-select:none;
  -webkit-user-select:none;
  -webkit-user-drag:none;
  pointer-events:none;
}
.brand-title{
  display:inline-flex;
  align-items:center;
}
@media(max-width:900px){
  .brandbox.brandbox-image{
    width:42px;
    height:42px;
  }
}
/* === FORA v0.6.122 REPAIR DAY SIGNATURE START === */
.repair-day-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.repair-day-actions .button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.repair-day-actions .primary{background:#12834f;color:#fff;border-color:#12834f}
.repair-day-sign-title{align-items:flex-end}
.repair-day-sign-info{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.repair-day-sign-info>div{border:1px solid #d8e0e5;border-radius:12px;padding:12px 14px;background:#fff;display:flex;flex-direction:column;gap:3px}
.repair-day-sign-info small{color:#657786}.repair-day-sign-info b{font-size:22px}
.repair-day-sign-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
.repair-day-sign-card{background:#fff;border:1px solid #d8e0e5;border-radius:14px;padding:14px;min-width:0}
.repair-day-sign-card label{display:flex;flex-direction:column;gap:6px;font-weight:700}
.repair-day-sign-card input{width:100%}
.repair-day-sign-card h3{margin:14px 0 8px}
.repair-day-sign-card canvas{display:block;width:100%;height:220px;border:1px solid #aebbc4;border-radius:10px;background:#fff;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.repair-day-sign-card .ghost{margin-top:8px}
.repair-day-sign-submit{display:flex;align-items:center;gap:12px;margin:14px 0 24px}
.repair-day-signed-summary{display:grid;gap:12px}
.repair-day-signed-summary>div:first-child{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.repair-day-current-signatures{display:grid!important;grid-template-columns:1fr 1fr;gap:14px!important;align-items:stretch!important}
.repair-day-current-signatures figure{margin:0;border:1px solid #d8e0e5;border-radius:12px;padding:10px;background:#fff}
.repair-day-current-signatures img{display:block;width:100%;height:100px;object-fit:contain;background:#fff}
.repair-day-current-signatures figcaption{margin-top:6px;font-size:12px;color:#52636f}
@media(max-width:760px){
  .repair-day-sign-grid,.repair-day-current-signatures,.repair-day-sign-info{grid-template-columns:1fr}
  .repair-day-sign-card canvas{height:190px}
  .repair-day-sign-submit{position:sticky;bottom:72px;z-index:15;background:#f3f6f8;padding:8px 0;margin-bottom:10px}
  .repair-day-sign-submit .wide{width:100%}
  .repair-day-actions{width:100%}.repair-day-actions .button{flex:1 1 145px}
}
/* === FORA v0.6.122 REPAIR DAY SIGNATURE END === */
/* === FORA v0.6.124 SPLIT REPAIR DAY ACTS START === */
.repair-day-sign-grid.one{grid-template-columns:minmax(280px,720px);justify-content:start}
.repair-day-current-signatures.one{grid-template-columns:minmax(280px,720px);justify-content:start}
.repair-day-document-sign-page canvas{touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
@media(max-width:760px){.repair-day-sign-grid.one,.repair-day-current-signatures.one{grid-template-columns:1fr}}
/* === FORA v0.6.124 SPLIT REPAIR DAY ACTS END === */

/* === FORA v0.6.126 REPAIR ACT CLEANUP START === */
.repair-day-title-actions-v06126{
  display:flex!important;
  align-items:stretch!important;
  justify-content:flex-end!important;
  gap:8px!important;
  min-width:0!important;
}
.repair-day-title-actions-v06126 .filters{
  flex:1 1 auto!important;
  min-width:0!important;
}
.repair-day-action-buttons-v06126{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  gap:8px!important;
  align-items:stretch!important;
  flex:0 0 auto!important;
}
.repair-day-action-buttons-v06126 .button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:46px!important;
  width:auto!important;
  white-space:nowrap!important;
}
@media(max-width:760px){
  .repair-day-title-actions-v06126{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
  }
  .repair-day-title-actions-v06126 .filters{
    width:100%!important;
  }
  .repair-day-action-buttons-v06126{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    width:100%!important;
  }
  .repair-day-action-buttons-v06126 .button{
    width:100%!important;
    min-width:0!important;
  }
}
/* === FORA v0.6.126 REPAIR ACT CLEANUP END === */

/* === FORA v0.6.132 FUTURE REPAIR + LINE COMMENTS START === */
.repair-future-days{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin:12px 0 16px}
.repair-future-day{display:flex;min-height:72px;flex-direction:column;justify-content:center;padding:9px 11px;border:1px solid #d6e0e8;border-radius:12px;background:#fff;text-decoration:none;color:inherit}
.repair-future-day b{font-size:14px}.repair-future-day span,.repair-future-day small{font-size:11px;color:#627489;margin-top:2px}
.repair-future-day.active{border-color:#58b984;background:#eef9f2;box-shadow:0 0 0 1px rgba(32,139,83,.12)}
.repair-plan-day-group{margin-top:12px}
.repair-plan-request-v06132{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 20px;position:relative}
.repair-plan-request-v06132 .repair-plan-request-bar{grid-column:1/-1}
.repair-plan-actions{grid-column:1/-1;display:flex;gap:8px;justify-content:flex-end}
.repair-date-badge{background:#eef3f7;color:#56687b}.repair-early-badge{background:#e6f7ec;color:#087638}
.repair-early-note{display:inline-flex;margin-left:6px}
.repair-line-actions{display:flex;flex-direction:column;gap:6px;align-items:stretch;min-width:136px}
.repair-line-comment{white-space:nowrap}.repair-line-comment.has-comments{border-color:#6cbf8e;background:#f1fbf5}
.repair-comment-modal{position:fixed;inset:0;z-index:5000;background:rgba(16,29,43,.48);display:flex;align-items:center;justify-content:center;padding:18px}
.repair-comment-modal[hidden]{display:none!important}
.repair-comment-dialog{width:min(680px,100%);max-height:min(760px,92vh);overflow:auto;background:#fff;border-radius:18px;border:1px solid #d7e1e8;box-shadow:0 24px 70px rgba(0,0,0,.22);padding:20px}
.repair-comment-dialog header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}
.repair-comment-dialog header h2{margin:0}.repair-comment-close{border:0;background:transparent;font-size:24px;cursor:pointer}
.repair-comment-history{display:grid;gap:8px;max-height:310px;overflow:auto;margin:10px 0 14px}
.repair-comment-history-item{border:1px solid #dce4ea;border-radius:12px;padding:10px 12px;background:#fafcfd}
.repair-comment-history-head{display:flex;justify-content:space-between;gap:10px;color:#52667a}.repair-comment-history-item p{white-space:pre-wrap;margin:7px 0}
.repair-comment-form textarea{min-height:110px;resize:vertical}.repair-comment-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:10px}
.text-success{color:#087638}.text-danger{color:#b52f2f}
@media(max-width:1050px){.repair-future-days{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){
  .repair-future-days{display:flex;overflow-x:auto;padding-bottom:4px;scroll-snap-type:x proximity}
  .repair-future-day{min-width:122px;scroll-snap-align:start}
  .repair-plan-request-v06132{grid-template-columns:1fr}.repair-plan-actions{justify-content:stretch}.repair-plan-actions>*{flex:1}
  .repair-line-actions{min-width:0;width:100%}.repair-comment-dialog{padding:14px;border-radius:14px}
}
/* === FORA v0.6.132 FUTURE REPAIR + LINE COMMENTS END === */

/* === FORA v0.6.134 REPAIR PLAN MATRIX START === */
.repair-plan-matrix-page{max-width:1540px}
.repair-matrix-title{align-items:center}
.repair-matrix-date-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.repair-matrix-date-controls select{min-width:205px}
.repair-matrix-date-controls input[type=date]{min-width:160px}

.repair-matrix-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}
.repair-matrix-kpis article{min-height:88px;padding:16px 18px;border:1px solid #d6e0e8;border-radius:14px;background:#fff;display:flex;flex-direction:column;justify-content:center}
.repair-matrix-kpis article.good{background:#eef9f2;border-color:#9bd8b5}
.repair-matrix-kpis article.danger{background:#fff2f0;border-color:#efaaa3}
.repair-matrix-kpis strong{font-size:25px;line-height:1.05}
.repair-matrix-kpis span{margin-top:7px;color:#617389}
.repair-kpi-units{display:flex;flex-wrap:wrap;gap:6px 14px}

.repair-matrix-toolbar{display:flex;align-items:center;gap:10px;margin:0 0 12px}
.repair-matrix-mode{display:flex;gap:4px;padding:4px;border:1px solid #d6e0e8;background:#fff;border-radius:12px}
.repair-matrix-mode a{padding:8px 12px;border-radius:8px;text-decoration:none;color:#203043;font-weight:700}
.repair-matrix-mode a.active{background:#e8f7ee;color:#087638}
.repair-matrix-toolbar input[type=search]{flex:1;min-width:230px;max-width:480px}
.repair-matrix-check{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:13px}

.repair-matrix-panel{padding:0!important;overflow:hidden}
.repair-matrix-scroll{overflow:auto;max-width:100%;overscroll-behavior-x:contain}
.repair-matrix-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:13px}
.repair-matrix-table th,.repair-matrix-table td{border-right:1px solid #d8e0e7;border-bottom:1px solid #d8e0e7;background:#fff;vertical-align:middle}
.repair-matrix-table thead th{position:sticky;top:0;z-index:7;background:#eef2f5;padding:9px 7px;text-align:center}
.repair-matrix-table thead th.weekend{background:#f6f1ea}
.repair-matrix-table thead th.today{background:#e8f7ee}
.repair-matrix-table thead th span,.repair-matrix-table thead th small{display:block;font-size:10px;color:#68798c;font-weight:500}
.repair-matrix-table thead th b{display:block;font-size:14px;margin-top:2px}

.repair-matrix-item-col{position:sticky!important;left:0;z-index:5;width:330px;min-width:330px;max-width:330px;text-align:left!important}
tbody .repair-matrix-item-col,tfoot .repair-matrix-item-col{padding:10px 12px;background:#fff}
thead .repair-matrix-item-col{z-index:9!important}
.repair-matrix-stock-col{width:105px;min-width:105px;text-align:center;padding:8px}
.repair-matrix-day-col,.repair-matrix-day-cell{width:112px;min-width:112px;text-align:center}
.repair-matrix-total-col{width:125px;min-width:125px;text-align:center;padding:8px}
.repair-matrix-total-col small,.repair-matrix-stock-col small{display:block;color:#718195;font-weight:500;margin-top:2px}

.repair-matrix-item-name{font-weight:700;line-height:1.25}
.repair-matrix-item-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:4px;color:#718195;font-size:11px}
.repair-deficit-note{color:#b52f2f;font-weight:700}
.stock-empty{background:#fff3f0!important;color:#a92f29}

.repair-matrix-day-cell{padding:0}
.repair-matrix-cell-button{display:flex;width:100%;min-height:64px;flex-direction:column;align-items:center;justify-content:center;border:0;background:transparent;cursor:pointer;padding:6px;color:#152536}
.repair-matrix-cell-button:hover{background:#f2f7fa}
.repair-matrix-cell-button strong{font-size:17px}
.repair-matrix-cell-button small{font-size:10px;color:#718195;margin-top:2px}
.repair-matrix-cell-button span{margin-top:3px;font-size:10px;color:#ad2e2e;font-weight:800}
.repair-matrix-day-cell.shortage{background:#fff2f0}
.repair-matrix-day-cell.shortage .repair-matrix-cell-button{background:#fff2f0}
.repair-matrix-day-cell.done{background:#eef9f2}
.repair-matrix-day-cell.done .repair-matrix-cell-button{background:#eef9f2}
.repair-matrix-zero{display:block;color:#a6b1bc;padding:20px 4px}

.repair-matrix-table tfoot th,.repair-matrix-table tfoot td{padding:8px 6px;text-align:center;background:#f6f8fa;font-weight:700}
.repair-matrix-table tfoot .repair-matrix-item-col{background:#f6f8fa}
.repair-matrix-footer-main td{font-size:13px}
.repair-matrix-footer-sub th,.repair-matrix-footer-sub td{font-size:11px;color:#526579;font-weight:600}
.repair-matrix-deficit-row th,.repair-matrix-deficit-row td{background:#fff7f5}
.repair-matrix-deficit-row .ok{color:#087638}

.repair-matrix-modal{position:fixed;inset:0;z-index:5500;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(17,29,41,.52)}
.repair-matrix-modal[hidden]{display:none!important}
.repair-matrix-dialog{width:min(850px,100%);max-height:88vh;overflow:auto;background:#fff;border:1px solid #d6e0e8;border-radius:18px;padding:20px;box-shadow:0 26px 80px rgba(0,0,0,.25)}
.repair-matrix-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}
.repair-matrix-dialog header h2{margin:3px 0 0}
.repair-matrix-close{border:0;background:transparent;font-size:28px;line-height:1;cursor:pointer}
.repair-matrix-detail-card{border:1px solid #dbe3e9;border-radius:13px;padding:13px;margin-top:9px}
.repair-matrix-detail-top{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.repair-matrix-detail-top>div:first-child{display:flex;flex-direction:column;gap:4px}
.repair-matrix-detail-top small{color:#718195}
.repair-matrix-detail-nums{display:flex;gap:16px;white-space:nowrap}
.repair-matrix-detail-nums span{display:flex;flex-direction:column;font-size:10px;color:#718195;text-transform:uppercase}
.repair-matrix-detail-nums b{font-size:15px;color:#152536;margin-top:3px}
.repair-matrix-detail-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}

@media(max-width:1050px){
  .repair-matrix-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .repair-matrix-title{align-items:flex-start}
  .repair-matrix-toolbar{flex-wrap:wrap}
}
@media(max-width:700px){
  .repair-matrix-date-controls{justify-content:flex-start}
  .repair-matrix-kpis{grid-template-columns:1fr 1fr;gap:8px}
  .repair-matrix-kpis article{padding:12px;min-height:78px}
  .repair-matrix-toolbar input[type=search]{order:3;min-width:100%;max-width:none}
  .repair-matrix-item-col{width:220px;min-width:220px;max-width:220px}
  .repair-matrix-day-col,.repair-matrix-day-cell{width:92px;min-width:92px}
  .repair-matrix-detail-top{flex-direction:column}
  .repair-matrix-detail-nums{width:100%;justify-content:space-between}
  .repair-matrix-detail-actions{display:grid;grid-template-columns:1fr}
}
/* === FORA v0.6.134 REPAIR PLAN MATRIX END === */

/* === FORA v0.6.136 REPAIR PLAN CONTROLS START === */
.repair-matrix-title{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:18px!important;
}
.repair-matrix-date-controls{
    display:grid!important;
    grid-template-columns:auto minmax(190px,250px) 42px minmax(165px,190px) 42px auto!important;
    align-items:center!important;
    gap:8px!important;
    flex-wrap:nowrap!important;
    width:max-content!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    white-space:nowrap!important;
    padding:2px!important;
}
.repair-matrix-date-controls .warehouse-filter-label{
    margin:0!important;
    align-self:center!important;
}
.repair-matrix-date-controls select,
.repair-matrix-date-controls input[type="date"]{
    width:100%!important;
    min-width:0!important;
    margin:0!important;
}
.repair-matrix-date-controls .button.compact{
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    padding:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
}
.repair-matrix-date-controls > .button:last-child{
    min-width:92px!important;
    justify-content:center!important;
}

@media(max-width:1000px){
    .repair-matrix-title{
        grid-template-columns:1fr!important;
        align-items:start!important;
    }
    .repair-matrix-date-controls{
        width:100%!important;
        grid-template-columns:auto minmax(160px,1fr) 42px minmax(150px,180px) 42px auto!important;
    }
}
/* === FORA v0.6.136 REPAIR PLAN CONTROLS END === */

/* === FORA v0.6.138 REPAIR MOVEMENT SPLIT START === */
.repair-movement-kpis{display:grid;grid-template-columns:1fr 1.35fr 1fr;gap:12px;margin:14px 0}
.repair-movement-kpis article{min-height:88px;padding:16px 18px;border:1px solid #d6e0e8;border-radius:14px;background:#fff;display:flex;flex-direction:column;justify-content:center}
.repair-movement-kpis article.good{background:#eef9f2;border-color:#9bd8b5}
.repair-movement-kpis strong{font-size:21px;line-height:1.15;word-break:break-word}
.repair-movement-kpis span{margin-top:7px;color:#617389}
.repair-movement-submit-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:12px}
.repair-movement-submit-row>.bottom-actions{margin-left:auto}
.repair-movement-stock-list .repair-fact-row{grid-template-columns:minmax(0,1fr) 150px minmax(150px,190px)}
.repair-output-history-item>div:first-child{display:flex;flex-direction:column;gap:3px}
.repair-output-history-item small{display:block}
@media(max-width:850px){
  .repair-movement-kpis{grid-template-columns:1fr}
  .repair-movement-submit-row{align-items:stretch;flex-direction:column}
  .repair-movement-submit-row>.bottom-actions{margin-left:0}
  .repair-movement-stock-list .repair-fact-row{grid-template-columns:1fr}
}
/* === FORA v0.6.138 REPAIR MOVEMENT SPLIT END === */

/* === FORA v0.6.140 YESTERDAY COLUMN START === */
.repair-matrix-table thead th.context-day{background:#f4f6f8!important;box-shadow:inset -2px 0 0 #aeb9c5;}
.repair-matrix-table td.context-day{background:#f7f9fa!important;box-shadow:inset -2px 0 0 #d3dbe2;}
/* === FORA v0.6.140 YESTERDAY COLUMN END === */


/* === FORA v0.6.145 REPAIR MOVEMENT DATE + ACTION LAYOUT START === */
.repair-movement-title{
  align-items:flex-start!important;
}
.repair-movement-title>div:first-child{
  flex:1 1 520px!important;
  min-width:0!important;
}
.repair-movement-title .repair-day-title-actions-v06126{
  flex:0 1 720px!important;
  min-width:0!important;
}
.repair-movement-title .repair-day-title-actions-v06126 .filters{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  min-width:0!important;
}
.repair-movement-title .repair-day-title-actions-v06126 .filters select{
  min-width:190px!important;
  max-width:280px!important;
}
.repair-movement-title .repair-day-title-actions-v06126 .filters input[type="date"]{
  min-width:150px!important;
  width:150px!important;
  flex:0 0 150px!important;
}
@media(max-width:1180px){
  .repair-movement-title{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
  }
  .repair-movement-title .repair-day-title-actions-v06126{
    width:100%!important;
    max-width:none!important;
  }
}
@media(max-width:760px){
  .repair-movement-title .repair-day-title-actions-v06126 .filters{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
  }
  .repair-movement-title .repair-day-title-actions-v06126 .filters input[type="date"]{
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  .repair-movement-title .repair-day-title-actions-v06126 .filters select{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
}
/* === FORA v0.6.145 REPAIR MOVEMENT DATE + ACTION LAYOUT END === */

/* === FORA v0.6.147 REPAIR DELETE + STICKY SCROLL START === */
.repair-history-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.repair-output-delete{
  min-height:36px;
  padding:7px 11px;
  border:1px solid #ef9a92;
  border-radius:10px;
  background:#fff;
  color:#a4261b;
  font-weight:800;
  cursor:pointer;
}
.repair-output-delete:hover{background:#fff3f1}
.repair-output-delete:disabled{opacity:.6;cursor:wait}
.repair-output-removing{
  opacity:.42;
  transition:opacity .35s ease;
  pointer-events:none;
}

.scroll-bottom-fab{
  position:fixed;
  right:max(16px,calc((100vw - 1560px)/2));
  bottom:calc(18px + env(safe-area-inset-bottom,0px));
  z-index:44;
  width:56px;
  height:56px;
  min-width:56px;
  min-height:56px;
  padding:0;
  border-radius:50%;
  border:1px solid rgba(15,81,50,.2);
  background:#147a4b;
  color:#fff;
  box-shadow:0 10px 28px rgba(15,35,25,.22);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:30px;
  line-height:1;
  font-weight:900;
  cursor:pointer;
  touch-action:manipulation;
}
.scroll-bottom-fab:hover{filter:brightness(.95)}
.scroll-bottom-fab:active{transform:translateY(1px)}
.scroll-bottom-fab[hidden]{display:none!important}

@media (max-width:900px){
  .scroll-bottom-fab{
    right:14px;
    bottom:calc(14px + env(safe-area-inset-bottom,0px));
    width:54px;
    height:54px;
    min-width:54px;
    min-height:54px;
    font-size:28px;
  }
  .repair-history-actions{
    justify-content:flex-start;
  }
}
/* === FORA v0.6.147 REPAIR DELETE + STICKY SCROLL END === */

/* === FORA v0.6.149 ANY REPAIR CATALOG ITEM START === */
.repair-other-stock-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.repair-add-any-item{
  min-height:42px;
  white-space:nowrap;
}
.repair-manual-catalog-row{
  border-color:#9ecdb1;
  background:#f8fffa;
}
.repair-manual-catalog-row .repair-item small{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}
.repair-catalog-only-label{
  color:#177347;
  font-weight:800;
}
.repair-unrestricted-available b{
  font-size:14px;
  line-height:1.15;
  color:#177347;
}
.repair-manual-actions{
  display:flex;
  align-items:flex-end;
  gap:8px;
  min-width:0;
}
.repair-manual-actions .repair-qty{
  flex:1 1 auto;
  min-width:110px;
}
.repair-manual-remove{
  flex:0 0 auto;
  min-height:42px;
}
.repair-manual-highlight{
  outline:3px solid rgba(20,122,75,.22);
  outline-offset:2px;
  transition:outline-color .35s ease;
}
.repair-catalog-note{
  padding:10px 16px 14px;
  color:#5d6970;
  font-size:12px;
  line-height:1.45;
}
@media(max-width:900px){
  .repair-other-stock-title{
    align-items:stretch;
  }
  .repair-other-stock-tools{
    width:100%;
    justify-content:stretch;
  }
  .repair-add-any-item,
  .repair-other-stock-tools .repair-search{
    flex:1 1 260px;
  }
}
@media(max-width:700px){
  .repair-other-stock-tools{
    display:grid;
    grid-template-columns:1fr;
  }
  .repair-add-any-item,
  .repair-other-stock-tools .repair-search{
    width:100%;
  }
  .repair-manual-actions{
    grid-column:1/-1;
  }
}
/* === FORA v0.6.149 ANY REPAIR CATALOG ITEM END === */
