/* CoreHub final Penpot implementation.
   This is the single final UI layer: OMS warm neutrals, coral actions,
   shared outline icons and the responsive shell used by every route. */
* { box-sizing: border-box; }
body, #app.active, .page-area { background: var(--ch-bg) !important; color: var(--ch-text); }
body, button, input, select, textarea { font-family: Geist, "Geist Fallback", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* About Company is a story, not a document index. */
.library-v19-company-hero { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(360px,.8fr); gap:32px; align-items:center; min-height:310px; padding:42px 48px; overflow:hidden; border:1px solid var(--ch-line-primary); border-radius:18px; background:radial-gradient(circle at 86% 18%,rgba(247,113,85,.17),transparent 29%),linear-gradient(135deg,#fff8f4 0%,#fff 58%); }
.library-v19-company-brand { display:flex; align-items:flex-start; gap:24px; }
.library-v19-company-brand>span { display:grid; place-items:center; width:78px; height:78px; flex:0 0 78px; border-radius:24px; background:var(--ch-primary); color:#fff; font-size:25px; font-weight:800; }
.library-v19-company-brand small,.library-v19-company-history>header small,.library-v19-company-values>header small { color:var(--ch-primary-hover); font-size:10px; font-weight:800; letter-spacing:.13em; }
.library-v19-company-brand h2 { margin:8px 0 14px; color:var(--ch-text); font-size:clamp(30px,3.2vw,52px); line-height:1.04; letter-spacing:-.04em; }
.library-v19-company-brand p { max-width:720px; margin:0; color:var(--ch-text-control); font-size:15px; line-height:1.7; }
.library-v19-company-facts { display:grid; gap:10px; }
.library-v19-company-facts>div { display:grid; grid-template-columns:110px minmax(0,1fr); align-items:center; min-height:70px; padding:13px 18px; border:1px solid var(--ch-line); border-radius:12px; background:rgba(255,255,255,.82); }
.library-v19-company-facts strong { color:var(--ch-primary-hover); font-size:18px; }
.library-v19-company-facts span { color:var(--ch-muted); font-size:12px; }
.library-v19-company-history { margin-top:28px; padding:34px 38px 40px; border:1px solid var(--ch-line); border-radius:18px; background:var(--ch-surface); box-shadow:var(--ch-shadow-card); }
.library-v19-company-history>header { text-align:center; }
.library-v19-company-history h2,.library-v19-company-values h2 { margin:7px 0 6px; color:var(--ch-text); font-size:26px; letter-spacing:-.02em; }
.library-v19-company-history>header p { margin:0; color:var(--ch-muted); font-size:13px; }
.library-v19-company-timeline-scroll { margin-top:28px; overflow-x:auto; scrollbar-width:thin; scrollbar-color:var(--ch-line-strong) transparent; }
.library-v19-company-timeline { position:relative; display:grid; grid-template-columns:repeat(7,minmax(154px,1fr)); min-width:1120px; min-height:390px; }
.library-v19-company-timeline::before { content:""; position:absolute; left:4%; right:4%; top:50%; height:2px; background:var(--ch-line-strong); transform:translateY(-1px); }
.library-v19-company-milestone { position:relative; display:grid; grid-template-rows:1fr 58px 1fr; min-width:0; padding:0 13px; }
.library-v19-company-copy { grid-row:1; align-self:end; min-height:150px; padding:0 7px 18px; text-align:center; }
.library-v19-company-milestone.is-lower .library-v19-company-copy { grid-row:3; align-self:start; padding:18px 5px 0; }
.library-v19-company-copy strong { color:var(--ch-primary-hover); font-size:19px; }
.library-v19-company-copy .library-v19-company-type { display:block; min-height:27px; margin-bottom:4px; color:var(--ch-primary-hover); font-size:9px; font-weight:800; line-height:1.35; letter-spacing:.08em; text-transform:uppercase; }
.library-v19-company-copy h3 { margin:5px 0 6px; color:var(--ch-text); font-size:14px; line-height:1.35; }
.library-v19-company-copy p { margin:0; color:var(--ch-muted); font-size:11px; line-height:1.5; }
.library-v19-company-marker { position:relative; z-index:1; grid-row:2; place-self:center; display:grid; place-items:center; width:54px; height:54px; border:7px solid #fff; border-radius:999px; background:var(--ch-primary); color:#fff; box-shadow:0 0 0 1px var(--ch-line-primary); }
.library-v19-company-marker .library-v11-icon { width:22px; height:22px; }
.library-v19-company-values { margin-top:28px; padding:30px 38px; border:1px solid var(--ch-line); border-radius:18px; background:var(--ch-primary-subtle); }
.library-v19-company-values>header { text-align:center; }
.library-v19-company-values>div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:22px; }
.library-v19-company-values article { padding:20px; border:1px solid var(--ch-line); border-radius:12px; background:var(--ch-surface); text-align:center; }
.library-v19-company-values article strong { color:var(--ch-primary-hover); font-size:15px; }
.library-v19-company-values article p { margin:7px 0 0; color:var(--ch-muted); font-size:12px; line-height:1.55; }
.library-v19-company-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:20px; }
.library-v19-company-links>button { display:flex; align-items:center; justify-content:space-between; min-height:76px; padding:14px 18px; border:1px solid var(--ch-line); border-radius:12px; background:var(--ch-surface); color:var(--ch-text); text-align:left; cursor:pointer; }
.library-v19-company-links>button:hover { border-color:var(--ch-line-primary); background:var(--ch-primary-subtle); }
.library-v19-company-links>button>span { display:flex; align-items:center; gap:12px; }
.library-v19-company-links .library-v11-icon { color:var(--ch-primary-hover); }
.library-v19-company-links strong,.library-v19-company-links small { display:block; }
.library-v19-company-links small { margin-top:3px; color:var(--ch-muted); font-size:11px; }
.library-v23-shared-rules { margin-top:22px; }
.library-v23-shared-rules>header>div p { margin:4px 0 0; color:var(--ch-muted); font-size:11px; font-weight:400; }

@media (max-width: 760px) {
  .library-v19-company-hero { grid-template-columns:1fr; gap:24px; min-height:0; padding:24px 18px; border-radius:14px; }
  .library-v19-company-brand { gap:14px; }
  .library-v19-company-brand>span { width:52px; height:52px; flex-basis:52px; border-radius:16px; font-size:17px; }
  .library-v19-company-brand h2 { margin-top:5px; font-size:29px; }
  .library-v19-company-brand p { font-size:13px; }
  .library-v19-company-facts { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .library-v19-company-facts>div { display:flex; flex-direction:column; justify-content:center; min-height:74px; padding:9px 6px; text-align:center; }
  .library-v19-company-facts strong { font-size:13px; }
  .library-v19-company-facts span { font-size:9px; line-height:1.3; }
  .library-v19-company-history { padding:26px 18px 30px; border-radius:14px; }
  .library-v19-company-history h2,.library-v19-company-values h2 { font-size:21px; }
  .library-v19-company-timeline-scroll { margin-top:26px; overflow:visible; }
  .library-v19-company-timeline { display:block; min-width:0; min-height:0; padding-left:26px; }
  .library-v19-company-timeline::before { left:12px; right:auto; top:8px; bottom:8px; width:2px; height:auto; transform:none; }
  .library-v19-company-milestone,.library-v19-company-milestone.is-lower { display:grid; grid-template-columns:1fr; grid-template-rows:auto; min-height:132px; padding:0 0 24px 22px; }
  .library-v19-company-copy,.library-v19-company-milestone.is-lower .library-v19-company-copy { grid-row:1; align-self:start; min-height:0; padding:0; text-align:left; }
  .library-v19-company-marker { position:absolute; top:0; left:-41px; width:36px; height:36px; border-width:5px; }
  .library-v19-company-marker .library-v11-icon { width:15px; height:15px; }
  .library-v19-company-copy strong { font-size:17px; }
  .library-v19-company-copy .library-v19-company-type { min-height:0; margin-bottom:3px; font-size:9px; }
  .library-v19-company-copy h3 { font-size:14px; }
  .library-v19-company-copy p { font-size:11px; }
  .library-v19-company-values { padding:25px 18px; border-radius:14px; }
  .library-v19-company-values>div,.library-v19-company-links { grid-template-columns:1fr; }
}

/* Non-admin inventory information stays visually sealed until the server has
   accepted the browser's GPS position for the user's department policy. */
.page.corehub-location-gated-v11 > :not(.corehub-location-block-v11) {
  display: none !important;
}
.page.corehub-location-gated-v11 > .corehub-location-block-v11 {
  display: block !important;
  margin: 28px;
}

/* Library list controls: Arrange belongs with search, not in an empty row. */
#corehub-library-root-v11 .library-v31-search-with-controls {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 12px;
  height: auto;
  min-height: 58px;
  margin-bottom: 14px !important;
  padding: 6px 8px 6px 14px !important;
}
#corehub-library-root-v11 .library-v31-search-with-controls .library-v18-history-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ch-muted-2);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
#corehub-library-root-v11 .library-v31-search-with-controls .library-v18-history-sort select {
  width: 174px;
  min-height: 42px !important;
  margin: 0;
  text-transform: none;
}
@media (max-width: 700px) {
  #corehub-library-root-v11 .library-v31-search-with-controls {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    padding: 8px 10px !important;
  }
  #corehub-library-root-v11 .library-v31-search-with-controls .library-v18-history-sort {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: 7px;
    border-top: 1px solid var(--ch-line);
  }
  #corehub-library-root-v11 .library-v31-search-with-controls .library-v18-history-sort select {
    width: min(190px, 65vw);
  }
}

/* Canonical Operations header location control. Location Scope is always the
   right-most fixed-size control; optional page actions sit to its left. */
.ops-page-head-actions {
  align-items: flex-end !important;
  flex-wrap: nowrap;
}
.ops-page-head-actions > .ops-btn {
  flex: 0 0 auto;
  height: 44px;
  min-height: 44px !important;
}
.ops-location-select {
  flex: 0 0 250px;
  width: 250px;
  min-width: 250px !important;
}
.ops-location-select select,
.ops-location-readonly {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ch-line-strong);
  border-radius: 8px;
  background: var(--ch-surface);
  color: var(--ch-text);
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}
.ops-location-readonly { cursor: default; }
.corehub-operation-location-v11 {
  width: 250px;
  min-width: 250px;
  margin-left: auto;
}
.corehub-operation-location-v11 > span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.corehub-operation-location-v11 select,
.corehub-operation-location-v11 .dashboard-location-lock-value {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ch-line-strong);
  border-radius: 8px;
  background: var(--ch-surface);
  color: var(--ch-text);
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 500;
}
@media (max-width: 820px) {
  .ops-page-head-actions {
    align-items: stretch !important;
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .ops-location-select {
    order: -1;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0 !important;
  }
  .ops-page-head-actions > .ops-btn { width: 100%; }
  .corehub-operation-location-v11 {
    width: 100%;
    min-width: 0;
  }
}

/* Application shell — matches the live OMS: compact rail, 64px topbar and a
   full-width working canvas. CoreHub keeps its own functional routes. */
.drawer { width: 204px !important; background: var(--ch-surface) !important; border-right: 1px solid var(--ch-line) !important; }
.drawer-header { min-height: 64px; padding: 0 20px !important; border-bottom: 0 !important; }
.drawer-header .brand { display: flex; align-items: center; gap: 10px; color: var(--ch-text) !important; text-decoration: none; }
.drawer-header .brand > span:last-child { display: grid; gap: 2px; line-height: 1; }
.drawer-header .brand strong { font-size: 13px; font-weight: 760; letter-spacing: .025em; }
.drawer-header .brand small { color: var(--ch-muted); font-size: 10px; font-weight: 600; }
.corehub-brand-wordmark { display: block; width: 146px; height: auto; max-height: 42px; object-fit: contain; }
.topbar { min-height: 64px !important; height: 64px !important; background: rgba(255,255,255,.96) !important; border-bottom: 1px solid var(--ch-line) !important; }
.corehub-topbar-context { display: flex; flex-direction: row; align-items: center; min-width: 0; margin-left: 16px; }
.corehub-topbar-context strong { color: var(--ch-text); font-size: 15px; font-weight: 700; }
.corehub-mobile-home { display: none; }
.topbar-right { display: flex !important; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.topbar-clock, .corehub-hidden-location-picker { display: none !important; }
.corehub-bell { position: relative; display: grid; place-items: center; width: 40px; min-width: 40px; height: 40px; flex: 0 0 40px; padding: 0; border: 1px solid var(--ch-line); border-radius: 8px; background: var(--ch-surface); color: var(--ch-text-control); cursor: pointer; }
.corehub-bell svg { width: 20px; height: 20px; }
.corehub-bell:hover, .corehub-bell:focus-visible { border-color: var(--ch-line-primary); background: var(--ch-primary-soft); color: var(--ch-primary-hover); }
.corehub-notification-count { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border: 2px solid var(--ch-surface); border-radius: 999px; background: var(--ch-primary); color: var(--ch-surface); font-size: 9px; font-weight: 750; line-height: 12px; }
.corehub-profile-btn { display: inline-flex; align-items: center; gap: 8px; min-width: 204px; height: 40px; min-height: 40px; max-width: 252px; padding: 4px 9px 4px 5px; border: 1px solid var(--ch-line); border-radius: 8px; background: var(--ch-surface); color: var(--ch-text); text-align: left; cursor: pointer; }
.corehub-profile-btn:hover, .corehub-profile-btn:focus-visible { border-color: var(--ch-line-primary); background: var(--ch-primary-subtle); }
.corehub-profile-btn > svg { width: 16px; height: 16px; flex: 0 0 auto; margin-left: auto; }
.corehub-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid var(--ch-avatar-border); border-radius: 999px; background: var(--ch-avatar-surface); color: var(--ch-primary-hover); font-size: 11px; font-weight: 700; }
.corehub-profile-copy { display: grid; min-width: 0; flex: 1; }
.welcome-name { overflow: hidden; color: var(--ch-text); font-size: 12px; font-weight: 650; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.corehub-role-chip { min-height: 20px; padding: 2px 6px; border: 1px solid var(--ch-role-border); border-radius: 999px; color: var(--ch-role-text); background: var(--ch-surface); font-size: 9px; font-weight: 750; line-height: 14px; }

.drawer-nav { padding: 18px 8px 88px !important; }
.core-nav-label { margin: 0 4px 7px; color: var(--ch-muted-2); font-size: 10px; font-weight: 560; letter-spacing: 0; text-transform: none; }
.core-nav-label-spaced { margin-top: 22px; }
.nav-item, .nav-group-header { display: flex; align-items: center; min-height: 36px; width: 100%; gap: 9px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ch-text-control); font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.nav-item:hover, .nav-group-header:hover { background: var(--ch-primary-subtle) !important; color: var(--ch-text); }
.nav-item.active { background: #f6f6f6 !important; color: var(--ch-text) !important; font-weight: 600; }
.nav-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; }
.nav-icon svg { width: 20px; height: 20px; }
.nav-group-header .nav-arrow { display: grid; place-items: center; width: 20px; height: 20px; margin-left: auto; color: var(--ch-muted); transition: transform .16s ease; }
.nav-group-header .nav-arrow svg { width: 16px; height: 16px; }
.nav-group.expanded .nav-arrow { transform: rotate(90deg); }
.nav-group-items { display: none; padding: 2px 0 3px 34px; }
.nav-group.expanded .nav-group-items { display: grid; }
.nav-sub { min-height: 40px; padding-left: 14px; font-size: 12px; }
.drawer-footer { bottom: 0; padding: 12px 8px 16px !important; border-top: 0; background: var(--ch-surface); }
.drawer-footer .ghost-btn { display: flex; justify-content: flex-start; width: 100%; min-height: 36px; border: 0; background: transparent; color: var(--ch-primary); text-align: left; }
.drawer-footer .ghost-btn:hover { background: var(--ch-primary-subtle); }
.corehub-mobile-nav { display: none; }
.corehub-mobile-workspace-nav { display: none; }

.page-area { min-height: calc(100vh - 64px); padding: 32px !important; }
.page-area > .page { width: 100%; max-width: none; margin: 0; }
.corehub-page-head, .ops-page-head, .library-v11-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.corehub-page-head h1, .ops-page-head h1, .library-v11-head h1 { margin: 0; color: var(--ch-text) !important; font-size: 27px !important; font-weight: 650; line-height: 1.25; letter-spacing: -.025em; }
.corehub-page-head p, .ops-page-head p, .library-v11-head p { margin: 6px 0 0; color: var(--ch-muted) !important; font-size: 13px; line-height: 1.5; }
.hub-eyebrow, .corehub-kicker { color: var(--ch-primary-hover) !important; font-size: 10px !important; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }

/* Inputs, buttons, cards and modal shells share the Penpot component geometry. */
.primary-btn, .refresh, .ops-btn.primary, .library-v11-admin-actions .primary-btn { min-height: 38px !important; padding: 0 14px !important; border: 1px solid var(--ch-primary) !important; border-radius: 6px !important; background: var(--ch-primary) !important; box-shadow: none !important; color: var(--ch-surface) !important; font-weight: 650 !important; }
.primary-btn:hover, .refresh:hover, .ops-btn.primary:hover, .library-v11-admin-actions .primary-btn:hover { border-color: var(--ch-primary-hover) !important; background: var(--ch-primary-hover) !important; }
.ghost-btn, .ops-btn, .page-area button.ghost-btn, .modal button.ghost-btn { min-height: 38px !important; padding: 0 13px; border: 1px solid var(--ch-line-strong) !important; border-radius: 6px !important; background: var(--ch-surface) !important; color: var(--ch-text-strong) !important; font-weight: 600; }
.ops-btn.small { min-height: 32px !important; padding: 0 10px !important; font-size: 11px !important; }
.ghost-btn:hover, .ops-btn:hover { border-color: var(--ch-line-primary) !important; background: var(--ch-primary-subtle) !important; }
input, select, textarea, .ops-input, .ops-select, .ops-textarea, .ops-location-select select { border-color: var(--ch-line-strong) !important; border-radius: 8px !important; background: var(--ch-surface) !important; color: var(--ch-text) !important; box-shadow: none !important; }
input, select, .ops-input, .ops-select, .ops-location-select select { min-height: 44px !important; }
textarea, .ops-textarea { min-height: 96px; }
input:focus, select:focus, textarea:focus, .ops-input:focus, .ops-select:focus, .ops-textarea:focus { outline: var(--ch-focus-ring) !important; outline-offset: 0; border-color: var(--ch-focus-border) !important; }
.ops-panel, .ops-summary-card, .ops-entry-card, .ops-report-card, .library-v11-panel, .library-v11-list-panel, .library-v11-resource-card, .library-v11-dept-resource-card, .library-v11-department-card { border-color: var(--ch-line) !important; border-radius: var(--ch-radius) !important; box-shadow: var(--ch-shadow) !important; }

.library-v15-collection-divider {
  grid-column: 1 / -1;
  min-height: 42px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff7f4;
  border-top: 1px solid #f6d8cf;
  border-bottom: 1px solid #f6d8cf;
  color: #15233d;
}

/* Stock Overview uses the same scan-first listing on desktop and mobile:
   SKU | Item | Min Qty | Available Qty | actions. */
[data-page-content="inventory"] .ops-overview-list-tools {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--ch-line-subtle);
}
[data-page-content="inventory"] .ops-overview-list-tools strong {
  color: var(--ch-muted);
  font-size: 10px;
  letter-spacing: .055em;
  text-transform: uppercase;
}
[data-page-content="inventory"] .ops-overview-list-tools .ops-btn { min-height: 30px; }
[data-page-content="inventory"] .ops-overview-table { min-width: 620px; table-layout: fixed; }
[data-page-content="inventory"] .ops-overview-table th,
[data-page-content="inventory"] .ops-overview-table td { padding-block: 10px; }
[data-page-content="inventory"] .ops-overview-table th:nth-child(2) { width: 110px; }
[data-page-content="inventory"] .ops-overview-table th:nth-child(4),
[data-page-content="inventory"] .ops-overview-table th:nth-child(5) { width: 120px; text-align: center; }
[data-page-content="inventory"] .ops-overview-table th:last-child { width: 58px; }
[data-page-content="inventory"] .ops-overview-table .ops-minimum-cell,
[data-page-content="inventory"] .ops-overview-table .ops-available-cell { text-align: center; }
[data-page-content="inventory"] .ops-overview-table .ops-desktop-minimum,
[data-page-content="inventory"] .ops-overview-table .ops-desktop-stock-available { font-size: 13px; }
[data-page-content="inventory"] .ops-overview-table .ops-stock-position { display: block; min-width: 0; }
[data-page-content="inventory"] .ops-overview-table .ops-actions-cell { text-align: center; }
[data-page-content="inventory"] .ops-overview-table .ops-overview-actions { display: flex; justify-content: center; }
[data-page-content="inventory"] .ops-overview-table .ops-overview-more {
  display: inline-grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  place-items: center;
  font-size: 19px;
  line-height: 1;
}
[data-page-content="inventory"] .ops-overview-table .ops-select-cell { display: none !important; }
@media (min-width: 701px) {
  [data-page-content="inventory"].ops-overview-select-mode .ops-overview-table th.ops-select-cell,
  [data-page-content="inventory"].ops-overview-select-mode .ops-overview-table td.ops-select-cell { display: table-cell !important; }
  [data-page-content="inventory"].ops-overview-select-mode .ops-overview-table th.ops-select-cell { width: 44px; }
}
[data-page-content="inventory"] .ops-overview-table tr[data-stock-status="out_of_stock"] .ops-available-value { color: #c2413b; }
[data-page-content="inventory"] .ops-overview-table tr[data-stock-status="low_stock"] .ops-available-value { color: #c56a16; }
[data-page-content="inventory"] .ops-overview-table tr[data-stock-status="normal"] .ops-available-value { color: #0f8f83; }

.ops-overview-menu {
  position: fixed;
  z-index: 1400;
  display: grid;
  width: 160px;
  padding: 5px;
  border: 1px solid var(--ch-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 29, 58, .18);
}
.ops-overview-menu button {
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ch-text-control);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.ops-overview-menu button:hover,
.ops-overview-menu button:focus-visible { background: var(--ch-surface-soft); outline: 0; }

@media (max-width: 700px) {
  [data-page-content="inventory"] .ops-overview-table { min-width: 0 !important; }
  [data-page-content="inventory"] .ops-overview-table thead { display: none !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) 48px 52px 30px !important;
    grid-template-areas: "sku item minimum available more" !important;
    align-items: center !important;
    gap: 4px !important;
    min-height: 48px !important;
    padding: 4px 8px !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td { padding: 2px 0 !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(2) { grid-area: sku !important; display: block !important; font-size: 10px; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(3) { grid-area: item !important; display: block !important; overflow: hidden; font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-minimum-cell { grid-area: minimum !important; display: block !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-available-cell { grid-area: available !important; display: block !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-available-cell > .ops-stock-position { display: block !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-actions-cell { grid-area: more !important; display: block !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td.ops-actions-cell:nth-child(6) { display: block !important; width: 30px !important; padding: 0 !important; }
  [data-page-content="inventory"] .ops-overview-table .ops-desktop-minimum,
  [data-page-content="inventory"] .ops-overview-table .ops-desktop-stock-available { display: none !important; }
  [data-page-content="inventory"] .ops-overview-table .ops-mobile-stock-metric {
    display: grid !important;
    grid-template-rows: 10px 16px;
    align-items: center;
    justify-items: center;
    width: 100%;
    line-height: 1;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-mobile-stock-metric > span {
    color: var(--ch-muted-2);
    font-size: 7px;
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-mobile-stock-metric > strong { font-size: 12px; line-height: 1; }
  [data-page-content="inventory"] .ops-overview-table .ops-overview-actions { width: 30px !important; }
  [data-page-content="inventory"] .ops-overview-table .ops-overview-more { width: 30px; min-width: 30px; height: 30px; min-height: 30px; }

  .ops-overview-dialog { align-items: end; padding: 0; }
  .ops-overview-dialog .ops-modal-card,
  .ops-overview-dialog .ops-modal-card.narrow {
    width: 100%;
    max-width: none;
    max-height: min(88dvh, 760px);
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
  }
  .ops-overview-dialog .ops-modal-close { top: 12px; right: 12px; width: 34px; height: 34px; }
  .ops-overview-dialog .ops-modal-card h2 { padding-right: 42px; font-size: 20px; }
  .ops-overview-dialog .ops-modal-card > p { margin: 4px 38px 14px 0; font-size: 11px; line-height: 1.4; }
  .ops-overview-dialog .ops-adjustment-context { grid-template-columns: 1fr; gap: 6px; margin: 10px 0; }
  .ops-overview-dialog .ops-adjustment-context > div { padding: 8px 10px; }
  .ops-overview-dialog .ops-field-row { grid-template-columns: 1fr; gap: 9px; margin-bottom: 9px; }
  .ops-overview-dialog .ops-input,
  .ops-overview-dialog .ops-select { min-height: 40px; }
  .ops-overview-dialog .ops-textarea { min-height: 70px; }
  .ops-overview-dialog .ops-form-actions { position: sticky; bottom: 0; margin: 12px -16px -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; }
}

/* Batch Sales Order Out: compact shared fields, listing rows and atomic-stock warning. */
.ops-modal-card.ops-batch-order-dialog { width: min(1040px, calc(100vw - 32px)) !important; padding: 22px !important; }
.ops-batch-order-form { display: block; }
.ops-batch-order-heading { padding-right: 44px; }
.ops-batch-order-heading h2 { margin: 0 0 4px; }
.ops-batch-order-heading p { margin: 0; color: var(--ch-muted); font-size: 12px; line-height: 1.45; }
.ops-batch-shared-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 16px 0 14px; }
.ops-batch-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--ch-line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--ch-surface-raised); }
.ops-batch-list-head strong { font-size: 13px; }
.ops-batch-list-head span { color: var(--ch-muted); font-size: 10px; }
.ops-batch-order { border: 1px solid var(--ch-line); border-top: 0; background: #fff; }
.ops-batch-order:last-child { border-radius: 0 0 10px 10px; }
.ops-batch-order-row { display: grid; grid-template-columns: 28px 1.05fr 1fr .85fr .9fr 38px 38px; gap: 8px; align-items: end; padding: 10px; }
.ops-batch-order-number { display: grid; place-items: center; align-self: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ch-primary-soft); color: var(--ch-primary-hover); font-size: 11px; font-weight: 800; }
.ops-batch-order-row .ops-field { gap: 4px; }
.ops-batch-order-row .ops-input,.ops-batch-order-row .ops-select,.ops-batch-items .ops-input,.ops-batch-items .ops-select { min-height: 36px !important; padding: 6px 9px !important; font-size: 12px; }
.ops-batch-expand,.ops-batch-remove-order { width: 38px !important; min-width: 38px !important; min-height: 36px !important; }
.ops-batch-items { padding: 0 10px 10px 46px; }
.ops-batch-item-head,.ops-batch-item-row { display: grid; grid-template-columns: minmax(230px,1.55fr) 70px 115px minmax(180px,1fr) 38px; gap: 8px; align-items: end; }
.ops-batch-item-head { padding: 6px 0; color: var(--ch-muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ops-batch-item-row { padding: 7px 0; border-top: 1px solid var(--ch-line); }
.ops-batch-item-row label { display: grid; gap: 4px; min-width: 0; }
.ops-batch-item-row label > span { display: none; color: var(--ch-muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.ops-batch-add-item { margin-top: 7px; }
.ops-batch-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; }
.ops-batch-actions > div { display: flex; gap: 8px; }
.ops-batch-action { width: 132px !important; min-width: 132px !important; height: 40px !important; min-height: 40px !important; padding: 0 12px !important; }
.ops-batch-action.add { border-color: #b8d8c7; background: #edf8f2; color: #18764a; }
.ops-stock-shortage-modal { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 18px; background: rgba(37,38,41,.48); backdrop-filter: blur(2px); }
.ops-stock-shortage-modal > section { position: relative; width: min(620px,calc(100vw - 30px)); max-height: calc(100dvh - 30px); overflow: auto; padding: 24px; border: 1px solid #f0c8c4; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(37,38,41,.24); }
.ops-stock-shortage-modal h2 { margin: 0 44px 5px 0; color: #b4362d; }
.ops-stock-shortage-modal > section > p { margin: 0 0 16px; color: var(--ch-muted); font-size: 12px; }
.ops-shortage-list { overflow: hidden; border: 1px solid var(--ch-line); border-radius: 9px; }
.ops-shortage-head,.ops-shortage-row { display: grid; grid-template-columns: minmax(0,1fr) 86px 86px; gap: 10px; align-items: center; padding: 10px 12px; }
.ops-shortage-head { background: #fff7f4; color: #986156; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.ops-shortage-row + .ops-shortage-row { border-top: 1px solid var(--ch-line); }
.ops-shortage-row small { display: block; margin-top: 2px; color: var(--ch-muted); }
.ops-shortage-row b { color: #c23f34; text-align: center; }

@media (max-width: 760px) {
  .ops-modal-card.ops-batch-order-dialog { width: calc(100vw - 16px) !important; max-height: calc(100dvh - 16px) !important; padding: 16px 12px !important; }
  .ops-batch-shared-fields { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ops-batch-list-head span { display: none; }
  .ops-batch-order-row { grid-template-columns: 26px minmax(0,1fr) minmax(0,1fr) 34px; gap: 7px; padding: 9px 8px; }
  .ops-batch-order-row .ops-field:nth-of-type(1),.ops-batch-order-row .ops-field:nth-of-type(2) { grid-column: span 1; }
  .ops-batch-order-row .ops-field:nth-of-type(3) { grid-column: 2; }
  .ops-batch-order-row .ops-field:nth-of-type(4) { grid-column: 3; }
  .ops-batch-order-number { grid-row: 1 / span 2; }
  .ops-batch-expand { grid-column: 4; grid-row: 1; }
  .ops-batch-remove-order { grid-column: 4; grid-row: 2; }
  .ops-batch-items { padding: 0 8px 9px 41px; }
  .ops-batch-item-head { display: none; }
  .ops-batch-item-row { grid-template-columns: minmax(0,1.5fr) 64px 98px 34px; gap: 6px; }
  .ops-batch-item-row label > span { display: block; }
  .ops-batch-item-row label:nth-child(4) { grid-column: 1 / 4; }
  .ops-batch-item-row button { grid-column: 4; grid-row: 1; }
  .ops-batch-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: 6px; }
  .ops-batch-actions > div { display: contents; }
  .ops-batch-action { width: 100% !important; min-width: 0 !important; font-size: 11px; }
  .ops-shortage-head,.ops-shortage-row { grid-template-columns: minmax(0,1fr) 64px 64px; padding: 9px; }
}
.library-v15-collection-divider strong { font-size: 14px; font-weight: 750; }
.library-v15-collection-divider span { font-size: 13px; color: #7b879d; }

.library-v15-document-fields {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--ch-line);
  border-radius: var(--ch-radius);
  background: #fffaf8;
}
.library-v15-document-fields[hidden] { display: none !important; }
.library-v15-document-fields > div:first-child { display: grid; gap: 3px; margin-bottom: 12px; }
.library-v15-document-fields strong { font-size: 14px; }
.library-v15-document-fields small { color: #718096; font-size: 13px; line-height: 1.45; }
.library-v15-document-controls { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
.library-v15-document-controls label { display: grid; min-width: 0; gap: 7px; font-size: 13px; font-weight: 650; }
.library-v15-document-controls select,
.library-v15-document-controls input { box-sizing: border-box; min-width: 0; width: 100%; height: 44px !important; min-height: 44px !important; border: 1px solid var(--ch-line-strong); border-radius: 8px; background: #fff; }
.library-v15-document-controls input[type=file] { overflow: hidden; padding: 5px 7px; color: #637087; font-size: 13px; line-height: 32px; white-space: nowrap; text-overflow: ellipsis; }
.library-v15-document-controls input[type=file]::file-selector-button { height: 32px; margin-right: 10px; padding: 0 12px; border: 0; border-radius: 6px; background: #fff1ed; color: #c84f38; font: inherit; font-weight: 700; cursor: pointer; }
.library-v15-document-upload span { box-sizing: border-box; display: flex; align-items: center; min-height: 44px; padding: 8px 11px; border: 1px solid var(--ch-line); border-radius: 8px; background: #fff; color: #637087; font-size: 13px; font-weight: 500; }
@media (max-width: 767px) { .library-v15-document-controls { grid-template-columns: 1fr; } }

/* Dashboard: compact real-status strip + two full-width primary feeds. */
.dashboard-v11-head { align-items: end; }
.dashboard-location-control { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 12px; grid-template-areas: "label label" "location gps"; align-items: center; width: 250px; min-width: 250px; gap: 5px 0; padding: 0; border: 0; background: transparent; }
.dashboard-location-label { grid-area: label; color: var(--ch-muted-2); font-size: 9px; font-weight: 720; letter-spacing: .05em; line-height: 12px; text-transform: uppercase; }
.dashboard-location-control select { grid-area: location / location / location / gps; box-sizing: border-box; width: 100%; min-width: 0; height: 44px; min-height: 44px !important; padding: 0 34px 0 12px; border: 1px solid var(--ch-line-strong) !important; border-radius: 8px; background: var(--ch-surface); font-size: 12px; font-weight: 500; line-height: 1.2; outline: 0 !important; text-overflow: ellipsis; }
.dashboard-location-lock strong { grid-area: location / location / location / gps; box-sizing: border-box; display:flex; align-items:center; min-width:0; height:44px; padding:0 34px 0 12px; overflow:hidden; border:1px solid var(--ch-line-strong); border-radius:8px; background:var(--ch-surface); font-size:12px; font-weight:500; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-gps-status { grid-area: gps; z-index:1; display: block; width: 10px; height: 10px; min-height: 0; margin-right:12px; padding: 0; border-radius: 999px; box-shadow: 0 0 0 3px var(--ch-surface); }
.dashboard-gps-status.detected { background: #14b8a6; }
.dashboard-gps-status.mismatch { background: var(--ch-danger); }
.dashboard-gps-status.unavailable, .dashboard-gps-status.checking { background: #f59e0b; }
.dashboard-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.dashboard-summary-card { display: flex; align-items: center; min-height: 110px; gap: 12px; padding: 22px 24px; border: 1px solid var(--ch-line); border-radius: 12px; background: var(--ch-surface); box-shadow: 0 1px 2px rgba(0,0,0,.08); color: var(--ch-text); text-align: left; }
.dashboard-summary-card > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; }
.dashboard-summary-card > span svg { width: 20px; height: 20px; }
.dashboard-summary-card.coral > span, .dashboard-summary-card.orange > span { background: var(--ch-primary-soft); color: var(--ch-primary-hover); }
.dashboard-summary-card.stock > span, .dashboard-summary-card.red > span { background: var(--ch-warning-soft); color: var(--ch-warning); }
.dashboard-summary-card.purple > span { background: var(--ch-info-soft); color: var(--ch-info); }
.dashboard-summary-card.blue > span { background: var(--ch-primary-soft); color: var(--ch-primary-hover); }
.dashboard-summary-card small { display: block; color: var(--ch-muted); font-size: 11px; }
.dashboard-summary-card strong { display: block; margin: 4px 0 0; color: var(--ch-text); font-size: 23px; line-height: 1.15; }
.dashboard-summary-card p { margin: 0; color: var(--ch-muted-2); font-size: 11px; }
.dashboard-summary-card > svg, .dashboard-summary-card > b { width: 18px; height: 18px; margin-left: auto; color: var(--ch-muted-2); }
.dashboard-main-grid, .dashboard-primary-feeds { display: block !important; }
.dashboard-side-rail .dashboard-panel-stock { display: none !important; }
.dashboard-panel { margin-bottom: 20px; padding: 20px; border: 1px solid var(--ch-line) !important; border-radius: var(--ch-radius) !important; background: var(--ch-surface) !important; box-shadow: var(--ch-shadow) !important; overflow: hidden; }
.dashboard-panel header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dashboard-panel header > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dashboard-panel header > div > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--ch-primary-soft); color: var(--ch-primary-hover); }
.dashboard-panel header > div > span svg { width: 18px; height: 18px; }
.dashboard-panel h2 { margin: 0; color: var(--ch-text); font-size: 17px; font-weight: 650; }
.dashboard-panel header button { min-width: 148px; min-height: 44px; padding: 0 12px; border: 1px solid var(--ch-line-strong); border-radius: 9px; background: var(--ch-surface); color: var(--ch-text); font-size: 12px; font-weight: 650; }
.dashboard-panel > p { margin: 6px 0 16px 42px; color: var(--ch-muted); font-size: 12px; }
.dashboard-feed-table { margin: 0; overflow: hidden; border: 1px solid var(--ch-line); border-radius: 10px; }
.dashboard-feed-table-head, .dashboard-feed-table button { display: grid; width: 100%; gap: 16px; align-items: center; text-align: left; }
.dashboard-feed-table-head { min-height: 36px; padding: 0 16px; background: var(--ch-surface-raised); border-bottom: 1px solid var(--ch-line); color: var(--ch-muted-2); font-size: 9px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.dashboard-feed-table button { min-height: 44px; padding: 7px 16px; border: 0; border-bottom: 1px solid var(--ch-line-subtle); background: var(--ch-surface); color: var(--ch-text); cursor: pointer; }
.dashboard-feed-table button:last-child { border-bottom: 0; }
.dashboard-feed-table button:hover { background: var(--ch-primary-subtle); }
.dashboard-feed-table strong, .dashboard-feed-table small, .dashboard-feed-table em, .dashboard-feed-table time { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-feed-table strong { font-size: 12px; font-weight: 650; }
.dashboard-feed-table small, .dashboard-feed-table em, .dashboard-feed-table time { margin-top: 2px; color: var(--ch-muted); font-size: 10px; font-style: normal; }
.dashboard-feed-table b { color: var(--ch-muted-2); font-size: 19px; font-weight: 400; }
.dashboard-memo-table .dashboard-feed-table-head, .dashboard-memo-table button { grid-template-columns: minmax(0,1fr) 130px 150px 18px; }
.dashboard-promotion-table .dashboard-feed-table-head, .dashboard-promotion-table button { grid-template-columns: minmax(0,1fr) 130px 150px 18px; }
.dashboard-event-table .dashboard-feed-table-head, .dashboard-event-table button { grid-template-columns: 100px minmax(230px,1.2fr) minmax(190px,.85fr) 210px 112px 100px 18px; }
.dashboard-event-state { display: inline-flex; align-items: center; gap:6px; min-height: 20px; padding: 0; background:transparent!important; font-size: 10px; font-style: normal; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.dashboard-event-state::before { content:''; width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:currentColor; }
.dashboard-event-state.next { color: #b45309; }
.dashboard-event-state.soon { color: #2367bb; }
.dashboard-event-state.ongoing {
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #b9dfc9;
  border-radius: 999px;
  background: #eaf7ef !important;
  color: #147443;
}
.dashboard-event-state.ended { color: #7b828e; }
.dashboard-event-mobile-state { display: none; font-style: normal; }
.dashboard-event-mobile-state.next{color:#b45309}.dashboard-event-mobile-state.soon{color:#2367bb}.dashboard-event-mobile-state.ongoing{padding:1px 5px;border-radius:999px;background:#eaf7ef;color:#147443}.dashboard-event-mobile-state.ended{color:#7b828e}
.dashboard-new-badge,.library-v18-new-badge { display: inline-flex!important; align-items: center; width: auto!important; margin: 0 0 0 6px!important; padding: 2px 6px; border-radius: 999px; background: #fff0eb; color: var(--ch-primary); font-size: 9px!important; font-style: normal; font-weight: 800; line-height: 1.2; vertical-align: middle; }
.library-v18-history-toolbar { display: flex; justify-content: flex-end; margin: 14px 0 10px; }
.library-v18-history-toolbar label { display: grid; gap: 5px; min-width: 190px; color: var(--ch-muted-2); font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.library-v18-history-toolbar select { min-height: 42px; }
.dashboard-empty { display: grid; place-items: center; min-height: 160px; padding: 24px; color: var(--ch-muted); text-align: center; }
.dashboard-empty-icon { color: var(--ch-primary-hover); }

@media (max-width: 1260px) {
  .dashboard-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Library and organisation reader use the same restrained content hierarchy. */
.library-v11-search { min-height: 44px; border-color: var(--ch-line-strong) !important; border-radius: 9px !important; background: var(--ch-surface) !important; }
.library-v11-search:focus-within { border-color: var(--ch-focus-border) !important; box-shadow: var(--ch-focus-ring) !important; }
.library-v11-resource-card, .library-v11-dept-resource-card, .library-v11-department-card { background: var(--ch-surface) !important; }
.library-v11-resource-card:hover, .library-v11-dept-resource-card:hover, .library-v11-department-card:hover { border-color: var(--ch-line-primary) !important; transform: translateY(-1px); }
.library-v11-resource-card .library-v11-icon, .library-v11-dept-resource-card .library-v11-icon, .library-v11-department-card .library-v11-icon { color: var(--ch-primary-hover) !important; background: var(--ch-primary-soft) !important; }
.library-v11-list-row:hover, .library-v11-update-list button:hover, .library-v11-quick-list button:hover { background: var(--ch-primary-subtle) !important; }
.library-v13-reader-kicker, .library-v13-reader-content a { color: var(--ch-primary-hover) !important; }
.library-v13-reader-aside > section, .library-v13-hierarchy, .library-v13-hierarchy-department { border-color: var(--ch-line) !important; box-shadow: var(--ch-shadow) !important; }
.library-v13-hierarchy-company-mark { background: var(--ch-primary) !important; }
.library-v13-hierarchy-avatar, .library-v13-hierarchy-avatar-image { width: 44px !important; height: 44px !important; border: 1px solid var(--ch-line-strong); background: var(--ch-avatar-surface) !important; object-fit: cover; }

/* Operations: retain all existing API workflows, with a coral-neutral system. */
.ops-page { max-width: none !important; color: var(--ch-text); }
.ops-page-head { margin-bottom: 24px; }
.ops-page-head-actions { align-items: flex-end !important; }
.ops-location-select { min-width: 250px !important; }
.ops-location-select > span, .ops-field > span, .ops-filter > span { color: var(--ch-muted-2) !important; }
.ops-summary-grid { gap: 16px !important; margin-bottom: 20px !important; }
.ops-summary-card { min-height: 88px !important; padding: 16px !important; }
.ops-summary-card strong { color: var(--ch-text) !important; font-size: 21px !important; }
.ops-summary-card p, .ops-summary-card small { color: var(--ch-muted) !important; }
.ops-icon { width: 40px !important; height: 40px !important; border-radius: 10px !important; }
.ops-icon svg { width: 20px !important; height: 20px !important; }
.ops-icon.blue { color: var(--ch-primary-hover) !important; background: var(--ch-primary-soft) !important; }
.ops-icon.green { color: var(--ch-success) !important; background: var(--ch-success-soft) !important; }
.ops-icon.orange { color: var(--ch-warning) !important; background: var(--ch-warning-soft) !important; }
.ops-icon.purple, .ops-icon.cyan { color: var(--ch-info) !important; background: var(--ch-info-soft) !important; }
.ops-icon.red { color: var(--ch-danger) !important; background: var(--ch-danger-soft) !important; }
.ops-toolbar { padding: 16px !important; border-color: var(--ch-line) !important; border-radius: var(--ch-radius) !important; }
.ops-panel-head { padding: 16px 18px !important; border-bottom-color: var(--ch-line) !important; }
.ops-table th { background: var(--ch-surface-raised) !important; color: var(--ch-muted-2) !important; }
.ops-table td { border-bottom-color: var(--ch-line-subtle) !important; color: var(--ch-text-control) !important; }
.ops-table tbody tr:hover td { background: var(--ch-primary-subtle) !important; }
.ops-badge { min-height: 24px; border-radius: 999px; font-weight: 700; }
.ops-badge.normal, .ops-badge.completed, .ops-badge.approved, .ops-badge.matched { background: var(--ch-success-soft) !important; color: var(--ch-success) !important; }
.ops-badge.low_stock, .ops-badge.pending_review, .ops-badge.pending_approval, .ops-badge.approved-pickup { background: var(--ch-warning-soft) !important; color: var(--ch-warning) !important; }
.ops-badge.out_of_stock, .ops-badge.rejected, .ops-badge.cancelled, .ops-badge.variance { background: var(--ch-danger-soft) !important; color: var(--ch-danger) !important; }
.ops-badge.missed, .ops-badge.auto_closed { background: var(--ch-danger-soft) !important; color: var(--ch-danger) !important; }
.ops-badge.pending { background: var(--ch-warning-soft) !important; color: var(--ch-warning) !important; }
.ops-badge.draft, .ops-badge.submitted { background: var(--ch-surface-soft) !important; color: var(--ch-muted) !important; }
.ops-entry-card { min-height: 148px !important; padding: 20px !important; }
.ops-entry-card > span { width: 56px !important; height: 56px !important; border-radius: 12px !important; background: var(--ch-primary-soft) !important; color: var(--ch-primary-hover) !important; }
.ops-entry-card > span svg { width: 26px !important; height: 26px !important; }
.ops-entry-card h2 { font-size: 17px !important; }
.ops-entry-card p { color: var(--ch-muted) !important; }
.ops-report-card { min-height: 176px !important; background: var(--ch-surface) !important; }
.ops-report-card:hover { border-color: var(--ch-line-primary) !important; box-shadow: var(--ch-shadow) !important; }
.ops-report-card b, .ops-link, .ops-insight b { color: var(--ch-primary-hover) !important; }
.ops-modal { background: rgba(37,38,41,.42) !important; }
.ops-modal-card { width: min(880px, calc(100vw - 32px)) !important; max-height: calc(100dvh - 32px) !important; padding: 28px !important; border-color: var(--ch-line) !important; border-radius: 16px !important; box-shadow: 0 24px 70px rgba(37,38,41,.2) !important; }
.ops-modal-card.narrow { width: min(640px, calc(100vw - 32px)) !important; }
.ops-modal-close { width: 40px !important; height: 40px !important; border-color: var(--ch-line) !important; border-radius: 9px !important; }

/* Action controls are allowed to grow or wrap before text can collide with an
   icon, arrow or adjacent table cell.  This also makes the older Operations
   modules inherit the same coral accent instead of their historical blue. */
.ops-page { --ops-blue: var(--ch-primary); --ops-blue-dark: var(--ch-primary-hover); }
.ops-page button, .ops-page input, .ops-page select, .ops-page textarea { min-width: 0; max-width: 100%; }
.ops-btn { gap: 8px; max-width: 100%; overflow-wrap: anywhere; text-align: center; white-space: normal !important; }
.ops-btn > svg, .ops-btn > .nav-icon, .ops-btn .ops-icon, .ops-btn.icon { flex: 0 0 auto; }
.ops-btn.icon { width: 44px; min-width: 44px; padding: 0 !important; overflow: visible; }
.ops-table td { overflow-wrap: anywhere; }
.ops-table td .ops-btn { margin: 2px 4px 2px 0; }
.ops-stock-position { display: grid; min-width: 128px; gap: 2px; }
.ops-stock-position strong { font-size: 13px; white-space: nowrap; }
.ops-stock-position small, .ops-stock-threshold { display: block; margin-top: 2px; color: var(--ch-muted) !important; font-size: 10px; line-height: 15px; white-space: nowrap; }
.ops-overview-actions, .ops-form-actions, .ops-toolbar-actions { min-width: 0; }
.ops-overview-actions .ops-btn, .ops-form-actions .ops-btn, .ops-toolbar-actions .ops-btn { min-width: min-content; }
.ops-line-row > *, .ops-field-row > *, .ops-entry-card > div { min-width: 0; }
.ops-line-row .ops-select, .ops-line-row .ops-input { width: 100%; }
.ops-sign-confirm { display: flex; align-items: flex-start; gap: 9px; min-width: 0; line-height: 1.45; }
.ops-sign-confirm input { flex: 0 0 auto; margin-top: 2px; }
.ops-schedule-note { overflow-wrap: anywhere; }

/* Publish Content is a broad editorial canvas; settings are below, not a rail. */
#library-v13-editor .library-v13-blog-editor { width: min(1180px, calc(100vw - 32px)) !important; height: min(960px, calc(100dvh - 24px)) !important; max-height: calc(100dvh - 24px); padding: 28px !important; overflow: auto !important; border-color: var(--ch-line) !important; border-radius: 16px !important; }
#library-v13-editor .library-v13-editor-layout { display: block !important; height: auto !important; padding: 0 !important; overflow: visible !important; }
#library-v13-editor .library-v13-editor-layout > main { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 16px; width: 100%; padding: 0 !important; overflow: visible !important; }
#library-v13-editor .library-v13-editor-layout > main > :nth-child(3), #library-v13-editor .library-v13-editor-layout > main > :nth-child(4), #library-v13-editor .library-v13-editor-layout > main > :nth-child(5) { grid-column: 1 / -1; }
#library-v13-editor .library-v13-editor-layout > aside { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; width: 100%; margin-top: 24px; padding: 0 !important; overflow: visible !important; border: 0 !important; }
#library-v13-editor .library-v13-setting-card { min-width: 0; border-color: var(--ch-line) !important; border-radius: 12px !important; background: var(--ch-surface) !important; }
#library-v13-editor .library-v13-signature-card { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; }
#library-v13-editor .library-v13-signature-card ul { grid-column: 1 / -1; margin: 8px 0 0; }
#library-v13-editor .library-v13-rich-editor { border-color: var(--ch-line-strong) !important; border-radius: 10px !important; overflow: hidden; }
#library-v13-editor .library-v13-writing-toolbar { display: flex; align-items: center; min-height: 48px; gap: 4px; padding: 5px 6px; border-bottom: 1px solid var(--ch-line); background: var(--ch-surface-raised); overflow-x: auto; }
#library-v13-editor .library-v13-writing-toolbar select { min-width: 102px; height: 36px; padding: 0 8px; border: 1px solid var(--ch-line) !important; border-radius: 7px !important; background: var(--ch-surface); color: var(--ch-text); font-size: 11px; font-weight: 600; }
#library-v13-editor .library-v13-writing-toolbar select[data-editor-align] { min-width: 112px; }
#library-v13-editor .library-v13-writing-toolbar select[data-editor-font] { min-width: 142px; }
#library-v13-editor .library-v13-writing-toolbar select[data-editor-size] { min-width: 84px; }
#library-v13-editor .library-v13-tool, #library-v13-editor .library-v13-color-tool { display: grid; place-items: center; flex: 0 0 36px; width: 36px; min-width: 36px; height: 36px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--ch-text-control); cursor: pointer; }
#library-v13-editor .library-v13-tool svg, #library-v13-editor .library-v13-color-tool svg { width: 18px; height: 18px; }
#library-v13-editor .library-v13-tool:hover, #library-v13-editor .library-v13-color-tool:hover { background: var(--ch-primary-soft); color: var(--ch-primary-hover); }
#library-v13-editor .library-v13-color-tool { position: relative; overflow: hidden; }
#library-v13-editor .library-v13-color-tool input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0 !important; padding: 0; opacity: 0; cursor: pointer; }
#library-v13-editor .library-v13-toolbar-divider { width: 1px; height: 24px; flex: 0 0 1px; background: var(--ch-line); }
.library-v13-tool-dialog-backdrop { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 18px; background: rgba(15, 23, 42, .48); backdrop-filter: blur(2px); }
.library-v13-tool-dialog { width: min(460px, calc(100vw - 36px)); padding: 24px; border: 1px solid var(--ch-line); border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .24); }
.library-v13-tool-dialog h3, .library-v13-emoji-dialog h3 { margin: 0; font-size: 20px; line-height: 28px; }
.library-v13-tool-dialog label { display: grid; gap: 8px; margin-top: 18px; color: var(--ch-text-control); font-size: 13px; font-weight: 650; }
.library-v13-tool-dialog input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--ch-line-strong); border-radius: 8px; font: inherit; }
.library-v13-tool-dialog > div { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.library-v13-emoji-dialog { width: min(680px, calc(100vw - 36px)); max-height: min(650px, calc(100dvh - 36px)); overflow: hidden; border: 1px solid var(--ch-line); border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .24); }
.library-v13-emoji-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--ch-line); }
.library-v13-emoji-dialog > header p { margin: 2px 0 0; color: var(--ch-muted); font-size: 13px; }
.library-v13-emoji-dialog > nav { display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; border-bottom: 1px solid var(--ch-line); }
.library-v13-emoji-dialog > nav button { min-height: 34px; padding: 0 12px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--ch-text-control); font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.library-v13-emoji-dialog > nav button.active { border-color: var(--ch-primary); background: var(--ch-primary-soft); color: var(--ch-primary-hover); }
.library-v13-emoji-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; max-height: 430px; padding: 14px; overflow-y: auto; }
.library-v13-emoji-grid button { display: grid; place-items: center; min-width: 0; height: 48px; padding: 0; border: 0; border-radius: 8px; background: transparent; font-size: 25px; cursor: pointer; }
.library-v13-emoji-grid button:hover { background: var(--ch-primary-soft); transform: scale(1.08); }
#library-v13-editor .library-v13-rich-body { min-height: 300px !important; padding: 20px !important; color: var(--ch-text); line-height: 1.6; }
#library-v13-editor .library-v11-editor-footer { position: sticky; bottom: -28px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px -28px -28px; padding: 14px 28px; border-top: 1px solid var(--ch-line); background: var(--ch-surface); }
#library-v13-editor .library-v11-editor-footer > div { display: flex; gap: 8px; }

/* Publish Content: one deliberate form grid, with a shared label rhythm and
   controls that remain aligned as cards grow independently. */
#library-v13-editor .library-v13-editor-layout > main { row-gap: 16px; align-content: start; }
#library-v13-editor .library-v13-field { display: grid; grid-template-rows: 14px auto; min-width: 0; gap: 6px; color: var(--ch-text-control); font-size: 10px; font-weight: 700; line-height: 14px; }
#library-v13-editor .library-v13-field > input, #library-v13-editor .library-v13-field > textarea { width: 100%; min-width: 0; margin: 0; border-color: var(--ch-line-strong) !important; border-radius: 8px !important; font-size: 12px; font-weight: 400; }
#library-v13-editor .library-v13-field > input { height: 44px; }
#library-v13-editor .library-v13-field > textarea { min-height: 72px; padding: 11px 12px; resize: vertical; }
#library-v13-editor .library-v13-setting-card { display: flex; flex-direction: column; min-height: 270px; padding: 18px; border: 1px solid var(--ch-line) !important; box-shadow: none !important; }
#library-v13-editor .library-v13-setting-card h4 { min-height: 18px; margin: 0 0 16px; color: var(--ch-text); font-size: 13px; font-weight: 700; line-height: 18px; }
#library-v13-editor .library-v13-setting-card > label, #library-v13-editor .library-v11-form-grid > label { display: grid; grid-template-rows: 14px 42px; min-width: 0; gap: 6px; color: var(--ch-text-control); font-size: 9px; font-weight: 750; letter-spacing: .035em; line-height: 14px; text-transform: uppercase; }
#library-v13-editor .library-v11-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-content: start; gap: 14px; }
#library-v13-editor .library-v13-setting-card select, #library-v13-editor .library-v13-setting-card input:not([type="checkbox"]) { width: 100%; min-width: 0; height: 42px; margin: 0; border-color: var(--ch-line-strong) !important; border-radius: 8px !important; color: var(--ch-text); font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
#library-v13-editor .library-v13-setting-label { margin: 16px 0 8px; color: var(--ch-muted-2); font-size: 9px; font-weight: 750; letter-spacing: .04em; line-height: 14px; text-transform: uppercase; }
#library-v13-editor .library-v11-check-grid { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 7px; }
#library-v13-editor .library-v11-check-grid label { display: inline-flex; align-items: center; min-height: 29px; margin: 0; padding: 5px 8px; border: 1px solid var(--ch-line); border-radius: 6px; color: var(--ch-text-control); font-size: 11px; font-weight: 500; line-height: 17px; text-transform: none; }
#library-v13-editor .library-v13-date-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 16px 0; }
#library-v13-editor .library-v13-date-grid > label { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 14px 42px; min-width: 0; gap: 6px; color: var(--ch-text-control); font-size: 9px; font-weight: 750; letter-spacing: .035em; line-height: 14px; text-transform: uppercase; }
#library-v13-editor .library-v13-date-grid > label > input { grid-column: 1 / -1; grid-row: 2; }
#library-v13-editor .library-v13-inline-check { display: inline-flex; align-items: center; justify-self: end; min-width: 0; gap: 5px; color: var(--ch-primary-hover); font-size: 9px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; }
#library-v13-editor .library-v13-inline-check input[type="checkbox"] { width: 15px; min-width: 15px; height: 15px; margin: 0; }
#library-v13-editor .library-v13-signature-card { min-height: 154px; }
#library-v13-editor .library-v13-signature-card p { margin: 4px 0 0; color: var(--ch-muted); font-size: 11px; line-height: 18px; }
#library-v13-editor .library-v13-signature-card ul { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; padding: 12px; border: 1px solid var(--ch-line); border-radius: 8px; background: var(--ch-surface-raised); color: var(--ch-text-control); font-size: 11px; line-height: 18px; list-style-position: inside; }

/* Personal settings and on-demand popovers. */
.corehub-settings-card { width: min(880px, calc(100vw - 32px)) !important; max-height: calc(100dvh - 32px); border-color: var(--ch-line) !important; border-radius: 16px !important; box-shadow: 0 24px 70px rgba(37,38,41,.2) !important; }
.user-settings-section { border-color: var(--ch-line) !important; }
.user-settings-icon { color: var(--ch-primary-hover) !important; background: var(--ch-primary-soft) !important; }
.user-settings-switch input:checked + span, .library-v13-switch input:checked + span { background: var(--ch-primary) !important; }
.corehub-popover { position: fixed; z-index: 120; width: min(342px, calc(100vw - 24px)); padding: 10px; border: 1px solid var(--ch-line); border-radius: 12px; background: var(--ch-surface); box-shadow: var(--ch-shadow-popover); }
.corehub-popover header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px; border-bottom: 1px solid var(--ch-line); }
.corehub-popover header strong { color: var(--ch-text); font-size: 13px; }
.corehub-popover header small { display: block; margin-top: 2px; color: var(--ch-muted); font-size: 10px; }
.corehub-popover header button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: transparent; color: var(--ch-muted); font-size: 19px; cursor: pointer; }
.corehub-popover-row { display: flex; width: 100%; min-height: 52px; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--ch-line-subtle); background: var(--ch-surface); color: var(--ch-text); text-align: left; }
.corehub-popover-row:hover { background: var(--ch-primary-subtle); }
.corehub-popover-row.action-required { border-left: 3px solid var(--ch-primary); padding-left: 5px; }
.corehub-popover-row small { display: block; margin-top: 3px; color: var(--ch-muted); font-size: 10px; }
.corehub-notification-section { padding: 6px 0 0; }
.corehub-notification-section + .corehub-notification-section { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--ch-line); }
.corehub-notification-section h4 { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 4px 8px 7px; color: var(--ch-primary-hover); font-size: 10px; font-weight: 750; letter-spacing: .02em; text-transform: uppercase; }
.corehub-notification-section h4 b { display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--ch-primary); color: #fff; font-size: 9px; }
.corehub-notification-section.important h4 { color: var(--ch-text-control); }
.corehub-popover-row { gap: 9px; align-items: flex-start; }
.corehub-popover-row > i { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 5px; border-radius: 999px; background: var(--ch-line-strong); }
.corehub-popover-row.action > i { background: var(--ch-primary); }
.corehub-popover-row.important > i { background: #d78b19; }
.corehub-popover-row > span { min-width: 0; }
.corehub-popover-actions { display: grid; gap: 4px; padding-top: 6px; }
.corehub-popover-actions button { min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--ch-surface); color: var(--ch-text); font-size: 12px; text-align: left; cursor: pointer; }
.corehub-popover-actions button:hover { background: var(--ch-primary-subtle); }

/* Login follows the approved Penpot layout while keeping the existing auth API. */
#login-screen.active { position: relative; overflow: hidden; min-height: 100dvh; padding: 24px; background: #fbfaf8 !important; isolation: isolate; }
#login-screen.active::before, #login-screen.active::after { position: fixed; z-index: -1; width: 240px; height: 240px; content: ""; opacity: .72; background-image: radial-gradient(circle, rgba(40,100,237,.20) 1.35px, transparent 1.5px); background-size: 18px 18px; pointer-events: none; }
#login-screen.active::before { top: 0; right: 0; transform: translate(36%, -22%); }
#login-screen.active::after { bottom: 0; left: 0; transform: translate(-36%, 22%); }
.login-card { position: relative; z-index: 1; width: min(420px, calc(100vw - 32px)) !important; max-width: 420px !important; padding: 34px 32px 30px !important; border: 1px solid var(--ch-line) !important; border-radius: 16px !important; background: var(--ch-surface) !important; box-shadow: 0 18px 48px rgba(41,44,52,.10) !important; }
.login-brand-lockup { display: flex; align-items: center; justify-content: center; min-height: 38px; margin: 0 0 14px; }
.login-brand-lockup img { display: block; width: 158px; height: auto; max-height: 40px; object-fit: contain; }
.login-card h1 { margin: 0; color: var(--ch-text) !important; font-size: 24px; font-weight: 700; letter-spacing: -.03em; text-align: center; }
.login-card .subtitle { margin: 8px 0 25px; color: var(--ch-muted); font-size: 12px; line-height: 20px; text-align: center; }
.login-card .subtitle span { padding: 0 4px; color: #aeb8c8; }
.login-card label { color: var(--ch-text-control); font-size: 12px; font-weight: 650; }
.login-card .login-input-wrap input { min-height: 50px !important; height: 50px !important; border-color: var(--ch-line-strong) !important; border-radius: 9px !important; font-size: 13px !important; }
.login-card .login-input-wrap input:focus { border-color: var(--ch-primary) !important; box-shadow: 0 0 0 3px rgba(240,118,90,.13) !important; }
#login-screen .login-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; margin: 8px 0 10px; }
#login-screen .login-options .remember-option { display: inline-flex; align-items: center; gap: 8px; margin: 0 !important; color: var(--ch-text-control); font-size: 12px; font-weight: 500; }
#login-screen .remember-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--ch-primary); }
#login-screen .login-card .login-forgot { width: auto !important; min-height: 36px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--ch-primary) !important; font-size: 12px !important; font-weight: 650 !important; line-height: 1 !important; white-space: nowrap; }
#login-screen .login-card .login-forgot:hover, #login-screen .login-card .login-forgot:focus-visible { background: transparent !important; color: var(--ch-primary-hover) !important; text-decoration: underline; }
#login-screen .login-card #login-btn { width: 100% !important; min-height: 50px; height: 50px; margin: 0 !important; padding: 0 18px !important; border: 0 !important; border-radius: 9px !important; background: var(--ch-primary) !important; box-shadow: none !important; color: #fff !important; font-size: 14px !important; font-weight: 700 !important; }
#login-screen .login-card #login-btn:hover { background: var(--ch-primary-hover) !important; }
#login-screen .login-footer-note { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 26px 0 0; padding-top: 24px; border-top: 1px solid var(--ch-line); color: var(--ch-muted) !important; font-size: 11px; line-height: 18px; text-align: center; }
#login-screen .login-footer-note svg { width: 20px; height: 20px; flex: 0 0 auto; stroke: var(--ch-primary); }
@media (max-width: 520px) { #login-screen.active { padding: 16px; } .login-card { padding: 30px 24px 26px !important; } .login-brand-lockup img { width: 144px; } }

/* The organisation chart is a read-only, complete canvas; administration stays
   in its existing Settings modal so it never crops the staff-facing chart. */
.library-v13-hierarchy { --org-line: var(--ch-line-strong); overflow-x: auto; padding: 28px !important; border-color: var(--ch-line) !important; border-radius: 16px !important; background: var(--ch-surface) !important; box-shadow: var(--ch-shadow) !important; }
.library-v13-hierarchy-company { border-color: var(--ch-line-primary) !important; background: var(--ch-primary-subtle) !important; box-shadow: none !important; }
.library-v13-hierarchy-company-mark { background: var(--ch-primary) !important; }
.library-v13-hierarchy-company h2 { color: var(--ch-text) !important; }
.library-v13-hierarchy-company p, .library-v13-hierarchy-role > small { color: var(--ch-primary-hover) !important; }
.library-v13-hierarchy-director { border-color: var(--ch-line-strong) !important; background: var(--ch-surface) !important; box-shadow: var(--ch-shadow) !important; }
.library-v13-hierarchy-director .library-v13-hierarchy-person strong { color: var(--ch-text) !important; }
.library-v13-hierarchy-director .library-v13-hierarchy-person small { color: var(--ch-muted) !important; }
.library-v13-hierarchy-director-scope { display:block; margin:9px 0 0 56px; padding-top:8px; border-top:1px solid var(--ch-line); color:var(--ch-primary-hover); font-size:10px; font-weight:700; line-height:1.35; }
.library-v13-hierarchy-department { overflow: visible; border-color: var(--ch-line) !important; background: var(--ch-surface) !important; box-shadow: var(--ch-shadow-card) !important; }
.library-v13-hierarchy-department > header { background: var(--ch-primary-subtle) !important; color: var(--ch-text) !important; }
.library-v13-hierarchy-department > header h3 { color: var(--ch-text) !important; }
.library-v13-hierarchy-department > header .library-v11-icon { color: var(--ch-primary-hover) !important; }
.library-v13-hierarchy-avatar, .library-v13-hierarchy-avatar-image { border: 1px solid var(--ch-line-strong) !important; background: var(--ch-avatar-surface) !important; color: var(--ch-primary-hover) !important; box-shadow: none !important; }
.library-v13-hierarchy-department-body > p { border-top-color: var(--ch-line) !important; color: var(--ch-muted) !important; }
.library-v13-hierarchy-shared > header span { border-color: var(--ch-line-primary) !important; background: var(--ch-primary-subtle) !important; color: var(--ch-primary-hover) !important; }

.ops-signature-pad { margin-top: 16px; padding: 13px; border: 1px solid var(--ch-line-primary); border-radius: 10px; background: var(--ch-primary-subtle); }
.ops-signature-pad-head, .ops-signature-pad-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ops-signature-pad-head { margin-bottom: 9px; color: var(--ch-text); font-size: 11px; }
.ops-signature-pad-head span, .ops-signature-pad-foot small { color: var(--ch-muted); font-size: 10px; line-height: 1.4; }
.ops-signature-pad canvas { display: block; width: 100%; height: 150px; border: 1px solid var(--ch-line-strong); border-radius: 8px; background: var(--ch-surface); cursor: crosshair; touch-action: none; }
.ops-signature-pad-foot { margin-top: 9px; }
.ops-signature-pad-foot small { max-width: 440px; }
.ops-signature-image { display: block; width: min(170px, 100%); height: 44px; margin-top: 4px; object-fit: contain; object-position: left center; }
.ops-legacy-signature { display: block; margin-top: 4px; color: var(--ch-muted); font-size: 9px; font-style: normal; line-height: 1.3; }

/* One consistent select affordance: the chevron is 12×8px (2px larger) and
   sits 5px further left than the browser-default edge position.  The extra
   right inset reserves room for it so option text cannot run underneath. */
select:not([multiple]) { appearance: none !important; -webkit-appearance: none !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%2368798c' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 15px center !important; background-size: 12px 8px !important; padding-right: 42px !important; }
.dashboard-location-control select { padding-right: 42px !important; }
#library-v13-editor .library-v13-writing-toolbar select { min-width: 124px; padding: 0 36px 0 10px; }
#library-v13-editor .library-v13-writing-toolbar select[data-editor-align] { min-width: 134px; }
.ops-toolbar .ops-filter { min-width: 176px; }
.ops-toolbar .ops-filter.grow { min-width: 250px; }

.ops-transfer-request-note { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--ch-line-primary); border-radius: 8px; background: var(--ch-primary-subtle); color: var(--ch-text-control); font-size: 11px; line-height: 1.45; }
.ops-warehouse-review-lines { display: grid; gap: 8px; margin: 16px 0; }
.ops-warehouse-review-line { display: grid; grid-template-columns: minmax(0,1fr) minmax(126px,.38fr) auto; align-items: end; gap: 12px; padding: 12px; border: 1px solid var(--ch-line); border-radius: 9px; background: var(--ch-surface-raised); }
.ops-warehouse-review-line strong, .ops-warehouse-review-line small { display: block; }
.ops-warehouse-review-line small { margin-top: 3px; color: var(--ch-muted); font-size: 10px; }
.ops-transfer-progress ol { display: grid; gap: 0; margin: 0; padding: 12px 18px; list-style: none; }
.ops-transfer-progress li { position: relative; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; min-height: 48px; padding: 4px 0; }
.ops-transfer-progress li:not(:last-child)::after { position: absolute; top: 26px; bottom: -4px; left: 8px; width: 1px; background: var(--ch-line-strong); content: ''; }
.ops-transfer-progress li > i { position: relative; z-index: 1; display: block; width: 17px; height: 17px; margin-top: 1px; border: 4px solid var(--ch-surface); border-radius: 999px; background: var(--ch-line-strong); box-shadow: 0 0 0 1px var(--ch-line-strong); }
.ops-transfer-progress li.is-done > i { background: var(--ch-success); box-shadow: 0 0 0 1px var(--ch-success); }
.ops-transfer-progress li.is-current > i { background: var(--ch-primary); box-shadow: 0 0 0 1px var(--ch-primary); }
.ops-transfer-progress li strong, .ops-transfer-progress li small { display: block; }
.ops-transfer-progress li strong { color: var(--ch-text); font-size: 11px; }
.ops-transfer-progress li small { margin-top: 2px; color: var(--ch-muted); font-size: 10px; line-height: 1.4; }
.ops-transfer-notes .ops-panel-body p { margin: 0; color: var(--ch-text-control); font-size: 11px; line-height: 1.5; }

/* Balanced navigation, header controls and inventory side panels. */
#drawer .drawer-nav { padding: 12px 10px 18px !important; }
#drawer .core-nav-label { margin: 18px 0 8px !important; padding: 0 10px !important; font-size: 10px !important; font-weight: 600 !important; line-height: 18px !important; }
#drawer .core-nav-label:first-child { margin-top: 4px !important; }
#drawer .core-nav-label-spaced { margin-top: 24px !important; }
#drawer .nav-item, #drawer .nav-group-header { min-height: 40px !important; margin: 2px 0 !important; padding: 0 10px !important; gap: 12px !important; font-size: 14px !important; font-weight: 550 !important; line-height: 20px !important; }
#drawer .nav-item > span:not(.nav-icon):not(.nav-svg):not(.nav-trailing), #drawer .nav-group-header > .nav-label { display: inline-flex; align-items: center; min-height: 20px; }
#drawer .nav-icon, #drawer .nav-svg { display: grid !important; place-items: center; width: 20px !important; min-width: 20px !important; height: 20px !important; line-height: 1 !important; }
#drawer .nav-icon svg, #drawer .nav-svg svg { width:18px !important; height:18px !important; }
#drawer .nav-arrow { display: grid !important; place-items: center; width: 20px; height: 20px; margin-left: auto; font-size: 19px; line-height: 1; }
#drawer .nav-sub { min-height: 36px !important; padding-left: 40px !important; font-size: 12px !important; }
#drawer .nav-sub::before { width: 4px; height: 4px; margin-left: -15px; margin-right: 11px; }
#drawer .drawer-footer { display: grid !important; gap: 4px; padding: 14px 18px 18px !important; }
#drawer .drawer-footer .ghost-btn { min-height: 36px !important; padding: 0 2px !important; font-size: 13px !important; line-height: 20px !important; text-align: left; }

.topbar-right { min-height: 56px; gap: 10px !important; }
.corehub-bell { align-self: center; }
.corehub-profile-btn { display: grid !important; grid-template-columns: 32px minmax(0,1fr) auto 16px; column-gap: 8px; align-items: center; min-width: 212px; padding: 4px 10px 4px 5px; }
.corehub-profile-btn .corehub-avatar { display: grid; place-items: center; width: 32px; height: 32px; margin: 0; }
.corehub-profile-btn .welcome-name { min-width: 0; line-height: 18px; }
.corehub-profile-btn .corehub-role-chip { margin: 0; justify-self: start; }
.corehub-profile-btn > svg { margin-left: 0; justify-self: end; }

.ops-insight { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; }
.ops-insight .ops-icon { align-self: center; margin: 0; }
.ops-insight > div { min-width: 0; }
.ops-insight strong, .ops-insight span { overflow-wrap: anywhere; }
.ops-insight b { align-self: start; margin: 1px 0 0; }
.ops-activity-row { grid-template-columns: 9px minmax(0,1fr); align-items: start; gap: 9px; }
.ops-activity-row > div { min-width: 0; }
.ops-activity-row strong, .ops-activity-row small { overflow-wrap: anywhere; }
.ops-activity-row time { grid-column: 2; grid-row: 2; justify-self: start; margin-top: 1px; white-space:normal; }

/* Department resources use one honest, readable update list. */
.library-v11-dept-lower-single { grid-template-columns: minmax(0,1fr) !important; }
#corehub-library-root-v11 .library-v11-dept-resource-card strong { font-size: 15px !important; }
#corehub-library-root-v11 .library-v11-dept-resource-card p { font-size: 12px !important; line-height: 1.45; }
#corehub-library-root-v11 .library-v11-dept-resource-card small { font-size: 11px !important; }
#corehub-library-root-v11 .library-v11-dept-lower .library-v11-panel > header h3 { font-size: 14px !important; }
#corehub-library-root-v11 .library-v11-dept-lower .library-v11-update-list strong { font-size: 11px !important; }
#corehub-library-root-v11 .library-v11-dept-lower .library-v11-update-list span, #corehub-library-root-v11 .library-v11-dept-lower .library-v11-update-list time { font-size: 10px !important; }

/* The chart is a transform-only canvas: its original layout stays sharp while
   users zoom or drag it without browser page scrolling. */
.library-v13-hierarchy { overflow: hidden !important; padding: 20px !important; }
.library-v13-hierarchy-controls { display:flex; align-items:center; justify-content:flex-end; gap:6px; margin:0 0 12px; }
.library-v13-hierarchy-controls button { display:grid; place-items:center; min-width:34px; height:32px; padding:0 9px; border:1px solid var(--ch-line-strong); border-radius:7px; background:var(--ch-surface); color:var(--ch-text); font:600 14px/1 inherit; cursor:pointer; }
.library-v13-hierarchy-controls button:hover, .library-v13-hierarchy-controls button:focus-visible { border-color:var(--ch-primary); background:var(--ch-primary-subtle); }
.library-v13-hierarchy-controls output { min-width:38px; font:600 12px/1 inherit; }
.library-v13-hierarchy-controls small { margin-left:8px; color:var(--ch-muted); font-size:10px; }
.library-v13-hierarchy-viewport { position:relative; height:min(780px, calc(100vh - 190px)); min-height:560px; overflow:hidden; border:1px solid var(--ch-line); border-radius:12px; background:linear-gradient(180deg,#fffdfa,#fff 38%); cursor:grab; touch-action:none; }
.library-v13-hierarchy-viewport.is-panning { cursor:grabbing; user-select:none; }
.library-v13-hierarchy-canvas { position:relative; isolation:isolate; width:max(1120px,100%); min-height:780px; padding:10px 16px 54px; transform-origin:top left; will-change:transform; }
.library-v13-hierarchy-company { max-width:620px; }
.library-v13-hierarchy-branches { grid-template-columns:repeat(var(--org-branch-count),minmax(0,1fr)); }
.library-v13-hierarchy-branches::before { left:calc(50% / var(--org-branch-count)); right:calc(50% / var(--org-branch-count)); }
.library-v13-hierarchy-children { grid-template-columns:repeat(var(--org-child-count),minmax(0,1fr)); }
.library-v13-hierarchy-children::before { left:calc(50% / var(--org-child-count)); right:calc(50% / var(--org-child-count)); }
.library-v13-hierarchy-shared > div { grid-template-columns:repeat(var(--org-shared-count),minmax(0,1fr)); }
.library-v13-hierarchy-shared > div::before { left:calc(50% / var(--org-shared-count)); right:calc(50% / var(--org-shared-count)); }
.library-v13-hierarchy-director .library-v13-hierarchy-avatar, .library-v13-hierarchy-director .library-v13-hierarchy-avatar-image { width:68px !important; height:68px !important; font-size:17px; }
.library-v13-hierarchy-director-scope { margin-left:80px; }
.library-v13-hierarchy-role > .library-v13-hierarchy-person .library-v13-hierarchy-avatar, .library-v13-hierarchy-role > .library-v13-hierarchy-person .library-v13-hierarchy-avatar-image { width:56px !important; height:56px !important; font-size:15px; }
.library-v13-hierarchy-team-member .library-v13-hierarchy-avatar, .library-v13-hierarchy-team-member .library-v13-hierarchy-avatar-image { width:46px !important; height:46px !important; font-size:12px; }
.library-v13-hierarchy-team-member { min-width:58px; max-width:94px; gap:6px; }
.library-v13-hierarchy-team-member > span:last-child { overflow-wrap:anywhere; font-size:10px; line-height:1.25; }
.library-v13-hierarchy-no-team > span { color:var(--ch-muted); font-size:11px; font-style:italic; }
.library-v13-org-admin-outsource { display:flex !important; align-items:center; align-self:end; gap:7px !important; min-height:40px; padding:0 10px; border:1px solid var(--ch-line); border-radius:8px; background:var(--ch-surface-raised); color:var(--ch-text-control) !important; font-size:11px !important; font-weight:700 !important; letter-spacing:0 !important; text-transform:none !important; }
.library-v13-org-admin-outsource input { width:15px !important; min-width:15px; height:15px !important; min-height:0 !important; margin:0; accent-color:var(--ch-primary); }
.library-v13-org-admin-outsource small { margin-left:auto; color:var(--ch-muted); font-size:10px; font-weight:500; letter-spacing:0; text-transform:none; }

@media (max-width: 1023px) {
  .page-area { padding: 24px 20px 96px !important; }
  .dashboard-event-table .dashboard-feed-table-head, .dashboard-event-table button { grid-template-columns: 90px minmax(0,1fr) 125px 145px 105px 18px; }
  .dashboard-event-table .dashboard-feed-table-head > :nth-child(6), .dashboard-event-table button > :nth-child(6) { display: none; }
  #library-v13-editor .library-v13-editor-layout > aside { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 767px) {
  .topbar { min-height: 56px !important; height: 56px !important; padding: 0 16px !important; }
  .hamburger, .drawer, .drawer-overlay { display: none !important; }
  .corehub-topbar-context { gap: 8px; margin-left: 0; }
  .corehub-topbar-context strong { font-size: 13px; }
  .corehub-mobile-home { display: grid; place-items: center; width: 28px; min-width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; }
  .corehub-mobile-home img { display: block; width: 28px; height: 28px; border-radius: inherit; object-fit: cover; }
  .corehub-mobile-home:focus-visible { outline: 2px solid var(--ch-primary); outline-offset: 2px; }
  .topbar-right { gap: 6px; }
  .corehub-bell { width: 44px; min-width: 44px; height: 44px; }
  .corehub-profile-btn { min-width: 132px; max-width: 176px; }
  .corehub-profile-btn .welcome-name { display: block !important; }
  .corehub-role-chip { display: none; }
  .corehub-mobile-nav { position: fixed; z-index: 110; right: 0; bottom: 0; left: 0; display: none; grid-template-columns: repeat(5, minmax(0,1fr)); height: 72px; padding: 4px 6px 8px; border-top: 1px solid var(--ch-line); background: rgba(255,255,255,.98); box-shadow: 0 -6px 20px rgba(37,38,41,.05); }
  #app.active ~ .corehub-mobile-nav { display: grid; }
  .corehub-mobile-nav button { display: grid; grid-template-rows: 24px 16px; place-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 52px; padding: 0 4px; border: 0; background: transparent; color: var(--ch-muted); font-size: 9px; font-weight: 650; line-height: 16px; cursor: pointer; }
  .corehub-mobile-nav .nav-icon { width: 24px; height: 24px; }
  .corehub-mobile-nav .nav-icon svg { width: 20px; height: 20px; }
  .corehub-mobile-nav button.active { color: var(--ch-primary-hover); }
  .corehub-mobile-nav button.active .nav-icon { border-radius: 8px; background: var(--ch-primary-soft); }
  .corehub-mobile-workspace-nav { display: block; margin: -2px 0 16px; min-width: 0; }
  .corehub-mobile-workspace-label { display: block; margin: 0 0 7px; color: var(--ch-muted); font-size: 9px; font-weight: 760; letter-spacing: .07em; text-transform: uppercase; }
  .corehub-mobile-workspace-scroll { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 1px 1px 5px; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .corehub-mobile-workspace-scroll button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 36px; padding: 7px 12px; border: 1px solid var(--ch-line-strong); border-radius: 9px; background: var(--ch-surface); color: var(--ch-text-control); font-size: 11px; font-weight: 650; line-height: 18px; white-space: nowrap; cursor: pointer; }
  .corehub-mobile-workspace-scroll button.active { border-color: var(--ch-primary); background: var(--ch-primary-soft); color: var(--ch-primary-hover); }
  .corehub-mobile-workspace-scroll button:focus-visible { outline: 2px solid var(--ch-primary); outline-offset: 1px; }
  .page-area { min-height: calc(100vh - 56px); padding: 16px 16px 96px !important; }
  .corehub-page-head, .ops-page-head, .library-v11-head { flex-direction: column; gap: 16px; margin-bottom: 16px; }
  .corehub-page-head h1, .ops-page-head h1, .library-v11-head h1 { font-size: 21px !important; }
  .dashboard-v11-head { align-items: stretch; }
  .dashboard-location-control { width: 100%; min-width: 0; }
  .dashboard-summary-grid { gap: 12px; margin-bottom: 16px; }
  .dashboard-summary-card { min-height: 72px; padding: 12px; }
  .dashboard-summary-card > span { width: 32px; height: 32px; }
  .dashboard-summary-card strong { font-size: 16px; }
  .dashboard-summary-card p { display: none; }
  .dashboard-panel { margin-bottom: 14px; padding: 11px; }
  .dashboard-panel header { gap: 8px; }
  .dashboard-panel header > div { gap: 8px; }
  .dashboard-panel header > div > span { width: 28px; height: 28px; border-radius: 8px; }
  .dashboard-panel header > div > span svg { width: 16px; height: 16px; }
  .dashboard-panel h2 { font-size: 14px; line-height: 18px; }
  .dashboard-panel header button { min-width: 0; min-height: 36px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
  .dashboard-panel > p { margin: 5px 0 10px; font-size: 10px; line-height: 15px; }
  .dashboard-feed-table { width: 100%; max-width: 100%; overflow: hidden; overscroll-behavior-x: none; }
  .dashboard-feed-table-head { display: none; }
  .dashboard-feed-table button { grid-template-columns: minmax(0,1fr) 14px !important; gap: 7px; width: 100%; min-width: 0 !important; min-height: 52px; padding: 7px 9px; }
  .dashboard-memo-table button > time, .dashboard-memo-table button > em,
  .dashboard-promotion-table button > time, .dashboard-promotion-table button > em,
  .dashboard-event-table button > time, .dashboard-event-table button > em { display: none; }
  .dashboard-event-table button > span { display: block; grid-column: 1; grid-row: 1; min-width: 0; }
  .dashboard-event-mobile-state { display: inline; }
  .dashboard-feed-table button > b { grid-column: 2; grid-row: 1; align-self: center; font-size: 16px; }
  .dashboard-feed-table strong { display: block; overflow: hidden; font-size: 12px; font-weight: 680; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .dashboard-feed-table small { display: block; margin-top: 2px; overflow: hidden; font-size: 10px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .dashboard-feed-table .dashboard-new-badge { margin-left: 4px !important; padding: 1px 5px; font-size: 8px !important; }
  .ops-page-head-actions, .ops-location-select { width: 100%; min-width: 0 !important; }
  .ops-summary-grid, .ops-summary-grid.three, .ops-entry-grid, .ops-two-col, .ops-main-side, .ops-form-side, .ops-field-row, .ops-field-row.three, .ops-field-row.four { grid-template-columns: 1fr !important; }
  .ops-summary-card { min-height: 72px !important; }
  .ops-toolbar { align-items: stretch; padding: 12px !important; }
  .ops-toolbar .ops-filter, .ops-toolbar .ops-filter.grow, .ops-toolbar-actions { width: 100%; min-width: 0; margin-left: 0; }
  .ops-toolbar-actions .ops-btn { flex: 1; }
  .ops-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  .ops-table { min-width: 680px; }
  .ops-entry-card { align-items: flex-start; }
  .ops-entry-card > span { width: 48px !important; height: 48px !important; }
  .ops-entry-card > span svg { width: 22px !important; height: 22px !important; }
  .ops-report-grid { grid-template-columns: 1fr !important; }
  .ops-modal { align-items: end; padding: 0; }
  .ops-modal-card, .ops-modal-card.narrow { width: 100% !important; max-height: calc(100dvh - 12px) !important; padding: 24px 16px 28px !important; border-radius: 16px 16px 0 0 !important; }
  .ops-warehouse-review-line { grid-template-columns: 1fr auto; align-items: end; }
  .ops-warehouse-review-line > :first-child { grid-column: 1 / -1; }
  #library-v13-editor .library-v13-blog-editor { width: 100% !important; max-height: 100dvh; padding: 20px 16px !important; border-radius: 0 !important; }
  #library-v13-editor .library-v13-editor-layout > main { grid-template-columns: 1fr; }
  #library-v13-editor .library-v13-editor-layout > main > * { grid-column: 1 !important; }
  #library-v13-editor .library-v13-editor-layout > aside { grid-template-columns: 1fr; margin-top: 16px; }
  #library-v13-editor .library-v13-signature-card { grid-template-columns: minmax(0,1fr) auto; }
  #library-v13-editor .library-v13-writing-toolbar { flex-wrap: wrap; overflow: visible; padding: 6px; }
  #library-v13-editor .library-v13-writing-toolbar select { flex: 1 1 136px; }
  #library-v13-editor .library-v13-toolbar-divider { display: none; }
  #library-v13-editor .library-v13-rich-body { min-height: 260px !important; }
  #library-v13-editor .library-v11-editor-footer { bottom: -20px; flex-direction: column; align-items: stretch; margin: 18px -16px -20px; padding: 12px 16px; }
  #library-v13-editor .library-v11-editor-footer > div { display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .corehub-popover { bottom: 72px; top: auto !important; right: 12px !important; width: calc(100vw - 24px); max-height: min(514px, calc(100dvh - 96px)); overflow: auto; border-radius: 16px; }
  .corehub-notification-popover::before { content: ''; display: block; width: 48px; height: 4px; margin: 0 auto 8px; border-radius: 999px; background: var(--ch-line-strong); }
}

/* Library v14 — the publisher and reader share one structured document model. */
.library-v13-reader { width: 100% !important; max-width: none !important; margin-inline: 0 !important; }
.library-v13-reader-layout { grid-template-columns: minmax(0,1fr) minmax(300px,340px) !important; gap: 32px !important; }
.library-v13-reader-document { width: 100%; }
.library-v13-reader-content { width: 100%; max-width: none !important; }
.library-v13-reader-content :is(table,figure,.library-v14-callout,hr,ul,ol,pre,blockquote) { margin: 24px 0; }
.library-v13-reader-content table,#library-v13-editor .library-v13-rich-body table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.library-v13-reader-content :is(th,td),#library-v13-editor .library-v13-rich-body :is(th,td) { padding: 11px 13px; border: 1px solid var(--ch-line); vertical-align: top; text-align: left; }
.library-v13-reader-content th,#library-v13-editor .library-v13-rich-body th { background: var(--ch-surface-soft); color: var(--ch-text); font-weight: 700; }
.library-v13-reader-content figure,#library-v13-editor .library-v13-rich-body figure { display: grid; justify-items: start; gap: 8px; }
.library-v13-reader-content figure img,#library-v13-editor .library-v13-rich-body figure img { max-width: 100%; height: auto; margin: 0 !important; border-radius: 12px; }
.library-v13-reader-content figcaption,#library-v13-editor .library-v13-rich-body figcaption { color: var(--ch-muted); font-size: 12px; line-height: 18px; }
.library-v14-callout { padding: 16px 18px; border: 1px solid #ffd0c4; border-left: 4px solid var(--ch-primary); border-radius: 9px; background: #fff8f6; }
.library-v14-callout strong { color: var(--ch-text); }
.library-v14-callout p { margin: 4px 0 0 !important; }
.library-v14-checklist { padding-left: 0; list-style: none; }
.library-v14-checklist li { padding: 5px 0; }
.library-v13-reader-content pre,#library-v13-editor .library-v13-rich-body pre { overflow: auto; padding: 15px; border-radius: 9px; background: #172033; color: #f7f8fb; font-family: "Courier New",monospace; }
.library-v13-reader-content hr { border: 0; border-top: 1px solid var(--ch-line); }
.library-v13-reader-content .library-v13-article-divider { margin:48px 0;border-top:2px solid #dbe4ef; }
.library-v20-structured-content{font-size:14px;line-height:1.58;color:var(--ch-text-control)}
.library-v20-structured-content>h1{margin:0 0 14px;font-size:25px;line-height:1.3;color:var(--ch-text)}
.library-v20-structured-content>h2{margin:18px 0 8px;padding:11px 13px;border:1px solid var(--ch-line);border-radius:8px;background:#fafbfc;color:var(--ch-text);font-size:17px;line-height:1.35}
.library-v20-structured-content>h2:first-child{margin-top:0}
.library-v20-structured-content>h3{margin:14px 0 6px;padding:3px 0 3px 11px;border-left:3px solid #cbd3df;color:var(--ch-text);font-size:15px;line-height:1.4}
.library-v20-structured-content>p{margin:0 0 9px!important;line-height:1.58}
.library-v20-structured-content>.library-v13-article-bullet{position:relative;padding:6px 10px 6px 20px;border-bottom:1px solid #f0f2f5;line-height:1.5}
.library-v20-structured-content>.library-v13-article-bullet:last-child{border-bottom:0}
.library-v20-content-memo>h2{padding:0 0 8px;border:0;border-bottom:1px solid var(--ch-line);border-radius:0;background:transparent}
.library-v20-content-memo>h2:nth-of-type(-n+2){padding:11px 13px;border:1px solid #f2c4b8;border-left:4px solid var(--ch-primary);border-radius:8px;background:#fff9f7}
.library-v20-content-memo>h3{padding-left:0;border-left:0;border-bottom:1px solid var(--ch-line);color:var(--ch-text)}.library-v20-content-memo>.library-v13-article-bullet{border-bottom-color:var(--ch-line)}
.library-v20-content-faq>h2{border-color:#cbdcf3;border-left:4px solid #3977c7;background:#f7faff}.library-v20-content-faq>h3{border-left-color:#77a6df}
.library-v20-content-sop>h2{border-color:#cde6d8;border-left:4px solid #269866;background:#f7fcf9}.library-v20-content-sop>h3{border-left-color:#65b78f}
.library-v20-content-product>h2{border-color:#ead7bd;border-left:4px solid #d88a20;background:#fffaf3}.library-v20-content-product>h3{border-left-color:#e4ac61}
.library-v20-content-installation>h2{border-color:#c9e3e6;border-left:4px solid #1997a2;background:#f6fcfd}.library-v20-content-installation>h3{border-left-color:#65b6bd}
.library-v20-content-guide>h2{border-left:4px solid #77849a}
@media(max-width:600px){.library-v20-structured-content{font-size:13px}.library-v20-structured-content>h1{font-size:21px}.library-v20-structured-content>h2{margin-top:14px;padding:9px 10px;font-size:15px}.library-v20-structured-content>h3{font-size:14px}.library-v20-structured-content>.library-v13-article-bullet{padding-block:5px}}

/* Knowledge articles use content, not oversized banners, to create hierarchy. */
.library-v20-structured-content>h2,
#library-v13-editor.library-v20-editor-structured .library-v13-rich-body>h2 {
  margin:22px 0 8px;
  padding:2px 0 2px 11px;
  border:0;
  border-left:3px solid #77849a;
  border-radius:0;
  background:transparent;
  font-size:16px;
  line-height:1.4;
}
.library-v20-content-memo>h2,
#library-v13-editor.library-v20-editor-memo .library-v13-rich-body>h2 { border-left-color:var(--ch-primary); }
.library-v20-content-faq>h2,
#library-v13-editor.library-v20-editor-faq .library-v13-rich-body>h2 { border-left-color:#3977c7; }
.library-v20-content-sop>h2,
#library-v13-editor.library-v20-editor-sop .library-v13-rich-body>h2 { border-left-color:#269866; }
.library-v20-content-product>h2,
#library-v13-editor.library-v20-editor-product .library-v13-rich-body>h2 { border-left-color:#d88a20; }
.library-v20-content-installation>h2,
#library-v13-editor.library-v20-editor-installation .library-v13-rich-body>h2 { border-left-color:#1997a2; }
.library-v20-structured-content>p>strong:only-child { color:var(--ch-text); font-size:14px; }
@media(max-width:600px){
  .library-v20-structured-content>h2,
  #library-v13-editor.library-v20-editor-structured .library-v13-rich-body>h2 { margin-top:18px; padding:1px 0 1px 9px; font-size:15px; }
}
#library-v13-editor.library-v20-editor-structured .library-v13-rich-body>h2{margin:18px 0 8px;padding:11px 13px;border:1px solid var(--ch-line);border-left:4px solid #77849a;border-radius:8px;background:#fafbfc;font-size:17px;line-height:1.35}
#library-v13-editor.library-v20-editor-structured .library-v13-rich-body>h3{margin:14px 0 6px;padding:3px 0 3px 11px;border-left:3px solid #cbd3df;font-size:15px}
#library-v13-editor.library-v20-editor-memo .library-v13-rich-body>h2{padding:0 0 8px;border:0;border-bottom:1px solid var(--ch-line);border-radius:0;background:transparent}
#library-v13-editor.library-v20-editor-memo .library-v13-rich-body>h2:nth-of-type(-n+2){padding:11px 13px;border:1px solid #f2c4b8;border-left:4px solid var(--ch-primary);border-radius:8px;background:#fff9f7}
#library-v13-editor.library-v20-editor-memo .library-v13-rich-body>h3{padding-left:0;border-left:0;border-bottom:1px solid var(--ch-line);color:var(--ch-text)}
#library-v13-editor.library-v20-editor-faq .library-v13-rich-body>h2{border-color:#cbdcf3;border-left-color:#3977c7;background:#f7faff}
#library-v13-editor.library-v20-editor-sop .library-v13-rich-body>h2{border-color:#cde6d8;border-left-color:#269866;background:#f7fcf9}
#library-v13-editor.library-v20-editor-product .library-v13-rich-body>h2{border-color:#ead7bd;border-left-color:#d88a20;background:#fffaf3}
#library-v13-editor.library-v20-editor-installation .library-v13-rich-body>h2{border-color:#c9e3e6;border-left-color:#1997a2;background:#f6fcfd}

/* Keep authoring preview identical to the compact reader hierarchy. */
#library-v13-editor.library-v20-editor-structured .library-v13-rich-body>h2,
#library-v13-editor.library-v20-editor-memo .library-v13-rich-body>h2,
#library-v13-editor.library-v20-editor-memo .library-v13-rich-body>h2:nth-of-type(-n+2),
#library-v13-editor.library-v20-editor-faq .library-v13-rich-body>h2,
#library-v13-editor.library-v20-editor-sop .library-v13-rich-body>h2,
#library-v13-editor.library-v20-editor-product .library-v13-rich-body>h2,
#library-v13-editor.library-v20-editor-installation .library-v13-rich-body>h2 {
  margin:22px 0 8px;
  padding:2px 0 2px 11px;
  border-width:0 0 0 3px;
  border-style:solid;
  border-radius:0;
  background:transparent;
  font-size:16px;
  line-height:1.4;
}
.library-v14-page-tree nav button { grid-template-columns: 12px minmax(0,1fr) auto !important; align-items: center; gap: 8px; }
.library-v14-page-tree nav button > span { width: 7px; height: 7px; border: 1px solid #a9b5c7; border-radius: 50%; }
.library-v14-page-tree nav button b { overflow: hidden; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.library-v14-page-tree nav button small { color: var(--ch-primary); font-size: 9px; }
.library-v14-page-tree nav button.active { border-radius: 7px; background: var(--ch-primary-soft); color: var(--ch-primary-hover); }
.library-v14-page-tree nav button.active > span { border-color: var(--ch-primary); background: var(--ch-primary); }
.library-v14-ack-roster h2 { display: flex; justify-content: space-between; gap: 12px; }
.library-v14-ack-roster h2 span { color: var(--ch-primary); }
.library-v14-ack-roster details { border-top: 1px solid var(--ch-line); }
.library-v14-ack-roster summary { padding: 9px 0; color: var(--ch-text-control); font-size: 11px; font-weight: 650; cursor: pointer; }
.library-v14-roster { display: grid; gap: 8px; padding-bottom: 8px; }
.library-v14-roster > div { display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 8px; }
.library-v14-roster > div > :is(img,span:first-child) { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ch-primary-soft); color: var(--ch-primary); object-fit: cover; font-size: 9px; font-weight: 750; }
.library-v14-roster strong,.library-v14-roster small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-v14-roster strong { color: var(--ch-text); font-size: 11px; }
.library-v14-roster small { color: var(--ch-muted); font-size: 9px; }
#library-v13-editor .library-v14-collection-fields { grid-column: 1/-1; display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--ch-line); }
#library-v13-editor .library-v14-collection-fields[hidden] { display: none !important; }
#library-v13-editor .library-v14-collection-fields .library-v11-form-grid { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px !important; }
#library-v13-editor .library-v14-collection-fields small { color: var(--ch-muted); font-size: 11px; line-height: 16px; }
.library-v14-preview-backdrop { z-index: 10100; }
.library-v14-editor-preview { width: min(980px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 32px; border-radius: 15px; background: #fff; box-shadow: 0 28px 90px rgba(15,23,42,.3); }
.library-v14-editor-preview > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--ch-line); }
.library-v14-editor-preview h2 { margin: 5px 0; font-size: 32px; }
.library-v14-editor-preview header p { margin: 0; color: var(--ch-muted); }
.library-v14-editor-preview article { padding-top: 24px; }
@media(max-width:800px){.library-v13-reader-layout{grid-template-columns:1fr!important}.library-v13-reader-aside{order:0!important;grid-template-columns:1fr!important}.library-v14-editor-preview{padding:20px}#library-v13-editor .library-v14-collection-fields .library-v11-form-grid{grid-template-columns:1fr}}

/* Event Records: schedule-first list and month calendar, never an article reader. */
.library-v15-events { width: 100%; }
.library-v15-events .library-v11-head { align-items: center; }
.library-v15-event-notice { display: flex; align-items: center; min-height: 54px; gap: 10px; margin-bottom: 18px; padding: 0 16px; border: 1px solid #ffc7b8; border-radius: 10px; background: #fff9f6; color: #9b3d27; font-size: 13px; line-height: 19px; }
.library-v15-event-notice:first-letter { color: var(--ch-primary); }
.library-v15-event-view-switch { display: inline-grid; flex:0 0 auto; grid-template-columns: 76px 82px; overflow: hidden; border: 1px solid var(--ch-line-strong); border-radius: 8px; }
.library-v15-event-view-switch button { min-height: 36px; padding:0 10px; border: 0; border-right: 1px solid var(--ch-line); background: #fff; color: var(--ch-text-control); font-size: 11px; cursor: pointer; }
.library-v15-event-view-switch button:last-child { border-right: 0; }
.library-v15-event-view-switch button.active { background: var(--ch-primary); color: #fff; font-weight: 700; }
.library-v15-event-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; padding: 11px 12px; border: 1px solid var(--ch-line); border-radius: 10px; background: #fff; }
.library-v15-event-toolbar > label { display: grid; gap: 6px; color: var(--ch-muted-2); font-size: 10px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.library-v15-event-toolbar :is(select,input) { width: 100%; min-height:36px!important; height: 36px!important; padding: 0 34px 0 10px; border: 1px solid var(--ch-line-strong); border-radius: 8px; background-color: #fff; color: var(--ch-text); font-size: 12px; text-transform: none; }
.library-v15-event-toolbar .event-filter-year{width:92px}.library-v15-event-toolbar .event-filter-month{width:124px}.library-v15-event-toolbar .event-filter-type{width:150px}.library-v15-event-toolbar .event-filter-sort{width:148px}.library-v15-event-toolbar>label.grow{flex:1 1 180px;min-width:160px;max-width:300px}
.library-v15-month-nav { display: grid; flex:0 0 180px; grid-template-columns: 32px minmax(0,1fr) 32px; align-items: center; min-height: 36px; }
.library-v15-month-nav strong { font-size:12px;text-align: center; }
.library-v15-month-nav button { width:32px; height:32px; border: 1px solid var(--ch-line); border-radius: 7px; background: #fff; font-size: 17px; cursor: pointer; }
.library-v15-event-table { overflow: hidden; border: 1px solid var(--ch-line); border-radius: 11px; background: #fff; box-shadow: var(--ch-shadow); }
.library-v15-event-table-head,.library-v15-event-row { display: grid; grid-template-columns: 120px minmax(190px,1.25fr) minmax(170px,1fr) 140px 190px 150px; align-items: center; gap: 14px; min-width: 1020px; }
.library-v15-event-table-head { min-height: 42px; padding: 0 16px; border-bottom: 1px solid var(--ch-line); background: var(--ch-surface-raised); color: var(--ch-muted-2); font-size: 9px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.library-v15-event-row { min-height: 62px; width: 100%; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--ch-line-subtle); background: var(--ch-surface); color: var(--ch-text-control); font-size: 12px; text-align: left; cursor: pointer; }
.library-v15-event-row:hover,.library-v15-event-row:focus-visible { background: var(--ch-primary-subtle); outline: none; }
.library-v15-event-row:last-child { border-bottom: 0; }
.library-v15-event-row strong { color: var(--ch-text); font-size: 13px; }
.library-v15-event-row strong { display: flex; align-items: center; gap: 8px; }
.library-v15-event-colour { display: inline-block; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 999px; background: var(--event-colour,#1972ce); }
.library-v15-event-row small { display: block; margin-top: 3px; color: var(--ch-primary); }
.library-v15-event-type { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 999px; font-style: normal; font-weight: 650; white-space: nowrap; }
.library-v15-event-type.big { background: #fff0e5; color: #c84b22; }
.library-v15-event-type.large { background: #eaf2ff; color: #1f66bd; }
.library-v15-event-type.small { background: #e5f8f6; color: #137d78; }
.library-v15-event-type.event,.library-v15-event-type.normal { background: #f1ecff; color: #7052b8; }
.library-v15-calendar { overflow: hidden; border: 1px solid var(--ch-line); border-radius: 11px; background: #fff; box-shadow: var(--ch-shadow); }
.library-v15-weekdays,.library-v15-calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.library-v15-weekdays span { padding: 8px 6px; border-right: 1px solid var(--ch-line); border-bottom: 1px solid var(--ch-line); background: var(--ch-surface-raised); color: var(--ch-text); font-size: 11px; font-weight: 650; text-align: center; }
.library-v15-weekdays span:last-child { border-right: 0; }
.library-v15-calendar-day { min-height: 78px; padding: 6px; overflow: hidden; border-right: 1px solid var(--ch-line); border-bottom: 1px solid var(--ch-line); }
.library-v15-calendar-day:nth-child(7n) { border-right: 0; }
.library-v15-calendar-day.outside { background: #fafbfd; color: #a7b0be; }
.library-v15-calendar-day > time { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 650; }
.library-v15-calendar-day > div { display: grid; gap: 3px; }
.library-v15-calendar-event { width: 100%; min-width: 0; min-height:22px; padding:3px 6px; overflow: hidden; border: 0; border-radius: 5px; color: #fff; font-size: 9px; font-weight: 650; line-height:16px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.library-v15-event-row.event-color-0,.library-v15-calendar-event.event-color-0 { --event-colour:#1972ce; }.library-v15-event-row.event-color-1,.library-v15-calendar-event.event-color-1 { --event-colour:#e05c45; }.library-v15-event-row.event-color-2,.library-v15-calendar-event.event-color-2 { --event-colour:#1d9a63; }.library-v15-event-row.event-color-3,.library-v15-calendar-event.event-color-3 { --event-colour:#7a5cc7; }.library-v15-event-row.event-color-4,.library-v15-calendar-event.event-color-4 { --event-colour:#c88414; }.library-v15-event-row.event-color-5,.library-v15-calendar-event.event-color-5 { --event-colour:#168b9c; }
.library-v15-calendar-event[class*="event-color-"] { background: var(--event-colour); }
.library-v15-event-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 9px 12px; }
.library-v15-event-legend span { color: var(--ch-muted); font-size: 10px; }
.library-v15-event-editor-card { width: min(860px,calc(100vw - 32px)) !important; max-height:calc(100dvh - 32px); overflow:auto; padding: 28px !important; }
.library-v15-event-editor-card h2 { margin: 7px 0 5px; font-size: 27px; }.library-v15-event-editor-card > p { margin: 0 0 22px; color: var(--ch-muted); }
.library-v15-event-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.library-v15-event-form label { display: grid; gap: 7px; color: var(--ch-text-control); font-size: 12px; font-weight: 650; }
.library-v15-event-form .event-span-2 { grid-column: 1/-1; }
.library-v15-event-form :is(input,select,textarea) { width: 100%; padding: 0 12px; border: 1px solid var(--ch-line-strong); border-radius: 8px; background: #fff; font-size: 13px; }
.library-v15-event-form :is(input,select) { height: 44px; }
.library-v15-event-form textarea { min-height:104px; padding-block:11px; line-height:1.5; resize:vertical; }
.library-v21-event-floor-upload { padding:14px; border:1px solid var(--ch-line); border-radius:9px; background:var(--ch-surface-soft); }
.library-v21-event-floor-upload small,.library-v21-event-floor-upload span { color:var(--ch-muted); font-size:11px; font-weight:500; }
.library-v21-event-floor-upload input[type=file] { height:auto; padding:10px; background:#fff; }
.library-v21-event-floor-upload .ghost-btn { justify-self:start; min-height:34px; }
.library-v15-event-editor-card footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--ch-line); }
.library-v15-event-editor-card footer > div { display: flex; gap: 8px; }.library-v15-event-editor-card footer > span { color: #c43f27; font-size: 12px; }
@media(max-width:1050px){.library-v15-event-table{overflow-x:auto}.library-v15-calendar{overflow-x:auto}.library-v15-weekdays,.library-v15-calendar-grid{min-width:720px}}
@media(max-width:650px){.library-v15-event-toolbar{align-items:stretch}.library-v15-event-view-switch{width:160px;grid-template-columns:1fr 1fr}.library-v15-month-nav{flex-basis:calc(100% - 170px)}.library-v15-event-toolbar>label,.library-v15-event-toolbar .event-filter-year,.library-v15-event-toolbar .event-filter-month,.library-v15-event-toolbar .event-filter-type,.library-v15-event-toolbar .event-filter-sort,.library-v15-event-toolbar>label.grow{width:calc(50% - 5px);min-width:0;max-width:none;flex:1 1 calc(50% - 5px)}.library-v15-event-form{grid-template-columns:1fr}.library-v15-event-form .event-span-2{grid-column:auto}.library-v15-event-editor-card footer{align-items:stretch;flex-direction:column}.library-v15-event-editor-card footer>div>*{flex:1}.library-v15-event-notice{align-items:flex-start;padding-block:12px}}

.library-v21-event-overview { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; margin-bottom:20px; overflow:hidden; border:1px solid var(--ch-line); border-radius:10px; background:var(--ch-line); }
.library-v21-event-overview>div { display:grid; gap:6px; min-height:76px; padding:14px 16px; background:#fff; }
.library-v21-event-overview span { color:var(--ch-muted); font-size:11px; }.library-v21-event-overview strong { align-self:start; font-size:13px; }
.library-v13-reader-aside dl .library-v22-staff-time { margin:2px -7px 0; padding:8px 7px; border-left:3px solid #9aabbf; border-radius:4px; background:#f7f9fc; }
.library-v13-reader-aside dl .library-v22-staff-time dd { display:grid; gap:2px; }.library-v13-reader-aside dl .library-v22-staff-time dd span { color:var(--ch-muted); font-size:11px; }.library-v13-reader-aside dl .library-v22-staff-time dd strong { color:var(--ch-text); font-size:12px; }
.library-v22-reporting-table { margin:0 0 22px; overflow:hidden; border:1px solid var(--ch-line); border-radius:10px; background:#fff; }
.library-v22-reporting-table header { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:10px 16px; border-bottom:1px solid var(--ch-line); }
.library-v22-reporting-table header h2 { margin:0; font-size:15px; }.library-v22-reporting-table header span { color:var(--ch-muted); font-size:11px; }
.library-v22-reporting-head,.library-v22-reporting-row { display:grid; grid-template-columns:100px minmax(180px,1fr) 100px 100px; align-items:center; gap:14px; padding:0 16px; }
.library-v22-reporting-head { min-height:34px; background:var(--ch-surface-raised); color:var(--ch-muted-2); font-size:9px; font-weight:800; letter-spacing:.055em; text-transform:uppercase; }
.library-v22-reporting-row { min-height:52px; border-top:1px solid var(--ch-line-subtle); font-size:12px; }.library-v22-reporting-row:first-of-type{border-top:0}.library-v22-reporting-row strong{font-size:12px}.library-v22-reporting-row span{color:var(--ch-text-control)}.library-v22-reporting-row time{font-weight:650}
.library-v22-event-briefing { margin:0 0 22px; padding-top:2px; }.library-v22-event-briefing>h2 { margin:0 0 12px; padding-bottom:9px; border-bottom:1px solid var(--ch-line); font-size:17px; }
.library-v21-event-floor-plan { margin:22px 0 0; padding:16px; border:1px solid var(--ch-line); border-radius:10px; background:var(--ch-surface-soft); }
.library-v21-event-floor-plan figcaption { margin-bottom:12px; font-size:16px; font-weight:750; }.library-v21-event-floor-plan a { display:block; overflow:hidden; border:1px solid var(--ch-line); border-radius:8px; background:#fff; }
.library-v21-event-floor-plan img { display:block; width:100%; max-height:680px; object-fit:contain; }.library-v21-event-floor-plan small { display:block; margin-top:9px; color:var(--ch-muted); }
@media(max-width:650px){.library-v21-event-overview{grid-template-columns:1fr}.library-v22-reporting-table{overflow-x:auto}.library-v22-reporting-table>*{min-width:560px}.library-v21-event-floor-plan{padding:10px}}

/* Promotion workspace: listing, tabbed reader and specialised editor. */
.library-v17-promotion-list{overflow:hidden;border:1px solid var(--ch-line);border-radius:12px;background:#fff;box-shadow:var(--ch-shadow)}
.library-v17-promotion-head,.library-v17-promotion-row{display:grid;grid-template-columns:minmax(300px,1.4fr) minmax(150px,.55fr) minmax(250px,.8fr) 120px 20px;gap:18px;align-items:center;padding:14px 18px}
.library-v17-promotion-head{background:var(--ch-surface-soft);color:var(--ch-muted);font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.library-v17-promotion-row{width:100%;min-height:76px;border:0;border-top:1px solid var(--ch-line);background:#fff;color:var(--ch-text);text-align:left;cursor:pointer}
.library-v17-promotion-row:hover{background:#fffaf8}.library-v17-promotion-row>span:first-child strong,.library-v17-promotion-row>span:first-child small{display:block}.library-v17-promotion-row>span:first-child small{margin-top:5px;color:var(--ch-muted);font-size:12px}.library-v17-promotion-row>span:nth-child(2),.library-v17-promotion-row>span:nth-child(3){color:var(--ch-muted);font-size:13px}.library-v17-promotion-row>span:nth-child(3) b{padding:0 4px;color:#b1bac7}
.library-v17-promotion-row em{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-style:normal;font-weight:750}.library-v17-promotion-row em.current{background:#e8f8ee;color:#137541}.library-v17-promotion-row em.upcoming{background:#edf4ff;color:#1761c9}.library-v17-promotion-row em.expired{background:#f1f2f4;color:#6f7785}.library-v17-promotion-row em.draft{background:#fff4dc;color:#916000}
.library-v17-promotion-expired{display:flex;align-items:center;gap:15px;margin:22px 0 0;padding:18px 20px;border:1px solid #f0a18e;border-radius:11px;background:#fff1ed;color:#9d2f1e}.library-v17-promotion-expired strong{font-size:16px}.library-v17-promotion-expired span{flex:1;font-size:13px;line-height:1.5}
.library-v17-promotion-tabs{display:flex;gap:6px;margin-bottom:24px;padding-bottom:1px;overflow-x:auto;border-bottom:1px solid var(--ch-line)}.library-v17-promotion-tabs button{min-width:max-content;padding:12px 15px;border:1px solid transparent;border-bottom:0;border-radius:9px 9px 0 0;background:transparent;color:var(--ch-muted);font-size:13px;font-weight:700}.library-v17-promotion-tabs button.active{border-color:var(--ch-line);background:#fff7f4;color:var(--ch-primary);box-shadow:inset 0 -2px var(--ch-primary)}.library-v17-promotion-pane.hidden{display:none!important}
.library-v19-promotion-content{display:block!important;color:var(--ch-text);font-size:13px;line-height:1.5}
.library-v19-promotion-content>h1{margin:0 0 7px!important;font-size:21px!important;line-height:1.35!important}.library-v19-promotion-content>h2{margin:14px 0 4px!important;padding-top:12px;border-top:1px solid var(--ch-line);font-size:15px!important;line-height:1.35!important}
.library-v19-promotion-content>p{margin:0!important;padding:4px 0;color:var(--ch-text-control)!important;font-size:13px!important;line-height:1.45!important}.library-v19-promotion-content>p:has(>br:only-child){display:none}
.library-v19-promotion-content>p:has(>strong:first-child){display:grid;grid-template-columns:120px minmax(0,1fr);gap:10px;align-items:baseline;border-bottom:1px solid #f0f1f3}.library-v19-promotion-content>p>strong:first-child{color:var(--ch-text);font-size:12px}
.library-v19-promotion-content>.library-v20-promotion-special-start{margin:16px 0 0!important;padding:12px 14px 6px!important;border:1px solid #f1b194!important;border-bottom:0!important;border-radius:10px 10px 0 0!important;background:#fff7f2!important;color:#9b3e22!important}
.library-v19-promotion-content>.library-v20-promotion-special-row{margin:0!important;padding:6px 14px!important;border-right:1px solid #f1b194!important;border-bottom:0!important;border-left:1px solid #f1b194!important;background:#fff7f2!important}
.library-v19-promotion-content>.library-v20-promotion-special-end{padding-bottom:12px!important;border-bottom:1px solid #f1b194!important;border-radius:0 0 10px 10px!important}
.library-v19-promotion-content>.library-v20-promotion-guide-start{margin:16px 0 0!important;padding:12px 14px 6px!important;border:1px solid #b9d5e8!important;border-bottom:0!important;border-radius:10px 10px 0 0!important;background:#f3f9fd!important;color:#245d7c!important}
.library-v19-promotion-content>.library-v20-promotion-guide-row{margin:0!important;padding:6px 14px!important;border-right:1px solid #b9d5e8!important;border-bottom:0!important;border-left:1px solid #b9d5e8!important;background:#f3f9fd!important}
.library-v19-promotion-content>.library-v20-promotion-guide-end{padding-bottom:12px!important;border-bottom:1px solid #b9d5e8!important;border-radius:0 0 10px 10px!important}
.library-v19-promotion-content>.library-v20-promotion-warranty-start{margin:12px 0 0!important;padding:11px 14px 5px!important;border:1px solid #b9ddc8!important;border-bottom:0!important;border-radius:10px 10px 0 0!important;background:#f1faf5!important;color:#196a43!important}
.library-v19-promotion-content>.library-v20-promotion-warranty-row{margin:0!important;padding:6px 14px!important;border-right:1px solid #b9ddc8!important;border-bottom:0!important;border-left:1px solid #b9ddc8!important;background:#f1faf5!important}
.library-v19-promotion-content>.library-v20-promotion-warranty-end{padding-bottom:11px!important;border-bottom:1px solid #b9ddc8!important;border-radius:0 0 10px 10px!important}
.library-v17-promotion-editor-fields{margin:22px 0;padding:18px;border:1px solid #f2ad9d;border-radius:12px;background:#fffaf8}.library-v17-promotion-editor-fields[hidden]{display:none}.library-v17-promotion-editor-title{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:14px}.library-v17-promotion-editor-title>div strong,.library-v17-promotion-editor-title>div span{display:block}.library-v17-promotion-editor-title>div strong{font-size:17px}.library-v17-promotion-editor-title>div span{margin-top:4px;color:var(--ch-muted);font-size:12px}.library-v17-promotion-editor-title label{display:grid;gap:6px;min-width:290px;color:var(--ch-muted);font-size:10px;font-weight:800;text-transform:uppercase}.library-v17-promotion-editor-title select{min-height:42px;padding:0 12px;border:1px solid var(--ch-line);border-radius:8px;background:#fff;color:var(--ch-text)}
.library-v17-promotion-tab-editor{margin-bottom:12px;overflow:hidden;border:1px solid var(--ch-line);border-radius:10px;background:#fff}.library-v17-promotion-tab-editor>header{display:grid;grid-template-columns:55px 1fr 38px;gap:9px;align-items:center;padding:9px 10px;background:var(--ch-surface-soft)}.library-v17-promotion-tab-editor>header span{color:var(--ch-muted);font-size:10px;font-weight:800;text-transform:uppercase}.library-v17-promotion-tab-editor>header input{min-height:38px;padding:0 10px;border:1px solid var(--ch-line);border-radius:7px;background:#fff;font-weight:700}.library-v17-promotion-tab-editor>header button{width:34px;height:34px;border:1px solid var(--ch-line);border-radius:7px;background:#fff}.library-v17-tab-mini-toolbar{display:flex;gap:5px;padding:7px 10px;border-top:1px solid var(--ch-line);border-bottom:1px solid var(--ch-line)}.library-v17-tab-mini-toolbar button{min-height:30px;padding:0 9px;border:1px solid var(--ch-line);border-radius:6px;background:#fff}.library-v17-promotion-tab-body{min-height:120px;padding:14px;outline:0;color:var(--ch-text);font-size:14px;line-height:1.65}.library-v17-promotion-tab-body:empty:before{content:attr(data-placeholder);color:#9aa5b5}
.library-v16-promotion-editor [data-editor-body-label],.library-v16-promotion-editor .library-v13-rich-editor{display:none!important}
.library-v16-promotion-editor .library-v17-promotion-editor-fields{grid-column:1/-1!important;margin:0;padding:18px;border-color:#f2ad9d;background:#fffaf8}
.library-v18-promotion-tab-nav{display:flex;align-items:flex-end;gap:6px;overflow-x:auto;padding:0 2px;border-bottom:1px solid #efb8aa}
.library-v18-promotion-tab-nav>button{flex:0 0 auto;min-height:42px;padding:0 14px;border:1px solid transparent;border-bottom:0;border-radius:9px 9px 0 0;background:transparent;color:var(--ch-muted);font-size:13px;font-weight:700;white-space:nowrap;cursor:pointer}
.library-v18-promotion-tab-nav>button[draggable="true"]{display:inline-flex;align-items:center;gap:7px}.library-v18-promotion-tab-grip{color:#9aa5b5;font-size:15px;letter-spacing:-3px;cursor:grab}.library-v18-promotion-tab-nav>button.dragging{opacity:.45}.library-v18-promotion-tab-nav>button.drag-over{box-shadow:inset 3px 0 var(--ch-primary)}
.library-v18-promotion-tab-nav>button.active{border-color:#efb8aa;background:#fff;color:var(--ch-primary-hover);box-shadow:inset 0 -3px var(--ch-primary)}
.library-v18-promotion-tab-nav>.library-v18-promotion-tab-add{border:1px dashed #ef9b87;border-bottom:0;color:var(--ch-primary-hover);background:#fff4f0}
.library-v18-promotion-tab-panels{padding-top:14px}
.library-v18-promotion-tab-panels .library-v17-promotion-tab-editor{margin:0;border-color:#ead7d1;box-shadow:0 5px 16px rgba(68,42,34,.05)}
.library-v18-promotion-tab-panels .library-v17-promotion-tab-editor>header{display:flex;align-items:end;justify-content:space-between;gap:14px;padding:12px 14px;background:#fff}
.library-v18-promotion-tab-panels .library-v17-promotion-tab-editor>header label{display:grid;flex:1;gap:5px;color:var(--ch-muted);font-size:11px;font-weight:800;text-transform:uppercase}
.library-v18-promotion-tab-panels .library-v17-promotion-tab-editor>header input{width:100%;height:42px;box-sizing:border-box}
.library-v18-promotion-tab-actions{display:flex;align-items:center;gap:6px}.library-v18-promotion-tab-actions>button{display:inline-flex;align-items:center;justify-content:center}.library-v18-promotion-tab-actions>button:disabled{cursor:not-allowed;opacity:.4}
.library-v18-promotion-tab-panels .library-v17-promotion-tab-editor>header .library-v18-promotion-tab-delete{width:auto;height:42px;padding:0 14px;border-color:#efb8aa;color:#b53d29;font-weight:700}
.library-v18-promotion-tab-panels .library-v17-promotion-tab-editor>header .library-v18-promotion-tab-delete:disabled{visibility:hidden}
.library-v18-promotion-tab-panels .library-v17-promotion-tab-body{min-height:190px;background:#fff}
.library-v18-promotion-tab-panels .library-v17-promotion-tab-body.library-v19-promotion-content{font-size:13px;line-height:1.5}
@media(max-width:900px){.library-v17-promotion-head{display:none}.library-v17-promotion-row{grid-template-columns:1fr auto;gap:8px}.library-v17-promotion-row>span:nth-child(2),.library-v17-promotion-row>span:nth-child(3){grid-column:1}.library-v17-promotion-row>span:nth-child(4){grid-column:2;grid-row:1}.library-v17-promotion-row>b{grid-column:2;grid-row:2}.library-v17-promotion-expired{align-items:flex-start;flex-direction:column}.library-v17-promotion-editor-title{align-items:stretch;flex-direction:column}.library-v17-promotion-editor-title label{min-width:0}}
@media(max-width:520px){.library-v17-promotion-tabs{margin-bottom:16px}.library-v17-promotion-tabs button{padding:10px 12px;font-size:11px}.library-v19-promotion-content>p:has(>strong:first-child){grid-template-columns:105px minmax(0,1fr);gap:7px}.library-v19-promotion-content>h1{font-size:18px!important}}

/* Pixel-aligned header actions and side-panel icons.  The shell originally
   inherited a column-based topbar, which made equal-height controls look as
   if they were sitting on different vertical baselines. */
@media (min-width: 768px) {
  .topbar { align-items: center !important; padding: 0 16px !important; }
  .topbar-right { align-self: stretch; height: 64px !important; min-height: 64px !important; }
}

/* Library search is a true type-ahead. Typing leaves the current screen
   untouched and opens only this anchored prediction menu. */
#corehub-library-root-v11 .library-v11-search { position: relative; overflow: visible; z-index: 8; }
#corehub-library-root-v11 .library-v13-search-clear { min-height: 30px; padding: 0 8px; border: 0; background: transparent; color: var(--ch-primary-hover); font-size: 13px; font-weight: 650; }
#corehub-library-root-v11 .library-v13-search-suggestions { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; left: 0; overflow: hidden; max-height: min(440px, 52vh); border: 1px solid var(--ch-line-strong); border-radius: 10px; background: var(--ch-surface); box-shadow: 0 14px 30px rgba(37, 38, 41, .18); }
#corehub-library-root-v11 .library-v13-search-suggestion-head { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 8px 14px; border-bottom: 1px solid var(--ch-line); background: var(--ch-surface-raised); color: var(--ch-muted-2); font-size: 11px; font-weight: 650; line-height: 18px; }
#corehub-library-root-v11 .library-v13-search-suggestion-head small { color: var(--ch-muted); font-size: 11px; font-weight: 400; }
#corehub-library-root-v11 .library-v13-search-suggestions > button { display: grid; grid-template-columns: 66px minmax(0, 1fr) 18px; align-items: center; width: 100%; min-height: 62px; gap: 12px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--ch-line); background: var(--ch-surface); color: var(--ch-text); text-align: left; }
#corehub-library-root-v11 .library-v13-search-suggestions > button:last-child { border-bottom: 0; }
#corehub-library-root-v11 .library-v13-search-suggestions > button:hover,
#corehub-library-root-v11 .library-v13-search-suggestions > button:focus-visible { background: var(--ch-primary-subtle); outline: 0; }
#corehub-library-root-v11 .library-v13-search-suggestion-kind { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 24px; padding: 2px 6px; border-radius: 999px; background: var(--ch-primary-soft); color: var(--ch-primary-hover); font-size: 9px; font-weight: 700; line-height: 14px; }
#corehub-library-root-v11 .library-v13-search-suggestions > button > span:nth-child(2) { min-width: 0; }
#corehub-library-root-v11 .library-v13-search-suggestions strong,
#corehub-library-root-v11 .library-v13-search-suggestions small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#corehub-library-root-v11 .library-v13-search-suggestions strong { color: var(--ch-text); font-size: 13px; font-weight: 650; line-height: 20px; }
#corehub-library-root-v11 .library-v13-search-suggestions small { margin-top: 1px; color: var(--ch-muted); font-size: 11px; font-weight: 400; line-height: 16px; }
#corehub-library-root-v11 .library-v13-search-suggestions b { color: var(--ch-primary-hover); font-size: 17px; font-weight: 400; }
#corehub-library-root-v11 .library-v13-search-suggestion-empty { display: grid; gap: 3px; min-height: 78px; padding: 15px 14px; color: var(--ch-muted); }
#corehub-library-root-v11 .library-v13-search-suggestion-empty strong { color: var(--ch-text); font-size: 13px; font-weight: 650; line-height: 20px; }
#corehub-library-root-v11 .library-v13-search-suggestion-empty span { font-size: 11px; line-height: 16px; }
.topbar-right { display: flex !important; flex-direction: row !important; align-items: center !important; }
.corehub-bell, .corehub-profile-btn { align-self: center !important; margin-block: 0 !important; }
.corehub-profile-btn { height: 40px !important; min-height: 40px !important; line-height: 1 !important; }
.corehub-profile-btn .corehub-avatar, .corehub-profile-btn .welcome-name, .corehub-profile-btn .corehub-role-chip, .corehub-profile-btn > svg { align-self: center !important; }

.ops-insight { grid-template-columns: 40px minmax(0, 1fr) max-content !important; align-items: center !important; }
.ops-insight .ops-icon { display: grid !important; place-items: center !important; line-height: 0 !important; justify-self: center; }
.ops-insight .ops-icon svg { display: block !important; margin: 0 !important; transform: none !important; }

/* Organisation Chart uses a real SVG connector layer.  It remains vector
   sharp while the surrounding DOM canvas is panned or zoomed, and no connector
   is hidden behind a card or broken by a grid reflow. */
.library-v13-hierarchy { width: 100% !important; max-width: none !important; padding: 24px !important; overflow: hidden !important; }
.library-v13-hierarchy-viewport { height: min(1020px, calc(100vh - 104px)) !important; min-height: 720px !important; }
.library-v13-hierarchy-canvas { position: relative; width: max(1640px, 100%) !important; min-height: 1120px !important; padding: 16px 34px 100px !important; }
.library-v13-hierarchy-company, .library-v13-hierarchy-tree { position: relative; z-index: 1; }
.library-v13-hierarchy-connectors { position: absolute; inset: 0; z-index: 0; overflow: visible; pointer-events: none; }
.library-v13-hierarchy-connectors path { fill: none; stroke: var(--org-line); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: square; stroke-linejoin: round; }
.library-v13-hierarchy-connectors path.is-shared { stroke: #f1772b; stroke-dasharray: 6 4; }
.library-v13-hierarchy-company::after, .library-v13-hierarchy-branches::before, .library-v13-hierarchy-branch::before, .library-v13-hierarchy-director::after, .library-v13-hierarchy-children::before, .library-v13-hierarchy-department::before, .library-v13-hierarchy-shared::before, .library-v13-hierarchy-shared > div::before { display: none !important; }

/* Library home: a department-aware landing, shaped around the staff member
   instead of a fixed Sales-first card.  The rows intentionally reserve their
   own text columns so labels, dates and arrows cannot overlap. */
#corehub-library-root-v11 .library-v13-home-head { margin-bottom: 18px; }
#corehub-library-root-v11 .library-v13-home-head h1 { font-size: 26px !important; }
#corehub-library-root-v11 .library-v13-home-overview { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); align-items: end; gap: 22px; margin: 0 0 26px; }
#corehub-library-root-v11 .library-v13-home-department { min-width: 0; }
#corehub-library-root-v11 .library-v13-home-department .library-v11-section-title { margin-bottom: 10px; }
#corehub-library-root-v11 .library-v13-home-primary { grid-template-columns: 64px minmax(0, 1fr) auto; min-height: 132px; gap: 18px; padding: 20px 22px; border: 1px solid #ffc4b0 !important; border-left: 3px solid var(--ch-primary) !important; border-radius: 10px !important; background: linear-gradient(120deg, var(--ch-surface) 0%, #fff9f6 100%) !important; color: var(--ch-text) !important; box-shadow: var(--ch-shadow) !important; text-align: left; }
#corehub-library-root-v11 .library-v13-home-primary > .library-v11-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 999px; background: var(--ch-primary-soft) !important; color: var(--ch-primary-hover) !important; font-size: 25px; }
#corehub-library-root-v11 .library-v13-home-primary strong { color: var(--ch-text); font-size: 19px; }
#corehub-library-root-v11 .library-v13-home-primary p { max-width: 390px; color: var(--ch-muted) !important; font-size: 11px; line-height: 1.55; }
#corehub-library-root-v11 .library-v13-home-primary b { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 36px; padding: 0 14px; border: 1px solid var(--ch-primary) !important; border-radius: 7px; background: var(--ch-surface) !important; color: var(--ch-primary-hover) !important; font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; }
#corehub-library-root-v11 .library-v13-home-primary b span { font-size: 16px; line-height: 1; }
#corehub-library-root-v11 .library-v13-home-updates { align-self: stretch; min-width: 0; }
#corehub-library-root-v11 .library-v13-home-updates-wide { grid-column: 1 / -1; }
#corehub-library-root-v11 .library-v13-home-updates > header { min-height: 45px; padding: 12px 16px; }
#corehub-library-root-v11 .library-v13-home-updates > header h3 { font-size: 14px; }
#corehub-library-root-v11 .library-v13-home-updates > header button { padding: 4px 0; color: var(--ch-primary-hover); font-size: 10px; }
#corehub-library-root-v11 .library-v13-home-update-head,
#corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list button { display: grid; grid-template-columns: minmax(0, 1fr) minmax(104px, .48fr) 88px 18px; align-items: center; gap: 12px; }
#corehub-library-root-v11 .library-v13-home-update-head { min-height: 30px; padding: 7px 16px; border-bottom: 1px solid var(--ch-line); color: var(--ch-muted-2); font-size: 8px; font-weight: 750; letter-spacing: .04em; line-height: 1.2; text-transform: uppercase; }
#corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list button { min-height: 35px; padding: 8px 16px; }
#corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list strong,
#corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list span,
#corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list time { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list strong { color: var(--ch-text); font-size: 10px; }
#corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list span,
#corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list time { color: var(--ch-muted); font-size: 9px; }
#corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list b { color: var(--ch-primary-hover); font-size: 16px; line-height: 1; }
#corehub-library-root-v11 .library-v13-home-company,
#corehub-library-root-v11 .library-v13-home-departments { margin-top: 0; margin-bottom: 24px; }
#corehub-library-root-v11 .library-v13-home-company-row { display: grid; gap: 14px; }
#corehub-library-root-v11 .library-v13-home-company-row + .library-v13-home-company-row { margin-top: 14px; }
#corehub-library-root-v11 .library-v13-home-company-row-primary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#corehub-library-root-v11 .library-v13-home-company-row-secondary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#corehub-library-root-v11 .library-v13-home-company .library-v11-resource-card { min-height: 148px; padding: 16px; }
#corehub-library-root-v11 .library-v13-home-company .library-v11-resource-card > .library-v11-icon { width: 42px; height: 42px; border-radius: 999px; }

/* Unified publishing entry: the content kind is selected before authoring.
   Specialised editors keep the same shared audience/publishing controls. */
#library-v13-editor .library-v13-editor-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}
#library-v13-editor .library-v13-editor-head > div { min-width: 0; }
#library-v13-editor .library-v16-publish-kind {
    width: min(310px, 34vw);
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: #68758a;
}
#library-v13-editor .library-v16-publish-kind select {
    display: block;
    width: 100%;
    height: 44px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 650;
}
#library-v13-editor .library-v16-editor-context {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 18px;
    padding: 10px 13px;
    border: 1px solid #e4e8ef;
    border-radius: 10px;
    background: #f8fafc;
    color: #68758a;
    font-size: 13px;
}
#library-v13-editor .library-v16-editor-context strong { color: #15233b; }
#library-v13-editor .library-v16-technical-type { display: none; }
#library-v13-editor [hidden] { display: none !important; }
#library-v13-editor.library-v16-promotion-editor .library-v16-editor-context {
    border-color: #ffd4c8;
    background: #fff8f5;
}
@media (max-width: 767px) {
    #library-v13-editor .library-v13-editor-head { align-items: stretch; flex-direction: column; }
    #library-v13-editor .library-v16-publish-kind { width: 100%; }
}
#corehub-library-root-v11 .library-v13-home-company .library-v11-resource-card strong { margin-top: 12px; font-size: 11px; }
#corehub-library-root-v11 .library-v13-home-company .library-v11-resource-card p { min-height: 42px; font-size: 9px; line-height: 1.45; }
#corehub-library-root-v11 .library-v13-home-company .library-v11-resource-card b { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; }
#corehub-library-root-v11 .library-v13-home-departments .library-v11-department-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; }
#corehub-library-root-v11 .library-v13-home-departments .library-v11-department-card { grid-template-columns: 44px minmax(0, 1fr) 18px; min-height: 72px; padding: 13px 16px; }
#corehub-library-root-v11 .library-v13-home-departments .library-v11-department-card > .library-v11-icon { width: 42px; height: 42px; border-radius: 999px; }
#corehub-library-root-v11 .library-v13-home-departments .library-v11-department-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
#corehub-library-root-v11 .library-v13-home-departments .library-v11-department-card small { color: var(--ch-primary-hover); font-size: 9px; font-weight: 650; }
#corehub-library-root-v11 .library-v13-home-departments .library-v11-department-card b { color: var(--ch-primary-hover); }

@media (max-width: 1180px) {
  #corehub-library-root-v11 .library-v13-home-overview { grid-template-columns: minmax(0, 1fr) minmax(370px, .9fr); gap: 16px; }
  #corehub-library-root-v11 .library-v13-home-primary { grid-template-columns: 56px minmax(0, 1fr); padding: 18px; }
  #corehub-library-root-v11 .library-v13-home-primary > .library-v11-icon { width: 54px; height: 54px; }
  #corehub-library-root-v11 .library-v13-home-primary b { grid-column: 2; justify-self: start; }
  #corehub-library-root-v11 .library-v13-home-company-row-primary,
  #corehub-library-root-v11 .library-v13-home-company-row-secondary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  #corehub-library-root-v11 .library-v13-home-overview { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  #corehub-library-root-v11 .library-v13-home-updates { min-height: 0; }
  #corehub-library-root-v11 .library-v13-home-departments .library-v11-department-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  #corehub-library-root-v11 .library-v13-home-head { gap: 12px; }
  #corehub-library-root-v11 .library-v13-home-head .library-v11-admin-actions { width: 100%; }
  #corehub-library-root-v11 .library-v13-home-head .library-v11-admin-actions .primary-btn { width: 100%; }
  #corehub-library-root-v11 .library-v13-home-primary { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; min-height: 0; }
  #corehub-library-root-v11 .library-v13-home-primary > .library-v11-icon { width: 50px; height: 50px; }
  #corehub-library-root-v11 .library-v13-home-primary b { grid-column: 1 / -1; width: 100%; }
  #corehub-library-root-v11 .library-v13-home-update-head { display: none; }
  #corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list button { grid-template-columns: minmax(0, 1fr) 18px; min-height: 48px; padding: 9px 14px; }
  #corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list span { grid-column: 1; grid-row: 2; font-size: 9px; }
  #corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list time { display: none; }
  #corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list b { grid-column: 2; grid-row: 1 / span 2; }
  #corehub-library-root-v11 .library-v13-home-company-row-primary,
  #corehub-library-root-v11 .library-v13-home-company-row-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #corehub-library-root-v11 .library-v13-home-company .library-v11-resource-card { min-height: 156px; padding: 14px; }
  #corehub-library-root-v11 .library-v13-home-company .library-v11-resource-card p { min-height: 0; }
  #corehub-library-root-v11 .library-v13-home-departments .library-v11-department-grid { grid-template-columns: 1fr; gap: 9px; }
}

@media (max-width: 767px) {
  .topbar-right { height: 56px !important; min-height: 56px !important; }
  .corehub-profile-btn { height: 44px !important; min-height: 44px !important; }
  .library-v13-hierarchy { padding: 14px !important; }
  .library-v13-hierarchy-viewport { height: 650px !important; min-height: 560px !important; }
  .library-v13-hierarchy-canvas { width: 1120px !important; min-height: 920px !important; padding: 14px 20px 72px !important; }
}

/* Final Library and account-header alignment.  These controls deliberately
   share one 46px rhythm; the account label is no longer visually smaller than
   the bell or pushed against the browser edge. */
@media (min-width: 768px) {
  .topbar { padding-inline: 28px !important; }
  .topbar-right { height: 64px !important; min-height: 64px !important; gap: 14px !important; padding-right: 2px; }
  .corehub-bell { width: 46px !important; min-width: 46px !important; height: 46px !important; flex-basis: 46px !important; border-radius: 10px !important; }
  .corehub-bell svg { width: 22px !important; height: 22px !important; }
  .corehub-profile-btn { grid-template-columns: 38px minmax(82px, 1fr) auto 18px !important; column-gap: 10px !important; min-width: 252px !important; max-width: 330px !important; height: 46px !important; min-height: 46px !important; padding: 4px 12px 4px 4px !important; border-radius: 10px !important; }
  .corehub-profile-btn .corehub-avatar { width: 38px !important; height: 38px !important; min-width: 38px !important; font-size: 12px !important; }
  .corehub-profile-btn .corehub-profile-copy { display: flex !important; align-items: center !important; min-width: 0; height: 38px; }
  .corehub-profile-btn .welcome-name { font-size: 14px !important; font-weight: 700 !important; line-height: 22px !important; }
  .corehub-profile-btn .corehub-role-chip { min-height: 24px !important; padding: 3px 8px !important; font-size: 10px !important; font-weight: 760 !important; line-height: 16px !important; }
  .corehub-profile-btn > svg { width: 18px !important; height: 18px !important; }
}

/* The two Library hero cards use equal columns and share the same top and
   bottom edges.  The Department card fills its column rather than appearing
   as a smaller button beside a taller update list. */
@media (min-width: 861px) {
  #corehub-library-root-v11 .library-v13-home-overview { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; align-items: stretch !important; gap: 24px !important; }
  #corehub-library-root-v11 .library-v13-home-department { display: grid; grid-template-rows: 49px minmax(0, 1fr); min-height: 0; overflow: hidden; }
  #corehub-library-root-v11 .library-v13-home-department > header { display: flex; align-items: center; min-height: 49px; padding: 12px 16px; }
  #corehub-library-root-v11 .library-v13-home-department > header h3 { margin: 0; font-size: 14px; }
  #corehub-library-root-v11 .library-v13-home-primary { align-self: stretch; min-height: 0; height: 100%; grid-template-columns: 68px minmax(0, 1fr) auto; padding: 24px; border: 0 !important; border-left: 3px solid var(--ch-primary) !important; border-radius: 0 !important; box-shadow: none !important; }
  #corehub-library-root-v11 .library-v13-home-primary > .library-v11-icon { width: 64px; height: 64px; }
  #corehub-library-root-v11 .library-v13-home-updates { height: 100%; min-height: 0; }
}

/* Dashboard shell and type scale — one desktop geometry, one readable body
   scale.  The grid column and visible drawer intentionally use the same 220px
   value so there is no dead strip between navigation and page content. */
@media (min-width: 768px) {
  :root { --drawer-w: 220px; --topbar-h: 70px; }
  #app.active { grid-template-columns: 220px minmax(0, 1fr) !important; grid-template-rows: 70px minmax(calc(100vh - 70px), auto) !important; }
  .drawer { width: 220px !important; }
  .drawer-header { height: 70px !important; min-height: 70px !important; padding: 0 10px !important; }
  .corehub-brand-wordmark { width: 180px !important; max-height: 60px !important; }
  .topbar { height: 70px !important; min-height: 70px !important; }
  .topbar-right { height: 70px !important; min-height: 70px !important; }
  .corehub-topbar-context strong { font-size: 19px !important; font-weight: 800 !important; line-height: 24px !important; }

  /* All sidebar blocks begin at x=10.  Main and secondary labels share the
     same x=52 text rail; footer labels now use the same icon/label structure. */
  #drawer .drawer-nav { padding: 12px 0 18px !important; }
  #drawer .core-nav-label { width: 210px; margin: 18px 0 8px 10px !important; padding: 0 !important; font-size: 14px !important; font-weight: 500 !important; line-height: 18px !important; }
  #drawer .core-nav-label:first-child { margin-top: 4px !important; }
  #drawer .nav-item, #drawer .nav-group-header { width: 210px; min-height: 40px !important; margin: 2px 0 2px 10px !important; padding: 0 10px !important; font-size: 15px !important; font-weight: 550 !important; line-height: 20px !important; }
  #drawer .nav-group-items { padding: 2px 0 3px !important; }
  #drawer .nav-sub { width: 210px; min-height: 36px !important; margin-left: 10px !important; padding-left: 40px !important; font-size: 13px !important; font-weight: 550 !important; line-height: 20px !important; }
  #drawer .drawer-footer { display: grid !important; gap: 4px; padding: 14px 0 18px 10px !important; }
  #drawer .drawer-footer .ghost-btn { display: grid !important; grid-template-columns: 20px minmax(0, 1fr); align-items: center; column-gap: 12px; width: 177px; min-height: 36px !important; padding: 0 10px !important; font-size: 15px !important; font-weight: 550 !important; line-height: 20px !important; }
  #drawer .drawer-footer .drawer-footer-icon { display: grid; place-items: center; width: 20px; height: 20px; font-size: 15px; line-height: 20px; }

  /* Keep the profile control's width while reserving five more pixels on its
     right: ADMIN and its chevron move left together without moving the bell. */
  .corehub-profile-btn { padding-right: 17px !important; }
  .corehub-profile-btn .welcome-name { font-size: 15px !important; }
  .corehub-profile-btn .corehub-role-chip { font-size: 14px !important; }
  .corehub-profile-btn .corehub-avatar { font-size: 15px !important; line-height: 13px !important; }

  .dashboard-location-control { width: 250px !important; min-width:250px !important; }
  .corehub-page-head p, .ops-page-head p, .library-v11-head p { font-size: 14px !important; }
  .dashboard-summary-card { min-height: 100px !important; padding: 16px 24px !important; }
  .dashboard-summary-card small { font-size: 13px !important; font-weight: 500 !important; line-height: 18px !important; }
  .dashboard-summary-card p { font-size: 13px !important; font-weight: 500 !important; line-height: 18px !important; }
  .dashboard-panel header button { font-size: 13px !important; }
  .dashboard-panel > p { font-size: 13px !important; }
  .dashboard-empty strong { font-size: 15px !important; }
  .dashboard-empty p { font-size: 13px !important; }
}

/* Shared desktop content scale.  Standard copy, controls and table content
   use 14px; section headings use 16px; page headings retain the 28px tier.
   Explicit compact metadata (for example location labels) stays at 10px. */
@media (min-width: 768px) {
  .page-area :is(input, select, textarea, button, td, .ops-table td, .ops-table small, .ops-panel-body p, .ops-insight span, .ops-activity-row small, .ops-activity-row time, .library-v11-resource-card p, .library-v11-resource-card b, .library-v11-department-card small, .library-v11-update-list strong, .library-v11-update-list span, .library-v11-update-list time, .library-v11-list-row, .library-v11-list-row small, .library-v11-list-row > span, .library-v11-quick-list strong, .library-v11-quick-list small) { font-size: 13px !important; }
  .page-area :is(.ops-panel-head h2, .ops-panel-head h3, .ops-entry-card h2, .library-v11-section-title h2, .library-v11-panel > header h3, .library-v11-resource-card strong, .library-v11-department-card strong, .library-v11-dept-resource-card strong, .library-v11-quick-list h3) { font-size: 15px !important; }
  .page-area :is(.ops-table th, .data-table th, .ops-field > span, .ops-filter > span, .ops-location-select > span, .library-v11-list-head) { font-size: 9px !important; }
}

/* One shared desktop right edge.  The working canvas spans to the same x-axis
   as the account chevron, so Dashboard, Inventory, Records and Library no
   longer end early and leave a blank strip at the right of the application. */
@media (min-width: 981px) {
  .page-area { width: 100% !important; max-width: none !important; padding-right: 47px !important; }
  .page-area > .page, .page-area > .page .ops-page { width: 100% !important; max-width: none !important; margin-right: 0 !important; margin-left: 0 !important; }
}

/* Library home and product lock-up: one deliberate desktop alignment grid.
   The product name belongs under the YUHOME wordmark; the top bar retains
   space for navigation and account controls, rather than repeating the label. */
@media (min-width: 768px) {
  .drawer-header { position: relative; align-items: flex-start !important; padding-top: 8px !important; }
  .drawer-header .brand { display: grid !important; grid-template-columns: 1fr; grid-template-rows: 43px 12px; gap: 0 !important; width: 180px; height: 60px; align-content: start; }
  .corehub-brand-wordmark { width: 180px !important; height: 43px !important; max-height: 43px !important; object-fit: contain !important; object-position: left center; }
  .corehub-brand-subtitle { justify-self: end; margin-top: -1px; color: var(--ch-text); font-size: 10px; font-weight: 750; line-height: 12px; letter-spacing: .01em; }
  .corehub-topbar-context .corehub-topbar-title { display: none !important; }

  #corehub-library-root-v11 { display: grid; grid-template-columns: minmax(0, 1fr); }
  #corehub-library-root-v11 .library-v13-home-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 70px; margin: 0 0 14px !important; }
  #corehub-library-root-v11 .library-v13-home-head > div:first-child { min-width: 0; }
  #corehub-library-root-v11 .library-v13-home-head h1 { margin: 0 !important; }
  #corehub-library-root-v11 .library-v13-home-head p { margin: 6px 0 0 !important; }
  #corehub-library-root-v11 .library-v13-home-head .library-v11-admin-actions { display: flex; align-items: center; margin: 0; }
  #corehub-library-root-v11 .library-v13-home-head .primary-btn { min-width: 172px; min-height: 40px !important; }

  #corehub-library-root-v11 .library-v11-search { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; min-height: 52px; height: 52px; gap: 8px; margin: 0 0 22px !important; padding: 0 14px !important; }
  #corehub-library-root-v11 .library-v13-search-icon { display: grid; place-items: center; width: 24px; height: 24px; color: var(--ch-muted); }
  #corehub-library-root-v11 .library-v13-search-icon svg { display: block; width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; }
  #corehub-library-root-v11 .library-v11-search input { height: 42px; min-height: 42px !important; margin: 0 !important; font-size: 13px !important; line-height: 20px !important; }

  #corehub-library-root-v11 .library-v13-home-company,
  #corehub-library-root-v11 .library-v13-home-departments { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; width: 100%; margin: 0 0 26px !important; }
  #corehub-library-root-v11 .library-v13-home-company .library-v11-section-title,
  #corehub-library-root-v11 .library-v13-home-departments .library-v11-section-title { display: flex; align-items: center; min-height: 32px; width: 100%; margin: 0 0 12px !important; }
  #corehub-library-root-v11 .library-v13-home-company .library-v11-section-title h2,
  #corehub-library-root-v11 .library-v13-home-departments .library-v11-section-title h2 { margin: 0 !important; }
  #corehub-library-root-v11 .library-v13-home-company-row,
  #corehub-library-root-v11 .library-v13-home-departments .library-v11-department-grid { width: 100%; margin-inline: 0 !important; }
}

@media (max-width: 767px) {
  .corehub-brand-subtitle { display: none; }
}

/* Publish Content: a single restrained form system. Title and Summary share
   the same control rhythm; the three setting groups are native accordions so
   their detailed controls can be hidden without changing or losing values. */
#library-v13-editor .library-v13-blog-editor { width: min(1440px, calc(100vw - 32px)) !important; }
#library-v13-editor .library-v13-editor-head .hub-eyebrow,
#library-v13-editor .library-v13-editor-head p,
#library-v13-editor .library-v13-field,
#library-v13-editor .library-v13-setting-body,
#library-v13-editor .library-v13-setting-body label,
#library-v13-editor .library-v13-setting-body :is(input, textarea, select),
#library-v13-editor .library-v13-setting-body .library-v13-setting-label,
#library-v13-editor .library-v13-setting-body .library-v11-check-grid label,
#library-v13-editor .library-v13-signature-card p,
#library-v13-editor .library-v13-signature-card li,
#library-v13-editor .library-v11-editor-footer :is(button, span),
#library-v13-editor .library-v13-writing-toolbar :is(button, select) { font-size: 13px !important; line-height: 20px !important; }
#library-v13-editor .library-v13-editor-head h3 { font-size: 27px !important; line-height: 35px !important; }
#library-v13-editor .library-v13-setting-card > summary > strong,
#library-v13-editor .library-v13-signature-card h4 { font-size: 15px !important; line-height: 22px !important; }

#library-v13-editor .library-v13-editor-layout > main { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px !important; }
#library-v13-editor .library-v13-field { grid-template-rows: 20px 44px !important; gap: 6px !important; color: var(--ch-text-control) !important; font-weight: 600 !important; }
#library-v13-editor .library-v13-editor-layout > main > .library-v13-field:nth-child(3) { display: block; height: 20px; min-height: 20px; }
#library-v13-editor .library-v13-field > input,
#library-v13-editor .library-v13-field > textarea,
#library-v13-editor .library-v13-summary-field > textarea { height: 44px !important; min-height: 44px !important; max-height: 44px; padding: 11px 12px !important; resize: none; }
#library-v13-editor .library-v13-field > input,
#library-v13-editor .library-v13-field > textarea { font-size: 13px !important; line-height: 20px !important; }
#library-v13-editor .library-v13-rich-editor { display: grid; grid-template-rows: auto minmax(0, 1fr); width: 100%; min-width: 0; height: 326px; min-height: 326px; max-height: 326px; }
#library-v13-editor .library-v13-writing-toolbar { position: relative; z-index: 1; flex: 0 0 auto; }
#library-v13-editor .library-v13-rich-body { min-width: 0; min-height: 0 !important; height: auto; max-height: none; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; overflow-wrap: anywhere; word-break: normal; font-size: 13px !important; line-height: 20px !important; scrollbar-gutter: stable; }
#library-v13-editor .library-v13-rich-body > * { max-width: 100%; }

#library-v13-editor .library-v13-editor-layout > aside { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; margin-top: 24px !important; }
#library-v13-editor details.library-v13-setting-card { min-height: 0 !important; padding: 0 !important; overflow: hidden; border: 1px solid var(--ch-line) !important; border-radius: 10px !important; background: var(--ch-surface) !important; box-shadow: none !important; }
#library-v13-editor details.library-v13-setting-card > summary { display: grid; grid-template-columns: 40px minmax(0, 1fr) 24px; align-items: center; min-height: 68px; padding: 13px 20px; color: var(--ch-text); cursor: pointer; list-style: none; }
#library-v13-editor details.library-v13-setting-card > summary::-webkit-details-marker { display: none; }
#library-v13-editor details.library-v13-setting-card[open] > summary { border-bottom: 1px solid var(--ch-line); }
#library-v13-editor .library-v13-setting-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--ch-primary-soft); color: var(--ch-primary-hover); }
#library-v13-editor .library-v13-setting-icon svg { width: 19px; height: 19px; stroke: currentColor; }
#library-v13-editor .library-v13-setting-chevron { display: grid; place-items: center; width: 24px; height: 24px; color: var(--ch-text-control); transition: transform .16s ease; }
#library-v13-editor .library-v13-setting-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
#library-v13-editor details.library-v13-setting-card:not([open]) .library-v13-setting-chevron { transform: rotate(180deg); }
#library-v13-editor .library-v13-setting-body { display: grid; gap: 16px; padding: 18px 20px 20px; color: var(--ch-text-control); }
#library-v13-editor .library-v13-content-details-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#library-v13-editor .library-v13-publishing-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: end; column-gap: 16px; row-gap: 16px; width: 100%; }
#library-v13-editor .library-v13-setting-body > label,
#library-v13-editor .library-v13-content-details-grid > .library-v11-form-grid > label,
#library-v13-editor .library-v13-audience-grid > label { display: grid; grid-template-rows: 20px 44px; gap: 6px; min-width: 0; color: var(--ch-text-control); font-weight: 600; letter-spacing: 0; text-transform: none; }
#library-v13-editor .library-v13-content-details-grid > .library-v11-form-grid { display: contents; }
#library-v13-editor .library-v13-setting-body :is(select, input:not([type="checkbox"])) { box-sizing: border-box; width: 100%; height: 44px !important; min-height: 44px !important; padding: 0 14px !important; border-color: var(--ch-line-strong) !important; border-radius: 8px !important; background-color: var(--ch-surface) !important; color: var(--ch-text) !important; font-size: 13px !important; }
#library-v13-editor .library-v13-setting-body select:not([multiple]) { padding-right: 42px !important; background-position: right 14px center !important; }
#library-v13-editor .library-v13-audience-grid { display: grid; grid-template-columns: minmax(250px, .36fr) minmax(0, .64fr); align-items: start; gap: 20px; }
#library-v13-editor .library-v13-visibility-field { display: block !important; }
#library-v13-editor .library-v13-visibility-field > select { display: none !important; }
#library-v13-editor .library-v13-visibility-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
#library-v13-editor .library-v13-visibility-choices button { display: grid; gap: 2px; min-height: 58px; padding: 9px 11px; border: 1px solid var(--ch-line-strong); border-radius: 8px; background: #fff; color: var(--ch-text-control); text-align: left; cursor: pointer; }
#library-v13-editor .library-v13-visibility-choices button strong { font-size: 13px; line-height: 18px; }
#library-v13-editor .library-v13-visibility-choices button span { color: var(--ch-muted); font-size: 11px; line-height: 15px; }
#library-v13-editor .library-v13-visibility-choices button.active { border-color: var(--ch-primary); background: var(--ch-primary-soft); box-shadow: inset 0 0 0 1px var(--ch-primary); }
#library-v13-editor .library-v13-visibility-choices button:disabled { cursor: default; opacity: .72; }
#library-v13-editor .library-v13-visible-departments { display: grid; gap: 6px; min-width: 0; }
#library-v13-editor .library-v13-visible-departments[hidden] { display: none !important; }
#library-v13-editor .library-v13-setting-body .library-v13-setting-label { margin: 0 !important; color: var(--ch-text-control) !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; }
#library-v13-editor .library-v13-setting-body .library-v11-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
#library-v13-editor .library-v13-setting-body .library-v11-check-grid label { min-width: 0; min-height: 36px; padding: 7px 10px; border-color: var(--ch-line) !important; border-radius: 8px; background: var(--ch-surface-raised); color: var(--ch-text-control); font-weight: 500; }
#library-v13-editor .library-v13-inline-check { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; padding: 0 2px; color: var(--ch-text-control); font-size: 13px !important; font-weight: 500; line-height: 20px !important; cursor: pointer; user-select: none; }
#library-v13-editor .library-v13-inline-check input { cursor: pointer; accent-color: var(--ch-primary); }
#library-v13-editor .library-v13-publishing-grid > label:last-child { grid-column: 1 / -1; }
#library-v13-editor .library-v13-publishing-grid > label,#library-v13-editor .library-v13-date-range-field { box-sizing: border-box; width: 100%; margin: 0; }
#library-v13-editor .library-v13-date-range-field { position: relative; display: grid; grid-column: span 2; grid-template-rows: 20px 44px; gap: 6px; min-width: 0; }
#library-v13-editor .library-v13-date-range-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--ch-text-control); font-weight: 600; }
#library-v13-editor .library-v13-date-range-button { box-sizing: border-box; display: grid; grid-template-columns: 22px minmax(0,1fr) 16px; align-items: center; gap: 10px; width: 100%; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--ch-line-strong); border-radius: 8px; background: #fff; color: var(--ch-text); font: inherit; text-align: left; cursor: pointer; }
#library-v13-editor .library-v13-date-range-button:hover { border-color: var(--ch-primary); }
#library-v13-editor .library-v13-date-range-icon { display: grid; place-items: center; color: var(--ch-primary); }
#library-v13-editor .library-v13-date-range-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.library-v13-calendar-backdrop { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 20px; background: rgba(16,24,40,.42); }
.library-v13-range-calendar { width: min(420px,calc(100vw - 32px)); padding: 20px; border: 1px solid var(--ch-line); border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.24); color: var(--ch-text); }
.library-v13-range-calendar > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.library-v13-range-calendar h3 { margin: 0; font-size: 18px; line-height: 24px; }
.library-v13-range-calendar header p { margin: 3px 0 0; color: var(--ch-muted); font-size: 13px; line-height: 19px; }
.library-v13-calendar-nav { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; margin-bottom: 12px; }
.library-v13-calendar-nav strong { text-align: center; }
.library-v13-calendar-nav button { width: 36px; height: 36px; border: 1px solid var(--ch-line); border-radius: 8px; background: #fff; font-size: 22px; cursor: pointer; }
.library-v13-calendar-week,.library-v13-calendar-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.library-v13-calendar-week span { padding: 6px 0; color: var(--ch-muted); font-size: 11px; font-weight: 650; text-align: center; }
.library-v13-calendar-days button { aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; color: var(--ch-text); cursor: pointer; }
.library-v13-calendar-days button:hover { background: var(--ch-primary-soft); }
.library-v13-calendar-days button.outside { color: #a8b0be; }
.library-v13-calendar-days button.in-range { border-radius: 0; background: #fff1ed; }
.library-v13-calendar-days button.selected { border-radius: 8px; background: var(--ch-primary); color: #fff; font-weight: 700; }
.library-v13-calendar-selection { min-height: 38px; margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: var(--ch-surface-soft); color: var(--ch-text-control); font-size: 13px; }
.library-v13-range-calendar footer { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ch-line); }
.library-v13-range-calendar button:disabled { cursor: not-allowed; opacity: .45; }
#library-v13-editor .library-v13-signature-card { display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; min-height: 0 !important; padding: 18px 20px !important; border: 1px solid var(--ch-line) !important; border-radius: 10px !important; box-shadow: none !important; }
#library-v13-editor .library-v13-signature-card h4 { margin: 0 !important; }
#library-v13-editor .library-v13-signature-card p { margin: 2px 0 0 !important; }
#library-v13-editor .library-v13-signature-card ul { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; list-style: none; }
#library-v13-editor .library-v13-signature-card li { position: relative; padding-left: 22px; color: var(--ch-text-control); }
#library-v13-editor .library-v13-signature-card li::before { content: '✓'; position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: var(--ch-primary); color: #fff; font-weight: 700; }
#library-v13-editor .library-v11-editor-footer :is(.ghost-btn, .primary-btn) { min-height: 44px !important; padding-inline: 22px !important; }

@media (max-width: 767px) {
  #library-v13-editor .library-v13-editor-layout > main,
  #library-v13-editor .library-v13-content-details-grid,
  #library-v13-editor .library-v13-publishing-grid,
  #library-v13-editor .library-v13-audience-grid { grid-template-columns: minmax(0, 1fr) !important; }
  #library-v13-editor .library-v13-publishing-grid > label:last-child { grid-column: auto; }
  #library-v13-editor .library-v13-date-range-field { grid-column: auto; }
  #library-v13-editor .library-v13-setting-body .library-v11-check-grid,
  #library-v13-editor .library-v13-signature-card ul { grid-template-columns: minmax(0, 1fr); }
  #library-v13-editor .library-v13-visibility-choices { grid-template-columns: minmax(0, 1fr); }
  #library-v13-editor details.library-v13-setting-card > summary { padding-inline: 16px; }
  #library-v13-editor .library-v13-setting-body,
  #library-v13-editor .library-v13-signature-card { padding-inline: 16px !important; }
  .library-v13-emoji-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ============================================================
   Visual polish pass (2026-08-12)
   Refines existing components with the established design tokens
   only — no new colours, no structural/layout rewrites. This block
   is intentionally the last thing in the file so it wins the
   cascade, per the "final OMS layer is the source of truth" rule
   noted in index.html.

   Fixes:
   1) Dashboard KPI icon colours had drifted from their class names
      (".blue"/".purple" were both rendering the coral primary,
      ".red"/".stock" were rendering the amber warning tone) —
      each stat now gets its own distinct, intentional token colour.
   2) Primary button had a leftover blue-tinted shadow glow from an
      earlier palette while the button itself is coral — corrected
      to match --ch-primary.
   3) Card/button hover and press states get consistent, smoother
      transitions instead of an instant snap.
   ============================================================ */

.dashboard-summary-card {
  box-shadow: var(--ch-shadow-card);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-summary-card:hover {
  transform: translateY(-2px);
  border-color: var(--ch-line-strong);
  box-shadow: var(--ch-shadow);
}
.dashboard-summary-card small {
  font-weight: 650;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.dashboard-summary-card.blue > span { background: var(--ch-info-soft); color: var(--ch-info); }
.dashboard-summary-card.orange > span, .dashboard-summary-card.coral > span { background: var(--ch-warning-soft); color: var(--ch-warning); }
.dashboard-summary-card.purple > span { background: var(--ch-primary-soft); color: var(--ch-primary-hover); }
.dashboard-summary-card.red > span, .dashboard-summary-card.stock > span { background: var(--ch-danger-soft); color: var(--ch-danger); }

.primary-btn {
  box-shadow: 0 5px 14px rgba(240, 118, 90, .18);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.primary-btn:active { transform: translateY(1px); box-shadow: 0 2px 6px rgba(240, 118, 90, .18); }
.ghost-btn { transition: background .15s ease, border-color .15s ease, color .15s ease; }

/* ============================================================
   Reference alignment pass (2026-08-12, part 2)
   Ports the Yuhome OMS dashboard's design language (shadcn/ui +
   Geist) onto CoreHub's existing token system. Values below were
   read directly off that site's computed styles (colors, radii,
   shadows, type scale) — see PR description for the source data.
   Still additive/override-only: no markup or structural changes.
   ============================================================ */

html { font-size: 16px; }
body { font-size: 14px; line-height: 20px; }

/* Buttons and controls: reference uses a crisper 6px radius
   ("rounded-md") vs. cards which keep the larger 12px ("rounded-xl") —
   this two-tier radius is what reads as "standard/premium" rather
   than the previous near-uniform rounding. */
.primary-btn, .ghost-btn, .ops-btn, .refresh, select, .ops-filter select,
input[type="text"], input[type="search"], input[type="date"],
input[type="number"], input[type="tel"], input[type="email"], input[type="password"] {
  border-radius: var(--ch-radius-sm) !important;
}
.ghost-btn, .ops-btn, .refresh, select,
input[type="text"], input[type="search"], input[type="date"],
input[type="number"], input[type="tel"], input[type="email"], input[type="password"] {
  box-shadow: var(--ch-shadow-sm);
}

/* Dashboard KPI cards: match the reference's label/value type scale
   (label: 14px/500, sentence case, muted — value: 24px/700, tight
   tracking, near-black). Supersedes the uppercase-eyebrow treatment
   from the first polish pass now that we have the real reference. */
.dashboard-summary-card small {
  text-transform: none;
  letter-spacing: normal;
  font-size: 14px;
  font-weight: 500;
  color: var(--ch-muted);
}
.dashboard-summary-card strong {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ch-text);
}

/* Destructive action (Sign out) reads as red, matching the reference's
   destructive-button convention, without recoloring every ghost-btn. */
#logout-btn { color: var(--ch-danger); }

/* ============================================================
   Sidebar collapse (icon-only rail) + drawer-nav overflow fix
   (2026-08-12, part 3)
   ============================================================ */

/* Fix: on desktop, the nav items' hard-coded 210px width (+10px
   margin = 220px) left zero margin against the drawer's own 220px
   once its vertical overflow:auto scrollbar appeared, which pushed
   a stray horizontal scrollbar under the nav list. Nav items now
   size to the available width instead of a fixed px value, and any
   residual overflow is clipped rather than shown as a scrollbar. */
.drawer-nav { overflow-x: hidden !important; }
@media (min-width: 768px) {
  #drawer .nav-item, #drawer .nav-group-header { width: 100% !important; box-sizing: border-box; }
  #drawer .core-nav-label { width: auto !important; }
}

.drawer-collapse-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border: 1px solid var(--ch-line);
  border-radius: var(--ch-radius-sm);
  background: var(--ch-surface);
  color: var(--ch-muted);
  cursor: pointer;
  flex: 0 0 auto;
}
.drawer-collapse-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drawer-collapse-btn:hover { background: var(--ch-primary-subtle); border-color: var(--ch-line-primary); color: var(--ch-text); }

@media (min-width: 768px) {
  .drawer-collapse-btn { display: inline-flex; }
  :root { --drawer-w-collapsed: 64px; }
  #app.active, .drawer { transition: width .16s ease, grid-template-columns .16s ease; }

  body.sidebar-collapsed #app.active { grid-template-columns: var(--drawer-w-collapsed) minmax(0, 1fr) !important; }
  body.sidebar-collapsed .drawer { width: var(--drawer-w-collapsed) !important; }
  body.sidebar-collapsed .drawer-header { justify-content: center !important; padding: 0 !important; }
  body.sidebar-collapsed .drawer-header .brand { display: none !important; }
  body.sidebar-collapsed .drawer-header .drawer-collapse-btn { margin: 0; }

  body.sidebar-collapsed #drawer .core-nav-label,
  body.sidebar-collapsed #drawer .nav-group-items,
  body.sidebar-collapsed #drawer .nav-group-header .nav-arrow,
  body.sidebar-collapsed #drawer .nav-item > span:not(.nav-icon),
  body.sidebar-collapsed #drawer .nav-group-header > span:not(.nav-icon) { display: none !important; }

  body.sidebar-collapsed #drawer .nav-item,
  body.sidebar-collapsed #drawer .nav-group-header {
    width: 40px !important;
    min-width: 40px !important;
    margin: 2px auto !important;
    padding: 0 !important;
    gap: 0 !important;
    justify-content: center !important;
  }

  body.sidebar-collapsed .drawer-footer { padding-left: 0 !important; padding-right: 0 !important; }
  body.sidebar-collapsed .drawer-footer .ghost-btn { justify-content: center !important; padding: 0 !important; }
  body.sidebar-collapsed .drawer-footer .ghost-btn span:not(.drawer-footer-icon) { display: none !important; }
}

/* ============================================================
   Brand lock-up + collapse-button micro adjustments (2026-08-12, part 4)
   Pixel nudges on top of the existing desktop brand lock-up rule
   (".drawer-header .brand" grid, line 747). Switched the row track
   sizing to auto/auto so these deltas don't need to be re-balanced
   against a separately-tracked fixed row height every time.
   ============================================================ */
@media (min-width: 768px) {
  .drawer-header .brand { grid-template-rows: auto auto; height: auto; }
  .corehub-brand-wordmark { width: 180px !important; height: 45px !important; max-height: 45px !important; margin-top: 2px; }
  .corehub-brand-subtitle { font-size: 13px; line-height: 15px; margin-top: -2px; }
  .drawer-collapse-btn { margin-right: 2px; }
}

/* ============================================================
   Sidebar nav type scale: whole scale down 1px (2026-08-12, part 5)
   Applies on top of the desktop nav sizing set earlier in this file
   (core-nav-label 14, nav-item/nav-group-header 15, nav-sub 13,
   footer ghost-btn 15) — every tier shifts down 1px together so the
   relative hierarchy between them is unchanged.
   ============================================================ */
@media (min-width: 768px) {
  #drawer .core-nav-label { font-size: 13px !important; }
  #drawer .nav-item, #drawer .nav-group-header { font-size: 14px !important; }
  #drawer .nav-sub { font-size: 12px !important; }
  #drawer .drawer-footer .ghost-btn { font-size: 14px !important; }
}

/* ============================================================
   Topbar profile cluster: ADMIN badge tidy-up (2026-08-12, part 6)
   The role chip's font-size had been bumped to 14px at the desktop
   breakpoint (nearly as large as the 15px name next to it) while
   keeping its original tight 20px-tall pill padding — that mismatch
   between "almost name-sized text" and "small pill shape" is what
   reads as slightly off. Sized it back down as a proper badge
   (noticeably smaller than the name, like the reference site's
   secondary-button chrome) and gave it a soft tinted fill instead of
   a stark white-with-outline pill so it reads as one cohesive piece
   with the avatar/name instead of a separate sticker next to it.
   ============================================================ */
@media (min-width: 768px) {
  .corehub-profile-btn .corehub-role-chip {
    font-size: 12px !important;
    line-height: 16px !important;
    padding: 2px 7px !important;
    letter-spacing: .02em;
    background: var(--ch-primary-soft);
  }
}

/* ============================================================
   Collapse button vertical alignment (2026-08-12, part 7)
   .drawer-header uses align-items:flex-start so the two-row brand
   lock-up (logo + "CoreHub" caption) can sit under the header's
   padding-top. That left the button pinned to the header's very top
   edge while the logo's own box (2px margin-top + 45px height) sits
   lower, centered around ~24-25px down. Nudging the button down to
   match keeps it level with the logo instead of the whole lock-up.
   ============================================================ */
@media (min-width: 768px) {
  .drawer-collapse-btn { margin-top: 10px; }
}

/* ============================================================
   Collapse button position, round 2 (2026-08-12, part 8)
   Further nudge: +10px left (was margin-right:2px -> 12px),
   +5px down (was margin-top:10px -> 15px).
   ============================================================ */
@media (min-width: 768px) {
  .drawer-collapse-btn { margin-right: 12px; margin-top: 15px; }
}

/* ============================================================
   Real fix for the collapse button never moving horizontally
   (2026-08-12, part 9)

   Root cause found: at the 768px+ breakpoint the drawer is 220px
   wide with 10px left/right header padding, leaving 200px of
   content width — but .brand (180px, fixed) + .drawer-collapse-btn
   (28px) already add up to 208px, MORE than the 200px available.
   The flex row was already overflowing before any margin was
   applied. With zero (in fact negative) free space, "margin-left:
   auto" has nothing to redistribute, and margin-right on an
   overflowing row just grows the overflow instead of visibly
   shifting the button — which is exactly why every horizontal
   nudge so far had no visible effect, while margin-top (a cross-
   axis offset, not dependent on free space) worked fine every time.

   Fix: take the button out of the flex flow and position it with
   real coordinates against .drawer-header (already position:
   relative), which cannot be defeated by sibling overflow. Also
   resets the old margin-based attempts so they don't add on top.
   Starting values carry forward everything requested so far
   (2px + 10px left, 10px + 5px down).
   ============================================================ */
@media (min-width: 768px) {
  .drawer-collapse-btn {
    margin: 0 !important;
    position: absolute;
    top: 21px;
    right: 7px;
  }
}

/* Belt-and-suspenders on the ADMIN chip resize: target it via the
   button's #welcome-btn id as well, so this wins on specificity
   alone regardless of source order, in case some other rule was
   quietly out-specificity-ing the part-6 fix above. */
#welcome-btn .corehub-role-chip {
  font-size: 12px !important;
  line-height: 16px !important;
  padding: 2px 7px !important;
  background: var(--ch-primary-soft) !important;
}

/* ============================================================
   Topbar profile cluster: full redesign (2026-08-12, part 10)
   Bell + avatar/name/role/chevron, as one unit. Everything here is
   scoped through #welcome-btn (the profile button's real id) or a
   doubled-up selector so it wins on specificity outright rather
   than depending on source order — the same lesson learned from the
   collapse button: several earlier attempts in this file were
   simply out-specificity'd or starved of layout room, not "ignored."

   Design change, not just a resize: the ADMIN pill previously
   competed with "Terrance" for attention (bold dark name vs. a
   loud bordered coral outline chip) and the trailing chevron felt
   glued on. Softened the badge into a filled, borderless tag
   (quieter, reads as metadata rather than a second button), and
   gave every piece consistent vertical centering and breathing
   room instead of the two-different-heights feel.
   ============================================================ */
.corehub-bell.corehub-bell {
  width: 38px;
  height: 38px;
  border-color: var(--ch-line);
}

#welcome-btn#welcome-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  min-height: 38px;
  padding: 4px 10px 4px 4px;
  border-color: var(--ch-line);
}
#welcome-btn#welcome-btn .corehub-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
#welcome-btn#welcome-btn .corehub-profile-copy {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}
#welcome-btn#welcome-btn .welcome-name {
  font-size: 13px;
  font-weight: 650;
  line-height: 18px;
}
#welcome-btn#welcome-btn .corehub-role-chip {
  margin-left: 2px;
  border: 0;
  border-radius: 5px;
  background: var(--ch-primary-soft);
  color: var(--ch-primary-hover);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  line-height: 15px;
  padding: 1.5px 6px;
}
#welcome-btn#welcome-btn > svg {
  width: 15px;
  height: 15px;
  margin-left: 4px;
  color: var(--ch-muted-2);
}

/* ADMIN badge: center the text within its own fill (was relying on
   line-height alone, which fonts render slightly off-center for),
   and nudge 5px left. */
#welcome-btn#welcome-btn .corehub-role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  left: -5px;
}

/* ============================================================
   Topbar profile cluster, restructured (2026-08-12, part 11)
   Name on top row, ADMIN stacked directly underneath it (reusing
   the existing DOM order via CSS Grid placement, no markup change),
   trailing icon changed from a right-pointing chevron (which reads
   as "navigate into", wrong for a button that just opens a popover)
   to a down chevron, matching standard dropdown-trigger convention.
   !important throughout: an earlier breakpoint block sets
   .corehub-profile-btn's display/grid-template with !important, and
   !important beats higher specificity alone, so this has to match
   it to actually win.
   ============================================================ */
#welcome-btn#welcome-btn {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto !important;
  column-gap: 9px !important;
  row-gap: 1px !important;
  align-items: center !important;
}
#welcome-btn#welcome-btn .corehub-avatar {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
}
#welcome-btn#welcome-btn .corehub-profile-copy {
  display: block !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
}
#welcome-btn#welcome-btn .welcome-name {
  display: block !important;
}
#welcome-btn#welcome-btn .corehub-role-chip {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: start !important;
  position: static !important;
  left: auto !important;
  margin: 0 !important;
}
#welcome-btn#welcome-btn > svg {
  grid-column: 3 !important;
  grid-row: 1 / 3 !important;
  margin-left: 6px !important;
  transform: rotate(90deg);
}

/* ============================================================
   Profile button, full reset (2026-08-12, part 12)
   The part-11 grid only set grid-column/grid-row on each child,
   leaving width/height/padding/border for avatar, name and chip
   controlled by whichever older breakpoint-specific rule happened
   to also be !important (there are several across this file, sized
   for the old single-row layout) -- that mismatch between "new grid
   position" and "old box size" is what fell apart in the
   screenshot. This block is unconditional (no @media) and fully
   specifies every contested box-model property with !important, so
   it wins outright over every earlier rule regardless of viewport
   tier, instead of fighting them property-by-property.
   ============================================================ */
#welcome-btn#welcome-btn {
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto !important;
  column-gap: 9px !important;
  row-gap: 2px !important;
  align-items: center !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 6px 10px !important;
  border: 1px solid var(--ch-line) !important;
  border-radius: var(--ch-radius-sm) !important;
  background: var(--ch-surface) !important;
}
#welcome-btn#welcome-btn .corehub-avatar {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  align-self: center !important;
  justify-self: center !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  font-size: 12px !important;
}
#welcome-btn#welcome-btn .corehub-profile-copy {
  display: block !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: end !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
}
#welcome-btn#welcome-btn .welcome-name {
  display: block !important;
  overflow: visible !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 16px !important;
  white-space: nowrap !important;
}
#welcome-btn#welcome-btn .corehub-role-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  grid-column: 2 !important;
  grid-row: 2 !important;
  align-self: start !important;
  justify-self: start !important;
  position: static !important;
  left: auto !important;
  margin: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 2px 7px !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: var(--ch-primary-soft) !important;
  color: var(--ch-primary-hover) !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  letter-spacing: .04em !important;
  line-height: 13px !important;
}
#welcome-btn#welcome-btn > svg {
  grid-column: 3 !important;
  grid-row: 1 / 3 !important;
  align-self: center !important;
  justify-self: center !important;
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  color: var(--ch-muted-2) !important;
  transform: rotate(90deg);
}

/* ============================================================
   Profile button width +5px, and right-align it with the page
   content edge (2026-08-12, part 13)

   The codebase already had a documented "shared desktop right edge"
   rule (page-area padding-right: 47px at >=981px, specifically tuned
   so dashboard cards end at the same x as "the account chevron").
   The profile-button rebuild in part 12 changed its box model enough
   to break that alignment. Rather than guess a new number, matching
   the topbar's own right inset to that same 47px re-establishes the
   relationship the codebase already intended.
   ============================================================ */
#welcome-btn#welcome-btn {
  padding: 6px 20px 6px 10px !important;
}
@media (min-width: 981px) {
  .topbar { padding-right: 47px !important; }
  .topbar-right { padding-right: 0 !important; }
}

/* ============================================================
   Sidebar collapse button, relocated (2026-08-12, part 14)
   Moved out of the sidebar's own header (in index.html) into the
   topbar instead, matching the reference OMS where the toggle sits
   outside the sidebar next to the page breadcrumb, not glued to the
   logo. Overrides the old drawer-header-relative absolute
   positioning (parts 4/7/8/9) since it's now a plain flex child of
   .topbar, which already vertically centers its children.
   ============================================================ */
.topbar .drawer-collapse-btn {
  position: static !important;
  top: auto !important;
  right: auto !important;
  margin: 0 14px 0 -10px !important;
}

/* ============================================================
   Stock Count table: merge Difference + Status into one "Result"
   column (2026-08-12, part 15)
   Before every uncounted row (usually most of them) showed a
   redundant "Draft" pill in its own column next to an empty "—"
   difference -- two cells saying the same "nothing here yet" thing,
   repeated down the whole table. One column now carries both the
   number and the state via color, as a compact pill.
   ============================================================ */
.ops-difference {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 750;
  font-size: 12px;
}
.ops-difference.pending { background: var(--ch-surface-soft); color: var(--ch-muted); font-weight: 600; }
.ops-difference.matched { background: var(--ch-success-soft); color: var(--ch-success); }
.ops-difference.positive { background: var(--ch-success-soft); color: var(--ch-success); }
.ops-difference.negative { background: var(--ch-danger-soft); color: var(--ch-danger); }

/* Neutral icon tone: used to quiet down summary cards / tip panels
   that were using 3-4 different accent colors simultaneously with no
   real meaning behind which stat got which color -- reserving color
   for the one card that actually needs attention (Variances Found,
   only tinted orange when variance > 0) reads as calmer and points
   the eye at what matters instead of everything shouting equally. */
.ops-icon.neutral { background: var(--ch-surface-soft) !important; color: var(--ch-muted) !important; }

/* ============================================================
   "Variances Only" toggle was invisible (2026-08-12, part 16)
   Root cause: a site-wide generic rule (`input[type="checkbox"]`,
   in corehub-finish-v14.css) forces every checkbox to 15x15px
   !important -- meant for plain form checkboxes elsewhere, but it
   was also crushing the custom 38x22px pill-switch built for
   .ops-toggle (appearance:none + a painted ::after thumb) down to a
   tiny 15px gray circle, which is exactly the "barely visible"
   element in the screenshot. Restoring the switch's real dimensions
   with matching !important + higher specificity.

   Kept the control itself: unlike Difference/Status (which were two
   columns saying the same thing), this genuinely filters the table
   down to only the rows needing review, which still earns its place
   once the table gets long -- it just needed to be visible.
   ============================================================ */
.ops-toggle input[type="checkbox"] {
  width: 38px !important;
  min-width: 38px !important;
  height: 22px !important;
  min-height: 22px !important;
  flex: 0 0 38px !important;
  border-radius: 999px !important;
  accent-color: unset !important;
}
.ops-toolbar { align-items: flex-end !important; }
.ops-toggle { min-height: 40px; }

@media (max-width: 820px) {
  .ops-toolbar { align-items: stretch !important; }
}


/* Variances Only toggle: size was fixed in part 16, but the off-state
   fill (#dbe2ec) is too close to white/page background to actually
   read as a control at a glance -- adding a visible border and
   darker track fixes contrast regardless of screen/compression. */
.ops-toggle input[type="checkbox"] {
  border: 1.5px solid var(--ch-line-strong) !important;
  background: #c3cbd8 !important;
  box-shadow: none !important;
}
.ops-toggle input[type="checkbox"]:checked {
  border-color: var(--ch-primary) !important;
  background: var(--ch-primary) !important;
}
.ops-toggle { font-weight: 700 !important; color: var(--ch-text-control) !important; }

/* ============================================================
   Result column, real redesign not just a renamed header
   (2026-08-12, part 17)
   Adds an icon per state (check for matched, warning triangle for
   variance) alongside the color, so the column is scannable by
   shape as well as color/text -- three cues instead of one, and it
   reads as a distinct designed state rather than a plain colored
   label.
   ============================================================ */
.ops-difference { gap: 5px; }
.ops-difference svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; flex: 0 0 auto; }
.ops-difference.pending svg { display: none; }

/* Inventory filters share one baseline; action buttons no longer float above
   the labelled search and select controls on wide layouts. */
.ops-toolbar-actions { align-self: flex-end; }
.ops-page-back-row { display: flex; justify-content: flex-start; width: 100%; margin: 0 0 18px; }
.ops-page-back-row .ops-btn { min-width: 108px; }
.library-v13-back-row { display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:42px;margin:0 0 18px; }
.library-v13-back-row .library-v13-explicit-back { min-width:108px;min-height:42px; }
.library-v13-back-row .library-v11-admin-actions,.library-v13-back-row .library-v13-reader-actions { align-items:center;padding-top:0; }

/* Library readers share one compact article frame. The Page Tree/details rail
   begins on the title row, while summary and publication metadata remain beside
   the title instead of creating a tall block underneath it. */
.library-v13-reader-layout {
  grid-template-columns: minmax(0,1fr) minmax(300px,340px) !important;
  grid-template-areas:
    "prelude empty"
    "title aside"
    "document aside";
  column-gap: 32px !important;
  row-gap: 0;
  padding: 0 0 26px !important;
  align-items: start;
}
.library-v13-reader-head { display: contents; }
.library-v13-reader-prelude { grid-area: prelude; padding-top: 2px; }
.library-v13-reader-title-row {
  grid-area: title;
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
  padding: 8px 0 22px;
  border-bottom: 1px solid var(--ch-line);
}
.library-v13-reader-title-row > h1 {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 58%;
  margin: 0;
}
.library-v13-reader-title-meta {
  flex: 1 1 260px;
  min-width: 210px;
  max-width: 480px;
  padding-left: 28px;
  border-left: 1px solid var(--ch-line);
}
.library-v13-reader-title-meta > p {
  margin: 0;
  color: #667792;
  font-size: 16px;
  line-height: 1.45;
}
.library-v13-reader-title-meta .library-v13-reader-byline { margin-top: 10px; }
.library-v13-reader-document { grid-area: document; padding-top: 28px; }
.library-v13-reader-aside { grid-area: aside; }
.library-v13-reader-head > .library-v13-reader-actions { grid-area: empty; }

@media(max-width:1100px) {
  .library-v13-reader-title-row { align-items:flex-start; flex-direction:column; gap:10px; }
  .library-v13-reader-title-row > h1 { max-width:none; }
  .library-v13-reader-title-meta { width:100%; min-width:0; max-width:none; padding-left:0; border-left:0; }
}
@media(max-width:800px) {
  .library-v13-reader-layout {
    grid-template-columns:1fr !important;
    grid-template-areas:"prelude" "title" "document" "aside";
    row-gap:0 !important;
  }
  .library-v13-reader-aside { margin-top:22px; }
}

/* Mobile Library readers: when the desktop title row becomes a vertical stack,
   its horizontal flex-basis must not turn into hundreds of pixels of height. */
@media(max-width:800px) {
  .library-v13-reader-title-row {
    gap:8px;
    padding:6px 0 16px;
  }
  .library-v13-reader-title-meta {
    flex:0 0 auto !important;
    height:auto !important;
  }
  .library-v13-reader-title-meta > p {
    font-size:14px;
    line-height:1.45;
  }
  .library-v13-reader-title-meta .library-v13-reader-byline {
    margin-top:8px;
  }
  .library-v13-reader-document {
    padding-top:16px;
  }
  .library-v13-reader-content > h1 {
    margin:24px 0 9px;
  }
  .library-v13-reader-content > h2 {
    margin:24px 0 9px;
  }
  .library-v13-reader-content > h3 {
    margin:20px 0 7px;
  }
  .library-v13-reader-content > p {
    margin-bottom:12px;
  }
  .library-v13-reader-content :is(table,figure,.library-v14-callout,hr,ul,ol,pre,blockquote) {
    margin:18px 0;
  }
  .library-v13-reader-content .library-v13-article-divider {
    margin:28px 0;
  }
  .library-v25-reader-media,
  .library-v25-topic-visual,
  .library-v26-content-diagram {
    margin-bottom:18px;
  }
}

@media(max-width:520px) {
  .library-v13-reader-layout {
    padding-bottom:18px !important;
  }
  .library-v13-reader-title-row > h1 {
    line-height:1.12;
  }
  .library-v13-reader-document {
    padding-top:14px;
  }
  .library-v13-reader-aside {
    margin-top:16px;
  }
}

/* Stock Count follows the same category-section language as Stock Overview. */
[data-page-content="audit"] .ops-count-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0 12px;
  border: 1px solid var(--ch-line);
  border-radius: var(--ch-radius);
  background: #fff;
}
[data-page-content="audit"] .ops-count-summary .ops-summary-card {
  min-height: 96px;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
[data-page-content="audit"] .ops-count-summary .ops-summary-card + .ops-summary-card {
  border-left: 1px solid var(--ch-line) !important;
}
[data-page-content="audit"] .ops-toolbar { flex-wrap: nowrap; }
[data-page-content="audit"] .ops-count-category { flex: 0 1 210px; }
[data-page-content="audit"] .ops-toggle { white-space: nowrap; align-self: flex-end; }
[data-page-content="audit"] .ops-table tbody .ops-category-section td {
  padding: 10px 16px;
}
[data-page-content="audit"] .ops-count-discrepancy dl { margin: 0; display: grid; gap: 10px; }
[data-page-content="audit"] .ops-count-discrepancy dl div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
[data-page-content="audit"] .ops-count-discrepancy dt { color: var(--ch-muted); }
[data-page-content="audit"] .ops-count-discrepancy dd { margin: 0; font-weight: 750; }
[data-page-content="audit"] .ops-count-session-meta {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  margin: 0 0 20px;
  border: 1px solid var(--ch-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ch-shadow);
}
[data-page-content="audit"] .ops-count-session-meta > div { min-width: 0; padding: 18px 20px; }
[data-page-content="audit"] .ops-count-session-meta > div + div { border-left: 1px solid var(--ch-line); }
[data-page-content="audit"] .ops-count-session-meta span,
[data-page-content="audit"] .ops-count-session-meta small { display: block; color: var(--ch-muted); }
[data-page-content="audit"] .ops-count-session-meta strong { display: block; margin: 5px 0 3px; overflow-wrap: anywhere; }
[data-page-content="audit"] .ops-count-records td small { display: block; margin-top: 4px; color: var(--ch-muted); }

@media (max-width: 1100px) {
  [data-page-content="audit"] .ops-toolbar { flex-wrap: wrap; }
}
@media (max-width: 820px) {
  .ops-toolbar-actions { align-self: stretch; }
  [data-page-content="audit"] .ops-count-summary { grid-template-columns: 1fr 1fr; }
  [data-page-content="audit"] .ops-count-session-meta { grid-template-columns: 1fr 1fr; }
  [data-page-content="audit"] .ops-count-session-meta > div { border-left: 0 !important; border-top: 1px solid var(--ch-line); }
  [data-page-content="audit"] .ops-count-session-meta > div:first-child { border-top: 0; }
  [data-page-content="audit"] .ops-count-summary .ops-summary-card:nth-child(3) { border-left: 0 !important; border-top: 1px solid var(--ch-line) !important; }
  [data-page-content="audit"] .ops-count-summary .ops-summary-card:nth-child(4) { border-top: 1px solid var(--ch-line) !important; }
  [data-page-content="audit"] .ops-count-category { width: 100%; flex-basis: auto; }
}

.pending-actions-workspace { overflow: hidden; }
.pending-actions-workspace > header > strong { min-width: 30px; padding: 5px 9px; border-radius: 999px; background: var(--ch-warning-soft); color: var(--ch-warning); text-align: center; }
.pending-actions-list { display: flex; flex-direction: column; }
.pending-actions-list article { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--ch-line); }
.pending-actions-list article:first-child { border-top: 0; }
.pending-actions-list article > div > strong { display: block; color: var(--ch-text); font-size: 14px; }
.pending-actions-list article p { margin: 4px 0; color: var(--ch-muted); font-size: 13px; line-height: 1.45; }
.pending-actions-list article small { color: var(--ch-muted-2); font-size: 12px; }
.pending-actions-list article > button { min-height: 40px; padding: 0 16px; border: 1px solid var(--ch-primary); border-radius: 8px; background: #fff; color: var(--ch-primary-hover); font-weight: 650; cursor: pointer; }
.pending-actions-list article > button:hover { background: var(--ch-primary-soft); }
.ops-count-missed-row { background: #fffafa; }
.ops-count-signature-thumb { display: block; width: 112px; height: 38px; object-fit: contain; border: 1px solid var(--ch-line); border-radius: 6px; background: #fff; }
.ops-count-signature-record { margin: 14px 0; }
.ops-count-signature-record .ops-panel-body { display: flex; align-items: center; gap: 18px; }
.ops-count-signature-record img { width: 190px; max-height: 72px; object-fit: contain; border: 1px solid var(--ch-line); border-radius: 8px; background: #fff; }
.ops-count-signature-record span, .ops-count-signature-record small { display: block; margin-top: 4px; color: var(--ch-muted); }
.ops-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
[data-page-content="audit"] .ops-count-entry-table { min-width: 780px; table-layout: fixed; }
[data-page-content="audit"] .ops-count-entry-table th:nth-child(1),
[data-page-content="audit"] .ops-count-entry-table td:nth-child(1) { width: 54px; color: var(--ch-muted); text-align: center; }
[data-page-content="audit"] .ops-count-entry-table th:nth-child(2),
[data-page-content="audit"] .ops-count-entry-table td:nth-child(2) { width: 112px; }
[data-page-content="audit"] .ops-count-entry-table th:nth-child(3),
[data-page-content="audit"] .ops-count-entry-table td:nth-child(3) { width: auto; }
[data-page-content="audit"] .ops-count-entry-table th:nth-child(4),
[data-page-content="audit"] .ops-count-entry-table td:nth-child(4) { width: 150px; padding-left: 48px; }
[data-page-content="audit"] .ops-count-entry-table th:nth-child(5),
[data-page-content="audit"] .ops-count-entry-table td:nth-child(5) { width: 126px; }
[data-page-content="audit"] .ops-count-entry-table th:nth-child(6),
[data-page-content="audit"] .ops-count-entry-table td:nth-child(6) { width: 86px; text-align: center; }
[data-page-content="audit"] .ops-count-qty-input { width: 78px !important; min-width: 78px !important; max-width: 78px !important; text-align: center; font-variant-numeric: tabular-nums; }
.ops-count-check { display: inline-grid; grid-template-columns: 16px 26px; min-width: 50px; align-items: center; justify-content: start; column-gap: 7px; }
.ops-count-light { width: 13px; height: 13px; flex: 0 0 13px; border: 2px solid rgba(15, 23, 42, .08); border-radius: 50%; background: #cbd5e1; box-shadow: 0 0 0 3px #f1f5f9; }
.ops-count-check[data-state="matched"] .ops-count-light { background: #14b8a6; box-shadow: 0 0 0 3px #ccfbf1; }
.ops-count-check[data-state="mismatch"] .ops-count-light { background: #ef4444; box-shadow: 0 0 0 3px #fee2e2; }
.ops-count-check[data-state="explained"] .ops-count-light { background: #8b5cf6; box-shadow: 0 0 0 3px #ede9fe; }
.ops-count-reason-btn { width: 26px; height: 28px; padding: 0; border: 1px solid var(--ch-line); border-radius: 7px; background: #fff; color: var(--ch-text); font-size: 18px; line-height: 1; cursor: pointer; }
.ops-count-reason-btn:hover { border-color: #8b5cf6; background: #f5f3ff; color: #7c3aed; }
.ops-count-reason-btn[hidden] { display: none !important; }
.ops-count-entry-table tr.ops-count-unresolved > td { background: #fff1f2 !important; }
.ops-count-entry-table tr.ops-count-unresolved > td:first-child { box-shadow: inset 4px 0 0 #ef4444; }
.ops-count-entry-table tr.ops-count-unresolved .ops-count-qty-input { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239, 68, 68, .1); }
.ops-variance-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 18px; }
.ops-variance-compare span { padding: 12px 14px; border: 1px solid var(--ch-line); border-radius: 9px; color: var(--ch-muted); }
.ops-variance-compare strong { float: right; color: var(--ch-text); font-size: 16px; }
.ops-adjustment-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--ch-line);
  border-radius: 9px;
  background: #fafafa;
  cursor: pointer;
}
.ops-adjustment-choice input { margin-top: 3px; }
.ops-adjustment-choice strong,
.ops-adjustment-choice small,
.ops-count-appeal-info span,
.ops-count-appeal-warning span { display: block; }
.ops-adjustment-choice small { margin-top: 3px; color: var(--ch-muted); line-height: 1.4; }
.ops-count-appeal-info,
.ops-count-appeal-warning { margin: 14px 0; padding: 12px 14px; border: 1px solid; border-radius: 9px; }
.ops-count-appeal-info { border-color: #b9e5d0; background: #eefaf4; color: #146c43; }
.ops-count-appeal-warning { border-color: #f6b0a3; background: #fff3f0; color: #a93627; }
.ops-count-appeal-info span,
.ops-count-appeal-warning span { margin-top: 5px; line-height: 1.4; }
.ops-adjustment-context { display: grid; grid-template-columns: 1.6fr 1fr .65fr; gap: 10px; margin: 14px 0; }
.ops-adjustment-context > div { min-width: 0; padding: 11px 12px; border: 1px solid var(--ch-line); border-radius: 8px; background: #fafafa; }
.ops-adjustment-context span,
.ops-adjustment-context strong { display: block; }
.ops-adjustment-context span { margin-bottom: 4px; color: var(--ch-muted); font-size: 12px; font-weight: 650; }
.ops-adjustment-context strong { overflow-wrap: anywhere; }
.ops-signature-trail-row { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--ch-line); }
.ops-signature-trail-row:last-child { border-bottom:0; }
.ops-signature-trail-row img { width:88px; height:38px; object-fit:contain; border:1px solid var(--ch-line); border-radius:7px; background:#fff; }
.ops-signature-trail-row div { display:flex; flex-direction:column; gap:3px; min-width:0; }
.ops-signature-trail-row span { color:var(--ch-muted); }
@media (max-width: 620px) { .ops-adjustment-context { grid-template-columns: 1fr; } }

/* Keep the Stock Overview filter row on one visual baseline. */
[data-page-content="inventory"] .ops-overview-filterbar {
  align-items: flex-end;
  flex-wrap: wrap;
}
[data-page-content="inventory"] .ops-overview-filterbar > .ops-filter {
  justify-content: flex-end;
}
[data-page-content="inventory"] .ops-overview-toggle-field {
  flex: 0 0 150px;
  min-width: 150px;
}
[data-page-content="inventory"] .ops-overview-action-field {
  flex: 0 0 118px;
  min-width: 118px;
}
[data-page-content="inventory"] .ops-overview-toggle-field .ops-low-stock-toggle,
[data-page-content="inventory"] .ops-overview-action-field .ops-btn {
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  box-sizing: border-box;
}
[data-page-content="inventory"] .ops-overview-toggle-field .ops-low-stock-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--ch-line);
  border-radius: 8px;
  background: #fff;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .pending-actions-list article { grid-template-columns: 40px minmax(0, 1fr); padding: 14px; }
  .pending-actions-list article > button { grid-column: 1 / -1; width: 100%; }
}

/*
 * Inventory on phones
 *
 * Operations originally kept each desktop table at a 650–780px minimum width.
 * That caused an iPhone to crop the inventory rows and squeeze action labels
 * into a letter-per-line column.  The controls module now adds a header label
 * to each cell; below, one semantic table becomes a compact card layout on a
 * phone while desktop keeps the original table.
 */
@media (max-width: 700px) {
  [data-page-content] .ops-page { min-width: 0; overflow-x: clip; }

  .corehub-mobile-workspace-nav {
    margin: 0 0 12px;
    padding: 7px;
    border: 1px solid var(--ch-line);
    border-radius: 11px;
    background: #fff;
  }
  .corehub-mobile-workspace-label { display: none; }
  .corehub-mobile-workspace-scroll { gap: 6px; padding: 0 0 1px; }
  .corehub-mobile-workspace-scroll button {
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
  }

  /* Keep page switches, filters and action buttons touch-friendly without
     turning a simple inventory screen into a long stack of oversized fields. */
  .ops-page .ops-summary-grid,
  .ops-page .ops-summary-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 12px;
  }
  .ops-page .ops-summary-grid.three > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ops-page .ops-summary-card {
    min-height: 72px !important;
    gap: 9px;
    padding: 11px !important;
  }
  .ops-page .ops-summary-card .ops-icon,
  .ops-page .ops-summary-card > span {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px;
  }
  .ops-page .ops-summary-card .ops-icon svg,
  .ops-page .ops-summary-card > span svg { width: 18px !important; height: 18px !important; }
  .ops-page .ops-summary-card strong { margin: 1px 0; font-size: 18px !important; line-height: 1.12; }
  .ops-page .ops-summary-card small,
  .ops-page .ops-summary-card p { font-size: 10px !important; line-height: 1.32; }

  .ops-page .ops-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end !important;
    gap: 9px !important;
    padding: 11px !important;
  }
  .ops-page .ops-toolbar > * { min-width: 0 !important; margin: 0 !important; }
  .ops-page .ops-toolbar .ops-filter,
  .ops-page .ops-toolbar .ops-filter.grow,
  .ops-page .ops-toolbar .ops-toggle,
  .ops-page .ops-toolbar .ops-toolbar-actions {
    width: auto !important;
    min-width: 0 !important;
  }
  .ops-page .ops-toolbar .ops-filter.grow { grid-column: 1 / -1; }
  .ops-page .ops-toolbar .ops-filter > span {
    min-height: 0;
    font-size: 9px !important;
    letter-spacing: .045em;
  }
  .ops-page .ops-toolbar .ops-select,
  .ops-page .ops-toolbar .ops-input {
    min-width: 0;
    min-height: 40px !important;
    padding-inline: 10px !important;
    font-size: 12px !important;
  }
  .ops-page .ops-toolbar .ops-toggle {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--ch-line);
    border-radius: 8px;
    font-size: 11px;
    white-space: nowrap;
  }
  .ops-page .ops-toolbar .ops-toolbar-actions {
    display: grid !important;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .ops-page .ops-toolbar .ops-toolbar-actions .ops-btn {
    width: 100%;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0 9px !important;
    font-size: 12px !important;
    overflow-wrap: normal !important;
    white-space: nowrap !important;
  }
  .ops-page .ops-toolbar .ops-toolbar-actions .ops-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  [data-page-content="inventory"] .ops-overview-toggle-field,
  [data-page-content="inventory"] .ops-overview-action-field {
    flex: initial !important;
    min-width: 0 !important;
  }
  [data-page-content="inventory"] .ops-overview-action-field { grid-column: 1 / -1; }
  [data-page-content="inventory"] .ops-overview-toggle-field .ops-low-stock-toggle,
  [data-page-content="inventory"] .ops-overview-action-field .ops-btn {
    width: 100%;
    min-height: 40px !important;
    height: 40px !important;
    padding-inline: 10px !important;
    font-size: 11px !important;
    overflow-wrap: normal !important;
    white-space: nowrap !important;
  }

  .ops-page .ops-entry-grid { gap: 10px !important; }
  .ops-page .ops-entry-card {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 0 !important;
    gap: 11px !important;
    padding: 13px !important;
  }
  .ops-page .ops-entry-card > span { width: 42px !important; height: 42px !important; border-radius: 10px; }
  .ops-page .ops-entry-card > span svg { width: 21px !important; height: 21px !important; }
  .ops-page .ops-entry-card h2 { margin: 0; font-size: 15px !important; }
  .ops-page .ops-entry-card p { margin: 4px 0 0; font-size: 11px !important; line-height: 1.42; }
  .ops-page .ops-entry-card .ops-btn {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 40px !important;
    overflow-wrap: normal !important;
    white-space: nowrap !important;
  }

  .ops-page .ops-form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .ops-page .ops-form-actions .ops-btn {
    width: 100%;
    min-width: 0 !important;
    min-height: 40px !important;
    padding-inline: 9px !important;
    overflow-wrap: normal !important;
    white-space: nowrap !important;
  }
  .ops-page .ops-form-actions .ops-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* Every operational table defaults to labelled cards on a phone. */
  .ops-table-wrap,
  .table-wrap {
    width: 100% !important;
    max-width: none !important;
    overflow: visible !important;
  }
  .ops-table,
  .ops-mobile-card-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
  }
  .ops-mobile-card-table thead { display: none !important; }
  .ops-mobile-card-table tbody { display: block !important; padding: 8px !important; }
  .ops-mobile-card-table tbody tr:not(.ops-category-section) {
    display: block !important;
    margin: 0 0 8px;
    border: 1px solid var(--ch-line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
  }
  .ops-mobile-card-table tbody tr:not(.ops-category-section):last-child { margin-bottom: 0; }
  .ops-mobile-card-table tbody td {
    display: grid !important;
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-width: 0;
    min-height: 0 !important;
    padding: 9px 10px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ch-line-subtle) !important;
    color: var(--ch-text-control);
    font-size: 12px;
    line-height: 1.4;
    text-align: right;
    overflow-wrap: anywhere;
  }
  .ops-mobile-card-table tbody td:last-child { border-bottom: 0 !important; }
  .ops-mobile-card-table tbody td::before {
    content: attr(data-ops-label);
    min-width: 0;
    color: var(--ch-muted-2);
    font-size: 9px;
    font-weight: 760;
    letter-spacing: .045em;
    line-height: 1.45;
    text-align: left;
    text-transform: uppercase;
  }
  .ops-mobile-card-table tbody td[data-ops-label="Actions"],
  .ops-mobile-card-table tbody td[data-ops-label="Action"],
  .ops-mobile-card-table tbody td[data-ops-label="View"] {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    text-align: left;
  }
  .ops-mobile-card-table tbody td[data-ops-label="Actions"]::before,
  .ops-mobile-card-table tbody td[data-ops-label="Action"]::before,
  .ops-mobile-card-table tbody td[data-ops-label="View"]::before { flex: 0 0 100%; }
  .ops-mobile-card-table .ops-btn {
    max-width: 100%;
    margin: 0 !important;
    overflow-wrap: normal !important;
    white-space: nowrap !important;
  }
  .ops-mobile-card-table .ops-mobile-empty-row td {
    display: block !important;
    text-align: left;
  }
  .ops-mobile-card-table .ops-mobile-empty-row td::before { display: none !important; }
  .ops-mobile-card-table tbody .ops-category-section {
    display: block !important;
    margin: 10px 0 7px !important;
    border: 1px solid #f0d5cf !important;
    border-radius: 8px !important;
    overflow: hidden;
  }
  .ops-mobile-card-table tbody .ops-category-section td {
    display: block !important;
    padding: 9px 11px !important;
    border: 0 !important;
    text-align: left;
  }
  .ops-mobile-card-table tbody .ops-category-section td::before { display: none !important; }
  .ops-mobile-card-table tbody .ops-category-section strong { font-size: 11px !important; }
  .ops-mobile-card-table tbody .ops-category-section span { margin-left: 7px; font-size: 10px; }

  /* Stock Overview: show each item as a dense stock card, never as a clipped
     horizontal sheet. */
  [data-page-content="inventory"] .ops-overview-table tbody { padding: 8px !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    grid-template-areas:
      "select sku status"
      "select item status"
      "position position position"
      "updated updated updated"
      "actions actions actions";
    align-items: start;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td {
    display: block !important;
    min-width: 0;
    padding: 8px 10px !important;
    border: 0 !important;
    text-align: left;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td::before { display: none !important; }
  [data-page-content="inventory"] .ops-overview-table td:nth-child(1) {
    display: flex !important;
    grid-area: select;
    justify-content: center;
    padding: 13px 3px 0 8px !important;
  }
  [data-page-content="inventory"] .ops-overview-table td:nth-child(2) {
    grid-area: sku;
    padding-bottom: 0 !important;
    color: var(--ch-muted);
    font-size: 11px;
  }
  [data-page-content="inventory"] .ops-overview-table td:nth-child(3) {
    grid-area: item;
    padding-top: 3px !important;
    padding-right: 6px !important;
    font-size: 13px;
  }
  [data-page-content="inventory"] .ops-overview-table td:nth-child(3) small { font-size: 10px; line-height: 1.35; }
  [data-page-content="inventory"] .ops-overview-table td:nth-child(4) {
    grid-area: position;
    margin-top: 4px;
    padding-top: 8px !important;
    border-top: 1px solid var(--ch-line-subtle) !important;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-stock-position {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-stock-position strong { font-size: 13px; }
  [data-page-content="inventory"] .ops-overview-table .ops-stock-position small { margin: 0; font-size: 10px; white-space: normal !important; text-align: right; }
  [data-page-content="inventory"] .ops-overview-table td:nth-child(5) {
    grid-area: status;
    justify-self: end;
    padding-left: 4px !important;
  }
  [data-page-content="inventory"] .ops-overview-table td:nth-child(6) {
    grid-area: updated;
    padding-top: 7px !important;
    color: var(--ch-muted);
    font-size: 10px;
  }
  [data-page-content="inventory"] .ops-overview-table td:nth-child(6)::before {
    display: inline !important;
    margin-right: 7px;
    content: "Updated";
    color: var(--ch-muted-2);
    font-size: 9px;
    font-weight: 760;
    letter-spacing: .045em;
    text-transform: uppercase;
  }
  [data-page-content="inventory"] .ops-overview-table td:nth-child(6) small { display: inline; margin-left: 5px; font-size: 10px; }
  [data-page-content="inventory"] .ops-overview-table td:nth-child(7) { grid-area: actions; padding-top: 9px !important; }
  [data-page-content="inventory"] .ops-overview-table .ops-overview-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    min-width: 0 !important;
    width: 100%;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-overview-actions .ops-btn {
    width: 100%;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    overflow-wrap: normal !important;
    white-space: nowrap !important;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-overview-actions .ops-btn:only-child { grid-column: 1 / -1; }
  [data-page-content="inventory"] .ops-bulk-bar {
    gap: 8px;
    padding: 9px 10px;
  }
  [data-page-content="inventory"] .ops-bulk-bar > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  [data-page-content="inventory"] .ops-bulk-bar .ops-btn {
    min-width: 0 !important;
    padding: 0 8px !important;
    overflow-wrap: normal !important;
    white-space: nowrap !important;
  }

  /* Stock Count: exact compact sequence requested for the physical count:
     No. | SKU | Item | System Qty | Counted Qty | status light / menu. */
  [data-page-content="audit"] .ops-count-session-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-bottom: 12px;
    border-radius: 11px;
  }
  [data-page-content="audit"] .ops-count-session-meta > div {
    min-width: 0;
    padding: 11px 12px !important;
    border-left: 0 !important;
    border-top: 1px solid var(--ch-line) !important;
  }
  [data-page-content="audit"] .ops-count-session-meta > div:nth-child(-n+2) { border-top: 0 !important; }
  [data-page-content="audit"] .ops-count-session-meta > div:last-child { grid-column: 1 / -1; }
  [data-page-content="audit"] .ops-count-session-meta span,
  [data-page-content="audit"] .ops-count-session-meta small { font-size: 10px; }
  [data-page-content="audit"] .ops-count-session-meta strong { margin: 3px 0 2px; font-size: 12px; }
  [data-page-content="audit"] .ops-count-entry-table { min-width: 0 !important; table-layout: auto !important; }
  [data-page-content="audit"] .ops-count-entry-table tbody { padding: 8px !important; }
  [data-page-content="audit"] .ops-count-entry-table tbody tr[data-count-row] {
    display: grid !important;
    grid-template-columns: 21px 46px minmax(0, 1fr) 36px 58px 34px;
    grid-template-areas: "no sku item system counted status";
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
  }
  [data-page-content="audit"] .ops-count-entry-table tbody tr[data-count-row] td {
    display: block !important;
    min-width: 0;
    width: auto !important;
    padding: 8px 0 !important;
    border: 0 !important;
    color: var(--ch-text-control);
    font-size: 11px;
    text-align: left;
  }
  [data-page-content="audit"] .ops-count-entry-table tbody tr[data-count-row] td::before { display: none !important; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(1) { grid-area: no; color: var(--ch-muted) !important; font-size: 10px; text-align: center !important; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(2) { grid-area: sku; font-size: 10px; line-height: 1.2; overflow-wrap: anywhere; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(3) { grid-area: item; overflow: hidden; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(3) small { overflow: hidden; font-size: 9px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(4) {
    grid-area: system;
    color: var(--ch-text-strong);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: center;
  }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(4)::before {
    display: block !important;
    content: "Sys";
    margin-bottom: 3px;
    color: var(--ch-muted-2);
    font-size: 8px;
    font-weight: 760;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(5) { grid-area: counted; text-align: center; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(5)::before {
    display: block !important;
    content: "Count";
    margin-bottom: 3px;
    color: var(--ch-muted-2);
    font-size: 8px;
    font-weight: 760;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(6) { grid-area: status; padding-top: 17px !important; }
  [data-page-content="audit"] .ops-count-qty-input {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    min-height: 36px !important;
    padding: 5px !important;
    font-size: 12px !important;
  }
  [data-page-content="audit"] .ops-count-check {
    grid-template-columns: 12px 22px;
    min-width: 0;
    column-gap: 4px;
  }
  [data-page-content="audit"] .ops-count-light { width: 11px; height: 11px; }
  [data-page-content="audit"] .ops-count-reason-btn { width: 22px; height: 26px; font-size: 17px; }
  [data-page-content="audit"] .ops-count-entry-table tr.ops-count-unresolved { background: #fff1f2; box-shadow: inset 3px 0 0 #ef4444; }
  [data-page-content="audit"] .ops-count-entry-table tr.ops-count-unresolved > td { background: transparent !important; }
  [data-page-content="audit"] .ops-progress { gap: 12px; }
  [data-page-content="audit"] .ops-progress-ring { width: 74px; height: 74px; }
  [data-page-content="audit"] .ops-progress-ring::after { inset: 9px; }

  .ops-tabs { max-width: 100%; overflow-x: auto; padding-bottom: 1px; }
  .ops-tabs button { flex: 0 0 auto; min-height: 36px; padding: 0 10px; font-size: 11px; white-space: nowrap; }
  .ops-pagination { align-items: center; flex-direction: column; gap: 8px; padding: 10px; }
}

@media (max-width: 390px) {
  [data-page-content="audit"] .ops-count-entry-table tbody tr[data-count-row] {
    grid-template-columns: 18px 42px minmax(0, 1fr) 33px 54px 32px;
    gap: 4px;
  }
  [data-page-content="audit"] .ops-count-qty-input { width: 54px !important; min-width: 54px !important; max-width: 54px !important; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(2) { font-size: 9px; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(3) { font-size: 10px; }
}

/* Inventory uses one dense, scan-first listing language on phones.  Overview
   reads stock; Stock Count records stock.  They must not feel like separate
   products or consume most of the viewport before the first item is visible. */
.ops-overview-advanced-filters { display: contents; }
.ops-overview-filter-toggle,
.ops-overview-more { display: none; }
.ops-overview-list-tools { display: none; }

.ops-catalog-modal .ops-modal-card { width: min(780px, calc(100vw - 32px)); }
.ops-overview-list-tools > div { display: flex; align-items: center; gap: 8px; }
.ops-catalog-actions { display: grid; grid-template-columns: minmax(180px,1fr) auto auto; gap: 8px; margin: 18px 0 10px; }
.ops-category-manager { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.ops-category-manager > span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #dde2e8; border-radius: 999px; font-size: 12px; }
.ops-category-manager > span { cursor: grab; user-select: none; }
.ops-category-manager > span:active { cursor: grabbing; }
.ops-category-manager > span.is-hidden { background: #f7f8fa; color: #667085; }
.ops-category-manager > span.is-dragging,.ops-catalog-row.is-dragging { opacity: .42; }
.ops-category-manager > span > i,.ops-drag-handle { color: #a2aab7; font-size: 12px; font-style: normal; letter-spacing: -3px; }
.ops-category-manager small { color: #7b8494; }
.ops-category-manager button { border: 0; background: transparent; color: #9a3840; cursor: pointer; font-size: 16px; line-height: 1; padding: 0; }
.ops-catalog-list { border-top: 1px solid #e3e7ec; max-height: 52vh; overflow: auto; }
.ops-catalog-group { scroll-margin-top: 42px; }
.ops-catalog-group > header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 7px 10px; border-bottom: 1px solid #e1e6ec; background: #f7f9fb; }
.ops-catalog-group > header strong { color: #17233d; font-size: 12px; }
.ops-catalog-group > header small { color: #7b8494; font-size: 10px; }
.ops-catalog-group.is-hidden > header { background: #f3f4f6; }
.ops-catalog-row { display: grid; grid-template-columns: 18px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 58px; padding: 9px 8px; border-bottom: 1px solid #e9edf1; }
.ops-catalog-row[draggable="true"] { cursor: grab; }
.ops-catalog-row[draggable="true"]:active { cursor: grabbing; }
.ops-catalog-row.is-hidden { background: #fafafa; }
.ops-catalog-row > div:nth-child(2) { min-width: 0; }
.ops-catalog-row strong,.ops-catalog-row small { display: block; }
.ops-catalog-row strong { color: #17233d; font-size: 13px; }
.ops-catalog-row small { color: #7a8495; margin-top: 3px; }
.ops-catalog-row > div:last-child { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.ops-catalog-empty-category { margin: 0; padding: 14px 10px; border-bottom: 1px solid #e9edf1; color: #7a8495; font-size: 11px; }
.ops-record-label { color: #7a8495; font-size: 12px; }

@media (max-width: 640px) {
  .ops-catalog-modal .ops-modal-card { width: 100vw; max-width: none; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .ops-catalog-actions { grid-template-columns: 1fr 1fr; }
  .ops-catalog-actions .ops-input { grid-column: 1 / -1; }
  .ops-catalog-row { align-items: flex-start; }
  .ops-catalog-row > div:last-child { flex-direction: column; align-items: stretch; }
}
.ops-mobile-stock-metric { display: none; }
.ops-overview-mobile-low { display: none; }
.ops-overview-action-sheet { display: grid; gap: 8px; margin-top: 18px; }
.ops-overview-action-sheet .ops-btn { width: 100%; min-height: 42px; }

@media (max-width: 700px) {
  [data-page-content="inventory"] .ops-overview-filterbar {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  [data-page-content="inventory"] .ops-overview-filterbar > .ops-filter.grow {
    grid-column: 1 / -1;
  }
  [data-page-content="inventory"] .ops-overview-filterbar > .ops-filter.grow > span {
    display: none;
  }
  [data-page-content="inventory"] .ops-overview-filterbar .ops-input,
  [data-page-content="inventory"] .ops-overview-filterbar .ops-select,
  [data-page-content="inventory"] .ops-overview-filterbar .ops-low-stock-toggle,
  [data-page-content="inventory"] .ops-overview-filter-toggle,
  [data-page-content="inventory"] .ops-overview-filterbar .ops-overview-action-field .ops-btn {
    min-height: 36px !important;
    height: 36px !important;
    font-size: 10px !important;
  }
  [data-page-content="inventory"] .ops-overview-filter-toggle {
    display: inline-flex;
    grid-column: 1;
    grid-row: 2;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0 7px;
    border: 1px solid var(--ch-line);
    border-radius: 8px;
    background: #fff;
    color: var(--ch-text-control);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  [data-page-content="inventory"] .ops-overview-toggle-field {
    display: block !important;
    grid-column: 2 !important;
    grid-row: 2;
    min-width: 0 !important;
  }
  [data-page-content="inventory"] .ops-overview-toggle-field > span:first-child,
  [data-page-content="inventory"] .ops-overview-action-field > span {
    display: none;
  }
  [data-page-content="inventory"] .ops-overview-toggle-field .ops-low-stock-toggle {
    justify-content: center;
    gap: 5px;
    padding: 0 6px;
    font-weight: 700;
  }
  [data-page-content="inventory"] .ops-overview-action-field {
    display: block !important;
    grid-column: 3 !important;
    grid-row: 2;
    min-width: 0 !important;
  }
  [data-page-content="inventory"] .ops-overview-action-field .ops-btn {
    padding: 0 6px !important;
    font-weight: 700;
  }
  [data-page-content="inventory"] .ops-overview-advanced-filters {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 7px;
  }
  [data-page-content="inventory"] .ops-overview-filters-open .ops-overview-advanced-filters {
    display: grid;
  }
  [data-page-content="inventory"] .ops-overview-advanced-filters .ops-filter {
    width: 100% !important;
  }
  [data-page-content="inventory"] .ops-overview-advanced-filters .ops-filter > span {
    display: none;
  }

  [data-page-content="inventory"] .ops-overview-table tbody,
  [data-page-content="audit"] .ops-count-entry-table tbody {
    padding: 0 !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section),
  [data-page-content="audit"] .ops-count-entry-table tbody tr[data-count-row] {
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ch-line-subtle) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  /* Overview: selectable stock list with a single right-side action menu. */
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) 48px 52px 30px;
    grid-template-areas: "sku item position status more";
    align-items: center;
    gap: 4px;
    min-height: 48px;
    padding: 4px 8px;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td {
    padding: 2px 0 !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(1) {
    display: none !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(2) {
    align-self: center;
    padding: 0 !important;
    font-size: 10px;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(3) {
    align-self: center;
    padding: 0 !important;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(3) small { display: none; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(4) {
    align-self: center;
    margin-top: 0;
    padding: 0 !important;
    border-top: 0 !important;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-stock-position {
    display: block;
    text-align: center;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-desktop-stock-available,
  [data-page-content="inventory"] .ops-overview-table .ops-stock-position > small {
    display: none;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-mobile-stock-metric {
    display: grid;
    grid-template-rows: 10px 16px;
    align-items: center;
    justify-items: center;
    width: 100%;
    line-height: 1;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-mobile-stock-metric > span {
    color: var(--ch-muted-2);
    font-size: 7px;
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-mobile-stock-metric > strong {
    align-self: start;
    font-size: 12px;
    line-height: 1;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(5) {
    display: block !important;
    align-self: center;
    justify-self: stretch !important;
    width: 100% !important;
    padding: 0 !important;
    color: var(--ch-text-control);
    text-align: center;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(5)::before,
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(5)::after { content: none !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(5) > :not(.ops-mobile-stock-metric) { display: none !important; }
  [data-page-content="inventory"] .ops-overview-table tr[data-stock-status="out_of_stock"] .ops-available-value { color: #c2413b; }
  [data-page-content="inventory"] .ops-overview-table tr[data-stock-status="low_stock"] .ops-available-value { color: #c56a16; }
  [data-page-content="inventory"] .ops-overview-table tr[data-stock-status="normal"] .ops-available-value { color: #0f8f83; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(6) {
    display: none !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(7) {
    grid-area: more;
    align-self: center;
    padding: 0 !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(7) .ops-overview-actions {
    display: block !important;
    width: 30px !important;
    min-width: 30px !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-overview-actions .ops-btn:not(.ops-overview-more) {
    display: none !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-overview-actions .ops-overview-more {
    display: inline-grid !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 !important;
    place-items: center;
    border-radius: 7px;
    font-size: 19px !important;
    line-height: 1;
  }

  /* Shared category header: a full-width divider, never a narrow side card. */
  [data-page-content="inventory"] .ops-overview-table tbody .ops-category-section,
  [data-page-content="audit"] .ops-count-entry-table tbody .ops-category-section {
    display: block !important;
    width: 100% !important;
    margin: 10px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--ch-line) !important;
    border-radius: 0 !important;
    background: var(--ch-surface-soft) !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody .ops-category-section td,
  [data-page-content="audit"] .ops-count-entry-table tbody .ops-category-section td {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px !important;
    border: 0 !important;
    color: var(--ch-text-control);
    text-align: left !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody .ops-category-section strong,
  [data-page-content="audit"] .ops-count-entry-table tbody .ops-category-section strong {
    font-size: 10px !important;
    letter-spacing: .045em;
    text-transform: uppercase;
  }
  [data-page-content="inventory"] .ops-overview-table tbody .ops-category-section span,
  [data-page-content="audit"] .ops-count-entry-table tbody .ops-category-section span {
    margin-left: auto;
    font-size: 10px !important;
  }
  /* Stock Count keeps the same list density, replacing stock readout with
     System Qty / Counted Qty and the variance-status menu. */
  [data-page-content="audit"] .ops-count-session-meta {
    margin: 0 0 9px;
    border-radius: 10px;
    box-shadow: none;
  }
  [data-page-content="audit"] .ops-count-session-meta > div {
    min-height: 0 !important;
    padding: 8px 10px !important;
  }
  [data-page-content="audit"] .ops-count-session-meta span,
  [data-page-content="audit"] .ops-count-session-meta small { font-size: 9px !important; line-height: 1.25; }
  [data-page-content="audit"] .ops-count-session-meta strong { margin: 2px 0 !important; font-size: 11px !important; line-height: 1.25; }
  [data-page-content="audit"] .ops-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  [data-page-content="audit"] .ops-toolbar .ops-filter.grow { grid-column: 1 / -1; }
  [data-page-content="audit"] .ops-toolbar .ops-filter.grow > span { display: none; }
  [data-page-content="audit"] .ops-toolbar .ops-input,
  [data-page-content="audit"] .ops-toolbar .ops-select,
  [data-page-content="audit"] .ops-toolbar .ops-toggle,
  [data-page-content="audit"] .ops-toolbar .ops-toolbar-actions .ops-btn {
    min-height: 36px !important;
    height: 36px !important;
    font-size: 10px !important;
  }
  [data-page-content="audit"] .ops-toolbar .ops-toolbar-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  [data-page-content="audit"] .ops-toolbar .ops-toolbar-actions .ops-btn:last-child:nth-child(odd) { grid-column: auto; }
  [data-page-content="audit"] .ops-count-entry-table tbody tr[data-count-row] {
    grid-template-columns: 20px 48px minmax(0, 1fr) 31px 52px 28px;
    grid-template-areas: "no sku item system counted status";
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
  }
  [data-page-content="audit"] .ops-count-entry-table tbody tr[data-count-row] td { padding: 2px 0 !important; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(2) { font-size: 10px; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(3) { font-size: 11px; line-height: 1.25; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(4)::before,
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(5)::before { margin-bottom: 1px; }
  [data-page-content="audit"] .ops-count-entry-table td:nth-child(6) { padding-top: 12px !important; }
  [data-page-content="audit"] .ops-count-qty-input {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    min-height: 32px !important;
  }
  [data-page-content="audit"] .ops-count-check { grid-template-columns: 11px 18px; column-gap: 3px; }
  [data-page-content="audit"] .ops-count-light { width: 10px; height: 10px; }
  [data-page-content="audit"] .ops-count-reason-btn { width: 18px; height: 24px; font-size: 16px; }
  [data-page-content="inventory"] .ops-inventory-list-panel {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  [data-page-content="inventory"] .ops-inventory-list-panel .ops-table-wrap {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  [data-page-content="inventory"] .ops-overview-list-tools {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-bottom: 1px solid var(--ch-line-subtle);
  }
  [data-page-content="inventory"] .ops-overview-list-tools strong {
    color: var(--ch-muted);
    font-size: 9px;
    letter-spacing: .055em;
    text-transform: uppercase;
  }
  [data-page-content="inventory"] .ops-overview-list-tools .ops-btn {
    min-height: 28px !important;
    padding: 0 11px !important;
    font-size: 10px !important;
  }
  [data-page-content="inventory"].ops-overview-select-mode .ops-overview-table tbody tr[data-overview-row] { cursor: pointer; }
[data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row].is-selected {
    background: #eef8f7 !important;
    box-shadow: inset 3px 0 0 #0f8f83 !important;
  }
}

/* Final cascade contract for the canonical Overview list. */
[data-page-content="inventory"] .ops-overview-list-tools { display: flex !important; }
[data-page-content="inventory"] .ops-overview-table .ops-available-cell > .ops-stock-position { display: block !important; }
[data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td.ops-available-cell:nth-child(5) > .ops-stock-position { display: block !important; }
[data-page-content="inventory"] .ops-overview-table .ops-overview-more { display: inline-grid !important; }
[data-page-content="inventory"] .ops-overview-table .ops-select-cell { display: none !important; }
@media (min-width: 701px) {
  [data-page-content="inventory"].ops-overview-select-mode .ops-overview-table th.ops-select-cell,
  [data-page-content="inventory"].ops-overview-select-mode .ops-overview-table td.ops-select-cell { display: table-cell !important; }
}
@media (max-width: 700px) {
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td.ops-actions-cell:nth-child(6) { display: block !important; width: 30px !important; padding: 0 !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-minimum-cell,
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-available-cell { align-self: center !important; height: 26px; margin: 0 !important; padding: 0 !important; }
  [data-page-content="inventory"] .ops-overview-table .ops-stock-position,
  [data-page-content="inventory"] .ops-overview-table .ops-mobile-stock-metric { height: 26px; margin: 0 !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) {
    grid-template-columns: 46px minmax(0, 1fr) 48px 52px 30px !important;
    grid-template-areas: "sku item minimum available more" !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(2) { grid-area: sku !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) td:nth-child(3) { grid-area: item !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-minimum-cell { grid-area: minimum !important; display: block !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-available-cell { grid-area: available !important; display: block !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr:not(.ops-category-section) .ops-actions-cell { grid-area: more !important; display: block !important; }
  [data-page-content="inventory"] .ops-overview-table .ops-desktop-minimum,
  [data-page-content="inventory"] .ops-overview-table .ops-desktop-stock-available { display: none !important; }
  [data-page-content="inventory"] .ops-overview-table .ops-mobile-stock-metric { display: grid !important; }
  .ops-overview-dialog { align-items: end !important; padding: 0 !important; }
  .ops-overview-dialog .ops-modal-card,
  .ops-overview-dialog .ops-modal-card.narrow {
    width: 100% !important;
    max-width: none !important;
    max-height: min(88dvh, 760px) !important;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom)) !important;
    border-radius: 18px 18px 0 0 !important;
  }
}

/* Inventory Overview final layout and selection-state contract. */
[data-page-content="inventory"] .ops-overview-table thead tr,
[data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] {
  border-bottom: 1px solid var(--ch-line-subtle) !important;
}
[data-page-content="inventory"] .ops-overview-table thead th,
[data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] td {
  border-bottom: 0 !important;
  background: transparent !important;
}
[data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] {
  background: #fff !important;
}
[data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row]:hover {
  background: var(--ch-primary-subtle) !important;
}
[data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row].is-selected {
  background: #fff0eb !important;
}
[data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row].is-selected {
  box-shadow: inset 4px 0 0 #f46f56 !important;
}
[data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row].is-selected td:nth-child(2) strong {
  color: #b43f2e !important;
}
@media (min-width: 701px) {
  [data-page-content="inventory"] .ops-overview-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }
  [data-page-content="inventory"] .ops-overview-table thead,
  [data-page-content="inventory"] .ops-overview-table tbody {
    display: block;
    width: 100%;
  }
  [data-page-content="inventory"] .ops-overview-table thead tr,
  [data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] {
    display: grid;
    grid-template-columns: minmax(112px,1fr) minmax(280px,4fr) minmax(96px,132px) minmax(112px,152px) 56px;
    width: 100%;
    align-items: center;
  }
  [data-page-content="inventory"] .ops-overview-table thead th,
  [data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] td {
    box-sizing: border-box;
    width: auto !important;
    min-width: 0;
  }
  [data-page-content="inventory"] .ops-overview-table thead .ops-select-cell,
  [data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] .ops-select-cell,
  [data-page-content="inventory"].ops-overview-select-mode .ops-overview-table thead .ops-select-cell,
  [data-page-content="inventory"].ops-overview-select-mode .ops-overview-table tbody tr[data-overview-row] .ops-select-cell {
    display: none !important;
  }
  [data-page-content="inventory"] .ops-overview-table tbody .ops-category-section {
    display: block;
    width: 100%;
  }
  [data-page-content="inventory"] .ops-overview-table tbody .ops-category-section td {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    align-items: center;
    justify-content: space-between;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-actions-cell,
  [data-page-content="inventory"] .ops-overview-table .ops-overview-actions {
    justify-self: end;
  }

  /* Keep Stock Focus readable on one line by taking a small amount of space
     from Search. The compact stock columns above remain anchored to the right. */
  [data-page-content="inventory"] .ops-overview-filterbar > .ops-filter.grow {
    flex: 1 1 230px;
    min-width: 230px;
  }
  [data-page-content="inventory"] .ops-overview-toggle-field {
    flex: 0 0 168px;
    min-width: 168px;
  }
  [data-page-content="inventory"] .ops-overview-toggle-field .ops-low-stock-toggle {
    min-width: 0;
    gap: 8px;
    overflow: hidden;
  }
  [data-page-content="inventory"] .ops-overview-toggle-field .ops-low-stock-toggle input {
    flex: 0 0 auto;
  }
}

/* Phone Overview: official OMS identifiers can be up to eleven characters.
   This final cascade rule reserves a real SKU column and keeps each value
   inside its own grid cell, preventing overlap and broken row separators. */
@media (max-width: 700px) {
  [data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] {
    grid-template-columns: 76px minmax(0, 1fr) 42px 48px 30px !important;
    grid-template-areas: "sku item minimum available more" !important;
    column-gap: 3px !important;
    box-sizing: border-box;
    width: 100% !important;
    overflow: hidden;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] td {
    box-sizing: border-box;
    min-width: 0 !important;
    max-width: 100%;
    overflow: hidden;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] td:nth-child(2) {
    font-size: 9px !important;
    line-height: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  [data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] td:nth-child(3) {
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-mobile-stock-metric > span {
    font-size: 6px !important;
    letter-spacing: -.01em;
    white-space: nowrap;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-overview-more {
    margin: 0 !important;
  }
  [data-page-content="inventory"] .ops-inventory-list-panel {
    margin-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }
  [data-page-content="inventory"] .ops-overview-filterbar .ops-overview-toggle-field .ops-low-stock-toggle {
    gap: 1px !important;
    padding-inline: 2px !important;
    font-size: 8.5px !important;
    letter-spacing: -.02em;
  }
  [data-page-content="inventory"] .ops-overview-filterbar .ops-overview-toggle-field .ops-low-stock-toggle input {
    width: 36px !important;
    min-width: 36px !important;
    flex-basis: 36px !important;
    margin-inline: 0 !important;
  }
}

/* One in-field Location Scope pattern across Dashboard, Operations and
   Records: selected value, status dot, then one chevron. */
.dashboard-location-control,
.ops-location-select,
.corehub-operation-location-v11 { position:relative; }
.dashboard-location-control select,
.ops-location-select select,
.corehub-operation-location-v11 select {
  appearance:none !important;
  -webkit-appearance:none !important;
  background-image:none !important;
  padding-right:62px !important;
}
.dashboard-location-select:has(select)::after,
.ops-location-select:has(select)::after,
.corehub-operation-location-v11:has(select)::after {
  content:"";
  position:absolute;
  z-index:2;
  right:15px;
  bottom:19px;
  width:6px;
  height:6px;
  border-right:1.5px solid #64748b;
  border-bottom:1.5px solid #64748b;
  transform:rotate(45deg);
  pointer-events:none;
}
.dashboard-gps-status,
.ops-location-status {
  position:absolute;
  z-index:3;
  right:42px;
  bottom:17px;
  display:block;
  width:10px;
  height:10px;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  border-radius:999px;
  box-shadow:0 0 0 2px var(--ch-surface);
  pointer-events:none;
}
.ops-location-status.detected { background:#14b8a6; }
.ops-location-status.mismatch { background:var(--ch-danger); }
.ops-location-status.unavailable { background:#f59e0b; }
.ops-location-status.checking { background:#f59e0b; }
.dashboard-gps-status.detected { background:#14b8a6; }
.dashboard-gps-status.mismatch { background:var(--ch-danger); }
.dashboard-gps-status.unavailable { background:#f59e0b; }
.dashboard-gps-status.checking { background:#f59e0b; }
.dashboard-location-lock strong,
.ops-location-readonly,
.corehub-operation-location-v11 .dashboard-location-lock-value { padding-right:34px !important; }
@media(max-width:700px){
  [data-page-content="inventory"] .ops-location-select:has(select)::after { bottom:15px; }
  [data-page-content="inventory"] .ops-location-status { bottom:13px; }
}

/* Stock Overview phone density: use one deliberate mobile composition instead
   of vertically stacking desktop-sized controls. */
@media (max-width: 700px) {
  [data-page-content="inventory"] .ops-page-head {
    gap: 9px !important;
    margin-bottom: 10px !important;
  }
  [data-page-content="inventory"] .ops-page-head h1 { margin-bottom: 4px !important; font-size: 20px !important; }
  [data-page-content="inventory"] .ops-page-head p { max-width: 100%; margin: 0 !important; font-size: 10px !important; line-height: 1.4 !important; }
  [data-page-content="inventory"] .ops-page-head-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: end !important;
    gap: 7px !important;
    width: 100%;
  }
  [data-page-content="inventory"] .ops-page-head-actions > .ops-location-select {
    grid-column: 1;
    grid-row: 1;
    order: 0;
    width: auto !important;
    min-width: 0 !important;
  }
  [data-page-content="inventory"] .ops-page-head-actions > .ops-btn {
    grid-column: 2;
    grid-row: 1;
    width: 96px !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 9px !important;
    font-size: 10px !important;
  }
  [data-page-content="inventory"] .ops-location-select > span { margin-bottom: 3px !important; font-size: 8px !important; }
  [data-page-content="inventory"] .ops-location-select :is(select,.ops-location-readonly) {
    height: 36px !important;
    min-height: 36px !important;
    padding-inline: 10px !important;
    font-size: 10px !important;
  }

  [data-page-content="inventory"] + .corehub-mobile-workspace-nav,
  [data-page-content="inventory"] .corehub-mobile-workspace-nav { margin-bottom: 9px; }
  [data-page-content="inventory"] .corehub-mobile-workspace-nav {
    padding: 0 !important;
    border-width: 0 0 1px !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  [data-page-content="inventory"] .corehub-mobile-workspace-scroll { gap: 0 !important; }
  [data-page-content="inventory"] .corehub-mobile-workspace-scroll button {
    min-height: 34px !important;
    padding: 0 11px 1px !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 10px !important;
  }
  [data-page-content="inventory"] .corehub-mobile-workspace-scroll button.active {
    border-bottom-color: var(--ch-primary) !important;
    background: transparent !important;
    color: var(--ch-primary-hover) !important;
  }

  [data-page-content="inventory"] .ops-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin-bottom: 9px !important;
  }
  [data-page-content="inventory"] .ops-summary-card {
    display: grid !important;
    grid-template-columns: 20px minmax(0,1fr);
    align-items: center;
    min-height: 56px !important;
    gap: 4px !important;
    padding: 6px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }
  [data-page-content="inventory"] .ops-summary-card .ops-icon,
  [data-page-content="inventory"] .ops-summary-card > span {
    width: 20px !important;
    height: 20px !important;
    border-radius: 6px !important;
  }
  [data-page-content="inventory"] .ops-summary-card .ops-icon svg,
  [data-page-content="inventory"] .ops-summary-card > span svg { width: 12px !important; height: 12px !important; }
  [data-page-content="inventory"] .ops-summary-card > div { min-width: 0; }
  [data-page-content="inventory"] .ops-summary-card small {
    display: block;
    overflow: hidden;
    font-size: 7px !important;
    line-height: 9px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  [data-page-content="inventory"] .ops-summary-card strong { margin: 0 !important; font-size: 15px !important; line-height: 16px !important; }
  [data-page-content="inventory"] .ops-summary-card p { display: none !important; }

  [data-page-content="inventory"] .ops-overview-filterbar {
    grid-template-columns: minmax(0,1fr) 48px 50px !important;
    gap: 5px !important;
    margin-bottom: 9px !important;
  }
  [data-page-content="inventory"] .ops-overview-filterbar > .ops-filter.grow {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: auto !important;
  }
  [data-page-content="inventory"] .ops-overview-filter-toggle { grid-column: 2 !important; grid-row: 1 !important; }
  [data-page-content="inventory"] .ops-overview-toggle-field { display:none !important; }
  [data-page-content="inventory"] .ops-overview-action-field { grid-column: 3 !important; grid-row: 1 !important; }
  [data-page-content="inventory"] .ops-overview-filterbar :is(.ops-input,.ops-overview-filter-toggle,.ops-low-stock-toggle,.ops-overview-action-field .ops-btn) {
    width: 100% !important;
    min-width: 0 !important;
    height: 30px !important;
    min-height: 30px !important;
    padding-inline: 6px !important;
    font-size: 9px !important;
  }
  [data-page-content="inventory"] .ops-overview-filterbar .ops-low-stock-toggle { gap: 3px !important; padding-inline: 4px !important; }
  [data-page-content="inventory"] .ops-overview-filterbar .ops-low-stock-toggle input {
    width: 28px !important;
    min-width: 28px !important;
    flex-basis: 28px !important;
  }
  [data-page-content="inventory"] .ops-overview-advanced-filters { grid-column: 1 / -1; grid-row: 2; }

  [data-page-content="inventory"] .ops-overview-list-tools {
    min-height: 34px !important;
    padding: 0 !important;
  }
  [data-page-content="inventory"] .ops-overview-list-tools > div { align-items: center !important; gap: 5px !important; margin-left:auto; }
  [data-page-content="inventory"] .ops-overview-list-tools .ops-btn {
    box-sizing: border-box;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 9px !important;
    line-height: 28px !important;
  }
  [data-page-content="inventory"] .ops-overview-mobile-low {
    display:inline-flex !important;
    box-sizing:border-box;
    align-items:center;
    justify-content:center;
    width:84px;
    min-width:84px;
    height:30px !important;
    min-height:30px !important;
    max-height:30px !important;
    gap:3px;
    padding:0 2px;
    overflow:hidden;
    border:1px solid var(--ch-line);
    border-radius:7px;
    background:#fff;
    color:var(--ch-text-control);
    font-size:8.5px;
    font-weight:700;
    line-height:1;
    white-space:nowrap;
  }
  [data-page-content="inventory"] .ops-overview-mobile-low input {
    flex:0 0 30px !important;
    width:30px !important;
    min-width:30px !important;
    height:18px !important;
    min-height:18px !important;
    margin:0 !important;
  }
  [data-page-content="inventory"] .ops-overview-mobile-low input::after {
    left:2px !important;
    top:2px !important;
    width:12px !important;
    height:12px !important;
  }
  [data-page-content="inventory"] .ops-overview-mobile-low input:checked::after { transform:translateX(12px) !important; }
  [data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] .ops-actions-cell,
  [data-page-content="inventory"] .ops-overview-table tbody tr[data-overview-row] .ops-overview-actions {
    align-self: center !important;
    justify-self: center !important;
    display: grid !important;
    place-items: center !important;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-overview-more {
    box-sizing: border-box;
    border: 1px solid transparent !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  [data-page-content="inventory"] .ops-overview-table .ops-overview-more:is(:hover,:focus-visible),
  [data-page-content="inventory"] .ops-overview-table .ops-overview-more[aria-expanded="true"] {
    border-color: var(--ch-line-strong) !important;
    background: var(--ch-surface) !important;
    outline: 0;
  }
  [data-page-content="inventory"] .ops-overview-filterbar .ops-overview-toggle-field .ops-low-stock-toggle {
    gap:2px !important;
    padding-inline:2px !important;
    overflow:hidden;
    font-size:7.5px !important;
    letter-spacing:-.02em;
    white-space:nowrap;
  }
  [data-page-content="inventory"] .ops-overview-filterbar .ops-overview-toggle-field .ops-low-stock-toggle input {
    width:26px !important;
    min-width:26px !important;
    flex-basis:26px !important;
  }
}
@media (max-width:350px) {
  [data-page-content="inventory"] .ops-overview-list-tools > strong { display:none; }
}
/* Profile identity: system authority plus employment/position context. */
@media (min-width: 768px) {
  #welcome-btn#welcome-btn {
    grid-template-columns: 32px minmax(145px, 1fr) auto !important;
    min-width: 220px !important;
  }
}
#welcome-btn#welcome-btn .corehub-profile-labels {
  display: flex !important;
  grid-column: 2 !important;
  grid-row: 2 !important;
  align-self: start !important;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}
#welcome-btn#welcome-btn .corehub-profile-labels[hidden] { display: none !important; }
.corehub-profile-label {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .035em;
  line-height: 12px;
}
.corehub-profile-label-admin { background: #ffebe7; color: #ef5f46; }
.corehub-profile-label-editor { background: #eee9ff; color: #6941c6; }
.corehub-profile-label-employment { background: #fff3d8; color: #9a5a00; }
.corehub-profile-label-position { background: #eaf2ff; color: #2864c7; }
@media (max-width: 767px) {
  #welcome-btn#welcome-btn { min-width: 0 !important; }
  #welcome-btn#welcome-btn .corehub-profile-labels .corehub-profile-label:nth-child(2) { display: none; }
}

/* Library home: prominent department workspace. Only the orange CTA reads as a button. */
#corehub-library-root-v11 .library-v31-department-workspace {
  overflow: hidden;
  border: 1px solid var(--ch-line) !important;
  border-radius: 12px !important;
  background: #fff;
  box-shadow: var(--ch-shadow) !important;
}
#corehub-library-root-v11 .library-v31-department-workspace > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 13px 18px !important;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid #dfe3e8 !important;
  background: #fff;
  box-shadow: inset 0 -1px 0 rgba(34, 45, 61, .035);
}
#corehub-library-root-v11 .library-v31-department-workspace > header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 760;
  color: var(--ch-ink);
}
#corehub-library-root-v11 .library-v31-department-workspace > header > span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 7px;
  background: #f3f4f6;
  color: #536071;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .04em;
  text-transform: uppercase;
}
#corehub-library-root-v11 .library-v31-department-workspace .library-v13-home-primary {
  display: grid !important;
  grid-template-columns: minmax(190px, 30%) minmax(270px, 44%) minmax(190px, 26%) !important;
  gap: 0 !important;
  width: 100%;
  min-height: 230px;
  height: auto !important;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--ch-ink);
  text-align: left;
  cursor: pointer;
}
#corehub-library-root-v11 .library-v31-department-identity,
#corehub-library-root-v11 .library-v31-department-overview,
#corehub-library-root-v11 .library-v31-department-action {
  display: flex;
  place-items: initial;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 230px;
  margin: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
}
#corehub-library-root-v11 .library-v31-department-identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 25px 27px;
  background: linear-gradient(145deg, #111b30 0%, #1c2b49 72%, #4a2831 100%);
  color: #fff;
}
#corehub-library-root-v11 .library-v31-department-identity > .library-v11-icon {
  width: 72px;
  height: 72px;
  margin: 0 0 17px;
  border: 1px solid rgba(255, 119, 95, .45);
  border-radius: 50%;
  background: rgba(255, 119, 95, .13);
  color: #ff775f;
}
#corehub-library-root-v11 .library-v31-department-identity > small,
#corehub-library-root-v11 .library-v31-department-action > small {
  margin: 0 0 8px;
  color: #ff775f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
#corehub-library-root-v11 .library-v31-department-identity > strong {
  color: #fff;
  font-size: clamp(23px, 2vw, 30px);
  font-weight: 780;
  line-height: 1.1;
}
#corehub-library-root-v11 .library-v31-department-identity > em {
  margin-top: 9px;
  color: rgba(255,255,255,.74);
  font-size: 12px;
  font-style: normal;
}
#corehub-library-root-v11 .library-v31-department-overview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 27px 30px;
  border-right: 1px solid var(--ch-line);
  background: #fff;
}
#corehub-library-root-v11 .library-v31-department-overview > strong {
  font-size: 20px;
  font-weight: 760;
}
#corehub-library-root-v11 .library-v31-department-overview > p {
  max-width: 510px;
  margin: 12px 0 0;
  color: var(--ch-muted);
  font-size: 13px;
  line-height: 1.55;
}
#corehub-library-root-v11 .library-v31-department-includes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px 20px;
  margin-top: 21px;
}
#corehub-library-root-v11 .library-v31-department-includes > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #445064;
}
#corehub-library-root-v11 .library-v31-department-includes .library-v11-icon {
  width: 17px;
  height: 17px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ch-primary);
}
#corehub-library-root-v11 .library-v31-department-includes b {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  color: inherit;
  font-size: 11px;
  font-weight: 680;
  line-height: 1.35;
  white-space: nowrap;
}
#corehub-library-root-v11 .library-v31-department-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
  background: linear-gradient(135deg, #fff 0%, #fff6f2 100%);
}
#corehub-library-root-v11 .library-v31-department-action > b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 46px;
  width: min(100%, 220px);
  box-sizing: border-box;
  padding: 11px 16px;
  border-radius: 8px;
  border: 1px solid var(--ch-primary) !important;
  background: var(--ch-primary) !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 760;
  box-shadow: 0 8px 18px rgba(242, 103, 78, .18);
}
#corehub-library-root-v11 .library-v31-department-action > b i {
  font-size: 20px;
  font-style: normal;
  line-height: 1;
}
#corehub-library-root-v11 .library-v31-department-action > em {
  margin-top: 11px;
  color: var(--ch-muted);
  font-size: 11px;
  font-style: normal;
  text-align: center;
}
#corehub-library-root-v11 .library-v31-department-workspace .library-v13-home-primary:hover .library-v31-department-action > b,
#corehub-library-root-v11 .library-v31-department-workspace .library-v13-home-primary:focus-visible .library-v31-department-action > b {
  background: #e9553c;
  transform: translateY(-1px);
}
#corehub-library-root-v11 .library-v31-department-workspace .library-v13-home-primary:focus-visible {
  outline: 3px solid rgba(242, 103, 78, .22) !important;
  outline-offset: -3px;
}

/* Keep the side-by-side card restrained at its real half-page width. */
#corehub-library-root-v11 .library-v31-department-workspace > header h3 { font-size: 16px; }
#corehub-library-root-v11 .library-v31-department-workspace > header > span {
  min-height: 24px;
  padding: 3px 9px;
  font-size: 9px;
}
#corehub-library-root-v11 .library-v31-department-identity > .library-v11-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
}
#corehub-library-root-v11 .library-v31-department-identity > .library-v11-icon svg {
  width: 28px;
  height: 28px;
}
#corehub-library-root-v11 .library-v31-department-identity > strong {
  font-size: 24px;
}
#corehub-library-root-v11 .library-v31-department-identity > em { font-size: 11px; }
#corehub-library-root-v11 .library-v31-department-overview > strong { font-size: 18px; }
#corehub-library-root-v11 .library-v31-department-overview > p { font-size: 12px; }
#corehub-library-root-v11 .library-v31-department-action > b {
  min-height: 42px;
  font-size: 12px;
}

/* Library home search and publish action share one concise toolbar. */
#corehub-library-root-v11 .library-v31-home-search-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin: 0 0 22px;
}
#corehub-library-root-v11 .library-v31-home-search-row.has-publish {
  justify-content: space-between;
}
#corehub-library-root-v11 .library-v31-home-search-row .library-v11-search {
  width: 100%;
  margin: 0 !important;
}
#corehub-library-root-v11 .library-v31-home-search-row.has-publish .library-v11-search {
  width: min(50%, 780px);
}
#corehub-library-root-v11 .library-v31-home-search-row .library-v11-admin-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
}
#corehub-library-root-v11 .library-v31-home-search-row .library-v11-admin-actions .primary-btn {
  min-width: 172px;
  height: 52px;
  min-height: 52px !important;
}
@media (max-width: 700px) {
  #corehub-library-root-v11 .library-v31-home-search-row,
  #corehub-library-root-v11 .library-v31-home-search-row.has-publish {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  #corehub-library-root-v11 .library-v31-home-search-row.has-publish .library-v11-search,
  #corehub-library-root-v11 .library-v31-home-search-row .library-v11-admin-actions,
  #corehub-library-root-v11 .library-v31-home-search-row .library-v11-admin-actions .primary-btn {
    width: 100%;
  }
}

/* Bounded update windows: more records without stretching the whole page. */
#corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list {
  max-height: 175px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#dashboard-panel-memo .dashboard-feed-table,
#dashboard-panel-promotions .dashboard-feed-table,
#dashboard-panel-events .dashboard-feed-table {
  max-height: 256px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#dashboard-panel-promotions .dashboard-feed-table {
  scrollbar-gutter: auto;
}
#dashboard-panel-memo .dashboard-feed-table-head,
#dashboard-panel-promotions .dashboard-feed-table-head,
#dashboard-panel-events .dashboard-feed-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
}
@media (min-width: 701px) {
  #dashboard-panel-memo > p,
  #dashboard-panel-promotions > p,
  #dashboard-panel-events > p {
    margin: -6px 0 12px 42px;
  }
  #dashboard-panel-promotions .dashboard-feed-table {
    min-height: 204px;
    background-color: #fff;
  }
}
.dashboard-promotion-table .dashboard-feed-placeholder {
  box-sizing: border-box;
  width: 100%;
  height: 56px;
  border-bottom: 1px solid var(--ch-line-subtle);
  background: #fff;
}
.dashboard-promotion-table .dashboard-feed-placeholder:last-child { border-bottom: 0; }
@media (max-width: 700px) {
  #corehub-library-root-v11 .library-v13-home-updates .library-v11-update-list {
    max-height: 240px;
  }
  #dashboard-panel-memo .dashboard-feed-table,
  #dashboard-panel-promotions .dashboard-feed-table,
  #dashboard-panel-events .dashboard-feed-table {
    max-height: 260px;
  }
  #dashboard-panel-promotions .dashboard-feed-table {
    min-height: 156px;
  }
  .dashboard-promotion-table .dashboard-feed-placeholder { height: 52px; }
}
@media (max-width: 1180px) and (min-width: 761px) {
  #corehub-library-root-v11 .library-v13-home-overview { grid-template-columns: 1fr !important; }
}

@media (max-width: 760px) {
  #corehub-library-root-v11 .library-v31-department-workspace > header {
    min-height: 50px;
    padding: 11px 14px !important;
  }
  #corehub-library-root-v11 .library-v31-department-workspace > header h3 { font-size: 16px; }
  #corehub-library-root-v11 .library-v31-department-workspace .library-v13-home-primary {
    grid-template-columns: 1fr !important;
  }
  #corehub-library-root-v11 .library-v31-department-identity {
    min-height: 190px;
    padding: 22px;
  }
  #corehub-library-root-v11 .library-v31-department-overview {
    min-height: 0;
    padding: 23px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--ch-line);
  }
  #corehub-library-root-v11 .library-v31-department-action {
    min-height: 0;
    align-items: flex-start;
    padding: 22px;
  }
  #corehub-library-root-v11 .library-v31-department-action > b { width: 100%; }
  #corehub-library-root-v11 .library-v31-department-action > em { align-self: center; }
}
