:root{--ink:#18151f;--muted:#6d6775;--purple:#6d3de5;--purple-soft:#eee8ff;--line:#dedbe5;--bg:#f6f5f8;--card:#fff;--green:#167548;--red:#a72828;--amber:#936400}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Arial,Helvetica,sans-serif}a{color:inherit}.topbar{position:sticky;z-index:30;top:0;min-height:76px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:28px;padding:0 max(24px,calc((100vw - 1440px)/2));border-bottom:1px solid var(--line);background:rgba(250,249,252,.96);backdrop-filter:blur(16px)}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;white-space:nowrap}.brand>span,.login-brand>span{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--ink);color:#fff;font-weight:900}.brand>b,.login-brand>b{letter-spacing:.2em}.brand small{color:var(--muted);font-size:11px}.topbar nav{display:flex;align-items:center;gap:4px;overflow:auto;scrollbar-width:none}.topbar nav a{padding:11px 12px;border-radius:11px;text-decoration:none;white-space:nowrap;font-size:14px;font-weight:700}.topbar nav a:hover,.topbar nav a.active{background:var(--ink);color:#fff}.staff{display:flex;align-items:center;gap:12px;font-size:13px}.staff a{color:var(--muted)}.shell{width:min(1380px,calc(100% - 48px));min-height:calc(100vh - 76px);margin:auto;padding:42px 0 72px}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:28px}.page-head p,.kicker{margin:0 0 8px;color:var(--purple);font-size:12px;font-weight:850;letter-spacing:.14em;text-transform:uppercase}.page-head h1{margin:0;font-size:clamp(34px,4vw,56px);line-height:1;letter-spacing:-.045em}.page-head .lead{margin-top:11px;color:var(--muted);line-height:1.5}.button{min-height:46px;display:inline-flex;align-items:center;justify-content:center;padding:0 18px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--ink);font:inherit;font-size:14px;font-weight:800;text-decoration:none;cursor:pointer}.button:hover{transform:translateY(-1px)}.button.primary{border-color:var(--purple);background:var(--purple);color:#fff;box-shadow:0 10px 25px rgba(109,61,229,.18)}.button.secondary{background:#fff}.button.full{width:100%}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}.stats article{min-height:122px;display:flex;flex-direction:column;justify-content:space-between;padding:21px;border:1px solid var(--line);border-radius:20px;background:#fff}.stats span{color:var(--muted);font-size:13px}.stats b{font-size:38px}.panel{padding:25px;border:1px solid var(--line);border-radius:22px;background:#fff}.panel.no-pad{padding:0;overflow:hidden}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.panel h2,.constructor-card h2{margin:0;font-size:23px}.text-link{color:var(--purple);font-weight:750;text-decoration:none}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px}.table-wrap.plain{border:0;border-radius:0}table{width:100%;min-width:850px;border-collapse:collapse}th,td{padding:15px 16px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}th{color:var(--muted);font-size:11px;letter-spacing:.06em;text-transform:uppercase}td{font-size:14px}td a{text-decoration:none}td small{display:block;margin-top:5px;color:var(--muted)}.badge{display:inline-flex;padding:7px 10px;border-radius:999px;background:#eeeaf5;font-size:12px;font-weight:750}.badge.accepted{background:#e7f0ff;color:#245a9b}.badge.production{background:#fff0ca;color:#7c5600}.badge.ready{background:#dff6e9;color:#17663f}.badge.delivery{background:#eee5ff;color:#6332c4}.badge.completed{background:#e8ecea;color:#476055}.badge.cancelled{background:#f8e3e3;color:#9b2929}.empty{min-height:190px;display:grid;place-items:center;align-content:center;gap:7px;text-align:center;color:var(--muted)}.empty b{color:var(--ink);font-size:20px}.filters{display:grid;grid-template-columns:minmax(240px,1fr) 230px auto;gap:10px;margin:0 0 16px}.filters input,.filters select{height:46px}.flash{padding:14px 16px;border-radius:13px;margin-bottom:18px;font-weight:700}.flash.success{background:#e4f7ec;color:var(--green)}.flash.error{background:#fde9e9;color:var(--red)}form{display:grid;gap:15px}label{display:grid;gap:7px;color:#3f3946;font-size:13px;font-weight:750}label small{color:var(--muted);font-weight:400}input,select,textarea{width:100%;border:1px solid #d7d2df;border-radius:11px;background:#fff;padding:12px 13px;color:var(--ink);font:inherit}input:focus,select:focus,textarea:focus{outline:2px solid rgba(109,61,229,.18);border-color:var(--purple)}textarea{resize:vertical}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid.five{grid-template-columns:repeat(5,minmax(0,1fr))}.order-form{gap:18px}.form-section{display:grid;gap:20px}.section-title{display:flex;align-items:flex-start;gap:16px}.section-title>span{color:var(--purple);font-weight:900}.section-title h2{margin:0 0 5px}.section-title p{margin:0;color:var(--muted);font-size:13px}.order-line{display:grid;gap:13px;margin-bottom:14px;padding:18px;border:1px solid var(--line);border-radius:17px;background:#faf9fc}.line-top{display:flex;align-items:center;justify-content:space-between}.remove-line{border:0;background:none;color:var(--red);cursor:pointer}.item-main{grid-template-columns:160px minmax(230px,1fr) 210px}.line-total{text-align:right;color:var(--muted);font-size:13px}.line-total b{color:var(--ink);font-size:16px}.order-submit{position:sticky;z-index:20;bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 18px;border:1px solid #d5cce9;border-radius:18px;background:rgba(255,255,255,.94);box-shadow:0 18px 50px rgba(37,27,55,.17);backdrop-filter:blur(12px)}.order-submit span,.order-submit b{display:block}.order-submit span{color:var(--muted);font-size:12px}.order-submit b{margin-top:4px;font-size:24px}.detail-grid,.catalog-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}.detail-main{display:grid;gap:18px}.sticky{position:sticky;top:96px}.detail-item{display:flex;justify-content:space-between;gap:22px;padding:17px 0;border-top:1px solid var(--line)}.detail-item>div:first-child{position:relative;padding-left:20px}.detail-item small{display:block;margin-top:5px;color:var(--muted)}.detail-item p{margin:8px 0 0;line-height:1.45}.line-dot,.line-icon{display:inline-block;border-radius:50%;background:#bbb}.line-dot{position:absolute;left:0;top:4px;width:9px;height:9px}.cutting{background:#3185e8}.matting{background:#8d61dd}.mirrors{background:#e1a91d}.print{background:#e35e82}.warehouse{background:#36a879}.general{background:#74707b}.item-money{text-align:right;white-space:nowrap}.item-money span,.item-money b{display:block}.item-money span{color:var(--muted);font-size:13px}.item-money b{margin-top:7px}.totals{display:grid;gap:9px;margin:18px 0 0 auto;max-width:350px}.totals>div{display:flex;justify-content:space-between;gap:25px}.totals span{color:var(--muted)}.totals .grand{margin-top:6px;padding-top:13px;border-top:1px solid var(--line);font-size:20px}.work-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.work-cards a{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:14px;text-decoration:none}.line-icon{width:12px;height:12px}.work-cards small{display:block;margin-top:4px;color:var(--muted)}.facts{display:grid;margin:20px 0 0}.facts div{display:flex;justify-content:space-between;gap:15px;padding:11px 0;border-top:1px solid var(--line)}.facts dt{color:var(--muted)}.facts dd{margin:0;text-align:right;font-weight:700}.note-box,.notice{margin-top:16px;padding:14px;border-radius:13px;background:#f1edf8;color:#554d60;line-height:1.5}.line-tabs{display:flex;gap:8px;overflow:auto;margin-bottom:17px;padding-bottom:3px}.line-tabs a{padding:12px 15px;border:1px solid var(--line);border-radius:12px;background:#fff;text-decoration:none;white-space:nowrap;font-weight:750}.line-tabs a.active{border-color:var(--ink);background:var(--ink);color:#fff}.work-list{display:grid;gap:14px}.work-card{display:grid;gap:18px}.work-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.work-card-head a{color:var(--purple);text-decoration:none}.work-card-head h2{margin:5px 0}.work-card-head span{color:var(--muted)}.due{text-align:right}.due span,.due b{display:block}.due span{font-size:12px;color:var(--muted)}.due b{margin-top:5px}.work-items{display:grid;border:1px solid var(--line);border-radius:14px;overflow:hidden}.work-items>div{display:grid;grid-template-columns:1fr 2fr auto;gap:14px;padding:13px;border-bottom:1px solid var(--line)}.work-items>div:last-child{border-bottom:0}.work-items span{color:var(--muted)}.status-form{grid-template-columns:220px auto;justify-content:end}.catalog-layout aside .panel h2{margin-bottom:18px}code{padding:5px 7px;border-radius:6px;background:#eeeaf3;color:#4f326f}.constructor-card{display:grid;grid-template-columns:minmax(320px,.8fr) 1.2fr;gap:45px;align-items:center;padding:42px;border:1px solid var(--line);border-radius:26px;background:#fff}.constructor-art{min-height:480px;display:grid;place-items:center;border-radius:22px;background:radial-gradient(circle,#fff 0,#e6e4ea 48%,#dad6e1 100%)}.mirror-shape{position:relative;width:230px;height:340px;border:1px solid #9da6ac;background:linear-gradient(125deg,#d6e2e7,#eef5f6 38%,#b9c9d0 39%,#e8f0f2 70%,#c8d7dd);box-shadow:0 20px 38px rgba(27,26,35,.25),inset 0 0 0 7px #fff8c4;border-radius:115px 115px 5px 5px}.mirror-shape span{position:absolute;left:0;right:0;bottom:38px;text-align:center;color:#5d666b;font-weight:900}.mirror-shape i{position:absolute;left:50%;bottom:14px;width:16px;height:16px;border-radius:50%;background:var(--purple);box-shadow:0 0 0 3px #fff;transform:translateX(-50%)}.stage{display:inline-flex;padding:8px 11px;border-radius:999px;background:var(--purple-soft);color:var(--purple);font-size:12px;font-weight:850}.constructor-card h2{margin-top:16px;font-size:34px}.constructor-card p,.constructor-card li{color:var(--muted);line-height:1.6}.constructor-card ul{padding-left:20px}.login-bg{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 18% 12%,#e9e1ff,transparent 32%),var(--bg)}.login-card{width:min(520px,100%);padding:38px;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:0 30px 80px rgba(43,30,66,.13)}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:30px}.login-card h1{margin:0;font-size:38px;letter-spacing:-.04em}.login-card .muted{color:var(--muted)}.login-card hr{width:100%;margin:5px 0;border:0;border-top:1px solid var(--line)}
@media(max-width:1050px){.topbar{grid-template-columns:auto 1fr;padding:10px 18px}.staff{display:none}.shell{width:min(100% - 28px,900px);padding-top:28px}.stats{grid-template-columns:repeat(2,1fr)}.detail-grid,.catalog-layout{grid-template-columns:1fr}.sticky{position:static}.form-grid.five{grid-template-columns:repeat(3,1fr)}.constructor-card{grid-template-columns:1fr}.constructor-art{min-height:390px}}
@media(max-width:720px){.topbar{position:static;display:flex;flex-wrap:wrap;gap:10px}.brand small{display:none}.topbar nav{order:3;width:100%;padding-bottom:2px}.topbar nav a{padding:9px 11px}.shell{min-height:auto;padding-top:22px}.page-head{align-items:flex-start;flex-direction:column}.page-head h1{font-size:38px}.page-head>.button{width:100%}.stats{gap:9px}.stats article{min-height:100px;padding:16px}.stats b{font-size:30px}.panel{padding:18px;border-radius:18px}.filters{grid-template-columns:1fr}.form-grid,.form-grid.three,.form-grid.five,.item-main{grid-template-columns:1fr 1fr}.item-main .grow{grid-column:1/-1;grid-row:1}.order-submit{bottom:8px}.detail-item{align-items:flex-start}.work-cards{grid-template-columns:1fr}.work-items>div{grid-template-columns:1fr auto}.work-items span{grid-column:1/-1;grid-row:2}.constructor-card{padding:20px;gap:25px}.constructor-art{min-height:340px}.mirror-shape{width:180px;height:270px}.catalog-layout aside{grid-row:1}}
@media(max-width:480px){.shell{width:min(100% - 18px,600px)}.brand>b{font-size:14px}.stats{grid-template-columns:1fr 1fr}.stats span{font-size:11px}.form-grid,.form-grid.three,.form-grid.five,.item-main{grid-template-columns:1fr}.item-main .grow{grid-column:auto;grid-row:auto}.order-line{padding:14px}.order-submit{align-items:stretch;flex-direction:column}.order-submit .button{width:100%}.detail-item{flex-direction:column}.item-money{text-align:left}.work-card-head{flex-direction:column}.due{text-align:left}.status-form{grid-template-columns:1fr}.constructor-card h2{font-size:28px}.login-card{padding:28px 20px}.login-card h1{font-size:32px}}

/* Заказы и клиенты — первая очередь */
.nav-count{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:6px;padding:0 6px;border-radius:999px;background:#e94848;color:#fff;font-size:11px;font-style:normal}.topbar nav a.active .nav-count{background:#fff;color:var(--red)}.order-stats a{min-height:122px;display:flex;flex-direction:column;justify-content:space-between;padding:21px;border:1px solid var(--line);border-radius:20px;background:#fff;text-decoration:none}.order-stats a:hover{border-color:#b9a7ea;box-shadow:0 10px 28px rgba(39,27,60,.08)}.order-stats span{color:var(--muted);font-size:13px}.order-stats b{font-size:38px}.orders-filters{grid-template-columns:minmax(220px,1fr) repeat(3,180px) auto}.source-badge,.assembly-yes,.access-status,.client-type{display:inline-flex;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:800}.source-badge{background:#edf0f5;color:#4f5969}.source-badge.partner_site{background:#eee7ff;color:#6236bf}.source-badge.marketplace{background:#e3f4ff;color:#216a96}.source-badge.office{background:#e5f6ec;color:#176a43}.source-badge.phone{background:#fff0da;color:#86530d}.assembly-yes{background:#f0e9ff;color:#6535c7}.muted{color:var(--muted)}.check-card{grid-template-columns:auto 1fr;align-items:flex-start;padding:15px;border:1px solid var(--line);border-radius:14px;background:#faf9fc}.check-card input{width:20px;height:20px;margin:1px 0 0}.check-card b,.check-card small{display:block}.check-card small{margin-top:5px}.client-tabs{display:flex;gap:8px;overflow:auto;margin-bottom:16px;padding-bottom:3px}.client-tabs a{display:flex;align-items:center;gap:8px;padding:12px 15px;border:1px solid var(--line);border-radius:13px;background:#fff;text-decoration:none;white-space:nowrap;font-size:14px;font-weight:800}.client-tabs a b{display:grid;place-items:center;min-width:23px;height:23px;padding:0 6px;border-radius:999px;background:#eeeaf4;font-size:11px}.client-tabs a.active{border-color:var(--ink);background:var(--ink);color:#fff}.client-tabs a.active b{background:#fff;color:var(--ink)}.client-search{grid-template-columns:minmax(240px,560px) auto;justify-content:start}.client-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.client-grid>.empty{grid-column:1/-1}.client-card{display:grid;gap:16px}.client-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.client-card h2{margin:8px 0 4px;font-size:24px}.client-card p{margin:0;color:var(--muted)}.client-card time{color:var(--muted);font-size:12px;white-space:nowrap}.client-type{padding:0;background:none;color:var(--purple);text-transform:uppercase;letter-spacing:.08em}.client-phone{font-size:21px;font-weight:850;text-decoration:none}.client-card dl{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:0}.client-card dl div{padding:12px;border-radius:12px;background:#f7f5fa}.client-card dt{color:var(--muted);font-size:11px}.client-card dd{margin:5px 0 0;font-weight:800}.client-comment{padding:13px;border-radius:12px;background:#f7f5fa;color:var(--ink)!important;line-height:1.45}.access-status.pending{background:#fff0ca;color:#7c5600}.access-status.active{background:#dff6e9;color:#17663f}.access-status.blocked{background:#f8e3e3;color:#9b2929}.card-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.card-actions form{display:block}.button.danger{border-color:#edc8c8;color:var(--red)}dialog{width:min(660px,calc(100% - 24px));max-height:calc(100vh - 30px);padding:0;border:0;border-radius:22px;background:transparent}dialog::backdrop{background:rgba(22,18,30,.55);backdrop-filter:blur(4px)}.dialog-card{padding:26px;border-radius:22px;background:#fff;box-shadow:0 30px 90px rgba(0,0,0,.25)}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.dialog-head h2{margin:0;font-size:29px}.dialog-head button{width:38px;height:38px;border:0;border-radius:10px;background:#f1eef5;font-size:25px;cursor:pointer}.dialog-actions{display:flex;justify-content:flex-end;gap:9px}.coming{min-height:330px;display:grid;place-items:center;align-content:center;text-align:center}.coming>span{color:var(--purple);font-size:14px;font-weight:900}.coming h2{margin:12px 0 7px}.coming p{max-width:650px;margin:0;color:var(--muted);line-height:1.55}.frames{background:#bf7b42}.assembly{background:#e05252}
@media(max-width:1180px){.orders-filters{grid-template-columns:1fr 1fr 1fr}.orders-filters input{grid-column:1/-1}.topbar nav a{padding:10px 9px;font-size:13px}}
@media(max-width:820px){.client-grid{grid-template-columns:1fr}.client-search{grid-template-columns:1fr auto}.orders-filters{grid-template-columns:1fr 1fr}.orders-filters input{grid-column:1/-1}.order-stats a{min-height:100px;padding:16px}.order-stats b{font-size:30px}}
@media(max-width:520px){.orders-filters,.client-search{grid-template-columns:1fr}.client-card dl{grid-template-columns:1fr 1fr}.client-card-head{flex-direction:column}.dialog-card{padding:20px}.dialog-actions{flex-direction:column-reverse}.dialog-actions .button{width:100%}}

/* Компактный рабочий режим: больше строк помещается на экране */
.topbar{min-height:64px;gap:18px}.brand>span{width:36px;height:36px;border-radius:10px}.brand>b{font-size:14px}.brand small{font-size:10px}.topbar nav a{padding:9px 10px;font-size:13px}.shell{min-height:calc(100vh - 64px);padding:27px 0 50px}.page-head{margin-bottom:19px}.page-head p,.kicker{margin-bottom:6px;font-size:10px}.page-head h1{font-size:clamp(29px,3vw,42px)}.page-head .lead{margin-top:8px;font-size:14px}.button{min-height:40px;padding:0 15px;font-size:13px;border-radius:11px}.stats{gap:10px;margin-bottom:15px}.order-stats a,.stats article{min-height:88px;padding:15px 17px;border-radius:15px}.order-stats span,.stats span{font-size:12px}.order-stats b,.stats b{font-size:29px}.filters{margin-bottom:12px}.filters input,.filters select{height:40px;padding:9px 11px;font-size:13px}.panel{padding:18px;border-radius:17px}.panel h2,.constructor-card h2{font-size:19px}.empty{min-height:130px}.empty b{font-size:17px}th,td{padding:11px 13px}td{font-size:13px}.client-tabs{margin-bottom:12px}.client-tabs a{padding:9px 12px;font-size:12px}.client-search{max-width:760px}.client-grid{gap:11px}.client-card{gap:12px}.client-card h2{margin:6px 0 3px;font-size:20px}.client-phone{font-size:17px}.client-card dl div{padding:9px}.client-card dd{font-size:13px}.form-section{gap:15px}.section-title{gap:11px}.section-title h2{font-size:19px}.section-title p{font-size:12px}label{gap:5px;font-size:12px}input,select,textarea{padding:10px 11px}.manual-mirror-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.option-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.check-card{padding:11px}.order-submit{padding:12px 15px;border-radius:14px}.order-submit b{font-size:20px}
@media(max-width:1050px){.manual-mirror-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.topbar{min-height:auto}.shell{padding-top:18px}.page-head h1{font-size:32px}.manual-mirror-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.option-checks{grid-template-columns:1fr}.order-stats a{min-height:82px}}
@media(max-width:480px){.manual-mirror-grid{grid-template-columns:1fr}.page-head h1{font-size:29px}}

/* Услуги, материалы и фурнитура */
.catalog-filters{grid-template-columns:minmax(240px,1fr) repeat(3,190px) auto}.catalog-table{min-width:1120px}.inventory-table{min-width:1480px}.catalog-table td{height:64px}.catalog-table small{white-space:normal}.line-label{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}.line-label .line-dot{position:static;flex:0 0 auto}.row-actions{display:flex;justify-content:flex-end;gap:6px;align-items:center}.row-actions form{display:block}.mini-button{min-height:31px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:11px;font-weight:750;white-space:nowrap;cursor:pointer}.mini-button:hover{border-color:var(--purple);color:var(--purple)}.catalog-photo{width:46px;height:46px;display:block;border:1px solid var(--line);border-radius:10px;object-fit:cover;background:#f3f1f6}.empty-photo{display:grid;place-items:center;color:#aaa}.stock-state{display:inline-flex;min-width:46px;justify-content:center;padding:6px 8px;border-radius:999px;font-weight:850}.stock-state.ok{background:#dff6e9;color:#17663f}.stock-state.low{background:#fff0ca;color:#7c5600}.stock-state.out{background:#f8e3e3;color:#9b2929}#serviceDialog,#inventoryDialog{width:min(900px,calc(100% - 24px))}#stockDialog{width:min(520px,calc(100% - 24px))}.catalog-dialog{max-height:calc(100vh - 30px);overflow:auto}.compact-dialog{width:100%}.stock-current{padding:12px 14px;border-radius:11px;background:#f3effa;color:var(--muted)}.stock-current b{color:var(--ink)}[hidden]{display:none!important}
@media(max-width:1180px){.catalog-filters{grid-template-columns:1fr 1fr 1fr}.catalog-filters input{grid-column:1/-1}}
@media(max-width:720px){.catalog-filters{grid-template-columns:1fr 1fr}.catalog-filters input{grid-column:1/-1}#serviceDialog,#inventoryDialog{width:calc(100% - 12px)}.catalog-dialog{padding:18px}.catalog-table,.inventory-table{min-width:0}.catalog-table thead{display:none}.catalog-table,.catalog-table tbody,.catalog-table tr,.catalog-table td{display:block;width:100%}.catalog-table tr{padding:12px;border-bottom:1px solid var(--line)}.catalog-table td{height:auto;min-height:38px;display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center;gap:10px;padding:7px 4px;border:0}.catalog-table td::before{color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase}.catalog-table td:last-child{display:block}.catalog-table td:last-child::before{display:none}.catalog-table:not(.inventory-table) td:nth-child(1)::before{content:'Услуга'}.catalog-table:not(.inventory-table) td:nth-child(2)::before{content:'Категория'}.catalog-table:not(.inventory-table) td:nth-child(3)::before{content:'Расчёт'}.catalog-table:not(.inventory-table) td:nth-child(4)::before{content:'Участок'}.catalog-table:not(.inventory-table) td:nth-child(5)::before{content:'Себестоимость'}.catalog-table:not(.inventory-table) td:nth-child(6)::before{content:'Цена продажи'}.catalog-table:not(.inventory-table) td:nth-child(7)::before{content:'Норматив'}.catalog-table:not(.inventory-table) td:nth-child(8)::before{content:'Статус'}.inventory-table td:nth-child(1)::before{content:'Фото'}.inventory-table td:nth-child(2)::before{content:'Позиция'}.inventory-table td:nth-child(3)::before{content:'Категория'}.inventory-table td:nth-child(4)::before{content:'Остаток'}.inventory-table td:nth-child(5)::before{content:'Резерв'}.inventory-table td:nth-child(6)::before{content:'Доступно'}.inventory-table td:nth-child(7)::before{content:'Минимум'}.inventory-table td:nth-child(8)::before{content:'Закуп'}.inventory-table td:nth-child(9)::before{content:'Продажа'}.inventory-table td:nth-child(10)::before{content:'Поставщик'}.row-actions{justify-content:flex-start;margin-top:5px}}
@media(max-width:480px){.catalog-filters{grid-template-columns:1fr}.catalog-table td{grid-template-columns:92px minmax(0,1fr)}}
.history-link{display:inline-flex;align-items:center;text-decoration:none}.history-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}.history-summary .panel{min-height:90px;display:flex;flex-direction:column;justify-content:space-between;gap:8px;padding:15px}.history-summary span{font-size:12px;color:var(--muted)}.history-summary b{font-size:16px;overflow-wrap:anywhere}.history-table{min-width:690px}.history-section{margin-top:16px}.history-list{margin-top:14px;border-top:1px solid var(--line)}.history-list>div{display:grid;grid-template-columns:140px minmax(140px,1fr) 160px;gap:10px 18px;align-items:start;padding:14px 0;border-bottom:1px solid var(--line)}.history-list time,.history-list span{font-size:12px;color:var(--muted)}.history-list p{grid-column:2/-1;margin:0;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.history-plus{color:var(--green);font-weight:800}.history-minus{color:var(--red);font-weight:800}.client-edit{margin-top:16px}.client-save{justify-self:start}.client-access-action{margin-top:16px}.client-access-action+.muted{font-size:12px;line-height:1.45;margin-bottom:0}
@media(max-width:850px){.history-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.history-list>div{grid-template-columns:120px 1fr}.history-list>div span{grid-column:2}.history-list p{grid-column:1/-1}}
@media(max-width:520px){.history-summary{gap:8px}.history-summary .panel{padding:11px}.history-summary b{font-size:13px}.history-list>div{grid-template-columns:1fr;gap:5px}.history-list>div span,.history-list p{grid-column:1}.client-edit .form-grid{grid-template-columns:1fr}}
.service-totals{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}.service-totals span{padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:#514b58;font-size:13px}.service-totals b{margin-left:7px;color:var(--ink);font-size:15px}.service-filters{grid-template-columns:minmax(220px,1fr) 220px 180px auto}.service-table{min-width:850px}.service-table th{font-size:12px;letter-spacing:0;text-transform:none;font-weight:650}.service-table td{font-size:15px;line-height:1.4}.service-table td:first-child b{font-weight:700}.service-table td small{font-size:12px}.service-price{white-space:nowrap;font-weight:650}.service-dialog{display:grid;gap:16px}.service-dialog label{font-size:14px;font-weight:600}.service-dialog input,.service-dialog select{font-size:15px}.service-dialog .muted{margin:0;font-size:12px;line-height:1.45}.service-table .mini-button{font-size:12px}.service-table .row-actions{flex-wrap:wrap}
@media(max-width:800px){.service-filters{grid-template-columns:1fr 1fr}.service-filters input{grid-column:1/-1}.service-filters button{grid-column:1/-1}}
@media(max-width:520px){.service-filters{grid-template-columns:1fr}.service-filters input,.service-filters button{grid-column:auto}.service-table{min-width:730px}.service-dialog .form-grid{grid-template-columns:1fr}}

/* v5: спокойные таблицы склада и клиентов */
.inventory-filters{grid-template-columns:minmax(220px,1fr) repeat(3,minmax(130px,185px)) auto}.inventory-simple-table{min-width:940px}.inventory-simple-table td,.clients-table td{font-size:14px;vertical-align:middle}.inventory-simple-table th,.clients-table th{font-size:12px;letter-spacing:0;text-transform:none;font-weight:650}.inventory-name{display:flex;align-items:center;gap:10px;min-width:180px}.inventory-name b,.clients-table td:first-child b{font-weight:650}.inventory-name small,.clients-table td small{display:block;color:var(--muted);font-size:12px;margin-top:3px}.inventory-simple-table .stock-state{font-size:13px;font-weight:650}.inventory-simple-table .row-actions{flex-wrap:wrap}.inventory-simple-table .catalog-photo{width:34px;height:34px;flex:0 0 34px}.clients-filters{grid-template-columns:minmax(250px,1fr) 210px auto}.clients-table{width:100%;min-width:780px}.clients-table tr{height:56px}.clients-table a:not(.mini-button){color:inherit;text-decoration:none}.clients-table a:not(.mini-button):hover{text-decoration:underline}.clients-table .mini-button{font-size:12px}.client-tabs a{font-size:13px;font-weight:600}.client-overview{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.client-overview span{padding:9px 12px;background:#fff;border:1px solid var(--line);border-radius:10px;font-size:13px;font-weight:500}.invite-panel{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}.invite-panel p{margin:0 0 10px}.invite-panel .muted{font-size:12px;line-height:1.5}.client-edit label{font-size:14px;font-weight:550}.client-edit input,.client-edit select,.client-edit textarea{font-size:15px}.client-edit .form-grid{gap:12px}
@media(max-width:850px){.inventory-filters{grid-template-columns:1fr 1fr}.inventory-filters input{grid-column:1/-1}.clients-filters{grid-template-columns:1fr 170px auto}}
@media(max-width:620px){.clients-filters,.inventory-filters{grid-template-columns:1fr}.clients-filters input,.inventory-filters input{grid-column:auto}.clients-table{min-width:0}.clients-table thead{display:none}.clients-table,.clients-table tbody,.clients-table tr,.clients-table td{display:block;width:100%}.clients-table tr{height:auto;padding:11px 15px;border-bottom:1px solid var(--line)}.clients-table td{border:0;padding:4px 0;font-size:13px}.clients-table td:first-child{font-size:15px}.clients-table td:last-child{padding-top:8px}.inventory-simple-table{min-width:760px}}

/* v6: рабочие накладные и резка */
.production-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:16px}.production-tabs a{padding:9px 14px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);text-decoration:none;font-size:14px}.production-tabs a.active{background:#201c29;color:#fff;border-color:#201c29}.production-search{grid-template-columns:minmax(240px,1fr) auto;max-width:850px}.production-search:has(.production-archive){grid-template-columns:minmax(240px,1fr) auto auto}.production-archive{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:13px}.production-archive input{height:auto;width:auto}.production-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.production-section-title h2{margin:0}.production-section-title a{font-size:13px}.production-form{display:grid;gap:14px}.production-lines{min-width:970px;width:100%;table-layout:fixed}.production-lines th{font-size:12px;letter-spacing:0;text-transform:none}.production-lines th:first-child{width:26%}.production-lines th:nth-child(2){width:7%}.production-lines th:nth-child(3){width:12%}.production-lines th:nth-child(4),.production-lines th:nth-child(5){width:9%}.production-lines th:nth-child(6){width:8%}.production-lines th:nth-child(7){width:9%}.production-lines th:nth-child(8){width:11%}.production-lines th:last-child{width:5%}.production-lines td{padding:6px 4px;vertical-align:top}.production-lines input,.production-lines select{width:100%;min-width:0;height:37px;padding:6px;font-size:13px}.production-lines .production-product input{margin-bottom:3px}.production-product .prod-input{font-weight:650}.production-product .code,.production-product .details{font-size:12px}.production-lines .row-total{white-space:nowrap;font-size:13px;font-weight:700;padding-top:17px}.production-lines .remove{margin-top:3px}.production-grand{text-align:right;margin-top:16px;font-size:15px}.production-grand b{margin-left:10px;font-size:23px}.production-actions{display:flex;justify-content:flex-end;gap:10px}.production-work-table{min-width:1020px}.production-cut-table{min-width:810px}.production-inline{display:flex;align-items:center;gap:5px}.production-inline input{width:100px}.production-inline select{width:122px}.production-inline input,.production-inline select{height:34px;padding:5px 7px;font-size:13px}.production-print-links{display:flex;gap:9px;margin-top:5px;font-size:12px}.production-print-links a{white-space:nowrap}.production-footnote{font-size:12px;margin:12px 0 0}
@media(max-width:650px){.production-search,.production-search:has(.production-archive){grid-template-columns:1fr auto}.production-search input{grid-column:1/-1}.production-lines{min-width:900px}.production-actions{flex-direction:column}.production-actions .button{width:100%}.production-tabs{flex-wrap:nowrap;overflow:auto}.production-tabs a{white-space:nowrap}}

/* v6.1: компактное рабочее место производства */
.production-page{max-width:1180px;margin:auto;font-size:14px}.production-page .page-head{align-items:center;margin-bottom:12px}.production-page .page-head .kicker,.production-page .page-head .lead{display:none}.production-page .page-head h1{font-size:25px;letter-spacing:-.02em}.production-page .page-head .button,.production-page .button{min-height:34px;padding:6px 12px;border-radius:9px;font-size:13px;box-shadow:none}.production-page .panel{padding:14px;border-radius:13px}.production-page .panel.no-pad{padding:0}.production-page .production-tabs{margin-bottom:11px}.production-page .production-tabs a{padding:7px 11px;font-size:13px;border-radius:8px}.production-page .production-search{margin-bottom:11px;max-width:850px}.production-page .production-search input{height:36px}.production-page .production-archive{font-weight:550}.production-page .service-table th,.production-page .service-table td{padding:9px 11px;font-size:13px;line-height:1.35}.production-page .service-table th{font-weight:700}.production-page .service-table td small{font-size:11px;margin-top:2px}.production-page .row-actions{gap:5px;flex-wrap:nowrap}.production-page .mini-button{padding:5px 8px;font-size:12px;min-height:28px}.production-page .production-inline input,.production-page .production-inline select{height:30px}.production-page .production-print-links{margin-top:3px;font-size:11px}.production-page .production-form{gap:10px}.production-page .production-form .form-grid{grid-template-columns:1fr 1fr;gap:9px}.production-page .production-form label{font-weight:600;gap:5px}.production-page .production-form input,.production-page .production-form select{padding:7px 9px;font-size:13px}.production-page .production-form .form-grid input,.production-page .production-form .form-grid select{height:36px}.production-page .production-section-title{margin-bottom:9px}.production-page .production-section-title h2{font-size:15px}.production-invoice-meta{display:flex;align-items:center;gap:14px;margin-bottom:10px}.production-invoice-meta b{font-size:17px}.production-invoice-meta span{font-size:12px;color:var(--muted)}.production-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px}.production-toolbar>a{font-size:12px;white-space:nowrap}.production-toolbar .muted{font-size:12px}.production-toolbar .production-actions{margin-left:auto;display:flex;gap:7px}.production-page .production-lines{min-width:970px}.production-page .production-lines th{padding:8px 5px}.production-page .production-lines td{padding:5px 3px;vertical-align:middle}.production-page .production-lines input,.production-page .production-lines select{height:32px;padding:5px;font-size:12px}.production-page .production-lines th:first-child{width:29%}.production-page .production-lines th:nth-child(3){width:13%}.production-page .production-lines th:nth-child(8){width:9%}.production-product-main{display:flex;gap:4px}.production-page .production-product-main .code{width:58px;flex:none}.production-page .production-product-main .prod-input{flex:1;min-width:0;margin:0}.production-item-details summary{cursor:pointer;font-size:11px;color:var(--muted);padding:2px 0}.production-item-details[open] .details{margin-top:3px}.production-page .production-lines .row-total{padding-top:6px;text-align:right;font-size:12px}.production-page .production-lines .remove{margin:0}.production-page .production-grand{margin-top:9px;font-size:13px}.production-page .production-grand b{font-size:18px}.production-comment{margin-top:8px;font-size:12px;color:var(--muted)}.production-comment summary{cursor:pointer}.production-comment textarea{width:100%;margin-top:7px;font-size:13px}.production-page .empty{min-height:100px}.production-page .empty b{font-size:15px}.production-page .work-card{gap:10px}.production-page .work-card h2{font-size:16px}.production-page .work-items>div{padding:8px}.production-page .line-tabs{margin-bottom:11px}.production-page .line-tabs a{padding:7px 11px;font-size:13px}
@media(max-width:650px){.production-page .page-head h1{font-size:20px}.production-page .production-form .form-grid{grid-template-columns:1fr}.production-toolbar{align-items:flex-start}.production-toolbar .production-actions{width:100%;margin-left:0;flex-direction:row}.production-toolbar .production-actions .button{width:auto;flex:1}.production-page .production-lines{min-width:900px}.production-page .service-table td,.production-page .service-table th{padding:8px}.production-page .production-tabs{flex-wrap:nowrap}}

/* v7: производство по логике рабочего cabinet2 */
.production-main-tabs{margin-bottom:14px}.production-main-tabs a.active{background:#e5f7eb;border-color:#9dd9b1;color:#163d24}.production-invoice-head{display:grid;gap:10px}.production-invoice-fields{display:grid;grid-template-columns:minmax(230px,1.4fr) minmax(230px,1fr) auto 145px 145px;gap:8px;align-items:end}.production-invoice-fields>.button{margin-bottom:0}.production-invoice-fields label{font-size:11px}.production-invoice-fields input,.production-invoice-fields select{height:36px!important}.production-page .production-lines{min-width:1050px}.production-page .production-lines th:first-child{width:4%;text-align:center}.production-page .production-lines th:nth-child(2){width:28%}.production-page .production-lines th:nth-child(3){width:7%}.production-page .production-lines th:nth-child(4){width:13%}.production-page .production-lines th:nth-child(5),.production-page .production-lines th:nth-child(6){width:8%}.production-page .production-lines th:nth-child(7){width:7%}.production-page .production-lines th:nth-child(8){width:8%}.production-page .production-lines th:nth-child(9){width:10%}.production-page .production-lines th:last-child{width:4%}.production-page .production-lines .line-number{text-align:center;color:var(--muted);font-size:12px}.production-wa{border-color:#19a85b!important;background:#20bd68!important;color:#fff!important}.production-dialog{width:min(460px,calc(100% - 30px));padding:18px;border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 70px rgba(21,16,31,.25)}.production-dialog::backdrop{background:rgba(20,16,27,.45)}.production-dialog form{gap:12px}.production-dialog .production-actions{margin-top:6px}.production-locked{display:flex;align-items:center;justify-content:space-between;gap:14px}.production-sandblast{height:calc(100vh - 160px);min-height:620px;padding:5px!important;overflow:hidden}.production-sandblast iframe{width:100%;height:100%;border:0;border-radius:9px;background:#f4f5f9}
.production-work-filters{display:grid;gap:8px;margin-bottom:11px}.production-work-filters>div:first-child{display:grid;grid-template-columns:minmax(240px,1fr) 150px 150px auto auto;gap:7px;align-items:center}.production-work-filters input{height:36px}.production-status-chips{display:flex;gap:6px;flex-wrap:wrap}.production-status-chips button{min-height:30px;padding:4px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font:inherit;font-size:12px;font-weight:700;cursor:pointer}.production-status-chips button.active{background:#2868e8;border-color:#2868e8;color:#fff}.production-row-production{background:#fff8dd}.production-row-ready{background:#e6f8ed}.production-row-completed{background:#f0f1f3}
@media(max-width:1000px){.production-invoice-fields{grid-template-columns:1fr 1fr auto}.production-invoice-fields .invoice-date,.production-invoice-fields .invoice-number{grid-row:2}.production-sandblast{height:calc(100vh - 145px)}}
@media(max-width:650px){.production-invoice-fields{grid-template-columns:1fr auto}.production-invoice-fields label:first-child{grid-column:1/-1}.production-invoice-fields label:nth-child(2){grid-column:1}.production-invoice-fields .invoice-date,.production-invoice-fields .invoice-number{grid-row:auto}.production-toolbar .production-actions{overflow:auto;flex-wrap:nowrap}.production-toolbar .production-actions .button{flex:0 0 auto;white-space:nowrap}.production-locked{display:grid}.production-sandblast{height:calc(100vh - 125px);min-height:520px;overflow:auto}.production-sandblast iframe{min-width:760px}.production-work-filters>div:first-child{grid-template-columns:1fr 1fr}.production-work-filters>div:first-child>input:first-of-type{grid-column:1/-1}.production-work-filters .production-archive{justify-self:start}}

/* v8: быстрый клиент, ровная накладная и действия производства */
.production-invoice-fields{grid-template-columns:minmax(360px,1fr) 155px 155px}.invoice-customer{position:relative}.customer-suggestions{position:absolute;z-index:20;top:100%;left:0;right:0;margin-top:5px;padding:5px;border:1px solid var(--line);border-radius:11px;background:#fff;box-shadow:0 14px 35px rgba(24,19,31,.16)}.customer-suggestions button{display:flex;width:100%;justify-content:space-between;gap:14px;padding:9px 10px;border:0;border-radius:8px;background:#fff;text-align:left;cursor:pointer}.customer-suggestions button:hover{background:#f2eefb}.customer-suggestions b{font-size:13px}.customer-suggestions span{font-size:11px;color:var(--muted);white-space:nowrap}.production-page .production-lines{min-width:910px}.production-page .production-lines th:first-child{width:4%}.production-page .production-lines th:nth-child(2){width:33%}.production-page .production-lines th:nth-child(3){width:8%}.production-page .production-lines th:nth-child(4),.production-page .production-lines th:nth-child(5){width:9%}.production-page .production-lines th:nth-child(6){width:8%}.production-page .production-lines th:nth-child(7){width:10%}.production-page .production-lines th:nth-child(8){width:13%}.production-page .production-lines th:last-child{width:5%}.production-page .production-lines td{vertical-align:top}.production-page .production-lines .row-total{padding-top:9px}.production-report-form{display:flex;align-items:center;gap:7px;margin:-1px 0 11px;font-size:12px}.production-report-form span{color:var(--muted)}.production-report-form input{width:78px;height:34px;padding:6px 8px}.production-action-select{width:145px;height:32px;padding:4px 7px;font-size:12px}.item-location{margin-top:5px!important;color:#5e3ac8!important}.item-location b{font-weight:700}.production-work-table td:last-child{text-align:right}
@media(max-width:650px){.production-invoice-fields{grid-template-columns:1fr 1fr}.production-invoice-fields .invoice-customer{grid-column:1/-1}.customer-suggestions button{display:block}.customer-suggestions span{display:block;margin-top:3px}.production-report-form{flex-wrap:wrap}.production-page .production-lines{min-width:820px}}

/* v9: одно стекло и связанные с ним работы */
.production-invoice-fields{grid-template-columns:minmax(330px,1fr) auto 155px 155px}.customer-add-button{white-space:nowrap}.production-actions button:disabled{opacity:.48;cursor:not-allowed}.production-root-row td{border-top:2px solid #d9d3e2}.production-child-row{background:#faf8fd}.production-child-row td:first-child{color:#7040df!important;font-size:17px!important}.production-child-row .production-product{padding-left:14px!important}.production-child-row input[readonly]{background:#f0edf4;color:#625b69}.child-caption{display:block;margin:0 0 4px;color:#7040df;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.add-child{display:inline-flex;margin-top:4px;padding:3px 8px;border:1px dashed #8a69dc;border-radius:7px;background:#f7f3ff;color:#6034c7;font:inherit;font-size:11px;font-weight:750;cursor:pointer}.add-child:hover{background:#eee6ff}.calc-note{display:block;margin-top:4px;color:#7258a8;font-size:10px}.production-child-row .production-item-details summary{display:none}.production-child-row .production-item-details:not([open]){display:none}
@media(max-width:1000px){.production-invoice-fields{grid-template-columns:1fr auto 145px}.production-invoice-fields .invoice-number{grid-column:3}.production-invoice-fields .invoice-date{grid-column:2}}
@media(max-width:650px){.production-invoice-fields{grid-template-columns:1fr auto}.production-invoice-fields .invoice-customer{grid-column:1/-1}.production-invoice-fields .invoice-date,.production-invoice-fields .invoice-number{grid-column:auto}.customer-add-button{align-self:end}}

/* v10: конструктор пескоструя */
.sandblast-page{max-width:1480px}.sandblast-constructor{display:grid;grid-template-columns:minmax(520px,1.2fr) minmax(440px,.8fr);gap:16px;align-items:start}.sandblast-preview{position:sticky;top:82px;display:grid;grid-template-rows:auto minmax(520px,calc(100vh - 250px)) auto;min-width:0;background:#ebe8f0}.sandblast-preview canvas{display:block;width:100%;height:100%;min-width:0;border-radius:10px}.sandblast-preview-head,.sandblast-preview-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}.sandblast-preview-head{padding:2px 3px 10px}.sandblast-preview-head div{display:grid;gap:2px}.sandblast-preview-head b{font-size:15px}.sandblast-preview-head span,.sandblast-preview-foot{font-size:11px;color:var(--muted)}#schemeMaterialBadge{padding:6px 9px;border-radius:999px;background:#fff;color:#5e3ac8;font-weight:750}.sandblast-preview-foot{padding:10px 3px 1px;font-size:12px}.sandblast-controls{display:grid;gap:11px}.sandblast-controls>label,.sandblast-controls label{display:grid;gap:5px;font-size:12px;font-weight:650}.sandblast-controls input,.sandblast-controls select,.sandblast-controls textarea{width:100%;font-size:13px}.sandblast-controls input,.sandblast-controls select{height:38px;padding:7px 9px}.sandblast-controls textarea{padding:9px;resize:vertical}.sandblast-step{display:flex;align-items:flex-start;gap:10px;margin-top:14px;padding-top:17px;border-top:1px solid var(--line)}.sandblast-step.first{margin-top:0;padding-top:0;border:0}.sandblast-step>span{padding-top:2px;color:#7040e8;font-size:12px;font-weight:850}.sandblast-step h2{margin:0;font-size:17px}.sandblast-grid2{display:grid;grid-template-columns:1fr 1fr;gap:9px}.sandblast-mode-cards,.sandblast-choice,.sandblast-shapes,.sandblast-patterns{display:grid;gap:8px}.sandblast-mode-cards{grid-template-columns:1fr 1fr}.sandblast-choice.two{grid-template-columns:1fr 1fr}.sandblast-choice.three{grid-template-columns:repeat(3,1fr)}.sandblast-shapes{grid-template-columns:repeat(3,1fr)}.sandblast-patterns{grid-template-columns:repeat(3,1fr)}.sandblast-mode-cards label,.sandblast-choice label,.sandblast-shapes label,.sandblast-patterns label{display:flex;align-items:center;justify-content:center;min-height:62px;padding:9px;border:1px solid var(--line);border-radius:11px;background:#fff;text-align:center;cursor:pointer}.sandblast-mode-cards label{align-items:flex-start;flex-direction:column}.sandblast-mode-cards label.selected,.sandblast-choice label.selected,.sandblast-shapes label.selected,.sandblast-patterns label.selected{border:2px solid #7040e8;background:#f3edff;padding:8px}.sandblast-controls label input[type=radio]{position:absolute;opacity:0;pointer-events:none}.sandblast-mode-cards b,.sandblast-choice b,.sandblast-shapes b,.sandblast-patterns b{font-size:12px}.sandblast-mode-cards small{font-size:10px;color:var(--muted)}.sandblast-shapes label,.sandblast-patterns label{flex-direction:column;gap:5px;min-height:82px}.sandblast-patterns i{font-style:normal;font-size:26px;line-height:1}.sb-shape{display:block;width:31px;height:39px;border:2px solid #5f5a65}.sb-shape.rounded{border-radius:8px}.sb-shape.arch{border-radius:17px 17px 0 0}.sb-shape.arch.down{border-radius:0 0 17px 17px}.sb-shape.pill{border-radius:16px}.sb-shape.circle{width:36px;height:36px;border-radius:50%}.sandblast-colors{display:flex;gap:8px;flex-wrap:wrap}.sandblast-colors label{display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid var(--line);border-radius:999px;background:#fff;cursor:pointer}.sandblast-colors label.selected{border:2px solid #7040e8;padding:7px 9px}.sandblast-colors i{width:17px;height:17px;border-radius:50%;border:1px solid rgba(0,0,0,.2)}.sandblast-colors .black{background:#1d1b21}.sandblast-colors .gold{background:#bd9443}.sandblast-colors .silver{background:#aeb5bb}.sandblast-colors .bronze{background:#8e6042}.sandblast-supply-note{margin:0;padding:8px 10px;border-radius:9px;background:#f4f1f7;color:var(--muted);font-size:11px;line-height:1.45}.sandblast-save{display:grid;grid-template-columns:1.2fr 1fr;gap:8px;margin-top:9px}.sandblast-message{min-height:18px;margin:0;font-size:12px}.sandblast-message.success{color:#087744}.sandblast-message.error{color:#b42318}
@media(max-width:1050px){.sandblast-constructor{grid-template-columns:minmax(430px,1fr) minmax(390px,.85fr)}.sandblast-preview{grid-template-rows:auto minmax(430px,calc(100vh - 250px)) auto}.sandblast-shapes,.sandblast-patterns{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.sandblast-page{padding-bottom:38vh}.sandblast-constructor{display:flex;flex-direction:column}.sandblast-controls{order:1;width:100%}.sandblast-preview{order:2;position:fixed;z-index:30;left:8px;right:8px;bottom:8px;top:auto;height:36vh;grid-template-rows:auto 1fr auto;padding:9px!important;box-shadow:0 -10px 35px rgba(24,18,33,.24)}.sandblast-preview-head{padding-bottom:4px}.sandblast-preview-foot{padding-top:4px}.sandblast-shapes,.sandblast-patterns{grid-template-columns:repeat(3,1fr)}.sandblast-shapes label,.sandblast-patterns label{min-height:70px}.sandblast-step h2{font-size:15px}}
@media(max-width:480px){.sandblast-grid2{grid-template-columns:1fr 1fr}.sandblast-mode-cards,.sandblast-choice.three{grid-template-columns:1fr}.sandblast-shapes,.sandblast-patterns{grid-template-columns:repeat(2,1fr)}.sandblast-save{grid-template-columns:1fr}.sandblast-preview{height:34vh}}

/* v11: конструктор склейки стекла */
.gluing-page{max-width:1480px;margin:auto}.gluing-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:16px}.gluing-head p{margin:0 0 6px;color:var(--purple);font-size:10px;font-weight:850;letter-spacing:.14em}.gluing-head h1{margin:0;font-size:30px;letter-spacing:-.035em}.gluing-head span{display:block;margin-top:7px;color:var(--muted);font-size:13px}.gluing-head-actions{display:flex;gap:8px}.gluing-layout{display:grid;grid-template-columns:minmax(390px,.72fr) minmax(620px,1.28fr);gap:15px;align-items:start}.gluing-workspace{display:grid;gap:12px}.gluing-controls{display:grid;gap:11px}.gluing-controls label{font-size:12px}.gluing-controls input,.gluing-controls select{height:38px;padding:7px 9px}.gluing-controls textarea{padding:9px}.gluing-section-title{display:flex;align-items:flex-start;gap:10px;margin-top:9px;padding-top:13px;border-top:1px solid var(--line)}.gluing-section-title:first-of-type{margin-top:0;padding-top:0;border:0}.gluing-section-title>span{color:var(--purple);font-size:11px;font-weight:900}.gluing-section-title h2{margin:0;font-size:16px}.gluing-section-title p{margin:3px 0 0;color:var(--muted);font-size:11px}.gluing-grid2,.gluing-grid3{display:grid;gap:8px}.gluing-grid2{grid-template-columns:1fr 1fr}.gluing-grid3{grid-template-columns:repeat(3,1fr)}.gluing-check{display:flex!important;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:#faf9fc;cursor:pointer}.gluing-check input{width:19px;height:19px;flex:none}.gluing-check b,.gluing-check small{display:block}.gluing-check small{margin-top:2px}.gluing-form-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:3px}.gluing-message{min-height:16px;margin:0;font-size:12px}.gluing-message.success{color:var(--green)}.gluing-message.error{color:var(--red)}.gluing-list-panel{padding:14px}.gluing-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}.gluing-list-head h2{margin:0;font-size:15px}.gluing-list-head span{display:block;margin-top:3px;color:var(--muted);font-size:11px}.gluing-list{display:grid;gap:7px}.gluing-empty{padding:22px;border:1px dashed var(--line);border-radius:11px;color:var(--muted);font-size:12px;text-align:center}.gluing-item{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:7px;border:1px solid var(--line);border-radius:11px;background:#fff}.gluing-item.selected{border-color:#8f6ce7;background:#f7f3ff}.gluing-item-main{display:grid;gap:2px;padding:4px;border:0;background:none;text-align:left;cursor:pointer}.gluing-item-main b{font-size:13px}.gluing-item-main span{font-size:12px}.gluing-item-main small{color:var(--muted);font-size:10px}.gluing-item>div{display:flex;gap:5px}.mini-button.danger{color:var(--red)}.gluing-preview{position:sticky;top:80px;display:grid;grid-template-rows:auto auto auto;min-width:0;padding:15px;background:#ebe8f0}.gluing-preview canvas{display:block;width:100%;height:auto;border-radius:11px;background:#f7f5fa}.gluing-preview-head,.gluing-preview-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}.gluing-preview-head{padding:0 2px 10px}.gluing-preview-head div{display:grid;gap:2px}.gluing-preview-head b{font-size:15px}.gluing-preview-head span{color:var(--muted);font-size:11px}.gluing-preview-head>span{padding:6px 9px;border-radius:999px;background:#fff;color:var(--purple);font-weight:800}.gluing-preview-foot{padding:10px 2px 0;color:var(--muted);font-size:11px}.gluing-head-actions button:disabled{opacity:.55;cursor:wait}
@media(max-width:1100px){.gluing-layout{grid-template-columns:minmax(350px,.8fr) minmax(480px,1.2fr)}.gluing-grid3{grid-template-columns:1fr 1fr}.gluing-grid3 label:last-child{grid-column:1/-1}}
@media(max-width:820px){.gluing-head{align-items:flex-start;flex-direction:column}.gluing-head-actions{width:100%}.gluing-head-actions .button{flex:1}.gluing-layout{display:flex;flex-direction:column}.gluing-workspace,.gluing-preview{width:100%}.gluing-preview{position:static;order:2}.gluing-workspace{order:1}.gluing-preview-foot{flex-wrap:wrap}.gluing-head h1{font-size:26px}}
@media(max-width:480px){.gluing-head-actions{display:grid;grid-template-columns:1fr}.gluing-grid2,.gluing-grid3{grid-template-columns:1fr 1fr}.gluing-grid3 label:last-child{grid-column:auto}.gluing-form-actions{grid-template-columns:1fr}.gluing-preview{padding:9px}.gluing-preview-foot{font-size:10px}.gluing-item{grid-template-columns:1fr}.gluing-item>div{justify-content:flex-end}}

/* v12: one-screen constructors; the showcase list is the only inner scroller. */
@media(min-width:821px){.sandblast-mirror-only{display:contents}.sandblast-mirror-only[hidden]{display:none}}
@media(min-width:821px){.sandblast-controls{grid-template-rows:repeat(16,min-content)!important}}
.permanent-delete-form{display:inline-flex;margin:0}.permanent-delete{border-color:#f2b8b5!important;background:#fff7f6!important;color:#b42318!important}.permanent-delete:hover{background:#fee4e2!important}.clients-table td:last-child{white-space:nowrap}.clients-table td:last-child>.permanent-delete-form{margin-left:5px}.production-work-table td:last-child>.permanent-delete-form{margin-top:5px}
@media(min-width:821px){.sandblast-page{max-width:none;height:calc(100vh - 78px);overflow:hidden}.sandblast-page .production-tabs{margin-bottom:8px}.sandblast-constructor{height:calc(100% - 54px);grid-template-columns:minmax(430px,.9fr) minmax(760px,1.1fr);overflow:hidden}.sandblast-preview{position:static;height:100%;grid-template-rows:auto minmax(0,1fr) auto}.sandblast-preview canvas{min-height:0;object-fit:contain}.sandblast-controls{height:100%;grid-template-columns:1fr 1fr;grid-auto-flow:column;grid-template-rows:repeat(14,min-content);gap:5px 10px;align-content:start;overflow:hidden;padding:12px}.sandblast-step{margin-top:4px;padding-top:6px}.sandblast-shapes label,.sandblast-patterns label{min-height:55px;padding:4px}.sandblast-controls input,.sandblast-controls select{height:32px}.sandblast-choice label,.sandblast-mode-cards label{min-height:45px;padding:5px}.sandblast-controls textarea{height:48px}.sandblast-save{margin-top:1px}.gluing-page{max-width:none;height:calc(100vh - 84px);overflow:hidden}.gluing-head{height:60px;margin-bottom:8px}.gluing-head h1{font-size:24px}.gluing-layout{height:calc(100% - 68px);align-items:stretch;overflow:hidden}.gluing-workspace{height:100%;grid-template-rows:auto minmax(0,1fr);overflow:hidden}.gluing-controls{gap:5px;padding:12px}.gluing-section-title{margin-top:3px;padding-top:6px}.gluing-list-panel{min-height:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr)}.gluing-list{min-height:0;overflow:auto}.gluing-preview{position:static;height:100%;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}.gluing-preview canvas{height:100%;min-height:0;object-fit:contain}}

/* v14: участки, сотрудники и последовательные маршруты */
.admin-grid{display:grid;gap:16px}.production-section-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.production-section-title h2{margin:0;font-size:20px}.compact-dialog{max-width:560px}.route-fieldset{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0;padding:12px;border:1px solid var(--line);border-radius:13px}.route-fieldset legend{padding:0 6px;font-weight:800}.route-fieldset label{display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#faf9fc;font-size:13px;cursor:pointer}.route-fieldset input{width:17px;height:17px;margin:0}.route-card{border-left:4px solid #b9afc9}.route-card.status-ready{border-left-color:#6d3de5}.route-card.status-in_progress{border-left-color:#167548}.route-card.status-problem{border-left-color:#c2372d;background:#fff8f7}.route-state{display:grid;gap:9px;margin-top:10px}.route-state>span{font-size:12px;font-weight:800;color:var(--muted)}.route-actions{display:grid;grid-template-columns:minmax(160px,1fr) auto auto auto;gap:7px}.route-actions input{min-width:0}.item-route{color:var(--muted);line-height:1.45}.topbar nav a[href*="admin.php"]{border-color:#d8cdf8}
@media(max-width:760px){.production-section-title{align-items:flex-start}.admin-grid .service-table{min-width:760px}.route-actions{grid-template-columns:1fr 1fr}.route-actions input{grid-column:1/-1}.route-actions .primary{grid-column:1/-1}.route-fieldset{display:grid;grid-template-columns:1fr 1fr}.route-fieldset label{padding:9px 7px}}

/* v20: очереди участков, схемы и выгрузка внешнему производству */
.production-section-tabs a,.line-tabs a{position:relative}.section-count{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:6px;padding:0 6px;border-radius:999px;background:#eee9f7;color:#5f3ab7;font-size:11px;font-weight:850}.line-tabs a.active .section-count{background:#fff}.section-export{display:flex;align-items:center;gap:10px;margin:-2px 0 12px}.section-export span{color:var(--muted);font-size:12px}.scheme-link{display:inline-flex;margin-top:9px}.step-move-form{display:flex;gap:7px;align-items:center;margin-top:9px}.step-move-form select{height:34px;min-width:210px}

/* v15: compact office and production workspace */
.topbar{min-height:56px;gap:10px;padding-left:14px;padding-right:14px}.brand>span{width:34px;height:34px}.brand small{display:none}.topbar nav{gap:1px}.topbar nav a{padding:7px 8px;font-size:12px}.staff{gap:8px;white-space:nowrap}.admin-settings{display:grid!important;place-items:center;width:32px;height:32px;border:1px solid var(--line);border-radius:9px;text-decoration:none;font-size:18px;color:var(--ink)!important}.action-dropdown{position:relative}.action-dropdown>summary{list-style:none;cursor:pointer;display:inline-flex;min-height:32px;align-items:center;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:12px;font-weight:750}.action-dropdown>summary::-webkit-details-marker{display:none}.action-dropdown[open]>.row-actions{position:absolute;z-index:20;right:0;top:36px;min-width:170px;display:grid;justify-content:stretch;padding:7px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 10px 30px rgba(0,0,0,.15)}.action-dropdown .mini-button{width:100%;justify-content:flex-start}.customer-suggestions button.active{background:var(--purple-soft);outline:2px solid var(--purple)}.production-main-tabs,.line-tabs{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;gap:4px!important}.production-page .line-tabs a{padding:5px 8px;font-size:11px}.production-invoice-head #customerSearch{font-size:17px;font-weight:700}.work-list{display:grid;gap:6px}.production-page .route-card{display:grid;grid-template-columns:minmax(260px,1fr) minmax(220px,auto) minmax(360px,1.5fr);align-items:center;gap:10px;padding:8px 10px}.production-page .route-card .work-card-head{margin:0}.production-page .route-card .work-items>div{padding:4px 7px}.production-page .route-card .route-state{margin:0}.production-page .route-card h2{font-size:13px;margin:2px 0}.production-page .route-actions{grid-template-columns:minmax(120px,1fr) repeat(3,auto)}
@media(max-width:900px){.topbar{grid-template-columns:auto 1fr}.topbar nav{grid-column:1/-1;order:3;flex-wrap:wrap;overflow:visible}.staff{justify-self:end}.production-page .route-card{grid-template-columns:1fr}.production-page .route-actions{grid-template-columns:1fr 1fr}.action-dropdown[open]>.row-actions{position:static;box-shadow:none}}
@media(min-width:821px){.sandblast-page{height:auto!important;overflow:visible!important}.sandblast-constructor{height:auto!important;overflow:visible!important;align-items:start}.sandblast-preview{position:sticky!important;top:68px!important;height:calc(100vh - 82px)!important}.sandblast-controls{height:auto!important;overflow:visible!important;display:grid!important;grid-template-columns:1fr!important;grid-auto-flow:row!important;grid-template-rows:none!important;padding:16px!important}}
.gluing-panel-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.gluing-panel-options .gluing-check{padding:9px 11px}
.integration-panel{max-width:900px}.integration-panel h2{margin-bottom:12px}.integration-code{overflow:auto;padding:15px;border:1px solid var(--line);border-radius:11px;background:#18151f;color:#fff;line-height:1.65;user-select:all}
