:root{--ink:#172033;--muted:#7d879a;--line:#e8ebf2;--surface:#fff;--bg:#f6f8fc;--primary:#6355e8;--primary-2:#8175ff;--green:#28b984;--red:#ff625f;--orange:#f3ad45;--nav:#101d32}*{box-sizing:border-box}body{margin:0;color:var(--ink);font-family:var(--font-ui);background:var(--bg);font-size:14px}.app-shell{min-height:100vh;display:flex}.sidebar{width:248px;flex:none;background:linear-gradient(180deg,#0c192d,#122441);color:#d8e0ef;display:flex;flex-direction:column;padding:25px 15px}.brand{display:flex;gap:11px;align-items:center;padding:0 10px 26px}.brand strong{display:block;color:white;font-size:18px;letter-spacing:-.4px}.brand span{font-size:11px;color:#8492aa;display:block;margin-top:4px}.brand-mark{width:34px;height:34px;position:relative}.brand-mark i{position:absolute;width:17px;height:17px;border-radius:50%;background:#786bff;opacity:.85}.brand-mark i:nth-child(1){left:2px;top:8px;background:#35c2e5}.brand-mark i:nth-child(2){left:15px;top:0;background:#c871ef}.brand-mark i:nth-child(3){left:15px;top:16px;background:#ff879d}.workspace-switch{border:1px solid #2d3e5b;background:#1a2c48;color:#c3cee2;border-radius:9px;padding:11px 12px;margin:0 1px 25px;font-size:12px}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#32c895;margin-right:7px}.chevron{margin-left:auto;color:#8d9ab0}.nav-group{margin-bottom:20px}.nav-label{text-transform:uppercase;color:#71819c;font-size:11px;padding:0 12px 8px}.nav-item{display:flex;align-items:center;gap:12px;padding:12px 13px;margin:3px 0;border-radius:9px;color:#b9c5d8;cursor:pointer;transition:.2s}.nav-item:hover{background:#1c3152;color:#fff}.nav-item.active{color:#fff;background:linear-gradient(100deg,#6355e8,#7668f6);box-shadow:0 7px 20px #5144d14a}.nav-icon{width:19px;text-align:center;font-size:17px}.sidebar-footer{display:flex;gap:9px;align-items:center;margin-top:auto;border-top:1px solid #253651;padding:18px 5px 0}.sidebar-footer strong,.sidebar-footer small{display:block}.sidebar-footer strong{font-size:13px;color:#fff}.sidebar-footer small{font-size:11px;color:#8290a6;margin-top:4px}.avatar{background:linear-gradient(145deg,#facbc6,#8067a7);width:32px;height:32px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700;border:2px solid #fff5}.avatar.purple{background:#5f51e8}.main-content{flex:1;min-width:0}.topbar{height:86px;background:#fff;border-bottom:1px solid var(--line);padding:17px 34px;display:flex;align-items:center;justify-content:space-between}.crumb{color:#9aa4b6;font-size:12px;margin-bottom:4px}.crumb span{color:#647087}.topbar h1{margin:0;font-size:25px;letter-spacing:-.8px}.top-actions{display:flex;align-items:center;gap:17px}.search{height:40px;width:305px;border:1px solid #e2e6ee;border-radius:8px;display:flex;align-items:center;gap:8px;padding:0 12px;color:#758098}.search input{border:0;outline:0;width:100%;font-size:12px}.icon-btn{position:relative;border:0;background:transparent;color:#657087;font-size:18px;cursor:pointer}.icon-btn b{position:absolute;top:-5px;right:-9px;background:var(--red);color:#fff;font-size:9px;border-radius:12px;padding:3px 5px}.user{display:flex;align-items:center;gap:8px;font-size:12px}.user .avatar{width:30px;height:30px}.page{padding:26px 34px 38px}.grid{display:grid;gap:18px}.kpi-grid{grid-template-columns:repeat(4,1fr)}.card{background:var(--surface);border:1px solid #edf0f5;border-radius:11px;box-shadow:0 3px 12px #25365d08}.kpi{padding:19px;display:flex;gap:15px;align-items:center}.kpi-icon{width:48px;height:48px;border-radius:50%;background:#eeefff;color:var(--primary);display:grid;place-items:center;font-size:23px}.kpi:nth-child(2) .kpi-icon{background:#eaf4ff;color:#4c89ed}.kpi:nth-child(3) .kpi-icon{background:#e8f8f1;color:#29aa78}.kpi:nth-child(4) .kpi-icon{background:#fff0ed;color:var(--red)}.kpi label{display:block;color:#6e7788;font-size:13px}.kpi strong{font-size:25px;display:block;margin:4px 0}.trend{font-size:11px;color:var(--green)}.trend.red{color:var(--red)}.dashboard-grid{grid-template-columns:1.25fr .9fr;margin-top:18px}.panel{padding:19px}.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.panel h2{font-size:15px;margin:0}.panel-head a,.link{color:var(--primary);font-size:12px;cursor:pointer}.range button,.filter button{border:1px solid var(--line);background:#fff;padding:7px 13px;color:#667085;cursor:pointer}.range button:first-child{border-radius:7px 0 0 7px}.range button:last-child{border-radius:0 7px 7px 0;margin-left:-1px}.range .selected{background:var(--primary);border-color:var(--primary);color:#fff}.line-chart{height:205px;position:relative;background:repeating-linear-gradient(to bottom,transparent 0,transparent 40px,#edf0f5 41px)}.line-chart svg{width:100%;height:100%}.legend{font-size:11px;color:#7b8495;display:flex;gap:20px;margin-top:8px}.legend i{display:inline-block;width:22px;border-top:2px solid var(--primary);vertical-align:middle;margin-right:5px}.legend i.dashed{border-top-style:dashed;opacity:.65}.donut-wrap{display:flex;align-items:center;justify-content:center;gap:28px;height:244px}.donut{width:154px;height:154px;border-radius:50%;background:conic-gradient(#4cbb8c 0 82%,#aeb6bd 82% 95%,#f5ad4b 95% 98%,#ff6b67 98%);position:relative}.donut:after{content:"总计\A9,573";white-space:pre;text-align:center;line-height:23px;font-size:12px;position:absolute;inset:31px;border-radius:50%;background:#fff;display:grid;place-content:center;font-weight:500}.donut-legend{line-height:29px;color:#667085;font-size:12px}.dot-red,.dot-orange,.dot-green,.dot-gray{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:8px;background:var(--red)}.dot-orange{background:var(--orange)}.dot-green{background:#4cbb8c}.dot-gray{background:#abb2bb}.lower-grid{grid-template-columns:1fr 1fr;margin-top:18px}.table{width:100%;border-collapse:collapse;font-size:12px}.table th{color:#7a8393;font-weight:400;text-align:left;padding:10px 8px;background:#fafbfc}.table td{padding:12px 8px;border-bottom:1px solid #f0f2f6}.status{font-size:11px;padding:4px 8px;border-radius:5px;background:#eaf8f2;color:#21a775}.status.warn{background:#fff5e2;color:#e8a03b}.status.danger{background:#fff0ef;color:#ff5b58}.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:17px}.input,.select{height:38px;border:1px solid var(--line);border-radius:7px;padding:0 12px;outline:0;background:#fff;color:#6e788b}.input{min-width:230px}.primary-btn,.danger-btn{border:0;border-radius:7px;background:var(--primary);color:#fff;padding:10px 16px;cursor:pointer;margin-left:auto}.danger-btn{background:var(--red)}.section-grid{display:grid;grid-template-columns:260px 1fr;gap:18px}.list-card{padding:15px}.list-title{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:700;padding-bottom:12px}.tree-row,.color-row{padding:11px 10px;border-radius:7px;display:flex;align-items:center;gap:9px;color:#566175;cursor:pointer}.tree-row:hover,.color-row:hover,.tree-row.selected,.color-row.selected{background:#f0efff;color:var(--primary)}.tree-row .count{margin-left:auto;color:#9ba4b5;font-size:11px}.color-dot{width:27px;height:27px;border-radius:50%;background:#2e2929;box-shadow:inset -5px -4px 8px #0006}.color-dot.brown{background:#714a32}.color-dot.blue{background:#273c74}.detail{padding:21px}.detail h2{margin:0 0 18px;font-size:17px}.field-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.field label{display:block;color:#8490a4;font-size:12px;margin-bottom:7px}.field input,.field textarea{width:100%;border:1px solid var(--line);border-radius:7px;padding:11px;outline:0}.field textarea{height:75px;resize:vertical}.tabs{display:flex;gap:28px;border-bottom:1px solid var(--line);margin:-26px -34px 22px;padding:0 34px}.tab{padding:18px 0 14px;color:#667085;cursor:pointer}.tab.active{color:var(--primary);border-bottom:2px solid var(--primary);font-weight:700}.page-title-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.page-title-row h2{margin:0;font-size:19px}.metric-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.metric{padding:15px}.metric label{display:block;color:#8b94a5;font-size:12px}.metric strong{font-size:22px;display:block;margin-top:7px}.timeline{border-left:2px solid #ddd9ff;margin:10px 0 10px 10px;padding-left:22px}.timeline-item{position:relative;padding:0 0 22px}.timeline-item:before{content:"";position:absolute;left:-29px;top:3px;width:10px;height:10px;border-radius:50%;background:var(--primary);border:3px solid #e8e6ff}.timeline-item strong{display:block}.timeline-item small{color:#929bac;display:block;margin-top:6px}.case-row{display:grid;grid-template-columns:130px 1.1fr 1fr 130px 130px;align-items:center;gap:16px;padding:14px 0;border-top:1px solid #eff1f5}.case-img{height:65px;border-radius:7px;background:linear-gradient(140deg,#d4c6bb,#66544b);position:relative}.case-img:after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 46%,#fff 47%,#fff 51%,transparent 52%)}.case-title{font-weight:700}.case-meta{color:#737d90;font-size:12px;line-height:22px}.action-stack{display:flex;flex-direction:column;gap:7px}.action-stack button{padding:7px;border-radius:6px;cursor:pointer}.approve{background:var(--primary);color:#fff;border:0}.return{background:#fff;color:var(--red);border:1px solid #ffaaa8}.inventory-grid{grid-template-columns:repeat(4,1fr);margin-bottom:18px}.device-card{padding:16px}.device-card h3{margin:0 0 8px;font-size:13px}.device-card p{margin:6px 0;color:#778196;font-size:12px}.progress{height:6px;background:#eef0f6;border-radius:9px;margin-top:8px}.progress i{display:block;height:100%;background:var(--primary);border-radius:9px}.empty-note{text-align:center;color:#929bac;padding:40px}.responsive-note{display:none}@media(max-width:1100px){.sidebar{width:205px}.kpi-grid,.inventory-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid,.lower-grid{grid-template-columns:1fr}.top-actions .search{width:220px}}@media(max-width:700px){.sidebar{width:65px;padding:18px 8px}.brand>div:not(.brand-mark),.workspace-switch,.nav-label,.nav-item span:not(.nav-icon),.sidebar-footer>div:not(.avatar),.sidebar-footer .chevron{display:none}.brand{padding:0 7px 25px}.nav-item{justify-content:center}.topbar{padding:13px 16px;height:auto}.topbar h1{font-size:20px}.top-actions .search,.user span,.top-actions .icon-btn:nth-child(3){display:none}.page{padding:18px 16px}.tabs{margin:-18px -16px 18px;padding:0 16px;gap:17px;overflow:auto}.section-grid{grid-template-columns:1fr}.field-grid{grid-template-columns:1fr}.case-row{grid-template-columns:75px 1fr}.case-row>.case-meta,.case-row>.action-stack{grid-column:2}.kpi-grid{grid-template-columns:1fr 1fr}.kpi{padding:12px}.kpi strong{font-size:20px}}
.customer-table-card .table th:last-child,.customer-table-card .table tr[data-customer-row] td:last-child{display:none}
:root{--sidebar-width:214px}
.sidebar{width:var(--sidebar-width);background:linear-gradient(180deg,#0b192d,#101f35);padding:24px 10px 18px}
.brand{padding:0 14px 27px}
.workspace-switch{display:none}
.nav-group{margin:0}
.nav-label{display:none}
.nav-item{height:43px;padding:0 12px;margin:7px 2px 7px 25px;border-radius:8px;gap:14px;font-size:14px;white-space:nowrap}
.nav-item.active{background:linear-gradient(100deg,#5e50eb,#7264f7);box-shadow:0 7px 20px #5144d14a}
.nav-icon{color:#e2e7f1}
@media(max-width:1100px){.sidebar{width:205px}.nav-item{margin-left:20px}}
@media(max-width:700px){.sidebar{width:65px;padding:18px 8px}.nav-item{margin-left:0;margin-right:0}}
.nav-icon{position:relative;width:21px;height:21px;display:grid;place-items:center;filter:drop-shadow(0 2px 1px #050b16)}
.nav-icon:after{content:"";position:absolute;inset:4px 2px 1px;border-radius:50%;background:radial-gradient(circle at 35% 25%,#fff8,transparent 46%),linear-gradient(145deg,#ffffff,#a9b5ca);opacity:.14;filter:blur(1px);z-index:0}
.nav-icon svg{position:relative;z-index:1;width:20px;height:20px;fill:linear-gradient(#fff,#b9c5d7);stroke:#e5ebf5;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 0 #74819a)}
.nav-icon svg path:first-child,.nav-icon svg rect{fill:#dce4f0;fill-opacity:.18}
.nav-item:hover .nav-icon svg,.nav-item.active .nav-icon svg{stroke:#fff;filter:drop-shadow(0 1px 2px #2419a8)}
.nav-item.active .nav-icon:after{opacity:.3;background:radial-gradient(circle at 35% 25%,#fff,transparent 43%),linear-gradient(145deg,#fff,#b9afff)}
.search-icon{font-size:22px;line-height:1;color:#748098;transform:rotate(-20deg);display:inline-block}
.top-icon{width:30px;height:34px;padding:5px;display:grid;place-items:center;color:#6c778d}
.top-icon svg{width:21px;height:21px;fill:#eef1f6;stroke:#68758b;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 1px #bcc3d0)}
.top-icon:hover svg{stroke:var(--primary);filter:drop-shadow(0 1px 2px #b8b2ff)}
.top-icon b{top:0;right:-2px;min-width:16px;height:16px;display:grid;place-items:center;padding:0;background:#ff585c;border:2px solid #fff;font-size:9px;box-shadow:0 2px 5px #ff585c55}
.org-layout{display:grid;grid-template-columns:240px minmax(620px,1fr) 330px;gap:0;min-height:calc(100vh - 86px);background:#f8f9fc;margin:-26px -34px -38px}
.org-tree{border-radius:0;border-top:0;border-bottom:0;border-left:0;box-shadow:none;padding:20px 11px;background:#fff}.org-tree-head{display:flex;justify-content:space-between;align-items:center;padding:0 8px 14px;font-size:15px}.tree-filter{border:1px solid var(--line);background:#fff;border-radius:6px;color:#768197}.org-search{display:flex;align-items:center;height:34px;border:1px solid var(--line);border-radius:6px;padding-left:8px;color:#8a94a4;margin-bottom:14px}.org-search input{border:0;outline:0;width:100%;font-size:12px;padding:0 6px}.org-search button{height:100%;border:0;border-left:1px solid var(--line);background:#fff;color:#7e899b}.org-node{height:39px;display:flex;align-items:center;gap:7px;border-radius:6px;color:#546075;font-size:12px;white-space:nowrap;cursor:pointer}.org-node:hover{background:#f1f0ff}.org-node.selected{background:#eeedff;color:var(--primary);font-weight:700}.org-node.depth-0{padding-left:5px}.org-node.depth-1{padding-left:18px}.org-node.depth-2{padding-left:32px}.org-node.depth-3{padding-left:48px}.org-node.depth-4{padding-left:64px}.tree-arrow{width:11px;color:#536179;font-size:14px}.org-name{overflow:hidden;text-overflow:ellipsis}.org-count{margin-left:auto;padding-right:7px;color:#8d97a8;font-size:11px}.org-icon{width:18px;height:18px;border-radius:5px;display:grid;place-items:center;color:#fff;font-size:12px;font-weight:700;box-shadow:inset 0 1px 2px #fff8,0 2px 3px #263c5b22}.org-icon.group{background:#4d80f6}.org-icon.region{background:#6554e9}.org-icon.company{background:#42a9ef}.org-icon.distributor{background:#ff914c}.org-icon.store{background:#38bd93}.org-main{padding:24px 18px 30px;min-width:0;overflow:hidden}.org-main-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px}.org-main-head h2{font-size:18px;margin:8px 0 0}.org-back{color:#202a3b;font-weight:700;font-size:16px}.org-main-head .danger-btn{margin:0}.org-toolbar{display:flex;align-items:center;gap:8px;padding:12px 13px;margin-bottom:13px;flex-wrap:wrap}.org-toolbar .input{min-width:150px;flex:1}.filter-label{color:#6e788c;font-size:12px}.org-toolbar .select{height:34px;padding:0 9px}.org-table-card{padding:0 12px;overflow:auto}.org-table-card .table{min-width:900px}.org-table-card .table td,.org-table-card .table th{padding:13px 7px}.pagination{padding:16px 5px;text-align:center;color:#59657a;font-size:12px;white-space:nowrap}.pagination button,.pagination input{border:1px solid var(--line);background:#fff;padding:7px 9px;border-radius:5px;color:#657087}.pagination b{background:var(--primary);color:#fff;padding:8px 11px;border-radius:5px}.pagination input{width:35px;text-align:center}.org-detail{border-radius:0;border-top:0;border-bottom:0;border-right:0;box-shadow:-6px 0 18px #25365d0a;padding:21px 20px;position:relative;overflow:auto;background:#fff}.detail-close{position:absolute;right:18px;top:15px;font-size:23px;color:#768197}.detail-title{display:flex;align-items:center;gap:10px;margin-bottom:16px}.detail-title h2{font-size:18px;margin:0}.detail-path{border-top:1px solid var(--line);padding:14px 0;color:#738096;font-size:11px;line-height:22px}.detail-section{border-top:1px solid var(--line);padding:15px 0}.detail-section h3{font-size:14px;margin:0 0 12px}.detail-section h3 .link{float:right;font-weight:400}.detail-line{display:flex;gap:10px;font-size:12px;line-height:29px}.detail-line label{width:68px;color:#8290a4;flex:none}.detail-line span{color:#3f4b61}.mini-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.mini-metrics div{border:1px solid #edf0f5;background:#fafbfe;border-radius:6px;text-align:center;padding:9px 2px}.mini-metrics b,.mini-metrics small{display:block}.mini-metrics b{font-size:18px;color:var(--ink)}.mini-metrics small{font-size:10px;color:#8993a4;margin-top:4px}.member-row{display:flex;justify-content:space-between;gap:7px;text-align:center}.member-row strong,.member-row small{display:block;font-size:10px}.member-row strong{font-weight:500;margin-top:4px}.member-row small{color:#8993a4}.member-avatar,.member-more{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#d2d8e5,#68758e);color:#fff;font-weight:700;font-size:13px}.member-more{background:#f0f2f6;color:#536075;font-size:15px;margin-top:0}.detail-actions{display:flex;gap:12px;padding-top:16px}.detail-actions button{flex:1;border:0;border-radius:6px;padding:10px;background:#f0f2f6;color:#516078}.detail-actions .danger-btn{color:#fff;margin:0}@media(max-width:1200px){.org-layout{grid-template-columns:220px minmax(560px,1fr)}.org-detail{display:none}}@media(max-width:700px){.org-layout{display:block;margin:-18px -16px -30px}.org-tree{display:none}.org-main{padding:18px 12px}.org-toolbar{align-items:stretch}.org-toolbar .input{flex-basis:100%}.org-main-head{padding:0 4px}}
.mini-metrics div{position:relative;padding-top:30px}
.mini-metrics div:before{content:"";position:absolute;top:8px;left:50%;transform:translateX(-50%);width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:700;line-height:20px;color:#fff;box-shadow:inset 0 1px 2px #fff8,0 2px 4px #33415a22}
.mini-metrics div:nth-child(1):before{content:"▤";background:#6c9cff}
.mini-metrics div:nth-child(2):before{content:"♧";background:#48bf94}
.mini-metrics div:nth-child(3):before{content:"♙";background:#f4b047}
.mini-metrics div:nth-child(4):before{content:"!";background:#ff6866}
.detail-actions .danger-btn{background:var(--red)!important;color:#fff!important;box-shadow:0 4px 10px #ff625f33}
.color-page{margin:-26px -34px -38px;padding:0 12px 30px;background:#f7f8fc;min-height:calc(100vh - 86px)}.color-tabs{height:55px;display:flex;align-items:center;gap:38px;border-bottom:1px solid var(--line);padding:0 18px;color:#59657a;background:#fff}.color-tabs>div{height:55px;padding-top:19px;cursor:pointer}.color-tabs>div.active{color:var(--primary);font-weight:700;border-bottom:3px solid var(--primary)}.color-tabs .danger-btn{margin-left:auto;margin-right:0;padding:9px 18px}.color-crumb{padding:21px 18px 15px;font-size:13px}.color-workspace{display:grid;grid-template-columns:320px 430px minmax(440px,1fr);gap:6px}.series-panel,.shade-panel,.formula-panel{border-radius:10px;padding:15px 12px;min-width:0}.color-panel-head{display:flex;align-items:center;justify-content:space-between;padding:0 6px 11px}.color-panel-head h2,.formula-panel>h2{font-size:15px;margin:0}.series-card{height:75px;border:1px solid #e9edf4;border-radius:9px;display:flex;align-items:center;gap:12px;padding:8px;margin-bottom:8px;color:#48546a;cursor:pointer}.series-card.selected{border-color:var(--primary);box-shadow:0 0 0 1px #786bf1;background:#fbfaff}.series-thumb{width:104px;height:57px;border-radius:5px;box-shadow:inset 0 0 12px #0004}.series-copy{min-width:0;flex:1}.series-copy strong,.series-copy small{display:block}.series-copy strong{font-size:14px}.series-copy small{font-size:12px;color:#8c96a7;margin-top:6px}.series-card>span{font-size:11px;color:#768297;white-space:nowrap}.shade-tools{display:flex;gap:9px}.shade-tools .input{min-width:230px;height:32px}.shade-tools button{width:34px;border:1px solid var(--line);background:#fff;border-radius:6px;color:#77839a}.shade-list{border-top:1px solid #eef0f5}.shade-row{height:59px;border-bottom:1px solid #eef0f5;display:flex;align-items:center;gap:12px;padding:0 10px;position:relative}.shade-row.selected{background:#faf9ff;border:1px solid #a49bff;border-radius:6px;margin:1px 0}.shade-swatch{width:34px;height:34px;flex:none;border-radius:50%;background:radial-gradient(circle at 35% 25%,#777,transparent 15%),#1d1c1b;box-shadow:inset -5px -5px 8px #0008,0 1px 2px #0003}.shade-swatch.brown{background:radial-gradient(circle at 35% 25%,#b48d70,transparent 16%),#604332}.shade-swatch.gold{background:radial-gradient(circle at 35% 25%,#e7c7a3,transparent 16%),#ae7d56}.shade-swatch.ash{background:radial-gradient(circle at 35% 25%,#b4abad,transparent 16%),#4d4647}.shade-row strong,.shade-row small{display:block}.shade-row small{color:#8993a4;font-size:12px;margin-top:4px}.shade-meta{margin-left:auto;color:#768196;font-size:11px;line-height:19px}.shade-check{width:23px;height:23px;border-radius:50%;background:var(--primary);color:#fff;display:grid;place-items:center;font-size:13px}.color-pagination{font-size:11px;color:#667287;padding:14px 8px}.color-pagination b{background:var(--primary);color:#fff;padding:7px 10px;border-radius:5px}.color-pagination button{float:right;border:1px solid var(--line);background:#fff;border-radius:5px;padding:6px 9px;color:#69758a}.formula-panel{padding:17px 20px}.formula-panel>h2{padding-bottom:15px;border-bottom:1px solid var(--line)}.formula-form{padding-top:18px}.form-line{display:grid;grid-template-columns:70px minmax(130px,1fr) 58px 145px;gap:10px;align-items:center}.form-line label,.formula-field label,.tips strong,.strength>strong{color:#48546a;font-size:12px}.form-line input,.formula-field textarea{width:100%;border:1px solid #dce1eb;border-radius:6px;padding:9px;outline:0;color:#445068}.weight-input{display:flex;border:1px solid #dce1eb;border-radius:6px;overflow:hidden}.weight-input input{border:0}.weight-input span{padding:9px 8px;color:#788398}.formula-field{display:grid;grid-template-columns:70px 1fr;gap:10px;margin-top:16px;position:relative}.formula-field textarea{height:82px;resize:none}.formula-field small{position:absolute;right:9px;bottom:8px;color:#8691a4}.tips{display:flex;gap:24px;align-items:center;padding:17px 0;font-size:12px}.tips span{color:#667287}.strength{display:flex;align-items:center;gap:33px;margin:4px 0 18px}.strength>div{display:flex;gap:13px;flex:1}.strength button{height:38px;flex:1;border:1px solid #dfe4ec;background:#fff;border-radius:6px;color:#536078}.strength button.active{background:var(--primary);color:#fff;border-color:var(--primary)}.ingredients h3{font-size:13px;margin:0 0 8px}.ingredient-row,.ingredient-total{display:grid;grid-template-columns:1.7fr 1.2fr .7fr .8fr;align-items:center;gap:8px;padding:10px 12px;border:1px solid #eef0f5;border-bottom:0;font-size:12px;color:#627087}.ingredient-row:last-of-type{border-bottom:1px solid #eef0f5}.ingredient-name{color:#3f4b61}.ingredient-name small{color:#7f899b;margin-left:5px}.ingredient-dot{display:inline-block;width:23px;height:23px;border-radius:50%;vertical-align:middle;margin-right:8px;background:#5b4030;box-shadow:inset -4px -3px 6px #0008}.ingredient-dot.warm{background:#8b5843}.ingredient-dot.blue{background:#243c83}.ingredient-dot.white{background:#fff;border:1px solid #dce1eb}.ingredient-total{background:#faf9ff;color:var(--primary);font-size:14px}.ingredient-total b:nth-child(2){grid-column:3}.ingredient-total b:nth-child(3){grid-column:4}.save-formula{width:100%;border:0;background:var(--red);color:#fff;border-radius:7px;padding:13px;margin-top:28px;font-size:15px;font-weight:700;box-shadow:0 5px 12px #ff625f33}@media(max-width:1300px){.color-workspace{grid-template-columns:280px 380px minmax(400px,1fr)}.series-thumb{width:86px}}@media(max-width:1050px){.color-workspace{grid-template-columns:280px 1fr}.formula-panel{grid-column:1/-1}.color-page{margin:-18px -16px -30px}.color-tabs{gap:20px}}@media(max-width:700px){.color-workspace{display:block}.series-panel,.shade-panel{margin-bottom:10px}.color-tabs{overflow:auto;white-space:nowrap}.color-tabs .danger-btn{display:none}.color-crumb{padding-left:6px}.form-line{grid-template-columns:60px 1fr}.form-line label:nth-of-type(2){grid-column:1}.weight-input{grid-column:2}.tips,.strength{display:block}.tips span{display:block;margin-top:8px}.strength>div{margin-top:10px}}
.series-thumb{background-image:url('./assets/hair-color-swatch-sheet.png')!important;background-size:400% 200%;background-repeat:no-repeat;background-color:transparent!important}
.series-card:nth-child(2) .series-thumb{background-position:0 0}.series-card:nth-child(3) .series-thumb{background-position:33.333% 0}.series-card:nth-child(4) .series-thumb{background-position:66.666% 0}.series-card:nth-child(5) .series-thumb{background-position:100% 0}.series-card:nth-child(6) .series-thumb{background-position:0 100%}.series-card:nth-child(7) .series-thumb{background-position:33.333% 100%}.series-card:nth-child(8) .series-thumb{background-position:66.666% 100%}.series-card:nth-child(9) .series-thumb{background-position:100% 100%}
.series-card:nth-child(2) .series-thumb{background-position:0 0!important}.series-card:nth-child(3) .series-thumb{background-position:33.333% 0!important}.series-card:nth-child(4) .series-thumb{background-position:66.666% 0!important}.series-card:nth-child(5) .series-thumb{background-position:100% 0!important}.series-card:nth-child(6) .series-thumb{background-position:0 100%!important}.series-card:nth-child(7) .series-thumb{background-position:33.333% 100%!important}.series-card:nth-child(8) .series-thumb{background-position:66.666% 100%!important}.series-card:nth-child(9) .series-thumb{background-position:100% 100%!important}
.series-card:nth-child(2) .series-thumb,.series-card:nth-child(3) .series-thumb,.series-card:nth-child(4) .series-thumb,.series-card:nth-child(5) .series-thumb,.series-card:nth-child(6) .series-thumb,.series-card:nth-child(7) .series-thumb,.series-card:nth-child(8) .series-thumb,.series-card:nth-child(9) .series-thumb{background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important}
.series-card:nth-child(2) .series-thumb{background-image:url('./assets/reference-swatches/series-1.png')!important}.series-card:nth-child(3) .series-thumb{background-image:url('./assets/reference-swatches/series-2.png')!important}.series-card:nth-child(4) .series-thumb{background-image:url('./assets/reference-swatches/series-3.png')!important}.series-card:nth-child(5) .series-thumb{background-image:url('./assets/reference-swatches/series-4.png')!important}.series-card:nth-child(6) .series-thumb{background-image:url('./assets/reference-swatches/series-5.png')!important}.series-card:nth-child(7) .series-thumb{background-image:url('./assets/reference-swatches/series-6.png')!important}.series-card:nth-child(8) .series-thumb{background-image:url('./assets/reference-swatches/series-7.png')!important}.series-card:nth-child(9) .series-thumb{background-image:url('./assets/reference-swatches/series-8.png')!important}
.shade-row:nth-child(1) .shade-swatch,.shade-row:nth-child(2) .shade-swatch,.shade-row:nth-child(3) .shade-swatch,.shade-row:nth-child(4) .shade-swatch,.shade-row:nth-child(5) .shade-swatch,.shade-row:nth-child(6) .shade-swatch,.shade-row:nth-child(7) .shade-swatch,.shade-row:nth-child(8) .shade-swatch,.shade-row:nth-child(9) .shade-swatch,.shade-row:nth-child(10) .shade-swatch{background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important}
.shade-row:nth-child(1) .shade-swatch{background-image:url('./assets/reference-swatches/color-1.png')!important}.shade-row:nth-child(2) .shade-swatch{background-image:url('./assets/reference-swatches/color-2.png')!important}.shade-row:nth-child(3) .shade-swatch{background-image:url('./assets/reference-swatches/color-3.png')!important}.shade-row:nth-child(4) .shade-swatch{background-image:url('./assets/reference-swatches/color-4.png')!important}.shade-row:nth-child(5) .shade-swatch{background-image:url('./assets/reference-swatches/color-5.png')!important}.shade-row:nth-child(6) .shade-swatch{background-image:url('./assets/reference-swatches/color-6.png')!important}.shade-row:nth-child(7) .shade-swatch{background-image:url('./assets/reference-swatches/color-7.png')!important}.shade-row:nth-child(8) .shade-swatch{background-image:url('./assets/reference-swatches/color-8.png')!important}.shade-row:nth-child(9) .shade-swatch{background-image:url('./assets/reference-swatches/color-9.png')!important}.shade-row:nth-child(10) .shade-swatch{background-image:url('./assets/reference-swatches/color-10.png')!important}
.ingredient-row:nth-child(1) .ingredient-dot,.ingredient-row:nth-child(2) .ingredient-dot,.ingredient-row:nth-child(3) .ingredient-dot,.ingredient-row:nth-child(4) .ingredient-dot,.ingredient-row:nth-child(5) .ingredient-dot{background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important}.ingredient-row:nth-child(1) .ingredient-dot{background-image:url('./assets/reference-swatches/ingredient-1.png')!important}.ingredient-row:nth-child(2) .ingredient-dot{background-image:url('./assets/reference-swatches/ingredient-2.png')!important}.ingredient-row:nth-child(3) .ingredient-dot{background-image:url('./assets/reference-swatches/ingredient-3.png')!important}.ingredient-row:nth-child(4) .ingredient-dot{background-image:url('./assets/reference-swatches/ingredient-4.png')!important}.ingredient-row:nth-child(5) .ingredient-dot{background-image:url('./assets/reference-swatches/ingredient-5.png')!important}
.ingredients .ingredient-row:nth-of-type(1) .ingredient-dot{background-image:url('./assets/reference-swatches/ingredient-1.png')!important}.ingredients .ingredient-row:nth-of-type(2) .ingredient-dot{background-image:url('./assets/reference-swatches/ingredient-2.png')!important}.ingredients .ingredient-row:nth-of-type(3) .ingredient-dot{background-image:url('./assets/reference-swatches/ingredient-3.png')!important}.ingredients .ingredient-row:nth-of-type(4) .ingredient-dot{background-image:url('./assets/reference-swatches/ingredient-4.png')!important}.ingredients .ingredient-row:nth-of-type(5) .ingredient-dot{background-image:url('./assets/reference-swatches/ingredient-5.png')!important}
.shade-row:nth-child(1) .shade-swatch{background-image:url('./assets/reference-swatches-v2/color-1.png')!important}.shade-row:nth-child(2) .shade-swatch{background-image:url('./assets/reference-swatches-v2/color-2.png')!important}.shade-row:nth-child(3) .shade-swatch{background-image:url('./assets/reference-swatches-v2/color-3.png')!important}.shade-row:nth-child(4) .shade-swatch{background-image:url('./assets/reference-swatches-v2/color-4.png')!important}.shade-row:nth-child(5) .shade-swatch{background-image:url('./assets/reference-swatches-v2/color-5.png')!important}.shade-row:nth-child(6) .shade-swatch{background-image:url('./assets/reference-swatches-v2/color-6.png')!important}.shade-row:nth-child(7) .shade-swatch{background-image:url('./assets/reference-swatches-v2/color-7.png')!important}.shade-row:nth-child(8) .shade-swatch{background-image:url('./assets/reference-swatches-v2/color-8.png')!important}.shade-row:nth-child(9) .shade-swatch{background-image:url('./assets/reference-swatches-v2/color-9.png')!important}.shade-row:nth-child(10) .shade-swatch{background-image:url('./assets/reference-swatches-v2/color-10.png')!important}
.shade-swatch{width:36px;height:36px;box-shadow:none!important;border-radius:50%}
.ingredients .ingredient-row:nth-of-type(1) .ingredient-dot{background-image:url('./assets/reference-swatches-v2/ingredient-1.png')!important}.ingredients .ingredient-row:nth-of-type(2) .ingredient-dot{background-image:url('./assets/reference-swatches-v2/ingredient-2.png')!important}.ingredients .ingredient-row:nth-of-type(3) .ingredient-dot{background-image:url('./assets/reference-swatches-v2/ingredient-3.png')!important}.ingredients .ingredient-row:nth-of-type(4) .ingredient-dot{background-image:url('./assets/reference-swatches-v2/ingredient-4.png')!important}.ingredients .ingredient-row:nth-of-type(5) .ingredient-dot{background-image:url('./assets/reference-swatches-v2/ingredient-5.png')!important}
.ingredient-dot{width:24px;height:24px;box-shadow:none!important;border:0!important}
.chevron,.user-chevron{display:inline-block;width:8px;height:8px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-left:auto;margin-right:3px;margin-top:-4px;color:#8d9ab0}
.user-chevron{margin-left:2px;margin-right:1px;width:7px;height:7px;color:#6d788d}
.search-icon{width:14px;height:14px;border:1.6px solid #748098;border-radius:50%;position:relative;transform:none;font-size:0;flex:none}
.search-icon:after{content:"";position:absolute;width:6px;height:1.6px;background:#748098;right:-5px;bottom:-2px;transform:rotate(45deg);border-radius:2px}
.shade-swatch{background-image:url('./assets/hair-color-swatch-sheet.png')!important;background-size:400% 200%!important;background-repeat:no-repeat!important;border:0!important;box-shadow:inset -4px -4px 7px #0007,0 1px 2px #8993a455!important}
.shade-row:nth-child(1) .shade-swatch{background-position:0 0!important}.shade-row:nth-child(2) .shade-swatch{background-position:33.333% 0!important}.shade-row:nth-child(3) .shade-swatch{background-position:66.666% 0!important}.shade-row:nth-child(4) .shade-swatch{background-position:66.666% 0!important}.shade-row:nth-child(5) .shade-swatch{background-position:0 100%!important}.shade-row:nth-child(6) .shade-swatch{background-position:0 100%!important}.shade-row:nth-child(7) .shade-swatch{background-position:0 100%!important}.shade-row:nth-child(8) .shade-swatch{background-position:33.333% 0!important}.shade-row:nth-child(9) .shade-swatch{background-position:33.333% 0!important}.shade-row:nth-child(10) .shade-swatch{background-position:33.333% 0!important}
.shade-row:nth-child(5) .shade-swatch,.shade-row:nth-child(6) .shade-swatch,.shade-row:nth-child(7) .shade-swatch{border:4px solid #fff!important;box-shadow:0 1px 4px #7f879455!important}
.ingredient-dot{background-image:url('./assets/hair-color-swatch-sheet.png')!important;background-size:400% 200%!important;background-repeat:no-repeat!important;border:0!important;box-shadow:inset -3px -3px 5px #0007,0 1px 2px #8993a455!important}
.ingredients .ingredient-row:nth-of-type(1) .ingredient-dot{background-position:66.666% 0!important}.ingredients .ingredient-row:nth-of-type(2) .ingredient-dot{background-position:66.666% 0!important}.ingredients .ingredient-row:nth-of-type(3) .ingredient-dot{background-position:66.666% 0!important}.ingredients .ingredient-row:nth-of-type(4) .ingredient-dot{background-position:100% 100%!important}.ingredients .ingredient-row:nth-of-type(5) .ingredient-dot{background:#fff!important;border:1px solid #dce1eb!important;box-shadow:inset -2px -2px 4px #c4ccd8,0 1px 2px #8993a455!important}
.shade-row .shade-swatch{background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important;border:0!important;box-shadow:none!important}
.shade-row:nth-child(1) .shade-swatch{background-image:url('./assets/color-code-reference/color-1.png')!important}.shade-row:nth-child(2) .shade-swatch{background-image:url('./assets/color-code-reference/color-2.png')!important}.shade-row:nth-child(3) .shade-swatch{background-image:url('./assets/color-code-reference/color-3.png')!important}.shade-row:nth-child(4) .shade-swatch{background-image:url('./assets/color-code-reference/color-4.png')!important}.shade-row:nth-child(5) .shade-swatch{background-image:url('./assets/color-code-reference/color-5.png')!important}.shade-row:nth-child(6) .shade-swatch{background-image:url('./assets/color-code-reference/color-6.png')!important}.shade-row:nth-child(7) .shade-swatch{background-image:url('./assets/color-code-reference/color-7.png')!important}.shade-row:nth-child(8) .shade-swatch{background-image:url('./assets/color-code-reference/color-8.png')!important}.shade-row:nth-child(9) .shade-swatch{background-image:url('./assets/color-code-reference/color-9.png')!important}.shade-row:nth-child(10) .shade-swatch{background-image:url('./assets/color-code-reference/color-10.png')!important}

/* Phase 3 · governance and operations */
.page-desc{margin:6px 0 0;color:#8993a5;font-size:12px}.secondary-btn{border:1px solid #dce1eb;background:#fff;color:#59667b;border-radius:6px;padding:9px 14px;font-weight:600}.governance-page{max-width:1500px}.governance-page .page-title-row{align-items:flex-start}.governance-page .page-title-row>div:first-child{flex:1}.governance-page .metric-strip{margin:4px 0 18px}.review-tabs{display:flex;gap:8px;margin:0 0 14px}.review-tabs button{border:0;background:#eef1f7;color:#657187;border-radius:6px;padding:9px 16px}.review-tabs button.active{background:#eceaff;color:var(--primary);font-weight:700}.review-tabs b{margin-left:4px}.review-toolbar{padding-bottom:14px}.table-action{border:0;background:#f0efff;color:var(--primary);border-radius:5px;padding:7px 10px;font-size:12px}.request-flow{margin-top:16px}.flow-steps{display:flex;align-items:center;gap:18px;color:#9aa3b2;font-size:13px;padding:16px 0 4px}.flow-steps span{border:1px solid #e0e4ec;border-radius:20px;padding:9px 16px}.flow-steps .done{border-color:#a9dfcb;background:#edfbf5;color:#2e9b77}.flow-steps .active{border-color:#b8b0ff;background:#f2f0ff;color:var(--primary)}.snapshot-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:16px}.snapshot-card{padding:18px;display:grid;grid-template-columns:42px 1fr;gap:12px;position:relative}.snapshot-card h3{margin:0;font-size:14px}.snapshot-card p{margin:7px 0;color:#778298;font-size:12px}.snapshot-card small{color:#97a0b0;font-size:11px}.snapshot-card .link{grid-column:2;margin-top:14px}.snapshot-icon{width:40px;height:40px;border-radius:10px;background:#eceaff;color:var(--primary);display:grid;place-items:center;font-size:20px}.export-hero{padding:20px 24px;display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.export-hero h2{margin:0;font-size:16px}.export-hero p{margin:7px 0 0;color:#8993a5;font-size:12px}.notification-layout{display:grid;grid-template-columns:1.5fr 1fr;gap:16px}.notice-item{display:flex;align-items:flex-start;gap:12px;padding:15px 4px;border-top:1px solid #eef0f5}.notice-item>div{flex:1}.notice-item strong{font-size:13px}.notice-item p{margin:5px 0;color:#69758a;font-size:12px}.notice-item small{color:#a0a8b6;font-size:11px}.notice-dot{width:9px;height:9px;border-radius:50%;background:#5f56e8;margin-top:5px;box-shadow:0 0 0 4px #edecff}.notice-dot.warn{background:#eda33b;box-shadow:0 0 0 4px #fff3df}.notice-dot.danger{background:#f06262;box-shadow:0 0 0 4px #ffeded}.preference{display:flex;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid #eef0f5;font-size:13px}.preference .select{min-width:150px}.notification-layout .primary-btn{margin-top:18px}.alert-summary{display:flex;gap:14px;align-items:stretch;margin-bottom:16px}.alert-summary-card{padding:15px 20px;min-width:160px;display:flex;flex-direction:column}.alert-summary-card strong{font-size:28px;color:var(--ink)}.alert-summary-card span{font-size:13px;margin:4px 0}.alert-summary-card small{color:#929bab;font-size:11px}.alert-summary-card.danger{border-left:3px solid #f06464}.alert-summary-card.danger strong{color:#e65454}.alert-summary-card.warn{border-left:3px solid #e5a23c}.alert-summary-card.warn strong{color:#d48c20}.alert-summary>.primary-btn{margin-left:auto;align-self:center}.audit-filter{display:flex;gap:10px;align-items:center;padding:14px;margin-bottom:16px}.audit-filter .input{flex:1}.audit-filter .secondary-btn{margin-left:auto}.table code{font-size:11px;color:#8a94a7;background:#f3f5f8;padding:3px 5px;border-radius:4px}@media(max-width:900px){.snapshot-grid,.notification-layout{grid-template-columns:1fr}.alert-summary{flex-wrap:wrap}.alert-summary>.primary-btn{margin-left:0}.audit-filter{flex-wrap:wrap}.audit-filter .input{flex-basis:100%}}@media(max-width:650px){.flow-steps{gap:5px;font-size:11px}.flow-steps i{display:none}.flow-steps span{padding:8px 9px}.governance-page .page-title-row{display:block}.governance-page .page-title-row .toolbar{margin-top:12px}.snapshot-grid{display:block}.snapshot-card{margin-bottom:10px}.alert-summary-card{min-width:calc(50% - 7px)}.alert-summary>.primary-btn{width:100%}}

.auth-gate{position:fixed;inset:0;z-index:20;display:grid;place-items:center;background:linear-gradient(135deg,#101d32,#243b66)}.auth-gate[hidden],.app-shell[hidden]{display:none}.auth-card{width:min(420px,calc(100% - 32px));background:#fff;border-radius:16px;padding:38px;box-shadow:0 20px 60px #07132955}.auth-card h1{margin:18px 0 6px;font-size:25px}.auth-card p{margin:0 0 24px;color:#7d879a}.auth-card label{display:block;color:#69758a;font-size:12px;margin:14px 0}.auth-card input{display:block;width:100%;height:42px;margin-top:7px;border:1px solid #e1e5ed;border-radius:7px;padding:0 12px}.auth-card .primary-btn{width:100%;margin:12px 0 0}.auth-error{min-height:18px;margin-top:10px;color:#e34f4c;font-size:12px}.auth-mark{margin:auto}.logout-btn{margin-left:auto;background:transparent;border:0;color:#9aa8bf;font-size:11px;cursor:pointer}.empty-state{margin:28px 34px;padding:60px;text-align:center}.empty-state h2{margin:0 0 10px}.empty-state p{color:#8b94a5}.empty-note{padding:30px;text-align:center;color:#929bac}
.color-library-workspace{grid-template-columns:330px 430px minmax(460px,1fr);gap:8px;align-items:stretch}.color-library-workspace .series-panel,.color-library-workspace .shade-panel,.color-detail-panel{min-height:700px}.color-detail-panel{padding:18px 20px}.color-detail-panel>h2{margin:0;padding:0 0 17px;border-bottom:1px solid var(--line);font-size:16px}.color-detail-body{display:grid;grid-template-columns:minmax(220px,1fr) 170px;gap:20px;padding-top:23px}.color-fields{display:grid;gap:13px}.color-field{display:grid;grid-template-columns:72px 1fr;gap:10px;align-items:center;position:relative}.color-field label{font-size:12px;color:#48546a}.color-field input,.color-field select,.color-field textarea{width:100%;height:36px;border:1px solid #dce1eb;border-radius:7px;background:#fff;padding:0 10px;outline:0;color:#445068;font:inherit}.color-field textarea{height:108px;padding:10px;resize:none}.color-field.full{align-items:start}.color-field.full small{position:absolute;right:10px;bottom:10px;color:#8791a5;font-size:11px}.detail-swatch-wrap{display:flex;flex-direction:column;align-items:center;gap:18px;padding-top:6px}.detail-swatch{width:150px;height:150px;border-radius:50%;background:repeating-linear-gradient(110deg,#865335 0 7px,#be8255 8px 12px,#6f4029 13px 17px);box-shadow:inset -13px -15px 24px #39201666,0 3px 8px #26365d1c}.detail-swatch-wrap button,.related-formula{border:1px solid #e0e5ee;background:#fff;color:#667287;border-radius:7px;padding:8px 12px}.detail-meta{border-top:1px solid var(--line);margin-top:20px;padding-top:17px;display:grid;gap:12px;font-size:12px}.detail-meta div{display:flex;gap:12px}.detail-meta label{width:84px;color:#788398}.detail-meta span{color:#506079}.related-formula{margin-top:23px;display:flex;justify-content:space-between;align-items:center;padding:12px 14px}.related-formula span{display:flex;flex-direction:column;gap:4px}.related-formula strong{font-size:13px;color:#3f4b61}.related-formula small{font-size:11px;color:#929bad}.related-formula b{color:#667287;font-weight:500}.detail-actions{display:flex;gap:12px;margin-top:33px}.detail-actions button{height:40px;flex:1;border:1px solid #dfe4ec;border-radius:7px;background:#fff;color:#5b6880;font:inherit}.detail-actions .primary-btn{margin:0;background:var(--primary);border-color:var(--primary);color:#fff}.color-library-workspace .shade-row{height:49px}.color-library-workspace .shade-swatch{width:31px;height:31px}.shade-swatch.warm{background:radial-gradient(circle at 35% 25%,#c89b7b,transparent 16%),#8a5035}.color-library-workspace .series-card{height:75px}.color-library-workspace .shade-panel{display:flex;flex-direction:column}.color-library-workspace .shade-list{flex:1}@media(max-width:1300px){.color-library-workspace{grid-template-columns:285px 390px minmax(420px,1fr)}.color-detail-body{grid-template-columns:1fr 135px}.detail-swatch{width:125px;height:125px}}@media(max-width:1050px){.color-library-workspace{grid-template-columns:280px 1fr}.color-detail-panel{grid-column:1/-1;min-height:auto}.color-detail-body{grid-template-columns:minmax(300px,1fr) 180px}}@media(max-width:700px){.color-detail-body{grid-template-columns:1fr}.detail-swatch-wrap{order:-1}.detail-swatch{width:120px;height:120px}.color-detail-panel{min-height:auto}}
.color-library-workspace .color-pagination{display:flex;align-items:center;gap:5px;white-space:nowrap}.color-library-workspace .color-pagination button{float:none;min-width:29px;height:29px;padding:0 8px;margin:0;border:1px solid var(--line);background:#fff;border-radius:6px;color:#667287;cursor:pointer}.color-library-workspace .color-pagination button.active{background:var(--primary);border-color:var(--primary);color:#fff}.color-library-workspace .color-pagination .page-size{margin-left:auto;width:auto}.shade-tools button.active{background:#efedff;border-color:#a69cff;color:var(--primary)}.color-preview-overlay{position:fixed;inset:0;z-index:30;display:grid;place-items:center;background:#101a2dcc}.color-preview-card{position:relative;min-width:280px;padding:28px 34px 24px;border-radius:16px;background:#fff;display:flex;flex-direction:column;align-items:center;gap:10px;box-shadow:0 18px 60px #07132966}.color-preview-card .detail-swatch.large{width:260px;height:260px}.color-preview-card strong{font-size:18px;color:var(--ink)}.color-preview-card span{font-size:11px;color:#9099aa}.color-preview-close{position:absolute;right:13px;top:8px;border:0;background:transparent;color:#68748b;font-size:25px;cursor:pointer}
.color-library-workspace .shade-row .shade-swatch{background-image:none!important;background-size:cover!important;background-position:center!important}.color-library-workspace .shade-row.selected .shade-swatch{box-shadow:0 0 0 2px #fff,0 0 0 3px var(--primary),inset -5px -5px 8px #0004}.color-library-workspace .series-card:nth-child(2) .series-thumb{background-image:url('./assets/reference-swatches/series-1.png')!important;background-size:cover!important}.color-library-workspace .series-card:nth-child(3) .series-thumb{background-image:url('./assets/reference-swatches/series-2.png')!important;background-size:cover!important}.color-library-workspace .series-card:nth-child(4) .series-thumb{background-image:url('./assets/reference-swatches/series-3.png')!important;background-size:cover!important}.color-library-workspace .series-card:nth-child(5) .series-thumb{background-image:url('./assets/reference-swatches/series-4.png')!important;background-size:cover!important}.color-library-workspace .series-card:nth-child(6) .series-thumb{background-image:url('./assets/reference-swatches/series-5.png')!important;background-size:cover!important}.color-library-workspace .series-card:nth-child(7) .series-thumb{background-image:url('./assets/reference-swatches/series-6.png')!important;background-size:cover!important}.color-library-workspace .series-card:nth-child(8) .series-thumb{background-image:url('./assets/reference-swatches/series-7.png')!important;background-size:cover!important}
.formula-workspace .shade-panel,.formula-workspace .series-panel,.formula-detail-panel{min-height:700px}.formula-detail-panel{padding:18px 20px}.formula-detail-panel>h2{margin:0;padding-bottom:16px;border-bottom:1px solid var(--line);font-size:16px}.formula-detail-form{padding-top:22px}.formula-detail-line{display:grid;grid-template-columns:72px minmax(150px,1fr) 58px 145px;gap:10px;align-items:center}.formula-detail-line label,.formula-detail-field label,.formula-strength strong{font-size:12px;color:#48546a}.formula-detail-line input,.formula-detail-field input,.formula-detail-field textarea{width:100%;height:38px;border:1px solid #dce1eb;border-radius:7px;padding:0 10px;outline:0;color:#445068;font:inherit}.formula-weight{display:flex;border:1px solid #dce1eb;border-radius:7px;overflow:hidden}.formula-weight input{border:0;min-width:0}.formula-weight span{padding:10px;color:#788398}.formula-detail-field{display:grid;grid-template-columns:72px 1fr;gap:10px;margin-top:17px;align-items:start}.formula-detail-field textarea{height:92px;padding:10px;resize:none}.formula-strength{display:flex;gap:30px;align-items:center;margin-top:19px}.formula-strength>div{display:flex;gap:10px;flex:1}.formula-strength button{height:38px;flex:1;border:1px solid #dfe4ec;background:#fff;border-radius:7px;color:#536078;cursor:pointer}.formula-strength button.active{background:var(--primary);border-color:var(--primary);color:#fff}.formula-source-note{margin-top:20px;padding:12px;border-radius:7px;background:#fafbfe;color:#8993a5;font-size:11px;line-height:18px}.formula-detail-meta{display:flex;flex-direction:column;gap:12px;border-top:1px solid var(--line);margin-top:22px;padding-top:17px;color:#788398;font-size:12px}.formula-detail-meta b{margin-left:20px;color:#506079;font-weight:500}.formula-actions{margin-top:35px}.formula-actions .primary-btn{background:var(--red);border-color:var(--red)}@media(max-width:1050px){.formula-workspace{grid-template-columns:280px 1fr}.formula-detail-panel{grid-column:1/-1;min-height:auto}}@media(max-width:700px){.formula-detail-line{grid-template-columns:60px 1fr}.formula-detail-line label:nth-of-type(2){grid-column:1}.formula-weight{grid-column:2}.formula-strength{display:block}.formula-strength>div{margin-top:10px}}
.formula-workspace .shade-row .shade-swatch{background-image:none!important;background-size:cover!important;background-position:center!important}
.premium-shell{display:grid;grid-template-columns:255px minmax(620px,1fr) 390px;gap:10px;align-items:stretch}.premium-series,.premium-colors,.premium-detail{min-height:720px;padding:18px 16px}.premium-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e9edf4;padding:0 0 15px;margin-bottom:10px}.premium-heading h2{margin:0;font-size:16px}.premium-heading span{display:block;margin-top:5px;color:#8c96a7;font-size:11px}.premium-heading span b{color:var(--primary)}.premium-ghost,.premium-tools button{height:32px;border:1px solid #dfe4ed;background:#fff;border-radius:7px;color:var(--primary);padding:0 10px;cursor:pointer}.premium-series-list{display:flex;flex-direction:column;gap:8px}.premium-series-card{display:grid;grid-template-columns:68px 1fr auto;gap:10px;align-items:center;width:100%;padding:8px;border:1px solid #e3e8f0;background:#fff;border-radius:9px;text-align:left;color:var(--ink);cursor:pointer}.premium-series-card.selected{border-color:var(--primary);box-shadow:0 0 0 1px #8d83ff;background:#fbfaff}.premium-series-thumb{width:68px;height:51px;border-radius:6px;background-size:cover;background-position:center;box-shadow:inset 0 0 12px #0004}.premium-series-card strong,.premium-series-card small{display:block}.premium-series-card strong{font-size:12px}.premium-series-card small{margin-top:5px;color:#8792a5;font-size:11px}.premium-series-card em{font-style:normal;color:#748097;font-size:10px;white-space:nowrap}.premium-tools{display:flex;gap:7px}.premium-tools input{width:190px;height:32px;border:1px solid #dfe4ed;border-radius:7px;padding:0 10px;outline:0;color:var(--ink)}.premium-tools button{color:#667287}.premium-table-head,.premium-color-row{display:grid;grid-template-columns:1.15fr 1.15fr .8fr 1.05fr 1.15fr;gap:10px;align-items:center}.premium-table-head{padding:9px 10px;color:#8a94a5;background:#f8fafc;font-size:11px}.premium-color-list{border:1px solid #edf0f5;border-top:0;overflow:hidden}.premium-color-row{width:100%;min-height:48px;border:0;border-bottom:1px solid #edf0f5;background:#fff;padding:0 10px;text-align:left;color:#4b5870;font:inherit;cursor:pointer}.premium-color-row:hover{background:#fafaff}.premium-color-row.selected{background:#f7f5ff;box-shadow:inset 3px 0 0 var(--primary)}.premium-color-row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.premium-color-row>span:first-child{display:flex;align-items:center;gap:9px;color:var(--ink);font-size:13px}.premium-color-row>span:first-child i{width:25px;height:25px;border-radius:50%;display:inline-block;box-shadow:inset -4px -4px 7px #0005}.mini-color-dot{display:inline-block;width:16px;height:16px;border-radius:50%;vertical-align:middle;margin-right:5px;box-shadow:inset -3px -3px 5px #0005}.premium-pagination{display:flex;gap:5px;align-items:center;padding:14px 2px;color:#667287;font-size:11px}.premium-pagination button{min-width:28px;height:28px;border:1px solid #e0e5ed;border-radius:6px;background:#fff;color:#667287;cursor:pointer}.premium-pagination button.active{background:var(--primary);border-color:var(--primary);color:#fff}.premium-detail{padding:20px}.premium-detail-head{display:flex;justify-content:space-between;align-items:start;border-bottom:1px solid #e8ecf3;padding-bottom:14px}.premium-detail-head span:first-child{color:#516078;font-size:12px}.premium-detail-head h2{margin:8px 0 0;font-size:21px}.premium-status{color:#20a976;font-size:11px;padding-top:4px}.premium-detail-layout{display:grid;grid-template-columns:1fr 122px;gap:15px;padding-top:20px}.premium-detail-fields{display:grid;gap:12px}.premium-detail-fields label{display:grid;gap:6px;color:#69758a;font-size:11px}.premium-detail-fields input,.premium-detail-fields select{height:34px;width:100%;border:1px solid #dce2ec;border-radius:7px;background:#fff;padding:0 9px;outline:0;color:#445068;font:inherit}.premium-color-input{position:relative}.premium-color-input input{padding-right:28px}.premium-color-input span{position:absolute;right:9px;top:8px;width:18px;height:18px;border-radius:4px;background:#8b6b61;box-shadow:inset 0 0 0 1px #0002}.premium-large-swatch{display:flex;flex-direction:column;align-items:center;gap:12px;padding-top:7px}.premium-large-swatch .detail-swatch{width:118px;height:118px}.premium-large-swatch button{border:1px solid #dfe4ed;background:#fff;border-radius:7px;padding:7px 9px;color:#69758a;font-size:11px;cursor:pointer}.premium-detail-meta{display:grid;gap:11px;border-top:1px solid #e8ecf3;margin-top:20px;padding-top:16px;font-size:11px}.premium-detail-meta div{display:flex;gap:12px}.premium-detail-meta span{width:60px;color:#8791a3}.premium-detail-meta b{font-weight:500;color:#526079}.premium-related{display:flex;justify-content:space-between;align-items:center;margin-top:20px;border:1px solid #e0e5ed;border-radius:8px;padding:12px;cursor:pointer}.premium-related strong,.premium-related small{display:block}.premium-related strong{font-size:12px}.premium-related small{margin-top:5px;color:#8b95a6;font-size:10px}.premium-related b{color:#657187;font-size:11px}.premium-actions{display:flex;gap:10px;margin-top:22px}.premium-actions button{height:38px;flex:1;border:1px solid #dfe4ed;border-radius:7px;background:#fff;color:#5d6a80;cursor:pointer}.premium-actions .primary-btn{margin:0;background:var(--primary);border-color:var(--primary);color:#fff}@media(max-width:1250px){.premium-shell{grid-template-columns:225px minmax(500px,1fr)}.premium-detail{grid-column:1/-1;min-height:auto}.premium-detail-layout{grid-template-columns:1fr 160px}}@media(max-width:800px){.premium-shell{display:block}.premium-series,.premium-colors{margin-bottom:10px}.premium-tools{flex-wrap:wrap}.premium-tools input{width:100%}.premium-table-head,.premium-color-row{grid-template-columns:1.15fr 1fr .8fr 1fr}.premium-table-head span:last-child,.premium-color-row>span:last-child{display:none}}
.color-preview-card .premium-preview-swatch{background-color:#6b4937!important;box-shadow:inset -13px -15px 24px #39201666,0 3px 8px #26365d1c}
/* Real dashboard additions */
.dashboard-heading{align-items:center}.dashboard-actions{display:flex;align-items:center;gap:12px}.data-status{font-size:12px;color:#7d879a}.trend-chart{height:226px;position:relative;background:repeating-linear-gradient(to bottom,transparent 0,transparent 41px,#edf0f5 42px)}.chart-canvas{height:100%;position:relative}.chart-canvas svg{width:100%;height:205px}.chart-canvas line{stroke:#e8ebf2;stroke-width:1}.chart-labels{position:absolute;left:0;right:0;bottom:0;height:18px;color:#8a94a6;font-size:10px}.chart-labels span{position:absolute;transform:translateX(-50%)}.real-donut{display:flex;align-items:center;justify-content:center}.real-donut:after{display:none}.real-donut span{width:86px;height:86px;border-radius:50%;background:#fff;display:grid;place-content:center;text-align:center;font-size:11px;color:#7d879a}.real-donut strong{display:block;color:#172033;font-size:19px}.donut-legend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:8px}.donut-legend em{font-style:normal;color:#9aa4b6}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:currentColor;margin-right:5px}.priority{display:inline-grid;place-items:center;min-width:25px;padding:4px 7px;border-radius:12px;background:#eef2ff;color:#5470d9;font-size:11px}.priority.high{background:#fff0ef;color:#ff625f}.priority.low{background:#edf8f4;color:#28a979}.table-scroll{overflow:auto}.table td strong{font-weight:600}.kpi-icon.red{background:#fff0ed;color:var(--red)}.kpi-icon.warn{background:#fff6e5;color:var(--orange)}
/* Unified color and formula workspace */
.color-formula-page{max-width:1500px}.cf-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:16px;color:#8b94a5;font-size:12px}.cf-tab{border:0;border-bottom:2px solid var(--primary);background:transparent;color:var(--primary);font-weight:700;padding:8px 2px}.cf-hint{margin-left:auto;color:#929bac}.cf-layout{display:grid;grid-template-columns:340px minmax(0,1fr);gap:18px;align-items:start}.cf-color-panel,.cf-detail-panel{padding:20px}.cf-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.cf-panel-head h3{margin:0;font-size:16px}.cf-panel-head small{color:#9aa4b6}.cf-panel-head input{width:170px;border:1px solid var(--line);border-radius:7px;padding:9px 10px;outline:0}.cf-color-list{max-height:690px;overflow:auto}.cf-color-row{width:100%;display:flex;align-items:center;gap:12px;text-align:left;border:0;border-bottom:1px solid #eef0f5;background:#fff;padding:12px 9px;cursor:pointer}.cf-color-row:hover,.cf-color-row.selected{background:#f2f0ff}.cf-color-row.selected{box-shadow:inset 3px 0 var(--primary)}.cf-mini-swatch{width:42px;height:42px;flex:none;border-radius:50%;background-size:cover;background-position:center;box-shadow:0 2px 9px #1d24330e,inset 0 0 0 1px #fff}.cf-color-row strong,.cf-color-row small{display:block}.cf-color-row strong{font-size:14px;color:var(--ink)}.cf-color-row small{font-size:11px;color:#9099a9;margin-top:4px}.cf-color-row em{margin-left:auto;color:#9099a9;font-size:11px;font-style:normal}.cf-detail-head{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #eef0f5;padding-bottom:17px}.cf-detail-head small,.cf-detail-head p{color:#929bac;margin:0}.cf-detail-head h2{margin:5px 0;font-size:28px}.cf-active{color:#26ad79;background:#ecfaf3;border-radius:20px;padding:7px 10px;font-size:11px}.cf-detail-main{display:grid;grid-template-columns:230px 1fr;gap:24px;padding:22px 0;border-bottom:1px solid #eef0f5}.cf-image-button{border:0;background:transparent;cursor:pointer;text-align:center;color:var(--primary);font-size:11px}.cf-large-swatch{display:block;width:210px;height:210px;border-radius:14px;background-size:cover;background-position:center;box-shadow:0 8px 22px #252b3b18,inset 0 0 0 1px #fff;transition:.2s}.cf-image-button:hover .cf-large-swatch{transform:scale(1.02);box-shadow:0 12px 30px #252b3b25}.cf-image-button>span:last-child{display:block;margin-top:10px}.cf-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;align-content:center}.cf-meta div{background:#f8f9fc;border-radius:9px;padding:14px}.cf-meta small,.cf-meta b{display:block}.cf-meta small{color:#929bac;font-size:11px;margin-bottom:8px}.cf-meta b{font-size:13px}.cf-formula-section{padding-top:20px}.cf-section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.cf-section-title h3{margin:0;font-size:16px}.cf-section-title span{display:block;color:#929bac;font-size:11px;margin-top:5px}.cf-section-title .primary-btn{margin-left:0;padding:8px 12px}.cf-formula-card{border:1px solid #eceef5;border-radius:10px;margin:10px 0;overflow:hidden}.cf-formula-title{display:flex;justify-content:space-between;padding:13px 15px;background:#f8f8ff}.cf-formula-title span{color:#929bac;font-size:11px}.cf-formula-item{display:grid;grid-template-columns:1fr 1fr 80px;padding:12px 15px;border-top:1px solid #f0f1f5;font-size:12px}.cf-formula-item span{color:#697489}.cf-formula-item strong{text-align:right;color:var(--primary)}.cf-empty-line{text-align:center;color:#929bac;padding:25px}.cf-modal-backdrop{position:fixed;inset:0;background:#131a2a66;display:grid;place-items:center;z-index:1000;padding:20px}.cf-modal{width:min(440px,100%);background:#fff;border-radius:14px;padding:24px;position:relative;box-shadow:0 20px 60px #11182740}.cf-modal-close{position:absolute;right:14px;top:12px;border:0;background:transparent;font-size:23px;color:#8993a5;cursor:pointer}.cf-modal-image{width:120px;height:120px;border-radius:12px;background-size:cover;background-position:center;margin:0 auto 16px}.cf-modal h3{margin:0 0 16px}.cf-modal label{display:block;color:#6f788a;font-size:12px;margin:10px 0}.cf-modal input{display:block;width:100%;margin-top:6px;border:1px solid var(--line);border-radius:7px;padding:10px;outline:0}.cf-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.cf-modal-actions button:first-child{border:1px solid var(--line);background:#fff;border-radius:7px;padding:10px 15px}.cf-modal-actions .primary-btn{margin-left:0}@media(max-width:900px){.cf-layout{grid-template-columns:1fr}.cf-color-list{max-height:310px}.cf-detail-main{grid-template-columns:1fr}.cf-image-button{margin:auto}.cf-meta{grid-template-columns:1fr 1fr}}
/* Expandable organization hierarchy */
.organization-tree-page{max-width:1500px}.org-data-status{font-size:12px;color:#8b94a5}.org-tree-layout{display:grid;grid-template-columns:370px minmax(0,1fr);gap:18px;align-items:start}.org-tree-panel,.org-node-detail{padding:20px}.org-tree-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.org-tree-head h3{margin:0;font-size:16px}.org-tree-head small{display:block;color:#929bac;margin-top:5px}.org-tree-head button{border:1px solid var(--line);background:#fff;border-radius:7px;padding:8px 10px;color:#657087;cursor:pointer}.org-tree-search input{width:100%;height:38px;border:1px solid var(--line);border-radius:7px;padding:0 12px;outline:0;margin-bottom:10px}.org-tree-list{max-height:680px;overflow:auto}.org-tree-row{width:100%;display:flex;align-items:center;gap:10px;border:0;border-bottom:1px solid #f0f2f6;background:#fff;text-align:left;padding:12px 9px;cursor:pointer}.org-tree-row:hover,.org-tree-row.selected{background:#f2f0ff}.org-tree-row.selected{box-shadow:inset 3px 0 var(--primary)}.org-tree-row.depth-1{padding-left:31px}.org-tree-row.depth-2{padding-left:53px}.org-toggle{width:14px;display:inline-block;color:#717b8f;font-size:19px;line-height:12px;transform:rotate(0);transition:.2s}.org-toggle.expanded{transform:rotate(90deg)}.org-toggle.leaf{visibility:hidden}.org-node-icon{width:29px;height:29px;border-radius:8px;background:#eef0ff;color:var(--primary);display:grid;place-items:center;font-size:16px;flex:none}.org-node-icon.chain{background:#eef8ff;color:#4b89e9}.org-node-icon.store{background:#eefaf5;color:#27a778}.org-tree-name strong,.org-tree-name small{display:block}.org-tree-name strong{font-size:13px}.org-tree-name small{font-size:11px;color:#929bac;margin-top:3px}.org-tree-row em{margin-left:auto;color:#a0a9b8;font-size:11px;font-style:normal}.org-detail-head{display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #eef0f5;padding-bottom:20px}.org-breadcrumb{display:flex;gap:9px;align-items:center;color:#929bac;font-size:12px;margin-bottom:12px}.org-breadcrumb b{font-weight:400;color:#c2c8d3}.org-detail-head h2{margin:0 0 6px;font-size:25px}.org-detail-head p{margin:0;color:#929bac;font-size:12px}.org-enabled{color:#26ad79;background:#ecfaf3;border-radius:20px;padding:7px 10px;font-size:11px}.org-detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:20px 0;border-bottom:1px solid #eef0f5}.org-detail-grid div{background:#f8f9fc;border-radius:9px;padding:14px}.org-detail-grid small,.org-detail-grid strong{display:block}.org-detail-grid small{font-size:11px;color:#929bac;margin-bottom:7px}.org-detail-grid strong{font-size:13px}.org-children{padding-top:20px}.org-children-title h3{margin:0;font-size:16px}.org-children-title span{display:block;color:#929bac;font-size:11px;margin-top:5px}.org-child-card{width:100%;display:flex;align-items:center;gap:12px;text-align:left;border:1px solid #edf0f5;background:#fff;border-radius:10px;padding:15px;margin-top:12px;cursor:pointer;transition:.2s}.org-child-card:hover{border-color:#b9b1ff;background:#faf9ff}.org-child-card strong,.org-child-card small{display:block}.org-child-card small{color:#929bac;font-size:11px;margin-top:4px}.org-child-arrow{margin-left:auto;color:var(--primary);font-size:11px}.org-no-children{text-align:center;color:#929bac;padding:45px 0}@media(max-width:850px){.org-tree-layout{grid-template-columns:1fr}.org-tree-list{max-height:360px}.org-detail-grid{grid-template-columns:1fr 1fr}}
.cf-change-history{margin-top:14px;border:1px solid #e7e9f1;border-radius:10px;overflow:hidden;background:#fff}.cf-change-history-title{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:#f8f9fc;border-bottom:1px solid #eceef4}.cf-change-history-title h4{margin:0;font-size:13px;color:var(--ink)}.cf-change-history-title span{font-size:11px;color:#929bac}.cf-change-history-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 14px;border-bottom:1px solid #f0f1f5}.cf-change-history-row:last-child{border-bottom:0}.cf-change-history-row>span{display:flex;flex-direction:column;gap:4px;min-width:0}.cf-change-history-row b{font-size:12px;color:#465268;overflow:hidden;text-overflow:ellipsis}.cf-change-history-row small,.cf-change-history-row time{font-size:11px;color:#929bac}.cf-change-history-row time{white-space:nowrap}.cf-change-history-empty{padding:18px;text-align:center;color:#9aa3b2;font-size:12px}
.cf-rule-note{margin-top:12px;padding:11px 13px;border-radius:8px;background:#f3f5ff;color:#5964a7;font-size:12px}.cf-rule-note.muted{background:#f8f9fc;color:#929bac}
.cf-formula-title .primary-btn{margin:0;padding:7px 10px;font-size:11px}.cf-modal-help{margin:-8px 0 14px;color:#929bac;font-size:12px}.cf-item-editor{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px;padding:10px 0;border-top:1px solid #eef0f5}.cf-item-editor label{margin:0}.cf-item-editor input{padding:8px 9px}.cf-formula-modal{width:min(620px,100%)}
.cf-ratio-editor-label{display:block;color:#6f788a;font-size:12px;margin:12px 0}.cf-ratio-editor{display:block;width:100%;margin-top:6px;border:1px solid var(--line);border-radius:7px;padding:10px;outline:0}
.cf-color-group{margin-bottom:14px}.cf-color-group-title{display:flex;justify-content:space-between;align-items:center;padding:10px 9px;background:#f5f6fb;border-radius:8px;color:#30394b}.cf-color-group-title strong{font-size:13px}.cf-color-group-title span{font-size:11px;color:#929bac}.cf-group-empty{text-align:center;color:#a0a8b7;font-size:12px;padding:14px 0;background:#fafbfc;border-radius:0 0 8px 8px}
.organization-tree-page .page-desc{display:none}
.organization-tree-page .org-data-status{display:none}
.staff-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:220px;border:1px dashed #dfe4ef;border-radius:10px;background:#fafbfe;color:#657087}.staff-empty strong{font-size:15px}.staff-empty span{margin-top:8px;color:#9aa4b4;font-size:12px}
.cf-formula-modal .cf-modal-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px}.cf-formula-modal .cf-modal-actions .primary-btn{order:1;margin:0;background:var(--primary);color:#fff;border:0;border-radius:7px;padding:10px 15px}.cf-formula-modal .cf-modal-actions button:first-child{order:2;border:0;background:var(--primary);color:#fff;border-radius:7px;padding:10px 15px;cursor:pointer}
.cf-formula-modal .cf-modal-actions button[data-cf-close]{order:2!important;background:#6355e8!important;border:0!important;color:#fff!important;border-radius:7px!important;padding:10px 15px!important;cursor:pointer}.cf-formula-modal .cf-modal-actions button[data-cf-close]:hover,.cf-formula-modal .cf-modal-actions button[data-cf-close]:focus,.cf-formula-modal .cf-modal-actions button[data-cf-close]:active{background:#6355e8!important;color:#fff!important}
.cf-board-options{grid-template-columns:repeat(3,1fr)}@media(max-width:600px){.cf-board-options{grid-template-columns:1fr}}
.cf-palette-filter{position:relative;display:flex;gap:6px;flex-wrap:wrap;margin:-4px 0 12px}.cf-palette-filter button{position:relative;z-index:1;border:1px solid #e0e4ed;background:#fff;border-radius:6px;padding:6px 9px;color:#69758a;font-size:11px;cursor:pointer}.cf-palette-filter button.active{border-color:transparent;background:#fff;color:#6355e8}.cf-palette-filter button:hover:not(.active){border-color:#c9c3ff;background:#fff;color:#6355e8}.cf-palette-filter::before{content:"";position:absolute;z-index:2;left:0;top:0;width:var(--cf-active-width,0px);height:var(--cf-active-height,0px);border:1px solid #9d92f4;border-radius:6px;pointer-events:none;opacity:0;transform:translate3d(var(--cf-active-left,0px),var(--cf-active-top,0px),0);will-change:transform,width,height;transition:transform .5s cubic-bezier(.16,1,.3,1),width .34s cubic-bezier(.22,.8,.25,1),height .34s cubic-bezier(.22,.8,.25,1),opacity .15s ease}.cf-palette-filter[data-indicator-ready="true"]::before{opacity:1}
.org-page-actions{display:flex;align-items:center;gap:12px}.org-page-actions .primary-btn{margin-left:0}.org-detail-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #eef0f5;margin-top:24px;padding-top:18px}.danger-outline-btn{border:1px solid #edb9c0;color:#c94b5a;background:#fff;border-radius:7px;padding:9px 13px;cursor:pointer}.org-info-preview{display:flex;gap:12px;align-items:stretch;padding:18px 0;border-bottom:1px solid #eef0f5}.org-info-preview div{flex:1;background:#f8f9fc;border-radius:9px;padding:12px}.org-info-preview small,.org-info-preview strong{display:block}.org-info-preview small{color:#929bac;font-size:11px;margin-bottom:6px}.org-info-preview strong{font-size:12px}.org-info-preview img{width:76px;height:76px;border-radius:8px;object-fit:cover}.org-modal-backdrop{position:fixed;inset:0;z-index:1000;background:rgba(24,34,53,.42);display:grid;place-items:center;padding:20px}.org-form-modal{width:min(560px,100%);max-height:min(760px,calc(100vh - 40px));overflow:auto;background:#fff;border-radius:14px;padding:22px;box-shadow:0 20px 60px rgba(24,34,53,.22)}.org-modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px}.org-modal-head h3{margin:0;font-size:18px}.org-modal-head p{margin:6px 0 0;color:#929bac;font-size:12px}.org-modal-head button{border:0;background:transparent;color:#8892a4;font-size:26px;line-height:1;cursor:pointer}.org-form-modal label{display:block;color:#526078;font-size:12px;margin:11px 0}.org-form-modal input,.org-form-modal select,.org-form-modal textarea{display:block;width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;padding:10px 11px;margin-top:6px;outline:0;background:#fff;color:var(--ink)}.org-form-modal input,.org-form-modal select{height:40px}.org-form-modal textarea{resize:vertical}.org-form-modal input:focus,.org-form-modal select:focus,.org-form-modal textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(99,85,232,.1)}.org-image-preview{display:block;width:76px;height:76px;margin-top:8px;border-radius:8px;object-fit:cover;background:#f5f6fa}.org-image-preview.empty{display:none}.org-modal-error{min-height:18px;color:#c94b5a;font-size:12px}.org-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}.org-modal-actions button{margin-left:0}.org-modal-actions .secondary-btn{border:1px solid var(--line);background:#fff;color:#657087;border-radius:7px;padding:9px 14px;cursor:pointer}
.org-form-modal label:has(input[type="file"]){display:none}
.org-form-modal label[data-store-agent-field][hidden],.org-form-modal label[data-store-chain-field][hidden]{display:none!important}
.org-form-modal label[data-store-agent-field] small{display:block;margin-top:5px;color:#929bac;font-size:11px;line-height:1.4}
.org-form-phone{display:grid;grid-template-columns:minmax(150px,.42fr) minmax(0,1fr);gap:8px;margin-top:6px}.org-form-phone>input{min-width:0;margin-top:0!important}.org-phone-region-picker{position:relative;min-width:0}.org-phone-region-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;height:40px;padding:0 11px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.org-phone-region-trigger:hover,.org-phone-region-picker[data-open="true"] .org-phone-region-trigger{border-color:var(--primary)}.org-phone-region-trigger span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.org-phone-region-trigger i{width:8px;height:8px;flex:none;border-right:2px solid #7d8798;border-bottom:2px solid #7d8798;transform:rotate(45deg) translateY(-2px)}.org-phone-region-menu{position:absolute;z-index:3;top:calc(100% + 5px);left:0;width:min(360px,calc(100vw - 80px));max-height:270px;padding:8px;border:1px solid #dfe3ec;border-radius:9px;background:#fff;box-shadow:0 14px 32px rgba(24,34,53,.16);display:none}.org-phone-region-picker[data-open="true"] .org-phone-region-menu{display:block}.org-phone-region-search{height:34px!important;margin:0 0 7px!important;padding:0 9px!important;font-size:12px!important}.org-phone-region-options{max-height:210px;overflow:auto}.org-phone-region-option{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:34px;padding:7px 9px;border:0;border-radius:6px;background:transparent;color:#526078;font:inherit;font-size:12px;text-align:left;cursor:pointer}.org-phone-region-option:hover{background:#f1efff;color:var(--primary)}.org-phone-region-option span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.org-phone-region-option b{flex:none;color:#8993a5;font-size:11px;font-weight:500}.org-phone-region-empty{margin:8px;color:#929bac;font-size:12px;text-align:center}
@media(max-width:520px){.org-form-phone{grid-template-columns:minmax(118px,.44fr) minmax(0,1fr);gap:6px}.org-phone-region-trigger{padding:0 8px}.org-phone-region-menu{width:min(310px,calc(100vw - 56px))}}

/* Store management: use a tighter organization tree so the detail panel gets
   more working room without changing the shared trees used elsewhere. */
.organization-tree-page .org-tree-layout{grid-template-columns:300px minmax(0,1fr);gap:14px}.organization-tree-page .org-tree-panel,.organization-tree-page .org-node-detail{padding:16px}.organization-tree-page .org-tree-head{margin-bottom:12px}.organization-tree-page .org-tree-head h3{font-size:15px}.organization-tree-page .org-tree-head button{padding:6px 8px;font-size:11px}.organization-tree-page .org-tree-search input{height:34px;margin-bottom:8px;padding:0 10px;font-size:12px}.organization-tree-page .org-tree-list{max-height:620px}.organization-tree-page .org-tree-row{gap:8px;padding:9px 7px}.organization-tree-page .org-tree-row.depth-1{padding-left:25px}.organization-tree-page .org-tree-row.depth-2{padding-left:43px}.organization-tree-page .org-toggle{width:12px;font-size:17px}.organization-tree-page .org-node-icon{width:26px;height:26px;border-radius:7px;font-size:14px}.organization-tree-page .org-tree-name strong{font-size:12px}.organization-tree-page .org-tree-name small{margin-top:2px;font-size:10px}.organization-tree-page .org-node-icon.headquarters{background:#e7efff;color:#3264c9}.organization-tree-page .org-tree-row em{font-size:10px}@media(max-width:850px){.organization-tree-page .org-tree-layout{grid-template-columns:1fr}.organization-tree-page .org-tree-list{max-height:360px}}

.organization-tree-page .org-detail-side{display:flex;flex:none;flex-direction:column;align-items:flex-end;gap:12px}.organization-tree-page .org-detail-side .primary-btn{margin:0;padding:9px 13px;font-size:12px}@media(max-width:600px){.organization-tree-page .org-detail-head{gap:12px}.organization-tree-page .org-detail-side{gap:8px}.organization-tree-page .org-detail-side .primary-btn{padding:8px 10px;font-size:11px}}

/* Floating interaction language for store management actions and the selected
   organization. The selected store keeps its identity after the pointer leaves. */
.organization-tree-page :is(.primary-btn,.secondary-btn,.danger-outline-btn,.org-tree-head button),.organization-tree-page .org-child-card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background-color .18s ease}.organization-tree-page :is(.primary-btn,.secondary-btn,.danger-outline-btn,.org-tree-head button):hover,.organization-tree-page :is(.primary-btn,.secondary-btn,.danger-outline-btn,.org-tree-head button):focus-visible,.organization-tree-page .org-child-card:hover,.organization-tree-page .org-child-card:focus-visible{transform:translateY(-2px);box-shadow:0 8px 18px rgba(43,54,83,.16)}.organization-tree-page .org-tree-row{position:relative;margin:3px 0;border:1px solid transparent;border-radius:8px;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background-color .18s ease}.organization-tree-page .org-tree-row:hover{transform:translateY(-1px);border-color:#ded9ff;box-shadow:0 5px 13px rgba(45,55,87,.09)}.organization-tree-page .org-tree-row.selected{z-index:1;transform:translateY(-1px);border-color:#d7d2fb;background:#f6f5ff;box-shadow:0 9px 20px rgba(89,77,203,.14)}.organization-tree-page .org-tree-row.selected .org-tree-name strong{color:#5146c8}.organization-tree-page .org-tree-row:focus-visible{outline:3px solid rgba(99,85,232,.22);outline-offset:2px}@media(prefers-reduced-motion:reduce){.organization-tree-page :is(.primary-btn,.secondary-btn,.danger-outline-btn,.org-tree-head button,.org-child-card,.org-tree-row){transition:none}}

/* Dashboard v2 — balanced operations layout based on the approved high-fidelity direction. */
body[data-active-page="dashboard"]{background:#f7f9fd}
body[data-active-page="dashboard"] .topbar{height:70px;padding:0 28px;box-shadow:0 1px 0 rgba(29,43,75,.04)}
body[data-active-page="dashboard"] .topbar-title{display:flex;align-items:baseline;gap:14px}
body[data-active-page="dashboard"] .topbar-title h1{order:1;font-size:24px;letter-spacing:-.5px}
body[data-active-page="dashboard"] .topbar-title .crumb{order:2;margin:0;color:#8490a6;font-size:13px}
body[data-active-page="dashboard"] .topbar-title .crumb-prefix{display:none}
body[data-active-page="dashboard"] .topbar-title .crumb span:last-child{color:#8490a6}
body[data-active-page="dashboard"] .search{width:285px;height:36px}
body[data-active-page="dashboard"] .main-content{display:flex;min-height:100vh;flex-direction:column}
body[data-active-page="dashboard"] #page-content{display:flex;min-height:0;flex:1}
body[data-active-page="dashboard"] .page{width:100%;padding:14px clamp(18px,1.55vw,34px) 24px}
.dashboard-v2{display:flex;width:100%;max-width:none;min-height:calc(100vh - 108px);margin:0;color:#152038;flex-direction:column}
.dashboard-toolbar{min-height:36px;display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.dashboard-toolbar-actions{display:flex;align-items:center;gap:10px;margin-left:auto}
.dashboard-period,.dashboard-refresh{height:36px;border:1px solid #e1e7f0;border-radius:8px;background:#fff;color:#65738a;padding:0 13px;font:inherit;font-size:12px;cursor:pointer;box-shadow:0 2px 7px rgba(44,62,94,.03)}
.dashboard-period span{margin-left:14px;color:#9da7b7}.dashboard-refresh span{margin-right:6px;font-size:17px;vertical-align:-1px}
.data-status{display:inline-flex;align-items:center;gap:7px;color:#8490a3;font-size:11px}.data-status i{width:7px;height:7px;border-radius:50%;background:#95a1b3;box-shadow:0 0 0 3px #edf0f5}.data-status.loading i{background:#6572e8;box-shadow:0 0 0 3px #eeefff;animation:dashboard-pulse 1.2s infinite}.data-status.success i{background:#2bb983;box-shadow:0 0 0 3px #e9f9f2}.data-status.error{color:#c8535a}.data-status.error i{background:#ef5c61;box-shadow:0 0 0 3px #ffeded}@keyframes dashboard-pulse{50%{opacity:.35}}
.dashboard-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;margin-bottom:14px}
.dashboard-kpi{height:108px;padding:18px;display:flex;align-items:center;gap:14px;border-color:#e5eaf2;box-shadow:0 4px 14px rgba(28,47,82,.035);overflow:hidden}
.dashboard-kpi.is-loading{background:linear-gradient(100deg,#fff 30%,#f5f7fb 50%,#fff 70%);background-size:220% 100%;animation:dashboard-shimmer 1.4s infinite}@keyframes dashboard-shimmer{to{background-position:-220% 0}}
.dashboard-kpi-icon{width:43px;height:43px;flex:0 0 43px;border-radius:50%;display:grid;place-items:center;background:#eeefff;color:#6a5cf2}
.dashboard-kpi-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.dashboard-kpi:nth-child(2) .dashboard-kpi-icon{background:#eaf3ff;color:#4e83ee}.dashboard-kpi:nth-child(3) .dashboard-kpi-icon{background:#e9f8f3;color:#28ad7d}.dashboard-kpi:nth-child(4) .dashboard-kpi-icon{background:#fff1ed;color:#ff715d}.dashboard-kpi:nth-child(5) .dashboard-kpi-icon{background:#eaf8f5;color:#31aa88}.dashboard-kpi:nth-child(6) .dashboard-kpi-icon{background:#fff0ef;color:#ff5d61}
.dashboard-kpi-copy{min-width:0}.dashboard-kpi-copy>span{display:block;color:#718097;font-size:12px;white-space:nowrap}.dashboard-kpi-copy strong{display:block;margin:5px 0 4px;font-size:25px;line-height:1;color:#101b34;letter-spacing:-.4px}.dashboard-kpi-copy small{display:block;color:#8d98a9;font-size:10px;white-space:nowrap}.dashboard-kpi-copy small span{color:#9aa4b4}.dashboard-kpi-copy small b{font-weight:600;margin-left:3px}.dashboard-kpi-copy small .up{color:#2bb983}.dashboard-kpi-copy small .down{color:#ef5d61}.dashboard-kpi.attention{border-color:#ffe7dc}.dashboard-kpi.danger{border-color:#ffe1e2}
.dashboard-hero-grid{display:grid;min-height:390px;flex:1;grid-template-columns:minmax(0,1.68fr) minmax(360px,.92fr);gap:14px;margin-bottom:14px;align-items:stretch}
.dashboard-map-card,.dashboard-summary-card,.dashboard-todo-card,.dashboard-chart-card,.dashboard-case-card,.dashboard-health-card,.dashboard-device-card{border-color:#e3e9f1;box-shadow:0 4px 16px rgba(29,47,80,.035)}
.dashboard-map-card{display:flex;padding:15px 16px 12px;min-width:0;flex-direction:column}.dashboard-side-stack{display:grid;grid-template-rows:1fr 1fr;gap:14px;min-width:0}.dashboard-summary-card,.dashboard-todo-card{height:100%;padding:15px 16px;min-width:0}
.dashboard-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.dashboard-card-head h2{margin:0;color:#162139;font-size:15px;line-height:1.25}.dashboard-card-head p{margin:5px 0 0;color:#9aa5b5;font-size:10px}.dashboard-card-head>button{border:0;background:transparent;color:#78869b;font-size:20px;line-height:14px;cursor:pointer;padding:0 2px}.map-data-badge{border:1px solid #dfe6f1;background:#f8faff;color:#71809a;border-radius:20px;padding:5px 9px;font-size:10px;white-space:nowrap}
.dashboard-map-filters{display:flex;align-items:center;gap:5px;margin-top:10px;overflow-x:auto;scrollbar-width:none}.dashboard-map-filters::-webkit-scrollbar{display:none}.dashboard-map-filters button{display:flex;height:28px;flex:none;align-items:center;gap:5px;border:1px solid #e1e7f0;border-radius:7px;background:#fff;padding:0 8px;color:#748197;font:inherit;font-size:9px;cursor:pointer}.dashboard-map-filters button:hover,.dashboard-map-filters button:focus,.dashboard-map-filters button.selected{border-color:#c9c5f8;background:#f5f3ff;color:#5e55d7;outline:0}.dashboard-map-filters button span{display:grid;min-width:17px;height:17px;place-items:center;border-radius:9px;background:#f1f3f7;color:#78869a;font-size:8px}.dashboard-map-filters button.selected span{background:#e7e3ff;color:#5e55d7}.dashboard-map-filters button>i{width:6px;height:6px;border-radius:50%}.dashboard-map-filters i.live{background:#32b585}.dashboard-map-filters i.stale{background:#ed9c31}.dashboard-map-filters i.offline{background:#95a0af}
.dashboard-map-workspace{display:grid;min-height:0;flex:1;grid-template-columns:minmax(0,1fr);gap:10px;margin-top:9px}.dashboard-map-stage{--map-scale:1;position:relative;height:100%;min-height:316px;overflow:hidden;border:1px solid #e4e9f1;border-radius:9px;background:linear-gradient(180deg,#fbfdff,#f6faff);isolation:isolate}.dashboard-map-canvas{position:absolute;inset:0;transform:scale(var(--map-scale));transition:transform .25s ease}.dashboard-world-svg{width:100%;height:100%;display:block}.dashboard-map-pins{position:absolute;inset:0;pointer-events:none}.map-grid path{stroke:#edf2f9;stroke-width:1;fill:none}.map-land path{fill:#eaf2fe;stroke:#d5e3f6;stroke-width:1.2;vector-effect:non-scaling-stroke}.map-land path:hover{fill:#e3edfd}
.map-pin{position:absolute;width:24px;height:24px;border:0;border-radius:50% 50% 50% 0;transform:translate(-50%,-100%) rotate(-45deg);cursor:pointer;pointer-events:auto;box-shadow:0 7px 16px rgba(31,79,168,.26);transition:filter .18s,scale .18s}.map-pin:before{content:"";position:absolute;inset:-6px;border-radius:50%;background:#3478f51f;animation:map-pin-pulse 2.4s ease-out infinite;z-index:-1}.map-pin i{position:absolute;inset:7px;border-radius:50%;background:#fff}.map-pin:hover,.map-pin.selected{scale:1.16;filter:saturate(1.2)}.map-pin.actual{background:linear-gradient(135deg,#39b8de,#3266df)}.map-pin.selected{box-shadow:0 8px 20px rgba(47,92,211,.34)}@keyframes map-pin-pulse{0%{scale:.7;opacity:.75}70%,100%{scale:1.8;opacity:0}}
.map-zoom{position:absolute;left:10px;bottom:14px;width:31px;border:1px solid #dce5f0;border-radius:7px;overflow:hidden;background:#fff;box-shadow:0 4px 12px rgba(40,61,98,.07)}.map-zoom button{width:100%;height:29px;border:0;background:#fff;color:#62728c;font-size:18px;cursor:pointer}.map-zoom button+button{border-top:1px solid #e6ebf2}.map-zoom button:hover{background:#f4f6ff;color:#5f55df}
.map-legend{position:absolute;right:10px;bottom:14px;display:flex;align-items:center;gap:10px;border:1px solid #e2e8f1;background:rgba(255,255,255,.92);border-radius:7px;padding:7px 9px;color:#67758c;font-size:9px;box-shadow:0 4px 12px rgba(40,61,98,.05)}.map-legend span{display:flex;align-items:center;gap:4px}.map-legend i{width:7px;height:7px;border-radius:50%}.map-legend i.violet{background:#7252db}.map-legend i.cyan{background:#34add7}.map-legend small{color:#a3adbc}.map-notice{height:21px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:6px;color:#9aa5b5;font-size:9px}
.dashboard-map-fallback{z-index:0}.dashboard-leaflet-map{position:absolute;inset:0;z-index:1;background:radial-gradient(circle at 58% 40%,#fbfdff 0,#f4f8fe 62%,#edf4fc 100%);font-family:inherit}.dashboard-map-stage>.map-legend{z-index:500;top:12px;bottom:auto;backdrop-filter:blur(8px)}.dashboard-map-loading{position:absolute;left:50%;top:50%;z-index:700;display:flex;align-items:center;gap:8px;transform:translate(-50%,-50%);border:1px solid #e0e7f2;border-radius:22px;background:rgba(255,255,255,.94);box-shadow:0 8px 28px rgba(31,52,89,.11);padding:8px 13px;color:#718099;font-size:10px}.dashboard-map-loading[hidden]{display:none}.dashboard-map-loading i{width:12px;height:12px;border:2px solid #d9e3f5;border-top-color:#5d66e8;border-radius:50%;animation:dashboard-map-spin .8s linear infinite}@keyframes dashboard-map-spin{to{transform:rotate(360deg)}}
.dashboard-map-tools{position:absolute;left:12px;top:82px;z-index:500;display:grid;overflow:hidden;border:1px solid #dae3ef;border-radius:8px;background:rgba(255,255,255,.96);box-shadow:0 7px 18px rgba(32,54,91,.09)}.dashboard-map-tools button{width:30px;height:30px;border:0;border-top:1px solid #e7ecf3;background:transparent;color:#65758d;font:inherit;font-size:15px;cursor:pointer}.dashboard-map-tools button:first-child{border-top:0}.dashboard-map-tools button:hover,.dashboard-map-tools button:focus{background:#f3f4ff;color:#5f55df;outline:0}.dashboard-map-stage:fullscreen{width:100vw;height:100vh;border:0;border-radius:0}.dashboard-map-stage:fullscreen .dashboard-map-tools{top:86px}
.dashboard-map-account-stat{position:absolute;left:12px;bottom:12px;z-index:500;min-width:104px;border:1px solid rgba(221,228,239,.95);border-radius:9px;background:rgba(255,255,255,.93);box-shadow:0 7px 20px rgba(30,52,88,.1);padding:9px 11px;backdrop-filter:blur(9px)}.dashboard-map-account-stat span,.dashboard-map-account-stat small{display:block}.dashboard-map-account-stat span{color:#718097;font-size:8px}.dashboard-map-account-stat strong{display:block;margin:3px 0;color:#17233b;font-size:23px;line-height:1}.dashboard-map-account-stat small{color:#9aa5b4;font-size:7px}.dashboard-map-stage:fullscreen .dashboard-map-account-stat{left:20px;bottom:20px;min-width:138px;padding:13px 15px}.dashboard-map-stage:fullscreen .dashboard-map-account-stat strong{font-size:30px}
.dashboard-map-device-panel{height:100%;min-height:316px;box-sizing:border-box;overflow:hidden;border:1px solid #e4e9f1;border-radius:9px;background:#fbfcfe}.dashboard-map-device-panel>div:first-child{display:flex;height:42px;box-sizing:border-box;align-items:center;justify-content:space-between;border-bottom:1px solid #e8edf4;padding:0 11px}.dashboard-map-device-panel>div:first-child strong{color:#27334a;font-size:10px}.dashboard-map-device-panel>div:first-child span{color:#98a3b3;font-size:8px}.dashboard-map-device-list{height:calc(100% - 42px);overflow:auto;padding:5px}.dashboard-map-device-list>p{display:grid;min-height:100px;place-items:center;margin:0;padding:12px;color:#98a3b3;text-align:center;font-size:9px;line-height:1.6}.map-device-list-item{display:grid;width:100%;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:7px;border:0;border-radius:7px;background:transparent;padding:9px 7px;color:#6f7c91;text-align:left;cursor:pointer}.map-device-list-item:hover,.map-device-list-item:focus,.map-device-list-item.selected{background:#f0f2ff;outline:0}.map-device-list-item>i{width:7px;height:7px;border-radius:50%;background:#32b585;box-shadow:0 0 0 3px rgba(50,181,133,.1)}.map-device-list-item.stale>i{background:#ed9c31;box-shadow:0 0 0 3px rgba(237,156,49,.1)}.map-device-list-item.offline>i{background:#95a0af;box-shadow:0 0 0 3px rgba(149,160,175,.11)}.map-device-list-item span{min-width:0}.map-device-list-item strong,.map-device-list-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.map-device-list-item strong{color:#344157;font-size:9px}.map-device-list-item small{margin-top:4px;color:#96a1b1;font-size:8px}.map-device-list-item em{color:#8d98a9;font-size:8px;font-style:normal;white-space:nowrap}.map-device-list-item.live em{color:#259f73}.map-device-list-item.stale em{color:#d98720}
.dashboard-leaflet-map.leaflet-container{outline:0}.dashboard-leaflet-map .leaflet-control-zoom{margin:12px 0 0 12px;border:1px solid #dae3ef;border-radius:8px;overflow:hidden;box-shadow:0 7px 18px rgba(32,54,91,.09)}.dashboard-leaflet-map .leaflet-control-zoom a{width:30px;height:29px;line-height:28px;border:0;border-bottom:1px solid #e7ecf3;background:rgba(255,255,255,.96);color:#65758d;font-family:inherit;font-size:18px}.dashboard-leaflet-map .leaflet-control-zoom a:last-child{border-bottom:0}.dashboard-leaflet-map .leaflet-control-zoom a:hover,.dashboard-leaflet-map .leaflet-control-zoom a:focus{background:#f3f4ff;color:#5f55df}.dashboard-leaflet-map .leaflet-control-attribution{border-radius:5px 0 0 0;background:rgba(255,255,255,.82);padding:2px 5px;color:#97a3b3;font-size:8px}.dashboard-leaflet-map .leaflet-control-attribution a{color:#77879d}.dashboard-leaflet-map .leaflet-pane svg{filter:drop-shadow(0 2px 5px rgba(46,79,125,.025))}
.leaflet-device-marker{border:0;background:transparent}.leaflet-device-marker .device-marker-core{position:absolute;left:3px;top:2px;width:22px;height:22px;border:2px solid rgba(255,255,255,.94);border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:linear-gradient(135deg,#39b8de,#3266df);box-shadow:0 7px 17px rgba(31,79,168,.3);transition:scale .18s,filter .18s}.leaflet-device-marker .device-marker-core:after{content:"";position:absolute;left:6px;top:6px;width:6px;height:6px;border-radius:50%;background:#fff;box-shadow:0 0 0 2px rgba(255,255,255,.22)}.leaflet-device-marker .device-marker-pulse{position:absolute;left:5px;top:4px;width:18px;height:18px;border-radius:50%;background:rgba(52,120,245,.18);animation:leaflet-device-pulse 2.4s ease-out infinite}.leaflet-device-marker.stale .device-marker-core{background:linear-gradient(135deg,#f3b13f,#e88929)}.leaflet-device-marker.stale .device-marker-pulse{background:rgba(238,153,45,.2)}.leaflet-device-marker.offline .device-marker-core{background:linear-gradient(135deg,#aeb8c6,#7e8a9c)}.leaflet-device-marker.offline .device-marker-pulse{display:none}.leaflet-device-marker:hover .device-marker-core,.leaflet-device-marker.selected .device-marker-core,.leaflet-device-marker:focus .device-marker-core{scale:1.14;filter:saturate(1.18)}.leaflet-device-marker:focus{outline:3px solid rgba(91,84,226,.28);outline-offset:3px;border-radius:12px}@keyframes leaflet-device-pulse{0%{scale:.65;opacity:.8}70%,100%{scale:2.15;opacity:0}}
.dashboard-leaflet-map .leaflet-popup-content-wrapper{border:1px solid #e1e7f0;border-radius:11px;box-shadow:0 16px 42px rgba(24,43,77,.18)}.dashboard-leaflet-map .leaflet-popup-content{margin:14px 15px 13px;font-family:inherit}.dashboard-leaflet-map .leaflet-popup-tip{box-shadow:3px 3px 8px rgba(24,43,77,.08)}.map-device-popup-head{display:flex;align-items:flex-start;gap:9px}.map-device-popup-head>div{min-width:0}.map-device-popup-head strong{display:block;color:#152039;font-size:12px;line-height:1.3}.map-device-popup-head small{display:block;margin-top:3px;color:#8b97a9;font-size:9px}.map-device-status{width:8px;height:8px;flex:0 0 8px;margin-top:3px;border-radius:50%;background:#32b585;box-shadow:0 0 0 4px rgba(50,181,133,.12)}.map-device-status.stale{background:#ed9c31;box-shadow:0 0 0 4px rgba(237,156,49,.12)}.map-device-status.offline{background:#95a0af;box-shadow:0 0 0 4px rgba(149,160,175,.13)}.map-device-popup p{margin:10px 0!important;padding:8px 9px;border-radius:7px;background:#f7f9fd;color:#59677d;font-size:9px;line-height:1.55}.map-device-popup dl{margin:0}.map-device-popup dl>div{display:flex;justify-content:space-between;gap:12px;padding:4px 0;color:#7c899c;font-size:9px}.map-device-popup dt,.map-device-popup dd{margin:0}.map-device-popup dd{color:#3d4a61;text-align:right}.map-popup-link{width:100%;height:30px;margin-top:8px;border:1px solid #d9d6fb;border-radius:7px;background:#f5f3ff;color:#5f55df;font:inherit;font-size:9px;cursor:pointer}.map-popup-link:hover,.map-popup-link:focus{border-color:#bcb5f7;background:#eeebff;outline:0}
@media(prefers-reduced-motion:reduce){.dashboard-map-loading i,.leaflet-device-marker .device-marker-pulse,.map-pin:before{animation:none}.dashboard-map-canvas,.leaflet-device-marker .device-marker-core{transition:none}}
.daily-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin-top:15px}.daily-summary-item{min-width:0;display:flex;gap:8px;align-items:flex-start;padding:2px 9px;border-left:1px solid #edf0f5}.daily-summary-item:first-child{border-left:0;padding-left:0}.daily-summary-item>div{width:28px;height:28px;flex:0 0 28px;display:grid;place-items:center;border-radius:50%;background:color-mix(in srgb,var(--summary-color) 10%,white);color:var(--summary-color)}.daily-summary-item svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.daily-summary-item span{min-width:0;color:#7d899d;font-size:10px;white-space:nowrap}.daily-summary-item strong{display:block;margin-top:4px;color:#142039;font-size:18px}.daily-summary-item small{display:block;margin-top:4px;color:#a2acba;font-size:8px}.summary-loading{grid-column:1/-1;min-height:80px;display:grid;place-items:center;color:#98a3b4;font-size:11px}
.dashboard-todo-list{margin-top:12px;border:1px solid #e8edf4;border-radius:8px;overflow:hidden}.dashboard-todo-row{width:100%;height:42px;display:grid;grid-template-columns:18px 1fr 30px 62px;align-items:center;gap:7px;border:0;border-top:1px solid #edf0f5;background:#fff;padding:0 10px;color:#536078;text-align:left;cursor:pointer}.dashboard-todo-row:first-child{border-top:0}.dashboard-todo-row:hover{background:#fafbff}.dashboard-todo-row>i{width:15px;height:15px;border-radius:50%;background:#fff0ef;box-shadow:inset 0 0 0 4px #ef6260}.dashboard-todo-row.warning>i{background:#fff6e6;box-shadow:inset 0 0 0 4px #f0a333}.dashboard-todo-row.success>i{background:#e9f8f1;box-shadow:inset 0 0 0 4px #2db57f}.dashboard-todo-row span{font-size:11px}.dashboard-todo-row b{text-align:center;font-size:11px;color:#fff;background:#ef6260;border-radius:12px;padding:2px 6px}.dashboard-todo-row.warning b{background:#f0a333}.dashboard-todo-row.success b{background:#2db57f}.dashboard-todo-row em{text-align:right;color:#8b97a8;font-size:9px;font-style:normal}
.dashboard-analytics-grid{display:grid;grid-template-columns:minmax(0,2.15fr) minmax(260px,.9fr) minmax(260px,.9fr);gap:14px;margin-bottom:14px}.dashboard-chart-card,.dashboard-case-card,.dashboard-health-card{height:clamp(244px,25vh,310px);padding:15px 16px;min-width:0}.dashboard-chart-controls{display:flex;align-items:center;gap:12px;color:#7f8b9e;font-size:9px}.dashboard-chart-controls>span{white-space:nowrap}.dashboard-chart-controls i{display:inline-block;width:17px;border-top:2px solid #4966e9;vertical-align:middle;margin-right:4px}.dashboard-chart-controls i.dashed{border-top-color:#28b7d4;border-top-style:dashed}.dashboard-range{display:flex;margin-left:4px}.dashboard-range button{height:27px;border:1px solid #e0e6ef;background:#fff;color:#8792a4;padding:0 8px;font-size:9px;cursor:pointer}.dashboard-range button:first-child{border-radius:6px 0 0 6px}.dashboard-range button:last-child{border-radius:0 6px 6px 0}.dashboard-range button+button{margin-left:-1px}.dashboard-range button.selected{position:relative;background:#f1efff;border-color:#b8b0f7;color:#5f54dd}.dashboard-trend-chart{height:calc(100% - 38px);min-height:185px;margin-top:10px}.dashboard-trend-chart svg{width:100%;height:100%;overflow:visible}.dashboard-trend-chart line{stroke:#edf0f5;stroke-width:1}.dashboard-trend-chart text{fill:#8c97aa;font-size:9px}.dashboard-trend-chart .customer-line,.dashboard-trend-chart .formula-line{fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}.dashboard-trend-chart .customer-line{stroke:#4f61ea;stroke-width:2.2}.dashboard-trend-chart .formula-line{stroke:#27b7d5;stroke-width:2;stroke-dasharray:5 5}
.dashboard-case-body{height:calc(100% - 27px);min-height:190px;display:flex;align-items:center;justify-content:center;gap:20px}.dashboard-donut{width:118px;height:118px;flex:0 0 118px;border-radius:50%;display:grid;place-items:center}.dashboard-donut>span{width:71px;height:71px;border-radius:50%;background:#fff;display:grid;place-content:center;text-align:center;color:#8b96a7;font-size:9px}.dashboard-donut strong{display:block;margin-top:3px;color:#152038;font-size:19px}.dashboard-case-legend{min-width:112px;margin:0;padding:0;list-style:none}.dashboard-case-legend li{display:grid;grid-template-columns:8px 1fr auto auto;align-items:center;gap:6px;margin:10px 0;color:#748095;font-size:9px}.dashboard-case-legend li i{width:7px;height:7px;border-radius:50%}.dashboard-case-legend li b{color:#4d5a70;font-size:10px}.dashboard-case-legend li em{color:#9ba5b4;font-style:normal}
.dashboard-health-body{height:calc(100% - 27px);min-height:190px;display:flex;flex-direction:column;align-items:center;justify-content:center}.health-gauge{width:165px;height:82px;position:relative;overflow:hidden}.health-gauge:before,.health-gauge:after{content:"";position:absolute;left:0;top:0;width:165px;height:165px;border-radius:50%}.health-gauge:before{background:conic-gradient(from 270deg,#35b77f 0 115deg,#f1aa35 115deg 155deg,#ef5d61 155deg 180deg,transparent 180deg)}.health-gauge:after{inset:18px;width:129px;height:129px;background:#fff}.health-gauge>div{position:absolute;z-index:2;left:0;right:0;bottom:0;text-align:center}.health-gauge strong{display:block;font-size:29px;line-height:1;color:#142038}.health-gauge span{color:#8490a4;font-size:9px}.health-legend{display:flex;gap:16px;margin-top:18px;color:#7e899b;font-size:9px}.health-legend span{display:grid;grid-template-columns:7px auto;gap:3px 5px;align-items:center;text-align:center}.health-legend i{width:7px;height:7px;border-radius:50%}.health-legend i.healthy{background:#35b77f}.health-legend i.warning{background:#f1aa35}.health-legend i.critical{background:#ef5d61}.health-legend b{grid-column:1/-1;color:#28344a;font-size:12px}
.dashboard-device-card{padding:15px 16px}.dashboard-device-card .dashboard-card-head{align-items:center;margin-bottom:12px}.dashboard-device-card .dashboard-card-head>a{margin-left:auto}.dashboard-device-table{min-width:920px}.dashboard-device-table th{background:#fafbfe;padding:9px 10px;font-size:10px}.dashboard-device-table td{padding:10px;font-size:10px}.dashboard-device-table tr:last-child td{border-bottom:0}.device-state{display:inline-flex;align-items:center;gap:5px;border-radius:5px;padding:4px 7px;font-size:9px}.device-state i{width:6px;height:6px;border-radius:50%}.device-state.online{background:#eaf8f2;color:#239d72}.device-state.online i{background:#2ab47f}.device-state.offline{background:#f2f3f6;color:#7c8799}.device-state.offline i{background:#9ba4b2}.device-health{border-radius:5px;padding:4px 8px;font-size:9px}.device-health.good{background:#e9f8f1;color:#289f76}.device-health.warn{background:#fff5e3;color:#d99124}.dashboard-empty{grid-column:1/-1;min-height:108px;display:grid;place-content:center;text-align:center}.dashboard-empty strong{font-size:14px}.dashboard-empty span{margin-top:7px;color:#909bad;font-size:11px}
@media(max-width:1450px){.dashboard-kpi{padding:15px 12px;gap:10px}.dashboard-kpi-icon{width:38px;height:38px;flex-basis:38px}.dashboard-kpi-copy strong{font-size:23px}.daily-summary-item{padding:2px 5px}.dashboard-hero-grid{grid-template-columns:minmax(0,1.45fr) minmax(330px,1fr)}.dashboard-map-workspace{grid-template-columns:minmax(0,1fr) 185px}}
@media(max-width:1200px){.dashboard-kpi-grid{grid-template-columns:repeat(3,1fr)}.dashboard-hero-grid{grid-template-columns:1fr}.dashboard-side-stack{grid-template-columns:1fr 1fr;grid-template-rows:auto}.dashboard-analytics-grid{grid-template-columns:1.5fr 1fr}.dashboard-health-card{grid-column:1/-1}.dashboard-health-body{flex-direction:row;gap:28px}.dashboard-health-card{height:180px}.dashboard-health-body{height:125px}.dashboard-map-workspace{grid-template-columns:minmax(0,1fr) 230px}.dashboard-map-stage,.dashboard-map-device-panel{height:340px}}
@media(max-width:850px){body[data-active-page="dashboard"] .topbar-title{display:block}body[data-active-page="dashboard"] .topbar-title .crumb{margin-top:3px}.dashboard-kpi-grid{grid-template-columns:repeat(2,1fr)}.dashboard-side-stack,.dashboard-analytics-grid{display:block}.dashboard-summary-card,.dashboard-todo-card,.dashboard-chart-card,.dashboard-case-card,.dashboard-health-card{margin-bottom:12px}.dashboard-chart-card,.dashboard-case-card{height:auto;min-height:240px}.dashboard-map-workspace{display:block}.dashboard-map-stage{height:300px}.dashboard-map-device-panel{height:150px;margin-top:8px}.dashboard-map-device-list{display:flex;height:calc(100% - 42px);gap:5px;overflow-x:auto;overflow-y:hidden}.map-device-list-item{min-width:210px}.daily-summary-grid{grid-template-columns:repeat(2,1fr);row-gap:16px}.daily-summary-item:nth-child(3){border-left:0}.dashboard-toolbar{align-items:flex-end}.data-status{max-width:130px}.map-data-badge{display:none}}
@media(max-width:600px){body[data-active-page="dashboard"] .page{padding:12px}.dashboard-kpi{height:92px}.dashboard-kpi-icon{display:none}.dashboard-kpi-copy strong{font-size:22px}.dashboard-toolbar .dashboard-period{display:none}.dashboard-map-stage{height:260px}.dashboard-map-device-panel{display:none}.map-pin{width:20px;height:20px}.map-legend{max-width:150px}.map-legend span{display:none}.dashboard-map-account-stat{left:9px;bottom:9px;padding:7px 9px}.dashboard-map-account-stat strong{font-size:19px}.dashboard-case-body{gap:10px}.dashboard-device-card{padding:13px}.dashboard-chart-controls>span{display:none}}
@media(min-width:851px){
  .dashboard-analytics-grid{min-height:270px;flex:1}
  .dashboard-chart-card,.dashboard-case-card,.dashboard-health-card{height:100%;min-height:270px}
  .dashboard-trend-chart{min-height:205px}
  .dashboard-map-workspace{display:flex;align-items:flex-start;justify-content:center}
  .dashboard-map-stage{width:100%;height:auto;min-height:0;aspect-ratio:16 / 9;flex:0 0 auto}
}

/* Color library server-side pagination controls. */
.cf-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:12px;color:#929bac;font-size:11px}.cf-pagination button{border:1px solid var(--line);background:transparent;color:var(--ink);border-radius:6px;padding:6px 9px;cursor:pointer}.cf-pagination button:disabled{opacity:.45;cursor:not-allowed}.cf-pagination b{font-weight:600;color:var(--primary);white-space:nowrap}
.color-formula-page .cf-color-row{position:relative;border:1px solid transparent;border-bottom-color:#eef0f5;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}.color-formula-page .cf-color-row:hover{border-color:rgba(126,108,255,.28);box-shadow:0 3px 12px rgba(91,73,190,.08)}.color-formula-page .cf-color-row.selected{border-color:rgba(126,108,255,.62);background:transparent;box-shadow:inset 3px 0 var(--primary),0 0 0 2px rgba(126,108,255,.12)}
@media(min-width:1050px){
  .dashboard-hero-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .dashboard-map-stage{aspect-ratio:16 / 9}
}

/* Dashboard surface refresh: rounded light-grey cards with soft inset depth. */
.dashboard-v2 .card{border:1px solid #e0e3e8;border-radius:30px;background:#eef0f3;box-shadow:rgba(183,183,206,.26) 0 30px 50px -12px inset,rgba(0,0,0,.16) 0 18px 26px -18px inset,0 5px 16px rgba(33,47,73,.045)}
.dashboard-v2 .dashboard-kpi{min-height:108px;height:auto;padding:20px 22px}
.dashboard-v2 .dashboard-map-card{padding:18px 18px 14px}
.dashboard-v2 .dashboard-summary-card,.dashboard-v2 .dashboard-todo-card,.dashboard-v2 .dashboard-chart-card,.dashboard-v2 .dashboard-case-card,.dashboard-v2 .dashboard-health-card{padding:18px 19px}
.dashboard-v2 .dashboard-map-stage,.dashboard-v2 .dashboard-map-device-panel{border-radius:24px;border-color:#dfe4ea;box-shadow:rgba(183,183,206,.2) 0 22px 36px -16px inset,rgba(0,0,0,.12) 0 16px 22px -18px inset}
.dashboard-v2 .dashboard-map-device-panel{background:#eef0f3}
.dashboard-v2 .dashboard-map-device-panel>div:first-child{border-bottom-color:#dfe3e8}
.dashboard-v2 .dashboard-todo-list{border-color:#dfe3e8;border-radius:16px;background:#f6f7f8}
.dashboard-v2 .dashboard-todo-row{background:transparent;border-top-color:#e1e4e8}
.dashboard-v2 .dashboard-todo-row:hover{background:#e8ebef}

/* Magic Bento visual language, adapted to white enterprise surfaces. */
.dashboard-v2 .card{position:relative;isolation:isolate;overflow:hidden;border:1px solid #e8e6f8;border-radius:24px;background:#fff;box-shadow:0 24px 50px -20px rgba(31,39,70,.22),0 8px 20px rgba(31,39,70,.06);transition:border-color .24s ease,box-shadow .24s ease,transform .24s ease;will-change:transform}
.dashboard-v2 .card::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;background:radial-gradient(320px circle at var(--glow-x,50%) var(--glow-y,50%),rgba(132,0,255,.1),transparent 64%);opacity:0;transition:opacity .24s ease}
.dashboard-v2 .card:hover,.dashboard-v2 .card:focus-within{z-index:8;transform:translateY(-6px);border-color:#b9adff;box-shadow:0 34px 64px -22px rgba(88,63,170,.34),0 15px 30px rgba(31,39,70,.14)}
.dashboard-v2 .card:hover::before{opacity:1}
.dashboard-v2 .dashboard-kpi{background:#fff}
.dashboard-v2 .dashboard-map-device-panel{background:#fff}

body[data-active-page="dashboard"][data-theme="dark"]{background:#080b12;color:#edf1fb}
body[data-active-page="dashboard"][data-theme="dark"] .topbar{background:#0f141f;border-bottom-color:#252d3d}
body[data-active-page="dashboard"][data-theme="dark"] .topbar h1,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 h2{color:#f2f5fb}
body[data-active-page="dashboard"][data-theme="dark"] .topbar-title .crumb,body[data-active-page="dashboard"][data-theme="dark"] .topbar-title .crumb span:last-child{color:#929db2}
body[data-active-page="dashboard"][data-theme="dark"] .search{border-color:#30394b;background:#151b28;color:#9aa6bc}
body[data-active-page="dashboard"][data-theme="dark"] .search input{background:transparent;color:#edf1fb}
body[data-active-page="dashboard"][data-theme="dark"] .icon-btn{color:#adb8cb}
body[data-active-page="dashboard"][data-theme="dark"] .theme-toggle{color:#f3c85b}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .card{border-color:#30394b;background:#111722;color:#e8edf7;box-shadow:0 24px 50px -20px rgba(0,0,0,.8),0 8px 20px rgba(0,0,0,.35)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .card::before{background:radial-gradient(320px circle at var(--glow-x,50%) var(--glow-y,50%),rgba(132,0,255,.18),transparent 64%)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .card:hover,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .card:focus-within{z-index:8;transform:translateY(-7px);border-color:#8d7dff;box-shadow:0 38px 70px -22px rgba(103,82,230,.62),0 18px 34px rgba(0,0,0,.64)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi-copy>span,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi-copy small,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-card-head p{color:#95a2b8}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi-copy strong{color:#f3f6fc}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-stage{border-color:#30394b}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-device-panel{background:#111722;border-color:#30394b}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-device-panel>div:first-child{border-bottom-color:#2b3445}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-device-panel>div:first-child strong,body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item strong{color:#e8edf7}
body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item small,body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item em{color:#93a0b5}
body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item:hover,body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item:focus,body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item.selected{background:#1d2535}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-todo-list{border-color:#30394b;background:#151b27}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-todo-row{color:#b8c2d3;border-top-color:#2b3445}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-todo-row:hover{background:#1d2535}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-account-stat,body[data-active-page="dashboard"][data-theme="dark"] .map-legend{background:rgba(17,23,34,.92);border-color:#3a4559;color:#c4cede}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-account-stat strong{color:#f3f6fc}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-period,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-refresh{border-color:#30394b;background:#151b28;color:#bac5d6}

@media(max-width:850px){.dashboard-map-stage{width:100%;height:300px;min-height:0;aspect-ratio:auto}}
@media(max-width:600px){.dashboard-map-stage{height:260px}}
.dashboard-chart-controls i.dispense-line{width:17px;border-top-color:#8b5cf6;position:relative}
.dashboard-chart-controls i.dispense-line:after{content:"";position:absolute;left:6px;top:-4px;width:5px;height:5px;border-radius:50%;background:#8b5cf6}
.dashboard-trend-chart .dispense-line-chart{fill:none;vector-effect:non-scaling-stroke;stroke:#8b5cf6;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.dashboard-trend-chart .dispense-area{fill:url(#trend-area-gradient);stroke:none}
.dashboard-trend-chart .dispense-dot{fill:#fff;stroke:#8b5cf6;stroke-width:1.8;vector-effect:non-scaling-stroke}
.dashboard-trend-chart{position:relative;cursor:crosshair}
.dashboard-trend-chart svg{outline:0}
.dashboard-trend-chart svg:focus,.dashboard-trend-chart svg:focus-visible{outline:0}
.dashboard-trend-chart .trend-hit-target{fill:#fff;fill-opacity:0;stroke:none;pointer-events:none}
.dashboard-trend-chart .trend-pointer-layer{position:absolute;inset:0;z-index:3;background:transparent;outline:0;touch-action:none}
.dashboard-trend-chart .trend-hover-overlay{position:absolute;inset:0;z-index:4;pointer-events:none}
.dashboard-trend-chart .trend-hover-overlay-guide{position:absolute;width:0;border-left:1.5px dashed #8b5cf6;opacity:.95}
.dashboard-trend-chart .trend-hover-overlay-tooltip{position:absolute;min-width:58px;padding:4px 9px;border:1px solid #8b5cf6;border-radius:7px;background:#fff;color:#243150;box-shadow:0 4px 10px rgba(49,37,91,.16);font-size:9px;font-weight:600;line-height:11px;text-align:center;transform:translate(-50%,-100%)}
.dashboard-trend-chart .trend-hover-overlay-tooltip b,.dashboard-trend-chart .trend-hover-overlay-tooltip span{display:block;white-space:nowrap}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-trend-chart .trend-hover-overlay-tooltip{background:#1d1831;color:#f7f8ff;box-shadow:0 4px 10px rgba(0,0,0,.32)}
.dashboard-trend-chart .trend-guide{stroke:#8b5cf6;stroke-width:1.2;stroke-dasharray:6 5;vector-effect:non-scaling-stroke;pointer-events:none}
.dashboard-trend-chart .trend-tooltip rect{fill:#fff;stroke:#8b5cf6;stroke-width:1;vector-effect:non-scaling-stroke;filter:drop-shadow(0 4px 8px rgba(31,24,56,.16))}
.dashboard-trend-chart .trend-tooltip text{fill:#30234b;font-size:9px;font-weight:600;pointer-events:none}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-trend-chart .trend-tooltip rect{fill:#1d1831;filter:drop-shadow(0 4px 8px rgba(0,0,0,.32))}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-trend-chart .trend-tooltip text{fill:#fff}
@media(min-width:851px){
  .dashboard-analytics-grid{height:clamp(220px,22vh,258px);min-height:0;flex:none}
  .dashboard-chart-card,.dashboard-case-card,.dashboard-health-card{height:100%;min-height:0}
  .dashboard-trend-chart{height:calc(100% - 38px);min-height:0}
}
@media(min-width:1201px){
  .dashboard-analytics-grid{grid-template-columns:minmax(0,1.6fr) minmax(230px,.9fr) minmax(230px,.9fr)}
}
.staff-tabs{display:flex;gap:4px;margin:0 0 16px}.staff-tabs button{border:1px solid var(--line);background:#fff;color:#69758a;border-radius:7px;padding:9px 18px;cursor:pointer;font-size:12px}.staff-tabs button:hover,.staff-tabs button.active{color:var(--primary);border-color:#c9c3ff;background:#f4f2ff}
.cf-formula-basic-fields{display:grid;grid-template-columns:1fr 160px;gap:10px;padding:12px 0;border-bottom:1px solid #eef0f5}.cf-formula-basic-fields label{display:grid;gap:5px;color:#69758a;font-size:11px}.cf-formula-basic-fields label.full{grid-column:1/-1}.cf-formula-basic-fields input,.cf-formula-basic-fields textarea{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;padding:8px;outline:0;font:inherit}.cf-formula-basic-fields textarea{min-height:55px;resize:vertical}.cf-inline-remove{border:1px solid #e8c2c8;background:#fff5f6;color:#c94b5a;border-radius:6px;padding:6px 8px;cursor:pointer}.cf-inline-actions [data-cf-inline-add]{border:1px solid #d8d3ff;background:#f5f3ff;color:var(--primary);border-radius:7px;padding:8px 11px;cursor:pointer}.cf-batch-western{width:100%;height:34px;border:1px solid #d8d3ff;background:#fff;color:var(--primary);border-radius:7px;cursor:pointer;font-size:12px}.cf-batch-label{display:grid;gap:6px;color:#69758a;font-size:12px;margin:12px 0}.cf-batch-label input,.cf-batch-label select,.cf-batch-label textarea{box-sizing:border-box;width:100%;border:1px solid var(--line);border-radius:7px;padding:9px;background:#fff;color:var(--ink);font:inherit}.cf-batch-label textarea{min-height:130px;resize:vertical}.cf-image-help{color:#929bac;font-size:11px}
.cf-panel-head{flex-wrap:wrap}.cf-add-color{width:100%;height:34px;border:1px solid #c9c3ff;background:#fff;color:#6355e8;border-radius:7px;cursor:pointer;font-size:12px}.cf-delete-color{border:1px solid #e8c2c8;background:#fff5f6;color:#c94b5a;border-radius:7px;padding:7px 11px;cursor:pointer;font-size:11px}.cf-color-modal-backdrop{position:fixed;inset:0;z-index:1100;background:#131a2a66;display:grid;place-items:center;padding:20px}.cf-color-modal{width:min(560px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:14px;padding:24px;position:relative;box-shadow:0 20px 60px #11182740}.cf-color-modal-close{position:absolute;right:14px;top:12px;border:0;background:transparent;font-size:23px;color:#8993a5;cursor:pointer}.cf-color-modal h3{margin:0 0 7px}.cf-color-modal>p{margin:0 0 18px;color:#929bac;font-size:12px}.cf-board-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}.cf-board-options button{border:1px solid #dfe4ed;background:#fff;border-radius:9px;padding:13px;text-align:left;cursor:pointer;color:var(--ink)}.cf-board-options button.selected{border-color:var(--primary);background:#f5f3ff;box-shadow:0 0 0 1px var(--primary)}.cf-board-options strong,.cf-board-options small{display:block}.cf-board-options small{margin-top:5px;color:#929bac;font-size:11px}.cf-color-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cf-color-form label{display:grid;gap:6px;color:#69758a;font-size:12px}.cf-color-form input,.cf-color-form select{height:38px;border:1px solid var(--line);border-radius:7px;padding:0 10px;background:#fff;color:var(--ink);outline:0;font:inherit}.cf-color-form input:focus,.cf-color-form select:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6355e81a}.cf-color-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.cf-color-modal-actions button:first-child{border:1px solid var(--line);background:#fff;color:#657187;border-radius:7px;padding:10px 15px;cursor:pointer}.cf-color-modal-actions .primary-btn{margin:0}
.premium-add-color{height:32px;border:1px solid #d8d3ff!important;background:#f5f3ff!important;color:var(--primary)!important;border-radius:7px;padding:0 11px!important;cursor:pointer}.premium-delete-color{flex:0 0 auto!important;border:1px solid #d9b5bc!important;background:#fff4f5!important;color:#c94b5a!important;border-radius:7px!important;padding:0 13px!important;cursor:pointer}.color-code-modal-backdrop{position:fixed;inset:0;z-index:1100;background:#131a2a66;display:grid;place-items:center;padding:20px}.color-code-modal{width:min(560px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:14px;padding:24px;position:relative;box-shadow:0 20px 60px #11182740}.color-code-modal-close{position:absolute;right:14px;top:12px;border:0;background:transparent;font-size:23px;color:#8993a5;cursor:pointer}.color-code-modal h3{margin:0 0 7px}.color-code-modal>p{margin:0 0 18px;color:#929bac;font-size:12px}.color-board-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}.color-board-options button{border:1px solid #dfe4ed;background:#fff;border-radius:9px;padding:13px;text-align:left;cursor:pointer;color:var(--ink)}.color-board-options button.selected{border-color:var(--primary);background:#f5f3ff;box-shadow:0 0 0 1px var(--primary)}.color-board-options strong,.color-board-options small{display:block}.color-board-options small{margin-top:5px;color:#929bac;font-size:11px}.color-code-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.color-code-form label{display:grid;gap:6px;color:#69758a;font-size:12px}.color-code-form input,.color-code-form select{height:38px;border:1px solid var(--line);border-radius:7px;padding:0 10px;background:#fff;color:var(--ink);outline:0;font:inherit}.color-code-form input:focus,.color-code-form select:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6355e81a}.color-code-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.color-code-modal-actions button:first-child{border:1px solid var(--line);background:#fff;color:#657187;border-radius:7px;padding:10px 15px;cursor:pointer}.color-code-modal-actions .primary-btn{margin:0}
.cf-inline-editor-row select{display:block;width:100%;height:38px;box-sizing:border-box;margin-top:5px;border:1px solid var(--line);border-radius:7px;padding:8px;background:#fff;color:var(--ink);font:inherit;cursor:pointer;outline:0}.cf-inline-editor-row select:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6355e81a}
.cf-inline-editor-panel .cf-inline-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}.cf-inline-editor-panel .cf-inline-actions button{border:0;border-radius:7px;background:var(--primary);color:#fff;padding:10px 15px;cursor:pointer;margin:0}.cf-inline-editor-panel .cf-inline-actions button:hover{background:var(--primary-2)}
.cf-inline-editor-panel .cf-inline-actions button:first-child{order:2}.cf-inline-editor-panel .cf-inline-actions button:last-child{order:1}
.cf-formula-item-editing{grid-template-columns:32px minmax(90px,1fr) 1fr 90px 18px;align-items:center;gap:10px}.cf-inline-input{width:100%;box-sizing:border-box;border:1px solid #dfe2ed;border-radius:6px;padding:7px 8px;background:#fff;color:var(--ink);outline:0}.cf-inline-input:focus{border-color:var(--primary);box-shadow:0 0 0 2px #725cff18}.cf-inline-percent{text-align:right}.cf-formula-item-editing em{color:var(--primary);font-style:normal}.cf-inline-actions{display:flex;align-items:center;gap:8px}.cf-inline-actions button:first-child{border:1px solid var(--line);background:#fff;border-radius:7px;padding:7px 10px}.cf-inline-help{padding:10px 15px;color:#929bac;background:#fbfbfd;font-size:11px;border-top:1px solid #f0f1f5}
.cf-formula-item-editing{display:none}.cf-formula-title>.cf-inline-actions{display:none}.cf-inline-editor-panel{margin:14px;border:1px solid #e2e4ee;border-radius:10px;background:#fff;padding:16px;box-shadow:0 5px 18px #252b3b0d}.cf-inline-panel-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:12px}.cf-inline-panel-head h4{margin:0;font-size:14px}.cf-inline-panel-head p{margin:5px 0 0;color:#929bac;font-size:11px}.cf-inline-panel-head label,.cf-inline-editor-row label{display:block;color:#6f788a;font-size:11px}.cf-inline-panel-head input,.cf-inline-editor-row input{display:block;width:100%;box-sizing:border-box;margin-top:5px;border:1px solid var(--line);border-radius:7px;padding:8px;outline:0}.cf-inline-panel-head input{width:150px}.cf-inline-editor-row{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px;border-top:1px solid #eef0f5;padding:10px 0}.cf-inline-editor-panel .cf-inline-actions{justify-content:flex-end;margin-top:4px}
.cf-inline-editor-panel .cf-inline-actions button[data-cf-inline-cancel]{order:2!important;background:#6355e8!important;border:0!important;color:#fff!important;border-radius:7px!important;padding:10px 15px!important}.cf-inline-editor-panel .cf-inline-actions button[data-cf-inline-cancel]:hover,.cf-inline-editor-panel .cf-inline-actions button[data-cf-inline-cancel]:focus,.cf-inline-editor-panel .cf-inline-actions button[data-cf-inline-cancel]:active{background:#6355e8!important;color:#fff!important}
.cf-empty-formula{display:flex;flex-direction:column;align-items:center;gap:12px;border:1px dashed #dcd8ff;border-radius:10px;background:#faf9ff}.cf-empty-formula .primary-btn{margin:0}.cf-create-formula-modal{width:min(720px,100%)}.cf-create-items{margin-top:14px}.cf-create-item{display:grid;grid-template-columns:1.2fr 1fr 1fr auto;gap:10px;align-items:end;padding:10px 0;border-bottom:1px solid #eef0f5}.cf-create-item label{display:grid;gap:5px;color:#69758a;font-size:11px}.cf-create-item input,.cf-create-item select{box-sizing:border-box;width:100%;height:38px;border:1px solid var(--line);border-radius:7px;padding:0 9px;background:#fff;color:var(--ink);font:inherit;outline:0}.cf-create-item input:focus,.cf-create-item select:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6355e81a}.cf-create-item .cf-inline-remove{height:38px}.cf-create-toolbar{display:flex;justify-content:space-between;align-items:center;margin-top:12px}.cf-create-toolbar button{border:1px solid #d8d3ff;background:#f5f3ff;color:var(--primary);border-radius:7px;padding:8px 11px;cursor:pointer}.cf-create-toolbar span{color:#26ad79;font-size:12px;font-weight:700}.cf-create-toolbar span.invalid{color:#c94b5a}@media(max-width:700px){.cf-create-item{grid-template-columns:1fr 1fr}.cf-create-item .cf-inline-remove{grid-column:2}}
.cf-color-form .full{grid-column:1/-1}.cf-color-form input[type=file]{padding:6px;height:auto;min-height:38px}.cf-color-form input[type=file]::file-selector-button{border:0;border-radius:5px;background:#eeeaff;color:var(--primary);padding:6px 10px;margin-right:8px;cursor:pointer}.cf-upload-preview{display:grid;gap:4px;border:1px dashed #d8d3ff;border-radius:8px;background:#faf9ff;padding:10px 12px}.cf-upload-preview span,.cf-upload-preview small{color:#929bac;font-size:11px}.cf-upload-preview b{color:var(--ink);font-size:12px;word-break:break-all}
.cf-inline-editor-panel .cf-inline-actions button[data-cf-inline-add]{order:0!important;margin-right:auto!important;border:1px solid #d8d3ff!important;background:#f5f3ff!important;color:var(--primary)!important;border-radius:7px!important;padding:10px 15px!important;min-width:110px!important}.cf-inline-editor-panel .cf-inline-actions button[data-cf-inline-add]:hover{background:#ebe8ff!important;color:var(--primary)!important}.cf-inline-editor-panel .cf-inline-actions button[data-cf-inline-save]{order:1!important}.cf-inline-editor-panel .cf-inline-actions button[data-cf-inline-cancel]{order:2!important}

/* Color library controls share one elevated hover language.  Selection rows
   keep their existing flat list treatment so scanning a long color list stays stable. */
.color-formula-page :is(.cf-tab, .cf-palette-filter button, .cf-add-color, .cf-delete-color, .cf-image-button, .cf-edit-formula, .cf-empty-formula .primary-btn),
:is(.cf-modal, .cf-color-modal) :is(.primary-btn, .cf-modal-close, .cf-color-modal-close, .cf-modal-actions button, .cf-color-modal-actions button, .cf-board-options button, .cf-inline-remove, .cf-inline-actions button, .cf-create-toolbar button) {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease;
}

.color-formula-page :is(.cf-tab, .cf-palette-filter button, .cf-add-color, .cf-delete-color, .cf-edit-formula, .cf-empty-formula .primary-btn):hover:not(:disabled),
:is(.cf-modal, .cf-color-modal) :is(.primary-btn, .cf-modal-actions button, .cf-color-modal-actions button, .cf-board-options button, .cf-inline-remove, .cf-inline-actions button, .cf-create-toolbar button):hover:not(:disabled) {
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(61, 51, 132, .18);
}

.color-formula-page .cf-image-button:hover:not(:disabled) { transform:translateY(-2px); }
.color-formula-page :is(button, [role="button"]):focus-visible,
:is(.cf-modal, .cf-color-modal) button:focus-visible { outline:3px solid rgba(129, 117, 255, .38); outline-offset:3px; }
.color-formula-page button:disabled,
:is(.cf-modal, .cf-color-modal) button:disabled { cursor:not-allowed; opacity:.56; }
.customer-page{max-width:1500px}.customer-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start}.customer-zones{padding:18px 12px}.customer-zones-head{display:flex;align-items:flex-start;justify-content:space-between;padding:0 8px 14px;border-bottom:1px solid #eef0f5}.customer-zones-head h3{margin:0;font-size:15px}.customer-zones-head small{display:block;color:#929bac;font-size:11px;margin-top:5px}.customer-zone-add{width:27px;height:27px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--primary);font-size:17px;line-height:1;cursor:pointer}.customer-zone-list{padding-top:8px}.customer-zone{display:flex;align-items:center;gap:9px;width:100%;height:42px;border:0;border-radius:7px;background:#fff;color:#566278;text-align:left;padding:0 9px;font-size:12px;cursor:pointer}.customer-zone:hover{background:#f5f3ff}.customer-zone.active{background:#eeedff;color:var(--primary);font-weight:700}.customer-zone em{margin-left:auto;color:#9ba4b3;font-style:normal;font-size:11px}.customer-zone-icon{width:21px;height:21px;border-radius:6px;display:grid;place-items:center;color:#fff;font-size:11px;font-weight:700}.customer-zone-icon.all{background:#5d70ef}.customer-zone-icon.vip{background:#efa94e}.customer-zone-icon.active{background:#38b98b}.customer-zone-icon.follow{background:#8c72e9}.customer-zone-icon.dormant{background:#9aa4b4}.customer-main{min-width:0}.customer-toolbar{display:flex;align-items:center;gap:8px;padding:12px 13px;margin-bottom:13px;flex-wrap:wrap}.customer-toolbar .input{min-width:180px;flex:1}.customer-table-card{padding:0 13px;overflow:hidden}.customer-table-heading{display:flex;align-items:center;justify-content:space-between;padding:17px 2px 13px;border-bottom:1px solid #eef0f5}.customer-table-heading h3{margin:0;font-size:16px}.customer-table-heading span{display:block;color:#929bac;font-size:11px;margin-top:5px}.customer-table-heading .customer-data-status{margin-top:0;white-space:nowrap}.customer-table-wrap{overflow:auto}.customer-table-card .table{min-width:660px}.customer-table-card .table td,.customer-table-card .table th{padding:14px 8px}.customer-table-card .table td strong{font-weight:600;color:var(--ink)}@media(max-width:850px){.customer-layout{grid-template-columns:1fr}.customer-zones{padding:12px}.customer-zone-list{display:grid;grid-template-columns:repeat(2,1fr);gap:4px}.customer-toolbar{align-items:stretch}.customer-toolbar .input{flex-basis:100%}}
.customer-org-page{max-width:none}.customer-org-layout{display:grid;grid-template-columns:230px minmax(520px,1fr) 320px;gap:16px;align-items:start}.customer-org-tree{padding:16px 11px;min-height:560px}.customer-panel-head{display:flex;align-items:flex-start;justify-content:space-between;padding:0 7px 14px;border-bottom:1px solid #eef0f5}.customer-panel-head h3{margin:0;font-size:15px}.customer-panel-head small{display:block;color:#929bac;font-size:11px;margin-top:5px}.customer-panel-head button{border:1px solid var(--line);background:#fff;border-radius:6px;color:#657087;padding:6px 8px;font-size:11px;cursor:pointer}.customer-org-search{display:flex;align-items:center;height:36px;border:1px solid var(--line);border-radius:7px;padding:0 9px;margin:13px 5px 9px;color:#9099a9}.customer-org-search input{width:100%;border:0;outline:0;padding-left:7px;font-size:12px;color:var(--ink)}.customer-org-node{width:100%;min-height:43px;display:flex;align-items:center;gap:7px;border:0;border-radius:7px;background:#fff;color:#566175;text-align:left;padding-right:8px;cursor:pointer}.customer-org-node:hover,.customer-org-node.selected{background:#eeedff;color:var(--primary)}.customer-org-node.selected{font-weight:700;box-shadow:inset 3px 0 var(--primary)}.customer-org-node.depth-0{padding-left:5px}.customer-org-node.depth-1{padding-left:19px}.customer-org-node.depth-2{padding-left:35px}.customer-org-node.depth-3{padding-left:51px}.customer-org-node.depth-4{padding-left:67px}.customer-org-arrow{width:11px;color:#7c8799}.customer-org-icon{width:22px;height:22px;flex:none;border-radius:6px;display:grid;place-items:center;background:#eef0ff;color:var(--primary);font-size:11px}.customer-org-icon.store{background:#eaf9f3;color:#25a776}.customer-org-icon.chain{background:#edf5ff;color:#4f86dc}.customer-org-node strong,.customer-org-node small{display:block}.customer-org-node strong{font-size:12px}.customer-org-node small{font-size:10px;color:#929bac;margin-top:2px;font-weight:400}.customer-org-node em{margin-left:auto;color:#9aa4b5;font-size:10px;font-style:normal}.customer-directory{min-width:0}.customer-directory-head{min-height:64px;display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:13px;padding:1px 2px}.customer-directory-head h2{font-size:19px;margin:0}.customer-directory-head p{font-size:11px;color:#929bac;margin:6px 0 0}.customer-directory-head>div:last-child{text-align:right}.customer-directory-head .primary-btn{margin:0}.customer-directory-head small{display:block;color:#929bac;font-size:10px;margin-top:6px}.customer-toolbar{margin-bottom:13px}.customer-table-card{min-height:464px}.customer-table-card .table tbody tr{cursor:pointer}.customer-table-card .table tbody tr:hover,.customer-table-card .table tbody tr.selected{background:#f4f2ff}.customer-table-card .table-action{border:0;background:transparent;color:var(--primary);font-size:11px;cursor:pointer;padding:4px 6px}.customer-table-card .table-action.danger{color:#e75661}.customer-profile-panel{min-height:560px;padding:18px 17px;position:sticky;top:12px}.customer-detail-empty{padding-top:235px}.customer-detail-head{display:flex;align-items:center;gap:11px;padding-bottom:16px}.customer-avatar{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#cfc8ff,#6655e8);color:#fff;font-size:22px;font-weight:700}.customer-detail-head h2{margin:0 0 6px;font-size:18px}.customer-detail-head span{color:var(--primary);background:#efedff;border-radius:5px;padding:4px 7px;font-size:10px}.customer-profile-panel section{border-top:1px solid #eef0f5;padding:14px 0}.customer-profile-panel section h3{font-size:13px;margin:0 0 10px}.customer-detail-line{display:flex;align-items:flex-start;gap:8px;font-size:11px;line-height:26px}.customer-detail-line label{width:67px;flex:none;color:#8a95a7}.customer-detail-line b{font-weight:500;color:#3e4b60;word-break:break-word}.customer-detail-line.block{display:block;margin-bottom:7px}.customer-detail-line.block label{display:block;width:auto;line-height:20px}.customer-detail-line.block b{display:block;line-height:18px;background:#f8f9fc;border-radius:6px;padding:7px 8px}.customer-photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.customer-photo-grid img,.customer-photo-grid span{width:100%;aspect-ratio:1.35;border-radius:6px;background:#f0f2f6;object-fit:cover;display:grid;place-items:center;color:#9ba5b5}.customer-detail-updated{display:flex;justify-content:space-between;color:#8a95a7;font-size:10px;padding:13px 0}.customer-detail-updated b{color:#526078;font-weight:500}.customer-detail-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;border-top:1px solid #eef0f5;padding-top:14px}.customer-detail-actions button{margin:0;border-radius:6px;padding:9px 7px;cursor:pointer}.customer-detail-actions>button:first-child{border:1px solid var(--line);background:#fff;color:#657087}.customer-detail-actions .danger-outline-btn{grid-column:1/-1;background:#fff4f5}.customer-modal-backdrop{position:fixed;inset:0;z-index:1200;background:#17203366;display:grid;place-items:center;padding:20px}.customer-form-modal{width:min(650px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:13px;padding:22px;box-shadow:0 20px 60px #11182740}.customer-modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}.customer-modal-head h3{margin:0;font-size:18px}.customer-modal-head p{margin:6px 0 0;color:#929bac;font-size:11px}.customer-modal-head button,.customer-delete-close{border:0;background:transparent;color:#8993a5;font-size:24px;cursor:pointer}.customer-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.customer-form-grid label{display:grid;gap:6px;color:#5f6c81;font-size:11px}.customer-form-grid label.full{grid-column:1/-1}.customer-form-grid input,.customer-form-grid select,.customer-form-grid textarea{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;padding:9px 10px;background:#fff;color:var(--ink);font:inherit;outline:0}.customer-form-grid input,.customer-form-grid select{height:39px}.customer-form-grid textarea{resize:vertical}.customer-form-grid input:focus,.customer-form-grid select:focus,.customer-form-grid textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6355e81a}.customer-form-grid small{color:#929bac}.customer-form-error{min-height:20px;color:#c94b5a;font-size:11px;padding-top:5px}.customer-modal-actions{display:flex;justify-content:flex-end;gap:9px}.customer-modal-actions button{margin:0;border:1px solid var(--line);background:#fff;border-radius:7px;padding:9px 14px;cursor:pointer}.customer-modal-actions .primary-btn{border:0;background:var(--primary)}.customer-delete-modal{width:min(410px,100%);background:#fff;border-radius:13px;padding:24px;text-align:center;position:relative;box-shadow:0 20px 60px #11182740}.customer-delete-close{position:absolute;right:14px;top:11px}.customer-delete-icon{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;margin:0 auto 13px;background:#fff0f1;color:#e64e5a;font-size:22px;font-weight:700}.customer-delete-modal h3{margin:0 0 8px;font-size:17px}.customer-delete-modal p{margin:0;color:#7d8798;font-size:12px;line-height:20px}.customer-delete-modal>div:last-child{display:flex;gap:9px;margin-top:20px}.customer-delete-modal>div:last-child button{flex:1;border:1px solid var(--line);background:#fff;border-radius:7px;padding:10px;cursor:pointer}.customer-delete-modal .customer-confirm-delete{border-color:#e95560;background:#e95560;color:#fff}@media(max-width:1300px){.customer-org-layout{grid-template-columns:220px minmax(500px,1fr)}.customer-profile-panel{display:none}}@media(max-width:850px){.customer-org-layout{grid-template-columns:1fr}.customer-org-tree{min-height:auto}.customer-directory-head{margin-top:4px}.customer-form-grid{grid-template-columns:1fr}.customer-form-grid label.full{grid-column:auto}}

/* Permission management */
.permissions-page{max-width:none;padding-top:25px}.permission-title-row{margin-bottom:17px}.permission-title-row h2{margin-bottom:5px}.permission-title-row .toolbar{align-self:center}.permission-title-row .secondary-btn,.permission-title-row .primary-btn{height:38px;margin:0}.permission-title-row button:disabled,.permission-role-empty button:disabled{cursor:not-allowed;opacity:.5}.permission-metrics{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:13px}.permission-metric{display:flex;align-items:center;gap:12px;min-height:82px;padding:15px 17px}.permission-metric>i{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#efedff;color:#6554ec;font-size:20px;font-style:normal}.permission-metric>i.blue{background:#edf5ff;color:#4f86dc}.permission-metric>i.green{background:#eaf9f3;color:#28a978}.permission-metric>i.orange{background:#fff4e5;color:#e6982d}.permission-metric label,.permission-metric strong{display:block}.permission-metric label{color:#8490a3;font-size:11px}.permission-metric strong{margin-top:3px;font-size:23px}.permission-tabs{height:55px;display:flex;align-items:flex-end;gap:33px;border-bottom:1px solid #e3e7ef;margin-bottom:16px}.permission-tabs button{height:55px;padding:0 1px;border:0;border-bottom:2px solid transparent;background:transparent;color:#5f6b7f;cursor:pointer;font:inherit}.permission-tabs button.active{border-bottom-color:var(--primary);color:var(--primary);font-weight:700}.permission-filter-bar{display:flex;align-items:center;gap:10px;padding:11px 13px;margin-bottom:14px}.permission-filter-bar select,.permission-filter-bar>button{height:38px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#5f6c80;padding:0 12px;outline:0}.permission-filter-bar>button{cursor:pointer}.permission-search{display:flex;align-items:center;gap:8px;width:min(360px,40%);height:38px;border:1px solid var(--line);border-radius:7px;padding:0 11px;color:#8d97a8}.permission-search input{width:100%;border:0;outline:0;color:var(--ink);font:inherit}.permission-role-layout{display:grid;grid-template-columns:minmax(680px,1fr) 330px;gap:14px;align-items:start}.permission-role-list{min-width:0;overflow:hidden}.permission-role-list-head,.permission-secondary-head{display:flex;justify-content:space-between;align-items:flex-start;padding:17px 18px 14px;border-bottom:1px solid #eef0f5}.permission-role-list-head h3,.permission-secondary-head h3{margin:0;font-size:15px}.permission-role-list-head p,.permission-secondary-head p{margin:5px 0 0;color:#929cad;font-size:11px}.permission-role-list-head>span,.permission-secondary-head>span{color:#7e899b;font-size:11px}.permission-table-wrap{overflow:auto}.permission-role-table,.permission-simple-table,.permission-matrix-table{width:100%;border-collapse:collapse}.permission-role-table{min-width:850px}.permission-role-table th,.permission-role-table td,.permission-simple-table th,.permission-simple-table td,.permission-matrix-table th,.permission-matrix-table td{border-bottom:1px solid #eef0f5;padding:13px 12px;text-align:left;font-size:11px}.permission-role-table th,.permission-simple-table th,.permission-matrix-table th{background:#fafbfc;color:#7f899b;font-weight:500}.permission-role-table tbody tr{cursor:pointer;transition:.15s}.permission-role-table tbody tr:hover,.permission-role-table tbody tr.selected{background:#f6f4ff}.permission-role-table tbody tr.selected{box-shadow:inset 3px 0 var(--primary)}.permission-role-name{display:flex;align-items:center;gap:9px}.permission-role-name>i{width:31px;height:31px;border-radius:8px;display:grid;place-items:center;background:#eeecff;color:var(--primary);font-style:normal;font-weight:700}.permission-role-name strong,.permission-role-name small{display:block}.permission-role-name strong{color:var(--ink);font-size:12px}.permission-role-name small{color:#9aa3b2;font-size:9px;margin-top:3px;font-weight:400}.permission-scope-chip,.permission-status{display:inline-flex;align-items:center;border-radius:5px;padding:4px 7px;white-space:nowrap;font-size:10px}.permission-scope-chip{background:#eef0ff;color:#5c54d8}.permission-scope-chip.current_and_descendants{background:#edf5ff;color:#4c82d6}.permission-scope-chip.current_org{background:#eaf9f3;color:#269a70}.permission-scope-chip.specified_org{background:#fff4df;color:#b7791d}.permission-status.active{background:#e8f8f1;color:#229e6d}.permission-status.inactive{background:#f1f2f5;color:#858f9e}.permission-summary{display:block;max-width:200px;color:#59667a;line-height:17px}.permission-text-button{border:0;background:transparent;color:var(--primary);padding:4px 0;cursor:pointer;font-size:11px}.permission-role-detail{position:sticky;top:12px;min-height:560px;padding:18px}.permission-detail-empty{min-height:520px;display:grid;place-content:center;text-align:center;color:#8e98aa}.permission-detail-empty i{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px;background:#f0eeff;color:var(--primary);font-size:23px;font-style:normal}.permission-detail-empty h3{margin:0;color:#4a566a;font-size:14px}.permission-detail-empty p{max-width:230px;margin:8px auto 0;font-size:11px;line-height:18px}.permission-detail-head{display:flex;align-items:center;gap:10px}.permission-detail-head>button{margin-left:auto;border:0;background:transparent;color:#9099a9;font-size:22px;cursor:pointer}.permission-role-avatar{width:44px;height:44px;border-radius:11px;display:grid;place-items:center;background:#ece9ff;color:var(--primary);font-size:18px;font-weight:700}.permission-detail-head span{color:#8f99aa;font-size:9px}.permission-detail-head h3{margin:3px 0 0;font-size:17px}.permission-detail-description{min-height:36px;margin:15px 0;color:#667287;font-size:11px;line-height:18px}.permission-detail-meta{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:13px 0;border-top:1px solid #eef0f5;border-bottom:1px solid #eef0f5}.permission-detail-meta div{background:#f8f9fc;border-radius:7px;padding:9px}.permission-detail-meta label,.permission-detail-meta b{display:block}.permission-detail-meta label{color:#929cad;font-size:9px}.permission-detail-meta b{margin-top:4px;color:#4c596e;font-size:10px;font-weight:600}.permission-detail-groups{padding:15px 0}.permission-detail-groups>div:first-child{display:flex;align-items:center;justify-content:space-between}.permission-detail-groups h4{margin:0;font-size:13px}.permission-detail-groups>div:first-child span{color:#8f99aa;font-size:10px}.permission-detail-groups article{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid #f0f2f6}.permission-detail-groups article strong{width:72px;flex:none;font-size:10px}.permission-detail-groups article p{display:flex;flex-wrap:wrap;gap:4px;margin:0}.permission-detail-groups article span{background:#f0eeff;color:#5f54dc;border-radius:4px;padding:3px 5px;font-size:9px}.permission-detail-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;border-top:1px solid #eef0f5;padding-top:14px}.permission-detail-actions button{border:1px solid var(--line);border-radius:6px;background:#fff;color:#5e6a7e;padding:8px 6px;cursor:pointer;font-size:10px}.permission-detail-actions button:first-child{border-color:#d6d1ff;background:#f4f2ff;color:var(--primary)}.permission-detail-actions button.danger{grid-column:1/-1;border-color:#f0c6ca;background:#fff6f7;color:#cf505b}.permission-role-empty{display:grid;place-items:center;min-height:385px;padding:30px;text-align:center}.permission-role-empty>i{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:#f0eeff;color:var(--primary);font-size:23px;font-style:normal}.permission-role-empty h3{margin:12px 0 0;font-size:15px}.permission-role-empty p{margin:7px 0 17px;color:#8c96a7;font-size:11px}.permission-role-empty>div{display:flex;gap:9px}.permission-role-empty button{margin:0}.permission-secondary-panel{min-height:500px;overflow:auto}.permission-simple-table th,.permission-simple-table td{padding:14px 18px}.permission-simple-table code{color:#5b55cc;background:#f0eeff;border-radius:4px;padding:3px 5px}.permission-panel-empty{min-height:420px;display:grid;place-content:center;text-align:center}.permission-panel-empty h3{margin:0;font-size:15px}.permission-panel-empty p{margin:7px 0;color:#8e98a9;font-size:11px}.permission-matrix-wrap{overflow:auto}.permission-matrix-table{min-width:760px}.permission-matrix-table th:not(:first-child),.permission-matrix-table td:not(:first-child){text-align:center}.matrix-check{display:inline-grid;width:22px;height:22px;place-items:center;border-radius:50%;background:#e9f8f1;color:#24a574;font-weight:700}.matrix-empty{color:#c1c7d0}.permission-drawer-backdrop{position:fixed;inset:0;z-index:1300;display:flex;justify-content:flex-end;background:#17203340}.permission-role-drawer{width:min(520px,100%);height:100vh;background:#fff;box-shadow:-18px 0 45px #17203324;overflow:auto}.permission-role-drawer form{min-height:100%;display:flex;flex-direction:column}.permission-drawer-head{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:flex-start;background:#fff;border-bottom:1px solid #edf0f5;padding:20px 22px 17px}.permission-drawer-head h3{margin:0;font-size:19px}.permission-drawer-head p{margin:5px 0 0;color:#929bac;font-size:11px}.permission-drawer-head button{border:0;background:transparent;color:#8993a5;font-size:25px;cursor:pointer}.permission-drawer-body{flex:1;padding:0 22px}.permission-drawer-body section{padding:18px 0;border-bottom:1px solid #edf0f5}.permission-drawer-body section>h4,.permission-section-title h4{margin:0 0 13px;font-size:13px}.permission-drawer-body section>label:not(.permission-switch-row){position:relative;display:grid;gap:6px;margin-top:11px;color:#5f6b7e;font-size:11px}.permission-drawer-body label em{color:#e6545f;font-style:normal}.permission-drawer-body input[type=text],.permission-drawer-body input:not([type]),.permission-drawer-body select,.permission-drawer-body textarea{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);padding:9px 10px;font:inherit;outline:0}.permission-drawer-body input:not([type]),.permission-drawer-body select{height:39px}.permission-drawer-body textarea{min-height:73px;resize:vertical}.permission-drawer-body input:focus,.permission-drawer-body select:focus,.permission-drawer-body textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6355e817}.permission-drawer-body label>small{position:absolute;right:8px;bottom:7px;color:#a0a8b6;font-size:9px}.permission-scope-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}.permission-scope-options label{cursor:pointer}.permission-scope-options input{position:absolute;opacity:0}.permission-scope-options span{display:grid;place-items:center;height:38px;border:1px solid var(--line);border-radius:7px;color:#667287;font-size:11px}.permission-scope-options label.selected span{border-color:var(--primary);background:#f3f1ff;color:var(--primary);box-shadow:0 0 0 1px var(--primary)}.permission-section-title{display:flex;align-items:center;justify-content:space-between}.permission-section-title h4{margin:0}.permission-section-title button,.permission-form-groups article>div button{border:0;background:transparent;color:var(--primary);font-size:10px;cursor:pointer}.permission-form-groups{display:grid;grid-template-columns:1fr 1fr;gap:9px}.permission-form-groups article{border:1px solid #e7eaf0;border-radius:8px;padding:10px}.permission-form-groups article>div{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}.permission-form-groups article strong{font-size:11px}.permission-form-groups article>label{display:flex;align-items:center;gap:6px;padding:4px 0;color:#647085;font-size:10px;cursor:pointer}.permission-form-groups input{accent-color:var(--primary)}.permission-switch-row{display:flex;align-items:center;gap:12px;cursor:pointer}.permission-switch-row>span{flex:1}.permission-switch-row strong,.permission-switch-row small{display:block}.permission-switch-row strong{font-size:11px}.permission-switch-row small{margin-top:4px;color:#9099aa;font-size:9px}.permission-switch-row input{position:absolute;opacity:0}.permission-switch-row>i{width:38px;height:21px;border-radius:12px;background:#cbd1db;position:relative;transition:.2s}.permission-switch-row>i:after{content:"";position:absolute;width:17px;height:17px;top:2px;left:2px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 1px 3px #17203333}.permission-switch-row input:checked+i{background:var(--primary)}.permission-switch-row input:checked+i:after{transform:translateX(17px)}.permission-form-error{min-height:27px;padding:7px 22px 0;color:#c94b5a;font-size:11px}.permission-drawer-actions{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:9px;background:#fff;border-top:1px solid #edf0f5;padding:14px 22px}.permission-drawer-actions button{min-width:92px;margin:0;border:1px solid var(--line);border-radius:7px;background:#fff;color:#5f6c80;padding:9px 14px;cursor:pointer}.permission-drawer-actions .primary-btn{border-color:var(--primary);background:var(--primary);color:#fff}.permission-drawer-actions button:disabled{opacity:.55;cursor:wait}
@media(max-width:1320px){.permission-role-layout{grid-template-columns:1fr}.permission-role-detail{position:static;min-height:auto}.permission-detail-empty{min-height:180px}.permission-metrics{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.permission-metrics{grid-template-columns:1fr 1fr}.permission-title-row{align-items:flex-start}.permission-title-row .toolbar{width:100%}.permission-filter-bar{align-items:stretch;flex-direction:column}.permission-search{width:100%}.permission-tabs{gap:18px;overflow:auto}.permission-form-groups{grid-template-columns:1fr}.permission-role-drawer{width:100%}}

/* Case review workspace */
.case-review-page{max-width:none;padding-bottom:24px}.case-review-title{margin-bottom:17px}.case-review-title .toolbar{gap:9px}.case-review-title .primary-btn{margin-left:0}.case-status-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;margin-bottom:14px}.case-status-card{position:relative;min-height:82px;border:1px solid #e7eaf1;border-radius:10px;background:#fff;text-align:left;padding:15px 17px;cursor:pointer;color:#626d81;box-shadow:0 2px 8px #19223a08;transition:.16s ease}.case-status-card:hover{border-color:#cbc6ff;transform:translateY(-1px)}.case-status-card.selected{border-color:#7768ef;box-shadow:0 0 0 1px #7768ef22}.case-status-card span,.case-status-card strong{display:block}.case-status-card span{font-size:12px}.case-status-card strong{margin-top:9px;color:#182235;font-size:23px;line-height:1}.case-status-card.selected strong,.case-status-card.selected span{color:var(--primary)}.case-status-card i{position:absolute;right:16px;top:50%;width:32px;height:32px;transform:translateY(-50%);border-radius:8px;background:#f0eeff}.case-status-card:nth-child(2) i{background:#fff3df}.case-status-card:nth-child(3) i{background:#e8f7ef}.case-status-card:nth-child(4) i{background:#f0f2f6}.case-status-card i:before{content:"";position:absolute;inset:9px;border:1.8px solid #7668ea;border-radius:4px}.case-status-card:nth-child(2) i:before{border-radius:50%;border-color:#e7a43c}.case-status-card:nth-child(3) i:before{border-radius:50%;border-color:#3fb380}.case-status-card:nth-child(4) i:before{border-color:#8a95a7}.case-filter-bar{display:flex;align-items:center;gap:10px;padding:12px 14px;margin-bottom:14px;flex-wrap:wrap}.case-filter-bar select,.case-search-field{height:38px;border:1px solid #e2e6ee;border-radius:7px;background:#fff;color:#596579;font-size:11px;outline:0}.case-filter-bar select{min-width:126px;padding:0 30px 0 11px;cursor:pointer}.case-filter-bar select:focus,.case-search-field:focus-within{border-color:#887af2;box-shadow:0 0 0 3px #6355e814}.case-search-field{display:flex;align-items:center;min-width:235px;flex:1;padding:0 11px}.case-search-field span{width:14px;height:14px;border:1.6px solid #8290a6;border-radius:50%;position:relative;flex:none}.case-search-field span:after{content:"";position:absolute;width:6px;border-top:1.6px solid #8290a6;right:-5px;bottom:-2px;transform:rotate(45deg)}.case-search-field input{width:100%;height:100%;border:0;background:transparent;outline:0;padding-left:10px;color:var(--ink);font:inherit}.case-reset-button{height:38px;border:0;background:transparent;color:#748095;padding:0 8px;cursor:pointer;font-size:11px;white-space:nowrap}.case-reset-button:hover{color:var(--primary)}.case-reset-button span{font-size:15px;margin-right:4px}.case-review-layout{display:grid;grid-template-columns:minmax(660px,1.85fr) minmax(350px,1fr);gap:14px;align-items:start}.case-list-card{padding:0;min-width:0;overflow:hidden}.case-list-head{display:flex;justify-content:space-between;align-items:center;padding:15px 17px 13px;border-bottom:1px solid #eef0f5}.case-list-head h3{margin:0;font-size:15px}.case-list-head span{display:block;color:#939dac;font-size:10px;margin-top:5px}.case-table-wrap{overflow:auto;max-height:625px}.case-review-table{width:100%;min-width:760px;border-collapse:collapse;table-layout:auto}.case-review-table th{height:42px;padding:0 10px;background:#fafbfc;color:#788397;font-size:10px;font-weight:500;text-align:left;white-space:nowrap}.case-review-table td{padding:9px 10px;border-bottom:1px solid #eef0f4;color:#3b475b;font-size:11px;vertical-align:middle;white-space:nowrap}.case-review-table tbody tr{transition:.12s ease}.case-review-table tbody tr:hover{background:#faf9ff}.case-review-table tbody tr.selected{background:#f7f5ff;box-shadow:inset 3px 0 #6c5ce7}.case-review-table time{color:#657187;font-variant-numeric:tabular-nums}.case-list-identity{display:flex;align-items:center;gap:10px;min-width:170px}.case-list-identity>span{min-width:0}.case-list-identity strong,.case-list-identity small{display:block;max-width:150px;overflow:hidden;text-overflow:ellipsis}.case-list-identity strong{font-size:12px;color:#1f2a3d;font-weight:650}.case-list-identity small{font-size:10px;color:#8d97a7;margin-top:4px}.case-image{position:relative;display:grid;place-items:center;overflow:hidden;border:1px solid #e7eaf0;border-radius:7px;background:linear-gradient(135deg,#eef0f4,#d9dde5);min-height:102px;color:#98a1b0}.case-image img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:2}.case-image>span{position:absolute;z-index:3;left:7px;top:7px;padding:3px 6px;border-radius:4px;background:#172033aa;color:#fff;font-size:9px}.case-image em{font-style:normal;font-size:10px}.case-image.thumbnail{width:44px;height:44px;min-height:44px;flex:none}.case-image.thumbnail>span{display:none}.case-image.cover{min-height:148px;aspect-ratio:16/7}.case-source-badge,.case-status-badge{display:inline-flex;align-items:center;border-radius:5px;padding:4px 7px;font-size:9px;font-weight:600;line-height:1}.case-source-badge.customer{background:#eaf4ff;color:#4382d7}.case-source-badge.official{background:#f0edff;color:#6958dc}.case-status-badge.draft{background:#f1f2f5;color:#717c8d}.case-status-badge.pending{background:#fff1df;color:#d88717}.case-status-badge.published{background:#e5f7ed;color:#2c9f6d}.case-status-badge.archived{background:#eef0f4;color:#748092}.case-formula-cell{font-weight:600;color:#566278}.case-completeness{color:#df8b11;font-size:10px;font-weight:600}.case-completeness.complete{color:#20a56e}.case-view-button{border:0;background:transparent;color:var(--primary);padding:5px 3px;font-size:10px;cursor:pointer}.case-view-button:hover{text-decoration:underline}.case-detail-panel{min-height:625px;padding:0;overflow:hidden;position:sticky;top:10px}.case-detail-empty{padding-top:290px}.case-detail-scroll{max-height:568px;overflow:auto;padding:16px 17px 18px}.case-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}.case-detail-head>div>span{display:block;color:#667389;font-size:10px;font-weight:600;margin-bottom:7px}.case-detail-head h3{margin:0;font-size:18px;color:#182235}.case-detail-head p{margin:5px 0 0;color:#919aaa;font-size:10px}.case-cover-block h4,.case-before-after h4{margin:0 0 6px;color:#788397;font-size:10px;font-weight:500}.case-cover-block{margin-bottom:11px}.case-before-after{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:12px}.case-before-after .case-image{aspect-ratio:1.15;min-height:116px}.case-missing-alert,.case-complete-alert{display:flex;align-items:flex-start;gap:8px;border-radius:7px;padding:9px 10px;margin:12px 0;background:#fff4df;color:#b66c07;font-size:10px;line-height:16px}.case-missing-alert>b,.case-complete-alert>b{width:17px;height:17px;border-radius:50%;display:grid;place-items:center;flex:none;background:#f2a329;color:#fff}.case-missing-alert strong,.case-complete-alert strong{display:block;font-size:10px}.case-complete-alert{background:#eaf8f0;color:#238b61}.case-complete-alert>b{background:#38af7b}.case-detail-section{border-top:1px solid #eef0f5;padding:13px 0}.case-detail-section h4{margin:0 0 10px;font-size:12px}.case-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px 14px}.case-detail-grid label{display:block;color:#8a95a7;font-size:9px}.case-detail-grid label>span,.case-detail-grid label>strong{display:block;margin-top:5px}.case-detail-grid label>strong{color:#465267;font-size:10px;font-weight:550}.case-text-danger{color:#e04f59!important}.case-description{margin:0;color:#4e5b6f;font-size:10px;line-height:18px}.case-base-note{margin-top:8px;border-radius:6px;background:#f8f9fc;color:#526078;padding:8px;font-size:10px}.case-base-note span{display:block;color:#929bac;font-size:9px;margin-bottom:4px}.case-detail-fold{border-top:1px solid #eef0f5;padding:0}.case-detail-fold summary{display:flex;align-items:center;justify-content:space-between;list-style:none;padding:12px 0;color:#263247;font-size:11px;font-weight:600;cursor:pointer}.case-detail-fold summary::-webkit-details-marker{display:none}.case-chip-group{display:flex;gap:5px;flex-wrap:wrap;padding-bottom:10px}.case-chip-group i{border-radius:5px;background:#f0eeff;color:#6656d8;padding:5px 7px;font-style:normal;font-size:9px}.case-chip-group small{color:#98a1af;font-size:9px}.case-formula-line{display:flex;justify-content:space-between;gap:10px;padding:8px 0 11px;color:#8994a6;font-size:9px}.case-formula-line strong{color:#4e5a6e;font-size:10px}.case-audit-list{padding:0 0 12px 4px}.case-audit-list>div{display:flex;gap:8px;position:relative;padding:3px 0 10px}.case-audit-list i{width:7px;height:7px;margin-top:3px;border-radius:50%;background:#7666eb;box-shadow:0 0 0 3px #eeecff}.case-audit-list span strong,.case-audit-list span small{display:block}.case-audit-list span strong{font-size:9px;color:#4b576b}.case-audit-list span small{font-size:8px;color:#9aa3b1;margin-top:3px}.case-detail-actions{display:flex;gap:8px;padding:12px 17px;border-top:1px solid #e9ecf2;background:#fff}.case-detail-actions button{flex:1;margin:0;border-radius:7px;padding:9px 8px;font-size:10px;cursor:pointer}.case-action-secondary{border:1px solid #dfe3eb;background:#fff;color:#58657a}.case-reopen-action{border:1px solid #7768ef;background:#fff;color:#6656dc}.case-danger-action{border:1px solid #efc3c8;background:#fff7f8;color:#cb4e5a}.case-toast{position:fixed;z-index:1500;left:50%;bottom:34px;transform:translateX(-50%);border-radius:8px;background:#273246;color:#fff;padding:10px 16px;box-shadow:0 10px 30px #1118273b;font-size:11px}.case-toast.success{background:#238c62}.case-toast.danger{background:#c84d59}
.case-drawer-backdrop{position:fixed;inset:0;z-index:1300;background:#17203366;display:flex;justify-content:flex-end}.case-form-drawer{width:min(760px,calc(100vw - 36px));height:100vh;background:#fff;box-shadow:-18px 0 50px #11182726;display:flex;flex-direction:column}.case-form-drawer>header{display:flex;justify-content:space-between;align-items:flex-start;padding:20px 23px 17px;border-bottom:1px solid #e9ecf2}.case-form-drawer>header span{color:var(--primary);font-size:10px;font-weight:700}.case-form-drawer>header h3{margin:5px 0 0;font-size:19px}.case-form-drawer>header p{margin:6px 0 0;color:#929cab;font-size:10px}.case-form-drawer>header button{border:0;background:transparent;color:#8490a3;font-size:26px;cursor:pointer}.case-form-drawer form{min-height:0;display:flex;flex:1;flex-direction:column}.case-form-scroll{min-height:0;flex:1;overflow:auto;padding:0 23px}.case-form-scroll>section{padding:19px 0;border-bottom:1px solid #eef0f5}.case-form-section-title{display:flex;align-items:center;gap:10px;margin-bottom:14px}.case-form-section-title>b{width:28px;height:28px;border-radius:8px;background:#efedff;color:var(--primary);display:grid;place-items:center;font-size:10px}.case-form-section-title span strong,.case-form-section-title span small{display:block}.case-form-section-title span strong{font-size:13px;color:#243046}.case-form-section-title span small{margin-top:4px;color:#949ead;font-size:9px;font-weight:400}.case-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.case-form-grid label{display:grid;gap:6px;color:#68758a;font-size:10px}.case-form-grid label.full{grid-column:1/-1}.case-form-grid input,.case-form-grid select,.case-form-grid textarea{width:100%;box-sizing:border-box;border:1px solid #dfe4ec;border-radius:7px;background:#fff;color:#253147;padding:9px 10px;font:inherit;outline:0}.case-form-grid input,.case-form-grid select{height:39px}.case-form-grid textarea{resize:vertical;line-height:18px}.case-form-grid input:focus,.case-form-grid select:focus,.case-form-grid textarea:focus{border-color:#7b6cec;box-shadow:0 0 0 3px #6355e814}.case-form-grid input:disabled{background:#f6f7fa;color:#9099a8}.case-form-preview{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}.case-form-preview .case-image{aspect-ratio:1.5;min-height:84px}.case-consent-section.hidden{display:none}.case-consent-switch{display:flex!important;grid-template-columns:auto auto 1fr!important;align-items:center;gap:8px!important;border:1px solid #e0e4ed;border-radius:8px;padding:10px 12px}.case-consent-switch input{display:none}.case-consent-switch span{position:relative;width:34px;height:19px;border-radius:10px;background:#cbd1db;transition:.15s}.case-consent-switch span:after{content:"";position:absolute;width:15px;height:15px;left:2px;top:2px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #1720332e;transition:.15s}.case-consent-switch input:checked+span{background:#6757e4}.case-consent-switch input:checked+span:after{left:17px}.case-consent-switch b{font-size:10px;color:#475368}.case-form-error{min-height:16px;padding:7px 23px 0;color:#ca4c58;font-size:10px}.case-form-drawer footer{display:flex;justify-content:flex-end;gap:8px;padding:14px 23px 18px;border-top:1px solid #e8ebf1;background:#fff}.case-form-drawer footer button{min-width:92px;margin:0;border-radius:7px;padding:10px 14px;cursor:pointer}.case-form-drawer footer>button:first-child{border:1px solid #dfe3eb;background:#fff;color:#68758a}.case-dialog-backdrop{position:fixed;inset:0;z-index:1400;background:#17203366;display:grid;place-items:center;padding:20px}.case-archive-dialog{width:min(410px,100%);position:relative;border-radius:13px;background:#fff;padding:24px;box-shadow:0 20px 60px #1118273b;text-align:center}.case-archive-dialog>button{position:absolute;right:13px;top:10px;border:0;background:transparent;color:#8993a5;font-size:24px;cursor:pointer}.case-archive-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px;background:#eeedff;color:var(--primary);font-size:18px;font-weight:700}.case-archive-dialog h3{margin:0;font-size:17px}.case-archive-dialog>p{color:#677389;font-size:11px;line-height:19px}.case-archive-note{border-radius:7px;background:#f7f8fb;padding:11px;color:#788397;font-size:10px;line-height:17px;text-align:left}.case-archive-dialog footer{display:flex;gap:8px;margin-top:18px}.case-archive-dialog footer button{flex:1;margin:0;border-radius:7px;padding:10px;cursor:pointer}.case-archive-dialog footer>button:first-child{border:1px solid #dfe3eb;background:#fff;color:#68758a}
@media(max-width:1350px){.case-review-layout{grid-template-columns:minmax(620px,1.6fr) minmax(330px,1fr)}.case-filter-bar select{min-width:112px}.case-search-field{min-width:200px}.case-detail-scroll{padding-left:14px;padding-right:14px}}
@media(max-width:1050px){.case-review-layout{grid-template-columns:1fr}.case-detail-panel{position:static;min-height:0}.case-detail-scroll{max-height:none}.case-table-wrap{max-height:520px}.case-status-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.case-filter-bar{align-items:stretch}.case-search-field{flex-basis:100%}.case-filter-bar select{flex:1}.case-status-grid{gap:8px}.case-status-card{min-height:70px;padding:12px}.case-form-grid{grid-template-columns:1fr}.case-form-grid label.full{grid-column:auto}.case-form-preview{grid-template-columns:1fr}.case-form-drawer{width:100vw}.case-detail-grid{grid-template-columns:1fr}}

/* Account-first permission management */
.permission-metric>i.yellow{background:#fff8dc;color:#d49a19}.permission-filter-count{margin-left:auto;color:#7e899b;font-size:11px;white-space:nowrap}.permission-account-layout{display:grid;grid-template-columns:minmax(760px,1fr) 330px;gap:14px;align-items:start}.permission-account-list{min-width:0;overflow:hidden}.permission-account-table{width:100%;min-width:940px;border-collapse:collapse}.permission-account-table th,.permission-account-table td{border-bottom:1px solid #eef0f5;padding:12px 10px;text-align:left;font-size:10px;vertical-align:middle}.permission-account-table th{background:#fafbfc;color:#7f899b;font-weight:500;white-space:nowrap}.permission-account-table tbody tr{cursor:pointer;transition:.15s}.permission-account-table tbody tr:hover,.permission-account-table tbody tr.selected{background:#f7f5ff}.permission-account-table tbody tr.selected{box-shadow:inset 3px 0 var(--primary)}.permission-account-table td:nth-child(1){min-width:175px}.permission-account-table td:nth-child(3){min-width:135px}.permission-account-table td:nth-child(4){min-width:110px}.permission-account-name{display:flex;align-items:center;gap:9px}.permission-account-name>i{width:32px;height:32px;flex:none;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#cfc8ff,#7261df);color:#fff;font-style:normal;font-weight:700}.permission-account-name strong,.permission-account-name small{display:block}.permission-account-name strong{max-width:155px;overflow:hidden;text-overflow:ellipsis;color:var(--ink);font-size:11px;white-space:nowrap}.permission-account-name small{margin-top:3px;color:#8e98a8;font-size:9px;white-space:nowrap}.permission-account-name small em{display:inline-flex;margin-left:5px;border-radius:4px;background:#f0f1f4;color:#8992a1;padding:2px 4px;font-size:8px;font-style:normal}.permission-chip-list{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.permission-role-chip,.permission-more-chip,.permission-org-chip,.permission-unassigned-chip{display:inline-flex;align-items:center;border-radius:5px;padding:4px 6px;white-space:nowrap;font-size:9px}.permission-role-chip{border:1px solid #dcd7ff;background:#f2f0ff;color:#6254d9}.permission-more-chip{background:#eceef3;color:#687488}.permission-org-chip{background:#f2f4f7;color:#617087}.permission-unassigned-chip{border:1px solid #e0e4eb;background:#fff;color:#858f9f}.permission-status.pending{background:#fff3df;color:#c8790d}.permission-account-detail{position:sticky;top:12px;min-height:560px;padding:17px}.permission-account-detail-head>div{display:flex;align-items:center;justify-content:space-between}.permission-account-detail-head h3{margin:0;font-size:15px}.permission-account-detail-head>button{float:right;margin-top:-24px;border:0;background:transparent;color:#929bab;font-size:22px;cursor:pointer}.permission-account-identity{display:flex;align-items:center;gap:12px;padding:20px 0 17px}.permission-account-avatar{width:52px;height:52px;flex:none;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#ad9bea,#6546a9);color:#fff;font-size:20px;font-weight:700}.permission-account-identity h2{margin:0;font-size:17px}.permission-account-identity p{margin:5px 0 0;color:#667287;font-size:10px}.permission-account-identity span{display:inline-flex;margin-top:6px;border-radius:4px;background:#eeecff;color:var(--primary);padding:3px 6px;font-size:8px}.permission-account-section{border-top:1px solid #eceff4;padding:15px 0}.permission-account-section h4{margin:0 0 11px;font-size:12px}.permission-account-section dl{margin:0}.permission-account-section dl>div{display:flex;justify-content:space-between;gap:10px;padding:6px 0;font-size:10px}.permission-account-section dt{color:#8c96a7}.permission-account-section dd{margin:0;color:#48556b;text-align:right}.permission-section-heading{display:flex;align-items:center;justify-content:space-between}.permission-section-heading>span{color:#8d97a7;font-size:9px}.permission-account-bindings{display:grid;gap:7px}.permission-account-bindings article{display:flex;align-items:center;justify-content:space-between;border:1px solid #e7eaf0;border-radius:7px;padding:9px}.permission-account-bindings strong,.permission-account-bindings span{display:block}.permission-account-bindings strong{font-size:10px}.permission-account-bindings span{margin-top:4px;color:#8c96a7;font-size:9px}.permission-account-bindings small{border-radius:4px;background:#f0eeff;color:#6255d9;padding:4px 6px;font-size:8px}.permission-inline-empty{border:1px dashed #ddd8ff;border-radius:8px;background:#faf9ff;padding:12px;text-align:center}.permission-inline-empty strong{font-size:11px}.permission-inline-empty p{margin:5px 0 0;color:#8993a4;font-size:9px;line-height:16px}.permission-access-note{border-radius:7px;background:#f0eeff;color:#5b52c9;padding:10px 11px;font-size:9px;line-height:16px}.permission-access-note.warning{background:#fff4df;color:#a66713}.permission-account-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:13px}.permission-account-actions button{width:100%;margin:0}.permission-danger-note{margin:12px 0 0;color:#c57c13;font-size:9px;line-height:15px}.permission-account-error{display:grid;place-items:center;min-height:330px;text-align:center}.permission-account-error strong{font-size:14px}.permission-account-error p{max-width:380px;margin:7px 0 14px;color:#8c96a7;font-size:10px;line-height:17px}.permission-account-error button{margin:0}.permission-system-role-note{margin-top:12px;border-radius:7px;background:#f0eeff;color:#5e54d1;padding:10px;font-size:9px;line-height:16px}.permission-account-drawer{width:min(470px,100%)}.permission-drawer-body input[type=email]{width:100%;height:39px;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);padding:9px 10px;font:inherit;outline:0}.permission-drawer-body input[type=email]:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6355e817}.permission-drawer-account{display:flex;align-items:center;gap:10px;border:1px solid #e6e9ef;border-radius:8px;background:#f9fafc;padding:11px}.permission-drawer-account>i{width:35px;height:35px;border-radius:50%;display:grid;place-items:center;background:#eae7ff;color:var(--primary);font-style:normal;font-weight:700}.permission-drawer-account strong,.permission-drawer-account small{display:block}.permission-drawer-account strong{font-size:11px}.permission-drawer-account small{margin-top:4px;color:#8d97a7;font-size:9px}.permission-drawer-tip{margin-top:11px;border-radius:7px;background:#f5f3ff;color:#6259c8;padding:9px 10px;font-size:9px;line-height:15px}.permission-access-list{margin:0;padding-left:18px;color:#69758a;font-size:10px;line-height:22px}
@media(max-width:1380px){.permission-account-layout{grid-template-columns:1fr}.permission-account-detail{position:static;min-height:auto}.permission-account-detail .permission-detail-empty{min-height:180px}}
@media(max-width:900px){.account-filter-bar{align-items:stretch;flex-wrap:wrap}.account-filter-bar .permission-search{width:100%;flex-basis:100%}.permission-filter-count{margin-left:0;align-self:center}.permission-title-row .toolbar{flex-wrap:wrap}}

/* Formula history */
.history-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}.history-summary article{padding:16px 18px}.history-summary span,.history-summary small{display:block;color:#8a95a7;font-size:10px}.history-summary strong{display:block;margin:8px 0 5px;color:#1c273a;font-size:25px;line-height:1}.history-panel{padding:0;overflow:hidden}.history-panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 17px;border-bottom:1px solid #eceff4}.history-tabs{display:flex;align-items:center;gap:5px}.history-tabs button{border:0;border-radius:7px;background:transparent;color:#778297;padding:8px 11px;font-size:10px;cursor:pointer}.history-tabs button span{display:inline-flex;min-width:19px;justify-content:center;margin-left:4px;border-radius:10px;background:#eef0f4;padding:2px 5px;color:#778297;font-size:8px}.history-tabs button.active{background:#efedff;color:#6253d9;font-weight:650}.history-tabs button.active span{background:#fff;color:#6253d9}.history-search{width:min(310px,38vw);height:34px;display:flex;align-items:center;gap:7px;box-sizing:border-box;border:1px solid #e0e4eb;border-radius:7px;background:#fff;padding:0 10px;color:#8d97a7}.history-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:#344056;font:inherit;font-size:10px}.history-search input::placeholder{color:#a2aab7}.history-source-note{padding:9px 17px;border-bottom:1px solid #f0f2f6;background:#fafbfc;color:#8a95a7;font-size:9px}.history-table-wrap{overflow:auto;max-height:590px}.history-table{min-width:780px}.history-table thead{position:sticky;top:0;z-index:2}.history-table th{background:#fafbfc}.history-table td{vertical-align:middle}.history-table time{color:#647087;font-variant-numeric:tabular-nums;white-space:nowrap}.history-formula-cell strong,.history-formula-cell small{display:block}.history-formula-cell strong{max-width:280px;overflow:hidden;color:#263247;text-overflow:ellipsis;white-space:nowrap}.history-formula-cell small{margin-top:4px;color:#929cab;font-size:9px}.history-badge{display:inline-flex;align-items:center;border-radius:5px;padding:5px 7px;font-size:9px;font-weight:600;white-space:nowrap}.history-badge.success{background:#e8f7ef;color:#26976a}.history-badge.danger{background:#fff0f1;color:#cc5360}.history-badge.progress{background:#edf2ff;color:#5274cf}.history-badge.pending{background:#fff4df;color:#c67a12}.history-badge.action{background:#efedff;color:#6253d9}
@media(max-width:760px){.history-summary{grid-template-columns:1fr}.history-panel-head{align-items:stretch;flex-direction:column}.history-search{width:100%}}

/* Formula history phase 1: organization scope and evidence-only dispensing statistics */
.history-page{max-width:1600px}.history-workspace{display:grid;grid-template-columns:250px minmax(0,1fr);gap:14px;align-items:start}.history-org-panel{position:sticky;top:12px;padding:15px;min-height:710px}.history-org-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:12px}.history-org-head h3{margin:0;font-size:14px}.history-org-head small{display:block;margin-top:5px;color:#929cac;font-size:9px;line-height:15px}.history-org-search{height:35px;display:flex;align-items:center;gap:7px;border:1px solid #e1e5ec;border-radius:7px;padding:0 9px;color:#929cac}.history-org-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;font:inherit;font-size:10px}.history-org-scope{display:flex;align-items:center;gap:7px;padding:10px 2px;color:#647087;font-size:10px}.history-org-scope input{accent-color:var(--primary)}.history-org-tree{max-height:610px;overflow:auto;margin:0 -6px}.history-org-node{width:100%;min-height:42px;display:flex;align-items:center;gap:7px;border:0;border-radius:7px;background:transparent;padding:6px 7px;text-align:left;color:#354158;cursor:pointer}.history-org-node:hover,.history-org-node.selected{background:#f1efff}.history-org-node.selected{color:#6253d9}.history-org-node.depth-1{padding-left:20px}.history-org-node.depth-2{padding-left:35px}.history-org-node.depth-3{padding-left:50px}.history-org-node.depth-4{padding-left:65px}.history-org-arrow{width:11px;flex:none;color:#7d8799;font-size:16px;line-height:1;transition:transform .15s}.history-org-arrow.expanded{transform:rotate(90deg)}.history-org-icon{width:24px;height:24px;display:grid;place-items:center;flex:none;border-radius:6px;background:#eef0ff;color:#6457d9;font-size:11px}.history-org-icon.store{background:#ebf8f3;color:#259a6e}.history-org-name{min-width:0;flex:1}.history-org-name strong,.history-org-name small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-org-name strong{font-size:10px}.history-org-name small{margin-top:3px;color:#98a1af;font-size:8px}.history-org-node em{min-width:21px;border-radius:11px;background:#f0f2f5;padding:3px 5px;color:#8791a2;text-align:center;font-size:8px;font-style:normal}.history-org-empty{padding:28px 10px;color:#919bab;text-align:center;font-size:10px;line-height:17px}.history-main{min-width:0}.history-filter-panel{margin-bottom:12px;padding:14px 16px}.history-filter-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:13px}.history-filter-heading h3{margin:0;font-size:14px}.history-filter-heading p{margin:5px 0 0;color:#8994a6;font-size:9px}.history-filter-heading .primary-btn{margin:0;padding:8px 16px}.history-filter-grid{display:grid;grid-template-columns:110px minmax(340px,1.7fr) minmax(130px,.8fr) minmax(120px,.65fr) auto;gap:9px;align-items:end}.history-filter-grid label>span{display:block;margin-bottom:6px;color:#7f8a9c;font-size:9px}.history-filter-grid select,.history-filter-grid input{width:100%;height:34px;box-sizing:border-box;border:1px solid #dfe4eb;border-radius:7px;background:#fff;color:#364157;padding:0 9px;outline:0;font:inherit;font-size:10px}.history-date-range>div{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:6px}.history-date-range b{color:#a0a8b7;font-weight:400}.history-reset{height:34px;border:1px solid #dfe4eb;border-radius:7px;background:#fff;color:#667287;padding:0 12px;font-size:10px;cursor:pointer}.history-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.history-summary article{position:relative;overflow:hidden}.history-summary article:after{content:"";position:absolute;right:14px;top:15px;width:7px;height:7px;border-radius:50%;background:#7164e8}.history-summary article.dye:after{background:#705cf1}.history-summary article.developer:after{background:#1ba8a4}.history-summary strong{font-size:22px}.history-source-note.warning{background:#fff8e8;color:#9b6817}.history-stats-view{padding:14px}.history-evidence-warning{display:flex;align-items:flex-start;gap:12px;margin-bottom:12px;border:1px solid #f2d89d;border-radius:8px;background:#fff9eb;padding:11px 13px;color:#8d621d}.history-evidence-warning strong{font-size:11px;white-space:nowrap}.history-evidence-warning span{font-size:9px;line-height:16px}.history-rankings{display:grid;grid-template-columns:1fr 1fr;gap:12px}.history-ranking,.history-operator-summary{border:1px solid #e8ebf1;border-radius:9px;background:#fff;overflow:hidden}.history-ranking-title,.history-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #eef0f4;background:#fafbfc;padding:11px 13px}.history-ranking-title h4,.history-section-title h4{margin:0;font-size:11px}.history-ranking-title span,.history-section-title span{color:#8d97a8;font-size:8px}.history-bar-row{display:grid;grid-template-columns:80px 1fr 72px;align-items:center;gap:9px;padding:9px 13px}.history-bar-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.history-bar-row>div{height:7px;overflow:hidden;border-radius:5px;background:#f0f2f5}.history-bar-row i{display:block;height:100%;border-radius:5px;background:#6c5ce7}.history-bar-row i.developer{background:#1ba8a4}.history-bar-row em{text-align:right;color:#596579;font-size:9px;font-style:normal;font-variant-numeric:tabular-nums}.history-ranking-empty{display:grid;place-items:center;min-height:112px;padding:20px;color:#919bab;text-align:center;font-size:9px;line-height:16px}.history-operator-summary{margin-top:12px}.history-operator-summary .history-table-wrap{max-height:240px}.history-dispense-table{min-width:1120px}.history-dispense-table td:nth-child(7),.history-dispense-table td:nth-child(8){max-width:190px;color:#586579;font-size:9px;line-height:15px}.history-loading{min-height:260px;display:grid;place-items:center}
@media(max-width:1200px){.history-workspace{grid-template-columns:220px minmax(0,1fr)}.history-filter-grid{grid-template-columns:1fr 2fr 1fr 1fr}.history-filter-grid .history-reset{grid-column:4}.history-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.history-workspace{grid-template-columns:1fr}.history-org-panel{position:static;min-height:auto}.history-org-tree{max-height:280px}.history-filter-grid{grid-template-columns:1fr 1fr}.history-date-range{grid-column:1/-1}.history-filter-grid .history-reset{grid-column:auto}.history-rankings{grid-template-columns:1fr}}
@media(max-width:620px){.history-filter-grid{grid-template-columns:1fr}.history-date-range{grid-column:auto}.history-date-range>div{grid-template-columns:1fr}.history-date-range b{display:none}.history-summary{grid-template-columns:1fr}.history-filter-heading{align-items:stretch;flex-direction:column}.history-filter-heading .primary-btn{width:100%}}

/* Formula history phase 2: complete information architecture and task reconciliation */
.history-org-actions{display:flex;gap:4px}.history-org-actions button{border:1px solid #e1e5ec;border-radius:5px;background:#fff;color:#758095;padding:4px 6px;font-size:8px;cursor:pointer}.history-org-scope{display:grid;grid-template-columns:1fr 1fr;gap:3px;margin:9px 0;padding:3px;border-radius:7px;background:#f2f3f7}.history-org-scope button{height:28px;border:0;border-radius:5px;background:transparent;color:#7a8597;font-size:9px;cursor:pointer}.history-org-scope button.active{background:#fff;color:#6253d9;font-weight:650;box-shadow:0 1px 4px #25365d16}.history-filter-grid{grid-template-columns:105px minmax(310px,1.7fr) minmax(120px,.8fr) 105px 105px minmax(130px,.9fr);align-items:end}.history-keyword-filter{grid-column:1/-2}.history-keyword-filter>div{height:34px;display:flex;align-items:center;gap:7px;border:1px solid #dfe4eb;border-radius:7px;background:#fff;padding:0 9px;color:#929cac}.history-keyword-filter>div input{height:30px;border:0;padding:0}.history-result-scope{max-width:420px;overflow:hidden;color:#8791a2;text-overflow:ellipsis;white-space:nowrap;font-size:9px}.history-summary small.warning{color:#bc651c}.history-dispense-table{min-width:1390px}.history-dispense-table th:first-child,.history-dispense-table td:first-child{width:30px;padding-left:12px;padding-right:2px}.history-dispense-table td:nth-child(6),.history-dispense-table td:nth-child(7){max-width:190px;color:#586579;font-size:9px;line-height:15px}.history-record-row{cursor:pointer;transition:background .15s}.history-record-row:hover,.history-record-row.expanded{background:#faf9ff}.history-row-expander{width:22px;height:22px;border:0;border-radius:5px;background:#f0efff;color:#6657db;font-size:17px;line-height:1;cursor:pointer;transition:transform .15s}.history-record-row.expanded .history-row-expander{transform:rotate(90deg)}.history-customer{display:block;margin-top:5px;color:#8d97a8;font-size:9px}.history-detail-row>td{padding:0 16px 14px 44px!important;border-bottom:1px solid #e8eaf0;background:#faf9ff}.history-record-detail{overflow:hidden;border:1px solid #ddd9ff;border-radius:9px;background:#fff}.history-record-detail-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:11px 13px;background:#f7f6ff}.history-record-detail-head>div:first-child strong,.history-record-detail-head>div:first-child span{display:block}.history-record-detail-head>div:first-child strong{font-size:11px}.history-record-detail-head>div:first-child span{margin-top:4px;color:#8a94a6;font-size:8px}.history-record-detail-head>div:last-child{display:flex;gap:18px}.history-record-detail-head>div:last-child span{color:#808a9c;font-size:8px;white-space:nowrap}.history-record-detail-head b{margin-left:4px;color:#263247;font-size:10px}.history-detail-table{width:100%;border-collapse:collapse;font-size:9px}.history-detail-table th,.history-detail-table td{padding:9px 13px!important;border-bottom:1px solid #f0f1f5;text-align:left}.history-detail-table th{color:#8490a2;background:#fcfcfd;font-weight:500}.history-detail-table tbody tr:last-child td{border-bottom:0}.history-detail-empty{padding:20px;color:#8a94a6;text-align:center;font-size:9px}.history-variance-positive{color:#c75f32!important}.history-variance-negative{color:#287caf!important}
@media(max-width:1300px){.history-filter-grid{grid-template-columns:110px minmax(300px,2fr) 1fr 1fr}.history-keyword-filter{grid-column:1/-1}.history-filter-grid .history-reset{grid-column:auto}.history-record-detail-head{align-items:flex-start;flex-direction:column}.history-record-detail-head>div:last-child{flex-wrap:wrap}}
@media(max-width:900px){.history-filter-grid{grid-template-columns:1fr 1fr}.history-keyword-filter{grid-column:1/-1}.history-result-scope{max-width:none}.history-panel-head{align-items:stretch;flex-direction:column}}
@media(max-width:620px){.history-filter-grid{grid-template-columns:1fr}.history-keyword-filter{grid-column:auto}.history-record-detail-head>div:last-child{display:grid;grid-template-columns:1fr 1fr}.history-detail-row>td{padding-left:8px!important}}

/* Formula history · phase 1 fixed 12-slot dye analytics */
.history-kpi-pass{color:#18875d!important}.history-kpi-fail{color:#c45a32!important}.history-dye-phase{display:flex;flex-direction:column;gap:12px}.history-phase-banner{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid #dcd8ff;border-radius:9px;background:linear-gradient(100deg,#f6f4ff,#fff);padding:12px 14px}.history-phase-banner>div{display:flex;align-items:center;gap:10px}.history-phase-banner>div>span{border-radius:12px;background:#e6f8ef;padding:4px 8px;color:#198b62;font-size:8px;font-weight:700}.history-phase-banner strong{color:#27334a;font-size:11px}.history-phase-banner p{margin:0;color:#7f8999;font-size:9px;line-height:15px;text-align:right}.history-dye-card{overflow:hidden;border:1px solid #e5e8ef;border-radius:10px;background:#fff}.history-dye-card-head{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #eef0f4;background:#fafbfc;padding:12px 14px}.history-dye-card-head h4{margin:0;color:#202c41;font-size:14px}.history-dye-card-head>div:first-child>span{display:block;margin-top:4px;color:#8a95a7;font-size:8px}.history-dye-card-head>div:last-child{display:flex;align-items:center;gap:18px}.history-dye-card-head>div:last-child>span{color:#8590a2;font-size:8px;white-space:nowrap}.history-dye-card-head b{display:block;margin-top:4px;color:#2d394d;font-size:10px}.history-operator-basis{border-bottom:1px solid #eef0f4;background:#fffdf7;padding:8px 14px;color:#9a6b1e;font-size:9px}.history-dye-slot-grid{display:grid;grid-template-columns:repeat(6,minmax(90px,1fr));gap:8px;padding:13px 14px}.history-dye-slot{position:relative;min-height:58px;border:1px solid #ddd9ff;border-radius:8px;background:#f8f7ff;padding:9px 10px}.history-dye-slot:after{content:"";position:absolute;left:10px;right:10px;bottom:7px;height:3px;border-radius:2px;background:#6757e7}.history-dye-slot.zero{border-color:#e8ebf0;background:#fbfcfd}.history-dye-slot.zero:after{background:#e9ecf1}.history-dye-slot span,.history-dye-slot strong,.history-dye-slot em{display:block}.history-dye-slot span{color:#9aa3b1;font-size:7px}.history-dye-slot strong{margin-top:4px;color:#344056;font-size:10px}.history-dye-slot em{margin-top:5px;color:#1f2b40;font-size:10px;font-style:normal;font-weight:700;font-variant-numeric:tabular-nums}.history-dye-slot.zero em{color:#8993a2;font-weight:500}.history-dye-check{display:flex;align-items:center;gap:12px;margin:0 14px 12px;border-radius:7px;padding:9px 11px}.history-dye-check.pass{background:#eef9f4;color:#237d5b}.history-dye-check.fail{background:#fff2ed;color:#b75431}.history-dye-check strong{font-size:9px;white-space:nowrap}.history-dye-check span{font-size:8px;line-height:14px}.history-dye-check small{margin-left:auto;font-size:8px}.history-dye-data-note{margin:-4px 14px 12px;border-radius:6px;background:#f6f7fa;padding:7px 10px;color:#7f8999;font-size:8px}.history-dye-data-note.warning{background:#fff8e8;color:#9b6817}
@media(max-width:1250px){.history-dye-slot-grid{grid-template-columns:repeat(4,minmax(90px,1fr))}.history-dye-card-head{align-items:flex-start}.history-dye-card-head>div:last-child{flex-wrap:wrap;justify-content:flex-end}.history-phase-banner{align-items:flex-start;flex-direction:column}.history-phase-banner p{text-align:left}}
@media(max-width:760px){.history-dye-slot-grid{grid-template-columns:repeat(2,minmax(100px,1fr))}.history-dye-card-head{flex-direction:column}.history-dye-card-head>div:last-child{justify-content:flex-start}.history-dye-check{align-items:flex-start;flex-direction:column}.history-dye-check small{margin-left:0}}
.history-dye-check.neutral{background:#f5f6f8;color:#7f8999}
.history-phase2-breakdown{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(220px,.8fr);gap:12px;margin:0 14px 12px;padding:11px;border:1px solid #e2e6ed;border-radius:8px;background:#fafbfc}.history-phase2-breakdown.complete{border-color:#cfeadd;background:#f6fcf9}.history-phase2-breakdown.incomplete{border-color:#f0dfba;background:#fffbf2}.history-phase2-developer>strong{display:block;margin-bottom:7px;color:#556176;font-size:9px}.history-phase2-developer>div{display:flex;flex-wrap:wrap;gap:6px}.history-phase2-developer>div span{display:flex;align-items:center;gap:7px;border:1px solid #d9e7e2;border-radius:6px;background:#fff;padding:6px 8px;color:#607083;font-size:8px}.history-phase2-developer>div span b{color:#16978f;font-size:9px}.history-phase2-developer>div em{color:#a16c1c;font-size:10px;font-style:normal;font-weight:700}.history-phase2-total{display:grid;grid-template-columns:1fr 1fr;gap:7px}.history-phase2-total span{border-radius:6px;background:#fff;padding:8px;color:#7c8798;font-size:8px}.history-phase2-total b{display:block;margin-top:5px;color:#243148;font-size:11px}.history-phase2-breakdown>p{grid-column:1/-1;margin:0;border-top:1px dashed #dce2e9;padding-top:8px;color:#31765d;font-size:8px;line-height:14px}.history-phase2-breakdown>p.fail,.history-phase2-breakdown>p.warning{color:#a36b17}
@media(max-width:900px){.history-phase2-breakdown{grid-template-columns:1fr}.history-phase2-total{grid-template-columns:1fr 1fr}}

/* Remove the redundant customer scope copy while retaining the two primary actions. */
.customer-org-page .customer-scope-heading,.customer-org-page .customer-page-actions>small{display:none}.customer-org-page .customer-page-bar{justify-content:flex-end}

/* Customer archive refinement: reuse the organization-management tree language. */
body{font-family:var(--font-ui);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;line-height:1.5;font-variant-numeric:tabular-nums}
button,input,select,textarea{font:inherit}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.customer-org-page{max-width:1680px;padding-top:22px;color:#20293a}.customer-page-bar{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:18px;padding:0 2px}.customer-scope-kicker{display:block;margin-bottom:5px;color:#7b8494;font-size:11px;font-weight:600;letter-spacing:.08em}.customer-scope-heading h2{margin:0;color:#182234;font-size:21px;font-weight:650;letter-spacing:-.02em}.customer-scope-heading p{margin:5px 0 0;color:#828c9d;font-size:12px}.customer-page-actions{display:grid;grid-template-columns:auto auto;gap:8px;align-items:end}.customer-page-actions small{grid-column:1/-1;color:#8b94a4;font-size:10px;text-align:right}.customer-page-actions button{height:38px;margin:0;padding:0 15px;border-radius:7px;font-size:12px;font-weight:600}.customer-page-actions .secondary-btn{border:1px solid #dfe3ea;background:#fff;color:#4f5b70}.customer-page-actions .primary-btn{box-shadow:none}
.customer-org-layout{display:grid;grid-template-columns:292px minmax(520px,1fr) 348px;gap:16px;align-items:start}.customer-org-tree.org-tree-panel{display:flex;flex-direction:column;min-height:660px;max-height:calc(100vh - 148px);padding:18px 14px;position:sticky;top:14px;border-color:#e7eaf0;border-radius:9px;box-shadow:0 2px 8px rgba(31,42,64,.035)}.customer-panel-head.org-tree-head{flex:none;align-items:flex-start;margin:0 0 14px;padding:0 2px 14px;border-bottom:1px solid #eceff3}.customer-panel-head.org-tree-head h3{font-size:15px;font-weight:650}.customer-panel-head.org-tree-head small{margin-top:4px;color:#929aa8;font-size:10px}.customer-panel-head.org-tree-head button{height:29px;padding:0 9px;border-color:#e0e4ea;border-radius:6px;color:#677286;font-size:10px}.customer-org-search.org-tree-search{display:flex;align-items:center;gap:9px;height:36px;flex:none;margin:0 0 10px;padding:0 10px;border:1px solid #dfe3ea;border-radius:7px;background:#fff;cursor:text}.customer-org-search.org-tree-search:focus-within,.customer-filter-search:focus-within{border-color:#8b83e9;box-shadow:0 0 0 3px rgba(99,85,232,.08)}.customer-org-search.org-tree-search input{min-width:0;height:auto;flex:1;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#303a4d;font-size:11px}.customer-org-search input::placeholder,.customer-filter-search input::placeholder{color:#a0a7b3}.customer-search-icon{position:relative;width:14px;height:14px;flex:none}.customer-search-icon:before{content:"";position:absolute;left:1px;top:1px;width:8px;height:8px;border:1.5px solid #8c96a7;border-radius:50%}.customer-search-icon:after{content:"";position:absolute;right:1px;bottom:1px;width:5px;height:1.5px;border-radius:2px;background:#8c96a7;transform:rotate(45deg);transform-origin:right center}.customer-org-list.org-tree-list{min-height:0;max-height:none;flex:1;margin:0 -5px;padding:2px 5px;overflow:auto}.org-tree-row.customer-org-node{min-height:45px;gap:8px;margin:1px 0;padding-top:6px;padding-right:7px;padding-bottom:6px;border:0;border-radius:7px;background:transparent;color:#4e5a6f}.org-tree-row.customer-org-node:hover{background:#f5f6f9}.org-tree-row.customer-org-node.selected{background:#f0effb;color:#5146c8;box-shadow:inset 3px 0 #6658df}.customer-org-node.depth-0{padding-left:6px}.customer-org-node.depth-1{padding-left:21px}.customer-org-node.depth-2{padding-left:36px}.customer-org-node.depth-3{padding-left:51px}.customer-org-node.depth-4{padding-left:66px}.customer-org-arrow.org-toggle{width:12px;flex:none;color:#778195;font-size:17px;line-height:1}.customer-org-name.org-tree-name{min-width:0;flex:1}.customer-org-name.org-tree-name strong,.customer-org-name.org-tree-name small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-org-name.org-tree-name strong{color:inherit;font-size:12px;font-weight:600}.customer-org-name.org-tree-name small{margin-top:2px;color:#9aa2af;font-size:9px}.customer-org-node em{min-width:23px;margin-left:0;padding:2px 6px;border-radius:10px;background:#f0f2f5;color:#8993a2;text-align:center;font-size:9px;font-style:normal}.customer-org-node.selected em{background:#fff;color:#6658d8}.customer-manage-org{display:flex;align-items:center;gap:8px;width:100%;height:39px;flex:none;margin-top:12px;padding:0 9px;border:1px solid #e4e7ed;border-radius:7px;background:#fafbfc;color:#5d687b;text-align:left;font-size:11px;cursor:pointer}.customer-manage-org:hover{border-color:#cfcbe9;background:#f7f6fc;color:#5146c8}.customer-manage-org i{margin-left:auto;color:#8f98a8;font-style:normal}.customer-manage-icon{position:relative;width:16px;height:16px;border:1.5px solid currentColor;border-radius:4px}.customer-manage-icon:before,.customer-manage-icon:after{content:"";position:absolute;left:3px;right:3px;height:1.5px;background:currentColor}.customer-manage-icon:before{top:4px}.customer-manage-icon:after{top:9px}
/* Shared node icons used by organization management and customer archives. */
.org-node-icon{position:relative;width:28px;height:28px;flex:none;border-radius:7px;background:#eef2ff;color:#5969d7;font-size:0!important;box-shadow:none}.org-node-icon:before,.org-node-icon:after{content:"";position:absolute;box-sizing:border-box}.org-node-icon:before{left:7px;top:7px;width:14px;height:14px;border:1.5px solid currentColor;border-radius:2px;background:linear-gradient(currentColor,currentColor) 3px 3px/2px 2px no-repeat,linear-gradient(currentColor,currentColor) 8px 3px/2px 2px no-repeat,linear-gradient(currentColor,currentColor) 3px 8px/2px 2px no-repeat,linear-gradient(currentColor,currentColor) 8px 8px/2px 2px no-repeat}.org-node-icon:after{left:12px;bottom:6px;width:4px;height:5px;border:1.5px solid currentColor;border-bottom:0}.org-node-icon.agent{background:#f0effc;color:#6758d5}.org-node-icon.chain{background:#edf4ff;color:#4d79cc}.org-node-icon.chain:before,.org-node-icon.distributor:before{left:7px;top:7px;width:10px;height:10px;border:1.5px solid currentColor;border-radius:3px;background:none}.org-node-icon.chain:after,.org-node-icon.distributor:after{left:11px;top:11px;width:10px;height:10px;border:1.5px solid currentColor;border-radius:3px;background:transparent}.org-node-icon.distributor{background:#fff3e9;color:#d47b3e}.org-node-icon.store{background:#ebf7f2;color:#258a65}.org-node-icon.store:before{left:6px;top:7px;width:16px;height:6px;border:1.5px solid currentColor;border-radius:3px 3px 2px 2px;background:repeating-linear-gradient(90deg,transparent 0,transparent 3px,currentColor 3px,currentColor 4.5px)}.org-node-icon.store:after{left:8px;top:13px;width:12px;height:9px;border:1.5px solid currentColor;border-top:0;border-radius:0 0 2px 2px}.org-node-icon.region{background:#eef6ff;color:#4b82c3}.org-node-icon.region:before{left:8px;top:6px;width:12px;height:12px;border:1.5px solid currentColor;border-radius:50% 50% 50% 0;background:none;transform:rotate(-45deg)}.org-node-icon.region:after{left:12px;top:10px;width:4px;height:4px;border-radius:50%;background:currentColor}.org-node-icon.company,.org-node-icon.organization{background:#edf5fb;color:#477eaa}
.customer-directory{min-width:0}.customer-toolbar{display:grid;grid-template-columns:minmax(240px,1fr) 160px auto auto;gap:8px;align-items:center;margin:0 0 12px;padding:11px 12px;border-color:#e7eaf0;border-radius:9px;box-shadow:none}.customer-filter-search{display:flex;align-items:center;gap:9px;height:36px;min-width:0;padding:0 10px;border:1px solid #dfe3ea;border-radius:7px;background:#fff}.customer-filter-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:#303a4d;font-size:11px}.customer-toolbar .select{width:100%;height:36px;border-color:#dfe3ea;color:#536074;font-size:11px}.customer-toolbar .primary-btn{height:36px;margin:0;padding:0 18px;border-radius:7px;font-size:11px;font-weight:600;box-shadow:none}.customer-reset-btn{height:36px;padding:0 12px;border:1px solid transparent;background:transparent;color:#758094;font-size:11px;cursor:pointer}.customer-reset-btn:hover{background:#f4f5f8;color:#39465b}.customer-table-card{min-height:591px;padding:0;border-color:#e7eaf0;border-radius:9px;box-shadow:0 2px 8px rgba(31,42,64,.035);overflow:hidden}.customer-table-heading{min-height:64px;padding:14px 16px;border-bottom:1px solid #e9ecf1}.customer-table-heading h3{color:#202a3c;font-size:15px;font-weight:650}.customer-table-heading span{margin-top:3px;color:#929aa8;font-size:10px}.customer-data-status{display:inline-flex!important;align-items:center;height:25px;margin:0!important;padding:0 9px;border:1px solid #e1e4ea;border-radius:13px;background:#fafbfc;color:#667286!important;font-size:10px!important}.customer-table-wrap{overflow:auto}.customer-table-card .table{min-width:700px;font-size:11px}.customer-table-card .table th{height:39px;padding:0 16px;background:#fafbfc;color:#7d8797;font-size:10px;font-weight:500}.customer-table-card .table td{height:56px;padding:0 16px;border-bottom:1px solid #edf0f4;color:#4c586b}.customer-table-card .table th:nth-child(1){width:26%}.customer-table-card .table th:nth-child(2){width:21%}.customer-table-card .table th:nth-child(3){width:18%}.customer-table-card .table th:nth-child(4){width:27%}.customer-table-card .table th:last-child,.customer-table-card .table tr[data-customer-row] td:last-child{display:table-cell}.customer-table-card .table tbody tr{cursor:pointer;outline:0;transition:background-color .14s}.customer-table-card .table tbody tr:hover{background:#fafbfc}.customer-table-card .table tbody tr.selected{background:#f5f4fb;box-shadow:inset 3px 0 #6658df}.customer-table-card .table tbody tr:focus-visible{box-shadow:inset 0 0 0 2px #8a82e4}.customer-name-cell{display:flex;align-items:center;gap:10px}.customer-list-avatar{width:28px;height:28px;display:grid;place-items:center;flex:none;border-radius:50%;background:#eef0f4;color:#536075;font-size:11px;font-weight:650}.customer-table-card tr.selected .customer-list-avatar{background:#e8e5fa;color:#5a4dce}.customer-name-cell strong{overflow:hidden;color:#283247!important;font-size:11px;font-weight:600!important;text-overflow:ellipsis;white-space:nowrap}.customer-phone-cell,.customer-date-cell{font-variant-numeric:tabular-nums;white-space:nowrap}.customer-level-pill{display:inline-flex;align-items:center;min-height:23px;padding:0 8px;border-radius:5px;background:#f0f2f5;color:#596579;font-size:10px}.customer-row-action{text-align:right;white-space:nowrap}.customer-row-action span{color:#6457d3;font-size:10px}.customer-row-action i{margin-left:4px;color:#9aa2af;font-size:15px;font-style:normal}
.customer-profile-panel{display:flex;flex-direction:column;min-height:660px;max-height:calc(100vh - 148px);padding:18px;position:sticky;top:14px;border-color:#e7eaf0;border-radius:9px;box-shadow:0 2px 8px rgba(31,42,64,.035);overflow:auto}.customer-detail-empty{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;min-height:310px;padding:34px 18px;color:#778296;text-align:center}.customer-detail-empty strong{margin-top:14px;color:#485469;font-size:13px;font-weight:600}.customer-detail-empty p{max-width:220px;margin:6px 0 0;color:#9aa2af;font-size:10px;line-height:18px}.customer-empty-icon{position:relative;width:42px;height:42px;border:1px solid #dfe3e9;border-radius:50%;background:#fafbfc}.customer-empty-icon:before{content:"";position:absolute;left:13px;top:9px;width:14px;height:14px;border:1.5px solid #9aa4b4;border-radius:50%}.customer-empty-icon:after{content:"";position:absolute;left:9px;bottom:8px;width:22px;height:11px;border:1.5px solid #9aa4b4;border-radius:13px 13px 7px 7px}.customer-detail-head{position:relative;display:flex;align-items:center;gap:12px;padding:0 30px 18px 0}.customer-avatar{width:46px;height:46px;border-radius:50%;background:#5f6b80;color:#fff;font-size:18px;font-weight:650}.customer-detail-identity{min-width:0}.customer-detail-identity h2{overflow:hidden;margin:0 0 5px;color:#202a3d;font-size:17px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}.customer-detail-identity span{display:inline-flex;align-items:center;height:21px;padding:0 7px;border-radius:5px;background:#f0eff9;color:#5d52c5;font-size:9px}.customer-detail-close{position:absolute;right:-5px;top:-7px;width:28px;height:28px;border:0;border-radius:6px;background:transparent;color:#8d96a5;font-size:20px;line-height:1;cursor:pointer}.customer-detail-close:hover{background:#f2f3f6;color:#4b566a}.customer-profile-panel .customer-detail-section{padding:15px 0;border-top:1px solid #eceff3}.customer-detail-section h3,.customer-section-title h3{margin:0 0 11px;color:#293348;font-size:12px;font-weight:650}.customer-info-grid{display:grid;gap:9px;margin:0}.customer-info-grid.compact{grid-template-columns:1fr 1fr}.customer-info-grid div{display:flex;align-items:flex-start;gap:10px}.customer-info-grid.compact div{display:block;padding:10px;border-radius:6px;background:#f7f8fa}.customer-info-grid dt{width:66px;flex:none;color:#8b95a5;font-size:10px}.customer-info-grid dd{margin:0;color:#48556a;font-size:10px;font-weight:500;word-break:break-word}.customer-info-grid.compact dt{width:auto;margin-bottom:4px}.customer-info-grid.compact dd{font-size:11px}.customer-note+.customer-note{margin-top:8px}.customer-note span{display:block;margin-bottom:5px;color:#8b95a5;font-size:9px}.customer-note p{min-height:32px;margin:0;padding:8px 9px;border:1px solid #eef0f3;border-radius:6px;background:#f8f9fa;color:#566277;font-size:10px;line-height:16px;white-space:pre-wrap}.customer-section-title{display:flex;align-items:center;justify-content:space-between}.customer-section-title h3{margin-bottom:11px}.customer-section-title span{color:#9aa2af;font-size:9px}.customer-photo-grid{gap:6px}.customer-photo-grid img,.customer-photo-grid span{aspect-ratio:1.25;border:1px solid #eceff3;border-radius:6px;background:#f4f5f7}.customer-photo-empty{position:relative}.customer-photo-empty:before{content:"";position:absolute;left:50%;top:50%;width:16px;height:12px;border:1px solid #b4bbc6;border-radius:2px;transform:translate(-50%,-50%)}.customer-photo-empty:after{content:"";position:absolute;left:calc(50% - 4px);top:calc(50% - 2px);width:8px;height:6px;border-left:1px solid #b4bbc6;border-top:1px solid #b4bbc6;transform:rotate(45deg)}.customer-detail-updated{margin-top:auto;padding:13px 0;color:#8b95a5;font-size:9px}.customer-detail-updated b{color:#5a6679;font-weight:500}.customer-detail-actions{display:grid;grid-template-columns:1fr auto;gap:8px;padding-top:14px;border-top:1px solid #eceff3;background:#fff}.customer-detail-actions button{height:36px;margin:0;padding:0 14px;border-radius:7px;font-size:10px;font-weight:600}.customer-detail-actions .primary-btn{grid-column:auto;border:0;background:#6355e8;color:#fff}.customer-detail-actions .danger-outline-btn{grid-column:auto;border:1px solid #efc9ce;background:#fff;color:#c84d59}.customer-form-modal,.customer-delete-modal{border:1px solid #e7eaf0;border-radius:10px}.customer-modal-head h3,.customer-delete-modal h3{font-weight:650}.customer-form-grid label{font-size:11px}
@media(max-width:1450px){.customer-org-layout{grid-template-columns:260px minmax(500px,1fr) 320px}.customer-org-tree.org-tree-panel,.customer-profile-panel{padding:16px 13px}.customer-toolbar{grid-template-columns:minmax(220px,1fr) 145px auto auto}}
@media(max-width:1250px){.customer-org-layout{grid-template-columns:260px minmax(0,1fr)}.customer-profile-panel{grid-column:1/-1;display:flex;min-height:0;max-height:none;position:static}.customer-detail-empty{min-height:220px}.customer-detail-actions{grid-template-columns:1fr 1fr}}
@media(max-width:850px){.customer-page-bar{align-items:flex-start}.customer-page-actions{min-width:220px}.customer-org-layout{grid-template-columns:1fr}.customer-org-tree.org-tree-panel{min-height:0;max-height:none;position:static}.customer-org-list.org-tree-list{max-height:320px}.customer-toolbar{grid-template-columns:1fr 1fr}.customer-filter-search{grid-column:1/-1}.customer-table-card{min-height:420px}}
@media(max-width:600px){.customer-page-bar{display:block}.customer-page-actions{margin-top:14px}.customer-page-actions small{text-align:left}.customer-toolbar{grid-template-columns:1fr}.customer-filter-search{grid-column:auto}.customer-table-card .table{min-width:620px}}

/* Customer organization tree: match the store-management tree exactly. */
.customer-org-layout{grid-template-columns:370px minmax(520px,1fr) 348px;gap:18px}.customer-org-tree.org-tree-panel{display:block;min-height:0;max-height:none;padding:20px;position:sticky;top:14px;border:1px solid #edf0f5;border-radius:11px;box-shadow:0 3px 12px #25365d08}.customer-org-tree .org-tree-head{align-items:center;margin-bottom:16px;padding:0;border:0}.customer-org-tree .org-tree-head h3{font-size:16px;font-weight:700}.customer-org-tree .org-tree-head small{margin-top:5px;font-size:11px}.customer-org-tree .org-tree-head button{height:auto;padding:8px 10px;border-radius:7px;font-size:11px}.customer-org-tree .org-tree-search{display:block;height:auto;margin:0;padding:0;border:0;background:transparent}.customer-org-tree .org-tree-search input{height:38px;margin-bottom:10px;padding:0 12px;border:1px solid var(--line);border-radius:7px;font-size:12px}.customer-org-tree .org-tree-search input:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6355e814}.customer-org-tree .org-tree-list{max-height:680px;margin:0;padding:0;overflow:auto}.customer-org-tree .org-tree-row{min-height:0;gap:10px;margin:0;padding:12px 9px;border:0;border-bottom:1px solid #f0f2f6;border-radius:0;background:#fff;color:inherit}.customer-org-tree .org-tree-row:hover,.customer-org-tree .org-tree-row.selected{background:#f2f0ff}.customer-org-tree .org-tree-row.selected{color:inherit;box-shadow:inset 3px 0 var(--primary)}.customer-org-tree .org-tree-row.depth-1{padding-left:31px}.customer-org-tree .org-tree-row.depth-2{padding-left:53px}.customer-org-tree .org-toggle{width:14px;color:#717b8f;font-size:19px;line-height:12px}.customer-org-tree .org-tree-name{min-width:0;flex:1}.customer-org-tree .org-tree-name strong{overflow:hidden;color:inherit;font-size:13px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.customer-org-tree .org-tree-name small{margin-top:3px;color:#929bac;font-size:11px}.customer-org-tree .org-tree-row em{min-width:0;margin-left:auto;padding:0;border-radius:0;background:transparent;color:#a0a9b8;font-size:11px}.customer-org-tree .org-tree-row.selected em{background:transparent;color:#a0a9b8}
.organization-tree-page .org-node-icon,.customer-org-tree .org-node-icon{position:static;width:29px;height:29px;border-radius:8px;background:#eef0ff;color:var(--primary);font-size:16px!important;box-shadow:none}.organization-tree-page .org-node-icon:before,.organization-tree-page .org-node-icon:after,.customer-org-tree .org-node-icon:before,.customer-org-tree .org-node-icon:after{content:none;display:none}.organization-tree-page .org-node-icon.agent,.organization-tree-page .org-node-icon.distributor,.organization-tree-page .org-node-icon.region,.organization-tree-page .org-node-icon.company,.customer-org-tree .org-node-icon.agent,.customer-org-tree .org-node-icon.distributor,.customer-org-tree .org-node-icon.region,.customer-org-tree .org-node-icon.company{background:#eef0ff;color:var(--primary)}.organization-tree-page .org-node-icon.chain,.customer-org-tree .org-node-icon.chain{background:#eef8ff;color:#4b89e9}.organization-tree-page .org-node-icon.store,.customer-org-tree .org-node-icon.store{background:#eefaf5;color:#27a778}
@media(max-width:1450px){.customer-org-layout{grid-template-columns:320px minmax(460px,1fr) 300px}.customer-org-tree.org-tree-panel{padding:20px}}
@media(max-width:1250px){.customer-org-layout{grid-template-columns:370px minmax(0,1fr)}}
@media(max-width:850px){.customer-org-layout{grid-template-columns:1fr}.customer-org-tree.org-tree-panel{position:static}.customer-org-tree .org-tree-list{max-height:360px}}

/* Customer archive scale-up: larger type, controls and data rows. */
.customer-org-page{max-width:none;padding:30px 28px 52px;font-size:15px}.customer-page-bar{align-items:flex-end;gap:30px;margin-bottom:22px;padding:0 3px}.customer-scope-kicker{margin-bottom:6px;font-size:13px;letter-spacing:.06em}.customer-scope-heading h2{font-size:26px;line-height:1.25}.customer-scope-heading p{margin-top:7px;font-size:14px}.customer-page-actions{gap:10px}.customer-page-actions small{font-size:12px}.customer-page-actions button{height:44px;padding:0 19px;border-radius:8px;font-size:14px}
.customer-org-layout{grid-template-columns:390px minmax(600px,1fr) 380px;gap:18px}.customer-org-tree.org-tree-panel{padding:24px}.customer-org-tree .org-tree-head{margin-bottom:19px}.customer-org-tree .org-tree-head h3{font-size:18px}.customer-org-tree .org-tree-head small{margin-top:6px;font-size:12px}.customer-org-tree .org-tree-head button{padding:9px 12px;font-size:12px}.customer-org-tree .org-tree-search input{height:44px;margin-bottom:12px;padding:0 14px;border-radius:8px;font-size:13px}.customer-org-tree .org-tree-row{gap:11px;padding:15px 10px}.customer-org-tree .org-tree-row.depth-1{padding-left:35px}.customer-org-tree .org-tree-row.depth-2{padding-left:60px}.customer-org-tree .org-toggle{width:15px;font-size:21px}.customer-org-tree .org-node-icon{width:34px;height:34px;border-radius:9px;font-size:18px!important}.customer-org-tree .org-tree-name strong{font-size:15px}.customer-org-tree .org-tree-name small{margin-top:4px;font-size:12px}.customer-org-tree .org-tree-row em{font-size:12px}
.customer-toolbar{grid-template-columns:minmax(280px,1fr) 190px auto auto;gap:10px;margin-bottom:14px;padding:14px;border-radius:10px}.customer-filter-search{height:46px;gap:11px;padding:0 14px;border-radius:8px}.customer-filter-search input{font-size:13px}.customer-search-icon{width:16px;height:16px}.customer-search-icon:before{width:10px;height:10px}.customer-toolbar .select{height:46px;padding:0 14px;border-radius:8px;font-size:13px}.customer-toolbar .primary-btn,.customer-reset-btn{height:46px;padding:0 22px;border-radius:8px;font-size:13px}.customer-table-card{min-height:600px;border-radius:10px}.customer-table-heading{min-height:76px;padding:17px 20px}.customer-table-heading h3{font-size:18px}.customer-table-heading span{margin-top:5px;font-size:12px}.customer-data-status{height:30px;padding:0 11px;font-size:12px!important}.customer-table-card .table{min-width:760px;font-size:13px}.customer-table-card .table th{height:46px;padding:0 20px;font-size:12px}.customer-table-card .table td{height:72px;padding:0 20px;font-size:13px}.customer-list-avatar{width:36px;height:36px;font-size:13px}.customer-name-cell{gap:12px}.customer-name-cell strong{font-size:14px}.customer-level-pill{min-height:28px;padding:0 10px;border-radius:6px;font-size:12px}.customer-row-action span{font-size:12px}.customer-row-action i{margin-left:6px;font-size:18px}
.customer-profile-panel{min-height:720px;max-height:calc(100vh - 155px);padding:22px;border-radius:10px}.customer-detail-head{gap:14px;padding:0 34px 22px 0}.customer-avatar{width:56px;height:56px;font-size:22px}.customer-detail-identity h2{margin-bottom:7px;font-size:22px}.customer-detail-identity span{height:25px;padding:0 9px;font-size:11px}.customer-detail-close{right:-3px;top:-5px;width:32px;height:32px;font-size:22px}.customer-profile-panel .customer-detail-section{padding:20px 0}.customer-detail-section h3,.customer-section-title h3{margin-bottom:14px;font-size:15px}.customer-info-grid{gap:13px}.customer-info-grid div{gap:13px}.customer-info-grid.compact div{padding:13px}.customer-info-grid dt{width:78px;font-size:12px}.customer-info-grid dd{font-size:13px}.customer-info-grid.compact dt{margin-bottom:6px}.customer-info-grid.compact dd{font-size:14px}.customer-note+.customer-note{margin-top:11px}.customer-note span{margin-bottom:7px;font-size:11px}.customer-note p{min-height:44px;padding:10px 11px;border-radius:7px;font-size:12px;line-height:20px}.customer-section-title span{font-size:11px}.customer-photo-grid{gap:8px}.customer-photo-grid img,.customer-photo-grid span{border-radius:7px}.customer-detail-updated{padding:17px 0;font-size:11px}.customer-detail-actions{gap:10px;padding-top:17px}.customer-detail-actions button{height:42px;padding:0 17px;border-radius:8px;font-size:12px}.customer-detail-empty strong{font-size:16px}.customer-detail-empty p{font-size:12px;line-height:20px}.customer-empty-icon{width:48px;height:48px}.customer-empty-icon:before{left:15px;top:10px;width:16px;height:16px}.customer-empty-icon:after{left:10px;bottom:9px;width:26px;height:13px}
.customer-form-modal{width:min(720px,100%);padding:28px}.customer-modal-head{margin-bottom:21px}.customer-modal-head h3{font-size:22px}.customer-modal-head p{font-size:13px}.customer-form-grid{gap:15px}.customer-form-grid label{gap:8px;font-size:13px}.customer-form-grid input,.customer-form-grid select{height:44px}.customer-form-grid input,.customer-form-grid select,.customer-form-grid textarea{padding:10px 12px;border-radius:8px}.customer-modal-actions button{min-height:42px;padding:0 18px;font-size:13px}.customer-delete-modal{width:min(440px,100%);padding:29px}.customer-delete-modal h3{font-size:20px}.customer-delete-modal p{font-size:13px;line-height:22px}
@media(max-width:1550px){.customer-org-layout{grid-template-columns:350px minmax(520px,1fr) 340px}.customer-org-tree.org-tree-panel{padding:21px}.customer-profile-panel{padding:20px}.customer-toolbar{grid-template-columns:minmax(240px,1fr) 170px auto auto}}
@media(max-width:1350px){.customer-org-layout{grid-template-columns:350px minmax(0,1fr)}.customer-profile-panel{grid-column:1/-1;max-height:none;position:static}.customer-table-card{min-height:560px}}
@media(max-width:900px){.customer-org-page{padding:24px 20px 40px}.customer-org-layout{grid-template-columns:1fr}.customer-org-tree.org-tree-panel{position:static}.customer-toolbar{grid-template-columns:1fr 1fr}.customer-filter-search{grid-column:1/-1}.customer-profile-panel{min-height:0}}
@media(max-width:620px){.customer-page-bar{display:block}.customer-page-actions{margin-top:16px}.customer-toolbar{grid-template-columns:1fr}.customer-filter-search{grid-column:auto}}

/* Customer archive: compact the hierarchy and keep the three working areas
   usable from wide desktop screens down to compact laptop viewports. */
.customer-org-page{max-width:1800px;padding-inline:clamp(18px,2vw,34px)}
.customer-org-layout{grid-template-columns:clamp(238px,18vw,300px) minmax(0,1fr) clamp(268px,20vw,320px);gap:clamp(12px,1.25vw,18px)}
.customer-org-tree.org-tree-panel,.customer-profile-panel{min-height:0;height:clamp(480px,calc(100dvh - 178px),640px);max-height:calc(100dvh - 178px);padding:clamp(14px,1.15vw,18px)}
.customer-org-tree .org-tree-head{margin-bottom:12px}.customer-org-tree .org-tree-head h3{font-size:15px}.customer-org-tree .org-tree-head small{margin-top:3px;font-size:10px}.customer-org-tree .org-tree-head button{padding:7px 9px;font-size:10px}
.customer-org-tree .org-tree-search input{height:36px;margin-bottom:8px;padding:0 10px;font-size:11px}.customer-org-tree .org-tree-row{gap:8px;padding-top:9px;padding-right:7px;padding-bottom:9px}.customer-org-tree .org-tree-row.depth-1{padding-left:26px}.customer-org-tree .org-tree-row.depth-2{padding-left:44px}.customer-org-tree .org-tree-row.depth-3{padding-left:62px}.customer-org-tree .org-tree-row.depth-4{padding-left:80px}.customer-org-tree .org-toggle{width:12px;font-size:17px}.customer-org-tree .org-node-icon{width:28px;height:28px;border-radius:7px;font-size:15px!important}.customer-org-tree .org-tree-name strong{font-size:12px}.customer-org-tree .org-tree-name small{margin-top:2px;font-size:10px}.customer-org-tree .org-tree-row em{font-size:10px}
.customer-toolbar{grid-template-columns:minmax(190px,1fr) minmax(132px,160px) auto auto;gap:8px;padding:10px 11px}.customer-filter-search,.customer-toolbar .select,.customer-toolbar .primary-btn,.customer-reset-btn{height:38px}.customer-filter-search{padding:0 11px}.customer-toolbar .primary-btn{padding-inline:16px}.customer-reset-btn{padding-inline:10px}.customer-table-card{min-height:clamp(440px,calc(100dvh - 250px),560px)}.customer-table-heading{min-height:58px;padding:12px 14px}.customer-table-heading h3{font-size:15px}.customer-table-card .table{min-width:650px}.customer-table-card .table th{height:38px;padding-inline:14px}.customer-table-card .table td{height:58px;padding-inline:14px}
.customer-profile-panel{overflow:auto}.customer-detail-head{gap:10px;padding-bottom:14px}.customer-avatar{width:42px;height:42px;font-size:17px}.customer-detail-identity h2{font-size:16px}.customer-profile-panel .customer-detail-section{padding:12px 0}.customer-detail-section h3,.customer-section-title h3{margin-bottom:9px;font-size:12px}.customer-info-grid{gap:7px}.customer-info-grid.compact div{padding:8px}.customer-note p{min-height:28px}.customer-detail-actions{padding-top:12px}.customer-detail-actions button{height:34px;padding-inline:10px}

/* Consistent hover and keyboard feedback for every actionable customer-page control. */
.customer-org-page :is(button:not(:disabled), .org-tree-row, tr[data-customer-row]),.customer-modal-backdrop button:not(:disabled){transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background-color .16s ease,color .16s ease}
.customer-org-page button:not(:disabled):hover,.customer-modal-backdrop button:not(:disabled):hover{transform:translateY(-1px);box-shadow:0 7px 16px rgba(40,48,76,.14)}
.customer-org-page :is(.org-tree-row, tr[data-customer-row]):hover{box-shadow:inset 3px 0 var(--primary),0 5px 12px rgba(40,48,76,.08)}
.customer-org-page :is(button, .org-tree-row, tr[data-customer-row]):focus-visible,.customer-modal-backdrop button:focus-visible{outline:3px solid rgba(99,85,232,.28);outline-offset:2px}
.customer-org-page :is(button, .org-tree-row, tr[data-customer-row]):active,.customer-modal-backdrop button:active{transform:translateY(0);box-shadow:none}

@media(max-width:1280px){.customer-org-layout{grid-template-columns:clamp(220px,25vw,260px) minmax(0,1fr)}.customer-profile-panel{grid-column:1/-1;height:auto;max-height:none;position:static}.customer-detail-empty{min-height:190px}.customer-detail-actions{grid-template-columns:1fr 1fr}}
@media(max-width:1080px){.customer-page-bar{align-items:flex-start}.customer-page-actions{min-width:0}.customer-org-layout{grid-template-columns:1fr}.customer-org-tree.org-tree-panel{height:auto;max-height:none;position:static}.customer-org-tree .org-tree-list{max-height:320px}.customer-profile-panel{grid-column:auto}.customer-toolbar{grid-template-columns:minmax(0,1fr) minmax(140px,180px) auto auto}}
@media(max-width:700px){.customer-page-bar{display:block}.customer-page-actions{margin-top:14px;justify-content:start}.customer-page-actions small{text-align:left}.customer-toolbar{grid-template-columns:1fr 1fr}.customer-filter-search{grid-column:1/-1}.customer-table-card{min-height:400px}.customer-profile-panel{height:auto}}
@media(max-width:480px){.customer-org-page{padding-inline:14px}.customer-page-actions{grid-template-columns:1fr 1fr}.customer-page-actions button{padding-inline:10px}.customer-toolbar{grid-template-columns:1fr}.customer-filter-search{grid-column:auto}.customer-info-grid.compact{grid-template-columns:1fr}.customer-detail-actions{grid-template-columns:1fr}.customer-table-card .table{min-width:590px}}
@media(prefers-reduced-motion:reduce){.customer-org-page :is(button, .org-tree-row, tr[data-customer-row]),.customer-modal-backdrop button{transition:none!important}}

/* Customer list stays within its card. The detail is now an on-demand floating
   inspector, so it no longer steals width from the directory. */
.customer-org-layout{grid-template-columns:clamp(238px,18vw,300px) minmax(0,1fr)}
.customer-table-wrap{overflow:visible}.customer-table-card .table{width:100%;min-width:0;table-layout:fixed}.customer-table-card .table th,.customer-table-card .table td{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-table-card .table th:nth-child(1){width:36%}.customer-table-card .table th:nth-child(2){width:24%}.customer-table-card .table th:nth-child(3){width:32%}.customer-table-card .table th:nth-child(4){width:8%}.customer-table-card .customer-name-cell{min-width:0}.customer-table-card .customer-name-cell strong{min-width:0}.customer-row-action{overflow:visible!important;text-overflow:clip!important}
.customer-profile-panel{position:fixed;z-index:1100;top:104px;right:clamp(18px,2vw,34px);width:clamp(280px,24vw,360px);height:calc(100dvh - 126px);max-height:660px;margin:0;opacity:0;visibility:hidden;pointer-events:none;transform:translateX(calc(100% + 28px));transition:transform .24s ease,opacity .2s ease,visibility .2s step-end;box-shadow:0 20px 46px rgba(18,28,47,.24)}
.customer-profile-panel.is-open{opacity:1;visibility:visible;pointer-events:auto;transform:translateX(0);transition:transform .24s ease,opacity .2s ease,visibility 0s}
@media(max-width:1080px){.customer-org-layout{grid-template-columns:1fr}.customer-profile-panel{top:auto;right:14px;bottom:14px;left:14px;width:auto;height:auto;max-height:min(72dvh,620px);transform:translateY(calc(100% + 28px))}.customer-profile-panel.is-open{transform:translateY(0)}}
@media(max-width:700px){.customer-table-card .table th:nth-child(2),.customer-table-card .table td:nth-child(2){display:none}.customer-table-card .table th:nth-child(1){width:60%}.customer-table-card .table th:nth-child(3){width:30%}.customer-table-card .table th:nth-child(4){width:10%}}
@media(max-width:500px){.customer-table-card .table th:nth-child(3),.customer-table-card .table td:nth-child(3){display:none}.customer-table-card .table th:nth-child(1){width:85%}.customer-table-card .table th:nth-child(4){width:15%}.customer-row-action span{display:none}.customer-row-action i{margin:0}}
@media(prefers-reduced-motion:reduce){.customer-profile-panel{transition:none}}

/* Keep the customer-page hierarchy visually identical to Store Management. */
.customer-org-tree.org-tree-panel{padding:16px}.customer-org-tree .org-tree-head{margin-bottom:12px}.customer-org-tree .org-tree-head h3{font-size:15px}.customer-org-tree .org-tree-head button{padding:6px 8px;font-size:11px}.customer-org-tree .org-tree-search input{height:34px;margin-bottom:8px;padding:0 10px;font-size:12px}.customer-org-tree .org-tree-list{max-height:min(620px,calc(100dvh - 300px))}.customer-org-tree .org-tree-row{gap:8px;margin:3px 0;padding:9px 7px;border:1px solid transparent;border-radius:8px}.customer-org-tree .org-tree-row.depth-1{padding-left:25px}.customer-org-tree .org-tree-row.depth-2{padding-left:43px}.customer-org-tree .org-tree-row.depth-3{padding-left:61px}.customer-org-tree .org-tree-row.depth-4{padding-left:79px}.customer-org-tree .org-toggle{width:12px;font-size:17px}.customer-org-tree .org-node-icon{width:26px;height:26px;border-radius:7px;font-size:14px!important}.customer-org-tree .org-tree-name strong{font-size:12px}.customer-org-tree .org-tree-name small{margin-top:2px;font-size:10px}.customer-org-tree .org-tree-row em{font-size:10px}
.customer-org-tree .org-tree-head button{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background-color .18s ease}.customer-org-tree .org-tree-head button:hover,.customer-org-tree .org-tree-head button:focus-visible{transform:translateY(-2px);box-shadow:0 8px 18px rgba(43,54,83,.16)}.customer-org-tree .org-tree-row{position:relative;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background-color .18s ease}.customer-org-tree .org-tree-row:hover{transform:translateY(-1px);border-color:#ded9ff;box-shadow:0 5px 13px rgba(45,55,87,.09)}.customer-org-tree .org-tree-row.selected{z-index:1;transform:translateY(-1px);border-color:#d7d2fb;background:#f6f5ff;box-shadow:0 9px 20px rgba(89,77,203,.14),inset 3px 0 var(--primary)}.customer-org-tree .org-tree-row.selected .org-tree-name strong{color:#5146c8}.customer-org-tree .org-tree-row:focus-visible{outline:3px solid rgba(99,85,232,.22);outline-offset:2px}

/* The selected organization keeps a soft state without the left accent bar. */
.customer-org-page .customer-org-tree .org-tree-row.selected,.customer-org-page .customer-org-tree .org-tree-row.selected:hover{box-shadow:0 9px 20px rgba(89,77,203,.14)}

/* Hover feedback is deliberately quiet: no left rail, cursor marker or lift. */
.customer-org-page .customer-org-tree .org-tree-row:hover:not(.selected){transform:none;border-color:transparent;box-shadow:none;background:#f2f0ff}

/* A chosen store lifts briefly into the foreground without restoring a left rail. */
.customer-org-page .customer-org-tree .org-tree-row.selected{transform:translateY(-2px);box-shadow:0 10px 22px rgba(89,77,203,.18)}
.customer-org-page .customer-org-tree .org-tree-row.selected:active{transform:translateY(-1px) scale(.995)}

/* Formula history phase 3: two primary audit questions and target/actual/variance cards. */
.history-primary-entries{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.history-primary-entries button{display:flex;min-height:92px;flex-direction:column;align-items:flex-start;justify-content:center;padding:15px 18px;border:1px solid #dedbf9;border-radius:10px;background:linear-gradient(135deg,#fff 0%,#f8f7ff 100%);color:#293247;text-align:left;cursor:pointer;transition:.16s ease}.history-primary-entries button:hover{border-color:#8378eb;box-shadow:0 7px 20px rgba(77,64,190,.1);transform:translateY(-1px)}.history-primary-entries span{margin-bottom:6px;color:#6658df;font-size:11px;font-weight:700}.history-primary-entries strong{font-size:14px;line-height:1.5}.history-primary-entries small{margin-top:5px;color:#80899a;font-size:10px}.history-v3-card .history-dye-slot{min-height:112px}.history-v3-card .history-dye-slot small{display:block;margin-top:6px;color:#929bad;font-size:9px;line-height:1.45}.history-v3-card .history-dye-slot.zero em{color:#a4acba}.history-v3-card .history-dye-check span{line-height:1.6}.history-v3-card .history-phase2-developer span{display:block;margin:4px 0}.history-v3-card .history-phase2-developer span b{display:inline-block;min-width:52px;margin-right:6px}.history-summary article:last-child strong{font-variant-numeric:tabular-nums}
@media(max-width:900px){.history-primary-entries{grid-template-columns:1fr}}

/* Formula history layout polish: larger, quieter and business-oriented. */
.history-page{max-width:none;padding:30px 28px 56px;background:#f5f6f8}.history-page .page-title-row{align-items:flex-end;margin-bottom:24px}.history-page .page-title-row h2{color:#1e293b;font-size:27px;font-weight:700;letter-spacing:-.4px}.history-page .page-desc{margin:7px 0 0;color:#727d8f;font-size:14px}.history-page .toolbar{margin:0}.history-page .toolbar .secondary-btn{height:44px;padding:0 18px;border:1px solid #d8dde6;border-radius:8px;background:#fff;color:#364152;font-size:13px;font-weight:600;box-shadow:0 1px 2px rgba(22,34,54,.04)}
.history-workspace{grid-template-columns:300px minmax(0,1fr);gap:18px}.history-main{display:flex;min-width:0;flex-direction:column;gap:16px}.history-main>[data-history-kpis],.history-main>.history-filter-panel,.history-main>.history-primary-entries,.history-main>.history-panel{margin:0}.history-page .card{border-color:#e1e5eb;border-radius:10px;box-shadow:0 1px 3px rgba(22,34,54,.04)}
.history-org-panel{min-height:calc(100vh - 154px);padding:22px 18px;top:16px}.history-org-head{align-items:center;margin-bottom:18px}.history-org-head h3{font-size:17px;font-weight:700}.history-org-head small{margin-top:6px;font-size:11px;line-height:17px}.history-org-actions{gap:6px}.history-org-actions button{padding:6px 8px;border-color:#dfe3e9;border-radius:6px;color:#687386;font-size:11px}.history-org-search{height:44px;gap:9px;padding:0 12px;border-color:#d9dee7;border-radius:8px;background:#fff}.history-org-search>span{font-size:17px}.history-org-search input{font-size:13px}.history-org-scope{gap:4px;margin:12px 0;padding:4px;border-radius:8px;background:#eef0f3}.history-org-scope button{height:34px;border-radius:6px;font-size:12px}.history-org-scope button.active{color:#4f46c8;font-weight:600;box-shadow:0 1px 3px rgba(22,34,54,.1)}.history-org-tree{max-height:calc(100vh - 340px);margin:0 -5px}.history-org-node{min-height:52px;gap:9px;padding:8px 9px;border-radius:7px}.history-org-node:hover{background:#f4f5f7}.history-org-node.selected{background:#eeedf9;color:#4439ba}.history-org-node.depth-1{padding-left:24px}.history-org-node.depth-2{padding-left:42px}.history-org-node.depth-3{padding-left:60px}.history-org-node.depth-4{padding-left:78px}.history-org-arrow{width:13px;font-size:18px}.history-org-icon{width:30px;height:30px;border-radius:7px;font-size:13px}.history-org-name strong{font-size:13px;font-weight:600}.history-org-name small{margin-top:3px;font-size:10px}.history-org-node em{min-width:27px;padding:4px 7px;font-size:10px}.history-org-empty{font-size:12px;line-height:20px}
.history-filter-panel{padding:22px 24px}.history-filter-heading{align-items:center;margin-bottom:20px}.history-filter-heading h3{font-size:18px;font-weight:700}.history-filter-heading p{margin-top:6px;font-size:12px}.history-filter-heading .primary-btn{height:42px;padding:0 23px;border-radius:7px;background:#5748d7;font-size:13px;font-weight:600;box-shadow:none}.history-filter-grid{grid-template-columns:120px minmax(360px,1.8fr) minmax(140px,.8fr) minmax(140px,.8fr) minmax(140px,.8fr) minmax(140px,.8fr);gap:14px 12px}.history-filter-grid label>span{margin-bottom:8px;color:#667286;font-size:12px;font-weight:500}.history-filter-grid select,.history-filter-grid input{height:44px;padding:0 12px;border-color:#d9dee7;border-radius:7px;color:#303b4d;font-size:13px}.history-date-range>div{gap:9px}.history-keyword-filter{grid-column:1/-2}.history-keyword-filter>div{height:44px;gap:9px;padding:0 12px;border-color:#d9dee7;border-radius:7px}.history-keyword-filter>div input{height:40px;font-size:13px}.history-reset{height:44px;padding:0 18px;border-color:#d9dee7;border-radius:7px;font-size:13px}
.history-primary-entries{gap:14px}.history-primary-entries button{min-height:112px;padding:19px 22px 18px;border-color:#dfe3e9;border-radius:9px;background:#fff;box-shadow:0 1px 2px rgba(22,34,54,.03);transform:none}.history-primary-entries button:hover{border-color:#aaa3df;background:#fbfaff;box-shadow:0 3px 10px rgba(46,38,122,.07);transform:none}.history-primary-entries span{margin-bottom:8px;color:#665bb8;font-size:12px;font-weight:600}.history-primary-entries strong{color:#253044;font-size:18px;font-weight:700}.history-primary-entries small{margin-top:7px;color:#7c8798;font-size:12px}
.history-summary{gap:14px;margin:0}.history-summary article{min-height:126px;padding:21px 22px;border-color:#e0e4ea;border-radius:9px;box-shadow:0 1px 2px rgba(22,34,54,.03)}.history-summary article:after{display:none}.history-summary span{color:#687487;font-size:13px;font-weight:500}.history-summary strong{margin:13px 0 9px;color:#202b3d;font-size:31px;font-weight:700;line-height:1.05;letter-spacing:-.4px}.history-summary small{color:#818b9b;font-size:11px;line-height:17px}
.history-panel{border-radius:10px}.history-panel-head{min-height:62px;padding:10px 20px}.history-tabs{gap:8px}.history-tabs button{padding:10px 14px;border-radius:6px;color:#667286;font-size:13px}.history-tabs button:hover{background:#f4f5f7}.history-tabs button.active{background:#eceaf8;color:#493dbd;font-weight:600}.history-tabs button span{min-width:23px;margin-left:6px;padding:2px 6px;font-size:10px}.history-result-scope{max-width:520px;font-size:11px}.history-source-note{padding:11px 20px;background:#f8f9fb;color:#778295;font-size:11px;line-height:18px}.history-source-note.warning{border-left:3px solid #d9a441;background:#fffbf2;color:#84652d}
.history-table-wrap{max-height:calc(100vh - 320px)}.history-table{font-size:13px}.history-table th{height:46px;padding:0 14px;color:#6e798b;font-size:12px;font-weight:600}.history-table td{min-height:64px;padding:15px 14px;line-height:20px}.history-formula-cell strong{font-size:13px}.history-formula-cell small,.history-customer{margin-top:5px;font-size:11px}.history-badge{padding:6px 9px;border-radius:5px;font-size:11px}.history-dispense-table{min-width:1510px}.history-dispense-table td:nth-child(6),.history-dispense-table td:nth-child(7){max-width:230px;font-size:12px;line-height:19px}.history-row-expander{width:28px;height:28px;border-radius:6px;font-size:20px}.history-detail-row>td{padding:0 20px 18px 54px!important}.history-record-detail{border-color:#dfe3e9;border-radius:8px}.history-record-detail-head{padding:16px 18px;background:#f7f8fa}.history-record-detail-head>div:first-child strong{font-size:14px}.history-record-detail-head>div:first-child span{margin-top:5px;font-size:11px}.history-record-detail-head>div:last-child span{font-size:11px}.history-record-detail-head b{font-size:13px}.history-detail-table{font-size:12px}.history-detail-table th,.history-detail-table td{padding:12px 16px!important}.history-detail-empty{font-size:12px}
.history-stats-view{padding:20px}.history-dye-phase{gap:16px}.history-phase-banner{padding:16px 18px;border-color:#dfe3e9;border-radius:8px;background:#f8f9fb}.history-phase-banner>div{gap:12px}.history-phase-banner>div>span{padding:5px 9px;border:1px solid #dddfea;border-radius:5px;background:#fff;color:#625a91;font-size:11px;font-weight:600}.history-phase-banner strong{font-size:15px;font-weight:700}.history-phase-banner p{font-size:11px;line-height:18px}.history-dye-card{border-color:#dfe3e9;border-radius:9px}.history-dye-card-head{padding:18px 20px;border-color:#e7e9ed;background:#fff}.history-dye-card-head h4{font-size:19px;font-weight:700}.history-dye-card-head>div:first-child>span{margin-top:5px;font-size:11px}.history-dye-card-head>div:last-child{gap:24px}.history-dye-card-head>div:last-child>span{font-size:11px}.history-dye-card-head b{margin-top:4px;font-size:14px}.history-operator-basis{padding:11px 20px;background:#faf9f5;font-size:11px}.history-dye-slot-grid{grid-template-columns:repeat(6,minmax(125px,1fr));gap:11px;padding:18px 20px}.history-dye-slot,.history-v3-card .history-dye-slot{min-height:116px;padding:13px 14px;border-color:#dfe3e9;border-radius:7px;background:#fff}.history-dye-slot:after{left:14px;right:14px;bottom:10px;height:2px;background:#766cbc}.history-dye-slot.zero{background:#f8f9fa}.history-dye-slot.zero:after{background:#dfe3e8}.history-dye-slot span{font-size:10px}.history-dye-slot strong{margin-top:5px;font-size:14px}.history-dye-slot em{margin-top:7px;font-size:17px}.history-v3-card .history-dye-slot small{margin-top:8px;font-size:10px;line-height:16px}.history-dye-check{gap:16px;margin:0 20px 16px;padding:13px 15px;border-radius:6px}.history-dye-check strong{font-size:12px}.history-dye-check span{font-size:11px;line-height:18px}.history-dye-check small{font-size:10px}.history-phase2-breakdown{grid-template-columns:minmax(0,1.6fr) minmax(260px,.8fr);gap:15px;margin:0 20px 18px;padding:15px;border-radius:7px}.history-phase2-developer>strong{margin-bottom:9px;font-size:12px}.history-phase2-developer>div{gap:8px}.history-phase2-developer>div span{padding:8px 10px;font-size:11px}.history-phase2-developer>div span b{font-size:12px}.history-phase2-breakdown>p{padding-top:11px;font-size:11px;line-height:18px}.history-ranking-empty{min-height:150px;font-size:12px;line-height:20px}
@media(max-width:1500px){.history-workspace{grid-template-columns:270px minmax(0,1fr)}.history-filter-grid{grid-template-columns:120px minmax(320px,1.7fr) repeat(2,minmax(130px,1fr))}.history-keyword-filter{grid-column:1/-1}.history-dye-slot-grid{grid-template-columns:repeat(4,minmax(125px,1fr))}}
@media(max-width:1100px){.history-page{padding:26px 22px 44px}.history-workspace{grid-template-columns:240px minmax(0,1fr)}.history-filter-grid{grid-template-columns:1fr 1fr}.history-date-range,.history-keyword-filter{grid-column:1/-1}.history-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.history-dye-slot-grid{grid-template-columns:repeat(3,minmax(120px,1fr))}}
@media(max-width:860px){.history-workspace{grid-template-columns:1fr}.history-org-panel{min-height:0;position:static}.history-org-tree{max-height:320px}.history-primary-entries{grid-template-columns:1fr}.history-panel-head{align-items:stretch;flex-direction:column}.history-result-scope{max-width:none}.history-dye-slot-grid{grid-template-columns:repeat(2,minmax(120px,1fr))}.history-phase2-breakdown{grid-template-columns:1fr}}
@media(max-width:620px){.history-page{padding:20px 14px 36px}.history-page .page-title-row{align-items:flex-start;flex-direction:column;gap:14px}.history-filter-panel{padding:18px}.history-filter-grid{grid-template-columns:1fr}.history-date-range,.history-keyword-filter{grid-column:auto}.history-date-range>div{grid-template-columns:1fr}.history-date-range b{display:none}.history-summary{grid-template-columns:1fr}.history-tabs{overflow:auto}.history-dye-slot-grid{grid-template-columns:1fr}.history-dye-card-head{align-items:flex-start;flex-direction:column}.history-dye-card-head>div:last-child{justify-content:flex-start;flex-wrap:wrap}.history-dye-check{align-items:flex-start;flex-direction:column}.history-phase-banner{align-items:flex-start;flex-direction:column}.history-phase-banner p{text-align:left}}

/* Expanded formula record: color, material usage and category totals. */
.history-task-usage{display:grid;grid-template-columns:180px minmax(320px,1.2fr) minmax(260px,.9fr) 210px;gap:14px;padding:18px;background:#fff;border-bottom:1px solid #e6e9ee}.history-task-color{display:flex;min-height:154px;flex-direction:column;justify-content:center;padding:18px;border:1px solid #dde1e7;border-radius:8px;background:#f7f7fa}.history-task-color span{color:#7d8796;font-size:12px}.history-task-color strong{margin:7px 0 9px;color:#222b3a;font-size:28px;line-height:1.1;letter-spacing:-.5px}.history-task-color small{overflow:hidden;color:#7d8796;font-size:11px;line-height:17px;text-overflow:ellipsis}.history-task-material-section{min-width:0;padding:14px;border:1px solid #e1e4e9;border-radius:8px;background:#fafbfc}.history-task-material-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.history-task-material-title>div{display:flex;align-items:center;gap:8px}.history-task-material-title strong{color:#30394a;font-size:13px}.history-task-material-title b{color:#4b5669;font-size:12px;font-weight:650;white-space:nowrap}.history-material-mark{display:block;width:7px;height:7px;border-radius:2px;background:#7364df}.history-material-mark.developer{background:#329b9a}.history-task-material-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:8px;margin-top:12px}.history-task-material{min-width:0;padding:11px 12px;border:1px solid #e0e4ea;border-radius:7px;background:#fff}.history-task-material span{display:block;overflow:hidden;color:#5f6a7c;font-size:12px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}.history-task-material strong{display:block;margin-top:8px;color:#252e3e;font-size:18px;line-height:1.15}.history-task-material small{display:block;margin-top:5px;color:#929baa;font-size:10px}.history-task-material.developer{border-left:3px solid #68b6b4}.history-task-material-empty{display:flex;min-height:78px;align-items:center;justify-content:center;border:1px dashed #d9dde4;border-radius:7px;color:#929baa;font-size:11px}.history-task-totals{display:flex;min-width:0;flex-direction:column;gap:8px}.history-task-totals>div{display:flex;min-height:43px;flex:1;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border:1px solid #e0e4e9;border-radius:8px;background:#fff}.history-task-totals span{color:#727d8d;font-size:11px;white-space:nowrap}.history-task-totals strong{color:#252e3e;font-size:18px;white-space:nowrap}.history-task-totals .total{background:#f4f3fa;border-color:#dedbe9}.history-task-totals .total strong{color:#4f456e}.history-record-row.expanded td{border-bottom-color:transparent}
@media(max-width:1500px){.history-task-usage{grid-template-columns:160px minmax(280px,1fr) minmax(240px,1fr)}.history-task-totals{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr)}}
@media(max-width:1050px){.history-task-usage{grid-template-columns:160px 1fr}.history-task-material-section:last-of-type{grid-column:1/-1}.history-task-totals{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.history-task-usage{grid-template-columns:1fr;padding:12px}.history-task-color,.history-task-material-section:last-of-type,.history-task-totals{grid-column:auto}.history-task-color{min-height:118px}.history-task-totals{grid-template-columns:1fr}.history-task-material-list{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Formula record pagination replaces the former vertical table scroller. */
.history-panel>[data-history-content]>.history-table-wrap{max-height:none;overflow-x:auto;overflow-y:visible}.history-pagination{display:flex;min-height:68px;align-items:center;gap:14px;padding:12px 18px;border-top:1px solid #e6e9ee;background:#fff;color:#667286}.history-page-summary{margin-right:auto;font-size:12px;white-space:nowrap}.history-pagination label{display:flex;align-items:center;gap:8px;font-size:12px;white-space:nowrap}.history-pagination select{height:36px;padding:0 28px 0 10px;border:1px solid #d9dee7;border-radius:7px;background:#fff;color:#344055;font:inherit;font-size:12px}.history-pagination nav{display:flex;align-items:center;gap:5px}.history-pagination nav button{min-width:36px;height:36px;padding:0 11px;border:1px solid #d9dee7;border-radius:7px;background:#fff;color:#4d596c;font-size:12px;cursor:pointer}.history-pagination nav button:hover:not(:disabled){border-color:#9188cf;color:#4d43b8}.history-pagination nav button.active{border-color:#5b4ed1;background:#5b4ed1;color:#fff;font-weight:650}.history-pagination nav button:disabled{background:#f5f6f8;color:#b3bac5;cursor:not-allowed}.history-page-ellipsis{display:grid;width:26px;height:36px;place-items:center;color:#919aa8}.history-page-total{font-size:12px;white-space:nowrap}
@media(max-width:850px){.history-pagination{align-items:flex-start;flex-wrap:wrap}.history-page-summary{width:100%}.history-pagination nav{order:4;width:100%;overflow-x:auto}.history-page-total{margin-left:auto}}
@media(max-width:520px){.history-pagination{padding:12px}.history-pagination nav button{min-width:34px;padding:0 9px}.history-page-total{display:none}}
.history-page-picker{position:relative;z-index:40}.history-page-picker-trigger{display:flex;min-width:72px;height:36px;align-items:center;justify-content:center;gap:10px;border:1px solid #d9dee7;border-radius:7px;background:#fff;color:#4d596c;font:inherit;font-size:12px;cursor:pointer}.history-page-picker-trigger i{width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .16s ease}.history-page-picker[data-open="true"] .history-page-picker-trigger{border-color:#8175ff;box-shadow:0 0 0 3px rgba(99,85,232,.12)}.history-page-picker[data-open="true"] .history-page-picker-trigger i{transform:rotate(225deg) translateY(-2px)}.history-page-picker-menu{position:absolute;top:calc(100% + 7px);right:0;display:none;width:228px;max-height:min(480px,calc(100vh - 170px));overflow:auto;padding:8px;border:1px solid #d9dee7;border-radius:8px;background:#fff;box-shadow:0 12px 26px rgba(28,39,58,.18)}.history-page-picker[data-open="true"] .history-page-picker-menu{display:grid;gap:7px}.history-page-jump{display:flex;gap:6px;padding-bottom:7px;border-bottom:1px solid #edf0f5}.history-page-jump input{min-width:0;flex:1;height:32px;padding:0 9px;border:1px solid #d9dee7;border-radius:5px;color:#303b4d;font:inherit;font-size:12px}.history-page-jump input:focus{outline:0;border-color:#8175ff;box-shadow:0 0 0 3px rgba(99,85,232,.12)}.history-page-jump button{width:34px!important;min-width:34px;height:32px!important;border:1px solid #d9dee7!important}.history-page-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}.history-page-picker-menu button{width:100%;height:34px;border:0;border-radius:5px;background:#fff;color:#303b4d;font:inherit;font-size:12px;cursor:pointer}.history-page-picker-menu button:hover{background:#f0efff;color:#5144d1}.history-page-picker-menu button.active{background:#5b4ed1;color:#fff;font-weight:650}

/* Shared active outline glides between the two primary history tabs. */
.history-tabs{position:relative}
.history-tab-indicator{position:absolute;top:0;left:0;z-index:0;display:block;pointer-events:none;border:1px solid #b8b0ef;border-radius:8px;opacity:0;box-shadow:none;transition:transform .26s cubic-bezier(.22,.8,.3,1),width .26s cubic-bezier(.22,.8,.3,1),height .26s cubic-bezier(.22,.8,.3,1),opacity .16s ease}
.history-tab-indicator.is-visible{opacity:1}
.history-tabs button[data-history-mode="records"],.history-tabs button[data-history-mode="operator"]{position:relative;z-index:1;border:0;border-radius:8px;background:#fff;color:#5547c8;box-shadow:none;transition:transform .16s ease,background .16s ease}
.history-tabs button[data-history-mode="records"]:hover,.history-tabs button[data-history-mode="operator"]:hover{background:#fff;transform:translateY(-2px)}
.history-tabs button[data-history-mode="records"].active,.history-tabs button[data-history-mode="operator"].active{background:#fff;color:#5547c8;box-shadow:none}
.history-tabs button[data-history-mode="records"]:active,.history-tabs button[data-history-mode="operator"]:active{transform:translateY(0)}
@media(prefers-reduced-motion:reduce){.history-tab-indicator,.history-tabs button[data-history-mode="records"],.history-tabs button[data-history-mode="operator"]{transition:none}}

/* Page-load errors remain actionable without replacing the whole history shell. */
.history-load-error{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}.history-load-error .secondary-btn{height:34px;padding:0 12px}
.history-load-stale-note{justify-content:flex-start;margin:0 0 10px;padding:8px 12px;border:1px solid #f0dfb1;border-radius:7px;background:#fffaf0;color:#8a6b28;font-size:12px}
.history-load-stale-note .secondary-btn{height:28px;padding:0 10px;font-size:12px}
.history-page-loading{position:relative;min-height:120px}.history-page-loading>*{opacity:.48;pointer-events:none}.history-page-loading:after{content:'⌛';position:absolute;top:50%;left:50%;z-index:2;transform:translate(-50%,-50%);font-size:18px;color:#6557d9;animation:history-page-loading-pulse 1s ease-in-out infinite}@keyframes history-page-loading-pulse{0%,100%{opacity:.45;transform:translate(-50%,-50%) scale(.9)}50%{opacity:1;transform:translate(-50%,-50%) scale(1)}}
.history-record-loading{position:relative;min-height:120px}.history-record-loading>*{opacity:.55}.history-record-loading:after{content:'⌛';position:absolute;top:50%;left:50%;z-index:2;transform:translate(-50%,-50%);font-size:18px;color:#6557d9;animation:history-page-loading-pulse 1s ease-in-out infinite}
.history-analytics-loading,.history-analytics-error{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;border-radius:8px;padding:10px 13px;font-size:10px;line-height:16px}.history-analytics-loading{background:#f5f3ff;color:#6557d9}.history-analytics-error{border:1px solid #f1d5d5;background:#fff7f7;color:#a54a4a}.history-analytics-error .secondary-btn{flex:none;padding:6px 12px;font-size:10px}
.history-loading:not(.history-load-error){font-size:0}.history-page-loading:after,.history-record-loading:after{content:"";width:24px;height:24px;border:3px solid #e4e1fb;border-top-color:#6557d9;border-radius:50%;animation:history-page-spinner .75s linear infinite}.history-analytics-loading:before{content:"";display:block;width:24px;height:24px;border:3px solid #e4e1fb;border-top-color:#6557d9;border-radius:50%;animation:history-spinner .75s linear infinite}.history-load-error:after{display:none}@keyframes history-spinner{to{transform:rotate(360deg)}}@keyframes history-page-spinner{to{transform:translate(-50%,-50%) rotate(360deg)}}
.history-timeout-error{flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}.history-timeout-error:before{content:"";display:block;width:28px;height:28px;flex:none;border:3px solid #e4e1fb;border-top-color:#6557d9;border-radius:50%;animation:history-spinner .75s linear infinite}.history-timeout-error>span{order:2;max-width:min(90vw,520px);line-height:1.5}.history-timeout-error>.secondary-btn{order:3;margin-top:2px}

/* Keep all formula record columns inside the page without horizontal scrolling. */
.history-panel>[data-history-content]>.history-table-wrap{width:100%;max-width:100%;overflow:visible}.history-dispense-table{width:100%;min-width:0;table-layout:fixed}.history-dispense-table th,.history-dispense-table td{box-sizing:border-box;min-width:0;padding-left:10px;padding-right:10px;overflow-wrap:anywhere;word-break:normal}.history-dispense-table th:nth-child(1),.history-dispense-table td:nth-child(1){width:3%}.history-dispense-table th:nth-child(2),.history-dispense-table td:nth-child(2){width:11%}.history-dispense-table th:nth-child(3),.history-dispense-table td:nth-child(3){width:14%}.history-dispense-table th:nth-child(4),.history-dispense-table td:nth-child(4){width:8%}.history-dispense-table th:nth-child(5),.history-dispense-table td:nth-child(5){width:16%}.history-dispense-table th:nth-child(6),.history-dispense-table td:nth-child(6){width:18%;max-width:none}.history-dispense-table th:nth-child(7),.history-dispense-table td:nth-child(7){width:9%;max-width:none}.history-dispense-table th:nth-child(8),.history-dispense-table td:nth-child(8){width:8%}.history-dispense-table th:nth-child(9),.history-dispense-table td:nth-child(9){width:7%}.history-dispense-table th:nth-child(10),.history-dispense-table td:nth-child(10){width:6%}.history-dispense-table time{white-space:normal}.history-dispense-table .history-formula-cell strong{display:-webkit-box;max-width:none;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.history-dispense-table td:nth-child(3),.history-dispense-table td:nth-child(9){word-break:break-all}.history-dispense-table td:nth-child(9){font-size:11px}.history-dispense-table .history-badge{max-width:100%;justify-content:center;padding-left:6px;padding-right:6px;white-space:normal;text-align:center}

/* Each formula case reads as an interactive row while keeping table columns aligned. */
.history-record-top-spacer td{height:6px!important;min-height:6px!important;border:0!important;background:transparent!important;padding:0!important;line-height:0}.history-dispense-table tbody .history-record-row{position:relative;cursor:pointer;transition:transform .18s ease,filter .18s ease}.history-dispense-table tbody .history-record-row td{transition:background-color .18s ease,box-shadow .18s ease,border-radius .18s ease}.history-dispense-table tbody .history-record-row:hover{z-index:4;transform:translateY(-3px);background:transparent;filter:drop-shadow(0 7px 11px rgba(104,93,187,.08)) drop-shadow(0 0 5px rgba(132,119,220,.06))}.history-dispense-table tbody .history-record-row:hover td{position:relative;z-index:3;background:#fbfaff;box-shadow:inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def}.history-dispense-table tbody .history-record-row:hover td:first-child{border-radius:8px 0 0 8px;box-shadow:inset 2px 0 0 #a49def,inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def}.history-dispense-table tbody .history-record-row:hover td:last-child{border-radius:0 8px 8px 0;box-shadow:inset -2px 0 0 #a49def,inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def}.history-dispense-table tbody .history-record-row:hover .history-row-expander{background:transparent;color:#5548ce}.history-dispense-table tbody .history-record-row:focus-within{z-index:4;transform:translateY(-2px);filter:drop-shadow(0 6px 10px rgba(104,93,187,.08))}body[data-theme="dark"] .history-dispense-table tbody .history-record-row:hover td{background:#182235}
.history-pagination{justify-content:flex-end}.history-pagination .history-page-summary{display:none}

/* An open proposal is a reading state: its detail does not receive the hover glow. */
.history-dispense-table tbody .history-record-row.expanded:hover,.history-dispense-table tbody .history-record-row.expanded:focus-within{z-index:2;transform:none;filter:none}.history-dispense-table tbody .history-record-row.expanded:hover td,.history-dispense-table tbody .history-record-row.expanded:focus-within td{background:#faf9ff;box-shadow:none}.history-dispense-table tbody .history-record-row.expanded:hover td:first-child,.history-dispense-table tbody .history-record-row.expanded:hover td:last-child,.history-dispense-table tbody .history-record-row.expanded:focus-within td:first-child,.history-dispense-table tbody .history-record-row.expanded:focus-within td:last-child{border-radius:0;box-shadow:none}body[data-theme="dark"] .history-dispense-table tbody .history-record-row.expanded:hover td,body[data-theme="dark"] .history-dispense-table tbody .history-record-row.expanded:focus-within td{background:#151f2d}
/* Keep the proposal disclosure affordance light and directional, not button-like. */
.history-dispense-table .history-row-expander{display:grid;width:20px;height:20px;place-items:center;border:0;border-radius:4px;background:transparent;color:#8b96a8;box-shadow:none;font-size:18px;font-weight:400;line-height:1;transition:transform .16s ease,color .16s ease,background-color .16s ease}.history-dispense-table tbody .history-record-row:hover .history-row-expander{background:transparent;color:#5d50d6}.history-dispense-table .history-row-expander:hover{background:#f0eeff;color:#5043c9}.history-dispense-table .history-row-expander:focus-visible{outline:2px solid #9c94ef;outline-offset:2px}
@media(max-width:1180px){.history-dispense-table{font-size:12px}.history-dispense-table th,.history-dispense-table td{padding-left:7px;padding-right:7px}.history-dispense-table th{font-size:11px}.history-dispense-table td:nth-child(6),.history-dispense-table td:nth-child(7),.history-dispense-table td:nth-child(9){font-size:11px}.history-row-expander{width:25px;height:25px}.history-dispense-table th:nth-child(3),.history-dispense-table td:nth-child(3){width:13%}.history-dispense-table th:nth-child(5),.history-dispense-table td:nth-child(5){width:17%}}

/* Compact color-code identity card. */
.history-task-usage{grid-template-columns:150px minmax(320px,1.2fr) minmax(260px,.9fr) 210px}.history-task-color{position:relative;align-items:center;padding:24px 14px;border-color:#dfe2e8;background:#fff;text-align:center}.history-task-color:before{content:"";width:28px;height:3px;margin-bottom:16px;border-radius:3px;background:#7164df}.history-task-color span{padding:4px 9px;border-radius:5px;background:#f2f1fa;color:#655c91;font-size:11px;font-weight:600}.history-task-color strong{max-width:100%;margin:12px 0 0;color:#222b3a;font-size:30px;font-weight:700;line-height:1.15;overflow-wrap:anywhere;word-break:break-word}.history-task-color small{display:none}
@media(max-width:1500px){.history-task-usage{grid-template-columns:140px minmax(280px,1fr) minmax(240px,1fr)}}
@media(max-width:1050px){.history-task-usage{grid-template-columns:140px 1fr}}
@media(max-width:700px){.history-task-usage{grid-template-columns:1fr}.history-task-color{min-height:108px}}

/* Match formula-history color codes to their real Supabase Storage images. */
.history-task-usage{grid-template-columns:170px minmax(320px,1.2fr) minmax(260px,.9fr) 210px}.history-task-color{justify-content:flex-start;padding:14px}.history-task-color:before{display:none}.history-task-color-image{display:grid;width:100%;height:126px;margin-bottom:14px;place-items:center;overflow:hidden;border:1px solid #e2e5ea;border-radius:8px;background:#f5f6f8}.history-task-color-image img{display:block;width:100%;height:100%;object-fit:contain}.history-task-color-image.empty{border-style:dashed;background:#fafbfc;color:#9aa3b1}.history-task-color-image.empty b{max-width:90px;font-size:11px;font-weight:500;line-height:18px}.history-task-color span{margin-top:0}.history-task-color strong{margin-top:10px;font-size:26px}
@media(max-width:1500px){.history-task-usage{grid-template-columns:150px minmax(280px,1fr) minmax(240px,1fr)}.history-task-color-image{height:108px}}
@media(max-width:1050px){.history-task-usage{grid-template-columns:150px 1fr}}
@media(max-width:700px){.history-task-usage{grid-template-columns:1fr}.history-task-color-image{width:min(180px,100%);height:120px}}

/* Refine the color-image panel and rebalance the expanded record layout. */
.history-task-usage{grid-template-columns:145px minmax(340px,1.25fr) minmax(260px,.9fr) 190px;gap:12px;padding:14px}.history-task-color{min-height:0;justify-content:center;padding:14px 12px;background:#fbfbfc}.history-task-color-image{width:92px;height:92px;flex:none;margin:0 auto 12px;border-radius:12px;background:#f2f3f5;box-shadow:0 2px 8px rgba(35,44,62,.06)}.history-task-color-image img{object-fit:cover}.history-task-color-image.empty{width:92px;height:92px}.history-task-color span{padding:3px 8px;font-size:10px}.history-task-color strong{margin-top:9px;font-size:24px;letter-spacing:-.2px}.history-task-material-section{padding:13px}.history-task-material-list{gap:7px;margin-top:10px}.history-task-material{padding:10px 11px}.history-task-totals>div{padding:11px 12px}.history-task-totals strong{font-size:17px}
.history-fact-action{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 16px;border-top:1px solid #e7e9ee;background:#fbfbfc}.history-fact-action strong,.history-fact-action span{display:block}.history-fact-action strong{color:#313b4d;font-size:12px}.history-fact-action span{margin-top:4px;color:#808b9c;font-size:10px;line-height:16px}.history-fact-action button{flex:none;border:1px solid #6b5cdc;border-radius:7px;background:#fff;color:#5c4fd0;padding:9px 13px;font-size:11px;font-weight:650;cursor:pointer}.history-fact-action button:hover{background:#f4f2ff}.history-fact-modal{width:min(960px,100%);padding:22px 24px}.history-fact-warning{display:flex;align-items:flex-start;gap:12px;margin-bottom:15px;border:1px solid #efd8a9;border-radius:8px;background:#fffaf0;padding:11px 13px}.history-fact-warning strong{flex:none;color:#8b601c;font-size:11px}.history-fact-warning span{color:#846f4d;font-size:10px;line-height:17px}.history-fact-meta{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;gap:10px;margin-bottom:14px}.history-fact-meta label{display:grid;gap:6px;color:#647185;font-size:10px}.history-fact-meta input,.history-fact-meta select{width:100%;height:39px;box-sizing:border-box;border:1px solid #dfe3e9;border-radius:7px;background:#fff;color:#303b4d;padding:0 9px;font:inherit;outline:0}.history-fact-meta input:focus,.history-fact-meta select:focus{border-color:#6b5cdc;box-shadow:0 0 0 3px #6b5cdc16}.history-fact-materials{overflow:hidden;border:1px solid #e1e4e9;border-radius:8px}.history-fact-material-head,.history-fact-item{display:grid;grid-template-columns:80px minmax(110px,1fr) 110px 170px minmax(160px,1.2fr);gap:10px;align-items:center}.history-fact-material-head{min-height:36px;padding:0 12px;background:#f7f8fa;color:#7e899a;font-size:10px}.history-fact-item{min-height:58px;padding:8px 12px;border-top:1px solid #eef0f3}.history-fact-item>strong{color:#2e394c;font-size:12px}.history-fact-item>span:not(.history-fact-type){color:#59667a;font-size:11px}.history-fact-item>em{color:#8893a3;font-size:10px;font-style:normal;line-height:16px}.history-fact-type{width:max-content;border-radius:5px;padding:4px 7px;background:#efedff;color:#6153d6;font-size:9px;font-weight:650}.history-fact-type.developer{background:#e8f7f5;color:#238f8c}.history-fact-type.other{background:#f1f2f4;color:#687487}.history-fact-item label{display:flex;height:36px;align-items:center;overflow:hidden;border:1px solid #dfe3e9;border-radius:7px;background:#fff}.history-fact-item label:focus-within{border-color:#6b5cdc;box-shadow:0 0 0 3px #6b5cdc16}.history-fact-item input{width:100%;min-width:0;height:100%;border:0;outline:0;padding:0 9px;font:inherit}.history-fact-item label b{padding-right:9px;color:#8b95a5;font-size:10px;font-weight:400}.history-fact-totals{display:flex;align-items:center;justify-content:flex-end;gap:18px;margin-top:12px;border-radius:7px;background:#f7f8fa;padding:10px 12px;color:#748094;font-size:10px}.history-fact-totals b{margin-left:5px;color:#293549;font-size:12px}.history-fact-prerequisite{margin-top:12px;border:1px solid #efc9c9;border-radius:7px;background:#fff5f4;padding:10px 12px;color:#b05258;font-size:10px;line-height:17px}.history-fact-confirm{display:flex;align-items:flex-start;gap:8px;margin-top:13px;color:#59667a;font-size:10px;line-height:17px}.history-fact-confirm input{margin-top:2px;accent-color:#6253d9}.history-fact-modal .ops-form-error{min-height:18px}.history-fact-modal .ops-modal-actions{margin-top:4px}@media(max-width:900px){.history-fact-meta{grid-template-columns:1fr 1fr}.history-fact-material-head{display:none}.history-fact-item{grid-template-columns:70px 1fr 90px 150px}.history-fact-item>em{grid-column:2/-1}.history-fact-action{align-items:flex-start;flex-direction:column}}@media(max-width:620px){.history-fact-meta{grid-template-columns:1fr}.history-fact-item{grid-template-columns:60px 1fr}.history-fact-item>span:not(.history-fact-type),.history-fact-item label,.history-fact-item>em{grid-column:2}.history-fact-totals{align-items:flex-end;flex-direction:column;gap:5px}}
@media(max-width:1500px){.history-task-usage{grid-template-columns:135px minmax(280px,1fr) minmax(240px,1fr)}.history-task-color-image,.history-task-color-image.empty{width:82px;height:82px}}
@media(max-width:1050px){.history-task-usage{grid-template-columns:135px 1fr}}
@media(max-width:700px){.history-task-usage{grid-template-columns:1fr;padding:12px}.history-task-color{min-height:140px}.history-task-color-image,.history-task-color-image.empty{width:76px;height:76px}}

/* Streamlined record details: keep the code identity and final output only. */
.history-task-color{justify-content:center;align-items:center;min-height:150px;padding:22px 14px;text-align:center}
.history-task-color span{margin-top:0;padding:4px 9px}
.history-task-color strong{margin-top:12px;font-size:30px}
.history-task-material-title>b{display:none}
.history-task-totals{justify-content:center}
.history-task-totals>div.total{min-height:150px;flex:none;justify-content:center;align-items:flex-start;flex-direction:column;gap:10px;padding:20px}
.history-task-totals>div.total span{font-size:12px}
.history-task-totals>div.total strong{font-size:28px}
.history-tabs [data-history-mode="color"],.history-tabs [data-history-mode="changes"]{display:none}
@media(max-width:700px){.history-task-color{min-height:112px}.history-task-totals>div.total{min-height:0;align-items:center;flex-direction:row;justify-content:space-between}}

/* Compact formula-history KPI cards. */
.history-summary{gap:12px}.history-summary article{min-height:96px;padding:15px 18px}.history-summary span{font-size:12px}.history-summary strong{margin:9px 0 6px;font-size:26px;line-height:1}.history-summary small{font-size:10px;line-height:15px}
@media(max-width:1100px){.history-summary article{min-height:92px;padding:14px 16px}.history-summary strong{font-size:24px}}

/* Formula-history KPI cards use compact operational hierarchy instead of
   decoration-heavy metric tiles. */
.history-summary .history-kpi{position:relative;display:flex;min-height:108px;flex-direction:column;justify-content:space-between;overflow:hidden;padding:16px 18px 17px;border:1px solid #dfe4ea;border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(22,34,54,.035);transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.history-summary .history-kpi:after{display:none}.history-summary .history-kpi:before{position:absolute;top:17px;bottom:17px;left:0;width:3px;border-radius:0 3px 3px 0;background:#6559d8;content:"";opacity:.82}.history-summary .history-kpi:hover{border-color:#c9c4ed;box-shadow:0 8px 18px rgba(40,32,101,.1);transform:translateY(-1px)}
.history-kpi-head{display:flex;min-width:0;align-items:center;gap:9px}.history-kpi-icon{position:relative;display:block;width:28px;height:28px;flex:0 0 28px;border-radius:7px;background:#f0efff}.history-kpi-icon:before{position:absolute;inset:6px;background:#6559d8;content:"";-webkit-mask:url("./assets/icons/history-kpi-total.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/history-kpi-total.svg?v=1") center/contain no-repeat}.history-kpi-label{display:block!important;overflow:hidden;color:#687487!important;font-size:12px!important;font-weight:600!important;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.history-summary .history-kpi strong{margin:0;padding-left:37px;color:#3a4658;font-size:26px;font-weight:600;letter-spacing:-.2px;line-height:1.12;font-variant-numeric:tabular-nums}
.history-summary .history-kpi-dye:before{background:#8059d5}.history-summary .history-kpi-dye .history-kpi-icon{background:#f5efff}.history-summary .history-kpi-dye .history-kpi-icon:before{background:#8059d5;-webkit-mask-image:url("./assets/icons/history-kpi-dye.svg?v=1");mask-image:url("./assets/icons/history-kpi-dye.svg?v=1")}.history-summary .history-kpi-developer-onefive:before{background:#2c9b98}.history-summary .history-kpi-developer-onefive .history-kpi-icon{background:#eaf8f6}.history-summary .history-kpi-developer-onefive .history-kpi-icon:before{background:#278d8a;-webkit-mask-image:url("./assets/icons/history-kpi-developer.svg?v=1");mask-image:url("./assets/icons/history-kpi-developer.svg?v=1")}.history-summary .history-kpi-developer-twelve:before{background:#c28b3c}.history-summary .history-kpi-developer-twelve .history-kpi-icon{background:#fff5e5}.history-summary .history-kpi-developer-twelve .history-kpi-icon:before{background:#b77b25;-webkit-mask-image:url("./assets/icons/history-kpi-developer.svg?v=1");mask-image:url("./assets/icons/history-kpi-developer.svg?v=1")}
@media(max-width:1100px){.history-summary .history-kpi{min-height:102px;padding:15px 16px}.history-summary .history-kpi strong{font-size:25px}}@media(max-width:620px){.history-summary .history-kpi{min-height:98px}.history-summary .history-kpi strong{font-size:24px}}

/* Show a compact real color swatch beside each color-code statistic. */
.history-color-stat-heading{display:flex;min-width:0;align-items:center;gap:12px}.history-color-stat-thumb{display:block;width:46px;height:46px;flex:none;overflow:hidden;border:0;border-radius:50%;background:transparent;box-shadow:none}.history-color-stat-thumb img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}.history-color-stat-thumb.empty{display:grid;place-items:center;border:1px dashed #dfe3e9;color:#a0a8b5}.history-color-stat-thumb.empty b{font-size:12px;font-weight:500}.history-color-stat-heading>div:last-child{min-width:0}.history-color-stat-heading h4{overflow:hidden;margin:0;color:#202c41;font-size:19px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.history-dye-card-head .history-color-stat-heading>div:last-child>span{display:block;margin-top:5px;color:#8a95a7;font-size:11px}
.history-color-stat-card{transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}.history-color-stat-card:not(.is-expanded) .history-dye-card-head{border-bottom:0}.history-color-stat-toggle{display:grid;width:100%;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:24px;border:0;background:inherit;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:background-color .16s ease}.history-color-stat-toggle:hover{background:#fbfaff}.history-color-stat-toggle:focus-visible{outline:0;box-shadow:inset 0 0 0 2px #9d95ed}.history-color-stat-card.is-expanded{border-color:#dfe4ea;box-shadow:0 10px 22px rgba(31,42,64,.1);transform:translateY(-2px)}.history-color-stat-card.is-expanded .history-color-stat-toggle{background:#fdfcff}.history-color-stat-card:hover,.history-color-stat-card:focus-within{position:relative;z-index:2;border-color:#a49def;box-shadow:0 7px 11px rgba(104,93,187,.08),0 0 5px rgba(132,119,220,.06);transform:translateY(-3px)}.history-color-stat-card:hover .history-color-stat-toggle,.history-color-stat-card:focus-within .history-color-stat-toggle{background:#fbfaff}.history-color-stat-title{display:flex;min-width:0;align-items:center;gap:10px}.history-color-stat-title .history-color-stat-heading{flex:none}.history-color-stat-title>i{display:block;width:20px;height:20px;flex:none;background:url("./assets/icons/color-stat-collapse.svg?v=1") center/contain no-repeat;color:transparent;font-size:0;font-style:normal;line-height:1;transform-origin:center;transition:transform .18s ease,filter .16s ease}.history-color-stat-toggle:hover .history-color-stat-title>i{filter:brightness(1.04);transform:translateY(1px)}.history-color-stat-toggle[aria-expanded="true"] .history-color-stat-title>i{transform:rotate(180deg)}.history-color-stat-toggle[aria-expanded="true"]:hover .history-color-stat-title>i{transform:rotate(180deg) translateY(1px)}.history-dye-slots-empty{grid-column:1/-1;border:1px dashed #d9dee7;border-radius:7px;background:#fafbfc;padding:18px;color:#8893a4;font-size:12px;text-align:center}body[data-theme="dark"] .history-color-stat-title>i{background:url("./assets/icons/color-stat-collapse.svg?v=1") center/contain no-repeat}body[data-theme="dark"] .history-color-stat-card.is-expanded{border-color:#2d374a;box-shadow:0 10px 22px rgba(0,0,0,.3);transform:translateY(-2px)}body[data-theme="dark"] .history-color-stat-card:hover,body[data-theme="dark"] .history-color-stat-card:focus-within{border-color:#8177e6;box-shadow:0 7px 12px rgba(0,0,0,.32),0 0 7px rgba(129,119,230,.14);transform:translateY(-3px)}body[data-theme="dark"] .history-color-stat-card.is-expanded .history-color-stat-toggle{background:#151f2d}body[data-theme="dark"] .history-color-stat-card:hover .history-color-stat-toggle,body[data-theme="dark"] .history-color-stat-card:focus-within .history-color-stat-toggle{background:#182235}body[data-theme="dark"] .history-dye-slots-empty{border-color:#354055;background:#141b27;color:#9eabc0}@media(max-width:620px){.history-color-stat-toggle{grid-template-columns:1fr;gap:12px}.history-color-stat-toggle>div:last-child{justify-content:flex-start}}
/* Expanded statistics stay neutral while reading their detail; purple feedback is reserved for collapsed records. */
.history-color-stat-card.is-expanded:hover,.history-color-stat-card.is-expanded:focus-within{border-color:#dfe4ea;box-shadow:0 10px 22px rgba(31,42,64,.1);transform:translateY(-2px)}.history-color-stat-card.is-expanded:hover .history-color-stat-toggle,.history-color-stat-card.is-expanded:focus-within .history-color-stat-toggle{background:#fdfcff}body[data-theme="dark"] .history-color-stat-card.is-expanded:hover,body[data-theme="dark"] .history-color-stat-card.is-expanded:focus-within{border-color:#2d374a;box-shadow:0 10px 22px rgba(0,0,0,.3);transform:translateY(-2px)}body[data-theme="dark"] .history-color-stat-card.is-expanded:hover .history-color-stat-toggle,body[data-theme="dark"] .history-color-stat-card.is-expanded:focus-within .history-color-stat-toggle{background:#151f2d}
@media(max-width:620px){.history-color-stat-thumb{width:42px;height:42px}.history-color-stat-heading h4{font-size:17px}}

/* Organization-tree icon repair: earlier page refinements hid the shared
   pseudo-elements, leaving only their colored backgrounds. Keep this in the
   base stylesheet so it also takes effect for clients with cached module CSS. */
.organization-tree-page .org-node-icon,.customer-org-tree .org-node-icon,.history-store-org .history-org-icon.org-node-icon{position:relative!important;display:grid!important;place-items:center!important;width:26px!important;height:26px!important;flex:none;border-radius:7px!important;background:#eef2ff!important;color:#5969d7!important;font-size:0!important;box-shadow:none!important}
.organization-tree-page .org-node-icon:before,.organization-tree-page .org-node-icon:after,.customer-org-tree .org-node-icon:before,.customer-org-tree .org-node-icon:after,.history-store-org .history-org-icon.org-node-icon:before,.history-store-org .history-org-icon.org-node-icon:after{content:""!important;display:block!important;position:absolute!important;box-sizing:border-box}
.organization-tree-page .org-node-icon:before,.customer-org-tree .org-node-icon:before,.history-store-org .history-org-icon.org-node-icon:before{left:6px!important;top:6px!important;width:13px!important;height:13px!important;border:1.5px solid currentColor!important;border-radius:2px!important;background:linear-gradient(currentColor,currentColor) 3px 3px/2px 2px no-repeat,linear-gradient(currentColor,currentColor) 8px 3px/2px 2px no-repeat,linear-gradient(currentColor,currentColor) 3px 8px/2px 2px no-repeat,linear-gradient(currentColor,currentColor) 8px 8px/2px 2px no-repeat!important;transform:none!important}
.organization-tree-page .org-node-icon:after,.customer-org-tree .org-node-icon:after,.history-store-org .history-org-icon.org-node-icon:after{left:11px!important;top:auto!important;bottom:5px!important;width:4px!important;height:5px!important;border:1.5px solid currentColor!important;border-bottom:0!important;border-radius:0!important;background:transparent!important;transform:none!important}
.organization-tree-page .org-node-icon.headquarters,.customer-org-tree .org-node-icon.headquarters,.history-store-org .history-org-icon.org-node-icon.headquarters{background:#e7efff!important;color:#3264c9!important}.organization-tree-page .org-node-icon.agent,.customer-org-tree .org-node-icon.agent,.history-store-org .history-org-icon.org-node-icon.agent{background:#f0effc!important;color:#6758d5!important}.organization-tree-page .org-node-icon.chain,.customer-org-tree .org-node-icon.chain,.history-store-org .history-org-icon.org-node-icon.chain{background:#edf4ff!important;color:#4d79cc!important}.organization-tree-page .org-node-icon.distributor,.customer-org-tree .org-node-icon.distributor,.history-store-org .history-org-icon.org-node-icon.distributor{background:#fff3e9!important;color:#d47b3e!important}.organization-tree-page .org-node-icon.store,.customer-org-tree .org-node-icon.store,.history-store-org .history-org-icon.org-node-icon.store{background:#ebf7f2!important;color:#258a65!important}.organization-tree-page .org-node-icon.region,.customer-org-tree .org-node-icon.region,.history-store-org .history-org-icon.org-node-icon.region{background:#eef6ff!important;color:#4b82c3!important}.organization-tree-page .org-node-icon.company,.organization-tree-page .org-node-icon.organization,.organization-tree-page .org-node-icon.factory,.customer-org-tree .org-node-icon.company,.customer-org-tree .org-node-icon.organization,.customer-org-tree .org-node-icon.factory,.history-store-org .history-org-icon.org-node-icon.company,.history-store-org .history-org-icon.org-node-icon.organization,.history-store-org .history-org-icon.org-node-icon.factory{background:#edf5fb!important;color:#477eaa!important}
.organization-tree-page .org-node-icon.chain:before,.organization-tree-page .org-node-icon.distributor:before,.customer-org-tree .org-node-icon.chain:before,.customer-org-tree .org-node-icon.distributor:before,.history-store-org .history-org-icon.org-node-icon.chain:before,.history-store-org .history-org-icon.org-node-icon.distributor:before{left:6px!important;top:6px!important;width:9px!important;height:9px!important;border-radius:3px!important;background:none!important}.organization-tree-page .org-node-icon.chain:after,.organization-tree-page .org-node-icon.distributor:after,.customer-org-tree .org-node-icon.chain:after,.customer-org-tree .org-node-icon.distributor:after,.history-store-org .history-org-icon.org-node-icon.chain:after,.history-store-org .history-org-icon.org-node-icon.distributor:after{left:10px!important;top:10px!important;bottom:auto!important;width:9px!important;height:9px!important;border:1.5px solid currentColor!important;border-radius:3px!important;background:transparent!important}.organization-tree-page .org-node-icon.store:before,.customer-org-tree .org-node-icon.store:before,.history-store-org .history-org-icon.org-node-icon.store:before{left:5px!important;top:6px!important;width:15px!important;height:6px!important;border:1.5px solid currentColor!important;border-radius:3px 3px 2px 2px!important;background:repeating-linear-gradient(90deg,transparent 0,transparent 3px,currentColor 3px,currentColor 4.5px)!important}.organization-tree-page .org-node-icon.store:after,.customer-org-tree .org-node-icon.store:after,.history-store-org .history-org-icon.org-node-icon.store:after{left:7px!important;top:12px!important;bottom:auto!important;width:11px!important;height:9px!important;border:1.5px solid currentColor!important;border-top:0!important;border-radius:0 0 2px 2px!important}.organization-tree-page .org-node-icon.region:before,.customer-org-tree .org-node-icon.region:before,.history-store-org .history-org-icon.org-node-icon.region:before{left:7px!important;top:5px!important;width:12px!important;height:12px!important;border:1.5px solid currentColor!important;border-radius:50% 50% 50% 0!important;background:none!important;transform:rotate(-45deg)!important}.organization-tree-page .org-node-icon.region:after,.customer-org-tree .org-node-icon.region:after,.history-store-org .history-org-icon.org-node-icon.region:after{left:11px!important;top:9px!important;bottom:auto!important;width:4px!important;height:4px!important;border:0!important;border-radius:50%!important;background:currentColor!important}

/* Reuse the store-management organization-tree rhythm on formula history. */
.history-workspace{grid-template-columns:320px minmax(0,1fr)}.history-store-org.history-org-panel{display:block;min-height:calc(100vh - 154px);padding:20px;position:sticky;top:16px;border:1px solid #edf0f5;border-radius:11px;box-shadow:0 3px 12px rgba(37,54,93,.03)}.history-store-org .history-org-head{align-items:center;margin-bottom:16px;padding:0;border:0}.history-store-org .history-org-head h3{font-size:16px}.history-store-org .history-org-head small{margin-top:5px;font-size:11px}.history-store-org .history-org-actions button{height:auto;padding:8px 10px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#687386;font-size:11px}.history-store-org .history-org-search{display:block;height:auto;margin:0;padding:0;border:0;background:transparent}.history-store-org .history-org-search input{width:100%;height:38px;margin:0 0 10px;padding:0 12px;border:1px solid var(--line);border-radius:7px;background:#fff;font-size:12px}.history-store-org .history-org-scope{margin:0 0 10px}.history-store-org .history-org-tree{max-height:calc(100vh - 345px);margin:0;padding:0;overflow:auto}.history-store-org .history-org-node.org-tree-row{min-height:0;gap:10px;margin:0;padding:12px 9px;border:0;border-bottom:1px solid #f0f2f6;border-radius:0;background:#fff;color:inherit}.history-store-org .history-org-node:hover,.history-store-org .history-org-node.selected{background:#f2f0ff}.history-store-org .history-org-node.selected{color:inherit;box-shadow:inset 3px 0 var(--primary)}.history-store-org .history-org-node.depth-0{padding-left:9px}.history-store-org .history-org-node.depth-1{padding-left:31px}.history-store-org .history-org-node.depth-2{padding-left:53px}.history-store-org .history-org-node.depth-3{padding-left:75px}.history-store-org .history-org-node.depth-4{padding-left:97px}.history-store-org .history-org-arrow.org-toggle{width:14px;font-size:19px;line-height:12px}.history-store-org .history-org-icon.org-node-icon{position:static;width:29px;height:29px;border-radius:8px;background:#eef0ff;color:var(--primary);font-size:16px!important;box-shadow:none}.history-store-org .history-org-icon.org-node-icon.chain{background:#eef8ff;color:#4b89e9}.history-store-org .history-org-icon.org-node-icon.store{background:#eefaf5;color:#27a778}.history-store-org .history-org-name.org-tree-name{min-width:0;flex:1}.history-store-org .history-org-name strong{font-size:13px;font-weight:700}.history-store-org .history-org-name small{margin-top:3px;font-size:11px}.history-store-org .history-org-node em,.history-store-org .history-org-node.selected em{min-width:0;margin-left:auto;padding:0;border-radius:0;background:transparent;color:#a0a9b8;font-size:11px}
@media(max-width:1500px){.history-workspace{grid-template-columns:280px minmax(0,1fr)}.history-store-org.history-org-panel{padding:18px}}
@media(max-width:900px){.history-workspace{grid-template-columns:1fr}.history-store-org.history-org-panel{position:static;min-height:0}.history-store-org .history-org-tree{max-height:360px}}

/* Halo command-center dashboard: scheme three dark executive console. */
body[data-active-page="dashboard"][data-theme="dark"]{--halo-bg:#0a0b0f;--halo-surface:#14151c;--halo-elevated:#1e2029;--halo-border:#2a2d38;--halo-border-strong:#3a3d4a;--halo-text:#f2f4f8;--halo-muted:#9aa0ae;--halo-faint:#5c6170;--halo-primary:#5b6bff;--halo-cyan:#3dd7e5;--halo-success:#2be08c;--halo-warning:#f5d547;--halo-error:#ff3a5c;background:var(--halo-bg);color:var(--halo-text)}
body[data-active-page="dashboard"][data-theme="dark"] .sidebar{width:184px;padding:18px 10px;background:#0a0b0f;border-right:1px solid #20232d}
body[data-active-page="dashboard"][data-theme="dark"] .brand{padding:0 7px 22px}.dashboard-v2 .brand strong{font-size:16px}.dashboard-v2 .brand span{color:#707785}
body[data-active-page="dashboard"][data-theme="dark"] .workspace-switch{margin:0 1px 18px;border-color:#272b36;background:#14151c;color:#9aa0ae;padding:9px 10px}
body[data-active-page="dashboard"][data-theme="dark"] .nav-item{height:36px;margin:2px 0;padding:0 10px;border-radius:10px;color:#9aa0ae;font-size:12px}
body[data-active-page="dashboard"][data-theme="dark"] .nav-item:hover{background:#1e2029;color:#f2f4f8}
body[data-active-page="dashboard"][data-theme="dark"] .nav-item.active{background:#5b6bff;color:#fff;box-shadow:none}
body[data-active-page="dashboard"][data-theme="dark"] .sidebar-footer{border-top-color:#242731;padding-top:15px}body[data-active-page="dashboard"][data-theme="dark"] .sidebar-footer strong{color:#f2f4f8}body[data-active-page="dashboard"][data-theme="dark"] .sidebar-footer small{color:#707785}
body[data-active-page="dashboard"][data-theme="dark"] .topbar{height:70px;padding:0 28px;background:#0a0b0f;border-bottom:1px solid #242731;box-shadow:none}
body[data-active-page="dashboard"][data-theme="dark"] .topbar-title h1{font-size:24px;color:#f2f4f8}body[data-active-page="dashboard"][data-theme="dark"] .topbar-title .crumb{color:#707785;font-size:12px}
body[data-active-page="dashboard"][data-theme="dark"] .search{height:36px;width:272px;border-color:#2a2d38;border-radius:10px;background:#14151c;color:#9aa0ae}body[data-active-page="dashboard"][data-theme="dark"] .search input{color:#f2f4f8;background:transparent}
body[data-active-page="dashboard"][data-theme="dark"] .user{color:#c6cad4}.dashboard-v2{font-family:var(--font-ui)}
body[data-active-page="dashboard"][data-theme="dark"] .page.dashboard-v2{padding:22px 28px 30px;background:var(--halo-bg)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .card{border:1px solid var(--halo-border);border-radius:16px;background:var(--halo-surface);box-shadow:none;color:var(--halo-text);transition:border-color .15s ease,background .15s ease,transform .15s ease}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .card::before{display:block;background:radial-gradient(360px circle at var(--glow-x,50%) var(--glow-y,50%),rgba(114,94,255,.2),transparent 67%)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .card:hover,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .card:focus-within{z-index:8;transform:translateY(-7px);border-color:#8d7dff;background:#171923;box-shadow:0 38px 70px -22px rgba(103,82,230,.62),0 18px 34px rgba(0,0,0,.64)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .card:hover::before,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .card:focus-within::before{opacity:1}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-toolbar{min-height:30px;margin-bottom:10px}.dashboard-v2 .dashboard-toolbar-actions{gap:8px}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-period,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-refresh{height:32px;border-color:var(--halo-border-strong);border-radius:10px;background:var(--halo-surface);color:var(--halo-muted);box-shadow:none;font-size:11px}
body[data-active-page="dashboard"][data-theme="dark"] .data-status{color:var(--halo-muted)}body[data-active-page="dashboard"][data-theme="dark"] .data-status.success i{background:var(--halo-success);box-shadow:0 0 0 3px rgba(43,224,140,.12)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi-grid{gap:10px;margin-bottom:12px}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi{position:relative;height:96px;min-height:96px;padding:15px 16px;gap:11px;border-radius:12px;overflow:hidden}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi-icon{width:38px;height:38px;flex-basis:38px;background:rgba(91,107,255,.12);color:var(--halo-primary);border:1px solid rgba(91,107,255,.5)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi:nth-child(2) .dashboard-kpi-icon{background:rgba(61,215,229,.1);color:var(--halo-cyan);border-color:rgba(61,215,229,.45)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi:nth-child(3) .dashboard-kpi-icon{background:rgba(43,224,140,.1);color:var(--halo-success);border-color:rgba(43,224,140,.4)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi:nth-child(4) .dashboard-kpi-icon{background:rgba(255,58,92,.1);color:var(--halo-error);border-color:rgba(255,58,92,.42)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi:nth-child(5) .dashboard-kpi-icon{background:rgba(61,215,229,.1);color:var(--halo-cyan);border-color:rgba(61,215,229,.45)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi:nth-child(6) .dashboard-kpi-icon{background:rgba(255,58,92,.1);color:var(--halo-error);border-color:rgba(255,58,92,.42)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi-copy>span{color:var(--halo-muted);font-size:10px}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi-copy strong{margin:4px 0 4px;color:var(--halo-text);font-family:var(--font-ui);font-size:24px;font-weight:600;letter-spacing:-.02em}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-kpi-copy small{color:var(--halo-faint);font-size:9px}
.dashboard-kpi-sparkline{position:absolute;right:13px;bottom:13px;width:66px;height:28px;opacity:.92}.dashboard-kpi-sparkline path{fill:none;stroke:var(--halo-primary,#5b6bff);stroke-width:1.5;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}.dashboard-kpi[data-kpi-type="formulas"] .dashboard-kpi-sparkline path,.dashboard-kpi[data-kpi-type="devices"] .dashboard-kpi-sparkline path{stroke:var(--halo-cyan,#3dd7e5)}.dashboard-kpi[data-kpi-type="cases"] .dashboard-kpi-sparkline path{stroke:var(--halo-success,#2be08c)}.dashboard-kpi[data-kpi-type="stock"] .dashboard-kpi-sparkline path{stroke:var(--halo-error,#ff3a5c)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-hero-grid{grid-template-columns:minmax(0,1.72fr) minmax(330px,.9fr);height:clamp(350px,40vh,430px);min-height:0;flex:none;gap:12px;margin-bottom:12px}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-card,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-summary-card,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-todo-card{padding:16px;min-width:0}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-card-head h2{color:var(--halo-text);font-size:14px}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-card-head p{color:var(--halo-faint);font-size:9px}
body[data-active-page="dashboard"][data-theme="dark"] .map-data-badge{border-color:var(--halo-border-strong);background:var(--halo-elevated);color:var(--halo-muted);border-radius:999px;padding:5px 9px}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-filters{margin-top:9px}.dashboard-v2 .dashboard-map-filters button{height:25px;border-color:var(--halo-border);border-radius:999px;background:var(--halo-elevated);color:var(--halo-muted);font-size:9px}.dashboard-v2 .dashboard-map-filters button.selected,.dashboard-v2 .dashboard-map-filters button:hover{border-color:var(--halo-primary);background:rgba(91,107,255,.14);color:#9ca6ff}.dashboard-v2 .dashboard-map-filters button span{background:#2a2d38;color:#9aa0ae}.dashboard-v2 .dashboard-map-filters button.selected span{background:rgba(91,107,255,.35);color:#fff}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-workspace{display:block;margin-top:10px;flex:none}.dashboard-v2 .dashboard-map-stage{height:clamp(260px,30vh,315px);min-height:0;aspect-ratio:auto;border-color:var(--halo-border);border-radius:12px;background:#111722;box-shadow:none}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-leaflet-map{background:#0f131c}.dashboard-v2 .dashboard-leaflet-map .leaflet-tile-pane{filter:brightness(.48) saturate(.7) contrast(1.08)}.dashboard-v2 .dashboard-leaflet-map .leaflet-overlay-pane{filter:brightness(.62) saturate(.72)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-leaflet-map .leaflet-control-zoom,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-tools{border-color:var(--halo-border-strong);background:rgba(20,21,28,.94);box-shadow:none}.dashboard-v2 .dashboard-leaflet-map .leaflet-control-zoom a,.dashboard-v2 .dashboard-map-tools button{border-color:var(--halo-border);background:rgba(20,21,28,.94);color:var(--halo-muted)}.dashboard-v2 .dashboard-leaflet-map .leaflet-control-zoom a:hover,.dashboard-v2 .dashboard-map-tools button:hover{background:var(--halo-elevated);color:#fff}
body[data-active-page="dashboard"][data-theme="dark"] .map-legend,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-account-stat{border-color:var(--halo-border-strong);background:rgba(20,21,28,.92);color:var(--halo-muted);box-shadow:none}.dashboard-v2 .dashboard-map-account-stat strong{color:var(--halo-text);font-family:var(--font-ui)}.dashboard-v2 .dashboard-map-account-stat small{color:var(--halo-faint)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-leaflet-map .leaflet-control-attribution{background:rgba(10,11,15,.78);color:var(--halo-faint)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-device-panel{border-color:var(--halo-border);border-radius:12px;background:var(--halo-surface);box-shadow:none}.dashboard-v2 .dashboard-map-device-panel>div:first-child{border-color:var(--halo-border);background:var(--halo-surface)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-device-panel>div:first-child strong{color:var(--halo-text)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-map-device-panel>div:first-child span{color:var(--halo-faint)}body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item{color:var(--halo-muted)}body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item:hover,body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item.selected{background:var(--halo-elevated)}body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item strong{color:var(--halo-text)}body[data-active-page="dashboard"][data-theme="dark"] .map-device-list-item small{color:var(--halo-faint)}
body[data-active-page="dashboard"][data-theme="dark"] .daily-summary-grid{margin-top:16px}.dashboard-v2 .daily-summary-item{border-left-color:var(--halo-border);padding:2px 10px}.dashboard-v2 .daily-summary-item:first-child{padding-left:0}.dashboard-v2 .daily-summary-item>div{background:rgba(91,107,255,.12)}body[data-active-page="dashboard"][data-theme="dark"] .daily-summary-item span{color:var(--halo-muted)}body[data-active-page="dashboard"][data-theme="dark"] .daily-summary-item strong{color:var(--halo-text);font-family:var(--font-ui)}body[data-active-page="dashboard"][data-theme="dark"] .daily-summary-item small{color:var(--halo-faint)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-todo-list{border-color:var(--halo-border);border-radius:10px;background:var(--halo-surface)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-todo-row{height:42px;border-top-color:var(--halo-border);color:var(--halo-muted);background:transparent}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-todo-row:hover{background:var(--halo-elevated)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-todo-row b{font-family:var(--font-ui)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-analytics-grid{grid-template-columns:minmax(0,1.7fr) minmax(230px,.9fr) minmax(230px,.9fr);height:clamp(210px,24vh,250px);min-height:0;flex:none;gap:12px;margin-bottom:12px}.dashboard-v2 .dashboard-chart-card,.dashboard-v2 .dashboard-case-card,.dashboard-v2 .dashboard-health-card{padding:15px 16px;min-height:0;height:100%}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-chart-controls{color:var(--halo-muted)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-range button{border-color:var(--halo-border);background:var(--halo-elevated);color:var(--halo-muted)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-range button.selected{border-color:var(--halo-primary);background:rgba(91,107,255,.18);color:#b5bcff}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-trend-chart{min-height:0}.dashboard-v2 .dashboard-trend-chart text{fill:#7f8798}.dashboard-v2 .dashboard-trend-chart .dispense-area{fill:url(#trend-area-gradient)}.dashboard-v2 .dashboard-trend-chart .dispense-line-chart{stroke:#7180ff;stroke-width:2.2}.dashboard-v2 .dashboard-trend-chart .dispense-dot{fill:var(--halo-surface,#14151c);stroke:#7180ff}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-donut>span{background:var(--halo-surface);color:var(--halo-muted)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-donut strong{color:var(--halo-text);font-family:var(--font-ui)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-case-legend li{color:var(--halo-muted)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-case-legend li b{color:var(--halo-text)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-case-legend li em{color:var(--halo-faint)}
body[data-active-page="dashboard"][data-theme="dark"] .health-gauge:after{background:var(--halo-surface)}body[data-active-page="dashboard"][data-theme="dark"] .health-gauge strong{color:var(--halo-text);font-family:var(--font-ui)}body[data-active-page="dashboard"][data-theme="dark"] .health-gauge span,body[data-active-page="dashboard"][data-theme="dark"] .health-legend{color:var(--halo-muted)}body[data-active-page="dashboard"][data-theme="dark"] .health-legend b{color:var(--halo-text)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-device-card{padding:15px 16px;margin-bottom:0}.dashboard-v2 .dashboard-device-card .dashboard-card-head{margin-bottom:11px}.dashboard-v2 .dashboard-device-table-wrap{overflow:auto}.dashboard-v2 .dashboard-device-table{min-width:760px}.dashboard-v2 .dashboard-device-table th{background:var(--halo-elevated);color:var(--halo-muted);border-bottom:1px solid var(--halo-border);padding:8px 10px;font-size:9px}.dashboard-v2 .dashboard-device-table td{border-bottom:1px solid var(--halo-border);color:var(--halo-muted);padding:10px;font-size:9px}.dashboard-v2 .dashboard-device-table td strong{color:var(--halo-text)}body[data-active-page="dashboard"][data-theme="dark"] .device-state.online{background:rgba(43,224,140,.1);color:var(--halo-success)}body[data-active-page="dashboard"][data-theme="dark"] .device-health.good{background:rgba(43,224,140,.1);color:var(--halo-success)}body[data-active-page="dashboard"][data-theme="dark"] .device-state.offline,body[data-active-page="dashboard"][data-theme="dark"] .device-health.warn{background:rgba(245,213,71,.1);color:var(--halo-warning)}
@media(min-width:851px) and (max-width:1200px){body[data-active-page="dashboard"][data-theme="dark"] .dashboard-hero-grid{height:auto;min-height:0}.dashboard-v2 .dashboard-map-stage{height:300px}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-analytics-grid{grid-template-columns:1.5fr 1fr;height:230px}.dashboard-v2 .dashboard-health-card{grid-column:1/-1;height:180px}}
@media(max-width:850px){body[data-active-page="dashboard"][data-theme="dark"] .sidebar{width:65px;padding:18px 8px}body[data-active-page="dashboard"][data-theme="dark"] .page.dashboard-v2{padding:16px}.dashboard-v2 .dashboard-kpi-sparkline{display:none}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-hero-grid{display:block;height:auto}.dashboard-v2 .dashboard-map-card,.dashboard-v2 .dashboard-summary-card,.dashboard-v2 .dashboard-todo-card{margin-bottom:12px}.dashboard-v2 .dashboard-map-stage{height:300px}.dashboard-v2 .dashboard-analytics-grid{height:auto}.dashboard-v2 .dashboard-device-card{margin-top:0}}

/* Theme parity: keep light geometry in lockstep with the command-center dark layout. */
body[data-active-page="dashboard"][data-theme="light"] .dashboard-hero-grid{grid-template-columns:minmax(0,1.72fr) minmax(330px,.9fr);height:clamp(350px,40vh,430px);min-height:0;flex:none;gap:12px;margin-bottom:12px}
body[data-active-page="dashboard"][data-theme="light"] .page.dashboard-v2{padding:22px 28px 30px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-toolbar{height:32px;min-height:32px;margin-bottom:10px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-kpi-grid{gap:10px;margin-bottom:12px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-kpi{height:96px;min-height:96px;padding:15px 16px;gap:11px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-map-card,body[data-active-page="dashboard"][data-theme="light"] .dashboard-summary-card,body[data-active-page="dashboard"][data-theme="light"] .dashboard-todo-card{padding:16px;min-width:0}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-card-head h2{font-size:14px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-card-head p{font-size:9px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-map-filters{margin-top:9px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-map-filters button{height:25px;font-size:9px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-map-workspace{display:block;margin-top:10px;flex:none}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-map-stage{height:clamp(260px,30vh,315px);min-height:0;aspect-ratio:auto;border-radius:12px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-analytics-grid{grid-template-columns:minmax(0,1.7fr) minmax(230px,.9fr) minmax(230px,.9fr);height:clamp(210px,24vh,250px);min-height:0;flex:none;gap:12px;margin-bottom:12px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-chart-card,body[data-active-page="dashboard"][data-theme="light"] .dashboard-case-card,body[data-active-page="dashboard"][data-theme="light"] .dashboard-health-card{height:100%;min-height:0;padding:15px 16px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-device-card{padding:15px 16px;margin-bottom:0}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-device-card .dashboard-card-head{margin-bottom:11px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-device-table-wrap{overflow:auto}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-device-table{min-width:760px}

/* Use the light theme's navy navigation shell in dark mode as well. */
body[data-active-page="dashboard"][data-theme="dark"] .sidebar{width:214px;padding:24px 10px 18px;background:linear-gradient(180deg,#0b192d,#101f35);border-right:0}
body[data-active-page="dashboard"][data-theme="dark"] .brand{padding:0 14px 27px}
body[data-active-page="dashboard"][data-theme="dark"] .workspace-switch{display:none}
body[data-active-page="dashboard"][data-theme="dark"] .nav-item{height:43px;padding:0 12px;margin:7px 2px 7px 25px;border-radius:8px;gap:14px;color:#b9c5d8;font-size:14px}
body[data-active-page="dashboard"][data-theme="dark"] .nav-item:hover{background:#1c3152;color:#fff}
body[data-active-page="dashboard"][data-theme="dark"] .nav-item.active{background:linear-gradient(100deg,#5e50eb,#7264f7);color:#fff;box-shadow:0 7px 20px #5144d14a}
body[data-active-page="dashboard"][data-theme="dark"] .sidebar-footer{border-top-color:#253651;padding-top:18px}
body[data-active-page="dashboard"][data-theme="dark"] .sidebar-footer strong{color:#fff}
body[data-active-page="dashboard"][data-theme="dark"] .sidebar-footer small{color:#8290a6}

@media(min-width:851px) and (max-width:1200px){
  body[data-active-page="dashboard"][data-theme="light"] .dashboard-hero-grid{height:auto;min-height:0}
  body[data-active-page="dashboard"][data-theme="light"] .dashboard-map-stage{height:300px}
  body[data-active-page="dashboard"][data-theme="light"] .dashboard-analytics-grid{grid-template-columns:1.5fr 1fr;height:230px}
  body[data-active-page="dashboard"][data-theme="light"] .dashboard-health-card{grid-column:1/-1;height:180px}
}
@media(max-width:850px){
  body[data-active-page="dashboard"][data-theme="dark"] .sidebar{width:65px;padding:18px 8px}
  body[data-active-page="dashboard"][data-theme="dark"] .nav-item{margin:2px 0;height:36px;justify-content:center;padding:0 10px;gap:0}
  body[data-active-page="dashboard"][data-theme="dark"] .brand{padding:0 7px 22px}
  body[data-active-page="dashboard"][data-theme="light"] .dashboard-hero-grid{display:block;height:auto}
  body[data-active-page="dashboard"][data-theme="light"] .dashboard-map-card,body[data-active-page="dashboard"][data-theme="light"] .dashboard-summary-card,body[data-active-page="dashboard"][data-theme="light"] .dashboard-todo-card{margin-bottom:12px}
  body[data-active-page="dashboard"][data-theme="light"] .dashboard-map-stage{height:300px}
  body[data-active-page="dashboard"][data-theme="light"] .dashboard-analytics-grid{display:block;height:auto}
  body[data-active-page="dashboard"][data-theme="light"] .dashboard-chart-card,body[data-active-page="dashboard"][data-theme="light"] .dashboard-case-card,body[data-active-page="dashboard"][data-theme="light"] .dashboard-health-card{height:auto;min-height:240px;margin-bottom:12px}
  body[data-active-page="dashboard"][data-theme="light"] .dashboard-device-card{margin-top:0}
}
@media(max-width:600px){body[data-active-page="dashboard"][data-theme="light"] .dashboard-map-stage{height:260px}}

/* Dashboard revision: four KPIs, pending-image review, and annual dye usage. */
body[data-active-page="dashboard"] .dashboard-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
body[data-active-page="dashboard"] .dashboard-analytics-grid{grid-template-columns:repeat(3,minmax(0,1fr));height:clamp(260px,30vh,330px);min-height:0;flex:none;margin-bottom:0}
body[data-active-page="dashboard"] .dashboard-chart-card,body[data-active-page="dashboard"] .dashboard-case-card,body[data-active-page="dashboard"] .dashboard-health-card{height:100%;min-height:0}
.dashboard-review-gallery{min-height:0;display:flex;flex-direction:column;gap:8px;margin-top:10px}.dashboard-review-summary{display:flex;align-items:baseline;gap:7px}.dashboard-review-summary strong{font-family:var(--font-ui);font-size:19px;line-height:1;color:#17233b}.dashboard-review-summary span{color:#8d98a9;font-size:9px}.dashboard-review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-height:0}.dashboard-review-tile{position:relative;min-width:0;overflow:hidden;aspect-ratio:1.08;border:1px solid #e2e7ef;border-radius:9px;background:#f7f9fd;padding:0;text-align:left;cursor:pointer}.dashboard-review-tile img,.dashboard-review-placeholder{display:block;width:100%;height:100%;object-fit:cover}.dashboard-review-placeholder{display:grid;place-items:center;background:linear-gradient(135deg,#e8ecf6,#d7dff1);color:#8a97ad;font-size:24px}.dashboard-review-tile:after{content:"";position:absolute;inset:45% 0 0;background:linear-gradient(transparent,rgba(15,26,46,.78));pointer-events:none}.dashboard-review-badge{position:absolute;left:6px;bottom:6px;z-index:1;border:1px solid #f0b548;border-radius:5px;background:#fff4dc;color:#b87413;padding:2px 5px;font-size:8px;line-height:1}.dashboard-review-badge.missing{border-color:#f17a7f;background:#fff0f1;color:#c4474f}.dashboard-review-tile strong{position:absolute;right:6px;bottom:7px;z-index:1;max-width:65%;overflow:hidden;color:#fff;text-overflow:ellipsis;white-space:nowrap;font-size:8px;font-weight:500}.dashboard-review-tile:hover,.dashboard-review-tile:focus{border-color:#6b6bf0;outline:0;transform:translateY(-1px)}.dashboard-review-empty,.dashboard-usage-empty{display:grid;min-height:130px;place-items:center;color:#929cad;text-align:center;font-size:10px;line-height:1.7}.dashboard-usage-updated{color:#8994a6;font-size:9px;white-space:nowrap}.dashboard-dye-usage{display:flex;min-height:0;flex-direction:column;gap:4px;margin-top:9px}.dashboard-usage-summary{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.dashboard-usage-summary strong{color:#17233b;font-family:var(--font-ui);font-size:20px;line-height:1}.dashboard-usage-summary span{color:#8d98a9;font-size:9px;white-space:nowrap}.dashboard-usage-chart{position:relative;min-height:0;flex:1}.dashboard-usage-chart svg{display:block;width:100%;height:100%;min-height:170px;overflow:visible}.dashboard-usage-chart svg text{fill:#7f8b9e;font-size:9px}.dashboard-usage-chart svg .x-label{font-size:8px}.dye-usage-area{fill:url(#dye-usage-gradient)}.dye-usage-line{fill:none;stroke:#21b8d0;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.dye-usage-dot{fill:#fff;stroke:#5b6bff;stroke-width:2}.dye-usage-hit{fill:transparent;cursor:crosshair}.dye-usage-guide{stroke:#5b6bff;stroke-width:1;stroke-dasharray:3 3;opacity:.75}.dye-usage-tooltip rect{fill:#1e2029;stroke:#5b6bff;stroke-width:1}.dye-usage-tooltip text{fill:#f2f4f8!important;font-size:9px!important}.dashboard-usage-empty{position:absolute;inset:36px 0 0;background:color-mix(in srgb,var(--surface,#fff) 88%,transparent);border-radius:8px}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-review-summary strong,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-usage-summary strong{color:var(--halo-text)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-review-summary span,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-usage-summary span,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-usage-updated{color:var(--halo-faint)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-review-tile{border-color:var(--halo-border);background:var(--halo-elevated)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-review-placeholder{background:#242936;color:var(--halo-muted)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-review-tile:after{background:linear-gradient(transparent,rgba(5,8,15,.88))}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-usage-chart svg text{fill:var(--halo-muted)}body[data-active-page="dashboard"][data-theme="dark"] .dye-usage-area{fill:url(#dye-usage-gradient)}body[data-active-page="dashboard"][data-theme="dark"] .dye-usage-dot{fill:var(--halo-surface);stroke:#7180ff}body[data-active-page="dashboard"][data-theme="dark"] .dye-usage-tooltip rect{fill:var(--halo-elevated);stroke:var(--halo-primary)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-usage-empty{background:rgba(20,21,28,.9);color:var(--halo-muted)}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-review-tile{box-shadow:0 3px 10px rgba(29,47,80,.04)}
@media(min-width:851px) and (max-width:1200px){body[data-active-page="dashboard"] .dashboard-analytics-grid{grid-template-columns:repeat(2,minmax(0,1fr));height:auto;gap:12px}body[data-active-page="dashboard"] .dashboard-health-card{grid-column:1/-1;height:240px}}
@media(max-width:850px){body[data-active-page="dashboard"] .dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-active-page="dashboard"] .dashboard-analytics-grid{display:block;height:auto}body[data-active-page="dashboard"] .dashboard-chart-card,body[data-active-page="dashboard"] .dashboard-case-card,body[data-active-page="dashboard"] .dashboard-health-card{height:auto;min-height:260px;margin-bottom:12px}}
@media(max-width:600px){body[data-active-page="dashboard"] .dashboard-kpi-grid{grid-template-columns:1fr}body[data-active-page="dashboard"] .dashboard-review-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-usage-summary{display:block}.dashboard-usage-summary span{display:block;margin-top:5px}}

/* Dashboard polish: keep light controls readable, hide SVG tooltips until hover,
   and use the same command-center typography in both themes. */
body[data-active-page="dashboard"] .dashboard-v2 svg [hidden]{display:none!important}
body[data-active-page="dashboard"] .dashboard-v2 .leaflet-control-zoom a,
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-map-tools button{font-family:var(--font-ui);font-weight:600;text-shadow:none}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-leaflet-map .leaflet-control-zoom,
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-tools{border-color:#dae3ef;background:rgba(255,255,255,.96);box-shadow:0 7px 18px rgba(32,54,91,.09)}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-leaflet-map .leaflet-control-zoom a,
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-tools button{border-color:#e7ecf3;background:rgba(255,255,255,.96);color:#52627a}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-leaflet-map .leaflet-control-zoom a:hover,
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-tools button:hover{background:#f3f4ff;color:#5f55df}
body[data-active-page="dashboard"][data-theme="light"] .dye-usage-tooltip rect{fill:#fff;stroke:#5b6bff}
body[data-active-page="dashboard"][data-theme="light"] .dye-usage-tooltip text{fill:#17233b!important}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-kpi-copy>span{font-size:10px}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-kpi-copy strong{color:#172033;font-family:var(--font-ui);font-size:24px;font-weight:600;letter-spacing:-.02em}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-kpi-copy small{font-size:9px}
body[data-active-page="dashboard"] .dashboard-usage-summary strong{flex:0 0 auto;white-space:nowrap}
body[data-active-page="dashboard"] .dashboard-usage-summary span{min-width:0;overflow:hidden;text-overflow:ellipsis}

/* Desktop command-center layout: keep the map on the left and move the four KPI cards into a compact right rail. */
@media(min-width:1201px){
  body[data-active-page="dashboard"] .dashboard-overview-grid{display:grid;grid-template-columns:minmax(0,1.72fr) minmax(360px,.9fr);grid-template-rows:auto minmax(0,1fr);height:clamp(430px,51vh,520px);min-height:0;gap:10px;margin-bottom:12px}
  body[data-active-page="dashboard"] .dashboard-overview-grid>.dashboard-kpi-grid{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;min-height:0}
  body[data-active-page="dashboard"] .dashboard-overview-grid>.dashboard-kpi-grid .dashboard-kpi{height:96px;min-height:0;padding:14px;gap:10px}
  body[data-active-page="dashboard"] .dashboard-overview-grid>.dashboard-kpi-grid .dashboard-kpi-icon{width:38px;height:38px;flex-basis:38px}
  body[data-active-page="dashboard"] .dashboard-overview-grid>.dashboard-kpi-grid .dashboard-kpi-icon svg{width:20px;height:20px}
  body[data-active-page="dashboard"] .dashboard-overview-grid>.dashboard-kpi-grid .dashboard-kpi-copy strong{font-size:22px}
  body[data-active-page="dashboard"] .dashboard-overview-grid>.dashboard-hero-grid{display:contents;min-height:0;margin:0}
  body[data-active-page="dashboard"] .dashboard-overview-grid .dashboard-map-card{grid-column:1;grid-row:1 / span 2;height:100%;min-height:0;margin:0;padding:13px 14px 10px}
  body[data-active-page="dashboard"] .dashboard-overview-grid .dashboard-map-workspace{display:flex;align-items:stretch;flex:1;min-height:0;margin-top:8px;position:relative}
  body[data-active-page="dashboard"] .dashboard-overview-grid .dashboard-map-stage{height:auto;min-height:0;aspect-ratio:auto;flex:1}
  body[data-active-page="dashboard"] .dashboard-overview-grid .dashboard-map-card>.map-notice{flex:0 0 19px;height:19px;margin-top:5px}
  body[data-active-page="dashboard"] .dashboard-overview-grid .dashboard-side-stack{grid-column:2;grid-row:2;display:grid;grid-template-rows:1fr 1fr;gap:10px;height:100%;min-height:0;margin:0}
  body[data-active-page="dashboard"] .dashboard-overview-grid .dashboard-summary-card,
  body[data-active-page="dashboard"] .dashboard-overview-grid .dashboard-todo-card{height:100%;min-height:0;margin:0}
  body[data-active-page="dashboard"] .dashboard-overview-grid + .dashboard-analytics-grid{height:clamp(210px,26vh,280px);margin-top:0}
}
@media(max-width:1200px){
  body[data-active-page="dashboard"] .dashboard-overview-grid{display:block;height:auto;min-height:0}
  body[data-active-page="dashboard"] .dashboard-overview-grid>.dashboard-kpi-grid{margin-bottom:12px}
}

/* Full-height dashboard composition: the operational map and dispensing trend stay on the
   left, while every supporting signal is packed into a single right-side command rail. */
.dashboard-side-analytics{display:contents}
@media(min-width:1201px){
  body[data-active-page="dashboard"] .page.dashboard-v2{box-sizing:border-box;display:block;min-height:calc(100vh - 70px);height:auto}
  body[data-active-page="dashboard"] .dashboard-command-grid{display:grid;min-height:752px;grid-template-columns:minmax(0,1.57fr) minmax(420px,.95fr);grid-template-rows:minmax(282px,1.28fr) minmax(112px,.82fr) minmax(140px,.98fr) minmax(188px,1.28fr);gap:10px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-overview-grid,
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-hero-grid,
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-side-stack,
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-analytics-grid{display:contents}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-map-card{grid-column:1;grid-row:1 / 4;box-sizing:border-box;height:100%;min-height:0;margin:0;padding:13px 14px 10px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-chart-card{grid-column:1;grid-row:4;box-sizing:border-box;height:100%;min-height:0;margin:0;padding:13px 14px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-grid{grid-column:2;grid-row:1;display:grid;height:100%;min-height:0;margin:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:10px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-grid .dashboard-kpi{box-sizing:border-box;height:auto;min-height:0;padding:13px;gap:9px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-icon{width:37px;height:37px;flex-basis:37px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-icon svg{width:19px;height:19px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-copy>span{font-size:10px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-copy strong{margin:3px 0;font-size:21px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-copy small{font-size:8px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-summary-card{grid-column:2;grid-row:2;box-sizing:border-box;height:100%;min-height:0;margin:0;padding:12px 14px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-todo-card{grid-column:2;grid-row:3;box-sizing:border-box;height:100%;min-height:0;margin:0;padding:12px 14px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-side-analytics{grid-column:2;grid-row:4;display:grid;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-case-card,
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-health-card{box-sizing:border-box;height:100%;min-height:0;margin:0;padding:13px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-map-workspace{position:relative;display:flex;align-items:stretch;min-height:0;flex:1;margin-top:8px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-map-stage{height:auto;min-height:0;flex:1;aspect-ratio:auto}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-map-card>.map-notice{height:18px;flex:0 0 18px;margin-top:4px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-card-head h2{font-size:13px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-card-head p{font-size:8px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-map-filters{margin-top:7px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-map-filters button{height:24px;font-size:8px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-trend-chart{height:calc(100% - 34px);min-height:0;margin-top:7px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-chart-controls{gap:8px;font-size:8px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-range button{height:25px;padding:0 7px;font-size:8px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-review-gallery{margin-top:7px;gap:5px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-review-empty{min-height:0;flex:1;font-size:9px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-dye-usage{margin-top:6px;gap:2px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-usage-summary strong{font-size:17px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-usage-summary span,
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-usage-updated{font-size:8px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-usage-chart svg{min-height:104px}
}
@media(max-width:1200px){
  body[data-active-page="dashboard"] .dashboard-command-grid{display:block}
}

/* The map is a location-driven component: do not reserve a blank map area when
   the current organization has no valid device coordinates. */
body[data-active-page="dashboard"] .dashboard-map-card[hidden]{display:none!important}
@media(min-width:1201px){
  body[data-active-page="dashboard"] .dashboard-command-grid.map-unavailable .dashboard-chart-card{grid-row:1 / 5}
}

/* The map surface has its own day/night palette.  Earlier dashboard rules used
   dark selectors without a theme guard, which made a light page inherit night-map
   filters and dark filter-count badges. */
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-filters button{border-color:#e1e7f0;background:#fff;color:#748197}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-filters button:hover,
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-filters button:focus,
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-filters button.selected{border-color:#c9c5f8;background:#f5f3ff;color:#5e55d7}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-filters button span{background:#f1f3f7;color:#78869a}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-filters button.selected span{background:#e7e3ff;color:#5e55d7}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-stage{border-color:#dbe5f2;background:linear-gradient(180deg,#fbfdff,#f6faff);box-shadow:0 0 0 1px rgba(219,229,242,.38)}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-leaflet-map{background:#f4f8fe}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-leaflet-map .leaflet-tile-pane,
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-leaflet-map .leaflet-overlay-pane{filter:none}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-leaflet-map .leaflet-control-zoom,
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-tools{border-color:#dae3ef;background:rgba(255,255,255,.96);box-shadow:0 7px 18px rgba(32,54,91,.09)}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-leaflet-map .leaflet-control-zoom a,
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-tools button{border-color:#e7ecf3;background:rgba(255,255,255,.96);color:#65758d}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-leaflet-map .leaflet-control-zoom a:hover,
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-tools button:hover{background:#f3f4ff;color:#5f55df}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .map-legend,
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-account-stat{border-color:#e2e8f1;background:rgba(255,255,255,.93);color:#67758c;box-shadow:0 7px 20px rgba(30,52,88,.1)}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-account-stat strong{color:#17233b}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-account-stat small{color:#9aa5b4}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-leaflet-map .leaflet-control-attribution{background:rgba(255,255,255,.82);color:#97a3b3}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-map-device-panel{border-color:#e4e9f1;background:#fbfcfe;box-shadow:-12px 8px 28px rgba(28,47,82,.16)}

/* Keep the geographic data legible in either dashboard theme.  The dashboard
   shell can be dark without dimming roads, labels, and device context. */
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-leaflet-map .leaflet-tile-pane,
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-leaflet-map .leaflet-overlay-pane{filter:none}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-map-filters button span{background:#f1f3f7;color:#78869a}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-map-filters button.selected span{background:#e7e3ff;color:#5e55d7}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-map-filters button[data-map-filter="live"]:not(.selected) span{background:#e9f8f3;color:#249b72}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-map-filters button[data-map-filter="stale"]:not(.selected) span{background:#fff4e7;color:#c77b18}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-map-filters button[data-map-filter="offline"]:not(.selected) span{background:#eef2f6;color:#6f7f94}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .dashboard-map-filters button span{background:rgba(156,166,191,.16);color:#bac4d4}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .dashboard-map-filters button.selected span{background:rgba(91,107,255,.35);color:#fff}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .dashboard-map-filters button[data-map-filter="live"]:not(.selected) span{background:rgba(43,224,140,.14);color:#7debb9}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .dashboard-map-filters button[data-map-filter="stale"]:not(.selected) span{background:rgba(245,174,54,.15);color:#f5c568}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .dashboard-map-filters button[data-map-filter="offline"]:not(.selected) span{background:rgba(156,166,191,.16);color:#bac4d4}

/* Daily dispensing trend: a cursor-following guide snaps to the closest point,
   while the series itself remains solid and the point tooltip is theme-aware. */
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-trend-chart .dispense-line-chart{stroke-dasharray:none}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-chart-controls i.dispense-line{border-top-style:solid}
body[data-active-page="dashboard"][data-theme="light"] .dashboard-v2 .dashboard-trend-chart .trend-tooltip text{fill:#243150!important}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .dashboard-trend-chart .trend-tooltip text{fill:#f7f8ff!important}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-trend-chart .trend-tooltip-date{font-size:9px;font-weight:700}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-trend-chart .trend-tooltip-value{font-size:9px;font-weight:600}

/* KPI rail: make the four key metrics easier to scan without pushing the
   sparkline down to the card edge. */
@media(min-width:1201px){
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-grid .dashboard-kpi{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:minmax(0,1fr) 31px;align-items:center;column-gap:12px;row-gap:4px;padding:18px}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-icon{grid-column:1;grid-row:1 / span 2;align-self:center;width:44px!important;height:44px!important;flex-basis:44px!important}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-icon svg{width:23px!important;height:23px!important}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-copy{grid-column:2;grid-row:1;align-self:center}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-copy>span{font-size:12px;line-height:1.2}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-copy strong{margin:5px 0 4px;font-size:27px!important;line-height:1}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-copy small{font-size:10px!important;line-height:1.2}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-sparkline{position:static;grid-column:2;grid-row:2;width:68px;height:31px;margin:0;align-self:end;justify-self:start;opacity:1}
  body[data-active-page="dashboard"] .dashboard-command-grid .dashboard-kpi-sparkline path{stroke-width:1.8}
}

/* Notification card: four live messages should use the available rail space
   instead of looking like a compact, table-style metric strip. */
body[data-active-page="dashboard"] .dashboard-notification-card .daily-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:0;height:calc(100% - 29px);margin-top:7px}
body[data-active-page="dashboard"] .dashboard-notification-card .daily-summary-item{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;justify-content:center;gap:9px;min-width:0;height:100%;padding:4px 10px;border:0!important}
body[data-active-page="dashboard"] .dashboard-notification-card .daily-summary-item:first-child{padding-left:10px}
body[data-active-page="dashboard"] .dashboard-notification-card .daily-summary-item>div{width:38px;height:38px;flex-basis:38px}
body[data-active-page="dashboard"] .dashboard-notification-card .daily-summary-item svg{width:20px;height:20px}
body[data-active-page="dashboard"] .dashboard-notification-card .daily-summary-item span{min-width:0;overflow:hidden;text-overflow:clip;white-space:nowrap;font-size:12px;line-height:1.2;color:#627089}
body[data-active-page="dashboard"] .dashboard-notification-card .daily-summary-item strong{margin-top:4px;font-family:var(--font-ui);font-size:25px;line-height:1;color:#152039}
body[data-active-page="dashboard"] .dashboard-notification-card .daily-summary-item small{display:none}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-notification-card .daily-summary-item span{color:var(--halo-muted)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-notification-card .daily-summary-item strong{color:var(--halo-text)}

/* Let the action queue use the full card height instead of leaving unused space
   beneath three compact rows. */
body[data-active-page="dashboard"] .dashboard-todo-card{display:flex;flex-direction:column}
body[data-active-page="dashboard"] .dashboard-todo-card .dashboard-todo-list{display:grid;grid-template-rows:repeat(3,minmax(0,1fr));flex:1;min-height:0;margin-top:12px}
body[data-active-page="dashboard"] .dashboard-todo-card .dashboard-todo-row{height:auto;min-height:0;grid-template-columns:24px minmax(0,1fr) 42px 76px;gap:10px;padding:0 14px}
body[data-active-page="dashboard"] .dashboard-todo-card .dashboard-todo-row>i{width:18px;height:18px;box-shadow:inset 0 0 0 5px #ef6260}
body[data-active-page="dashboard"] .dashboard-todo-card .dashboard-todo-row.warning>i{box-shadow:inset 0 0 0 5px #f0a333}
body[data-active-page="dashboard"] .dashboard-todo-card .dashboard-todo-row.success>i{box-shadow:inset 0 0 0 5px #2db57f}
body[data-active-page="dashboard"] .dashboard-todo-card .dashboard-todo-row span{font-size:13px;font-weight:600}
body[data-active-page="dashboard"] .dashboard-todo-card .dashboard-todo-row b{min-width:30px;padding:4px 8px;font-size:12px}
body[data-active-page="dashboard"] .dashboard-todo-card .dashboard-todo-row em{font-size:11px}

/* Annual dye usage: a larger step-area chart gives the total-usage card the
   same visual weight as the other operational panels. */
body[data-active-page="dashboard"] .dashboard-health-card{display:flex;flex-direction:column}
body[data-active-page="dashboard"] .dashboard-health-card .dashboard-card-head h2{font-size:14px}
body[data-active-page="dashboard"] .dashboard-health-card .dashboard-dye-usage{flex:1;min-height:0;margin-top:12px;gap:10px}
body[data-active-page="dashboard"] .dashboard-health-card .dashboard-usage-summary{align-items:baseline;gap:14px}
body[data-active-page="dashboard"] .dashboard-health-card .dashboard-usage-summary strong{font-size:20px;line-height:1}
body[data-active-page="dashboard"] .dashboard-health-card .dashboard-usage-summary span{font-size:10px;font-weight:500}
body[data-active-page="dashboard"] .dashboard-health-card .dashboard-usage-chart{flex:1;min-height:0}
body[data-active-page="dashboard"] .dashboard-health-card .dashboard-usage-chart svg{height:100%;min-height:0!important}
body[data-active-page="dashboard"] .dashboard-health-card .dashboard-usage-chart svg text{font-family:var(--font-ui);font-size:11px;font-weight:600;text-rendering:geometricPrecision}
body[data-active-page="dashboard"] .dashboard-health-card .dashboard-usage-chart svg .x-label{font-size:10px;font-weight:700;fill:#52627a;letter-spacing:0}
body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-bar{fill:url(#dye-usage-gradient);filter:drop-shadow(0 4px 7px rgba(43,184,208,.18))}
body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-bar.peak{fill:url(#dye-usage-peak-gradient);filter:drop-shadow(0 5px 9px rgba(80,96,232,.28))}
body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-baseline{stroke:#dce4ef;stroke-width:1;vector-effect:non-scaling-stroke}
body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-bar,body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-hit{outline:0}
body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-bar:focus,body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-hit:focus{outline:0!important;stroke:none!important}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-health-card .dashboard-usage-chart svg .x-label{fill:var(--halo-muted)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-health-card .dye-usage-baseline{stroke:var(--halo-border)}
@media(prefers-reduced-motion:reduce){.dashboard-v2 .card{transition:none}.dashboard-v2 .card:hover,.dashboard-v2 .card:focus-within{transform:none}}

/* Semantic title icons and a refined CJK title face for the four analytic panels. */
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-map-card .dashboard-card-head h2,
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-chart-card .dashboard-card-head h2,
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-case-card .dashboard-card-head h2,
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-health-card .dashboard-card-head h2,
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-notification-card .dashboard-card-head h2,
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-todo-card .dashboard-card-head h2{display:inline-flex;align-items:center;gap:8px;font-family:var(--font-ui);font-size:14px;font-weight:800;letter-spacing:-.025em;line-height:1.2}
body[data-active-page="dashboard"] .dashboard-title-icon{width:23px;height:23px;flex:0 0 23px;display:grid;place-items:center;border-radius:8px;background:#f0efff;color:#6558e8;box-shadow:inset 0 1px 1px rgba(255,255,255,.9),0 3px 8px rgba(89,76,202,.12)}
body[data-active-page="dashboard"] .dashboard-title-icon svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
body[data-active-page="dashboard"] .dashboard-title-icon--map{background:#e9f8fb;color:#229db9}
body[data-active-page="dashboard"] .dashboard-title-icon--trend{background:#f0edff;color:#6558e8}
body[data-active-page="dashboard"] .dashboard-title-icon--review{background:#fff4e6;color:#d99024}
body[data-active-page="dashboard"] .dashboard-title-icon--usage{background:#e8f8f1;color:#249f72}
body[data-active-page="dashboard"] .dashboard-title-icon--notification{background:#eef0ff;color:#5d62df}
body[data-active-page="dashboard"] .dashboard-title-icon--todo{background:#fff1f1;color:#e25e68}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-title-icon{background:#252041;color:#a59bff;box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 3px 10px rgba(0,0,0,.24)}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-title-icon--map{background:#14313c;color:#4cd7e5}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-title-icon--review{background:#392b17;color:#ffc366}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-title-icon--usage{background:#123427;color:#56dfa3}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-title-icon--notification{background:#23284b;color:#9aa4ff}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-title-icon--todo{background:#3a2027;color:#ff8e98}

/* Dashboard type system: softer hierarchy and system-native CJK glyph shapes. */
body[data-active-page="dashboard"] .dashboard-v2{--dash-title:#31415c;--dash-text:#62728a;--dash-muted:#98a4b5;--dash-number:#2c3b55;--dash-number-font:var(--font-ui);font-family:var(--font-ui);font-synthesis:none}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2{--dash-title:#dbe5f4;--dash-text:#aab7c9;--dash-muted:#7f8ca1;--dash-number:#e7eef9}
body[data-active-page="dashboard"] .dashboard-v2 .topbar-title h1{color:var(--dash-title);font-family:var(--font-ui);font-weight:700;letter-spacing:-.035em}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-card-head h2{color:var(--dash-title)!important;font-family:var(--font-ui)!important;font-weight:700!important;letter-spacing:-.02em}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-kpi-copy>span,body[data-active-page="dashboard"] .dashboard-v2 .daily-summary-item span,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-todo-row span,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-chart-controls,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-usage-summary span{color:var(--dash-text)}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-kpi-copy small,body[data-active-page="dashboard"] .dashboard-v2 .daily-summary-item small,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-todo-row em,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-card-head p{color:var(--dash-muted)}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-kpi-copy strong,body[data-active-page="dashboard"] .dashboard-v2 .daily-summary-item strong,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-usage-summary strong,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-review-summary strong,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-todo-row b,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-map-account-stat strong{color:var(--dash-number);font-family:var(--dash-number-font);font-weight:650;letter-spacing:-.025em;font-variant-numeric:tabular-nums lining-nums}
body[data-active-page="dashboard"] .dashboard-v2 .dashboard-trend-chart text,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-usage-chart svg text{font-family:var(--font-ui);font-weight:550}
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .dashboard-trend-chart text,body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2 .dashboard-usage-chart svg text{fill:var(--dash-muted)}

/* Match the store-management tree icons and improve history-tree readability. */
.history-store-org .history-org-icon.org-node-icon:before,.history-store-org .history-org-icon.org-node-icon:after{content:none;display:none}.history-store-org .history-org-head h3{font-size:18px;font-weight:700}.history-store-org .history-org-head small{margin-top:6px;font-size:12px;line-height:18px}.history-store-org .history-org-actions button{padding:9px 11px;font-size:12px}.history-store-org .history-org-search input{height:42px;padding:0 13px;font-size:13px}.history-store-org .history-org-scope button{height:36px;font-size:13px}.history-store-org .history-org-node.org-tree-row{gap:11px;padding-top:14px;padding-right:10px;padding-bottom:14px}.history-store-org .history-org-arrow.org-toggle{width:15px;font-size:21px}.history-store-org .history-org-icon.org-node-icon{width:34px;height:34px;border-radius:9px;font-size:18px!important}.history-store-org .history-org-name strong{font-size:14px}.history-store-org .history-org-name small{margin-top:4px;font-size:11px}.history-store-org .history-org-node em,.history-store-org .history-org-node.selected em{font-size:12px}

/* Dye-usage hover feedback: an HTML overlay keeps the tooltip visible above the SVG in every browser. */
body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-pointer-layer{position:absolute;inset:0;z-index:3;cursor:crosshair}body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-hover-overlay{position:absolute;inset:0;z-index:2;pointer-events:none}body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-hover-overlay[hidden]{display:none}body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-hover-overlay-guide{position:absolute;width:1px;border-left:1px dashed #6b63eb;opacity:.9}body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-hover-overlay-tooltip{position:absolute;min-width:146px;transform:translate(-50%,-100%);border:1px solid #6b63eb;border-radius:8px;background:#1e2029;box-shadow:0 10px 20px rgba(35,31,76,.2);padding:5px 10px;color:#f5f6ff;text-align:center;line-height:1.25}body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-hover-overlay-tooltip b,body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-hover-overlay-tooltip span{display:block;font-family:var(--font-ui);font-size:10px;font-weight:650;white-space:nowrap}body[data-active-page="dashboard"] .dashboard-health-card .dye-usage-hover-overlay-tooltip span{margin-top:1px;color:#b9c0ff;font-size:11px;font-weight:750}body[data-active-page="dashboard"][data-theme="light"] .dashboard-health-card .dye-usage-hover-overlay-tooltip{background:#fff;color:#263451;box-shadow:0 10px 20px rgba(39,54,95,.16)}body[data-active-page="dashboard"][data-theme="light"] .dashboard-health-card .dye-usage-hover-overlay-tooltip span{color:#4f5be3}

/* Larger map controls and a softer numeric hierarchy for the dashboard. */
body[data-active-page="dashboard"] .dashboard-v2{--dash-number:#53677f}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-v2{--dash-number:#d9e3f1}body[data-active-page="dashboard"] .dashboard-v2 .dashboard-kpi-copy strong,body[data-active-page="dashboard"] .dashboard-v2 .daily-summary-item strong,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-usage-summary strong,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-review-summary strong,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-map-account-stat strong,body[data-active-page="dashboard"] .dashboard-v2 .dashboard-donut strong,body[data-active-page="dashboard"] .dashboard-v2 .health-gauge strong{color:var(--dash-number)!important;font-weight:600}body[data-active-page="dashboard"] .dashboard-v2 .dashboard-todo-row b{color:#fff!important}.dashboard-v2 .dashboard-leaflet-map .leaflet-control-zoom{margin:14px 0 0 14px;border-radius:10px}.dashboard-v2 .dashboard-leaflet-map .leaflet-control-zoom a{width:40px;height:40px;line-height:39px;font-size:26px;font-weight:650}.dashboard-v2 .dashboard-map-tools{left:14px;top:104px;border-radius:10px}.dashboard-v2 .dashboard-map-tools button{width:40px;height:40px;font-size:19px;font-weight:700}.dashboard-v2 .dashboard-map-stage:fullscreen .dashboard-map-tools{top:112px}

/* Chart panels load independently: the skeleton keeps each card stable while
   the small aggregate request is in flight, then the real series enters softly. */
body[data-active-page="dashboard"] .dashboard-chart-loading{display:grid;grid-template-rows:minmax(0,1fr) auto;align-items:center;gap:10px;height:100%;min-height:0;padding:9px 4px 5px;color:var(--dash-muted,#98a4b5);font-size:10px;text-align:center}body[data-active-page="dashboard"] .dashboard-chart-skeleton{display:block;height:100%;min-height:116px;border-radius:9px;background:linear-gradient(180deg,transparent 0 10%,#e9edf5 10% 11%,transparent 11% 43%,#e9edf5 43% 44%,transparent 44% 76%,#e9edf5 76% 77%,transparent 77%),linear-gradient(132deg,transparent 0 14%,#dfe4f8 14% 18%,transparent 18% 30%,#dfe4f8 30% 34%,transparent 34% 48%,#dfe4f8 48% 52%,transparent 52% 68%,#dfe4f8 68% 72%,transparent 72%);background-size:100% 100%,220% 100%;animation:dashboard-chart-shimmer 1.35s linear infinite}body[data-active-page="dashboard"] .dashboard-chart-skeleton.bars{background:linear-gradient(180deg,transparent 0 10%,#e9edf5 10% 11%,transparent 11% 43%,#e9edf5 43% 44%,transparent 44% 76%,#e9edf5 76% 77%,transparent 77%),repeating-linear-gradient(90deg,transparent 0 7%,#dfe4f8 7% 12%,transparent 12% 17%);background-size:100% 100%,100% 100%;animation:dashboard-chart-shimmer 1.35s linear infinite}@keyframes dashboard-chart-shimmer{to{background-position:0 0,-220% 0}}body[data-active-page="dashboard"] .dashboard-chart-error{display:grid;place-content:center;gap:7px;height:100%;min-height:0;color:var(--dash-muted,#98a4b5);font-size:10px;text-align:center}body[data-active-page="dashboard"] .dashboard-chart-error strong{color:var(--dash-title,#31415c);font-size:12px}body[data-active-page="dashboard"] .dashboard-chart-error button{justify-self:center;border:1px solid #cfcafa;border-radius:7px;background:#f5f3ff;color:#5f54dd;padding:5px 10px;font:inherit;cursor:pointer}body[data-active-page="dashboard"] .dashboard-range button:disabled{cursor:wait;opacity:.55}body[data-active-page="dashboard"] .chart-ready .dispense-area{animation:dashboard-chart-area-in .38s ease-out both}body[data-active-page="dashboard"] .chart-ready .dispense-line-chart{stroke-dasharray:1;stroke-dashoffset:1;animation:dashboard-chart-line-draw .48s ease-out both}body[data-active-page="dashboard"] .chart-ready .dispense-dot{animation:dashboard-chart-dot-in .28s ease-out both}body[data-active-page="dashboard"] .chart-ready .dye-usage-bar{transform-box:fill-box;transform-origin:center bottom;animation:dashboard-chart-bar-in .42s cubic-bezier(.2,.7,.25,1) both}@keyframes dashboard-chart-area-in{from{opacity:0}to{opacity:1}}@keyframes dashboard-chart-line-draw{to{stroke-dashoffset:0}}@keyframes dashboard-chart-dot-in{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}@keyframes dashboard-chart-bar-in{from{opacity:.15;transform:scaleY(.08)}to{opacity:1;transform:scaleY(1)}}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-chart-skeleton{background-image:linear-gradient(180deg,transparent 0 10%,#2c3140 10% 11%,transparent 11% 43%,#2c3140 43% 44%,transparent 44% 76%,#2c3140 76% 77%,transparent 77%),linear-gradient(132deg,transparent 0 14%,#353b54 14% 18%,transparent 18% 30%,#353b54 30% 34%,transparent 34% 48%,#353b54 48% 52%,transparent 52% 68%,#353b54 68% 72%,transparent 72%)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-chart-skeleton.bars{background-image:linear-gradient(180deg,transparent 0 10%,#2c3140 10% 11%,transparent 11% 43%,#2c3140 43% 44%,transparent 44% 76%,#2c3140 76% 77%,transparent 77%),repeating-linear-gradient(90deg,transparent 0 7%,#353b54 7% 12%,transparent 12% 17%)}body[data-active-page="dashboard"][data-theme="dark"] .dashboard-chart-error button{border-color:#4c4a8e;background:#25233f;color:#b9b5ff}@media(prefers-reduced-motion:reduce){body[data-active-page="dashboard"] .dashboard-chart-skeleton,body[data-active-page="dashboard"] .chart-ready .dispense-area,body[data-active-page="dashboard"] .chart-ready .dispense-line-chart,body[data-active-page="dashboard"] .chart-ready .dispense-dot,body[data-active-page="dashboard"] .chart-ready .dye-usage-bar{animation:none}}

/* Color-code selection uses the same elevated feedback as the action controls. */
.color-formula-page .cf-large-swatch{box-shadow:0 8px 22px #252b3b18}
.color-formula-page .cf-color-row{position:relative;transition:transform .18s ease,box-shadow .18s ease,background-color .18s ease,color .18s ease}
.color-formula-page .cf-color-row:hover:not(:disabled){z-index:1;transform:translateY(-2px);box-shadow:0 8px 18px rgba(40,47,67,.16)}
.color-formula-page .cf-color-row.selected{box-shadow:inset 3px 0 var(--primary),0 4px 12px rgba(40,47,67,.10)}
.color-formula-page .cf-color-row.selected:hover:not(:disabled){box-shadow:inset 3px 0 var(--primary),0 10px 20px rgba(40,47,67,.18)}
.color-formula-page .cf-color-row:active:not(:disabled){transform:translateY(0) scale(.995)}

/* Keep the color list and its detail view in one shared workspace surface. */
.color-formula-page .cf-workspace{gap:0!important;align-items:stretch!important;padding:0!important;overflow:hidden}
.color-formula-page .cf-workspace>:is(.cf-color-panel,.cf-detail-panel){min-width:0;padding:20px;background:transparent;box-shadow:none}
.color-formula-page .cf-workspace>.cf-color-panel{border-right:1px solid var(--line)}
@media(max-width:900px){.color-formula-page .cf-workspace>.cf-color-panel{border-right:0;border-bottom:1px solid var(--line)}}

/* The color library is a full work surface: only the internal pane divider remains. */
body[data-active-page="color"] #page-content,
body[data-active-page="color"] .color-formula-page{background:#fff}
body[data-active-page="color"] .color-formula-page{max-width:none;min-height:calc(100vh - 70px);padding:0!important}
body[data-active-page="color"] .color-formula-page .cf-workspace{width:100%;min-height:calc(100vh - 70px);border:0;border-radius:0;box-shadow:none}

/* Shared interaction feedback: make every actionable control feel responsive
   without changing disabled or static form elements. */
#page-content :is(button, [role="button"], a[href], .link, .table-action, .link-button, .nav-item),
.topbar :is(button, [role="button"], a[href]),
.sidebar :is(button, [role="button"], a[href], .nav-item){
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background-color .16s ease,color .16s ease,filter .16s ease;
}
#page-content button:not(:disabled),.topbar button:not(:disabled),.sidebar button:not(:disabled){cursor:pointer}
#page-content :is(button, [role="button"], a[href], .link, .table-action, .link-button, .nav-item):hover:not(:disabled),
.topbar :is(button, [role="button"], a[href]):hover:not(:disabled),
.sidebar :is(button, [role="button"], a[href], .nav-item):hover:not(:disabled){
  transform:translateY(-1px);
}
#page-content :is(button, [role="button"], a[href], .link, .table-action, .link-button, .nav-item):active:not(:disabled),
.topbar :is(button, [role="button"], a[href]):active:not(:disabled),
.sidebar :is(button, [role="button"], a[href], .nav-item):active:not(:disabled){
  transform:translateY(0) scale(.985);
  transition-duration:.08s;
}
.primary-btn:hover:not(:disabled),.danger-btn:hover:not(:disabled),.approve:hover:not(:disabled){
  filter:brightness(1.06);
  box-shadow:0 8px 18px rgba(71,57,183,.24);
}
.danger-btn:hover:not(:disabled){box-shadow:0 8px 18px rgba(210,66,79,.24)}
.secondary-btn:hover:not(:disabled),.history-reset:hover:not(:disabled),.history-fact-action button:hover:not(:disabled){
  border-color:#9b93e9;
  box-shadow:0 5px 12px rgba(40,47,67,.09);
}

/* Formula history: mirror the Store Management organization tree. */
.history-store-org .history-org-head{padding-bottom:14px;border-bottom:1px solid #eceff3}
.history-store-org .history-org-actions button{font-weight:600}
.history-store-org .history-org-actions{position:relative;flex-direction:column;align-items:flex-end;gap:6px}
.history-store-org .history-org-head.has-agent-delete{margin-bottom:50px}
.history-store-org .history-org-actions .store-history-action--delete-agent{border-color:#efc5c5;background:#fff7f6;color:#d94f55}
.history-store-org .history-org-actions .store-history-action--delete-agent:hover,.history-store-org .history-org-actions .store-history-action--delete-agent:focus-visible{border-color:#e79da4;background:#fff0ef;color:#c7434d;outline:none}
.history-store-org .history-org-actions .store-history-action--delete-agent{position:absolute;top:calc(100% + 6px);right:0}
.history-store-org .history-org-search{display:flex;align-items:center;gap:9px;height:42px;padding:0 12px;border:1px solid #dfe3ea;border-radius:7px;background:#fff;cursor:text}
.history-store-org .history-org-search input{height:auto;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#303a4d}
.history-store-org .history-org-search:focus-within{border-color:#8b83e9;box-shadow:0 0 0 3px rgba(99,85,232,.08)}
.history-store-org .history-org-scope{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:12px 0;padding:4px;border-radius:8px;background:#eef0f3}
.history-store-org .history-org-scope button{border:0;border-radius:6px;background:transparent;color:#768196;font-weight:500}
.history-store-org .history-org-scope button.active{background:#fff;color:#5146c8;font-weight:650;box-shadow:0 1px 3px rgba(22,34,54,.1)}
.history-store-org .history-org-node.org-tree-row{min-height:52px;margin:1px 0;padding-top:7px;padding-bottom:7px;border:0;border-radius:7px;background:transparent;color:#4e5a6f}
.history-store-org .history-org-node.org-tree-row:hover{background:#f5f6f9;box-shadow:none}
.history-store-org .history-org-node.org-tree-row.selected{background:#f0effb;color:#5146c8;box-shadow:inset 3px 0 #6658df}
.history-store-org .history-org-node.org-tree-row.selected:hover{box-shadow:inset 3px 0 #6658df}
.history-store-org .history-org-name strong{color:inherit;font-weight:600}
.history-store-org .history-org-name small{color:#9aa2af}
.history-store-org .history-org-node em,.history-store-org .history-org-node.selected em{min-width:23px;margin-left:0;padding:2px 6px;border-radius:10px;background:#f0f2f5;color:#8993a2;text-align:center}
.history-store-org .history-org-node.selected em{background:#fff;color:#6658d8}

/* Formula history responsive sizing: preserve the two-column work area until
   content would be cramped, then turn the tree into a full-width scope panel. */
@media (max-width:1280px){
  .history-page{padding:24px 22px 44px}
  .history-workspace{grid-template-columns:272px minmax(0,1fr);gap:14px}
  .history-store-org.history-org-panel{padding:16px}
  .history-store-org .history-org-node.depth-1{padding-left:25px}
  .history-store-org .history-org-node.depth-2{padding-left:41px}
  .history-store-org .history-org-node.depth-3{padding-left:57px}
  .history-store-org .history-org-node.depth-4{padding-left:73px}
  .history-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .history-date-range,.history-keyword-filter{grid-column:1/-1}
}
@media (max-width:980px){
  .history-page{padding:22px 18px 38px}
  .history-workspace{grid-template-columns:1fr}
  .history-store-org.history-org-panel{position:static;min-height:0}
  .history-store-org .history-org-tree{max-height:300px}
  .history-store-org .history-org-node.depth-1{padding-left:28px}
  .history-store-org .history-org-node.depth-2{padding-left:47px}
  .history-store-org .history-org-node.depth-3{padding-left:66px}
  .history-store-org .history-org-node.depth-4{padding-left:85px}
  .history-dispense-table{min-width:980px}
  .history-panel>[data-history-content]>.history-table-wrap{overflow:auto}
}
@media (max-width:680px){
  .history-page{padding:18px 12px 30px}
  .history-page .page-title-row{gap:12px}
  .history-page .toolbar,.history-page .toolbar button{width:100%}
  .history-filter-heading{align-items:stretch;flex-direction:column}
  .history-filter-heading .primary-btn{width:100%;margin:0}
  .history-filter-grid{grid-template-columns:1fr}
  .history-date-range,.history-keyword-filter{grid-column:auto}
  .history-store-org.history-org-panel{padding:14px}
  .history-store-org .history-org-tree{max-height:270px}
  .history-store-org .history-org-node.depth-2{padding-left:40px}
  .history-store-org .history-org-node.depth-3{padding-left:54px}
  .history-store-org .history-org-node.depth-4{padding-left:68px}
  .history-panel-head{padding:10px 14px}
  .history-tabs{width:100%;overflow-x:auto}
  .history-tabs button{flex:none;white-space:nowrap}
  .history-source-note{padding:10px 14px}
}
@media (prefers-reduced-motion:reduce){
  #page-content :is(button,[role="button"],a[href],.link,.table-action,.link-button,.nav-item),
  .topbar :is(button,[role="button"],a[href]),
  .sidebar :is(button,[role="button"],a[href],.nav-item){transition:none}
  #page-content :is(button,[role="button"],a[href],.link,.table-action,.link-button,.nav-item):hover:not(:disabled),
  .topbar :is(button,[role="button"],a[href]):hover:not(:disabled),
  .sidebar :is(button,[role="button"],a[href],.nav-item):hover:not(:disabled){transform:none}
}

/* Keep Formula History's tree geometry identical to Store Management. */
.history-workspace{grid-template-columns:300px minmax(0,1fr);gap:14px}
.history-store-org.history-org-panel{min-height:0;padding:16px;border-radius:9px;box-shadow:0 2px 8px rgba(31,42,64,.035)}
.history-store-org .history-org-head{margin:0 0 12px;padding:0;border:0}
.history-store-org .history-org-head h3{font-size:15px;font-weight:650}
.history-store-org .history-org-actions button{padding:6px 8px;border-radius:7px;font-size:11px}
.history-store-org .history-org-search{height:34px;margin:0 0 8px;padding:0 10px;border-radius:7px}
.history-store-org .history-org-search input{font-size:12px}
.history-store-org .history-org-tree{max-height:min(620px,calc(100dvh - 300px));margin:0;padding:2px 5px;overflow:auto}
.history-store-org .history-org-node.org-tree-row{min-height:0;gap:8px;margin:3px 0;padding:9px 7px;border:1px solid transparent;border-radius:8px}
.history-store-org .history-org-node.depth-0{padding-left:7px}
.history-store-org .history-org-node.depth-1{padding-left:25px}
.history-store-org .history-org-node.depth-2{padding-left:43px}
.history-store-org .history-org-node.depth-3{padding-left:61px}
.history-store-org .history-org-node.depth-4{padding-left:79px}
.history-store-org .history-org-arrow.org-toggle{width:12px;font-size:17px}
.history-store-org .history-org-icon.org-node-icon{width:26px;height:26px;border-radius:7px;font-size:14px!important}
.history-store-org .history-org-name strong{font-size:12px;font-weight:600}
.history-store-org .history-org-name small{margin-top:2px;font-size:10px}
.history-store-org .history-org-node em,.history-store-org .history-org-node.selected em{font-size:10px}
.history-store-org .history-org-node.org-tree-row{position:relative;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background-color .18s ease}
.history-store-org .history-org-node.org-tree-row:hover{transform:translateY(-1px);border-color:#ded9ff;box-shadow:0 5px 13px rgba(45,55,87,.09)}
.history-store-org .history-org-node.org-tree-row.selected{z-index:1;transform:translateY(-1px);border-color:#d7d2fb;background:#f6f5ff;box-shadow:0 9px 20px rgba(89,77,203,.14),inset 3px 0 var(--primary)}
.history-store-org .history-org-node.org-tree-row.selected:hover{box-shadow:0 9px 20px rgba(89,77,203,.14),inset 3px 0 var(--primary)}
.history-store-org .history-org-node.org-tree-row.selected .history-org-name strong{color:#5146c8}
@media (min-width:851px) and (max-width:980px){.history-workspace{grid-template-columns:300px minmax(0,1fr)}.history-store-org.history-org-panel{position:sticky}.history-store-org .history-org-tree{max-height:min(620px,calc(100dvh - 300px))}}
@media (max-width:850px){.history-workspace{grid-template-columns:1fr}.history-store-org.history-org-panel{position:static}.history-store-org .history-org-tree{max-height:360px}}

/* AI proposal table: prioritize scanability over forcing every long value to
   wrap. Full operator and device values remain available through the tooltip. */
.history-dispense-table th,.history-dispense-table td{padding:12px 10px;line-height:19px}
.history-dispense-table th{white-space:nowrap}
.history-dispense-table th:nth-child(1),.history-dispense-table td:nth-child(1){width:3%}
.history-dispense-table th:nth-child(2),.history-dispense-table td:nth-child(2){width:10%}
.history-dispense-table th:nth-child(3),.history-dispense-table td:nth-child(3){width:14%}
.history-dispense-table th:nth-child(4),.history-dispense-table td:nth-child(4){width:9%}
.history-dispense-table th:nth-child(5),.history-dispense-table td:nth-child(5){width:16%}
.history-dispense-table th:nth-child(6),.history-dispense-table td:nth-child(6){width:16%}
.history-dispense-table th:nth-child(7),.history-dispense-table td:nth-child(7){width:11%}
.history-dispense-table th:nth-child(8),.history-dispense-table td:nth-child(8){width:7%}
.history-dispense-table th:nth-child(9),.history-dispense-table td:nth-child(9){width:9%}
.history-dispense-table th:nth-child(10),.history-dispense-table td:nth-child(10){width:5%}
.history-dispense-table :is(.history-operator-cell,.history-org-cell,.history-device-cell){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-dispense-table :is(.history-operator-cell,.history-device-cell){color:#586579}
.history-dispense-table td:nth-child(3),.history-dispense-table td:nth-child(9){word-break:normal}
.history-dispense-table .history-badge{width:max-content;max-width:none;padding:5px 8px;white-space:nowrap}
.history-dispense-table td:nth-child(10){white-space:nowrap}
@media(max-width:1180px){.history-dispense-table th,.history-dispense-table td{padding-left:8px;padding-right:8px}.history-dispense-table th:nth-child(3),.history-dispense-table td:nth-child(3){width:15%}.history-dispense-table th:nth-child(5),.history-dispense-table td:nth-child(5){width:17%}}

/* Shared hover language for operational controls. The lift is intentionally
   small so dense toolbars remain steady, while the shadow and focus ring make
   every available action feel immediately interactive. */
#page-content button:not(:disabled):hover,
.topbar button:not(:disabled):hover,
.sidebar button:not(:disabled):hover {
  box-shadow: 0 6px 14px rgba(34, 43, 67, .13);
}
#page-content button:not(:disabled):focus-visible,
.topbar button:not(:disabled):focus-visible,
.sidebar button:not(:disabled):focus-visible {
  outline: 3px solid rgba(99, 85, 232, .32);
  outline-offset: 2px;
}
.case-review-page :is(.case-status-card, .case-view-button, .case-reset-button, .case-detail-actions button) {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease;
}
.case-review-page .case-view-button:hover:not(:disabled) {
  border-radius: 5px;
  background: #f1efff;
  color: #5648ca;
  text-decoration: none;
}
.case-review-page :is(.case-action-secondary, .case-reopen-action, .case-danger-action):hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 7px 15px rgba(40, 47, 67, .13);
}
.case-review-page .case-filter-bar {
  flex-wrap:nowrap;
}
.case-review-page .case-search-field {
  min-width:220px;
  max-width:none;
  flex:1 1 260px;
}
.case-review-page .case-filter-select { position:relative; min-width:126px; height:38px; flex:none; z-index:2; }
.case-review-page .case-filter-select > button { width:100%; height:100%; display:flex; align-items:center; justify-content:space-between; gap:18px; border:1px solid #e2e6ee; border-radius:7px; background:#fff; color:#303b4d; padding:0 11px; font:inherit; font-family:var(--font-ui); font-size:12px; font-weight:400; line-height:18px; text-align:left; cursor:pointer; }
.case-review-page .case-filter-select > button:hover { border-color:#bdb5ff; }
.case-review-page .case-filter-select.is-open { z-index:30; }
.case-review-page .case-filter-select.is-open > button { border-color:#887af2; box-shadow:0 0 0 3px #6355e814; }
.case-review-page .case-filter-select > button i { width:8px; height:8px; flex:none; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg) translateY(-2px); transition:transform .16s ease; }
.case-review-page .case-filter-select.is-open > button i { transform:rotate(225deg) translateY(-2px); }
.case-review-page .case-filter-menu { position:absolute; top:calc(100% + 8px); left:0; min-width:100%; padding:5px; border:1px solid #e0e4ec; border-radius:9px; background:#fff; box-shadow:0 12px 28px rgba(28, 39, 60, .16); opacity:0; pointer-events:none; transform:translateY(-4px); transition:opacity .16s ease, transform .16s ease; }
.case-review-page .case-filter-select.is-open .case-filter-menu { opacity:1; pointer-events:auto; transform:translateY(0); }
.case-review-page .case-filter-menu button { width:100%; min-height:32px; display:block; border:0; border-radius:6px; background:transparent; color:#303b4d; padding:7px 9px; font:inherit; font-family:var(--font-ui); font-size:12px; font-weight:400; line-height:18px; text-align:left; cursor:pointer; }
.case-review-page .case-filter-menu button:hover,.case-review-page .case-filter-menu button.selected { background:#f0eeff; color:#5b4dde; }
.case-review-page .case-status-card:first-child i { background:url("./assets/icons/case-all-status.svg?v=1") center/contain no-repeat !important; }
.case-review-page .case-status-card:first-child i:before { content:none !important; }
.case-review-page .case-status-card strong {
  margin-top:10px;
  color:#253044;
  font-family:var(--font-ui);
  font-size:22px;
  font-weight:600;
  font-variant-numeric:proportional-nums;
  font-feature-settings:"pnum" 1,"lnum" 1;
  letter-spacing:-.025em;
  line-height:1.08;
}
.case-review-page .case-status-card.selected strong { color:#6559dd; }
.case-review-page .case-status-card:nth-child(2) i:before { inset:7px; border:0; border-radius:0; background:#e7a43c; -webkit-mask:url("./assets/icons/case-pending-status.svg?v=1") center/contain no-repeat; mask:url("./assets/icons/case-pending-status.svg?v=1") center/contain no-repeat; }
.case-review-page .case-status-card:nth-child(3) i:before { inset:7px; border:0; border-radius:0; background:#3fb380; -webkit-mask:url("./assets/icons/case-published-status.svg?v=1") center/contain no-repeat; mask:url("./assets/icons/case-published-status.svg?v=1") center/contain no-repeat; }
.case-review-page .case-status-card:nth-child(4) i:before { inset:7px; border:0; border-radius:0; background:#8a95a7; -webkit-mask:url("./assets/icons/case-archived-status.svg?v=1") center/contain no-repeat; mask:url("./assets/icons/case-archived-status.svg?v=1") center/contain no-repeat; }
.case-review-page .case-list-head h3 { display:inline-flex; align-items:center; gap:7px; }
.case-review-page .case-list-head h3:before { content:""; width:18px; height:18px; flex:none; background:currentColor; -webkit-mask:url("./assets/icons/case-list.svg?v=1") center/contain no-repeat; mask:url("./assets/icons/case-list.svg?v=1") center/contain no-repeat; }
.case-review-page .case-table-pagination { min-height:52px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 16px; border-top:1px solid #eef0f5; color:#7a8598; font-size:10px; }
.case-review-page .case-page-controls { display:flex; align-items:center; gap:5px; }
.case-review-page .case-page-controls button { min-width:28px; height:27px; border:1px solid #e0e4ec; border-radius:6px; background:#fff; color:#657187; padding:0 7px; font:inherit; font-size:10px; cursor:pointer; transition:.16s ease; }
.case-review-page .case-page-controls button:hover:not(:disabled) { border-color:#bdb5ff; background:#f3f1ff; color:#5b4dde; }
.case-review-page .case-page-controls button.active { border-color:#7668ea; background:#7668ea; color:#fff; box-shadow:0 3px 8px rgba(104,90,219,.18); }
.case-review-page .case-page-controls button:disabled { cursor:not-allowed; opacity:.45; }
.case-review-page .case-page-ellipsis { min-width:12px; text-align:center; color:#98a1af; }
@media(max-width:700px) { .case-review-page .case-table-pagination { align-items:flex-start; flex-direction:column; padding:10px 12px; } .case-review-page .case-page-controls { flex-wrap:wrap; } }
.case-review-page .case-filter-actions {
  display:flex;
  flex:none;
  gap:8px;
  margin-left:0;
}
.case-review-page .case-filter-actions button,
.case-review-page .case-reset-button {
  height:38px;
  margin:0;
  border-radius:7px;
  white-space:nowrap;
}
.case-review-page .case-reset-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:0 12px;
}
.case-review-page .case-reset-button:hover:not(:disabled) {
  transform:translateY(-1px);
  border-color:#8175ff;
  background:#f1efff;
  color:#5648ca;
  box-shadow:0 7px 15px rgba(40, 47, 67, .13);
}
@media(max-width:1350px) {
  .case-review-page .case-filter-bar { flex-wrap:wrap; }
  .case-review-page .case-search-field { max-width:none; flex:1 1 240px; }
}
@media (prefers-reduced-motion: reduce) {
  #page-content button:not(:disabled),.topbar button:not(:disabled),.sidebar button:not(:disabled),
  .case-review-page :is(.case-status-card,.case-view-button,.case-reset-button,.case-detail-actions button) { transition: none; }
}

/* Headquarters uses the supplied building asset; currentColor keeps it in
   sync with the node's light, dark and selected-state palette. */
.store-org-tree .org-node-icon.headquarters:before{left:4px!important;top:4px!important;width:18px!important;height:18px!important;border:0!important;border-radius:0!important;background:currentColor!important;-webkit-mask:url("./assets/icons/headquarters-building.svg") center/contain no-repeat;mask:url("./assets/icons/headquarters-building.svg") center/contain no-repeat;transform:none!important}.store-org-tree .org-node-icon.headquarters:after{content:none!important;display:none!important}
.store-org-tree .org-node-icon.agent:before{left:4px!important;top:4px!important;width:18px!important;height:18px!important;border:0!important;border-radius:0!important;background:currentColor!important;-webkit-mask:url("./assets/icons/organization-agent.svg") center/contain no-repeat;mask:url("./assets/icons/organization-agent.svg") center/contain no-repeat;transform:none!important}.store-org-tree .org-node-icon.agent:after{content:none!important;display:none!important}
.store-org-tree .org-node-icon.store:before,.store-org-tree .org-node-icon.shop:before,.store-org-tree .org-node-icon.room:before{left:3px!important;top:3px!important;width:20px!important;height:20px!important;border:0!important;border-radius:0!important;background:url("./assets/icons/organization-store.svg?v=2") center/contain no-repeat!important;transform:none!important}.store-org-tree .org-node-icon.store:after,.store-org-tree .org-node-icon.shop:after,.store-org-tree .org-node-icon.room:after{content:none!important;display:none!important}

/* The dashboard's supplied solid SVG follows navigation state instead of the
   older outline-icon treatment, while the page heading keeps its own scale. */
.nav-icon .dashboard-gauge-icon{fill:currentColor!important;stroke:none!important;filter:none!important}
.nav-icon .dashboard-gauge-icon path{fill:currentColor!important;fill-opacity:1!important;stroke:none!important}
.nav-icon .store-management-icon{fill:currentColor!important;stroke:none!important;filter:none!important}
.nav-icon .store-management-icon path{fill:currentColor!important;fill-opacity:1!important;stroke:none!important}
body[data-active-page="dashboard"] #page-title{display:inline-flex;align-items:center;gap:9px}
body[data-active-page="dashboard"] .dashboard-page-title-icon{width:28px;height:28px;flex:0 0 28px;display:block;background:url("./assets/icons/dashboard-page.svg?v=3") center/contain no-repeat}
body[data-active-page="organization"] #page-title{display:inline-flex;align-items:center;gap:9px}
body[data-active-page="organization"] .store-management-page-title-icon{width:25px;height:25px;flex:0 0 25px;display:block;color:#2c2c2c}
body[data-active-page="organization"] .store-management-page-title-icon path{fill:currentColor!important;stroke:none!important}
body[data-active-page="organization"][data-theme="dark"] .store-management-page-title-icon{color:#f4f7fd}
@media(max-width:850px){body[data-active-page="dashboard"] #page-title,body[data-active-page="organization"] #page-title{gap:7px}body[data-active-page="dashboard"] .dashboard-page-title-icon,body[data-active-page="organization"] .store-management-page-title-icon{width:21px;height:21px;flex-basis:21px}}

/* Organization management heading uses the supplied people-group icon. */
.organization-tree-page .page-title-row h2{display:inline-flex;align-items:center;gap:9px}
.organization-tree-page .page-title-row h2:before{content:"";width:25px;height:25px;flex:0 0 25px;background:#2c2c2c;-webkit-mask:url("./assets/icons/organization-structure.svg?v=3") center/contain no-repeat;mask:url("./assets/icons/organization-structure.svg?v=3") center/contain no-repeat}
@media(max-width:850px){.organization-tree-page .page-title-row h2{gap:7px}.organization-tree-page .page-title-row h2:before{width:21px;height:21px;flex-basis:21px}}

/* Every shared organization tree identifies its hierarchy with the supplied
   blue icon, independent of the individual node-type icons below it. */
.store-org-tree .store-org-tree-head h3{display:inline-flex;align-items:center;gap:7px}
.store-org-tree .store-org-tree-head h3:before{content:"";width:19px;height:19px;flex:0 0 19px;background:#2c2c2c;-webkit-mask:url("./assets/icons/organization-structure.svg?v=3") center/contain no-repeat;mask:url("./assets/icons/organization-structure.svg?v=3") center/contain no-repeat}
@media(max-width:850px){.store-org-tree .store-org-tree-head h3{gap:6px}.store-org-tree .store-org-tree-head h3:before{width:17px;height:17px;flex-basis:17px}}

/* The color library's supplied illustration is shared by its page and code-panel headings. */
.color-formula-page>.page-title-row h2,.color-formula-page .cf-panel-head h3{display:inline-flex;align-items:center;gap:9px}
.color-formula-page>.page-title-row h2:before,.color-formula-page .cf-panel-head h3:before{content:"";display:block;flex:none;background:url("./assets/icons/color-formula.svg?v=1") center/contain no-repeat}
.color-formula-page>.page-title-row h2:before{width:28px;height:28px}
.color-formula-page .cf-panel-head h3:before{width:22px;height:22px;background-image:url("./assets/icons/color-formula.svg?v=2")}
@media(max-width:700px){.color-formula-page>.page-title-row h2,.color-formula-page .cf-panel-head h3{gap:7px}.color-formula-page>.page-title-row h2:before{width:24px;height:24px}.color-formula-page .cf-panel-head h3:before{width:19px;height:19px}}

/* Color-library navigation and heading use the supplied test-tube icon. */
.nav-icon .color-library-icon{fill:currentColor!important;stroke:none!important;filter:none!important}
.nav-icon .color-library-icon path{fill:currentColor!important;fill-opacity:1!important;stroke:none!important}
body[data-active-page="color"] #page-title{display:inline-flex;align-items:center;gap:9px}
body[data-active-page="color"] .color-library-page-title-icon{width:25px;height:25px;flex:0 0 25px;display:block;color:#13227a}
body[data-active-page="color"] .color-library-page-title-icon path{fill:currentColor!important;stroke:none!important}
body[data-active-page="color"][data-theme="dark"] .color-library-page-title-icon{color:#aebfff}
/* Move the original purple outline between the existing filter buttons. */
body[data-active-page="color"] .cf-palette-filter::before{transition:transform .5s cubic-bezier(.16,1,.3,1),width .34s cubic-bezier(.22,.8,.25,1),height .34s cubic-bezier(.22,.8,.25,1),opacity .15s ease}
body[data-active-page="color"] .cf-palette-filter button,
body[data-active-page="color"] .cf-palette-filter button:hover:not(:disabled),
body[data-active-page="color"] .cf-palette-filter button:active:not(:disabled){transform:none!important;box-shadow:none!important;filter:none!important}
body[data-active-page="color"] .cf-palette-filter button{transition:color .24s ease,border-color .24s ease!important}
@media(prefers-reduced-motion:reduce){body[data-active-page="color"] .cf-palette-filter::before{transition:none!important}body[data-active-page="color"] .cf-palette-filter button{transition:none!important;transform:none!important}}
@media(max-width:850px){body[data-active-page="color"] #page-title{gap:7px}body[data-active-page="color"] .color-library-page-title-icon{width:21px;height:21px;flex-basis:21px}}

/* Customer profiles use the supplied archive-and-user glyph in navigation and page heading. */
.nav-icon .customer-profiles-icon{fill:currentColor!important;stroke:none!important;filter:none!important}
.nav-icon .customer-profiles-icon path{fill:currentColor!important;fill-opacity:1!important;stroke:none!important}
body[data-active-page="customers"] #page-title{display:inline-flex;align-items:center;gap:9px}
body[data-active-page="customers"] .customer-profiles-page-title-icon{width:30px;height:22px;flex:0 0 30px;background:currentColor;-webkit-mask:url("./assets/icons/customer-profiles.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/customer-profiles.svg?v=1") center/contain no-repeat}
@media(max-width:850px){body[data-active-page="customers"] #page-title{gap:7px}body[data-active-page="customers"] .customer-profiles-page-title-icon{width:25px;height:19px;flex-basis:25px}}

/* Formula history uses the supplied flask mark in navigation and its page heading. */
.nav-icon .formula-history-icon{fill:currentColor!important;stroke:none!important;filter:none!important}
.nav-icon .formula-history-icon path{fill:currentColor!important;fill-opacity:1!important;stroke:none!important}
body[data-active-page="history"] #page-title{display:inline-flex;align-items:center;gap:9px}
body[data-active-page="history"] .formula-history-page-title-icon{width:25px;height:25px;flex:0 0 25px;display:block;fill:currentColor;color:#303846}
body[data-active-page="history"] .formula-history-page-title-icon path{fill:currentColor!important;stroke:none!important}
body[data-active-page="history"][data-theme="dark"] .formula-history-page-title-icon{color:#f4f7fd}
@media(max-width:850px){body[data-active-page="history"] #page-title{gap:7px}body[data-active-page="history"] .formula-history-page-title-icon{width:21px;height:21px;flex-basis:21px}}

/* Case review uses the supplied document-and-star mark in both navigation and page title. */
.nav-icon .case-review-icon{position:relative;z-index:1;width:20px;height:20px;display:block;background:currentColor;-webkit-mask:url("./assets/icons/case-review.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/case-review.svg?v=1") center/contain no-repeat}
body[data-active-page="cases"] #page-title{display:inline-flex;align-items:center;gap:9px}
body[data-active-page="cases"] .case-review-page-title-icon{width:25px;height:25px;flex:0 0 25px;display:block;background:currentColor;-webkit-mask:url("./assets/icons/case-review.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/case-review.svg?v=1") center/contain no-repeat}
@media(max-width:850px){body[data-active-page="cases"] #page-title{gap:7px}body[data-active-page="cases"] .case-review-page-title-icon{width:21px;height:21px;flex-basis:21px}}

/* Device management uses the supplied list-in-a-panel mark in navigation and page title. */
.nav-icon .device-management-icon{fill:currentColor!important;stroke:none!important;filter:none!important}
.nav-icon .device-management-icon path{fill:currentColor!important;fill-opacity:1!important;stroke:none!important}
.nav-item.active .device-management-icon{color:#fff!important}
body[data-active-page="devices"] #page-title{display:inline-flex;align-items:center;gap:9px}
body[data-active-page="devices"] #page-title .device-management-icon{width:25px;height:25px;flex:0 0 25px;display:block;fill:currentColor;color:#303846}
body[data-active-page="devices"] #page-title .device-management-icon path{fill:currentColor!important;stroke:none!important}
body[data-active-page="devices"][data-theme="dark"] #page-title .device-management-icon{color:#f4f7fd}
@media(max-width:850px){body[data-active-page="devices"] #page-title{gap:7px}body[data-active-page="devices"] .device-management-icon{width:21px;height:21px;flex-basis:21px}}

/* Inventory management uses the supplied warehouse-and-security icon in both navigation and page title. */
.inventory-management-icon{display:block;background:currentColor;-webkit-mask:url("./assets/icons/inventory-management.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/inventory-management.svg?v=1") center/contain no-repeat}
.nav-icon .inventory-management-icon{position:relative;z-index:1;width:20px;height:20px;color:inherit}
body[data-active-page="inventory"] #page-title{display:inline-flex;align-items:center;gap:9px}
body[data-active-page="inventory"] #page-title .inventory-management-icon{width:25px;height:25px;flex:0 0 25px;color:#303846}
body[data-active-page="inventory"][data-theme="dark"] #page-title .inventory-management-icon{color:#f4f7fd}
@media(max-width:850px){body[data-active-page="inventory"] #page-title{gap:7px}body[data-active-page="inventory"] #page-title .inventory-management-icon{width:21px;height:21px;flex-basis:21px}}

/* Permission management uses the supplied account-and-key icon in navigation and page title. */
.permission-management-icon{display:block;background:currentColor;-webkit-mask:url("./assets/icons/permission-management.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/permission-management.svg?v=1") center/contain no-repeat}
.nav-icon .permission-management-icon{position:relative;z-index:1;width:20px;height:20px;color:inherit}
body[data-active-page="permissions"] #page-title{display:inline-flex;align-items:center;gap:9px}
body[data-active-page="permissions"] #page-title .permission-management-icon{width:25px;height:25px;flex:0 0 25px;color:#303846}
body[data-active-page="permissions"][data-theme="dark"] #page-title .permission-management-icon{color:#f4f7fd}
@media(max-width:850px){body[data-active-page="permissions"] #page-title{gap:7px}body[data-active-page="permissions"] #page-title .permission-management-icon{width:21px;height:21px;flex-basis:21px}}

/* The history filter heading identifies its dispensing-statistics scope. */
.history-filter-heading h3{display:inline-flex;align-items:center;gap:8px}
.history-filter-heading h3:before{content:"";width:20px;height:20px;flex:0 0 20px;background:url("./assets/icons/dispense-statistics.svg?v=3") center/contain no-repeat;-webkit-mask:none;mask:none}
.history-filter-heading > div > .history-result-scope{display:block;margin-top:6px;color:#8994a6;font-size:12px;font-weight:500;line-height:1.25}
body[data-theme="dark"] .history-filter-heading h3:before{filter:brightness(0) invert(1)}
@media(max-width:850px){.history-filter-heading h3{gap:7px}.history-filter-heading h3:before{width:18px;height:18px;flex-basis:18px}}

/* Keep the native filter picker readable even when the browser itself uses a dark appearance. */
.history-filter-grid{margin-top:10px}
.history-filter-grid select{color-scheme:light;background-color:#fff;color:#303b4d}
.history-filter-grid select option{background:#fff;color:#303b4d}
@media(max-width:680px){.history-filter-grid{margin-top:6px}}

/* Custom time selector: unlike a browser-native menu, it is consistently white and opens below the control. */
.history-time-select{position:relative}
.history-time-select-native{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;opacity:0!important;pointer-events:none!important}
.history-time-select-trigger{display:flex;width:100%;height:44px;align-items:center;justify-content:space-between;border:1px solid #d9dee7;border-radius:7px;background:#fff;padding:0 12px;color:#303b4d;font:inherit;font-size:13px;text-align:left;cursor:pointer}
.history-time-select-trigger i{color:#667286;font-size:17px;font-style:normal;line-height:1;transition:transform .16s ease}
.history-time-select[data-open="true"] .history-time-select-trigger{border-color:#8175ff;box-shadow:0 0 0 3px rgba(99,85,232,.12)}
.history-time-select[data-open="true"] .history-time-select-trigger i{transform:rotate(180deg)}
.history-time-select-menu{position:absolute;z-index:30;top:calc(100% + 8px);left:0;display:none;min-width:100%;overflow:hidden;border:1px solid #d9dee7;border-radius:8px;background:#fff;padding:5px;box-shadow:0 12px 26px rgba(28,39,58,.18)}
.history-time-select[data-open="true"] .history-time-select-menu{display:grid;gap:3px}
.history-time-select-menu button{width:100%;height:38px;border:0;border-radius:5px;background:#fff;padding:0 10px;color:#303b4d;font:inherit;font-size:13px;text-align:left;cursor:pointer}
.history-time-select-menu button:hover,.history-time-select-menu button.active{background:#f0efff;color:#5144d1;font-weight:600}
@media(max-width:680px){.history-time-select-trigger{height:44px}.history-time-select-menu{top:calc(100% + 6px)}}

/* All remaining history filters use the same controlled, white menu below their inputs. */
.history-filter-select{position:relative}
.history-filter-select-native{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;opacity:0!important;pointer-events:none!important}
.history-filter-select-trigger{display:flex;width:100%;height:44px;align-items:center;justify-content:space-between;border:1px solid #d9dee7;border-radius:7px;background:#fff;padding:0 12px;color:#303b4d;font:inherit;font-size:13px;text-align:left;cursor:pointer}
.history-filter-select-trigger i{color:#667286;font-size:17px;font-style:normal;line-height:1;transition:transform .16s ease}
.history-filter-select[data-open="true"] .history-filter-select-trigger{border-color:#8175ff;box-shadow:0 0 0 3px rgba(99,85,232,.12)}
.history-filter-select[data-open="true"] .history-filter-select-trigger i{transform:rotate(180deg)}
.history-filter-select-menu{position:absolute;z-index:30;top:calc(100% + 8px);left:0;display:none;min-width:100%;max-height:250px;overflow:auto;border:1px solid #d9dee7;border-radius:8px;background:#fff;padding:5px;box-shadow:0 12px 26px rgba(28,39,58,.18)}
.history-filter-select[data-open="true"] .history-filter-select-menu{display:grid;gap:3px}
.history-filter-select-menu button{width:100%;min-height:38px;border:0;border-radius:5px;background:#fff;padding:8px 10px;color:#303b4d;font:inherit;font-size:13px;line-height:20px;text-align:left;cursor:pointer}
.history-filter-select-menu button:hover,.history-filter-select-menu button.active{background:#f0efff;color:#5144d1;font-weight:600}
@media(max-width:680px){.history-filter-select-trigger{height:44px}.history-filter-select-menu{top:calc(100% + 6px)}}

/* Match the Case Review source selector: a deliberate purple focus halo makes
   every dispensing filter's expanded state immediately recognizable. */
.history-page :is(.history-time-select,.history-filter-select)[data-open="true"]{z-index:30}.history-page :is(.history-time-select-trigger,.history-filter-select-trigger):hover{border-color:#bdb5ff}.history-page :is(.history-time-select,.history-filter-select)[data-open="true"] :is(.history-time-select-trigger,.history-filter-select-trigger){border-color:#887af2;box-shadow:0 0 0 3px #6355e814}.history-page :is(.history-time-select-menu,.history-filter-select-menu){border-color:#e0e4ec;border-radius:9px;box-shadow:0 12px 28px rgba(28,39,60,.16)}.history-page :is(.history-time-select-menu,.history-filter-select-menu) button:hover,.history-page :is(.history-time-select-menu,.history-filter-select-menu) button.active{background:#f0eeff;color:#5b4dde}

/* Date ranges use an in-page calendar so the visual feedback is consistent across browsers. */
.history-date-picker{position:relative;min-width:0}
.history-date-select-native{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;opacity:0!important;pointer-events:none!important}
.history-date-trigger{display:flex;width:100%;height:44px;align-items:center;justify-content:space-between;border:1px solid #d9dee7;border-radius:7px;background:#fff;padding:0 12px;color:#303b4d;font:inherit;font-size:13px;text-align:left;cursor:pointer;font-variant-numeric:tabular-nums}
.history-date-trigger i{color:#667286;font-size:17px;font-style:normal;line-height:1;transition:transform .16s ease}
.history-date-picker[data-open="true"] .history-date-trigger{border-color:#8175ff;box-shadow:0 0 0 3px rgba(99,85,232,.12)}
.history-date-picker[data-open="true"] .history-date-trigger i{transform:rotate(180deg)}
.history-date-menu{position:absolute;z-index:35;top:calc(100% + 8px);left:0;display:none;width:272px;border:1px solid #d9dee7;border-radius:10px;background:#fff;padding:10px;box-shadow:0 14px 30px rgba(28,39,58,.2)}
.history-date-picker[data-open="true"] .history-date-menu{display:block}
.history-date-menu-head{display:grid;grid-template-columns:30px 1fr 30px;align-items:center;margin-bottom:7px;text-align:center}
.history-date-menu-head button{width:28px;height:28px;border:0;border-radius:5px;background:transparent;color:#596579;font:inherit;font-size:22px;line-height:1;cursor:pointer}
.history-date-menu-head button:hover{background:#f0efff;color:#5144d1}
.history-date-heading{position:relative;display:flex;align-items:center;justify-content:center;gap:4px}.history-date-heading strong{color:#303b4d;font-size:13px}.history-date-year-trigger{display:inline-flex!important;width:auto!important;height:28px!important;align-items:center;gap:5px;padding:0 5px!important;color:#303b4d!important;font-size:13px!important;font-weight:700}.history-date-year-trigger i{width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .16s ease}.history-date-year-trigger:hover{background:#f0efff!important}.history-date-picker[data-year-open="true"] .history-date-year-trigger i{transform:rotate(225deg) translateY(-1px)}.history-date-year-menu{position:absolute;top:47px;left:50%;z-index:3;display:none;width:100px;max-height:190px;overflow:auto;transform:translateX(-50%);padding:5px;border:1px solid #d9dee7;border-radius:7px;background:#fff;box-shadow:0 10px 22px rgba(28,39,58,.18)}.history-date-picker[data-year-open="true"] .history-date-year-menu{display:grid;gap:3px}.history-date-year-menu button{width:100%;height:30px;border:0;border-radius:5px;background:#fff;color:#303b4d;font:inherit;font-size:12px;cursor:pointer}.history-date-year-menu button:hover{background:#f0efff;color:#5144d1}.history-date-year-menu button.active{background:#5b49e2;color:#fff;font-weight:700}
.history-date-weekdays,.history-date-days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;text-align:center}
.history-date-weekdays{margin-bottom:3px;color:#8a95a6;font-size:11px;line-height:28px}
.history-date-days button{height:30px;border:0;border-radius:5px;background:#fff;color:#303b4d;font:inherit;font-size:12px;cursor:pointer}
.history-date-days button:hover{background:#f0efff;color:#5144d1}
.history-date-days button.active{background:#5b49e2;color:#fff;font-weight:700}
.history-date-days button.muted{color:#bac1cc}
@media(max-width:680px){.history-date-trigger{height:44px}.history-date-menu{top:calc(100% + 6px);width:min(272px,calc(100vw - 56px))}}

/* Keep history actions together in the filter header, with the export action after query. */
.history-filter-actions{display:flex;align-items:center;gap:10px;flex:none}
.history-filter-actions .primary-btn,.history-filter-actions .secondary-btn{height:42px;margin:0;padding:0 18px;white-space:nowrap}
.history-filter-actions .secondary-btn{border:1px solid #d8dde6;border-radius:7px;background:#fff;color:#364152;font-size:13px;font-weight:600}
.history-filter-actions .history-reset-icon{display:inline-grid;width:42px;min-width:42px;place-items:center;padding:0}.history-filter-actions .history-reset-icon>svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s ease}.history-filter-actions .history-reset-icon:hover:not(:disabled)>svg{transform:rotate(-110deg)}
.history-filter-actions [data-history-export]{display:inline-flex;align-items:center;justify-content:center;gap:7px}.history-filter-actions [data-history-export]>svg{width:15px;height:15px;flex:0 0 15px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.history-filter-panel :is(.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger,.history-filter-select-menu button,.history-keyword-filter input,.history-filter-actions .secondary-btn){font-family:var(--font-ui);font-size:13px;font-weight:400;line-height:19px}
.history-filter-grid>.history-search-actions{grid-column:1/-1;display:flex;align-items:flex-end;gap:10px;min-width:0;flex-wrap:wrap}.history-search-actions>.history-keyword-filter{display:block;min-width:0;width:min(520px,100%);flex:0 1 520px;max-width:520px}.history-search-actions>.history-date-range{width:min(470px,100%);flex:0 1 470px}.history-search-actions>.history-filter-actions{width:auto;flex:none}.history-search-actions>.history-filter-actions [data-history-export]{flex:0 0 auto}@media(max-width:620px){.history-filter-grid>.history-search-actions{align-items:stretch}.history-search-actions>.history-keyword-filter,.history-search-actions>.history-date-range{width:100%;max-width:none;flex-basis:100%}.history-search-actions>.history-filter-actions{width:100%}}
.history-filter-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.history-filter-grid>.history-search-actions{grid-column:1/-1}
@media(max-width:1100px){.history-filter-grid{grid-template-columns:1fr}}@media(max-width:620px){.history-filter-grid{grid-template-columns:1fr}}
@media(max-width:680px){.history-filter-actions{width:100%;align-items:stretch;flex-direction:column}.history-filter-actions .primary-btn,.history-filter-actions .secondary-btn{width:100%;margin:0}}
@media(max-width:680px){.history-filter-actions{align-items:center;flex-direction:row}.history-filter-actions .history-reset-icon{width:42px;flex:none}.history-filter-actions [data-history-export]{flex:1}}
@media(max-width:1100px){.history-filter-grid>.history-keyword-filter{grid-column:1/-2}.history-filter-grid>.history-filter-actions{grid-column:-2/-1}}@media(max-width:620px){.history-filter-grid>.history-keyword-filter,.history-filter-grid>.history-filter-actions{grid-column:auto}.history-filter-grid>.history-filter-actions{width:100%}}

/* Formula-history filters use the controls themselves as their labels. On a
 * desktop canvas every filter belongs to one continuous horizontal line. */
.history-filter-panel .history-filter-grid{grid-template-columns:minmax(180px,1.65fr) minmax(260px,1.85fr) repeat(5,minmax(110px,1fr)) auto!important;align-items:center;column-gap:12px;row-gap:0}
.history-filter-panel .history-filter-grid label>span{display:none}
/* Let the keyword and date controls join the same grid as every selector, so
 * their visual order stays stable instead of being trapped in a separate row. */
.history-filter-panel .history-filter-grid>.history-search-actions{display:contents}
.history-filter-panel .history-search-actions>.history-keyword-filter,.history-filter-panel .history-search-actions>.history-date-range{width:100%;max-width:none;grid-column:auto;flex:0 0 auto}
.history-filter-panel .history-search-actions>.history-filter-actions{grid-column:auto;order:1;width:max-content;justify-content:flex-start}
@media(max-width:1280px){.history-filter-panel .history-filter-grid{grid-template-columns:minmax(0,1fr)!important;align-items:stretch;row-gap:12px}}

/* The history keyword field has the same lifted focus feedback as selectors.
 * Its focused width is sized to show the full in-field helper without wrapping. */
.history-filter-panel .history-keyword-filter{position:relative;z-index:1;transition:width .2s ease,transform .2s ease}
.history-filter-panel .history-keyword-filter>div{transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}
.history-filter-panel .history-keyword-filter:focus-within{z-index:230;transform:translateY(-3px)}
.history-filter-panel .history-keyword-filter:focus-within>div{border-color:#b8b0ef;box-shadow:none}
@media(min-width:1081px){.history-filter-panel .history-search-actions>.history-keyword-filter:focus-within{width:max(300px,100%)}}
@media(prefers-reduced-motion:reduce){.history-filter-panel .history-keyword-filter,.history-filter-panel .history-keyword-filter>div{transition:none}.history-filter-panel .history-keyword-filter:focus-within{transform:none}}

/* Formula history reuses the Customer Archive search mark and Case Review's
 * 8px V-shaped disclosure icon, including its open-state rotation. */
.history-filter-panel .history-search-icon{width:16px;height:16px}
.history-filter-panel :is(.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger) i{width:8px;height:8px;flex:none;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;color:#667286;font-size:0;line-height:0;transform:rotate(45deg) translateY(-2px);transition:transform .16s ease}
.history-filter-panel .history-time-select[data-open="true"] .history-time-select-trigger i,.history-filter-panel .history-filter-select[data-open="true"] .history-filter-select-trigger i,.history-filter-panel .history-date-picker[data-open="true"] .history-date-trigger i{transform:rotate(225deg) translateY(-2px)}

/* Formula History: the organization tree and dispense filters form one
 * connected control area on wide screens. The divider preserves each area's
 * independent height while removing the visual gap between the two cards. */
@media (min-width:1081px){
  .history-workspace{column-gap:0;row-gap:14px}
  .history-store-org.history-org-panel{border-radius:10px 0 0 10px;border-right-color:#e6eaf0;box-shadow:0 1px 3px rgba(22,34,54,.04)}
  .history-main>.history-filter-panel{border-radius:0 10px 10px 0;border-left:0;box-shadow:0 1px 3px rgba(22,34,54,.04)}
  body[data-theme="dark"] .history-store-org.history-org-panel{border-right-color:#2d374a;box-shadow:0 1px 3px rgba(0,0,0,.22)}
  body[data-theme="dark"] .history-main>.history-filter-panel{border-left:0;box-shadow:0 1px 3px rgba(0,0,0,.22)}
}

/* Shared selector feedback: all remaining native selects are upgraded to the
   same floating interaction model used by Case Review. */
.dc-select{position:relative;display:block;width:100%;min-width:0;height:var(--dc-select-height,40px)}.dc-select[data-open="true"]{z-index:220}.dc-select-native{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;opacity:0!important;pointer-events:none!important}.dc-select-trigger{display:flex;width:100%;height:100%;align-items:center;justify-content:space-between;gap:12px;border:1px solid #e2e6ee;border-radius:7px;background:#fff;padding:0 11px;color:#596579;font:inherit;font-size:inherit;line-height:1;text-align:left;cursor:pointer;transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease}.dc-select-trigger>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dc-select-trigger>i{width:8px;height:8px;flex:none;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .16s ease}.dc-select-trigger:hover{border-color:#bdb5ff}.dc-select[data-open="true"] .dc-select-trigger{border-color:#887af2;box-shadow:0 0 0 3px #6355e814}.dc-select[data-open="true"] .dc-select-trigger>i{transform:rotate(225deg) translateY(-2px)}.dc-select-trigger:focus-visible{outline:0;border-color:#887af2;box-shadow:0 0 0 3px #6355e824}.dc-select-trigger:disabled{cursor:not-allowed;opacity:.58}.dc-select-menu{position:absolute;top:calc(100% + 8px);left:0;display:grid;min-width:100%;max-height:260px;overflow:auto;border:1px solid #e0e4ec;border-radius:9px;background:#fff;padding:5px;box-shadow:0 12px 28px rgba(28,39,60,.16);opacity:0;pointer-events:none;transform:translateY(-4px);transition:opacity .16s ease,transform .16s ease}.dc-select[data-open="true"] .dc-select-menu{opacity:1;pointer-events:auto;transform:translateY(0)}.dc-select-menu button{width:100%;min-height:32px;border:0;border-radius:6px;background:transparent;padding:7px 9px;color:#48566b;font:inherit;font-size:inherit;text-align:left;cursor:pointer}.dc-select-menu button:hover,.dc-select-menu button.active{background:#f0eeff;color:#5b4dde}.dc-select-menu button.active{font-weight:600}.dc-select-menu button:disabled{color:#a4adba;cursor:not-allowed}

/* The application shell follows the active theme: white in daytime and navy at night. */
body[data-theme="light"] .sidebar{background:#fff;color:#526078;border-right:1px solid #e7ebf2;box-shadow:1px 0 0 rgba(18,31,52,.02)}
body[data-theme="light"] .brand strong{color:#172033}
body[data-theme="light"] .brand span{color:#8390a5}
body[data-theme="light"] .workspace-switch{border-color:#e2e7ef;background:#f8fafc;color:#56647a}
body[data-theme="light"] .nav-label{color:#8b96a8}
body[data-theme="light"] .nav-item{color:#56647a}
body[data-theme="light"] .nav-item:hover{background:#f1f3f8;color:#243149}
body[data-theme="light"] .nav-item:hover .nav-icon svg{stroke:currentColor;filter:none}
body[data-theme="light"] .nav-item.active{background:linear-gradient(100deg,#5e50eb,#7264f7);color:#fff;box-shadow:0 7px 20px #5144d14a}
body[data-theme="light"] .nav-item.active .nav-icon svg{stroke:#fff;filter:drop-shadow(0 1px 2px #2419a8)}
body[data-theme="light"] .sidebar-footer{border-top-color:#e7ebf2}
body[data-theme="light"] .sidebar-footer strong{color:#27334a}
body[data-theme="light"] .sidebar-footer small{color:#8793a7}

body[data-theme="dark"] .sidebar{background:#0a0b0f;color:#d8e0ef;border-right:1px solid #20232d;box-shadow:none}
body[data-theme="dark"] .brand strong{color:#fff}
body[data-theme="dark"] .brand span{color:#8492aa}
body[data-theme="dark"] .workspace-switch{border-color:#2f333d;background:#16181f;color:#c3cee2}
body[data-theme="dark"] .nav-label{color:#71819c}
body[data-theme="dark"] .nav-item{color:#b9c5d8}
body[data-theme="dark"] .nav-item:hover{background:#1e2029;color:#fff}
body[data-theme="dark"] .nav-item.active{background:linear-gradient(100deg,#5e50eb,#7264f7);color:#fff;box-shadow:0 7px 20px #5144d14a}
body[data-theme="dark"] .sidebar-footer{border-top-color:#242731}
body[data-theme="dark"] .sidebar-footer strong{color:#fff}
body[data-theme="dark"] .sidebar-footer small{color:#8290a6}
body[data-active-page="dashboard"][data-theme="dark"] .sidebar{background:#0a0b0f;border-right:1px solid #20232d}
body[data-active-page="dashboard"][data-theme="dark"] .workspace-switch{border-color:#2f333d;background:#16181f;color:#c3cee2}
body[data-active-page="dashboard"][data-theme="dark"] .nav-item:hover{background:#1e2029;color:#fff}
body[data-active-page="dashboard"][data-theme="dark"] .sidebar-footer{border-top-color:#242731}

/* Keep the header controls and account identity as a compact right-aligned group. */
.topbar{gap:24px}
.top-actions{margin-left:auto;gap:12px;padding-left:24px}
.top-actions>.icon-btn,.top-actions>.language-picker .language-trigger{width:38px;height:38px;border-radius:9px}
.top-actions>.icon-btn:hover,.top-actions>.language-picker .language-trigger:hover{background:#f1f3f8}
body[data-theme="dark"] .top-actions>.icon-btn:hover,body[data-theme="dark"] .top-actions>.language-picker .language-trigger:hover{background:#1e2029}
@media(max-width:700px){.topbar{gap:12px}.top-actions{gap:7px;padding-left:0}.top-actions>.icon-btn,.top-actions>.language-picker .language-trigger{width:34px;height:34px}}

/* Keep every module header on the dashboard's 70px white surface. */
.topbar{height:70px;padding:0 28px}
body[data-theme="light"] .topbar{background:#fff;border-bottom-color:#e8ebf2}
body[data-theme="dark"] .topbar{background:#0f141f;border-bottom-color:#252d3d}
@media(max-width:700px){.topbar{height:auto;min-height:70px;padding:12px 14px}}

/* The dashboard glyph uses the same light ink as the Store Management title in night mode. */
body[data-active-page="dashboard"][data-theme="dark"] .dashboard-page-title-icon{background:#f4f7fd;-webkit-mask:url("./assets/icons/dashboard-page.svg?v=3") center/contain no-repeat;mask:url("./assets/icons/dashboard-page.svg?v=3") center/contain no-repeat}

/* Customer-list heading uses the supplied people icon without changing its baseline. */
.customer-table-heading h3{display:inline-flex;align-items:center;gap:9px}.customer-table-heading h3:before{content:"";width:21px;height:20px;flex:0 0 21px;background:#2c2c2c;-webkit-mask:url("./assets/icons/customer-list-outline.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/customer-list-outline.svg?v=1") center/contain no-repeat}
body[data-theme="dark"] .customer-table-heading h3:before{background:#e7edf6}

/* Customer list: keep the supplied people glyph beside the first column label. */
.customer-table-card .table th:first-child:before{content:"";display:inline-block;width:20px;height:20px;margin-right:8px;vertical-align:-5px;background:#2c2c2c;-webkit-mask:url("./assets/icons/customer-list-outline.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/customer-list-outline.svg?v=1") center/contain no-repeat}
body[data-theme="dark"] .customer-table-card .table th:first-child:before{background:#e7edf6}
@media(max-width:850px){.customer-table-card .table th:first-child:before{width:18px;height:18px;margin-right:7px;vertical-align:-4px}}

/* Customer list: use the supplied document glyph beside contact details. */
.customer-table-card .table th:nth-child(2):before{content:"";display:inline-block;width:20px;height:20px;margin-right:8px;vertical-align:-5px;background:#2c2c2c;-webkit-mask:url("./assets/icons/customer-contact.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/customer-contact.svg?v=1") center/contain no-repeat}
body[data-theme="dark"] .customer-table-card .table th:nth-child(2):before{background:#e7edf6}
@media(max-width:850px){.customer-table-card .table th:nth-child(2):before{width:18px;height:18px;margin-right:7px;vertical-align:-4px}}

/* Customer list: use the supplied organization-structure glyph. */
.customer-table-card .table th:nth-child(3):before{content:"";display:inline-block;width:20px;height:20px;margin-right:8px;vertical-align:-5px;background:#2c2c2c;-webkit-mask:url("./assets/icons/customer-organization.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/customer-organization.svg?v=1") center/contain no-repeat}
body[data-theme="dark"] .customer-table-card .table th:nth-child(3):before{background:#e7edf6}
@media(max-width:850px){.customer-table-card .table th:nth-child(3):before{width:18px;height:18px;margin-right:7px;vertical-align:-4px}}

/* Customer list: use the supplied edit glyph beside notes. */
.customer-table-card .table th:nth-child(4):before{content:"";display:inline-block;width:20px;height:20px;margin-right:8px;vertical-align:-5px;background:#2c2c2c;-webkit-mask:url("./assets/icons/customer-notes.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/customer-notes.svg?v=1") center/contain no-repeat}
body[data-theme="dark"] .customer-table-card .table th:nth-child(4):before{background:#e7edf6}
@media(max-width:850px){.customer-table-card .table th:nth-child(4):before{width:18px;height:18px;margin-right:7px;vertical-align:-4px}}

/* Customer list: use the supplied refresh glyph beside the latest-update label. */
.customer-table-card .table th:nth-child(5):before{content:"";display:inline-block;width:20px;height:20px;margin-right:8px;vertical-align:-5px;background:#2c2c2c;-webkit-mask:url("./assets/icons/customer-updated.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/customer-updated.svg?v=1") center/contain no-repeat}
body[data-theme="dark"] .customer-table-card .table th:nth-child(5):before{background:#e7edf6}
@media(max-width:850px){.customer-table-card .table th:nth-child(5):before{width:18px;height:18px;margin-right:7px;vertical-align:-4px}}

/* Customer directory pagination keeps the list at a predictable ten rows per page. */
.customer-pagination{display:flex;min-height:64px;align-items:center;justify-content:space-between;gap:14px;padding:12px 20px;border-top:1px solid #e8ebf0;background:var(--surface);color:#788397;font-size:12px}.customer-page-controls{display:flex;align-items:center;gap:6px}.customer-page-controls button{min-width:34px;height:34px;padding:0 10px;border:1px solid #dfe3ea;border-radius:7px;background:var(--surface);color:#596579;font:inherit;font-size:12px;cursor:pointer;transition:border-color .16s ease,background-color .16s ease,color .16s ease,transform .16s ease}.customer-page-controls button:hover:not(:disabled){border-color:#9b92ec;background:#f4f2ff;color:#5346ca;transform:translateY(-1px)}.customer-page-controls button:focus-visible{outline:3px solid rgba(99,85,232,.25);outline-offset:2px}.customer-page-controls button.active{border-color:var(--primary);background:var(--primary);color:#fff;font-weight:650}.customer-page-controls button:disabled{background:#f4f5f7;color:#afb6c2;cursor:not-allowed}

.customer-page-ellipsis{display:grid;width:16px;height:34px;place-items:center;color:#9ba3b0}

/* Store management organization tree — isolated layout and interaction rules. */
.organization-tree-page{max-width:none;padding-top:18px}
.organization-tree-page .org-tree-layout{grid-template-columns:minmax(260px,300px) minmax(0,1fr);gap:16px;align-items:start}
.organization-tree-page .store-org-tree{min-height:620px;padding:16px}
.organization-tree-page .store-org-tree-head{align-items:flex-start;margin:0 0 12px;padding:0 0 12px;border-bottom:1px solid #edf0f5}
.organization-tree-page .store-org-tree-head h3{font-size:16px;font-weight:700}
.organization-tree-page .store-org-tree-head small{margin-top:4px;font-size:11px}
.organization-tree-page .store-org-tree-head button{padding:7px 9px;font-size:11px}
.organization-tree-page .store-org-tree-search{display:flex;align-items:center;height:36px;margin:0 0 8px;padding:0 10px;border:1px solid #dfe3ea;border-radius:7px;background:#fff}
.organization-tree-page .store-org-tree-search input{height:auto;margin:0;padding:0;border:0;background:transparent;font-size:12px}
.organization-tree-page .store-org-tree-search:focus-within{border-color:#8b83e9;box-shadow:0 0 0 3px rgba(99,85,232,.08)}
.organization-tree-page .store-org-tree-list{max-height:calc(100vh - 238px);margin:0 -5px;padding:2px 5px;overflow:auto}
.organization-tree-page .store-org-tree-row{min-height:48px;gap:9px;margin:3px 0;padding:8px;border:1px solid transparent;border-radius:8px;background:transparent;color:#4e5a6f;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background-color .18s ease}
.organization-tree-page .store-org-tree-row.depth-0{padding-left:8px}.organization-tree-page .store-org-tree-row.depth-1{padding-left:25px}.organization-tree-page .store-org-tree-row.depth-2{padding-left:42px}.organization-tree-page .store-org-tree-row.depth-3{padding-left:59px}.organization-tree-page .store-org-tree-row.depth-4{padding-left:76px}
.organization-tree-page .store-org-tree-row:hover{z-index:1;transform:translateY(-1px);border-color:#ded9ff;background:#fbfaff;box-shadow:0 5px 13px rgba(45,55,87,.09)}
.organization-tree-page .store-org-tree-row.selected{z-index:2;transform:translateY(-1px);border-color:#d7d2fb;background:#f6f5ff;box-shadow:0 9px 20px rgba(89,77,203,.14)}
.organization-tree-page .store-org-tree-row.selected .store-org-tree-name strong{color:#5146c8}
.organization-tree-page .store-org-tree-row:focus-visible{outline:3px solid rgba(99,85,232,.22);outline-offset:2px}
.organization-tree-page .store-org-tree-toggle{width:12px;color:#778195;font-size:17px;line-height:1}
.organization-tree-page .store-org-tree-name{min-width:0;flex:1}
.organization-tree-page .store-org-tree-name strong,.organization-tree-page .store-org-tree-name small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.organization-tree-page .store-org-tree-name strong{font-size:12px;font-weight:650}
.organization-tree-page .store-org-tree-name small{margin-top:2px;font-size:10px}
.organization-tree-page .store-org-tree-count{min-width:24px;margin-left:0;padding:2px 6px;border-radius:10px;background:#f0f2f5;color:#8993a2;text-align:center;font-size:10px;font-style:normal}
.organization-tree-page .org-node-icon{width:28px;height:28px;border-radius:8px;font-size:0!important}
.organization-tree-page .org-node-icon.headquarters{background:transparent!important;color:#2c2c2c!important}
.organization-tree-page .org-node-icon.headquarters:before{left:4px!important;top:4px!important;width:20px!important;height:20px!important;border:0!important;border-radius:0!important;background:url("./assets/icons/organization-headquarters.svg?v=1") center/contain no-repeat!important;-webkit-mask:none!important;mask:none!important}
.organization-tree-page .org-node-icon.headquarters:after{content:none!important}
.organization-tree-page .org-node-icon.agent:before{left:4px!important;top:4px!important;width:20px!important;height:20px!important;border:0!important;border-radius:0!important;background:currentColor!important;-webkit-mask:url("./assets/icons/organization-agent.svg") center/contain no-repeat;mask:url("./assets/icons/organization-agent.svg") center/contain no-repeat}
.organization-tree-page .org-node-icon.agent:after,.organization-tree-page .org-node-icon.store:after{content:none!important}
.organization-tree-page .org-node-icon.store:before{left:4px!important;top:4px!important;width:20px!important;height:20px!important;border:0!important;border-radius:0!important;background:url("./assets/icons/organization-store.svg?v=2") center/contain no-repeat!important}
.organization-tree-page .org-node-detail{padding:20px}
.organization-tree-page .org-detail-side{display:flex;flex:none;flex-direction:column;align-items:flex-end;gap:12px}
.organization-tree-page .org-detail-side .primary-btn{margin:0;padding:9px 13px;font-size:12px}
.organization-tree-page :is(.primary-btn,.secondary-btn,.danger-outline-btn,.store-org-tree-head button,.org-child-card){transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background-color .18s ease}
.organization-tree-page :is(.primary-btn,.secondary-btn,.danger-outline-btn,.store-org-tree-head button):hover,.organization-tree-page :is(.primary-btn,.secondary-btn,.danger-outline-btn,.store-org-tree-head button):focus-visible,.organization-tree-page .org-child-card:hover,.organization-tree-page .org-child-card:focus-visible{transform:translateY(-2px);box-shadow:0 8px 18px rgba(43,54,83,.16)}
.organization-tree-page .org-detail-actions{gap:10px}.organization-tree-page .org-detail-actions button{margin:0}.organization-tree-page .org-detail-head{gap:20px}
@media(max-width:850px){.organization-tree-page .org-tree-layout{grid-template-columns:1fr}.organization-tree-page .store-org-tree{min-height:0}.organization-tree-page .store-org-tree-list{max-height:360px}}
@media(max-width:600px){.organization-tree-page{padding:16px}.organization-tree-page .org-node-detail{padding:16px}.organization-tree-page .org-detail-head{gap:12px}.organization-tree-page .org-detail-side{gap:8px}.organization-tree-page .org-detail-side .primary-btn{padding:8px 10px;font-size:11px}.organization-tree-page .org-detail-grid{grid-template-columns:1fr}.organization-tree-page .store-org-tree-row.depth-3{padding-left:56px}.organization-tree-page .store-org-tree-row.depth-4{padding-left:64px}}
@media(prefers-reduced-motion:reduce){.organization-tree-page :is(.store-org-tree-row,.primary-btn,.secondary-btn,.danger-outline-btn,.store-org-tree-head button,.org-child-card){transition:none}}

/* Customer archive: match Store Management's hierarchy language and keep all
   customer actions in the filter row. */
.customer-org-tree .org-tree-head h3{display:inline-flex;align-items:center;gap:7px}
.customer-org-tree .org-tree-head h3:before{content:"";width:19px;height:19px;flex:0 0 19px;background:#2c2c2c;-webkit-mask:url("./assets/icons/organization-structure.svg?v=3") center/contain no-repeat;mask:url("./assets/icons/organization-structure.svg?v=3") center/contain no-repeat}
.device-org-head h3:before,.inventory-org-head h3:before{content:"";display:inline-block;width:19px;height:19px;margin-right:8px;vertical-align:-3px;background:#2c2c2c;-webkit-mask:url("./assets/icons/organization-structure.svg?v=3") center/contain no-repeat;mask:url("./assets/icons/organization-structure.svg?v=3") center/contain no-repeat}
body[data-theme="dark"] :is(.organization-tree-page .page-title-row h2,.store-org-tree .store-org-tree-head h3,.customer-org-tree .org-tree-head h3,.device-org-head h3,.inventory-org-head h3):before{background:#f4f7fd}
.customer-org-tree .org-node-icon.headquarters:before{left:4px!important;top:4px!important;width:18px!important;height:18px!important;border:0!important;border-radius:0!important;background:currentColor!important;-webkit-mask:url("./assets/icons/headquarters-building.svg") center/contain no-repeat;mask:url("./assets/icons/headquarters-building.svg") center/contain no-repeat;transform:none!important}.customer-org-tree .org-node-icon.headquarters:after{content:none!important;display:none!important}
.customer-org-tree .org-node-icon.agent:before{left:4px!important;top:4px!important;width:18px!important;height:18px!important;border:0!important;border-radius:0!important;background:currentColor!important;-webkit-mask:url("./assets/icons/organization-agent.svg") center/contain no-repeat;mask:url("./assets/icons/organization-agent.svg") center/contain no-repeat;transform:none!important}.customer-org-tree .org-node-icon.agent:after{content:none!important;display:none!important}
.customer-org-tree .org-node-icon.store:before,.customer-org-tree .org-node-icon.shop:before,.customer-org-tree .org-node-icon.room:before{left:3px!important;top:3px!important;width:20px!important;height:20px!important;border:0!important;border-radius:0!important;background:url("./assets/icons/organization-store.svg?v=2") center/contain no-repeat!important;transform:none!important}.customer-org-tree .org-node-icon.store:after,.customer-org-tree .org-node-icon.shop:after,.customer-org-tree .org-node-icon.room:after{content:none!important;display:none!important}
.customer-toolbar{grid-template-columns:minmax(120px,1fr) 32px auto auto}
.customer-toolbar :is(.primary-btn,.secondary-btn,.customer-reset-btn){height:38px;margin:0;padding-inline:14px;border-radius:7px;font-size:11px;white-space:nowrap}.customer-toolbar .secondary-btn{border:1px solid #dfe3ea;background:#fff;color:#4f5b70;font-weight:600}.customer-toolbar .customer-reset-btn{display:inline-grid;place-items:center;width:32px;height:32px;padding:0;border-radius:7px;font-size:14px}.customer-toolbar .customer-reset-btn>span{line-height:1;transition:transform .2s ease}.customer-toolbar .customer-reset-btn:hover>span{transform:rotate(-110deg)}
.customer-table-card .table{border-collapse:separate;border-spacing:0}.customer-table-card .table tbody tr[data-customer-row]{position:relative;cursor:pointer;transition:transform .18s ease,filter .18s ease}.customer-table-card .table tbody tr[data-customer-row] td{transition:background-color .18s ease,box-shadow .18s ease,border-radius .18s ease}.customer-table-card .table tbody tr[data-customer-row]:hover,.customer-table-card .table tbody tr[data-customer-row].selected{z-index:4;transform:translateY(-3px);background:transparent;filter:drop-shadow(0 7px 11px rgba(104,93,187,.08)) drop-shadow(0 0 5px rgba(132,119,220,.06))}.customer-table-card .table tbody tr[data-customer-row]:hover td,.customer-table-card .table tbody tr[data-customer-row].selected td{position:relative;z-index:3;background:#fbfaff;box-shadow:inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def}.customer-table-card .table tbody tr[data-customer-row]:hover td:first-child,.customer-table-card .table tbody tr[data-customer-row].selected td:first-child{border-radius:8px 0 0 8px;box-shadow:inset 2px 0 0 #a49def,inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def}.customer-table-card .table tbody tr[data-customer-row]:hover td:last-child,.customer-table-card .table tbody tr[data-customer-row].selected td:last-child{border-radius:0 8px 8px 0;box-shadow:inset -2px 0 0 #a49def,inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def}body[data-theme="dark"] .customer-table-card .table tbody tr[data-customer-row]:hover td,body[data-theme="dark"] .customer-table-card .table tbody tr[data-customer-row].selected td{background:#182235}
.customer-pagination{min-height:52px;padding:9px 14px}.customer-page-summary{color:#7a8598}.customer-page-controls span{display:grid;min-width:28px;height:27px;place-items:center;border-radius:6px;background:#f1efff;color:#5e52cb;font-size:10px;font-weight:700}
@media(max-width:1080px){.customer-toolbar{grid-template-columns:minmax(0,1fr) 32px auto auto}}
@media(max-width:700px){.customer-toolbar{grid-template-columns:1fr 1fr}.customer-filter-search{grid-column:1/-1}.customer-toolbar :is(.primary-btn,.secondary-btn,.customer-reset-btn){width:100%}}
@media(max-width:480px){.customer-toolbar{grid-template-columns:1fr}}
@media(max-width:850px){.customer-org-tree .org-tree-head h3{gap:6px}.customer-org-tree .org-tree-head h3:before{width:17px;height:17px;flex-basis:17px}}

/* Formula History — Option B: a calm, centered record-detail workspace. */
@keyframes history-detail-fade{from{opacity:0}to{opacity:1}}@keyframes history-detail-rise{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
.history-detail-backdrop{position:fixed;z-index:1200;inset:0;display:grid;place-items:center;padding:28px;background:rgba(29,37,55,.38);backdrop-filter:blur(4px);animation:history-detail-fade .18s ease}.history-detail-modal{width:min(960px,calc(100vw - 56px));max-height:calc(100vh - 56px);overflow:auto;border:1px solid #dfe4ec;border-radius:14px;background:#fff;box-shadow:0 24px 64px rgba(31,39,57,.24);animation:history-detail-rise .2s ease}.history-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:24px 28px 18px;border-bottom:1px solid #ebeff5}.history-detail-head h3{margin:0;color:#243047;font-size:22px;line-height:1.25}.history-detail-head p{margin:6px 0 0;color:#8793a9;font-size:13px}.history-detail-head>div:last-child{display:flex;align-items:center;gap:10px}.history-detail-close{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #dce2ec;border-radius:8px;background:#fff;color:#647188;font-size:22px;line-height:1;cursor:pointer;transition:transform .16s ease,background .16s ease,border-color .16s ease,color .16s ease}.history-detail-close:hover{transform:translateY(-1px);border-color:#bcb3ff;background:#f5f3ff;color:#5e52cf}.history-detail-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:18px 28px 0;border:1px solid #e3e8f0;border-radius:10px;background:#f8fafc}.history-detail-meta article{min-width:0;padding:14px 16px}.history-detail-meta article+article{border-left:1px solid #e3e8f0}.history-detail-meta span{display:block;margin-bottom:6px;color:#8390a5;font-size:12px}.history-detail-meta :is(strong,code,time){display:block;overflow:hidden;color:#344057;font-size:13px;font-weight:650;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.history-detail-meta code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.history-detail-sections{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;padding:24px 28px 28px}.history-detail-section{min-width:0;padding-right:28px}.history-detail-section.developer{padding-right:0;padding-left:28px;border-left:1px solid #e7ebf2}.history-detail-section header{display:flex;align-items:center;gap:9px;margin-bottom:14px}.history-detail-section h4{margin:0;color:#303c52;font-size:15px}.history-material-mark{width:9px;height:9px;border-radius:3px;background:#7b69e0}.history-material-mark.developer{background:#36a8a5}.history-detail-section ul{display:grid;gap:8px;min-height:116px;margin:0;padding:0;list-style:none}.history-detail-material-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:14px;padding:11px 13px;border:1px solid #e2e7ef;border-radius:8px;background:#fff}.history-detail-material-code{overflow:hidden;color:#455168;font-size:14px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}.history-detail-material-row strong{color:#28354b;font-size:15px}.history-detail-material-row small{grid-column:2;color:#8a96aa;font-size:11px}.history-detail-material-empty{display:grid;place-items:center;min-height:116px;border:1px dashed #dce2ec;border-radius:8px;color:#9aa5b6;font-size:13px}.history-detail-section footer{display:flex;align-items:center;justify-content:space-between;margin-top:12px;padding:11px 13px;border-radius:8px;background:#f4f2ff;color:#695cd2;font-size:13px}.history-detail-section.developer footer{background:#edf9f8;color:#248d8a}.history-detail-section footer strong{font-size:16px}.history-detail-total{display:flex;align-items:baseline;justify-content:space-between;margin:0 28px 24px;padding:17px 0;border-top:1px solid #e6eaf1;color:#667287}.history-detail-total strong{color:#3d356d;font-size:30px;letter-spacing:-.02em}.history-detail-fact-action{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 28px;border-top:1px solid #e8ecf2;background:#fbfcfe}.history-detail-fact-action div{display:grid;gap:3px}.history-detail-fact-action strong{color:#344057;font-size:13px}.history-detail-fact-action span{color:#8793a5;font-size:12px}.history-detail-fact-action button{min-height:34px;padding:0 13px;border:1px solid #d8d2ff;border-radius:8px;background:#f6f4ff;color:#5d50cf;font:inherit;font-size:12px;font-weight:700;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}.history-detail-fact-action button:hover{transform:translateY(-1px);background:#eeeaff;box-shadow:0 6px 12px rgba(100,82,207,.14)}.history-page .history-dispense-table tbody .history-record-row.detail-open td{background:#faf9ff}.history-page .history-dispense-table tbody .history-record-row.detail-open .history-row-expander{transform:rotate(90deg);color:#6656d4}
@media(max-width:760px){.history-detail-backdrop{padding:16px}.history-detail-modal{width:calc(100vw - 32px);max-height:calc(100vh - 32px)}.history-detail-head{padding:20px 20px 16px}.history-detail-meta{grid-template-columns:repeat(2,minmax(0,1fr));margin:16px 20px 0}.history-detail-meta article:nth-child(3){border-left:0}.history-detail-meta article:nth-child(n+3){border-top:1px solid #e3e8f0}.history-detail-sections{grid-template-columns:1fr;padding:20px}.history-detail-section{padding:0}.history-detail-section.developer{margin-top:22px;padding:22px 0 0;border-top:1px solid #e7ebf2;border-left:0}.history-detail-total{margin:0 20px 20px}.history-detail-fact-action{padding:16px 20px}}@media(max-width:480px){.history-detail-backdrop{padding:8px}.history-detail-modal{width:calc(100vw - 16px);max-height:calc(100vh - 16px);border-radius:12px}.history-detail-head{gap:10px;padding:18px 16px 14px}.history-detail-head h3{font-size:19px}.history-detail-head>div:last-child{gap:6px}.history-detail-meta{margin:14px 16px 0}.history-detail-meta article{padding:11px}.history-detail-sections{padding:18px 16px}.history-detail-total{margin:0 16px 16px}.history-detail-total strong{font-size:26px}.history-detail-fact-action{align-items:flex-start;flex-direction:column;padding:14px 16px}.history-detail-fact-action button{width:100%}}
.history-detail-icon{width:17px;height:17px;flex:0 0 17px;vertical-align:middle}.history-detail-title{display:flex;align-items:center;gap:12px;min-width:0}.history-detail-title>.history-detail-icon{width:34px;height:34px;flex-basis:34px;padding:7px;border-radius:10px;background:#f0edff;color:#6c5bd8}.history-detail-meta span{display:flex;align-items:center;gap:6px}.history-detail-meta .history-detail-icon{width:14px;height:14px;flex-basis:14px;color:#8291a8}.history-detail-meta .history-detail-icon.machine{color:#5e8ecf}.history-detail-meta .history-detail-icon.organization{color:#6c5bd8}.history-detail-meta .history-detail-icon.total{color:#806bdb}.history-detail-section header>.history-detail-icon{width:19px;height:19px;flex-basis:19px;padding:3px;border-radius:6px;background:#f1efff;color:#755fe0}.history-detail-section.developer header>.history-detail-icon{background:#e9f8f7;color:#299b98}.history-detail-total>span{display:flex;align-items:center;gap:7px}.history-detail-total .history-detail-icon{width:18px;height:18px;flex-basis:18px;color:#7966da}

/* Move the history pager into the panel header's right side. */
.history-panel-head>[data-history-top-pagination]{order:2;margin-left:auto;min-width:0}
.history-panel-head>.history-tabs{order:1}
.history-panel-head>[data-history-top-pagination] .history-pagination{min-height:0;gap:10px;padding:0;border:0;background:transparent}
.history-panel-head>[data-history-top-pagination] .history-pagination nav button{height:32px;min-width:32px}
.history-panel-head>[data-history-top-pagination] .history-pagination select{height:32px}
.history-panel-head>[data-history-top-pagination] .history-page-picker-trigger{height:32px;min-width:64px}
.history-panel>[data-history-content]>.history-pagination{display:none}
@media(max-width:760px){.history-panel-head>[data-history-top-pagination]{width:100%;margin-left:0}.history-panel-head>[data-history-top-pagination] .history-pagination{justify-content:flex-end;flex-wrap:wrap}}

/* Keep long device identifiers inside their selector and above adjacent filters. */
.history-filter-panel .history-filter-grid>label,.history-filter-panel .history-filter-grid>.history-search-actions>label{min-width:0}
.history-filter-panel .history-filter-select{min-width:0}
.history-filter-panel .history-filter-select-trigger{min-width:0;overflow:hidden}
.history-filter-panel .history-filter-select-trigger>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-filter-panel .history-filter-select-trigger>i{flex:0 0 8px;margin-left:8px}
.history-filter-panel .history-filter-select-menu{z-index:80;width:max-content;min-width:100%;max-width:min(360px,calc(100vw - 32px))}
.history-filter-panel .history-filter-select-menu button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-filter-panel .history-filter-select[data-history-filter-select="deviceId"] .history-filter-select-menu{min-width:220px}
@media(min-width:1281px){.history-filter-panel .history-filter-grid{grid-template-columns:minmax(180px,1.65fr) minmax(260px,1.85fr) repeat(5,minmax(110px,1fr)) auto!important}}

/* Formula History preserves each operational state visually. */
.history-badge.queued{background:#f0edff;color:#6652c9}.history-badge.mixing{background:#e7f8f7;color:#278d8a}

/* Scheme A language control: a compact globe trigger and an elevated local menu. */
.language-picker{position:relative;display:inline-flex;align-items:center;z-index:40}.language-trigger{display:grid;place-items:center;width:38px;height:38px;padding:0;border:0;border-radius:50%;background:transparent;color:#aeb9cc;cursor:pointer;box-shadow:none;transition:transform .18s ease,background .18s ease,box-shadow .18s ease,color .18s ease}.language-trigger svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.language-trigger:hover{transform:translateY(-1px) scale(1.06);background:#f1efff;color:#8175ff;box-shadow:0 6px 14px #6355e82b}.language-trigger:active{transform:translateY(0) scale(.97);box-shadow:0 2px 6px #6355e826}.language-trigger:focus-visible,.language-option:focus-visible{outline:3px solid #b8b1ff88;outline-offset:2px}.language-picker[data-open="true"] .language-trigger{background:#ebe8ff;color:#8175ff;box-shadow:0 4px 12px #6355e825}.language-menu{position:absolute;top:calc(100% + 9px);right:0;width:184px;padding:6px;border:1px solid #e0e5ef;border-radius:12px;background:#fff;box-shadow:0 15px 32px #17203320;opacity:0;visibility:hidden;transform:translateY(-5px) scale(.98);pointer-events:none;transition:opacity .16s ease,transform .16s ease,visibility .16s ease}.language-picker[data-open="true"] .language-menu{opacity:1;visibility:visible;transform:translateY(0) scale(1);pointer-events:auto}.language-option{width:100%;min-height:46px;display:flex;align-items:center;gap:11px;border:0;border-radius:8px;padding:0 10px;background:transparent;color:#243047;font:inherit;font-size:13px;text-align:left;cursor:pointer;transition:background .14s ease,color .14s ease,transform .14s ease}.language-option+.language-option{margin-top:2px}.language-option:hover{background:#f4f2ff;color:#5144d1}.language-option:hover .language-flag{transform:scale(1.08)}.language-option:active{transform:scale(.985)}.language-option.is-active{background:#f0efff;color:#5144d1;font-weight:650}.language-flag{display:grid;place-items:center;width:25px;height:25px;flex:none;border-radius:50%;font-size:17px;line-height:1;background:#fff;box-shadow:0 1px 3px #17203320;transition:transform .14s ease}.language-check{width:18px;height:18px;margin-left:auto;fill:none;stroke:#6355e8;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;opacity:0;transform:scale(.72);transition:opacity .14s ease,transform .14s ease}.language-option.is-active .language-check{opacity:1;transform:scale(1)}.auth-language{margin-top:18px;margin-left:auto}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.history-detail-total{justify-content:flex-end;gap:14px}

/* Enlarge the formula-history page icon beside the dispense statistics title. */
body[data-active-page="history"] .formula-history-page-title-icon{width:36px;height:36px;flex-basis:36px}
@media(max-width:850px){body[data-active-page="history"] .formula-history-page-title-icon{width:30px;height:30px;flex-basis:30px}}

/* Correct target: enlarge only the dispense-statistics chart icon. */
body[data-active-page="history"] .formula-history-page-title-icon{width:25px;height:25px;flex-basis:25px}
body[data-active-page="history"] .history-filter-heading h3:before{width:32px;height:32px;flex-basis:32px}
@media(max-width:850px){body[data-active-page="history"] .formula-history-page-title-icon{width:21px;height:21px;flex-basis:21px}.history-filter-heading h3:before{width:28px;height:28px;flex-basis:28px}}
.history-detail-state{display:flex;min-height:220px;align-items:center;justify-content:center;gap:12px;flex-direction:column;color:#7f8ba0;font-size:14px}.history-detail-state-spinner{width:30px;height:30px;border:3px solid #e7e4ff;border-top-color:#6557d7;border-radius:50%;animation:history-detail-spin .8s linear infinite}@keyframes history-detail-spin{to{transform:rotate(360deg)}}
.history-detail-modal.history-detail-state:not(.error){width:auto;min-height:0;max-width:calc(100vw - 40px);overflow:visible;border:0;background:transparent;box-shadow:none;color:#fff;text-shadow:0 1px 2px rgba(18,25,38,.24)}.history-detail-modal.history-detail-state:not(.error) .history-detail-state-spinner{width:34px;height:34px;border-color:rgba(255,255,255,.34);border-top-color:#8b7cff}.history-detail-modal.history-detail-state.error{min-height:180px}

/* Formula-history dye KPI: compact 3-card grid and a centered, scoped usage dialog. */
.history-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.history-summary .history-kpi-action{width:100%;border:1px solid #dfe4ea;color:inherit;font:inherit;text-align:left;cursor:pointer}.history-summary .history-kpi-action:focus-visible{outline:0;border-color:#958cf0;box-shadow:0 0 0 3px rgba(111,96,224,.16)}.history-summary .history-kpi-action:hover{border-color:#bcb4ef;box-shadow:0 9px 20px rgba(74,62,160,.12);transform:translateY(-2px)}
.history-kpi-metric{display:flex;min-width:0;align-items:flex-end;justify-content:space-between;gap:12px;padding-left:37px}.history-summary .history-kpi .history-kpi-metric>strong{min-width:0;padding-left:0;white-space:nowrap}.history-kpi-secondary{display:inline-flex;min-width:0;align-items:center;justify-content:flex-end;color:#687487;font-variant-numeric:tabular-nums;white-space:nowrap}.history-kpi-bag-summary{flex:none;flex-direction:column;align-items:flex-end;gap:2px;line-height:1}.history-kpi-bag-summary small{display:block!important;color:#8792a4;font-size:10px;line-height:1}.history-kpi-bag-summary b{color:#455167;font-size:15px;font-weight:700;line-height:1.15}.history-kpi-action-hint{gap:5px;color:#6958d5;font-size:12px;font-weight:650;line-height:1}.history-kpi-action-hint:after{content:"›";font-size:17px;font-weight:400;line-height:.6;transition:transform .16s ease}.history-kpi-action:hover .history-kpi-action-hint:after{transform:translateX(3px)}body[data-theme="dark"] .history-kpi-action-hint{color:#aca4ff}@media(max-width:1100px){.history-kpi-metric{gap:8px}.history-kpi-bag-summary b{font-size:14px}.history-kpi-action-hint{font-size:11px}}@media(max-width:620px){.history-kpi-metric{padding-left:37px}}
.history-dye-kpi-backdrop{position:fixed;z-index:1300;inset:0;display:grid;place-items:center;padding:28px;background:rgba(25,33,50,.4);backdrop-filter:blur(4px);animation:history-detail-fade .18s ease}.history-dye-kpi-modal{width:min(760px,calc(100vw - 56px));max-height:calc(100vh - 56px);overflow:auto;border:1px solid #dfe4ec;border-radius:14px;background:#fff;box-shadow:0 24px 64px rgba(31,39,57,.24);animation:history-detail-rise .2s ease}.history-dye-kpi-modal>header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:23px 26px 18px;border-bottom:1px solid #ebeff5}.history-dye-kpi-modal>header>div{display:flex;align-items:center;gap:12px}.history-dye-kpi-mark{display:block;width:34px;height:34px;border-radius:10px;background:#f4efff;position:relative}.history-dye-kpi-mark:before{position:absolute;inset:8px;background:#8059d5;content:"";-webkit-mask:url("./assets/icons/history-kpi-dye.svg?v=1") center/contain no-repeat;mask:url("./assets/icons/history-kpi-dye.svg?v=1") center/contain no-repeat}.history-dye-kpi-modal h3{margin:0;color:#28344a;font-size:20px;line-height:1.25}.history-dye-kpi-modal header p{margin:5px 0 0;color:#8793a7;font-size:12px}.history-dye-kpi-modal header>button{display:grid;place-items:center;width:32px;height:32px;flex:none;border:1px solid #dce2ec;border-radius:8px;background:#fff;color:#647188;font-size:22px;line-height:1;cursor:pointer;transition:.16s ease}.history-dye-kpi-modal header>button:hover{transform:translateY(-1px);border-color:#bcb3ff;background:#f5f3ff;color:#5e52cf}.history-dye-kpi-body{padding:20px 26px}.history-dye-kpi-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;padding:0;list-style:none}.history-dye-kpi-list li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 14px;padding:13px 14px;border:1px solid #e2e7ef;border-radius:9px;background:#fff}.history-dye-kpi-list li>div{min-width:0}.history-dye-kpi-list strong,.history-dye-kpi-list span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-dye-kpi-list strong{color:#344057;font-size:14px}.history-dye-kpi-list span{margin-top:4px;color:#8b97aa;font-size:11px}.history-dye-kpi-list b{color:#29364d;font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap}.history-dye-kpi-list em{grid-column:2;color:#7968d8;font-size:11px;font-style:normal;white-space:nowrap}.history-dye-kpi-modal>footer{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:0 26px 24px;border:1px solid #e3e1f4;border-radius:10px;background:#faf9ff;overflow:hidden}.history-dye-kpi-modal>footer>div{padding:14px 16px}.history-dye-kpi-modal>footer>div+div{border-left:1px solid #e3e1f4}.history-dye-kpi-modal>footer span{display:block;color:#7f8ba0;font-size:12px}.history-dye-kpi-modal>footer strong{display:block;margin-top:6px;color:#4e429d;font-size:20px;font-variant-numeric:tabular-nums}.history-dye-kpi-modal>footer p{grid-column:1/-1;margin:0;padding:11px 16px;border-top:1px solid #e3e1f4;color:#8a839d;font-size:11px;line-height:1.55}.history-dye-kpi-state{display:grid;min-height:180px;place-items:center;gap:10px;color:#8793a7;font-size:13px;text-align:center}.history-dye-kpi-state i{display:block;width:28px;height:28px;border:3px solid #e7e4ff;border-top-color:#6557d7;border-radius:50%;animation:history-detail-spin .8s linear infinite}.history-dye-kpi-state.error{padding:20px}.history-dye-kpi-state button{min-height:34px;border:1px solid #d8d2ff;border-radius:8px;background:#f6f4ff;color:#5d50cf;padding:0 14px;font:inherit;font-size:12px;font-weight:700;cursor:pointer}
body[data-theme="dark"] .history-dye-kpi-modal{border-color:#334056;background:#151f2d;box-shadow:0 24px 64px rgba(0,0,0,.42)}body[data-theme="dark"] .history-dye-kpi-modal>header{border-color:#2d394d}body[data-theme="dark"] .history-dye-kpi-modal h3,body[data-theme="dark"] .history-dye-kpi-list strong,body[data-theme="dark"] .history-dye-kpi-list b{color:#edf2ff}body[data-theme="dark"] .history-dye-kpi-modal header>button,body[data-theme="dark"] .history-dye-kpi-list li{border-color:#344155;background:#111a27}body[data-theme="dark"] .history-dye-kpi-modal>footer{border-color:#3c365f;background:#1b1930}body[data-theme="dark"] .history-dye-kpi-modal>footer>div+div,body[data-theme="dark"] .history-dye-kpi-modal>footer p{border-color:#3c365f}
@media(max-width:1100px){.history-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.history-dye-kpi-backdrop{padding:16px}.history-dye-kpi-modal{width:calc(100vw - 32px);max-height:calc(100vh - 32px)}.history-dye-kpi-modal>header,.history-dye-kpi-body{padding-left:20px;padding-right:20px}.history-dye-kpi-modal>footer{margin:0 20px 20px}}@media(max-width:620px){.history-summary{grid-template-columns:1fr}}@media(max-width:520px){.history-dye-kpi-backdrop{padding:8px}.history-dye-kpi-modal{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}.history-dye-kpi-list{grid-template-columns:1fr}.history-dye-kpi-modal>footer{grid-template-columns:1fr}.history-dye-kpi-modal>footer>div+div{border-top:1px solid #e3e1f4;border-left:0}}

/* Dye total dialog — compact three-column layout matching the approved reference. */
.history-dye-kpi-modal{position:relative;width:min(510px,calc(100vw - 40px));max-height:calc(100vh - 40px);border-radius:12px;overflow:auto}
.history-dye-kpi-modal>header{display:block;padding:21px 42px 14px;border-bottom:0;text-align:center}
.history-dye-kpi-modal>header h3{font-size:18px;font-weight:750}
.history-dye-kpi-modal>header p{margin-top:7px;font-size:11px}
.history-dye-kpi-modal>header>button{position:absolute;top:14px;right:14px;width:26px;height:26px;border:0;border-radius:7px;background:transparent;font-size:21px}
.history-dye-kpi-modal>header>button:hover{transform:none;border-color:transparent;background:#f5f3ff}
.history-dye-kpi-overview{display:grid;grid-template-columns:1fr 1fr;align-items:center;margin:0 20px;border:1px solid #e8ebf2;border-radius:8px;background:#fff;box-shadow:0 3px 10px rgba(35,45,66,.025);overflow:hidden}
.history-dye-kpi-overview>strong{padding:13px 10px;color:#303c52;font-size:20px;text-align:center;font-variant-numeric:tabular-nums}
.history-dye-kpi-overview>span{display:flex;align-items:baseline;justify-content:center;gap:8px;min-height:30px;border-left:1px solid #edf0f5;color:#344057}
.history-dye-kpi-overview small{color:#68758b;font-size:10px}.history-dye-kpi-overview b{color:#3e4a61;font-size:18px}
.history-dye-kpi-body{padding:16px 20px 18px}.history-dye-kpi-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.history-dye-kpi-list li{display:block;min-height:74px;padding:12px 13px;border-color:#edf0f5;border-radius:8px}
.history-dye-kpi-list strong{display:flex;align-items:center;gap:7px;font-size:13px}.history-dye-kpi-list strong i{display:inline-block;width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:var(--history-dye-swatch)}
.history-dye-kpi-list li>div{display:flex;align-items:baseline;justify-content:space-between;gap:5px;margin-top:10px}.history-dye-kpi-list b{font-size:13px}.history-dye-kpi-list em{display:block;color:#505b70;font-size:11px}
.history-dye-kpi-modal>footer{display:block;margin:0;border:0;border-top:1px solid #edf0f5;border-radius:0;background:#fff}.history-dye-kpi-modal>footer p{margin:0;padding:12px 18px;border:0;color:#8792a6;font-size:10px;text-align:center}
.history-dye-kpi-mark{display:none}
body[data-theme="dark"] .history-dye-kpi-overview,body[data-theme="dark"] .history-dye-kpi-modal>footer{border-color:#2d394d;background:#151f2d}body[data-theme="dark"] .history-dye-kpi-overview>span{border-color:#2d394d}body[data-theme="dark"] .history-dye-kpi-overview>strong,body[data-theme="dark"] .history-dye-kpi-overview b{color:#edf2ff}body[data-theme="dark"] .history-dye-kpi-list li{border-color:#344155;background:#111a27}body[data-theme="dark"] .history-dye-kpi-modal>footer p{border:0}
@media(max-width:520px){.history-dye-kpi-modal{width:calc(100vw - 20px);max-height:calc(100vh - 20px)}.history-dye-kpi-list{grid-template-columns:repeat(2,minmax(0,1fr))}.history-dye-kpi-overview{margin:0 14px}.history-dye-kpi-body{padding:14px}.history-dye-kpi-modal>footer p{padding:12px 14px}}

/* Formula-history record details: balance dye and developer content without a total-output strip. */
.history-detail-modal{width:min(980px,calc(100vw - 56px))}
.history-detail-sections{gap:18px;padding:22px 28px 28px}
.history-detail-section{padding:18px;border:1px solid #e4e9f0;border-radius:12px;background:#fbfcfe}
.history-detail-section.developer{padding:18px;border-left:1px solid #e4e9f0}
.history-detail-section header{margin-bottom:12px}.history-detail-section ul{gap:8px}
.history-detail-section.dye ul{grid-template-columns:repeat(2,minmax(0,1fr))}
.history-detail-material-row{min-height:46px;padding:10px 12px;background:#fff}
.history-detail-section footer{margin-top:10px;padding:10px 12px}.history-detail-section footer strong{font-size:15px}
body[data-theme="dark"] .history-detail-section{border-color:#344155;background:#111a27}body[data-theme="dark"] .history-detail-section.developer{border-left-color:#344155}
@media(max-width:760px){.history-detail-sections{gap:14px;padding:20px}.history-detail-section,.history-detail-section.developer{padding:16px}.history-detail-section.dye ul{grid-template-columns:1fr}.history-detail-section.developer{margin-top:0;border-top:1px solid #e4e9f0;border-left:1px solid #e4e9f0}}

/* Formula-history dark theme: tabs and device identifiers must not fall back to white. */
body[data-theme="dark"] .history-tabs button[data-history-mode="records"],
body[data-theme="dark"] .history-tabs button[data-history-mode="operator"]{border:1px solid transparent;background:#172235;color:#adb9cc}
body[data-theme="dark"] .history-tabs button[data-history-mode="records"]:hover,
body[data-theme="dark"] .history-tabs button[data-history-mode="operator"]:hover{background:#202c42;color:#e3ddff}
body[data-theme="dark"] .history-tabs button[data-history-mode="records"].active,
body[data-theme="dark"] .history-tabs button[data-history-mode="operator"].active{border-color:#5c50bb;background:#2a2552;color:#e2dcff}
body[data-theme="dark"] .history-tabs button[data-history-mode="records"] span,
body[data-theme="dark"] .history-tabs button[data-history-mode="operator"] span{background:#253249;color:#bbc7d8}
body[data-theme="dark"] .history-tabs button[data-history-mode="records"].active span,
body[data-theme="dark"] .history-tabs button[data-history-mode="operator"].active span{background:#433989;color:#f1eeff}
body[data-theme="dark"] .history-dispense-table .history-device-code{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0!important;color:#b9c5d7;font-weight:600}

/* Theme changes are immediate. Without this guard, the shared interaction
   transition briefly interpolates light button fills and shadows into dark
   values, which appears as a white flash in Safari. */
body.theme-switching :is(button,[role="button"],a[href],.link,.table-action,.link-button,.nav-item),
body.theme-switching :is(input,select,textarea,.search,.history-keyword-filter,.history-keyword-filter>div,.customer-filter-search,.history-org-search),
body.theme-switching :is(button,[role="button"],a[href],.link,.table-action,.link-button,.nav-item)::before,
body.theme-switching :is(button,[role="button"],a[href],.link,.table-action,.link-button,.nav-item)::after{
  transition:none!important;
  animation:none!important;
  filter:none!important;
  transform:none!important;
  box-shadow:none!important;
}

/* KPI cards have a separate light card surface, so pin that surface to the
   destination theme during the same swap instead of letting Safari composite
   a white frame between the two color layers. */
body.theme-switching .history-page .history-summary :is(.history-kpi,.history-kpi-action,article){
  transition:none!important;
  animation:none!important;
  transform:none!important;
  box-shadow:none!important;
}
body.theme-switching[data-theme="dark"] .history-page .history-summary :is(.history-kpi,.history-kpi-action,article){
  border-color:#2d374a!important;
  background:#141b27!important;
}
body.theme-switching[data-theme="light"] .history-page .history-summary :is(.history-kpi,.history-kpi-action,article){
  border-color:#dfe4ea!important;
  background:#fff!important;
}

/* Customer archive controls use the same interaction contract as Formula History:
   a small hover lift, a pressed scale, and a visible keyboard focus ring. */
.customer-org-page :is(button,[role="button"],a[href],.link,.table-action,.link-button):not(:disabled){
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background-color .16s ease,color .16s ease,filter .16s ease;
}
.customer-org-page :is(button,[role="button"],a[href],.link,.table-action,.link-button):hover:not(:disabled){transform:translateY(-1px)}
.customer-org-page :is(button,[role="button"],a[href],.link,.table-action,.link-button):active:not(:disabled){transform:translateY(0) scale(.985);transition-duration:.08s}
.customer-org-page :is(button,[role="button"],a[href],.link,.table-action,.link-button):focus-visible{outline:2px solid #9c94ef;outline-offset:2px}
.customer-org-page .primary-btn:hover:not(:disabled){filter:brightness(1.06);box-shadow:0 8px 18px rgba(71,57,183,.24)}
.customer-org-page .danger-btn:hover:not(:disabled){filter:brightness(1.06);box-shadow:0 8px 18px rgba(210,66,79,.24)}
.customer-org-page :is(.secondary-btn,.customer-reset-btn):hover:not(:disabled){border-color:#9b93e9;box-shadow:0 5px 12px rgba(40,47,67,.09)}

/* Touch browsers can retain :hover after a tap. Keep lift/shadow feedback for
   mouse and trackpad input only, while click and keyboard feedback remain. */
@media (hover:none), (pointer:coarse){
  #page-content :is(button,[role="button"],a[href],.link,.table-action,.link-button,.nav-item):hover:not(:disabled),
  .topbar :is(button,[role="button"],a[href]):hover:not(:disabled),
  .sidebar :is(button,[role="button"],a[href],.nav-item):hover:not(:disabled){
    transform:none;
    box-shadow:none;
    filter:none;
  }
}

/* Case assets are selected from the device, not entered as opaque storage paths. */
.case-image-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;grid-column:1/-1}.case-upload-card{position:relative;display:grid;grid-template-columns:72px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:11px;align-items:center;min-height:94px;border:1px dashed #cdd5e2;border-radius:9px;background:#fafbfe;padding:10px 11px;cursor:pointer;transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease;overflow:hidden}.case-upload-card.cover{grid-column:1/-1;min-height:118px}.case-upload-card.detail{grid-column:1/-1}.case-upload-card input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.case-upload-card:hover,.case-upload-card.is-dragging{border-color:#7768ef;background:#f6f4ff;box-shadow:0 0 0 3px rgba(99,85,232,.1)}.case-upload-preview{position:relative;grid-row:1/4;display:grid;place-items:center;width:72px;height:72px;border-radius:7px;background:#eff1f6 center/cover no-repeat;color:#796bed;overflow:hidden}.case-upload-card.cover .case-upload-preview{width:96px;height:96px}.case-upload-preview i{width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#fff;color:#7566e8;font-size:18px;font-style:normal;box-shadow:0 2px 7px rgba(45,53,76,.12)}.case-upload-card strong{align-self:end;color:#39465b;font-size:11px}.case-upload-card small{align-self:center;color:#8b96a7;font-size:9px;line-height:14px}.case-upload-card em{align-self:start;color:#9ca5b4;font-size:8px;font-style:normal}.case-upload-preview.has-image:after{content:"点击替换";display:grid;place-items:end center;position:absolute;inset:0;padding-bottom:6px;background:linear-gradient(transparent 48%,rgba(21,29,43,.55));color:#fff;font-size:8px}.case-upload-card.cover strong{font-size:12px}.case-upload-card.cover small{font-size:10px}@media(max-width:640px){.case-image-upload-grid{grid-template-columns:1fr}.case-upload-card.cover,.case-upload-card.detail{grid-column:auto}}

/* Official case creation: compact, step-based modal workflow. */
.case-form-modal-backdrop{display:grid!important;place-items:center!important;justify-content:center!important;align-content:center!important;padding:24px;background:rgba(24,32,48,.52);overflow:auto}.case-form-modal{width:min(1080px,calc(100vw - 48px));height:min(820px,calc(100vh - 48px));margin:auto!important;border:1px solid #e5e8f0;border-radius:16px;box-shadow:0 24px 70px rgba(20,28,45,.25);overflow:hidden}.case-form-modal>header{padding:24px 32px 17px}.case-form-modal>header h3{font-size:25px}.case-form-modal>header p{font-size:12px}.case-form-modal>header button{line-height:1}.case-form-steps{display:grid;grid-template-columns:auto 1fr auto 1fr auto;align-items:center;gap:14px;padding:15px 70px 20px;border-bottom:1px solid #edf0f5}.case-form-steps>b{height:1px;background:#e1e5ee}.case-form-steps button{display:grid;justify-items:center;gap:6px;border:0;background:transparent;color:#8c96a7;padding:0;cursor:pointer;font:inherit;font-size:11px}.case-form-steps i{width:34px;height:34px;display:grid;place-items:center;border:1px solid #dfe4ee;border-radius:50%;font-style:normal;font-size:17px;color:#7a8598}.case-form-steps button.active{color:var(--primary);font-weight:700}.case-form-steps button.active i{border-color:#7768ee;background:#f0edff;color:#6958e4;box-shadow:0 0 0 4px rgba(105,88,228,.09)}.case-form-modal .case-form-scroll{padding:0 32px 18px}.case-form-accordion{border:1px solid #e2e6ee;border-radius:10px;margin-top:14px;background:#fff}.case-form-accordion summary{display:grid;grid-template-columns:30px auto 1fr auto;align-items:center;gap:10px;min-height:60px;padding:0 18px;cursor:pointer;list-style:none}.case-form-accordion summary::-webkit-details-marker{display:none}.case-form-accordion summary>i{width:29px;height:29px;display:grid;place-items:center;border-radius:8px;background:#f0edff;color:#6857e5;font-style:normal;font-size:16px}.case-form-accordion summary strong{font-size:14px;color:#253147}.case-form-accordion summary small{color:#929cab;font-size:11px;font-weight:400}.case-form-accordion summary em{justify-self:start;border-radius:5px;background:#f0edff;color:#6857e5;padding:4px 7px;font-size:10px;font-style:normal}.case-form-accordion summary>span{color:#705fe4;font-size:16px}.case-form-accordion[open] summary{border-bottom:1px solid #edf0f5}.case-form-accordion .case-form-grid{padding:17px 18px 19px}.case-form-accordion .case-form-grid textarea{min-height:126px}.case-field-help{margin-top:-1px;color:#929cab;font-size:10px}.case-publish-grid{align-items:end}.case-display-state{display:flex!important;align-items:center;gap:9px!important;padding-top:2px}.case-display-state>b{position:relative;width:35px;height:20px;border-radius:12px;background:#c8ced9}.case-display-state>b:after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(20,27,41,.2)}.case-display-state>b.is-on{background:#6857e4}.case-display-state>b.is-on:after{left:18px}.case-display-state small{color:#929cab;font-size:10px}.case-form-modal footer{padding:15px 32px 19px}.case-form-modal footer button{min-width:108px}@media(max-width:700px){.case-form-modal-backdrop{padding:0}.case-form-modal{width:100vw;height:100vh;border-radius:0}.case-form-steps{padding-inline:22px;gap:7px}.case-form-modal .case-form-scroll{padding-inline:16px}.case-form-modal>header,.case-form-modal footer{padding-inline:18px}.case-form-accordion summary{grid-template-columns:28px auto 1fr auto;padding-inline:12px}.case-form-accordion summary small{display:none}}

/* Reference-matched official case dialog: icon treatment and card rhythm follow the approved mockup. */
.case-form-reference{width:min(880px,calc(100vw - 48px));height:min(760px,calc(100vh - 48px))}.case-form-reference>header{padding:20px 30px 15px}.case-form-reference>header h3{font-size:23px;line-height:1.2}.case-form-reference>header p{margin-top:7px}.case-form-reference .case-form-steps{padding:19px 66px 17px;gap:16px}.case-form-reference .case-form-steps button{gap:8px;font-size:12px}.case-form-reference .case-form-steps i{width:42px;height:42px;border-radius:50%;padding:0}.case-form-reference .case-form-steps button.active i{background:#705ce8;color:#fff;border-color:#705ce8;box-shadow:0 0 0 6px #efecff}.case-form-reference .case-form-steps button.active+ b{background:#705ce8}.case-form-reference .case-form-scroll{padding:0 30px 8px}.case-form-reference .case-form-accordion{margin-top:10px;border-radius:8px}.case-form-reference .case-form-accordion summary{grid-template-columns:34px auto 1fr auto;gap:10px;min-height:58px;padding:0 17px}.case-form-reference .case-form-accordion summary>i{width:31px;height:31px;padding:0;background:#f0edff}.case-form-reference .case-form-accordion summary strong{font-size:15px}.case-form-reference .case-form-accordion summary>span{font-size:18px}.case-form-reference .case-form-accordion .case-form-grid{gap:13px;padding:15px 18px 17px}.case-form-reference .case-form-grid label{font-size:11px;gap:7px}.case-form-reference .case-form-grid input,.case-form-reference .case-form-grid select{height:40px;font-size:11px}.case-form-reference .case-form-grid textarea{min-height:78px;font-size:11px}.case-form-reference .case-color-card .case-form-grid textarea{height:74px!important;min-height:74px!important;max-height:74px!important;resize:none!important}.case-form-reference .case-field-help{display:flex;justify-content:space-between;font-size:10px}.case-form-reference .case-field-help b{font-weight:500}.case-form-reference .case-publish-card .case-publish-layout{display:grid;grid-template-columns:1fr 1fr 1.12fr;gap:14px;padding:16px 18px 13px}.case-publish-layout>label,.case-publish-status{display:grid;gap:7px;color:#68758a;font-size:11px}.case-publish-layout input{height:39px;box-sizing:border-box;border:1px solid #dfe4ec;border-radius:7px;padding:9px 10px;color:#253147;font:inherit}.case-publish-status b{justify-self:start;border-radius:5px;background:#f0f1f4;color:#737f91;padding:7px 12px;font-size:11px;font-weight:600}.case-visibility-toggle{display:flex!important;align-items:center;gap:8px!important;padding-top:25px;cursor:default}.case-visibility-toggle input{position:absolute;opacity:0}.case-visibility-toggle i{position:relative;width:35px;height:20px;border-radius:12px;background:#c9d0db}.case-visibility-toggle input:checked+i{background:#705ce8}.case-visibility-toggle i:after{content:"";position:absolute;left:3px;top:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(20,27,41,.2)}.case-visibility-toggle input:checked+i:after{left:18px}.case-visibility-toggle span{color:#354158;font-size:12px}.case-publish-layout>p{grid-column:1/-1;display:flex;align-items:center;gap:7px;margin:0;color:#929cab;font-size:10px}.case-publish-layout>p i{width:16px;height:16px;display:grid;place-items:center;border:1px solid #aab3c2;border-radius:50%;font-style:normal;font-size:10px}.case-form-reference footer{padding:14px 30px 18px}.case-form-reference footer button{min-width:104px}@media(max-width:700px){.case-form-reference{width:100vw;height:100vh}.case-form-reference .case-form-steps{padding-inline:22px}.case-form-reference .case-publish-card .case-publish-layout{grid-template-columns:1fr}.case-visibility-toggle{padding-top:0}.case-form-reference .case-form-scroll{padding-inline:16px}}

/* CSS-drawn icons are intentionally independent of global SVG reset rules. */
.case-form-reference .case-vector-icon{display:inline-block!important;width:24px!important;height:24px!important;fill:none!important;stroke:#630ed4!important;stroke-width:1.7!important;stroke-linecap:round!important;stroke-linejoin:round!important;overflow:visible!important;vertical-align:middle}.case-form-reference .case-vector-icon-document{stroke:#630ed4!important}.case-form-reference .case-vector-icon-palette{stroke:#630ed4!important}.case-form-reference .case-vector-icon-settings{stroke:#630ed4!important}.case-form-reference .case-form-steps .case-vector-icon{width:24px!important;height:24px!important}.case-form-reference .case-form-accordion summary>.case-vector-icon{width:22px!important;height:22px!important;flex:none}.case-form-reference .case-form-steps button:not(.active) .case-vector-icon{stroke:#7b7487!important}.case-form-reference .case-form-steps button.active .case-vector-icon{stroke:#630ed4!important}
.case-form-reference .case-form-steps i .case-vector-icon,.case-form-reference .case-form-accordion summary i .case-vector-icon{display:inline-block!important;visibility:visible!important;opacity:1!important}.case-form-reference .case-form-steps i:has(> .case-vector-icon)::before,.case-form-reference .case-form-steps i:has(> .case-vector-icon)::after,.case-form-reference .case-form-accordion summary i:has(> .case-vector-icon)::before,.case-form-reference .case-form-accordion summary i:has(> .case-vector-icon)::after{display:none!important;content:none!important}
.case-form-reference :is(.case-form-steps,.case-form-accordion) svg{display:none!important}.case-form-reference :is(.case-form-steps,.case-form-accordion) i{position:relative}.case-form-reference :is(.case-form-steps,.case-form-accordion) i:before,.case-form-reference :is(.case-form-steps,.case-form-accordion) i:after{content:"";position:absolute;box-sizing:border-box}.case-form-reference .case-form-steps button:nth-of-type(1) i:before,.case-form-reference details:nth-child(1) summary i:before{width:14px;height:17px;border:1.8px solid currentColor;border-radius:2px;left:13px;top:11px}.case-form-reference .case-form-steps button:nth-of-type(1) i:after,.case-form-reference details:nth-child(1) summary i:after{width:7px;height:1.8px;background:currentColor;left:16.5px;top:17px;box-shadow:0 4px 0 currentColor}.case-form-reference .case-form-steps button:nth-of-type(2) i:before,.case-form-reference details:nth-child(2) summary i:before{width:16px;height:16px;border:1.8px solid currentColor;border-radius:50%;left:13px;top:13px}.case-form-reference .case-form-steps button:nth-of-type(2) i:after,.case-form-reference details:nth-child(2) summary i:after{width:4px;height:4px;border-radius:50%;background:currentColor;left:18px;top:18px;box-shadow:5px 2px 0 currentColor}.case-form-reference .case-form-steps button:nth-of-type(3) i:before,.case-form-reference details:nth-child(3) summary i:before{width:18px;height:11px;border:1.8px solid currentColor;border-radius:60% 60%;left:12px;top:15px}.case-form-reference .case-form-steps button:nth-of-type(3) i:after,.case-form-reference details:nth-child(3) summary i:after{width:5px;height:5px;border:1.8px solid currentColor;border-radius:50%;left:18.5px;top:18px}.case-form-reference .case-form-accordion summary>i:before{left:8px!important;top:7px!important}.case-form-reference .case-form-accordion summary>i:after{left:11.5px!important;top:13px!important}.case-form-reference details:nth-child(2) summary i:after{left:12px!important;top:12px!important}.case-form-reference details:nth-child(3) summary i:before{left:6px!important;top:9px!important}.case-form-reference details:nth-child(3) summary i:after{left:12.5px!important;top:12px!important}
/* Formula History keeps the original supplied organization-node artwork. */
.history-store-org .history-org-icon.org-node-icon{position:relative!important;width:30px!important;height:30px!important;background:#eef2ff!important;color:#5969d7!important;font-size:0!important}
.history-store-org .history-org-icon.org-node-icon.headquarters:before,.history-store-org .history-org-icon.org-node-icon.agent:before{left:5px!important;top:5px!important;width:20px!important;height:20px!important;border:0!important;border-radius:0!important;background:currentColor!important;-webkit-mask:center/contain no-repeat;mask:center/contain no-repeat;transform:none!important}
.history-store-org .history-org-icon.org-node-icon.headquarters:before{-webkit-mask-image:url("./assets/icons/headquarters-building.svg");mask-image:url("./assets/icons/headquarters-building.svg")}
.history-store-org .history-org-icon.org-node-icon.agent:before{-webkit-mask-image:url("./assets/icons/organization-agent.svg");mask-image:url("./assets/icons/organization-agent.svg")}
.history-store-org .history-org-icon.org-node-icon.store:before{left:4px!important;top:4px!important;width:22px!important;height:22px!important;border:0!important;border-radius:0!important;background:url("./assets/icons/organization-store.svg?v=2") center/contain no-repeat!important;transform:none!important}
.history-store-org .history-org-icon.org-node-icon:after{content:none!important;display:none!important}

/* Reuse the headquarters mark across every organization tree. The span stays
   transparent while the SVG mask draws only the supplied icon shape. */
.organization-tree-page .org-node-icon.headquarters,
.customer-org-tree .org-node-icon.headquarters,
.history-store-org .history-org-icon.org-node-icon.headquarters,
.store-org-tree .org-node-icon.headquarters{background:transparent!important;color:#2c2c2c!important}
.organization-tree-page .org-node-icon.headquarters:before,
.customer-org-tree .org-node-icon.headquarters:before,
.history-store-org .history-org-icon.org-node-icon.headquarters:before,
.store-org-tree .org-node-icon.headquarters:before{content:""!important;display:block!important;left:4px!important;top:4px!important;width:20px!important;height:20px!important;border:0!important;border-radius:0!important;background:currentColor!important;-webkit-mask:url("./assets/icons/organization-headquarters.svg?v=1") center/contain no-repeat!important;mask:url("./assets/icons/organization-headquarters.svg?v=1") center/contain no-repeat!important;transform:none!important}
.organization-tree-page .org-node-icon.headquarters:after,
.customer-org-tree .org-node-icon.headquarters:after,
.history-store-org .history-org-icon.org-node-icon.headquarters:after,
.store-org-tree .org-node-icon.headquarters:after{content:none!important;display:none!important}

/* Permission Management final presentation contract. This block intentionally
 * owns the complete page cascade. The extra page-root qualifier outranks the
 * inline runtime style in app.html without changing that file. */
body[data-active-page="permissions"] .permission-history-page {
  width: 100%;
  max-width: none !important;
  min-height: calc(100vh - 86px);
  padding: 25px 0 32px !important;
  background: #fff !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-history-workspace {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  width: 100%;
  max-width: 1680px;
  min-width: 0;
  margin-inline: auto;
  gap: 0 !important;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #e1e5eb;
  border-radius: 12px;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(31, 42, 64, .035);
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel {
  position: relative !important;
  top: auto;
  align-self: stretch;
  min-height: 0 !important;
  height: auto;
  max-height: none;
  box-sizing: border-box;
  padding: 16px 14px;
  overflow: hidden;
  border: 0 !important;
  border-right: 1px solid #e8ebf0 !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-head {
  margin-bottom: 14px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-tree {
  max-height: min(620px, calc(100dvh - 300px)) !important;
  margin: 0;
  overflow: auto;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.org-tree-row {
  min-height: 52px;
  gap: 9px;
  margin: 1px 0;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.org-tree-row:hover {
  background: #f5f6f9;
  box-shadow: none;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.org-tree-row.selected {
  background: #f0effb;
  color: #5146c8;
  box-shadow: inset 3px 0 #6658df;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-icon.org-node-icon {
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px;
  border-radius: 7px;
  box-shadow: none;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-name strong {
  overflow: hidden;
  color: inherit;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-name small {
  overflow: hidden;
  margin-top: 2px;
  color: #9aa2af;
  font-size: 10px !important;
  font-weight: 400 !important;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node em {
  min-width: 0;
  margin-left: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #8993a2;
  font-size: 10px !important;
  font-style: normal;
  font-weight: 400 !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-history-main {
  display: flex !important;
  min-width: 0;
  width: 100%;
  max-width: none;
  flex-direction: column;
  gap: 0 !important;
  background: transparent;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px 18px;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading-copy {
  min-width: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading h2 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #202c41;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-title-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  color: #303846;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading p {
  max-width: 620px;
  margin: 5px 0 0 34px;
  color: #8a95a6;
  font-size: 11px;
  line-height: 17px;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions button {
  height: 38px;
  margin: 0;
  padding: 0 14px;
  border-radius: 7px;
  box-shadow: none;
  font-size: 12px;
  white-space: nowrap;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions .secondary-btn {
  border: 1px solid #d9dee7;
  background: #fff;
  color: #59667a;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions .primary-btn {
  border: 1px solid #5b49e2;
  background: #5b49e2;
  color: #fff;
}

body[data-active-page="permissions"] .permission-history-page .permission-accounts-panel {
  display: contents;
  min-width: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-accounts-panel[hidden] {
  display: none !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-panel {
  order: 1;
  min-width: 0;
  margin: 0 !important;
  padding: 0 24px 14px !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.8fr) repeat(3, minmax(100px, 1fr)) 38px !important;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .permission-filter-actions {
  display: flex;
  width: 38px;
  min-width: 38px;
  height: 34px;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .permission-filter-actions button {
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 7px;
  box-shadow: none;
  font-size: 12px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .permission-reset-button {
  width: 34px;
  min-width: 34px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .permission-filter-select-trigger {
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-keyword-filter > div {
  height: 34px;
  min-height: 34px;
  padding-inline: 10px;
  border-radius: 7px;
  box-shadow: none;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-keyword-filter input {
  height: 30px;
  font-size: 12px;
}

body[data-active-page="permissions"] .permission-history-page .permission-metrics {
  order: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px;
  min-width: 0;
  margin: 0 24px 16px !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-metric {
  display: flex;
  min-width: 0;
  height: 84px;
  min-height: 84px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid #e1e5eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(22, 34, 54, .035);
}

body[data-active-page="permissions"] .permission-history-page .permission-metric > i {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  font-size: 15px;
}

body[data-active-page="permissions"] .permission-history-page .permission-metric > span {
  min-width: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-metric label {
  overflow: hidden;
  color: #7f8b9e;
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-page="permissions"] .permission-history-page .permission-metric strong {
  margin-top: 4px;
  color: #28364d;
  font-size: 21px;
  font-weight: 400;
  line-height: 24px;
  font-variant-numeric: tabular-nums;
}

body[data-active-page="permissions"] .permission-history-page .permission-tabs {
  order: 3;
  height: 48px;
  min-width: 0;
  margin: 0 24px 14px !important;
  gap: 30px;
  align-items: flex-end;
  border-bottom: 1px solid #e3e7ef;
}

body[data-active-page="permissions"] .permission-history-page .permission-tabs button {
  height: 48px;
  padding: 0 1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #657187;
  font-size: 13px;
  white-space: nowrap;
}

body[data-active-page="permissions"] .permission-history-page .permission-tabs button.active {
  border-bottom-color: #5b49e2;
  color: #5b49e2;
  font-weight: 700;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-layout {
  order: 4;
  display: block !important;
  width: 100%;
  min-width: 0;
  margin: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-list {
  width: 100% !important;
  min-height: 330px;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0;
  background: #fff !important;
  box-shadow: none !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: auto;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table {
  width: 100% !important;
  min-width: 760px;
  table-layout: fixed !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table th,
body[data-active-page="permissions"] .permission-history-page .permission-account-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f5;
  font-size: 11px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table th {
  background: #fafbfc;
  color: #7f899b;
  font-weight: 500;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table .permission-account-table-heading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table .permission-account-table-heading-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  background: #231815;
  -webkit-mask: url("./assets/icons/permission-account-user.svg?v=1") center / contain no-repeat;
  mask: url("./assets/icons/permission-account-user.svg?v=1") center / contain no-repeat;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table .permission-login-status-table-heading-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  background: #2c2c2c;
  -webkit-mask: url("./assets/icons/permission-login-status.svg?v=1") center / contain no-repeat;
  mask: url("./assets/icons/permission-login-status.svg?v=1") center / contain no-repeat;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table .permission-role-authorization-table-heading-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  background: #2c2c2c;
  -webkit-mask: url("./assets/icons/permission-role-authorization.svg?v=2") center / contain no-repeat;
  mask: url("./assets/icons/permission-role-authorization.svg?v=2") center / contain no-repeat;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table .permission-registered-store-table-heading-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  background: #2c2c2c;
  -webkit-mask: url("./assets/icons/permission-registered-store.svg?v=1") center / contain no-repeat;
  mask: url("./assets/icons/permission-registered-store.svg?v=1") center / contain no-repeat;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table .permission-last-login-table-heading-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  background: #2c2c2c;
  -webkit-mask: url("./assets/icons/permission-last-login.svg?v=1") center / contain no-repeat;
  mask: url("./assets/icons/permission-last-login.svg?v=1") center / contain no-repeat;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table .permission-created-at-table-heading-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  background: #2c2c2c;
  -webkit-mask: url("./assets/icons/permission-created-at.svg?v=1") center / contain no-repeat;
  mask: url("./assets/icons/permission-created-at.svg?v=1") center / contain no-repeat;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table .permission-action-table-heading-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  background: #2c2c2c;
  -webkit-mask: url("./assets/icons/permission-action.svg?v=1") center / contain no-repeat;
  mask: url("./assets/icons/permission-action.svg?v=1") center / contain no-repeat;
}

body[data-active-page="permissions"][data-theme="dark"] .permission-history-page .permission-account-table .permission-account-table-heading-icon {
  background: #e7edf6;
}

body[data-active-page="permissions"][data-theme="dark"] .permission-history-page .permission-account-table .permission-login-status-table-heading-icon {
  background: #e7edf6;
}

body[data-active-page="permissions"][data-theme="dark"] .permission-history-page .permission-account-table .permission-role-authorization-table-heading-icon {
  background: #e7edf6;
}

body[data-active-page="permissions"][data-theme="dark"] .permission-history-page .permission-account-table .permission-registered-store-table-heading-icon {
  background: #e7edf6;
}

body[data-active-page="permissions"][data-theme="dark"] .permission-history-page .permission-account-table .permission-last-login-table-heading-icon {
  background: #e7edf6;
}

body[data-active-page="permissions"][data-theme="dark"] .permission-history-page .permission-account-table .permission-created-at-table-heading-icon {
  background: #e7edf6;
}

body[data-active-page="permissions"][data-theme="dark"] .permission-history-page .permission-account-table .permission-action-table-heading-icon {
  background: #e7edf6;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table th:nth-child(1),
body[data-active-page="permissions"] .permission-history-page .permission-account-table td:nth-child(1) { width: 14.2857%; }
body[data-active-page="permissions"] .permission-history-page .permission-account-table th:nth-child(2),
body[data-active-page="permissions"] .permission-history-page .permission-account-table td:nth-child(2) { width: 14.2857%; }
body[data-active-page="permissions"] .permission-history-page .permission-account-table th:nth-child(3),
body[data-active-page="permissions"] .permission-history-page .permission-account-table td:nth-child(3) { width: 14.2857%; }
body[data-active-page="permissions"] .permission-history-page .permission-account-table th:nth-child(4),
body[data-active-page="permissions"] .permission-history-page .permission-account-table td:nth-child(4) { width: 14.2857%; }
body[data-active-page="permissions"] .permission-history-page .permission-account-table th:nth-child(5),
body[data-active-page="permissions"] .permission-history-page .permission-account-table td:nth-child(5) { width: 14.2857%; }
body[data-active-page="permissions"] .permission-history-page .permission-account-table th:nth-child(6),
body[data-active-page="permissions"] .permission-history-page .permission-account-table td:nth-child(6) { width: 14.2857%; }
body[data-active-page="permissions"] .permission-history-page .permission-account-table th:nth-child(7),
body[data-active-page="permissions"] .permission-history-page .permission-account-table td:nth-child(7) { width: 14.2857%; }

body[data-active-page="permissions"] .permission-history-page .permission-account-name > i {
  background: #eeecff;
  color: #6254d9;
  box-shadow: none;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-modal-backdrop {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 32, 48, .38);
  backdrop-filter: blur(2px);
}

body[data-active-page="permissions"] .permission-history-page .permission-account-modal-backdrop[hidden] {
  display: none !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-modal-card {
  position: relative;
  width: min(720px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  min-height: 0;
  overflow: auto;
  padding: 24px;
  border: 1px solid #e3e7ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(25, 34, 55, .14);
}

body[data-active-page="permissions"].permission-account-modal-open {
  overflow: hidden;
}

body[data-active-page="permissions"] .permission-history-page > .permission-account-modal-backdrop .permission-account-detail-head {
  position: sticky;
  top: -24px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -24px -24px 0;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #eef0f5;
  background: #fff;
}

body[data-active-page="permissions"] .permission-history-page > .permission-account-modal-backdrop .permission-account-detail-head > div {
  gap: 12px;
  justify-content: flex-start;
}

body[data-active-page="permissions"] .permission-history-page > .permission-account-modal-backdrop .permission-account-detail-head > button {
  float: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 1px solid #d8d2ff;
  border-radius: 8px;
  background: #fff;
  color: #647188;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

body[data-active-page="permissions"] .permission-history-page > .permission-account-modal-backdrop .permission-account-detail-head > button:hover {
  transform: translateY(-1px);
  border-color: #bcb3ff;
  background: #f5f3ff;
  color: #5e52cf;
}

body[data-active-page="permissions"] #page-content .permission-history-page > .permission-account-modal-backdrop .permission-account-detail-head > button:focus-visible {
  outline: 0 !important;
  outline-offset: 0;
  box-shadow: none !important;
}

body[data-active-page="permissions"] .permission-store-manager-section {
  padding-bottom: 16px;
}

body[data-active-page="permissions"] .permission-store-manager-list {
  display: grid;
  gap: 8px;
}

body[data-active-page="permissions"] .permission-store-manager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #e4e7ef;
  border-radius: 8px;
  background: #fff;
}

body[data-active-page="permissions"] .permission-store-manager-row.enabled {
  border-color: #cfe9df;
  background: #f7fcfa;
}

body[data-active-page="permissions"] .permission-store-manager-row.blocked {
  border-color: #f0e1c2;
  background: #fffaf0;
}

body[data-active-page="permissions"] .permission-store-manager-row strong,
body[data-active-page="permissions"] .permission-store-manager-row span {
  display: block;
}

body[data-active-page="permissions"] .permission-store-manager-row strong {
  color: #26334a;
  font-size: 11px;
}

body[data-active-page="permissions"] .permission-store-manager-row span {
  margin-top: 4px;
  color: #8a95a6;
  font-size: 9px;
  line-height: 15px;
}

body[data-active-page="permissions"] .permission-store-manager-row button {
  flex: 0 0 auto;
  min-width: 108px;
  margin: 0;
  padding-inline: 10px;
  font-size: 10px;
}

body[data-active-page="permissions"] .permission-store-manager-row button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

body[data-active-page="permissions"] .permission-history-page .permission-history-main > [data-permission-panel="roles"],
body[data-active-page="permissions"] .permission-history-page .permission-history-main > [data-permission-panel="matrix"],
body[data-active-page="permissions"] .permission-history-page .permission-history-main > [data-permission-panel="logs"] {
  order: 4;
  width: 100%;
  min-width: 0;
  margin: 0;
}

@media (max-width: 1100px) {
  body[data-active-page="permissions"] .permission-history-page .permission-history-workspace {
    max-width: none;
  }
}

@media (max-width: 850px) {
  body[data-active-page="permissions"] .permission-history-page .permission-history-workspace {
    grid-template-columns: 1fr !important;
    border-radius: 0;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-org-panel {
    min-height: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #e8ebf0 !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-tree {
    max-height: 360px !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 18px 18px 16px;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions button {
    flex: 0 0 auto;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-panel {
    max-width: 100%;
    overflow-x: auto;
    padding-inline: 18px !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid {
    grid-template-columns: minmax(180px, 1.8fr) repeat(3, minmax(100px, 1fr)) 38px !important;
    min-width: 648px;
    row-gap: 0;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .permission-filter-actions {
    width: 38px;
    min-width: 38px;
    justify-content: flex-end;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-inline: 18px !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-tabs {
    margin-inline: 18px !important;
    gap: 24px;
    overflow-x: auto;
  }
}

@media (max-width: 620px) {
  body[data-active-page="permissions"] .permission-history-page .permission-metrics {
    grid-template-columns: 1fr !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions button {
    flex: 0 0 auto;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-table {
    min-width: 940px;
  }
}

/* Permission toolbar layout: keep the heading/actions row separate from the
   account filters so controls never collapse into one overcrowded strip. */
body[data-active-page="permissions"] .permission-history-page .permission-history-main {
  display: flex !important;
  min-width: 0;
  width: 100%;
  max-width: none;
  flex-direction: column;
  gap: 0 !important;
  overflow: hidden;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading {
  display: flex !important;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px 16px;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading-copy {
  min-width: 0;
  flex: 1 1 auto;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions {
  display: flex !important;
  flex: 0 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  flex-wrap: wrap !important;
  white-space: nowrap;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions button {
  flex: 0 0 auto !important;
  height: 38px;
  margin: 0;
  padding: 0 14px;
  white-space: nowrap;
}

body[data-active-page="permissions"] .permission-history-page .permission-accounts-panel {
  display: block !important;
  min-width: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-panel {
  display: block;
  width: auto;
  min-width: 0;
  margin: 0 !important;
  padding: 0 24px 14px !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid {
  display: grid !important;
  grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(130px, 1fr)) 40px !important;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > * {
  min-width: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .permission-filter-actions {
  display: flex;
  width: 40px;
  min-width: 40px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .permission-reset-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-metrics,
body[data-active-page="permissions"] .permission-history-page .permission-tabs,
body[data-active-page="permissions"] .permission-history-page .permission-account-layout {
  width: auto;
  min-width: 0;
}

@media (max-width: 1000px) {
  body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading {
    flex-direction: column;
    gap: 12px;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions {
    width: 100%;
    overflow: visible;
    justify-content: flex-start;
  }
}

@media (max-width: 850px) {
  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-panel {
    overflow: visible;
    padding-inline: 18px !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .history-keyword-filter {
    grid-column: 1 / -1;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select:nth-child(3) {
    grid-column: 1;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select:nth-child(4) {
    grid-column: 2;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions {
    grid-column: 3;
  }
}

@media (max-width: 620px) {
  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid {
    grid-template-columns: minmax(0, 1fr) 40px !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select,
  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select:nth-child(3),
  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select:nth-child(4) {
    grid-column: 1 / -1;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Final permission-toolbar contract: reuse Formula History control sizing and
   interaction feedback, with the requested left-to-right control order. */
body[data-active-page="permissions"] .permission-history-page .permission-history-main {
  display: grid !important;
  grid-template-columns: 260px 205px 205px 205px 89px 34px !important;
  justify-content: start;
  column-gap: 16px !important;
  row-gap: 0;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading,
body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions,
body[data-active-page="permissions"] .permission-history-page .permission-accounts-panel,
body[data-active-page="permissions"] .permission-history-page .permission-account-filter-panel,
body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid {
  display: contents !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading-copy {
  grid-column: 1 / -1;
  grid-row: 1;
  order: 1;
  min-width: 0;
  padding: 20px 24px 14px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .history-keyword-filter,
body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select,
body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions,
body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions > button {
  grid-row: 2;
  min-width: 0;
  align-self: center;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .history-keyword-filter {
  grid-column: 1 !important;
  order: 5;
  padding-bottom: 14px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select:nth-child(2) {
  grid-column: 2;
  order: 6;
  padding-bottom: 14px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select:nth-child(3) {
  grid-column: 3;
  order: 7;
  padding-bottom: 14px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select:nth-child(4) {
  grid-column: 4;
  order: 8;
  padding-bottom: 14px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions {
  grid-column: 6;
  order: 10;
  width: 34px;
  min-width: 34px;
  justify-self: center;
  padding-bottom: 14px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions button,
body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions > button {
  height: 34px;
  margin: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions > button,
body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions {
  align-self: start;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions > button {
  width: 89px;
  min-width: 89px;
  max-width: 89px;
  justify-self: center;
  padding: 0 13px;
  font-weight: 600;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions > .secondary-btn {
  border: 1px solid #d8dde6;
  background: #fff;
  color: #364152;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions > .primary-btn {
  border: 1px solid #5b49e2;
  background: #5b49e2;
  color: #fff;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions button {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-filter-select-trigger {
  height: 70px;
  min-height: 70px;
  width: 100%;
  max-width: none;
  padding: 0 10px;
  font-size: 12px;
}

/* The shared device toolbar caps its filter controls at 105px. Permission
 * management uses fixed 205px grid tracks, so release that cap here or the
 * visible gap becomes 46px instead of the requested 16px. */
body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select {
  width: 100% !important;
  max-width: none !important;
  height: 70px !important;
  padding-bottom: 0 !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-keyword-filter > div {
  height: 34px;
  min-height: 34px;
  gap: 7px;
  border: 1px solid #d9dee7;
  padding-inline: 10px;
  border-radius: 7px;
  background: #fff;
  box-sizing: border-box;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-keyword-filter input {
  height: 30px;
  font-size: 12px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .history-keyword-filter {
  width: 100%;
  max-width: none;
}

body[data-active-page="permissions"] .permission-history-page .permission-history-main :is(.permission-workspace-actions > button, .permission-filter-actions button):hover:not(:disabled) {
  transform: translateY(-2px);
}

body[data-active-page="permissions"] .permission-history-page .permission-history-main :is(.permission-workspace-actions > button, .permission-filter-actions button):active:not(:disabled) {
  transform: translateY(0) scale(.985);
  transition-duration: .08s;
}

body[data-active-page="permissions"] .permission-history-page .permission-history-main :is(.permission-workspace-actions > button, .permission-filter-actions button):focus-visible {
  outline: 2px solid #9c94ef;
  outline-offset: 2px;
}

body[data-active-page="permissions"] .permission-history-page .permission-metrics,
body[data-active-page="permissions"] .permission-history-page .permission-tabs,
body[data-active-page="permissions"] .permission-history-page .permission-account-layout,
body[data-active-page="permissions"] .permission-history-page > [data-permission-panel="roles"],
body[data-active-page="permissions"] .permission-history-page > [data-permission-panel="matrix"],
body[data-active-page="permissions"] .permission-history-page > [data-permission-panel="logs"] {
  grid-column: 1 / -1;
}

body[data-active-page="permissions"] .permission-history-page .permission-metrics {
  order: 13;
}

body[data-active-page="permissions"] .permission-history-page .permission-tabs {
  order: 14;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-layout,
body[data-active-page="permissions"] .permission-history-page > [data-permission-panel="roles"],
body[data-active-page="permissions"] .permission-history-page > [data-permission-panel="matrix"],
body[data-active-page="permissions"] .permission-history-page > [data-permission-panel="logs"] {
  order: 15;
}

@media (max-width: 850px) {
  body[data-active-page="permissions"] .permission-history-page .permission-history-main {
    grid-template-columns: 260px 205px 205px 205px 89px 34px !important;
    column-gap: 16px !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-workspace-heading-copy {
    padding: 18px 18px 14px;
  }
}

/* Permission account rows keep a quiet hover state without lift or framing. */
body[data-active-page="permissions"] .permission-account-table tbody tr {
  position: relative;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}

body[data-active-page="permissions"] .permission-account-table tbody tr td {
  position: relative;
  transition: background-color .18s ease, box-shadow .18s ease, border-radius .18s ease;
}

body[data-active-page="permissions"] .permission-account-table tbody tr:hover,
body[data-active-page="permissions"] .permission-account-table tbody tr.selected {
  z-index: 4;
  transform: none;
  background: transparent;
  filter: none;
}

body[data-active-page="permissions"] .permission-account-table tbody tr:hover td,
body[data-active-page="permissions"] .permission-account-table tbody tr.selected td {
  z-index: 3;
  background: #fff;
  box-shadow: none;
}

body[data-active-page="permissions"] .permission-account-table tbody tr:hover td:first-child,
body[data-active-page="permissions"] .permission-account-table tbody tr.selected td:first-child {
  border-radius: 0;
  box-shadow: none;
}

body[data-active-page="permissions"] .permission-account-table tbody tr:hover td:last-child,
body[data-active-page="permissions"] .permission-account-table tbody tr.selected td:last-child {
  border-radius: 0;
  box-shadow: none;
}

/* Permission account search is a plain search control. Do not inherit the
 * shared history focus lift or browser account/search decorations here. */
body[data-active-page="permissions"] .permission-account-filter-panel .history-keyword-filter,
body[data-active-page="permissions"] .permission-account-filter-panel .history-keyword-filter:focus-within {
  transform: none !important;
  box-shadow: none !important;
}

body[data-active-page="permissions"] .permission-account-filter-panel .history-keyword-filter > div,
body[data-active-page="permissions"] .permission-account-filter-panel .history-keyword-filter > div:focus-within {
  border-color: #d9dee7 !important;
  box-shadow: none !important;
  transform: none !important;
}

body[data-active-page="permissions"] .permission-account-filter-panel .history-keyword-filter:hover {
  transform: translateY(-2px) !important;
}

body[data-active-page="permissions"] .permission-account-filter-panel .history-keyword-filter:hover > div {
  border-color: #b8b0ef !important;
  box-shadow: 0 8px 18px rgba(31, 42, 64, .12) !important;
}

body[data-active-page="permissions"] .permission-account-filter-panel input[data-account-query] {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  -webkit-appearance: none;
  appearance: none;
  outline: none !important;
  -webkit-focus-ring-color: transparent;
}

body[data-active-page="permissions"] .permission-account-filter-panel input[data-account-query]:focus,
body[data-active-page="permissions"] .permission-account-filter-panel input[data-account-query]:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

body[data-active-page="permissions"] .permission-account-filter-panel input[data-account-query]::-webkit-search-decoration,
body[data-active-page="permissions"] .permission-account-filter-panel input[data-account-query]::-webkit-search-cancel-button,
body[data-active-page="permissions"] .permission-account-filter-panel input[data-account-query]::-webkit-contacts-auto-fill-button,
body[data-active-page="permissions"] .permission-account-filter-panel input[data-account-query]::-webkit-credentials-auto-fill-button {
  display: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Permission page vertical position and organization tree use the final
   Formula History geometry. The topbar divider remains the single separator. */
body[data-active-page="permissions"] .permission-history-page {
  padding-top: 0 !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-history-workspace {
  grid-template-columns: 240px minmax(0, 1fr) !important;
  margin-top: 0;
  border-top: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel {
  padding: 16px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-head {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-search {
  height: 34px;
  margin: 0 0 8px;
  padding: 0 10px;
  border-radius: 7px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-search input {
  height: auto;
  margin: 0;
  padding: 0;
  font-size: 12px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-tree {
  max-height: min(620px, calc(100dvh - 300px)) !important;
  margin: 0;
  padding: 2px 5px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.org-tree-row {
  min-height: 0;
  gap: 8px;
  margin: 3px 0;
  padding: 9px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.depth-0 {
  padding-left: 7px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.depth-1 {
  padding-left: 25px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.depth-2 {
  padding-left: 43px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.depth-3 {
  padding-left: 61px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.depth-4 {
  padding-left: 79px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-arrow.org-toggle {
  width: 12px;
  font-size: 17px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-icon.org-node-icon {
  width: 30px !important;
  height: 30px !important;
  flex-basis: 30px;
  border-radius: 8px;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-name strong {
  font-size: 12px !important;
  font-weight: 600 !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-name small {
  margin-top: 2px;
  font-size: 10px !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node em,
body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.selected em {
  font-size: 10px !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel {
  align-self: start;
  height: fit-content;
}

/* Keep the shared organization-option motion while matching Inventory's
 * selected text hierarchy on the permission tree. */
body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.org-option-row.selected {
  color: #172033 !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-org-panel .history-org-node.org-option-row.selected .history-org-name strong {
  font-weight: 700 !important;
}

/* Permission controls follow Formula History's desktop control tokens. Keep
   this page-scoped so shared history controls and existing interactions are
   unchanged. */
body[data-active-page="permissions"] .permission-history-page .permission-history-main {
  grid-template-columns: minmax(260px, calc(100% - 431px)) repeat(3, 105px) 34px 42px !important;
  column-gap: 8px !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .history-keyword-filter,
body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select,
body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions {
  align-self: start;
  margin-bottom: 14px;
  padding-bottom: 0 !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .history-keyword-filter {
  margin-left: 24px;
  width: calc(100% - 24px) !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-keyword-filter > div {
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 6px;
  font-size: 12px;
  line-height: 18px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-filter-select-trigger {
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 6px;
  font-size: 13px;
  line-height: 19px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-keyword-filter > div {
  gap: 9px;
  border-color: #d9dee7;
  padding-inline: 10px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-keyword-filter input {
  height: 32px;
  font-size: 13px;
  line-height: 19px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-filter-select-trigger {
  width: 100%;
  max-width: none;
  padding-inline: 10px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-select {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-filter-select-menu {
  top: calc(100% + 6px);
  z-index: 80;
  border-radius: 9px;
  padding: 5px;
  gap: 3px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid .history-filter-select-menu button {
  min-height: 38px;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 19px;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions > button,
body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions button {
  height: 34px;
  min-height: 34px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 18px;
}

body[data-active-page="permissions"] .permission-history-page .permission-workspace-actions > button {
  width: auto;
  min-width: 0;
  max-width: none;
  padding-inline: 12px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions {
  grid-column: 5 !important;
  order: 9;
  width: 34px;
  min-width: 34px;
  height: 34px;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions button {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

/* The toolbar grid can be wider than the visible main area. Size the account
 * list from the main container itself so its columns use only the available
 * viewport width. */
body[data-active-page="permissions"] .permission-history-page .permission-account-layout {
  width: 100cqw !important;
  max-width: 100cqw !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-history-main,
body[data-active-page="permissions"] .permission-history-page .permission-table-wrap {
  overflow-x: hidden !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table {
  min-width: 0 !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-list {
  min-height: 0 !important;
}

/* Keep the permissions workspace within the available page height. When a
 * selected organization has many accounts, scroll the table body instead of
 * letting the whole right-hand workspace grow with its rows. */
body[data-active-page="permissions"] .permission-history-page {
  display: flex !important;
  flex-direction: column;
  min-height: calc(100vh - 72px);
  padding-bottom: 0 !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-history-workspace {
  flex: 1 1 auto;
  min-height: 0;
}

body[data-active-page="permissions"] .permission-history-page .permission-history-main {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

body[data-active-page="permissions"] .permission-history-page .permission-metrics {
  grid-row: 3;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-layout {
  grid-row: 4;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-list {
  display: flex;
  height: 100%;
  min-height: 0 !important;
  flex-direction: column;
}

body[data-active-page="permissions"] .permission-history-page .permission-table-wrap {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

/* Do not let the desktop grid stretch the organization divider to the
 * height of the right workspace after a tree selection re-render. */
@media (min-width: 851px) {
  body[data-active-page="permissions"] .permission-history-page .permission-history-workspace {
    align-items: start !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-history-main {
    align-self: stretch;
    height: 100%;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-org-panel {
    align-self: start !important;
    height: fit-content !important;
  }
}

body[data-active-page="permissions"] .permission-history-page .permission-account-table th,
body[data-active-page="permissions"] .permission-history-page .permission-account-table td {
  min-width: 0 !important;
  overflow: hidden;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-name,
body[data-active-page="permissions"] .permission-history-page .permission-account-name > span,
body[data-active-page="permissions"] .permission-history-page .permission-chip-list {
  min-width: 0;
  max-width: 100%;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-name > span {
  flex: 1;
  overflow: hidden;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-name strong {
  max-width: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 850px) {
  body[data-active-page="permissions"] .permission-history-page .permission-history-main {
    grid-template-columns: minmax(260px, 1.8fr) repeat(3, 105px) 34px !important;
    column-gap: 8px !important;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .history-keyword-filter {
    margin-left: 18px;
    width: calc(100% - 68px) !important;
  }
}

/* Pin the desktop separator to the workspace boundary. It must not belong to
 * the organization panel, otherwise expanding the tree changes its length. */
@media (min-width: 851px) {
  body[data-active-page="permissions"] .permission-history-page .permission-history-workspace {
    position: relative;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-history-workspace::before {
    position: absolute;
    z-index: 8;
    top: 0;
    bottom: 0;
    left: 240px;
    width: 1px;
    background: #e8ebf0;
    content: '';
    pointer-events: none;
  }

  body[data-active-page="permissions"] .permission-history-page .permission-org-panel {
    border-right: 0 !important;
  }
}

@media (max-width: 850px) {
  body[data-active-page="permissions"] .permission-history-page .permission-history-workspace::before {
    display: none;
  }
}

/* Keep the awaiting-search message flat without changing its text or row. */
body[data-active-page="permissions"] .permission-history-page .permission-account-table td.permission-account-awaiting-search {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
/* The organization tree is the sole organization scope control on the
 * permissions page. Keep the remaining toolbar controls compact. */
body[data-active-page="permissions"] .permission-history-page .permission-history-main {
  grid-template-columns: minmax(260px, 1fr) repeat(2, 105px) 34px !important;
}

body[data-active-page="permissions"] .permission-history-page .permission-account-filter-grid > .permission-filter-actions {
  grid-column: 4 !important;
}

@media (max-width: 850px) {
  body[data-active-page="permissions"] .permission-history-page .permission-history-main {
    grid-template-columns: minmax(260px, 1fr) repeat(2, 105px) 34px !important;
    overflow-x: auto !important;
  }
}

/* Reuse the Formula History close-control treatment across view details. */
:is(.detail-close,.color-preview-close,.customer-detail-close,.history-detail-close,.history-dye-kpi-modal>header>button) {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d8d2ff;
  border-radius: 8px;
  background: #fff;
  color: #647188;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

:is(.detail-close,.color-preview-close,.customer-detail-close,.history-detail-close,.history-dye-kpi-modal>header>button):hover {
  transform: translateY(-1px);
  border-color: #bcb3ff;
  background: #f5f3ff;
  color: #5e52cf;
}

body[data-theme="dark"] :is(.detail-close,.color-preview-close,.customer-detail-close,.history-detail-close,.history-dye-kpi-modal>header>button) {
  border-color: #6156aa;
  background: #17142c;
  color: #c9c0ff;
}

body[data-theme="dark"] :is(.detail-close,.color-preview-close,.customer-detail-close,.history-detail-close,.history-dye-kpi-modal>header>button):hover {
  border-color: #a99cff;
  background: #29254b;
  color: #eeeaff;
}

/* Reuse Formula History's soft-purple option-box treatment across list pages. */
:is(.color-formula-page .cf-color-row,.case-review-page .case-review-table tbody tr[data-case-row],.device-ops-page .device-table tbody tr[data-device-id]) {
  position: relative;
  transition: transform .18s ease, filter .18s ease, background-color .18s ease, box-shadow .18s ease;
}
:is(.color-formula-page .cf-color-row:hover:not(:disabled),.color-formula-page .cf-color-row.selected,.case-review-page .case-review-table tbody tr[data-case-row]:hover,.case-review-page .case-review-table tbody tr[data-case-row].selected,.device-ops-page .device-table tbody tr[data-device-id]:hover,.device-ops-page .device-table tbody tr[data-device-id].selected) {
  z-index: 4;
  transform: translateY(-3px);
  background: transparent;
  filter: drop-shadow(0 7px 11px rgba(104,93,187,.08)) drop-shadow(0 0 5px rgba(132,119,220,.06));
}
.color-formula-page .cf-color-row:hover:not(:disabled),
.color-formula-page .cf-color-row.selected {
  border-color: transparent;
  background: #fbfaff;
  box-shadow: inset 0 2px 0 #a49def, inset 0 -2px 0 #a49def, inset 2px 0 0 #a49def, inset -2px 0 0 #a49def;
}
:is(.case-review-page .case-review-table tbody tr[data-case-row]:hover td,.case-review-page .case-review-table tbody tr[data-case-row].selected td,.device-ops-page .device-table tbody tr[data-device-id]:hover td,.device-ops-page .device-table tbody tr[data-device-id].selected td) {
  position: relative;
  z-index: 3;
  background: #fbfaff;
  box-shadow: inset 0 2px 0 #a49def, inset 0 -2px 0 #a49def;
}
:is(.case-review-page .case-review-table tbody tr[data-case-row]:hover td:first-child,.case-review-page .case-review-table tbody tr[data-case-row].selected td:first-child,.device-ops-page .device-table tbody tr[data-device-id]:hover td:first-child,.device-ops-page .device-table tbody tr[data-device-id].selected td:first-child) {
  border-radius: 8px 0 0 8px;
  box-shadow: inset 2px 0 0 #a49def, inset 0 2px 0 #a49def, inset 0 -2px 0 #a49def;
}
:is(.case-review-page .case-review-table tbody tr[data-case-row]:hover td:last-child,.case-review-page .case-review-table tbody tr[data-case-row].selected td:last-child,.device-ops-page .device-table tbody tr[data-device-id]:hover td:last-child,.device-ops-page .device-table tbody tr[data-device-id].selected td:last-child) {
  border-radius: 0 8px 8px 0;
  box-shadow: inset -2px 0 0 #a49def, inset 0 2px 0 #a49def, inset 0 -2px 0 #a49def;
}
body[data-theme="dark"] :is(.color-formula-page .cf-color-row:hover:not(:disabled),.color-formula-page .cf-color-row.selected,.case-review-page .case-review-table tbody tr[data-case-row]:hover td,.case-review-page .case-review-table tbody tr[data-case-row].selected td,.device-ops-page .device-table tbody tr[data-device-id]:hover td,.device-ops-page .device-table tbody tr[data-device-id].selected td) {
  background: #182235;
}

/* Keep the color-list option box visibly outlined in both idle and selected states. */
.color-formula-page .cf-color-row {
  outline: 1px solid rgba(164, 157, 239, .18) !important;
  outline-offset: -1px;
  border-radius: 8px;
}
.color-formula-page .cf-color-row:hover:not(:disabled),
.color-formula-page .cf-color-row.selected {
  outline: 2px solid rgba(164, 157, 239, .72) !important;
  outline-offset: -2px;
}
.color-formula-page .cf-palette-filter[data-indicator-ready="true"]:not([data-indicator-mounted="true"])::before {
  transition: none !important;
  opacity: 1 !important;
}

/* Login refresh: light glassmorphism concept, scoped to the auth gate. */
.auth-gate {
  isolation: isolate;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle at 8% 84%, rgba(118, 197, 240, .22), transparent 26%),
    radial-gradient(circle at 93% 15%, rgba(145, 119, 238, .22), transparent 30%),
    linear-gradient(135deg, #fffdfa 0%, #f8f5ff 48%, #efedff 100%);
}
.auth-gate::before,
.auth-gate::after {
  content: '';
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(133, 120, 224, .12);
  border-radius: 50%;
  pointer-events: none;
}
.auth-gate::before {
  width: 650px;
  height: 650px;
  left: -265px;
  bottom: -320px;
  box-shadow: 0 0 0 36px rgba(133, 120, 224, .025), 0 0 0 72px rgba(133, 120, 224, .025), 0 0 0 108px rgba(133, 120, 224, .025);
  animation: auth-orbit-drift 18s ease-in-out infinite alternate;
}
.auth-gate::after {
  width: 570px;
  height: 570px;
  right: -165px;
  top: -250px;
  box-shadow: 0 0 0 34px rgba(133, 120, 224, .025), 0 0 0 68px rgba(133, 120, 224, .025), 0 0 0 102px rgba(133, 120, 224, .025);
  animation: auth-orbit-drift 22s ease-in-out -5s infinite alternate-reverse;
}
.auth-orbit,
.auth-orb {
  position: absolute;
  pointer-events: none;
}
.auth-orbit {
  width: 420px;
  height: 420px;
  border: 1px solid rgba(133, 120, 224, .10);
  border-radius: 50%;
  opacity: .9;
  animation: auth-orbit-drift 20s ease-in-out infinite alternate;
}
.auth-orbit-left { left: -150px; top: 12%; transform: rotate(-18deg) scaleY(.6); }
.auth-orbit-right { right: -105px; bottom: 8%; transform: rotate(28deg) scaleY(.68); animation-delay: -8s; }
.auth-orb {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(75, 104, 180, .18);
  animation: auth-orb-float 8s ease-in-out infinite;
}
.auth-orb-cyan { left: 14%; bottom: 25%; background: #7bd5f2; }
.auth-orb-violet { right: 18%; top: 14%; width: 12px; height: 12px; background: #c1a8f2; animation-delay: -3s; }
.auth-card {
  position: relative;
  z-index: 1;
  width: min(474px, calc(100% - 32px));
  min-height: 608px;
  padding: 68px 64px 74px;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(248, 247, 255, .52));
  box-shadow: 0 28px 80px rgba(76, 65, 137, .16), inset 0 1px 0 rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  animation: auth-card-enter .65s cubic-bezier(.22, 1, .36, 1) both;
}
.auth-card::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 25px;
  border: 1px solid rgba(130, 119, 226, .10);
  pointer-events: none;
}
.auth-card-topline {
  position: absolute;
  left: 25px;
  bottom: 23px;
  display: flex;
  align-items: center;
}
.auth-secure-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7d88a3;
  font-size: 12px;
}
.auth-secure-status i {
  width: 8px;
  height: 8px;
  display: block;
  border-radius: 50%;
  background: #44cda3;
  box-shadow: 0 0 0 4px rgba(68, 205, 163, .13), 0 0 14px rgba(68, 205, 163, .45);
}
.auth-brand-lockup { text-align: center; }
.auth-mark {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 14px;
  filter: drop-shadow(0 8px 13px rgba(80, 80, 167, .16));
}
.auth-card h1 {
  margin: 0;
  color: #17233f;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.8px;
}
.auth-card p {
  margin: 7px 0 34px;
  color: #74809d;
  font-size: 13px;
}
.auth-card label {
  display: block;
  margin: 18px 0;
  color: #35425f;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}
.auth-card input {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  padding: 0 15px;
  border: 1px solid rgba(181, 185, 207, .72);
  border-radius: 11px;
  outline: 0;
  color: #1e2a46;
  background: rgba(255, 255, 255, .48);
  box-shadow: inset 0 1px 2px rgba(43, 46, 80, .025);
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}
.auth-card input::placeholder { color: #a7aec2; }
.auth-card input:hover { border-color: rgba(128, 118, 222, .48); }
.auth-card input:focus {
  border-color: #8578e8;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 0 0 4px rgba(133, 120, 232, .13), 0 8px 22px rgba(100, 87, 187, .08);
  transform: translateY(-1px);
}
.auth-card .primary-btn {
  width: 100%;
  height: 50px;
  margin: 25px 0 0;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(100deg, #6355e8, #4d65ee);
  box-shadow: 0 10px 22px rgba(91, 79, 224, .25);
  font-size: 14px;
  font-weight: 650;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.auth-card .primary-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 27px rgba(91, 79, 224, .30); filter: saturate(1.08); }
.auth-card .primary-btn:active { transform: translateY(0); }
.auth-error { min-height: 18px; margin-top: 10px; color: #d9575b; font-size: 12px; text-align: left; }
.auth-language { position: absolute; top: 20px; right: 20px; margin: 0; }
.auth-language .language-trigger { color: #697591; }
.auth-language .language-trigger:hover,
.auth-language[data-open="true"] .language-trigger { color: #6355e8; background: rgba(237, 235, 255, .74); }
@keyframes auth-card-enter {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes auth-orbit-drift {
  from { transform: translate3d(0, 0, 0) rotate(-18deg) scaleY(.6); }
  to { transform: translate3d(15px, -10px, 0) rotate(-10deg) scaleY(.64); }
}
@keyframes auth-orb-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -12px, 0); }
}
@media(max-width:560px) {
  .auth-card { min-height: 570px; padding: 58px 28px 70px; border-radius: 22px; }
  .auth-card h1 { font-size: 24px; }
  .auth-card p { margin-bottom: 28px; }
  .auth-orbit { opacity: .55; }
  .auth-orb-cyan { left: 8%; bottom: 12%; }
  .auth-orb-violet { right: 8%; top: 9%; }
}
@media(prefers-reduced-motion: reduce) {
  .auth-card, .auth-gate::before, .auth-gate::after, .auth-orbit, .auth-orb { animation: none; }
  .auth-card input, .auth-card .primary-btn { transition: none; }
}
