/* SHX premium workspace. Opt in with html[data-shx-theme="premium"].
   This stylesheet changes presentation only. Keep the existing DOM, native
   dialog open state, permission visibility, table geometry and action handlers.
   The extra :root specificity also survives later workspace stylesheet loading. */
html:root[data-shx-theme="premium"] {
  --navy: #252d29;
  --text: #292e2a;
  --muted: #5f6b5c;
  --line: #e7e9e1;
  --bg: #f4f3ef;
  --blue: #58745b;
  --surface: #fff;
  --border: #e7e9e1;
  --sidebar-width: 214px;
  --page-gap: 24px;
  --premium-ink: #252d29;
  --premium-ink-raised: #333e34;
  --premium-blue-soft: #edf2e9;
  --premium-shadow: 0 6px 24px #252d2908;
  --motion-fast: 120ms;
  --motion-normal: 160ms;
  --motion-enter: 160ms;
  --motion-exit: 120ms;
  font-family: Inter, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color-scheme: light;
}
html:root[data-shx-theme="premium"] body {
  min-width: 360px;
  color: var(--text);
  background: var(--bg);
  font-family: inherit;
  --px-text: var(--text);
  --px-muted: var(--muted);
  --px-head: #f7f8f2;
  --px-border: var(--line);
}
html:root[data-shx-theme="premium"] [hidden] { display: none !important; }
html:root[data-shx-theme="premium"] :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
html:root[data-shx-theme="premium"] :is(h1, h2, h3) { color: var(--navy); letter-spacing: -.025em; }
html:root[data-shx-theme="premium"] :is(.muted, .subtext, .terminal-footnote) { color: var(--muted); }

/* One continuous dark navigation rail for every workspace. */
html:root[data-shx-theme="premium"] body .sidebar {
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  flex-basis: var(--sidebar-width);
  height: 100dvh;
  padding: 24px 14px 14px;
  gap: 0;
  border: 0;
  background: var(--premium-ink);
  color: #cbd5c3;
  z-index: 40;
  overflow: hidden;
}
html:root[data-shx-theme="premium"] body .sidebar > .brand {
  display: flex;
  flex: none;
  color: #fff;
  gap: 11px;
  margin: 0 8px 24px;
  min-height: 38px;
  font-size: 20px;
  letter-spacing: .02em;
}
html:root[data-shx-theme="premium"] body .sidebar .brand img { width: 34px; height: 34px; }
html:root[data-shx-theme="premium"] body .sidebar .brand small { color: #9cab8f; font-size: 9px; }
html:root[data-shx-theme="premium"] body .sidebar > .workspace-switch {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0 0 20px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--premium-ink-raised);
  color: #edf3e6;
  box-shadow: none;
  font-size: 12px;
}
html:root[data-shx-theme="premium"] body .sidebar > .workspace-switch:hover { border-color: #5b7050; background: #3d4b35; }
html:root[data-shx-theme="premium"] body .sidebar nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #56684d transparent;
  padding: 0 2px;
}
html:root[data-shx-theme="premium"] body .sidebar .nav-label {
  display: block;
  margin: 19px 12px 8px;
  color: #a6b89b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
}
html:root[data-shx-theme="premium"] body .sidebar .nav-item {
  min-height: 40px;
  margin: 2px 0;
  padding: 9px 12px;
  gap: 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #bccbae;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  transition: background-color 120ms ease, color 120ms ease;
}
html:root[data-shx-theme="premium"] body .sidebar .nav-item.child { padding-left: 36px; min-height: 36px; font-size: 12px; }
html:root[data-shx-theme="premium"] body .sidebar .nav-item:not(.active):hover { background: var(--premium-ink-raised); color: #fff; }
html:root[data-shx-theme="premium"] body .sidebar .nav-item.active { background: var(--blue); color: #fff; font-weight: 600; }
/* desktop-layout's #app-view rule otherwise wins over a class-only nav color. */
html:root[data-shx-theme="premium"] body #app-view .sidebar .nav-item:not(.active) { color: #c4d2b6; }
html:root[data-shx-theme="premium"] body #app-view .sidebar .nav-item:not(.active):hover { color: #fff; background: var(--premium-ink-raised); }
html:root[data-shx-theme="premium"] body .sidebar .nav-item .chevron { color: inherit; opacity: .7; }
html:root[data-shx-theme="premium"] body .sidebar .sidebar-bottom {
  display: flex;
  flex: none;
  gap: 7px;
  min-width: 0;
  margin-top: 14px;
  padding: 14px 6px 0;
  border-top: 1px solid #46533c;
  color: #a7b99c;
  font-size: 11px;
}
html:root[data-shx-theme="premium"] body .sidebar-bottom .button,
html:root[data-shx-theme="premium"] body .terminal-sidebar-collapse .button {
  color: #c7d5ba;
  border-color: #40523b;
  background: transparent;
  box-shadow: none;
  min-width: 0;
  font-size: 11px;
  min-height: 30px;
}
html:root[data-shx-theme="premium"] body .terminal-sidebar-collapse { border-color: #46533c; margin-top: 8px; padding-top: 8px; }

/* The header belongs to content, rather than splitting the navigation rail. */
html:root[data-shx-theme="premium"] body .app-main { margin-left: var(--sidebar-width); min-width: 0; background: var(--bg); }
html:root[data-shx-theme="premium"] body .topbar { height: 64px; padding: 0 24px; background: #fff; border-color: var(--line); font-size: 12px; color: var(--muted); }
html:root[data-shx-theme="premium"] body.terminal-mode { --terminal-top: 64px; --terminal-side: 214px; --terminal-bottom: 0px; font-size: 14px; }
html:root[data-shx-theme="premium"] body.terminal-mode #terminal-shell-top {
  inset: 0 0 auto var(--terminal-side);
  height: var(--terminal-top);
  padding: 0 24px;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  z-index: 35;
}
html:root[data-shx-theme="premium"] body.terminal-mode .app-main { inset: var(--terminal-top) 0 0 var(--terminal-side); margin: 0; padding: 0; }
html:root[data-shx-theme="premium"] body .terminal-shell-brand { gap: 10px; }
html:root[data-shx-theme="premium"] body .terminal-shell-brand strong { font-size: 14px; font-weight: 600; }
html:root[data-shx-theme="premium"] body .terminal-shell-brand > img { width: 26px; height: 26px; }
html:root[data-shx-theme="premium"] body .terminal-shell-brand > div > span { color: var(--muted); font-size: 10px; }
html:root[data-shx-theme="premium"] body.terminal-mode .terminal-shell-brand > div { display: none; }
html:root[data-shx-theme="premium"] body .terminal-shell-brand small { color: var(--muted); background: #eff2e8; border-radius: 4px; font-size: 9px; padding: 2px 4px; }
html:root[data-shx-theme="premium"] body #terminal-global-search {
  max-width: 540px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f8f2;
}
html:root[data-shx-theme="premium"] body #terminal-global-search input { background: transparent; font-size: 12px; }
html:root[data-shx-theme="premium"] body .terminal-shell-actions { gap: 4px; margin-left: auto; }
html:root[data-shx-theme="premium"] body #shell-switch-workspace { border-color: var(--line); background: #fff; color: var(--text); margin-right: 0; font-size: 12px; min-height: 34px; padding: 6px 10px; }
html:root[data-shx-theme="premium"] body #terminal-shell-more > div { border-color: var(--line); border-radius: 9px; box-shadow: 0 12px 30px #252d2912; padding: 6px; }
html:root[data-shx-theme="premium"] body.terminal-mode #terminal-shell-footer {
  inset: auto 16px 10px auto;
  width: auto;
  max-width: calc(100vw - var(--sidebar-width) - 32px);
  height: 26px;
  gap: 14px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  box-shadow: var(--premium-shadow);
  pointer-events: none;
}
html:root[data-shx-theme="premium"] body #page-content { max-width: 1920px; padding: 26px 28px 48px; }
html:root[data-shx-theme="premium"] body #page-content .page-heading { gap: 16px; margin: 0 0 22px; align-items: center; flex-wrap: wrap; }
html:root[data-shx-theme="premium"] body #page-content .page-heading h1 { font-size: 25px; font-weight: 650; line-height: 1.3; margin: 0 0 5px; }
html:root[data-shx-theme="premium"] body #page-content .page-heading p { font-size: 12px; line-height: 1.6; color: var(--muted); }
html:root[data-shx-theme="premium"] body .heading-actions { gap: 8px; flex-wrap: wrap; }

/* Neutral surfaces keep financial values and status labels in the foreground. */
html:root[data-shx-theme="premium"] body #app-view :is(.data-panel, .terminal-orders-table, .dashboard-original-card, .support-admin, .support-settings, .runtime-health > div) {
  background: #fff;
  border: 1px solid transparent;
  border-radius: 16px;
  box-shadow: var(--premium-shadow);
}
html:root[data-shx-theme="premium"] body #app-view :is(.metric, .dashboard-metric, .dashboard-health-card, .wb-task-card, .support-account-card) {
  border: 1px solid transparent;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}
html:root[data-shx-theme="premium"] body #app-view .metrics { gap: 12px; margin-bottom: 18px; }
html:root[data-shx-theme="premium"] body #app-view .metric { padding: 17px 18px; }
html:root[data-shx-theme="premium"] body #app-view :is(.metric strong, .dashboard-metric > strong) { color: var(--navy); font-weight: 650; font-size: 25px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
html:root[data-shx-theme="premium"] body #app-view :is(.metric-label, .metric small, .dashboard-card-header > span) { color: var(--muted); font-size: 12px; }
html:root[data-shx-theme="premium"] body #page-content :is(.panel-toolbar, .dashboard-card-header) { padding: 14px 16px; min-height: 0; gap: 10px; border-color: var(--line); }
html:root[data-shx-theme="premium"] body #page-content .dashboard-original-card .dashboard-card-header { padding: 0; }
html:root[data-shx-theme="premium"] body #page-content :is(.panel-toolbar h3, .dashboard-card-header h3, .terminal-section-title) { color: var(--navy); font-size: 14px; font-weight: 600; }
html:root[data-shx-theme="premium"] body #page-content .inventory-summary-strip { border-color: var(--line); border-radius: 11px; gap: 16px; padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--premium-shadow); }
html:root[data-shx-theme="premium"] body #page-content .inventory-summary-strip > div + div { border-left: 1px solid var(--line); padding-left: 16px; }
html:root[data-shx-theme="premium"] body #page-content .inventory-summary-strip strong { color: var(--navy); font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
html:root[data-shx-theme="premium"] body #finance-summary .metric { background: #fafbfc; border-color: var(--line); }
html:root[data-shx-theme="premium"] body #finance-summary .metric strong { color: var(--navy); font-size: 18px; }
html:root[data-shx-theme="premium"] body #finance-summary .metric-label { color: var(--muted); }

/* Compact controls, consistent primary actions, visible disabled/focus states. */
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog, #terminal-shell-top, .wb-record-drawer) .button {
  min-width: 0 !important;
  min-height: 34px;
  height: auto;
  padding: 7px 12px;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #eef1e8;
  color: var(--text);
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog, #terminal-shell-top, .wb-record-drawer) .button:hover:not(:disabled) { background: #f0f2e9; border-color: #c7cfbd; box-shadow: none; }
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog, #terminal-shell-top, .wb-record-drawer) .button.primary {
  color: #fff !important;
  border-color: var(--premium-ink) !important;
  background: var(--premium-ink) !important;
  font-weight: 600;
}
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog, #terminal-shell-top, .wb-record-drawer) .button.primary:hover:not(:disabled) { background: #39473b !important; border-color: #39473b !important; }
html:root[data-shx-theme="premium"] body #page-content :is([data-full="groupAdd"], [data-full="catalogAdd"]) { background: var(--blue); border-color: var(--blue); color: #fff; }
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog) .button.danger,
html:root[data-shx-theme="premium"] body #page-content [data-full="groupDelete"] { color: #b42332 !important; }
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog) .button:disabled { opacity: .5; cursor: not-allowed; }
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog, .wb-record-drawer) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
  border: 1px solid #dde2d5;
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  box-shadow: none;
  font-size: 13px;
  padding: 7px 10px;
}
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) { min-height: 34px; height: 34px; }
html:root[data-shx-theme="premium"] body :is(input, select, textarea):focus { border-color: var(--blue); box-shadow: 0 0 0 3px #58745b12; }
html:root[data-shx-theme="premium"] body :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--blue); }
html:root[data-shx-theme="premium"] body #page-content :is(.terminal-page-toolbar, .terminal-filters, .filters, .terminal-record-controls) { background: #fff; border-color: var(--line); padding: 10px 12px; gap: 8px 12px; }
html:root[data-shx-theme="premium"] body #page-content :is(.terminal-page-toolbar, .terminal-filters) { border-radius: 8px; margin-bottom: 10px; }
html:root[data-shx-theme="premium"] body #page-content :is(.terminal-page-toolbar, .terminal-filters) label { color: #687460; font-size: 12px; font-weight: 500; }
html:root[data-shx-theme="premium"] body #page-content :is(.record-controls-first, .record-controls-second, .record-controls-footer) { min-height: 36px; gap: 7px 10px; padding: 2px 0; margin: 0; }
html:root[data-shx-theme="premium"] body #page-content .record-controls-first .button { width: auto; min-width: 0; }
html:root[data-shx-theme="premium"] body #page-content .terminal-tabs { gap: 16px; margin: 0 0 15px; padding: 0; border-bottom: 1px solid var(--line); }
html:root[data-shx-theme="premium"] body #page-content .terminal-tabs .button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 9px 2px; min-height: 40px; color: var(--muted); }
html:root[data-shx-theme="premium"] body #page-content .terminal-tabs .button[aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
html:root[data-shx-theme="premium"] body #page-content .terminal-tabs .button:hover { background: transparent; color: var(--navy); }
/* Keep every query/control/help line; remove repeated vertical padding only. */
html:root[data-shx-theme="premium"] body #page-content .wb-view-bar { padding: 6px 10px; margin-bottom: 8px; gap: 6px 8px; }
html:root[data-shx-theme="premium"] body #page-content:has(#original-order-filters) .page-heading { margin-bottom: 12px; }
html:root[data-shx-theme="premium"] body #page-content:has(#original-order-filters) > .terminal-page-toolbar { padding: 6px 10px; margin-bottom: 8px; }
html:root[data-shx-theme="premium"] body #page-content #original-order-filters { padding: 5px 10px; margin: 4px 0 8px; border-color: var(--line); border-radius: 8px; }
html:root[data-shx-theme="premium"] body #page-content #original-order-filters .terminal-page-toolbar { padding: 3px 0; margin: 0; gap: 6px 10px; border: 0; }
html:root[data-shx-theme="premium"] body #page-content #original-order-filters p { margin: 3px 0; font-size: 12px; line-height: 1.45; }
html:root[data-shx-theme="premium"] body #page-content:has(#original-order-filters) .terminal-record-controls { padding: 5px 10px; }
html:root[data-shx-theme="premium"] body #page-content:has(#original-order-filters) :is(.terminal-orders-summary, .terminal-summary-line, .terminal-footnote) { margin: 0; padding: 5px 10px; }

/* Retain column widths, pinned cells, resize handles and amount alignment. */
html:root[data-shx-theme="premium"] body #page-content :is(.table-scroll, .terminal-table-scroll) { border-color: var(--line); background: #fff; scrollbar-color: #c2c8d1 #f7f8f2; scrollbar-width: thin; }
html:root[data-shx-theme="premium"] body #page-content :is(.table-scroll, .terminal-table-scroll)::-webkit-scrollbar-thumb { background: #c2c8d1; border-color: #f7f8f2; }
html:root[data-shx-theme="premium"] body #page-content :is(.table-scroll, .terminal-table-scroll)::-webkit-scrollbar-track { background: #f7f8f2; }
html:root[data-shx-theme="premium"] body #page-content :is(th, td) { height: 38px; padding: 8px 12px; font-size: 13px; line-height: 1.5; border-right: 0; font-variant-numeric: tabular-nums; }
html:root[data-shx-theme="premium"] body #page-content thead th { color: #74806c; background: #f7f8f2; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; }
html:root[data-shx-theme="premium"] body #page-content thead th button { color: inherit; background: transparent; font-size: inherit; font-weight: inherit; }
html:root[data-shx-theme="premium"] body #page-content tbody td { color: var(--text); border-bottom: 1px solid #edf0e6; }
html:root[data-shx-theme="premium"] body #page-content tbody tr { background: #fff; background-image: none; box-shadow: none; transition: background-color 100ms ease; }
html:root[data-shx-theme="premium"] body #page-content tbody tr:nth-child(even) { background: #fff; }
html:root[data-shx-theme="premium"] body #page-content tbody tr:hover { background: #f4f6ed; box-shadow: none; }
html:root[data-shx-theme="premium"] body #page-content tbody tr[aria-selected="true"] { background: var(--premium-blue-soft); box-shadow: inset 2px 0 var(--blue); }
html:root[data-shx-theme="premium"] body #page-content .row-actions button { padding: 5px 8px; border-color: var(--line); border-radius: 5px; background: #fff; color: var(--blue); font-size: 11px; }
html:root[data-shx-theme="premium"][data-shx-pin="true"] body #page-content .terminal-table-scroll tbody tr > td:first-child { background: #fff; }
html:root[data-shx-theme="premium"][data-shx-pin="true"] body #page-content .terminal-table-scroll tr:hover > td:first-child { background: #f4f6ed; }
html:root[data-shx-theme="premium"][data-shx-pin="true"] body #page-content .terminal-table-scroll tr[aria-selected="true"] > td:first-child { background: var(--premium-blue-soft); }
html:root[data-shx-theme="premium"] body #page-content :is(.terminal-grid-footer, .panel-bottom) { color: var(--muted); font-size: 12px; padding: 10px 12px; background: #fff; border-color: var(--line); }
html:root[data-shx-theme="premium"] body .badge { border-radius: 5px; background: #eef1e8; color: #697763; font-size: 11px; padding: 3px 7px; }
html:root[data-shx-theme="premium"] body .badge.green { background: #edf4e9; color: #24714b; }
html:root[data-shx-theme="premium"] body .badge.red { background: #fdf0f2; color: #b42332; }
html:root[data-shx-theme="premium"] body .notice { border-color: var(--line); background: #f4f6ed; color: #536176; border-radius: 8px; }
html:root[data-shx-theme="premium"] body .notice.error { border-color: #f1d4d9; background: #fdf3f4; color: #b42332; }

/* Dialog sizes and complex financial forms remain owned by their modules. */
html:root[data-shx-theme="premium"] body #form-dialog { max-height: calc(100dvh - 40px); max-width: calc(100vw - 40px); border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 24px 80px #252d2930; }
html:root[data-shx-theme="premium"] body #form-dialog::backdrop { background: #11182766; backdrop-filter: none; }
html:root[data-shx-theme="premium"] body #form-dialog[open] { animation: premium-dialog-in 160ms ease-out both; }
html:root[data-shx-theme="premium"] body #form-dialog .dialog-heading { padding: 20px 24px 17px; border-color: var(--line); }
html:root[data-shx-theme="premium"] body #form-dialog .dialog-heading h2 { font-size: 19px; font-weight: 600; margin: 0; }
html:root[data-shx-theme="premium"] body #form-dialog :is(.dialog-form, .dialog-detail) { padding: 20px 24px; }
html:root[data-shx-theme="premium"] body #form-dialog :is(.dialog-form, .dialog-detail) label { font-size: 12px; color: #687460; }
html:root[data-shx-theme="premium"] body #form-dialog .dialog-actions { border-color: var(--line); padding: 16px 0 0; margin-top: 20px; gap: 8px; background: #fff; }
html:root[data-shx-theme="premium"] body #form-dialog .icon-button { border-radius: 7px; background: #f4f5f7; color: var(--muted); }
html:root[data-shx-theme="premium"] body .wb-record-drawer { border-color: var(--line); box-shadow: -12px 0 36px #252d2910; }
html:root[data-shx-theme="premium"] body .wb-record-drawer :is(header, .wb-drawer-controls, .wb-detail-fields, .wb-related-table) { border-color: var(--line); }
html:root[data-shx-theme="premium"] body .wb-record-drawer :is(.wb-drawer-controls, .wb-detail-fields dt) { background: #f7f8f2; }
/* Only the account panel is a drawer; order/payment dialogs retain their sizes. */
html:root[data-shx-theme="premium"] body #form-dialog:has(.shx-account-panel) {
  inset: 0 0 0 auto;
  width: min(408px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: -20px 0 60px #252d2924;
}
html:root[data-shx-theme="premium"] body #form-dialog:has(.shx-account-panel)[open] { animation: premium-account-in 180ms cubic-bezier(0, 0, .2, 1) both; }
html:root[data-shx-theme="premium"] body #form-dialog:has(.shx-account-panel) #dialog-content { flex: 1; }
html:root[data-shx-theme="premium"] body #form-dialog .shx-account-panel { min-height: 100%; display: flex; flex-direction: column; padding: 28px 24px; }
html:root[data-shx-theme="premium"] body .shx-account-identity { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 3px 14px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
html:root[data-shx-theme="premium"] body .shx-account-avatar { display: grid; place-items: center; grid-row: 1 / 3; width: 52px; height: 52px; border-radius: 13px; background: var(--premium-blue-soft); color: var(--blue); font-size: 22px; font-weight: 600; }
html:root[data-shx-theme="premium"] body .shx-account-identity h3 { grid-column: 2; margin: 0; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
html:root[data-shx-theme="premium"] body .shx-account-identity p { grid-column: 2; margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
html:root[data-shx-theme="premium"] body .shx-account-identity strong { display: block; font-size: 18px; color: var(--navy); font-weight: 600; }
html:root[data-shx-theme="premium"] body .shx-account-identity span:not(.shx-account-avatar) { color: var(--muted); font-size: 12px; }
html:root[data-shx-theme="premium"] body .shx-account-facts { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 26px 0; }
html:root[data-shx-theme="premium"] body .shx-account-facts dt { margin-top: 14px; color: var(--muted); font-size: 11px; font-weight: 500; }
html:root[data-shx-theme="premium"] body .shx-account-facts dd { margin: 0; color: var(--text); font-size: 14px; overflow-wrap: anywhere; }
html:root[data-shx-theme="premium"] body .shx-account-note { padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f7f8f2; color: var(--muted); font-size: 12px; line-height: 1.7; }
html:root[data-shx-theme="premium"] body .shx-account-panel > .dialog-actions { margin-top: auto !important; padding-top: 22px !important; }
html:root[data-shx-theme="premium"] body #toast { z-index: 100; border-radius: 8px; background: var(--premium-ink); box-shadow: 0 8px 24px #252d2920; font-size: 13px; }

/* Customer support uses the same neutral system without recoloring messages by status. */
html:root[data-shx-theme="premium"] body .support-layout { border-color: var(--line); border-radius: 11px; box-shadow: var(--premium-shadow); }
html:root[data-shx-theme="premium"] body :is(.support-account-list, .support-chat-list, .support-conversation-heading, .support-compose) { border-color: var(--line); background: #fff; }
html:root[data-shx-theme="premium"] body .support-feed { background: #f7f8fa; }
html:root[data-shx-theme="premium"] body .support-message { border-color: var(--line); box-shadow: var(--premium-shadow); }
html:root[data-shx-theme="premium"] body .support-message.outgoing { background: var(--premium-blue-soft); border-color: #dbe4d1; }
html:root[data-shx-theme="premium"] body :is(.support-account-option, .support-chat-option).selected { background: var(--premium-blue-soft); border-color: #dbe4d1; }

/* Existing brand artwork stays in place. Decorative motion is deliberately quiet. */
html:root[data-shx-theme="premium"] body .brand-stage { background: #edf0e6; }
html:root[data-shx-theme="premium"] body :is(.orbit, .star) { display: none; }
html:root[data-shx-theme="premium"] body .brand-stage::after { background: none; }
html:root[data-shx-theme="premium"] body .brand-title > span { animation: none; }
html:root[data-shx-theme="premium"] body .brand-message > p { color: #8c9a7e; font-size: 17px; letter-spacing: 1px; }
html:root[data-shx-theme="premium"] body .login-box h2 { font-size: 29px; font-weight: 650; }
html:root[data-shx-theme="premium"] body .login-box input { background: #fff; border-color: #dde2d5; border-radius: 8px; }
html:root[data-shx-theme="premium"] body .login-submit { background: var(--blue); border-radius: 8px; box-shadow: none; }
html:root[data-shx-theme="premium"] body .choice-layout { background: var(--bg); }
html:root[data-shx-theme="premium"] body .workspace-options { gap: 20px; }
html:root[data-shx-theme="premium"] body .workspace-card { background: #fff; border-color: var(--line); border-radius: 13px; box-shadow: var(--premium-shadow); transition: border-color 140ms ease, transform 140ms ease; }
html:root[data-shx-theme="premium"] body .workspace-card:hover { background: #fff; border-color: #bdc9af; box-shadow: var(--premium-shadow); transform: translateY(-2px); }
html:root[data-shx-theme="premium"] body .space-icon { background: var(--premium-blue-soft); color: var(--blue); border-radius: 10px; }
html:root[data-shx-theme="premium"] body .space-enter { color: var(--blue); border-color: var(--line); }

/* Keep the user's comfortable reading preference; small touch targets grow on phones. */
html:root[data-shx-theme="premium"][data-shx-density="comfortable"] body #page-content :is(th, td) { font-size: 15px; height: 44px; padding: 10px 12px; }
html:root[data-shx-theme="premium"][data-shx-density="comfortable"] body :is(#page-content, #form-dialog) .button { min-height: 40px; font-size: 14px; }
html:root[data-shx-theme="premium"][data-shx-density="comfortable"] body :is(#page-content, #form-dialog) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) { min-height: 40px; height: 40px; font-size: 14px; }
html:root[data-shx-theme="premium"] body.terminal-sidebar-hidden .sidebar { display: none; }
html:root[data-shx-theme="premium"] body.terminal-sidebar-hidden :is(.app-main, #terminal-shell-top) { left: 0; }
@media (max-width: 1259px) {
  html:root[data-shx-theme="premium"] body #terminal-shell-top { gap: 10px; padding: 0 16px; }
  html:root[data-shx-theme="premium"] body .terminal-shell-brand > div > span { display: none; }
  html:root[data-shx-theme="premium"] body #terminal-shell-footer > span:first-child { display: none; }
}
@media (max-width: 1119px) {
  html:root[data-shx-theme="premium"] body.terminal-mode .sidebar { display: none; width: 232px; box-shadow: 10px 0 30px #252d2928; inset: var(--terminal-top) auto 0 0; height: auto; }
  html:root[data-shx-theme="premium"] body.terminal-mode.terminal-menu-open .sidebar { display: flex; }
  html:root[data-shx-theme="premium"] body.terminal-mode :is(.app-main, #terminal-shell-top) { left: 0; }
  html:root[data-shx-theme="premium"] body #page-content { padding: 20px 18px 44px; }
  html:root[data-shx-theme="premium"] body #page-content .inventory-summary-strip { gap: 10px; padding: 14px; }
  html:root[data-shx-theme="premium"] body #page-content .inventory-summary-strip > div + div { padding-left: 10px; }
}
@media (max-width: 899px) {
  html:root[data-shx-theme="premium"] body.terminal-mode { --terminal-top: 108px; }
  html:root[data-shx-theme="premium"] body.terminal-mode #terminal-shell-top { padding: 10px 16px; gap: 8px; }
  html:root[data-shx-theme="premium"] body #terminal-global-search { order: 2; flex-basis: 100%; max-width: none; }
  html:root[data-shx-theme="premium"] body #page-content .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  html:root[data-shx-theme="premium"] body:not(.terminal-mode) .sidebar { --sidebar-width: 174px; padding: 18px 10px; }
  html:root[data-shx-theme="premium"] body:not(.terminal-mode) .app-main { margin-left: 174px; }
  html:root[data-shx-theme="premium"] body .topbar { padding: 0 14px; }
  html:root[data-shx-theme="premium"] body #page-content { padding: 18px 12px 44px; }
  html:root[data-shx-theme="premium"] body #page-content .page-heading h1 { font-size: 22px; }
  html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog) .button { min-height: 40px; }
  html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) { min-height: 40px; height: 40px; }
  html:root[data-shx-theme="premium"] body #page-content .inventory-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html:root[data-shx-theme="premium"] body #page-content .inventory-summary-strip > div + div { border-left: 0; padding-left: 0; }
  html:root[data-shx-theme="premium"] body #form-dialog { max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 11px; }
  html:root[data-shx-theme="premium"] body #form-dialog :is(.dialog-heading, .dialog-form, .dialog-detail) { padding-left: 16px; padding-right: 16px; }
  html:root[data-shx-theme="premium"] body .login-layout { grid-template-columns: 1fr; }
  html:root[data-shx-theme="premium"] body .brand-stage { min-height: 260px; padding: 24px; }
  html:root[data-shx-theme="premium"] body .brand-message { position: relative; left: auto; top: auto; right: auto; margin-top: 26px; }
  html:root[data-shx-theme="premium"] body .brand-title { font-size: 48px; line-height: 1.2; }
  html:root[data-shx-theme="premium"] body .brand-services { gap: 10px; font-size: 10px; }
  html:root[data-shx-theme="premium"] body .brand-rule { margin: 18px 0; }
  html:root[data-shx-theme="premium"] body .brand-footer { position: static; margin-top: 26px; }
  html:root[data-shx-theme="premium"] body .login-side { padding: 36px 24px 72px; }
  html:root[data-shx-theme="premium"] body .workspace-options { grid-template-columns: 1fr; }
  html:root[data-shx-theme="premium"] body .choice-layout { padding: 22px 18px; }
  html:root[data-shx-theme="premium"] body .choice-layout h1 { font-size: 28px; }
}
/* Keep the compact header and search on two rows on phones; account and
   presentation preferences remain reachable from the More menu. */
@media (max-width: 450px) {
  html:root[data-shx-theme="premium"] body.terminal-mode { --terminal-top: 108px; }
  html:root[data-shx-theme="premium"] body.terminal-mode #terminal-shell-top { padding: 6px 10px; gap: 4px 8px; }
  html:root[data-shx-theme="premium"] body .terminal-shell-actions {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 4px;
  }
}
@keyframes premium-dialog-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes premium-account-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  html:root[data-shx-theme="premium"] *,
  html:root[data-shx-theme="premium"] *::before,
  html:root[data-shx-theme="premium"] *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Design B: calm enterprise surfaces. Keep every original route, action,
   permission, native dialog and live data projection in its owning module. */
html:root[data-shx-theme="premium"] body:has(#login-view:not([hidden])) {
  min-height: 100dvh; display: flow-root;
  background: radial-gradient(ellipse at 12% 0, #e9eee2 0, transparent 52%), var(--bg);
}
html:root[data-shx-theme="premium"] body .login-layout {
  width: min(1020px, calc(100% - 48px)); max-width: 1020px; min-height: 596px;
  grid-template-columns: 1.08fr 1fr; margin: clamp(36px, 8vh, 84px) auto;
  border-radius: 24px; overflow: hidden; background: #fffefa;
  box-shadow: 0 18px 80px #2635230d;
}
html:root[data-shx-theme="premium"] body .brand-stage {
  min-height: 596px; padding: 42px; display: flex; flex-direction: column;
  color: var(--text); background: #edf0e6;
}
html:root[data-shx-theme="premium"] body .brand-top { font-size: 20px; gap: 12px; letter-spacing: .04em; }
html:root[data-shx-theme="premium"] body .brand-top small { color: #89977a; font-size: 9px; letter-spacing: .12em; }
html:root[data-shx-theme="premium"] body .brand-message { position: static; margin: auto 0; padding: 36px 0; }
html:root[data-shx-theme="premium"] body .brand-message .eyebrow { color: #7d8c6e; font-size: 10px; letter-spacing: .13em; }
html:root[data-shx-theme="premium"] body .brand-title { font-size: 34px; gap: 2px; line-height: 1.45; color: #29352a; margin: 16px 0; letter-spacing: .06em; }
html:root[data-shx-theme="premium"] body .brand-message > p { font-size: 20px; color: #435a3e; letter-spacing: .025em; line-height: 1.8; }
html:root[data-shx-theme="premium"] body .brand-rule { background: #a9b59b; width: 34px; height: 1px; margin: 28px 0 20px; }
html:root[data-shx-theme="premium"] body .brand-services { color: #5f6f50; gap: 13px; font-size: 11px; flex-wrap: wrap; }
html:root[data-shx-theme="premium"] body .brand-services i { background: #abb699; }
html:root[data-shx-theme="premium"] body .brand-footer { position: static; margin-top: auto; gap: 18px; color: #94a083; font-size: 8px; line-height: 1.8; }
html:root[data-shx-theme="premium"] body .login-side { padding: 52px 46px 76px; background: #fffefa; }
html:root[data-shx-theme="premium"] body .login-box { max-width: 380px; }
html:root[data-shx-theme="premium"] body .login-box h2 { font-size: 26px; font-weight: 600; }
html:root[data-shx-theme="premium"] body .login-box > p { color: var(--muted); margin-bottom: 30px; line-height: 1.7; }
html:root[data-shx-theme="premium"] body .login-box input { min-height: 49px; background: #f8f9f4; border-color: #dce2d3; border-radius: 9px; font-size: 14px; }
html:root[data-shx-theme="premium"] body .login-box .eyebrow { color: #818d75; font-size: 10px; letter-spacing: .13em; }
html:root[data-shx-theme="premium"] body .login-box form > label { color: #67755b; }
html:root[data-shx-theme="premium"] body .password-field button { color: #7c8b70; }
html:root[data-shx-theme="premium"] body .login-submit { background: #252d29; border-color: #252d29; border-radius: 9px; font-size: 14px; }
html:root[data-shx-theme="premium"] body .login-submit:hover { background: #39473b; border-color: #39473b; }
html:root[data-shx-theme="premium"] body .login-note { color: #849375; }
html:root[data-shx-theme="premium"] body .login-side > footer { color: #98a28b; font-size: 10px; }
html:root[data-shx-theme="premium"] body .terminal-shell-actions > .button { border-color: transparent; background: transparent; }
html:root[data-shx-theme="premium"] body #shell-switch-workspace { background: #eff2e8; border-color: transparent; }
html:root[data-shx-theme="premium"] body #terminal-global-search { border-color: transparent; background: #f2f4ec; border-radius: 9px; }
html:root[data-shx-theme="premium"] body #page-content { padding: 30px 30px 52px; }
html:root[data-shx-theme="premium"] body #app-view :is(.dashboard-original-card,.dashboard-metric,.metric) { border-color: transparent; box-shadow: var(--premium-shadow); border-radius: 15px; background: #fffefa; }
html:root[data-shx-theme="premium"] body #app-view :is(.metric,.dashboard-metric) { padding: 21px 22px; }
html:root[data-shx-theme="premium"] body #app-view :is(.metric strong,.dashboard-metric > strong) { font-size: 27px; font-weight: 600; color: #2a342b; }
html:root[data-shx-theme="premium"] body #page-content .dashboard-sparkline path { stroke: #82946d; }
html:root[data-shx-theme="premium"] body #page-content .dashboard-sparkline polygon { fill: #edf2e5; }
html:root[data-shx-theme="premium"] body #page-content .dashboard-action-grid { display: flex; flex-wrap: wrap; gap: 6px 10px; background: #edf0e3; padding: 12px 14px; border-radius: 10px; }
html:root[data-shx-theme="premium"] body #page-content .dashboard-action-grid .button { flex: 0 1 auto; border-color: transparent; background: transparent; color: #586b4c; padding: 7px 12px; }
html:root[data-shx-theme="premium"] body #page-content .dashboard-action-grid .button:hover:not(:disabled) { background: #e1e8d6; }
html:root[data-shx-theme="premium"] body #page-content :is(.panel-toolbar,.terminal-page-toolbar,.terminal-filters) { border-color: transparent; background: #f1f3ea; border-radius: 10px; }
html:root[data-shx-theme="premium"] body #page-content .row-actions .button { border-color: transparent; background: #f0f3e8; }
html:root[data-shx-theme="premium"] body .workspace-card { border-color: transparent; border-radius: 17px; background: #fffefa; }
html:root[data-shx-theme="premium"] body .workspace-card:hover { border-color: #cbd7bb; background: #fffefa; }
@media (max-width: 1119px) { html:root[data-shx-theme="premium"] body #page-content { padding: 24px 20px 48px; } }
@media (max-width: 700px) {
  html:root[data-shx-theme="premium"] body .login-layout { display: block; width: min(460px,calc(100% - 36px)); min-height: 0; margin: 18px auto 32px; background: transparent; box-shadow: none; overflow: visible; }
  html:root[data-shx-theme="premium"] body .brand-stage { min-height: 0; padding: 15px 4px 26px; display: block; background: transparent; }
  html:root[data-shx-theme="premium"] body .brand-top { font-size: 18px; }
  html:root[data-shx-theme="premium"] body :is(.brand-message,.brand-footer) { display: none; }
  html:root[data-shx-theme="premium"] body .login-side { min-height: 0; padding: 37px 27px 62px; border-radius: 18px; box-shadow: var(--premium-shadow); }
  html:root[data-shx-theme="premium"] body .login-side > footer { bottom: 20px; }
  html:root[data-shx-theme="premium"] body #page-content { padding: 22px 14px 48px; }
  html:root[data-shx-theme="premium"] body #app-view :is(.metric,.dashboard-metric) { padding: 18px 16px; }
  html:root[data-shx-theme="premium"] body #app-view :is(.metric strong,.dashboard-metric > strong) { font-size: 24px; }
}

/* Existing dashboard summary values keep their original text and permission
   projection; only separate the label from its native <b> for readable hierarchy. */
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-board { color: var(--text); }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-board .dashboard-original-card { padding: 20px 22px; margin-bottom: 14px; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-middle { gap: 16px; }
html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] > summary { gap: 18px 12px; }
html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary { gap: 21px 20px; padding: 3px 0 2px; }
html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary > span { display: flex; flex-direction: column; gap: 8px; min-width: 0; white-space: normal; color: #627057; font-size: 12px; }
html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary > span > b { display: block; color: #2a342b; font-size: 27px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-disclosure > summary h3 { color: #35432e; font-size: 14px; font-weight: 600; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-summary .unknown { color: #7e8d72; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-disclosure[data-cockpit-panel="health"] .wb-cockpit-summary { gap: 15px; font-size: 12px; }
html:root[data-shx-theme="premium"] body #terminal-shell-top .terminal-shell-actions { gap: 7px; }
html:root[data-shx-theme="premium"] body #terminal-shell-top .terminal-shell-actions .button { background: transparent; border-color: transparent; padding: 7px 9px; }
html:root[data-shx-theme="premium"] body #terminal-shell-top #shell-switch-workspace { background: #eff2e8; padding: 7px 11px; }
html:root[data-shx-theme="premium"] body #terminal-shell-top :is(.interface-status,.shx-interface-status,[data-interface-status]) { color: #839078; font-size: 10px; }
@media (max-width: 700px) {
  html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-board .dashboard-original-card { padding: 17px 16px; margin-bottom: 12px; }
  html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary { gap: 18px 14px; }
  html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary > span > b { font-size: 25px; }
}

/* B second edition: preview-only presentation layer for the original Portal.
   Append after the immutable 162a base. Native details own visibility; this
   file never hides financial rows, permission controls, or action handlers. */
html:root[data-shx-theme="premium"] {
  --muted: #53614e;
  --b2-success: #24623f;
  --b2-success-bg: #edf5ef;
  --b2-warning: #805900;
  --b2-warning-bg: #fff4d6;
  --b2-danger: #9f2f3a;
  --b2-danger-bg: #fff0f2;
  --b2-info: #295b7d;
  --b2-info-bg: #eef5fb;
  --b2-unknown: #596459;
  --b2-unknown-bg: #f0f2ee;
}
/* Auxiliary text is readable without reducing primary amount hierarchy. */
html:root[data-shx-theme="premium"] body :is(small, .subtext, .muted, .terminal-footnote, .wb-cockpit-caption, .wb-customer-summary-basis, .wb-customer-summary-meta > span, .metric-label, .terminal-grid-footer, .panel-bottom, .shx-account-note, .shx-account-facts dt) {
  font-size: 13px !important;
  line-height: 1.55;
}
html:root[data-shx-theme="premium"] body #page-content :is(.page-heading p, label, .metric small, .dashboard-metric > small, .dashboard-health-card small, .dashboard-ranking-row small, .wb-cockpit-summary > span, .wb-cockpit-caption, .wb-customer-summary-basis, .wb-customer-summary-meta > span, .terminal-footnote) {
  color: #53614e;
  font-size: 13px;
}
html:root[data-shx-theme="premium"] body #form-dialog :is(label, small, .muted, .subtext) { color: #53614e; }
html:root[data-shx-theme="premium"] body .sidebar :is(.brand small, .nav-label, .sidebar-bottom, .terminal-sidebar-collapse .button) {
  color: #c2cfc0;
  font-size: 13px;
}
html:root[data-shx-theme="premium"] body .sidebar .nav-item.child { font-size: 13px; }
html:root[data-shx-theme="premium"] body #terminal-shell-top :is(.terminal-shell-brand > div > span, .terminal-shell-brand small, .interface-status, .shx-interface-status, [data-interface-status]) {
  color: #53614e;
  font-size: 13px;
}
html:root[data-shx-theme="premium"] body :is(.brand-footer, .brand-top small, .brand-message .eyebrow, .login-box .eyebrow, .login-side > footer) {
  color: #53614e;
  font-size: 13px;
}
html:root[data-shx-theme="premium"] body #page-content .page-heading { gap: 12px; margin-bottom: 14px; }
html:root[data-shx-theme="premium"] body #page-content .page-heading h1 { font-size: 23px; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-board .dashboard-original-card {
  padding: 13px 15px;
  margin-bottom: 9px;
  border-radius: 11px;
}
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-middle { gap: 10px; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-disclosure > summary {
  min-height: 34px;
  gap: 10px;
}
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-disclosure > summary h3 { font-size: 14px; }
html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] > summary { gap: 7px 10px; }
html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary {
  gap: 10px 12px;
  padding: 0;
  min-height: 0;
}
html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary > span {
  gap: 3px;
  font-size: 13px;
  color: #53614e;
}
html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary > span > b {
  color: #2a342b;
  font-size: 24px;
  line-height: 1.25;
}
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-disclosure[data-cockpit-panel="health"] .wb-cockpit-summary { gap: 5px 12px; font-size: 13px; flex-wrap: wrap; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-disclosure[data-cockpit-panel="risks"] .wb-cockpit-summary { max-height: none; }
html:root[data-shx-theme="premium"] body #page-content .wb-disclosure-arrow { color: #53614e; }
html:root[data-shx-theme="premium"] body #page-content .wb-disclosure-body { margin-top: 10px; padding-top: 10px; }
html:root[data-shx-theme="premium"] body #page-content .wb-disclosure-body > .dashboard-original-card { padding: 0; margin: 0; box-shadow: none; }
html:root[data-shx-theme="premium"] body #page-content .dashboard-action-grid { padding: 8px 10px; gap: 6px 8px; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-actions .button { min-height: 34px !important; height: 34px !important; }
html:root[data-shx-theme="premium"] body #page-content .dashboard-ranking-row { padding: 6px 0; }
html:root[data-shx-theme="premium"] body #page-content .dashboard-ranking-empty { color: #53614e; font-size: 13px; }
/* Table width, cell alignment, selection, sorting, and column geometry remain native. */
@media (min-width: 701px) {
  html:root[data-shx-theme="premium"]:not([data-shx-density="comfortable"]) body #page-content :is(th, td) {
    height: 34px;
    padding: 6px 10px;
    font-size: 14px;
    line-height: 1.5;
  }
}
html:root[data-shx-theme="premium"] body #page-content thead th { color: #53614e; font-size: 13px; }
html:root[data-shx-theme="premium"] body #page-content .row-actions button { font-size: 13px; min-height: 30px; }
/* These colors attach only to existing source-produced semantic classes.
   Unknown/unclassified status remains neutral. Amounts are never recolored by sign. */
html:root[data-shx-theme="premium"] body :is(.badge, .health-status) {
  color: var(--b2-unknown);
  background: var(--b2-unknown-bg);
  font-size: 13px;
  line-height: 1.5;
  border-radius: 5px;
  padding: 2px 7px;
}
html:root[data-shx-theme="premium"] body :is(.badge.green, .health-status.success) { color: var(--b2-success); background: var(--b2-success-bg); }
html:root[data-shx-theme="premium"] body :is(.badge.red, .health-status.danger) { color: var(--b2-danger); background: var(--b2-danger-bg); }
html:root[data-shx-theme="premium"] body :is(.badge.warning, .health-status.warning) { color: var(--b2-warning); background: var(--b2-warning-bg); }
html:root[data-shx-theme="premium"] body :is(.badge.info, .health-status.info) { color: var(--b2-info); background: var(--b2-info-bg); }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-summary :is(.success, .wb-health-item.success) { color: var(--b2-success); }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-summary :is(.danger, .wb-health-item.danger) { color: var(--b2-danger); }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-summary :is(.warning, .wb-health-item.warning) { color: var(--b2-warning); }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-summary :is(.unknown, .wb-health-item.unknown) { color: var(--b2-unknown); }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-summary .wb-health-item b { color: inherit; }
html:root[data-shx-theme="premium"] :is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid #496b50; outline-offset: 3px; }
@media (max-width: 700px) {
  html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-board .dashboard-original-card { padding: 12px; }
  html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary { gap: 10px; }
  html:root[data-shx-theme="premium"] body #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary > span > b { font-size: 23px; }
  html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-disclosure > summary { min-height: 42px; }
  html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-actions .button { min-height: 42px !important; height: auto !important; }
}
/* Existing hidden/focus/dialog rules and reduced-motion preference stay intact. */

/* Final preview-only B2 refinements. The labels follow native details state. */
html:root[data-shx-theme="premium"] body #page-content .b2-disclosure-action { margin-left: auto; flex: 0 0 auto; color: #53614e; font-size: 13px; white-space: nowrap; }
html:root[data-shx-theme="premium"] body #page-content details:not([open]) > summary .b2-collapse-label { display: none; }
html:root[data-shx-theme="premium"] body #page-content details[open] > summary .b2-expand-label { display: none; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-middle > details > summary .b2-disclosure-action { grid-column: 1; grid-row: 3; margin-left: 0; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-rankings > details > summary { flex-wrap: wrap; }
html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-rankings > details > summary .wb-cockpit-summary { white-space: normal; min-width: min(160px, 100%); }
html:root[data-shx-theme="premium"] body :is(.shx-account-identity p, .shx-account-identity span:not(.shx-account-avatar), .shx-account-facts dt) { font-size: 13px; color: #53614e; }
html:root[data-shx-theme="premium"] body #page-content :is(.dashboard-metric > div > span, .dashboard-card-header > span) { font-size: 13px; color: #53614e; }
html:root[data-shx-theme="premium"] body #page-content .b2-status { display: inline-block; font-size: 13px; line-height: 1.5; font-weight: 500; padding: 2px 7px; border-radius: 5px; color: var(--b2-unknown); background: var(--b2-unknown-bg); white-space: nowrap; }
html:root[data-shx-theme="premium"] body #page-content .b2-status.success { color: var(--b2-success); background: var(--b2-success-bg); }
html:root[data-shx-theme="premium"] body #page-content .b2-status.warning { color: var(--b2-warning); background: var(--b2-warning-bg); }
html:root[data-shx-theme="premium"] body #page-content .b2-status.danger { color: var(--b2-danger); background: var(--b2-danger-bg); }
html:root[data-shx-theme="premium"] body #page-content .b2-status.info { color: var(--b2-info); background: var(--b2-info-bg); }
@media (max-width: 700px) {
  html:root[data-shx-theme="premium"] body #page-content .wb-cockpit-disclosure > summary .b2-disclosure-action { white-space: normal; }
}

/* Independent review completion: explicit child font declarations need their
   own overrides; dark navigation needs a light, visible keyboard focus ring. */
html:root[data-shx-theme="premium"] body .sidebar > .workspace-switch,
html:root[data-shx-theme="premium"] body .sidebar-bottom .button,
html:root[data-shx-theme="premium"] body #terminal-global-search input,
html:root[data-shx-theme="premium"] body #shell-switch-workspace,
html:root[data-shx-theme="premium"] body.terminal-mode #terminal-shell-footer,
html:root[data-shx-theme="premium"] body .brand-services { font-size: 13px; }
html:root[data-shx-theme="premium"] body .brand-services { color: #53614e; }
html:root[data-shx-theme="premium"] body.terminal-mode #terminal-shell-footer { color: #53614e; }
html:root[data-shx-theme="premium"] body .sidebar :is(button, a, input, select, textarea, summary):focus-visible { outline-color: #c2cfc0; }

/* Final explicit auxiliary font declarations in original dialogs/topbar. */
html:root[data-shx-theme="premium"] body #form-dialog :is(.dialog-form,.dialog-detail) label,
html:root[data-shx-theme="premium"] body .topbar { font-size: 13px; }

/* B3 design review overlay. Apply last to the exact 9160 B2 portal foundation (b911).
   Existing DOM, hidden/native dialog state, handlers, roles, values, sorting,
   sticky table geometry and reading preferences remain owned by their modules.
   No new charts, cards, summaries or demonstration data are introduced here. */
html:root[data-shx-theme="premium"] {
  --navy:#20252b;
  --text:#242a31;
  --muted:#5e6772;
  --line:#e3e6eb;
  --border:#e3e6eb;
  --bg:#fafbfc;
  --surface:#fff;
  --blue:#2b5eab;
  --premium-ink:#2b5eab;
  --premium-ink-raised:#f1f3f6;
  --premium-blue-soft:#eef4fc;
  --premium-shadow:none;
  font-family:"Segoe UI","Microsoft YaHei UI","PingFang SC",system-ui,sans-serif;
}
html:root[data-shx-theme="premium"] body {
  color:var(--text); background:var(--bg);
  --px-head:#f5f7f9; --px-border:var(--line);
}
html:root[data-shx-theme="premium"] body .sidebar {
  background:#f8f9fa; color:var(--text); border-color:var(--line); box-shadow:none;
}
html:root[data-shx-theme="premium"] body .sidebar :is(.brand small,.nav-label) {
  color:var(--muted);
}
html:root[data-shx-theme="premium"] body #app-view .sidebar .nav-item:not(.active) {
  color:var(--text);
}
html:root[data-shx-theme="premium"] body .sidebar .nav-item.active {
  color:#244f89; background:#eaf0f8;
}
html:root[data-shx-theme="premium"] body .sidebar > .workspace-switch {
  background:#fff; border-color:var(--line); color:var(--text);
}
html:root[data-shx-theme="premium"] body .sidebar :is(a,button):focus-visible {
  outline-color:#2b5eab;
}

/* Keep the chosen health row / metrics-left risk-right / rankings pair and six native disclosures.
   Only remove the B card styling; the existing layout selectors remain intact. */
html:root[data-shx-theme="premium"] body #app-view #page-content .dashboard-original-card {
  padding:10px 14px; margin-bottom:8px;
  background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:none;
}
html:root[data-shx-theme="premium"] body #app-view #page-content :is(.dashboard-card-header h3,.wb-cockpit-disclosure > summary h3) {
  color:var(--text); font-size:16px; font-weight:600; letter-spacing:0;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-summary {
  color:var(--text); font-size:13px; line-height:1.8;
}
html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary > span {
  display:flex; flex-direction:column; gap:3px; padding:0; border:0; border-radius:0;
  background:transparent; box-shadow:none; font-size:13px; line-height:1.8;
}
html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary > span > b {
  display:block; margin:0; font-size:18px; font-weight:650;
  color:var(--text); letter-spacing:0; font-variant-numeric:tabular-nums;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-board .dashboard-metric > strong {
  color:var(--text); font-size:18px; letter-spacing:0;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-dashboard-actions {
  display:grid; grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px; padding:0; background:transparent; border:0; border-radius:0;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-dashboard-actions .button {
  background:#fff; border:1px solid #dbe2e9; border-radius:6px;
  color:var(--text); font-size:13px; box-shadow:none;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-dashboard-actions .button:hover:not(:disabled) {
  background:#f5f7fa; border-color:#c8d1dd;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .dashboard-ranking-row {
  padding:8px 0; font-size:14px; border-color:#e8edf2;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .dashboard-ranking-row strong {
  color:var(--text); font-size:14px; font-variant-numeric:tabular-nums;
}
html:root[data-shx-theme="premium"] body #app-view #page-content :is(.dashboard-ranking-row small,.wb-cockpit-caption,.wb-customer-summary-meta > span,.wb-customer-summary-basis) {
  color:var(--muted); font-size:13px;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-receivables :is(th,td,.row-cell-content) {
  font-size:13px; color:var(--text);
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-receivables th {
  background:#f5f7f9;
}

/* Keep the original full-height split and form; left neutral, right white.
   The existing form, IDs, validation and field order are not replaced. */
html:root[data-shx-theme="premium"] body:has(#login-view:not([hidden])) {
  background:#fff;
}
html:root[data-shx-theme="premium"] body .login-layout {
  display:grid; grid-template-columns:58% 42%; width:100%; max-width:none;
  min-height:100dvh; margin:0; border:0; border-radius:0;
  background:#fff; box-shadow:none;
}
html:root[data-shx-theme="premium"] body .brand-stage {
  display:block; min-height:100dvh; padding:43px 52px;
  color:var(--text); background:#f6f7f8;
}
html:root[data-shx-theme="premium"] body .brand-message {
  position:absolute; left:12%; top:32%; right:10%; margin:0; padding:0;
}
html:root[data-shx-theme="premium"] body .brand-title {
  gap:8px; margin:17px 0 14px; font-size:55px; line-height:1.4;
  color:#242a31; letter-spacing:2px; font-weight:600;
}
html:root[data-shx-theme="premium"] body .brand-message > p {
  color:#505b68; font-size:18px; line-height:1.7; letter-spacing:1px;
}
html:root[data-shx-theme="premium"] body :is(.brand-message .eyebrow,.brand-services) {
  color:#5e6772; font-size:13px;
}
html:root[data-shx-theme="premium"] body .brand-top small {
  color:var(--muted); font-size:12px;
}
html:root[data-shx-theme="premium"] body .brand-footer {
  position:absolute; left:52px; right:52px; bottom:30px;
  margin:0; color:var(--muted); font-size:12px;
}
html:root[data-shx-theme="premium"] body .login-side {
  padding:55px; min-height:100dvh; background:#fff;
  border-radius:0; box-shadow:none;
}
html:root[data-shx-theme="premium"] body .login-box { max-width:375px; }
html:root[data-shx-theme="premium"] body .login-box h2 {
  margin:13px 0 6px; color:#242a31; font-size:32px; line-height:1.35; font-weight:650;
}
html:root[data-shx-theme="premium"] body .login-box > p {
  margin-bottom:42px; color:var(--muted); font-size:13px;
}
html:root[data-shx-theme="premium"] body .login-box form > label {
  color:#485360; font-size:13px;
}
html:root[data-shx-theme="premium"] body .login-box input {
  font-size:14px; color:var(--text); background:#f6f8fb;
  border-color:#ccd6e1; border-radius:7px;
}
html:root[data-shx-theme="premium"] body .login-box input::placeholder {
  color:#5e6772; opacity:1;
}
html:root[data-shx-theme="premium"] body .password-field button {
  color:#485360; font-size:13px;
}
html:root[data-shx-theme="premium"] body #login-form .login-submit {
  background:#2b5eab; border-color:#2b5eab; color:#fff; border-radius:7px; font-size:14px;
}
html:root[data-shx-theme="premium"] body .login-box .eyebrow {
  color:#5e6772; font-size:12px;
}
html:root[data-shx-theme="premium"] body :is(.login-note,.login-side > footer) {
  color:var(--muted); font-size:12px;
}
@media(max-width:700px) {
  html:root[data-shx-theme="premium"] body .login-layout {
    display:block; width:100%; margin:0; background:#fff;
  }
  html:root[data-shx-theme="premium"] body .brand-stage {
    min-height:0; padding:24px; background:#f6f7f8;
  }
  html:root[data-shx-theme="premium"] body .login-side {
    min-height:0; padding:36px 24px 72px;
  }
  html:root[data-shx-theme="premium"] body #app-view #page-content .wb-dashboard-actions {
    grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px;
  }
  html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary > span > b {
    font-size:18px;
  }
}

/* Neutralize only visible shell/control colors left hardcoded in the foundation.
   State pills, native disclosure/open/hidden behavior and input geometry stay native. */
html:root[data-shx-theme="premium"] :is(button,a,input,select,textarea,summary):focus-visible {
  outline-color:#2b5eab;
}
html:root[data-shx-theme="premium"] body .sidebar :is(button,a,input,select,textarea,summary):focus-visible {
  outline-color:#2b5eab;
}
html:root[data-shx-theme="premium"] body #app-view .sidebar .nav-item:not(.active):hover {
  color:var(--text); background:#eef1f4;
}
html:root[data-shx-theme="premium"] body .sidebar .brand { color:var(--text); }
html:root[data-shx-theme="premium"] body .sidebar :is(.sidebar-bottom,.terminal-sidebar-collapse) {
  color:var(--muted); border-color:var(--line);
}
html:root[data-shx-theme="premium"] body .sidebar :is(.sidebar-bottom .button,.terminal-sidebar-collapse .button) {
  color:var(--text); background:transparent; border-color:var(--line);
}
html:root[data-shx-theme="premium"] body .sidebar > .workspace-switch:hover {
  color:var(--text); background:#f1f3f6; border-color:#c8d1dd;
}
html:root[data-shx-theme="premium"] body :is(.topbar,#terminal-shell-top) {
  color:var(--text); background:#fff; border-color:var(--line); box-shadow:none;
}
html:root[data-shx-theme="premium"] body #terminal-global-search {
  background:#f4f6f8; border-color:var(--line);
}
html:root[data-shx-theme="premium"] body :is(#shell-switch-workspace,.terminal-shell-brand small) {
  color:var(--muted); background:#f1f3f6; border-color:var(--line);
}
html:root[data-shx-theme="premium"] body #app-view #page-content :is(.panel-toolbar,.terminal-page-toolbar,.terminal-filters,.filters,.terminal-record-controls) {
  background:#fff; border-color:var(--line); box-shadow:none;
}
html:root[data-shx-theme="premium"] body #app-view #page-content :is(.panel-toolbar,.terminal-page-toolbar,.terminal-filters) label {
  color:var(--muted); font-size:13px;
}
html:root[data-shx-theme="premium"] body #app-view #page-content thead th {
  color:#4e5966; background:#f6f7f9; font-size:13px;
}
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#terminal-shell-top,.wb-record-drawer) .button:not(.primary):not(.danger) {
  color:var(--text); background:#f3f5f7; border-color:var(--line); box-shadow:none;
}
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#terminal-shell-top,.wb-record-drawer) .button:not(.primary):not(.danger):hover:not(:disabled) {
  color:var(--text); background:#eaf0f7; border-color:#c8d1dd;
}
/* Foundation primary hover is important; this matches that one color contract. */
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#terminal-shell-top,.wb-record-drawer) .button.primary:hover:not(:disabled) {
  background:#234f91 !important; border-color:#234f91 !important;
}
html:root[data-shx-theme="premium"] body #app-view #page-content :is(.wb-disclosure-arrow,.dashboard-ranking-empty,.wb-customer-summary-basis) {
  color:var(--muted);
}
html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary > span {
  color:var(--muted);
}
html:root[data-shx-theme="premium"] body .brand-rule,
html:root[data-shx-theme="premium"] body .brand-services i { background:#c6cdd6; }
html:root[data-shx-theme="premium"] body .login-submit:hover {
  background:#234f91; border-color:#234f91;
}
html:root[data-shx-theme="premium"] body .workspace-card {
  background:#fff; border-color:var(--line); box-shadow:none;
}
html:root[data-shx-theme="premium"] body .workspace-card:hover {
  background:#fff; border-color:#b9c8dc;
}
@media(max-width:700px) {
  html:root[data-shx-theme="premium"] body .brand-footer {
    position:static; margin-top:12px; gap:12px;
  }
}

/* R4: login-only motion on the existing split and form. No new DOM or API. */
@keyframes b3-login-enter {
  from { opacity:0; transform:translateY(8px); }
  to { opacity:1; transform:translateY(0); }
}
@keyframes b3-login-grid-drift {
  0%,100% { transform:translateX(0); }
  50% { transform:translateX(10px); }
}
@keyframes b3-login-line-drift {
  0%,100% { transform:translateX(-12px); opacity:.2; }
  50% { transform:translateX(12px); opacity:.35; }
}
html:root[data-shx-theme="premium"] body .brand-stage {
  isolation:isolate;
}
html:root[data-shx-theme="premium"] body .brand-stage::before {
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background-image:linear-gradient(90deg,#315f9920 1px,transparent 1px),linear-gradient(#315f9920 1px,transparent 1px);
  background-size:64px 64px; opacity:.3;
  animation:b3-login-grid-drift 24s ease-in-out infinite;
}
html:root[data-shx-theme="premium"] body .brand-stage::after {
  content:""; position:absolute; left:12%; top:68%; right:auto; bottom:auto;
  width:56%; height:1px; border-radius:0; z-index:-1; pointer-events:none;
  background:linear-gradient(90deg,transparent,#2b5eab99,transparent);
  animation:b3-login-line-drift 22s ease-in-out infinite;
}
html:root[data-shx-theme="premium"] body .brand-stage .brand-top {
  animation:b3-login-enter 550ms cubic-bezier(.22,.8,.25,1) both;
}
html:root[data-shx-theme="premium"] body .brand-stage .brand-title > span {
  animation:b3-login-enter 650ms cubic-bezier(.22,.8,.25,1) both;
}
html:root[data-shx-theme="premium"] body .brand-stage .brand-title > span:nth-child(2) { animation-delay:70ms; }
html:root[data-shx-theme="premium"] body .brand-stage .brand-title > span:nth-child(3) { animation-delay:140ms; }
html:root[data-shx-theme="premium"] body .brand-stage :is(.brand-message > p,.brand-services) {
  animation:b3-login-enter 650ms 120ms cubic-bezier(.22,.8,.25,1) both;
}
html:root[data-shx-theme="premium"] body .login-side .login-box {
  animation:b3-login-enter 650ms 80ms cubic-bezier(.22,.8,.25,1) both;
}
html:root[data-shx-theme="premium"] body .login-side #login-form {
  animation:b3-login-enter 600ms 150ms cubic-bezier(.22,.8,.25,1) both;
}
html:root[data-shx-theme="premium"] body #login-form .login-submit {
  transition:background-color 140ms ease,border-color 140ms ease,transform 80ms ease;
}
html:root[data-shx-theme="premium"] body #login-form .login-submit:active:not(:disabled) {
  transform:translateY(1px);
}
@media(prefers-reduced-motion:reduce) {
  html:root[data-shx-theme="premium"] body .brand-stage::before,
  html:root[data-shx-theme="premium"] body .brand-stage::after {
    animation:none; transform:none;
  }
  html:root[data-shx-theme="premium"] body .brand-stage::before { opacity:.3; }
  html:root[data-shx-theme="premium"] body .brand-stage::after { opacity:.2; }
  html:root[data-shx-theme="premium"] body .brand-stage :is(.brand-top,.brand-title > span,.brand-message > p,.brand-services),
  html:root[data-shx-theme="premium"] body .login-side :is(.login-box,#login-form) {
    animation:none; transform:none; opacity:1;
  }
  html:root[data-shx-theme="premium"] body #login-form .login-submit {
    transition:none;
  }
  html:root[data-shx-theme="premium"] body #login-form .login-submit:active:not(:disabled) {
    transform:none;
  }
}

/* R6: fixes found in actual 1280px browser review, on the R5 layout. */
html:root[data-shx-theme="premium"] body #app-view .sidebar :is(.brand small,.nav-label,.sidebar-bottom) {
  color:#667085 !important;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-disclosure-body > .dashboard-original-card {
  border:0; border-radius:0; background:transparent; padding:0; margin:0; box-shadow:none;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-disclosure[open]:is([data-cockpit-panel="material-ranking"],[data-cockpit-panel="sales-ranking"],[data-cockpit-panel="customer-receivables"]) > .wb-disclosure-body > .dashboard-original-card > .dashboard-card-header > h3 {
  display:none;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-disclosure[open] > .wb-disclosure-body > .dashboard-original-card > .dashboard-card-header:not(:has(button)) {
  display:none;
}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-disclosure[open]:is([data-cockpit-panel="material-ranking"],[data-cockpit-panel="sales-ranking"]) > .wb-cockpit-summary > .wb-cockpit-summary {
  display:none;
}

/* R4: original compact values and light grouped material navigation only. */
html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px 12px;min-height:0;padding:0;overflow:visible}
html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary>span{display:flex;flex-direction:row;align-items:baseline;gap:6px;min-width:0;white-space:nowrap;font-size:14px;line-height:1.8}
html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary>span>b{display:inline;margin:0;font-size:14px;font-weight:700;line-height:inherit;letter-spacing:0}
html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="risks"] .wb-cockpit-summary{display:flex;flex-direction:row;flex-wrap:wrap;gap:2px 12px;min-height:0;max-height:none;overflow:visible}
html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="risks"] .wb-cockpit-summary>span{display:inline-flex;align-items:baseline;gap:5px;white-space:nowrap;font-size:14px;line-height:1.8}
html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="risks"] .wb-cockpit-summary>span>b{font-size:14px;font-weight:700;color:inherit}
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-board .dashboard-metric>strong{font-size:14px;font-weight:700}
html:root[data-shx-theme="premium"] body #app-view .sidebar #navigation{padding:0 2px}
html:root[data-shx-theme="premium"] body #app-view .sidebar #navigation .nav-item{min-height:34px;border-radius:7px;margin:2px 0;padding:7px 10px;gap:9px;font-size:13px;line-height:1.5;box-shadow:none}
html:root[data-shx-theme="premium"] body #app-view .sidebar #navigation [data-nav-group]{font-weight:600}
html:root[data-shx-theme="premium"] body #app-view .sidebar #navigation [data-nav-children]{margin:0 0 4px 10px;padding-left:8px;border-left:1px solid #e3e8ee}
html:root[data-shx-theme="premium"] body #app-view .sidebar #navigation .nav-item.child{padding:6px 9px;min-height:32px;font-weight:400;color:#445366}
html:root[data-shx-theme="premium"] body #app-view .sidebar #navigation .nav-item.active{background:#eaf0f7;color:#214d79}
html:root[data-shx-theme="premium"] body #app-view .sidebar #navigation .nav-item:not(.active):hover{background:#f0f3f6;color:#243142}
html:root[data-shx-theme="premium"] body #app-view .sidebar #navigation .nav-section-label{margin:12px 4px 6px;padding-top:10px;border-top:1px solid #e3e8ee;font-size:13px;color:#5b6674}
@media(max-width:700px){html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 8px}html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary>span{flex-wrap:wrap;gap:0 5px}}

/* R4 final compact equal summaries; native disclosures and labels remain. */
html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-middle{grid-template-columns:repeat(2,minmax(0,1fr))}
html:root[data-shx-theme="premium"] body #app-view #page-content :is([data-cockpit-panel="metrics"],[data-cockpit-panel="risks"]) > summary .b2-disclosure-action{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1150px){html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary{grid-template-columns:repeat(2,minmax(0,1fr))}html:root[data-shx-theme="premium"] body #app-view #page-content [data-cockpit-panel="metrics"] .wb-cockpit-summary>span{flex-wrap:wrap;gap:0 5px}}
@media(max-width:700px){html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-middle{grid-template-columns:minmax(0,1fr)}}

/* R7: match adjacent cockpit frames and center business table columns. */
@media (min-width: 701px) {
  html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-middle {
    align-items: stretch;
  }

  html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-middle > details.wb-cockpit-disclosure {
    align-self: stretch;
    min-width: 0;
    margin-bottom: 0;
  }
}

/* Include numeric cells with existing inline alignment and detail dialogs. */
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog, #wb-record-drawer) table :is(th, td) {
  text-align: center !important;
  vertical-align: middle;
}

html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog, #wb-record-drawer) table th > button,
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog, #wb-record-drawer) table td > .row-cell-content {
  text-align: center !important;
}

html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog, #wb-record-drawer) table td :is(.support-actions, .support-assignee) {
  justify-content: center;
}

/* UI120: server-observed presence and lightweight brand connection motion.
   Presence never infers a live device from an idle or unknown login session. */
html:root[data-shx-theme="premium"] body .shx-presence {
  display:inline-flex; align-items:center; justify-content:center;
  padding:3px 10px; border:1px solid transparent; border-radius:999px;
  font-size:13px; line-height:20px; font-weight:550; white-space:normal;
}
html:root[data-shx-theme="premium"] body .shx-presence--recent {
  color:#176b45; background:#e8f5ed; border-color:#c5e4d1;
}
html:root[data-shx-theme="premium"] body .shx-presence--idle {
  color:#805412; background:#fff2d6; border-color:#eddaac;
}
html:root[data-shx-theme="premium"] body .shx-presence--unknown {
  color:#526071; background:#eef2f6; border-color:#d7dfe9;
}
@keyframes shx-brand-hui {
  0%,100% { transform:translateY(0); }
  50% { transform:translateY(-3px); }
}
@keyframes shx-brand-connect {
  0%,100% { transform:scaleX(.65); opacity:.4; }
  50% { transform:scaleX(1); opacity:.9; }
}
@keyframes shx-brand-transfer {
  0% { transform:translateX(0); opacity:0; }
  15%,75% { opacity:.8; }
  100% { transform:translateX(112px); opacity:0; }
}
html:root[data-shx-theme="premium"] body #login-view .brand-title > span:nth-child(2) {
  color:#2b5eab;
  animation:b3-login-enter 650ms 70ms cubic-bezier(.22,.8,.25,1) both,
            shx-brand-hui 10s 900ms ease-in-out infinite;
}
html:root[data-shx-theme="premium"] body #login-view .brand-rule {
  position:relative; width:120px; background:#d6dfe9;
}
html:root[data-shx-theme="premium"] body #login-view .brand-rule::before {
  content:""; position:absolute; inset:0; background:#2b5eab;
  transform-origin:left center; pointer-events:none;
  animation:shx-brand-connect 10s ease-in-out infinite;
}
html:root[data-shx-theme="premium"] body #login-view .brand-rule::after {
  content:""; position:absolute; left:0; top:-3px; width:8px; height:8px;
  border-radius:50%; background:#2b5eab; pointer-events:none;
  animation:shx-brand-transfer 12s 800ms ease-in-out infinite;
}
/* Also pause the existing login entry/grid/line animations while hidden. */
html:root[data-shx-theme="premium"][data-shx-brand-paused] body #login-view *,
html:root[data-shx-theme="premium"][data-shx-brand-paused] body #login-view *::before,
html:root[data-shx-theme="premium"][data-shx-brand-paused] body #login-view *::after,
html:root[data-shx-theme="premium"] body #login-view[hidden] *,
html:root[data-shx-theme="premium"] body #login-view[hidden] *::before,
html:root[data-shx-theme="premium"] body #login-view[hidden] *::after {
  animation-play-state:paused !important;
}
@media(prefers-reduced-motion:reduce) {
  html:root[data-shx-theme="premium"] body #login-view .brand-title > span:nth-child(2),
  html:root[data-shx-theme="premium"] body #login-view .brand-rule::before,
  html:root[data-shx-theme="premium"] body #login-view .brand-rule::after {
    animation:none; transform:none; opacity:1;
  }
  html:root[data-shx-theme="premium"] body #login-view .brand-rule::after { opacity:0; }
}


/* Order121 B detail: presentation only; the original dialog owns focus/close. */
html:root[data-shx-theme="premium"] body #form-dialog:has(#order-detail121) {
  width: min(720px, calc(100vw - 32px)); max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px); margin: auto; inset: 0;
}
html:root[data-shx-theme="premium"] body #form-dialog:has(#order-detail121) #dialog-content { overflow: auto; }
html:root[data-shx-theme="premium"] body #form-dialog #order-detail121 { padding: 20px 26px 24px; font-size: 14px; line-height: 1.6; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-intro { color: #586270; margin: 0 0 24px; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin: 0 0 24px; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-value { min-width: 0; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-value dt { color: #586270; font-size: 14px; font-weight: 400; margin: 0 0 6px; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-value dd { color: #242f38; margin: 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-amount dd { font-variant-numeric: tabular-nums; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-status { display: inline-block; width: auto; max-width: 100%; padding: 4px 10px; border-radius: 6px; font-size: 14px; font-weight: 500; color: #45515f; background: #eef1f4; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-status.success { color: #276144; background: #edf5f0; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-status.info { color: #27598b; background: #eaf2fa; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-status.warning { color: #785418; background: #fbf3e2; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-status.danger { color: #973a40; background: #fbeef0; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-more { border: 1px solid #e1e5e9; border-radius: 8px; background: #fff; margin-bottom: 16px; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-more > summary { color: #334155; padding: 12px 14px; cursor: pointer; font-size: 14px; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-more-body { padding: 4px 14px 16px; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-history { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.5fr); gap: 8px 14px; margin: 0; font-size: 14px; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-history dt { color: #586270; margin: 0; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-history dd { color: #242f38; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-note { color: #586270; background: #f6f8fa; border: 1px solid #e5e9ed; border-radius: 8px; padding: 13px 15px; margin: 0; }
html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; padding-top: 18px; margin-top: 6px; }
html:root[data-shx-theme="premium"] body #order-detail121 :is(button, summary):focus-visible { outline: 2px solid #2563a5; outline-offset: 3px; }
@media (max-width: 450px) {
  html:root[data-shx-theme="premium"] body #form-dialog #order-detail121 { padding: 16px; }
  html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-summary { gap: 18px 16px; }
  html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-value dd { font-size: 15px; }
  html:root[data-shx-theme="premium"] body #order-detail121 .order-detail121-history { grid-template-columns: minmax(86px, .75fr) minmax(0, 1.25fr); gap: 8px 10px; }
}

/* 124: shared grid layout; full values remain in titles, details and exports. */
html:root[data-shx-theme="premium"] body.terminal-mode :is(#page-content,#form-dialog,#wb-record-drawer) [data-compact-grid] {
  min-width:0;max-width:100%;overflow:auto;
}
html:root[data-shx-theme="premium"] body.terminal-mode :is(#page-content,#form-dialog,#wb-record-drawer) [data-compact-grid] th button {
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;
}
html:root[data-shx-theme="premium"] body.terminal-mode :is(#page-content,#form-dialog,#wb-record-drawer) [data-compact-grid] .row-cell-content.grid-single-line {
  min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal;
}
html:root[data-shx-theme="premium"] body.terminal-mode :is(#page-content,#form-dialog,#wb-record-drawer) [data-compact-grid] .wb-detail-line {
  min-width:0;
}
/* Existing short raw tables use their container; long/editable rows still wrap
   or scroll locally. Google control keeps its separate thirteen-column floor. */
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) :is(.terminal-table-scroll:not([data-grid]):not(.material-control-scroll),.wb-related-table,.tt-report-preview) > table,
html:root[data-shx-theme="premium"] body #delivery-correction-diff > table {
  width:100%;min-width:100%;table-layout:auto;
}

/* Monetary/date fields do not display an ellipsis as a partial value. A
   deliberately narrow manual column can scroll its complete field locally. */
html:root[data-shx-theme="premium"] body.terminal-mode :is(#page-content,#form-dialog,#wb-record-drawer) [data-compact-grid] .row-cell-content.grid-value-scroll {
  overflow-x:auto;overflow-y:hidden;text-overflow:clip;scrollbar-width:thin;
}

/* Default focused lists: fixed rows, all columns, full text in record dialogs. */
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed { min-width: 0; max-width: 100%; overflow-x: hidden; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed table { width: 100% !important; min-width: 0 !important; table-layout: fixed !important; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed :is(th,td) { box-sizing: border-box; min-width: 0 !important; height: 44px; max-height: 44px; padding: 5px 6px !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; text-align: center !important; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed tr { height: 44px; max-height: 44px; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed :is(th button,.row-cell-content.grid-cell-ellipsis) { display: block; width: 100%; min-width: 0 !important; max-width: 100%; height: 22px; line-height: 22px; padding-block: 0; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed .wb-detail-line { height: 30px; max-height: 30px; min-width: 0; overflow: hidden; flex-wrap: nowrap; align-items: center; gap: 4px; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed .wb-detail-line .row-cell-content { flex: 1 1 0; width: 0; min-width: 0; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed :is(.wb-row-detail,.row-actions .button) { flex: 0 0 auto; width: auto; min-width: 0 !important; height: 28px; min-height: 28px; padding: 2px 6px; font-size: 12px; line-height: 20px; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed .grid-row-actions { min-width: 0; overflow: hidden; white-space: nowrap; }
html:root[data-shx-theme="premium"] body #page-content .terminal-tabs [role="tab"] { display: inline-flex; align-items: center; justify-content: center; height: 38px; min-height: 38px; min-width: 0; padding: 8px 12px; border: 1px solid #d8e1ec; border-radius: 8px; background: #fff; font: inherit; color: #17385c; white-space: nowrap; }
html:root[data-shx-theme="premium"] body #page-content .terminal-tabs [role="tab"][aria-selected="true"] { border-color: #abc8e9; background: #edf4fd; font-weight: 600; }
html:root[data-shx-theme="premium"] body #page-content :is(.terminal-toolbar-more,.terminal-focus-filters) { min-width: 0; border: 1px solid #e0e5eb; border-radius: 8px; background: #fff; }
html:root[data-shx-theme="premium"] body #page-content :is(.terminal-toolbar-more,.terminal-focus-filters) > summary { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px; cursor: pointer; font-size: 13px; color: #28486b; }
html:root[data-shx-theme="premium"] body #page-content :is(.terminal-toolbar-more,.terminal-focus-filters) > summary::after { content: '⌄'; margin-left: auto; }
html:root[data-shx-theme="premium"] body #page-content :is(.terminal-toolbar-more,.terminal-focus-filters)[open] > summary::after { content: '⌃'; }
html:root[data-shx-theme="premium"] body #page-content :is(.terminal-toolbar-more,.terminal-focus-filters)[open] > :not(summary) { padding: 8px 12px; }
html:root[data-shx-theme="premium"][data-shx-focus="true"] body #page-content #wb-view-bar { display: none; }
html:root[data-shx-theme="premium"] body #page-content .px-mobile-controls { display: flex; }

html:root[data-shx-theme="premium"] body #form-dialog:has(.grid-record-detail),
html:root[data-shx-theme="premium"] body #form-dialog:has(.shx-account-panel) { inset: 0; width: min(720px,calc(100vw - 32px)); max-width: calc(100vw - 32px); height: fit-content; min-height: 0; max-height: calc(100dvh - 32px); margin: auto; border: 1px solid #dce2e8; border-radius: 14px; box-shadow: 0 24px 80px #172b3d30; }
html:root[data-shx-theme="premium"] body #form-dialog .grid-record-detail { padding: 20px 24px; max-height: calc(100dvh - 128px); overflow: auto; }
html:root[data-shx-theme="premium"] body #form-dialog .grid-record-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 24px; }
html:root[data-shx-theme="premium"] body #form-dialog .grid-record-fields > * { min-width: 0; }
html:root[data-shx-theme="premium"] body #form-dialog .grid-record-fields :is(dd,.value,.native-field-value) { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
html:root[data-shx-theme="premium"] body #wb-record-drawer.wb-record-modal { position: fixed; inset: 0; width: min(840px,calc(100vw - 32px)); max-width: calc(100vw - 32px); height: fit-content; min-height: 0; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #dce2e8; border-radius: 14px; box-shadow: 0 24px 80px #172b3d30; background: #fff; color: #18344e; }
html:root[data-shx-theme="premium"] body #wb-record-drawer.wb-record-modal::backdrop { background: #11182766; }
html:root[data-shx-theme="premium"] body #wb-record-drawer.wb-record-modal[open] { display: flex; flex-direction: column; animation: premium-dialog-in 160ms ease-out both; }
html:root[data-shx-theme="premium"] body #wb-record-drawer.wb-record-modal .wb-record-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
html:root[data-shx-theme="premium"] body #wb-record-drawer.wb-record-modal :is(header,.wb-drawer-controls,.wb-record-tabs) { flex: 0 0 auto; }
html:root[data-shx-theme="premium"] body #wb-record-drawer.wb-record-modal .wb-detail-fields { grid-template-columns: minmax(100px,auto) minmax(0,1fr); }
html:root[data-shx-theme="premium"] body #wb-record-drawer.wb-record-modal dd { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  html:root[data-shx-theme="premium"] body #form-dialog .grid-record-fields { grid-template-columns: minmax(0,1fr); }
  html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed :is(th,td) { padding-inline: 3px !important; font-size: 12px; }
}

/* A centered record dialog does not reserve the old desktop drawer column. */
@media (min-width:1650px) {
  html:root[data-shx-theme="premium"][data-shx-interface="modern"] body.terminal-mode.wb-drawer-open #app-view .app-main { right: 0; }
}

/* Raw Google/TikTok/shared lists use displayed public cells and the existing dialog. */
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed {
  width: 100% !important; min-width: 0 !important; max-width: 100%; table-layout: fixed !important;
}
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed :is(th,td) {
  box-sizing: border-box; min-width: 0 !important; max-width: none !important; width: auto; height: 44px !important; padding: 6px 5px !important; vertical-align: middle; text-align: center !important;
}
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed th {
  white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis;
}
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed th button {
  min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed .shared-table-header { min-width: 0; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed .shared-table-header > button:first-child { min-width: 0; flex: 1; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed .column-filter-button { flex: 0 0 16px; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed .raw-cell-ellipsis {
  display: block; width: 100%; min-width: 0; max-height: 30px; line-height: 30px; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis;
}
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed .raw-cell-ellipsis :is(div,small,.material-level,.badge) { display: inline; white-space: nowrap !important; margin: 0; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed .raw-cell-ellipsis br { display: none; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed td.raw-cell-actions { overflow: visible; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .raw-row-more { position: relative; margin: 0; padding: 0; border: 0; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .raw-row-more > summary { display: block; height: 30px; line-height: 30px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .raw-row-more > .raw-row-menu { position: fixed; z-index: 70; min-width: 0; max-width: min(300px,calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow: auto; padding: 8px; background: #fff; border: 1px solid #dce2e8; border-radius: 8px; box-shadow: 0 12px 30px #18344e24; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .raw-row-menu :is(.row-actions,.material-row-actions) { display: flex; flex-wrap: wrap; min-width: 0; max-width: none; width: 100%; }
/* Selection controls fit the fixed raw-table row without a baseline margin. */
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed input[type="checkbox"] { width: 16px !important; height: 16px !important; min-width: 16px !important; min-height: 16px !important; margin: 0 !important; vertical-align: middle; }

/* One visible action row; readable columns scroll instead of being compressed. */
html:root[data-shx-theme="premium"] body #page-content .unified-focus-toolbar { margin: 0 0 14px; padding: 0 0 12px; border: 0; border-bottom: 1px solid #dce5ef; background: transparent; border-radius: 0; }
html:root[data-shx-theme="premium"] body #page-content .unified-focus-purpose { margin: 0 0 9px; color: #52657d; font-size: 13px; line-height: 1.6; }
html:root[data-shx-theme="premium"] body #page-content :is(.unified-focus-actions,.unified-focus-primary) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
html:root[data-shx-theme="premium"] body #page-content .unified-focus-actions { position: relative; }
html:root[data-shx-theme="premium"] body #page-content .unified-focus-primary:empty { display: none; }
html:root[data-shx-theme="premium"] body #page-content :is(.unified-focus-secondary,.unified-focus-filter) { position: static; margin: 0; padding: 0; border: 0; background: transparent; border-radius: 0; }
html:root[data-shx-theme="premium"] body #page-content :is(.unified-focus-secondary,.unified-focus-filter) > summary { list-style: none; cursor: pointer; min-height: 38px; padding: 8px 12px; border: 1px solid #cbd8e6; border-radius: 6px; color: #294463; background: #fff; font-size: 13px; line-height: 20px; white-space: nowrap; }
html:root[data-shx-theme="premium"] body #page-content :is(.unified-focus-secondary,.unified-focus-filter) > summary::after { content: ' ▾'; }
html:root[data-shx-theme="premium"] body #page-content :is(.unified-focus-secondary,.unified-focus-filter)[open] > summary { background: #edf4fd; border-color: #9dbce2; }
html:root[data-shx-theme="premium"] body #page-content :is(.unified-focus-menu,.unified-focus-filter-body) { position: absolute; left: 0; top: calc(100% + 5px); z-index: 35; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: max-content; min-width: 220px; max-width: min(680px,calc(100vw - 40px)); max-height: 60dvh; overflow: auto; padding: 12px; border: 1px solid #d2deec; border-radius: 8px; background: #fff; box-shadow: 0 10px 28px #1c3d6020; }
html:root[data-shx-theme="premium"] body #page-content :is(.unified-focus-secondary,.unified-focus-filter):not([open]) > :is(.unified-focus-menu,.unified-focus-filter-body) { display: none; }
html:root[data-shx-theme="premium"] body #page-content .unified-focus-menu :is(strong,.notice,.muted,[data-catalog-selection]) { flex-basis: 100%; margin: 0; }
html:root[data-shx-theme="premium"] body #page-content .unified-focus-filter-body :is(form,form > div) { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; background: none; }
html:root[data-shx-theme="premium"] body #page-content .unified-focus-filter-body label { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 150px; margin: 0; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed { overflow-x: auto; overscroll-behavior-inline: contain; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) .grid-focus-fixed table { width: var(--grid-readable-width,100%) !important; max-width: none; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) table.raw-focus-fixed { width: var(--raw-readable-width,100%) !important; max-width: none; }
html:root[data-shx-theme="premium"] body :is(#page-content,#form-dialog,#wb-record-drawer) :is(.table-scroll,.terminal-table-scroll,.material-control-scroll,.tt-report-preview):has(> table.raw-focus-fixed) { overflow-x: auto; min-width: 0; max-width: 100%; overscroll-behavior-inline: contain; }
html:root[data-shx-theme="premium"] body .grid-horizontal-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 7px 2px 12px; color: #52657d; font-size: 12px; line-height: 20px; }
html:root[data-shx-theme="premium"] body .grid-horizontal-footer input[type="range"] { display: block; flex: 1 1 180px; min-width: 120px; width: auto; height: 20px !important; min-height: 20px !important; margin: 0; padding: 0; cursor: ew-resize; accent-color: #3572d0; }
html:root[data-shx-theme="premium"] body .grid-horizontal-footer input[type="range"]:disabled { cursor: default; opacity: .45; }
html:root[data-shx-theme="premium"] body table.raw-focus-fixed th { position: relative; padding-right: 14px !important; }
html:root[data-shx-theme="premium"] body .raw-column-resizer { position: absolute; top: 0; right: 0; bottom: 0; width: 8px; z-index: 5; cursor: col-resize; touch-action: none; }
html:root[data-shx-theme="premium"] body .raw-column-resizer:hover,html:root[data-shx-theme="premium"] body .raw-column-resizer:focus-visible { background: #3572d03d; outline: 2px solid #3572d0; outline-offset: -2px; }
html:root[data-shx-theme="premium"] body #page-content #hours-form .terminal-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 20px; align-items: start; }
html:root[data-shx-theme="premium"] body #page-content #hours-form :is(.terminal-form-grid > label,label:not(.terminal-check):not(.unified-focus-filter-body label)) { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 0 0 12px; }
html:root[data-shx-theme="premium"] body #page-content #hours-form label > span { text-align: left; width: auto; }
html:root[data-shx-theme="premium"] body #page-content #hours-form :is(input:not([type="checkbox"]),select,textarea) { width: 100%; min-width: 0; margin: 0; }
html:root[data-shx-theme="premium"] body #page-content #hours-form .terminal-check { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; }
html:root[data-shx-theme="premium"] body #page-content #hours-form input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; margin: 0; }
html:root[data-shx-theme="premium"] body #page-content [data-grid="catalog"] [data-cell-key="drag"] .row-cell-content { display: inline-block; width: auto; vertical-align: middle; }
html:root[data-shx-theme="premium"] body #page-content [data-grid="catalog"] input[type="checkbox"] { width: 16px !important; height: 16px !important; min-height: 16px !important; margin: 0 5px 0 0 !important; vertical-align: middle; }
html:root[data-shx-theme="premium"] body #page-content .material-control-scroll table.raw-focus-fixed td:first-child .raw-cell-ellipsis { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 16px 16px; align-items: center; column-gap: 8px; max-height: 32px; line-height: 16px; }
html:root[data-shx-theme="premium"] body #page-content .material-control-scroll table.raw-focus-fixed td:first-child .material-customer-name { display: block; grid-column: 1; grid-row: 1; overflow: hidden; text-overflow: ellipsis; }
html:root[data-shx-theme="premium"] body #page-content .material-control-scroll table.raw-focus-fixed td:first-child .material-level { display: block; grid-column: 2; grid-row: 1; padding: 0 5px; font-size: 11px; }
html:root[data-shx-theme="premium"] body #page-content .material-control-scroll table.raw-focus-fixed td:first-child small { display: block; grid-column: 1 / -1; grid-row: 2; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
html:root[data-shx-theme="premium"] body #page-content .material-control-scroll table.raw-focus-fixed td:nth-child(8) .raw-cell-ellipsis { display: grid; grid-template-rows: 16px 16px; align-items: center; max-height: 32px; line-height: 16px; }
html:root[data-shx-theme="premium"] body #page-content .material-control-scroll table.raw-focus-fixed .material-sync-time { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  html:root[data-shx-theme="premium"] body #page-content :is(.unified-focus-menu,.unified-focus-filter-body) { position: static; margin-top: 5px; width: min(100%,calc(100vw - 40px)); min-width: 0; max-width: 100%; }
  html:root[data-shx-theme="premium"] body #page-content .unified-focus-filter-body label { min-width: 0; flex: 1 1 160px; }
  html:root[data-shx-theme="premium"] body #page-content #hours-form .terminal-form-grid { grid-template-columns: 1fr; }
}

/* Keep one compact navigation bar; preferences stay reachable in its menu. */
body.terminal-mode #terminal-shell-top #terminal-shell-more > div {
  width: min(280px, calc(100vw - 24px));
  min-width: 0;
  max-height: calc(100dvh - 76px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.terminal-mode #terminal-shell-top #terminal-shell-more > div > .button {
  text-align: left;
  white-space: normal;
}
body.terminal-mode #terminal-shell-top #terminal-shell-more .px-interface-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
body.terminal-mode #terminal-shell-top .terminal-shell-read-state {
  display: block;
  padding: 8px 10px;
  border-top: 1px solid var(--line, #d8e1ec);
  color: var(--muted, #52657d);
  font-size: 12px;
}
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog) .button.danger.ac30-confirm {
  color: #fff !important;
  background: #b42318 !important;
  border-color: #b42318 !important;
}
html:root[data-shx-theme="premium"] body :is(#page-content, #form-dialog) .button.danger.ac30-confirm:hover:not(:disabled) {
  color: #fff !important;
  background: #8e1b14 !important;
  border-color: #8e1b14 !important;
}

/* Six compact metrics on one row; preserve native closed disclosures. */
@media (min-width: 701px) {
  html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-middle {
    align-items: stretch;
  }
  html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-middle > details {
    height: 100%;
  }
  html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-middle [data-cockpit-panel="metrics"] .wb-cockpit-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (min-width: 701px) and (max-width: 1150px) {
  html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-middle {
    grid-template-columns: minmax(0, 1fr);
  }
  html:root[data-shx-theme="premium"] body #app-view #page-content .wb-cockpit-middle [data-cockpit-panel="metrics"] .wb-cockpit-summary > span {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    white-space: normal;
  }
}

/* web217: loaded-after theme sheets cannot restore the old three-column summary. */
@media (min-width: 701px) {
  html:root[data-theme][data-shx-theme="premium"] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) .wb-cockpit-middle [data-cockpit-panel="metrics"] .wb-cockpit-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (min-width: 701px) and (max-width: 1150px) {
  html:root[data-theme][data-shx-theme="premium"] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) .wb-cockpit-middle {
    grid-auto-rows: 1fr;
  }
}