/* Approved CRM interface, promoted from the isolated design preview. */
:root,:root[data-theme="light"]{
  --page-bg:#f3f6fa;--bg:#f3f6fa;--card-bg:#fff;--input-bg:#f8fafd;
  --text:#203049;--muted:#6c7c92;--line:#e0e7f0;--blue:#416fda;
  --btn-soft-bg:#fff;--btn-soft-border:#dce4ef;--btn-soft-color:#415371;--btn-soft-hover:#f0f4fa;
  --row-alt:#f8fafd;--danger-bg:#fff0f2;--shadow:0 4px 20px #16294305;
  --input-placeholder:#8a98ab;--page-gradients:none;--red:#d95769;
}
:root[data-theme="dark"]{
  --page-bg:#101a29;--bg:#101a29;--card-bg:#1a273a;--input-bg:#142135;
  --text:#e7eef9;--muted:#9aabc2;--line:#2d3d54;--blue:#83a8ff;
  --btn-soft-bg:#1c2a40;--btn-soft-border:#34455f;--btn-soft-color:#cfdbef;--btn-soft-hover:#22334d;
  --row-alt:#1d2b40;--danger-bg:#392833;--shadow:0 4px 24px #020c1910;
  --input-placeholder:#8494ad;--page-gradients:none;--red:#f17c8c;
}
html{scrollbar-gutter:stable;scroll-behavior:smooth}body{font:14px/1.5 "Segoe UI",Arial,sans-serif;background:var(--page-bg);color:var(--text);letter-spacing:0}
button,input,select,textarea{font-family:inherit}.icon{width:18px;height:18px;flex:none;stroke-width:1.7}
.sidebar{width:232px;background:#142238;border-right:1px solid #28374d;padding:26px 16px;box-shadow:none;backdrop-filter:none}
.sidebar .brand{padding:0 10px 22px;margin:0 0 18px;border-bottom:1px solid #2c3b51;column-gap:12px;row-gap:6px}
.sidebar .brand>.company-logo{width:34px;height:32px}.sidebar .brand strong{font-size:17px;font-weight:650;letter-spacing:-.3px}
.sidebar .brand span#dailySplash{font-size:10.5px;line-height:1.5;color:#a8b8cf;opacity:1;min-height:32px;max-height:32px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.nav{gap:7px}.nav-btn{border-radius:10px;padding:12px 14px;min-height:46px;font-size:13px;font-weight:550;gap:12px;color:#b5c4da}
.nav-btn .icon{width:18px;height:18px;opacity:1}.nav-btn.active{background:#294b87;border-color:#4264a0;box-shadow:inset 3px 0 #91b4ff;color:#fff}.nav-btn.active:hover{background:#315794}.nav-btn:hover{background:#ffffff08}
.sidebar-note{left:18px;right:18px;bottom:22px;padding:16px 10px 0;border-color:#2c3b51;font-size:13px;font-weight:600;color:#edf3ff}
.demo-footer{display:block;font-size:10px;font-weight:400;color:#9aabc3;margin-top:7px}
.main.work-main{margin-left:232px;width:calc(100% - 232px);max-width:1760px;padding:32px 32px 56px}
.work-header{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 28px;min-height:70px}.work-header>div:first-child{min-width:0;flex:1}
.work-header h1{font-size:28px;line-height:1.2;letter-spacing:-.65px;font-weight:650;margin:7px 0 0;overflow-wrap:normal}
.demo-eyebrow{display:flex;align-items:center;gap:8px;margin:0;font-size:10px;letter-spacing:.6px;color:var(--muted)}.demo-badge{display:inline-flex;align-items:center;padding:2px 7px;border-radius:5px;background:#4c7de51a;border:1px solid #668ee342;color:var(--blue);font-size:9px;font-weight:700;letter-spacing:.8px}
.page-subtitle{font-size:12px;line-height:1.5;color:var(--muted);margin:8px 0 0;max-width:650px}.work-header>.toolbar{align-items:center;gap:8px;flex:none}
.toolbar{gap:10px;align-items:center}.panel{padding:22px;border-radius:14px;border:1px solid var(--line);background:var(--card-bg);box-shadow:var(--shadow);margin-bottom:20px;backdrop-filter:none}
.panel-head{align-items:center;gap:16px;margin-bottom:18px;flex-wrap:wrap}.panel h2{font-size:16px;font-weight:650;letter-spacing:-.15px}.panel h3{font-size:14px;font-weight:600}
.grid-2,.grid-3{gap:20px}.help{font-size:12px;line-height:1.65;color:var(--muted);margin:8px 0 12px}.small,.muted{color:var(--muted)}
.btn-primary,.btn-outline,.btn-soft,.btn-small,.btn-danger{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:10px 15px;border-radius:9px;font-size:12px;line-height:18px;font-weight:600;white-space:nowrap;box-shadow:none;vertical-align:middle;text-decoration:none}
.btn-primary{background:#416fda;border:1px solid #5985e9;color:#fff}.btn-primary:hover{background:#4b7ae5}.btn-soft,.btn-small,.btn-outline{background:var(--btn-soft-bg);border:1px solid var(--btn-soft-border);color:var(--btn-soft-color)}
.btn-soft:hover,.btn-small:hover,.btn-outline:hover{background:var(--btn-soft-hover);border-color:#6f8fbd}.btn-danger{background:#b84258;color:#fff;border:1px solid #ce5c71}.btn-danger:hover{background:#cb4b63}.danger-text{color:var(--red)!important}
button:disabled,.btn-primary:disabled,.btn-small:disabled{cursor:default;opacity:.45}.work-header #themeBtn,.work-header #logoutBtn{width:40px;min-width:40px;padding:9px}.work-header #logoutBtn span{display:none}
.work-header .demo-mode-switch{padding:9px 11px}.demo-mode-switch .icon{width:16px}.demo-mode-switch span{font-size:11px}
.input,input.input,select.input,textarea.input{min-height:44px;padding:11px 12px!important;border:1px solid var(--line);border-radius:9px;background-color:var(--input-bg);color:var(--text);font-size:13px;line-height:20px;box-shadow:none}
.input:focus{border-color:#7399ed;box-shadow:0 0 0 3px #5685f21c;outline:none}.input:disabled{opacity:.7;cursor:default}.input::placeholder{color:var(--input-placeholder);opacity:1}
select.input:not([multiple]):not([size]),select.input:not([multiple])[size="1"]{padding-right:38px!important;background-position:right 12px center}textarea.input{resize:vertical;min-height:96px}
.field{margin:0 0 18px;min-width:0}.field>label,.field>label.small{font-size:12px;line-height:1.5;font-weight:550;color:var(--text)}.field-row{gap:16px}.field>label>.input,.field>label>.date-wrap{margin-top:7px}.field>label[for]{margin-bottom:7px;display:block}
.checkline{font-size:12px!important;line-height:1.5}.calendar-btn{height:44px;width:42px;min-width:42px;border-radius:9px;border-color:var(--line);background:var(--btn-soft-bg);color:var(--muted)}
.quick-dates{gap:10px;margin:7px 0 0}.quick-dates button{font-size:10px}.form-message{font-size:12px;line-height:1.6;border-radius:9px;padding:12px 14px;margin:12px 0}
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:24px}#homeKpis,#statsKpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.kpis>.kpi,#homeKpis>.kpi,#statsKpis>.kpi{grid-column:auto!important;min-width:0}.kpi{padding:20px;border-radius:13px;background:var(--card-bg);border:1px solid var(--line);box-shadow:none;min-height:132px}
.kpi span{font-size:11px;line-height:1.45;color:var(--muted);margin-bottom:15px;display:block}.kpi strong,#homeKpis strong,#statsKpis strong{font-size:25px;font-weight:650;letter-spacing:-.5px;line-height:1.2;font-variant-numeric:tabular-nums;color:var(--text)}.kpi small{font-size:10px;line-height:1.5;margin-top:10px;color:var(--muted)}
.kpi.accent{background:#2b4b81;border-color:#48679a}.kpi.accent span,.kpi.accent small{color:#c7d8f7}.kpi.accent strong{color:#fff}
.dense-table{font-size:12px;line-height:1.5;border-collapse:separate;border-spacing:0;min-width:0}.dense-table th{font-size:10.5px;line-height:1.4;color:var(--muted);font-weight:600;padding:13px 12px;background:var(--card-bg);border-color:var(--line)}
.dense-table td{padding:15px 12px;border-color:var(--line);vertical-align:middle}.dense-table tbody tr:hover td:not(.issue-cell){background:var(--btn-soft-hover)}.dense-table tbody td:first-child,.dense-table td .request-id{font-variant-numeric:tabular-nums}
.dense-table .number{text-align:center!important;font-variant-numeric:tabular-nums}.dense-table tfoot td,.dense-table tfoot th{padding:14px 12px;border-top:1px solid var(--line);background:var(--btn-soft-hover);font-weight:650}
.table-scroll,.schedule-wrap{scrollbar-width:thin;scrollbar-color:#60789855 transparent;overscroll-behavior:contain}.table-scroll{max-height:68vh;border-radius:8px}
.table-scroll::-webkit-scrollbar,.schedule-wrap::-webkit-scrollbar{height:9px;width:8px}.table-scroll::-webkit-scrollbar-thumb,.schedule-wrap::-webkit-scrollbar-thumb{background:#60789855;border-radius:5px;border:2px solid var(--card-bg)}
.dense-table .filter-row .input{padding:8px 10px!important;min-height:38px;border-radius:7px;font-size:11px}.dense-table .filter-row th{padding:0 8px 12px;background:var(--card-bg)}
.dense-table .filter-row select.input:not([multiple]){padding-right:34px!important;background-position:right 10px center}
#requestsTable{min-width:1630px}#requestsTable thead{position:sticky;top:0;z-index:5;background:var(--card-bg)}#requestsTable thead th{position:static}#requestsTable th:first-child,#requestsTable tbody td:first-child{position:sticky;left:0;background:var(--card-bg);z-index:2;border-right:1px solid var(--line)}
#requestsTable td:nth-child(6){min-width:140px}#requestsTable td:nth-child(8){min-width:200px;max-width:260px}#requestsTable .doc-dot{display:inline-flex;align-items:center;justify-content:center;width:22px;height:25px}
.page-tabs{gap:4px;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--input-bg)}.page-tabs .btn-small{min-height:32px;padding:7px 11px;border-radius:6px;font-size:11px}.page-tabs .btn-small.active{background:var(--btn-soft-hover);border-color:var(--line);color:var(--text)}
.search-input{min-width:230px!important;flex:1 1 250px;max-width:430px}.pagination{font-size:11px;margin-top:18px;gap:12px}.pagination .toolbar{gap:8px}.request-id{font-weight:650;text-decoration:none}
.status-chip{font-size:10px;font-weight:600;line-height:1.4;min-height:28px;padding:6px 9px;border:1px solid transparent;border-radius:7px;box-shadow:none;white-space:nowrap}
[data-theme="dark"] .status-chip[data-status="Итог"],[data-theme="dark"] .doc-dot.ready{color:#8fe0bd}.status-chip[data-status="Итог"]{background:#379d7220;color:#21754f;border-color:#379d7238}
.status-chip[data-status="Созданка"],.status-chip[data-status="Ожидает"]{background:#5580db1c;color:#5075c6;border-color:#5580db35}.status-chip[data-status="Сохранка"],.status-chip[data-status="В работе"]{background:#d49b3320;color:#a9761e;border-color:#d49b3338}
.status-chip[data-status="Отменена"]{background:#d7526720;color:#cb5268;border-color:#d7526738}.status-chip[data-status="Готовая"]{background:#42a6ad20;color:#348a92;border-color:#42a6ad38}
[data-theme="dark"] .status-chip[data-status="Созданка"],[data-theme="dark"] .status-chip[data-status="Ожидает"]{color:#adc6ff}[data-theme="dark"] .status-chip[data-status="Сохранка"],[data-theme="dark"] .status-chip[data-status="В работе"]{color:#ecc57f}[data-theme="dark"] .status-chip[data-status="Отменена"]{color:#f3a1ae}[data-theme="dark"] .status-chip[data-status="Готовая"]{color:#83d7dd}
.dense-table td.issue-cell{background:var(--danger-bg)!important;box-shadow:inset 3px 0 #d75c73}.issue-badge{display:inline-flex;align-items:center;gap:5px;padding:5px 7px;margin:3px 3px 3px 0;border:1px solid #d85e7535;border-radius:6px;background:#d85e7517;color:var(--red);font-size:10px;line-height:1.45;white-space:normal}
.deadline-badge{font-size:10px;padding:4px 6px;border-radius:5px}.request-overdue{box-shadow:inset 3px 0 #d75c73}.notice{font-size:12px;line-height:1.65;border-radius:10px;padding:13px 15px}.notice.info{background:#4678da12;border-color:#5687e335;color:var(--text)}
.team-table{min-width:1120px}.team-table td{padding:18px 12px;vertical-align:top;line-height:1.6}.team-table td:first-child{min-width:190px;max-width:245px}.team-table td:last-child{min-width:140px}
.team-table td:last-child>.btn-small{font-size:10px;min-height:34px;padding:7px 9px;margin:0 0 6px}.master-name-row{gap:10px;margin-bottom:3px}.master-link{font-size:12px;font-weight:650}.master-edit-button{min-width:30px;min-height:30px;width:30px;height:30px;padding:6px;flex:none;border-color:transparent;background:transparent;color:var(--muted)}.master-edit-button:hover{background:var(--btn-soft-hover);color:var(--text)}
.dense-table td>small{font-size:10px;line-height:1.6;margin-top:5px}.master-attention{min-width:155px;max-width:205px}.group-badge{border-radius:8px;width:30px;height:30px;line-height:30px}.text-button{font-size:10px;margin-top:4px}.empty-state{padding:34px 20px;gap:10px}.empty-state strong{color:var(--text);font-weight:600}
.stats-filters{padding:20px 22px}.stats-filter-row{gap:12px}.stats-filter-row>.btn-primary{min-height:44px}.stats-heading{margin:26px 0 18px;gap:16px}.stats-heading h2{font-size:19px}.stats-table{min-width:1040px}.stats-table .stats-name{font-size:12px;font-weight:650}.stats-table td{padding:17px 12px}.stats-table tbody tr:nth-child(even) td:not(.issue-cell){background:var(--row-alt)}.stats-table th button{font-size:10.5px;line-height:1.4}
#statsContent[aria-busy="true"]{opacity:1}.stats-table .stats-rank{width:32px}.compact-details{padding:18px 22px}.compact-details summary{font-size:12px;color:var(--muted)}
.schedule-grid{min-width:980px}.schedule-wrap{border-radius:10px;border-color:var(--line);max-height:66vh}.schedule-grid thead th{position:sticky;top:0;z-index:3;background:var(--card-bg);padding:15px 10px}.schedule-grid thead th:first-child{z-index:5}.schedule-grid tbody th{position:sticky;left:0;z-index:2;top:auto;background:var(--card-bg);padding:15px 12px}
.schedule-grid th:first-child{width:205px;min-width:205px}.schedule-grid .cell button{min-height:74px;font-size:12px}.schedule-grid th,.schedule-grid td{border-color:var(--line)}.schedule-grid .date-small{font-size:10px;margin-top:6px}.schedule-grid .cell.selected{outline:2px solid #416fda;outline-offset:-2px}.schedule-grid .cell.today{box-shadow:inset 0 3px #416fda}
.schedule-help-toggle{font-size:11px;color:var(--muted);margin:0 0 16px}.schedule-help-toggle summary{cursor:pointer}.schedule-controls{padding-top:20px;margin-top:16px}.schedule-controls .toolbar{flex-wrap:wrap}.color-presets{gap:8px;margin-bottom:14px}.color-presets button{font-size:11px;min-height:36px;padding:7px 12px;border-radius:7px;border-color:#18305224}.selection-bar{margin:16px 0;color:var(--muted)}
.panel-head:has(#weekInput)>.toolbar:first-child{align-items:flex-end}.panel-head:has(#weekInput)>.toolbar:first-child>.btn-small{min-height:44px}.panel-head:has(#weekInput)>.toolbar:last-child{margin-top:21px}
.detail-layout{grid-template-columns:minmax(0,1.4fr) minmax(310px,.8fr);gap:22px}.column{display:flex;flex-direction:column;gap:0}.section-toolbar{margin-bottom:18px}.money-row{padding:13px 0;font-size:12px;line-height:1.6;gap:16px}.money-row strong{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap;font-weight:650}.money-row.total{font-size:16px;padding-top:17px;border-bottom:0}
.home-master-link{margin-bottom:8px;border:1px solid var(--line);border-radius:9px;padding:14px 12px}.home-master-link span{font-weight:550}.home-master-link strong{color:var(--blue);font-size:12px}.home-master-link:last-child{margin-bottom:0}
.document-grid{grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:12px}.document-card{border-radius:10px;border-color:var(--line);background:var(--input-bg);transition:border-color .15s}.document-card:hover{border-color:#7799db}.document-card img{height:124px;object-fit:cover}.document-card div.meta{padding:11px;line-height:1.55}.document-card small{font-size:9px}.attachment-delete{border-radius:8px;background:var(--card-bg);width:30px;height:30px}
.upload-zone{border:1px dashed #7288aa66;border-radius:10px;padding:16px;background:var(--input-bg)}.upload-zone label{font-size:12px}.upload-zone input[type=file]{font-size:11px;max-width:100%;color:var(--muted)}.upload-zone .help{font-size:11px;margin-bottom:0}.parts-cost-form{gap:10px;align-items:end}.parts-cost-form .field{flex:1 1 180px}.parts-cost-form>.btn-small{min-height:44px;margin-bottom:0}
.client-history{background:var(--input-bg);border-radius:10px;padding:15px}.client-history-head{font-size:12px}.client-history-list{max-height:252px;padding-right:4px}.client-history-item{padding:12px 0}.client-history-item p{font-size:12px}.client-history-item small{font-size:10.5px}.client-duplicate{font-size:11px;padding:10px 11px;border-radius:8px}
.document-viewer-head{padding:18px 20px}.document-viewer-heading h2{font-size:15px}.document-viewer-tools{padding:10px;gap:7px}.document-viewer-tools .btn-small{border-radius:7px;min-height:36px;height:36px;padding:7px 10px}.document-viewer-tools output{font-size:12px}.document-viewer-thumb{border-radius:7px}
dialog.work-dialog{width:min(720px,calc(100vw - 40px));max-width:calc(100vw - 40px);max-height:calc(100dvh - 48px);padding:0;border:1px solid var(--line);border-radius:16px;background:var(--card-bg);color:var(--text);box-shadow:0 24px 100px #0005;overflow:hidden}
dialog.work-dialog[open]{display:flex;flex-direction:column}.work-dialog::backdrop{background:#060e1bc9;backdrop-filter:blur(4px)}.dialog-head{padding:20px 24px;border-bottom:1px solid var(--line);flex:none;align-items:center;gap:16px;background:var(--card-bg)}.dialog-head h2{font-size:19px;font-weight:650;line-height:1.35;letter-spacing:-.25px}.dialog-head>button{width:32px;height:32px;flex:none;border:1px solid transparent;border-radius:8px;color:var(--muted);display:grid;place-items:center;background:transparent;padding:6px}.dialog-head>button:hover{background:var(--btn-soft-hover);border-color:var(--line)}
.dialog-body{padding:22px 24px;overflow-y:auto;min-height:0;flex:1;scrollbar-width:thin;overscroll-behavior:contain}.dialog-body>.field:last-child{margin-bottom:0}.dialog-actions{position:sticky;bottom:-22px;z-index:3;display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin:16px 0 0;padding:16px 0 0;border-top:1px solid var(--line);background:var(--card-bg)}.dialog-actions .btn-primary,.dialog-actions .btn-danger,.dialog-actions .btn-soft{min-height:42px}
.dialog-subject{font-size:13px;margin:0 0 20px;line-height:1.5;color:var(--muted)}.pin-entry-dialog .dialog-head h2{font-size:25px}.pin-entry-dialog .dialog-body{padding-top:14px}.pin-digit{background:var(--input-bg);color:var(--text);border-color:var(--line)}
.admin-tabs{display:flex;flex-wrap:nowrap;gap:7px;overflow-x:auto;max-width:100%;padding:3px 0 13px;margin:0 0 22px;border-bottom:1px solid var(--line);scrollbar-width:thin}.admin-tabs>.btn-small{flex:none;border-radius:8px;min-height:38px;font-size:11px}.admin-tabs .active{background:#416fda;color:#fff;border-color:#5985e9}.admin-grid{gap:20px;align-items:start}.admin-grid h2{margin-bottom:20px}.admin-save{gap:14px;margin-top:20px}.admin-bands .input{text-align:center;font-size:12px;padding:8px!important}
.director-summary{gap:10px}.director-summary button{border-color:var(--line);border-radius:10px;padding:14px;background:var(--input-bg)}.director-summary strong{font-size:22px;font-weight:650;margin-top:6px}.director-filter,.director-tools,.director-bulk{gap:10px}.director-row-actions{gap:6px;min-width:150px}.director-row-actions .btn-small{min-height:32px;font-size:10px;padding:6px 9px}.director-bulk{border:1px solid var(--line);border-radius:9px;background:var(--input-bg)}.director-security-form{max-width:560px}.audit-entry{padding:16px 0}.audit-entry pre{font-size:11px;background:var(--input-bg);padding:12px;border-radius:8px}
#cashHistory>.panel{margin:14px 0 0;padding:18px;border-radius:11px;background:var(--input-bg)}.cash-actions{gap:8px;display:flex;flex-direction:column;align-items:stretch}.cash-actions .btn-primary,.cash-actions .btn-small{min-height:34px;font-size:10px;padding:7px 10px}.cash-receipt-card{width:136px;flex-basis:136px}.cash-receipt-card .document-card{margin:0}
#collectionDayForm{gap:10px;align-items:flex-end}#collectionDayForm>.btn-small{min-height:44px}#refreshCollection{margin-top:14px}.toast{border-radius:10px;font-size:12px;padding:13px 18px;background:#355d9a;border:1px solid #779ad355;box-shadow:0 8px 30px #0003}
@media(min-width:801px){.stats-table th:nth-child(2),.stats-table td:nth-child(2){position:static}}
@media(max-width:1250px){.detail-layout{grid-template-columns:minmax(0,1fr)}.detail-layout>.column:last-child{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}.detail-layout>.column:last-child>.panel{margin-bottom:0}.detail-layout>.column:last-child>.panel:last-child{grid-column:1/-1}}
@media(max-width:1180px){#homeKpis,#statsKpis{grid-template-columns:repeat(2,minmax(0,1fr))}#homeKpis>.kpi:last-child,#statsKpis>.kpi:last-child{grid-column:1/-1!important}.main.work-main{padding:26px 24px 48px}.kpi strong,#homeKpis strong,#statsKpis strong{font-size:24px}}
@media(max-width:1000px){.grid-2,.grid-3{grid-template-columns:minmax(0,1fr)}.admin-grid{grid-template-columns:minmax(0,1fr)}.work-header h1{font-size:25px}.work-header .demo-mode-switch span{display:none}.work-header .demo-mode-switch{min-width:40px;width:40px;padding:9px}}
@media(max-width:800px){
 html{scrollbar-gutter:auto}.main.work-main{margin-left:0;width:100%;padding:22px 18px 40px}.sidebar{width:264px;padding-top:28px;box-shadow:20px 0 80px #0004}.work-header{margin-bottom:24px;gap:14px}.work-header h1{font-size:25px}.work-header>.toolbar{gap:7px}.work-header>.toolbar .btn-soft{min-width:38px;width:38px;min-height:38px;padding:8px}.work-header .mobile-menu{width:38px;min-width:38px;height:38px;min-height:38px;border-radius:9px;margin-right:12px;float:left}
 .panel{padding:20px 18px;border-radius:13px}.panel-head{gap:14px}.panel-head>.toolbar{width:auto}.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.kpi{min-height:122px;padding:18px}.kpi strong,#homeKpis strong,#statsKpis strong{font-size:24px}.input,input.input,select.input,textarea.input{font-size:16px!important;min-height:46px}.calendar-btn{height:46px;min-width:42px}.btn-primary,.btn-soft,.btn-outline,.btn-danger{min-height:42px}.field-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .stats-table th:nth-child(2),.stats-table td:nth-child(2){position:static;box-shadow:none;left:auto;z-index:auto}#statsTable th:nth-child(2),#statsTable td:nth-child(2){position:sticky;left:0;z-index:2;background:var(--card-bg);box-shadow:3px 0 6px #0001;max-width:180px}#statsTable th:nth-child(2){z-index:3}#statsDailyPanel .stats-table th:first-child,#statsDailyPanel .stats-table td:first-child{position:sticky;left:0;z-index:2;background:var(--card-bg);box-shadow:3px 0 6px #0001;min-width:116px}#statsDailyPanel .stats-table th:first-child{z-index:3}
 .stats-filter-row{gap:12px}.stats-filter-row .field{flex:1 1 42%;min-width:125px}.stats-filter-row .stats-master-filter{flex-basis:100%}.stats-filter-row>.btn-primary{width:100%;min-height:44px}.stats-heading{align-items:flex-start}.stats-heading>.btn-outline{font-size:11px}.schedule-grid th:first-child{width:175px;min-width:175px}.schedule-grid{min-width:950px}.panel-head:has(#weekInput)>.toolbar{width:100%}.panel-head:has(#weekInput)>.toolbar:last-child{margin-top:0;justify-content:flex-end}.schedule-controls .grid-3{grid-template-columns:minmax(0,1fr)}
 .work-dialog .dialog-head{padding:18px 20px}.work-dialog .dialog-body{padding:20px}.work-dialog .dialog-actions{bottom:-20px}.director-summary strong{font-size:20px}.parts-cost-form .btn-small{min-height:46px}
}
@media(max-width:720px){
 #requestsTable{min-width:0}#requestsTable thead{position:static;background:transparent}#requestsTable th:first-child{position:static;border-right:0}#requestsTable .filter-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}#requestsTable .filter-row .input{font-size:13px!important;min-height:42px;padding-top:10px!important;padding-bottom:10px!important}.search-input{min-width:0!important;max-width:none;flex:1 1 180px}#resetFilters{font-size:10px;padding:9px 11px;min-height:42px}.request-mobile-cards{gap:14px}.request-mobile-card{padding:18px;border-radius:12px;background:var(--input-bg);border-color:var(--line)}.request-mobile-card>strong{font-size:15px;font-weight:650}.request-mobile-card>p{font-size:12px;line-height:1.6;margin:8px 0 14px}.request-mobile-card .status-chip{font-size:10px;min-height:28px}.mobile-card-meta{font-size:11px;gap:9px}.mobile-phone{font-size:14px;padding:10px 0 4px}.mobile-documents{gap:7px;padding-top:12px}.mobile-documents>span{font-size:10px;padding:5px 7px;border:1px solid var(--line);background:var(--card-bg)}.mobile-card-total{margin-top:14px;padding-top:13px;font-size:12px}.mobile-card-total strong{font-size:16px}.request-mobile-card.request-overdue{background:var(--danger-bg);border-color:#ad5267}
 .team-table{min-width:0}.team-table tbody{gap:16px}.team-table tr[data-master-row]{padding:18px;gap:16px;background:var(--card-bg);border-color:var(--line);border-radius:13px}.team-table tr[data-master-row] td:nth-child(6),.team-table tr[data-master-row] td:nth-child(7){grid-column:1/-1}.team-table tr[data-master-row] td:before{font-size:10px;line-height:1.4;margin-bottom:6px}.team-table td:nth-child(2):before{content:'Заявки'}.team-table td:nth-child(3):before{content:'Контакты'}.team-table td:nth-child(4):before{content:'Группа'}.team-table td:nth-child(5):before{content:'Средний БСО'}.team-table td:nth-child(6):before{content:'Расчётный период'}.team-table td:nth-child(7):before{content:'Касса и документы'}.team-table .master-link{font-size:15px}.team-table .master-edit-button{border-color:var(--line);background:var(--btn-soft-bg)}.team-table td[data-master-contacts]{font-size:12px}.team-table td.number{text-align:left!important}.team-table .master-attention{max-width:none;min-width:0;padding:12px!important;border-radius:8px}.team-table td:last-child>.btn-small{min-height:40px;font-size:11px;margin:0;flex:1;justify-content:center}.team-table td:last-child{gap:8px!important}.team-table td:nth-child(6)>.text-button{display:inline-flex;margin-left:10px}.team-table td:nth-child(6)>small{display:block}
 .detail-layout>.column:last-child{display:block}.detail-layout>.column:last-child>.panel{margin-bottom:20px}.section-toolbar .btn-outline{font-size:11px}.document-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.document-card img{height:130px}.document-card .meta{font-size:10px}.attachment-delete{opacity:1;pointer-events:auto;min-height:32px;min-width:32px;width:32px;height:32px}.client-history-list{max-height:235px}.client-history-item .status-chip{font-size:9px}.client-history-item small{font-size:10px}
 #collectionDayForm{width:100%;align-items:end}#collectionDayForm .field{flex:1;min-width:0}#collectionDayForm .date-wrap{width:100%}#collectionDayForm input{width:100%!important}#collectionDayForm .btn-small{min-height:46px}#cashHistory .panel-head{align-items:flex-start}#cashHistory .panel-head>.toolbar{width:100%;justify-content:flex-end}
}
@media(max-width:480px){
 .main.work-main{padding:20px 14px 36px}.work-header{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px;margin-bottom:22px}.work-header>div:first-child{flex-basis:100%;width:100%}.work-header>.toolbar{margin-left:auto;width:auto;gap:7px}.work-header h1{font-size:25px;line-height:1.22;margin-top:6px}.work-header .mobile-menu{margin-top:10px;width:40px;min-width:40px;height:40px;min-height:40px}.work-header .demo-eyebrow{min-height:17px}.work-header .page-subtitle{font-size:11px;clear:both;padding-top:7px;margin:0}.demo-eyebrow{font-size:9px}.work-header>.toolbar .btn-soft{min-height:36px;min-width:36px;width:36px}.panel{padding:18px 15px}.panel-head{margin-bottom:17px}.panel h2{font-size:15px}.panel-head>.toolbar{max-width:100%}.panel-head #addRequestBtn{font-size:11px;padding:9px 13px;min-height:40px}.kpi{padding:16px;min-height:126px}.kpi span{font-size:10px;min-height:29px;margin-bottom:10px}.kpi strong,#homeKpis strong,#statsKpis strong{font-size:22px;letter-spacing:-.4px}.kpi small{font-size:9px;line-height:1.5;margin-top:9px}.kpis,#homeKpis,#statsKpis{gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}.field-row{grid-template-columns:minmax(0,1fr)}.field{margin-bottom:17px}.field>label{font-size:12px}.btn-primary,.btn-outline,.btn-soft,.btn-danger{font-size:12px;min-height:42px;padding:10px 13px}.page-tabs .btn-small{font-size:10px;min-height:30px;padding:6px 9px}.pagination{font-size:10px;gap:12px}.stats-heading{flex-direction:column;gap:10px;margin-top:22px}.stats-heading h2{font-size:18px}.stats-heading .help{font-size:11px;margin-bottom:0}.stats-filters{padding:18px 15px}.stats-filter-row .field{min-width:100px;flex-basis:42%}.stats-filter-row .field:first-child,.stats-filter-row .stats-master-filter{flex-basis:100%}.stats-hint{display:none}
 dialog.work-dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px);border-radius:14px}.work-dialog .dialog-head{padding:17px 18px}.work-dialog .dialog-head h2{font-size:18px}.work-dialog .dialog-body{padding:18px}.work-dialog .dialog-actions{bottom:-18px;gap:8px;padding-top:14px}.dialog-actions .btn-primary,.dialog-actions .btn-danger{flex:1;min-width:120px}.dialog-actions .btn-soft{min-width:86px}.dialog-subject{font-size:12px}.parts-cost-form .field{min-width:0;flex-basis:100%}.parts-cost-form>.btn-small{width:100%}.director-filter>.input{width:100%;max-width:none}.director-filter>.btn-small{flex:1}.director-bulk{padding:12px}.admin-tabs{margin-bottom:18px}.admin-grid>.panel{padding:18px 15px}.admin-save{flex-direction:column;align-items:stretch;gap:12px}.admin-save>.btn-primary{width:100%}.panel-head:has(#weekInput)>.toolbar:first-child{gap:7px}.panel-head:has(#weekInput)>.toolbar:first-child>.field{flex:1;min-width:0}.panel-head:has(#weekInput) input{width:100%!important}.panel-head:has(#weekInput) #currentWeek{width:100%;min-height:38px}.panel-head:has(#weekInput)>.toolbar:last-child{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.panel-head:has(#weekInput)>.toolbar:last-child>*{font-size:10px;padding:9px 10px}.schedule-controls .toolbar>*{max-width:100%;white-space:normal}.schedule-controls .toolbar>.btn-primary,.schedule-controls .toolbar>.btn-soft{flex:1 1 100%}.color-presets{gap:7px}.color-presets button{padding:7px 10px;font-size:10px}.schedule-grid th:first-child{min-width:145px;width:145px}.schedule-grid{min-width:910px}.document-viewer-tools .btn-small{padding:7px 8px}.document-viewer-head{padding:14px}.document-viewer-heading h2{font-size:13px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

/* Final alignment pass with populated demo records. */
.sidebar-note .demo-role{font:600 13px/1.5 "Segoe UI",Arial,sans-serif}
.home-master-link{color:var(--text)!important}
.team-table td.master-attention{white-space:normal;overflow:visible;text-overflow:clip}
.team-table td.master-attention .issue-badge{max-width:100%}
#requestsTable thead th:nth-child(2){min-width:145px}
#requestsTable thead th:nth-child(4){min-width:145px}
#requestsTable thead th:nth-child(5){min-width:140px}
#requestsTable thead th:nth-child(9){min-width:190px}
#collectionDayForm{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px}
#collectionDayForm>.btn-small{margin-top:25px}
.panel-head:has(#weekInput)>.toolbar:first-child{align-items:start}
.panel-head:has(#weekInput)>.toolbar:first-child>.btn-small{margin-top:25px}
@media(max-width:800px){
 .work-header>div:first-child{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:12px;align-items:center}
 .work-header .mobile-menu{grid-column:1;grid-row:1/3;float:none;margin:0}
 .work-header .demo-eyebrow{grid-column:2;grid-row:1}
 .work-header h1{grid-column:2;grid-row:2}
 .work-header .page-subtitle{grid-column:1/-1;grid-row:3;clear:none;margin:9px 0 0;padding:0;max-width:none}
}
@media(max-width:720px){
 #requestsTable thead th:nth-child(2),#requestsTable thead th:nth-child(4),#requestsTable thead th:nth-child(5),#requestsTable thead th:nth-child(9){min-width:0}
 table:has(>#depositRows),#depositRows{display:block;width:100%}
 table:has(>#depositRows)>thead{display:none}
 #depositRows{display:grid;gap:12px;margin-top:18px}
 #depositRows>tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--input-bg)}
 #depositRows>tr>td{display:block;padding:0;border:0;max-width:none;min-width:0;white-space:normal}
 #depositRows>tr>td:first-child{grid-column:1/-1;font-size:12px;font-weight:600}
 #depositRows>tr>td:nth-child(2){text-align:left!important;align-self:center;font-size:14px;font-weight:600}
 #depositRows>tr>td:nth-child(2):before{content:'Осталось внести';display:block;font-size:9px;font-weight:400;color:var(--muted);margin-bottom:4px}
 #depositRows>tr>td:last-child{align-self:center}
 #depositRows .btn-small{min-height:40px;font-size:10px;padding:9px 11px}
}
@media(max-width:480px){
 .work-header>div:first-child{grid-template-columns:40px minmax(0,1fr)}
 .work-header .mobile-menu{margin:0}
 .work-header .page-subtitle{margin-top:9px}
 .panel-head:has(#weekInput) #currentWeek{margin-top:0!important}
}
@media(max-width:360px){
 #requestsTable .filter-row th:nth-child(2),#requestsTable .filter-row th:nth-child(9){grid-column:1/-1}
}
.login-page{background:#101a29}
.login-card{background:var(--card-bg);border-color:var(--line);color:var(--text);box-shadow:0 24px 100px #0004;border-radius:20px}
.login-card .input{color:var(--text);background:var(--input-bg);border-color:var(--line);font-size:14px}
.login-card label{color:var(--text)}.login-card .auth-sub,.login-card .login-footer{color:var(--muted)}
.login-card .btn-primary{background:#416fda;border-color:#5985e9;color:#fff;border-radius:9px}
.login-brand img{width:44px;height:42px}.login-brand strong{font-size:23px;letter-spacing:-.5px}
dialog.pin-entry-dialog{width:min(440px,calc(100vw - 32px))}
.panel:has(.team-table)>.table-scroll{max-height:none}
.pin-entry-row{gap:12px}.pin-digit{aspect-ratio:1;height:auto!important;min-height:0;font-size:32px}

/* Production header has no preview role switch or badge. */
@media(max-width:800px){.work-header h1{grid-row:1}.work-header .mobile-menu{grid-row:1}.work-header .page-subtitle{grid-row:2}}
