:root {
  --bg-sidebar: #071b2f;
  --bg-header: #071b2f;
  --bg-app: #f4f7fb;
  --bg-card: #fff;
  --bg-subtle: #f7f9fc;
  --brand-primary: #2f76f6;
  --brand-primary-hover: #2567dc;
  --brand-soft: #eaf2ff;
  --text-inverse: #fff;
  --allp-navy: var(--bg-sidebar);
  --allp-blue: var(--brand-primary);
  --allp-cyan: #18c7c2;
  --bg-light: var(--bg-app);
  --card-light: var(--bg-card);
  --border-light: #dde6ee;
  --input-light: #fff;
  --input-border-light: #d9e2ec;
  --bg-dark: #061522;
  --card-dark: #0b2135;
  --card-dark-secondary: #102a40;
  --border-dark: #183b54;
  --input-dark: #0b2135;
  --input-border-dark: #244a66;
  --text-primary: #10233d;
  --text-secondary: #607087;
  --text-muted: #8b98aa;
  --text-on-dark: #f2f7fb;
  --text-muted-dark: #8fa9bc;
  --success: #22b573;
  --warning: #f5a623;
  --danger: #f05252;
  --inactive: #8b99a7;
  --equity: #8069e8;
  --allp-table-head: var(--bg-subtle);
  --allp-table-hover: #f5faff;
  --allp-table-selected: #edf5ff;
  --allp-table-line: #e8eef5;
  --fs-h1: 28px;
  --fs-h2: 20px;
  --fs-card: 16px;
  --fs-body: 14px;
  --fs-help: 13px;
  --fs-kpi: 30px;
}

html {
  font-family: "SF Pro SC", "PingFang SC", "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}
body, button, input, select, textarea { font-family: inherit; }
main :is(.amount, .kpi-value, .finance-card strong, td, .vin, .record-code) {
  font-variant-numeric: tabular-nums;
}
html[data-allp-scene] main:not(.full) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, button:not(.mini):not(.icon-button):not(.dialog-close):not(.drawer-close):not(.month-arrow), .button:not(.mini), .btn:not(.mini)) {
  min-height: 40px;
}
html[data-allp-scene] main:not(.full) :is(button, .button, .btn):not(.icon-button, .mini, .dialog-close, .drawer-close, .month-arrow) {
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
html[data-allp-scene] main:not(.full) :is(button, .button, .btn):disabled,
html[data-allp-scene] main:not(.full) :is(button, .button, .btn)[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .55;
}
html[data-allp-scene] main:not(.full) :is(button, .button, .btn, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}
html[data-allp-scene="light-workbench"] main:not(.full) :is(button, .button, .btn):not(.ghost, .danger, .dangerbtn, .mini, .icon-button, .dialog-close, .drawer-close, .month-arrow, [data-picker-trigger], .allp-picker-trigger):hover {
  background: var(--brand-primary-hover) !important;
  border-color: var(--brand-primary-hover) !important;
}
html[data-allp-scene="light-workbench"] main:not(.full) :is(.ghost, .button.ghost, .btn.ghost):hover {
  background: var(--brand-soft) !important;
  border-color: var(--brand-primary) !important;
}

/* Bulk operations keep their existing preflight/confirm behavior, with a distinct dialog hierarchy. */
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal {
  width: min(680px, calc(100vw - 32px));
  max-height: min(90vh, 820px);
  padding: 0;
  overflow: auto;
  border-radius: 10px;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form > header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin: 0 -24px 4px;
  padding: 20px 24px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form > header h2 {
  margin: 0 0 4px;
  font-size: 20px !important;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form > header p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .dialog-x {
  min-height: 32px !important;
  width: 32px;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  color: var(--text-secondary) !important;
  font-size: 22px;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form > label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form > label:has(textarea),
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-preflight,
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form > footer {
  grid-column: 1 / -1;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope,
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-note {
  grid-column: 1 / -1;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope {
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-subtle);
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope h3:not(:first-child) {
  margin-top: 14px;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 0;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope dl > div {
  display: flex;
  min-width: 0;
  gap: 10px;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope dt {
  flex: 0 0 auto;
  color: var(--text-secondary);
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope dd {
  min-width: 0;
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin: 0;
  padding-left: 18px;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope li {
  min-width: 0;
  overflow-wrap: anywhere;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope p,
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-note {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-note {
  margin: 0;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal :is(select, input, textarea) {
  width: 100%;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-preflight:not([hidden]) {
  padding: 14px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .preflight-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form:has([data-batch-confirm]:not([hidden])) [data-batch-preflight] {
  background: var(--card-light) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
}
html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px -24px -24px;
  padding: 16px 24px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
}
@media (max-width: 700px) {
  html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form {
    grid-template-columns: minmax(0, 1fr);
  }
  html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal .batch-operation-scope :is(dl, ul) {
    grid-template-columns: minmax(0, 1fr);
  }
  html[data-allp-scene="light-workbench"] main:not(.full) dialog.batch-modal form > footer {
    flex-wrap: wrap;
  }
}

/* The shell never changes with the content scene. */
#appSidebar, .global-header { background: var(--allp-navy); }
#appSidebar { border-right-color: var(--border-dark); }
.global-header {
  --ui-text: var(--text-on-dark);
  --ui-muted: var(--text-muted-dark);
  color: var(--text-on-dark);
  border-bottom-color: var(--border-dark);
}
.global-header .global-context strong { color: var(--text-on-dark); }
.global-header .global-context span { color: var(--text-muted-dark); }
.global-header .icon-button, .global-header .user-menu > summary {
  background: var(--card-dark-secondary);
  border: 1px solid var(--border-dark);
  color: var(--text-on-dark);
}
#appSidebar .nav-items a.on, #appSidebar .nav-subitems a.on {
  box-shadow: inset 3px 0 var(--allp-cyan);
}

/* Stage-one workbench pages; additional pages opt in by adding their page root. */
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main {
  --ui-bg: var(--bg-light);
  --ui-surface: var(--card-light);
  --ui-surface-2: var(--allp-table-head);
  --ui-line: var(--border-light);
  --ui-text: var(--text-primary);
  --ui-muted: var(--text-secondary);
  --ui-primary: var(--allp-blue);
  --ui-success: var(--success);
  --ui-warning: var(--warning);
  --ui-danger: var(--danger);
  --bg: var(--bg-light);
  --panel: var(--card-light);
  --line: var(--border-light);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  background: var(--bg-light);
  color: var(--text-primary);
}

html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main :is(.panel, .card, .filter-bar) {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgb(16 42 67 / 4%);
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main :is(.panel, .card) {
  padding: 20px;
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main :is(p, small, .muted, th) {
  color: var(--text-secondary);
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main a:not(.button, .btn) {
  color: var(--allp-blue);
}

/* Shared controls use blue for actions, green/orange/red only for business meaning. */
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main :is(button, .button, .btn):not(.ghost, .dangerbtn, .danger, .dialog-close, .icon-button, .sidebar-toggle, [data-picker-trigger], .allp-picker-trigger) {
  background: var(--allp-blue);
  border-color: var(--allp-blue);
  color: #fff;
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main :is(.ghost, .button.ghost, .btn.ghost) {
  background: var(--card-light);
  border: 1px solid var(--input-border-light);
  color: var(--text-primary);
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main .dangerbtn {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  background: var(--input-light);
  border-color: var(--input-border-light);
  color: var(--text-primary);
  color-scheme: light;
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--allp-blue);
  outline-offset: 1px;
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main :is(input, textarea)::placeholder {
  color: var(--text-muted);
}

html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main table {
  background: var(--card-light);
  color: var(--text-primary);
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main th {
  background: var(--allp-table-head);
  border-bottom-color: var(--allp-table-line);
  font-weight: 600;
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main td {
  border-bottom-color: var(--allp-table-line);
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main tbody tr:hover {
  background: var(--allp-table-hover);
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main tbody tr[aria-selected="true"] {
  background: var(--allp-table-selected);
}

/* Business dialogs remain light even when opened over a dark page. */
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main dialog {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-primary);
  box-shadow: 0 20px 48px rgb(7 24 39 / 22%);
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main dialog::backdrop {
  background: rgb(7 24 39 / 55%);
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .partner-profile-page, .station-list, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main dialog :is(.dialog-actions, footer) {
  background: var(--card-light);
  border-color: var(--border-light);
}

/* First-page adjustments where older inline rules encoded semantic colors. */
body:has(.vehicle-filter) main .vehicle-filter { padding: 20px 24px; }
body:has(.vehicle-filter) main .soc.ok,
body:has(.station-list) main .station-state:not(.off) {
  background: rgb(34 181 115 / 12%);
  color: #11724b;
}
body:has(.vehicle-filter) main .soc.watch {
  background: rgb(245 166 35 / 18%);
  color: #8a5600;
}
body:has(.vehicle-filter) main .soc.low {
  background: rgb(240 82 82 / 12%);
  color: #b43131;
}
body:has(.station-list) main .station-code-badge {
  background: var(--allp-table-selected);
  border-color: var(--border-light);
  color: var(--allp-blue);
}
body:has(.station-list) main .station-state.off {
  background: #edf1f5;
  color: var(--inactive);
}
body:has(.station-list) main .utilization-bar { background: var(--allp-table-line); }
body:has(.station-list) main .utilization-bar i { background: var(--allp-cyan); }
body:has(.partner-list-panel) main .filter-bar { padding: 14px 18px; }
body:has(.partner-list-panel) main .partner-list-panel { padding: 0; }
body:has(.partner-list-panel) main .partner-list-panel th { background: var(--allp-table-head); }
body:has(.partner-list-panel) main .status-pill {
  background: rgb(34 181 115 / 12%) !important;
  border-color: rgb(34 181 115 / 25%) !important;
  color: #11724b !important;
}
body:has(.bill-toolbar) main .bill-toolbar { padding: 18px 20px; }
html:not([data-allp-scene="dark-workbench"]) body:has(.management-filter) main .compact-table td:nth-child(2) .compact-tag {
  background: #edf1f5;
  color: var(--text-secondary);
}
html:not([data-allp-scene="dark-workbench"]) body:has(.management-filter) main .compact-table td:nth-child(4) .compact-tag {
  background: rgb(34 181 115 / 12%);
  color: #11724b;
}
html:not([data-allp-scene="dark-workbench"]) body:has(.management-filter) main .compact-table td .btn.mini {
  background: transparent !important;
  border: 1px solid var(--input-border-light) !important;
  color: var(--allp-blue) !important;
}
html:not([data-allp-scene="dark-workbench"]) body:has(.management-filter) main .compact-table td .btn.mini:hover {
  background: var(--allp-table-hover) !important;
}
body:has(:is(#feeTemplate, #expenseRule)) main .compact-tag:not(.warn) {
  background: rgb(34 181 115 / 12%);
  color: #11724b;
}
body:has(:is(#feeTemplate, #expenseRule)) main .compact-tag.warn {
  background: rgb(245 166 35 / 17%);
  color: #8a5600;
}
html:not([data-allp-scene="dark-workbench"]) body:has(:is(.vehicle-filter, .partner-list-panel, .management-filter, .bill-toolbar, #parkingRule, #feeTemplate, #expenseRule)) main :is(input[type=date], input[type=month], input[type=datetime-local])::-webkit-calendar-picker-indicator {
  filter: none;
  background-color: var(--allp-table-selected);
}

/* Existing profile text actions and quick links retain their compact link treatment. */
body:has(.partner-profile-page) main .profile-text-action {
  background: transparent !important;
  border: 0 !important;
  color: var(--allp-blue) !important;
}
body:has(.partner-profile-page) main nav.profile-links > button {
  background: transparent !important;
  border: 0 !important;
  color: var(--text-primary) !important;
}
body:has(.partner-profile-page) main .partner-profile-page {
  --profile-ink: var(--text-primary);
  --profile-muted: var(--text-secondary);
  --profile-line: var(--border-light);
  --profile-blue: var(--allp-blue);
}

/* Cockpits keep their dark hierarchy and use blue only for actual controls. */
body:has(:is(.cockpit, .partner-cockpit-v2)) main {
  --ui-primary: var(--allp-blue);
  --ui-success: var(--success);
  --ui-warning: var(--warning);
  --ui-danger: var(--danger);
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
body:has(.partner-cockpit-v2) main .partner-cockpit-v2 :is(.partner-card-head, .compact-card-head) a,
body:has(.partner-cockpit-v2) main .partner-cockpit-v2 .todo-view-all,
body:has(.partner-cockpit-v2) main .partner-cockpit-v2 .partner-kpi em {
  color: #6cabff;
}
body:has(.cockpit) main .ops-filter button:not(.ghost) {
  background: var(--allp-blue);
  border-color: var(--allp-blue);
  color: #fff;
}
body:has(.cockpit) main .ops-filter .ghost {
  background: transparent;
  border-color: var(--input-border-dark);
  color: var(--text-on-dark);
}
body:has(.cockpit) main .popup-actions a:first-child {
  background: var(--allp-blue);
}

/* Remaining PC workbenches share one dark scene. Existing business colors stay semantic. */
html[data-allp-scene="dark-workbench"] main:not(.full) {
  --bg: var(--bg-dark);
  --panel: var(--card-dark);
  --line: var(--border-dark);
  --text: var(--text-on-dark);
  --muted: var(--text-muted-dark);
  --ui-bg: var(--bg-dark);
  --ui-surface: var(--card-dark);
  --ui-surface-2: var(--card-dark-secondary);
  --ui-line: var(--border-dark);
  --ui-text: var(--text-on-dark);
  --ui-muted: var(--text-muted-dark);
  --ui-primary: var(--allp-blue);
  --ui-success: var(--success);
  --ui-warning: var(--warning);
  --ui-danger: var(--danger);
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.panel, .card, .finance-card, .dash-section, .ui-panel) {
  min-width: 0;
  background: var(--card-dark) !important;
  border: 1px solid var(--border-dark) !important;
  border-radius: 10px;
  box-shadow: none;
  color: var(--text-on-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.filter-bar, .management-filter, .expense-filter, .station-filter, .workbench-filter-bar, .selection-bar) {
  background: var(--card-dark-secondary) !important;
  border-color: var(--border-dark) !important;
  color: var(--text-on-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(h1, h2, h3, h4, label, dt, dd, b, strong) {
  color: var(--text-on-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(p, small, .muted, .helper-text, .form-help) {
  color: var(--text-muted-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(a:not(.button, .btn), .text-action) {
  color: #79b6ff;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  min-height: 38px;
  background: var(--input-dark) !important;
  border: 1px solid var(--input-border-dark) !important;
  border-radius: 8px;
  color: var(--text-on-dark) !important;
  color-scheme: dark;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(input, textarea)::placeholder {
  color: var(--text-muted-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--allp-blue);
  outline-offset: 1px;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(button, .button, .btn):not(.ghost, .dangerbtn, .danger, .icon-button, .dialog-close, .month-arrow, .drawer-close) {
  background: var(--allp-blue);
  border-color: var(--allp-blue);
  color: #fff;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.ghost, .button.ghost, .btn.ghost) {
  background: transparent;
  border-color: var(--input-border-dark);
  color: var(--text-on-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) .dangerbtn {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.table-scroll, .compact-table-wrap) {
  max-width: 100%;
  overflow-x: auto;
}
html[data-allp-scene="dark-workbench"] main:not(.full) table {
  width: 100%;
  background: var(--card-dark) !important;
  color: var(--text-on-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) table th {
  height: 42px;
  padding: 10px 11px;
  background: var(--card-dark-secondary) !important;
  border-bottom: 1px solid var(--border-dark) !important;
  color: var(--text-muted-dark) !important;
  font-size: 13px;
  font-weight: 600;
}
html[data-allp-scene="dark-workbench"] main:not(.full) table td {
  height: 48px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--border-dark) !important;
  color: var(--text-on-dark);
  font-size: 14px;
}
html[data-allp-scene="dark-workbench"] main:not(.full) table tbody tr:hover {
  background: var(--card-dark-secondary) !important;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.finance-card strong, .dashboard-kpis strong, .expense-kpis strong, .kpi-value) {
  color: var(--text-on-dark) !important;
  font-variant-numeric: tabular-nums;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.finance-grid, .dashboard-kpis, .expense-kpis) {
  gap: 12px;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.status-badge, .status-pill, .compact-tag) {
  border: 1px solid var(--input-border-dark);
  background: var(--card-dark-secondary);
  color: var(--text-muted-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.status-badge, .status-pill, .compact-tag):is(.ok, .success, .active, .confirmed) {
  border-color: rgb(34 181 115 / 30%);
  background: rgb(34 181 115 / 15%);
  color: #73ddb0;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.status-badge, .status-pill, .compact-tag):is(.warn, .warning, .pending) {
  border-color: rgb(245 166 35 / 30%);
  background: rgb(245 166 35 / 14%);
  color: #f8ca78;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.status-badge, .status-pill, .compact-tag):is(.danger, .error, .overdue, .low) {
  border-color: rgb(240 82 82 / 30%);
  background: rgb(240 82 82 / 14%);
  color: #ff9999;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.status-badge, .status-pill, .compact-tag):is(.off, .inactive, .exited, .void) {
  border-color: var(--border-dark);
  background: var(--card-dark-secondary);
  color: var(--inactive);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.empty-state, .empty, .empty-row td) {
  background: transparent;
  color: var(--text-muted-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) .unified-pagination a.on {
  background: var(--allp-blue);
  border-color: var(--allp-blue);
  color: #fff;
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(dialog, .side-drawer, .ui-drawer) {
  background: var(--card-dark) !important;
  border: 1px solid var(--border-dark) !important;
  color: var(--text-on-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) dialog::backdrop {
  background: rgb(7 24 39 / 65%);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(dialog, .side-drawer, .ui-drawer) :is(header, footer, .dialog-actions, .drawer-head) {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

/* Page-specific components keep their information meaning within the shared scene. */
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.slot, .slot-card) {
  background: var(--card-dark-secondary);
  border-color: var(--border-dark);
  color: var(--text-on-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.slot.free, .slot-card.free) {
  background: var(--card-dark);
  border-color: var(--input-border-dark);
}
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.slot.low, .slot-card.low) { border-color: var(--danger); }
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.slot.watch, .slot-card.watch) { border-color: var(--warning); }
html[data-allp-scene="dark-workbench"] main:not(.full) :is(.slot.ok, .slot-card.ok) { border-color: var(--success); }

html[data-allp-scene="dark-workbench"] main:has(.management-filter) .management-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
html[data-allp-scene="dark-workbench"] main:has(.management-filter) .management-filter label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
html[data-allp-scene="dark-workbench"] main:has(.management-filter) .management-filter label.wide {
  grid-column: span 2;
}
html[data-allp-scene="dark-workbench"] main:has(.management-filter) .management-filter :is(button, .btn) {
  min-height: 38px;
}
html[data-allp-scene="dark-workbench"] main:has(.management-filter) .compact-table .compact-tag:not(.warn) {
  border-color: rgb(34 181 115 / 30%);
  background: rgb(34 181 115 / 15%);
  color: #73ddb0;
}
html[data-allp-scene="dark-workbench"] main:has(.management-filter) .compact-table .compact-tag.warn {
  border-color: rgb(245 166 35 / 30%);
  background: rgb(245 166 35 / 14%);
  color: #f8ca78;
}
html[data-allp-scene="dark-workbench"] main:has(.management-filter) .compact-table {
  min-width: 980px;
}
html[data-allp-scene="dark-workbench"] main:has(.management-filter) .compact-table :is(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  min-width: 72px;
  background: var(--card-dark);
  box-shadow: -6px 0 12px rgb(6 21 34 / 65%);
}
html[data-allp-scene="dark-workbench"] main:has(.management-filter) .compact-table th:last-child {
  background: var(--card-dark-secondary);
}
html[data-allp-scene="dark-workbench"] main:has(select[name="risk_status"]) .panel:has(> table) {
  overflow-x: auto;
}
html[data-allp-scene="dark-workbench"] main:has(select[name="risk_status"]) .panel > table {
  min-width: 1320px;
}
html[data-allp-scene="dark-workbench"] main:has(select[name="risk_status"]) .panel > table :is(th, td) {
  white-space: nowrap;
}
html[data-allp-scene="dark-workbench"] main:has(select[name="risk_status"]) .panel > table :is(th, td):is(:nth-child(1), :nth-child(2), :nth-child(3)) {
  white-space: normal;
}
html[data-allp-scene="dark-workbench"] main:has(select[name="risk_status"]) .panel > table :is(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--card-dark);
  box-shadow: -6px 0 12px rgb(6 21 34 / 65%);
}
html[data-allp-scene="dark-workbench"] main:has(select[name="risk_status"]) .panel > table th:last-child {
  background: var(--card-dark-secondary);
}
html[data-allp-scene="dark-workbench"] main:not(.full) .unified-pagination :is(.on, .current, [aria-current="page"]) {
  background: var(--allp-blue);
  border-color: var(--allp-blue);
  color: #fff;
}
@media (max-width: 800px) {
  html[data-allp-scene="dark-workbench"] main:has(.management-filter) .management-filter label.wide {
    grid-column: auto;
  }
}

/* Operational pages share the light workbench; only the two cockpits stay dark. */
html[data-allp-scene="light-workbench"] body main:not(.full) {
  --bg: var(--bg-light);
  --panel: var(--card-light);
  --line: var(--border-light);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --ui-bg: var(--bg-light);
  --ui-surface: var(--card-light);
  --ui-surface-2: var(--allp-table-head);
  --ui-line: var(--border-light);
  --ui-text: var(--text-primary);
  --ui-muted: var(--text-secondary);
  --ui-primary: var(--allp-blue);
  --ui-success: var(--success);
  --ui-warning: var(--warning);
  --ui-danger: var(--danger);
  min-height: calc(100vh - 60px);
  background: var(--bg-light) !important;
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.panel, .card, .finance-card, .dash-section, .ui-panel, .filter-bar, .management-filter, .expense-filter, .station-filter, .workbench-filter-bar, .selection-bar) {
  min-width: 0;
  background: var(--card-light) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgb(16 42 67 / 4%);
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.finance-grid, .dashboard-kpis, .expense-kpis) { gap: 16px; }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(h1, h2, h3, h4, label, dt, dd, b, strong) { color: var(--text-primary); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(p, small, .muted, .helper-text, .form-help) { color: var(--text-secondary); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(a:not(.button, .btn), .text-action) { color: var(--allp-blue); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  min-height: 38px;
  background: var(--input-light) !important;
  border: 1px solid var(--input-border-light) !important;
  border-radius: 8px;
  color: var(--text-primary) !important;
  color-scheme: light;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(input, textarea)::placeholder { color: var(--text-muted); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(input, select, textarea):focus-visible { outline: 2px solid var(--allp-blue); outline-offset: 1px; }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.button, .btn, button[type=submit]):not(.ghost, .danger, .dangerbtn, .mini, .icon-button, .dialog-close, .drawer-close, .month-arrow) {
  background: var(--allp-blue);
  border-color: var(--allp-blue);
  color: #fff;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.ghost, .button.ghost, .btn.ghost, .btn.mini) {
  background: var(--card-light) !important;
  border: 1px solid var(--input-border-light) !important;
  color: var(--text-primary) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.danger, .dangerbtn, .button.danger, .btn.danger) {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.table-scroll, .compact-table-wrap) { max-width: 100%; overflow-x: auto; }
html[data-allp-scene="light-workbench"] body main:not(.full) table { width: 100%; background: var(--card-light) !important; color: var(--text-primary); }
html[data-allp-scene="light-workbench"] body main:not(.full) table th {
  min-height: 42px;
  padding: 10px 11px;
  background: var(--allp-table-head) !important;
  border-bottom: 1px solid var(--allp-table-line) !important;
  color: var(--text-secondary) !important;
  font-size: 13px;
  font-weight: 600;
}
html[data-allp-scene="light-workbench"] body main:not(.full) table td {
  min-height: 48px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--allp-table-line) !important;
  color: var(--text-primary);
  font-size: 14px;
}
html[data-allp-scene="light-workbench"] body main:not(.full) table tbody tr:hover { background: var(--allp-table-hover) !important; }
html[data-allp-scene="light-workbench"] body main:not(.full) table tbody tr[aria-selected="true"] { background: var(--allp-table-selected) !important; }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.finance-card strong, .dashboard-kpis strong, .expense-kpis strong, .kpi-value) {
  color: var(--text-primary) !important;
  font-variant-numeric: tabular-nums;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.empty-state, .empty, .empty-row td) { background: transparent; color: var(--text-secondary); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.unified-pagination, .pagination, .pager) { color: var(--text-secondary); }
html[data-allp-scene="light-workbench"] body main:not(.full) .unified-pagination :is(.on, .current, [aria-current="page"]) { background: var(--allp-blue); border-color: var(--allp-blue); color: #fff; }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(dialog, .side-drawer, .ui-drawer) {
  background: var(--card-light) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 10px;
  box-shadow: 0 20px 48px rgb(7 24 39 / 22%);
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) dialog::backdrop { background: rgb(7 24 39 / 55%); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(dialog, .side-drawer, .ui-drawer) :is(header, footer, .dialog-actions, .drawer-head) { background: var(--card-light); border-color: var(--border-light); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.slot, .slot-card) { background: var(--card-light); border-color: var(--border-light); color: var(--text-primary); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.slot.free, .slot-card.free) { background: var(--allp-table-head); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.slot.low, .slot-card.low) { border-color: var(--danger); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.slot.watch, .slot-card.watch) { border-color: var(--warning); }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.slot.ok, .slot-card.ok) { border-color: var(--success); }
html[data-allp-scene="light-workbench"] body main:not(.full) .module-tabs { border-color: var(--border-light); }
html[data-allp-scene="light-workbench"] body main:not(.full) .module-tabs a.on { border-color: var(--allp-blue); color: var(--allp-blue); }
html[data-allp-scene="light-workbench"] body main:not(.full) .asset-domain-ui nav.asset-module-tabs {
  border-bottom-color: var(--border-light);
}
html[data-allp-scene="light-workbench"] body main:not(.full) .asset-domain-ui nav.asset-module-tabs a.on {
  background: var(--brand-soft);
  border-bottom-color: var(--allp-blue);
  color: var(--allp-blue);
}

/* Legacy workbench components with fixed dark fills need explicit surface roles. */
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.dashboard-kpis article, .placeholder-kpis article, .expense-kpis article, .profit-kpis article, .auth-view-grid > div, .permission-body section) {
  background: var(--card-light) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.dashboard-kpis article, .placeholder-kpis article, .expense-kpis article, .profit-kpis article) :is(span, strong, small) {
  color: var(--text-primary) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.dashboard-kpis article, .placeholder-kpis article, .expense-kpis article, .profit-kpis article) small {
  color: var(--text-secondary) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(td.action-column, th.action-column, td:last-child.action-column) {
  background: var(--card-light) !important;
  box-shadow: -6px 0 12px rgb(16 42 67 / 5%);
}
html[data-allp-scene="light-workbench"] body main:not(.full) th.action-column { background: var(--allp-table-head) !important; }
html[data-allp-scene="light-workbench"] body main:not(.full) table tbody tr:hover td.action-column { background: var(--allp-table-hover) !important; }
html[data-allp-scene="light-workbench"] body main:not(.full) :is(button, .button, .btn):not(.ghost, .danger, .dangerbtn, .mini, .icon-button, .dialog-close, .drawer-close, .ui-close, .month-arrow, .tab, .alias-action, .status-action, [data-picker-trigger], .allp-picker-trigger) {
  background: var(--allp-blue) !important;
  border-color: var(--allp-blue) !important;
  color: #fff !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.danger, .dangerbtn, .button.danger, .btn.danger):not(.ghost) {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) .partner-equity-full-list tr.is-current-partner td:nth-child(2) {
  color: var(--text-primary) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) .partner-equity-full-list .equity-me-label {
  background: var(--allp-table-selected);
  color: var(--allp-blue);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.scope-pill, .module-tags span, .status-pill, .status-badge, .compact-tag) {
  background: var(--allp-table-head);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.status-pill, .status-badge, .compact-tag):is(.ok, .success, .active, .confirmed),
html[data-allp-scene="light-workbench"] body main:not(.full) .scope-pill.all {
  background: rgb(34 181 115 / 12%);
  border-color: rgb(34 181 115 / 25%);
  color: #11724b;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.status-pill, .status-badge, .compact-tag):is(.warn, .warning, .pending),
html[data-allp-scene="light-workbench"] body main:not(.full) .scope-pill.warning {
  background: rgb(245 166 35 / 16%);
  border-color: rgb(245 166 35 / 28%);
  color: #8a5600;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.status-pill, .status-badge, .compact-tag):is(.danger, .error, .overdue, .low) {
  background: rgb(240 82 82 / 12%);
  border-color: rgb(240 82 82 / 28%);
  color: #b43131;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.auth-schema-note, .permission-empty, .confirm-choice, .scope-mode label, .permission-card-grid label, .permission-groups label, .legacy-permission label) {
  background: var(--allp-table-head);
  border-color: var(--border-light);
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.auth-drawer-body fieldset, .permission-groups fieldset, .role-create-form fieldset) {
  border-color: var(--border-light);
}
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header {
  background: var(--allp-navy);
  color: var(--text-on-dark);
}
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .global-context strong { color: var(--text-on-dark); }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .global-context span:not(.environment-badge) { color: var(--text-muted-dark); }
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .user-menu-panel {
  background: var(--card-dark);
  border-color: var(--border-dark);
  color: var(--text-on-dark);
}
html[data-allp-scene="light-workbench"] body main:not(.full) .global-header .user-menu-panel :is(span, small, a) { color: var(--text-on-dark); }
html[data-allp-scene="light-workbench"] body main:not(.full) .more-menu > div {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 24px rgb(7 24 39 / 12%);
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] body > .portal-menu {
  position: fixed !important;
  z-index: 10000 !important;
  display: grid !important;
  background: var(--card-light) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: 0 8px 24px rgb(7 24 39 / 12%);
  color: var(--text-primary) !important;
}
html[data-allp-scene="light-workbench"] body > .portal-menu :is(a, button) {
  display: block !important;
  width: 100% !important;
  background: transparent !important;
  border: 0 !important;
  color: var(--text-primary) !important;
  font-size: 14px !important;
  line-height: 20px !important;
  text-align: left !important;
  opacity: 1 !important;
  visibility: visible !important;
}
html[data-allp-scene="light-workbench"] body > .portal-menu :is(a, button):hover {
  background: var(--brand-soft) !important;
}
body:has(.partner-list-panel) main .more-menu > div {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 24px rgb(7 24 39 / 12%);
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) .alias-action {
  background: transparent !important;
  border: 0 !important;
  color: var(--allp-blue) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) .status-action.status-active {
  background: rgb(34 181 115 / 12%) !important;
  border: 1px solid rgb(34 181 115 / 25%) !important;
  color: #11724b !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) .status-action.status-inactive {
  background: #edf1f5 !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-secondary) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.tag:not(.test), .module-tags span) {
  background: var(--allp-table-head);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) .tag.test {
  background: rgb(245 166 35 / 16%);
  border: 1px solid rgb(245 166 35 / 28%);
  color: #8a5600;
}
html[data-allp-scene="light-workbench"] body main:not(.full) .auth-table .status-pill:not(.status-neutral) {
  background: rgb(34 181 115 / 12%);
  border-color: rgb(34 181 115 / 25%);
  color: #11724b;
}
html[data-allp-scene="light-workbench"] body main:not(.full) .partner-profile-page .profile-text-action,
html[data-allp-scene="light-workbench"] body main:not(.full) .partner-profile-page nav.profile-links > button {
  background: transparent !important;
  border: 0 !important;
  color: var(--allp-blue) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) .partner-profile-page nav.profile-links > button {
  color: var(--text-primary) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.station-kpis article, .detail-card, .summary-card) {
  background: var(--card-light) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.station-kpis article, .detail-card, .summary-card) :is(b, strong, dt, dd, span) {
  color: var(--text-primary);
}
body:has(.bill-toolbar) main .bill-cards b { color: var(--text-primary) !important; }
body:not(:has(:is(.cockpit, .partner-cockpit-v2))) main .unified-pagination :is(.on, .current, [aria-current="page"]) {
  background: var(--allp-blue) !important;
  border-color: var(--allp-blue) !important;
  color: #fff !important;
}
body:not(:has(:is(.cockpit, .partner-cockpit-v2))) main > header:not(.global-header) a.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  text-decoration: none;
}
html[data-allp-scene="light-workbench"] body main:not(.full) .status-action {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  text-decoration: none;
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.auth-drawer, .permission-workbench) .user-avatar-section {
  background: var(--allp-table-head);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.auth-drawer, .permission-workbench) legend {
  color: var(--text-primary);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.auth-drawer, .permission-workbench) input[type="checkbox"],
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.auth-drawer, .permission-workbench) input[type="radio"] {
  background: var(--input-light);
  border-color: var(--input-border-light);
  accent-color: var(--allp-blue);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.auth-drawer, .permission-workbench) :is(input[type="checkbox"], input[type="radio"]):checked {
  background: var(--allp-blue);
  border-color: var(--allp-blue);
}
html[data-allp-scene="light-workbench"] body main:not(.full) :is(.auth-drawer, .permission-workbench) input[type="checkbox"]:checked::before {
  border-color: #fff;
}

/* One checkbox treatment for every ordinary workbench, including legacy forms. */
html[data-allp-scene="light-workbench"] body main input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--input-border-light) !important;
  border-radius: 4px !important;
  background: var(--input-light) !important;
  box-shadow: none !important;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  cursor: pointer;
}
html[data-allp-scene="light-workbench"] body main input[type="checkbox"]:hover:not(:disabled) {
  border-color: var(--allp-blue) !important;
}
html[data-allp-scene="light-workbench"] body main input[type="checkbox"]:checked {
  border-color: var(--allp-blue) !important;
  background: var(--allp-blue) !important;
}
html[data-allp-scene="light-workbench"] body main input[type="checkbox"]:checked::before {
  content: none !important;
}
html[data-allp-scene="light-workbench"] body main input[type="checkbox"]:checked::after {
  content: "✓" !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}
html[data-allp-scene="light-workbench"] body main input[type="checkbox"]:disabled {
  border-color: var(--border-light) !important;
  background: var(--bg-subtle) !important;
  cursor: not-allowed;
  opacity: .65;
}
html[data-allp-scene="light-workbench"] body main input[type="checkbox"]:disabled:checked {
  background: var(--inactive) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) .ui-close {
  background: var(--card-light) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-secondary) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) dialog.batch-modal form > header,
html[data-allp-scene="light-workbench"] body main:not(.full) dialog.batch-modal form > footer {
  background: var(--bg-subtle) !important;
}
html[data-allp-scene="light-workbench"] body main:not(.full) dialog.batch-modal .dialog-x {
  min-height: 32px !important;
  background: transparent !important;
  border: 0 !important;
  color: var(--text-secondary) !important;
}
html[data-allp-scene="light-workbench"] body main .governance-main-tabs {
  display: flex !important;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border-light) !important;
  border-radius: 0;
}
html[data-allp-scene="light-workbench"] body main .governance-main-tabs a {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  color: var(--text-secondary) !important;
}
html[data-allp-scene="light-workbench"] body main .governance-main-tabs a.on {
  background: var(--brand-soft) !important;
  box-shadow: inset 0 -2px 0 var(--allp-blue) !important;
  color: var(--allp-blue) !important;
}
html[data-allp-scene="light-workbench"] body main .bonus-create-panel {
  padding: 16px 20px;
}
.bonus-unavailable { display: grid; gap: 9px; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--border-light); border-radius: 8px; background: var(--bg-subtle); color: var(--text-primary); }

/* The brand preview renders the same partial as the real sidebar. */
html[data-allp-scene="light-workbench"] body main .brand-sidebar-preview {
  display: block;
  width: min(236px, 100%);
  margin: 12px 0 18px;
  padding: 14px;
  background: var(--allp-navy);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  --ui-text: var(--text-on-dark);
  --ui-muted: var(--text-muted-dark);
}
html[data-allp-scene="light-workbench"] body main .brand-sidebar-preview .brand {
  padding: 10px 12px 30px;
  color: var(--text-on-dark);
}
html[data-allp-scene="light-workbench"] body main .brand-sidebar-preview .brand-platform {
  color: var(--text-muted-dark) !important;
}

html[data-allp-scene="light-workbench"] body main .auth-table:has(thead th:nth-child(10)) {
  min-width: 1280px;
  table-layout: auto;
}
html[data-allp-scene="light-workbench"] body main .auth-table:has(thead th:nth-child(10)) :is(th,td):first-child { width: 56px; }
html[data-allp-scene="light-workbench"] body main .auth-table:has(thead th:nth-child(10)) :is(th,td):nth-child(2) { width: 108px; white-space: nowrap; }
html[data-allp-scene="light-workbench"] body main .auth-table:has(thead th:nth-child(10)) :is(th,td):nth-child(4),
html[data-allp-scene="light-workbench"] body main .auth-table:has(thead th:nth-child(10)) :is(th,td):nth-child(5) { min-width: 130px; }
.bonus-unavailable ul { display: flex; flex-wrap: wrap; gap: 5px 20px; margin: 0; padding-left: 18px; color: var(--text-secondary); font-size: 13px; }
.bonus-next-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.bonus-next-actions a { color: var(--allp-blue); font-size: 13px; }

html[data-allp-scene="light-workbench"] body main:not(.full) nav.allp-segmented {
  display: inline-flex !important;
  width: max-content;
  max-width: 100%;
  gap: 3px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-subtle);
}
html[data-allp-scene="light-workbench"] body main:not(.full) nav.allp-segmented a {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  white-space: nowrap;
  text-decoration: none;
}
html[data-allp-scene="light-workbench"] body main:not(.full) nav.allp-segmented a:is(:hover, :focus-visible) {
  color: var(--allp-blue);
}
html[data-allp-scene="light-workbench"] body main:not(.full) nav.allp-segmented a.on {
  background: var(--brand-soft);
  color: var(--allp-blue);
  font-weight: 600;
}
