:root{--brand:#802f2d;--brand2:#efdbb2;--accent:#802f2d;--surface:#fbf7f0;--text:#342827;--muted:#7c6b68;--line:#eadfd3}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:var(--text);background:var(--surface)}button,input,select,textarea{font:inherit}button{cursor:pointer}.login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,var(--brand2),var(--brand));padding:20px}.login-card{width:min(430px,100%);background:#fff;border-radius:24px;padding:34px;box-shadow:0 24px 80px #00174d55}.login-card h2{margin:28px 0 6px}.login-card p{color:var(--muted);margin-top:0}.login-card label,.form-stack label{display:grid;gap:7px;margin:14px 0;font-weight:600}.login-card input,.form-stack input{height:44px;border:1px solid var(--line);border-radius:10px;padding:0 12px}.hint{display:block;color:var(--muted);margin-top:14px;line-height:1.4}.brand{display:flex;align-items:center;gap:12px;min-width:0}.brand img,.brand-mark{width:42px;height:42px;border-radius:12px;object-fit:contain;background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;display:grid;place-items:center;font-weight:900;letter-spacing:-1px}.brand div:last-child{display:flex;min-width:0;flex-direction:column}.brand b{font-size:18px}.brand span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shell{min-height:100vh;display:grid;grid-template-columns:270px 1fr}.shell aside{background:#fff;border-right:1px solid var(--line);padding:20px 16px;position:sticky;top:0;height:100vh;overflow:auto}.shell aside>.brand{padding:0 8px 20px;border-bottom:1px solid var(--line);margin-bottom:12px}.nav-group{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#9aa5b7;font-weight:800;padding:18px 12px 7px}.nav-item{width:100%;border:0;background:transparent;border-radius:11px;padding:10px 12px;display:flex;align-items:center;gap:11px;color:#42516d;text-align:left;margin:2px 0}.nav-item:hover{background:#f4f7ff}.nav-item.active{background:color-mix(in srgb,var(--brand) 10%,white);color:var(--brand);font-weight:800}.shell main{min-width:0}.shell header{height:78px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:5}.shell header h1{font-size:23px;margin:0}.shell header span{font-size:12px;color:var(--muted)}.header-actions{display:flex;align-items:center;gap:10px}.user-pill{padding:8px 12px!important;border-radius:999px;background:#f3f6fb;color:#40506c!important}.content{padding:28px;max-width:1600px;margin:0 auto}.stats{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:16px;margin-bottom:20px}.stat{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;display:flex;gap:14px;align-items:center}.stat>span{font-size:30px}.stat div{display:flex;flex-direction:column}.stat b{font-size:26px}.stat small,.stat em{color:var(--muted);font-style:normal}.panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;margin-bottom:18px}.panel h3{margin-top:0}.panel.narrow{max-width:620px}.module-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}.module-head p{margin-top:0;color:var(--muted)}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.toolbar input{height:38px;border:1px solid var(--line);border-radius:9px;padding:0 10px}.button,button{border:1px solid var(--line);background:#fff;border-radius:9px;padding:9px 12px;color:var(--text);text-decoration:none}.primary{background:var(--brand);border-color:var(--brand);color:#fff}.ghost{background:transparent}.chips{display:flex;gap:7px;flex-wrap:wrap}.chips span{background:#eef3ff;border-radius:999px;padding:5px 9px;font-size:12px;color:#456}.table-wrap{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:auto}table{width:100%;border-collapse:collapse;min-width:680px}th,td{padding:12px 14px;border-bottom:1px solid var(--line);text-align:left;font-size:14px}th{background:#f8f9fc;color:#65728b;font-size:12px;text-transform:uppercase;letter-spacing:.03em}tbody tr:hover{background:#fafcff}.actions{width:92px;white-space:nowrap}.actions button{padding:5px 8px;margin-left:4px}.empty,.skeleton{padding:46px;text-align:center;color:var(--muted)}.modal-back{position:fixed;inset:0;background:#0d183c75;z-index:20;display:grid;place-items:center;padding:20px}.modal{width:min(820px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:18px;padding:22px;box-shadow:0 25px 80px #00123d55}.modal-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.modal-title h3{margin:0}.modal-title button{border:0;font-size:24px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid label{display:grid;gap:6px;font-size:13px;font-weight:700}.form-grid input,.form-grid select,.form-grid textarea{width:100%;border:1px solid var(--line);border-radius:9px;padding:10px;background:#fff}.form-grid textarea{min-height:92px;resize:vertical}.span2{grid-column:1/-1}.check{display:flex!important;align-items:center;gap:8px!important}.check input{width:auto!important}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.error{background:#fff1f1;color:#a32727;padding:10px 12px;border-radius:9px;margin:10px 0}.notice{background:#edf9f2;color:#166b3b;padding:12px;border-radius:9px;margin-top:14px}.warning{background:#fff7e8;color:#7a5511;padding:12px;border-radius:9px;margin:14px 0}.tabs{display:flex;gap:8px;margin-bottom:16px;overflow:auto}.tabs button.active{background:var(--brand);color:#fff;border-color:var(--brand)}.module-config{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:12px;margin:18px 0}.module-card{border:1px solid var(--line);border-radius:13px;padding:14px;display:grid;grid-template-columns:1fr auto auto auto;gap:12px;align-items:center;opacity:.65}.module-card.on{opacity:1;border-color:color-mix(in srgb,var(--brand) 35%,var(--line))}.module-card>div{display:flex;flex-direction:column;min-width:0}.module-card small{color:var(--muted);margin-top:4px}.module-card label{font-size:12px;white-space:nowrap}.inline-form{display:grid;grid-template-columns:1fr 1fr 1fr 1fr auto;gap:8px;margin:14px 0}.inline-form input,.inline-form select,select{border:1px solid var(--line);border-radius:9px;padding:9px;background:#fff}.form-stack{max-width:440px}.toast{position:fixed;right:22px;bottom:22px;background:#16213a;color:#fff;padding:12px 18px;border-radius:12px;box-shadow:0 10px 30px #0003;z-index:40;opacity:0;transform:translateY(8px);transition:.2s;pointer-events:none}.toast.show{opacity:1;transform:none}.role-box{border:1px solid var(--line);border-radius:12px;padding:12px;margin:10px 0}.role-box summary{font-weight:800;cursor:pointer}.perm-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}.perm-grid label{font-size:12px}.perm-grid button{grid-column:1/-1;justify-self:start}@media(max-width:900px){.shell{grid-template-columns:76px 1fr}.shell aside{padding:14px 8px}.shell aside>.brand{justify-content:center}.shell aside>.brand div:last-child{display:none}.nav-item{justify-content:center}.nav-item span:last-child,.nav-group{display:none}.content{padding:16px}.shell header{padding:0 16px}.stats{grid-template-columns:repeat(2,1fr)}.module-head{flex-direction:column}.module-config{grid-template-columns:1fr}.module-card{grid-template-columns:1fr auto auto}.module-card label:first-of-type{grid-column:2/-1}.inline-form{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:1fr}.span2{grid-column:auto}.perm-grid{grid-template-columns:1fr 1fr}}@media(max-width:580px){.shell{grid-template-columns:1fr}.shell aside{height:66px;position:fixed;bottom:0;top:auto;left:0;right:0;z-index:10;display:flex;overflow-x:auto;border-top:1px solid var(--line);border-right:0;padding:6px;background:#fff}.shell aside>.brand,.nav-group{display:none}.shell aside nav{display:flex;width:max-content}.nav-item{width:62px;height:52px;padding:5px;flex-direction:column;gap:2px;font-size:16px}.nav-item span:last-child{display:block;font-size:8px;max-width:58px;overflow:hidden;text-overflow:ellipsis}.shell main{padding-bottom:72px}.shell header{height:64px}.shell header h1{font-size:19px}.shell header>div:first-child span,.user-pill{display:none}.stats{grid-template-columns:1fr 1fr;gap:8px}.stat{padding:12px}.stat b{font-size:21px}.content{padding:12px}.toolbar{width:100%}.toolbar input{flex:1;min-width:120px}.modal{padding:16px}.module-config{grid-template-columns:1fr}.module-card{grid-template-columns:1fr 1fr;align-items:start}.module-card>div{grid-column:1/-1}.inline-form{grid-template-columns:1fr}.perm-grid{grid-template-columns:1fr}}
.alert-strip{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.alert-strip span{background:#fff4df;border:1px solid #f2d596;color:#815a13;border-radius:11px;padding:10px 14px}.clickable{cursor:pointer}.clickable:hover{transform:translateY(-1px);box-shadow:0 8px 24px #1c2b4d12}.module-stats{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;margin-bottom:16px}.mini-stat{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:5px}.mini-stat small{color:var(--muted)}.mini-stat b{font-size:20px}.toolbar select{height:38px;border:1px solid var(--line);border-radius:9px;padding:0 9px;background:#fff}.actions.wide{min-width:210px}.actions.wide button,.card-actions button{font-size:11px;padding:5px 7px;margin:2px}.overdue-row{background:#fff6f6}.board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(240px,1fr);gap:12px;overflow:auto;padding-bottom:10px}.board-col{background:#eef2f8;border:1px solid var(--line);border-radius:14px;padding:10px;min-height:240px}.board-col h4{margin:4px 2px 10px;display:flex;justify-content:space-between}.board-col h4 span{background:#fff;border-radius:999px;padding:2px 8px;font-size:12px}.board-card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:12px;margin-bottom:8px;display:flex;flex-direction:column;gap:7px}.board-card strong{font-size:15px}.board-card small{color:var(--muted)}.overdue-card{border-color:#e69797;background:#fff8f8}.card-actions{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}.timeline{display:grid;gap:10px}.timeline article{display:grid;grid-template-columns:170px 1fr auto;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-radius:13px;padding:14px}.timeline time{color:var(--brand);font-weight:800}.timeline article>div:nth-child(2){display:flex;flex-direction:column;gap:3px}.timeline span{color:var(--muted);font-size:13px}.feed{display:grid;gap:10px;max-width:1000px}.feed-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}.feed-card.pinned{border-color:color-mix(in srgb,var(--brand) 45%,var(--line));box-shadow:inset 4px 0 0 var(--brand)}.feed-head{display:flex;justify-content:space-between;gap:15px}.feed-head time,.feed-card small{color:var(--muted);font-size:12px}.feed-card p{white-space:pre-wrap}.analytics-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:12px;margin-bottom:18px}.analytics-grid article{background:#fff;border:1px solid var(--line);border-radius:15px;padding:16px;display:grid;grid-template-columns:auto 1fr;gap:4px 10px;align-items:center}.analytics-grid article>span{font-size:26px;grid-row:1/4}.analytics-grid small,.analytics-grid em{color:var(--muted);font-style:normal}.analytics-grid b{font-size:21px}.movement-list{max-height:55vh;overflow:auto}.movement-list>div{padding:10px 0;border-bottom:1px solid var(--line)}.movement-list small{display:block;color:var(--muted);margin-top:3px}.info-body{line-height:1.7}.form-stack{display:grid;gap:12px}.form-stack label{display:grid;gap:6px}.form-stack input{border:1px solid var(--line);border-radius:9px;padding:10px}@media(max-width:900px){.module-stats,.analytics-grid{grid-template-columns:repeat(2,1fr)}.timeline article{grid-template-columns:1fr}.actions.wide{min-width:160px}}@media(max-width:580px){.module-stats,.analytics-grid{grid-template-columns:1fr 1fr}.board{grid-auto-columns:82vw}.toolbar select{max-width:145px}.feed-head{flex-direction:column}.actions.wide{min-width:130px}}
/* v3 specialized workspaces */
.workspace-top{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin:4px 0 10px}.workspace-top h2{margin:0 0 6px;font-size:24px}.workspace-top p{margin:0;color:var(--muted);max-width:760px}.workspace-meta{display:flex;gap:8px;margin-bottom:18px}.workspace-meta span{font-size:11px;color:var(--muted);background:#eef3f8;border-radius:999px;padding:5px 9px}.client-toolbar{display:flex;gap:10px;margin-bottom:14px}.client-toolbar input,.client-toolbar select{border:1px solid var(--line);border-radius:10px;padding:10px;background:#fff}.client-toolbar input{min-width:320px}.client-grid{display:grid;grid-template-columns:repeat(2,minmax(300px,1fr));gap:12px}.client-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:start}.client-avatar,.employee-avatar{width:46px;height:46px;border-radius:13px;background:color-mix(in srgb,var(--brand) 12%,white);color:var(--brand);display:grid;place-items:center;font-weight:900}.client-main{display:grid;gap:7px}.card-title{display:flex;gap:8px;align-items:center;justify-content:space-between}.status-badge{display:inline-flex;align-items:center;background:#eef4ff;color:#365caa;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:700}.contact-row{display:flex;gap:12px;flex-wrap:wrap}.contact-row a{color:var(--brand);text-decoration:none;font-size:13px}.client-details{display:flex;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:12px}.pipeline{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(260px,1fr);gap:12px;overflow-x:auto;padding-bottom:12px}.pipeline-col,.task-col{background:#eef2f7;border:1px solid var(--line);border-radius:15px;padding:10px;min-height:360px}.pipeline-col>header,.task-col>header{display:flex;justify-content:space-between;align-items:center;padding:3px 4px 10px}.pipeline-col>header span,.task-col>header span{background:#fff;border-radius:999px;padding:2px 8px;font-size:12px}.deal-card,.task-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px;margin-bottom:9px;display:grid;gap:8px}.deal-card small,.task-card small{color:var(--muted)}.deal-progress,.payment-bar,.stock-meter{height:6px;background:#e9edf4;border-radius:99px;overflow:hidden}.deal-progress span,.payment-bar span,.stock-meter span{display:block;height:100%;background:var(--brand);border-radius:99px}.payment-bar span{background:var(--accent)}.deal-kpis{display:flex;justify-content:space-between;gap:8px;color:var(--muted);font-size:11px}.column-empty{color:#9aa4b4;text-align:center;padding:26px 8px;font-size:12px}.task-board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(260px,1fr);gap:12px;overflow-x:auto}.task-card p{margin:0;color:#57657c;font-size:13px}.task-meta{display:grid;gap:4px;font-size:11px;color:var(--muted)}.task-overdue{border-color:#e9a0a0;background:#fffafa}.priority{font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:800;color:#7c8798}.priority-критический,.priority-высокий{color:#b83d3d}.focus-card{box-shadow:0 0 0 2px color-mix(in srgb,var(--brand) 35%,transparent)}.calendar-title{text-align:center;font-size:22px;font-weight:900;text-transform:capitalize;margin:8px 0 14px}.month-calendar{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden}.week-head,.month-grid{display:grid;grid-template-columns:repeat(7,1fr)}.week-head{background:#f6f8fb;border-bottom:1px solid var(--line)}.week-head b{text-align:center;padding:10px;font-size:12px;color:var(--muted)}.day-cell{min-height:120px;padding:8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff;cursor:default}.day-cell:nth-child(7n){border-right:0}.day-cell.foreign{background:#fafbfc;color:#aeb5c0}.day-cell.today{box-shadow:inset 0 0 0 2px var(--brand)}.day-number{font-size:12px;font-weight:800;margin-bottom:6px}.day-events{display:grid;gap:4px}.event-chip{display:block;width:100%;border:0;background:#eef4ff;color:#365caa;text-align:left;border-radius:7px;padding:4px 6px;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.event-chip span{font-weight:800}.catalog-grid{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:12px}.product-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;display:grid;grid-template-columns:auto 1fr auto;gap:13px}.product-card.low-stock{border-color:#efb1a6}.product-icon{font-size:32px}.product-card small,.product-card span{color:var(--muted);font-size:12px}.price-row{display:flex;align-items:baseline;justify-content:space-between;margin:10px 0}.price-row strong{font-size:22px}.stock-row{display:flex;gap:10px;flex-wrap:wrap}.danger-chip{background:#fff0ed!important;color:#b74734!important;border-radius:999px;padding:3px 7px}.warehouse-grid{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:12px}.stock-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;display:grid;gap:10px}.stock-card>div:first-child{display:flex;justify-content:space-between}.stock-card small{color:var(--muted)}.stock-numbers{display:flex;justify-content:space-between;gap:8px;font-size:11px}.purchase-list,.operation-list,.payroll-list{display:grid;gap:10px}.purchase-card,.operation-list article,.payroll-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;display:grid;grid-template-columns:auto 1fr auto auto;gap:14px;align-items:center}.purchase-card>div:nth-child(2),.operation-list article>div,.payroll-card>div:first-child{display:grid;gap:3px}.purchase-card small,.purchase-card span,.operation-list small,.payroll-card small{color:var(--muted);font-size:12px}.scanner-panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;display:grid;grid-template-columns:auto 1fr;gap:20px;margin-bottom:16px}.scanner-icon{font-size:64px;color:var(--brand)}.scan-line{display:grid;grid-template-columns:1fr 110px auto auto;gap:8px}.scan-line input{border:1px solid var(--line);border-radius:9px;padding:10px}.code-grid{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:10px}.code-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:13px;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center}.fake-qr{font-size:34px}.code-card>div:nth-child(2){display:grid;gap:3px}.code-card small,.code-card span{color:var(--muted);font-size:11px}.shift-summary{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;border-radius:17px;padding:18px;display:flex;gap:18px;align-items:center;margin-bottom:14px}.shift-summary strong{font-size:24px;margin-left:auto}.employee-grid{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:12px}.employee-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:15px;display:grid;grid-template-columns:auto 1fr auto;gap:12px}.employee-card.inactive{opacity:.58}.employee-card>div:nth-child(2){display:grid;gap:4px}.employee-card small{color:var(--muted)}.payroll-card{grid-template-columns:1.2fr 2fr auto auto auto}.pay-breakdown{display:flex;gap:18px;font-size:12px}.pay-breakdown span{display:grid;gap:2px}.finance-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:14px}.bar-chart{height:190px;display:flex;align-items:flex-end;gap:14px;padding:12px 4px 0}.bar-chart.large{height:220px}.bar-group{flex:1;text-align:center;min-width:38px}.bars{height:160px;display:flex;gap:4px;align-items:flex-end;justify-content:center}.bar-chart.large .bars{height:190px}.bars span{display:block;width:15px;border-radius:5px 5px 0 0}.bar-income{background:var(--accent)}.bar-expense{background:#e06464}.bar-group small{display:block;margin-top:6px;color:var(--muted)}.legend{display:flex;gap:18px;font-size:11px}.legend span:first-child{color:var(--accent)}.legend span:last-child{color:#e06464}.finance-recent{display:grid;align-content:start}.finance-row{display:grid;grid-template-columns:auto 1fr auto auto auto;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid var(--line)}.finance-row>div{display:grid}.finance-row small{color:var(--muted)}.money-sign{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:900}.money-sign.plus{background:#eaf8f1;color:#16834d}.money-sign.minus{background:#fff0f0;color:#c64b4b}.document-grid{display:grid;grid-template-columns:repeat(2,minmax(300px,1fr));gap:10px}.document-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;display:grid;grid-template-columns:auto 1fr auto;gap:13px;align-items:center}.doc-icon{font-size:30px}.document-card>div:nth-child(2){display:grid;gap:3px}.document-card small,.document-card span{color:var(--muted);font-size:12px}.chat-shell{height:calc(100vh - 130px);min-height:560px;background:#fff;border:1px solid var(--line);border-radius:18px;display:grid;grid-template-columns:240px 1fr;overflow:hidden}.chat-channels{border-right:1px solid var(--line);padding:16px;background:#f8fafc}.chat-channels h3{margin-top:0}.chat-channels button{width:100%;display:flex;gap:9px;border:0;background:transparent;text-align:left;margin:4px 0}.chat-channels button.active{background:var(--brand);color:#fff}.chat-channels small{display:block;color:var(--muted);padding:12px 8px;line-height:1.5}.chat-main{display:grid;grid-template-rows:64px 1fr auto;min-width:0}.chat-main>header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:0 16px}.chat-main>header>div{display:grid}.chat-main>header small{color:var(--muted)}.chat-messages{overflow:auto;padding:18px;background:#f5f7fb}.message{display:grid;grid-template-columns:auto 1fr;gap:10px;margin-bottom:14px}.message-avatar{width:34px;height:34px;border-radius:10px;background:var(--brand);color:#fff;display:grid;place-items:center;font-weight:800}.message-body{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 12px;max-width:820px}.message.pinned .message-body{border-color:var(--brand)}.message-body>div:first-child{display:flex;gap:9px;align-items:center}.message-body time{font-size:10px;color:var(--muted)}.message-body p{white-space:pre-wrap;margin:6px 0}.message-actions button{border:0;padding:3px 0;color:var(--brand);font-size:10px}.chat-compose{display:grid;grid-template-columns:auto 1fr auto;gap:8px;padding:12px;border-top:1px solid var(--line)}.chat-compose textarea,.chat-compose input{border:1px solid var(--line);border-radius:10px;padding:10px;resize:none}.analytics-hero{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.analytics-hero h2{margin:0}.analytics-hero p{margin:5px 0;color:var(--muted)}.analytics-panels{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:12px}.big-number{font-size:28px;font-weight:900}.ring-stat{display:flex;align-items:center;gap:18px}.ring{width:100px;height:100px;border-radius:50%;border:12px solid color-mix(in srgb,var(--brand) 25%,#e8edf5);border-top-color:var(--brand);display:grid;place-items:center;align-content:center}.ring b{font-size:22px}.ring small{font-size:9px;color:var(--muted)}.danger-text{color:#c94d4d}.report-grid{display:grid;grid-template-columns:repeat(2,minmax(300px,1fr));gap:10px;margin-bottom:14px}.report-card,.integration-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:15px;display:grid;grid-template-columns:auto 1fr auto;gap:13px;align-items:center}.report-icon,.integration-logo{font-size:30px;width:52px;height:52px;border-radius:14px;background:#eef3ff;display:grid;place-items:center;color:var(--brand);font-weight:900}.report-card>div:nth-child(2),.integration-card>div:nth-child(2){display:grid;gap:4px}.report-card small,.report-card span,.integration-card small,.integration-card span{color:var(--muted);font-size:12px}.quick-report{display:flex;gap:8px;flex-wrap:wrap}.integration-grid{display:grid;grid-template-columns:repeat(2,minmax(320px,1fr));gap:10px}.switch-line{display:flex;gap:14px;margin-top:5px}.switch-line span:first-child{font-weight:700;color:var(--text)}
@media(max-width:1100px){.catalog-grid,.warehouse-grid,.employee-grid,.code-grid{grid-template-columns:repeat(2,1fr)}.analytics-panels{grid-template-columns:1fr 1fr}.finance-layout{grid-template-columns:1fr}.payroll-card{grid-template-columns:1fr 1fr}.pay-breakdown{grid-column:1/-1}.integration-grid{grid-template-columns:1fr}}
@media(max-width:700px){.workspace-top{flex-direction:column}.client-grid,.catalog-grid,.warehouse-grid,.employee-grid,.code-grid,.document-grid,.report-grid{grid-template-columns:1fr}.client-toolbar{flex-direction:column}.client-toolbar input{min-width:0;width:100%}.month-calendar{overflow-x:auto}.week-head,.month-grid{min-width:700px}.day-cell{min-height:100px}.scan-line{grid-template-columns:1fr 80px}.scan-line button{grid-row:2}.purchase-card,.operation-list article,.payroll-card{grid-template-columns:1fr}.chat-shell{grid-template-columns:76px 1fr;height:calc(100vh - 145px)}.chat-channels{padding:8px}.chat-channels h3,.chat-channels small,.chat-channels button{font-size:0}.chat-channels button span{font-size:18px;margin:auto}.chat-compose{grid-template-columns:1fr}.analytics-panels{grid-template-columns:1fr}.integration-card{grid-template-columns:auto 1fr}.integration-card>.card-actions{grid-column:1/-1}.finance-row{grid-template-columns:auto 1fr auto}.finance-row button{display:none}}


/* Mobile top navigation — compact colored section icons, Potroshki-style */
.nav-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.nav-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:580px){
  .shell aside{height:82px;position:fixed;top:64px;bottom:auto;left:0;right:0;z-index:12;display:block;overflow-x:auto;overflow-y:hidden;border-top:0;border-right:0;border-bottom:1px solid var(--line);padding:6px 8px 5px;background:rgba(255,255,255,.98);box-shadow:0 5px 18px #102a6310;scrollbar-width:none;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .shell aside::-webkit-scrollbar{display:none}
  .shell aside nav{display:flex;width:max-content;gap:3px;align-items:flex-start}
  .shell aside>.brand,.shell aside .nav-group{display:none}
  .nav-item{width:66px;height:69px;margin:0;padding:3px 2px 2px;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:3px;border:0;background:transparent!important;color:#59677f;border-radius:12px;font-size:inherit;overflow:visible}
  .nav-item:hover{background:transparent!important}
  .nav-item .nav-icon{width:39px;height:39px;border-radius:13px;background:var(--nav-color);color:#fff;box-shadow:0 3px 8px color-mix(in srgb,var(--nav-color) 26%,transparent);transition:transform .16s ease,box-shadow .16s ease}
  .nav-item .nav-icon svg{width:21px;height:21px}
  .nav-item .nav-label,.nav-item span:last-child{display:block;width:64px;max-width:64px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-size:9px;line-height:11px;font-weight:650;color:#65728a}
  .nav-item.active{color:var(--nav-color);font-weight:800}
  .nav-item.active .nav-icon{transform:translateY(-1px) scale(1.05);box-shadow:0 0 0 3px color-mix(in srgb,var(--nav-color) 18%,white),0 6px 14px color-mix(in srgb,var(--nav-color) 34%,transparent)}
  .nav-item.active .nav-label,.nav-item.active span:last-child{color:var(--nav-color);font-weight:850}
  .shell main{padding-bottom:0}
  .shell header{z-index:14}
  .content{padding:94px 12px 12px}
}

/* Chat 3.0.3 — dedicated desktop chat */
.chat-v303{height:calc(100vh - 132px);min-height:520px}
.chat-v303 .chat-main{min-height:0}
.chat-v303 .chat-messages{min-height:0;overflow-y:auto;scroll-behavior:smooth}
.chat-v303 .message.mine{grid-template-columns:1fr auto}
.chat-v303 .message.mine .message-avatar{grid-column:2;grid-row:1}
.chat-v303 .message.mine .message-body{grid-column:1;grid-row:1;justify-self:end;background:color-mix(in srgb,var(--brand) 8%,#fff)}
.chat-file{margin-top:7px;border:1px solid var(--line)!important;border-radius:8px!important;padding:6px 9px!important;background:#f8fafc!important;color:var(--brand)!important;font-size:12px!important}
.chat-compose{grid-template-columns:minmax(0,1fr) auto auto;align-items:end}
.chat-compose textarea{min-height:54px;max-height:150px;width:100%}
.chat-recipient{grid-column:1/-1;display:grid;grid-template-columns:50px minmax(0,360px);gap:8px;align-items:center;font-size:12px;color:var(--muted)}
.chat-recipient select{border:1px solid var(--line);border-radius:10px;padding:9px;background:#fff}
.chat-attach{width:42px;height:42px;border:1px solid var(--line);border-radius:10px;display:grid;place-items:center;cursor:pointer;background:#fff;font-size:18px}.chat-attach input{display:none}
.chat-compose-actions{display:flex;gap:9px;align-items:center}.chat-compose-actions small{color:var(--muted);font-size:10px}.chat-error{grid-column:1/-1;color:#c54444;font-size:12px;min-height:16px}
.message-actions{display:flex;gap:12px;margin-top:5px}.message-actions button{background:transparent;cursor:pointer}
@media(max-width:700px){.chat-v303{height:calc(100vh - 208px);min-height:440px;border-radius:12px}.chat-v303 .chat-compose{grid-template-columns:1fr auto}.chat-v303 .chat-compose textarea{grid-column:1/-1}.chat-v303 .chat-compose-actions small{display:none}.chat-v303 .chat-recipient{grid-template-columns:1fr}.chat-v303 .chat-recipient span{display:none}.chat-v303 .message.mine{grid-template-columns:1fr}.chat-v303 .message.mine .message-avatar{display:none}.chat-v303 .message.mine .message-body{grid-column:1;max-width:92%}}

/* ===== 3.0.4 CHAT + MOBILE NAV REPAIR ===== */
.mobile-top-nav{display:none}
@media(max-width:720px){
  .shell{grid-template-columns:1fr!important}
  .desktop-sidebar{display:none!important}
  .shell main{min-width:0!important;padding-bottom:0!important}
  .app-header{height:64px!important;padding:0 12px!important;position:sticky!important;top:0!important;z-index:40!important}
  .app-header h1{font-size:18px!important}
  .app-header>div:first-child>span,.app-header .user-pill{display:none!important}
  .mobile-top-nav{display:block;position:sticky;top:64px;z-index:35;background:rgba(255,255,255,.985);border-bottom:1px solid var(--line);box-shadow:0 5px 18px #102a6310;padding:5px 6px 6px}
  .mobile-top-nav nav{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;width:100%!important;max-width:none!important}
  .mobile-top-nav .nav-item{width:100%!important;height:48px!important;min-width:0!important;margin:0!important;padding:2px 1px!important;border:0!important;background:transparent!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:2px!important;overflow:hidden!important}
  .mobile-top-nav .nav-icon{width:31px!important;height:31px!important;border-radius:10px!important;background:var(--nav-color)!important;color:#fff!important;display:grid!important;place-items:center!important;box-shadow:0 2px 6px color-mix(in srgb,var(--nav-color) 28%,transparent)!important;flex:0 0 31px!important}
  .mobile-top-nav .nav-icon svg{display:block!important;width:17px!important;height:17px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;stroke-linecap:round!important;stroke-linejoin:round!important}
  .mobile-top-nav .nav-label{display:block!important;width:100%!important;max-width:100%!important;text-align:center!important;font-size:7.5px!important;line-height:9px!important;font-weight:700!important;color:#617089!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .mobile-top-nav .nav-item.active .nav-icon{transform:translateY(-1px) scale(1.04)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--nav-color) 18%,white),0 4px 10px color-mix(in srgb,var(--nav-color) 35%,transparent)!important}
  .mobile-top-nav .nav-item.active .nav-label{color:var(--nav-color)!important;font-weight:900!important}
  .content{padding:12px!important;max-width:none!important}
}
@media(max-width:360px){
  .mobile-top-nav{padding-left:3px;padding-right:3px}
  .mobile-top-nav nav{gap:1px}
  .mobile-top-nav .nav-icon{width:29px!important;height:29px!important;flex-basis:29px!important}
  .mobile-top-nav .nav-label{font-size:7px!important}
}

/* Dedicated chat. Unique class names prevent shell/header/sidebar CSS collisions. */
.crm-chat{height:calc(100vh - 134px);min-height:560px;background:#fff;border:1px solid var(--line);border-radius:18px;display:grid;grid-template-columns:220px minmax(0,1fr);overflow:hidden;box-shadow:0 8px 28px #102a630b}
.crm-chat-failed{display:grid;place-items:center;text-align:center;padding:30px}
.crm-chat-failed>div{max-width:520px}.crm-chat-failed p{color:#a32727}
.crm-chat-sidebar{min-width:0;border-right:1px solid var(--line);background:#f8fafc;padding:16px;display:flex;flex-direction:column}
.crm-chat-sidebar-title{display:grid;gap:3px;padding:2px 4px 14px}.crm-chat-sidebar-title b{font-size:16px}.crm-chat-sidebar-title small{color:var(--muted);font-size:11px}
.crm-chat-channels{display:grid;gap:5px}.crm-chat-channels button{width:100%;border:0;background:transparent;display:flex;align-items:center;gap:9px;padding:10px;border-radius:10px;text-align:left}.crm-chat-channels button span{width:26px;height:26px;border-radius:8px;background:#e9eef8;display:grid;place-items:center}.crm-chat-channels button b{font-size:13px}.crm-chat-channels button.active{background:var(--brand);color:#fff}.crm-chat-channels button.active span{background:#ffffff26}
.crm-chat-panel{min-width:0;min-height:0;display:grid;grid-template-rows:62px minmax(0,1fr) auto;background:#fff}
.crm-chat-toolbar{display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--line);background:#fff}.crm-chat-toolbar>div{display:grid;gap:2px}.crm-chat-toolbar b{font-size:15px}.crm-chat-toolbar small{font-size:11px;color:var(--muted)}.crm-chat-toolbar button{width:36px;height:36px;padding:0;font-size:18px}
.crm-chat-list{min-height:0;overflow-y:auto;padding:18px;background:#f5f7fb;overscroll-behavior:contain}
.crm-chat-empty{height:100%;min-height:220px;display:grid;place-items:center;text-align:center;color:var(--muted);padding:24px}
.crm-chat-message{display:grid;grid-template-columns:34px minmax(0,1fr);gap:9px;margin:0 0 12px;align-items:start}.crm-chat-avatar{width:34px;height:34px;border-radius:10px;background:var(--brand);color:#fff;display:grid;place-items:center;font-weight:850}.crm-chat-bubble{justify-self:start;max-width:min(780px,88%);background:#fff;border:1px solid var(--line);border-radius:14px;padding:9px 11px;box-shadow:0 2px 8px #102a6308}.crm-chat-message.mine{grid-template-columns:minmax(0,1fr) 34px}.crm-chat-message.mine .crm-chat-avatar{grid-column:2;grid-row:1}.crm-chat-message.mine .crm-chat-bubble{grid-column:1;grid-row:1;justify-self:end;background:color-mix(in srgb,var(--brand) 7%,#fff)}.crm-chat-message.pinned .crm-chat-bubble{border-color:color-mix(in srgb,var(--brand) 60%,var(--line))}
.crm-chat-meta{display:flex;gap:8px;align-items:center;min-width:0}.crm-chat-meta b{font-size:12px}.crm-chat-meta time{font-size:9px;color:var(--muted)}.crm-chat-bubble p{white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0;font-size:13px;line-height:1.4}.crm-chat-recipient-note{display:block;color:var(--muted);font-size:10px;margin-top:5px}.crm-chat-file{margin-top:7px!important;padding:6px 8px!important;font-size:11px!important;color:var(--brand)!important;background:#f8fafc!important}.crm-chat-actions{display:flex;gap:10px;margin-top:5px}.crm-chat-actions button{border:0;background:transparent;padding:2px 0;color:var(--brand);font-size:9px}
.crm-chat-compose{border-top:1px solid var(--line);padding:10px 12px;background:#fff;display:grid;gap:8px}.crm-chat-recipient{display:grid;grid-template-columns:42px minmax(0,360px);gap:8px;align-items:center;color:var(--muted);font-size:11px}.crm-chat-recipient select{border:1px solid var(--line);border-radius:9px;padding:8px;background:#fff}.crm-chat-recipient.is-hidden{display:none}.crm-chat-input-row{display:grid;grid-template-columns:minmax(0,1fr) 42px auto;gap:8px;align-items:end}.crm-chat-input-row textarea{width:100%;min-height:52px;max-height:130px;resize:vertical;border:1px solid var(--line);border-radius:10px;padding:9px}.crm-chat-attach{width:42px;height:42px;border:1px solid var(--line);border-radius:10px;display:grid;place-items:center;background:#fff;cursor:pointer}.crm-chat-attach input{display:none}.crm-chat-send{height:42px;min-width:110px}.crm-chat-compose-foot{display:flex;justify-content:space-between;gap:10px;min-height:15px}.crm-chat-compose-foot small{font-size:9px;color:var(--muted)}.crm-chat-error{font-size:10px;color:#b63333;text-align:right}.crm-chat-readonly{padding:14px;color:var(--muted);border-top:1px solid var(--line)}
@media(max-width:720px){
  .crm-chat{height:auto;min-height:0;grid-template-columns:1fr;border-radius:13px;overflow:visible}
  .crm-chat-sidebar{border-right:0;border-bottom:1px solid var(--line);padding:7px;background:#fff}
  .crm-chat-sidebar-title{display:none}
  .crm-chat-channels{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .crm-chat-channels button{justify-content:center;padding:7px 4px;gap:4px;min-width:0}.crm-chat-channels button span{width:24px;height:24px;flex:0 0 24px}.crm-chat-channels button b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .crm-chat-panel{min-height:520px;grid-template-rows:48px minmax(300px,1fr) auto}
  .crm-chat-toolbar{padding:0 10px}.crm-chat-list{padding:10px}
  .crm-chat-message{grid-template-columns:28px minmax(0,1fr);gap:7px}.crm-chat-avatar{width:28px;height:28px;border-radius:8px;font-size:11px}.crm-chat-bubble{max-width:94%;padding:8px 9px}.crm-chat-message.mine{grid-template-columns:minmax(0,1fr)}.crm-chat-message.mine .crm-chat-avatar{display:none}.crm-chat-message.mine .crm-chat-bubble{grid-column:1;max-width:92%}
  .crm-chat-compose{padding:8px}.crm-chat-recipient{grid-template-columns:1fr}.crm-chat-recipient span{display:none}.crm-chat-input-row{grid-template-columns:minmax(0,1fr) 38px}.crm-chat-input-row textarea{grid-column:1/-1;min-height:48px}.crm-chat-attach{width:38px;height:38px}.crm-chat-send{height:38px;min-width:0}.crm-chat-compose-foot small{display:none}.crm-chat-error{text-align:left}
}
@media(max-width:720px){.crm-chat-input-row .crm-chat-send{grid-column:2}.crm-chat-input-row .crm-chat-attach{grid-column:1;justify-self:start}}

/* ===== 3.0.6 USERS DELETE + MOBILE GENERAL CHAT ===== */
.danger-action{border-color:#f0b8b8!important;background:#fff5f5!important;color:#b42323!important}
.danger-action:hover{background:#ffeaea!important;border-color:#e58f8f!important}
.current-user-note{display:inline-flex;align-items:center;color:var(--muted);font-size:10px;padding:5px 3px}

@media(max-width:720px){
  /* Keep the whole chat, including the composer, inside the visible mobile workspace. */
  .crm-chat{
    height:clamp(390px,calc(100dvh - 238px),640px)!important;
    min-height:390px!important;
    max-height:640px!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    overflow:hidden!important;
    border-radius:13px!important;
  }
  .crm-chat-sidebar{min-height:0!important;flex:0 0 auto!important}
  .crm-chat-panel{
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
    grid-template-rows:44px minmax(0,1fr) auto!important;
  }
  .crm-chat-list{min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;padding:9px!important}
  .crm-chat-compose{
    position:relative!important;
    z-index:4!important;
    flex:0 0 auto!important;
    padding:8px!important;
    background:#fff!important;
    box-shadow:0 -6px 18px #102a6308!important;
  }
  .crm-chat-input-row{grid-template-columns:minmax(0,1fr) 38px 92px!important;gap:6px!important;align-items:end!important}
  .crm-chat-input-row textarea{
    grid-column:1/-1!important;
    display:block!important;
    min-height:48px!important;
    max-height:96px!important;
    resize:none!important;
    font-size:16px!important;
  }
  .crm-chat-attach{grid-column:2!important;width:38px!important;height:38px!important}
  .crm-chat-send{grid-column:3!important;height:38px!important;min-width:92px!important;padding:7px 9px!important}
  .crm-chat-compose-foot{min-height:13px!important}
  .crm-chat-compose-foot small{display:none!important}
  .crm-chat-error{display:block!important;text-align:left!important;font-size:10px!important}
}
@media(max-width:390px){
  .crm-chat{height:clamp(370px,calc(100dvh - 230px),590px)!important;min-height:370px!important}
  .crm-chat-input-row{grid-template-columns:minmax(0,1fr) 36px 84px!important}
  .crm-chat-attach{width:36px!important;height:36px!important}.crm-chat-send{height:36px!important;min-width:84px!important;font-size:12px!important}
}

/* ===== 3.0.7 MOBILE LABELS + RUSSIAN ROLE PERMISSIONS ===== */
.roles-panel .module-head{margin-bottom:10px}.roles-panel .module-head p{margin:5px 0 0;max-width:760px}
.role-box{padding:0;overflow:hidden}.role-box>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;list-style:none;background:#fbfcfe}.role-box>summary::-webkit-details-marker{display:none}.role-box>summary:after{content:'▾';color:var(--muted);font-size:12px}.role-box:not([open])>summary:after{content:'›';font-size:18px}.role-box>summary small{margin-left:auto;background:#eaf1ff;color:var(--brand);padding:4px 8px;border-radius:999px;font-size:10px}.role-admin-note{padding:14px 15px;color:var(--muted);border-top:1px solid var(--line)}
.role-permissions{border-top:1px solid var(--line);padding:12px}.role-permission-group{margin:0 0 13px}.role-permission-group h4{margin:0 0 7px;font-size:11px;text-transform:uppercase;letter-spacing:.055em;color:#75839a}.system-permission-list{display:flex;flex-wrap:wrap;gap:6px}.system-permission-list label{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:9px;padding:7px 9px;background:#fff;font-size:11px;font-weight:650}.system-permission-list input,.permission-row input{accent-color:var(--brand)}
.permission-table{border:1px solid var(--line);border-radius:11px;overflow:hidden}.permission-head,.permission-row{display:grid;grid-template-columns:minmax(150px,1fr) 92px 145px 86px;align-items:center}.permission-head{background:#f6f8fc;color:#738198;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.025em}.permission-head>span,.permission-row>b,.permission-row>label{padding:8px 10px}.permission-head>span:not(:first-child){text-align:center}.permission-row{min-height:38px;border-top:1px solid var(--line)}.permission-row:first-of-type{border-top:0}.permission-row>b{font-size:12px}.permission-row>label{display:flex;align-items:center;justify-content:center;gap:5px;border-left:1px solid #edf0f5;font-size:10px;color:var(--muted);cursor:pointer}.permission-row>label span{display:none}.permission-row input{width:16px;height:16px;margin:0}.role-save-bar{display:flex;justify-content:flex-end;position:sticky;bottom:0;padding:9px 0 0;background:linear-gradient(180deg,transparent 0,#fff 30%)}.role-save-bar button{min-width:150px}

@media(max-width:720px){
  .mobile-top-nav .nav-item{height:55px!important;padding:2px 0!important;overflow:visible!important}
  .mobile-top-nav .nav-label{display:-webkit-box!important;width:100%!important;max-width:100%!important;min-height:17px!important;padding:0 1px!important;text-align:center!important;font-size:7.2px!important;line-height:8.4px!important;font-weight:750!important;color:#617089!important;white-space:normal!important;overflow:hidden!important;text-overflow:clip!important;word-break:normal!important;overflow-wrap:normal!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important}
  .mobile-top-nav nav{align-items:start!important}
  .role-permissions{padding:9px}.system-permission-list{display:grid;grid-template-columns:1fr 1fr;gap:5px}.system-permission-list label{padding:7px;font-size:10px}
  .permission-head{display:none}.permission-table{border:0;display:grid;gap:7px;overflow:visible}.permission-row{grid-template-columns:1fr repeat(3,58px);border:1px solid var(--line)!important;border-radius:9px;overflow:hidden;min-height:44px}.permission-row>b{padding:8px;font-size:10.5px}.permission-row>label{padding:5px 2px;flex-direction:column;gap:2px;font-size:8px}.permission-row>label span{display:block;font-size:7px;line-height:8px;text-align:center}.permission-row input{width:15px;height:15px}.role-save-bar{position:static}.role-save-bar button{width:100%}
}
@media(max-width:380px){
  .mobile-top-nav .nav-label{font-size:6.8px!important;line-height:8px!important}
  .system-permission-list{grid-template-columns:1fr}.permission-row{grid-template-columns:minmax(88px,1fr) repeat(3,52px)}
}

/* 3.1.0 — checklist configurator */
.checklist-panel{max-width:1050px}.checklist-upload{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:18px;border:1px dashed #cbd5e1;border-radius:14px;background:#f8fafc;margin:14px 0}.checklist-upload input[type=file]{min-width:280px;flex:1}.checklist-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.checklist-preview{margin-top:14px}.checklist-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:16px}.checklist-kpi{border:1px solid #e2e8f0;border-radius:12px;padding:12px;background:#fff;display:flex;flex-direction:column;gap:4px}.checklist-kpi span{font-size:12px;color:#64748b}.checklist-kpi b{font-size:16px;display:flex;align-items:center;gap:7px}.color-dot{width:15px;height:15px;border-radius:50%;display:inline-block;border:1px solid #cbd5e1}.checklist-module-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;margin:8px 0 14px}.checklist-module-row{display:flex;justify-content:space-between;gap:10px;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;background:#fff}.checklist-module-row span{font-size:12px;color:#475569;white-space:nowrap}.checklist-warnings{background:#fff7ed;border:1px solid #fed7aa;border-radius:12px;padding:12px;margin-top:10px}.checklist-warnings h4{margin:0 0 7px}.checklist-requirements{display:grid;gap:8px;margin-top:10px}.checklist-requirements>div{border-left:3px solid #f59e0b;padding:7px 10px;background:#fffbeb}.checklist-requirements small{display:block;color:#78716c;margin-top:3px}.config-tools{margin-top:16px}.config-tools>summary{cursor:pointer;font-weight:600}.config-tools .checklist-actions{margin-top:12px}#importCheck:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:720px){.checklist-upload{display:block}.checklist-upload input[type=file]{min-width:0;width:100%;margin-bottom:12px}.checklist-actions{display:grid;grid-template-columns:1fr}.checklist-actions button{width:100%}.checklist-module-list{grid-template-columns:1fr}.checklist-kpis{grid-template-columns:1fr 1fr}}


/* 1.0 — CRM ZIP builder */
.builder-brand{margin-top:18px;padding-top:18px;border-top:1px solid var(--line,#e6eaf1)}
.builder-brand h4{margin:0 0 4px}.builder-preview{margin:14px 0}.builder-brand-sample{display:grid;grid-template-columns:44px 1fr;grid-template-rows:auto auto;gap:2px 10px;align-items:center;max-width:430px;padding:14px 16px;border-radius:16px;background:linear-gradient(135deg,var(--sample-primary),var(--sample-secondary));color:#fff;box-shadow:0 8px 24px rgba(15,23,42,.12)}.builder-brand-sample span{grid-row:1/3;width:38px;height:38px;border-radius:11px;background:rgba(255,255,255,.9)}.builder-brand-sample b{font-size:15px}.builder-brand-sample small{opacity:.82}
@media(max-width:720px){.builder-brand .form-grid{grid-template-columns:1fr}.builder-brand .span2{grid-column:auto}.builder-brand-sample{max-width:none}.checklist-actions #buildZip{width:100%}}


/* ===== GURU 1.1.1 — BRAND LAYER =====
   Additive visual override only: no module/API/layout logic changed. */
:root{
  --guru-primary:#802f2d;
  --guru-primary-dark:#5f211f;
  --guru-helper:#efdbb2;
  --guru-helper-soft:#faf1df;
  --guru-ink:#342827;
  --guru-line:#eadfd3;
}
body{background:var(--surface);color:var(--guru-ink)}
.login{background:linear-gradient(135deg,var(--guru-primary-dark) 0%,var(--guru-primary) 62%,#9d4d48 100%)}
.brand img,.brand-mark{background:linear-gradient(135deg,var(--guru-primary),var(--guru-primary-dark));box-shadow:0 6px 18px #802f2d20}
.shell aside,.shell header,.mobile-top-nav{background:#fffdf9}
.shell aside{border-color:var(--guru-line)}
.shell aside>.brand{border-color:var(--guru-line)}
.shell header{border-color:var(--guru-line)}
.nav-item:hover{background:var(--guru-helper-soft)}
.nav-item.active{background:color-mix(in srgb,var(--guru-helper) 52%,white);color:var(--guru-primary)}
.nav-item.active .nav-icon,.nav-item:hover .nav-icon{color:var(--guru-primary)!important}
.primary,.tabs button.active{background:var(--guru-primary);border-color:var(--guru-primary);color:#fff}
.primary:hover,.tabs button.active:hover{background:var(--guru-primary-dark);border-color:var(--guru-primary-dark)}
.button:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid color-mix(in srgb,var(--guru-primary) 45%,white);outline-offset:2px}
.panel,.stat,.table-wrap,.mini-stat,.module-card,.role-box,.permission-table,.crm-chat{border-color:var(--guru-line)}
th,.permission-head{background:#fcf7ef;color:#765f5b}
tbody tr:hover{background:#fffaf3}
.chips span,.role-box>summary small{background:color-mix(in srgb,var(--guru-helper) 58%,white);color:var(--guru-primary-dark)}
.user-pill{background:color-mix(in srgb,var(--guru-helper) 42%,white);color:var(--guru-primary-dark)!important}
.toolbar input,.toolbar select,.form-grid input,.form-grid select,.form-grid textarea,.inline-form input,.inline-form select,select{border-color:var(--guru-line)}
.module-card.on{border-color:color-mix(in srgb,var(--guru-primary) 38%,var(--guru-line))}
.alert-strip span,.warning{background:#fff7e6;border-color:#ecd3a5;color:#6f4d24}
.notice{background:#f5eee4;color:#64332f}
.toast{background:var(--guru-primary-dark)}
.checklist-upload{border-color:#dbc8b0;background:#fffaf2}
.checklist-kpi,.checklist-module-row{border-color:var(--guru-line)}
.checklist-warnings{background:#fff7e8;border-color:#ecd2a0}
.checklist-requirements>div{border-left-color:var(--guru-primary);background:#fffaf2}
.builder-brand-sample{background:linear-gradient(135deg,var(--guru-primary),var(--guru-primary-dark))}
.permission-row>label{border-left-color:#f0e7dc}
.system-permission-list label{border-color:var(--guru-line)}
input[type=checkbox],input[type=radio],.system-permission-list input,.permission-row input{accent-color:var(--guru-primary)}
@media(max-width:720px){
  .mobile-top-nav{border-color:var(--guru-line)}
  .mobile-top-nav .nav-item.active{background:color-mix(in srgb,var(--guru-helper) 56%,white)}
  .crm-chat-compose{background:#fffdf9!important;box-shadow:0 -6px 18px #802f2d0b!important}
}

/* ===== GURU 1.2.0 — TASKS / AUTOMATIONS / NOTIFICATIONS ===== */
.notification-bell{position:relative;min-width:38px;height:38px;border-radius:11px;padding:0 10px;display:inline-flex;align-items:center;justify-content:center;background:#fffdf9;border:1px solid var(--guru-line);font-size:16px}.notification-bell:hover{background:var(--guru-helper-soft)}.notification-bell>b{position:absolute;right:-5px;top:-6px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;display:grid;place-items:center;background:var(--guru-primary);color:#fff;font-size:9px;line-height:1}.notification-center{display:grid;gap:10px}.notification-center-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.notification-list{display:grid;gap:7px;max-height:58vh;overflow:auto}.notification-item{width:100%;display:grid;grid-template-columns:30px 1fr;gap:9px;text-align:left;border:1px solid var(--guru-line);border-radius:11px;padding:10px;background:#fff}.notification-item.unread{background:var(--guru-helper-soft);border-color:color-mix(in srgb,var(--guru-primary) 22%,var(--guru-line))}.notification-item-icon{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:color-mix(in srgb,var(--guru-helper) 60%,white);color:var(--guru-primary-dark);font-weight:900}.notification-item span:last-child{display:grid;gap:2px}.notification-item small,.notification-item time{color:var(--muted);font-size:10px}.notification-item time{margin-top:2px}
.task-interval-block{display:grid;gap:5px;margin:8px 0 9px}.task-interval-track{position:relative;height:7px;border-radius:999px;background:#efe7dc;overflow:hidden}.task-interval-track>span{position:absolute;left:0;top:0;bottom:0;width:var(--task-progress);background:linear-gradient(90deg,var(--guru-helper),var(--guru-primary));border-radius:inherit}.task-interval-labels{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:6px}.task-interval-labels small{font-size:9px;color:var(--muted)}.task-interval-labels small:last-child{text-align:right}.task-interval-labels b{font-size:10px;color:var(--guru-primary-dark)}.task-no-interval{font-size:9px;color:var(--muted);margin:7px 0}.task-detail{display:grid;gap:14px}.task-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.task-detail-head h3{margin:6px 0 4px}.task-detail-head p{margin:0;color:var(--muted);white-space:pre-wrap}.task-detail-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.task-detail-meta>span{border:1px solid var(--guru-line);background:#fffaf3;border-radius:10px;padding:9px;font-size:10px}.task-detail-meta b{display:block;margin-top:2px;font-size:11px}.task-subsection{border:1px solid var(--guru-line);border-radius:13px;padding:12px;background:#fffdf9}.task-subsection-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.task-subsection-title h4{margin:0}.task-subsection-title span{font-size:10px;color:var(--muted)}.task-checklist{display:grid;gap:6px}.task-check-item{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid var(--guru-line);border-radius:9px;padding:7px 9px;background:#fff}.task-check-item label{display:flex;align-items:center;gap:8px;flex:1}.task-check-item.done span{text-decoration:line-through;color:var(--muted)}.task-check-item button{min-width:29px;padding:4px}.task-inline-form{display:grid;grid-template-columns:1fr auto;gap:7px;margin-top:9px}.task-inline-form input,.task-comment-form textarea{width:100%;border:1px solid var(--guru-line);border-radius:9px;padding:9px;background:#fff}.task-comments{display:grid;gap:7px;max-height:260px;overflow:auto}.task-comments article{border:1px solid var(--guru-line);border-radius:10px;padding:9px;background:#fff}.task-comments article>div{display:flex;justify-content:space-between;gap:8px}.task-comments time{font-size:9px;color:var(--muted)}.task-comments p{margin:6px 0 0;white-space:pre-wrap}.task-comment-form{display:grid;gap:7px;margin-top:9px}.task-comment-form button{justify-self:end}.task-detail-actions{display:flex;justify-content:flex-end}.automation-panel{max-width:900px}.automation-form{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.automation-form>label:not(.automation-toggle){display:grid;gap:5px;border:1px solid var(--guru-line);border-radius:11px;padding:10px;background:#fff}.automation-toggle{display:flex;align-items:flex-start;gap:9px;border:1px solid var(--guru-line);border-radius:11px;padding:11px;background:#fff}.automation-toggle input{margin-top:3px}.automation-toggle span{display:grid;gap:2px}.automation-toggle small,.automation-form label>small{color:var(--muted);font-size:10px}.automation-form input[type=number],.automation-form select{border:1px solid var(--guru-line);border-radius:9px;padding:8px;background:#fff}.automation-form .modal-actions{grid-column:1/-1}
@media(max-width:720px){.notification-bell{min-width:34px;height:34px;padding:0 7px}.notification-list{max-height:65vh}.task-interval-block{grid-template-columns:9px 1fr;align-items:stretch}.task-interval-track{width:7px;height:76px;grid-row:1/3}.task-interval-track>span{left:0;right:0;top:auto;bottom:0;width:100%;height:var(--task-progress);background:linear-gradient(0deg,var(--guru-helper),var(--guru-primary))}.task-interval-labels{grid-template-columns:1fr;align-content:space-between;height:76px}.task-interval-labels small:last-child{text-align:left}.task-detail-meta{grid-template-columns:1fr}.task-inline-form{grid-template-columns:1fr}.task-inline-form button,.task-comment-form button{width:100%;justify-self:stretch}.automation-form{grid-template-columns:1fr}.automation-form .modal-actions{grid-column:auto}.notification-center-head{align-items:flex-start;flex-direction:column}.notification-center-head button{width:100%}}

/* GURU 1.3.0 — INVENTORY / QR PRINT / EXPORT */
.inventory-list{display:grid;gap:8px;margin-top:14px}.inventory-list>button{display:flex;justify-content:space-between;align-items:center;width:100%;padding:12px 14px;text-align:left;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:inherit}.inventory-list>button span:first-child{display:flex;flex-direction:column;gap:3px}.status-pill{display:inline-flex;padding:5px 9px;border-radius:999px;background:#f3ead8;color:#633}.inventory-doc-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:12px}.inventory-fact{width:110px}.inventory-diff{font-weight:700}.quick-report-group{display:inline-flex;align-items:center;gap:6px;padding:7px;border:1px solid var(--line);border-radius:12px}.quick-report-group b{margin-right:4px}@media(max-width:720px){.inventory-doc .table-wrap{overflow:auto}.inventory-doc table{min-width:720px}.quick-report-group{display:flex;flex-wrap:wrap;width:100%}}


/* GURU 1.4.0 — EXTERNAL ADAPTERS / OCR / COMMUNICATION HISTORY */
.external-history{display:grid;gap:9px;max-height:62vh;overflow:auto}.external-history article{display:grid;gap:5px;padding:11px;border:1px solid var(--guru-line);border-radius:11px;background:#fff}.external-history article>div{display:flex;justify-content:space-between;gap:10px}.external-history time,.external-history small{font-size:10px;color:var(--muted)}.external-history strong{font-size:12px}.external-history p{margin:0;white-space:pre-wrap}.integration-hook{display:block;max-width:680px;margin-top:6px;padding:7px 9px;border:1px dashed var(--guru-line);border-radius:8px;background:#fffaf3;color:var(--guru-primary-dark);font-size:9px;white-space:normal;overflow-wrap:anywhere}.integration-card input[type=password]{font-family:monospace}
@media(max-width:720px){.external-history article>div{display:grid}.integration-hook{font-size:8px}}


/* GURU 1.5.0 — CHAT SEARCH / RETENTION / ANALYTICS DRILL-DOWN */
.crm-chat-toolbar-actions{display:flex;align-items:center;gap:8px}.crm-chat-search{display:flex;align-items:center;gap:6px;min-width:min(330px,38vw);border:1px solid var(--line,#d8dde7);border-radius:12px;padding:5px 8px;background:var(--panel,#fff)}.crm-chat-search input{border:0!important;box-shadow:none!important;background:transparent!important;min-width:0;flex:1;padding:5px}.crm-chat-search button{border:0;background:transparent;padding:2px 5px;font-size:18px}.chat-settings-panel .warning{margin-top:14px}.analytics-kpi-click{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}.analytics-kpi-click:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(36,30,29,.10)}.analytics-period-form{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr)) auto;gap:10px;align-items:end}.analytics-period-form label{display:grid;gap:5px;font-size:12px}.analytics-compare-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-top:16px}.analytics-compare-card{display:grid;text-align:left;gap:5px;padding:14px;border:1px solid var(--line,#e2e4e9);border-radius:14px;background:var(--panel,#fff)}.analytics-compare-card b{font-size:20px}.analytics-compare-card span{font-size:12px;opacity:.7}.analytics-compare-card em{font-style:normal;font-weight:700}.analytics-compare-card em.up{color:#16834a}.analytics-compare-card em.down{color:#b33a36}.kpi-drill-summary{margin-bottom:12px}.info-body .table-wrap{max-height:60vh;overflow:auto}
@media(max-width:760px){.crm-chat-toolbar{align-items:stretch;gap:8px}.crm-chat-toolbar-actions{width:100%}.crm-chat-search{min-width:0;flex:1}.analytics-period-form{grid-template-columns:1fr 1fr}.analytics-period-form button{grid-column:1/-1}.analytics-compare-grid{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.analytics-compare-grid{grid-template-columns:1fr}.crm-chat-toolbar-actions{flex-wrap:wrap}.crm-chat-search{width:100%}}


/* GURU 1.6.0 — DIAGNOSTICS / RECOVERY / STABILITY */
.diagnostics-panel{display:grid;gap:16px}.diag-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.diag-kpis{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px}.diag-kpis article{display:grid;gap:4px;padding:13px;border:1px solid var(--guru-line);border-radius:13px;background:#fffdf9}.diag-kpis small,.diag-kpis span{font-size:10px;color:var(--muted)}.diag-kpis b{font-size:20px;color:var(--guru-primary-dark)}.diag-warnings{display:grid;gap:6px}.diag-warnings>div{padding:9px 11px;border:1px solid #e4c2bd;border-radius:10px;background:#fff7f5;color:#7c302d}.diag-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.diag-grid section{border:1px solid var(--guru-line);border-radius:13px;padding:12px;background:#fff}.diag-grid h4{margin:0 0 9px}.diag-log{display:grid;gap:6px;max-height:320px;overflow:auto}.diag-log article{display:grid;grid-template-columns:1fr auto;gap:3px 10px;border:1px solid var(--guru-line);border-radius:9px;padding:8px;background:#fffdf9}.diag-log article>b{font-size:11px}.diag-log article>span{grid-column:1/-1;font-size:10px;color:var(--muted);overflow-wrap:anywhere}.diag-log article>time{font-size:9px;color:var(--muted);white-space:nowrap}.diag-log article.bad{border-color:#e4b8b1;background:#fff8f7}.diag-log article.ok{border-color:#c8dbc8}.diag-foot{padding-top:4px;border-top:1px solid var(--guru-line);color:var(--muted)}
@media(max-width:900px){.diag-kpis{grid-template-columns:repeat(2,minmax(120px,1fr))}.diag-grid{grid-template-columns:1fr}}
@media(max-width:560px){.diag-actions{width:100%;justify-content:stretch}.diag-actions button{flex:1 1 45%}.diag-kpis{grid-template-columns:1fr 1fr}.diag-log article{grid-template-columns:1fr}.diag-log article>time{grid-column:1}.diagnostics-panel .module-head{align-items:stretch;flex-direction:column}}

/* GURU 1.6.1 — CLIENT FIX PACK / FILTERS / QR / BACKUPS */
.workspace-filters{display:grid;grid-template-columns:minmax(220px,1.6fr) minmax(170px,1fr) minmax(145px,.8fr) minmax(145px,.8fr) auto;gap:10px;align-items:end;margin:0 0 12px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:14px}
.workspace-filters label{display:grid;gap:5px;font-size:11px;font-weight:700;color:var(--muted)}
.workspace-filters input,.workspace-filters select{width:100%;min-width:0;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--text);padding:9px 10px}
.workspace-filter-actions{display:flex;gap:7px;align-items:center}
.record-context-line{margin:10px 0 0;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fbfaf7;color:var(--text);font-size:13px}
.inventory-note-field{display:grid;grid-template-columns:1fr;gap:7px;margin:14px 0 0;width:100%;font-weight:700;color:var(--text)}
.inventory-note-field textarea{display:block;width:100%;min-height:86px;resize:vertical;border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:#fff;color:var(--text);font:inherit}
.inventory-admin-actions{display:flex;justify-content:flex-start;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.quick-report{display:grid;grid-template-columns:repeat(3,minmax(260px,1fr));gap:10px;align-items:stretch}
.quick-report-group{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px;align-items:center;width:100%;min-height:56px;padding:8px 9px;border:1px solid var(--line);border-radius:12px;background:#fff}
.quick-report-group b{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.quick-report-group button{min-width:58px}
.scan-line{grid-template-columns:minmax(180px,1fr) auto auto}
.qr-resolved{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fbfaf7;display:grid;gap:5px}
.qr-resolved>span,.qr-resolved>small{color:var(--muted)}
.backup-list{display:grid;gap:8px;margin-top:12px}
.backup-list article{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
.backup-list article>div{display:grid;gap:3px;min-width:0}
.backup-list b{overflow-wrap:anywhere}.backup-list small{color:var(--muted)}
.backup-panel #backupMsg{margin-top:10px}.backup-panel .notice button{margin-left:8px}
.error{white-space:pre-line}
@media(max-width:1180px){.workspace-filters{grid-template-columns:repeat(2,minmax(180px,1fr))}.workspace-filter-actions{grid-column:1/-1}.quick-report{grid-template-columns:repeat(2,minmax(250px,1fr))}}
@media(max-width:720px){.workspace-filters{grid-template-columns:1fr}.workspace-filter-actions{grid-column:auto;display:grid;grid-template-columns:1fr 1fr}.quick-report{grid-template-columns:1fr}.quick-report-group{grid-template-columns:minmax(0,1fr) auto auto}.scan-line{grid-template-columns:1fr 1fr}.scan-line>input{grid-column:1/-1}.backup-list article{align-items:flex-start;flex-direction:column}.backup-list article button{width:100%}}

/* GURU 1.7.0 — CLIENT UX / WORKDAY / THEMES / REPORT FILTERS */
.source-only-note{display:inline-flex;align-items:center;min-height:38px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:#fbf7f0;color:var(--muted);font-size:12px}
.workday-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.workday-head h2{margin:0 0 5px}.workday-head p{margin:0;color:var(--muted)}.workday-controls{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.workday-controls label,.workday-person{display:grid;gap:5px;font-size:11px;font-weight:700;color:var(--muted)}.workday-controls input,.workday-controls select{min-height:42px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text);padding:8px 11px}.workday-person{min-width:160px;padding:7px 11px;border:1px solid var(--line);border-radius:10px;background:#fff}.workday-person b{color:var(--text);font-size:13px}.workday-notifications .module-head{margin-bottom:12px}.workday-alerts{display:flex;gap:10px;flex-wrap:wrap}.workday-alerts button{padding:11px 14px;background:#fff7e8;border-color:#e8ceb1;text-align:left}.workday-alerts button:hover{border-color:var(--brand);box-shadow:0 6px 18px #802f2d12}.notice-inline{display:inline-flex;padding:10px 13px;background:#edf9f2;border-radius:10px;color:#166b3b}.telegram-placeholder{line-height:1.5}.telegram-placeholder p{color:var(--muted)}
.theme-cards{display:grid;grid-template-columns:repeat(2,minmax(220px,320px));gap:14px}.theme-card{display:grid;gap:8px;text-align:left;padding:14px;border:2px solid var(--line);border-radius:14px;background:#fff}.theme-card.active{border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 10%,transparent)}.theme-card small{color:var(--muted)}.theme-preview{height:76px;border-radius:10px;overflow:hidden;display:grid;grid-template-columns:34% 66%;border:1px solid var(--line)}.theme-preview i:first-child{background:#802F2D}.theme-preview i:last-child{background:#EFDBB2}.theme-preview.dark i:first-child{background:#EFDBB2}.theme-preview.dark i:last-child{background:#802F2D}
.worktype-list{display:grid;gap:8px;margin:14px 0}.worktype-list article{display:grid;grid-template-columns:minmax(180px,1.5fr) 140px 140px 120px 40px;gap:8px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:12px;background:#fff}.worktype-list input,.worktype-list select{width:100%;border:1px solid var(--line);border-radius:9px;padding:9px;background:#fff}.worktype-list label{font-size:12px}.record-context-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.record-context-line span{color:var(--muted)}
.recurring-expenses .recurring-list{display:grid;gap:8px}.recurring-expenses article{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:#fff}.recurring-expenses article>div{display:grid;gap:3px}.recurring-expenses small{color:var(--muted)}.payroll-inside{margin-top:18px}.document-card span{font-size:11px;color:var(--muted)}
.crm-chat-toolbar{display:grid!important;grid-template-columns:minmax(160px,1fr) minmax(320px,480px);gap:14px;align-items:center!important}.crm-chat-toolbar-actions{display:grid!important;grid-template-columns:minmax(0,1fr) 42px;gap:8px;width:100%;min-width:0}.crm-chat-search{width:100%;min-width:0!important}.crm-chat-search input{width:100%}.crm-chat-message.announcement{border:1px solid color-mix(in srgb,var(--brand) 30%,var(--line));background:color-mix(in srgb,var(--brand2) 35%,white)}.crm-chat-message.announcement .crm-chat-avatar{background:var(--brand);color:#fff}
.analytics-only{max-width:1200px;margin-inline:auto}.analytics-presets{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.analytics-presets button{min-height:42px;padding:9px 16px}.analytics-period-form input[type=date]{min-height:46px;font-size:14px;padding:8px 11px}.analytics-period-form label{font-size:12px;font-weight:700;color:var(--muted)}
.reports-top{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;margin-bottom:14px}.reports-top h2{margin:0 0 4px}.reports-top>p{margin:0 0 14px;color:var(--muted)}.report-section{display:grid;grid-template-columns:100px 1fr;gap:10px;align-items:start;padding:9px 0;border-top:1px solid var(--line)}.report-section>b{padding-top:9px}.report-section>div{display:flex;gap:7px;flex-wrap:wrap}.report-section button.active{background:var(--brand);border-color:var(--brand);color:#fff}.report-filter-form{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:10px;align-items:end}.report-filter-form label{display:grid;gap:5px;font-size:11px;font-weight:700;color:var(--muted)}.report-filter-form input,.report-filter-form select{width:100%;min-height:42px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--text);padding:8px 10px}.report-actions{grid-column:1/-1;display:flex;gap:8px;justify-content:flex-end}.journal-summary{display:grid;grid-template-columns:repeat(2,minmax(170px,260px));gap:10px;margin-bottom:14px}.journal-summary article{display:grid;gap:4px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fbfaf7}.journal-summary small{color:var(--muted)}.journal-summary b{font-size:20px}

/* Dark = the same GURU brand colors with burgundy/cream roles swapped. */
html[data-guru-theme="dark"]{--brand:#EFDBB2;--brand2:#802F2D;--accent:#EFDBB2;--surface:#802F2D;--text:#FFF5DF;--muted:#E7CEAA;--line:#A95651}
html[data-guru-theme="dark"] body{background:#802F2D;color:var(--text)}
html[data-guru-theme="dark"] .shell aside,html[data-guru-theme="dark"] .shell header,html[data-guru-theme="dark"] .panel,html[data-guru-theme="dark"] .stat,html[data-guru-theme="dark"] .mini-stat,html[data-guru-theme="dark"] .table-wrap,html[data-guru-theme="dark"] .modal,html[data-guru-theme="dark"] .reports-top,html[data-guru-theme="dark"] .workspace-filters,html[data-guru-theme="dark"] .quick-report-group,html[data-guru-theme="dark"] .backup-list article,html[data-guru-theme="dark"] .theme-card,html[data-guru-theme="dark"] .worktype-list article,html[data-guru-theme="dark"] .recurring-expenses article,html[data-guru-theme="dark"] .workday-person{background:#642624;color:var(--text);border-color:var(--line)}
html[data-guru-theme="dark"] .nav-item{color:#F5E1BE}html[data-guru-theme="dark"] .nav-item:hover{background:#71302D}html[data-guru-theme="dark"] .nav-item.active{background:#EFDBB2;color:#57201F}
html[data-guru-theme="dark"] button,html[data-guru-theme="dark"] input,html[data-guru-theme="dark"] select,html[data-guru-theme="dark"] textarea,html[data-guru-theme="dark"] .workspace-filters input,html[data-guru-theme="dark"] .workspace-filters select,html[data-guru-theme="dark"] .report-filter-form input,html[data-guru-theme="dark"] .report-filter-form select,html[data-guru-theme="dark"] .workday-controls input,html[data-guru-theme="dark"] .workday-controls select{background:#732B29;color:#FFF5DF;border-color:#A95651}
html[data-guru-theme="dark"] .primary,html[data-guru-theme="dark"] .tabs button.active,html[data-guru-theme="dark"] .report-section button.active{background:#EFDBB2;color:#57201F;border-color:#EFDBB2}
html[data-guru-theme="dark"] th{background:#5B211F;color:#EFDBB2}html[data-guru-theme="dark"] tbody tr:hover{background:#71302D}html[data-guru-theme="dark"] .crm-chat-bubble,html[data-guru-theme="dark"] .crm-chat-panel,html[data-guru-theme="dark"] .crm-chat-sidebar{background:#642624;color:var(--text)}
html[data-guru-theme="dark"] .crm-chat-search{background:#732B29}html[data-guru-theme="dark"] .crm-chat-message.announcement{background:#71302D}
html[data-guru-theme="dark"] .source-only-note,html[data-guru-theme="dark"] .record-context-line,html[data-guru-theme="dark"] .journal-summary article{background:#71302D}

@media(max-width:900px){.workday-head{align-items:stretch;flex-direction:column}.workday-controls{width:100%}.workday-controls>*{flex:1}.worktype-list article{grid-template-columns:1fr 120px 120px}.worktype-list article label,.worktype-list article button{grid-row:2}.report-filter-form{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.crm-chat-toolbar{grid-template-columns:1fr!important}.crm-chat-toolbar-actions{grid-template-columns:1fr 42px!important}.analytics-presets{display:grid;grid-template-columns:repeat(3,1fr)}.analytics-presets button{width:100%}.report-section{grid-template-columns:1fr}.report-section>b{padding-top:0}.report-filter-form{grid-template-columns:1fr}.report-actions{display:grid;grid-template-columns:1fr 1fr}.report-actions .primary{grid-column:1/-1}.worktype-list article{grid-template-columns:1fr 1fr}.worktype-list article input:first-child{grid-column:1/-1}.theme-cards{grid-template-columns:1fr}.workday-controls{display:grid;grid-template-columns:1fr}.recurring-expenses article{grid-template-columns:1fr}.journal-summary{grid-template-columns:1fr 1fr}}

/* GURU 1.7.1 — HISTORY / CALENDAR SCOPES / ANALYTICS / NOTIFICATION SIGNALS */
.notification-signals{display:grid;gap:9px;padding-bottom:11px;border-bottom:1px solid var(--guru-line)}
.notification-signals-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.notification-signals-head small{color:var(--muted)}
.notification-signal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.notification-signal{display:grid;grid-template-columns:32px 1fr;align-items:center;gap:9px;text-align:left;padding:10px 11px;border:1px solid var(--guru-line);border-radius:11px;background:#fff}.notification-signal>span{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:var(--guru-helper-soft)}.notification-signal>div{display:grid;gap:2px}.notification-signal small{color:var(--muted);font-size:10px}.notification-signal.warning{background:#fff8ed}.notification-signal-empty{grid-column:1/-1;padding:10px;border-radius:10px;background:#f4faf6;color:#326848;font-size:11px}
.client-history-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}.client-history-summary>div{display:grid;gap:3px;padding:11px;border:1px solid var(--guru-line);border-radius:11px;background:#fffaf3}.client-history-summary small{color:var(--muted)}.client-history-summary b{font-size:18px}.client-history-list{display:grid;gap:8px;max-height:58vh;overflow:auto}.client-history-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;border:1px solid var(--guru-line);border-radius:11px;padding:10px;background:#fff}.client-history-kind{font-size:10px;font-weight:800;color:var(--guru-primary-dark);background:var(--guru-helper-soft);border-radius:999px;padding:5px 8px}.client-history-item>div{display:grid;gap:2px}.client-history-item small,.client-history-item time{color:var(--muted);font-size:10px}.client-history-item strong{white-space:nowrap}.calendar-view-select{min-width:210px}.calendar-scope-note{margin:0 0 10px;padding:8px 11px;border:1px solid var(--line);border-radius:10px;background:#fbf7f0;color:var(--muted);font-size:11px}.analytics-section{max-width:1200px;margin:14px auto 0}.analytics-table-wrap{overflow:auto}.analytics-detail-table{width:100%;border-collapse:separate;border-spacing:0}.analytics-detail-table th,.analytics-detail-table td{padding:10px 11px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}.analytics-detail-table td:first-child{white-space:normal;min-width:190px}.analytics-detail-table td:first-child small{display:block;color:var(--muted);margin-top:2px}.analytics-detail-table tbody tr.clickable{cursor:pointer}.analytics-detail-table tbody tr.clickable:hover{background:#fff8ee}.analytics-detail-table .negative{color:#a12626}.efficiency-weights{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr)) auto;gap:9px;align-items:end;margin-bottom:13px;padding:11px;border:1px solid var(--line);border-radius:12px;background:#fbfaf7}.efficiency-weights label{display:grid;gap:4px;font-size:11px;font-weight:700;color:var(--muted)}.efficiency-weights input{min-height:40px;border:1px solid var(--line);border-radius:9px;padding:8px;background:#fff}.efficiency-weights small{font-size:9px}.efficiency-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.efficiency-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff}.efficiency-card>div:first-child{display:grid;gap:2px}.efficiency-card small{color:var(--muted)}.efficiency-card>strong{font-size:23px;color:var(--guru-primary-dark)}.efficiency-metrics{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.efficiency-metrics span{padding:7px 8px;border-radius:8px;background:#fbf7f0;font-size:10px}.product-analytics-modal{min-width:min(820px,80vw)}
html[data-guru-theme="dark"] .notification-signal,html[data-guru-theme="dark"] .client-history-item,html[data-guru-theme="dark"] .client-history-summary>div,html[data-guru-theme="dark"] .efficiency-card,html[data-guru-theme="dark"] .efficiency-weights,html[data-guru-theme="dark"] .calendar-scope-note{background:#71302D;color:var(--text);border-color:var(--line)}
html[data-guru-theme="dark"] .notification-signal.warning,html[data-guru-theme="dark"] .analytics-detail-table tbody tr.clickable:hover{background:#6b2927}
@media(max-width:720px){.notification-signal-grid,.efficiency-grid{grid-template-columns:1fr}.notification-signals-head{align-items:flex-start;flex-direction:column}.client-history-summary{grid-template-columns:1fr 1fr}.client-history-item{grid-template-columns:1fr}.client-history-kind{justify-self:start}.client-history-item>strong{justify-self:start}.calendar-view-select{min-width:0;width:100%}.efficiency-weights{grid-template-columns:1fr 1fr}.efficiency-weights button{grid-column:1/-1}.efficiency-metrics{grid-template-columns:1fr}.product-analytics-modal{min-width:0}}

/* GURU 1.8.0 */
.sale-modal{width:min(860px,96vw)}.sale-items-editor{grid-column:1/-1;border:1px solid var(--line);border-radius:14px;padding:14px;margin-top:6px}.sale-item-row{display:grid;grid-template-columns:minmax(260px,1fr) 110px 120px 42px;gap:8px;align-items:center;margin:8px 0}.sale-item-row select,.sale-item-row input{width:100%}.sale-item-row strong{text-align:right}.sale-total{display:flex;justify-content:flex-end;gap:20px;align-items:center;padding-top:10px;border-top:1px solid var(--line)}.sale-total b{font-size:20px}.delivery-filter{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.delivery-filter label{display:grid;gap:5px}.delivery-route-list{display:grid;gap:10px}.delivery-stop{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:14px;align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:14px}.route-number{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--brand2);color:var(--brand);font-weight:800;font-size:18px}.delivery-main{display:grid;gap:5px}.delivery-main p{margin:4px 0 0}.warehouse-work-list article{grid-template-columns:110px minmax(220px,1fr) 130px 140px 120px 42px}@media(max-width:720px){.sale-item-row{grid-template-columns:1fr 90px}.sale-item-row strong{grid-column:1}.delivery-stop{grid-template-columns:42px 1fr}.delivery-stop .card-actions{grid-column:1/-1}.warehouse-work-list article{grid-template-columns:1fr}}
/* GURU 1.8.0 — ANALYTICS FIX / MULTI-ITEM ORDERS / DELIVERY / CHAT ADMIN / WAREHOUSE WORK */

/* GURU 1.8.1 — CALM THEMES / DAILY WAREHOUSE WORK / MANAGER ANALYTICS */
:root{
  --guru-sidebar:#802F2D;--guru-sidebar-hover:#6f2827;--guru-sidebar-active:#EFDBB2;
  --guru-work:#f6f1e9;--guru-panel:#fffdf9;--guru-panel-2:#fbf7f0;--guru-input:#fff;
  --guru-text:#302725;--guru-muted:#756763;--guru-border:#e5d8cb;
}
html[data-guru-theme="standard"] body{background:var(--guru-work);color:var(--guru-text)}
.desktop-sidebar{background:var(--guru-sidebar)!important;border-right:0!important;color:#fff}
.desktop-sidebar>.brand{border-bottom-color:#ffffff2b!important}.desktop-sidebar .brand b{color:#fff!important}.desktop-sidebar .brand span{color:#ead8cf!important}
.desktop-sidebar .nav-group{color:#d8aaa5!important}.desktop-sidebar .nav-item{color:#f8eee8!important}.desktop-sidebar .nav-item:hover{background:var(--guru-sidebar-hover)!important;color:#fff!important}.desktop-sidebar .nav-item.active{background:var(--guru-sidebar-active)!important;color:#56211f!important}.desktop-sidebar .nav-icon{color:currentColor!important}
html[data-guru-theme="standard"] .shell main,html[data-guru-theme="standard"] .content{background:var(--guru-work)}
html[data-guru-theme="standard"] .shell header,html[data-guru-theme="standard"] .panel,html[data-guru-theme="standard"] .stat,html[data-guru-theme="standard"] .mini-stat,html[data-guru-theme="standard"] .table-wrap,html[data-guru-theme="standard"] .modal,html[data-guru-theme="standard"] .reports-top,html[data-guru-theme="standard"] .workspace-filters,html[data-guru-theme="standard"] .delivery-stop{background:var(--guru-panel);border-color:var(--guru-border)}
html[data-guru-theme="standard"] input,html[data-guru-theme="standard"] select,html[data-guru-theme="standard"] textarea{background:var(--guru-input);border-color:var(--guru-border);color:var(--guru-text)}

html[data-guru-theme="dark"]{
  --brand:#a84d49;--brand2:#efdbb2;--accent:#c96560;--surface:#171615;--text:#f4eee8;--muted:#b9aaa2;--line:#3c3734;
  --guru-work:#171615;--guru-panel:#211f1d;--guru-panel-2:#292623;--guru-input:#2b2825;--guru-text:#f4eee8;--guru-muted:#b9aaa2;--guru-border:#3d3834;
}
html[data-guru-theme="dark"] body{background:var(--guru-work)!important;color:var(--guru-text)!important}
html[data-guru-theme="dark"] .desktop-sidebar{background:#702a28!important;color:#fff!important}
html[data-guru-theme="dark"] .desktop-sidebar .nav-item{color:#f7eae3!important}
html[data-guru-theme="dark"] .desktop-sidebar .nav-item:hover{background:#5e2221!important}
html[data-guru-theme="dark"] .desktop-sidebar .nav-item.active{background:#EFDBB2!important;color:#4f1e1c!important}
html[data-guru-theme="dark"] .shell main,html[data-guru-theme="dark"] .content{background:var(--guru-work)!important}
html[data-guru-theme="dark"] .shell header,html[data-guru-theme="dark"] .panel,html[data-guru-theme="dark"] .stat,html[data-guru-theme="dark"] .mini-stat,html[data-guru-theme="dark"] .table-wrap,html[data-guru-theme="dark"] .modal,html[data-guru-theme="dark"] .reports-top,html[data-guru-theme="dark"] .workspace-filters,html[data-guru-theme="dark"] .quick-report-group,html[data-guru-theme="dark"] .backup-list article,html[data-guru-theme="dark"] .theme-card,html[data-guru-theme="dark"] .worktype-list article,html[data-guru-theme="dark"] .recurring-expenses article,html[data-guru-theme="dark"] .workday-person,html[data-guru-theme="dark"] .delivery-stop,html[data-guru-theme="dark"] .warehouse-day-row,html[data-guru-theme="dark"] .manager-kpi{background:var(--guru-panel)!important;color:var(--guru-text)!important;border-color:var(--guru-border)!important}
html[data-guru-theme="dark"] button,html[data-guru-theme="dark"] input,html[data-guru-theme="dark"] select,html[data-guru-theme="dark"] textarea{background:var(--guru-input)!important;color:var(--guru-text)!important;border-color:#4b4540!important}
html[data-guru-theme="dark"] .primary{background:#9a403d!important;border-color:#9a403d!important;color:#fff!important}
html[data-guru-theme="dark"] th{background:#292623!important;color:#d6c8bf!important}html[data-guru-theme="dark"] tbody tr:hover{background:#2b2825!important}
html[data-guru-theme="dark"] .crm-chat,html[data-guru-theme="dark"] .crm-chat-panel,html[data-guru-theme="dark"] .crm-chat-sidebar,html[data-guru-theme="dark"] .crm-chat-toolbar,html[data-guru-theme="dark"] .crm-chat-compose,html[data-guru-theme="dark"] .crm-chat-bubble{background:var(--guru-panel)!important;color:var(--guru-text)!important;border-color:var(--guru-border)!important}
html[data-guru-theme="dark"] .crm-chat-list{background:#191817!important}
html[data-guru-theme="dark"] .efficiency-card,html[data-guru-theme="dark"] .efficiency-weights,html[data-guru-theme="dark"] .client-history-item,html[data-guru-theme="dark"] .client-history-summary>div{background:var(--guru-panel-2)!important;color:var(--guru-text)!important;border-color:var(--guru-border)!important}
.theme-preview.standard{grid-template-columns:32% 68%}.theme-preview.standard i:first-child{background:#802F2D}.theme-preview.standard i:last-child{background:#f6f1e9}
.theme-preview.dark{grid-template-columns:32% 68%}.theme-preview.dark i:first-child{background:#702a28}.theme-preview.dark i:last-child{background:#171615}

.workday-stock-alert{width:100%;display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:12px;margin:0 0 18px;padding:13px 16px;text-align:left;border:1px solid #dfb36f;background:#fff7e8;border-radius:14px;color:#5c3a12}
.workday-stock-alert>span{width:38px;height:38px;display:grid;place-items:center;background:#f7dfb7;border-radius:11px;font-size:20px}.workday-stock-alert>div{display:grid;gap:2px}.workday-stock-alert small{color:#805c31}.workday-stock-alert strong{font-size:12px}
html[data-guru-theme="dark"] .workday-stock-alert{background:#332a20!important;color:#f4d9ae!important;border-color:#5c4931!important}

.warehouse-day-head{display:flex;justify-content:space-between;gap:18px;align-items:center}.warehouse-day-controls{display:flex;align-items:end;gap:10px}.warehouse-day-controls label{display:grid;gap:5px;font-size:11px;font-weight:700}.warehouse-day-controls select,.warehouse-day-controls input{min-height:42px}
.warehouse-day-sheet{max-width:1050px}.warehouse-day-total{display:grid;text-align:right;gap:2px}.warehouse-day-total small{color:var(--muted)}.warehouse-day-total b{font-size:24px;color:var(--brand)}
.warehouse-day-list{display:grid;gap:8px}.warehouse-day-row{display:grid;grid-template-columns:minmax(220px,1fr) 180px 170px;gap:14px;align-items:center;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:#fff}.warehouse-day-row>div:first-child{display:grid;gap:3px}.warehouse-day-row small{color:var(--muted)}.warehouse-day-row label{display:grid;grid-template-columns:auto 100px;align-items:center;gap:8px;font-size:11px}.warehouse-day-row input{text-align:right}.warehouse-day-amount{display:grid;text-align:right;gap:3px}.warehouse-day-amount strong{font-size:17px}.warehouse-day-actions{display:flex;justify-content:flex-end;padding-top:14px}

.analytics-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 0 14px;padding:6px 2px}.analytics-hero h2{font-size:30px;margin:4px 0}.analytics-hero p{margin:0;color:var(--muted)}.analytics-eyebrow{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.12em;color:var(--brand)}.analytics-period-caption{display:grid;text-align:right;gap:3px}.analytics-period-caption small{color:var(--muted)}
.analytics-period-panel{display:grid;gap:14px}.manager-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:12px;margin-bottom:14px}.manager-kpi{display:grid;gap:8px;padding:15px;border:1px solid var(--line);border-radius:14px;background:#fff}.manager-kpi>small{font-weight:700;color:var(--muted)}.manager-kpi>b{font-size:23px}.manager-kpi>div{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:var(--muted)}.manager-kpi em{font-style:normal;font-weight:800}.manager-kpi em.up{color:#287549}.manager-kpi em.down{color:#b23d3d}.manager-kpi.featured{border-color:color-mix(in srgb,var(--brand) 45%,var(--line));box-shadow:0 5px 18px #802f2d10}
.analytics-management-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:14px}.manager-block{margin-bottom:14px}.ops-kpi-list{display:grid;gap:8px}.ops-kpi-list button{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;text-align:left;padding:11px 12px}.ops-kpi-list em{font-size:10px;font-style:normal;color:var(--muted)}
.warehouse-money-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.warehouse-money-grid>div{display:grid;gap:3px;padding:12px;border-radius:10px;background:var(--guru-panel-2,#fbf7f0)}.warehouse-money-grid small{color:var(--muted)}.warehouse-money-grid b{font-size:18px}
.document-upload-modal #documentUploadState{grid-column:1/-1}

@media(max-width:1000px){.manager-kpi-grid{grid-template-columns:repeat(2,1fr)}.analytics-management-grid{grid-template-columns:1fr}.warehouse-day-head{align-items:stretch;flex-direction:column}.warehouse-day-controls{width:100%}}
@media(max-width:720px){.manager-kpi-grid{grid-template-columns:1fr 1fr}.analytics-hero{align-items:flex-start;flex-direction:column}.analytics-period-caption{text-align:left}.warehouse-day-controls{display:grid;grid-template-columns:1fr}.warehouse-day-row{grid-template-columns:1fr 1fr}.warehouse-day-row>div:first-child{grid-column:1/-1}.warehouse-day-amount{text-align:left}.workday-stock-alert{grid-template-columns:36px 1fr}.workday-stock-alert>strong{grid-column:1/-1}.mobile-top-nav{background:#702a28!important}.mobile-top-nav .nav-label{color:#f1d9cf!important}.mobile-top-nav .nav-item.active .nav-label{color:#EFDBB2!important}}
@media(max-width:480px){.manager-kpi-grid{grid-template-columns:1fr}.warehouse-day-row{grid-template-columns:1fr}.warehouse-day-row label{grid-template-columns:1fr 100px}}


/* GURU 1.8.3 — SORTABLE NAV / PRODUCT FOLDERS / REFINED DARK THEME */
.nav-sort-group{display:flex!important;align-items:center;justify-content:space-between;gap:8px}.nav-sort-group small{font-size:8px;font-weight:600;letter-spacing:0;text-transform:none;opacity:.72}.nav-drag-handle{margin-left:auto;opacity:0;transition:opacity .15s ease;cursor:grab;font-size:12px;letter-spacing:-2px}.desktop-sidebar .nav-item:hover .nav-drag-handle{opacity:.65}.desktop-sidebar .nav-item.dragging{opacity:.42;outline:1px dashed #efdbb2;outline-offset:-3px}.desktop-sidebar [data-nav-sortable]{cursor:pointer}.desktop-sidebar [data-nav-sortable]:active .nav-drag-handle{cursor:grabbing}
.product-folder-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}.product-folder-tabs{display:flex;gap:7px;flex-wrap:wrap;min-width:0}.product-folder-tabs button{display:inline-flex;align-items:center;gap:7px;min-height:38px;border-radius:10px}.product-folder-tabs button span{min-width:20px;height:20px;padding:0 6px;display:inline-grid;place-items:center;border-radius:999px;background:color-mix(in srgb,var(--brand) 9%,transparent);font-size:9px}.product-folder-tabs button.active{background:var(--brand);border-color:var(--brand);color:#fff}.product-folder-tabs button.active span{background:#ffffff24}.product-folder-manager{display:grid;gap:14px}.product-folder-add{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:8px}.product-folder-list{display:grid;gap:8px;max-height:52vh;overflow:auto}.product-folder-list article{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:8px;align-items:center;padding:9px;border:1px solid var(--guru-border,var(--line));border-radius:11px;background:var(--guru-panel,#fff)}.product-folder-list article>div{display:flex;gap:6px}.product-folder-list input{width:100%}

/* Dark theme: calm graphite workspace + branded burgundy navigation. */
html[data-guru-theme="dark"]{
 color-scheme:dark;
 --brand:#b85c57;--brand2:#d8c39d;--accent:#c87570;--surface:#101319;--text:#f2eee9;--muted:#a7aab2;--line:#303640;
 --guru-sidebar:#672724;--guru-sidebar-hover:#79312d;--guru-sidebar-active:#e8d5aa;
 --guru-work:#101319;--guru-panel:#171b22;--guru-panel-2:#1d222b;--guru-input:#12161c;--guru-text:#f2eee9;--guru-muted:#a7aab2;--guru-border:#303640;
}
html[data-guru-theme="dark"] body,html[data-guru-theme="dark"] .shell main,html[data-guru-theme="dark"] .content{background:#101319!important;color:#f2eee9!important}
html[data-guru-theme="dark"] .desktop-sidebar{background:linear-gradient(180deg,#6d2926 0%,#5d2221 100%)!important;box-shadow:8px 0 28px #00000022!important}
html[data-guru-theme="dark"] .desktop-sidebar .brand span,html[data-guru-theme="dark"] .desktop-sidebar .nav-group{color:#ddbcb4!important}
html[data-guru-theme="dark"] .desktop-sidebar .nav-item{background:transparent!important;color:#f5e9e5!important;border-color:transparent!important}
html[data-guru-theme="dark"] .desktop-sidebar .nav-item:hover{background:#7a312e!important;color:#fff!important}
html[data-guru-theme="dark"] .desktop-sidebar .nav-item.active{background:#ead8af!important;color:#4b1c1a!important;box-shadow:0 5px 16px #00000020!important}
html[data-guru-theme="dark"] .app-header,html[data-guru-theme="dark"] .shell header{background:#151920!important;border-color:#2c323c!important;color:#f2eee9!important;box-shadow:0 1px 0 #ffffff05!important}
html[data-guru-theme="dark"] .panel,html[data-guru-theme="dark"] .stat,html[data-guru-theme="dark"] .mini-stat,html[data-guru-theme="dark"] .table-wrap,html[data-guru-theme="dark"] .modal,html[data-guru-theme="dark"] .reports-top,html[data-guru-theme="dark"] .workspace-filters,html[data-guru-theme="dark"] .quick-report-group,html[data-guru-theme="dark"] .backup-list article,html[data-guru-theme="dark"] .theme-card,html[data-guru-theme="dark"] .worktype-list article,html[data-guru-theme="dark"] .recurring-expenses article,html[data-guru-theme="dark"] .workday-person,html[data-guru-theme="dark"] .delivery-stop,html[data-guru-theme="dark"] .warehouse-day-row,html[data-guru-theme="dark"] .manager-kpi,html[data-guru-theme="dark"] .product-card,html[data-guru-theme="dark"] .stock-card,html[data-guru-theme="dark"] .task-card,html[data-guru-theme="dark"] .manager-block,html[data-guru-theme="dark"] .product-folder-list article{background:#171b22!important;color:#f2eee9!important;border-color:#303640!important;box-shadow:none!important}
html[data-guru-theme="dark"] .manager-kpi.featured{border-color:#6c3b39!important;box-shadow:0 8px 24px #00000020!important}
html[data-guru-theme="dark"] .warehouse-money-grid>div,html[data-guru-theme="dark"] .efficiency-card,html[data-guru-theme="dark"] .efficiency-weights,html[data-guru-theme="dark"] .client-history-item,html[data-guru-theme="dark"] .client-history-summary>div,html[data-guru-theme="dark"] .notification-item,html[data-guru-theme="dark"] .notification-signal{background:#1d222b!important;color:#f2eee9!important;border-color:#323944!important}
html[data-guru-theme="dark"] input,html[data-guru-theme="dark"] select,html[data-guru-theme="dark"] textarea,html[data-guru-theme="dark"] button:not(.primary):not(.nav-item){background:#12161c!important;color:#ece7e2!important;border-color:#343b46!important}
html[data-guru-theme="dark"] input:focus,html[data-guru-theme="dark"] select:focus,html[data-guru-theme="dark"] textarea:focus{border-color:#a85450!important;box-shadow:0 0 0 3px #a854501f!important;outline:none}
html[data-guru-theme="dark"] .primary,html[data-guru-theme="dark"] .tabs button.active,html[data-guru-theme="dark"] .report-section button.active,html[data-guru-theme="dark"] .product-folder-tabs button.active{background:#a94f4b!important;border-color:#a94f4b!important;color:#fff!important}
html[data-guru-theme="dark"] .primary:hover{background:#bc5c57!important;border-color:#bc5c57!important}
html[data-guru-theme="dark"] th{background:#1b2028!important;color:#cbc4bd!important;border-color:#303640!important}html[data-guru-theme="dark"] td{border-color:#2b313b!important}html[data-guru-theme="dark"] tbody tr:hover{background:#1b2028!important}
html[data-guru-theme="dark"] .crm-chat,html[data-guru-theme="dark"] .crm-chat-panel,html[data-guru-theme="dark"] .crm-chat-sidebar,html[data-guru-theme="dark"] .crm-chat-toolbar,html[data-guru-theme="dark"] .crm-chat-compose,html[data-guru-theme="dark"] .crm-chat-bubble{background:#171b22!important;color:#f2eee9!important;border-color:#303640!important}html[data-guru-theme="dark"] .crm-chat-list{background:#11151b!important}
html[data-guru-theme="dark"] .notification-bell{background:#191e26!important;color:#ead8af!important;border-color:#353c47!important}html[data-guru-theme="dark"] .notification-item.unread{background:#24252b!important;border-color:#6f4743!important}
html[data-guru-theme="dark"] .workday-stock-alert{background:#27231c!important;color:#ead8af!important;border-color:#554a35!important}
html[data-guru-theme="dark"] .product-folder-tabs button span{background:#ffffff10}.theme-preview.dark i:first-child{background:#672724!important}.theme-preview.dark i:last-child{background:#101319!important}
html[data-guru-theme="dark"] ::-webkit-scrollbar{width:10px;height:10px}html[data-guru-theme="dark"] ::-webkit-scrollbar-track{background:#101319}html[data-guru-theme="dark"] ::-webkit-scrollbar-thumb{background:#343b46;border-radius:99px;border:2px solid #101319}
@media(max-width:720px){.product-folder-bar{align-items:stretch;flex-direction:column}.product-folder-bar>button{width:100%}.product-folder-add{grid-template-columns:1fr}.product-folder-list article{grid-template-columns:1fr}.nav-drag-handle{display:none}html[data-guru-theme="dark"] .mobile-top-nav{background:#672724!important}}
/* v1.8.3 dark-theme finishing pass: remove residual burgundy content surfaces from older layers. */
html[data-guru-theme="dark"] .source-only-note,html[data-guru-theme="dark"] .record-context-line,html[data-guru-theme="dark"] .journal-summary article,html[data-guru-theme="dark"] .task-detail-meta>span,html[data-guru-theme="dark"] .task-subsection,html[data-guru-theme="dark"] .diag-kpis article,html[data-guru-theme="dark"] .diag-grid section,html[data-guru-theme="dark"] .diag-log article,html[data-guru-theme="dark"] .calendar-scope-note,html[data-guru-theme="dark"] .efficiency-metrics span,html[data-guru-theme="dark"] .qr-resolved,html[data-guru-theme="dark"] .inventory-doc,html[data-guru-theme="dark"] .inventory-note-field textarea{background:#1d222b!important;color:#f2eee9!important;border-color:#323944!important}
html[data-guru-theme="dark"] .crm-chat-search,html[data-guru-theme="dark"] .crm-chat-message.announcement,html[data-guru-theme="dark"] .notification-signal.warning{background:#242126!important;border-color:#4e3a3a!important;color:#f2eee9!important}
html[data-guru-theme="dark"] .analytics-detail-table tbody tr.clickable:hover{background:#20252e!important}
html[data-guru-theme="dark"] .danger-chip{background:#3a2225!important;color:#f0b4ad!important;border-color:#64383b!important}
html[data-guru-theme="dark"] a{color:#d5b27f}

/* GURU 1.8.4 — GROUPED SORTABLE NAV */
.desktop-sidebar .nav-section-group{margin:5px 0 9px;padding:0 0 5px;border-bottom:1px solid #ffffff18;border-radius:10px;transition:opacity .15s ease,transform .15s ease,background .15s ease}
.desktop-sidebar .nav-section-group:last-of-type{margin-bottom:8px}
.desktop-sidebar .nav-group-head{padding:10px 11px 5px!important;margin:0!important;display:flex!important;align-items:center;justify-content:space-between;gap:8px;cursor:grab;user-select:none;color:#d8aaa5!important}
.desktop-sidebar .nav-group-head span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.desktop-sidebar .nav-group-head small{font-size:12px!important;line-height:1;letter-spacing:-2px!important;opacity:.38;transition:opacity .15s ease;color:#efdbb2!important}
.desktop-sidebar .nav-group-head:hover small{opacity:.85}
.desktop-sidebar .nav-group-head:active{cursor:grabbing}
.desktop-sidebar .nav-group-items{display:grid;gap:1px}
.desktop-sidebar .nav-section-group.group-dragging{opacity:.42;transform:scale(.985);background:#ffffff0b;outline:1px dashed #efdbb288;outline-offset:2px}
.desktop-sidebar .nav-section-group .nav-item{margin:1px 0}
.desktop-sidebar .nav-section-group .nav-drag-handle{font-size:11px}
html[data-guru-theme="dark"] .desktop-sidebar .nav-section-group{border-bottom-color:#ffffff12}
html[data-guru-theme="dark"] .desktop-sidebar .nav-group-head{color:#ddbcb4!important}
@media(max-width:900px){.desktop-sidebar .nav-group-head{padding-left:5px!important;padding-right:5px!important}.desktop-sidebar .nav-group-head span{font-size:8px}.desktop-sidebar .nav-group-head small{display:none}}
@media(max-width:720px){.desktop-sidebar .nav-section-group{border:0;margin:0;padding:0}.desktop-sidebar .nav-group-head{display:none!important}}


/* GURU 1.8.5 — DARK VISUAL AUDIT / WAREHOUSE QUANTITY / ROLE SAFETY */
.warehouse-work-entry{grid-template-columns:minmax(260px,1fr) minmax(250px,330px) minmax(150px,190px);padding:18px 20px;border-radius:16px;min-height:96px;box-shadow:0 6px 20px rgba(50,35,30,.035)}
.warehouse-work-info{display:grid!important;gap:7px!important}.warehouse-work-info>b{font-size:16px;line-height:1.25}.warehouse-work-rate{display:inline-flex;width:max-content;max-width:100%;padding:5px 9px;border-radius:999px;background:color-mix(in srgb,var(--brand) 8%,#fff);color:var(--brand);font-size:11px;font-weight:750}
.warehouse-work-qty{display:grid;grid-template-columns:1fr auto;gap:6px 10px;align-items:center}.warehouse-work-qty>span{grid-column:1/-1;font-size:11px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.warehouse-work-qty>small{font-size:11px;color:var(--muted);white-space:nowrap}.warehouse-qty-control{display:grid;grid-template-columns:48px minmax(100px,1fr) 48px;align-items:stretch;height:52px;border:1px solid var(--line);border-radius:13px;overflow:hidden;background:#fff}.warehouse-qty-control button{border:0;border-radius:0;padding:0;font-size:23px;font-weight:500;background:#faf7f2;color:var(--brand)}.warehouse-qty-control button:hover{background:color-mix(in srgb,var(--brand) 8%,#fff)}.warehouse-qty-control input{width:100%;height:100%;border:0!important;border-left:1px solid var(--line)!important;border-right:1px solid var(--line)!important;border-radius:0!important;text-align:center!important;font-size:20px;font-weight:800;padding:0 8px;background:#fff}.warehouse-day-amount{padding-left:16px;border-left:1px solid var(--line)}.warehouse-day-amount strong{font-size:20px}.warehouse-day-save{min-height:44px;padding-inline:20px}
.document-download-note{color:#9a6a2d!important}.role-security-note{margin:0 0 14px;padding:11px 13px;border:1px solid #e7d4ad;border-radius:11px;background:#fff8e9;color:#674b25;font-size:12px;line-height:1.45}

/* One coherent graphite system for every legacy and modern workspace. */
html[data-guru-theme="dark"]{--surface:#0f1217;--text:#f1ede7;--muted:#9da5b1;--line:#2b323d;--guru-work:#0f1217;--guru-panel:#161b23;--guru-panel-2:#1c222c;--guru-input:#10151c;--guru-text:#f1ede7;--guru-muted:#9da5b1;--guru-border:#2b323d}
html[data-guru-theme="dark"] body,html[data-guru-theme="dark"] .shell main,html[data-guru-theme="dark"] .content{background:#0f1217!important;color:#f1ede7!important}
html[data-guru-theme="dark"] .shell header{background:#131820!important;border-color:#29303a!important;color:#f1ede7!important}
html[data-guru-theme="dark"] .panel,html[data-guru-theme="dark"] .stat,html[data-guru-theme="dark"] .mini-stat,html[data-guru-theme="dark"] .table-wrap,html[data-guru-theme="dark"] .modal,html[data-guru-theme="dark"] .client-card,html[data-guru-theme="dark"] .deal-card,html[data-guru-theme="dark"] .task-card,html[data-guru-theme="dark"] .product-card,html[data-guru-theme="dark"] .stock-card,html[data-guru-theme="dark"] .purchase-card,html[data-guru-theme="dark"] .operation-list article,html[data-guru-theme="dark"] .payroll-card,html[data-guru-theme="dark"] .document-card,html[data-guru-theme="dark"] .scanner-panel,html[data-guru-theme="dark"] .code-card,html[data-guru-theme="dark"] .employee-card,html[data-guru-theme="dark"] .report-card,html[data-guru-theme="dark"] .integration-card,html[data-guru-theme="dark"] .analytics-compare-card,html[data-guru-theme="dark"] .inventory-list>button,html[data-guru-theme="dark"] .role-box,html[data-guru-theme="dark"] .permission-table{background:#161b23!important;color:#f1ede7!important;border-color:#2b323d!important;box-shadow:none!important}
html[data-guru-theme="dark"] .pipeline-col,html[data-guru-theme="dark"] .task-col,html[data-guru-theme="dark"] .board-col{background:#12171e!important;color:#f1ede7!important;border-color:#2a313b!important}
html[data-guru-theme="dark"] .pipeline-col>header span,html[data-guru-theme="dark"] .task-col>header span{background:#242b35!important;color:#d9dde4!important}
html[data-guru-theme="dark"] .task-card p,html[data-guru-theme="dark"] .task-meta,html[data-guru-theme="dark"] .deal-card small,html[data-guru-theme="dark"] .column-empty{color:#9da5b1!important}
html[data-guru-theme="dark"] .task-overdue{background:#24191d!important;border-color:#63343c!important}
html[data-guru-theme="dark"] .priority-критический,html[data-guru-theme="dark"] .priority-высокий{color:#f19592!important}
html[data-guru-theme="dark"] .task-interval-track,html[data-guru-theme="dark"] .deal-progress,html[data-guru-theme="dark"] .payment-bar,html[data-guru-theme="dark"] .stock-meter{background:#262d37!important}
html[data-guru-theme="dark"] .task-check-item,html[data-guru-theme="dark"] .task-comments article,html[data-guru-theme="dark"] .task-inline-form input,html[data-guru-theme="dark"] .task-comment-form textarea{background:#11161d!important;color:#f1ede7!important;border-color:#303844!important}
html[data-guru-theme="dark"] .task-detail-head p,html[data-guru-theme="dark"] .task-comments time,html[data-guru-theme="dark"] .task-subsection-title span{color:#9da5b1!important}

html[data-guru-theme="dark"] .month-calendar{background:#141920!important;border-color:#2b323d!important;box-shadow:0 12px 36px #00000022}
html[data-guru-theme="dark"] .week-head{background:#1a2029!important;border-color:#2b323d!important}.week-head b{color:#aeb5c0!important}
html[data-guru-theme="dark"] .day-cell{background:#151a22!important;color:#e8e5df!important;border-color:#29313b!important}
html[data-guru-theme="dark"] .day-cell.foreign{background:#11151b!important;color:#636d79!important}
html[data-guru-theme="dark"] .day-cell.today{background:#1b2028!important;box-shadow:inset 0 0 0 2px #b85c57!important}
html[data-guru-theme="dark"] .day-number{color:#dfe3e8!important}
html[data-guru-theme="dark"] .event-chip{background:#252c37!important;color:#e6d9bd!important;border:1px solid #353e4a!important}
html[data-guru-theme="dark"] .event-chip:hover{background:#303846!important;border-color:#4a5665!important}
html[data-guru-theme="dark"] .event-chip.event-task{background:#2a2520!important;color:#efd7ae!important;border-color:#4e4332!important}
html[data-guru-theme="dark"] .calendar-title{color:#f1ede7!important}.calendar-scope-note{box-shadow:none!important}

html[data-guru-theme="dark"] input,html[data-guru-theme="dark"] select,html[data-guru-theme="dark"] textarea,html[data-guru-theme="dark"] button:not(.primary):not(.nav-item){background:#10151c!important;color:#ece9e4!important;border-color:#303845!important}
html[data-guru-theme="dark"] input::placeholder,html[data-guru-theme="dark"] textarea::placeholder{color:#6f7884!important}
html[data-guru-theme="dark"] select option{background:#171c24!important;color:#f1ede7!important}
html[data-guru-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(.82) sepia(.08) saturate(.5)!important;opacity:.85}
html[data-guru-theme="dark"] .modal-back{background:rgba(2,5,10,.72)!important;backdrop-filter:blur(3px)}
html[data-guru-theme="dark"] .modal-title button{background:transparent!important;border-color:transparent!important;color:#c9cdd3!important}
html[data-guru-theme="dark"] .status-badge{background:#242d39!important;color:#cfd9e8!important;border:1px solid #334052!important}
html[data-guru-theme="dark"] .workspace-meta span,html[data-guru-theme="dark"] .chips span{background:#20262f!important;color:#bdc4ce!important}
html[data-guru-theme="dark"] .client-avatar,html[data-guru-theme="dark"] .employee-avatar,html[data-guru-theme="dark"] .report-icon,html[data-guru-theme="dark"] .integration-logo{background:#252b35!important;color:#d7bb91!important}
html[data-guru-theme="dark"] .finance-row{border-color:#2b323d!important}.money-sign.minus{background:#382126!important;color:#f19b97!important}.money-sign.plus{background:#183228!important;color:#78d7a3!important}
html[data-guru-theme="dark"] .bar-expense{background:#b85555!important}
html[data-guru-theme="dark"] .role-security-note{background:#252116!important;color:#e8d1a8!important;border-color:#4b412b!important}
html[data-guru-theme="dark"] .document-download-note{color:#d7b77e!important}
html[data-guru-theme="dark"] .error{background:#321d22!important;color:#f4aaa5!important;border:1px solid #5c3038!important}.notice{border:1px solid transparent}html[data-guru-theme="dark"] .notice{background:#172a23!important;color:#a7dfbd!important;border-color:#294638!important}html[data-guru-theme="dark"] .warning{background:#2e281d!important;color:#e4c88e!important;border-color:#4b402c!important}
html[data-guru-theme="dark"] .empty,html[data-guru-theme="dark"] .skeleton{color:#7f8995!important}
html[data-guru-theme="dark"] a{color:#d9b77f!important}

html[data-guru-theme="dark"] .warehouse-work-entry{background:linear-gradient(180deg,#181e27 0%,#151a22 100%)!important;border-color:#303844!important;box-shadow:0 8px 24px #00000018!important}
html[data-guru-theme="dark"] .warehouse-work-rate{background:#29251f!important;color:#e7c894!important}
html[data-guru-theme="dark"] .warehouse-qty-control{background:#10151c!important;border-color:#343d49!important}
html[data-guru-theme="dark"] .warehouse-qty-control button{background:#1c222b!important;color:#e3c69a!important}.warehouse-qty-control button:hover{background:#252d38!important}
html[data-guru-theme="dark"] .warehouse-qty-control input{background:#10151c!important;color:#fff!important;border-color:#343d49!important}
html[data-guru-theme="dark"] .warehouse-day-amount{border-color:#303844!important}
html[data-guru-theme="dark"] .warehouse-day-total b{color:#e0b97f!important}

@media(max-width:760px){.warehouse-work-entry{grid-template-columns:1fr;gap:12px;padding:15px}.warehouse-day-amount{padding:0;border-left:0;border-top:1px solid var(--line);padding-top:10px;text-align:left}.warehouse-work-qty{grid-template-columns:1fr auto}.warehouse-qty-control{grid-column:1/2;min-width:220px}.warehouse-day-save{width:100%}}

.document-access-lock{display:grid;gap:5px;padding:11px 13px;border:1px solid var(--line);border-radius:11px;background:#fbf7f0}.document-access-lock small{color:var(--muted);font-size:11px;line-height:1.4}html[data-guru-theme="dark"] .document-access-lock{background:#1c222c!important;border-color:#303844!important;color:#f1ede7!important}

/* GURU 1.8.5 — final dark-surface cleanup after full workspace audit */
html[data-guru-theme="dark"] .chat-shell,
html[data-guru-theme="dark"] .message-body,
html[data-guru-theme="dark"] .feed-card,
html[data-guru-theme="dark"] .timeline article,
html[data-guru-theme="dark"] .analytics-grid article,
html[data-guru-theme="dark"] .board-card,
html[data-guru-theme="dark"] .external-history article,
html[data-guru-theme="dark"] .system-permission-list label,
html[data-guru-theme="dark"] .checklist-kpi,
html[data-guru-theme="dark"] .checklist-module-row,
html[data-guru-theme="dark"] .automation-form>label:not(.automation-toggle),
html[data-guru-theme="dark"] .automation-toggle,
html[data-guru-theme="dark"] .delivery-route-card,
html[data-guru-theme="dark"] .delivery-card,
html[data-guru-theme="dark"] .inventory-list>article{
  background:#171b22!important;
  color:#f2eee9!important;
  border-color:#303640!important;
  box-shadow:none!important;
}
html[data-guru-theme="dark"] .client-toolbar input,
html[data-guru-theme="dark"] .client-toolbar select,
html[data-guru-theme="dark"] .chat-recipient select,
html[data-guru-theme="dark"] .chat-attach,
html[data-guru-theme="dark"] .crm-chat-recipient select,
html[data-guru-theme="dark"] .crm-chat-attach,
html[data-guru-theme="dark"] .worktype-list input,
html[data-guru-theme="dark"] .worktype-list select,
html[data-guru-theme="dark"] .efficiency-weights input,
html[data-guru-theme="dark"] .report-filter-form input,
html[data-guru-theme="dark"] .report-filter-form select{
  background:#10151c!important;
  color:#ece9e4!important;
  border-color:#303845!important;
}
html[data-guru-theme="dark"] .board-col h4 span,
html[data-guru-theme="dark"] .task-detail-meta>span,
html[data-guru-theme="dark"] .client-history-kind{
  background:#242b35!important;
  color:#ded5c7!important;
}
html[data-guru-theme="dark"] .overdue-row,
html[data-guru-theme="dark"] .overdue-card,
html[data-guru-theme="dark"] .task-overdue{
  background:#24191d!important;
  border-color:#63343c!important;
}
html[data-guru-theme="dark"] .alert-strip span,
html[data-guru-theme="dark"] .workday-alerts button,
html[data-guru-theme="dark"] .checklist-warnings,
html[data-guru-theme="dark"] .checklist-requirements>div{
  background:#292318!important;
  color:#e8cf9b!important;
  border-color:#55472e!important;
}
html[data-guru-theme="dark"] .danger-action,
html[data-guru-theme="dark"] .danger-action:hover{
  background:#342025!important;
  color:#f1aaa5!important;
  border-color:#60353c!important;
}
html[data-guru-theme="dark"] .calendar-view-select,
html[data-guru-theme="dark"] .warehouse-day-controls,
html[data-guru-theme="dark"] .module-head,
html[data-guru-theme="dark"] .toolbar{
  color:#f1ede7!important;
}
html[data-guru-theme="dark"] .calendar-scope-note,
html[data-guru-theme="dark"] .source-only-note,
html[data-guru-theme="dark"] .document-access-lock{
  background:#1c222c!important;
  color:#d6d9df!important;
  border-color:#303844!important;
}
html[data-guru-theme="dark"] .warehouse-day-sheet .empty,
html[data-guru-theme="dark"] .task-col .empty,
html[data-guru-theme="dark"] .calendar-empty{
  color:#808a96!important;
}
html[data-guru-theme="dark"] .modal-actions{
  border-color:#2b323d!important;
}


/* ===== GURU 1.8.6 — UX POLISH / WORKDAY PAYROLL / MOBILE ===== */
.desktop-sidebar{scroll-behavior:auto;overscroll-behavior:contain}
.app-header>div:first-child>span{font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--brand)!important}
.workday-payroll{overflow:hidden;padding:0}.workday-payroll-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;padding:22px 24px 18px;background:linear-gradient(135deg,color-mix(in srgb,var(--brand2) 28%,#fff),#fff)}.workday-payroll-head h3{margin:4px 0 4px;font-size:21px}.workday-payroll-head p{margin:0;color:var(--muted);max-width:700px}.workday-payroll .eyebrow{font-size:10px;text-transform:uppercase;letter-spacing:.12em;font-weight:900;color:var(--brand)}.workday-payroll-total{min-width:180px;text-align:right;display:grid;gap:2px}.workday-payroll-total small,.workday-payroll-total span{color:var(--muted);font-size:10px}.workday-payroll-total b{font-size:28px;color:var(--brand)}.workday-payroll-list{display:grid;gap:0;padding:0 24px}.workday-payroll-list article{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-top:1px solid var(--line)}.workday-payroll-list article div{display:grid;gap:3px}.workday-payroll-list article small{color:var(--muted)}.workday-payroll-list article strong{font-size:16px}.workday-payroll-actions{display:flex;gap:8px;justify-content:flex-end;padding:16px 24px;border-top:1px solid var(--line)}.empty.compact{padding:22px}
.orders-control-panel,.tasks-control-panel{margin:0 0 14px}.order-status-tabs,.task-view-tabs{display:flex;gap:7px;overflow:auto;padding:3px 1px}.order-status-tab,.task-view-tabs button{display:flex;align-items:center;gap:8px;white-space:nowrap;padding:9px 12px;border-radius:999px;background:#fff}.order-status-tab b,.task-view-tabs button b{min-width:22px;height:22px;display:grid;place-items:center;border-radius:999px;background:color-mix(in srgb,var(--brand2) 42%,#fff);font-size:10px}.order-status-tab.active,.task-view-tabs button.active{background:var(--brand);border-color:var(--brand);color:#fff}.order-status-tab.active b,.task-view-tabs button.active b{background:#ffffff22;color:#fff}.orders-modern-list,.tasks-modern-list{display:grid;gap:10px}.order-modern-card{display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:18px;padding:18px 20px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 3px 14px #3e21100b}.order-modern-main{min-width:0}.order-modern-top{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.order-modern-top>div{display:grid;gap:3px}.order-number{font-size:17px;font-weight:900}.order-modern-top small{color:var(--muted)}.order-modern-top>strong{font-size:20px;white-space:nowrap}.order-modern-meta{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:12px;color:var(--muted);font-size:11px}.order-modern-items{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}.order-modern-items span{padding:6px 9px;border-radius:8px;background:#f8f4ed;font-size:10px}.order-modern-side{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;padding-left:18px;border-left:1px solid var(--line)}.order-modern-side>div:first-child{text-align:right;display:grid;gap:3px}.order-modern-side small{color:var(--muted)}.order-modern-side b{font-size:18px}.negative,.danger-text{color:#b94c48!important}
.task-modern-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;padding:16px 18px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 3px 14px #3e21100b}.task-modern-card.is-overdue{border-color:#d7a29d;background:#fffafa}.task-modern-check button{width:38px;height:38px;border-radius:12px;padding:0;font-size:22px;color:var(--brand);background:#fbf6ee}.task-modern-check button.done{background:#e9f4ec;color:#2d7a4e}.task-modern-title{display:flex;justify-content:space-between;align-items:center;gap:12px}.task-modern-title>div{display:flex;align-items:center;gap:8px;min-width:0}.task-modern-title b{font-size:15px;overflow:hidden;text-overflow:ellipsis}.priority-dot{width:8px;height:8px;border-radius:50%;background:#c8b8a3;flex:0 0 auto}.priority-dot.priority-высокий{background:#c75d54}.priority-dot.priority-критический{background:#8f2e2e;box-shadow:0 0 0 4px #8f2e2e18}.task-modern-main p{margin:7px 0;color:var(--muted);line-height:1.45}.task-modern-meta{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:10px;color:var(--muted);font-size:10.5px}.task-modern-actions{display:flex;align-items:center;gap:6px}.task-modern-actions button:last-child{width:38px}
html[data-guru-theme="dark"] .workday-payroll-head{background:linear-gradient(135deg,#1b2028,#171b22)!important}html[data-guru-theme="dark"] .workday-payroll,html[data-guru-theme="dark"] .order-modern-card,html[data-guru-theme="dark"] .task-modern-card,html[data-guru-theme="dark"] .order-status-tab,html[data-guru-theme="dark"] .task-view-tabs button{background:#161b23!important;color:#f1ede7!important;border-color:#2b323d!important}html[data-guru-theme="dark"] .order-modern-items span{background:#212832!important;color:#dfe3e8!important}html[data-guru-theme="dark"] .order-modern-side{border-color:#303844!important}html[data-guru-theme="dark"] .task-modern-check button{background:#232a34!important;color:#e0b97f!important}html[data-guru-theme="dark"] .task-modern-card.is-overdue{background:#21191d!important;border-color:#60353b!important}html[data-guru-theme="dark"] .order-status-tab.active,html[data-guru-theme="dark"] .task-view-tabs button.active{background:#802f2d!important;border-color:#9a4945!important}html[data-guru-theme="dark"] .workday-payroll-list article,html[data-guru-theme="dark"] .workday-payroll-actions{border-color:#303844!important}
@media(max-width:760px){.workday-payroll-head{display:grid;padding:18px}.workday-payroll-total{text-align:left;min-width:0}.workday-payroll-list{padding:0 18px}.workday-payroll-actions{padding:14px 18px;display:grid;grid-template-columns:1fr 1fr}.order-modern-card{grid-template-columns:1fr;padding:15px}.order-modern-side{align-items:stretch;padding:12px 0 0;border-left:0;border-top:1px solid var(--line)}.order-modern-side>div:first-child{text-align:left}.order-modern-side .card-actions{display:grid;grid-template-columns:1fr 1fr}.order-modern-side .card-actions button{min-height:40px}.task-modern-card{grid-template-columns:1fr;padding:14px;gap:12px}.task-modern-actions{grid-column:auto;justify-content:flex-start}.task-modern-title{align-items:flex-start}.order-status-tabs,.task-view-tabs{padding-bottom:6px}.order-status-tab,.task-view-tabs button{min-height:40px}.workday-head{align-items:stretch!important}.workday-controls{width:100%;display:grid!important;grid-template-columns:1fr 1fr!important}.workday-controls label,.workday-controls select,.workday-controls input{min-width:0;width:100%}}
@media(max-width:460px){.workday-payroll-actions{grid-template-columns:1fr}.workday-controls{grid-template-columns:1fr!important}.order-modern-top{display:grid}.order-modern-top>strong{font-size:18px}.task-modern-card{grid-template-columns:1fr;padding:12px}.task-modern-check button{width:32px;height:32px}.task-modern-meta{display:grid;gap:6px}.task-modern-actions{display:flex;flex-wrap:wrap;width:100%}}

/* GURU 1.8.7 — site orders refresh, real logo, complete dark-theme sweep */
.guru-logo-brand{min-width:0}.guru-logo-brand .brand-logo-full{display:block;width:154px;height:72px;object-fit:contain;border-radius:12px;background:transparent!important;box-shadow:none!important;padding:0!important}.brand-crm-label{display:grid;place-items:center;min-width:42px}.brand-crm-label b{font-size:12px!important;letter-spacing:.14em;text-transform:uppercase;font-weight:900;color:inherit}.desktop-sidebar>.guru-logo-brand{padding:2px 8px 16px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.desktop-sidebar>.guru-logo-brand .brand-logo-full{width:150px;height:70px}.desktop-sidebar>.guru-logo-brand .brand-crm-label b{color:#f3e6c9!important}.login-card .guru-logo-brand{display:flex!important;flex-direction:column;justify-content:center;gap:8px;text-align:center}.login-card .guru-logo-brand .brand-logo-full{width:220px;height:102px;margin:auto}.login-card .brand-crm-label b{color:var(--brand);font-size:13px!important}

.site-orders-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 14px}.site-orders-overview article{background:#fff;border:1px solid var(--line);border-radius:16px;padding:17px 18px;display:grid;gap:4px;box-shadow:0 6px 20px rgba(55,36,32,.035)}.site-orders-overview small{color:var(--muted);font-weight:750}.site-orders-overview b{font-size:24px}.site-orders-overview span{font-size:12px;color:var(--muted)}
.site-order-tabs{display:flex;gap:8px;overflow:auto;padding:2px 0 12px;margin-bottom:8px;scrollbar-width:thin}.site-order-tab{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;border-radius:999px;padding:9px 12px;background:#fff}.site-order-tab b{min-width:22px;height:22px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:color-mix(in srgb,var(--brand) 7%,#f3eee7);font-size:11px}.site-order-tab.active{background:var(--brand);color:#fff;border-color:var(--brand)}.site-order-tab.active b{background:#ffffff22;color:#fff}
.site-order-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(350px,1fr));gap:14px}.site-order-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:17px 18px;display:grid;gap:14px;box-shadow:0 7px 24px rgba(55,36,32,.04)}.site-order-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.site-order-card-head>div{display:flex;align-items:center;gap:8px;min-width:0}.site-order-card-head small{color:var(--muted);font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.site-order-source{display:inline-flex;padding:5px 8px;border-radius:999px;background:color-mix(in srgb,var(--brand) 9%,#fff);color:var(--brand);font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:850}.site-order-main{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.site-order-main h3{margin:0 0 5px;font-size:18px}.site-order-main p{margin:0;color:var(--muted);font-size:12px;line-height:1.45}.site-order-main>strong{font-size:20px;white-space:nowrap}.site-order-meta{display:grid;grid-template-columns:1fr 1fr;gap:9px}.site-order-meta>span{display:grid;gap:2px;padding:10px 11px;border-radius:12px;background:color-mix(in srgb,var(--surface) 62%,#fff);min-width:0}.site-order-meta small{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.site-order-meta b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.site-order-payment{display:grid;gap:7px}.site-order-payment>div{display:flex;justify-content:space-between;gap:10px;font-size:11px}.site-order-payment>div span{color:var(--muted)}.site-order-payment>i{height:8px;border-radius:999px;background:#eee7df;overflow:hidden}.site-order-payment>i>em{display:block;height:100%;border-radius:inherit;background:var(--brand)}.site-order-card-actions{display:flex;justify-content:flex-end;border-top:1px solid var(--line);padding-top:12px}.site-order-card-actions .muted{font-size:12px;color:var(--muted)}

/* Dark theme: exhaustive content-surface pass so legacy workspaces cannot leak white cards. */
html[data-guru-theme="dark"] .content,
html[data-guru-theme="dark"] .content>section,
html[data-guru-theme="dark"] .content>div{color:var(--guru-text,#f1ede7)}
html[data-guru-theme="dark"] .client-card,
html[data-guru-theme="dark"] .deal-card,
html[data-guru-theme="dark"] .purchase-card,
html[data-guru-theme="dark"] .operation-list article,
html[data-guru-theme="dark"] .payroll-card,
html[data-guru-theme="dark"] .document-card,
html[data-guru-theme="dark"] .scanner-panel,
html[data-guru-theme="dark"] .code-card,
html[data-guru-theme="dark"] .employee-card,
html[data-guru-theme="dark"] .report-card,
html[data-guru-theme="dark"] .integration-card,
html[data-guru-theme="dark"] .timeline article,
html[data-guru-theme="dark"] .feed-card,
html[data-guru-theme="dark"] .analytics-grid article,
html[data-guru-theme="dark"] .external-history article,
html[data-guru-theme="dark"] .diag-grid section,
html[data-guru-theme="dark"] .system-permission-list label,
html[data-guru-theme="dark"] .checklist-kpi,
html[data-guru-theme="dark"] .checklist-module-row,
html[data-guru-theme="dark"] .automation-form>label:not(.automation-toggle),
html[data-guru-theme="dark"] .automation-toggle,
html[data-guru-theme="dark"] .inventory-doc,
html[data-guru-theme="dark"] .inventory-list>article,
html[data-guru-theme="dark"] .inventory-list>button,
html[data-guru-theme="dark"] .quick-report-group,
html[data-guru-theme="dark"] .backup-list article,
html[data-guru-theme="dark"] .theme-card,
html[data-guru-theme="dark"] .worktype-list article,
html[data-guru-theme="dark"] .recurring-expenses article,
html[data-guru-theme="dark"] .workday-person,
html[data-guru-theme="dark"] .role-box,
html[data-guru-theme="dark"] .permission-table,
html[data-guru-theme="dark"] .module-card,
html[data-guru-theme="dark"] .reports-top,
html[data-guru-theme="dark"] .report-builder,
html[data-guru-theme="dark"] .workspace-filters,
html[data-guru-theme="dark"] .warehouse-day-head,
html[data-guru-theme="dark"] .warehouse-day-sheet,
html[data-guru-theme="dark"] .warehouse-day-row,
html[data-guru-theme="dark"] .delivery-filter,
html[data-guru-theme="dark"] .delivery-stop,
html[data-guru-theme="dark"] .source-only-note,
html[data-guru-theme="dark"] .site-orders-overview article,
html[data-guru-theme="dark"] .site-order-card{
 background:#161b23!important;color:#f1ede7!important;border-color:#2b323d!important;box-shadow:none!important
}
html[data-guru-theme="dark"] .site-order-meta>span,
html[data-guru-theme="dark"] .order-card-info,
html[data-guru-theme="dark"] .task-modern-meta>span,
html[data-guru-theme="dark"] .record-context-line,
html[data-guru-theme="dark"] .journal-summary article,
html[data-guru-theme="dark"] .task-detail-meta>span,
html[data-guru-theme="dark"] .task-subsection,
html[data-guru-theme="dark"] .notification-item,
html[data-guru-theme="dark"] .notification-signal,
html[data-guru-theme="dark"] .client-history-item,
html[data-guru-theme="dark"] .client-history-summary>div,
html[data-guru-theme="dark"] .efficiency-card,
html[data-guru-theme="dark"] .efficiency-weights,
html[data-guru-theme="dark"] .warehouse-money-grid>div{
 background:#1c222c!important;color:#f1ede7!important;border-color:#303844!important
}
html[data-guru-theme="dark"] .site-order-tab{background:#1a2029!important;border-color:#303844!important;color:#d7d9dc!important}html[data-guru-theme="dark"] .site-order-tab.active{background:#7b302e!important;border-color:#8b3b38!important;color:#fff!important}html[data-guru-theme="dark"] .site-order-tab b{background:#242b35!important;color:#d9dde4!important}html[data-guru-theme="dark"] .site-order-tab.active b{background:#ffffff1f!important;color:#fff!important}
html[data-guru-theme="dark"] .site-order-source{background:#322421!important;color:#e7c894!important}html[data-guru-theme="dark"] .site-order-payment>i{background:#2a313b!important}html[data-guru-theme="dark"] .site-order-card-actions{border-color:#2b323d!important}
html[data-guru-theme="dark"] .form-grid input,
html[data-guru-theme="dark"] .form-grid select,
html[data-guru-theme="dark"] .form-grid textarea,
html[data-guru-theme="dark"] .inline-form input,
html[data-guru-theme="dark"] .inline-form select,
html[data-guru-theme="dark"] .toolbar input,
html[data-guru-theme="dark"] .toolbar select,
html[data-guru-theme="dark"] .workspace-filters input,
html[data-guru-theme="dark"] .workspace-filters select,
html[data-guru-theme="dark"] .report-filter-form input,
html[data-guru-theme="dark"] .report-filter-form select,
html[data-guru-theme="dark"] .client-toolbar input,
html[data-guru-theme="dark"] .client-toolbar select,
html[data-guru-theme="dark"] .crm-chat-recipient select,
html[data-guru-theme="dark"] .crm-chat-attach,
html[data-guru-theme="dark"] .worktype-list input,
html[data-guru-theme="dark"] .worktype-list select,
html[data-guru-theme="dark"] .efficiency-weights input,
html[data-guru-theme="dark"] .inventory-note-field textarea{
 background:#10151c!important;color:#ece9e4!important;border-color:#303845!important
}
html[data-guru-theme="dark"] .table-wrap table{background:#161b23!important;color:#f1ede7!important}html[data-guru-theme="dark"] .table-wrap tbody tr{background:#161b23!important}html[data-guru-theme="dark"] .table-wrap tbody tr:nth-child(even){background:#181e27!important}html[data-guru-theme="dark"] .table-wrap tbody tr:hover{background:#202731!important}
html[data-guru-theme="dark"] .modal hr,html[data-guru-theme="dark"] .panel hr{border-color:#2b323d!important}
html[data-guru-theme="dark"] .brand-crm-label b{color:#f3e6c9!important}

@media(max-width:900px){.site-orders-overview{grid-template-columns:1fr 1fr}.site-orders-overview article:last-child{grid-column:1/-1}.site-order-grid{grid-template-columns:1fr}.desktop-sidebar>.guru-logo-brand .brand-logo-full{width:50px;height:50px}.desktop-sidebar>.guru-logo-brand{grid-template-columns:1fr;justify-items:center}.desktop-sidebar>.guru-logo-brand .brand-crm-label{display:none}}
@media(max-width:720px){.site-orders-overview{grid-template-columns:1fr 1fr}.site-order-card{padding:15px;border-radius:15px}.site-order-meta{grid-template-columns:1fr}.site-order-main{display:grid}.site-order-main>strong{font-size:19px}.site-order-card-actions{display:grid;grid-template-columns:1fr}.site-order-card-actions button{width:100%}.site-order-tabs{margin-left:-2px;margin-right:-2px}.login-card .guru-logo-brand .brand-logo-full{width:180px;height:84px}}
@media(max-width:420px){.site-orders-overview{grid-template-columns:1fr}.site-orders-overview article:last-child{grid-column:auto}}

/* ===== GURU 1.8.9 — LOGO + DARK UI FINISH + CHAT/TASK STATES ===== */
/* Logo: transparent original mark, no burgundy rectangle, clean proportion in sidebar/login. */
.guru-logo-brand{overflow:visible!important}
.guru-logo-brand .brand-logo-full{
  display:block!important;
  width:auto!important;
  max-width:100%!important;
  height:58px!important;
  object-fit:contain!important;
  object-position:left center!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:0!important;
}
.desktop-sidebar>.guru-logo-brand{
  min-height:78px!important;
  padding:5px 8px 15px!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
}
.desktop-sidebar>.guru-logo-brand .brand-logo-full{height:54px!important;max-width:164px!important}
.desktop-sidebar>.guru-logo-brand .brand-crm-label{align-self:center!important;padding-left:3px}
.desktop-sidebar>.guru-logo-brand .brand-crm-label b{font-size:10px!important;letter-spacing:.18em!important;color:#f3e6c9!important}
.login-card .guru-logo-brand{gap:7px!important}
.login-card .guru-logo-brand .brand-logo-full{height:104px!important;max-width:290px!important;object-position:center!important;margin:0 auto!important}
.login-card .guru-logo-brand .brand-crm-label b{font-size:11px!important;letter-spacing:.18em!important}

/* Task filters: one calm visual language, no bright white counter circles in dark mode. */
html[data-guru-theme="dark"] .tasks-control-panel,
html[data-guru-theme="dark"] .orders-control-panel{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
html[data-guru-theme="dark"] .task-view-tabs,
html[data-guru-theme="dark"] .order-status-tabs{gap:8px!important;padding:4px 0 8px!important}
html[data-guru-theme="dark"] .task-view-tabs button,
html[data-guru-theme="dark"] .order-status-tab{
  min-height:42px!important;
  background:#151a21!important;
  color:#ddd8d2!important;
  border:1px solid #303845!important;
  box-shadow:none!important;
  transition:background .15s ease,border-color .15s ease,transform .15s ease!important;
}
html[data-guru-theme="dark"] .task-view-tabs button:hover,
html[data-guru-theme="dark"] .order-status-tab:hover{background:#1c222b!important;border-color:#424c5a!important;transform:translateY(-1px)}
html[data-guru-theme="dark"] .task-view-tabs button b,
html[data-guru-theme="dark"] .order-status-tab b{
  min-width:22px!important;height:22px!important;
  background:#252c36!important;color:#bfc5cc!important;
  border:1px solid #363e49!important;
  box-shadow:none!important;
}
html[data-guru-theme="dark"] .task-view-tabs button.active,
html[data-guru-theme="dark"] .order-status-tab.active{
  background:#873633!important;color:#fff!important;border-color:#a14844!important;
  box-shadow:0 6px 18px #00000020!important;
}
html[data-guru-theme="dark"] .task-view-tabs button.active b,
html[data-guru-theme="dark"] .order-status-tab.active b{
  background:#ac514c!important;color:#fff!important;border-color:#bd625c!important;
}
html[data-guru-theme="dark"] .task-modern-card{background:#171c23!important;border-color:#303844!important;box-shadow:0 5px 18px #00000018!important}
html[data-guru-theme="dark"] .task-modern-card:hover{border-color:#3b4552!important;background:#1a2028!important}
html[data-guru-theme="dark"] .task-modern-card.is-overdue{background:#21191d!important;border-color:#5d343a!important}
html[data-guru-theme="dark"] .task-modern-check button{background:#202732!important;border-color:#37414e!important;color:#dfbf91!important}
html[data-guru-theme="dark"] .task-modern-check button:hover{background:#29323e!important}
html[data-guru-theme="dark"] .task-modern-check button.done{background:#183025!important;color:#7ed2a0!important;border-color:#2d4b3a!important}
html[data-guru-theme="dark"] .task-modern-meta>span{background:#202630!important;color:#adb5bf!important;border:1px solid #2e3742!important;border-radius:8px;padding:4px 7px}

/* Guru Chat: balanced sidebar and explicit inactive/active states. */
html[data-guru-theme="dark"] .crm-chat{background:#141920!important;border-color:#2d3540!important;box-shadow:0 12px 34px #00000024!important}
html[data-guru-theme="dark"] .crm-chat-sidebar{
  background:#151a21!important;
  border-right-color:#2d3540!important;
  padding:16px 13px!important;
}
html[data-guru-theme="dark"] .crm-chat-sidebar-title{padding:3px 7px 14px!important}
html[data-guru-theme="dark"] .crm-chat-sidebar-title b{color:#f2eee9!important}
html[data-guru-theme="dark"] .crm-chat-sidebar-title small{color:#8f99a6!important}
html[data-guru-theme="dark"] .crm-chat-channels{gap:7px!important}
html[data-guru-theme="dark"] .crm-chat-channels button{
  min-height:48px!important;
  margin:0!important;
  padding:9px 10px!important;
  background:#11161d!important;
  color:#e6e1dc!important;
  border:1px solid #252e39!important;
  border-radius:12px!important;
  box-shadow:none!important;
}
html[data-guru-theme="dark"] .crm-chat-channels button:hover{background:#1c232c!important;border-color:#394452!important;color:#fff!important}
html[data-guru-theme="dark"] .crm-chat-channels button span{
  width:30px!important;height:30px!important;flex:0 0 30px!important;
  border-radius:9px!important;background:#252d38!important;color:#d7dde5!important;
}
html[data-guru-theme="dark"] .crm-chat-channels button b{font-size:13px!important;font-weight:800!important;color:inherit!important}
html[data-guru-theme="dark"] .crm-chat-channels button.active{
  background:#7f332f!important;color:#fff!important;border-color:#9a4641!important;
  box-shadow:0 7px 18px #0000001e!important;
}
html[data-guru-theme="dark"] .crm-chat-channels button.active span{background:#e4d0a6!important;color:#57211f!important}
html[data-guru-theme="dark"] .crm-chat-panel{background:#171c23!important}
html[data-guru-theme="dark"] .crm-chat-toolbar{background:#171c23!important;border-color:#2d3540!important}
html[data-guru-theme="dark"] .crm-chat-list{background:#10141a!important}
html[data-guru-theme="dark"] .crm-chat-bubble{background:#1b2129!important;border-color:#303945!important;box-shadow:none!important}
html[data-guru-theme="dark"] .crm-chat-message.mine .crm-chat-bubble{background:#242128!important;border-color:#4b373a!important}
html[data-guru-theme="dark"] .crm-chat-message.announcement{background:#211d19!important;border-color:#514631!important}
html[data-guru-theme="dark"] .crm-chat-compose{background:#151a21!important;border-color:#2d3540!important;box-shadow:0 -8px 24px #00000014!important}
html[data-guru-theme="dark"] .crm-chat-search{background:#10151c!important;border-color:#303945!important}
html[data-guru-theme="dark"] .crm-chat-file{background:#202731!important;color:#dfc89e!important;border-color:#343e4a!important}

/* Residual dark-theme polish shared by all workspaces. */
html[data-guru-theme="dark"] .tabs button:not(.active),
html[data-guru-theme="dark"] .product-folder-tabs button:not(.active),
html[data-guru-theme="dark"] .site-order-tab:not(.active){background:#151a21!important;color:#d9d4cf!important;border-color:#303845!important}
html[data-guru-theme="dark"] .status-badge{background:#222a34!important;color:#cbd3dc!important;border:1px solid #35404d!important}
html[data-guru-theme="dark"] .chips span,
html[data-guru-theme="dark"] .workspace-meta span{background:#202630!important;color:#b9c0c8!important;border:1px solid #2d3540!important}
html[data-guru-theme="dark"] .card-actions button:not(.primary),
html[data-guru-theme="dark"] .task-modern-actions button:not(.primary){background:#171d25!important;border-color:#333d49!important;color:#dcd7d2!important}
html[data-guru-theme="dark"] .card-actions button:not(.primary):hover,
html[data-guru-theme="dark"] .task-modern-actions button:not(.primary):hover{background:#222a34!important;border-color:#44505e!important}
html[data-guru-theme="dark"] ::-webkit-scrollbar{width:10px;height:10px}
html[data-guru-theme="dark"] ::-webkit-scrollbar-track{background:#101319}
html[data-guru-theme="dark"] ::-webkit-scrollbar-thumb{background:#353d47;border-radius:999px;border:2px solid #101319}
html[data-guru-theme="dark"] ::-webkit-scrollbar-thumb:hover{background:#46515e}

@media(max-width:900px){
  .desktop-sidebar>.guru-logo-brand .brand-logo-full{height:42px!important;max-width:54px!important;object-position:center!important}
}
@media(max-width:720px){
  html[data-guru-theme="dark"] .crm-chat-sidebar{padding:7px!important;background:#151a21!important}
  html[data-guru-theme="dark"] .crm-chat-channels{gap:5px!important}
  html[data-guru-theme="dark"] .crm-chat-channels button{min-height:42px!important;padding:6px!important}
  html[data-guru-theme="dark"] .crm-chat-channels button span{width:25px!important;height:25px!important;flex-basis:25px!important}
  .login-card .guru-logo-brand .brand-logo-full{height:86px!important;max-width:230px!important}
}

/* GURU 1.8.10 — backup status / analytics selection / dark notification center */
.backup-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0 16px}.backup-status-card{display:grid;gap:5px;padding:13px 14px;border:1px solid var(--line);border-radius:13px;background:#fff}.backup-status-card small{color:var(--muted);font-weight:700}.backup-status-card b{font-size:14px}.backup-status-card span{font-size:11px;color:var(--muted);line-height:1.4;overflow-wrap:anywhere}.backup-status-card.ok{background:#f2faf5;border-color:#cfe7d6}.backup-status-card.bad{background:#fff2f2;border-color:#efc8c8}.backup-status-card.wait{background:#fff9ed;border-color:#ead9b7}.backup-kind{display:inline-flex;align-items:center;margin-right:7px;padding:2px 6px;border-radius:999px;font-size:9px;font-weight:800}.backup-kind.auto{background:#edf5ff;color:#365d8c}.backup-kind.manual{background:#f4eee7;color:#76594b}
.analytics-presets{align-items:center}.analytics-presets .analytics-preset{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:92px;border:1px solid var(--line);background:var(--panel,#fff);color:var(--text);font-weight:750;transition:.16s ease}.analytics-presets .analytics-preset:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--brand) 40%,var(--line));box-shadow:0 5px 14px #0000000d}.analytics-presets .analytics-preset.active{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 7px 20px color-mix(in srgb,var(--brand) 25%,transparent)}.analytics-presets .analytics-preset.active b{display:grid;place-items:center;width:18px;height:18px;border-radius:999px;background:#ffffff24;color:#fff;font-size:10px}.analytics-presets .analytics-preset[aria-pressed="true"]{outline:2px solid color-mix(in srgb,var(--brand2) 72%,transparent);outline-offset:2px}
.notification-modal-back{padding:22px}.notification-modal{width:min(860px,calc(100vw - 44px));max-height:min(92vh,860px);padding:0!important;overflow:hidden!important}.notification-modal>.modal-title{margin:0;padding:18px 20px;border-bottom:1px solid var(--line)}.notification-modal>.info-body{padding:18px 20px 20px;overflow:auto;max-height:calc(92vh - 76px)}.notification-modal>.modal-actions{display:none}.notification-center{gap:16px}.notification-signals{padding-bottom:14px}.notification-signals-head b{font-size:13px}.notification-signal{min-height:68px;padding:12px 13px}.notification-signal-empty{display:flex;align-items:center;min-height:42px}.notification-center-head{padding-top:2px}.notification-center-head>span{font-size:13px}.notification-center-head>button{min-height:40px}.notification-list{gap:8px;max-height:52vh;padding-right:3px}.notification-item{min-height:86px;padding:12px 13px;grid-template-columns:34px minmax(0,1fr);align-items:flex-start}.notification-item-icon{width:32px;height:32px;border-radius:10px}.notification-item span:last-child>b{font-size:13px;line-height:1.3}.notification-item small{line-height:1.35}.notification-item time{font-variant-numeric:tabular-nums}.notification-item.read{opacity:.82}
html[data-guru-theme="dark"] .notification-modal{background:#151a21!important;color:#f2eee9!important;border:1px solid #303844!important;box-shadow:0 28px 90px #00000066!important}html[data-guru-theme="dark"] .notification-modal>.modal-title{background:#171c23!important;border-color:#2d3540!important}html[data-guru-theme="dark"] .notification-modal>.modal-title h3{color:#f5efe8!important}html[data-guru-theme="dark"] .notification-modal>.modal-title button{background:#10151b!important;border:1px solid #303945!important;color:#e8d5ad!important}html[data-guru-theme="dark"] .notification-modal>.info-body{background:#151a21!important}html[data-guru-theme="dark"] .notification-signals{border-color:#2d3540!important}html[data-guru-theme="dark"] .notification-signals-head b{color:#f5efe8!important}html[data-guru-theme="dark"] .notification-signals-head small{color:#8f99a6!important}html[data-guru-theme="dark"] .notification-signal{background:#1b2129!important;border-color:#313a46!important;color:#f1ede7!important}html[data-guru-theme="dark"] .notification-signal:hover{background:#202732!important;border-color:#43505f!important}html[data-guru-theme="dark"] .notification-signal>span{background:#242b35!important;color:#e9d5aa!important}html[data-guru-theme="dark"] .notification-signal.warning{background:#241d20!important;border-color:#56373c!important}html[data-guru-theme="dark"] .notification-signal-empty{background:#18241f!important;color:#86c59c!important;border:1px solid #294438!important}html[data-guru-theme="dark"] .notification-center-head{color:#d9d4cf!important}html[data-guru-theme="dark"] #notesReadAll{background:#171d25!important;border-color:#35404c!important;color:#f1ede7!important}html[data-guru-theme="dark"] #notesReadAll:hover{background:#222a34!important;border-color:#465361!important}html[data-guru-theme="dark"] .notification-item{background:#171d25!important;border-color:#2f3945!important;color:#f2eee9!important;box-shadow:none!important}html[data-guru-theme="dark"] .notification-item:hover{background:#1e252e!important;border-color:#414d5b!important}html[data-guru-theme="dark"] .notification-item.unread{background:#201d22!important;border-color:#6a3b3d!important;box-shadow:inset 3px 0 0 #a94f4b!important}html[data-guru-theme="dark"] .notification-item.read{background:#151a21!important;border-color:#29313b!important}html[data-guru-theme="dark"] .notification-item-icon{background:#242b35!important;color:#e6c994!important}html[data-guru-theme="dark"] .notification-item span:last-child>b{color:#f5efe8!important}html[data-guru-theme="dark"] .notification-item small,html[data-guru-theme="dark"] .notification-item time{color:#96a0ad!important}html[data-guru-theme="dark"] .telegram-placeholder{background:#1b2129!important;border-color:#313a46!important;color:#f2eee9!important}
html[data-guru-theme="dark"] .analytics-presets .analytics-preset{background:#171d25!important;border-color:#35404c!important;color:#d7dbe1!important}html[data-guru-theme="dark"] .analytics-presets .analytics-preset:hover{background:#202832!important;border-color:#4b5866!important;color:#fff!important}html[data-guru-theme="dark"] .analytics-presets .analytics-preset.active{background:#a94f4b!important;border-color:#bc625d!important;color:#fff!important;box-shadow:0 7px 24px #00000032!important}html[data-guru-theme="dark"] .analytics-presets .analytics-preset.active b{background:#ffffff20!important;color:#fff!important}html[data-guru-theme="dark"] .analytics-presets .analytics-preset[aria-pressed="true"]{outline-color:#dfc894!important}
html[data-guru-theme="dark"] .backup-status-card{background:#171d25!important;border-color:#303a46!important;color:#f1ede7!important}html[data-guru-theme="dark"] .backup-status-card.ok{background:#17241d!important;border-color:#29473a!important}html[data-guru-theme="dark"] .backup-status-card.bad{background:#271b1d!important;border-color:#5a3439!important}html[data-guru-theme="dark"] .backup-status-card.wait{background:#242119!important;border-color:#51462f!important}html[data-guru-theme="dark"] .backup-kind.auto{background:#1b2a3a!important;color:#9fc5ee!important}html[data-guru-theme="dark"] .backup-kind.manual{background:#2a2521!important;color:#d7bda6!important}
/* One residual dark-theme issue visible in Settings / Roles. */
html[data-guru-theme="dark"] .role-box{background:#171d25!important;border-color:#303a46!important;color:#f1ede7!important}html[data-guru-theme="dark"] .role-box>summary{background:#171d25!important;color:#f5efe8!important;border-radius:10px}html[data-guru-theme="dark"] .role-box>summary small{background:#30291e!important;color:#e9d19e!important}html[data-guru-theme="dark"] .role-security-note,html[data-guru-theme="dark"] .role-admin-note{background:#1b2129!important;border-color:#313a46!important;color:#aeb8c4!important}html[data-guru-theme="dark"] .permission-table{background:#151a21!important;border-color:#303844!important}html[data-guru-theme="dark"] .permission-row,html[data-guru-theme="dark"] .permission-head{border-color:#2d3540!important}
@media(max-width:720px){.backup-status-grid{grid-template-columns:1fr}.notification-modal-back{padding:8px}.notification-modal{width:calc(100vw - 16px);max-height:94vh}.notification-modal>.modal-title{padding:14px}.notification-modal>.info-body{padding:14px;max-height:calc(94vh - 64px)}.notification-signal-grid{grid-template-columns:1fr}.analytics-presets .analytics-preset{min-width:0;padding-inline:8px}.notification-list{max-height:56vh}}

/* GURU 1.8.11 — mobile-first navigation, modal safety and dark close buttons */
.modal-title>button[data-close]{
  width:38px;height:38px;min-width:38px;flex:0 0 38px;padding:0!important;
  display:grid;place-items:center;border:1px solid var(--line)!important;border-radius:12px!important;
  background:#fff!important;color:var(--text)!important;font-size:24px!important;font-weight:400!important;
  line-height:1!important;box-shadow:none!important;transition:background .15s ease,border-color .15s ease,transform .15s ease
}
.modal-title>button[data-close]:hover{background:#f6f0e8!important;border-color:#d9c7b5!important;transform:scale(1.03)}
html[data-guru-theme="dark"] .modal-title>button[data-close]{background:#10151b!important;border-color:#394452!important;color:#f0d9aa!important}
html[data-guru-theme="dark"] .modal-title>button[data-close]:hover{background:#252d38!important;border-color:#566474!important;color:#fff0c6!important}
.mobile-nav-toggle,.mobile-primary-stats{display:none}

@media(max-width:720px){
  /* Mobile header/navigation: after choosing a section the big grid folds away. */
  .mobile-top-nav{display:block!important;position:sticky!important;top:64px!important;z-index:35!important;padding:0!important;background:#702a28!important;border-bottom:1px solid #5f2422!important;box-shadow:0 5px 16px #00000018!important}
  .mobile-nav-toggle{display:flex!important;width:100%!important;min-height:44px!important;padding:7px 12px!important;border:0!important;border-radius:0!important;background:#702a28!important;color:#fff7ed!important;align-items:center!important;gap:10px!important;text-align:left!important}
  .mobile-nav-toggle-icon{display:grid;place-items:center;width:30px;height:30px;border:1px solid #b97068;border-radius:9px;background:#7f302d;color:#f7e7c5;font-size:17px;flex:0 0 30px}
  .mobile-nav-toggle-current{display:flex;min-width:0;flex:1;flex-direction:column;gap:1px}
  .mobile-nav-toggle-current b{font-size:13px;line-height:1.15;color:#fff7ed;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-nav-toggle-current small{font-size:9px;color:#e7c7bd;line-height:1.2}
  .mobile-nav-toggle-arrow{font-size:18px;color:#efdbb2;line-height:1}
  .mobile-top-nav.collapsed nav{display:none!important}
  .mobile-top-nav.expanded nav{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:3px!important;width:100%!important;max-width:none!important;padding:4px 5px 7px!important;border-top:1px solid #843733!important;background:#702a28!important}
  .mobile-top-nav .nav-item{background:transparent!important;border:0!important}
  .mobile-top-nav .nav-item .nav-icon{opacity:1!important;visibility:visible!important;color:#fff!important}
  .mobile-top-nav .nav-item .nav-icon svg{opacity:1!important;visibility:visible!important;stroke:currentColor!important;color:inherit!important}
  .mobile-top-nav .nav-item.active{background:transparent!important}
  .mobile-top-nav .nav-item.active .nav-icon{
    background:var(--nav-color)!important;color:#fff8e8!important;opacity:1!important;visibility:visible!important;
    transform:none!important;box-shadow:0 0 0 2px #efdbb2,0 4px 10px #00000022!important
  }
  .mobile-top-nav .nav-item.active .nav-icon svg{stroke:#fff8e8!important;color:#fff8e8!important;opacity:1!important}
  .mobile-top-nav .nav-item.active .nav-label{color:#efdbb2!important;font-weight:900!important}
  html[data-guru-theme="dark"] .mobile-top-nav,html[data-guru-theme="dark"] .mobile-nav-toggle,html[data-guru-theme="dark"] .mobile-top-nav.expanded nav{background:#672724!important}
  html[data-guru-theme="dark"] .mobile-nav-toggle-icon{background:#7a2d2a;border-color:#9b4f49}

  /* Mobile KPIs: number first, label second. */
  .module-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin:12px 0 14px!important}
  .module-stats .mini-stat{min-height:78px!important;padding:13px 14px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;gap:4px!important}
  .module-stats .mini-stat b{order:1!important;font-size:23px!important;line-height:1!important}
  .module-stats .mini-stat small{order:2!important;font-size:11px!important;line-height:1.25!important}
  .mobile-primary-stats{display:grid!important;grid-template-columns:1fr!important}
  .mobile-primary-stats .mini-stat{max-width:none!important}
  .workspace-top{margin-top:0!important}

  /* Every modal must fit inside the real mobile viewport and be scrollable. */
  .modal-back{align-items:flex-start!important;overflow-y:auto!important;padding:8px 8px max(8px,env(safe-area-inset-bottom))!important}
  .modal{width:100%!important;max-width:none!important;max-height:calc(100dvh - 16px)!important;margin:0!important;padding:14px!important;border-radius:18px!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
  .modal-title{position:sticky!important;top:-14px!important;z-index:4!important;margin:-14px -14px 14px!important;padding:14px!important;background:inherit!important;border-bottom:1px solid var(--line)!important}
  .modal-title h3{min-width:0!important;padding-right:8px!important;font-size:18px!important;line-height:1.2!important}
  .modal-title>button[data-close]{width:40px!important;height:40px!important;min-width:40px!important;flex-basis:40px!important;border-radius:12px!important}
  .modal .form-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  .modal .form-grid>*{min-width:0!important;grid-column:auto!important}
  .modal input,.modal select,.modal textarea{max-width:100%!important;min-width:0!important;font-size:16px!important}
  .modal select[multiple]{min-height:150px!important}
  .modal textarea{min-height:110px!important}
  .modal-actions{position:sticky!important;bottom:-14px!important;z-index:4!important;margin:16px -14px -14px!important;padding:12px 14px max(12px,env(safe-area-inset-bottom))!important;background:var(--surface)!important;border-top:1px solid var(--line)!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .modal-actions>button{min-height:44px!important;margin:0!important}
  .modal-actions>button.primary:last-child{grid-column:auto!important}
  html[data-guru-theme="dark"] .modal-actions{background:#151a21!important;border-color:#2f3844!important}
  html[data-guru-theme="dark"] .modal-title{border-color:#2f3844!important}
  .document-upload-modal{padding-bottom:14px!important}

  /* Keep long forms usable on narrow screens. */
  .sale-item-row{grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  .sale-item-row>[data-sale-line]{text-align:left!important}
  .sale-item-row>[data-sale-remove]{justify-self:end!important}
  .workspace-filters{grid-template-columns:1fr!important}
  .workspace-filter-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  .workspace-filter-actions button{min-height:42px!important}
  .warehouse-day-head{grid-template-columns:1fr!important}
  .warehouse-day-head>div:first-child{margin-bottom:2px!important}

  /* Mobile content breathing room under the compact menu. */
  .content{padding-top:12px!important;padding-bottom:22px!important}
}

@media(max-width:430px){
  .mobile-top-nav.expanded nav{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .module-stats{grid-template-columns:1fr 1fr!important}
  .modal-actions{grid-template-columns:1fr!important}
}
@media(max-width:720px){
  .workspace-top>div:first-child{display:none!important}
  .workspace-top{align-items:stretch!important}
  .workspace-top>.toolbar{width:100%!important}
  .warehouse-day-head>div:first-child{display:none!important}
}

/* GURU 1.8.12 — MOBILE ONLY: zero horizontal scrollbars. Wide UI reflows instead of scrolling sideways. */
@media(max-width:720px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  .shell,.shell main,.content,.workspace,.workspace-top,.panel,.modal-back,.modal,.notification-modal,.table-wrap,.analytics-table-wrap{max-width:100%!important;min-width:0!important}

  /* Tabs and filter chips wrap to another line instead of becoming horizontal scrollers. */
  .tabs,.chips,.toolbar,.order-status-tabs,.task-view-tabs,.site-order-tabs,.analytics-presets,
  .status-tabs,.filter-tabs,.quick-actions,.card-actions,.workspace-filter-actions{
    overflow:visible!important;overflow-x:visible!important;flex-wrap:wrap!important;width:100%!important;max-width:100%!important
  }
  .tabs button,.order-status-tab,.task-view-tabs button,.site-order-tab,.analytics-preset{
    white-space:normal!important;min-width:0!important;max-width:100%!important;flex:0 1 auto!important
  }

  /* Kanban/boards become a normal vertical feed. */
  .board,.kanban,.kanban-board{
    display:grid!important;grid-auto-flow:row!important;grid-auto-columns:auto!important;grid-template-columns:minmax(0,1fr)!important;
    overflow:visible!important;overflow-x:visible!important;width:100%!important;padding-bottom:0!important
  }
  .board-col,.kanban-col,.kanban-column{width:100%!important;min-width:0!important;max-width:100%!important}

  /* Generic wide tables turn into readable cards with automatic labels taken from TH. */
  .table-wrap,.analytics-table-wrap{overflow:visible!important;overflow-x:visible!important;border:0!important;background:transparent!important}
  table.mobile-card-table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;border:0!important;background:transparent!important}
  table.mobile-card-table thead{display:none!important}
  table.mobile-card-table tbody{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%!important}
  table.mobile-card-table tr{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;min-width:0!important;padding:11px 13px!important;border:1px solid var(--line)!important;border-radius:14px!important;background:var(--panel,#fff)!important;box-shadow:0 3px 12px #00000008!important}
  table.mobile-card-table td{display:grid!important;grid-template-columns:minmax(88px,36%) minmax(0,1fr)!important;gap:10px!important;align-items:start!important;width:100%!important;min-width:0!important;max-width:100%!important;padding:7px 0!important;border:0!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;text-align:left!important}
  table.mobile-card-table td::before{content:attr(data-mobile-label);display:block!important;color:var(--muted)!important;font-size:10px!important;font-weight:800!important;line-height:1.25!important;text-transform:uppercase!important;letter-spacing:.035em!important}
  table.mobile-card-table td[colspan]{grid-template-columns:1fr!important}
  table.mobile-card-table td[colspan]::before{display:none!important}
  table.mobile-card-table td.actions,table.mobile-card-table td.actions.wide{grid-template-columns:1fr!important;width:100%!important;min-width:0!important;white-space:normal!important;padding-top:10px!important;border-top:1px solid var(--line)!important}
  table.mobile-card-table td.actions::before,table.mobile-card-table td.actions.wide::before{margin-bottom:2px}
  table.mobile-card-table td.actions button,table.mobile-card-table td.actions.wide button{width:100%!important;min-height:40px!important;margin:3px 0!important}
  table.mobile-card-table input,table.mobile-card-table select,table.mobile-card-table textarea{width:100%!important;min-width:0!important;max-width:100%!important}

  /* Fixed-minimum grids become a single responsive column. */
  .site-order-grid,.analytics-management-grid,.manager-kpi-grid,.efficiency-grid,.warehouse-money-grid,
  .quick-report-grid,.report-grid,.cards-grid,.document-grid,.delivery-grid,.product-grid,.stock-grid,
  .purchase-grid,.calendar-grid,.inventory-grid{grid-template-columns:minmax(0,1fr)!important;min-width:0!important}

  /* Forms never force the viewport wider than the phone. */
  .analytics-period-form,.efficiency-weights,.inline-form,.form-grid,.workday-controls,.workspace-filters{
    grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:100%!important;min-width:0!important
  }
  .analytics-period-form>*,.efficiency-weights>*,.inline-form>*,.form-grid>*,.workday-controls>*,.workspace-filters>*{min-width:0!important;max-width:100%!important}
  input,select,textarea,button{max-width:100%}

  /* No hidden element may create a page-wide horizontal rail. */
  .content>*{min-width:0!important;max-width:100%!important}
  pre,code{white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important}

  html[data-guru-theme="dark"] table.mobile-card-table tr{background:#171d25!important;border-color:#303a46!important;box-shadow:none!important}
  html[data-guru-theme="dark"] table.mobile-card-table td.actions,html[data-guru-theme="dark"] table.mobile-card-table td.actions.wide{border-color:#303a46!important}
}

/* ===== GURU v1.8.13 — personal chat conversations ===== */
.crm-chat.is-direct{grid-template-columns:310px minmax(0,1fr)}
.crm-chat.is-direct .crm-chat-sidebar{overflow:hidden}
.crm-dm-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:18px 2px 8px;padding-top:14px;border-top:1px solid var(--line)}
.crm-dm-head b{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.crm-dm-head button{padding:6px 9px;border-radius:9px;font-size:11px;font-weight:800;color:var(--brand);background:color-mix(in srgb,var(--brand) 6%,white)}
.crm-dm-list{display:grid;gap:6px;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:1px 3px 4px}
.crm-dm-peer{width:100%;display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px;border:1px solid transparent;border-radius:13px;background:transparent;text-align:left;color:var(--text);transition:.15s ease}
.crm-dm-peer:hover{background:#fff;border-color:var(--line);transform:translateY(-1px)}
.crm-dm-peer.active{background:color-mix(in srgb,var(--brand) 9%,white);border-color:color-mix(in srgb,var(--brand) 28%,var(--line));box-shadow:0 6px 16px #802f2d0c}
.crm-dm-avatar{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(145deg,var(--brand),#9d4a47);color:#fff;font-weight:900;flex:0 0 38px}
.crm-dm-copy{display:grid;gap:3px;min-width:0}.crm-dm-copy b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-dm-copy small{font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-dm-peer time{font-size:9px;color:var(--muted);align-self:start;padding-top:2px}
.crm-dm-empty{display:grid;gap:5px;padding:13px 10px;color:var(--muted);font-size:11px}.crm-dm-empty b{color:var(--text)}
.crm-dm-mobile-switch{display:none}
.crm-chat-peer-chip{display:flex;align-items:center;gap:8px;padding:0 2px;color:var(--muted);font-size:11px}.crm-chat-peer-chip .crm-dm-avatar{width:28px;height:28px;flex-basis:28px;border-radius:9px;font-size:11px}.crm-chat-peer-chip b{color:var(--text)}
.crm-chat-empty-action{align-content:center;gap:8px}.crm-chat-empty-action b{font-size:18px;color:var(--text)}.crm-chat-empty-action span{max-width:360px}.crm-chat-empty-action button{justify-self:center;margin-top:4px}
.crm-new-chat-modal{width:min(620px,100%)}
.crm-new-chat-search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:8px 11px;margin:6px 0 14px;background:#fff}.crm-new-chat-search input{border:0!important;outline:0!important;background:transparent!important;width:100%;padding:3px!important}
.crm-new-chat-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:55vh;overflow-y:auto}.crm-new-chat-people>button{display:grid;grid-template-columns:40px minmax(0,1fr);grid-template-rows:auto auto;gap:2px 9px;align-items:center;text-align:left;padding:10px;border-radius:13px}.crm-new-chat-people>button>span{grid-row:1/3;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--brand) 12%,white);color:var(--brand);font-weight:900}.crm-new-chat-people>button>b{font-size:12px}.crm-new-chat-people>button>small{font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

html[data-guru-theme="dark"] .crm-dm-head{border-color:#303945!important}
html[data-guru-theme="dark"] .crm-dm-head button{background:#202731!important;border-color:#343e4a!important;color:#dfc89e!important}
html[data-guru-theme="dark"] .crm-dm-peer{color:#f2eee9!important}
html[data-guru-theme="dark"] .crm-dm-peer:hover{background:#1c232c!important;border-color:#394452!important}
html[data-guru-theme="dark"] .crm-dm-peer.active{background:#2a2225!important;border-color:#6e4140!important;box-shadow:none!important}
html[data-guru-theme="dark"] .crm-dm-copy small,html[data-guru-theme="dark"] .crm-dm-peer time{color:#98a1ad!important}
html[data-guru-theme="dark"] .crm-dm-empty{color:#98a1ad!important}html[data-guru-theme="dark"] .crm-dm-empty b{color:#f2eee9!important}
html[data-guru-theme="dark"] .crm-chat-peer-chip{color:#98a1ad!important}html[data-guru-theme="dark"] .crm-chat-peer-chip b{color:#f2eee9!important}
html[data-guru-theme="dark"] .crm-new-chat-search{background:#10151c!important;border-color:#303945!important;color:#f2eee9!important}
html[data-guru-theme="dark"] .crm-new-chat-people>button{background:#171c23!important;border-color:#303945!important;color:#f2eee9!important}
html[data-guru-theme="dark"] .crm-new-chat-people>button:hover{background:#202731!important;border-color:#414b59!important}
html[data-guru-theme="dark"] .crm-new-chat-people>button>span{background:#2a2225!important;color:#efdbb2!important}
html[data-guru-theme="dark"] .crm-new-chat-people>button>small{color:#98a1ad!important}

@media(max-width:720px){
  .crm-chat.is-direct{grid-template-columns:1fr!important;grid-template-rows:auto minmax(0,1fr)!important}
  .crm-chat.is-direct .crm-chat-sidebar{overflow:visible!important}
  .crm-dm-head{margin:7px 2px 5px;padding-top:7px}.crm-dm-head button{padding:6px 8px}
  .crm-dm-list{max-height:38dvh;overflow-y:auto;padding:1px 0 5px}
  .crm-dm-list.mobile-collapsed{display:none!important}.crm-dm-list.mobile-open{display:grid!important}
  .crm-dm-peer{grid-template-columns:36px minmax(0,1fr) auto;padding:8px}.crm-dm-avatar{width:36px;height:36px;flex-basis:36px}
  .crm-chat.is-direct .crm-chat-panel{grid-template-rows:auto 48px minmax(0,1fr) auto!important;min-height:0!important}
  .crm-dm-mobile-switch{display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:7px;padding:7px 8px;border-bottom:1px solid var(--line);background:#fff}
  .crm-dm-mobile-switch>button:first-child{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:8px;text-align:left;padding:4px 7px;border:0;background:transparent;min-width:0}.crm-dm-mobile-switch .crm-dm-avatar{width:34px;height:34px;flex-basis:34px}.crm-dm-mobile-switch>button:first-child>span:nth-child(2){display:grid;gap:1px;min-width:0}.crm-dm-mobile-switch b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-dm-mobile-switch small{font-size:9px;color:var(--muted)}.crm-dm-mobile-switch em{font-size:9px;font-style:normal;color:var(--brand);font-weight:800}.crm-dm-mobile-switch>button:last-child{width:42px;height:42px;padding:0;font-size:22px;color:var(--brand)}
  .crm-chat-peer-chip{padding:0 2px}.crm-chat-peer-chip .crm-dm-avatar{display:none}
  .crm-new-chat-modal{width:100%!important;max-height:100dvh!important}.crm-new-chat-people{grid-template-columns:1fr;max-height:60dvh}.crm-new-chat-people>button{min-height:58px}
  html[data-guru-theme="dark"] .crm-dm-mobile-switch{background:#151a21!important;border-color:#2d3540!important}html[data-guru-theme="dark"] .crm-dm-mobile-switch>button{color:#f2eee9!important}html[data-guru-theme="dark"] .crm-dm-mobile-switch em{color:#dfc89e!important}
}

/* ===== GURU v1.8.14 — calendar UX + mobile status stability ===== */
.calendar-month-picker{display:flex;align-items:center;gap:8px;padding:0 4px;color:var(--muted);font-size:11px;font-weight:700}
.calendar-month-picker input{min-width:145px}
.mobile-calendar-agenda{display:none}
@media(max-width:720px){
  .calendar-month-picker{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;margin-top:2px;padding:0}
  .calendar-month-picker input{width:100%;min-width:0;min-height:42px}
  .mobile-calendar-agenda{display:grid;gap:10px;width:100%;min-width:0;margin-top:10px}
  .month-calendar,.calendar-title,.calendar-scope-note{display:none!important}
  .mobile-calendar-caption{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;padding:4px 2px 2px;text-transform:none}
  .mobile-calendar-caption b{font-size:18px;text-transform:capitalize;color:var(--text)}
  .mobile-calendar-caption span{font-size:10px;color:var(--muted);text-align:right}
  .mobile-calendar-day{display:grid;gap:8px;padding:11px;border:1px solid var(--line);border-radius:15px;background:var(--panel,#fff);min-width:0}
  .mobile-calendar-day.today{border-color:color-mix(in srgb,var(--brand) 55%,var(--line));box-shadow:0 0 0 2px color-mix(in srgb,var(--brand) 8%,transparent)}
  .mobile-calendar-day>header{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding-bottom:7px;border-bottom:1px solid var(--line)}
  .mobile-calendar-day>header time{font-size:14px;font-weight:900;text-transform:capitalize;color:var(--text)}
  .mobile-calendar-day>header span{font-size:10px;color:var(--muted);text-transform:capitalize}
  .mobile-calendar-events{display:grid;gap:7px;min-width:0}
  .mobile-calendar-event{display:grid;grid-template-columns:30px minmax(0,1fr);gap:8px;align-items:center;width:100%;min-width:0;padding:9px 10px;border-radius:11px;text-align:left;background:color-mix(in srgb,var(--brand) 4%,var(--panel,#fff));border:1px solid color-mix(in srgb,var(--brand) 13%,var(--line));color:var(--text)}
  .mobile-calendar-event-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:color-mix(in srgb,var(--brand) 12%,var(--panel,#fff));color:var(--brand);font-weight:900}
  .mobile-calendar-event>span:last-child{display:grid;gap:2px;min-width:0}
  .mobile-calendar-event b{font-size:12px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
  .mobile-calendar-event small{font-size:10px;color:var(--muted)}
  .mobile-calendar-empty{margin:0!important}
  .order-status-tabs,.site-order-tabs{scroll-behavior:auto!important;overscroll-behavior:none!important}
}
html[data-guru-theme="dark"] .mobile-calendar-day{background:#171d25!important;border-color:#303945!important}
html[data-guru-theme="dark"] .mobile-calendar-day>header{border-color:#303945!important}
html[data-guru-theme="dark"] .mobile-calendar-event{background:#11171e!important;border-color:#2d3742!important;color:#f2eee9!important}
html[data-guru-theme="dark"] .mobile-calendar-event-icon{background:#2a2225!important;color:#efdbb2!important}
html[data-guru-theme="dark"] .calendar-month-picker input{background:#11171e!important;border-color:#303945!important;color:#f2eee9!important}
\n\n/* ===== GURU v1.8.15 — mobile direct chat message lane ===== */
@media(max-width:720px){
  /* Личный чат: лента сообщений всегда имеет собственную видимую высоту. */
  .crm-chat.is-direct{height:auto!important;min-height:0!important;overflow:visible!important}
  .crm-chat.is-direct .crm-chat-panel{
    grid-template-rows:auto 48px minmax(230px,42dvh) auto!important;
    min-height:0!important;
    height:auto!important;
    overflow:visible!important;
  }
  .crm-chat.is-direct .crm-chat-list{
    display:block!important;
    min-height:230px!important;
    height:42dvh!important;
    max-height:420px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch!important;
    padding:10px!important;
    scroll-padding-bottom:12px!important;
  }
  .crm-chat.is-direct .crm-chat-list>.crm-chat-message{width:100%;min-width:0}
  .crm-chat.is-direct .crm-chat-compose{position:relative!important;z-index:2!important;margin-top:0!important}
  .crm-chat.is-direct .crm-chat-toolbar{min-height:48px!important}
}
@media(max-width:420px){
  .crm-chat.is-direct .crm-chat-list{height:38dvh!important;min-height:210px!important}
  .crm-chat.is-direct .crm-chat-panel{grid-template-rows:auto 48px minmax(210px,38dvh) auto!important}
}


/* ===== GURU v1.8.16 — mobile personal chat user selector ===== */
.crm-dm-mobile-peer{display:none}
@media(max-width:720px){
  /* На телефоне вместо отдельного списка диалогов — один понятный выбор сотрудника. */
  .crm-chat.is-direct .crm-dm-head,
  .crm-chat.is-direct .crm-dm-list,
  .crm-chat.is-direct .crm-dm-mobile-switch{display:none!important}
  .crm-dm-mobile-peer{
    display:grid!important;
    gap:8px;
    padding:9px 10px;
    border-bottom:1px solid var(--line);
    background:var(--panel,#fff);
    min-width:0;
  }
  .crm-dm-mobile-peer>label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px;min-width:0}
  .crm-dm-mobile-peer>label>span{font-size:10px;font-weight:850;color:var(--muted);white-space:nowrap}
  .crm-dm-mobile-peer select{
    width:100%;min-width:0;min-height:44px;
    border:1px solid var(--line);border-radius:12px;
    padding:8px 36px 8px 11px;
    background:var(--panel,#fff);color:var(--text);
    font-size:13px;font-weight:800;
  }
  .crm-dm-mobile-peer-meta{display:flex;align-items:center;gap:8px;min-width:0;padding:1px 2px 0}
  .crm-dm-mobile-peer-meta .crm-dm-avatar{width:30px;height:30px;flex-basis:30px;border-radius:9px;font-size:11px}
  .crm-dm-mobile-peer-meta>div{display:grid;gap:1px;min-width:0}
  .crm-dm-mobile-peer-meta b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .crm-dm-mobile-peer-meta small{font-size:9px;color:var(--muted)}
  /* Переписка всегда занимает отдельную видимую область, поле ввода — сразу под ней. */
  .crm-chat.is-direct .crm-chat-panel{grid-template-rows:auto 48px minmax(230px,42dvh) auto!important}
  .crm-chat.is-direct .crm-chat-list{display:block!important;visibility:visible!important;min-height:230px!important;overflow-y:auto!important;overflow-x:hidden!important}
  .crm-chat.is-direct .crm-chat-compose{display:grid!important;visibility:visible!important;position:relative!important}
}
@media(max-width:420px){
  .crm-dm-mobile-peer>label{grid-template-columns:1fr;gap:5px}
  .crm-dm-mobile-peer>label>span{white-space:normal}
  .crm-chat.is-direct .crm-chat-list{min-height:220px!important;height:40dvh!important}
  .crm-chat.is-direct .crm-chat-panel{grid-template-rows:auto 48px minmax(220px,40dvh) auto!important}
}
html[data-guru-theme="dark"] .crm-dm-mobile-peer{background:#151a21!important;border-color:#2d3540!important;color:#f2eee9!important}
html[data-guru-theme="dark"] .crm-dm-mobile-peer select{background:#10151c!important;border-color:#303945!important;color:#f2eee9!important}
html[data-guru-theme="dark"] .crm-dm-mobile-peer-meta small{color:#98a1ad!important}

/* ===== GURU v1.8.17 — mobile private chat: selector -> messages -> composer ===== */
@media(max-width:720px){
  /* На телефоне личный чат состоит ровно из трёх зон: выбор пользователя, переписка, ввод. */
  .crm-chat.is-direct .crm-chat-toolbar{display:none!important}
  .crm-chat.is-direct .crm-dm-mobile-peer-meta{display:none!important}
  .crm-chat.is-direct .crm-chat-peer-chip{display:none!important}
  .crm-chat.is-direct .crm-chat-panel{
    display:grid!important;
    grid-template-rows:auto minmax(160px,28dvh) auto!important;
    min-height:0!important;
    height:auto!important;
    overflow:visible!important;
  }
  .crm-chat.is-direct .crm-dm-mobile-peer{
    display:block!important;
    padding:9px 10px 10px!important;
  }
  .crm-chat.is-direct .crm-dm-mobile-peer>label{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:5px!important;
  }
  .crm-chat.is-direct .crm-dm-mobile-peer>label>span{
    display:block!important;
    font-size:10px!important;
    line-height:1.2!important;
  }
  .crm-chat.is-direct .crm-dm-mobile-peer select{
    width:100%!important;
    min-height:44px!important;
  }
  .crm-chat.is-direct .crm-chat-list{
    display:block!important;
    visibility:visible!important;
    height:clamp(160px,28dvh,250px)!important;
    min-height:160px!important;
    max-height:250px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:9px!important;
    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .crm-chat.is-direct .crm-chat-compose{
    display:grid!important;
    visibility:visible!important;
    position:relative!important;
    z-index:3!important;
    margin:0!important;
    padding:9px!important;
    border-top:1px solid var(--line)!important;
  }
  .crm-chat.is-direct .crm-chat-input-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 38px 92px!important;
    gap:6px!important;
    align-items:end!important;
  }
  .crm-chat.is-direct .crm-chat-input-row textarea{
    grid-column:1/-1!important;
    min-height:64px!important;
    max-height:120px!important;
    resize:vertical!important;
  }
  .crm-chat.is-direct .crm-chat-attach{grid-column:2!important;width:38px!important;height:38px!important}
  .crm-chat.is-direct .crm-chat-send{grid-column:3!important;height:38px!important;min-width:0!important}
  .crm-chat.is-direct .crm-chat-compose-foot{display:none!important}
}
@media(max-width:390px){
  .crm-chat.is-direct .crm-chat-panel{grid-template-rows:auto minmax(145px,25dvh) auto!important}
  .crm-chat.is-direct .crm-chat-list{height:clamp(145px,25dvh,215px)!important;min-height:145px!important;max-height:215px!important}
  .crm-chat.is-direct .crm-chat-input-row{grid-template-columns:minmax(0,1fr) 36px 84px!important}
  .crm-chat.is-direct .crm-chat-attach{width:36px!important;height:36px!important}
  .crm-chat.is-direct .crm-chat-send{height:36px!important}
}

/* v1.8.17 final mobile geometry: keep selector, messages and composer visible together. */
@media(max-width:720px){
  .crm-chat.is-direct{
    height:clamp(360px,calc(100dvh - 250px),560px)!important;
    min-height:360px!important;
    max-height:560px!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    overflow:hidden!important;
  }
  .crm-chat.is-direct .crm-chat-panel{
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
  }
  .crm-chat.is-direct .crm-chat-list{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
  }
  .crm-chat.is-direct .crm-chat-compose{min-height:0!important}
}
@media(max-width:390px){
  .crm-chat.is-direct{height:clamp(340px,calc(100dvh - 235px),510px)!important;min-height:340px!important;max-height:510px!important}
  .crm-chat.is-direct .crm-chat-panel{grid-template-rows:auto minmax(0,1fr) auto!important}
  .crm-chat.is-direct .crm-chat-list{height:auto!important;min-height:0!important;max-height:none!important}
}


/* ===== GURU v1.8.18 — mobile chat: no message counter card ===== */
@media(max-width:720px){
  /* На телефоне счетчик сообщений над чатом не занимает экран. */
  .chat-mobile-message-stat{display:none!important}
  /* Освободившееся место отдаём самому чату во всех трех режимах. */
  .crm-chat.guru-chat{
    height:calc(100dvh - 175px)!important;
    min-height:430px!important;
    max-height:none!important;
    overflow:hidden!important;
  }
  .crm-chat.guru-chat .crm-chat-panel{min-height:0!important;height:100%!important;overflow:hidden!important}
  .crm-chat.guru-chat .crm-chat-list{min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}
  .crm-chat.guru-chat.is-direct{height:calc(100dvh - 175px)!important;min-height:430px!important;max-height:none!important}
  .crm-chat.guru-chat.is-direct .crm-chat-panel{grid-template-rows:auto minmax(0,1fr) auto!important}
  .crm-chat.guru-chat.is-direct .crm-chat-list{height:auto!important;min-height:0!important;max-height:none!important}
}
@media(max-width:390px){
  .crm-chat.guru-chat,.crm-chat.guru-chat.is-direct{height:calc(100dvh - 160px)!important;min-height:400px!important}
}

/* GURU v1.8.21 — chat notifications in legacy notification center */
.notification-item-chat{border-color:color-mix(in srgb,var(--guru-primary,#802F2D) 24%,var(--line,#ddd));background:linear-gradient(135deg,color-mix(in srgb,var(--guru-helper,#EFDBB2) 14%,var(--surface,#fff)),var(--surface,#fff))}.notification-item-chat .notification-item-icon{background:color-mix(in srgb,var(--guru-helper,#EFDBB2) 72%,white);color:var(--guru-primary,#802F2D)}.notification-chat-open{display:block;margin-top:5px;font-size:11px;font-style:normal;font-weight:800;color:var(--guru-primary,#802F2D)}html[data-guru-theme="dark"] .notification-item-chat{background:linear-gradient(135deg,color-mix(in srgb,var(--guru-primary,#802F2D) 18%,var(--surface,#241f1f)),var(--surface,#241f1f));border-color:color-mix(in srgb,var(--guru-helper,#EFDBB2) 30%,transparent)}html[data-guru-theme="dark"] .notification-item-chat .notification-item-icon{background:color-mix(in srgb,var(--guru-helper,#EFDBB2) 18%,transparent);color:var(--guru-helper,#EFDBB2)}html[data-guru-theme="dark"] .notification-chat-open{color:var(--guru-helper,#EFDBB2)}

/* GURU v1.8.22 — notification cards fit all text */
.notification-list{overflow-x:hidden}.notification-item{height:auto!important;min-height:86px;overflow:visible!important;white-space:normal!important}.notification-item>span:last-child{min-width:0;width:100%;overflow:visible!important;display:grid;grid-auto-rows:max-content;gap:4px}.notification-item>span:last-child>b,.notification-item>span:last-child>small,.notification-item>span:last-child>em,.notification-item>span:last-child>time{display:block;min-width:0;max-width:100%;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;word-break:break-word}.notification-item>span:last-child>b{line-height:1.35}.notification-item small{line-height:1.4}.notification-chat-open{line-height:1.4;margin-top:3px}.notification-item time{line-height:1.4;margin-top:1px;padding-bottom:1px}@media(max-width:580px){.notification-modal-back{padding:8px}.notification-modal{width:calc(100vw - 16px);max-height:94vh}.notification-modal>.info-body{padding:12px;max-height:calc(94vh - 68px)}.notification-list{max-height:60vh;padding-right:0}.notification-item{grid-template-columns:32px minmax(0,1fr);gap:9px;padding:11px;min-height:0}.notification-item-icon{width:30px;height:30px}.notification-item>span:last-child>b{font-size:12px}.notification-item small,.notification-item time{font-size:10px}.notification-chat-open{font-size:11px}}

/* GURU v1.8.23 — notification action on right, clean responsive layout */
.notification-item{grid-template-columns:32px minmax(0,1fr)!important;align-items:start!important;column-gap:11px!important;row-gap:0!important;padding:12px 13px!important;min-height:0!important;height:auto!important;overflow:hidden!important}.notification-item>.notification-item-body{min-width:0!important;width:100%!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;column-gap:14px!important;row-gap:5px!important;align-items:start!important;overflow:visible!important}.notification-item-copy{grid-column:1;grid-row:1;min-width:0;display:grid;gap:3px}.notification-item-copy>b,.notification-item-copy>small{min-width:0;max-width:100%;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;word-break:break-word}.notification-item-copy>b{line-height:1.35}.notification-item-copy>small{line-height:1.35}.notification-chat-open{grid-column:2;grid-row:1;align-self:center;justify-self:end!important;margin:0!important;padding:5px 0 5px 8px!important;white-space:nowrap!important;font-size:11px!important;line-height:1.2!important;text-align:right!important}.notification-item>.notification-item-body>time{grid-column:1/-1;grid-row:2;display:block!important;margin:0!important;padding:0!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.3!important}.notification-item-icon{margin-top:1px}@media(max-width:580px){.notification-item{grid-template-columns:30px minmax(0,1fr)!important;column-gap:9px!important;padding:11px!important}.notification-item>.notification-item-body{column-gap:8px!important}.notification-chat-open{font-size:10px!important;padding-left:4px!important}.notification-item-copy>b{font-size:12px!important}.notification-item-copy>small,.notification-item>.notification-item-body>time{font-size:10px!important}}

/* GURU v1.8.24 — restore legacy notification card size */
.notification-item{min-height:86px!important;height:auto!important;padding:12px 13px!important;grid-template-columns:34px minmax(0,1fr)!important;column-gap:9px!important;row-gap:0!important;align-items:flex-start!important}.notification-item-icon{width:32px!important;height:32px!important;border-radius:10px!important;margin-top:0!important}.notification-item>.notification-item-body{column-gap:14px!important;row-gap:5px!important}.notification-chat-open{justify-self:end!important;align-self:center!important;white-space:nowrap!important}@media(max-width:580px){.notification-item{min-height:86px!important;padding:12px 13px!important;grid-template-columns:34px minmax(0,1fr)!important;column-gap:9px!important}.notification-item-icon{width:32px!important;height:32px!important}.notification-item>.notification-item-body{column-gap:10px!important}.notification-chat-open{font-size:11px!important;padding-left:6px!important}}

/* GURU v1.8.26 — Telegram 1.0 */
.telegram-prefs{display:grid;gap:14px}.telegram-status{display:grid;grid-template-columns:42px 1fr;gap:12px;align-items:center;padding:13px;border:1px solid var(--line);border-radius:13px;background:#fff}.telegram-status>span{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--guru-helper-soft);color:var(--guru-primary);font-size:20px}.telegram-status>div{display:grid;gap:3px}.telegram-status small{color:var(--muted)}.telegram-status.ok{border-color:#b8d9c3;background:#f5fbf7}.telegram-status.wait{border-color:#e2cfaa;background:#fffaf0}.telegram-actions{display:flex;gap:9px;flex-wrap:wrap}.telegram-pref-form{display:grid;gap:8px}.telegram-pref-form>label{display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:#fff}.telegram-pref-form>label>input{margin-top:3px}.telegram-pref-form>label>span{display:grid;gap:2px}.telegram-pref-form small{color:var(--muted)}.telegram-admin{display:grid;gap:16px}.telegram-admin-badge{padding:7px 10px;border-radius:999px;background:#f4e9df;color:var(--guru-primary);font-size:11px;font-weight:800}.telegram-admin-badge.ok{background:#e7f5eb;color:#287145}.telegram-admin-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.telegram-admin-summary article{display:grid;gap:3px;padding:12px;border:1px solid var(--line);border-radius:11px;background:#fff}.telegram-admin-summary small,.telegram-admin-summary span{color:var(--muted);font-size:10px}.profile-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.7fr);gap:14px;align-items:start}.profile-telegram{display:grid;gap:14px}.profile-telegram-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--guru-helper-soft);color:var(--guru-primary);font-size:20px}.profile-telegram h3{margin:9px 0 4px}.profile-telegram p{margin:0;color:var(--muted)}
html[data-guru-theme="dark"] .telegram-status,html[data-guru-theme="dark"] .telegram-pref-form>label,html[data-guru-theme="dark"] .telegram-admin-summary article{background:#1b2129!important;border-color:#313a46!important;color:#f1ede7!important}html[data-guru-theme="dark"] .telegram-status.ok{background:#18241f!important;border-color:#294438!important}html[data-guru-theme="dark"] .telegram-status.wait{background:#241f19!important;border-color:#514432!important}
@media(max-width:720px){.telegram-admin-summary,.profile-grid{grid-template-columns:1fr}.telegram-actions{display:grid;grid-template-columns:1fr}.telegram-actions button{width:100%}.telegram-status{grid-template-columns:38px 1fr}.telegram-status>span{width:38px;height:38px}.profile-telegram{width:100%}}


/* GURU v1.8.32 — Help / login / browser notifications / compact sidebar scrollbar */
.guru-login{background:radial-gradient(circle at 18% 18%,#8e3b38 0,transparent 30%),radial-gradient(circle at 82% 78%,#5d211f 0,transparent 28%),linear-gradient(145deg,#120f10 0%,#211719 45%,#311b1c 100%)!important;color:#f7efe8}.guru-login-shell{width:min(980px,100%);display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,430px);gap:36px;align-items:center}.guru-login-side{padding:34px;color:#f6eee7}.guru-login-mark{display:inline-flex;padding:7px 11px;border:1px solid #efdbb255;border-radius:999px;color:#efdbb2;font-size:11px;font-weight:900;letter-spacing:.18em}.guru-login-side h1{font-size:clamp(34px,5vw,58px);line-height:1.02;margin:20px 0 16px;max-width:620px}.guru-login-side p{max-width:560px;color:#d7c8c2;font-size:16px;line-height:1.65}.guru-login-features{display:flex;gap:14px;flex-wrap:wrap;margin-top:28px;color:#efdbb2;font-size:12px}.guru-login-card{background:#181719!important;border:1px solid #ffffff18!important;color:#f7efe8!important;box-shadow:0 28px 90px #0009!important;backdrop-filter:blur(14px)}.guru-login-card .guru-logo-brand{justify-content:center}.guru-login-heading{text-align:center;margin:18px 0 22px}.guru-login-heading small{color:#efdbb2;font-size:10px;font-weight:900;letter-spacing:.16em}.guru-login-card h2{margin:6px 0!important;color:#fff}.guru-login-card p,.guru-login-card .hint{color:#a99d99!important}.guru-login-card label{color:#f2e8e1}.guru-login-card input{background:#242124!important;border-color:#3d3638!important;color:#fff!important;outline:none}.guru-login-card input:focus{border-color:#b76761!important;box-shadow:0 0 0 3px #802f2d33}.login-password{position:relative}.login-password input{padding-right:46px!important}.login-password button{position:absolute;right:5px;top:5px;width:34px;height:34px;padding:0;border:0;background:transparent;color:#efdbb2}.guru-login-submit{width:100%;height:46px;margin-top:8px;background:#802f2d!important;border-color:#a44b47!important}.desktop-sidebar{scrollbar-width:thin;scrollbar-color:#b86a64 transparent}.desktop-sidebar::-webkit-scrollbar{width:6px}.desktop-sidebar::-webkit-scrollbar-track{background:transparent}.desktop-sidebar::-webkit-scrollbar-thumb{background:#ffffff32;border-radius:999px;border:1px solid transparent;background-clip:padding-box}.desktop-sidebar::-webkit-scrollbar-thumb:hover{background:#efdbb266;background-clip:padding-box}.help-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,390px);gap:24px;align-items:center;background:linear-gradient(135deg,color-mix(in srgb,var(--guru-helper,#EFDBB2) 22%,var(--surface,#fff)),var(--surface,#fff))}.help-hero h2{margin:4px 0 8px}.help-hero p{margin:0;color:var(--muted)}.help-hero input{width:100%;height:44px;border:1px solid var(--line);border-radius:12px;padding:0 13px;background:var(--surface)}.help-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.help-card{border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden}.help-card summary{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:15px 16px;cursor:pointer;font-weight:800}.help-card summary small{color:var(--muted);font-size:10px}.help-card p{margin:0;padding:0 16px 16px;color:var(--muted);line-height:1.55}.browser-notify.on{border-color:#b8d9c3!important}.browser-notify.on>span{background:#e7f5eb!important;color:#287145!important}.browser-notify.denied{border-color:#e4b7b7!important}.browser-notify.denied>span{background:#fff0f0!important;color:#9c3333!important}.modal-back[data-logical-action="1"] .modal-actions .primary:disabled{opacity:.6;cursor:wait}
html[data-guru-theme="dark"] .help-hero,html[data-guru-theme="dark"] .help-card{background:#1b2129!important;border-color:#313a46!important}html[data-guru-theme="dark"] .help-hero input{background:#151a20!important;color:#f1ede7!important;border-color:#313a46!important}
@media(max-width:720px){.guru-login{padding:14px}.guru-login-shell{display:block}.guru-login-side{display:none}.guru-login-card{padding:24px 18px!important;border-radius:20px!important}.help-hero{grid-template-columns:1fr}.help-grid{grid-template-columns:1fr}.help-card summary{grid-template-columns:1fr}.help-card summary small{margin-top:-5px}.modal-back[data-logical-action="1"]{align-items:end!important;padding:8px!important}.modal-back[data-logical-action="1"]>.modal{width:100%!important;max-height:94dvh!important;border-radius:18px 18px 12px 12px!important}}


/* GURU v1.8.33 — client-test polish: selectors, analytics dates, notifications, QR, help, modal close */
.modal-title{position:relative;min-height:40px;align-items:center!important}.modal-title>[data-close]{flex:0 0 36px!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:0!important;margin:-3px -3px -3px 12px!important;border:1px solid var(--line)!important;border-radius:11px!important;background:var(--surface,#fff)!important;color:var(--text,#2b2625)!important;display:grid!important;place-items:center!important;font-family:Arial,sans-serif!important;font-size:0!important;line-height:1!important;box-shadow:none!important}.modal-title>[data-close]::before{content:'×';font-size:25px;line-height:1;font-weight:400;transform:translateY(-1px)}.modal-title>[data-close]:hover{background:color-mix(in srgb,var(--brand,#802F2D) 9%,var(--surface,#fff))!important;border-color:color-mix(in srgb,var(--brand,#802F2D) 28%,var(--line))!important;color:var(--brand,#802F2D)!important}
.warehouse-day-head{padding:18px!important;border:1px solid color-mix(in srgb,var(--brand) 14%,var(--line))!important;background:linear-gradient(135deg,color-mix(in srgb,var(--brand) 6%,var(--surface)) 0%,var(--surface) 68%)!important}.warehouse-day-head>div:first-child h2{margin:0 0 6px}.warehouse-day-head>div:first-child p{margin:0;color:var(--muted)}.warehouse-day-controls{display:grid!important;grid-template-columns:minmax(230px,1fr) minmax(170px,.65fr)!important;gap:10px!important;min-width:min(480px,48vw)}.warehouse-day-controls label{padding:8px 10px 9px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--surface)!important;gap:4px!important;color:var(--muted)!important}.warehouse-day-controls select,.warehouse-day-controls input{height:40px!important;min-height:40px!important;border:0!important;border-radius:8px!important;padding:0 8px!important;background:color-mix(in srgb,var(--surface) 92%,var(--line))!important;color:var(--text)!important;font-weight:700!important;box-shadow:none!important}.warehouse-day-controls select:focus,.warehouse-day-controls input:focus{outline:2px solid color-mix(in srgb,var(--brand) 25%,transparent)!important}
.analytics-period-panel{padding:16px!important;border:1px solid color-mix(in srgb,var(--brand) 12%,var(--line))!important;background:linear-gradient(180deg,color-mix(in srgb,var(--brand) 4%,var(--surface)),var(--surface))!important}.analytics-presets{margin:0!important;padding-bottom:12px;border-bottom:1px solid var(--line)}.analytics-preset{border-radius:999px!important;min-height:38px!important;padding:7px 13px!important}.analytics-period-form{grid-template-columns:repeat(4,minmax(130px,1fr)) auto!important;gap:10px!important}.analytics-period-form label{padding:8px 10px 9px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--muted)!important}.analytics-period-form input[type=date]{height:40px!important;min-height:40px!important;border:0!important;background:color-mix(in srgb,var(--surface) 92%,var(--line))!important;border-radius:8px!important;padding:0 8px!important;color:var(--text)!important;font-weight:700!important;box-shadow:none!important}.analytics-period-form button{height:58px!important;border-radius:12px!important;align-self:stretch!important}
.notification-modal{width:min(700px,calc(100vw - 36px))!important}.notification-signal-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:1fr!important}.notification-signal,.notification-signal-empty{min-height:74px!important;height:100%!important}.notification-signal{grid-template-columns:36px minmax(0,1fr)!important;padding:12px!important}.notification-signal>span{width:34px!important;height:34px!important}.notification-item{min-height:78px!important;border-radius:12px!important}.notification-item>.notification-item-body{grid-template-columns:minmax(0,1fr) auto!important}.notification-chat-open{min-width:112px;text-align:right!important;font-style:normal!important;font-weight:800!important;color:var(--brand,#802F2D)!important}
.help-hero-detailed{align-items:stretch!important}.help-search-box{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:13px;padding:0 12px;background:var(--surface)}.help-search-box input{border:0!important;background:transparent!important;box-shadow:none!important;padding-inline:0!important}.help-quick{display:flex;gap:8px;flex-wrap:wrap;margin:-2px 0 14px}.help-quick button{border-radius:999px;padding:8px 12px}.help-grid-detailed{grid-template-columns:1fr!important}.help-guide{border:1px solid var(--line);border-radius:15px;background:var(--surface);padding:16px;display:grid;gap:13px}.help-guide-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start}.help-guide h3{margin:4px 0 5px;font-size:18px}.help-guide p{margin:0;color:var(--muted);line-height:1.5}.help-location{display:inline-flex;padding:4px 8px;border-radius:999px;background:color-mix(in srgb,var(--brand) 9%,var(--surface));color:var(--brand);font-size:10px;font-weight:900}.help-open-section{white-space:nowrap;align-self:center}.help-guide ol{margin:0;padding:0 0 0 22px;display:grid;gap:7px;line-height:1.45}.help-tip{display:grid;grid-template-columns:auto 1fr;gap:10px;padding:10px 12px;border-radius:11px;background:color-mix(in srgb,var(--guru-helper,#EFDBB2) 24%,var(--surface));font-size:12px}.help-tip b{color:var(--brand)}
.qr-workflow{display:grid;gap:15px;padding:18px}.qr-workflow-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:center}.qr-workflow-head h2{margin:4px 0 7px}.qr-workflow-head p{margin:0;color:var(--muted);max-width:760px}.qr-workflow-steps{display:flex;gap:8px}.qr-workflow-steps span{display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid var(--line);border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap}.qr-workflow-steps b{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--brand);color:#fff}.qr-session-place{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px 12px;border:1px dashed var(--line);border-radius:13px;background:color-mix(in srgb,var(--surface) 94%,var(--line))}.qr-session-place>span{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--guru-helper-soft);font-size:20px}.qr-session-place>div{display:grid;gap:2px}.qr-session-place small{color:var(--muted)}.qr-session-place.active{border-style:solid;border-color:#9bc7aa;background:#f4faf6}.qr-scan-console{display:grid;grid-template-columns:58px minmax(0,1fr);gap:14px;align-items:end;padding:14px;border-radius:14px;background:color-mix(in srgb,var(--brand) 4%,var(--surface));border:1px solid var(--line)}.qr-scan-main{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.qr-scan-main label{display:grid;gap:5px;font-size:11px;font-weight:800}.qr-scan-main input{height:44px}.qr-scan-main .scan-line{margin:0;display:flex;gap:8px}.qr-scan-result{min-height:68px}.qr-resolved{display:grid;gap:12px;padding:15px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.qr-result-badge{justify-self:start;padding:4px 8px;border-radius:999px;background:var(--guru-helper-soft);color:var(--brand);font-size:10px;font-weight:900}.qr-resolved h4{margin:0;font-size:18px}.qr-resolved p{margin:0;color:var(--muted)}.qr-location-stats{display:flex;gap:8px;flex-wrap:wrap}.qr-location-stats span{padding:8px 10px;border-radius:10px;background:color-mix(in srgb,var(--surface) 90%,var(--line));font-size:11px}.qr-product-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}.qr-product-head p{font-size:11px}.qr-stock-pill{min-width:150px;padding:10px 12px;border-radius:12px;background:color-mix(in srgb,var(--brand) 6%,var(--surface));display:grid;text-align:right}.qr-stock-pill small,.qr-stock-pill span{font-size:10px;color:var(--muted)}.qr-stock-pill b{font-size:22px}.qr-active-place{display:grid;grid-template-columns:32px 1fr;gap:9px;align-items:center;padding:10px 11px;border-radius:11px;border:1px solid var(--line)}.qr-active-place.ok{border-color:#a9ceb5;background:#f4faf6}.qr-active-place.warn{border-color:#e6cda1;background:#fff9ef}.qr-active-place>div{display:grid;gap:2px}.qr-active-place small{color:var(--muted)}.qr-stock-action{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:12px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--surface) 96%,var(--line))}.qr-stock-action label{display:grid;gap:5px;font-size:11px;font-weight:800}.qr-stock-action select,.qr-stock-action input{min-height:42px}.qr-action-note{font-size:10px;color:var(--muted)}.qr-labels-section{margin-top:15px}.qr-code-card{grid-template-columns:66px minmax(0,1fr) auto!important}.qr-card-code{width:60px;height:60px;padding:4px;background:#fff;border-radius:9px;border:1px solid var(--line)}.qr-card-code svg{width:100%;height:100%;display:block}
html[data-guru-theme="dark"] .warehouse-day-head,html[data-guru-theme="dark"] .analytics-period-panel,html[data-guru-theme="dark"] .help-guide,html[data-guru-theme="dark"] .qr-workflow,html[data-guru-theme="dark"] .qr-resolved{background:#1b2129!important;border-color:#313a46!important}html[data-guru-theme="dark"] .warehouse-day-controls label,html[data-guru-theme="dark"] .analytics-period-form label,html[data-guru-theme="dark"] .qr-stock-action,html[data-guru-theme="dark"] .qr-scan-console{background:#171d25!important;border-color:#313a46!important}html[data-guru-theme="dark"] .warehouse-day-controls select,html[data-guru-theme="dark"] .warehouse-day-controls input,html[data-guru-theme="dark"] .analytics-period-form input[type=date]{background:#11171e!important;color:#f1ede7!important}html[data-guru-theme="dark"] .qr-session-place,html[data-guru-theme="dark"] .qr-active-place,html[data-guru-theme="dark"] .help-search-box{background:#171d25!important;border-color:#313a46!important}html[data-guru-theme="dark"] .qr-session-place.active,html[data-guru-theme="dark"] .qr-active-place.ok{background:#17251f!important;border-color:#315342!important}html[data-guru-theme="dark"] .qr-active-place.warn{background:#292219!important;border-color:#5a482c!important}html[data-guru-theme="dark"] .modal-title>[data-close]{background:#10151b!important;border-color:#303945!important;color:#e8d5ad!important}
@media(max-width:900px){.analytics-period-form{grid-template-columns:1fr 1fr!important}.analytics-period-form button{grid-column:1/-1;height:44px!important}.warehouse-day-controls{min-width:0;grid-template-columns:1fr 1fr!important}.qr-workflow-head{grid-template-columns:1fr}.qr-workflow-steps{overflow:auto;padding-bottom:2px}.qr-scan-main{grid-template-columns:1fr}.qr-scan-main .scan-line{width:100%}.qr-scan-main .scan-line button{flex:1}.qr-product-head{grid-template-columns:1fr}.qr-stock-pill{text-align:left}.qr-code-card{grid-template-columns:58px minmax(0,1fr)!important}.qr-code-card .card-actions{grid-column:1/-1}.qr-card-code{width:54px;height:54px}}
@media(max-width:580px){.warehouse-day-controls,.analytics-period-form,.qr-stock-action{grid-template-columns:1fr!important}.analytics-period-form button{grid-column:auto}.notification-modal{width:calc(100vw - 16px)!important}.notification-signal-grid{grid-template-columns:1fr!important}.notification-signal,.notification-signal-empty{min-height:68px!important}.notification-item{min-height:74px!important}.notification-chat-open{min-width:0!important;font-size:10px!important}.help-guide-top{grid-template-columns:1fr}.help-open-section{width:100%}.help-tip{grid-template-columns:1fr}.qr-scan-console{grid-template-columns:1fr}.qr-scan-console>.scanner-icon{display:none}.qr-workflow-steps span{padding:7px 9px}.qr-session-place{grid-template-columns:34px minmax(0,1fr)}.qr-session-place>button{grid-column:1/-1}.qr-code-card{grid-template-columns:52px minmax(0,1fr)!important}.qr-card-code{width:48px;height:48px}}


/* GURU v1.8.34 — mobile calendar, dark help, QR camera + HID scanner */
.calendar-view-select{min-width:270px;min-height:44px;padding:9px 36px 9px 12px;font-weight:800}.mobile-calendar-day-empty{display:grid;gap:3px;padding:10px 11px;border:1px dashed var(--line);border-radius:11px;background:color-mix(in srgb,var(--surface) 96%,var(--line));color:var(--muted)}.mobile-calendar-day-empty b{color:var(--text);font-size:12px}.mobile-calendar-day-empty span{font-size:11px}
.qr-scanner-status{grid-column:2;display:grid;gap:2px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface);font-size:11px}.qr-scanner-status span{color:var(--muted);line-height:1.4}.qr-scanner-status.ready{border-color:#9bc7aa;background:#f4faf6}.qr-scanner-guide{grid-column:2;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}.qr-scanner-guide summary{cursor:pointer;padding:11px 12px;font-weight:800;font-size:11px}.qr-scanner-guide ol{margin:0;padding:0 22px 8px 34px;display:grid;gap:6px;font-size:11px;line-height:1.45}.qr-scanner-guide p{margin:0;padding:0 12px 12px;color:var(--muted);font-size:10px;line-height:1.45}.qr-camera-shell{display:grid;gap:12px}.qr-camera-view{position:relative;overflow:hidden;border-radius:14px;background:#07090b;min-height:260px;display:grid;place-items:center}.qr-camera-view video{width:100%;max-height:68dvh;display:block;object-fit:cover}.qr-camera-frame{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}.qr-camera-frame span{width:min(68vw,290px);aspect-ratio:1;border:2px solid #efdbb2;border-radius:18px;box-shadow:0 0 0 999px #0005}.qr-camera-status{display:grid;gap:3px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface)}.qr-camera-status span{font-size:11px;color:var(--muted)}
html[data-guru-theme="dark"] .help-hero-detailed,html[data-guru-theme="dark"] .help-guide{background:#171d25!important;color:#f2eee9!important;border-color:#313a46!important}html[data-guru-theme="dark"] .help-hero-detailed h2,html[data-guru-theme="dark"] .help-guide h3,html[data-guru-theme="dark"] .help-guide ol,html[data-guru-theme="dark"] .help-guide li{color:#f2eee9!important}html[data-guru-theme="dark"] .help-hero-detailed p,html[data-guru-theme="dark"] .help-guide p{color:#b8c0ca!important}html[data-guru-theme="dark"] .help-location{background:#2b2225!important;color:#efdbb2!important}html[data-guru-theme="dark"] .help-tip{background:#29251f!important;color:#e7ddd0!important;border:1px solid #413a30!important}html[data-guru-theme="dark"] .help-tip b{color:#efdbb2!important}html[data-guru-theme="dark"] .help-quick button,html[data-guru-theme="dark"] .help-open-section{background:#151a21!important;color:#f1ede7!important;border-color:#35404d!important}html[data-guru-theme="dark"] .help-quick button:hover,html[data-guru-theme="dark"] .help-open-section:hover{background:#232a34!important;border-color:#6f4a46!important}html[data-guru-theme="dark"] .help-search-box span{color:#efdbb2!important}html[data-guru-theme="dark"] .mobile-calendar-day-empty,html[data-guru-theme="dark"] .qr-scanner-status,html[data-guru-theme="dark"] .qr-scanner-guide,html[data-guru-theme="dark"] .qr-camera-status{background:#11171e!important;border-color:#303945!important;color:#f2eee9!important}html[data-guru-theme="dark"] .mobile-calendar-day-empty span,html[data-guru-theme="dark"] .qr-scanner-status span,html[data-guru-theme="dark"] .qr-scanner-guide p,html[data-guru-theme="dark"] .qr-camera-status span{color:#aeb7c2!important}html[data-guru-theme="dark"] .qr-scanner-status.ready{background:#17251f!important;border-color:#315342!important}
@media(max-width:720px){.calendar-view-select{width:100%!important;min-width:0!important;min-height:50px!important;font-size:14px!important;padding:11px 38px 11px 12px!important}.mobile-calendar-caption{align-items:flex-start!important;flex-direction:column!important;gap:3px!important}.mobile-calendar-caption span{font-size:11px!important;text-align:left!important;font-weight:700!important}.qr-scan-main .scan-line{display:grid!important;grid-template-columns:1fr 1fr!important}.qr-scan-main .scan-line #hidScannerFocus{grid-column:1/-1}.qr-scanner-status,.qr-scanner-guide{grid-column:1}.qr-camera-view{min-height:300px}.qr-camera-frame span{width:min(72vw,280px)}}


/* GURU v1.8.35 — Client Test RC: delivery, QR workflow, modal/UI final polish */
.modal-title>[data-close]::before{content:none!important;display:none!important}.modal-title>[data-close]{font-size:24px!important;line-height:1!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;font-weight:500!important;text-indent:0!important;overflow:hidden!important}.modal-title{gap:12px}.modal-title h3,.modal-title>div{min-width:0;overflow-wrap:anywhere}.modal-actions{flex-wrap:wrap}.form-grid>label,.form-grid input,.form-grid select,.form-grid textarea{min-width:0}.modal input[type=date],.modal input[type=month],.delivery-filter input[type=date]{color-scheme:light;min-height:44px}
.delivery-filter-polished{display:grid!important;grid-template-columns:minmax(210px,260px) minmax(200px,260px) minmax(150px,1fr);align-items:end!important;gap:12px!important;padding:16px!important}.delivery-control{display:grid!important;gap:6px!important;font-size:11px;font-weight:850;color:var(--muted)}.delivery-control select{min-height:46px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:0 12px}.delivery-date-field{display:grid!important;gap:6px!important}.delivery-date-box{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;min-height:46px;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}.delivery-date-box>i{height:100%;display:grid;place-items:center;font-style:normal;background:color-mix(in srgb,var(--brand) 7%,var(--surface));border-right:1px solid var(--line)}.delivery-date-box input[type=date]{width:100%;height:44px!important;min-height:44px!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--text)!important;padding:0 11px!important;font-weight:750!important;box-shadow:none!important}.delivery-filter-count{min-height:46px;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--brand) 4%,var(--surface))}.delivery-filter-count b{font-size:20px;color:var(--brand)}.delivery-filter-count span{font-size:11px;color:var(--muted)}
.qr-stock-action-smart{grid-template-columns:1fr 1fr!important;gap:10px!important}.qr-stock-action-smart>label.span2{grid-column:1/-1!important}.qr-action-field[hidden]{display:none!important}.qr-action-comment{display:grid;gap:5px}.qr-action-comment span{font-weight:500;color:var(--muted);font-size:10px}.qr-stock-action-smart select,.qr-stock-action-smart input{width:100%}.qr-action-note{padding:10px 11px!important;border-radius:10px;background:color-mix(in srgb,var(--brand) 5%,var(--surface));border:1px solid color-mix(in srgb,var(--brand) 12%,var(--line));line-height:1.45!important}.qr-confirm-action{min-height:44px}.order-fulfillment-chip{border-radius:999px!important;padding:4px 8px!important;background:#fff5e8!important;color:#8b5b18!important;font-weight:800!important}.order-fulfillment-chip.done{background:#edf8f0!important;color:#2e7041!important}.sale-fulfillment-panel{margin-top:14px;padding:13px 14px;border:1px solid var(--line);border-radius:13px;background:color-mix(in srgb,var(--brand) 3%,var(--surface));display:grid;gap:10px}.sale-fulfillment-head{display:flex;justify-content:space-between;align-items:end;gap:12px}.sale-fulfillment-head>div{display:grid;gap:2px}.sale-fulfillment-head small,.sale-fulfillment-panel p,.sale-shipment-list small{color:var(--muted)}.sale-fulfillment-head b{font-size:14px}.sale-fulfillment-head strong{font-size:18px}.sale-shipment-list{display:grid;gap:6px}.sale-shipment-list>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid var(--line)}.sale-shipment-list>div:first-child{border-top:0}.sale-shipment-list span{font-weight:750;font-size:12px}.sale-shipment-list small{text-align:right;font-size:10px}.sale-fulfillment-panel p{margin:0;font-size:10px;line-height:1.45}
/* Safe final pass: form controls and action areas remain inside cards/modals on narrow screens. */
.modal,.panel,.delivery-stop,.qr-resolved,.order-modern-card{min-width:0}.card-actions,.toolbar{max-width:100%}.card-actions button,.toolbar button{max-width:100%;white-space:normal}.form-grid input,.form-grid select,.form-grid textarea,.delivery-filter input,.delivery-filter select{max-width:100%}
html[data-guru-theme="dark"] .delivery-filter-polished,html[data-guru-theme="dark"] .delivery-date-box,html[data-guru-theme="dark"] .delivery-control select,html[data-guru-theme="dark"] .delivery-filter-count,html[data-guru-theme="dark"] .sale-fulfillment-panel,html[data-guru-theme="dark"] .qr-action-note{background:#171d25!important;border-color:#313a46!important;color:#f2eee9!important}html[data-guru-theme="dark"] .delivery-date-box>i{background:#202731!important;border-color:#313a46!important}html[data-guru-theme="dark"] .delivery-date-box input[type=date],html[data-guru-theme="dark"] .modal input[type=date],html[data-guru-theme="dark"] .modal input[type=month]{color-scheme:dark!important;color:#f2eee9!important}html[data-guru-theme="dark"] .delivery-filter-count b{color:#efdbb2!important}html[data-guru-theme="dark"] .order-fulfillment-chip{background:#33291c!important;color:#eacb8f!important}html[data-guru-theme="dark"] .order-fulfillment-chip.done{background:#17291f!important;color:#9bd1aa!important}html[data-guru-theme="dark"] .sale-shipment-list>div{border-color:#313a46!important}
@media(max-width:720px){.delivery-filter-polished{grid-template-columns:1fr!important}.delivery-filter-count{justify-content:flex-start}.delivery-date-box,.delivery-control select{min-height:50px}.delivery-date-box input[type=date]{height:48px!important;min-height:48px!important;font-size:14px!important}.qr-stock-action-smart{grid-template-columns:1fr!important}.qr-stock-action-smart>label.span2,.qr-stock-action-smart>.span2{grid-column:auto!important}.sale-fulfillment-head{align-items:flex-start;flex-direction:column}.sale-shipment-list>div{display:grid;gap:3px}.sale-shipment-list small{text-align:left}.modal-actions{display:grid!important;grid-template-columns:1fr 1fr!important}.modal-actions>.danger-action{grid-column:1/-1}.modal-actions button{min-height:44px!important}.modal-title>[data-close]{width:38px!important;height:38px!important;min-width:38px!important;flex-basis:38px!important}}
@media(max-width:420px){.modal-actions{grid-template-columns:1fr!important}.modal-actions>.danger-action{grid-column:auto}.delivery-filter-polished{padding:12px!important}.qr-resolved{padding:12px!important}}


/* GURU 1.8.36 — client 360 card */
.client-card-wide{grid-column:1/-1}.client-card-modal{width:min(1180px,96vw)!important;max-height:94vh!important}.client-card-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,.8fr);gap:16px;min-height:0}.client-record-form{display:grid;gap:12px;min-width:0}.client-card-section,.client-requisites,.client-notes-panel{border:1px solid var(--line);border-radius:14px;background:var(--surface);min-width:0}.client-card-section{padding:14px}.client-section-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:11px}.client-section-title h4{margin:0;font-size:14px}.client-section-title small{display:block;margin-top:3px;color:var(--muted);font-size:10px;line-height:1.35}.client-requisites{overflow:hidden}.client-requisites summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;cursor:pointer;list-style:none}.client-requisites summary::-webkit-details-marker{display:none}.client-requisites summary span{display:grid;gap:3px}.client-requisites summary small{color:var(--muted);font-size:10px}.client-requisites summary em{font-style:normal;font-size:11px;font-weight:800;color:var(--brand)}.client-requisites[open] summary{border-bottom:1px solid var(--line)}.client-requisites[open] summary em{font-size:0}.client-requisites[open] summary em::after{content:'Свернуть −';font-size:11px}.client-requisites>.form-grid{padding:14px}.client-record-actions{margin-top:0}.client-notes-panel{display:flex;flex-direction:column;padding:14px;min-height:470px;max-height:72vh}.client-notes-thread{flex:1;min-height:220px;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:4px 4px 10px;scrollbar-width:thin}.client-note-bubble{align-self:flex-start;width:min(92%,520px);padding:10px 12px;border:1px solid var(--line);border-radius:13px 13px 13px 4px;background:var(--bg,#f6f6f4)}.client-note-bubble.mine{align-self:flex-end;border-color:color-mix(in srgb,var(--brand,#802F2D) 24%,var(--line));background:color-mix(in srgb,var(--brand,#802F2D) 7%,var(--surface,#fff));border-radius:13px 13px 4px 13px}.client-note-bubble>div{display:flex;align-items:center;justify-content:space-between;gap:10px}.client-note-bubble b{font-size:11px}.client-note-bubble time{font-size:9px;color:var(--muted);white-space:nowrap}.client-note-bubble p{margin:5px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.45}.client-note-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding-top:10px;border-top:1px solid var(--line)}.client-note-compose textarea{min-height:70px;resize:vertical}.client-note-compose button{align-self:stretch;min-width:92px}.client-notes-actions{display:flex;justify-content:flex-end;padding-top:10px;margin-top:2px}.client-notes-actions button{min-width:112px}.client-notes-placeholder{margin:auto;padding:20px;text-align:center;color:var(--muted);font-size:12px;line-height:1.5}.client-quick-task textarea{width:100%}.client-quick-task small{display:block;margin-top:4px;color:var(--muted)}
html[data-guru-theme="dark"] .client-card-section,html[data-guru-theme="dark"] .client-requisites,html[data-guru-theme="dark"] .client-notes-panel{background:#171d25!important;border-color:#313a46!important}html[data-guru-theme="dark"] .client-note-bubble{background:#11171e!important;border-color:#313a46!important}html[data-guru-theme="dark"] .client-note-bubble.mine{background:#25191a!important;border-color:#633734!important}
@media(max-width:900px){.client-card-layout{grid-template-columns:1fr}.client-notes-panel{min-height:360px;max-height:none}.client-card-modal{width:min(760px,96vw)!important}}
@media(max-width:720px){.client-card-modal-back{padding:6px!important;align-items:flex-end!important}.client-card-modal{width:100%!important;max-height:96dvh!important;border-radius:18px 18px 10px 10px!important}.client-card-layout{display:block}.client-record-form{gap:10px}.client-card-section{padding:12px;margin-bottom:10px}.client-requisites{margin-bottom:10px}.client-notes-panel{min-height:330px;padding:12px}.client-note-compose{grid-template-columns:1fr}.client-note-compose button{min-height:44px}.client-notes-actions{padding-top:8px}.client-notes-actions button{width:100%;min-height:44px}.client-record-actions{grid-template-columns:1fr 1fr!important}.client-record-actions .danger-action{grid-column:1/-1}.client-record-actions #clientTaskFromCard{grid-column:1/-1}.client-details .client-card-wide{grid-column:auto}.client-quick-task .span2{grid-column:1/-1!important}}
/* GURU v1.8.37 — client/task/delivery polish */
.duplicate-counter{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;margin-left:6px;border-radius:999px;background:#802f2d;color:#fff;font-size:12px}
.client-delete-direct,.client-delete-strong{background:#b42318!important;color:#fff!important;border-color:#b42318!important;font-weight:700}.client-delete-direct:hover,.client-delete-strong:hover{filter:brightness(.92)}
.duplicate-finder{display:grid;gap:14px}.duplicate-finder-head{display:flex;gap:12px;align-items:center}.duplicate-finder-head input{flex:1}.duplicate-group{border:1px solid var(--border);border-radius:14px;overflow:hidden;background:var(--panel)}.duplicate-group header{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;background:var(--soft);border-bottom:1px solid var(--border)}.duplicate-client-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;text-align:left}.duplicate-client-row:last-child{border-bottom:0}.duplicate-client-row span{display:grid;gap:3px}.duplicate-client-row small{color:var(--muted)}.duplicate-client-row em{font-style:normal;color:var(--accent);white-space:nowrap}
.client-address-list{display:grid;gap:8px}.client-address-row{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:8px;align-items:center}.client-address-row button{width:38px;height:38px;padding:0;font-size:20px}.client-card-section .client-section-title>button{align-self:center}
.delivery-min-hint{margin-top:-4px}.warning-box{padding:10px 12px;border:1px solid rgba(180,35,24,.35);border-radius:10px;background:rgba(180,35,24,.08);color:var(--text)}.notice.ok{border-color:rgba(34,139,94,.35);background:rgba(34,139,94,.08)}.sale-paid-delivery{align-self:end;min-height:44px}
.task-complete-button{min-width:112px}.task-modern-card.is-done{opacity:.82}.task-completed-note{display:grid;gap:5px}.delivery-client-addresses>div{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.delivery-client-addresses button{padding:7px 10px;font-size:12px}
.client-history-item{grid-template-columns:auto minmax(0,1fr) auto auto}.client-history-item>[data-history-edit]{white-space:nowrap}
@media(max-width:720px){.duplicate-finder-head{align-items:stretch;flex-direction:column}.duplicate-client-row{align-items:flex-start;flex-direction:column}.duplicate-client-row em{white-space:normal}.client-history-item{grid-template-columns:1fr}.client-history-kind{justify-self:start}.client-history-item>[data-history-edit]{width:100%}.task-modern-actions .task-complete-button{width:100%}.client-address-row{grid-template-columns:minmax(0,1fr) 42px}}


/* GURU 1.8.39 — TASK CARD LAYOUT FIX */
.task-modern-main{min-width:0}
.task-modern-title{display:flex;justify-content:flex-start;align-items:center;gap:10px;flex-wrap:wrap}
.task-modern-title>div{display:flex;align-items:center;gap:9px;min-width:0;flex:1 1 280px}
.task-modern-title b{font-size:16px;line-height:1.35;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.task-modern-title .status-badge{flex:0 0 auto;white-space:nowrap;margin-left:auto}
.task-modern-main p{margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.task-modern-meta{display:flex;flex-wrap:wrap;gap:7px 8px;margin-top:11px;color:var(--muted);font-size:11.5px}
.task-modern-meta>span{display:inline-flex;align-items:center;min-height:28px;padding:5px 8px;border:1px solid var(--line);border-radius:9px;background:color-mix(in srgb,var(--brand2) 13%,#fff);line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.task-modern-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;max-width:360px}
.task-modern-actions button{white-space:nowrap;min-height:40px}
.task-modern-actions button:last-child{width:auto}
.task-modern-actions [data-edit-task]{width:40px!important;min-width:40px;padding:0;display:grid;place-items:center;font-size:16px}
html[data-guru-theme="dark"] .task-modern-meta>span{background:#202630!important;color:#c3c9d0!important;border-color:#303946!important}
@media(max-width:760px){
  .task-modern-card{grid-template-columns:1fr;align-items:stretch}
  .task-modern-title{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px 10px}
  .task-modern-title>div{min-width:0;flex:none}
  .task-modern-title .status-badge{margin-left:0;justify-self:end}
  .task-modern-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .task-modern-meta>span{width:100%;min-width:0}
  .task-modern-actions{grid-column:auto;width:100%;max-width:none;justify-content:flex-start;padding-top:11px;margin-top:1px;border-top:1px solid var(--line)}
  .task-modern-actions button:not([data-edit-task]){flex:1 1 135px}
}
@media(max-width:460px){
  .task-modern-title{grid-template-columns:1fr}
  .task-modern-title .status-badge{justify-self:start}
  .task-modern-meta{grid-template-columns:1fr}
  .task-modern-actions{gap:6px}
  .task-modern-actions button:not([data-edit-task]){flex:1 1 calc(50% - 24px)}
}


/* GURU 1.8.42 — client task categories + client Excel import */
.client-task-client-title{display:grid;gap:5px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--brand2) 9%,#fff)}
.client-task-client-title small,.client-task-client-title span{color:var(--muted)}
.client-task-client-title strong{font-size:18px;line-height:1.25;color:var(--text)}
.client-task-category-tools{display:flex;margin-top:7px}.client-task-category-tools button{min-height:34px;padding:6px 10px;font-size:12px}
.task-category-line{display:flex;align-items:center;gap:8px;margin-top:9px;flex-wrap:wrap}.task-category-line span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.task-category-line b{display:inline-flex;align-items:center;min-height:27px;padding:4px 9px;border-radius:999px;background:color-mix(in srgb,var(--brand) 10%,#fff);border:1px solid color-mix(in srgb,var(--brand) 24%,var(--line));color:var(--brand);font-size:12px}
.client-excel-import details{border:1px solid var(--line);border-radius:12px;padding:10px 12px}.client-excel-import details summary{cursor:pointer;font-weight:700}.client-excel-import details p{margin:9px 0 0;color:var(--muted);line-height:1.45}.client-import-summary{display:flex;flex-wrap:wrap;gap:8px 14px}.client-import-summary b{width:100%}.client-import-errors{max-height:220px;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:10px;display:grid;gap:6px}.client-import-errors>div{font-size:12px;color:var(--muted);padding-top:5px;border-top:1px solid var(--line)}
html[data-guru-theme="dark"] .client-task-client-title{background:#202630!important;border-color:#303946!important}.dark .client-task-client-title{background:#202630;border-color:#303946}html[data-guru-theme="dark"] .task-category-line b{background:#2a2020!important;border-color:#5a3432!important;color:#efb9b4!important}
@media(max-width:720px){.client-task-client-title strong{font-size:16px}.client-import-summary{display:grid;gap:5px}.client-import-summary b{width:auto}}

/* GURU_TASK_CATEGORY_ADMIN_1_8_43_FINAL */
.client-task-category-tools{gap:8px;flex-wrap:wrap;align-items:center}.client-task-category-tools .danger-action:disabled{opacity:.45;cursor:not-allowed;filter:none}.client-task-category>small{display:block;margin-top:6px;color:var(--muted)}
@media(max-width:520px){.client-task-category-tools{display:grid;grid-template-columns:1fr}.client-task-category-tools button{width:100%;min-height:40px}}


/* GURU_UI_BACKUP_POLISH_1_8_44 — final client-test UI normalization */
/* Notification center: equal system-signal cards */
.notification-signals{gap:12px!important;padding-bottom:16px!important}.notification-signals-head{align-items:center!important}.notification-signal-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}.notification-signal{min-width:0!important;min-height:94px!important;height:100%!important;padding:14px!important;grid-template-columns:38px minmax(0,1fr)!important;gap:11px!important;align-items:center!important;border-radius:14px!important}.notification-signal>span{width:38px!important;height:38px!important;border-radius:11px!important;font-size:17px!important}.notification-signal>div{min-width:0!important;align-content:center!important}.notification-signal b{display:block;font-size:12.5px!important;line-height:1.25!important;overflow-wrap:anywhere}.notification-signal small{display:block;margin-top:4px;font-size:10.5px!important;line-height:1.35!important;overflow-wrap:anywhere}.notification-signal.ok{background:#f2faf5!important;border-color:#cfe7d6!important}.notification-signal.ok>span{background:#e2f3e8!important;color:#287448!important}.notification-center-head{min-height:28px;display:flex;align-items:center}.notification-list{gap:9px!important}.notification-item{width:100%!important;box-sizing:border-box!important}

/* Client delivery addresses: compact, numbered and consistent */
.client-address-list{gap:10px!important}.client-address-row{display:grid!important;grid-template-columns:34px minmax(0,1fr) auto!important;gap:10px!important;align-items:end!important;padding:11px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:color-mix(in srgb,var(--surface,#fff) 92%,var(--brand,#802F2D) 8%)!important}.client-address-row.is-primary{border-color:color-mix(in srgb,var(--brand,#802F2D) 28%,var(--line))!important}.client-address-number{width:30px;height:30px;display:grid;place-items:center;align-self:center;border-radius:9px;background:color-mix(in srgb,var(--brand,#802F2D) 10%,var(--surface,#fff));color:var(--brand,#802F2D);font-size:12px;font-weight:800}.client-address-field{display:grid!important;gap:6px!important;min-width:0!important}.client-address-field>span{font-size:10px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.025em}.client-address-field input{width:100%!important;min-height:44px!important;box-sizing:border-box!important}.client-address-remove{width:auto!important;height:44px!important;min-width:82px!important;padding:0 12px!important;font-size:11px!important;color:#a52a23!important;border-color:#e4b8b4!important;background:#fff7f6!important}.client-address-remove:hover{background:#fde9e7!important;border-color:#d88e88!important}.client-card-section #clientAddressAdd{min-height:40px;padding:8px 12px!important}

/* Analytics: straight columns, equal cards and controlled overflow */
.analytics-products-section,.analytics-team-section{overflow:hidden}.analytics-products-section>.module-head,.analytics-team-section>.module-head{align-items:flex-start!important;margin-bottom:12px}.analytics-products-section .analytics-table-wrap{border:1px solid var(--line);border-radius:12px;overflow:auto;background:var(--surface,#fff)}.analytics-products-section .analytics-detail-table{min-width:820px;width:100%;table-layout:auto}.analytics-products-section .analytics-detail-table th,.analytics-products-section .analytics-detail-table td{padding:11px 12px!important;vertical-align:middle}.analytics-products-section .analytics-detail-table th:not(:first-child),.analytics-products-section .analytics-detail-table td:not(:first-child){text-align:right}.analytics-products-section .analytics-detail-table td:first-child{min-width:220px}.analytics-team-section .efficiency-weights{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;padding:12px!important}.analytics-team-section .efficiency-weights button{grid-column:1/-1;justify-self:end;min-width:190px}.analytics-team-section .efficiency-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.analytics-team-section .efficiency-card{min-height:138px!important;padding:14px!important;align-content:start}.analytics-team-section .efficiency-card>strong{min-width:72px;text-align:right}.analytics-team-section .efficiency-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:stretch}.analytics-team-section .efficiency-metrics span{display:grid;align-content:center;gap:2px;min-height:54px;padding:8px 9px!important;line-height:1.25!important}.analytics-team-section .efficiency-metrics b{display:block;margin-top:2px;overflow-wrap:anywhere}

/* Roles and permissions: dark theme is graphite/cream, not mixed burgundy cards */
html[data-guru-theme="dark"] .roles-panel{background:#151a21!important;border-color:#303844!important;color:#f2eee9!important}html[data-guru-theme="dark"] .roles-panel .module-head p{color:#9ba5b2!important}html[data-guru-theme="dark"] .role-box{background:#171d25!important;border:1px solid #313a46!important;color:#f1ede7!important;box-shadow:none!important}html[data-guru-theme="dark"] .role-box>summary{background:#1a2028!important;color:#f5efe8!important;border-bottom-color:#313a46!important}html[data-guru-theme="dark"] .role-box[open]>summary{border-bottom:1px solid #313a46!important}html[data-guru-theme="dark"] .role-box>summary small{background:#30291e!important;color:#efd6a4!important;border:1px solid #594a32!important}html[data-guru-theme="dark"] .role-permissions{background:#151a21!important}html[data-guru-theme="dark"] .role-permission-group h4{color:#e9d7b4!important}html[data-guru-theme="dark"] .permission-table{background:#141920!important;border-color:#303844!important}html[data-guru-theme="dark"] .permission-head{background:#10151b!important;color:#bdc6d1!important;border-color:#2d3540!important}html[data-guru-theme="dark"] .permission-row{background:#171d25!important;color:#f1ede7!important;border-color:#2d3540!important}html[data-guru-theme="dark"] .permission-row>b{color:#f1ede7!important}html[data-guru-theme="dark"] .permission-row>label{background:#171d25!important;color:#aeb8c4!important;border-left-color:#2d3540!important}html[data-guru-theme="dark"] .permission-row>label:hover{background:#1e2630!important;color:#f1ede7!important}html[data-guru-theme="dark"] .permission-row input{accent-color:#EFDBB2!important}html[data-guru-theme="dark"] .role-security-note,html[data-guru-theme="dark"] .role-admin-note{background:#1b2129!important;color:#aeb8c4!important;border-color:#313a46!important}html[data-guru-theme="dark"] .role-save-bar{background:linear-gradient(180deg,transparent 0,#151a21 34%)!important}

/* One close button, one glyph, mathematically centered. Overrides every previous close-button experiment. */
.modal-title>button[data-close]{position:relative!important;flex:0 0 38px!important;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;margin:0 0 0 12px!important;padding:0!important;border-radius:11px!important;display:block!important;font-size:0!important;line-height:0!important;text-indent:0!important;overflow:hidden!important;box-sizing:border-box!important}.modal-title>button[data-close]::before{content:none!important;display:none!important}.modal-title>button[data-close]::after{content:'×'!important;position:absolute!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;font-family:Arial,"Segoe UI",sans-serif!important;font-size:25px!important;font-weight:400!important;line-height:1!important;transform:none!important;padding:0!important;margin:0!important}.modal-title>button[data-close]:focus-visible{outline:2px solid color-mix(in srgb,var(--brand,#802F2D) 55%,transparent)!important;outline-offset:2px!important}

/* Backups */
.backup-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.backup-list article{min-height:66px}.backup-list article button{min-width:96px}

html[data-guru-theme="dark"] .notification-signal.ok{background:#17251f!important;border-color:#315342!important}html[data-guru-theme="dark"] .notification-signal.ok>span{background:#1d3528!important;color:#92d1a9!important}html[data-guru-theme="dark"] .client-address-row{background:#171d25!important;border-color:#313a46!important}html[data-guru-theme="dark"] .client-address-row.is-primary{border-color:#5a463b!important}html[data-guru-theme="dark"] .client-address-number{background:#2b2420!important;color:#efd6a4!important}html[data-guru-theme="dark"] .client-address-remove{background:#261a1c!important;color:#f0b1ae!important;border-color:#5a3439!important}html[data-guru-theme="dark"] .analytics-products-section .analytics-table-wrap{background:#151a21!important;border-color:#303844!important}html[data-guru-theme="dark"] .analytics-team-section .efficiency-metrics span{background:#1e252e!important;color:#c6ced7!important}html[data-guru-theme="dark"] .modal-title>button[data-close]{background:#10151b!important;border-color:#35404c!important;color:#efd9ad!important}

@media(max-width:900px){.notification-signal-grid{grid-template-columns:1fr 1fr!important}.notification-signal-grid .notification-signal:first-child{grid-column:1/-1}.analytics-team-section .efficiency-grid{grid-template-columns:1fr!important}}
@media(max-width:720px){.notification-signal-grid{grid-template-columns:1fr!important}.notification-signal-grid .notification-signal:first-child{grid-column:auto}.notification-signal{min-height:76px!important}.client-address-row{grid-template-columns:32px minmax(0,1fr)!important;align-items:center!important}.client-address-remove{grid-column:2;width:100%!important;min-width:0!important}.analytics-team-section .efficiency-weights{grid-template-columns:1fr!important}.analytics-team-section .efficiency-weights button{grid-column:auto;width:100%;justify-self:stretch}.analytics-team-section .efficiency-metrics{grid-template-columns:1fr!important}.analytics-products-section{padding-left:12px!important;padding-right:12px!important}.backup-head-actions{width:100%;display:grid;grid-template-columns:1fr}.backup-head-actions button{width:100%}.modal-title>button[data-close]{flex-basis:38px!important;width:38px!important;height:38px!important;min-width:38px!important}}


/* GURU_NOTIFICATION_SIGNAL_ALIGNMENT_1_8_45
   System signals must be a single aligned card grid. The generic .warning class
   elsewhere in the CRM adds vertical margins; reset them here explicitly. */
.notification-signal-grid{
  align-items:stretch!important;
  grid-auto-rows:1fr!important;
}
.notification-signal,
.notification-signal.warning,
.notification-signal.ok,
.notification-signal.browser-notify{
  margin:0!important;
  align-self:stretch!important;
  box-sizing:border-box!important;
  height:100%!important;
}
.notification-signal>div{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  min-width:0!important;
  min-height:46px!important;
  gap:4px!important;
}
.notification-signal b,
.notification-signal small{
  margin:0!important;
}
.notification-signal>span{
  align-self:center!important;
  justify-self:center!important;
}
@media(max-width:900px){
  .notification-signal-grid{align-items:stretch!important}
  .notification-signal,.notification-signal.warning,.notification-signal.ok,.notification-signal.browser-notify{margin:0!important}
}


/* GURU_ANALYTICS_LAYOUT_1_8_46
   One dashboard grid: KPI -> two equal management panels -> full-width product/team sections. */
.manager-kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  margin:0 0 14px!important;
  align-items:stretch!important;
}
.manager-kpi{
  min-width:0!important;
  min-height:112px!important;
  height:100%!important;
  padding:16px!important;
  align-content:space-between!important;
}
.manager-kpi>small,.manager-kpi>b,.manager-kpi>div{min-width:0!important}
.manager-kpi>div{margin-top:auto!important;align-items:flex-end!important}

.analytics-management-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
  margin:0 0 14px!important;
}
.analytics-management-grid>.manager-block{
  min-width:0!important;
  height:100%!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
}
.analytics-management-grid>.manager-block>.module-head{margin-bottom:16px!important}
.analytics-management-grid .ops-kpi-list,
.analytics-management-grid .warehouse-money-grid{flex:1 1 auto!important;min-height:0!important}
.analytics-management-grid .ops-kpi-list{grid-auto-rows:1fr!important}
.analytics-management-grid .ops-kpi-list button{min-height:58px!important}
.analytics-management-grid .warehouse-money-grid{grid-auto-rows:1fr!important}
.analytics-management-grid .warehouse-money-grid>div{align-content:center!important;min-height:0!important}

/* Old analytics sections were max-width:1200px and centered independently. */
.analytics-section,
.analytics-products-section,
.analytics-team-section{
  width:100%!important;
  max-width:none!important;
  margin:0 0 14px!important;
  min-width:0!important;
}
.analytics-products-section>.module-head,
.analytics-team-section>.module-head{margin-bottom:16px!important}
.analytics-products-section .analytics-table-wrap{width:100%!important;max-width:100%!important}
.analytics-team-section .efficiency-grid{width:100%!important}

@media(max-width:1000px){
  .manager-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .analytics-management-grid{grid-template-columns:minmax(0,1fr)!important}
  .analytics-management-grid>.manager-block{height:auto!important}
}
@media(max-width:720px){
  .manager-kpi-grid{grid-template-columns:minmax(0,1fr)!important;gap:10px!important;margin-bottom:10px!important}
  .manager-kpi{min-height:0!important;padding:14px!important}
  .analytics-management-grid{grid-template-columns:minmax(0,1fr)!important;gap:10px!important;margin-bottom:10px!important}
  .analytics-section,.analytics-products-section,.analytics-team-section{margin-bottom:10px!important}
}


/* GURU_CLIENT_FORM_MOBILE_AUDIT_1_8_47
   Keep client form controls aligned even when one field has helper text.
   Also harden the recent UI blocks against mobile horizontal overflow. */
.client-card-section>.form-grid{
  align-items:start!important;
}
.client-card-section>.form-grid>label{
  align-self:start!important;
  align-content:start!important;
  min-width:0!important;
}
.client-card-section>.form-grid>label:not(.check)>input:not([type="checkbox"]),
.client-card-section>.form-grid>label:not(.check)>select{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  min-height:38px!important;
  box-sizing:border-box!important;
}
.client-card-section>.form-grid>label>textarea{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.client-responsible-field>small{
  margin:0!important;
  color:var(--muted)!important;
  font-size:10px!important;
  font-weight:600!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}

/* Mobile safety pass for UI changed in 1.8.44–1.8.46. */
@media(max-width:900px){
  .client-card-modal,
  .client-card-layout,
  .client-record-form,
  .client-card-section,
  .client-notes-panel,
  .client-address-list,
  .notification-signals,
  .analytics-management-grid,
  .analytics-products-section,
  .analytics-team-section,
  .roles-panel,
  .role-box,
  .permission-table{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .client-card-section>.form-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .client-card-section>.form-grid>label{
    grid-column:auto!important;
    width:100%!important;
  }
}
@media(max-width:720px){
  .client-card-modal-back{overflow-x:hidden!important}
  .client-card-modal{overflow-x:hidden!important}
  .client-section-title{flex-wrap:wrap!important}
  .client-card-section>.form-grid>label:not(.check)>input:not([type="checkbox"]),
  .client-card-section>.form-grid>label:not(.check)>select{
    height:44px!important;
    min-height:44px!important;
  }
  .client-card-section>.form-grid>label>textarea{min-height:96px!important}
  .client-responsible-field>small{font-size:10.5px!important}
  .client-address-field input{min-width:0!important;max-width:100%!important}
  .notification-signal-grid,
  .manager-kpi-grid,
  .analytics-management-grid,
  .analytics-team-section .efficiency-grid,
  .analytics-team-section .efficiency-metrics{
    min-width:0!important;
    max-width:100%!important;
  }
  .roles-panel .permission-table{width:100%!important;overflow:hidden!important}
  .modal-title{min-width:0!important}
  .modal-title>div,.modal-title>h3{min-width:0!important;overflow-wrap:anywhere!important}
}


/* GURU_MOBILE_NOTIFICATION_CENTER_1_8_48
   Mobile notification center: one scroll container, persistent close control,
   and full-width task notification fields without nested clipping. */
@media(max-width:720px){
  .notification-modal-back{
    padding:6px!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    overflow:hidden!important;
    touch-action:manipulation!important;
  }
  .notification-modal{
    width:100%!important;
    max-width:100%!important;
    height:calc(100dvh - 12px)!important;
    max-height:calc(100dvh - 12px)!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    border-radius:16px!important;
  }
  .notification-modal>.modal-title{
    position:sticky!important;
    top:0!important;
    z-index:5!important;
    flex:0 0 auto!important;
    min-height:58px!important;
    margin:0!important;
    padding:10px 10px 10px 14px!important;
    display:flex!important;
    align-items:center!important;
    background:var(--panel,#fff)!important;
  }
  .notification-modal>.modal-title h3{
    min-width:0!important;
    margin:0!important;
    line-height:1.25!important;
  }
  .notification-modal>.modal-title>button[data-close]{
    position:relative!important;
    z-index:7!important;
    flex:0 0 42px!important;
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    margin:0 0 0 10px!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    touch-action:manipulation!important;
    pointer-events:auto!important;
  }
  .notification-modal>.info-body{
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    padding:12px 10px calc(16px + env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .notification-center{
    width:100%!important;
    min-width:0!important;
    gap:12px!important;
  }
  .notification-list{
    width:100%!important;
    min-width:0!important;
    max-height:none!important;
    overflow:visible!important;
    padding:0!important;
  }
  .notification-item{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    grid-template-columns:32px minmax(0,1fr)!important;
    gap:9px!important;
    padding:11px!important;
    overflow:visible!important;
    align-items:start!important;
  }
  .notification-item>.notification-item-body{
    min-width:0!important;
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto auto!important;
    gap:5px!important;
    overflow:visible!important;
  }
  .notification-item-copy{
    grid-column:1!important;
    grid-row:1!important;
    min-width:0!important;
    width:100%!important;
  }
  .notification-item-copy>b,
  .notification-item-copy>small,
  .notification-item-task .notification-item-copy>b,
  .notification-item-task .notification-item-copy>small{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    line-height:1.4!important;
  }
  .notification-chat-open{
    grid-column:1!important;
    grid-row:2!important;
    justify-self:start!important;
    align-self:start!important;
    min-width:0!important;
    margin:0!important;
    padding:2px 0!important;
    white-space:normal!important;
    text-align:left!important;
    line-height:1.35!important;
  }
  .notification-item>.notification-item-body>time{
    grid-column:1!important;
    grid-row:3!important;
    margin:0!important;
    padding:0!important;
    white-space:normal!important;
    line-height:1.35!important;
  }
  .notification-signal-grid{
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
  }
  .notification-signal{
    width:100%!important;
    min-width:0!important;
  }
}
html[data-guru-theme="dark"] .notification-modal>.modal-title{
  background:#171c23!important;
}


/* GURU_MOBILE_UI_FINAL_1_8_49
   Mobile pass: true notification overlay, comfortable analytics periods,
   and brand-contrast navigation icons. */
@media(max-width:720px){
  html.notification-center-open,
  html.notification-center-open body{
    overflow:hidden!important;
    overscroll-behavior:none!important;
    touch-action:none!important;
  }
  html.notification-center-open .mobile-top-nav,
  html.notification-center-open .app-header{
    pointer-events:none!important;
  }
  .notification-modal-back{
    position:fixed!important;
    inset:0!important;
    z-index:9999!important;
    width:100vw!important;
    height:100dvh!important;
    padding:0!important;
    margin:0!important;
    display:flex!important;
    align-items:stretch!important;
    justify-content:stretch!important;
    overflow:hidden!important;
    pointer-events:auto!important;
    touch-action:auto!important;
    background:rgba(10,12,16,.78)!important;
    -webkit-backdrop-filter:blur(7px)!important;
    backdrop-filter:blur(7px)!important;
  }
  .notification-modal-back>.notification-modal{
    position:relative!important;
    z-index:10000!important;
    width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    min-height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    background:var(--surface,#fff)!important;
    pointer-events:auto!important;
  }
  .notification-modal>.modal-title{
    position:sticky!important;
    top:0!important;
    z-index:12!important;
    min-height:64px!important;
    padding:calc(10px + env(safe-area-inset-top)) 14px 10px!important;
    margin:0!important;
    display:flex!important;
    align-items:center!important;
    gap:12px!important;
    border-bottom:1px solid var(--line)!important;
    background:var(--surface,#fff)!important;
    box-shadow:0 4px 16px rgba(0,0,0,.05)!important;
  }
  .notification-modal>.modal-title h3{
    flex:1 1 auto!important;
    font-size:18px!important;
    line-height:1.2!important;
  }
  .notification-modal>.modal-title>button[data-close]{
    flex:0 0 44px!important;
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    border-radius:13px!important;
    border:1px solid color-mix(in srgb,var(--brand,#802F2D) 22%,var(--line))!important;
    background:color-mix(in srgb,var(--brand2,#EFDBB2) 35%,var(--surface,#fff))!important;
    color:var(--brand,#802F2D)!important;
    display:block!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }
  .notification-modal>.modal-title>button[data-close]::after{
    font-size:28px!important;
    font-weight:400!important;
  }
  .notification-modal>.info-body{
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    width:100%!important;
    padding:14px 12px calc(22px + env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .notification-modal>.modal-actions{
    display:none!important;
  }
  .notification-center,
  .notification-signals,
  .notification-list{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  .notification-signals-head{
    display:grid!important;
    gap:3px!important;
    align-items:start!important;
  }
  .notification-signals-head small{
    line-height:1.35!important;
  }
  .notification-signal-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:9px!important;
  }
  .notification-signal,
  .notification-signal.warning,
  .notification-signal.ok,
  .notification-signal.browser-notify{
    width:100%!important;
    min-height:72px!important;
    margin:0!important;
    padding:11px 12px!important;
    grid-template-columns:40px minmax(0,1fr)!important;
    gap:11px!important;
    align-items:center!important;
    border-radius:14px!important;
  }
  .notification-signal>span{
    width:40px!important;
    height:40px!important;
  }
  .notification-item{
    border-radius:14px!important;
    padding:12px!important;
  }

  /* Analytics: dates must be readable and tappable, not desktop controls squeezed into phone width. */
  .analytics-period-panel{
    padding:13px!important;
    gap:12px!important;
    border-radius:16px!important;
  }
  .analytics-presets{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    padding-bottom:12px!important;
  }
  .analytics-presets .analytics-preset{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    padding:10px 8px!important;
    border-radius:12px!important;
    font-size:13px!important;
    line-height:1.15!important;
  }
  .analytics-period-form{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:9px!important;
  }
  .analytics-period-form label{
    width:100%!important;
    min-width:0!important;
    padding:10px 11px!important;
    border-radius:13px!important;
    gap:7px!important;
    font-size:13px!important;
    line-height:1.2!important;
  }
  .analytics-period-form input[type=date]{
    width:100%!important;
    min-width:0!important;
    height:52px!important;
    min-height:52px!important;
    padding:0 12px!important;
    border:1px solid color-mix(in srgb,var(--brand,#802F2D) 12%,var(--line))!important;
    border-radius:10px!important;
    font-size:16px!important;
    line-height:52px!important;
    font-weight:750!important;
  }
  .analytics-period-form button{
    grid-column:auto!important;
    width:100%!important;
    height:50px!important;
    min-height:50px!important;
    margin-top:2px!important;
    border-radius:12px!important;
    font-size:14px!important;
    font-weight:800!important;
  }
  .analytics-period-caption{
    width:100%!important;
    padding:10px 12px!important;
    border:1px solid var(--line)!important;
    border-radius:12px!important;
    text-align:left!important;
    background:color-mix(in srgb,var(--surface,#fff) 94%,var(--brand2,#EFDBB2))!important;
  }
  .analytics-period-caption b{
    font-size:14px!important;
    line-height:1.35!important;
  }
  .analytics-period-caption small{
    margin-top:2px!important;
    font-size:11px!important;
    line-height:1.35!important;
  }

  /* Mobile tray: cream tiles + burgundy glyphs instead of burgundy-on-burgundy. */
  .mobile-top-nav .nav-item .nav-icon{
    background:#EFDBB2!important;
    color:#802F2D!important;
    border:1px solid #f6e8ca!important;
    box-shadow:0 2px 7px rgba(20,10,10,.18)!important;
  }
  .mobile-top-nav .nav-item .nav-icon svg{
    stroke:#802F2D!important;
    color:#802F2D!important;
  }
  .mobile-top-nav .nav-item.active .nav-icon{
    background:#fff3d9!important;
    color:#802F2D!important;
    border-color:#fff8e8!important;
    transform:translateY(-1px) scale(1.04)!important;
    box-shadow:0 0 0 2px rgba(239,219,178,.32),0 4px 10px rgba(0,0,0,.18)!important;
  }
  .mobile-top-nav .nav-item.active .nav-icon svg{
    stroke:#802F2D!important;
    color:#802F2D!important;
  }
  .mobile-nav-toggle-icon{
    background:#EFDBB2!important;
    color:#802F2D!important;
    border-color:#f3dfb8!important;
  }
}
html[data-guru-theme="dark"] .notification-modal-back>.notification-modal,
html[data-guru-theme="dark"] .notification-modal>.modal-title{
  background:#151a21!important;
}
html[data-guru-theme="dark"] .notification-modal>.modal-title{
  border-color:#303844!important;
}
html[data-guru-theme="dark"] .notification-modal>.modal-title>button[data-close]{
  background:#2a251f!important;
  border-color:#5c4d37!important;
  color:#EFDBB2!important;
}
@media(max-width:720px){
  html[data-guru-theme="dark"] .analytics-period-caption{
    background:#1a2028!important;
    border-color:#313a46!important;
  }
  html[data-guru-theme="dark"] .analytics-period-form input[type=date]{
    border-color:#35404c!important;
  }
}
\n\n/* GURU_NOTIFICATION_CLOSE_GUARD_CSS_1_8_50
   Keep the full-screen shield alive briefly after close so a mobile tap
   cannot fall through onto Logout or the navigation underneath. */
.notification-modal-back.notification-modal-closing{
  opacity:0!important;
  pointer-events:auto!important;
  transition:opacity .08s ease!important;
}
.notification-modal-back.notification-modal-closing *{
  pointer-events:none!important;
}


/* GURU_MOBILE_NAV_POLISH_CSS_1_8_51
   Final mobile shell pass: logo header, safe logout location, polished section tray,
   and readable client statuses. Desktop remains unchanged. */
.mobile-header-logo{display:none}
.header-brand-slot{display:flex;align-items:center;min-width:0}
.header-page-copy{min-width:0}

@media(max-width:720px){
  /* Top bar: brand only. The section title already exists inside the page itself. */
  .app-header{height:64px!important;padding:0 14px!important;background:linear-gradient(145deg,#702a28,#5f2422)!important;border-bottom-color:#5b211f!important}
  .app-header .header-brand-slot{height:100%;display:flex!important;align-items:center!important}
  .app-header .header-page-copy{display:none!important}
  .mobile-header-logo{display:block!important;width:auto!important;height:34px!important;max-width:116px!important;object-fit:contain!important;object-position:left center!important}
  .app-header #logout{display:none!important}
  .app-header .header-actions{margin-left:auto!important;gap:8px!important}
  .app-header .notification-bell{background:#EFDBB2!important;color:#802F2D!important;border-color:#f5e5c5!important;box-shadow:0 3px 10px rgba(0,0,0,.15)!important}

  /* Rounded mobile section tray instead of a full-width burgundy rectangle. */
  .mobile-top-nav{
    display:block!important;
    position:sticky!important;
    top:64px!important;
    z-index:35!important;
    width:calc(100% - 20px)!important;
    margin:8px 10px 0!important;
    padding:0!important;
    border:1px solid color-mix(in srgb,#EFDBB2 22%,#702a28)!important;
    border-radius:17px!important;
    background:linear-gradient(145deg,#702a28,#5f2422)!important;
    box-shadow:0 10px 26px rgba(35,13,12,.18)!important;
    overflow:hidden!important;
  }
  .mobile-nav-toggle{
    display:flex!important;
    width:100%!important;
    min-height:56px!important;
    padding:8px 11px!important;
    border:0!important;
    border-radius:16px!important;
    background:transparent!important;
    color:#fff7ed!important;
    align-items:center!important;
    gap:11px!important;
    text-align:left!important;
  }
  .mobile-nav-toggle:active{background:rgba(255,255,255,.045)!important}
  .mobile-nav-toggle-icon{
    display:grid!important;place-items:center!important;
    width:38px!important;height:38px!important;flex:0 0 38px!important;
    border:1px solid #f3dfb8!important;border-radius:12px!important;
    background:#EFDBB2!important;color:#802F2D!important;
    font-size:19px!important;box-shadow:0 3px 10px rgba(0,0,0,.16)!important;
  }
  .mobile-nav-toggle-current{display:flex!important;min-width:0!important;flex:1!important;flex-direction:column!important;gap:2px!important}
  .mobile-nav-toggle-current b{font-size:14px!important;line-height:1.15!important;color:#fff7ed!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .mobile-nav-toggle-current small{font-size:10.5px!important;color:#e9cec4!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .mobile-nav-toggle-arrow{display:none!important}

  /* Keep nav mounted so open/close can animate instead of flashing in/out. */
  .mobile-top-nav nav,
  .mobile-top-nav.collapsed nav,
  .mobile-top-nav.expanded nav{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    max-width:none!important;
    border-top:1px solid transparent!important;
    background:transparent!important;
    overflow:hidden!important;
    transition:max-height .28s ease,opacity .18s ease,transform .22s ease,padding .22s ease,border-color .22s ease!important;
  }
  .mobile-top-nav.collapsed nav{
    max-height:0!important;
    opacity:0!important;
    transform:translateY(-7px)!important;
    padding:0 8px!important;
    pointer-events:none!important;
  }
  .mobile-top-nav.expanded nav{
    max-height:72vh!important;
    opacity:1!important;
    transform:none!important;
    padding:8px 8px 10px!important;
    border-top-color:rgba(239,219,178,.22)!important;
    pointer-events:auto!important;
  }
  .mobile-top-nav .nav-item{
    width:100%!important;
    min-width:0!important;
    min-height:66px!important;
    margin:0!important;
    padding:7px 4px 6px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    border:1px solid rgba(239,219,178,.08)!important;
    border-radius:13px!important;
    background:rgba(255,255,255,.035)!important;
    transition:transform .16s ease,background .16s ease,border-color .16s ease!important;
  }
  .mobile-top-nav .nav-item:active{transform:scale(.97)!important}
  .mobile-top-nav .nav-item.active{background:rgba(239,219,178,.08)!important;border-color:rgba(239,219,178,.22)!important}
  .mobile-top-nav .nav-item .nav-icon{
    width:34px!important;height:34px!important;min-width:34px!important;
    display:grid!important;place-items:center!important;
    border-radius:11px!important;background:#EFDBB2!important;color:#802F2D!important;
    border:1px solid #f6e8ca!important;box-shadow:0 2px 7px rgba(20,10,10,.18)!important;
  }
  .mobile-top-nav .nav-item .nav-icon svg{width:19px!important;height:19px!important;stroke:#802F2D!important;color:#802F2D!important}
  .mobile-top-nav .nav-item.active .nav-icon{background:#fff3d9!important;border-color:#fff8e8!important;box-shadow:0 0 0 2px rgba(239,219,178,.28),0 4px 10px rgba(0,0,0,.18)!important;transform:none!important}
  .mobile-top-nav .nav-item .nav-label{display:block!important;width:100%!important;max-width:100%!important;padding:0 1px!important;font-size:9px!important;line-height:1.15!important;text-align:center!important;color:#f3ddd4!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .mobile-top-nav .nav-item.active .nav-label{color:#EFDBB2!important;font-weight:900!important}

  /* Client status should be a readable chip, never a squeezed circle. */
  .client-card .card-title{display:grid!important;grid-template-columns:minmax(0,1fr)!important;justify-items:start!important;gap:6px!important;align-items:start!important}
  .client-card .card-title>b{min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important}
  .client-card .status-badge{
    display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;
    width:auto!important;max-width:100%!important;min-width:0!important;
    padding:5px 9px!important;border-radius:9px!important;
    white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important;
    font-size:10px!important;line-height:1.2!important;text-align:left!important;
    background:color-mix(in srgb,var(--brand) 10%,var(--surface))!important;
    color:var(--brand)!important;border:1px solid color-mix(in srgb,var(--brand) 20%,var(--line))!important;
  }

  /* Mobile account/logout lives in Settings, away from notification/toolbar taps. */
  .mobile-account-panel{display:grid!important;gap:14px!important}
  .mobile-account-head{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;gap:12px!important;align-items:center!important}
  .mobile-account-head>span{width:48px!important;height:48px!important;border-radius:14px!important;display:grid!important;place-items:center!important;background:color-mix(in srgb,var(--brand) 12%,var(--surface))!important;color:var(--brand)!important;font-size:19px!important;font-weight:900!important}
  .mobile-account-head h3{margin:0!important;font-size:17px!important}
  .mobile-account-head small{display:block!important;margin-top:3px!important;color:var(--muted)!important}
  .mobile-account-panel>p{margin:0!important;color:var(--muted)!important;line-height:1.45!important;font-size:12px!important}
  .mobile-settings-logout{width:100%!important;min-height:48px!important;font-weight:850!important}

  html[data-guru-theme="dark"] .app-header{background:linear-gradient(145deg,#672724,#56211f)!important;border-bottom-color:#4e1d1b!important}
  html[data-guru-theme="dark"] .client-card .status-badge{background:#242019!important;color:#EFDBB2!important;border-color:#54442f!important}
}

@media(max-width:430px){
  .mobile-top-nav nav,.mobile-top-nav.collapsed nav,.mobile-top-nav.expanded nav{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}


/* GURU 1.8.52 — client import / amoCRM migration */
.client-import-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--panel) 92%,var(--accent) 8%)}
.client-import-actions span{font-size:12px;color:var(--muted)}
.client-excel-import input[type="file"]{min-height:48px;padding:10px;border:1px dashed var(--border);border-radius:12px;background:var(--panel)}
.client-import-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.client-import-summary>b{grid-column:1/-1}.client-import-summary span{padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:var(--panel)}
.client-import-review{background:#6f5420!important;color:#fff1c8!important;border-color:#987337!important}
@media(max-width:700px){.client-import-actions{align-items:stretch;flex-direction:column}.client-import-actions button{width:100%}.client-import-summary{grid-template-columns:1fr 1fr}.client-import-summary>b{grid-column:1/-1}}


/* GURU 1.8.53 — imported clients folder */
.client-folder-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 14px;padding:7px;border:1px solid var(--border,var(--line));border-radius:16px;background:color-mix(in srgb,var(--panel,#fff) 94%,var(--brand) 6%)}
.client-folder{display:inline-flex;align-items:center;gap:9px;min-height:42px;padding:9px 13px;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--text);font-weight:750;transition:.18s ease}
.client-folder:hover{background:color-mix(in srgb,var(--brand) 8%,transparent);border-color:color-mix(in srgb,var(--brand) 24%,var(--border,var(--line)))}
.client-folder.active{background:color-mix(in srgb,var(--brand) 14%,var(--panel,#fff));border-color:color-mix(in srgb,var(--brand) 42%,var(--border,var(--line)));box-shadow:0 4px 14px color-mix(in srgb,var(--brand) 10%,transparent)}
.client-folder-icon{width:28px;height:24px;display:grid;place-items:center;border-radius:8px;background:var(--brand);color:var(--accent,#EFDBB2);font-size:13px;line-height:1}
.client-folder b{min-width:25px;padding:3px 7px;border-radius:999px;background:color-mix(in srgb,var(--brand) 12%,transparent);text-align:center;font-size:11px}
.client-folder-empty{margin-top:12px}
[data-client-imported][hidden]{display:none!important}
html[data-guru-theme="dark"] .client-folder-bar{background:#171b22!important;border-color:#303640!important;color:#f2eee9!important;box-shadow:none!important}
html[data-guru-theme="dark"] .client-folder{color:#f2eee9!important;background:transparent!important}
html[data-guru-theme="dark"] .client-folder:hover{background:#20262f!important;border-color:#3a424e!important}
html[data-guru-theme="dark"] .client-folder.active{background:#242a33!important;border-color:#6f4743!important;color:#f2eee9!important;box-shadow:0 4px 14px #00000022!important}
html[data-guru-theme="dark"] .client-folder-icon{background:#802F2D!important;color:#EFDBB2!important}
html[data-guru-theme="dark"] .client-folder b{background:#ffffff10!important;color:#EFDBB2!important}
@media(max-width:700px){.client-folder-bar{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:6px}.client-folder{justify-content:flex-start;min-width:0;padding:8px 9px}.client-folder span:not(.client-folder-icon){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.client-folder b{margin-left:auto}.client-folder-icon{flex:0 0 auto}}


/* GURU 1.8.54 — desktop client status alignment */
.client-status{--client-status-color:#8b95a3;gap:7px!important;border:1px solid color-mix(in srgb,var(--client-status-color) 30%,var(--line))!important;background:color-mix(in srgb,var(--client-status-color) 10%,var(--surface,#fff))!important;color:var(--text)!important}
.client-status>i{display:inline-block!important;width:8px!important;height:8px!important;min-width:8px!important;border-radius:50%!important;background:var(--client-status-color)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--client-status-color) 15%,transparent)!important}
.client-status-0{--client-status-color:#9b6e44}.client-status-1{--client-status-color:#c48b2f}.client-status-2{--client-status-color:#4f79bd}.client-status-3{--client-status-color:#43899e}.client-status-4{--client-status-color:#7c68b0}.client-status-5{--client-status-color:#c27448}.client-status-6{--client-status-color:#ad6383}.client-status-7{--client-status-color:#765aa1}.client-status-8{--client-status-color:#4d916b}.client-status-9{--client-status-color:#337b59}.client-status-other{--client-status-color:#7e8998}
html[data-guru-theme="dark"] .client-status{background:color-mix(in srgb,var(--client-status-color) 15%,#171d25)!important;border-color:color-mix(in srgb,var(--client-status-color) 42%,#303a46)!important;color:#f2eee9!important}
@media(min-width:721px){
  .client-card{grid-template-columns:46px minmax(0,1fr) auto!important;gap:14px!important;align-items:start!important}
  .client-card .client-main{min-width:0!important}
  .client-card .card-title{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;flex-wrap:wrap!important;min-width:0!important}
  .client-card .card-title>b{min-width:0!important;overflow-wrap:anywhere!important;line-height:1.25!important}
  .client-card .client-status{flex:0 0 auto!important;width:auto!important;max-width:100%!important;margin:0!important;padding:5px 9px!important;border-radius:999px!important;white-space:nowrap!important;font-size:10px!important;line-height:1.1!important}
  .client-card .card-actions{display:flex!important;align-items:flex-start!important;justify-content:flex-end!important;align-self:start!important;gap:7px!important;flex-wrap:wrap!important;max-width:420px!important}
  .client-card .card-actions button{margin:0!important;white-space:nowrap!important}
}
@media(max-width:720px){
  .client-card .client-status{gap:6px!important}
  .client-card .client-status>i{width:7px!important;height:7px!important;min-width:7px!important}
}


/* GURU 1.8.55 — dark clients tray regression fix */
html[data-guru-theme="dark"] .client-folder-bar{background:#171b22!important;border-color:#303640!important;color:#f2eee9!important}
html[data-guru-theme="dark"] .client-folder{color:#f2eee9!important}
html[data-guru-theme="dark"] .client-folder.active{background:#242a33!important;border-color:#6f4743!important}
html[data-guru-theme="dark"] .client-folder-icon{background:#802F2D!important;color:#EFDBB2!important}


/* GURU_MOBILE_NAV_MODAL_GUARD_CSS_1_8_59 */
/* GURU_MOBILE_NAV_MODAL_FIX_CSS_1_8_60
   Dialogs stay above navigation by z-index only. No hidden/persistent HTML state is
   used, so opening a form cannot leave an invisible layer that blocks the UI. */
@media(max-width:720px){
  .mobile-top-nav{
    z-index:32!important;
    transition:opacity .16s ease,transform .18s ease,visibility .18s ease!important;
  }
  .modal-back{
    z-index:8000!important;
  }
  .notification-modal-back{
    z-index:9999!important;
  }
  .modal-back>.modal{
    position:relative!important;
    z-index:8001!important;
  }
  .mobile-top-nav.collapsed nav{
    max-height:0!important;
    opacity:0!important;
    transform:translateY(-7px)!important;
    padding-top:0!important;
    padding-bottom:0!important;
    border-top-color:transparent!important;
    pointer-events:none!important;
  }
}


/* GURU_CLIENT_CARD_2_0_1 — client contact + venue per delivery point */
.client-address-content{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(260px,1.4fr);gap:10px;min-width:0}.client-address-content .client-address-field{min-width:0}.client-delivery-points-section .client-address-row{align-items:end!important}.client-card-modal-back{cursor:default}.client-card-modal-back>.client-card-modal{cursor:auto}
@media(max-width:720px){.client-address-content{grid-template-columns:1fr;gap:8px}.client-address-row{align-items:start!important}.client-address-number{align-self:start!important;margin-top:20px}.client-address-remove{grid-column:2!important}.client-delivery-points-section .client-section-title{align-items:stretch}.client-delivery-points-section #clientAddressAdd{width:100%}}


/* GURU_CLIENT_MOBILE_LAYOUT_2_0_2
   Mobile client list + editor hardening after 2.0.1 delivery-point changes. */
@media(max-width:720px){
  /* Client list cards: never keep the desktop 3-column layout on a phone. */
  .client-grid{
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
  }
  .client-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    grid-template-columns:40px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:10px!important;
    row-gap:10px!important;
    padding:12px!important;
    overflow:hidden!important;
  }
  .client-card>.client-avatar{
    width:40px!important;height:40px!important;min-width:40px!important;
    border-radius:12px!important;
    grid-column:1!important;grid-row:1!important;
  }
  .client-card>.client-main{
    grid-column:2!important;grid-row:1!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    gap:6px!important;
  }
  .client-card>.card-actions{
    grid-column:1/-1!important;grid-row:2!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    margin:0!important;
  }
  .client-card>.card-actions button{
    width:100%!important;min-width:0!important;max-width:100%!important;
    margin:0!important;padding:9px 8px!important;
    white-space:normal!important;overflow-wrap:anywhere!important;
    line-height:1.2!important;
  }
  .client-card .card-title{
    width:100%!important;max-width:100%!important;min-width:0!important;
  }
  .client-card .card-title>b,
  .client-card> .client-main>small,
  .client-card .contact-row,
  .client-card .client-details,
  .client-card .contact-row a,
  .client-card .client-details span{
    min-width:0!important;max-width:100%!important;
    overflow-wrap:anywhere!important;word-break:break-word!important;
  }
  .client-card .contact-row{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    gap:4px!important;width:100%!important;
  }
  .client-card .contact-row a{display:block!important;width:100%!important}
  .client-card .client-details{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    gap:4px!important;width:100%!important;
  }
  .client-card .client-status,
  .client-card .status-badge{
    width:auto!important;max-width:100%!important;min-width:0!important;
    white-space:normal!important;overflow-wrap:anywhere!important;
  }

  /* Client editor: one predictable width and one-column delivery points. */
  .client-card-modal-back{
    width:100vw!important;max-width:100vw!important;
    padding:6px!important;overflow-x:hidden!important;
    box-sizing:border-box!important;
  }
  .client-card-modal{
    width:calc(100vw - 12px)!important;
    max-width:calc(100vw - 12px)!important;
    min-width:0!important;margin:0!important;
    box-sizing:border-box!important;overflow-x:hidden!important;
  }
  .client-card-layout,.client-record-form,.client-card-section,
  .client-requisites,.client-notes-panel,.client-address-list,
  .client-address-row,.client-address-content,.client-address-field{
    width:100%!important;max-width:100%!important;min-width:0!important;
    box-sizing:border-box!important;
  }
  .client-delivery-points-section .client-section-title{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    gap:9px!important;align-items:start!important;
  }
  .client-delivery-points-section .client-section-title>div{
    min-width:0!important;max-width:100%!important;
  }
  .client-delivery-points-section #clientAddressAdd{
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin:0!important;
  }
  .client-address-row{
    grid-template-columns:30px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    gap:8px 9px!important;
    align-items:start!important;
    padding:10px!important;
    overflow:hidden!important;
  }
  .client-address-number{
    grid-column:1!important;grid-row:1!important;
    width:30px!important;height:30px!important;min-width:30px!important;
    margin:18px 0 0!important;align-self:start!important;
  }
  .client-address-content{
    grid-column:2!important;grid-row:1!important;
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    gap:9px!important;
  }
  .client-address-field input{
    width:100%!important;max-width:100%!important;min-width:0!important;
    box-sizing:border-box!important;
  }
  .client-address-remove{
    grid-column:2!important;grid-row:2!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:42px!important;margin:0!important;
  }
  .client-notes-panel{min-height:0!important;max-height:none!important}
  .client-note-bubble{max-width:92%!important;min-width:0!important}
  .client-note-bubble>div{min-width:0!important;flex-wrap:wrap!important}
  .client-note-bubble time{white-space:normal!important}
}
@media(max-width:390px){
  .client-card>.card-actions{grid-template-columns:minmax(0,1fr)!important}
  .client-card{grid-template-columns:36px minmax(0,1fr)!important;padding:10px!important}
  .client-card>.client-avatar{width:36px!important;height:36px!important;min-width:36px!important}
  .client-address-row{grid-template-columns:28px minmax(0,1fr)!important;padding:9px!important}
  .client-address-number{width:28px!important;height:28px!important;min-width:28px!important}
}

/* GURU client customer feedback: adaptive controls and compact view */
.client-list-controls{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:12px 0}.client-list-controls label{display:flex;gap:8px;align-items:center}.client-list-controls select{max-width:100%;min-width:160px}.client-messenger-links{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.client-messenger-links a{padding:7px 10px;border:1px solid currentColor;border-radius:8px}.client-grid.client-list-table{display:flex;flex-direction:column;gap:3px}.client-grid.client-list-table .client-card{display:grid;grid-template-columns:minmax(0,45px) minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px 12px}.client-grid.client-list-table .client-card .client-details{display:none}.client-grid.client-list-table .client-card .card-actions{display:flex;flex-wrap:wrap;gap:4px}.client-grid.client-list-table .client-card .card-actions button{font-size:12px;padding:5px 7px}@media(max-width:720px){.client-list-controls,.client-list-controls label{width:100%}.client-list-controls select{flex:1;min-width:0}.client-grid.client-list-table .client-card{grid-template-columns:minmax(0,1fr)}.client-grid.client-list-table .client-card .client-avatar{display:none}.client-grid.client-list-table .client-card .card-actions{width:100%}.client-card-section textarea[name=clientExtraContacts]{width:100%;min-height:80px;box-sizing:border-box}}


/* GURU v2.0.5 — import summary and history layout */
.client-import-summary{display:grid;gap:12px}
.client-import-summary>b{margin:0}
.client-import-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.client-import-stat{display:grid;gap:4px;align-content:start;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel);min-width:0}
.client-import-stat small{display:block;color:var(--muted);font-size:11px;line-height:1.35;word-break:break-word}
.client-import-stat strong{display:block;font-size:18px;line-height:1.35;word-break:break-word;overflow-wrap:anywhere}
.client-import-stat-wide{grid-column:span 2}
#clientImportHistory{display:grid;gap:10px;margin-top:12px}
#clientImportHistory>h4{margin:4px 0 0}
.client-import-history-item{display:grid;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.client-import-history-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 14px;align-items:flex-start}
.client-import-history-head b{font-size:14px;line-height:1.4}
.client-import-history-source{font-size:12px;color:var(--muted)}
.client-import-history-meta{display:flex;flex-wrap:wrap;gap:8px 12px;font-size:12px;color:var(--muted)}
.client-import-history-meta span{padding:6px 9px;border-radius:999px;background:#f8f4ed;max-width:100%;overflow-wrap:anywhere}
.client-import-history-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px}
.client-import-history-actions small{color:var(--muted);font-size:12px}
html[data-guru-theme="dark"] .client-import-history-meta span{background:#242b35!important;color:#d6dbe3!important}
@media(max-width:900px){.client-import-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.client-import-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.client-import-stat-wide{grid-column:1/-1}.client-import-history-head,.client-import-history-actions{display:grid;justify-content:stretch}.client-import-history-actions button{width:100%}}
@media(max-width:420px){.client-import-summary-grid{grid-template-columns:1fr}.client-import-stat-wide{grid-column:auto}.client-import-history-meta{display:grid;grid-template-columns:1fr}}


/* GURU v2.0.6 — resilient import summary grid */
.client-import-summary-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;gap:10px!important;align-items:stretch!important}
.client-import-stat{min-width:150px!important}
.client-import-stat small{word-break:normal!important;overflow-wrap:break-word!important;hyphens:auto}
.client-import-stat strong{word-break:break-word!important;overflow-wrap:anywhere!important}
.client-import-stat-wide{grid-column:1 / -1 !important;min-width:0!important}
.client-import-stat-wide strong{font-size:15px!important;line-height:1.45!important}
@media(max-width:520px){.client-import-summary-grid{grid-template-columns:1fr!important}.client-import-stat{min-width:0!important}.client-import-stat strong{font-size:17px!important}}


/* GURU v2.0.7 — import summary fixed to two columns */
.client-import-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
.client-import-stat{min-width:0!important}
.client-import-stat-wide{grid-column:1 / -1 !important}
@media(max-width:360px){.client-import-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.client-import-stat strong{font-size:16px!important}}

/* GURU v2.0.8: full width client import form and readable summary */
.modal:has(> .info-body #clientExcelImportForm){width:min(900px,calc(100vw - 28px))!important;max-width:100%!important}
.modal:has(> .info-body #clientExcelImportForm)>.info-body{width:100%!important;min-width:0!important}
#clientExcelImportForm.client-excel-import{max-width:none!important;width:100%!important;min-width:0!important;display:block!important}
#clientExcelImportForm.client-excel-import>*{max-width:100%;min-width:0}
#clientExcelImportForm .client-import-summary{width:100%!important;max-width:100%!important;min-width:0!important}
#clientExcelImportForm .client-import-summary-grid{display:grid!important;grid-template-columns:repeat(2,minmax(185px,1fr))!important;gap:10px!important;width:100%!important;min-width:0!important}
#clientExcelImportForm .client-import-stat{box-sizing:border-box;min-width:0!important;width:auto!important;padding:11px 12px!important}
#clientExcelImportForm .client-import-stat small{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;hyphens:none!important;letter-spacing:0!important;font-size:11px!important}
#clientExcelImportForm .client-import-stat strong{word-break:normal!important;overflow-wrap:normal!important;white-space:nowrap!important;font-size:18px!important}
#clientExcelImportForm .client-import-stat-wide{grid-column:1/-1!important;min-width:0!important}
#clientExcelImportForm .client-import-stat-wide strong{white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;font-size:14px!important}
@media(max-width:480px){#clientExcelImportForm .client-import-summary-grid{grid-template-columns:minmax(0,1fr)!important}}

/* GURU v2.0.10 field mapping */
.client-import-mapping{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:14px}
.client-import-mapping h4,.client-import-mapping p{grid-column:1/-1;margin:0}
.client-import-mapping label{min-width:0;display:grid;gap:5px}
.client-import-mapping label span{overflow-wrap:anywhere}
.client-import-mapping select{max-width:100%;min-width:0;width:100%}
@media(max-width:620px){.client-import-mapping{grid-template-columns:minmax(0,1fr)}}
