:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#142538;background:#f2f4f7;font-synthesis:none;font-size:14px;--blue:#1683f5;--muted:#7b8997;--line:#e8edf2;--navy:#08283c}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}a{color:#147be1;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #9cceff;outline-offset:2px}.shell{max-width:1280px;margin:32px auto;padding:0 26px}.surface{background:#fff;border-radius:18px;box-shadow:0 5px 30px #14253805;overflow:hidden;min-height:82vh}.topbar{display:flex;align-items:center;justify-content:space-between;padding:25px 32px;border-bottom:1px solid var(--line);gap:20px}.brand{font-size:23px;letter-spacing:-1px;font-weight:800;color:#111;display:flex;align-items:center;gap:2px;white-space:nowrap}.brand b{background:var(--blue);color:white;border-radius:5px;letter-spacing:-1px;padding:2px 4px;font-weight:700}.brand small{font-size:12px;font-weight:400;letter-spacing:0;border-left:1px solid #dce2e7;padding:5px 0 5px 14px;margin-left:15px;color:#75808c}.nav{display:flex;gap:25px;align-self:stretch}.nav button{position:relative;border:0;background:none;color:#61717f;padding:8px 0}.nav .active{color:var(--blue)}.nav .active:after{content:'';position:absolute;bottom:-26px;height:3px;background:var(--blue);left:0;right:0;border-radius:3px}.avatar{width:33px;height:33px;display:grid;place-items:center;background:#eef6ff;color:#3187db;border-radius:50%;font-size:12px;font-weight:600}.content{padding:30px 32px 22px;background:#f8f9fb;min-height:72vh}.eyebrow{color:var(--muted);font-size:12px;margin:0 0 9px;letter-spacing:.2px}.heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px}h1{font-size:25px;letter-spacing:-.6px;font-weight:650;margin:0 0 8px}h2{font-size:17px;font-weight:600;margin:0}p{line-height:1.6}.subtitle{margin:0;color:#7b8997;font-size:13px}.button{border:1px solid #dfe6ed;border-radius:8px;background:white;color:#314458;padding:11px 16px;display:inline-flex;align-items:center;gap:8px;justify-content:center;line-height:1.2;font-weight:500}.primary{background:var(--blue);border-color:var(--blue);color:white;box-shadow:0 3px 6px #1683f51a}.ghost{background:transparent;border-color:transparent;color:#6d7e8f}.danger{color:#bf4d57}.button:hover{filter:brightness(.97)}.button.small{padding:8px 11px;font-size:12px}.button svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:22px}.stat{background:white;border:1px solid var(--line);border-radius:12px;padding:18px 20px;display:flex;align-items:center;justify-content:space-between}.stat span{font-size:12px;color:var(--muted);display:block;margin-bottom:6px}.stat strong{font-size:25px;font-weight:600;line-height:1}.stat-icon{font-size:18px;width:40px;height:40px;border-radius:10px;display:grid;place-items:center;background:#f0f6ff;color:var(--blue)}.stat-icon.green{color:#279d79;background:#eef8f3}.stat-icon.amber{color:#c09b45;background:#fcf7ec}.panel{background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:20px;overflow:hidden}.panel-head{padding:20px 22px;display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--line)}.panel-head p{margin:6px 0 0;color:var(--muted);font-size:12px}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:normal}th{background:#fbfcfd;color:#8995a1;font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.5px;padding:13px 16px;border-bottom:1px solid var(--line)}td{padding:17px 16px;border-bottom:1px solid #f0f3f6;font-size:13px;vertical-align:middle}tr:last-child td{border-bottom:0}th:first-child,td:first-child{padding-left:22px}.op-cell{display:flex;align-items:center;gap:12px;min-width:155px}.op-symbol{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:#eff6ff;color:#2783dd;font-size:15px}.op-cell strong{display:block;font-weight:550}.op-cell small{display:block;margin-top:5px;color:#96a0ab;font-size:11px}.badge{display:inline-flex;gap:6px;align-items:center;border-radius:20px;font-size:11px;font-weight:500;padding:6px 10px;background:#f1f4f6;color:#84909d;white-space:nowrap}.badge:before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor}.badge.ready{background:#eaf8f0;color:#28946c}.badge.error{color:#ba5460;background:#fff0f1}.row-actions{display:flex;gap:5px;justify-content:end}.row-actions button{padding:7px;border:1px solid #e5ebf1;border-radius:6px;background:white;color:#6b89a4;min-width:31px}.row-actions svg{height:16px;width:16px;stroke:currentColor;fill:none;stroke-width:1.7}.draft input,.draft select,.form input,.form select,.form textarea,.assign{width:100%;border:1px solid #dfe6ed;border-radius:7px;background:white;color:#3c4d60;min-height:38px;padding:8px 10px}.draft input::placeholder,.form input::placeholder{color:#a2acb5}.draft select{min-width:155px}.draft input[type=date]{min-width:135px}.draft .note{min-width:150px}.draft td{padding-top:12px;padding-bottom:12px}.draft .operation-input{min-width:160px}.draft tfoot td{padding:12px 22px}.add-button{color:#2787df;background:#fff;border:1px dashed #b8d6f3;border-radius:7px;padding:10px 14px;font-size:12px}.footer-actions{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:17px 22px;border-top:1px solid var(--line);background:#fcfdff}.footer-actions span{color:var(--muted);font-size:12px}.footnote{font-size:11px;color:#a1aab3;display:flex;justify-content:space-between;gap:20px;padding:0 3px;margin-top:23px}.demo-banner{padding:10px 18px;background:#eaf3ff;color:#47749f;text-align:center;font-size:12px}.demo-banner a{font-weight:600}.empty{padding:36px;text-align:center;color:#8794a2}.warning{background:#fff7e8;border:1px solid #f3dbb0;color:#9d742e;padding:12px 16px;border-radius:8px;margin-bottom:16px;font-size:13px}.form{display:grid;gap:17px}.form label{display:grid;gap:8px;font-size:12px;color:#617383}.form .check{display:flex;align-items:center;gap:8px}.form .check input{width:16px;min-height:16px}.form small{color:#8d9aa6;font-size:11px}.inline-fields{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:16px}.staff-form{padding:22px}.staff-form .button{margin-top:16px}.staff-code{font-family:ui-monospace,monospace;background:#f1f5f9;border-radius:4px;padding:4px 7px;color:#647a91}dialog{border:0;border-radius:16px;padding:0;box-shadow:0 24px 100px #09223f30;width:min(460px,calc(100% - 30px));max-height:90vh;color:#142538}dialog::backdrop{background:#122b4655;backdrop-filter:blur(3px)}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid var(--line)}.modal-body{padding:24px}.qr-view{text-align:center}.qr-view img{width:240px;max-width:100%}.qr-view h3{margin:5px 0}.qr-view p{color:var(--muted);margin:8px 0}.qr-url{font-size:11px;word-break:break-all;display:block;margin:12px 0 20px;color:#8497a8}.modal-actions{display:flex;gap:10px;justify-content:center;margin-top:18px}.history-row{border-bottom:1px solid var(--line);padding:12px 0}.history-row small{display:block;color:#8a98a4;margin-top:5px}.history-row strong{font-weight:500}#notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:90vw;z-index:100;border-radius:10px;padding:14px 22px;color:#fff;background:#173953;box-shadow:0 8px 24px #0002;display:none}#notice.show{display:block}#notice.error{background:#a94953}.loading{padding:80px;text-align:center;color:#7890a5}.mobile-shell{max-width:470px;margin:0 auto;padding:28px 20px 40px}.mobile-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.mobile-top .brand{font-size:20px}.mobile-card,.login-card{background:white;border:1px solid var(--line);border-radius:16px;padding:27px;margin-bottom:18px}.login-card{max-width:420px;margin:70px auto}.mobile-shell .login-card{margin:0}.mobile-card h1{font-size:30px;margin-top:16px}.mobile-label{font-size:11px;color:#94a0ab;text-transform:uppercase;letter-spacing:.7px}.mobile-product{color:#4d6276;font-size:15px;margin-bottom:25px}.detail{padding:14px 0;border-top:1px solid var(--line);display:grid;gap:6px}.detail span{font-size:11px;color:#93a1ae}.detail strong{font-size:14px;font-weight:500;line-height:1.6;white-space:pre-wrap}.status-buttons{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:1fr;gap:12px;margin-top:24px}.status-buttons button{font-size:17px;padding:17px}.status-buttons .ready-button{background:#1683f5;color:#fff;border-color:#1683f5}.mobile-help{text-align:center;color:#90a0ad;font-size:12px;line-height:1.6}.login-card h1{font-size:23px;margin-top:25px}.login-card .form{margin-top:22px}.login-card .button{width:100%}.print-only{display:none}.print-slip{padding:24px;border:1px solid #bbb;margin:0 0 20px;break-inside:avoid;display:flex;justify-content:space-between;gap:20px}.print-slip img{width:170px;height:170px}.print-slip h2{font-size:25px;margin:8px 0}.print-slip p{margin:5px 0;white-space:pre-wrap;font-size:13px}.print-slip small{color:#555}.muted{color:#92a0ad}.toolbar{display:flex;gap:8px}.connection-note{padding:30px;max-width:560px;margin:auto}.connection-note p{color:#75889b}.hidden{display:none!important}@media(max-width:850px){.shell{padding:0;margin:0}.surface{border-radius:0;min-height:100vh}.topbar{padding:20px}.nav{gap:18px}.nav .active:after{bottom:-21px}.content{padding:22px 16px}.brand small{display:none}.heading{align-items:start}.heading h1{font-size:22px}.stats{gap:8px}.stat{padding:15px 12px}.stat-icon{display:none}.panel-head{padding:18px 16px}.inline-fields{grid-template-columns:1fr}.footnote{line-height:1.7}.footer-actions{flex-wrap:wrap}.heading .button{font-size:12px}.draft table{min-width:800px}}@media print{body{background:#fff}.shell,.mobile-shell,.login-card,#notice,dialog{display:none!important}.print-only{display:block}.print-slip{page-break-inside:avoid}.print-slip a{color:black} @page{size:A4;margin:15mm}}

.brand img{width:128px;height:35px;object-fit:contain;display:block}.time-cell{min-width:130px}.work-timer strong{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:16px;font-weight:600}.work-timer small{display:block;color:#8896a3;font-size:11px;margin-top:4px}.timing-detail{margin-top:14px}.timing-detail .work-timer strong{font-size:30px;color:#183d51}.timing-detail>small{color:#8896a3;font-size:11px;line-height:1.6}.credit{margin-top:24px}.print-slip .brand img{width:128px;height:35px}.print-slip .credit{text-align:left;font-size:11px}

.role-label{font-size:11px;color:#718393;white-space:nowrap}.access-form-wrap,.access-history{padding:22px}.access-form-wrap .form{max-width:560px}.access-id{display:block;color:#8b99a7;margin-top:5px}.access-history{max-height:360px;overflow:auto}[data-worker-department]{border:1px solid #dfe6ed;border-radius:7px;padding:8px;min-width:130px}@media(max-width:650px){.topbar{flex-wrap:wrap;gap:15px}.topbar .nav{order:3;flex-basis:100%;gap:24px}.nav .active:after{bottom:-20px}.role-label{margin-left:auto}}
.role-cards{display:grid;gap:18px;padding:22px}.role-card{border:1px solid var(--line,#e4e7eb);border-radius:12px;padding:18px;display:grid;gap:12px}.role-card h3,.role-card p{margin:0}.role-card p,.role-cards>small{color:#687382;line-height:1.55}.role-card .button{justify-self:start}.recipient-picker{display:grid;gap:12px}.recipient-picker .button{justify-self:start}.recipient-chip{display:flex;justify-content:space-between;gap:12px;padding:10px;background:#f2f4ed;border-radius:8px;margin-bottom:8px}.recipient-chip button{border:0;background:transparent;font-size:22px;cursor:pointer}.profile-link{color:#626841;text-decoration:none}.profile-link:hover{text-decoration:underline}.selected-person{min-height:24px}
.portal-admin-note{display:flex;gap:14px;background:#edf7ff;border:1px solid #d6eafb;border-radius:10px;padding:16px 20px;margin-bottom:20px;color:#35617e}.portal-admin-note>span{font-size:24px}.portal-admin-note strong{font-size:13px}.portal-admin-note p{margin:5px 0 0;font-size:12px;color:#6d8799}.permissions-scroll{overflow:auto}.permissions-matrix{min-width:920px;table-layout:fixed}.permissions-matrix th:first-child{width:185px}.permissions-matrix th{vertical-align:top;background:white;text-transform:none;letter-spacing:0;padding:22px;border-right:1px solid #e9edf1}.permission-role-name{font-size:15px;font-weight:600;color:#293b4b;margin-bottom:15px}.role-people{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:12px}.role-person,.role-plus{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#e3eef7;font-size:11px}.role-person a{font-size:10px}.role-plus{background:white;border:1px solid #c8d8e5;color:#4999d1;font-size:23px}.role-department-tags{display:grid;gap:5px;font-size:11px;color:#68839c;margin-bottom:12px}.permissions-matrix td{border-right:1px solid #e9edf1;padding:20px}.permissions-matrix .permission-group td{background:#f4f7fa;font-weight:600;color:#667b8e;font-size:12px;padding:12px 20px}.permission-sticky{position:sticky;left:0;background:#fff;z-index:1}.permission-value{font-size:12px;white-space:nowrap}.permission-value.allowed{color:#37a387}.permission-value.denied{color:#a8b2bc}.scope-value{color:#5082a6;font-size:12px}.permissions-note{font-size:12px;color:#8593a1;padding:17px 20px;line-height:1.6;border-top:1px solid var(--line)}.quick-access>summary{list-style:none;cursor:pointer;padding:18px 22px;font-weight:600}.quick-access>summary:before{content:'›';margin-right:12px;color:#90a0af}.quick-access[open]>summary:before{content:'⌄'}.role-editor-section{display:grid;gap:14px;padding:18px 0;border-top:1px solid var(--line)}.role-editor-section h3{margin:0;font-size:14px}.role-editor-section small{line-height:1.6;color:#8a98a5}.permission-switch{display:flex!important;align-items:center;justify-content:space-between;gap:18px;padding:10px 0}.permission-switch input{appearance:none;width:36px!important;height:20px;border-radius:12px;background:#d7e0e8;padding:2px;border:0;cursor:pointer;flex:none}.permission-switch input:before{content:'';display:block;background:white;width:16px;height:16px;border-radius:50%;box-shadow:0 1px 3px #0002;transition:transform .15s}.permission-switch input:checked{background:#36b5e9}.permission-switch input:checked:before{transform:translateX(16px)}.permission-switch input:disabled{opacity:.5;cursor:default}.selection-tag{display:inline-flex;align-items:center;gap:7px;max-width:100%;padding:7px 9px;border-radius:5px;background:#e8f4fc;color:#487793;font-size:12px;margin:3px 4px 3px 0;overflow-wrap:anywhere}.selection-tag button{border:0;background:transparent;color:#8ca9b9;font-size:17px;padding:0 2px}.selection-tag .profile-link{color:#487793}.recipient-dialog{width:min(760px,calc(100vw - 24px));max-width:none;max-height:min(760px,92vh);padding:0;border:0;border-radius:14px;box-shadow:0 20px 100px #10365044;overflow:auto}.recipient-dialog::backdrop{background:#122a4255;backdrop-filter:blur(2px)}.picker-head{display:flex;align-items:start;justify-content:space-between;padding:22px 24px 12px}.picker-head h2{font-size:19px}.picker-head p{font-size:12px;color:#8494a1;margin:6px 0}.picker-search{display:flex;align-items:center;gap:10px;margin:0 24px 14px;border:1px solid #dce5eb;border-radius:8px;padding:9px 13px;color:#9aafbe}.picker-search input{border:0;outline:0;width:100%;font-size:14px;background:transparent;min-width:0}.picker-search span{font-size:24px;line-height:1}#picker-selection{padding:0 24px;max-height:115px;overflow:auto}.picker-layout{display:grid;grid-template-columns:150px minmax(0,1fr);border-top:1px solid #edf1f4;margin-top:14px;min-height:300px}.picker-nav{padding:12px 0;background:#f7f9fb;border-right:1px solid #eaf0f4}.picker-nav button{display:block;width:100%;border:0;background:transparent;text-align:left;padding:13px 16px;color:#8495a3;font-size:12px}.picker-nav button.active{background:#e5f3fe;color:#208ccf;border-right:3px solid #36a8ee}#picker-results{padding:12px;max-height:380px;overflow:auto;min-width:0}.picker-person{width:100%;display:flex;align-items:center;gap:12px;border:0;background:white;border-radius:7px;padding:11px;text-align:left;color:#31495d;min-width:0}.picker-person:hover,.picker-person.selected{background:#f0f8fe}.person-avatar{display:flex;align-items:center;justify-content:center;width:36px;height:36px;flex:none;border-radius:50%;background:#e5eff7;color:#6990ad;font-size:12px}.picker-person strong{font-size:13px;font-weight:500}.picker-person small{display:block;font-size:11px;color:#93a2af;margin-top:4px}.selection-tick{margin-left:auto;color:#329cd9;font-size:17px}.picker-person>.button{margin-left:auto}.picker-empty{padding:24px;color:#91a2b0;font-size:13px;line-height:1.7}.picker-explanation{font-size:11px;color:#899ba9;padding:0 8px 10px;margin:0}.department-picker-row{display:flex;align-items:center;padding:5px 0}.department-picker-row label{display:flex;align-items:center;gap:9px;flex:1;padding:7px 5px;font-size:13px;cursor:pointer}.department-picker-row input,.subdepartments-choice input{accent-color:#2da9e9;width:15px;height:15px;flex:none}.department-icon{color:#78a0bc;font-size:19px}.tree-expand{width:24px;height:30px;flex:none;background:none;border:0;color:#91a4b3;font-size:23px}.tree-expand:disabled{cursor:default;opacity:.3}.subdepartments-choice{display:flex;align-items:center;gap:8px;padding:0 10px 8px 40px;font-size:11px;color:#8a9caa}.depth-1{padding-left:12px}.depth-2{padding-left:24px}.depth-3{padding-left:36px}.depth-4{padding-left:48px}.depth-5{padding-left:60px}.depth-6{padding-left:72px}.picker-footer{position:sticky;bottom:0;background:white;border-top:1px solid #eaf0f4;display:flex;align-items:center;gap:10px;padding:17px 24px;z-index:2}.picker-footer span{font-size:12px;color:#92a3b0;margin-left:auto}@media(max-width:560px){.picker-layout{grid-template-columns:1fr}.picker-nav{display:flex;border-right:0;border-bottom:1px solid #eaf0f4;padding:0}.picker-nav button{width:auto;flex:1;text-align:center;padding:12px 7px}.picker-nav button.active{border-right:0;border-bottom:2px solid #36a8ee}.picker-head{padding:17px}.picker-search{margin:0 17px 10px}#picker-selection{padding:0 17px}.picker-footer{padding:14px 17px}.permissions-matrix th:first-child{width:140px}.permissions-matrix{min-width:830px}}
.recipient-actions{display:flex;gap:8px;flex-wrap:wrap}

.permission-switch input{min-height:20px!important}
[hidden]{display:none!important}
.action-name,.grant-cell{border:0;background:transparent;color:inherit;text-align:left;cursor:pointer;font:inherit;padding:8px;width:100%}.action-name:hover,.grant-cell:hover{background:#eaf4fd;border-radius:8px}.grant-cell{display:flex;flex-direction:column;gap:7px}.grant-cell.allowed strong{color:#229b8f}.grant-cell.denied{color:#8b99a6}.grant-cell small{font-size:12px;color:#7c8b98;line-height:1.5}.permissions-matrix th:not(:first-child){min-width:220px}.role-rule{border:1px solid #e0e8f0;border-radius:10px;margin:10px 0;background:white}.role-rule>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px;cursor:pointer;font-weight:600}.role-rule-body{border-top:1px solid #edf1f5;padding:16px}.role-rule h4{margin:20px 0 10px}.scope-options{background:#f6f9fc;border-radius:9px;padding:12px;display:grid;gap:7px;max-height:240px;overflow:auto}.form .check{display:flex;align-items:center;gap:9px;font-weight:400;margin:9px 0}.form .check input{min-height:18px!important;width:18px;height:18px;flex-shrink:0;accent-color:#1683f5}.role-rule textarea{width:100%;resize:vertical;padding:12px;border:1px solid #dce4ec;border-radius:8px;font:inherit}.rule-settings>details{margin-top:18px}.rule-settings>details>summary{cursor:pointer;color:#728493}.role-save{position:sticky;bottom:-22px;background:white;padding:15px 0 8px;border-top:1px solid #edf1f5}.role-save button{width:100%}.role-editor-section>details{margin-top:18px}.role-editor-section>details>summary{cursor:pointer;color:#728493}.recipient-actions{flex-wrap:wrap}
.inline-grant{min-width:220px;gap:8px!important}.inline-grant select{width:100%;min-width:0;font-weight:600;background:#fff}.inline-summary{line-height:1.4;color:#7a8997}.inline-scope>summary{cursor:pointer;color:#1683f5;font-size:12px;padding:6px 0}.inline-scope h4{font-size:12px;margin:12px 0 6px}.inline-scope textarea{width:100%;box-sizing:border-box;border:1px solid #dce4ec;border-radius:6px;padding:8px;font:inherit;resize:vertical}.inline-scope .scope-options{max-height:190px;padding:7px}.inline-scope .check{font-size:12px}.inline-save{border-top:1px solid #e2e9f0;padding-top:8px}.inline-save>small{display:block;margin-bottom:6px;color:#94753a}.inline-save>div{display:flex;gap:6px;flex-wrap:wrap}.inline-error{color:#bd3844;white-space:normal;line-height:1.4}.permissions-matrix{min-width:700px}.permissions-matrix td{vertical-align:top}.delete-order{color:#c3404c!important}.button.danger{background:#d34b57;color:white;border-color:#d34b57}.button.danger:hover{background:#b73a46}
.autosave-state{font-size:11px;line-height:1.5;color:#7c8b98;min-height:17px}.autosave-state[data-state=saved]{color:#259687}.autosave-state[data-state=saving],.autosave-state[data-state=pending]{color:#96702b}.autosave-state[data-state=error]{color:#bb3f4e}.autosave-recovery{display:flex;gap:5px;flex-wrap:wrap}.draft table{min-width:650px}

/* Fit order rows to the CRM card, with native accessible worker selection. */
.orders-table-wrap{width:100%;min-width:0}.orders-table,.draft .draft-table{width:100%;min-width:0;table-layout:fixed}.orders-table th,.orders-table td,.draft-table th,.draft-table td{padding:14px 10px;overflow-wrap:anywhere}.orders-table th:nth-child(1){width:25%}.orders-table th:nth-child(2){width:26%}.orders-table th:nth-child(3){width:15%}.orders-table th:nth-child(4){width:15%}.orders-table th:nth-child(5){width:19%}.orders-table .op-cell,.draft-table .op-cell{min-width:0;align-items:flex-start;gap:8px}.orders-table .op-cell>div:last-child{min-width:0}.orders-table .op-symbol,.draft-table .op-symbol{flex:0 0 27px;width:27px;height:27px}.orders-table .row-actions{flex-wrap:wrap}.orders-table .badge{white-space:normal}.orders-table .time-cell{min-width:0}.worker-select{position:relative;min-width:0;border:1px solid #dfe6ed;border-radius:7px;background:white;color:#3c4d60}.worker-selected{display:block;min-height:38px;padding:9px 28px 9px 10px;white-space:normal;overflow-wrap:anywhere;line-height:1.5}.worker-select:after{content:'⌄';position:absolute;right:9px;top:10px;pointer-events:none;color:#7b8997}.worker-select select,.draft .worker-select select{position:absolute;inset:0;width:100%;height:100%;min-width:0;opacity:0;cursor:pointer}.worker-select:focus-within{outline:3px solid #9cceff;outline-offset:2px}.worker-select:has(select:disabled):after{display:none}.worker-select:has(select:disabled){border-color:transparent;background:transparent}.worker-select select:disabled{cursor:default}.draft-table th:last-child{width:50px}.draft .draft-table input,.draft .draft-table select{min-width:0}.draft-table .worker-select{width:100%}

/* Keep native table rows at every card width. */
.orders-table th,.orders-table td,.draft-table th,.draft-table td{padding:10px 8px;font-size:12px;vertical-align:middle}.orders-table th,.draft-table th{font-size:10px;letter-spacing:.2px;line-height:1.4}.orders-table th:nth-child(1){width:26%}.orders-table th:nth-child(2){width:29%}.orders-table th:nth-child(3){width:15%}.orders-table th:nth-child(4){width:15%}.orders-table th:nth-child(5){width:15%}.orders-table .worker-selected,.draft-table .worker-selected{padding:7px 22px 7px 8px;min-height:32px;line-height:1.4}.orders-table .worker-select:after,.draft-table .worker-select:after{top:7px;right:7px}.orders-table .row-actions{gap:4px;display:grid;grid-template-columns:repeat(2,28px);justify-content:end}.orders-table .row-actions button{min-width:0;width:28px;height:28px;padding:5px;display:grid;place-items:center}.orders-table .row-actions svg{width:15px;height:15px}.orders-table .op-cell small{line-height:1.4;margin-top:4px}.orders-table .badge{padding:5px 7px;line-height:1.4}.orders-table .badge:before{flex:none}.orders-table .work-timer strong{font-size:13px;white-space:normal}.orders-table .work-timer small{font-size:10px}.orders-table .time-cell{overflow-wrap:normal;line-height:1.4}.heading,.panel-head,.footnote{flex-wrap:wrap}
@media(min-width:1100px){.orders-table .row-actions{grid-template-columns:repeat(4,28px)}}
@media(max-width:900px){.orders-table .op-symbol,.draft-table .op-symbol{display:none}.orders-table th,.orders-table td,.draft-table th,.draft-table td{padding:9px 6px}.orders-table .op-cell small{font-size:10px}.orders-table .badge{font-size:10px;padding:4px 5px;gap:4px}}
@media(max-width:480px){.content{padding:16px 8px}.orders-table th,.orders-table td{padding:8px 4px;font-size:11px}.orders-table th{font-size:9px;letter-spacing:0}.orders-table .row-actions{grid-template-columns:26px}.orders-table .row-actions button{width:26px;height:26px}.orders-table .worker-selected{padding:6px 15px 6px 4px}.orders-table .worker-select:after{right:4px}.orders-table .badge:before{display:none}.orders-table .badge{padding:3px}.orders-table .op-cell small{font-size:9px}.draft-table th:last-child{width:30px}}

/* Compact role matrix; access values and autosave remain unchanged. */
.permissions-matrix th:first-child{width:140px}.permissions-matrix th:not(:first-child){min-width:0}.permissions-matrix th{padding:12px 10px}.permissions-matrix td{padding:9px 10px;font-size:12px;overflow-wrap:anywhere}.permission-role-name{font-size:13px;margin-bottom:8px;line-height:1.4}.role-people{gap:4px;margin-bottom:7px}.role-person,.role-plus{width:26px;height:26px}.role-plus{font-size:20px}.role-department-tags{margin-bottom:7px;font-size:10px}.permissions-matrix .button.small{padding:6px 8px;font-size:11px}.collapse-actions{margin-top:10px;white-space:normal}.inline-grant{min-width:0;gap:4px!important}.inline-grant select{min-height:30px;padding:5px 7px;font-size:11px}.inline-grant .inline-summary{font-size:10px;line-height:1.35}.inline-scope>summary{padding:3px 0;font-size:11px}.inline-scope h4{margin:8px 0 4px}.inline-scope .scope-options{padding:5px}.inline-scope .check{font-size:11px;margin:5px 0}.inline-grant .autosave-state{font-size:10px;min-height:0;line-height:1.35}.inline-grant .autosave-state:not([data-state]){display:none}.action-name{padding:4px 0;font-size:12px;line-height:1.4}.permissions-note{font-size:11px;padding:11px 14px;line-height:1.45}.portal-admin-note{padding:11px 14px;gap:10px;margin-bottom:14px}.portal-admin-note p{margin:4px 0 0;font-size:11px}
.footnote{display:flex;justify-content:center;text-align:center;margin-top:22px}.credit{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;line-height:1.5}.footnote .credit{margin:0;font-size:11px;color:#8c9aa6}.credit-brand{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.credit img,.print-slip .credit img{display:inline-block;width:18px;height:18px;object-fit:contain;flex:none;border-radius:2px}.print-slip .credit{justify-content:flex-start;font-size:11px}

.permissions-matrix{min-width:440px}.permissions-matrix th:first-child{width:120px}.permissions-matrix:not([data-role-count="1"]):not([data-role-count="2"]){table-layout:auto}.permissions-matrix:not([data-role-count="1"]):not([data-role-count="2"]) th:not(:first-child){min-width:175px}

.permissions-matrix #role-action-rows[hidden]{display:none}

.staff-form .inline-fields{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}@media(max-width:650px){.staff-form .inline-fields{grid-template-columns:minmax(0,1fr)}}

.mini-profile{position:relative;flex:none;max-width:210px}.profile-trigger{border:0;background:none;display:flex;align-items:center;gap:8px;color:#506779;padding:0;text-align:left}.profile-avatar{width:32px;height:32px;border-radius:50%;background:#e6f2ed;color:#357958;display:grid;place-items:center;font-size:12px;flex:none;font-weight:600}.profile-name{font-size:12px;line-height:1.4;overflow-wrap:anywhere}.profile-popover{display:none;position:absolute;right:0;top:100%;width:260px;max-width:calc(100vw - 40px);z-index:20;background:#fff;border:1px solid #e1e8ed;border-radius:12px;padding:17px;box-shadow:0 12px 32px #14253820;color:#31495c;font-size:12px}.profile-open .profile-popover{display:block}.profile-popover>strong{display:block;font-size:14px}.profile-popover>small{display:block;color:#8596a4;margin-top:5px}.profile-popover h3{font-size:12px;margin:18px 0 10px}.profile-popover dl{margin:0}.profile-popover dl>div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid #eff2f5}.profile-popover dd{margin:0;font-weight:650;font-size:16px;font-variant-numeric:tabular-nums}.profile-period{font-size:10px;color:#8b9aa6;line-height:1.5;margin:10px 0}.profile-error{margin:0}.staff-name-button{border:0;background:none;color:#274d69;text-align:left;padding:5px 0;white-space:normal;overflow-wrap:anywhere;font:inherit}.staff-name-button span{color:#8ca7ba;margin-left:5px}.worker-name-form{display:grid;gap:7px;min-width:160px}.worker-name-form input{width:100%;min-width:0;padding:8px;border:1px solid #cfdde8;border-radius:6px;font:inherit}.worker-name-form>div{display:flex;gap:5px;flex-wrap:wrap}@media(max-width:650px){.mini-profile{margin-left:auto;max-width:200px}.profile-popover{right:0}}

.profile-avatar{position:relative;overflow:hidden}.profile-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%;background:#e6f2ed}

.form .pin-warning{color:#b34336;line-height:1.45;font-size:11px}.pin-warning:empty{display:none}.form input[aria-invalid="true"]{border-color:#d55d50;background:#fff9f8}

.role-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;overflow:hidden;background:#e3eef7;color:#54778f;flex:none}.role-user-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%;background:#e3eef7}.role-avatar-link{display:flex;width:100%;height:100%;border-radius:50%}.role-chip-avatar{display:inline-flex;width:22px;height:22px;flex:none;font-size:9px}

.order-crm-link{color:#147be1;text-decoration:underline;text-decoration-color:#147be155;text-underline-offset:3px;text-decoration-thickness:1px;cursor:pointer}.order-crm-link:hover{text-decoration-color:currentColor;color:#075dad}.order-crm-link:focus-visible{outline:3px solid #9cceff;outline-offset:3px;border-radius:2px}
@media screen{[data-theme="dark"] .order-crm-link{color:#8fc8ff;text-decoration-color:#8fc8ff66}[data-theme="dark"] .order-crm-link:hover{color:#c4e3ff;text-decoration-color:currentColor}}

/* Semantic furniture workshop icons. */
.orders-table .op-symbol,.draft-table .op-symbol{display:grid;place-items:center;flex:0 0 27px;width:27px;height:27px}.op-symbol .workshop-icon{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.65;flex:none}
@media(max-width:600px){.orders-table .op-cell,.draft-table .op-cell{gap:5px}.orders-table .op-symbol,.draft-table .op-symbol{flex-basis:20px;width:20px;height:24px}.op-symbol .workshop-icon{width:18px;height:18px}}

.deal-crm-link{color:inherit;text-decoration:underline;text-decoration-color:#147be155;text-underline-offset:4px;overflow-wrap:anywhere}.deal-crm-link:hover{color:#147be1;text-decoration-color:currentColor}.deal-notice{font-size:.82em;font-weight:500;color:#7b8997}.heading>div{min-width:0}
@media screen{[data-theme="dark"] .deal-crm-link:hover{color:#a9d3ff}[data-theme="dark"] .deal-notice{color:#a8b7c7}}

.memo-upload{position:relative;overflow:hidden;cursor:pointer}
.memo-upload input[type="file"]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.memo-upload:focus-within{outline:2px solid #1683f5;outline-offset:2px}
.scan-order-button{margin-top:12px}
.scan-order-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.order-scanner{display:grid;gap:14px}
.order-scanner p{margin:0;line-height:1.5}
.order-scanner video{display:block;width:100%;max-height:55vh;object-fit:contain;background:#10161f;border-radius:10px}
.order-scanner video[hidden]{display:none}
.status-buttons [data-action="scan-next"]{padding:4px 8px}
.memo-details { margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.memo-details summary { display: flex; align-items: center; gap: 8px; padding: 14px; cursor: pointer; font-weight: 650; list-style: none; }
.memo-details summary::-webkit-details-marker { display: none; }
.memo-details summary span, .memo-item-title span { padding: 3px 8px; border-radius: 6px; color: #18588c; background: #e9f3ff; font-size: 12px; white-space: nowrap; }
.memo-details summary::after { content: ''; width: 7px; height: 7px; margin: -4px 3px 0 auto; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.memo-details[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.memo-details summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
.memo-body { padding: 12px; border-top: 1px solid var(--line); }
.memo-body input { width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: inherit; background: transparent; font: inherit; font-size: 16px; }
.memo-body output { display: block; margin: 8px 0; font-size: 12px; color: var(--muted); }
.memo-body ul { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.memo-item { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.memo-item-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; }
.memo-item dl { display: grid; gap: 5px; margin: 8px 0 0; font-size: 13px; line-height: 1.45; }
.memo-item dl div { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 6px; }
.memo-item dt { color: var(--muted); }
.memo-item dd { margin: 0; }
.memo-body .button { width: 100%; margin-top: 10px; }
.memo-body .button[hidden] { display: none; }
[data-theme="dark"] .memo-details summary span, [data-theme="dark"] .memo-item-title span { background: #233e58; color: #b8dcff; }

.badge.partial{background:#fff3d6;color:#8a5a00}
.partial-button{background:#fff3d6;color:#8a5a00;border-color:#f0c36a}
.partial-time{display:block;color:#8a5a00}

.staff-off>summary{cursor:pointer;padding:14px 18px;font-weight:600;display:flex;align-items:center;gap:10px;list-style:none}
.staff-off>summary::-webkit-details-marker{display:none}
.staff-off>summary::before{content:"▸";transition:transform .15s}
.staff-off[open]>summary::before{transform:rotate(90deg)}
.staff-off .table-scroll{border-top:1px solid rgba(128,128,128,.25)}

.pin-cell{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pin-value{font-family:ui-monospace,Consolas,monospace;letter-spacing:.08em;min-width:72px;user-select:text}
.pin-value.shown{font-weight:700;letter-spacing:.14em}
.pin-value.missing{letter-spacing:0;color:#8a5a00;font-family:inherit}
.pin-export .inline-fields{align-items:end}

.pin-export-body{padding:22px;display:grid;gap:12px}
.pin-export-row{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap}
.pin-export-row label{flex:0 1 320px;min-width:200px}
.pin-export-row .button{min-height:38px}
.pin-export-body small{color:#617383}

.staff-search{margin-bottom:14px}
.staff-search label{max-width:360px}
.staff-search input{width:100%;min-height:38px;border:1px solid #dfe6ed;border-radius:7px;padding:8px 10px}
.staff-hidden{display:none!important}

/* Вкладка «Сотрудники»: карточки */
.staff-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.staff-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin-bottom:14px}
.staff-chips{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.staff-chip{height:34px;padding:0 14px;border:1px solid #dfe6ed;border-radius:8px;background:#fff;color:#3c4d60;font:inherit;font-size:13px;cursor:pointer}
.staff-chip.on{background:#e8f3fe;border-color:#9cceff;color:#1565b8;font-weight:600}
.staff-chips select{width:auto;min-width:150px;height:34px;min-height:34px;padding:0 10px;border:1px solid #dfe6ed;border-radius:8px;background-color:#fff;color:#3c4d60;font:inherit;font-size:13px;cursor:pointer}
#staff-search{flex:0 1 320px;min-width:200px;min-height:36px;border:1px solid #dfe6ed;border-radius:8px;background:#fff;color:inherit;padding:6px 12px;font:inherit;font-size:13px}
.staff-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:12px;align-items:stretch}
.staff-card{display:flex;flex-direction:column;gap:10px;min-width:0;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.staff-card.selected{border-color:#1683f5;box-shadow:0 0 0 1px #1683f5}
.staff-card.off{background:#f1f3f5}
.staff-card.off .staff-card-name{color:#6b7886}
.staff-card-top{display:flex;align-items:center;gap:10px}
.staff-card-top input[type=checkbox]{flex:none;width:17px;height:17px;margin:0;cursor:pointer}
.staff-avatar{flex:none;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#e6f1fb;color:#185fa5;font-size:11px;font-weight:600}
.staff-card-name{flex:1;min-width:0;font-weight:600;font-size:13.5px;line-height:1.3;overflow-wrap:anywhere}
.staff-card-name .worker-name-form input{width:100%;margin-bottom:6px}
.staff-card-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;color:#75828f;font-size:12px}
.staff-card .pin-cell{margin-top:auto;gap:6px;background:#f3f6f9;border-radius:8px;padding:4px 6px 4px 12px;min-height:38px}
.staff-card .pin-value{flex:1;min-width:0;overflow-wrap:anywhere}
.staff-card .pin-value.missing{font-size:12px}
.staff-add-card{min-height:132px;border:1.5px dashed #9cceff;border-radius:12px;background:transparent;color:#1683f5;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.staff-menu{position:relative}
.staff-menu>summary{list-style:none;cursor:pointer;user-select:none}
.staff-menu>summary::-webkit-details-marker{display:none}
.staff-card .staff-menu{flex:none;align-self:flex-start}
.staff-card .staff-menu>summary{min-height:0;padding:0 6px;border-color:transparent;background:transparent;font-size:18px;line-height:22px}
.staff-menu-list{position:absolute;right:0;top:calc(100% + 4px);z-index:20;display:flex;flex-direction:column;min-width:190px;max-width:280px;padding:6px 0;background:#fff;border:1px solid #dfe6ed;border-radius:10px;box-shadow:0 8px 24px #0002}
.staff-menu-list button{border:0;background:transparent;color:#17212e;text-align:left;padding:8px 14px;font:inherit;font-size:13px;cursor:pointer}
.staff-menu-list button:hover,.staff-menu-list button:focus-visible{background:#eef5fd}
.staff-menu-list button.staff-danger{color:#b53b3b;border-top:1px solid #e6ebf0;margin-top:4px}
.staff-bar{position:sticky;bottom:12px;z-index:15;display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:16px;padding:12px 18px;border-radius:12px;background:#17324d;color:#fff}
.staff-bar[hidden]{display:none}
.staff-bar-text{flex:1;min-width:180px;display:flex;flex-wrap:wrap;gap:10px;align-items:baseline}
.staff-bar-text span{color:#b9cbdc;font-size:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.staff-bar .button:not(.primary){background:transparent;color:#fff;border-color:#4d6c8a}
.staff-bar .button[hidden]{display:none}
.staff-form-error{color:#b53b3b;margin:0}
@media(max-width:520px){#staff-search{flex:1 1 100%}.staff-grid{grid-template-columns:minmax(0,1fr)}.staff-actions .staff-menu-list{left:0;right:auto;width:max-content;max-width:calc(100vw - 40px)}}

/* Кнопки на вкладке «Сотрудники»: тонкая обводка и лёгкая тень */
.staff-card .pin-cell .button,.staff-card .staff-menu>summary,.staff-chip,.staff-chips select,.staff-actions .button:not(.primary),#staff-search{border:1px solid #cdd8e3;box-shadow:0 1px 3px rgba(23,50,77,.14)}
.staff-card .staff-menu>summary{background:#fff;border-radius:7px}
.staff-card .pin-cell .button:hover,.staff-card .staff-menu>summary:hover,.staff-chip:hover,.staff-chips select:hover,.staff-actions .button:not(.primary):hover{border-color:#a9bccd;box-shadow:0 2px 6px rgba(23,50,77,.18)}
.staff-chip.on{border-color:#7fbdf8}
.staff-card .pin-cell .button:active,.staff-card .staff-menu>summary:active,.staff-chip:active{box-shadow:inset 0 1px 2px rgba(23,50,77,.18)}

/* Вкладка «Роли»: компактная таблица */
.roles-actions input[type=search]{width:210px;height:36px;border:1px solid #cdd8e3;box-shadow:0 1px 3px rgba(23,50,77,.14);border-radius:8px;background:#fff;color:inherit;padding:0 12px;font:inherit;font-size:13px}
.roles-actions .button:not(.primary){border:1px solid #cdd8e3;box-shadow:0 1px 3px rgba(23,50,77,.14)}
.permissions-panel .permissions-scroll{overflow:auto;max-height:80vh}
.permissions-panel .permissions-matrix{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;min-width:660px}
.permissions-panel .permissions-matrix:not([data-role-count="1"]):not([data-role-count="2"]){table-layout:auto}
.permissions-panel .permissions-matrix thead th{position:sticky;top:0;z-index:3;vertical-align:top;background:#fff;padding:12px 14px;text-align:left;text-transform:none;letter-spacing:0;border-right:1px solid #edf1f5;border-bottom:1px solid #e1e8ef}
.permissions-panel .permissions-matrix thead th:first-child{width:270px;left:0;z-index:4;vertical-align:middle;color:#75828f;font-weight:400}
.permissions-panel .permissions-matrix:not([data-role-count="1"]):not([data-role-count="2"]) thead th:not(:first-child){min-width:230px}
.role-head-top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:8px}
.permissions-panel .role-head-top .permission-role-name{margin:0;font-size:14px;color:#17212e;overflow-wrap:anywhere}
.permissions-panel .role-head-top .button{flex:none;font-weight:400;border:1px solid #cdd8e3;box-shadow:0 1px 3px rgba(23,50,77,.14)}
.permissions-panel .role-people{margin-bottom:0}
.permissions-panel .role-department-tags{margin:6px 0 0;font-weight:400}
.permissions-panel .permissions-matrix td{padding:5px 14px;height:42px;vertical-align:middle;border-right:1px solid #edf1f5;border-bottom:1px solid #edf1f5}
.permissions-panel .permissions-matrix tbody th.permission-sticky{position:sticky;left:0;z-index:1;background:#fff;text-align:left;font-weight:400;text-transform:none;letter-spacing:0;color:#17212e;padding:4px 14px;border-right:1px solid #edf1f5;border-bottom:1px solid #edf1f5}
.permissions-panel .permissions-matrix .permission-group th{background:#f3f6f9;text-align:left;text-transform:none;letter-spacing:0;padding:0;border-bottom:1px solid #e1e8ef}
.permission-group button{position:sticky;left:0;border:0;background:transparent;color:#3c4d60;font:inherit;font-size:12px;font-weight:600;padding:8px 14px;cursor:pointer}
.permission-group small{font-weight:400;color:#75828f;margin-left:4px}
.permissions-panel .permissions-matrix tr[hidden],.permissions-panel .permissions-matrix tbody[hidden]{display:none}
.permissions-panel .action-name{font-size:13px;line-height:1.35}
.action-pencil{opacity:0;color:#8b9aaa}
.permissions-panel tr:hover .action-pencil,.action-name:focus-visible .action-pencil{opacity:1}
@media(hover:none){.action-pencil{opacity:1}}
.role-cell{display:flex;flex-direction:row;align-items:center;gap:10px;flex-wrap:wrap;margin:0}
.rswitch{position:relative;display:inline-block;flex:none;width:36px;height:21px;cursor:pointer;margin:0}
.rswitch input{position:absolute;opacity:0;inset:0;width:100%;height:100%;min-height:0;margin:0;cursor:pointer;z-index:1}
.rswitch i{position:absolute;inset:0;border-radius:11px;background:#c3ccd6;transition:background .15s}
.rswitch i::after{content:"";position:absolute;top:2px;left:2px;width:17px;height:17px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0004;transition:transform .15s}
.rswitch input:checked+i{background:#1683f5}
.rswitch input:checked+i::after{transform:translateX(15px)}
.rswitch input:focus-visible+i{outline:3px solid #9cceff;outline-offset:2px}
.role-scope{min-width:0;max-width:calc(100% - 46px)}
.scope-chip{display:inline-flex;align-items:center;gap:5px;max-width:100%;min-height:26px;padding:2px 10px;border:1px solid #cdd8e3;box-shadow:0 1px 2px rgba(23,50,77,.12);border-radius:7px;background:#fff;color:#4b5c6e;font:inherit;font-size:11.5px;cursor:pointer}
.scope-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scope-chip:hover{border-color:#7fbdf8;color:#1565b8}
.scope-chip:disabled{opacity:.6;cursor:default}
.scope-none{font-size:12px;color:#8a96a3}
.role-cell .autosave-state{font-size:11px;color:#1b7a4f}
.role-cell .autosave-state:empty{display:none}
p.permissions-note{border:0;padding:0 4px;margin:-8px 0 16px}
.roles-autosave{color:#1b7a4f}
#scope-form h4{margin:12px 0 4px;font-size:13px}
#scope-form textarea{width:100%}
@media(max-width:700px){.roles-actions input[type=search]{width:100%}.permissions-panel .permissions-matrix{min-width:560px}.permissions-panel .permissions-matrix thead th:first-child{width:150px}}
.role-head-top{flex-wrap:wrap}
.permissions-panel .role-head-top .permission-role-name{flex:1 1 130px;overflow-wrap:normal;word-break:normal;hyphens:auto}

/* Вкладка «Наряды»: карточки */
.orders-title{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
.orders-title h1{margin:0}
.orders-heading .orders-title h1{font-size:28px}
[data-order-ready]{font-size:17px;color:#75828f}
.orders-heading .subtitle{font-size:14px}
.orders-heading .staff-actions .button{min-height:40px;font-size:15px}
.orders-heading .staff-actions .button:not(.primary){border:1px solid #cdd8e3;box-shadow:0 1px 3px rgba(23,50,77,.14)}
.orders-heading svg,.issued-bar svg{width:17px;height:17px}
.order-filters{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;margin-bottom:14px}
.order-filters p{justify-self:end;margin:0;font-size:14px;color:#75828f;text-align:right}
.order-filters>.order-chip{justify-self:start}
.order-filters-mid{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.order-chip{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:0 14px;border:1px solid #cdd8e3;border-radius:8px;box-shadow:0 1px 3px rgba(23,50,77,.14);background:#fff;color:#17212e;font:inherit;font-size:15.5px;cursor:pointer;white-space:nowrap}
.order-chip[hidden]{display:none}
.order-chip.on{background:#e8f3fe;border-color:#7fbdf8;color:#1565b8;font-weight:600}
.chip-icon{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.chip-icon .half{fill:currentColor;stroke:none}
.chip-not_ready .chip-icon{color:#7b8896}.chip-partial .chip-icon{color:#d18b00}.chip-ready .chip-icon{color:#1b8a57}.chip-error .chip-icon{color:#b53b3b}
.issued-bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px 10px 18px;margin-bottom:12px}
.issued-bar h2{margin:0;font-size:18px}
.issued-bar .button,.orders-upload .button,.orders-empty .button{min-height:40px;font-size:15px}
.issued-bar .button:not(.primary),.orders-upload .button,.orders-empty .button:not(.primary){border:1px solid #cdd8e3;box-shadow:0 1px 3px rgba(23,50,77,.14);background:#fff;display:inline-flex;align-items:center;gap:7px}
.issued-bar .delete-all-button{color:#b53b3b;border-color:#e9b9b9}
.orders-upload{margin-bottom:14px}
.orders-empty{padding:28px 20px;text-align:center}
.orders-empty .issued-actions{justify-content:center}
.order-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:20px}
.order-card{display:flex;flex-direction:column;gap:12px;min-width:0;background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px 20px}
.oc-top{display:flex;align-items:flex-start;gap:12px}
.oc-icon{flex:none;width:26px;height:26px;color:#1683f5}
.oc-icon svg{width:26px;height:26px}
.oc-title{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;overflow-wrap:anywhere}
.oc-title strong{font-size:19px;line-height:1.3}
.oc-title small{font-size:15px;color:#8a96a3}
.oc-top .staff-menu{flex:none}
.oc-top .staff-menu>summary{min-height:0;padding:0 8px;border:1px solid transparent;background:transparent;font-size:21px;line-height:24px}
.oc-top .staff-menu>summary:hover{border-color:#cdd8e3}
.oc-line{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.oc-line .badge{font-size:15px;padding:4px 13px}
.oc-time{font-size:17px;font-weight:700;color:#000}
.oc-note{min-height:21px;margin-top:6px;font-size:15px;color:#75828f;overflow-wrap:anywhere}
.oc-assign{display:flex;gap:8px;margin-top:auto}
.oc-assign select.assign{flex:1;min-width:0;height:44px;min-height:44px;border:1px solid transparent;border-radius:8px;background-color:#f1f4f7;color:#17212e;font-size:16.5px;padding:0 12px}
.oc-assign select.assign:not(:disabled):hover{border-color:#cdd8e3}
.oc-assign select.assign.unassigned{color:#1565b8}
.oc-qr{flex:none;width:44px;height:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid #cdd8e3;box-shadow:0 1px 3px rgba(23,50,77,.14)}
.oc-qr svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.4}
.master-panel{display:flex;flex-direction:column;gap:8px;padding:14px 18px}
.master-panel h3{margin:0;font-size:15.5px}
.master-panel p{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:12px;font-size:14px;color:#75828f}
.master-panel .button{min-height:40px;font-size:15px}
@media(max-width:900px){.order-filters{grid-template-columns:minmax(0,1fr)}.order-filters>.order-chip{justify-self:center}.order-filters-mid{justify-content:center}.order-filters p{justify-self:center;text-align:center}}
@media(max-width:760px){.order-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:520px){.order-card{padding:14px}.issued-bar .issued-actions{width:100%}.issued-bar .issued-actions>*{flex:1 1 100%;justify-content:center}.order-chip{white-space:normal}}
.issued-bar h2{font-weight:700}
.issued-bar .button.delete-all-button:not(.primary){color:#b53b3b;border-color:#e9b9b9}

/* Заголовок «Нарядов» по центру кнопок; общий счётчик времени */
.heading.orders-heading{align-items:center}
.orders-heading .orders-title{min-height:40px;align-content:center;align-items:baseline}
.order-total{justify-self:end;display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px 8px;min-height:40px;padding:0 14px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:14px;color:#5d6975}
.order-total strong{font-size:17px;font-weight:700;color:#000;white-space:nowrap}
@media(max-width:900px){.order-total{justify-self:center;justify-content:center}}

/* Меню разделов: капсула, как переключатель темы */
.topbar .nav{align-self:center;align-items:center;flex:none;gap:2px;padding:3px;border:1px solid #d7e0e9;border-radius:24px;background:#edf1f5}
.topbar .nav button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:4px 14px;border:1px solid transparent;border-radius:20px;background:transparent;color:#42556b;font:inherit;font-size:13px;white-space:nowrap;cursor:pointer;touch-action:manipulation}
.topbar .nav svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.topbar .nav button:hover{background:#dce7f1}
.topbar .nav button.active{border-color:#145aad;background:#1666bd;color:#fff;font-weight:600}
.topbar .nav button.active::after{content:none}
.topbar .nav button:focus-visible{outline:2px solid #147ad9;outline-offset:1px}
@media(max-width:650px){.topbar .nav{order:3;flex-basis:100%;gap:2px}.topbar .nav button{flex:1 1 0;min-width:0;padding:4px 6px;gap:5px}}
@media(max-width:340px){.topbar .nav svg{display:none}}
