/* A stable presentation layer for every module page. */
.topbar{height:70px!important;padding:0 28px!important;gap:24px;box-shadow:0 1px 0 rgba(29,43,75,.04)}
.top-actions{margin-left:auto!important;gap:12px!important;padding-left:24px!important}
.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}

/* The signed-in identity belongs to the page header so it remains visible
 * when the sidebar collapses. Keep the old sidebar nodes only as a harmless
 * compatibility target for auth-state updates. */
.sidebar-footer{display:none!important}
.topbar-user{gap:10px;min-width:0}
.topbar-user .avatar{width:34px;height:34px;flex:none;background:#6355e8;border-color:#fff}
.topbar-user-copy{display:grid;gap:2px;min-width:0;line-height:1.15}
.topbar-user-copy strong,.topbar-user-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar-user-copy strong{max-width:130px;color:#27334a;font-size:12px;font-weight:700}
.topbar-user-copy small{max-width:130px;color:#8793a7;font-size:10px}
.topbar-user .topbar-logout{margin-left:4px;padding:5px 10px;border:1px solid #dfe4ec;border-radius:6px;color:#7f8ba0}
.topbar-user .topbar-logout:hover{color:#6355e8}
body[data-theme="dark"] .topbar-user-copy strong{color:#f3f5fa}
body[data-theme="dark"] .topbar-user-copy small{color:#9aa6b9}
body[data-theme="dark"] .topbar-user .topbar-logout{color:#9aa6b9}
body[data-theme="dark"] .topbar-user .topbar-logout:hover{color:#b9b0ff}
@media(max-width:700px){
  .topbar-user-copy strong,.topbar-user-copy small{max-width:82px;font-size:10px}
  .topbar-user .topbar-logout{display:none}
}

body[data-theme="light"] .sidebar{background:#fff!important;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.active{background:linear-gradient(100deg,#5e50eb,#7264f7);color:#fff;box-shadow:0 7px 20px #5144d14a}
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!important;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,body[data-theme="dark"] .top-actions>.icon-btn:hover,body[data-theme="dark"] .top-actions>.language-picker .language-trigger: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-theme="dark"] .topbar{background:#0f141f;border-bottom-color:#252d3d;box-shadow:none}

/* Sidebar selection: keep the full-width treatment, with a small right-side
 * inset and a softer purple surface. */
body[data-theme="light"] .nav-item,
body[data-theme="dark"] .nav-item{
  width:calc(100% - 16px);
  margin-left:0;
  margin-right:16px;
  gap:18px;
}
body[data-active-page="dashboard"][data-theme="dark"] .nav-item{gap:18px}
@media (min-width:1081px){
  body[data-theme="light"] .nav-item,
  body[data-theme="dark"] .nav-item,
  body[data-active-page="dashboard"][data-theme="dark"] .nav-item{
    padding-left:20px;
    padding-right:10px;
  }
}
body[data-theme="light"] .nav-item.active,
body[data-theme="dark"] .nav-item.active,
body[data-active-page="dashboard"][data-theme="dark"] .nav-item.active{
  background:linear-gradient(100deg,#8279de 0%,#9189e9 100%);
  box-shadow:0 7px 18px rgba(105,92,205,.14);
}

/* Sidebar hover must not move the element under the pointer. The shared
 * interaction rule in styles.css lifts every actionable item by 1px, which
 * can repeatedly retrigger mouseenter/mouseleave while the pointer is still
 * crossing a navigation row. Keep the hit area fixed and animate only paint.
 */
.sidebar .nav-item,
.sidebar .nav-item:hover,
.sidebar .nav-item:active,
.sidebar .nav-item.active,
.sidebar .nav-item.active:hover{
  transform:none!important;
}
.sidebar .nav-item{
  transition:background-color .16s ease,box-shadow .16s ease,border-color .16s ease,color .16s ease!important;
}
.sidebar .nav-item:hover:not(.active) .nav-icon>svg:not(.shell-nav-icon){
  /* Match the resting SVG filter so hover does not force a filter swap. */
  filter:drop-shadow(0 1px 0 #74819a)!important;
}
/* These two icons intentionally use no SVG filter at rest. Keep that value
 * through hover as well; otherwise the shared rule above reintroduces the
 * exact repaint that makes them flash. */
.sidebar .nav-item:hover:not(.active) .nav-icon>svg.formula-history-icon,
.sidebar .nav-item:hover:not(.active) .nav-icon>svg.device-management-icon{
  filter:none!important;
}

/* Formula History: keep the title boundary as one quiet 1px divider.
 * The shared presentation shadow otherwise stacks with the header border and
 * makes the separator appear several pixels thick on this page. */
body[data-active-page="history"] .topbar{
  border-bottom:1px solid #e8ebf2!important;
  box-shadow:none!important;
}
body[data-theme="dark"][data-active-page="history"] .topbar{
  border-bottom-color:#252d3d!important;
}

/* Match Organization Management's single 1px title divider. The history
 * workspace must not add a second top edge or shadow below the header. */
body[data-active-page="history"] #page-content,
body[data-active-page="history"] .history-page{
  border-top:0!important;
  box-shadow:none!important;
}
body[data-active-page="history"] .history-page .history-workspace{
  border-top:0!important;
  box-shadow:none!important;
}

/* Extend only the organization panel's right divider; keep its bottom edge rounded. */
body[data-active-page="history"] .history-store-org.history-org-panel{border-right:0!important}
body[data-active-page="history"] .history-main{position:relative}
body[data-active-page="history"] .history-main::before{
  position:absolute;
  z-index:3;
  top:0;
  bottom:0;
  left:0;
  width:1px;
  background:#dfe5ee;
  content:"";
  pointer-events:none;
}
body[data-theme="dark"][data-active-page="history"] .history-main::before{background:#2b394e}
@media(max-width:860px){body[data-active-page="history"] .history-main::before{display:none}}

/* Selected formula records stay white inside; the active state is carried by a
 * low-contrast purple outline and a soft halo instead of a lavender fill. */
body[data-active-page="history"] .history-page .history-dispense-table tbody .history-record-row.detail-open{
  filter:drop-shadow(0 4px 9px rgba(104,93,187,.05))!important;
}
body[data-active-page="history"] .history-page .history-dispense-table tbody .history-record-row.detail-open>td{
  background:#fff!important;
  box-shadow:inset 0 .5px 0 rgba(133,121,232,.38),inset 0 -.5px 0 rgba(133,121,232,.38)!important;
}
body[data-active-page="history"] .history-page .history-dispense-table tbody .history-record-row.detail-open>td:first-child{
  box-shadow:inset .5px 0 0 rgba(133,121,232,.38),inset 0 .5px 0 rgba(133,121,232,.38),inset 0 -.5px 0 rgba(133,121,232,.38)!important;
}
body[data-active-page="history"] .history-page .history-dispense-table tbody .history-record-row.detail-open>td:last-child{
  box-shadow:inset -.5px 0 0 rgba(133,121,232,.38),inset 0 .5px 0 rgba(133,121,232,.38),inset 0 -.5px 0 rgba(133,121,232,.38)!important;
}
body[data-theme="dark"][data-active-page="history"] .history-page .history-dispense-table tbody .history-record-row.detail-open>td{background:#000!important}

.shell-nav-icon{display:block;width:22px;height:22px;background:currentColor;-webkit-mask:center/contain no-repeat;mask:center/contain no-repeat}
.shell-nav-icon.dashboard-gauge-icon{-webkit-mask-image:url("./assets/icons/dashboard-page.svg?v=3");mask-image:url("./assets/icons/dashboard-page.svg?v=3")}
svg.shell-nav-icon.store-management-icon{width:22px;height:22px;background:none!important;fill:currentColor!important;stroke:none!important;-webkit-mask:none!important;mask:none!important;filter:none!important}
svg.shell-nav-icon.store-management-icon path{fill:currentColor!important;stroke:none!important}
.nav-item:hover svg.shell-nav-icon.store-management-icon,.nav-item.active svg.shell-nav-icon.store-management-icon{background:none!important}
svg.shell-nav-icon.color-library-icon{width:22px;height:22px;background:none!important;fill:currentColor!important;stroke:none!important;-webkit-mask:none!important;mask:none!important;filter:none!important}
svg.shell-nav-icon.color-library-icon path{fill:currentColor!important;stroke:none!important}
.nav-item:hover svg.shell-nav-icon.color-library-icon,.nav-item.active svg.shell-nav-icon.color-library-icon{background:none!important}
.shell-nav-icon.customer-profiles-icon{-webkit-mask-image:url("./assets/icons/customer-profiles.svg?v=1");mask-image:url("./assets/icons/customer-profiles.svg?v=1")}
.nav-item:hover .shell-nav-icon,.nav-item.active .shell-nav-icon{background:currentColor!important}

#page-title{display:inline-flex;align-items:center;gap:9px}
.shell-page-title-icon{display:block;flex:none;background:currentColor;-webkit-mask:center/contain no-repeat;mask:center/contain no-repeat}
.dashboard-page-title-icon{width:28px;height:28px;color:#2c2c2c;-webkit-mask-image:url("./assets/icons/dashboard-page.svg?v=3");mask-image:url("./assets/icons/dashboard-page.svg?v=3")}
svg.store-management-page-title-icon{width:25px;height:25px;color:#2c2c2c;background:none!important;fill:currentColor!important;stroke:none!important;-webkit-mask:none!important;mask:none!important}
svg.store-management-page-title-icon path{fill:currentColor!important;stroke:none!important}
svg.shell-page-title-icon.color-library-page-title-icon{width:25px;height:25px;color:#2c2c2c;background:none!important;fill:currentColor!important;stroke:none!important;-webkit-mask:none!important;mask:none!important;filter:none!important}
svg.shell-page-title-icon.color-library-page-title-icon path{fill:currentColor!important;stroke:none!important}
body[data-active-page="color"] svg.shell-page-title-icon.color-library-page-title-icon{color:#2c2c2c!important}
.customer-profiles-page-title-icon{width:30px;height:22px;color:#2c2c2c;-webkit-mask-image:url("./assets/icons/customer-profiles.svg?v=1");mask-image:url("./assets/icons/customer-profiles.svg?v=1")}
body[data-theme="dark"] .dashboard-page-title-icon,body[data-theme="dark"] .store-management-page-title-icon,body[data-theme="dark"] .customer-profiles-page-title-icon{color:#f4f7fd}
body[data-theme="dark"] .color-library-page-title-icon{color:#aebfff}
body[data-active-page="color"][data-theme="dark"] svg.shell-page-title-icon.color-library-page-title-icon{color:#f4f7fd!important}

@media(max-width:700px){.topbar{height:auto!important;min-height:70px;padding:12px 14px!important;gap:12px}.top-actions{gap:7px!important;padding-left:0!important}.top-actions>.icon-btn,.top-actions>.language-picker .language-trigger{width:34px;height:34px}#page-title{gap:7px}.dashboard-page-title-icon{width:23px;height:23px}.store-management-page-title-icon,.color-library-page-title-icon{width:21px;height:21px}.customer-profiles-page-title-icon{width:25px;height:19px}}

/* Store management keeps the hierarchy and the selected-node detail in one workspace. */
.organization-tree-page .org-tree-layout.org-tree-workspace{grid-template-columns:minmax(260px,300px) minmax(0,1fr);gap:0;min-height:620px;padding:0;overflow:hidden}
.organization-tree-page .org-tree-workspace .store-org-tree{min-height:620px!important;padding:16px!important;border:0!important;border-right:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.organization-tree-page .org-tree-workspace .org-node-detail{min-width:0;padding:20px;border:0;border-radius:0;background:transparent;box-shadow:none}
@media(max-width:850px){.organization-tree-page .org-tree-layout.org-tree-workspace{grid-template-columns:1fr;min-height:0}.organization-tree-page .org-tree-workspace .store-org-tree{min-height:0!important;border-right:0!important;border-bottom:1px solid var(--line)!important}.organization-tree-page .org-tree-workspace .org-node-detail{padding:16px}}

/* Scheme B store workbench: consistent outline SVG icons and a three-column operational layout. */
.store-workbench-page{max-width:none;padding:18px 28px 28px}.store-workbench{display:grid;grid-template-columns:276px minmax(480px,1fr) 354px;min-height:calc(100vh - 108px);overflow:hidden;border:1px solid #e3e8f0;border-radius:14px;background:#fff;box-shadow:0 8px 26px rgba(27,42,70,.05)}.store-ui-icon{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.store-workbench-tree{min-width:0;padding:20px 16px;border-right:1px solid #e8edf3;background:#fbfcff}.store-workbench-tree-head,.store-list-head,.store-inspector-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.store-workbench-tree-head{padding:0 2px 15px}.store-workbench-tree-head h2,.store-list-head h2{display:flex;align-items:center;gap:9px;margin:0;color:#1f2b42;font-size:18px}.store-workbench-tree-head h2 .store-ui-icon{color:#6556e9}.store-workbench-tree-head small,.store-list-head p{display:block;margin:5px 0 0;color:#97a2b4;font-size:12px}.store-icon-button{display:grid;place-items:center;width:32px;height:32px;border:1px solid #e0e5ee;border-radius:8px;background:#fff;color:#748198;font:inherit;cursor:pointer}.store-tree-search{display:flex;align-items:center;gap:8px;height:39px;margin:0 2px 12px;padding:0 11px;border:1px solid #dfe5ee;border-radius:8px;background:#fff;color:#94a0b2}.store-tree-search .store-ui-icon{width:16px;height:16px}.store-tree-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:#35435a;font:inherit;font-size:12px}.store-tree-list{max-height:calc(100vh - 228px);padding:1px 2px;overflow:auto}.store-tree-row{position:relative;display:flex;align-items:center;gap:8px;width:100%;min-height:50px;margin:3px 0;padding:7px;border:1px solid transparent;border-radius:9px;background:transparent;color:#59667b;text-align:left;font:inherit;cursor:pointer;transition:.16s}.store-tree-row:hover{z-index:1;border-color:#dfdafb;background:#fff;box-shadow:0 5px 13px rgba(43,54,83,.08);transform:translateY(-1px)}.store-tree-row.selected{z-index:2;border-color:#bfb4ff;background:#f3f1ff;box-shadow:0 8px 18px rgba(91,76,203,.13);transform:translateY(-1px)}.store-tree-row.depth-1{padding-left:25px}.store-tree-row.depth-2{padding-left:43px}.store-tree-row.depth-3{padding-left:61px}.store-tree-row.depth-4{padding-left:79px}.store-tree-toggle{width:12px;flex:none;color:#8793a6;font-size:19px;line-height:1}.store-tree-toggle.expanded{transform:rotate(90deg)}.store-tree-toggle.leaf{visibility:hidden}.store-node-icon{display:grid;place-items:center;flex:none;width:29px;height:29px;border-radius:8px;background:#eef0ff;color:#6355e8}.store-node-icon .store-ui-icon{width:17px;height:17px}.store-node-icon.headquarters{background:#eaf1ff;color:#3d74d0}.store-node-icon.agent{background:#f5efff;color:#8a61d7}.store-node-icon.chain{background:#eef7ff;color:#4f87d9}.store-node-icon.store{background:#eff9f5;color:#29a77d}.store-node-icon.factory{background:#f4f1ff;color:#7964d6}.store-node-icon.large{width:42px;height:42px;border-radius:11px}.store-node-icon.large .store-ui-icon{width:23px;height:23px}.store-tree-copy{display:grid;min-width:0;gap:2px;flex:1}.store-tree-copy strong{overflow:hidden;color:#36435a;font-size:13px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.store-tree-copy small{overflow:hidden;color:#99a4b6;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.store-tree-row.selected .store-tree-copy strong{color:#5c4fd0}.store-tree-count,.store-tree-alert{display:grid;place-items:center;min-width:23px;height:23px;padding:0 6px;border-radius:12px;background:#eef1f5;color:#8a96a8;font-size:10px}.store-tree-alert{background:#fff0ee;color:#e05c5c}.store-workbench-list{min-width:0;padding:23px 22px;background:#fff}.store-list-head{align-items:flex-start;margin-bottom:17px}.store-list-head h2{font-size:22px}.store-add-button{display:inline-flex;align-items:center;gap:7px;margin:0;padding:10px 13px;white-space:nowrap;font-size:12px}.store-add-button .store-ui-icon{width:16px;height:16px}.store-scope-strip{display:flex;align-items:center;gap:9px;min-height:42px;margin-bottom:12px;padding:0 12px;border:1px solid #e7eaf1;border-radius:9px;background:#fafbfe;color:#67748b;font-size:12px}.store-scope-strip span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.store-scope-strip span:not(:first-child){padding-left:10px;border-left:1px solid #e6e9ef}.store-scope-strip .store-node-icon{width:20px;height:20px;border-radius:6px}.store-scope-strip .store-node-icon .store-ui-icon,.store-scope-strip>.store-ui-icon{width:14px;height:14px}.store-scope-strip .is-risk{color:#d05d5d}.store-list{display:grid;gap:10px}.store-directory-row{display:grid;grid-template-columns:38px minmax(125px,1.55fr) repeat(5,minmax(64px,.63fr)) 17px;align-items:center;gap:10px;width:100%;min-height:98px;padding:14px 15px;border:1px solid #e5e9f1;border-radius:11px;background:#fff;color:#344158;text-align:left;font:inherit;cursor:pointer;transition:.16s}.store-directory-row:hover{border-color:#c8c0fe;box-shadow:0 8px 18px rgba(75,61,169,.09);transform:translateY(-1px)}.store-directory-row.selected{border-color:#a99dff;background:#faf9ff;box-shadow:0 0 0 3px rgba(104,88,234,.1),0 8px 18px rgba(75,61,169,.08)}.store-directory-mark{display:grid;place-items:center}.store-directory-mark .store-node-icon{width:34px;height:34px;border-radius:9px}.store-directory-mark .store-node-icon .store-ui-icon{width:19px;height:19px}.store-directory-name{display:grid;min-width:0;gap:5px}.store-directory-name>strong{overflow:hidden;color:#2d3a51;font-size:15px;font-weight:750;text-overflow:ellipsis;white-space:nowrap}.store-directory-name>small{overflow:hidden;color:#919caf;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.store-directory-metric{display:grid;grid-template-columns:18px auto;grid-template-rows:16px 14px;column-gap:5px;align-items:center;color:#718096}.store-directory-metric .store-ui-icon{grid-row:1/3;width:17px;height:17px;color:#8071ee}.store-directory-metric b{color:#2e3b53;font-size:15px;font-variant-numeric:tabular-nums}.store-directory-metric small{color:#98a2b2;font-size:10px}.store-directory-metric.risk .store-ui-icon,.store-directory-metric.risk b{color:#e27b29}.store-directory-metric.invite .store-ui-icon,.store-directory-metric.invite b{color:#24a77a}.store-row-chevron{width:17px;height:17px;color:#9da7b7}.store-list-empty{display:grid;place-items:center;gap:9px;min-height:280px;padding:25px;border:1px dashed #dfe4ed;border-radius:12px;color:#929daf;text-align:center}.store-list-empty .store-ui-icon{width:29px;height:29px;color:#8a7ce9}.store-list-empty strong{color:#526078;font-size:14px}.store-list-empty span{font-size:12px}.store-workbench-inspector{min-width:0;padding:22px 19px;border-left:1px solid #e8edf3;background:#fbfcff}.store-inspector-head>div{display:flex;align-items:center;min-width:0;gap:11px}.store-inspector-head small{display:block;color:#909caf;font-size:11px}.store-inspector-head h2{margin:3px 0;color:#28364e;font-size:20px}.store-inspector-head p{overflow:hidden;margin:5px 0 0;color:#96a0b1;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.store-close-detail{display:grid;place-items:center;width:33px;height:33px;border:1px solid #e0e5ed;border-radius:8px;background:#fff;color:#728097;cursor:pointer}.store-close-detail .store-ui-icon{width:16px;height:16px}.store-detail-tabs{display:flex;gap:22px;margin:21px -2px 17px;border-bottom:1px solid #e5e9ef}.store-detail-tabs button{position:relative;padding:0 1px 11px;border:0;background:transparent;color:#8c97aa;font:inherit;font-size:12px;cursor:pointer}.store-detail-tabs button.active{color:#6254da;font-weight:750}.store-detail-tabs button.active:after{position:absolute;right:0;bottom:-1px;left:0;height:2px;border-radius:2px;background:#6b5ce4;content:""}.store-detail-metrics,.store-org-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px}.store-metric{position:relative;min-height:87px;padding:13px;border:1px solid #e5e9f0;border-radius:10px;background:#fff}.store-metric>span{position:absolute;right:11px;bottom:12px;display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#f0efff;color:#7060e6}.store-metric>span .store-ui-icon{width:16px;height:16px}.store-metric small,.store-metric strong{display:block}.store-metric small{color:#909caf;font-size:11px}.store-metric strong{margin-top:7px;color:#2c3951;font-size:18px;font-variant-numeric:tabular-nums}.store-metric.risk{border-color:#ffe0d5;background:#fffaf8}.store-metric.risk>span{background:#fff0eb;color:#e37332}.store-metric.risk strong{color:#da6d2c}.store-metric.success>span{background:#eaf8f2;color:#25a679}.store-inspector-section{margin-top:15px;padding:15px 0;border-top:1px solid #e7ebf1}.store-inspector-section h3,.store-quick-actions h3{margin:0 0 11px;color:#39465c;font-size:13px}.store-inspector-section>div{display:flex;justify-content:space-between;gap:10px;padding:7px 0;color:#8a96a8;font-size:12px}.store-inspector-section>div b{color:#3a475e;font-size:12px}.risk-text{color:#df7133!important}.success-text{color:#24a778!important}.store-child-link{display:flex;align-items:center;gap:9px;width:100%;padding:9px 0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.store-child-link .store-ui-icon:last-child{width:16px;height:16px;margin-left:auto;color:#9ba5b5}.store-child-link span:not(.store-node-icon){display:grid;gap:3px}.store-child-link strong{color:#3d4a60;font-size:12px}.store-child-link small,.store-muted{color:#99a4b5;font-size:10px}.store-muted{margin:0;font-size:12px}.store-quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:16px;padding-top:15px;border-top:1px solid #e7ebf1}.store-quick-actions h3{grid-column:1/-1;margin-bottom:1px}.store-quick-actions button{display:grid;gap:7px;min-height:69px;padding:9px;border:1px solid #e1e6ee;border-radius:9px;background:#fff;color:#657187;text-align:left;font:inherit;font-size:11px;cursor:pointer}.store-quick-actions button .store-ui-icon{width:17px;height:17px;color:#7060e6}.store-quick-actions .attention-action .store-ui-icon{color:#e4772e}
body[data-theme="dark"] .store-workbench{border-color:#253247;background:#111925;box-shadow:none}body[data-theme="dark"] .store-workbench-tree,body[data-theme="dark"] .store-workbench-inspector{border-color:#263348;background:#111925}body[data-theme="dark"] .store-workbench-list{background:#0f1621}body[data-theme="dark"] .store-workbench-tree-head h2,body[data-theme="dark"] .store-list-head h2,body[data-theme="dark"] .store-inspector-head h2{color:#edf2fa}body[data-theme="dark"] .store-tree-search,body[data-theme="dark"] .store-icon-button,body[data-theme="dark"] .store-directory-row,body[data-theme="dark"] .store-metric,body[data-theme="dark"] .store-quick-actions button,body[data-theme="dark"] .store-close-detail{border-color:#2b394e;background:#151f2e;color:#c9d3e2}body[data-theme="dark"] .store-tree-search input{color:#e9eef7}body[data-theme="dark"] .store-tree-row:hover{border-color:#3d4d65;background:#182231;box-shadow:0 6px 15px rgba(0,0,0,.3)}body[data-theme="dark"] .store-tree-row.selected{border-color:#625bb2;background:#252443;box-shadow:0 8px 19px rgba(0,0,0,.32)}body[data-theme="dark"] .store-tree-copy strong,body[data-theme="dark"] .store-directory-name>strong,body[data-theme="dark"] .store-directory-metric b,body[data-theme="dark"] .store-metric strong,body[data-theme="dark"] .store-inspector-section h3,body[data-theme="dark"] .store-quick-actions h3,body[data-theme="dark"] .store-child-link strong{color:#e5ebf5}body[data-theme="dark"] .store-scope-strip{border-color:#29374c;background:#151f2e;color:#aeb9ca}body[data-theme="dark"] .store-scope-strip span:not(:first-child),body[data-theme="dark"] .store-detail-tabs,body[data-theme="dark"] .store-inspector-section,body[data-theme="dark"] .store-quick-actions{border-color:#28364b}body[data-theme="dark"] .store-directory-row.selected{border-color:#766bdd;background:#1c1d37;box-shadow:0 0 0 3px rgba(121,106,239,.13)}body[data-theme="dark"] .store-metric{background:#151f2e}body[data-theme="dark"] .store-metric.risk{border-color:#67433c;background:#251a1b}body[data-theme="dark"] .store-metric>span{background:#29254c;color:#c5bcff}body[data-theme="dark"] .store-metric.risk>span{background:#3b2420;color:#ffad83}body[data-theme="dark"] .store-detail-tabs button{color:#8f9bb0}body[data-theme="dark"] .store-detail-tabs button.active{color:#c6bdff}body[data-theme="dark"] .store-list-empty{border-color:#334157;color:#95a2b5}
@media(max-width:1300px){.store-workbench{grid-template-columns:250px minmax(420px,1fr) 316px}.store-directory-row{grid-template-columns:36px minmax(110px,1.45fr) repeat(4,minmax(60px,.65fr)) 17px}.store-directory-metric.invite{display:none}}@media(max-width:1050px){.store-workbench{grid-template-columns:250px minmax(0,1fr)}.store-workbench-inspector{grid-column:1/-1;border-top:1px solid #e8edf3;border-left:0}.store-detail-metrics{grid-template-columns:repeat(5,1fr)}}@media(max-width:780px){.store-workbench-page{padding:14px}.store-workbench{grid-template-columns:1fr;min-height:0}.store-workbench-tree{border-right:0;border-bottom:1px solid #e8edf3}.store-tree-list{max-height:300px}.store-workbench-inspector{grid-column:auto}.store-directory-row{grid-template-columns:36px minmax(104px,1fr) repeat(3,58px) 17px;gap:7px;padding:12px}.store-directory-metric.risk,.store-directory-metric.invite{display:none}.store-detail-metrics{grid-template-columns:repeat(2,1fr)}}

/* Customer detail uses a push layout: the hierarchy stays visible while the
 * complete working area folds left and the detail grows in from the right. */
.customer-org-layout{--customer-sidebar-width:clamp(238px,18vw,300px);--customer-sidebar-folded-width:clamp(210px,16vw,260px);--customer-detail-width:minmax(360px,46%,620px);display:grid;grid-template-areas:"sidebar list detail";grid-template-columns:var(--customer-sidebar-width) minmax(0,1fr) 0;column-gap:16px;row-gap:0;align-items:start;will-change:grid-template-columns;transition:grid-template-columns .46s cubic-bezier(.22,1,.36,1),column-gap .42s cubic-bezier(.22,1,.36,1)}
.customer-org-tree{grid-area:sidebar;min-width:0;overflow:hidden;opacity:1;transform:translateX(0);will-change:transform;transition:opacity .2s ease,transform .46s cubic-bezier(.22,1,.36,1),padding .42s cubic-bezier(.22,1,.36,1),border-width .42s cubic-bezier(.22,1,.36,1)}
.customer-directory{grid-area:list;min-width:0;transform:translateX(0);will-change:transform;transition:transform .46s cubic-bezier(.22,1,.36,1),filter .3s ease}
.customer-profile-panel{grid-area:detail;position:relative;z-index:auto;top:auto;right:auto;left:auto;bottom:auto;width:auto;min-width:0;height:clamp(480px,calc(100dvh - 178px),640px);max-height:calc(100dvh - 178px);margin:0;overflow:hidden;opacity:0;visibility:hidden;pointer-events:none;transform:translateX(28px);will-change:transform,opacity;transition:transform .46s cubic-bezier(.22,1,.36,1),opacity .22s ease,visibility 0s linear .46s;box-shadow:none}
.customer-org-layout.is-sidebar-collapsed{grid-template-columns:0 minmax(0,1fr) 0;column-gap:0}
.customer-org-layout.is-sidebar-collapsed .customer-org-tree{padding-inline:0!important;border-inline-width:0;opacity:0;pointer-events:none;transform:translateX(-24px)}
.customer-org-layout.is-list-shifted{grid-template-columns:var(--customer-sidebar-folded-width) minmax(0,1fr) var(--customer-detail-width);column-gap:16px}
.customer-org-layout.is-list-shifted .customer-org-tree,.customer-org-layout.is-list-shifted .customer-directory{transform:translateX(0)}
.customer-org-layout.is-detail-open .customer-profile-panel{opacity:1;visibility:visible;pointer-events:auto;transform:translateX(0);transition:transform .46s cubic-bezier(.22,1,.36,1) 60ms,opacity .22s ease 60ms,visibility 0s}
.customer-detail-content{height:100%;overflow-y:auto;padding-right:18px;box-sizing:border-box;scrollbar-width:none}.customer-detail-content::-webkit-scrollbar{display:none}.customer-detail-scroll-rail{position:absolute;z-index:3;top:50%;right:7px;width:8px;height:min(500px,calc(100% - 96px));border-radius:999px;background:#f0f2f5;opacity:0;pointer-events:none;transform:translateY(-50%);transition:opacity .18s ease,background-color .18s ease}.customer-profile-panel.is-open .customer-detail-scroll-rail.is-visible{opacity:1;pointer-events:auto}.customer-detail-scroll-rail:hover{background:#e8ebef}.customer-detail-scroll-thumb{position:absolute;top:0;left:0;width:100%;min-height:34px;margin:0;border:1px solid #98a2b1;border-radius:999px;background:#aeb6c3;box-shadow:0 1px 3px rgba(43,55,76,.14);cursor:grab;touch-action:none;transition:background-color .16s ease,box-shadow .16s ease,border-color .16s ease}.customer-detail-scroll-thumb:hover{border-color:#8993a1;background:#9fa8b6;box-shadow:0 2px 6px rgba(43,55,76,.2)}.customer-detail-scroll-thumb:active{border-color:#6f7a8a;background:#7d8796;box-shadow:inset 0 1px 3px rgba(30,40,56,.3);cursor:grabbing}.customer-detail-scroll-thumb:focus-visible{outline:3px solid rgba(124,137,157,.3);outline-offset:2px}
@media(max-width:980px){.customer-org-layout{grid-template-areas:"sidebar" "list" "detail";grid-template-columns:minmax(0,1fr);row-gap:12px;transition:row-gap .36s cubic-bezier(.22,1,.36,1)}.customer-org-layout.is-sidebar-collapsed,.customer-org-layout.is-list-shifted{grid-template-columns:minmax(0,1fr);row-gap:12px}.customer-org-layout.is-sidebar-collapsed .customer-org-tree{display:none}.customer-org-layout.is-list-shifted .customer-org-tree,.customer-org-layout.is-list-shifted .customer-directory{transform:translateX(0)}.customer-profile-panel{height:0;max-height:0;padding-block:0!important;border-block-width:0;transform:translateX(24px);transition:height .4s cubic-bezier(.22,1,.36,1),max-height .4s cubic-bezier(.22,1,.36,1),padding .4s cubic-bezier(.22,1,.36,1),transform .4s cubic-bezier(.22,1,.36,1),opacity .2s ease,visibility 0s linear .4s}.customer-org-layout.is-detail-open .customer-profile-panel{height:auto;max-height:min(72dvh,620px);padding-block:18px!important;border-block-width:1px;transform:translateX(0);transition:height .4s cubic-bezier(.22,1,.36,1),max-height .4s cubic-bezier(.22,1,.36,1),padding .4s cubic-bezier(.22,1,.36,1),transform .4s cubic-bezier(.22,1,.36,1) 45ms,opacity .2s ease 45ms,visibility 0s}}
@media(prefers-reduced-motion:reduce){.customer-org-layout,.customer-org-tree,.customer-directory,.customer-profile-panel{transition:none!important}}

/* Customer hierarchy and customer list share one physical workspace card. */
.customer-org-layout{--customer-detail-space:clamp(360px,46%,620px);position:relative;column-gap:0;background:transparent;border:0;box-shadow:none}.customer-org-layout:before{position:absolute;z-index:0;inset:0;content:"";border:1px solid #edf0f5;border-radius:11px;background:var(--surface);box-shadow:0 3px 12px #25365d08}.customer-org-layout>:not(.customer-profile-panel){position:relative;z-index:1}.customer-org-tree{border:0!important;border-right:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}.customer-directory{position:relative;z-index:1}.customer-directory .customer-toolbar{margin-bottom:0!important;border:0!important;border-bottom:1px solid var(--line)!important;background:transparent!important;box-shadow:none!important}.customer-directory .customer-table-card{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}.customer-org-layout.is-list-shifted{column-gap:16px}.customer-org-layout.is-list-shifted:before{right:calc(var(--customer-detail-space) + 16px)}
body[data-theme="dark"] .customer-org-layout:before{border-color:#2d374a;background:#141b27;box-shadow:none}body[data-theme="dark"] .customer-org-tree,body[data-theme="dark"] .customer-directory .customer-toolbar{border-color:#2d374a!important;background:transparent!important}body[data-theme="dark"] .customer-directory .customer-table-card{background:transparent!important}
@media(max-width:980px){.customer-org-layout:before,.customer-org-layout.is-list-shifted:before{right:0}.customer-org-tree{border-right:0!important;border-bottom:1px solid var(--line)!important}}

/* Customer archive: make the hierarchy and directory one continuous page.
 * The structural dividers remain; only the outer grey gutter/card treatment is removed. */
body[data-active-page="customers"] .main-content,
body[data-active-page="customers"] #page-content,
body[data-active-page="customers"] .customer-org-page{background:var(--surface)}
body[data-active-page="customers"] .customer-org-page{max-width:none;min-height:calc(100dvh - 86px);padding:0}
body[data-active-page="customers"] .customer-org-layout{min-height:calc(100dvh - 86px)}
body[data-active-page="customers"] .customer-org-layout:before{border:0;border-radius:0;box-shadow:none}
@media(min-width:981px){
  body[data-active-page="customers"] .customer-org-tree.org-tree-panel{height:calc(100% - 14px)!important;max-height:none!important;min-height:0;border-right:0!important}
  body[data-active-page="customers"] .customer-org-layout:after{position:absolute;z-index:2;top:0;bottom:0;left:calc(var(--customer-sidebar-width) - 1px);width:1px;background:var(--line);content:"";pointer-events:none}
  body[data-active-page="customers"] .customer-org-layout.is-list-shifted:after{left:calc(var(--customer-sidebar-folded-width) - 1px)}
  body[data-active-page="customers"] .customer-org-layout.is-sidebar-collapsed:after{display:none}
}
body[data-theme="dark"][data-active-page="customers"] .main-content,
body[data-theme="dark"][data-active-page="customers"] #page-content,
body[data-theme="dark"][data-active-page="customers"] .customer-org-page,
body[data-theme="dark"][data-active-page="customers"] .customer-org-layout:before{background:#141b27}

/* Keep the organization search affordance inside the same field chrome as
   its input. The icon and input are siblings in the shared markup, so the
   field wrapper owns the border/focus state and the input stays transparent. */
body[data-active-page="customers"] .customer-org-tree .org-tree-search{
  display:flex;
  align-items:center;
  gap:9px;
  height:34px;
  margin:0 0 8px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--surface);
  cursor:text;
}
body[data-active-page="customers"] .customer-org-tree .org-tree-search:focus-within{
  border-color:var(--primary);
  box-shadow:0 0 0 3px #6355e814;
}
body[data-active-page="customers"] .customer-org-tree .org-tree-search .device-search-icon{
  flex:none;
}
body[data-active-page="customers"] .customer-org-tree .org-tree-search input{
  min-width:0;
  height:auto;
  flex:1;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  outline:0;
  background:transparent;
}
body[data-active-page="customers"] .customer-org-tree .org-tree-search input:focus{
  border:0;
  box-shadow:none;
}

/* Customer details open as a centered, tabbed dialog so the customer directory
 * remains in context while a complete profile can be inspected. */
.customer-detail-backdrop{position:fixed;z-index:1500;inset:0;display:grid;place-items:center;padding:30px;background:rgba(22,30,45,.32);backdrop-filter:blur(3px);animation:customer-detail-fade .18s ease}.customer-detail-dialog{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;width:min(920px,calc(100vw - 56px));max-height:calc(100dvh - 56px);overflow:hidden;border:1px solid #e1e5ed;border-radius:14px;background:#fff;box-shadow:0 28px 74px rgba(23,31,48,.27);animation:customer-detail-rise .22s cubic-bezier(.22,1,.36,1);outline:0}.customer-dialog-head{display:flex;align-items:center;gap:13px;padding:22px 26px 18px;border-bottom:1px solid #edf0f4}.customer-dialog-head .customer-avatar{display:grid;place-items:center;flex:none;width:48px;height:48px;border-radius:50%;background:#eeebff;color:#6355e8;font-size:18px;font-weight:750}.customer-dialog-identity{min-width:0}.customer-dialog-identity h2{overflow:hidden;margin:0;color:#28344a;font-size:20px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.customer-dialog-identity p{display:flex;align-items:center;gap:10px;margin:7px 0 0;color:#7c8799;font-size:12px}.customer-dialog-identity p i{width:3px;height:3px;border-radius:50%;background:#b5bdca}.customer-dialog-close{display:grid;place-items:center;width:32px;height:32px;margin-left:auto;border:0;border-radius:8px;background:transparent;color:#8894a6;font-size:23px;line-height:1;cursor:pointer}.customer-dialog-close:hover{background:#f1efff;color:#5e50d3}.customer-dialog-tabs{display:flex;gap:28px;padding:0 26px;border-bottom:1px solid #e8ecf2}.customer-dialog-tabs button{position:relative;height:48px;padding:0;border:0;background:transparent;color:#7d8798;font:inherit;font-size:13px;font-weight:650;cursor:pointer}.customer-dialog-tabs button[aria-selected="true"]{color:#5e50d3}.customer-dialog-tabs button[aria-selected="true"]:after{position:absolute;right:0;bottom:-1px;left:0;height:2px;border-radius:2px;background:#6355e8;content:""}.customer-dialog-body{min-height:260px;overflow:auto;padding:22px 26px;scrollbar-color:#aeb6c3 transparent;scrollbar-width:thin}.customer-dialog-body::-webkit-scrollbar{width:8px}.customer-dialog-body::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background:#aeb6c3;background-clip:padding-box}.customer-dialog-tab-panel{min-height:100%}.customer-dialog-loading,.customer-dialog-empty{display:grid;min-height:230px;place-items:center;color:#8c97a9;font-size:13px;text-align:center}.customer-dialog-info-grid dl{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:0;border:1px solid #e6eaf0;border-radius:10px;overflow:hidden}.customer-dialog-info-grid dl div{display:grid;grid-template-columns:82px 1fr;gap:12px;min-height:48px;padding:14px 16px;border-bottom:1px solid #edf0f4}.customer-dialog-info-grid dl div:nth-child(odd){border-right:1px solid #edf0f4}.customer-dialog-info-grid dl div:nth-last-child(-n+2){border-bottom:0}.customer-dialog-info-grid dt{color:#8b96a8;font-size:12px}.customer-dialog-info-grid dd{min-width:0;margin:0;color:#344056;font-size:13px;font-weight:650;text-align:right;word-break:break-word}.customer-dialog-notes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}.customer-dialog-notes>div{min-width:0}.customer-dialog-notes span{display:block;margin:0 0 7px;color:#7f8ba0;font-size:12px;font-weight:650}.customer-dialog-notes p{min-height:64px;margin:0;padding:12px 13px;border:1px solid #e7ebf1;border-radius:9px;background:#fafbfc;color:#566277;font-size:12px;line-height:1.65;white-space:pre-wrap}.customer-dialog-photos{margin-top:20px;padding-top:18px;border-top:1px solid #edf0f4}.customer-dialog-photos>div:first-child,.customer-dialog-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.customer-dialog-photos h3,.customer-dialog-panel-head h3{margin:0;color:#2d384d;font-size:14px}.customer-dialog-photos>div:first-child span,.customer-dialog-panel-head p{margin:4px 0 0;color:#8b96a8;font-size:11px}.customer-dialog-panel-head>span{display:inline-flex;align-items:center;min-height:26px;padding:0 9px;border:1px solid #e2e6ed;border-radius:999px;background:#fafbfc;color:#68758b;font-size:11px;white-space:nowrap}.customer-dialog-photos>div:last-child{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.customer-dialog-photos img,.customer-dialog-image-empty{display:grid;width:100%;aspect-ratio:1.45;place-items:center;overflow:hidden;border:1px solid #e8ebf1;border-radius:9px;background:#f5f6f9;color:#a0aaba;font-size:11px;object-fit:cover}.customer-service-timeline{position:relative;margin-top:18px;padding-left:18px}.customer-service-timeline:before{position:absolute;top:13px;bottom:13px;left:4px;width:1px;background:#dedbff;content:""}.customer-service-record{position:relative;margin-bottom:10px;border:1px solid #e5e9f0;border-radius:10px;background:#fff}.customer-service-record:before{position:absolute;z-index:1;top:19px;left:-18px;width:8px;height:8px;border:2px solid #a69cf5;border-radius:50%;background:#fff;content:""}.customer-service-record[open]:before{border-color:#6355e8;background:#6355e8}.customer-service-record summary{display:grid;grid-template-columns:150px minmax(0,1fr) 120px 80px auto;align-items:center;gap:12px;min-height:54px;padding:0 15px;cursor:pointer;list-style:none}.customer-service-record summary::-webkit-details-marker{display:none}.customer-service-record summary time,.customer-service-record summary span{color:#8390a3;font-size:11px}.customer-service-record summary strong{overflow:hidden;color:#354158;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.customer-service-record summary b{color:#536077;font-size:12px;font-variant-numeric:tabular-nums}.customer-service-record summary i{justify-self:end;padding:4px 8px;border-radius:999px;background:#eaf8f1;color:#2c9c70;font-size:10px;font-style:normal;white-space:nowrap}.customer-service-materials{display:grid;grid-template-columns:1fr 1fr;gap:0 24px;padding:12px 15px;border-top:1px solid #edf0f4;background:#fbfcfe}.customer-service-materials div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;color:#68758a;font-size:11px}.customer-service-materials b{color:#46536a;font-variant-numeric:tabular-nums}.customer-service-materials p{grid-column:1/-1;margin:2px 0;color:#929bac;font-size:12px}.customer-case-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}.customer-case-card{overflow:hidden;border:1px solid #e3e7ef;border-radius:11px;background:#fff}.customer-case-images{display:grid;grid-template-columns:1fr 20px 1fr;align-items:center;gap:8px;padding:12px;border-bottom:1px solid #edf0f4}.customer-case-images figure{min-width:0;margin:0}.customer-case-images figure :is(img,.customer-dialog-image-empty){aspect-ratio:1.18}.customer-case-images figcaption{margin-top:6px;color:#909bac;font-size:10px;text-align:center}.customer-case-images>i{display:grid;place-items:center;width:20px;height:20px;border:1px solid #e3e7ed;border-radius:50%;color:#7d8799;font-size:16px;font-style:normal}.customer-case-copy{padding:12px 13px}.customer-case-copy strong{display:block;overflow:hidden;color:#344056;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.customer-case-copy span,.customer-case-copy small{display:block;margin-top:6px;color:#8b96a8;font-size:10px}.customer-case-copy small{color:#6558d2}.customer-dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:15px 26px;border-top:1px solid #e9edf3;background:#fff}.customer-dialog-actions button{height:36px;margin:0;padding:0 14px;border:1px solid #dfe4ec;border-radius:8px;background:#fff;color:#5c687c;font:inherit;font-size:12px;font-weight:650;cursor:pointer}.customer-dialog-actions .primary-btn{border-color:#6355e8;background:#6355e8;color:#fff}.customer-dialog-actions .danger-outline-btn{border-color:#efcbd0;background:#fff;color:#c5505d}@keyframes customer-detail-fade{from{opacity:0}to{opacity:1}}@keyframes customer-detail-rise{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
body[data-theme="dark"] .customer-detail-dialog{border-color:#344155;background:#141d2a;box-shadow:0 28px 74px rgba(0,0,0,.5)}body[data-theme="dark"] .customer-dialog-head,body[data-theme="dark"] .customer-dialog-tabs,body[data-theme="dark"] .customer-dialog-actions,body[data-theme="dark"] .customer-dialog-photos,body[data-theme="dark"] .customer-service-materials,body[data-theme="dark"] .customer-case-images{border-color:#2d394d;background:#141d2a}body[data-theme="dark"] .customer-dialog-identity h2,body[data-theme="dark"] .customer-dialog-photos h3,body[data-theme="dark"] .customer-dialog-panel-head h3,body[data-theme="dark"] .customer-service-record summary strong,body[data-theme="dark"] .customer-case-copy strong{color:#edf2ff}body[data-theme="dark"] .customer-dialog-identity p,body[data-theme="dark"] .customer-dialog-photos>div:first-child span,body[data-theme="dark"] .customer-dialog-panel-head p,body[data-theme="dark"] .customer-service-record summary :is(time,span),body[data-theme="dark"] .customer-case-copy span{color:#a5b1c4}body[data-theme="dark"] .customer-dialog-close{color:#b2bdd0}body[data-theme="dark"] .customer-dialog-close:hover{background:#29254b;color:#ddd8ff}body[data-theme="dark"] .customer-dialog-tabs button{color:#aeb9cb}body[data-theme="dark"] .customer-dialog-tabs button[aria-selected="true"]{color:#bdb5ff}body[data-theme="dark"] .customer-dialog-info-grid dl,body[data-theme="dark"] .customer-dialog-info-grid dl div,body[data-theme="dark"] .customer-dialog-notes p,body[data-theme="dark"] .customer-dialog-photos img,body[data-theme="dark"] .customer-dialog-image-empty,body[data-theme="dark"] .customer-service-record,body[data-theme="dark"] .customer-case-card{border-color:#344155;background:#111a27}body[data-theme="dark"] .customer-dialog-info-grid dt,body[data-theme="dark"] .customer-dialog-notes span{color:#a1aec1}body[data-theme="dark"] .customer-dialog-info-grid dd,body[data-theme="dark"] .customer-dialog-notes p,body[data-theme="dark"] .customer-service-materials b{color:#e0e7f3}body[data-theme="dark"] .customer-dialog-panel-head>span{border-color:#3b485d;background:#1a2535;color:#bbc7d8}body[data-theme="dark"] .customer-service-record:before{background:#141d2a}body[data-theme="dark"] .customer-service-materials{background:#182230}body[data-theme="dark"] .customer-service-materials div{color:#b6c2d3}body[data-theme="dark"] .customer-case-images>i{border-color:#3c495d;color:#b9c4d5}body[data-theme="dark"] .customer-dialog-actions button{border-color:#3a475b;background:#1b2636;color:#d5deed}body[data-theme="dark"] .customer-dialog-actions .primary-btn{border-color:#6d60e7;background:#6558db;color:#fff}body[data-theme="dark"] .customer-dialog-actions .danger-outline-btn{border-color:#7a4752;background:#211821;color:#ffb9c0}
@media(max-width:720px){.customer-detail-backdrop{padding:12px}.customer-detail-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:12px}.customer-dialog-head{padding:18px 18px 15px}.customer-dialog-tabs{gap:20px;padding:0 18px;overflow:auto}.customer-dialog-tabs button{height:44px;flex:none}.customer-dialog-body{padding:18px}.customer-dialog-info-grid dl{grid-template-columns:1fr}.customer-dialog-info-grid dl div,.customer-dialog-info-grid dl div:nth-child(odd){border-right:0}.customer-dialog-info-grid dl div:nth-last-child(2){border-bottom:1px solid #edf0f4}.customer-dialog-notes,.customer-case-grid{grid-template-columns:1fr}.customer-service-record summary{grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:10px 13px}.customer-service-record summary time{grid-column:1}.customer-service-record summary i{grid-column:2;grid-row:1/3}.customer-service-record summary span,.customer-service-record summary b{display:none}.customer-service-materials{grid-template-columns:1fr}.customer-dialog-actions{padding:13px 18px}.customer-dialog-actions .danger-outline-btn{display:none}}

/* Formula History night mode deliberately uses one uninterrupted true-black
 * canvas. Borders, text and state colors provide the remaining hierarchy. */
body[data-theme="dark"][data-active-page="history"],
body[data-theme="dark"][data-active-page="history"] :is(.main-content,#page-content,.page,.history-page,.history-workspace,.history-store-org.history-org-panel,.history-filter-panel,.history-main>[data-history-kpis],.history-summary .history-kpi,.history-panel,.history-table-wrap,.history-dispense-table,.history-dispense-table tbody,.history-dispense-table tr,.history-dispense-table td,.history-dispense-table th,.history-pagination){background:#000!important}
body[data-theme="dark"][data-active-page="history"] .history-page :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger,.history-reset,.history-reset-icon,.history-org-actions button){background:#000!important}

/* Formula History: calm light-blue outlines at rest; a lifted blue halo makes
 * every available control and dropdown option clear on hover. */
body[data-theme="dark"][data-active-page="history"] .history-page :is(.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger,.history-reset,.history-reset-icon,.history-filter-actions button,.history-org-actions button,.history-pagination nav button,.history-page-picker-trigger,.history-tabs button){border-color:rgba(151,197,255,.5)!important;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background-color .16s ease,color .16s ease}
body[data-theme="dark"][data-active-page="history"] .history-page :is(.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger,.history-reset,.history-reset-icon,.history-filter-actions button,.history-org-actions button,.history-pagination nav button,.history-page-picker-trigger,.history-tabs button):hover:not(:disabled){transform:translateY(-2px);border-color:#acd6ff!important;background:#081828!important;box-shadow:0 0 0 3px rgba(112,184,255,.24),0 10px 20px rgba(44,134,255,.24)!important}
body[data-theme="dark"][data-active-page="history"] .history-page :is(.history-time-select-menu,.history-filter-select-menu,.history-page-picker-menu) button{border:1px solid transparent;border-radius:8px;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background-color .16s ease,color .16s ease}
body[data-theme="dark"][data-active-page="history"] .history-page :is(.history-time-select-menu,.history-filter-select-menu,.history-page-picker-menu) button:hover{transform:translateY(-2px);border-color:rgba(172,214,255,.86);background:#0a1e33!important;color:#e0efff!important;box-shadow:0 0 0 3px rgba(112,184,255,.22),0 8px 16px rgba(44,134,255,.22)!important}

/* Keep the Formula History keyword field truly black in dark mode.  It still
 * participates in the shared raised light-blue hover/focus feedback. */
body[data-theme="dark"][data-active-page="history"] .history-page .history-keyword-filter>div,
body[data-theme="dark"][data-active-page="history"] .history-page .history-keyword-filter input{background:#000!important}
body[data-theme="dark"][data-active-page="history"] .history-page .history-keyword-filter>div:hover,
body[data-theme="dark"][data-active-page="history"] .history-page .history-keyword-filter>div:focus-within{transform:translateY(-2px);border-color:#acd6ff!important;background:#000!important;box-shadow:0 0 0 3px rgba(112,184,255,.24),0 10px 20px rgba(44,134,255,.24)!important}

/* Formula History keyword search follows the filter-control convention:
 * neutral at rest, then a restrained lavender focus ring on interaction. */
body[data-theme="light"][data-active-page="history"] .history-page .history-keyword-filter>div{border-color:#d9dee7!important;background:#fff!important;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background-color .16s ease}
body[data-theme="light"][data-active-page="history"] .history-page .history-keyword-filter>div:hover,
body[data-theme="light"][data-active-page="history"] .history-page .history-keyword-filter>div:focus-within{transform:translateY(-2px);border-color:#a595ff!important;background:#fff!important;box-shadow:0 0 0 3px rgba(129,117,255,.14),0 9px 18px rgba(67,52,151,.12)!important}

/* Formula History tabs: the floating card itself travels between the two
 * labels.  The labels remain transparent hit targets above the moving card. */
body[data-active-page="history"] .history-page .history-tab-indicator{display:block!important;z-index:0!important;pointer-events:none!important;border-radius:10px!important;transition:transform .28s cubic-bezier(.22,1,.36,1),width .28s cubic-bezier(.22,1,.36,1),height .28s cubic-bezier(.22,1,.36,1),opacity .14s ease,background-color .18s ease,box-shadow .18s ease,border-color .18s ease!important}
body[data-theme="light"][data-active-page="history"] .history-page .history-tab-indicator{border:1px solid #b5a9ff!important;background:#fff!important;box-shadow:0 0 0 3px rgba(129,117,255,.10),0 9px 18px rgba(67,52,151,.14)!important}
body[data-theme="dark"][data-active-page="history"] .history-page .history-tab-indicator{border:1px solid #7769df!important;background:#2a2552!important;box-shadow:0 0 0 3px rgba(130,117,255,.16),0 10px 20px rgba(0,0,0,.38)!important}
body[data-active-page="history"] .history-page .history-tabs button[data-history-mode="records"],
body[data-active-page="history"] .history-page .history-tabs button[data-history-mode="operator"],
body[data-active-page="history"] .history-page .history-tabs button[data-history-mode="records"].active,
body[data-active-page="history"] .history-page .history-tabs button[data-history-mode="operator"].active{transform:none!important;animation:none!important;box-shadow:none!important}
body[data-theme="light"][data-active-page="history"] .history-page .history-tabs button[data-history-mode="records"].active,
body[data-theme="light"][data-active-page="history"] .history-page .history-tabs button[data-history-mode="operator"].active{border-color:transparent!important;background:transparent!important;color:#5547c8!important}
body[data-theme="dark"][data-active-page="history"] .history-page .history-tabs button[data-history-mode="records"].active,
body[data-theme="dark"][data-active-page="history"] .history-page .history-tabs button[data-history-mode="operator"].active{border-color:transparent!important;background:transparent!important;color:#eeeaff!important}

/* Use the same lavender lift language for all Formula History filter
 * controls as the keyword search field. */
body[data-theme="light"][data-active-page="history"] .history-page :is(.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger){border-color:#d9dee7!important;background:#fff!important;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background-color .16s ease!important}
body[data-theme="light"][data-active-page="history"] .history-page :is(.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger):is(:hover,:focus-visible){transform:translateY(-2px);border-color:#a595ff!important;background:#fff!important;box-shadow:0 0 0 3px rgba(129,117,255,.14),0 9px 18px rgba(67,52,151,.12)!important}
body[data-theme="dark"][data-active-page="history"] .history-page :is(.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger){border-color:rgba(174,157,255,.48)!important;background:#000!important;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background-color .16s ease!important}
body[data-theme="dark"][data-active-page="history"] .history-page :is(.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger):is(:hover,:focus-visible){transform:translateY(-2px);border-color:#aa9cff!important;background:#0a0717!important;box-shadow:0 0 0 3px rgba(137,120,255,.22),0 10px 20px rgba(71,52,174,.25)!important}

body[data-theme="light"][data-active-page="history"] .history-page .history-filter-actions :is(.history-reset-icon,[data-history-export]){border-color:#d9dee7!important;background:#fff!important;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background-color .16s ease!important}
body[data-theme="light"][data-active-page="history"] .history-page .history-filter-actions :is(.history-reset-icon,[data-history-export]):is(:hover,:focus-visible):not(:disabled){transform:translateY(-2px);border-color:#a595ff!important;background:#fff!important;box-shadow:0 0 0 3px rgba(129,117,255,.14),0 9px 18px rgba(67,52,151,.12)!important}
body[data-theme="dark"][data-active-page="history"] .history-page .history-filter-actions :is(.history-reset-icon,[data-history-export]){border-color:rgba(174,157,255,.48)!important;background:#000!important;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background-color .16s ease!important}
body[data-theme="dark"][data-active-page="history"] .history-page .history-filter-actions :is(.history-reset-icon,[data-history-export]):is(:hover,:focus-visible):not(:disabled){transform:translateY(-2px);border-color:#aa9cff!important;background:#0a0717!important;box-shadow:0 0 0 3px rgba(137,120,255,.22),0 10px 20px rgba(71,52,174,.25)!important}

/* Keep KPI values in a true loading state until their independent aggregate
 * request has settled. This prevents a transient “not recorded” placeholder
 * while the list response arrives ahead of the KPI response. */
body[data-active-page="history"] .history-page .history-kpi-loading{display:inline-flex;align-items:center;gap:9px;min-height:42px;margin-top:8px;color:#71809a;font-size:14px;font-weight:650;line-height:1;white-space:nowrap}
body[data-active-page="history"] .history-page .history-kpi-loading>i{display:inline-block;width:17px;height:17px;border:2px solid rgba(117,101,232,.2);border-top-color:#7463e5;border-radius:50%;animation:history-kpi-spin .75s linear infinite}
body[data-active-page="history"] .history-page .history-kpi-metric-loading{justify-content:center;padding-left:0;transform:translateY(-3px)}
body[data-active-page="history"] .history-page .history-kpi-action:disabled{cursor:wait;opacity:1}
body[data-theme="dark"][data-active-page="history"] .history-page .history-kpi-loading{color:#aeb8cb}
body[data-theme="dark"][data-active-page="history"] .history-page .history-kpi-loading>i{border-color:rgba(170,156,255,.18);border-top-color:#aa9cff}
@keyframes history-kpi-spin{to{transform:rotate(360deg)}}

/* Operator dispense statistics uses a compact, paged directory so long
 * operator lists stay scannable without changing the completed-task scope. */
body[data-active-page="history"] .history-operator-list-view{display:grid;gap:12px}
body[data-active-page="history"] .history-operator-list{display:grid;gap:10px}
body[data-active-page="history"] .history-operator-list-row{overflow:hidden;border:1px solid #e4e9f1;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(28,40,65,.035);transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
body[data-active-page="history"] .history-operator-list-row:hover{transform:translateY(-1px);border-color:#c6bcff;box-shadow:0 7px 18px rgba(80,66,171,.10)}
body[data-active-page="history"] .history-operator-list-row.is-expanded{border-color:#ada0ff;box-shadow:0 0 0 3px rgba(125,107,238,.09),0 8px 22px rgba(80,66,171,.11)}
body[data-active-page="history"] .history-operator-list-trigger{display:grid;grid-template-columns:42px minmax(260px,1.65fr) repeat(3,minmax(104px,.7fr)) minmax(116px,.7fr);align-items:center;gap:16px;width:100%;min-height:82px;padding:14px 18px;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer;font:inherit}
body[data-active-page="history"] .history-operator-avatar{display:grid;place-items:center;width:38px;height:38px;border:1px solid #ddd7ff;border-radius:50%;background:linear-gradient(145deg,#f4f1ff,#ece8ff);color:#705ce4;font-size:16px;font-weight:750}
body[data-active-page="history"] .history-operator-identity{display:grid;min-width:0;gap:5px}
body[data-active-page="history"] .history-operator-identity strong{overflow:hidden;color:#26334b;font-size:14px;font-weight:720;text-overflow:ellipsis;white-space:nowrap}
body[data-active-page="history"] .history-operator-identity small{overflow:hidden;color:#8b97aa;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
body[data-active-page="history"] .history-operator-list-metric{display:grid;gap:5px;min-width:0}
body[data-active-page="history"] .history-operator-list-metric small{color:#8793a6;font-size:11px;white-space:nowrap}
body[data-active-page="history"] .history-operator-list-metric b{color:#34415a;font-size:14px;font-variant-numeric:tabular-nums;font-weight:720}
body[data-active-page="history"] .history-operator-detail-link{justify-self:end;display:inline-flex;align-items:center;gap:7px;color:#6756df;font-size:13px;font-weight:700;white-space:nowrap}
body[data-active-page="history"] .history-operator-detail-link i{font-size:22px;font-style:normal;line-height:.8;transition:transform .16s ease}
body[data-active-page="history"] .history-operator-list-row.is-expanded .history-operator-detail-link i{transform:rotate(90deg)}
body[data-active-page="history"] .history-operator-list-detail{padding:0 16px 16px;border-top:1px solid #edf0f5;background:#fbfcff}
body[data-active-page="history"] .history-operator-list-detail>.history-dye-card{margin:14px 0 0}
body[data-active-page="history"] .history-operator-pagination{margin-top:2px}
body[data-theme="dark"][data-active-page="history"] .history-operator-list-row{border-color:#202d40;background:#000;box-shadow:none}
body[data-theme="dark"][data-active-page="history"] .history-operator-list-row:hover{border-color:#9d8fff;box-shadow:0 0 0 3px rgba(139,122,255,.12),0 9px 18px rgba(0,0,0,.5)}
body[data-theme="dark"][data-active-page="history"] .history-operator-list-row.is-expanded{border-color:#b2a7ff;box-shadow:0 0 0 3px rgba(144,127,255,.16),0 10px 22px rgba(0,0,0,.58)}
body[data-theme="dark"][data-active-page="history"] .history-operator-avatar{border-color:#514985;background:#211d3f;color:#c4bcff}
body[data-theme="dark"][data-active-page="history"] .history-operator-identity strong{color:#e5ebf5}
body[data-theme="dark"][data-active-page="history"] .history-operator-identity small,body[data-theme="dark"][data-active-page="history"] .history-operator-list-metric small{color:#8694a9}
body[data-theme="dark"][data-active-page="history"] .history-operator-list-metric b{color:#cbd5e4}
body[data-theme="dark"][data-active-page="history"] .history-operator-list-detail{border-color:#1e2b3d;background:#000}
@media(max-width:1050px){body[data-active-page="history"] .history-operator-list-trigger{grid-template-columns:42px minmax(220px,1.4fr) repeat(3,minmax(88px,.65fr)) auto;gap:11px;padding:13px}body[data-active-page="history"] .history-operator-detail-link{font-size:12px}}
@media(max-width:760px){body[data-active-page="history"] .history-operator-list-trigger{grid-template-columns:38px minmax(0,1fr) auto;gap:10px;min-height:70px}body[data-active-page="history"] .history-operator-avatar{width:34px;height:34px}body[data-active-page="history"] .history-operator-list-metric{display:none}body[data-active-page="history"] .history-operator-detail-link{font-size:0}body[data-active-page="history"] .history-operator-detail-link i{font-size:22px}}

/* Operator statistics compact rows: remove the card-box treatment while
 * keeping the same detail interaction and column rhythm. */
body[data-active-page="history"] .history-operator-list-view{gap:0}
body[data-active-page="history"] .history-operator-list{gap:0;border-top:1px solid #edf0f5}
body[data-active-page="history"] .history-operator-list-row,
body[data-active-page="history"] .history-operator-list-row:hover,
body[data-active-page="history"] .history-operator-list-row.is-expanded{
  overflow:visible;
  border:0;
  border-bottom:1px solid #edf0f5;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  transform:none;
}
body[data-active-page="history"] .history-operator-list-row:hover{background:#faf9ff}
body[data-active-page="history"] .history-operator-list-row.is-expanded{background:#fdfcff}
body[data-active-page="history"] .history-operator-list-trigger{
  grid-template-columns:30px minmax(220px,1.8fr) repeat(3,minmax(86px,.72fr)) minmax(110px,.72fr);
  gap:18px;
  min-height:58px;
  padding:8px 4px;
}
body[data-active-page="history"] .history-operator-avatar{width:28px;height:28px;font-size:13px}
body[data-active-page="history"] .history-operator-identity{gap:2px}
body[data-active-page="history"] .history-operator-identity strong{font-size:13px;font-weight:700}
body[data-active-page="history"] .history-operator-identity small{font-size:10px}
body[data-active-page="history"] .history-operator-list-metric{gap:2px}
body[data-active-page="history"] .history-operator-list-metric small{font-size:10px}
body[data-active-page="history"] .history-operator-list-metric b{font-size:13px;font-weight:700}
body[data-active-page="history"] .history-operator-detail-link{gap:4px;font-size:12px;font-weight:700}
body[data-active-page="history"] .history-operator-detail-link i{font-size:18px}
body[data-active-page="history"] .history-operator-list-detail{padding:0 4px 10px;border-top:0;background:transparent}
body[data-active-page="history"] .history-operator-list-detail>.history-dye-card{margin:10px 0 0}
body[data-theme="dark"][data-active-page="history"] .history-operator-list{border-color:#213047}
body[data-theme="dark"][data-active-page="history"] .history-operator-list-row,
body[data-theme="dark"][data-active-page="history"] .history-operator-list-row:hover,
body[data-theme="dark"][data-active-page="history"] .history-operator-list-row.is-expanded{
  border-color:#213047;
  background:transparent;
  box-shadow:none;
}
body[data-theme="dark"][data-active-page="history"] .history-operator-list-row:hover{background:#151327}
body[data-theme="dark"][data-active-page="history"] .history-operator-list-row.is-expanded{background:#11101f}
body[data-theme="dark"][data-active-page="history"] .history-operator-list-detail{background:transparent}
@media(max-width:1050px){
  body[data-active-page="history"] .history-operator-list-trigger{grid-template-columns:30px minmax(180px,1.55fr) repeat(3,minmax(74px,.65fr)) auto;gap:12px;padding:8px 3px}
  body[data-active-page="history"] .history-operator-detail-link{font-size:11px}
}
@media(max-width:760px){
  body[data-active-page="history"] .history-operator-list-trigger{grid-template-columns:30px minmax(0,1fr) auto;gap:9px;min-height:54px;padding:7px 2px}
  body[data-active-page="history"] .history-operator-avatar{width:27px;height:27px}
  body[data-active-page="history"] .history-operator-detail-link{font-size:0}
  body[data-active-page="history"] .history-operator-detail-link i{font-size:19px}
}

/* Operator statistics: use a focused modal for dense per-operator material
 * information, keeping the paged list concise and stable. */
body[data-active-page="history"] .history-operator-detail-backdrop{position:fixed;inset:0;z-index:10020;display:grid;place-items:center;padding:24px;background:rgba(35,42,58,.38);backdrop-filter:blur(5px);animation:history-operator-detail-fade .16s ease}
body[data-active-page="history"] .history-operator-detail-modal{width:min(1080px,calc(100vw - 48px));max-height:calc(100dvh - 48px);overflow:auto;border:1px solid #e2e7f0;border-radius:20px;background:#fff;box-shadow:0 24px 64px rgba(27,36,58,.26);animation:history-operator-detail-rise .2s cubic-bezier(.22,1,.36,1)}
body[data-active-page="history"] .history-operator-detail-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 28px 20px;border-bottom:1px solid #edf0f5}
body[data-active-page="history"] .history-operator-detail-head>div{display:flex;align-items:center;min-width:0;gap:13px}
body[data-active-page="history"] .history-operator-detail-avatar{display:grid;place-items:center;flex:0 0 auto;width:44px;height:44px;border:1px solid #d9d1ff;border-radius:50%;background:linear-gradient(145deg,#f3f0ff,#e9e4ff);color:#654edc;font-size:20px;font-weight:780}
body[data-active-page="history"] .history-operator-detail-head h3{margin:0;color:#26334b;font-size:20px;line-height:1.25}
body[data-active-page="history"] .history-operator-detail-head p{margin:5px 0 0;color:#8a96a9;font-size:13px}
body[data-active-page="history"] .history-operator-detail-close{display:grid;place-items:center;flex:0 0 auto;width:38px;height:38px;border:1px solid #dbe2ed;border-radius:10px;background:#fff;color:#718098;font:inherit;font-size:28px;font-weight:300;line-height:1;cursor:pointer;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,color .16s ease}
body[data-active-page="history"] .history-operator-detail-close:hover{transform:translateY(-2px);border-color:#a99cff;color:#5d4ed0;box-shadow:0 0 0 3px rgba(129,117,255,.12),0 8px 16px rgba(67,52,151,.10)}
body[data-active-page="history"] .history-operator-detail-meta{display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,.72fr);margin:22px 28px 0;border:1px solid #e2e7f0;border-radius:13px;overflow:hidden}
body[data-active-page="history"] .history-operator-detail-meta article{display:grid;gap:8px;min-height:82px;padding:15px 18px;border-right:1px solid #e2e7f0;background:#fbfcff}
body[data-active-page="history"] .history-operator-detail-meta article:last-child{border-right:0}
body[data-active-page="history"] .history-operator-detail-meta span{display:flex;align-items:center;gap:7px;color:#8793a6;font-size:12px;font-weight:650}
body[data-active-page="history"] .history-operator-detail-meta strong{color:#30405a;font-size:18px;font-variant-numeric:tabular-nums}
body[data-active-page="history"] .history-operator-detail-meta .history-operator-detail-devices strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;line-height:1.45}
body[data-active-page="history"] .history-operator-detail-meta .history-detail-icon{width:16px;height:16px;color:#7565e7}
body[data-active-page="history"] .history-operator-usage-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,.8fr);gap:20px;padding:22px 28px}
body[data-active-page="history"] .history-operator-detail-loading{display:flex;align-items:center;justify-content:center;gap:10px;min-height:330px;padding:22px 28px;color:#8290a5;font-size:14px}
body[data-active-page="history"] .history-operator-detail-loading i{width:20px;height:20px;border:2px solid rgba(113,95,229,.18);border-top-color:#715fe5;border-radius:50%;animation:history-operator-detail-spin .78s linear infinite}
body[data-active-page="history"] .history-operator-detail-progress{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:14px 28px -8px;color:#8290a5;font-size:12px}
body[data-active-page="history"] .history-operator-detail-progress i{width:14px;height:14px;border:2px solid rgba(113,95,229,.18);border-top-color:#715fe5;border-radius:50%;animation:history-operator-detail-spin .78s linear infinite}
body[data-active-page="history"] .history-operator-detail-error,body[data-active-page="history"] .history-operator-detail-partial{display:flex;align-items:center;justify-content:center;gap:12px;min-height:180px;padding:22px 28px;color:#8a5964;font-size:14px;text-align:center}
body[data-active-page="history"] .history-operator-detail-partial{min-height:0;padding-top:0;color:#8a6a43}
body[data-active-page="history"] .history-operator-detail-retry{min-height:32px;padding:0 13px;border:1px solid #c9c0ff;border-radius:8px;background:#fff;color:#6756df;font:inherit;font-size:13px;font-weight:700;cursor:pointer;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
body[data-active-page="history"] .history-operator-detail-retry:hover{transform:translateY(-1px);border-color:#9788fa;box-shadow:0 0 0 3px rgba(129,117,255,.12)}
body[data-active-page="history"] .history-operator-usage-section{min-width:0;border:1px solid #e2e7f0;border-radius:14px;background:#fff;overflow:hidden}
body[data-active-page="history"] .history-operator-usage-section>header{display:flex;align-items:center;gap:8px;padding:15px 17px;border-bottom:1px solid #edf0f5}
body[data-active-page="history"] .history-operator-usage-section>header h4{margin:0;color:#34415a;font-size:15px}
body[data-active-page="history"] .history-operator-usage-section>header .history-detail-icon{width:18px;height:18px}
body[data-active-page="history"] .history-operator-usage-section.dye>header .history-detail-icon{color:#775ee5}
body[data-active-page="history"] .history-operator-usage-section.developer>header .history-detail-icon{color:#289d9c}
body[data-active-page="history"] .history-operator-usage-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:14px}
body[data-active-page="history"] .history-operator-usage-slot{display:grid;gap:4px;min-height:91px;padding:12px;border:1px solid #e4e9f1;border-radius:10px;background:#fff}
body[data-active-page="history"] .history-operator-usage-slot span{color:#94a0b3;font-size:11px}
body[data-active-page="history"] .history-operator-usage-slot strong{color:#36445d;font-size:15px}
body[data-active-page="history"] .history-operator-usage-slot b{color:#27364f;font-size:17px;font-variant-numeric:tabular-nums}
body[data-active-page="history"] .history-operator-developer-list{display:grid;gap:10px;padding:14px}
body[data-active-page="history"] .history-operator-developer-row{display:flex;align-items:center;justify-content:space-between;min-height:49px;gap:12px;padding:0 13px;border:1px solid #dcebea;border-radius:10px;background:#f7fdfc;color:#367b7b}
body[data-active-page="history"] .history-operator-developer-row b{color:#247d7c;font-size:18px;font-variant-numeric:tabular-nums}
body[data-active-page="history"] .history-operator-usage-section>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 14px 14px;padding:13px 14px;border-radius:10px;background:#f3f0ff;color:#6b5bdd;font-size:13px;font-weight:720}
body[data-active-page="history"] .history-operator-usage-section.developer>footer{background:#eaf8f7;color:#258c8c}
body[data-active-page="history"] .history-operator-usage-section>footer strong{font-size:21px;font-variant-numeric:tabular-nums}
body[data-active-page="history"] .history-operator-usage-empty{margin:14px;color:#8b97aa;font-size:13px}
body[data-active-page="history"] .history-operator-detail-note{padding:15px 28px 18px;border-top:1px solid #edf0f5;color:#8793a6;font-size:12px}
@keyframes history-operator-detail-fade{from{opacity:0}to{opacity:1}}
@keyframes history-operator-detail-rise{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes history-operator-detail-spin{to{transform:rotate(360deg)}}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-backdrop{background:rgba(0,0,0,.74)}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-modal{border-color:#253247;background:#000;box-shadow:0 28px 78px rgba(0,0,0,.7)}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-head,body[data-theme="dark"][data-active-page="history"] .history-operator-detail-meta,body[data-theme="dark"][data-active-page="history"] .history-operator-usage-section,body[data-theme="dark"][data-active-page="history"] .history-operator-usage-section>header,body[data-theme="dark"][data-active-page="history"] .history-operator-detail-note{border-color:#213047}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-head h3,body[data-theme="dark"][data-active-page="history"] .history-operator-detail-meta strong,body[data-theme="dark"][data-active-page="history"] .history-operator-usage-section>header h4,body[data-theme="dark"][data-active-page="history"] .history-operator-usage-slot strong,body[data-theme="dark"][data-active-page="history"] .history-operator-usage-slot b{color:#e2e9f5}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-head p,body[data-theme="dark"][data-active-page="history"] .history-operator-detail-meta span,body[data-theme="dark"][data-active-page="history"] .history-operator-usage-slot span,body[data-theme="dark"][data-active-page="history"] .history-operator-detail-note{color:#8d9bb0}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-loading{color:#a5b2c5}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-progress{color:#a5b2c5}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-error{color:#eeafbb}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-partial{color:#e6bd8a}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-retry{border-color:#6156aa;background:#000;color:#c9c0ff}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-avatar{border-color:#564b94;background:#221e42;color:#cdc4ff}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-close{border-color:#35445a;background:#000;color:#b9c5d7}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-meta article,body[data-theme="dark"][data-active-page="history"] .history-operator-usage-section,body[data-theme="dark"][data-active-page="history"] .history-operator-usage-slot{background:#000}
body[data-theme="dark"][data-active-page="history"] .history-operator-detail-meta article,body[data-theme="dark"][data-active-page="history"] .history-operator-usage-slot{border-color:#253247}
body[data-theme="dark"][data-active-page="history"] .history-operator-developer-row{border-color:#245052;background:#071d20;color:#76c9c6}
body[data-theme="dark"][data-active-page="history"] .history-operator-developer-row b{color:#87ddda}
body[data-theme="dark"][data-active-page="history"] .history-operator-usage-section>footer{background:#211d43;color:#c8bfff}
body[data-theme="dark"][data-active-page="history"] .history-operator-usage-section.developer>footer{background:#072326;color:#82d9d5}
@media(max-width:760px){body[data-active-page="history"] .history-operator-detail-backdrop{padding:12px}body[data-active-page="history"] .history-operator-detail-modal{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:15px}body[data-active-page="history"] .history-operator-detail-head{padding:18px}body[data-active-page="history"] .history-operator-detail-meta{grid-template-columns:1fr;margin:16px 18px 0}body[data-active-page="history"] .history-operator-detail-meta article{min-height:65px;border-right:0;border-bottom:1px solid #e2e7f0}body[data-active-page="history"] .history-operator-detail-meta article:last-child{border-bottom:0}body[data-active-page="history"] .history-operator-usage-grid{grid-template-columns:1fr;padding:16px 18px}body[data-active-page="history"] .history-operator-usage-slots{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-active-page="history"] .history-operator-detail-note{padding:13px 18px 16px}}

/* Detail-window close controls share the Formula History interaction pattern. */
body[data-theme="light"] :is(.customer-dialog-close,.store-close-detail,.store-inspector-close,.history-operator-detail-close) {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d8d2ff;
  border-radius: 8px;
  background: #fff;
  color: #647188;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

body[data-theme="light"] :is(.customer-dialog-close,.store-close-detail,.store-inspector-close,.history-operator-detail-close):hover {
  transform: translateY(-1px);
  border-color: #bcb3ff;
  background: #f5f3ff;
  color: #5e52cf;
}

body[data-theme="dark"] :is(.customer-dialog-close,.store-close-detail,.store-inspector-close,.history-operator-detail-close) {
  border-color: #6156aa;
  background: #17142c;
  color: #c9c0ff;
}

body[data-theme="dark"] :is(.customer-dialog-close,.store-close-detail,.store-inspector-close,.history-operator-detail-close):hover {
  transform: translateY(-1px);
  border-color: #a99cff;
  background: #29254b;
  color: #eeeaff;
}

/* Store management is a continuous page, not a card placed on a grey canvas. */
body[data-active-page="organization"] .main-content,
body[data-active-page="organization"] #page-content,
body[data-active-page="organization"] .organization-tree-page{background:#fff}

body[data-active-page="organization"] .store-workbench-page{max-width:none;min-height:calc(100vh - 102px);padding:0}
body[data-active-page="organization"] .store-workbench{min-height:calc(100vh - 102px);border:0;border-radius:0;background:#fff;box-shadow:none}
body[data-active-page="organization"] .store-workbench-tree{padding:24px 22px;border-right:0;background:#fff}
body[data-active-page="organization"] .store-workbench-list{padding:24px 28px;background:#fff}
body[data-active-page="organization"] .store-workbench-inspector{padding:24px;border-left:0;background:#fff}

body[data-theme="dark"][data-active-page="organization"] .main-content,
body[data-theme="dark"][data-active-page="organization"] #page-content,
body[data-theme="dark"][data-active-page="organization"] .organization-tree-page,
body[data-theme="dark"][data-active-page="organization"] .store-workbench,
body[data-theme="dark"][data-active-page="organization"] .store-workbench-tree,
body[data-theme="dark"][data-active-page="organization"] .store-workbench-list,
body[data-theme="dark"][data-active-page="organization"] .store-workbench-inspector{background:#0f1621}

@media(max-width:780px){
  body[data-active-page="organization"] .store-workbench-page{padding:0}
  body[data-active-page="organization"] .store-workbench-tree,
  body[data-active-page="organization"] .store-workbench-inspector{padding:20px}
  body[data-active-page="organization"] .store-workbench-list{padding:20px}
}

/* Formula-history inspired store operations overview. */
body[data-active-page="organization"] .store-operations{display:grid;grid-template-columns:300px minmax(0,1fr);overflow:visible}
body[data-active-page="organization"] .store-operations .store-workbench-tree{min-height:calc(100vh - 102px);padding:24px 22px;border-right:1px solid #e8edf3}
body[data-active-page="organization"] .store-operations-main{min-width:0;padding:24px 28px 34px;background:#fff}
.store-ops-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:19px}.store-ops-head h2{margin:0;color:#1f2b42;font-size:24px;line-height:1.25}.store-ops-head p{margin:7px 0 0;color:#8d99aa;font-size:13px}.store-ops-filters{display:flex;align-items:center;gap:10px;margin-bottom:17px}.store-ops-search{display:flex;align-items:center;gap:8px;min-width:260px;height:42px;padding:0 12px;border:1px solid #dfe5ee;border-radius:9px;background:#fff;color:#91a0b3}.store-ops-search .store-ui-icon{width:18px;height:18px}.store-ops-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:#334158;font:inherit;font-size:13px}.store-select{display:flex;align-items:center;gap:5px;height:42px;padding:0 9px 0 12px;border:1px solid #dfe5ee;border-radius:9px;background:#fff;color:#6e7b91;font-size:12px;white-space:nowrap}.store-select select{min-width:88px;border:0;outline:0;background:transparent;color:#4a576d;font:inherit;font-size:12px}.store-filter-button,.store-reset-button,.store-column-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:42px;padding:0 12px;border:1px solid #dfe5ee;border-radius:9px;background:#fff;color:#59677d;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}.store-filter-button .store-ui-icon,.store-reset-button .store-ui-icon,.store-column-button .store-ui-icon{width:16px;height:16px}.store-filter-button:hover,.store-reset-button:hover,.store-column-button:hover{border-color:#bdb4fa;color:#6556e9}.store-overview-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.store-overview-metric{display:flex;align-items:center;gap:12px;min-height:88px;padding:16px;border:1px solid #e7ebf2;border-radius:11px;background:#fff}.store-overview-metric>span{display:grid;place-items:center;flex:0 0 auto;width:39px;height:39px;border-radius:10px;background:#f0eeff;color:#6656e9}.store-overview-metric>span .store-ui-icon{width:21px;height:21px}.store-overview-metric small,.store-overview-metric strong{display:block}.store-overview-metric small{color:#8d99aa;font-size:12px}.store-overview-metric strong{margin-top:6px;color:#27354c;font-size:22px;line-height:1;font-variant-numeric:tabular-nums}.store-overview-metric.risk{border-color:#ffe0d2;background:#fffcfa}.store-overview-metric.risk>span{background:#fff1e9;color:#e17a35}.store-overview-metric.risk strong{color:#dc712d}.store-type-tabs{display:flex;align-items:flex-end;gap:8px;margin:0 -2px 13px;border-bottom:1px solid #e7ebf1}.store-type-tabs button{position:relative;display:inline-flex;align-items:center;gap:7px;min-height:39px;padding:0 11px;border:0;background:transparent;color:#728096;font:inherit;font-size:13px;cursor:pointer}.store-type-tabs button b{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:#f0f2f6;color:#7c8899;font-size:10px;font-weight:700}.store-type-tabs button.active{color:#6455dc;font-weight:750}.store-type-tabs button.active:after{position:absolute;right:5px;bottom:-1px;left:5px;height:2px;border-radius:2px;background:#6656e9;content:""}.store-type-tabs button.active b{background:#efedff;color:#6656e9}.store-table-section{border:1px solid #e6eaf1;border-radius:12px;background:#fff;overflow:hidden}.store-table-section>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px;border-bottom:1px solid #e8ecf2}.store-table-section>header>div{display:flex;align-items:baseline;gap:10px}.store-table-section h3{margin:0;color:#2b3850;font-size:15px}.store-table-section header span{color:#92a0b2;font-size:12px}.store-column-button{height:31px;padding:0 9px;font-size:11px}.store-table-wrap{overflow:auto}.store-operations-table{width:100%;min-width:850px;border-collapse:collapse;color:#58667c;font-size:12px;text-align:left}.store-operations-table th{height:43px;padding:0 13px;border-bottom:1px solid #e8ecf2;background:#fbfcfe;color:#7c8a9d;font-size:11px;font-weight:700;white-space:nowrap}.store-operations-table td{height:67px;padding:0 13px;border-bottom:1px solid #edf0f4;vertical-align:middle;white-space:nowrap}.store-operations-table tr:last-child td{border-bottom:0}.store-operations-table tbody tr{transition:background .16s ease}.store-operations-table tbody tr:hover,.store-operations-table tbody tr.selected{background:#faf9ff}.store-table-identity{display:flex;align-items:center;gap:9px;min-width:170px;padding:0;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}.store-table-identity .store-node-icon{width:31px;height:31px;border-radius:9px}.store-table-identity strong,.store-table-identity small{display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.store-table-identity strong{color:#34415a;font-size:13px}.store-table-identity small{margin-top:3px;color:#98a4b5;font-size:10px}.store-type-badge{display:inline-flex;align-items:center;min-height:23px;padding:0 8px;border-radius:12px;background:#f2f4f7;color:#788699;font-size:10px}.store-type-badge.store{background:#eaf8f2;color:#278d6c}.store-type-badge.chain{background:#edf4ff;color:#4f7fca}.store-type-badge.agent{background:#f3efff;color:#805dc7}.store-type-badge.headquarters{background:#edf3ff;color:#487cc6}.store-attention-count{color:#2aa179;font-weight:700;font-variant-numeric:tabular-nums}.store-attention-count.risk{color:#df752f}.store-row-open{display:grid;place-items:center;width:27px;height:27px;margin-left:auto;border:0;border-radius:7px;background:transparent;color:#9ca8b7;cursor:pointer}.store-row-open:hover{background:#eeeaff;color:#6656e9}.store-row-open .store-ui-icon{width:17px;height:17px}.store-drawer-backdrop{position:fixed;inset:0;z-index:10000;display:flex;justify-content:flex-end;background:rgba(28,37,55,.16);animation:store-drawer-fade .18s ease}.store-ops-drawer{width:min(402px,calc(100vw - 26px));min-height:100%;padding:24px;background:#fff;box-shadow:-18px 0 45px rgba(30,42,62,.16);animation:store-drawer-in .22s cubic-bezier(.22,1,.36,1)}.store-ops-drawer>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.store-ops-drawer>header>div{display:flex;align-items:center;min-width:0;gap:12px}.store-ops-drawer h2{margin:3px 0;color:#26344b;font-size:21px}.store-ops-drawer header small,.store-ops-drawer header p{display:block;color:#8e9aac;font-size:11px}.store-ops-drawer header p{overflow:hidden;max-width:260px;margin:5px 0 0;text-overflow:ellipsis;white-space:nowrap}.store-ops-drawer>header>button{display:grid;place-items:center;flex:0 0 auto;width:33px;height:33px;border:0;border-radius:8px;background:transparent;color:#728096;cursor:pointer}.store-ops-drawer>header>button:hover{background:#f0eeff;color:#6556e9}.store-ops-drawer>header>button .store-ui-icon{width:19px;height:19px}.store-ops-drawer>nav{display:flex;gap:22px;margin:22px 0 18px;border-bottom:1px solid #e5e9f0}.store-ops-drawer>nav button{position:relative;padding:0 0 11px;border:0;background:transparent;color:#8692a5;font:inherit;font-size:12px;cursor:pointer}.store-ops-drawer>nav button.active{color:#6254d9;font-weight:750}.store-ops-drawer>nav button.active:after{position:absolute;right:0;bottom:-1px;left:0;height:2px;background:#6656e9;content:""}.store-drawer-metrics{display:grid;grid-template-columns:1fr 1fr;gap:11px}.store-ops-drawer .store-overview-metric{min-height:91px;padding:14px}.store-ops-drawer .store-overview-metric>span{width:32px;height:32px}.store-ops-drawer .store-overview-metric>span .store-ui-icon{width:17px;height:17px}.store-ops-drawer .store-overview-metric strong{font-size:19px}.store-drawer-records{display:flex;align-items:center;gap:11px;margin-top:12px;padding:15px;border:1px solid #e6eaf1;border-radius:10px;background:#fafbfe;color:#6556e9}.store-drawer-records>.store-ui-icon{width:23px;height:23px}.store-drawer-records small,.store-drawer-records strong{display:block}.store-drawer-records small{color:#8996a9;font-size:11px}.store-drawer-records strong{margin-top:5px;color:#314057;font-size:20px}.store-drawer-note{margin:13px 0 0;padding:11px 13px;border-radius:9px;background:#f8f7ff;color:#737f95;font-size:12px;line-height:1.6}.store-drawer-actions{display:grid;gap:9px;margin-top:18px}.store-drawer-actions button,.store-drawer-child{display:flex;align-items:center;justify-content:center;gap:8px;min-height:39px;border:1px solid #dedff0;border-radius:8px;background:#fff;color:#5e6c81;font:inherit;font-size:12px;cursor:pointer}.store-drawer-actions button.primary-btn{border-color:#6656e9;background:#6656e9;color:#fff}.store-drawer-actions .store-ui-icon,.store-drawer-child .store-ui-icon{width:17px;height:17px}.store-drawer-child{width:100%;margin-top:10px;border-style:dashed;color:#6656e9}@keyframes store-drawer-fade{from{opacity:0}to{opacity:1}}@keyframes store-drawer-in{from{transform:translateX(22px)}to{transform:translateX(0)}}
body[data-theme="dark"][data-active-page="organization"] .store-operations-main,body[data-theme="dark"][data-active-page="organization"] .store-operations .store-workbench-tree,body[data-theme="dark"] .store-ops-drawer{background:#0f1621}body[data-theme="dark"] .store-ops-head h2,body[data-theme="dark"] .store-table-section h3,body[data-theme="dark"] .store-table-identity strong,body[data-theme="dark"] .store-ops-drawer h2,body[data-theme="dark"] .store-drawer-records strong{color:#e6edf7}body[data-theme="dark"] .store-ops-filters>* ,body[data-theme="dark"] .store-overview-metric,body[data-theme="dark"] .store-table-section,body[data-theme="dark"] .store-drawer-records{border-color:#2b394e;background:#151f2e}body[data-theme="dark"] .store-ops-search input,body[data-theme="dark"] .store-select select{color:#d8e0ec}body[data-theme="dark"] .store-type-tabs,body[data-theme="dark"] .store-table-section>header,body[data-theme="dark"] .store-operations-table th,body[data-theme="dark"] .store-operations-table th,body[data-theme="dark"] .store-operations-table td,body[data-theme="dark"] .store-ops-drawer>nav{border-color:#28364b}body[data-theme="dark"] .store-operations-table th{background:#111925;color:#93a1b5}body[data-theme="dark"] .store-operations-table{color:#aab6c7}body[data-theme="dark"] .store-operations-table tbody tr:hover,body[data-theme="dark"] .store-operations-table tbody tr.selected{background:#1a1a32}body[data-theme="dark"] .store-drawer-backdrop{background:rgba(0,0,0,.62)}
@media(max-width:1100px){body[data-active-page="organization"] .store-operations{grid-template-columns:260px minmax(0,1fr)}body[data-active-page="organization"] .store-operations-main{padding:22px}.store-overview-metrics{gap:10px}.store-overview-metric{padding:12px}.store-ops-filters{flex-wrap:wrap}}@media(max-width:780px){body[data-active-page="organization"] .store-operations{grid-template-columns:1fr}body[data-active-page="organization"] .store-operations .store-workbench-tree{min-height:0;padding:20px;border-right:0;border-bottom:1px solid #e8edf3}body[data-active-page="organization"] .store-operations-main{padding:20px}.store-ops-head{margin-bottom:15px}.store-ops-head h2{font-size:21px}.store-ops-filters{gap:8px}.store-ops-search{min-width:100%;width:100%}.store-select{flex:1}.store-overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.store-overview-metric{min-height:75px}.store-overview-metric>span{width:33px;height:33px}.store-overview-metric strong{font-size:19px}.store-reset-button span{display:none}.store-ops-drawer{width:min(388px,calc(100vw - 14px));padding:20px}}
.store-filter-button.active{border-color:#bdb4fa;background:#f2efff;color:#6556e9}
.store-ops-head{display:none}.store-ops-filters{width:100%;min-height:42px;margin:0 0 4px}.store-ops-filters .store-ops-search{flex:1 1 280px;min-width:220px}.store-ops-filters .store-select{flex:0 0 116px;padding:0 10px}.store-ops-filters .store-select select{width:100%;min-width:0}.store-filter-spacer{flex:1 1 0}.store-ops-filters .store-add-button{height:42px;padding:0 15px;flex:0 0 auto}.store-ops-scope{min-height:18px;margin:0 0 16px;color:#8d99aa;font-size:12px;line-height:18px}.store-ops-filters .store-filter-button,.store-ops-filters .store-reset-button{flex:0 0 auto}
@media(max-width:1100px){.store-ops-filters .store-filter-spacer{display:none}.store-ops-filters .store-add-button{margin-left:auto}}@media(max-width:700px){.store-ops-filters .store-add-button{margin-left:0}.store-ops-filters .store-ops-search{flex-basis:100%}.store-ops-scope{margin-bottom:13px}}

/* Store operations center — option two. */
body[data-active-page="organization"] .store-operations-center{display:grid;grid-template-columns:300px minmax(0,1fr);overflow:visible;background:#fff}
body[data-active-page="organization"] .store-operations-center .store-workbench-tree{min-height:calc(100vh - 102px);padding:16px;border-right:1px solid #e8edf3;background:#fff}
body[data-active-page="organization"] .store-center-main{min-width:0;padding:24px 28px 34px;background:#fff}
.store-center-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.store-center-head h2{margin:0;color:#1f2b42;font-size:24px;line-height:1.25}.store-center-head p{margin:7px 0 0;color:#8d99aa;font-size:13px}.store-center-add{display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:0 15px;white-space:nowrap}.store-center-add .store-ui-icon{width:17px;height:17px}.store-center-filters{display:flex;align-items:center;gap:10px;margin-bottom:18px}.store-center-search{display:flex;align-items:center;gap:8px;flex:1 1 300px;min-width:240px;height:42px;padding:0 12px;border:1px solid #dfe5ee;border-radius:9px;background:#fff;color:#91a0b3}.store-center-search .store-ui-icon{width:18px;height:18px}.store-center-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:#334158;font:inherit;font-size:13px}.store-center-select{display:flex;align-items:center;height:42px;flex:0 0 122px;padding:0 10px;border:1px solid #dfe5ee;border-radius:9px;background:#fff}.store-center-select select{width:100%;border:0;outline:0;background:transparent;color:#59677d;font:inherit;font-size:12px}.store-center-filter,.store-center-reset,.store-center-export{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;height:42px;padding:0 12px;border:1px solid #dfe5ee;border-radius:9px;background:#fff;color:#59677d;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}.store-center-filter .store-ui-icon,.store-center-reset .store-ui-icon,.store-center-export .store-ui-icon{width:16px;height:16px}.store-center-filter:hover,.store-center-filter.active,.store-center-reset:hover,.store-center-export:hover{border-color:#beb5fa;background:#f5f3ff;color:#6556e9}.store-center-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:14px}.store-center-metric{display:flex;align-items:center;gap:12px;min-height:92px;padding:16px;border:1px solid #e7ebf2;border-radius:11px;background:#fff}.store-center-metric>span{display:grid;place-items:center;flex:0 0 auto;width:40px;height:40px;border-radius:11px;background:#f0eeff;color:#6758e9}.store-center-metric>span .store-ui-icon{width:21px;height:21px}.store-center-metric small,.store-center-metric strong{display:block}.store-center-metric small{color:#8e9aab;font-size:12px}.store-center-metric strong{margin-top:6px;color:#28364d;font-size:23px;line-height:1;font-variant-numeric:tabular-nums}.store-center-metric.success>span{background:#eaf8f2;color:#28a27c}.store-center-metric.info>span{background:#edf3ff;color:#577fd0}.store-center-metric.risk{border-color:#ffe0d3;background:#fffcfa}.store-center-metric.risk>span{background:#fff1e9;color:#e37b34}.store-center-metric.risk strong{color:#dd712d}.store-center-risks{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}.store-risk-card{display:grid;grid-template-columns:44px minmax(0,1fr) minmax(170px,.9fr);align-items:center;gap:13px;min-height:100px;padding:16px 18px;border:1px solid #e7ebf2;border-radius:11px;background:#fff}.store-risk-card>span{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#fff1e7;color:#e67831}.store-risk-card.invite>span{background:#f0eeff;color:#6c5ce8}.store-risk-card small,.store-risk-card strong{display:block}.store-risk-card small{color:#8794a6;font-size:12px}.store-risk-card strong{margin-top:5px;color:#e0712d;font-size:25px;line-height:1}.store-risk-card.invite strong{color:#6656e9}.store-risk-card dl{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0}.store-risk-card dl div{display:flex;justify-content:space-between;gap:7px;padding:7px 9px;border-radius:7px;background:#fafbfe;font-size:11px}.store-risk-card dt{color:#8a97a9}.store-risk-card dd{margin:0;color:#4f5e75;font-weight:750;font-variant-numeric:tabular-nums}.store-center-table-section{border:1px solid #e6eaf1;border-radius:12px;background:#fff;overflow:hidden}.store-center-table-section>header{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 17px 0;border-bottom:1px solid #e8ecf2}.store-center-table-section>header>div{display:flex;align-items:flex-end;gap:18px;min-width:0}.store-center-table-section h3{flex:0 0 auto;margin:0 0 13px;color:#2b3850;font-size:15px}.store-center-table-section header>span{padding-bottom:13px;color:#92a0b2;font-size:12px;white-space:nowrap}.store-center-table-section nav{display:flex;align-items:flex-end;gap:7px;min-width:0;overflow-x:auto}.store-center-table-section nav button{position:relative;display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;min-height:38px;padding:0 10px;border:0;background:transparent;color:#718096;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}.store-center-table-section nav button b{display:grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:10px;background:#eff1f5;color:#7c899b;font-size:10px}.store-center-table-section nav button.active{color:#6455df;font-weight:750}.store-center-table-section nav button.active:after{position:absolute;right:4px;bottom:-1px;left:4px;height:2px;background:#6656e9;content:""}.store-center-table-section nav button.active b{background:#efedff;color:#6556e9}.store-center-table-wrap{overflow:auto}.store-center-table{width:100%;min-width:900px;border-collapse:collapse;color:#58667c;font-size:12px;text-align:left}.store-center-table th{height:43px;padding:0 13px;border-bottom:1px solid #e8ecf2;background:#fbfcfe;color:#7c8a9d;font-size:11px;font-weight:700;white-space:nowrap}.store-center-table td{height:68px;padding:0 13px;border-bottom:1px solid #edf0f4;vertical-align:middle;white-space:nowrap}.store-center-table tr:last-child td{border-bottom:0}.store-center-table tbody tr{transition:background .16s ease}.store-center-table tbody tr:hover,.store-center-table tbody tr.selected{background:#faf9ff}.store-center-identity{display:flex;align-items:center;gap:9px;min-width:195px;padding:0;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}.store-center-identity .store-node-icon{width:31px;height:31px;border-radius:9px}.store-center-identity strong,.store-center-identity small{display:block;max-width:205px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.store-center-identity strong{color:#34415a;font-size:13px}.store-center-identity small{margin-top:3px;color:#98a4b5;font-size:10px}.store-center-table td>b{color:#3d4a60;font-weight:700;font-variant-numeric:tabular-nums}.store-center-table td>b.risk{color:#de752e}.store-center-table td>b.ok{color:#2b9c77}.store-center-status{display:inline-flex;align-items:center;min-height:24px;padding:0 9px;border-radius:12px;background:#eaf8f1;color:#26906d;font-size:10px;font-weight:700}.store-center-status.attention{background:#fff1e7;color:#df782f}.store-center-open{display:grid;place-items:center;width:28px;height:28px;margin-left:auto;border:0;border-radius:7px;background:transparent;color:#9ca8b7;cursor:pointer}.store-center-open:hover{background:#eeeaff;color:#6656e9}.store-center-open .store-ui-icon{width:17px;height:17px}
body[data-theme="dark"][data-active-page="organization"] .store-operations-center .store-workbench-tree,body[data-theme="dark"][data-active-page="organization"] .store-center-main{background:#0f1621}body[data-theme="dark"] .store-center-head h2,body[data-theme="dark"] .store-center-table-section h3,body[data-theme="dark"] .store-center-identity strong{color:#e5edf8}body[data-theme="dark"] .store-center-search,body[data-theme="dark"] .store-center-select,body[data-theme="dark"] .store-center-filter,body[data-theme="dark"] .store-center-reset,body[data-theme="dark"] .store-center-export,body[data-theme="dark"] .store-center-metric,body[data-theme="dark"] .store-risk-card,body[data-theme="dark"] .store-center-table-section{border-color:#2b394e;background:#151f2e}body[data-theme="dark"] .store-center-search input,body[data-theme="dark"] .store-center-select select{color:#d7e0ed}body[data-theme="dark"] .store-center-table-section>header,body[data-theme="dark"] .store-center-table th,body[data-theme="dark"] .store-center-table td{border-color:#28364b}body[data-theme="dark"] .store-center-table th{background:#111925;color:#94a2b7}body[data-theme="dark"] .store-center-table{color:#aab6c7}body[data-theme="dark"] .store-center-table tbody tr:hover,body[data-theme="dark"] .store-center-table tbody tr.selected{background:#1a1a32}body[data-theme="dark"] .store-risk-card dl div{background:#111925}
@media(max-width:1180px){body[data-active-page="organization"] .store-operations-center{grid-template-columns:260px minmax(0,1fr)}body[data-active-page="organization"] .store-center-main{padding:22px}.store-center-filters{flex-wrap:wrap}.store-center-search{flex:1 1 350px}.store-center-metrics{gap:10px}.store-center-metric{padding:12px}.store-risk-card{grid-template-columns:42px minmax(0,1fr)}.store-risk-card dl{grid-column:1/-1}}@media(max-width:780px){body[data-active-page="organization"] .store-operations-center{grid-template-columns:1fr}body[data-active-page="organization"] .store-operations-center .store-workbench-tree{min-height:0;padding:20px;border-right:0;border-bottom:1px solid #e8edf3}body[data-active-page="organization"] .store-center-main{padding:20px}.store-center-head h2{font-size:21px}.store-center-filters{gap:8px}.store-center-search{flex-basis:100%;min-width:100%}.store-center-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.store-center-metric{min-height:76px}.store-center-metric>span{width:33px;height:33px}.store-center-metric strong{font-size:19px}.store-center-risks{grid-template-columns:1fr;gap:10px}.store-center-table-section>header{align-items:flex-start;flex-direction:column;padding-top:14px}.store-center-table-section>header>div{width:100%;flex-direction:column;gap:0}.store-center-table-section nav{width:100%}.store-center-table-section header>span{align-self:flex-end;margin-top:-35px}.store-center-add{padding:0 11px}.store-center-add .store-ui-icon{margin:0}.store-center-add{font-size:0}.store-center-add .store-ui-icon{font-size:initial}}
.store-center-head.compact{align-items:center;min-height:42px;margin-bottom:8px}.store-center-head.compact p{margin:0}.store-center-head.compact .store-center-add{margin-left:auto}
.store-center-head.compact{justify-content:flex-end;margin-bottom:0}.store-center-head.compact p{display:none}

/* Keep the Store Management organization tree frame identical to Formula History. */
body[data-active-page="organization"] .store-operations-center{
  grid-template-columns:300px minmax(0,1fr);
  gap:18px;
}
body[data-active-page="organization"] .store-operations-center > .history-store-org.history-org-panel{
  box-sizing:border-box;
  width:100%;
  min-width:0;
  min-height:calc(100vh - 154px);
  margin:0;
  padding:16px;
  position:sticky;
  top:16px;
  border:1px solid #e1e5eb;
  border-radius:10px;
  background:#fff;
  box-shadow:0 1px 3px rgba(22,34,54,.04);
}
body[data-active-page="organization"] .store-operations-center .history-org-head{
  align-items:center;
  margin:0 0 12px;
  padding:0;
  border:0;
}
body[data-active-page="organization"] .store-operations-center .history-org-head h3{font-size:15px;font-weight:650}
body[data-active-page="organization"] .store-operations-center .history-org-actions button{min-height:34px;padding:6px 8px;border-radius:7px;font-size:11px;font-weight:600}
body[data-active-page="organization"] .store-operations-center .history-org-search{
  display:block;
  height:auto;
  margin:0 0 8px;
  padding:0;
  border:0;
  background:transparent;
}
body[data-active-page="organization"] .store-operations-center .history-org-search input{
  width:100%;
  height:34px;
  margin:0;
  padding:0 10px;
  border:1px solid #dfe3ea;
  border-radius:7px;
  background:#fff;
  font-size:12px;
}
body[data-active-page="organization"] .store-operations-center .history-org-tree{
  max-height:min(620px,calc(100dvh - 300px));
  margin:0;
  padding:2px 5px;
  overflow:auto;
}
body[data-active-page="organization"] .store-operations-center .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="organization"] .store-operations-center .history-org-node.depth-0{padding-left:7px}
body[data-active-page="organization"] .store-operations-center .history-org-node.depth-1{padding-left:25px}
body[data-active-page="organization"] .store-operations-center .history-org-node.depth-2{padding-left:43px}
body[data-active-page="organization"] .store-operations-center .history-org-node.depth-3{padding-left:61px}
body[data-active-page="organization"] .store-operations-center .history-org-node.depth-4{padding-left:79px}
body[data-active-page="organization"] .store-operations-center .history-org-arrow.org-toggle{width:12px;font-size:17px}
body[data-active-page="organization"] .store-operations-center .history-org-icon.org-node-icon{width:26px;height:26px;border-radius:7px;font-size:14px!important}
body[data-active-page="organization"] .store-operations-center .history-org-name strong{font-size:12px;font-weight:600}
body[data-active-page="organization"] .store-operations-center .history-org-name small{margin-top:2px;font-size:10px}
body[data-theme="dark"][data-active-page="organization"] .store-operations-center > .history-store-org.history-org-panel{
  border-color:#2b394e;
  background:#0f1621;
  box-shadow:none;
}
body[data-theme="dark"][data-active-page="organization"] .store-operations-center .history-org-search input{
  border-color:#2b394e;
  background:#151f2e;
  color:#d7e0ed;
}
@media(max-width:1500px){body[data-active-page="organization"] .store-operations-center{grid-template-columns:270px minmax(0,1fr)}}
@media(max-width:1100px){body[data-active-page="organization"] .store-operations-center{grid-template-columns:240px minmax(0,1fr)}}
@media(max-width:860px){body[data-active-page="organization"] .store-operations-center{grid-template-columns:1fr;gap:14px}body[data-active-page="organization"] .store-operations-center > .history-store-org.history-org-panel{position:static;min-height:0}}

/* Match the final Formula History organization-tree density exactly. */
body[data-active-page="organization"] .store-workbench-tree-head{padding:0;margin:0 0 12px}
body[data-active-page="organization"] .store-workbench-tree-head h2{font-size:15px}
body[data-active-page="organization"] .history-store-org .store-workbench-tree-head h2 .store-ui-icon{width:22px;height:22px;color:#30343d}
body[data-active-page="organization"] .history-store-org .store-icon-button{width:auto;height:auto;min-height:34px;padding:6px 8px;border-radius:7px;font-size:11px;font-weight:600}
body[data-active-page="organization"] .store-tree-search{height:34px;margin:0 0 8px;padding:0 10px;border-radius:7px}
body[data-active-page="organization"] .store-tree-list{max-height:min(620px,calc(100dvh - 300px));margin:0;padding:2px 5px}
body[data-active-page="organization"] .store-tree-row{min-height:0;gap:8px;margin:3px 0;padding:9px 7px;border-radius:8px}
body[data-active-page="organization"] .store-tree-row.depth-1{padding-left:25px}
body[data-active-page="organization"] .store-tree-row.depth-2{padding-left:43px}
body[data-active-page="organization"] .store-tree-row.depth-3{padding-left:61px}
body[data-active-page="organization"] .store-tree-row.depth-4{padding-left:79px}
body[data-active-page="organization"] .store-node-icon{width:26px;height:26px;border-radius:7px}
body[data-active-page="organization"] .store-node-icon .store-ui-icon{width:14px;height:14px}
body[data-active-page="organization"] .store-center-filters{align-items:center;gap:10px}
body[data-active-page="organization"] .store-center-search{flex:0 1 360px;width:360px;max-width:360px;min-width:220px}
body[data-active-page="organization"] .store-center-filters .store-center-add{margin-left:auto;flex:0 0 auto}
@media(max-width:1180px){body[data-active-page="organization"] .store-center-search{flex:1 1 300px;width:auto;max-width:none}}
@media(max-width:780px){body[data-active-page="organization"] .store-center-search{flex-basis:100%;width:100%;max-width:none}.store-center-filters .store-center-add{margin-left:0}}
body[data-active-page="organization"] .store-tree-copy strong{font-size:12px;font-weight:600}
body[data-active-page="organization"] .store-tree-copy small{margin-top:2px;font-size:10px}
body[data-active-page="organization"] .store-tree-count,body[data-active-page="organization"] .store-tree-alert{min-width:23px;height:auto;padding:2px 6px;font-size:10px}

/* Customer search: clear but restrained lift feedback on hover and focus. */
body[data-active-page="customers"] .customer-filter-search{
  cursor:text;
  will-change:transform,box-shadow;
  transition:transform .18s cubic-bezier(.22,1,.36,1),border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
body[data-active-page="customers"] .customer-filter-search:hover{
  border-color:#c9c3f5;
  background:#fff;
  box-shadow:0 7px 16px rgba(77,67,161,.12);
  transform:translateY(-2px);
}
body[data-active-page="customers"] .customer-filter-search:focus-within{
  border-color:#8175e7;
  box-shadow:0 0 0 3px rgba(99,85,232,.12),0 7px 16px rgba(77,67,161,.12);
  transform:translateY(-2px);
}
body[data-theme="dark"][data-active-page="customers"] .customer-filter-search:hover{
  border-color:#5f58a9;
  background:#141b27;
  box-shadow:0 7px 16px rgba(0,0,0,.28);
}
@media(prefers-reduced-motion:reduce){body[data-active-page="customers"] .customer-filter-search{transition:none}body[data-active-page="customers"] .customer-filter-search:hover,body[data-active-page="customers"] .customer-filter-search:focus-within{transform:none}}

/* Customer directory order: title and status sit above the search actions. */
body[data-active-page="customers"] .customer-directory-title{
  min-height:76px;
  padding:17px 20px 12px!important;
  border-bottom:0!important;
}
body[data-active-page="customers"] .customer-directory-title + .customer-toolbar{
  border-radius:0!important;
  border-top:0!important;
  border-bottom:1px solid var(--line)!important;
}
body[data-active-page="customers"] .customer-directory-title + .customer-toolbar + .customer-table-card{
  border-top:0!important;
}
body[data-theme="dark"][data-active-page="customers"] .customer-directory-title + .customer-toolbar{
  border-bottom-color:#2d374a!important;
}

/* History organization selection: keep the normal surface and add only a
   restrained purple outline, so selecting a node does not create a filled
   purple block or change the tree rhythm. */
body[data-active-page="history"] .history-page .history-store-org .history-org-node.org-tree-row.selected{
  background:#fff!important;
  color:#4e5a6f!important;
  border-color:rgba(133,121,232,.48)!important;
  box-shadow:0 0 0 1px rgba(133,121,232,.14),0 4px 10px rgba(104,93,187,.05)!important;
  transform:none!important;
}
body[data-active-page="history"] .history-page .history-store-org .history-org-node.org-tree-row.selected:hover{
  background:#fff!important;
  border-color:rgba(133,121,232,.58)!important;
  box-shadow:0 0 0 1px rgba(133,121,232,.16),0 5px 12px rgba(104,93,187,.06)!important;
  transform:none!important;
}
body[data-active-page="history"] .history-page .history-store-org .history-org-node.org-tree-row.selected .history-org-name strong{
  color:inherit!important;
}
body[data-theme="dark"][data-active-page="history"] .history-page .history-store-org .history-org-node.org-tree-row.selected{
  background:#151d2a!important;
  color:#d7e0ed!important;
  border-color:rgba(143,132,244,.56)!important;
  box-shadow:0 0 0 1px rgba(143,132,244,.16),0 4px 10px rgba(0,0,0,.16)!important;
}
body[data-theme="dark"][data-active-page="history"] .history-page .history-store-org .history-org-node.org-tree-row.selected:hover{
  background:#151d2a!important;
  border-color:rgba(143,132,244,.68)!important;
  box-shadow:0 0 0 1px rgba(143,132,244,.2),0 5px 12px rgba(0,0,0,.2)!important;
}

/* Final organization-tree layout: simple vertical stacking only. Keep the
   existing depth padding for hierarchy, but do not draw tree connectors or
   shift rows diagonally while expanding, hovering, or selecting. */
body[data-active-page="history"] .history-page .history-store-org .history-org-tree{
  display:block;
}
body[data-active-page="history"] .history-page .history-store-org .history-org-vertical-group{
  display:block;
  width:100%;
  margin:0;
  padding:0;
}
body[data-active-page="history"] .history-page .history-store-org .history-org-node.org-tree-row{
  display:flex;
  width:100%;
  transform:none!important;
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,color .16s ease!important;
}
body[data-active-page="history"] .history-page .history-store-org .history-org-node.org-tree-row:hover,
body[data-theme="dark"][data-active-page="history"] .history-page .history-store-org .history-org-node.org-tree-row:hover{
  transform:none!important;
}

/* Store filters: the type control has one clean outline, while reset is an
   icon-only action that rotates to confirm the interaction. */
body[data-active-page="organization"] .store-center-select{
  padding:0;
  border:0;
  background:transparent;
}
body[data-active-page="organization"] .store-center-select select{
  height:42px;
  padding:0 30px 0 12px;
  border:1px solid #dfe5ee;
  border-radius:9px;
  background:#fff;
}
body[data-active-page="organization"] .store-center-reset{
  width:42px;
  padding:0;
}
body[data-active-page="organization"] .store-center-reset .store-ui-icon{
  transition:transform .3s cubic-bezier(.22,1,.36,1);
}
body[data-active-page="organization"] .store-center-reset:hover .store-ui-icon{
  transform:rotate(-180deg);
}
body[data-active-page="organization"] .store-center-reset:active .store-ui-icon{
  transform:rotate(-300deg);
}
body[data-theme="dark"][data-active-page="organization"] .store-center-select{
  border:0;
  background:transparent;
}
body[data-theme="dark"][data-active-page="organization"] .store-center-select select{
  border-color:#2b394e;
  background:#151f2e;
}

/* Soften the light-theme filter focus/open treatment without changing the
   control size or layout. The selected option remains clear, but the purple
   outline no longer reads as a bright halo. */
body[data-theme="light"][data-active-page="history"] .history-page .history-filter-panel :is(.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger):is(:hover,:focus-visible),
body[data-theme="light"][data-active-page="history"] .history-page .history-filter-panel :is(.history-time-select,.history-filter-select,.history-date-picker)[data-open="true"] :is(.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger){
  border-color:rgba(129,117,224,.46)!important;
  box-shadow:0 0 0 2px rgba(129,117,255,.08),0 4px 10px rgba(67,52,151,.06)!important;
}

/* Store management concept layout: two surfaces (organization tree and
   operations workspace). The separate store inspector is intentionally removed. */
body[data-active-page="organization"] .store-concept-page{
  max-width:none;
  height:calc(100vh - 102px);
  min-height:0;
  padding:0;
  overflow:hidden;
  background:#0a1019;
  color:#d9e2ef;
}
body[data-active-page="organization"] .store-concept-shell{
  display:grid;
  grid-template-columns:248px minmax(0,1fr);
  height:100%;
  min-height:0;
  overflow:hidden;
  border:1px solid #253247;
  border-radius:0;
  background:#0f1621;
  box-shadow:none;
}
body[data-active-page="organization"] .store-concept-tree{
  display:flex;
  min-width:0;
  min-height:0;
  flex-direction:column;
  padding:18px 15px 15px;
  border-right:1px solid #263448;
  background:#0d1420;
}
body[data-active-page="organization"] .store-concept-tree-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 2px 14px;
}
body[data-active-page="organization"] .store-concept-tree-head h2{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  color:#eff4fc;
  font-size:15px;
  font-weight:700;
}
body[data-active-page="organization"] .store-concept-tree-head h2 .store-ui-icon{width:19px;height:19px;color:#9d91ff}
body[data-active-page="organization"] .store-concept-tree-head small{display:block;margin-top:6px;color:#8491a6;font-size:11px}
body[data-active-page="organization"] .store-concept-tree-head small b{color:#d7deeb;font-weight:700}
body[data-active-page="organization"] .store-concept-tree .store-icon-button{
  display:grid;
  width:30px;
  height:30px;
  place-items:center;
  border:1px solid #2b3a51;
  border-radius:8px;
  background:#131e2d;
  color:#a7b4c8;
}
body[data-active-page="organization"] .store-concept-tree .store-icon-button .store-ui-icon{width:15px;height:15px}
body[data-active-page="organization"] .store-concept-search{
  display:flex;
  align-items:center;
  gap:7px;
  height:35px;
  margin:0 0 10px;
  padding:0 10px;
  border:1px solid #2a394e;
  border-radius:8px;
  background:#121c2a;
  color:#7e8da4;
}
body[data-active-page="organization"] .store-concept-search .store-ui-icon{width:15px;height:15px}
body[data-active-page="organization"] .store-concept-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:#e9eef7;font:inherit;font-size:11px}
body[data-active-page="organization"] .store-concept-search input::placeholder{color:#78879d}
body[data-active-page="organization"] .store-concept-tree-list{min-height:0;max-height:none;flex:1;margin:0;padding:2px 0;overflow:auto}
body[data-active-page="organization"] .store-concept-tree-row{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  min-height:46px;
  margin:3px 0;
  padding:7px 7px;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:#aebbd0;
  text-align:left;
  transition:background-color .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease;
}
body[data-active-page="organization"] .store-concept-tree-row.depth-1{padding-left:24px}
body[data-active-page="organization"] .store-concept-tree-row.depth-2{padding-left:42px}
body[data-active-page="organization"] .store-concept-tree-row.depth-3{padding-left:60px}
body[data-active-page="organization"] .store-concept-tree-row:hover{border-color:#394b66;background:#162231;box-shadow:0 7px 15px rgba(0,0,0,.2);transform:translateY(-1px)}
body[data-active-page="organization"] .store-concept-tree-row.selected{border-color:#6b61bd;background:#29264b;box-shadow:0 8px 17px rgba(0,0,0,.24)}
body[data-active-page="organization"] .store-concept-tree-row:focus-visible{outline:2px solid #8c80ff;outline-offset:2px}
body[data-active-page="organization"] .store-concept-tree-row .store-tree-toggle{width:12px;flex:none;color:#788aa5;font-size:18px;line-height:1}
body[data-active-page="organization"] .store-concept-tree-row .store-tree-toggle.expanded{transform:rotate(90deg)}
body[data-active-page="organization"] .store-concept-tree-row .store-tree-toggle.leaf{visibility:hidden}
body[data-active-page="organization"] .store-concept-tree-row .store-tree-copy{display:grid;min-width:0;flex:1;gap:2px}
body[data-active-page="organization"] .store-concept-tree-row .store-tree-copy strong{overflow:hidden;color:#e5ecf7;font-size:12px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
body[data-active-page="organization"] .store-concept-tree-row .store-tree-copy small{overflow:hidden;color:#7f8ea5;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
body[data-active-page="organization"] .store-concept-tree-row.selected .store-tree-copy strong{color:#fff}
body[data-active-page="organization"] .store-concept-tree-row .store-node-icon{width:27px;height:27px;border-radius:8px;background:#242d40;color:#9db6ff}
body[data-active-page="organization"] .store-concept-tree-row .store-node-icon.agent{background:#352b58;color:#c3a6ff}
body[data-active-page="organization"] .store-concept-tree-row .store-node-icon.chain{background:#21374f;color:#82b4ff}
body[data-active-page="organization"] .store-concept-tree-row .store-node-icon.store{background:#213d3b;color:#72dec0}
body[data-active-page="organization"] .store-concept-tree-row .store-node-icon .store-ui-icon{width:15px;height:15px}
body[data-active-page="organization"] .store-concept-tree-row .store-tree-alert,
body[data-active-page="organization"] .store-concept-tree-row .store-tree-count{display:grid;min-width:22px;height:21px;place-items:center;padding:0 5px;border-radius:11px;background:#202d40;color:#9baac0;font-size:10px}
body[data-active-page="organization"] .store-concept-tree-row .store-tree-alert{background:#4a2f2b;color:#ffaf83}
body[data-active-page="organization"] .store-concept-tree-add{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:37px;margin-top:10px;border:1px solid #43516a;background:#131e2d;color:#cfd9e8;font-size:11px}
body[data-active-page="organization"] .store-concept-tree-add .store-ui-icon{width:15px;height:15px;color:#a99eff}
body[data-active-page="organization"] .store-concept-main{
  min-width:0;
  min-height:0;
  padding:20px 24px 24px;
  overflow:auto;
  background:#0f1621;
}
body[data-active-page="organization"] .store-concept-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
body[data-active-page="organization"] .store-concept-kicker{display:block;margin:0 0 5px;color:#8190a5;font-size:11px}
body[data-active-page="organization"] .store-concept-head h2{margin:0;color:#f1f5fb;font-size:23px;line-height:1.15;font-weight:750}
body[data-active-page="organization"] .store-concept-head p{margin:7px 0 0;color:#8391a6;font-size:12px}
body[data-active-page="organization"] .store-concept-actions{display:flex;align-items:center;gap:8px}
body[data-active-page="organization"] .store-concept-icon-action{display:grid;width:34px;height:34px;place-items:center;border:1px solid #2b3a50;border-radius:8px;background:#131e2d;color:#a7b4c8;cursor:pointer;transition:transform .18s ease,border-color .18s ease,color .18s ease}
body[data-active-page="organization"] .store-concept-icon-action:hover{border-color:#766ce1;color:#c9c0ff;transform:translateY(-1px)}
body[data-active-page="organization"] .store-concept-icon-action .store-ui-icon{width:16px;height:16px}
body[data-active-page="organization"] .store-concept-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin-bottom:15px}
body[data-active-page="organization"] .store-concept-metric{display:flex;align-items:center;gap:11px;min-width:0;min-height:82px;padding:13px;border:1px solid #29394f;border-radius:10px;background:#151f2e}
body[data-active-page="organization"] .store-concept-metric-icon{display:grid;flex:none;width:39px;height:39px;place-items:center;border-radius:50%;background:#2f2859;color:#9c8bff}
body[data-active-page="organization"] .store-concept-metric-icon .store-ui-icon{width:20px;height:20px}
body[data-active-page="organization"] .store-concept-metric small{display:block;overflow:hidden;color:#8b9ab0;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
body[data-active-page="organization"] .store-concept-metric strong{display:block;margin-top:6px;color:#f2f5fb;font-size:23px;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap}
body[data-active-page="organization"] .store-concept-metric strong em{margin-left:4px;color:#9eabc0;font-size:11px;font-style:normal;font-weight:500}
body[data-active-page="organization"] .store-concept-metric.device .store-concept-metric-icon{background:#263d61;color:#83b3ff}
body[data-active-page="organization"] .store-concept-metric.formula .store-concept-metric-icon{background:#293c66;color:#a794ff}
body[data-active-page="organization"] .store-concept-metric.invite .store-concept-metric-icon{background:#302955;color:#c7b6ff}
body[data-active-page="organization"] .store-concept-metric.inventory .store-concept-metric-icon{background:#3a2e24;color:#ffb26d}
body[data-active-page="organization"] .store-concept-panels{display:grid;grid-template-columns:1fr 1.15fr;gap:12px;margin-bottom:15px}
body[data-active-page="organization"] .store-concept-panel{min-width:0;padding:15px 16px;border:1px solid #29394f;border-radius:10px;background:#151f2e}
body[data-active-page="organization"] .store-concept-panel>header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
body[data-active-page="organization"] .store-concept-panel h3{display:flex;align-items:center;gap:8px;margin:0;color:#edf2f9;font-size:14px}
body[data-active-page="organization"] .store-concept-panel h3 .store-ui-icon{width:18px;height:18px;color:#abb8ca}
body[data-active-page="organization"] .store-concept-panel-link{display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;color:#a99eff;font:inherit;font-size:10px;cursor:pointer}
body[data-active-page="organization"] .store-concept-panel-link .store-ui-icon{width:13px;height:13px}
body[data-active-page="organization"] .store-inventory-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
body[data-active-page="organization"] .store-inventory-stats>div{min-width:0;padding-right:10px;border-right:1px solid #2a394c}
body[data-active-page="organization"] .store-inventory-stats>div:last-child{border-right:0}
body[data-active-page="organization"] .store-inventory-stats strong{display:block;color:#f1f4fa;font-size:21px;font-variant-numeric:tabular-nums;white-space:nowrap}
body[data-active-page="organization"] .store-inventory-stats strong.risk-number{color:#ff9b51}
body[data-active-page="organization"] .store-inventory-stats small{display:block;margin-top:5px;color:#8998ad;font-size:10px;white-space:nowrap}
body[data-active-page="organization"] .store-inventory-progress{display:grid;grid-template-columns:1fr auto;gap:5px 8px;margin-top:15px;color:#8c9ab0;font-size:10px}
body[data-active-page="organization"] .store-inventory-progress>b{color:#cbd6e5;font-size:11px}
body[data-active-page="organization"] .store-inventory-progress>i{grid-column:1/-1;display:block;height:5px;overflow:hidden;border-radius:5px;background:#273548}
body[data-active-page="organization"] .store-inventory-progress>i em{display:block;height:100%;border-radius:inherit;background:#8275f5}
body[data-active-page="organization"] .store-inventory-progress>small{grid-column:1/-1;color:#718198;font-size:10px}
body[data-active-page="organization"] .store-invite-summary{display:flex;gap:12px;color:#8d9bb0;font-size:10px;white-space:nowrap}
body[data-active-page="organization"] .store-invite-summary b{margin-left:3px;color:#67d4b0;font-size:13px}
body[data-active-page="organization"] .store-invite-summary span+span b{color:#d9e1ef}
body[data-active-page="organization"] .store-invite-table-head,.store-invite-row{display:grid;grid-template-columns:minmax(120px,1.4fr) 64px 90px;align-items:center;gap:10px}
body[data-active-page="organization"] .store-invite-table-head{padding:0 7px 7px;border-bottom:1px solid #29384b;color:#79889d;font-size:10px}
body[data-active-page="organization"] .store-invite-list{display:grid;max-height:132px;overflow:auto}
body[data-active-page="organization"] .store-invite-row{min-height:29px;padding:0 7px;border-bottom:1px solid #223146;color:#bdc9d8;font-size:10px}
body[data-active-page="organization"] .store-invite-row:last-child{border-bottom:0}
body[data-active-page="organization"] .store-invite-code{display:block;min-width:0}
body[data-active-page="organization"] .store-invite-code>span{overflow:visible;color:#e1e8f1;font-variant-numeric:tabular-nums;letter-spacing:.4px;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
body[data-active-page="organization"] .store-invite-status{display:inline-flex;width:max-content;align-items:center;min-height:19px;padding:0 7px;border-radius:10px;background:#254e48;color:#67d5b5;font-size:10px}
body[data-active-page="organization"] .store-invite-status.used{background:#263244;color:#acb8c9}
body[data-active-page="organization"] .store-invite-status.revoked{background:#462d32;color:#ff9d9d}
body[data-active-page="organization"] .store-invite-status.reserved{background:#42352a;color:#ffc078}
body[data-active-page="organization"] .store-invite-expiry{color:#8d9bb0;white-space:nowrap}
body[data-active-page="organization"] .store-invite-store{overflow:hidden;color:#8c9aaf;text-overflow:ellipsis;white-space:nowrap}
body[data-active-page="organization"] .store-invite-row:not(.compact){grid-template-columns:minmax(115px,1.25fr) 62px 86px 75px}
body[data-active-page="organization"] .store-invite-row.compact{grid-template-columns:minmax(105px,1fr) 54px 76px}
body[data-active-page="organization"] .store-invite-more{width:100%;justify-content:flex-end;margin-top:8px;padding-top:8px;border-top:1px solid #29384b}
body[data-active-page="organization"] .store-concept-table-section{overflow:hidden;border:1px solid #29394f;border-radius:10px;background:#151f2e}
body[data-active-page="organization"] .store-concept-table-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border-bottom:1px solid #29384f}
body[data-active-page="organization"] .store-concept-table-head>div:first-child{display:flex;align-items:baseline;gap:9px;min-width:0}
body[data-active-page="organization"] .store-concept-table-head h3{display:flex;align-items:center;gap:7px;margin:0;color:#edf2f9;font-size:14px;white-space:nowrap}
body[data-active-page="organization"] .store-concept-table-head h3 .store-ui-icon{width:17px;height:17px;color:#9c8fff}
body[data-active-page="organization"] .store-concept-table-head>div:first-child>span{color:#8190a5;font-size:10px;white-space:nowrap}
body[data-active-page="organization"] .store-concept-table-tools{display:flex;align-items:center;gap:7px}
body[data-active-page="organization"] .store-concept-table-search{display:flex;align-items:center;gap:6px;width:150px;height:29px;padding:0 8px;border:1px solid #2b3a50;border-radius:7px;background:#111a28;color:#7c8ca2}
body[data-active-page="organization"] .store-concept-table-search .store-ui-icon{width:14px;height:14px}
body[data-active-page="organization"] .store-concept-table-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#e3eaf4;font:inherit;font-size:10px}
body[data-active-page="organization"] .store-concept-table-search input::placeholder{color:#718096}
body[data-active-page="organization"] .store-concept-select{display:flex;align-items:center;height:29px;padding:0 5px;border:1px solid #2b3a50;border-radius:7px;background:#111a28}
body[data-active-page="organization"] .store-concept-select select{height:100%;border:0;outline:0;background:transparent;color:#aebbd0;font:inherit;font-size:10px}
body[data-active-page="organization"] .store-concept-filter-button{display:inline-flex;align-items:center;gap:4px;height:29px;padding:0 8px;border:1px solid #2b3a50;border-radius:7px;background:#111a28;color:#9eabc0;font:inherit;font-size:10px;cursor:pointer}
body[data-active-page="organization"] .store-concept-filter-button:hover,body[data-active-page="organization"] .store-concept-filter-button.active{border-color:#766ce1;color:#c0b8ff}
body[data-active-page="organization"] .store-concept-filter-button .store-ui-icon{width:13px;height:13px}
body[data-active-page="organization"] .store-concept-table-wrap{overflow:auto}
body[data-active-page="organization"] .store-concept-table{width:100%;min-width:760px;border-collapse:collapse;color:#aebbcf;font-size:11px;text-align:left}
body[data-active-page="organization"] .store-concept-table th{height:38px;padding:0 11px;border-bottom:1px solid #29384b;background:#111a28;color:#8291a6;font-size:10px;font-weight:650;white-space:nowrap}
body[data-active-page="organization"] .store-concept-table td{height:61px;padding:0 11px;border-bottom:1px solid #223146;vertical-align:middle;white-space:nowrap}
body[data-active-page="organization"] .store-concept-table tr:last-child td{border-bottom:0}
body[data-active-page="organization"] .store-concept-table tbody tr{transition:background-color .16s ease}
body[data-active-page="organization"] .store-concept-table tbody tr:hover,body[data-active-page="organization"] .store-concept-table tbody tr.selected{background:#1a1d35}
body[data-active-page="organization"] .store-table-identity{display:flex;align-items:center;gap:8px;min-width:150px;padding:0;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}
body[data-active-page="organization"] .store-table-identity .store-node-icon{width:29px;height:29px;border-radius:8px;background:#24304a;color:#83b3ff}
body[data-active-page="organization"] .store-table-identity .store-node-icon .store-ui-icon{width:15px;height:15px}
body[data-active-page="organization"] .store-table-identity span:not(.store-node-icon){display:grid;min-width:0;gap:2px}
body[data-active-page="organization"] .store-table-identity strong{overflow:hidden;color:#e5edf8;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
body[data-active-page="organization"] .store-table-identity small{overflow:hidden;color:#7f8ea5;font-size:9px;text-overflow:ellipsis;white-space:nowrap}
body[data-active-page="organization"] .store-concept-table td>b{color:#dce5f0;font-size:12px;font-variant-numeric:tabular-nums}
body[data-active-page="organization"] .store-concept-table td>small{display:block;margin-top:3px;color:#7e8da3;font-size:9px}
body[data-active-page="organization"] .store-concept-table td>b.invite-number{color:#68d6b3}
body[data-active-page="organization"] .store-concept-status{display:inline-flex;align-items:center;min-height:21px;padding:0 7px;border-radius:11px;background:#254e48;color:#67d5b5;font-size:9px;font-weight:650}
body[data-active-page="organization"] .store-concept-status.attention{background:#4a302a;color:#ffad79}
body[data-active-page="organization"] .store-row-open{display:grid;width:26px;height:26px;margin-left:auto;place-items:center;border:0;border-radius:6px;background:transparent;color:#8c9ab0;cursor:pointer}
body[data-active-page="organization"] .store-row-open:hover{background:#2a2850;color:#c2baff}
body[data-active-page="organization"] .store-row-open .store-ui-icon{width:15px;height:15px}
body[data-active-page="organization"] .store-concept-inspector{display:none!important}
body[data-active-page="organization"] .store-inspector-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
body[data-active-page="organization"] .store-inspector-head>div{display:flex;align-items:center;min-width:0;gap:10px}
body[data-active-page="organization"] .store-inspector-head small{display:block;color:#8998ad;font-size:10px}
body[data-active-page="organization"] .store-inspector-head h2{margin:4px 0;color:#eff3f9;font-size:20px;line-height:1.1}
body[data-active-page="organization"] .store-inspector-head p{max-width:210px;margin:5px 0 0;overflow:hidden;color:#8290a5;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
body[data-active-page="organization"] .store-inspector-head .store-node-icon.large{display:grid;width:39px;height:39px;place-items:center;border-radius:11px;background:#243b63;color:#84b6ff}
body[data-active-page="organization"] .store-inspector-head .store-node-icon.large .store-ui-icon{width:21px;height:21px}
body[data-active-page="organization"] .store-inspector-close{display:grid;width:28px;height:28px;place-items:center;border:0;border-radius:7px;background:transparent;color:#8998ad;cursor:pointer}
body[data-active-page="organization"] .store-inspector-close:hover{background:#222c3c;color:#e8eef6}
body[data-active-page="organization"] .store-inspector-close .store-ui-icon{width:16px;height:16px}
body[data-active-page="organization"] .store-inspector-tabs{display:flex;gap:21px;margin:19px 0 14px;border-bottom:1px solid #29384b}
body[data-active-page="organization"] .store-inspector-tabs button{position:relative;padding:0 0 10px;border:0;background:transparent;color:#7f8da3;font:inherit;font-size:11px;cursor:pointer}
body[data-active-page="organization"] .store-inspector-tabs button.active{color:#b6acff;font-weight:700}
body[data-active-page="organization"] .store-inspector-tabs button.active:after{position:absolute;right:0;bottom:-1px;left:0;height:2px;border-radius:2px;background:#8b7dff;content:""}
body[data-active-page="organization"] .store-inspector-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
body[data-active-page="organization"] .store-inspector-grid .store-concept-metric{min-height:73px;padding:10px;background:#151f2e}
body[data-active-page="organization"] .store-inspector-grid .store-concept-metric-icon{width:31px;height:31px}
body[data-active-page="organization"] .store-inspector-grid .store-concept-metric-icon .store-ui-icon{width:16px;height:16px}
body[data-active-page="organization"] .store-inspector-grid .store-concept-metric strong{font-size:19px}
body[data-active-page="organization"] .store-inspector-grid .store-concept-metric small{font-size:10px}
body[data-active-page="organization"] .store-inspector-section{margin-top:16px;padding-top:14px;border-top:1px solid #29384b}
body[data-active-page="organization"] .store-inspector-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}
body[data-active-page="organization"] .store-inspector-section-head h3{margin:0;color:#edf2f8;font-size:13px}
body[data-active-page="organization"] .store-inspector-section-head>span{color:#93a1b5;font-size:10px}
body[data-active-page="organization"] .store-inspector-invites{display:grid;gap:5px}
body[data-active-page="organization"] .store-inspector-invites .store-invite-row{grid-template-columns:minmax(100px,1fr) 54px 68px;min-height:29px;padding:0 3px;border:1px solid #26364a;border-radius:6px;background:#131e2d}
body[data-active-page="organization"] .store-inspector-invites .store-invite-row:not(.compact){grid-template-columns:minmax(100px,1fr) 54px 68px}
body[data-active-page="organization"] .store-inspector-more{display:flex;align-items:center;justify-content:flex-end;gap:4px;width:100%;margin-top:8px;padding:0;border:0;background:transparent;color:#a99eff;font:inherit;font-size:10px;cursor:pointer}
body[data-active-page="organization"] .store-inspector-more .store-ui-icon{width:13px;height:13px}
body[data-active-page="organization"] .store-inspector-risk{display:flex;align-items:center;gap:8px;min-height:42px;padding:0 9px;border:1px solid #26364a;border-radius:8px;background:#131e2d}
body[data-active-page="organization"] .store-inspector-risk>span{display:grid;width:25px;height:25px;place-items:center;border-radius:7px;background:#3c2d27;color:#ffad73}
body[data-active-page="organization"] .store-inspector-risk>span .store-ui-icon{width:14px;height:14px}
body[data-active-page="organization"] .store-inspector-risk strong{color:#d6e0ec;font-size:11px}
body[data-active-page="organization"] .store-inspector-risk button{display:grid;width:24px;height:24px;margin-left:auto;place-items:center;border:0;background:transparent;color:#8797ad;cursor:pointer}
body[data-active-page="organization"] .store-inspector-risk button .store-ui-icon{width:14px;height:14px}
body[data-active-page="organization"] .store-inspector-note{margin:13px 0 0;padding:10px;border:1px solid #29384b;border-radius:7px;color:#9aa8bc;font-size:10px;line-height:1.5}
body[data-active-page="organization"] .store-inspector-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:16px;padding-top:14px;border-top:1px solid #29384b}
body[data-active-page="organization"] .store-inspector-actions button{display:grid;justify-items:start;gap:6px;min-height:62px;padding:9px;border:1px solid #29384b;border-radius:8px;background:#131e2d;color:#9cabc0;font:inherit;font-size:10px;text-align:left;cursor:pointer}
body[data-active-page="organization"] .store-inspector-actions button:hover{border-color:#766ce1;color:#d0c9ff;transform:translateY(-1px)}
body[data-active-page="organization"] .store-inspector-actions button .store-ui-icon{width:16px;height:16px;color:#a89eff}
body[data-active-page="organization"] .store-inspector-empty{display:grid;align-content:center;justify-items:center;gap:10px;height:100%;min-height:360px;color:#8796ab;text-align:center}
body[data-active-page="organization"] .store-inspector-empty .store-ui-icon{width:31px;height:31px;color:#7268d7}
body[data-active-page="organization"] .store-inspector-empty strong{color:#cfd8e5;font-size:13px}
body[data-active-page="organization"] .store-inspector-empty span{max-width:190px;font-size:10px;line-height:1.6}
body[data-active-page="organization"] .store-concept-empty{padding:15px 7px;color:#8392a8;font-size:10px}
body[data-active-page="organization"] .store-concept-page .risk-text{color:#ffad79!important}
body[data-active-page="organization"] .store-concept-page .success-text{color:#6bd6b4!important}
body[data-active-page="organization"] .store-concept-page .empty-note{padding:28px;color:#8492a7;text-align:center}

/* Light mode keeps the same geometry while returning to the application's
   existing light surfaces. */
body[data-theme="light"][data-active-page="organization"] .store-concept-page{background:#eef2f8;color:#25334a}
body[data-theme="light"][data-active-page="organization"] .store-concept-shell{border-color:#dfe5ee;background:#f8fafd}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree,body[data-theme="light"][data-active-page="organization"] .store-concept-main,body[data-theme="light"][data-active-page="organization"] .store-concept-inspector{background:#f8fafd;border-color:#dfe5ee}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-head h2,body[data-theme="light"][data-active-page="organization"] .store-concept-head h2,body[data-theme="light"][data-active-page="organization"] .store-concept-panel h3,body[data-theme="light"][data-active-page="organization"] .store-concept-table-head h3,body[data-theme="light"][data-active-page="organization"] .store-inspector-head h2,body[data-theme="light"][data-active-page="organization"] .store-inspector-section-head h3{color:#1f2d45}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-head small,body[data-theme="light"][data-active-page="organization"] .store-concept-kicker,body[data-theme="light"][data-active-page="organization"] .store-concept-head p{color:#8b98aa}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-head small b,body[data-theme="light"][data-active-page="organization"] .store-concept-table td>b,body[data-theme="light"][data-active-page="organization"] .store-inventory-stats strong,body[data-theme="light"][data-active-page="organization"] .store-concept-metric strong{color:#27364f}
body[data-theme="light"][data-active-page="organization"] .store-concept-search,body[data-theme="light"][data-active-page="organization"] .store-concept-icon-action,body[data-theme="light"][data-active-page="organization"] .store-concept-tree .store-icon-button,body[data-theme="light"][data-active-page="organization"] .store-concept-table-search,body[data-theme="light"][data-active-page="organization"] .store-concept-select,body[data-theme="light"][data-active-page="organization"] .store-concept-filter-button{border-color:#dfe5ee;background:#fff;color:#7c8b9e}
body[data-theme="light"][data-active-page="organization"] .store-concept-search input,body[data-theme="light"][data-active-page="organization"] .store-concept-table-search input,body[data-theme="light"][data-active-page="organization"] .store-concept-select select{color:#34445c}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row{color:#59677d}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row:hover{border-color:#d8d1fb;background:#fff;box-shadow:0 6px 14px rgba(50,64,92,.08)}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row.selected{border-color:#bcb2ff;background:#f1efff;box-shadow:0 7px 16px rgba(91,76,203,.12)}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row .store-tree-copy strong,body[data-theme="light"][data-active-page="organization"] .store-table-identity strong{color:#33425b}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row .store-tree-copy small,body[data-theme="light"][data-active-page="organization"] .store-table-identity small{color:#96a2b4}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row.selected .store-tree-copy strong{color:#5b4fcf}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-add{border-color:#dfe5ee;background:#fff;color:#657389}
body[data-theme="light"][data-active-page="organization"] .store-concept-metric,body[data-theme="light"][data-active-page="organization"] .store-concept-panel,body[data-theme="light"][data-active-page="organization"] .store-concept-table-section,body[data-theme="light"][data-active-page="organization"] .store-inspector-grid .store-concept-metric{border-color:#dfe5ee;background:#fff}
body[data-theme="light"][data-active-page="organization"] .store-concept-metric small,body[data-theme="light"][data-active-page="organization"] .store-inventory-stats small,body[data-theme="light"][data-active-page="organization"] .store-concept-table-head>div:first-child>span{color:#8997aa}
body[data-theme="light"][data-active-page="organization"] .store-concept-metric strong em,body[data-theme="light"][data-active-page="organization"] .store-inventory-progress,body[data-theme="light"][data-active-page="organization"] .store-inventory-progress>small{color:#8796aa}
body[data-theme="light"][data-active-page="organization"] .store-concept-panel>header,body[data-theme="light"][data-active-page="organization"] .store-concept-table-head,body[data-theme="light"][data-active-page="organization"] .store-concept-table th,body[data-theme="light"][data-active-page="organization"] .store-concept-table td,body[data-theme="light"][data-active-page="organization"] .store-inspector-tabs,body[data-theme="light"][data-active-page="organization"] .store-inspector-section,body[data-theme="light"][data-active-page="organization"] .store-inspector-actions{border-color:#e5eaf1}
body[data-theme="light"][data-active-page="organization"] .store-concept-table th{background:#fbfcfe;color:#8090a4}
body[data-theme="light"][data-active-page="organization"] .store-concept-table{color:#66758b}
body[data-theme="light"][data-active-page="organization"] .store-concept-table tbody tr:hover,body[data-theme="light"][data-active-page="organization"] .store-concept-table tbody tr.selected{background:#faf9ff}
body[data-theme="light"][data-active-page="organization"] .store-invite-table-head{border-color:#e5eaf1;color:#8391a5}
body[data-theme="light"][data-active-page="organization"] .store-invite-row{border-color:#edf0f4;color:#56667c}
body[data-theme="light"][data-active-page="organization"] .store-invite-code>span{color:#34445b}
body[data-theme="light"][data-active-page="organization"] .store-invite-more,body[data-theme="light"][data-active-page="organization"] .store-concept-panel-link{color:#6656df}
body[data-theme="light"][data-active-page="organization"] .store-inspector-head small,body[data-theme="light"][data-active-page="organization"] .store-inspector-head p,body[data-theme="light"][data-active-page="organization"] .store-inspector-section-head>span{color:#8997aa}
body[data-theme="light"][data-active-page="organization"] .store-inspector-close,body[data-theme="light"][data-active-page="organization"] .store-inspector-actions button,body[data-theme="light"][data-active-page="organization"] .store-inspector-risk{border-color:#dfe5ee;background:#fff;color:#68778d}
body[data-theme="light"][data-active-page="organization"] .store-inspector-risk strong{color:#3c4b62}
body[data-theme="light"][data-active-page="organization"] .store-inspector-empty strong{color:#56647a}

@media(max-width:1400px){body[data-active-page="organization"] .store-concept-shell{grid-template-columns:230px minmax(0,1fr)}body[data-active-page="organization"] .store-concept-main{padding-right:18px;padding-left:18px}}
@media(max-width:1180px){body[data-active-page="organization"] .store-concept-shell{grid-template-columns:230px minmax(0,1fr)}body[data-active-page="organization"] .store-concept-inspector{grid-column:1/-1;max-height:360px;border-top:1px solid #263448;border-left:0}body[data-active-page="organization"] .store-concept-inspector .store-inspector-grid{grid-template-columns:repeat(4,1fr)}body[data-active-page="organization"] .store-concept-panels{grid-template-columns:1fr}body[data-theme="light"][data-active-page="organization"] .store-concept-inspector{border-color:#dfe5ee}}
@media(max-width:820px){body[data-active-page="organization"] .store-concept-page{height:auto;min-height:calc(100vh - 102px);overflow:visible}body[data-active-page="organization"] .store-concept-shell{display:block;height:auto;overflow:visible}body[data-active-page="organization"] .store-concept-tree{min-height:0;border-right:0;border-bottom:1px solid #263448}body[data-active-page="organization"] .store-concept-tree-list{max-height:290px}body[data-active-page="organization"] .store-concept-main{padding:18px 15px}.store-concept-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}.store-concept-table-head{align-items:flex-start!important;flex-direction:column}.store-concept-table-tools{width:100%;flex-wrap:wrap}.store-concept-table-search{flex:1 1 180px;width:auto!important}.store-concept-inspector{max-height:none!important;border-top:1px solid #263448!important}.store-inspector-grid{grid-template-columns:repeat(2,1fr)!important}}
@media(max-width:520px){body[data-active-page="organization"] .store-concept-head h2{font-size:20px}.store-concept-actions{gap:5px}.store-concept-metrics{gap:8px!important}.store-concept-metric{min-height:72px!important;padding:10px!important}.store-concept-metric-icon{width:32px!important;height:32px!important}.store-concept-metric strong{font-size:18px!important}.store-concept-panel{padding:13px!important}.store-inventory-stats{gap:7px!important}.store-inventory-stats strong{font-size:17px!important}.store-invite-table-head,.store-invite-row{grid-template-columns:minmax(95px,1fr) 55px 70px!important}.store-concept-table-tools{gap:6px}.store-concept-select{flex:1}.store-concept-filter-button{flex:0 0 auto}.store-inspector-actions{grid-template-columns:1fr 1fr!important}}

/* Final light-theme polish: keep the workbench colorful and readable instead
   of inheriting the legacy black icon treatment. */
/* The store scope heading and its refresh/export controls were removed from
   the page. Keep this guard for cached markup during a hot reload. */
body[data-active-page="organization"] .store-concept-head{display:none!important}
body[data-theme="light"][data-active-page="organization"] .store-management-page-title-icon,
body[data-theme="light"][data-active-page="organization"] .store-concept-page .store-ui-icon{color:#6556e8}
body[data-theme="dark"][data-active-page="organization"] .store-management-page-title-icon{color:#d8d1ff}
body[data-theme="light"][data-active-page="organization"] .nav-item[data-page="organization"] .nav-icon svg.store-management-icon{color:#6759e8!important}
body[data-theme="dark"][data-active-page="organization"] .nav-item[data-page="organization"] .nav-icon svg.store-management-icon{color:#e0dbff!important}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row .store-node-icon{background:#eaf1ff;color:#3d74d0}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row .store-node-icon.agent{background:#f4ecff;color:#805bd5}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row .store-node-icon.chain{background:#eaf4ff;color:#4f83d6}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row .store-node-icon.store{background:#e9f8f2;color:#239c76}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row .store-node-icon.factory{background:#f1edff;color:#725bd0}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row .store-tree-alert{background:#fff0ed;color:#dc6a58}
body[data-theme="light"][data-active-page="organization"] .store-concept-tree-row .store-tree-count{background:#eef1f5;color:#8793a5}
body[data-theme="light"][data-active-page="organization"] .store-concept-metric-icon{background:#efedff;color:#6759e8}
body[data-theme="light"][data-active-page="organization"] .store-concept-metric.device .store-concept-metric-icon{background:#eaf3ff;color:#3f7bd3}
body[data-theme="light"][data-active-page="organization"] .store-concept-metric.formula .store-concept-metric-icon{background:#f0ecff;color:#7557d6}
body[data-theme="light"][data-active-page="organization"] .store-concept-metric.invite .store-concept-metric-icon{background:#f0edff;color:#7659d8}
body[data-theme="light"][data-active-page="organization"] .store-concept-metric.inventory .store-concept-metric-icon{background:#fff0e6;color:#dc792f}
body[data-theme="light"][data-active-page="organization"] .store-concept-panel h3 .store-ui-icon{color:#6a5ce8}
body[data-theme="light"][data-active-page="organization"] .store-table-identity .store-node-icon{background:#eaf1ff;color:#3d74d0}
body[data-theme="light"][data-active-page="organization"] .store-inspector-head .store-node-icon.large{background:#eaf1ff;color:#3d74d0}
body[data-theme="light"][data-active-page="organization"] .store-inspector-risk>span{background:#fff0e6;color:#df792f}

/* The center column can become narrow when the inspector is open. Keep
   metrics inside their cells and allow the toolbar to wrap as a unit. */
body[data-active-page="organization"] .store-inventory-stats>div{min-width:0;overflow:hidden}
body[data-active-page="organization"] .store-inventory-stats strong{overflow:hidden;font-size:clamp(16px,1.25vw,21px);letter-spacing:-.15px;text-overflow:ellipsis;white-space:nowrap}
body[data-active-page="organization"] .store-inventory-stats small{overflow:hidden;text-overflow:ellipsis}
body[data-active-page="organization"] .store-invite-table-head{grid-template-columns:minmax(115px,1.25fr) 62px 86px 75px}
body[data-active-page="organization"] .store-concept-table-head{flex-wrap:wrap}
body[data-active-page="organization"] .store-concept-table-head>div:first-child{flex:1 1 180px;min-width:0}
body[data-active-page="organization"] .store-concept-table-tools{flex:1 1 360px;min-width:0;justify-content:flex-end;flex-wrap:wrap}
body[data-active-page="organization"] .store-concept-table-search{flex:1 1 150px;min-width:120px}
body[data-active-page="organization"] .store-concept-table-tools .store-concept-select{flex:0 1 auto}
body[data-active-page="organization"] .store-concept-table-tools .store-concept-filter-button{flex:0 0 auto}

@media(max-width:900px){
  body[data-active-page="organization"] .store-concept-table-tools{justify-content:flex-start}
  body[data-active-page="organization"] .store-concept-table-search{flex-basis:180px}
  body[data-active-page="organization"] .store-invite-table-head{grid-template-columns:minmax(100px,1fr) 55px 70px 70px}
}
@media(max-width:520px){
  body[data-active-page="organization"] .store-invite-table-head{grid-template-columns:minmax(95px,1fr) 55px 70px 68px!important}
}

/* Prevent the empty invite state from reserving a clipped store column. */
body[data-active-page="organization"] .store-invite-table-head.without-store{grid-template-columns:minmax(115px,1.25fr) 62px 86px}

/* Keep only the store-list controls above the KPI cards; the data table stays below. */
body[data-active-page="organization"] .store-concept-list-toolbar{overflow:hidden;margin-bottom:15px;border:1px solid #29394f;border-radius:10px;background:#151f2e}
body[data-active-page="organization"] .store-concept-list-toolbar .store-concept-table-head{border-bottom:0}
body[data-theme="light"][data-active-page="organization"] .store-concept-list-toolbar{border-color:#dfe5ee;background:#fff}
body[data-theme="light"][data-active-page="organization"] .store-concept-list-toolbar .store-concept-table-head{border-color:#e5eaf1}

/* Fit the operations table into the center column instead of hiding its risk
   and action cells behind the inspector boundary. */
body[data-active-page="organization"] .store-concept-table{table-layout:fixed;min-width:0}
body[data-active-page="organization"] .store-concept-table th,
body[data-active-page="organization"] .store-concept-table td{overflow:hidden;text-overflow:ellipsis}
body[data-active-page="organization"] .store-concept-table th:nth-child(1),
body[data-active-page="organization"] .store-concept-table td:nth-child(1){width:29%}
body[data-active-page="organization"] .store-concept-table th:nth-child(2),
body[data-active-page="organization"] .store-concept-table td:nth-child(2){width:8%}
body[data-active-page="organization"] .store-concept-table th:nth-child(3),
body[data-active-page="organization"] .store-concept-table td:nth-child(3){width:14%}
body[data-active-page="organization"] .store-concept-table th:nth-child(4),
body[data-active-page="organization"] .store-concept-table td:nth-child(4){width:14%}
body[data-active-page="organization"] .store-concept-table th:nth-child(5),
body[data-active-page="organization"] .store-concept-table td:nth-child(5){width:8%}
body[data-active-page="organization"] .store-concept-table th:nth-child(6),
body[data-active-page="organization"] .store-concept-table td:nth-child(6){width:10%}
body[data-active-page="organization"] .store-concept-table th:nth-child(7),
body[data-active-page="organization"] .store-concept-table td:nth-child(7){width:12%}
body[data-active-page="organization"] .store-concept-table th:nth-child(8),
body[data-active-page="organization"] .store-concept-table td:nth-child(8){width:5%}
body[data-active-page="organization"] .store-concept-table td{padding-right:7px;padding-left:7px}
body[data-active-page="organization"] .store-concept-table th{padding-right:7px;padding-left:7px}

/* The risk column and row icon are removed from the store list. Rebalance the
   remaining seven columns and keep the selected row on a white surface. */
body[data-active-page="organization"] .store-concept-table th:nth-child(1),
body[data-active-page="organization"] .store-concept-table td:nth-child(1){width:31%}
body[data-active-page="organization"] .store-concept-table th:nth-child(2),
body[data-active-page="organization"] .store-concept-table td:nth-child(2){width:9%}
body[data-active-page="organization"] .store-concept-table th:nth-child(3),
body[data-active-page="organization"] .store-concept-table td:nth-child(3){width:16%}
body[data-active-page="organization"] .store-concept-table th:nth-child(4),
body[data-active-page="organization"] .store-concept-table td:nth-child(4){width:16%}
body[data-active-page="organization"] .store-concept-table th:nth-child(5),
body[data-active-page="organization"] .store-concept-table td:nth-child(5){width:9%}
body[data-active-page="organization"] .store-concept-table th:nth-child(6),
body[data-active-page="organization"] .store-concept-table td:nth-child(6){width:12%}
body[data-active-page="organization"] .store-concept-table th:nth-child(7),
body[data-active-page="organization"] .store-concept-table td:nth-child(7){width:7%}
body[data-theme="light"][data-active-page="organization"] .store-concept-table tbody tr:hover,
body[data-theme="light"][data-active-page="organization"] .store-concept-table tbody tr.selected{background:#fff!important}
body[data-active-page="organization"] .store-concept-table th,
body[data-active-page="organization"] .store-concept-table td{width:14.2857%!important}
body[data-active-page="organization"] .store-table-identity{width:100%;min-width:0}
body[data-active-page="organization"] .store-concept-table tbody td{font-weight:400}
body[data-active-page="organization"] .store-concept-table tbody td>b{font-weight:500}
body[data-active-page="organization"] .store-table-identity strong{font-weight:500}

/* Agent list hierarchy: direct chain rows expand into their store children. */
body[data-active-page="organization"] .store-table-hierarchy{display:flex;align-items:center;min-width:0;gap:2px}
body[data-active-page="organization"] .store-table-expand{display:grid;place-items:center;flex:0 0 22px;width:22px;height:28px;padding:0;border:0;border-radius:6px;background:transparent;color:#8795a9;cursor:pointer}
body[data-active-page="organization"] .store-table-expand:hover{background:#f0edff;color:#6656e9}
body[data-active-page="organization"] .store-table-expand .store-ui-icon{width:14px;height:14px}
body[data-active-page="organization"] .store-table-expand-spacer{display:block;flex:0 0 22px;width:22px;height:1px}
body[data-active-page="organization"] .store-table-hierarchy .store-table-identity{flex:1;min-width:0}
body[data-active-page="organization"] .store-concept-table tbody tr.child-row td:first-child .store-table-hierarchy{padding-left:28px}
body[data-active-page="organization"] .store-concept-table tbody tr.child-row td:first-child .store-table-identity strong{font-weight:400}
body[data-theme="light"][data-active-page="organization"] .store-table-expand{color:#8998ac}
body[data-theme="light"][data-active-page="organization"] .store-table-expand:hover{background:#f0edff;color:#6656e9}

/* Store list interaction: soft lavender frame and a restrained lift on hover. */
body[data-active-page="organization"] .store-concept-table-section{
  border-color:#d8d1f7!important;
  box-shadow:0 5px 18px rgba(101,86,210,.06);
}
body[data-active-page="organization"] .store-concept-table tbody tr{
  position:relative;
  transition:transform .18s ease,box-shadow .18s ease,background-color .18s ease;
}
body[data-active-page="organization"] .store-concept-table tbody tr:hover{
  z-index:1;
  transform:translateY(-2px);
  background:#fbfaff!important;
  box-shadow:0 7px 16px rgba(101,86,210,.12);
}
body[data-active-page="organization"] .store-concept-table tbody tr:hover td{
  border-top-color:#d8d1f7!important;
  border-bottom-color:#d8d1f7!important;
  background:#fbfaff!important;
}
body[data-active-page="organization"] .store-concept-table tbody tr:hover td:first-child{
  border-left:1px solid #d8d1f7;
  border-radius:8px 0 0 8px;
}
body[data-active-page="organization"] .store-concept-table tbody tr:hover td:last-child{
  border-right:1px solid #d8d1f7;
  border-radius:0 8px 8px 0;
}
body[data-theme="light"][data-active-page="organization"] .store-concept-table-section{
  border-color:#d8d1f7!important;
  box-shadow:0 5px 18px rgba(101,86,210,.06);
}

/* The shared button contract also lifts every button on hover.  The row
   itself is the interaction surface here, so neutralize that second lift on
   the name, expand and chevron controls to prevent the first cell appearing
   to jump independently of the row. */
body[data-active-page="organization"] #page-content .store-concept-table
  :is(.store-table-identity,.store-table-expand,.store-row-open):hover{
  transform:none!important;
  box-shadow:none!important;
}

/* The red-marked list surface should blend into the page. Keep the table's
   header and row separators, but remove the section frame itself. */
body[data-active-page="organization"] .store-concept-table-section{
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}

/* Header frame only: restore the table's normal width and draw a complete
   history-style frame around the header row without moving the data rows. */
body[data-active-page="organization"] .store-concept-table-wrap{
  margin-right:0!important;
  margin-left:0!important;
}
body[data-active-page="organization"] .store-concept-table{
  width:100%!important;
}
body[data-active-page="organization"] .store-concept-table thead th{
  background:#fbfcfe!important;
  border-top:1px solid #e5eaf1!important;
  border-bottom:1px solid #e5eaf1!important;
}
body[data-active-page="organization"] .store-concept-table thead th:first-child{
  border-left:1px solid #e5eaf1!important;
}
body[data-active-page="organization"] .store-concept-table thead th:last-child{
  border-right:1px solid #e5eaf1!important;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table thead th{
  background:#111a28!important;
  border-top-color:#29384b!important;
  border-bottom-color:#29384b!important;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table thead th:first-child{
  border-left-color:#29384b!important;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table thead th:last-child{
  border-right-color:#29384b!important;
}

/* Extend only the grey header frame to the center-column edges. The pseudo
   surface sits behind the header cells, so the body rows keep their original
   width and alignment. */
body[data-active-page="organization"] .store-concept-table-wrap{
  position:relative;
  overflow:visible!important;
}
body[data-active-page="organization"] .store-concept-table-section{
  overflow:visible!important;
}
body[data-active-page="organization"] .store-concept-table-wrap::before{
  position:absolute;
  z-index:0;
  top:0;
  right:-24px;
  left:-24px;
  height:38px;
  box-sizing:border-box;
  border-top:1px solid #e5eaf1;
  border-right:0;
  border-bottom:1px solid #e5eaf1;
  border-left:0;
  background:#fbfcfe;
  content:"";
  pointer-events:none;
}
body[data-active-page="organization"] .store-concept-table{
  position:relative;
  z-index:1;
}
body[data-active-page="organization"] .store-concept-table thead th{
  background:transparent!important;
  border-top:0!important;
  border-bottom:0!important;
}
body[data-active-page="organization"] .store-concept-table thead th:first-child,
body[data-active-page="organization"] .store-concept-table thead th:last-child{
  border-left:0!important;
  border-right:0!important;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table-wrap::before{
  border-color:#29384b;
  background:#111a28;
}
@media(max-width:1400px){
  body[data-active-page="organization"] .store-concept-table-wrap::before{right:-18px;left:-18px}
}
@media(max-width:820px){
  body[data-active-page="organization"] .store-concept-table-wrap::before{right:-15px;left:-15px}
}

/* Match formula-history record typography: 11px, regular weight, 15px rhythm. */
body[data-active-page="organization"] .store-concept-table tbody td,
body[data-active-page="organization"] .store-concept-table tbody td>b,
body[data-active-page="organization"] .store-concept-table tbody td>small,
body[data-active-page="organization"] .store-table-identity strong,
body[data-active-page="organization"] .store-table-identity small{
  font-family:inherit!important;
  font-size:11px!important;
  font-weight:400!important;
  line-height:15px!important;
}

/* The select label is the only control border; the native select must not
   paint a second box inside it. */
body[data-active-page="organization"] .store-concept-select{width:150px;flex:0 0 150px;padding:0 9px;overflow:hidden}
body[data-active-page="organization"] .store-concept-select select{width:100%;min-width:0;border:0!important;outline:0!important;box-shadow:none!important;background:transparent}
body[data-active-page="organization"] .store-concept-table-search{width:230px;flex:1 1 230px}
body[data-active-page="organization"] .store-inventory-stats>div:nth-child(2) strong{font-size:clamp(15px,1.1vw,19px);letter-spacing:-.5px;overflow:visible;text-overflow:clip}
@media(max-width:900px){
  body[data-active-page="organization"] .store-concept-table-search{width:100%;flex-basis:100%}
  body[data-active-page="organization"] .store-concept-select{width:calc(50% - 4px);flex-basis:calc(50% - 4px)}
}
@media(max-width:520px){
  body[data-active-page="organization"] .store-invite-table-head.without-store{grid-template-columns:minmax(95px,1fr) 55px 70px!important}
}

/* KPI icons use the icon glyph only: no circular badge or per-metric tint. */
body[data-active-page="organization"] .store-concept-metrics .store-concept-metric-icon{
  width:24px!important;
  height:24px!important;
  border-radius:0!important;
  background:transparent!important;
  color:#191f39!important;
}
body[data-active-page="organization"] .store-concept-metrics .store-concept-metric-icon .store-ui-icon{
  width:24px!important;
  height:24px!important;
  color:#000!important;
  stroke:#000!important;
}

/* Keep the formula-history KPI lift as the resting state: cards are raised by
   1px with its soft shadow even before the pointer moves. */
body[data-active-page="organization"] .store-concept-metrics .store-concept-metric{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(40,32,101,.1)!important;
  transition:transform .16s ease;
}
body[data-active-page="organization"] .store-concept-metrics .store-concept-metric:hover{
  box-shadow:0 8px 18px rgba(40,32,101,.1)!important;
  transform:translateY(-1px);
}
body[data-active-page="organization"] .store-concept-metrics .store-concept-metric:active{
  transform:translateY(-1px);
}

/* The inventory-attention and pending-invite cards are intentionally removed
   from the store management overview. */
body[data-active-page="organization"] [data-store-risks]{display:none!important;margin:0!important}

/* Light mode uses a clean white canvas across the entire store workbench. */
/* The list header keeps only the search field; remove the redundant outer
   card treatment so the arrow-marked frame no longer renders. */
body[data-active-page="organization"] .store-concept-list-toolbar{
  margin-bottom:15px;
  border:0!important;
  border-radius:0;
  background:transparent!important;
}
body[data-active-page="organization"] .store-concept-list-toolbar .store-concept-table-head{
  padding-right:0;
  padding-left:0;
  border-bottom:0!important;
}
body[data-theme="light"][data-active-page="organization"],
body[data-theme="light"][data-active-page="organization"] .main-content,
body[data-theme="light"][data-active-page="organization"] #page-content,
body[data-theme="light"][data-active-page="organization"] .store-concept-page,
body[data-theme="light"][data-active-page="organization"] .store-concept-shell,
body[data-theme="light"][data-active-page="organization"] .store-concept-tree,
body[data-theme="light"][data-active-page="organization"] .store-concept-main,
body[data-theme="light"][data-active-page="organization"] .store-concept-inspector{background:#fff}

/* Divider polish: the workbench already sits directly below the topbar, so a
   second shell top edge creates a long, visually heavy horizontal rule. Keep
   the topbar's single 1px divider and replace the old border with one quiet
   continuous guide aligned to the workbench edges. */
body[data-active-page="organization"] .topbar{
  border-bottom:1px solid #e8ebf2!important;
  box-shadow:none!important;
}
body[data-theme="dark"][data-active-page="organization"] .topbar{
  border-bottom-color:#252d3d!important;
}
body[data-active-page="organization"] .store-concept-shell{
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
body[data-active-page="organization"] .store-concept-tree{
  position:relative;
  border-right:0!important;
}
body[data-active-page="organization"] .store-concept-tree::after{
  position:absolute;
  z-index:2;
  top:0;
  right:0;
  bottom:0;
  width:1px;
  background:#e5eaf1;
  content:"";
  pointer-events:none;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-tree::after{
  background:#2a3748;
}
@media(max-width:820px){
  body[data-active-page="organization"] .store-concept-tree::after{display:none}
  body[data-active-page="organization"] .store-concept-tree{border-bottom:1px solid #e5eaf1!important}
  body[data-theme="dark"][data-active-page="organization"] .store-concept-tree{border-bottom-color:#2a3748!important}
}

/* Reuse the formula-history record frame for store rows.  Keep the table
   columns intact, but make the whole row read as one rounded option surface:
   pale lavender fill, a 2px inset outline, and the same restrained lift/shadow
   used by .history-record-row.  The frame is shown on pointer hover; a
   selected row receives it only while the pointer is over that row. */
body[data-active-page="organization"] .store-concept-table tbody tr{
  position:relative;
  cursor:pointer;
  transition:transform .18s ease,filter .18s ease!important;
}
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected){
  z-index:4;
  /* Keep the lift inside the gap below the header; the outline and shadow
     provide the same raised feedback without crossing into the header row. */
  transform:translateY(-1px)!important;
  background:transparent!important;
  box-shadow:none!important;
  filter:drop-shadow(0 7px 11px rgba(104,93,187,.08)) drop-shadow(0 0 5px rgba(132,119,220,.06));
}
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td{
  position:relative;
  z-index:3;
  background:#fbfaff!important;
  border-top-color:transparent!important;
  border-bottom-color:transparent!important;
  box-shadow:inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def;
}
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:first-child{
  border-left:0!important;
  border-radius:8px 0 0 8px;
  box-shadow:inset 2px 0 0 #a49def,inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def;
}
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:last-child{
  border-right:0!important;
  border-radius:0 8px 8px 0;
  box-shadow:inset -2px 0 0 #a49def,inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def;
}
/* Extend only the row frame's end caps to the full header-frame width. The
   cells and their column alignment stay unchanged; these caps bridge the
   visual inset left by the table's internal padding. */
body[data-active-page="organization"] .store-concept-table{
  --store-row-extension:48px;
}
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:first-child,
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:last-child{
  overflow:visible!important;
}
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:first-child::before,
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:last-child::after{
  position:absolute;
  z-index:5;
  top:0;
  bottom:0;
  /* Overlap the cell edge by one pixel so the extension and the table frame
     meet as one stroke instead of leaving a hairline seam. */
  width:calc(var(--store-row-extension) + 1px);
  box-sizing:border-box;
  background:#fbfaff;
  content:"";
  pointer-events:none;
}
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:first-child::before{
  left:calc(var(--store-row-extension) * -1);
  border-top:2px solid #a49def;
  border-bottom:2px solid #a49def;
  border-left:2px solid #a49def;
  border-radius:8px 0 0 8px;
}
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:last-child::after{
  right:calc(var(--store-row-extension) * -1);
  border-top:2px solid #a49def;
  border-right:2px solid #a49def;
  border-bottom:2px solid #a49def;
  border-radius:0 8px 8px 0;
}
/* The end caps own the outer corners. Remove the inner cell corners and
   vertical inset strokes so the extension reads as one continuous frame. */
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:first-child{
  border-radius:0!important;
  box-shadow:inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def;
}
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:last-child{
  border-radius:0!important;
  box-shadow:inset 0 2px 0 #a49def,inset 0 -2px 0 #a49def;
}
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected) .store-table-expand,
body[data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected) .store-row-open{
  background:transparent!important;
  color:#5548ce;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td{
  background:#182235!important;
  box-shadow:inset 0 2px 0 #7168c4,inset 0 -2px 0 #7168c4;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:first-child{
  box-shadow:inset 0 2px 0 #7168c4,inset 0 -2px 0 #7168c4;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:last-child{
  box-shadow:inset 0 2px 0 #7168c4,inset 0 -2px 0 #7168c4;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:first-child::before,
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:last-child::after{
  background:#182235;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:first-child::before{
  border-top-color:#7168c4;
  border-bottom-color:#7168c4;
  border-left-color:#7168c4;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:last-child::after{
  border-top-color:#7168c4;
  border-right-color:#7168c4;
  border-bottom-color:#7168c4;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:first-child,
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr:is(:hover,.selected)>td:last-child{
  box-shadow:inset 0 2px 0 #7168c4,inset 0 -2px 0 #7168c4;
}
@media(max-width:1400px){
  body[data-active-page="organization"] .store-concept-table{--store-row-extension:36px}
}
@media(max-width:820px){
  body[data-active-page="organization"] .store-concept-table{--store-row-extension:18px}
}

/* The purple option frame is hover feedback only. A selected row keeps its
   normal table surface until the pointer actually enters that row. */
body[data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover){
  z-index:auto!important;
  transform:none!important;
  background:#fff!important;
  box-shadow:none!important;
  filter:none!important;
}
body[data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover)>td{
  background:#fff!important;
  border-top-color:#e5eaf1!important;
  border-bottom-color:#e5eaf1!important;
  border-radius:0!important;
  box-shadow:none!important;
}
body[data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover)>td:first-child,
body[data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover)>td:last-child{
  border-left:0!important;
  border-right:0!important;
}
body[data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover)>td:first-child::before,
body[data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover)>td:last-child::after{
  display:none!important;
}
body[data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover) .store-table-expand,
body[data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover) .store-row-open{
  background:transparent!important;
  color:#8998ac!important;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover),
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover)>td{
  background:#111a28!important;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover)>td{
  border-top-color:#2a3748!important;
  border-bottom-color:#223146!important;
}
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover) .store-table-expand,
body[data-theme="dark"][data-active-page="organization"] .store-concept-table tbody tr.selected:not(:hover) .store-row-open{
  color:#8795a9!important;
}

/* Store-management filters reuse the Formula History interaction language.
   Keep the controls calm at rest, then raise only the control under the
   pointer (or keyboard focus) with a soft lavender outline. */
body[data-active-page="organization"] .store-history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger),
body[data-active-page="history"] .history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger){
  border-color:#d9dee7!important;
  box-shadow:none!important;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background-color .16s ease!important;
}
body[data-active-page="organization"] .store-history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger):is(:hover,:focus-visible),
body[data-active-page="history"] .history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger):is(:hover,:focus-visible),
body[data-active-page="organization"] .store-history-filter-panel .history-keyword-filter>div:focus-within,
body[data-active-page="history"] .history-filter-panel .history-keyword-filter>div:focus-within{
  transform:translateY(-2px);
  border-color:#a595ff!important;
  box-shadow:none!important;
}
body[data-theme="dark"][data-active-page="organization"] .store-history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger),
body[data-theme="dark"][data-active-page="history"] .history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger){
  border-color:#3a4658!important;
}
body[data-theme="dark"][data-active-page="organization"] .store-history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger):is(:hover,:focus-visible),
body[data-theme="dark"][data-active-page="history"] .history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger):is(:hover,:focus-visible),
body[data-theme="dark"][data-active-page="organization"] .store-history-filter-panel .history-keyword-filter>div:focus-within,
body[data-theme="dark"][data-active-page="history"] .history-filter-panel .history-keyword-filter>div:focus-within{
  transform:translateY(-2px);
  border-color:#aa9cff!important;
  box-shadow:none!important;
}
body[data-active-page="organization"] .store-history-filter-panel :is(.history-time-select[data-open="true"] .history-time-select-trigger,.history-filter-select[data-open="true"] .history-filter-select-trigger,.history-date-picker[data-open="true"] .history-date-trigger),
body[data-active-page="history"] .history-filter-panel :is(.history-time-select[data-open="true"] .history-time-select-trigger,.history-filter-select[data-open="true"] .history-filter-select-trigger,.history-date-picker[data-open="true"] .history-date-trigger){
  border-color:#a595ff!important;
  box-shadow:none!important;
}
body[data-theme="dark"][data-active-page="organization"] .store-history-filter-panel :is(.history-time-select[data-open="true"] .history-time-select-trigger,.history-filter-select[data-open="true"] .history-filter-select-trigger,.history-date-picker[data-open="true"] .history-date-trigger),
body[data-theme="dark"][data-active-page="history"] .history-filter-panel :is(.history-time-select[data-open="true"] .history-time-select-trigger,.history-filter-select[data-open="true"] .history-filter-select-trigger,.history-date-picker[data-open="true"] .history-date-trigger){
  border-color:#aa9cff!important;
  box-shadow:none!important;
}
@media(prefers-reduced-motion:reduce){
  body[data-active-page="organization"] .store-history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger),
  body[data-active-page="history"] .history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger){transition:none!important}
  body[data-active-page="organization"] .store-history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger):is(:hover,:focus-visible),
  body[data-active-page="history"] .history-filter-panel :is(.history-keyword-filter>div,.history-time-select-trigger,.history-filter-select-trigger,.history-date-trigger):is(:hover,:focus-visible),
  body[data-active-page="organization"] .store-history-filter-panel .history-keyword-filter>div:focus-within,
  body[data-active-page="history"] .history-filter-panel .history-keyword-filter>div:focus-within{transform:none}
}

/* Video-style sidebar feedback: selecting an option uses a quiet gray pill
   with a slight lift, while the hit area stays fixed to avoid icon flicker. */
body[data-theme="light"] .sidebar .nav-item,
body[data-theme="dark"] .sidebar .nav-item{
  border:1px solid transparent;
  background:transparent!important;
  color:#5a6572!important;
  box-shadow:none!important;
  transform:none!important;
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,color .16s ease,filter .16s ease!important;
}
body[data-theme="light"] .sidebar .nav-item:hover,
body[data-theme="light"] .sidebar .nav-item.active,
body[data-theme="dark"] .sidebar .nav-item:hover,
body[data-theme="dark"] .sidebar .nav-item.active{
  border-color:#e1e4e7;
  background:#eef0f2!important;
  color:#1f252b!important;
  box-shadow:0 4px 11px rgba(31,41,55,.12)!important;
  transform:none!important;
}
body[data-theme="light"] .sidebar .nav-item:hover:not(.active),
body[data-theme="dark"] .sidebar .nav-item:hover:not(.active){
  box-shadow:0 3px 8px rgba(31,41,55,.08)!important;
}
body[data-theme="dark"] .sidebar .nav-item,
body[data-theme="dark"] .sidebar .nav-item:hover,
body[data-theme="dark"] .sidebar .nav-item.active{
  border-color:#30343b;
  background:#25282e!important;
  color:#f0f2f4!important;
}
body[data-theme="dark"] .sidebar .nav-item:hover:not(.active){
  background:#202329!important;
}
body[data-theme="light"] .sidebar .nav-item .nav-icon,
body[data-theme="dark"] .sidebar .nav-item .nav-icon,
body[data-theme="light"] .sidebar .nav-item .nav-icon>svg,
body[data-theme="dark"] .sidebar .nav-item .nav-icon>svg{
  color:inherit!important;
  filter:none!important;
}
body[data-theme="light"] .sidebar .nav-item .nav-icon>svg:not(.shell-nav-icon):not(.formula-history-icon):not(.device-management-icon),
body[data-theme="dark"] .sidebar .nav-item .nav-icon>svg:not(.shell-nav-icon):not(.formula-history-icon):not(.device-management-icon){
  stroke:currentColor!important;
}
body[data-theme="light"] .sidebar .nav-item .nav-icon>svg.shell-nav-icon,
body[data-theme="dark"] .sidebar .nav-item .nav-icon>svg.shell-nav-icon{
  background:none!important;
  fill:currentColor!important;
  stroke:none!important;
}

/* Remove the decorative white circular plate behind sidebar icons. */
body[data-theme="light"] .sidebar .nav-item .nav-icon::after,
body[data-theme="dark"] .sidebar .nav-item .nav-icon::after{
  display:none!important;
  content:none!important;
}

/* Locale-aware sidebar sizing: keep the hit area at its established minimum,
   then let a longer translated label extend the option box on desktop. */
@media (min-width:701px){
  body .app-shell>.sidebar{
    width:max-content;
    min-width:190px;
    flex:0 0 auto;
    overflow-x:visible;
  }
  body .app-shell>.sidebar #main-nav,
  body .app-shell>.sidebar .nav-group{
    width:max-content;
    min-width:100%;
  }
  body .app-shell>.sidebar .nav-item{
    width:max-content;
    min-width:calc(100% - 4px);
    max-width:calc(100vw - 32px);
  }
  body .app-shell>.sidebar .nav-item>span:not(.nav-icon){
    min-width:0;
    white-space:nowrap;
  }
}

/* Compact navigation hides the label span, but must keep CSS-mask icons that
   are nested inside the nav-icon wrapper visible. */
@media(max-width:1080px){
  body .sidebar .nav-item .nav-icon>span{
    display:block!important;
  }
}

/* Keep Store Management's light-theme icons neutral instead of purple. */
body[data-theme="light"][data-active-page="organization"] .store-management-page-title-icon,
body[data-theme="light"][data-active-page="organization"] .nav-item[data-page="organization"] .nav-icon svg.store-management-icon{
  color:#1f252b!important;
}

/* Use the row's own rounded inner edge for the indicator. Hover reveals it;
   a clicked row keeps it after the tree rerenders and after pointer leave. */
body[data-active-page="organization"] #page-content .history-store-org .history-org-node.org-tree-row.selected,
body[data-active-page="organization"] #page-content .history-store-org .history-org-node.org-tree-row.selected:hover{
  border-color:#d7d2fb!important;
  background:#f6f5ff!important;
  box-shadow:0 9px 20px rgba(89,77,203,.14);
  transform:translateY(-1px);
}
body[data-active-page="organization"] #page-content .history-store-org .history-org-node.org-tree-row:hover:not(.selected){
  border-color:#ded9ff!important;
  background:#f5f6f9!important;
  box-shadow:0 5px 13px rgba(45,55,87,.09),inset 2px 0 #5f4be8;
  transform:translateY(-1px);
}
body[data-active-page="organization"] #page-content .history-store-org .history-org-node.org-tree-row.selected:hover,
body[data-active-page="organization"] .history-store-org .history-org-node.org-tree-row.click-indicator{
  box-shadow:0 9px 20px rgba(89,77,203,.14),inset 2px 0 #5f4be8!important;
}
body[data-active-page="organization"] .history-store-org .history-org-node.org-tree-row.is-selecting{
  animation:organization-option-selection-in .34s cubic-bezier(.22,1,.36,1) both;
}
body[data-theme="dark"][data-active-page="organization"] #page-content .history-store-org .history-org-node.org-tree-row.selected,
body[data-theme="dark"][data-active-page="organization"] #page-content .history-store-org .history-org-node.org-tree-row.selected:hover{
  border-color:#625bb2!important;
  background:#242442!important;
  box-shadow:0 9px 20px rgba(0,0,0,.34);
}
body[data-theme="dark"][data-active-page="organization"] #page-content .history-store-org .history-org-node.org-tree-row:hover:not(.selected),
body[data-theme="dark"][data-active-page="organization"] #page-content .history-store-org .history-org-node.org-tree-row.selected:hover,
body[data-theme="dark"][data-active-page="organization"] .history-store-org .history-org-node.org-tree-row.click-indicator{
  box-shadow:0 9px 20px rgba(0,0,0,.34),inset 2px 0 #7668df!important;
}
@keyframes organization-tree-indicator-in{
  0%{box-shadow:0 9px 20px rgba(89,77,203,.14),inset 0 0 transparent}
  62%{box-shadow:0 9px 20px rgba(89,77,203,.14),inset 3px 0 #5f4be8}
  100%{box-shadow:0 9px 20px rgba(89,77,203,.14),inset 2px 0 #5f4be8}
}
@keyframes organization-tree-selection-in{
  0%{opacity:.5;transform:translateY(5px) scale(.985)}
  65%{opacity:1;transform:translateY(-3px) scale(1.005)}
  100%{opacity:1;transform:translateY(-1px) scale(1)}
}
@media(prefers-reduced-motion:reduce){
  body[data-active-page="organization"] .history-store-org .history-org-node.org-tree-row.is-selecting{
    animation:none!important;
  }
}

/* Customer table: calculate the available row width evenly across all four columns. */
@media(min-width:701px){
  body[data-active-page="customers"] .customer-table-card .table{
    width:100%;
    min-width:0;
    table-layout:fixed;
  }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(1),
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(2),
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(3),
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(4){
    width:25%!important;
  }
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(1),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(2),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(3),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(4){
    width:25%!important;
  }
  body[data-active-page="customers"] .customer-table-card .customer-row-action{
    text-align:center;
  }
}

/* Birthday is not part of the customer detail presentation. Keep the
 * remaining fields flowing without leaving an empty grid cell. */
body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(2),
body[data-active-page="customers"] .customer-profile-panel .customer-detail-section:first-of-type .customer-info-grid > div:nth-child(2){
  display:none!important;
}
@media(min-width:721px){
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:last-child{
    grid-column:1/-1;
  }
}

/* Profile information order: organization pairs with contact, while hair
 * length and hair quality stay together on the second row. */
body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(1){grid-area:1 / 1}
body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(5){grid-area:1 / 2}
body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(4){grid-area:2 / 1}
body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(3){grid-area:2 / 2}
body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(6){grid-area:3 / 1 / 4 / 3}
@media(max-width:720px){
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(1){grid-area:1 / 1}
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(5){grid-area:2 / 1}
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(4){grid-area:3 / 1}
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(3){grid-area:4 / 1}
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(6){grid-area:5 / 1}
}

/* Customer detail dialog: keep the desktop sheet compact while retaining an
 * internal scroll area for longer service and case histories. */
@media(min-width:721px){
  body[data-active-page="customers"] .customer-detail-dialog{
    width:min(700px,calc(100vw - 36px));
    max-height:min(680px,calc(100dvh - 36px));
  }
}

/* The birthday field is hidden, so restore the two-column grid's visual
 * rhythm and keep the remaining row/column dividers continuous. */
@media(min-width:721px){
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(1),
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(4){
    border-right:1px solid #edf0f4;
  }
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(3),
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(5){
    border-right:0;
  }
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(4),
  body[data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(5){
    border-bottom:1px solid #edf0f4;
  }
  body[data-theme="dark"][data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(1),
  body[data-theme="dark"][data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(4),
  body[data-theme="dark"][data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(4),
  body[data-theme="dark"][data-active-page="customers"] .customer-dialog-info-grid dl > div:nth-child(5){
    border-color:#344155;
  }
}

/* Keep edit forms compact without changing the mobile sheet layout. */
@media(min-width:721px){
body[data-active-page="customers"] .customer-modal-backdrop .customer-form-modal{
    width:min(700px,calc(100vw - 36px));
    max-height:min(760px,calc(100dvh - 36px));
  }
}

/* Customer create/edit photo slots. Create mode uses two balanced slots for
 * the before/after pair; edit mode keeps the existing three-photo layout. */
body[data-active-page="customers"] .customer-photo-upload-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding-top: 4px;
}
body[data-active-page="customers"] .customer-photo-upload-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #5f6c81;
  font-size: 11px;
}
body[data-active-page="customers"] .customer-photo-upload-heading strong { font-weight: 600; }
body[data-active-page="customers"] .customer-photo-upload-heading small { color: #929bac; font-size: 10px; }
body[data-active-page="customers"] .customer-photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
body[data-active-page="customers"] .customer-photo-upload-field.is-create .customer-photo-upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body[data-active-page="customers"] .customer-photo-upload-card {
  position: relative;
  min-width: 0;
}
body[data-active-page="customers"] .customer-photo-upload-label {
  display: grid;
  gap: 6px;
  color: #7e899b;
  font-size: 10px;
  cursor: pointer;
}
body[data-active-page="customers"] .customer-photo-upload-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
body[data-active-page="customers"] .customer-photo-upload-preview {
  display: grid;
  place-items: center;
  min-height: 108px;
  border: 1px dashed #cfd5df;
  border-radius: 8px;
  background: #f8f9fb center / cover no-repeat;
  color: #8e98aa;
  font-size: 22px;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
body[data-active-page="customers"] .customer-photo-upload-label:hover .customer-photo-upload-preview,
body[data-active-page="customers"] .customer-photo-upload-label:focus-within .customer-photo-upload-preview {
  border-color: #7568ea;
  background-color: #f5f3ff;
  transform: translateY(-1px);
}
body[data-active-page="customers"] .customer-photo-upload-card.has-image .customer-photo-upload-preview { border-style: solid; border-color: #d8dce6; }
body[data-active-page="customers"] .customer-photo-upload-card.is-uploading .customer-photo-upload-preview { opacity: .55; cursor: progress; }
body[data-active-page="customers"] .customer-photo-upload-caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-active-page="customers"] .customer-photo-remove {
  position: absolute;
  top: 26px;
  right: 7px;
  display: none;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 50%;
  background: rgba(25,32,47,.72);
  color: #fff;
  cursor: pointer;
  line-height: 18px;
}
body[data-active-page="customers"] .customer-photo-remove.is-visible { display: block; }
body[data-theme="dark"][data-active-page="customers"] .customer-photo-upload-heading,
body[data-theme="dark"][data-active-page="customers"] .customer-photo-upload-label { color: #cbd6e6; }
body[data-theme="dark"][data-active-page="customers"] .customer-photo-upload-heading small { color: #9eabc0; }
body[data-theme="dark"][data-active-page="customers"] .customer-photo-upload-preview { border-color: #45536b; background-color: #1a2331; color: #aebbd0; }
body[data-theme="dark"][data-active-page="customers"] .customer-photo-upload-label:hover .customer-photo-upload-preview,
body[data-theme="dark"][data-active-page="customers"] .customer-photo-upload-label:focus-within .customer-photo-upload-preview { border-color: #8e84ff; background-color: #29254b; }
@media(max-width:600px){
  body[data-active-page="customers"] .customer-photo-upload-heading { display: grid; gap: 3px; }
  body[data-active-page="customers"] .customer-photo-upload-grid { gap: 8px; }
  body[data-active-page="customers"] .customer-photo-upload-preview { min-height: 88px; }
}

/* Customer form focus uses a single purple border without an outer glow. */
body[data-active-page="customers"] .customer-form-modal .customer-form-grid input:focus,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid select:focus,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea:focus {
  box-shadow: none;
}

/* The create modal has no organization subtitle, so keep its heading compact
 * without changing the edit modal's context line. */
body[data-active-page="customers"] .customer-form-modal.is-create .customer-modal-head h3 {
  font-size: 20px;
  line-height: 1.25;
}

/* Customer phone input: keep the country-code selector compact while using
 * the shared worldwide catalog and its concise English abbreviations. */
body[data-active-page="customers"] .customer-form-phone {
  grid-template-columns: minmax(104px, .44fr) minmax(0, 1fr);
  gap: 7px;
  margin-top: 0;
}
body[data-active-page="customers"] .customer-form-phone > input {
  min-width: 0;
  margin-top: 0 !important;
}
body[data-active-page="customers"] .customer-form-phone .org-phone-region-trigger {
  height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}
body[data-active-page="customers"] .customer-form-phone .org-phone-region-menu {
  width: min(330px, calc(100vw - 56px));
  max-height: 250px;
}
body[data-active-page="customers"] .customer-form-phone .org-phone-region-options {
  max-height: 190px;
}
body[data-active-page="customers"] .customer-form-phone .org-phone-region-option {
  min-height: 32px;
  font-size: 11px;
}
body[data-active-page="customers"] .customer-phone-region-empty {
  margin: 8px;
  color: #929bac;
  font-size: 11px;
  text-align: center;
}
body[data-theme="dark"][data-active-page="customers"] .customer-form-phone .org-phone-region-trigger,
body[data-theme="dark"][data-active-page="customers"] .customer-form-phone > input,
body[data-theme="dark"][data-active-page="customers"] .customer-form-phone .org-phone-region-menu {
  border-color: #39465a;
  background: #192231;
  color: #e8edf7;
}
body[data-theme="dark"][data-active-page="customers"] .customer-form-phone .org-phone-region-menu {
  box-shadow: 0 14px 32px rgba(0, 0, 0, .34);
}
body[data-theme="dark"][data-active-page="customers"] .customer-form-phone .org-phone-region-option {
  color: #cbd6e6;
}
body[data-theme="dark"][data-active-page="customers"] .customer-form-phone .org-phone-region-option:hover {
  background: #29254b;
  color: #d9d4ff;
}
@media(max-width:600px){
  body[data-active-page="customers"] .customer-form-phone {
    grid-template-columns: minmax(118px, .44fr) minmax(0, 1fr);
  }
}

/* Customer form visual language: icons sit beside labels, never inside text
 * controls. Keep the organization selectors on one balanced row at desktop
 * widths while allowing the existing mobile one-column fallback. */
body[data-active-page="customers"] .customer-form-grid .customer-field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  color: #5f6c81;
  line-height: 1.25;
}
body[data-active-page="customers"] .customer-field-icon {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body[data-active-page="customers"] .customer-form-grid .customer-org-select-field {
  min-width: 0;
  grid-column: auto;
}
body[data-active-page="customers"] .customer-form-grid .customer-org-select-field select {
  min-width: 0;
}
body[data-active-page="customers"] .customer-photo-upload-heading .customer-field-label,
body[data-active-page="customers"] .customer-photo-slot-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
body[data-active-page="customers"] .customer-photo-upload-heading .customer-field-icon,
body[data-active-page="customers"] .customer-photo-slot-title .customer-field-icon {
  width: 14px;
  height: 14px;
}
body[data-active-page="customers"] .customer-photo-slot-title {
  margin-bottom: 6px;
  color: #5f6c81;
  font-size: 11px;
  line-height: 1.25;
}
body[data-active-page="customers"] .customer-photo-upload-caption {
  text-align: center;
}
body[data-theme="dark"][data-active-page="customers"] .customer-form-grid .customer-field-label,
body[data-theme="dark"][data-active-page="customers"] .customer-photo-slot-title {
  color: #cbd6e6;
}
@media(max-width:600px){
  body[data-active-page="customers"] .customer-photo-upload-heading .customer-field-label {
    align-items: flex-start;
  }
}

/* Customer form reference layout: reproduce the compact 700px sheet with a
 * balanced two-column field grid, the organization row wrapping after the
 * store selector, and the name control's trailing profile affordance. */
body[data-active-page="customers"] .customer-modal-backdrop {
  padding: 18px;
}
body[data-active-page="customers"] .customer-modal-backdrop .customer-form-modal {
  width: min(700px, calc(100vw - 36px));
  max-height: min(790px, calc(100dvh - 36px));
  padding: 26px 22px 20px;
  border: 1px solid #e2e6ee;
  border-radius: 14px;
  box-shadow: 0 22px 54px rgba(28, 39, 62, .18);
}
body[data-active-page="customers"] .customer-form-modal .customer-modal-head {
  margin-bottom: 25px;
}
body[data-active-page="customers"] .customer-form-modal .customer-modal-head h3 {
  color: #172239;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
}
body[data-active-page="customers"] .customer-form-modal .customer-modal-head button {
  width: 28px;
  height: 28px;
  padding: 0;
  color: #8792a5;
  font-size: 27px;
  line-height: 26px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 18px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid > label {
  min-width: 0;
  gap: 8px;
  color: #5e6d86;
  font-size: 13px;
}
body[data-active-page="customers"] .customer-form-modal .customer-field-label {
  min-height: 19px;
  gap: 8px;
  color: #5e6d86;
  font-size: 13px;
}
body[data-active-page="customers"] .customer-form-modal .customer-field-icon {
  width: 17px;
  height: 17px;
  stroke-width: 1.75;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid input,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid select,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea {
  border-color: #dfe4ed;
  border-radius: 9px;
  background: #fff;
  color: #27334a;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid input,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid select {
  height: 44px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea {
  min-height: 92px;
  line-height: 1.5;
}
body[data-active-page="customers"] .customer-name-input-wrap {
  position: relative;
  display: block;
  min-width: 0;
}
body[data-active-page="customers"] .customer-name-input-wrap input {
  padding-right: 58px;
}
body[data-active-page="customers"] .customer-name-input-wrap input:focus {
  border-color: #6355e8;
  box-shadow: none;
}
body[data-active-page="customers"] .customer-name-input-trailing {
  position: absolute;
  top: 50%;
  right: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #080a0f;
  pointer-events: none;
  transform: translateY(-50%);
}
body[data-active-page="customers"] .customer-name-input-trailing svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body[data-active-page="customers"] .customer-name-input-trailing .customer-name-input-head {
  fill: currentColor;
  stroke: none;
}
body[data-active-page="customers"] .customer-name-input-trailing i {
  display: block;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
body[data-active-page="customers"] .customer-form-phone {
  grid-template-columns: minmax(104px, .44fr) minmax(0, 1fr);
  gap: 8px;
}
body[data-active-page="customers"] .customer-form-phone .org-phone-region-trigger {
  height: 44px;
  border-radius: 9px;
  padding-inline: 11px;
}
body[data-active-page="customers"] .customer-form-phone > input {
  min-width: 0;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-field {
  margin-top: 1px;
  padding-top: 2px;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-preview {
  min-height: 112px;
  border-radius: 9px;
}
body[data-active-page="customers"] .customer-form-modal .customer-modal-actions {
  margin-top: 4px;
  padding-top: 2px;
}
body[data-theme="dark"][data-active-page="customers"] .customer-modal-backdrop .customer-form-modal {
  border-color: #344056;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .38);
}
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-modal-head h3,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-field-label,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-grid > label {
  color: #e8edf7;
}
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-grid input,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-grid select,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-grid textarea {
  border-color: #39465a;
  background: #192231;
  color: #e8edf7;
}
body[data-theme="dark"][data-active-page="customers"] .customer-name-input-trailing {
  color: #e8edf7;
}
@media(max-width:600px){
  body[data-active-page="customers"] .customer-modal-backdrop .customer-form-modal {
    width: min(700px, calc(100vw - 24px));
    padding: 22px 16px 16px;
  }
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid {
    grid-template-columns: 1fr;
    row-gap: 15px;
  }
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid label.full {
    grid-column: auto;
  }
}

/* Final reference match for the create/edit customer sheet. The screenshot
 * uses a centered card, six layout tracks (half-width fields plus three
 * organization selectors), side-by-side notes and two upload cards. */
body[data-active-page="customers"] .customer-modal-backdrop {
  background: rgba(23, 32, 51, .42);
  padding: 16px;
}
body[data-active-page="customers"] .customer-modal-backdrop .customer-form-modal {
  width: min(580px, calc(100vw - 32px));
  max-height: min(600px, calc(100dvh - 32px));
  padding: 20px 24px 16px;
  border: 1px solid #d9e0eb;
  border-radius: 11px;
  box-shadow: 0 13px 32px rgba(50, 65, 92, .12);
}
body[data-active-page="customers"] .customer-form-modal .customer-modal-head {
  margin-bottom: 15px;
}
body[data-active-page="customers"] .customer-form-modal .customer-modal-head h3 {
  font-size: 20px;
  line-height: 1.2;
}
body[data-active-page="customers"] .customer-form-modal .customer-modal-head button {
  width: 26px;
  height: 26px;
  font-size: 25px;
  line-height: 24px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 12px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid > label {
  min-width: 0;
  gap: 5px;
  font-size: 12px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid > .customer-half-field {
  grid-column: span 3;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid > .customer-org-select-field {
  grid-column: span 2;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid > .customer-note-field {
  grid-column: span 3;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid > label.full,
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-field {
  grid-column: 1 / -1;
}
body[data-active-page="customers"] .customer-form-modal .customer-field-label {
  min-height: 17px;
  gap: 7px;
  font-size: 12px;
}
body[data-active-page="customers"] .customer-form-modal .customer-field-icon {
  width: 16px;
  height: 16px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid input,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid select,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea {
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 12px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid input,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid select,
body[data-active-page="customers"] .customer-form-modal .customer-form-phone .org-phone-region-trigger {
  height: 34px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea {
  height: 52px;
  min-height: 52px;
  line-height: 1.4;
  resize: vertical;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-phone {
  grid-template-columns: minmax(96px, .44fr) minmax(0, 1fr);
  gap: 8px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-phone .org-phone-region-trigger {
  padding-inline: 10px;
  border-radius: 7px;
  font-size: 11px;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-phone > input:focus {
  border-color: #6355e8;
  box-shadow: none;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid small {
  font-size: 10px;
  line-height: 1.25;
}
body[data-active-page="customers"] .customer-form-modal.is-create .customer-photo-upload-heading {
  display: none;
}
body[data-active-page="customers"] .customer-form-modal.is-create .customer-photo-upload-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-card {
  min-width: 0;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-slot-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 5px;
  color: #5e6d86;
  font-size: 12px;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-slot-title .customer-field-icon {
  width: 16px;
  height: 16px;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-label {
  display: block;
  cursor: pointer;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-preview {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 66px;
  border: 1px dashed #bfc9da;
  border-radius: 7px;
  background: #fff;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-glyph {
  display: block;
  color: #182338;
  line-height: 0;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-glyph svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-caption {
  display: block;
  color: #5f6d84;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-card.has-image .customer-photo-upload-preview {
  border-style: solid;
}
body[data-active-page="customers"] .customer-form-modal .customer-photo-remove {
  top: 28px;
  right: 6px;
}
body[data-active-page="customers"] .customer-form-modal .customer-modal-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e7ef;
}
body[data-active-page="customers"] .customer-form-modal .customer-modal-actions button {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 12px;
}
body[data-theme="dark"][data-active-page="customers"] .customer-modal-backdrop {
  background: rgba(2, 5, 11, .72);
}
body[data-theme="dark"][data-active-page="customers"] .customer-modal-backdrop .customer-form-modal {
  border-color: #344056;
  background: #141b27;
}
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-grid input,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-grid select,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-grid textarea,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-photo-upload-preview {
  border-color: #39465a;
  background: #192231;
  color: #e8edf7;
}
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-photo-upload-glyph,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-photo-upload-caption {
  color: #d8e1ef;
}
@media(max-width:600px){
  body[data-active-page="customers"] .customer-modal-backdrop .customer-form-modal {
    width: min(580px, calc(100vw - 24px));
    padding: 18px 16px 14px;
  }
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid > .customer-half-field,
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid > .customer-note-field {
    grid-column: span 2;
  }
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid > .customer-org-select-field {
    grid-column: span 2;
  }
}

/* Keep customer form actions directly below the upload area without a divider. */
body[data-active-page="customers"] .customer-modal-backdrop .customer-form-modal {
  max-height: none;
  overflow: visible;
}
body[data-active-page="customers"] .customer-form-modal .customer-modal-actions {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Customer form controls lift softly on hover/focus with a purple outline. */
body[data-active-page="customers"] .customer-form-modal .customer-form-grid input,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid select,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea,
body[data-active-page="customers"] .customer-form-modal .customer-form-phone .org-phone-region-trigger {
  position: relative;
  transition: transform .18s cubic-bezier(.22, 1, .36, 1), border-color .18s ease, box-shadow .18s ease;
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid input:hover,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid select:hover,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea:hover,
body[data-active-page="customers"] .customer-form-modal .customer-form-phone .org-phone-region-trigger:hover {
  border-color: #c9c3f5;
  box-shadow: 0 5px 12px rgba(104, 93, 187, .1);
  transform: translateY(-2px);
}
body[data-active-page="customers"] .customer-form-modal .customer-form-grid input:focus,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid select:focus,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea:focus,
body[data-active-page="customers"] .customer-form-modal .customer-form-phone .org-phone-region-trigger:focus-visible {
  border-color: #8175e7;
  box-shadow: 0 0 0 3px rgba(99, 85, 232, .12), 0 6px 14px rgba(104, 93, 187, .1);
  transform: translateY(-2px);
}
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-grid input:hover,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-grid select:hover,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-grid textarea:hover,
body[data-theme="dark"][data-active-page="customers"] .customer-form-modal .customer-form-phone .org-phone-region-trigger:hover {
  border-color: #655db8;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .22);
}
@media (prefers-reduced-motion: reduce) {
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid input,
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid select,
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea,
  body[data-active-page="customers"] .customer-form-modal .customer-form-phone .org-phone-region-trigger {
    transition: none;
  }
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid input:hover,
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid select:hover,
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea:hover,
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid input:focus,
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid select:focus,
  body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea:focus {
    transform: none;
  }
}

/* Keep the lift and purple outline, but remove input shadows. */
body[data-active-page="customers"] .customer-form-modal .customer-form-grid input:hover,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid select:hover,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea:hover,
body[data-active-page="customers"] .customer-form-modal .customer-form-phone .org-phone-region-trigger:hover,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid input:focus,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid select:focus,
body[data-active-page="customers"] .customer-form-modal .customer-form-grid textarea:focus,
body[data-active-page="customers"] .customer-form-modal .customer-form-phone .org-phone-region-trigger:focus-visible {
  box-shadow: none;
}

/* Bring the before/after upload frames slightly closer to their titles. */
body[data-active-page="customers"] .customer-form-modal .customer-photo-upload-label {
  margin-top: -30px;
}
body[data-active-page="customers"] .customer-form-modal.is-create .customer-photo-upload-preview {
  min-height: 130px;
}

/* Customer list ownership and notes columns. Keep the two related values
 * compact and readable without changing the existing row interaction. */
@media (min-width: 701px) {
  body[data-active-page="customers"] .customer-table-card .table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(1),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(1) { width: 18.4% !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(2),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(2) { width: 18.4% !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(3),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(3) { width: 18.4% !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(4),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(4) { width: 18.4% !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(5),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(5) { width: 18.4% !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(6),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(6) { width: 8% !important; }
}
body[data-active-page="customers"] .customer-table-card .table td.customer-organization-cell,
body[data-active-page="customers"] .customer-table-card .table td.customer-notes-cell {
  min-width: 0;
  overflow: hidden;
  vertical-align: middle;
}
body[data-active-page="customers"] .customer-organization-cell strong,
body[data-active-page="customers"] .customer-organization-cell span,
body[data-active-page="customers"] .customer-notes-cell > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-active-page="customers"] .customer-organization-cell strong {
  color: #354158;
  font-size: 11px;
  font-weight: 650;
  line-height: 17px;
}
body[data-active-page="customers"] .customer-organization-cell span {
  margin-top: 2px;
  color: #8b96a8;
  font-size: 10px;
  line-height: 15px;
}
body[data-active-page="customers"] .customer-notes-cell > span {
  color: #68758a;
  font-size: 10px;
  line-height: 16px;
}
body[data-active-page="customers"] .customer-notes-cell > span + span { margin-top: 2px; }
body[data-active-page="customers"] .customer-notes-cell b {
  margin-right: 3px;
  color: #8792a4;
  font-size: 9px;
  font-weight: 650;
}
body[data-theme="dark"][data-active-page="customers"] .customer-organization-cell strong { color: #dce5f2; }
body[data-theme="dark"][data-active-page="customers"] .customer-organization-cell span { color: #96a4b9; }
body[data-theme="dark"][data-active-page="customers"] .customer-notes-cell > span { color: #c1ccdc; }
body[data-theme="dark"][data-active-page="customers"] .customer-notes-cell b { color: #9eabc0; }

/* Store Management has a viewport-sized frame and content-sized children.
 * Keep the organization/workspace boundary on that stable frame; attaching
 * it to the ledger makes the line grow whenever a row is expanded. */
@media (min-width: 1081px) {
  body[data-active-page="organization"] .main-content,
  body[data-active-page="organization"] #page-content,
  body[data-active-page="organization"] .organization-tree-page.store-history-page,
  body[data-active-page="organization"] .organization-tree-page.store-history-page .history-workspace,
  body[data-active-page="organization"] .organization-tree-page.store-history-page .store-history-main {
    background: #fff !important;
  }

  body[data-active-page="organization"] .main-content {
    display: flex !important;
    min-height: 0 !important;
    height: 100vh !important;
    flex-direction: column !important;
  }

  body[data-active-page="organization"] #page-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
  }

  body[data-active-page="organization"] .organization-tree-page.store-history-page {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  body[data-active-page="organization"] .organization-tree-page.store-history-page .history-workspace {
    --store-org-column-width: 220px;
    position: relative !important;
    isolation: isolate;
    display: grid !important;
    grid-template-columns: var(--store-org-column-width) minmax(0, 1fr) !important;
    align-items: stretch !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  /* One stable frame owns the divider. The tree and ledger must not paint
   * their own vertical borders, otherwise the line becomes discontinuous or
   * doubled when either side changes height. */
  body[data-active-page="organization"] .organization-tree-page.store-history-page .history-workspace::before {
    position: absolute;
    z-index: 1000 !important;
    top: 0;
    bottom: 0;
    left: var(--store-org-column-width);
    width: 1px;
    background: #e8ebf0;
    content: "";
    pointer-events: none;
  }

  /* Keep both grid children in the base paint layer. This makes the divider
   * a guaranteed foreground rule even when a KPI/card later gains a shadow,
   * transform, or local stacking context. */
  body[data-active-page="organization"] .organization-tree-page.store-history-page .history-workspace > .history-store-org,
  body[data-active-page="organization"] .organization-tree-page.store-history-page .history-workspace > .store-history-main {
    position: relative;
    z-index: 0 !important;
  }

  body[data-active-page="organization"] .organization-tree-page.store-history-page .history-store-org.history-org-panel {
    border-right: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: none !important;
    overflow: hidden !important;
    background: #fff;
  }

  body[data-active-page="organization"] .organization-tree-page.store-history-page .history-store-org .history-org-tree {
    max-height: none !important;
    overflow-y: auto !important;
  }

  body[data-active-page="organization"] .organization-tree-page.store-history-page .store-history-main {
    display: flex !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    position: relative;
  }

  body[data-active-page="organization"] .organization-tree-page.store-history-page .store-history-main::before {
    display: none !important;
  }

  body[data-active-page="organization"] .organization-tree-page.store-history-page .store-history-main > .store-history-panel {
    display: flex !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
  }

  body[data-active-page="organization"] .organization-tree-page.store-history-page .store-history-panel > [data-store-content] {
    display: flex !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body[data-active-page="organization"] .organization-tree-page.store-history-page .store-history-table-wrap {
    min-height: 0 !important;
    max-height: none !important;
    flex: 1 1 auto !important;
    overflow: auto !important;
  }
}

@media (max-width: 1080px) {
  body[data-active-page="organization"] .organization-tree-page.store-history-page .history-workspace {
    grid-template-columns: 1fr !important;
  }

  body[data-active-page="organization"] .organization-tree-page.store-history-page .history-workspace::before {
    display: none !important;
  }

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

body[data-theme="dark"][data-active-page="organization"] .main-content,
body[data-theme="dark"][data-active-page="organization"] #page-content,
body[data-theme="dark"][data-active-page="organization"] .organization-tree-page.store-history-page {
  background: #0f1621 !important;
}

@media (min-width: 1081px) {
  body[data-theme="dark"][data-active-page="organization"] .organization-tree-page.store-history-page .history-store-org.history-org-panel {
    background: #111a28;
  }

  body[data-theme="dark"][data-active-page="organization"] .organization-tree-page.store-history-page .history-workspace::before {
    background: #2b374a;
  }
}
@media (max-width: 700px) {
  body[data-active-page="customers"] .customer-table-wrap { overflow-x: auto; }
  body[data-active-page="customers"] .customer-table-card .table {
    min-width: 760px !important;
    table-layout: fixed;
  }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(n),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(n) { display: table-cell !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(1),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(1) { width: 18.4% !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(2),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(2) { width: 18.4% !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(3),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(3) { width: 18.4% !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(4),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(4) { width: 18.4% !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(5),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(5) { width: 18.4% !important; }
  body[data-active-page="customers"] .customer-table-card .table th:nth-child(6),
  body[data-active-page="customers"] .customer-table-card .table td:nth-child(6) { width: 8% !important; }
}
