/* PrintAspect application stylesheet. Universal appearance and page geometry
 * have one owner. Select named components and variations in markup; feature
 * selectors describe unique content and mechanics only. See UI_STYLE_GUIDE.md.
 */
@layer tokens, base, content, components, layouts;

/* Typography and design values */
@layer tokens {
  :root {
    color-scheme: light; font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --color-background: #f5f7fa; --color-surface: #ffffff; --color-border: #d9e2ec; --color-primary: #1f7ae0;
    --color-primary-dark: #0f62c8; --color-header: #152637; --color-sidebar: #34516f; --color-sidebar-active: #334e68; --color-text: #102a43;
    --brand-heading: #ffffff; --brand-subheading: #cbd5e1;
    --color-text-muted: #486581; --color-danger: #d64545;
  }
  :root {
    --ui-ink: #1e293b; --ui-muted: #64748b; --ui-line: #e2e8f0; --ui-soft: #f8fafc; --ui-section: #f1f5f9;
    --ui-accent: #2563eb; --ui-radius: 8px;
  }
  :root {
    --ui-shell-control-shadow: inset 0 1px 0 rgb(255 255 255 / 14%), inset 0 -1px 0 rgb(0 0 0 / 10%);
    --ui-shell-control-shadow-hover: inset 0 1px 0 rgb(255 255 255 / 24%), inset 0 -1px 0 rgb(0 0 0 / 16%);
    --ui-shell-control-shadow-subitem-hover: inset 0 1px 0 rgb(255 255 255 / 12%), inset 0 -1px 0 rgb(0 0 0 / 8%);
    --ui-shell-control-shadow-active: inset 0 1px 0 rgb(255 255 255 / 30%), inset 0 -2px 0 rgb(0 0 0 / 18%);
    --ui-shell-control-shadow-pressed: inset 0 1px 2px rgb(0 0 0 / 18%), inset 0 -1px 0 rgb(255 255 255 / 12%);
  }
  body[data-ui-system="v1"] {
    --ds-canvas: #f4f6f8; --ds-surface: #ffffff; --ds-surface-quiet: #f8fafb; --ds-text: #172b3b;
    --ds-text-secondary: #486071; --ds-text-muted: #657785; --ds-border: #dce3e8; --ds-border-strong: #bdcbd4;
    --ds-action: #1e66ae; --ds-action-hover: #165792; --ds-action-text: #ffffff; --ds-danger: #b42332;
    --ds-success: #26714a; --ds-warning: #8c6200; --ds-focus: #1768b7; --ds-focus-ring: rgba(23, 104, 183, 0.2);
    --ds-brand-header: var(--color-header, #152637); --ds-brand-sidebar: var(--color-sidebar, #34516f);
    --ds-brand-heading: var(--brand-heading, #ffffff); --ds-brand-subheading: var(--brand-subheading, #d9e2ec);
    --ds-font-body: 13px; --ds-font-table: 12px; --ds-font-metadata: 11px; --ds-font-label: 12px;
    --ds-font-section: 15px; --ds-font-page: 21px; --ds-line-body: 1.4; --ds-space-1: 4px; --ds-space-2: 8px;
    --ds-space-3: 12px; --ds-space-4: 16px; --ds-space-5: 20px; --ds-space-6: 24px; --ds-radius-control: 4px;
    --ds-radius-surface: 7px; --ds-control-min-height: 33px; --ds-toolbar-min-height: 30px;
    font-size: var(--ds-font-body); line-height: var(--ds-line-body);
  }
  @media screen {
    .ui-workspace-theme {
      --ds-panel-surface: color-mix(in srgb, var(--ds-surface) 75%, transparent);
      --ds-panel-surface-quiet: color-mix(in srgb, var(--ds-surface-quiet) 75%, transparent);
    }
  }
  body[data-ui-system="v1"] .ui-page {
    min-width: 0; color: var(--ds-text);
  }
  body[data-ui-system="v1"] .ui-meta {
    color: var(--ds-text-muted); font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] .ui-eyebrow {
    margin: 0; color: var(--ds-text-muted); font-size: 10px; font-weight: 700; letter-spacing: 0.07em;
    text-transform: uppercase;
  }
  :root {
    --ds-table-heading: #e7edf4;
  }
  body.operator-shell {
    --ds-table-heading: #ece9e2;
  }
}

/* Shell and content foundations */
@layer base {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  body {
    margin: 0; min-height: 100vh; background-color: var(--color-background); color: var(--color-text);
  }
  .visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
  }
  .app-shell {
    display: flex; flex-direction: column; min-height: 100vh;
  }
  .app-header {
    background-color: var(--color-sidebar); color: #ffffff; padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25); display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
  }
  .app-header h1 {
    margin: 0; font-size: 1.75rem; font-weight: 600;
  }
  .app-header-brand-primary {
    color: #ffffff;
  }
  .app-header-brand-accent {
    color: #00ffff;
  }
  .mobile-menu-toggle {
    display: none; cursor: pointer;
  }
  .app-body {
    display: flex; flex: 1; min-height: 0;
  }
  .sidebar {
    width: 220px; background-color: var(--color-sidebar); padding: 1.5rem 1rem; display: flex;
    flex-direction: column; gap: 1rem;
  }
  .menu {
    display: flex; flex-direction: column; gap: 0.5rem;
  }
  .sidebar-footer {
    margin-top: auto;
  }
  .logout-button {
    width: 100%; cursor: pointer; text-align: left;
  }
  .print-settings .panel {
    display: flex;
  }
  .settings-header {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  }
  .settings-card-header {
    display: flex; justify-content: space-between; gap: 1rem;
  }
  .settings-nav-header,
  .settings-actions {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  }
  .settings-header {
    margin-bottom: 1rem;
  }
  .settings-header h2 {
    margin: .35rem 0;
  }
  .back-link {
    color: var(--color-primary); text-decoration: none;
  }
  .settings-message {
    min-height: 1.5rem; margin-bottom: .75rem;
  }
  .settings-layout {
    display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); gap: 1rem; align-items: start;
  }
  .settings-nav {
    padding: 1rem; position: sticky; top: 1rem;
  }
  .settings-nav-header h3 {
    margin: 0;
  }
  .settings-resource-nav {
    border: 1px solid #e2e8f0; border-radius: .6rem; background: #f8fafc; margin-top: 1rem; padding: .75rem;
  }
  .settings-projects-nav {
    border: 1px solid #e2e8f0; border-radius: .6rem; background: #f8fafc; padding: .75rem;
  }
  .settings-resource-nav .settings-nav-header {
    margin-bottom: .55rem;
  }
  .settings-resource-nav-button {
    display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0;
    background: transparent; color: var(--color-text); padding: .25rem 0; font: inherit; font-weight: 700;
    text-align: left; cursor: pointer;
  }
  .settings-resource-nav-button:hover,
  .settings-resource-nav-button:focus-visible {
    color: var(--color-primary);
  }
  .settings-project-list,
  #archived-project-list,
  .resource-list {
    display: grid; gap: .35rem;
  }
  .settings-list-item {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .5rem;
    border: 1px solid transparent; background: transparent; border-radius: .5rem; padding: .65rem; text-align: left;
    cursor: pointer;
  }
  .resource-list-item {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .5rem; text-align: left;
    cursor: pointer;
  }
  .settings-list-item:hover,
  .settings-list-item.selected {
    background: #eef4f8; border-color: #cbd5e1;
  }
  .settings-project-list .settings-list-item {
    justify-content: flex-start;
  }
  .settings-color-dot {
    width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; margin-right: .35rem;
    vertical-align: middle;
  }
  .settings-archive {
    margin-top: 1rem; border-top: 1px solid #e2e8f0; padding-top: .75rem;
  }
  .settings-main {
    display: grid; gap: 1rem;
  }
  .settings-card-header {
    align-items: flex-start; margin-bottom: 1rem;
  }
  .settings-card-header h3 {
    margin: .15rem 0;
  }
  .status-badge {
    border-radius: 999px; background: #e7f5ec; color: #166534; font-size: .8rem; padding: .25rem .6rem;
  }
  .settings-form-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem;
  }
  .settings-card label,
  .resource-editor label {
    display: grid; gap: .3rem; font-weight: 600; margin: .65rem 0;
  }
  .settings-card input:not([type=checkbox]):not([type=color]),
  .settings-card select,
  .settings-card textarea {
    box-sizing: border-box; width: 100%;
  }
  .settings-check {
    display: flex; grid-template-columns: none; align-items: center; font-weight: 500;
  }
  .settings-check input {
    width: auto;
  }
  .settings-disclosure {
    border-top: 1px solid #e2e8f0; margin-top: 1rem; padding-top: .75rem;
  }
  .settings-disclosure summary {
    cursor: pointer; font-weight: 700;
  }
  .mapping-list,
  .builder-list,
  .option-list {
    display: grid; gap: .4rem; margin-top: .65rem;
  }
  .mapping-row {
    display: flex; align-items: center; gap: .65rem; justify-content: space-between; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: .4rem; padding: .5rem .65rem;
  }
  .builder-row {
    display: flex; align-items: center; gap: .65rem; background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: .4rem; padding: .5rem .65rem;
  }
  .option-row {
    justify-content: space-between; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .4rem;
    padding: .5rem .65rem;
  }
  .option-add {
    display: flex; align-items: center; gap: .65rem; justify-content: space-between; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: .4rem; padding: .5rem .65rem;
  }
  .mapping-row > span:first-child,
  .resource-list-item span:first-child {
    display: grid; gap: .15rem;
  }
  .mapping-row small,
  .resource-list-item small {
    color: #64748b; font-size: .78rem;
  }
  .settings-columns {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
  }
  .resource-editor {
    border-top: 1px solid #e2e8f0; margin-top: 1rem; padding-top: 1rem;
  }
  #field-form {
    max-width: 52rem;
  }
  #field-form > label:not(.settings-check) {
    max-width: 34rem;
  }
  #field-form > label:first-of-type {
    max-width: 100%;
  }
  #field-form > label:nth-of-type(2),
  #field-form > label:nth-of-type(3) {
    max-width: 22rem;
  }
  .resource-editor-panel .resource-editor {
    border-top: 0; margin-top: 0; padding-top: 0;
  }
  .resource-editor-panel .settings-card-header {
    margin-bottom: 1.25rem;
  }
  .resource-overview-actions {
    justify-content: flex-end; margin-bottom: 1rem;
  }
  .settings-card[hidden],
  .resource-editor-panel[hidden],
  .resource-editor[hidden],
  .resource-overview[hidden],
  .resource-list[hidden],
  .resource-overview-actions button[hidden] {
    display: none !important;
  }
  .resource-editor-panel .settings-card-header h3 {
    margin: .15rem 0;
  }
  .resource-editor h4 {
    margin-top: 0;
  }
  .builder-row {
    justify-content: flex-start;
  }
  .builder-row select {
    flex: 0 0 11rem;
  }
  .builder-value {
    flex: 1;
  }
  .option-row span,
  .option-row .option-label-input {
    flex: 1; min-width: 0;
  }
  .option-add input {
    flex: 1;
  }
  .settings-dialog {
    width: min(680px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); border: 0; border-radius: .8rem;
    padding: 0; box-shadow: 0 20px 70px rgba(15, 23, 42, .3);
  }
  .settings-dialog::backdrop {
    background: rgba(15, 23, 42, .55);
  }
  .settings-dialog form {
    padding: 1.25rem;
  }
  .settings-dialog-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    border-bottom: 1px solid #e2e8f0; padding-bottom: .85rem;
  }
  .settings-dialog h2 {
    margin: .15rem 0 .35rem;
  }
  .settings-dialog fieldset {
    border: 1px solid #e2e8f0; border-radius: .55rem; margin: 1rem 0; padding: .75rem;
  }
  .settings-dialog legend {
    font-weight: 700; padding: 0 .35rem;
  }
  .choice-row {
    display: flex; grid-template-columns: none; align-items: flex-start; gap: .55rem; font-weight: 400;
    margin: .55rem 0;
  }
  .choice-row input {
    margin-top: .25rem; width: auto;
  }
  .choice-row span {
    display: grid; gap: .15rem;
  }
  .choice-row small {
    color: #64748b; font-weight: 400;
  }
  .choice-row select {
    margin-top: .35rem;
  }
  .settings-warning {
    background: #fff7ed; border: 1px solid #fed7aa; border-radius: .45rem; color: #9a3412; padding: .65rem;
  }
  .settings-summary {
    background: #f8fafc; border-radius: .45rem; padding: .75rem;
  }
  .settings-dialog-actions {
    display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem;
  }
  .resource-dialog {
    overflow: auto;
  }
  .resource-dialog .resource-editor {
    border: 0; margin: 0; padding: 1.25rem;
  }
  .profile-form {
    max-width: 46rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start;
  }
  .profile-form > label {
    display: grid; gap: .35rem;
  }
  .profile-form > label input {
    box-sizing: border-box; width: 100%;
  }
  .profile-form .form-actions {
    grid-column: 1 / -1;
  }
  .profile-dialog {
    width: min(760px, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); border: 0; border-radius: .8rem;
    padding: 0; box-shadow: 0 20px 70px rgba(15, 23, 42, .3);
  }
  .profile-dialog::backdrop {
    background: rgba(15, 23, 42, .55);
  }
  .profile-dialog form {
    padding: 1.25rem;
  }
  .profile-dialog .modal-header {
    margin-bottom: 1rem;
  }
  .profile-modal-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1rem;
  }
  .profile-modal-grid label {
    display: grid; gap: .3rem; font-weight: 600; margin: .5rem 0;
  }
  .profile-modal-grid input,
  .profile-modal-grid select {
    box-sizing: border-box; width: 100%;
  }
  @media (max-width: 650px) {
    .profile-modal-grid {
      grid-template-columns: 1fr;
    }
  }
  @media (max-width: 650px) {
    .profile-form {
      grid-template-columns: 1fr;
    }
    .profile-form .form-actions {
      grid-column: auto;
    }
  }
  @media (max-width: 900px) {
    .settings-layout,
    .settings-columns {
      grid-template-columns: 1fr;
    }
    .settings-nav {
      position: static;
    }
  }
  .menu-item {
    display: block; transition: background-color 0.2s ease, color 0.2s ease;
  }
  .menu-item:hover,
  .menu-item:focus-visible {
    outline: 2px solid #ffffff;
  }
  .menu-group {
    display: flex; flex-direction: column; gap: 0.45rem;
  }
  .menu-group-toggle {
    width: 100%; display: flex; align-items: center; justify-content: space-between; cursor: pointer;
    text-align: left;
  }
  .menu-group-toggle:hover,
  .menu-group-toggle:focus-visible {
    outline: 2px solid #ffffff;
  }
  .menu-group-caret {
    transition: transform 0.2s ease;
  }
  .menu-group.open .menu-group-caret {
    transform: rotate(0deg);
  }
  .menu-group:not(.open) .menu-group-caret {
    transform: rotate(-90deg);
  }
  .menu-group-items {
    display: none; flex-direction: column; gap: 0.4rem; padding-left: 0.65rem;
  }
  .menu-group.open .menu-group-items {
    display: flex;
  }
  .menu-subitem {
    padding-left: 1.6rem; font-size: 0.97rem;
  }
  .main-content {
    flex: 1; padding: 2rem; min-height: 0; overflow: auto;
  }
  @media (min-width: 901px) {
    .app-body {
      background-color: var(--color-sidebar);
    }
    .main-content {
      background-color: var(--color-background); border-top-left-radius: 1rem;
    }
  }
  .panel {
    background-color: var(--color-surface); border-radius: 1rem; border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); padding: 1.1rem; display: none; flex-direction: column;
    gap: 0.9rem;
  }
  .panel.active {
    display: flex;
  }
  .panel-header {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap;
  }
  .panel-title {
    margin: 0;
  }
  .panel-subtitle {
    margin: 0.2rem 0 0; color: var(--color-text-muted);
  }
  .panel-header-body {
    display: flex; flex-direction: column; gap: 0.5rem; width: 100%;
  }
  .panel-title-row {
    display: flex; align-items: center; gap: 0.5rem;
  }
  .panel-toggle {
    padding: 0.2rem 0.55rem; font-size: 1rem; line-height: 1;
  }
  .panel-button-row {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; width: 100%;
  }
  .panel-button-row .spacer {
    flex: 1 1 auto;
  }
  .home-quick-links-list {
    display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none;
  }
  .home-quick-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
  }
  .home-quick-link .nav-icon {
    flex: 0 0 1.1rem; width: 1.1rem; height: 1.1rem;
  }
  .eyebrow {
    margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--color-text-muted);
  }
  .training-grid,
  .training-placeholder-grid {
    display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 1rem;
  }
  .training-grid-single {
    grid-template-columns: minmax(280px, 520px);
  }
  .training-back-link {
    display: inline-block; margin-bottom: 0.45rem; color: var(--color-primary); text-decoration: none;
  }
  .training-back-link:hover,
  .training-back-link:focus-visible {
    text-decoration: underline;
  }
  .training-management-section {
    display: grid; gap: 0.65rem;
  }
  .training-management-section-heading h3 {
    margin: 0.1rem 0 0;
  }
  .training-management-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem;
  }
  .training-management-grid-single {
    grid-template-columns: minmax(0, 1fr);
  }
  .training-management-card {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  }
  .training-management-card h4 {
    margin: 0 0 0.35rem;
  }
  .training-management-card p {
    max-width: 44rem; margin: 0; color: var(--color-text-muted);
  }
  .training-card h3,
  .training-hero h3 {
    margin: 0 0 0.5rem;
  }
  .training-card p,
  .training-hero p {
    margin: 0;
  }
  .training-card-metrics {
    font-size: 0.78rem; line-height: 1.4; color: var(--color-text-muted);
  }
  .training-progress-bar {
    display: flex; width: 100%; height: 0.8rem; overflow: hidden; border-radius: 999px; background: #f1f5f9;
    border: 1px solid var(--color-border);
  }
  .training-progress-bar-complete {
    display: block; height: 100%; background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
  }
  .training-progress-bar-remaining {
    display: block; height: 100%; background: linear-gradient(90deg, #f87171 0%, #ef4444 100%);
  }
  .training-dashboard {
    display: flex; flex-direction: column; gap: 1rem;
  }
  .training-summary-strip {
    display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.75rem;
  }
  .training-summary-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
  }
  .training-hero {
    border: 1px solid var(--color-border); border-radius: 1rem; padding: 1.25rem;
    background: linear-gradient(135deg, #eef5ff 0%, #ffffff 100%);
  }
  .training-password-panel {
    max-width: 560px;
  }
  .training-account-panel {
    display: grid; gap: 1.5rem; max-width: 620px;
  }
  .training-account-section {
    display: grid; gap: 0.75rem;
  }
  .training-account-section h3 {
    margin: 0;
  }
  .training-password-form {
    max-width: 420px;
  }
  .training-module-list {
    display: grid;
  }
  .training-stack {
    display: grid; gap: 1rem;
  }
  .training-module-list {
    gap: 0.7rem;
  }
  .training-module-group {
    display: grid; gap: 0.35rem;
  }
  .training-module-group-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; padding: 0;
    border: 0; background: transparent; text-align: left; font: inherit; font-weight: 700; cursor: pointer;
    list-style: none;
  }
  .training-module-group-toggle span:first-child {
    min-width: 0;
  }
  .training-module-group-meta-inline {
    color: var(--color-text-muted); font-weight: 600;
  }
  .training-module-group-toggle::-webkit-details-marker {
    display: none;
  }
  .training-module-group[open] .training-module-group-toggle::after {
    content: "▾"; font-size: 0.9rem; color: var(--color-text-muted);
  }
  .training-module-group:not([open]) .training-module-group-toggle::after {
    content: "▸";
  }
  .training-module-group-content {
    display: grid; gap: 0.45rem;
  }
  .training-module-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem;
    border: 1px solid var(--color-border); border-radius: 0.9rem; padding: 0.4rem 0.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  }
  .training-module-row-copy {
    display: grid; gap: 0.2rem; min-width: 0;
  }
  .training-module-row-title,
  .training-module-row-summary,
  .training-module-status {
    margin: 0;
  }
  .training-module-status-stack {
    display: grid; justify-items: center; gap: 0.05rem;
  }
  .training-module-row-title {
    font-size: 1.05rem; line-height: 1.2;
  }
  .training-module-row-summary {
    color: var(--color-text-muted); min-width: 0; line-height: 1.3; text-wrap: balance;
  }
  .training-module-row-actions {
    display: flex; align-items: center; gap: 0.75rem; justify-content: flex-end;
  }
  .training-module-row-actions .training-inline-actions {
    flex-wrap: nowrap;
  }
  .training-module-status {
    font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  }
  .training-module-status-assigned {
    color: #c92a2a;
  }
  .training-module-status-review {
    color: #2b8a3e;
  }
  .training-module-required-badge {
    color: #c92a2a; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em; line-height: 1;
    text-transform: uppercase;
  }
  .training-manager-strip,
  .training-inline-actions,
  .training-section-header {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  }
  .training-module-form {
    display: grid; gap: 1rem;
  }
  .training-report-grid {
    display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 320px));
    justify-content: start;
  }
  .training-editor-section {
    border: 1px solid var(--color-border); border-radius: 0.9rem; padding: 1rem; background: #fff; display: grid;
    gap: 0.75rem;
  }
  .training-editor-section[hidden] {
    display: none !important;
  }
  .training-report-shell {
    gap: 0; padding: 0; overflow: hidden;
  }
  .training-report-tabs {
    display: flex; align-items: flex-end; gap: 0.25rem; padding: 0.75rem 0.75rem 0;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  }
  .training-report-tab {
    border-bottom: none; border-top-left-radius: 0.7rem; border-top-right-radius: 0.7rem; cursor: pointer;
    margin-bottom: -1px;
  }
  .training-report-tab.active {
    border-bottom: 1px solid #ffffff;
  }
  .training-report-tab:focus-visible {
    outline: none;
  }
  .training-report-tab-panels {
    border-top: 1px solid var(--color-border); padding: 1rem; background: #ffffff;
  }
  .training-report-panel {
    min-width: 0;
  }
  .training-feedback-aggregate {
    border: 1px solid var(--color-border); border-radius: 0.75rem; background: #f8fbff; overflow: hidden;
  }
  .training-feedback-aggregate summary {
    padding: 0.7rem 0.9rem; color: var(--color-text); font-weight: 700; cursor: pointer;
  }
  .training-feedback-aggregate[open] summary {
    border-bottom: 1px solid var(--color-border);
  }
  .training-feedback-aggregate-summary {
    display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0.65rem 0.9rem 0;
  }
  .training-feedback-aggregate .table-container {
    margin: 0.65rem 0.9rem 0.9rem;
  }
  .training-answer-review-modal {
    width: min(900px, calc(100vw - 2rem)); max-height: min(800px, calc(100vh - 2rem)); overflow: auto;
  }
  .training-report-panel[hidden],
  .training-stack[hidden] {
    display: none !important;
  }
  .training-transcript-module-controls,
  .training-transcript-bulk-actions {
    display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap;
  }
  .training-report-toolbar {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  }
  .training-report-toolbar-copy {
    display: grid; gap: 0.35rem;
  }
  .training-report-toolbar-copy h3,
  .training-report-toolbar-copy p {
    margin: 0;
  }
  .training-report-toolbar-copy p {
    color: var(--color-text-muted);
  }
  .training-report-toolbar-actions {
    display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap;
  }
  .training-report-filter,
  .training-report-filter select {
    min-width: min(100%, 320px);
  }
  .training-report-link {
    cursor: pointer;
  }
  .training-report-link:focus-visible {
    outline: none;
  }
  .training-report-pill-link {
    cursor: pointer;
  }
  .training-store-summary-card {
    width: 100%; text-align: left; cursor: pointer;
  }
  @media (max-width: 720px) {
    .training-report-tabs {
      overflow-x: auto; padding-bottom: 0.1rem;
    }
    .training-transcript-module-controls,
    .training-transcript-bulk-actions,
    .training-report-toolbar-actions,
    .training-report-filter,
    .training-report-filter select {
      width: 100%; min-width: 0;
    }
  }
  .training-pass-rule {
    border: 1px solid var(--color-border); border-radius: 0.85rem; padding: 0.9rem 1rem;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%); display: grid; gap: 0.45rem; max-width: 360px;
  }
  .training-editor-card,
  .training-question-card,
  .training-result-card {
    border: 1px solid var(--color-border); border-radius: 0.75rem; padding: 0.9rem; background: #fbfcfe;
  }
  .training-checkbox-list {
    display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .training-checkbox-row,
  .training-choice-row {
    display: flex; align-items: flex-start; gap: 0.55rem;
  }
  .training-assignment-flags {
    white-space: nowrap;
  }
  .training-assignment-flags .training-checkbox-row {
    display: inline-flex; align-items: center; margin-right: 0.85rem;
  }
  .training-assignment-flags .training-checkbox-row:last-child {
    margin-right: 0;
  }
  .training-choice-editor {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.5rem; align-items: center;
  }
  .training-module-detail,
  .training-module-body,
  .training-quiz-form,
  .training-quiz-shell {
    display: grid; gap: 1rem;
  }
  .training-media-shell {
    display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; width: 100%; min-width: 0;
  }
  .training-media-frame {
    width: min(100%, 960px); aspect-ratio: 16 / 9; min-height: 0; border: 1px solid var(--color-border);
    border-radius: 0.75rem; background: #000; display: block;
  }
  .training-media-embed {
    position: relative; width: min(100%, 960px); max-width: 100%; aspect-ratio: 16 / 9; min-width: 0;
    border: 1px solid var(--color-border); border-radius: 0.75rem; background: #000;
  }
  .training-media-embed-frame {
    position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; border-radius: inherit;
  }
  .training-media-embed-drive.use-desktop-player .training-media-embed-frame {
    width: 640px; height: 360px; transform: scale(var(--training-drive-player-scale)); transform-origin: top left;
  }
  .training-media-image {
    max-width: 100%; border-radius: 0.75rem; border: 1px solid var(--color-border);
  }
  .training-question-image {
    max-width: min(100%, 720px); border-radius: 0.75rem; border: 1px solid var(--color-border); display: block;
  }
  .training-question-image-meta {
    display: grid; gap: 0.4rem; padding: 0.8rem; border: 1px dashed #9bb8dd; border-radius: 0.75rem;
    background: linear-gradient(180deg, #f6faff 0%, #ffffff 100%);
  }
  .training-question-image-meta p {
    margin: 0;
  }
  .training-question-image-name,
  .training-image-title,
  .training-image-current-path {
    font-weight: 700;
  }
  .training-image-title {
    max-width: 100%; word-break: break-word; overflow-wrap: anywhere; line-height: 1.2;
  }
  .training-image-manager-content {
    width: min(1100px, calc(100vw - 2rem));
  }
  .training-image-manager-body,
  .training-image-manager-main {
    display: grid; gap: 1rem;
  }
  .training-image-toolbar {
    display: flex; align-items: center; justify-content: flex-start; gap: 1rem; flex-wrap: wrap;
  }
  .training-image-breadcrumbs {
    display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap;
  }
  .training-image-breadcrumb-button {
    border: none; background: transparent; padding: 0; color: var(--color-primary); font-weight: 600;
    cursor: pointer;
  }
  .training-image-breadcrumb-button.active {
    color: var(--color-text); cursor: default;
  }
  .training-image-breadcrumb-sep {
    color: var(--color-text-muted);
  }
  .training-image-manager-actions {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 0.85rem 1rem; border: 1px solid var(--color-border); border-radius: 0.8rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  }
  .training-image-browser-grid {
    display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(132px, 132px)); align-content: start;
    max-height: 32rem; overflow-y: auto; padding-right: 0.25rem; overscroll-behavior: contain;
  }
  .training-browser-tile {
    display: grid; gap: 0.45rem; border: 1px solid var(--color-border); border-radius: 0.8rem; padding: 0.45rem;
    background: #fbfcfe; cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; width: 132px;
    justify-items: center; text-align: center;
  }
  .training-browser-tile:hover {
    transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  }
  .training-browser-tile.selected {
    border-color: #2c7be5; box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.16);
  }
  .training-browser-tile.drag-over {
    border-color: #2f9e44; box-shadow: 0 0 0 3px rgba(47, 158, 68, 0.16);
  }
  .training-browser-tile.dragging {
    opacity: 0.55;
  }
  .training-browser-folder {
    align-content: start; min-height: 150px; background: linear-gradient(180deg, #fffdf4 0%, #fff 100%);
  }
  .training-browser-folder-icon {
    width: 76px; height: 56px; border-radius: 0.8rem 0.8rem 0.8rem 0.35rem;
    background: linear-gradient(180deg, #ffd86b 0%, #f6b93b 100%); position: relative;
  }
  .training-browser-folder-icon::before {
    content: ""; position: absolute; top: -10px; left: 8px; width: 32px; height: 14px;
    border-radius: 0.45rem 0.45rem 0 0; background: #ffd86b;
  }
  .training-image-thumb {
    width: 76px; height: 56px; object-fit: cover; border-radius: 0.7rem; border: 1px solid var(--color-border);
    background: #fff;
  }
  .training-resource-grid {
    display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 170px)); justify-content: start;
  }
  .training-resource-card {
    border: 1px solid var(--color-border); border-radius: 0.9rem; padding: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%); aspect-ratio: 1 / 1; display: flex;
    flex-direction: column; justify-content: space-between; gap: 0.75rem;
  }
  .training-resource-card h4 {
    margin: 0;
  }
  .training-resource-card .training-inline-link {
    align-self: flex-start;
  }
  .training-resource-card-link {
    text-decoration: none;
  }
  .training-resource-card-action {
    border-color: #8fbaf0; background: linear-gradient(180deg, #3d8bfd 0%, #1f7ae0 100%); color: #ffffff;
  }
  .training-feedback-panel {
    width: min(100%, 728px); margin-top: 0.75rem; box-sizing: border-box;
  }
  .training-resource-card-action .eyebrow,
  .training-resource-card-action h4 {
    color: #ffffff;
  }
  .training-resource-card-link:hover,
  .training-resource-card-link:focus-visible {
    text-decoration: none; box-shadow: 0 0 0 3px rgba(31, 122, 224, 0.2);
  }
  .training-rich-content {
    display: grid; gap: 0.75rem;
  }
  .training-rich-content > *:first-child {
    margin-top: 0;
  }
  .training-short-answer,
  .training-choice-editor input[type="text"],
  .training-editor-card textarea,
  .training-editor-section textarea {
    width: 100%;
  }
  .training-module-form select,
  #training-module-state {
    display: block; width: 100%; inline-size: 100%; min-width: 100%; max-width: none;
  }
  .training-feedback-question {
    border: 1px solid #cbd5e1; border-radius: 6px; padding: 0.6rem 0.75rem;
  }
  .training-feedback-question legend {
    font-weight: 600; padding: 0 .25rem;
  }
  .training-feedback-scale {
    display: flex; gap: 1rem; align-items: center;
  }
  .training-feedback-scale-row {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  }
  .training-feedback-endpoint {
    white-space: nowrap;
  }
  .training-feedback-fields {
    display: grid; grid-template-columns: minmax(280px, 2fr) minmax(180px, 1fr) minmax(180px, 1fr); gap: 0.75rem;
    align-items: end;
  }
  #training-feedback-questions-list .training-editor-card {
    padding-top: 0;
  }
  #training-feedback-questions-list .training-inline-actions h4 {
    margin: 0;
  }
  .training-feedback-prompt-field,
  .training-feedback-label-field {
    min-width: 0; display: flex; align-items: center; gap: 0.35rem; white-space: nowrap;
  }
  .training-feedback-prompt,
  .training-feedback-label-field input {
    width: 100%; box-sizing: border-box;
  }
  .training-feedback-label-field input {
    min-width: 0; flex: 1;
  }
  @media (max-width: 620px) {
    .training-feedback-fields {
      grid-template-columns: 1fr;
    }
  }
  .training-result-card.passed {
    border-color: #2f9e44; background: #edf9f0;
  }
  .training-result-card.failed {
    border-color: #d64545; background: #fff5f5;
  }
  .training-inline-link-row {
    margin: 0;
  }
  .training-inline-link {
    appearance: none; cursor: pointer;
  }
  .print-jobs-top-grid {
    display: grid; grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr) minmax(220px, 1fr);
    gap: 0.75rem 1rem; align-items: start;
  }
  .print-jobs-top-left,
  .print-jobs-top-right {
    display: flex; flex-direction: column; gap: 0.6rem;
  }
  .print-jobs-top-left {
    grid-column: 1 / span 2;
  }
  .print-jobs-top-right {
    grid-column: 3; justify-self: end; align-items: flex-end; text-align: right;
  }
  .issue-tracker-top-grid {
    grid-template-columns: minmax(240px, 1fr) minmax(220px, auto);
  }
  .issue-tracker-top-grid .print-jobs-top-left {
    grid-column: 1;
  }
  .issue-tracker-top-grid .print-jobs-top-right {
    grid-column: 2;
  }
  .print-jobs-top-left .search-input {
    min-width: 320px;
  }
  .print-jobs-top-center {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.4rem;
    padding-top: 0.1rem;
  }
  .print-team-label {
    margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--color-text);
  }
  .print-team-list {
    display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 0.35rem 0.6rem;
    min-height: 1.2rem;
  }
  .print-team-name {
    padding: 0.15rem 0.55rem; border-radius: 999px; background-color: #eef2f7;
    border: 1px solid var(--color-border); font-size: 0.85rem; font-weight: 600; color: var(--color-text);
  }
  @media (max-width: 900px) {
    .training-module-row {
      grid-template-columns: 1fr; align-items: flex-start;
    }
    .training-module-row-copy {
      order: 2;
    }
    .training-module-row-actions {
      order: 3; justify-content: flex-start;
    }
    .training-module-row-actions .training-inline-actions {
      flex-wrap: wrap;
    }
    .print-jobs-top-grid {
      grid-template-columns: 1fr; width: 100%; max-width: 320px;
    }
    .print-jobs-top-center {
      align-items: flex-start; text-align: left;
    }
    .print-team-list {
      justify-content: flex-start;
    }
    .print-jobs-top-left .search-input {
      min-width: 0; width: 100%;
    }
    .print-jobs-top-right {
      align-items: flex-start; text-align: left; margin-top: 1rem;
    }
    .print-jobs-top-grid .toolbar-left,
    .print-jobs-top-grid .toolbar-right,
    .print-jobs-top-grid .print-jobs-actions-right {
      width: 100%; justify-content: flex-start; flex-wrap: wrap;
    }
  }
  .inventory-header {
    gap: 0.75rem;
  }
  .inventory-title-row {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  }
  .inventory-location-inline {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  }
  .inventory-location-row {
    margin-bottom: 0.35rem;
  }
  .inventory-button-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem 1rem; align-items: start;
    margin-top: 0.35rem;
  }
  .inventory-grid-left,
  .inventory-grid-right {
    display: flex; flex-direction: column; gap: 0.6rem;
  }
  .inventory-grid-row {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  }
  .inventory-grid-row .search-input {
    min-width: 320px; flex: 1 1 360px;
  }
  .inventory-grid-row.right {
    justify-content: flex-end;
  }
  .inventory-transfer-toolbar {
    margin-top: 0.25rem;
  }
  .panel-actions {
    display: flex; align-items: center; gap: 0.5rem;
  }
  .panel-actions-inline {
    justify-content: flex-end; margin: 0.25rem 0 0.75rem;
  }
  .panel-actions-left {
    justify-content: flex-start;
  }
  .panel-body {
    width: 100%;
  }
  .panel-collapsed .panel-body,
  .panel-collapsed .panel-subtitle,
  .panel-collapsed .panel-actions {
    display: none;
  }
  .employees-layout {
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem;
  }
  @media (max-width: 900px) {
    .employees-layout {
      grid-template-columns: 1fr;
    }
  }
  .data-table {
    width: 100%; border-collapse: collapse;
  }
  .data-table th,
  .data-table td {
    padding: 0.5rem; border-bottom: 1px solid var(--color-border); text-align: left;
  }
  .data-table tbody tr {
    cursor: pointer;
  }
  .data-table tbody tr:hover {
    background-color: #f8fafc;
  }
  .editable-table-container {
    overflow-x: auto;
  }
  .editable-table {
    width: 100%; border-collapse: collapse; min-width: 420px;
  }
  .editable-table thead th {
    text-align: left; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); padding-bottom: 0.35rem;
  }
  .editable-table thead th.actions-col {
    text-align: right;
  }
  .editable-table tbody td {
    padding: 0.4rem 0.35rem 0.4rem 0; border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  }
  .editable-table tbody td:last-child {
    padding-right: 0;
  }
  .editable-table input {
    width: 100%;
  }
  .editable-table input:focus {
    outline: 2px solid rgba(59, 130, 246, 0.35); outline-offset: 1px;
  }
  .actions-col {
    text-align: right; white-space: nowrap; min-width: 150px;
  }
  #training-accounts-table th.training-account-checkbox-column,
  #training-accounts-table td.training-account-checkbox-column,
  #training-accounts-table th.training-account-reset-column,
  #training-accounts-table td.training-account-reset-column {
    text-align: center;
  }
  #training-accounts-table th.training-account-actions-column {
    text-align: left;
  }
  #training-accounts-table th.training-account-transcript-column,
  #training-accounts-table td.training-account-transcript-column {
    text-align: center; white-space: nowrap;
  }
  #training-accounts-table td.training-account-transcript-column {
    vertical-align: middle;
  }
  .action-steps-table th.actions-col {
    text-align: right;
  }
  .qa-rules-table td:last-child {
    display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; min-width: 150px; text-align: right;
  }
  .qa-rules-table th:nth-child(1),
  .qa-rules-table td:nth-child(1) {
    width: 22%;
  }
  .qa-rules-table th:nth-child(2),
  .qa-rules-table td:nth-child(2),
  .qa-rules-table th:nth-child(3),
  .qa-rules-table td:nth-child(3) {
    width: 12%;
  }
  .qa-rules-table th:nth-child(4),
  .qa-rules-table td:nth-child(4) {
    width: 34%;
  }
  .qa-rules-table th:nth-child(5),
  .qa-rules-table td:nth-child(5) {
    width: 20%;
  }
  .actions-col.double {
    display: flex; gap: 0.4rem; justify-content: flex-start;
  }
  .training-account-error-row td {
    color: var(--color-danger); font-size: 0.85rem; padding-top: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  }
  .sortable {
    cursor: pointer; user-select: none; position: relative; padding-right: 1rem;
  }
  .sortable::after {
    content: ""; position: absolute; right: 0.2rem; top: 55%; width: 0; height: 0;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 6px solid rgba(15, 23, 42, 0.3); transform: translateY(-50%) rotate(180deg);
  }
  .sortable[aria-sort="ascending"]::after {
    border-top-color: rgba(59, 130, 246, 0.85); transform: translateY(-50%) rotate(180deg);
  }
  .sortable[aria-sort="descending"]::after {
    border-top-color: rgba(59, 130, 246, 0.85); transform: translateY(-50%) rotate(0deg);
  }
  .table-footer-actions {
    margin-top: 0.6rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
    flex-wrap: wrap;
  }
  .table-footer-left,
  .table-footer-right {
    display: flex; gap: 0.45rem; flex-wrap: wrap;
  }
  .admin-users-panel {
    width: 100%; max-width: 100%; margin-left: 0;
  }
  .admin-actions-panel .panel-actions {
    flex-wrap: wrap; justify-content: flex-start;
  }
  .admin-contact-tags-add-row {
    display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; max-width: 32rem;
  }
  .admin-contact-tags-add-row input {
    flex: 1; min-width: 12rem;
  }
  .admin-contact-tags-table {
    max-width: 48rem;
  }
  .admin-contact-tags-table th:nth-child(2),
  .admin-contact-tags-count {
    text-align: center; width: 7rem;
  }
  .admin-contact-tags-table td.actions-col.double {
    justify-content: flex-end;
  }
  .print-job-actions-list {
    display: flex; flex-direction: column; gap: 0.85rem;
  }
  .action-event-card {
    border: 1px solid #c8d3df; border-radius: 0.6rem; padding: 0.6rem; background-color: #f7f9fc; display: flex;
    flex-direction: column; gap: 0.6rem;
  }
  .action-event-header {
    display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
  }
  .action-event-toggle {
    padding: 0.2rem 0.55rem; font-size: 1rem; line-height: 1;
  }
  .action-event-print-toggle {
    width: 18px; height: 18px;
  }
  .action-event-print-label {
    display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--color-text-muted);
  }
  .action-event-name {
    min-width: 200px; flex: 1 1 240px; padding: 0.3rem 0.45rem; border: 1px solid var(--color-border);
    border-radius: 0.4rem;
  }
  .action-event-active-label {
    display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.9rem;
  }
  .action-steps-table {
    width: 100%;
  }
  .action-event-footer {
    display: flex; gap: 0.5rem;
  }
  .action-order-cell {
    width: 2.5rem; text-align: center;
  }
  .action-steps-table thead th,
  .action-steps-table tbody td {
    padding: 0.3rem 0.3rem 0.3rem 0;
  }
  .action-event-body {
    display: block; padding: 0.75rem; border: 1px solid #c4ceda; border-radius: 0.55rem; background-color: #d8dee8;
  }
  .action-event-collapsed .action-event-body {
    display: none;
  }
  .action-value-input {
    width: 100%; min-width: 160px; padding: 0.35rem 0.5rem; border: 1px solid var(--color-border);
    border-radius: 0.4rem;
  }
  .panel-toolbar {
    display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  }
  .toolbar-left,
  .toolbar-right {
    display: flex; align-items: center; gap: 0.5rem;
  }
  .print-jobs-search-scope {
    display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; cursor: pointer;
    user-select: none;
  }
  .print-jobs-search-scope input {
    position: absolute; opacity: 0; pointer-events: none;
  }
  .print-jobs-search-scope-track {
    position: relative; display: inline-block; width: 2rem; height: 1.1rem; border: 1px solid var(--color-border);
    border-radius: 999px; background: #c4ceda; transition: background-color 0.15s ease;
  }
  .print-jobs-search-scope-track::after {
    position: absolute; top: 0.12rem; left: 0.12rem; width: 0.74rem; height: 0.74rem; border-radius: 50%;
    background: #ffffff; content: ""; transition: transform 0.15s ease;
  }
  .print-jobs-search-scope input:checked + .print-jobs-search-scope-track {
    background: var(--color-primary);
  }
  .print-jobs-search-scope input:checked + .print-jobs-search-scope-track::after {
    transform: translateX(0.9rem);
  }
  .print-jobs-search-scope input:focus-visible + .print-jobs-search-scope-track {
    outline: 2px solid var(--color-primary); outline-offset: 2px;
  }
  .print-jobs-search-scope-label {
    min-width: 4.2rem; font-size: 0.85rem; font-weight: 600;
  }
  .active-tag-filters {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem; margin: 0.15rem 0 0.45rem;
  }
  .active-tag-filter-chip {
    border: 1px solid #d8cfc2; border-radius: 0.25rem; background: #eee9df; color: #2d3748; cursor: pointer;
    font-size: 0.76rem; font-weight: 700; line-height: 1.15; padding: 0.16rem 0.36rem;
  }
  .active-tag-filter-chip:hover,
  .active-tag-filter-chip:focus-visible,
  #tag-filter-btn.active {
    border-color: var(--color-primary); background: #eef6ff; color: var(--color-primary);
  }
  .search-input {
    min-width: 240px; transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .search-input:focus-visible {
    outline: none;
  }
  .select-input {
    min-width: 160px;
  }
  .select-input:focus-visible {
    outline: none;
  }
  .table-container {
    overflow-x: auto;
  }
  .scrollable-table-container {
    max-height: 70vh; overflow-x: auto; overflow-y: auto; position: relative;
  }
  .scrollable-table-container thead th {
    position: sticky; top: 0; z-index: 2;
  }
  table {
    width: 100%; border-collapse: collapse; min-width: 700px;
  }
  .print-jobs-page-top {
    display: grid; gap: 1rem;
  }
  .print-jobs-duty-card {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; max-width: 100%;
  }
  .inline-checkbox {
    display: inline-flex; align-items: center; gap: 0.45rem; margin-right: 1rem; margin-bottom: 0.45rem;
  }
  .stack-list {
    display: grid; gap: 1rem;
  }
  .action-visibility-block {
    margin-top: 0.55rem; margin-bottom: 0.85rem;
  }
  .qa-visibility-group,
  .qa-steps-group {
    border: 1px solid #b9cbe0; border-radius: 0.6rem; padding: 0.6rem; background-color: #f5f9ff;
  }
  .tab-manage-row {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem;
    border: 1px solid var(--color-border); border-radius: 0.55rem; background: #fff;
  }
  .tab-manage-order {
    width: 1.5rem; font-size: 0.82rem; font-weight: 700; color: var(--color-text-muted); text-align: center;
  }
  .tab-manage-name {
    flex: 1 1 auto; font-weight: 600; color: var(--color-text);
  }
  .tab-manage-actions {
    display: flex; align-items: center; gap: 0.45rem;
  }
  .editable-field-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem;
  }
  .editable-field-option {
    display: flex; align-items: flex-start; gap: 0.55rem; padding: 0.55rem 0.65rem;
    border: 1px solid var(--color-border); border-radius: 0.55rem; background: #fff;
  }
  .editable-field-option-copy {
    display: grid; gap: 0.12rem;
  }
  .editable-field-option-name {
    font-weight: 600; color: var(--color-text);
  }
  .editable-field-option-type {
    font-size: 0.78rem; color: var(--color-text-muted); text-transform: uppercase;
  }
  .editable-fields-list {
    display: grid; gap: 0.85rem;
  }
  .editable-field-block {
    display: grid; gap: 0.35rem;
  }
  .issue-tracker-modal #print-jobs-editable-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.75rem; max-width: 760px;
  }
  #print-jobs-editable-fields-section .panel-button-row {
    margin-top: 0.65rem;
  }
  .editable-multi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.45rem 0.7rem;
    padding: 0.75rem; border: 1px solid var(--color-border); border-radius: 0.6rem; background: #fbfcfe;
  }
  .editable-multi-option {
    display: flex; align-items: center; gap: 0.45rem;
  }
  .issue-detail-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem;
  }
  .issue-detail-field {
    padding: 0.45rem 0.55rem; border: 1px solid var(--color-border); border-radius: 0.4rem; background: #fbfcfe;
  }
  .issue-detail-label {
    display: block; margin-bottom: 0.2rem; color: var(--color-text-muted); font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase;
  }
  .issue-detail-value {
    display: block; color: var(--color-text); font-size: 0.84rem; white-space: pre-wrap; overflow-wrap: anywhere;
  }
  .issue-tracker-modal #print-jobs-issue-status {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
  .issue-tracker-modal #print-jobs-detail-fields-section h4 {
    margin-top: 0;
  }
  @media (max-width: 700px) {
    .issue-detail-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 480px) {
    .issue-detail-grid,
    .issue-tracker-modal #print-jobs-issue-status {
      grid-template-columns: 1fr;
    }
  }
  @media (max-width: 700px) {
    .issue-tracker-modal #print-jobs-editable-fields {
      grid-template-columns: 1fr;
    }
  }
  .action-visibility-block summary {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; cursor: pointer;
    font-weight: 600; color: var(--color-text); user-select: none;
  }
  .qa-visibility-group summary {
    margin: -0.1rem 0;
  }
  .action-visibility-summary-actions {
    display: inline-flex; align-items: center; gap: 0.35rem; margin-left: auto;
  }
  .qa-visibility-groups {
    display: grid; gap: 0.8rem;
  }
  .qa-visibility-group-body {
    display: grid; gap: 0.8rem; padding-top: 0.75rem;
  }
  .qa-rules-table thead th {
    background-color: #ddecff; padding-top: 0.35rem; padding-left: 0.35rem;
  }
  .qa-rule-groups {
    display: grid; gap: 0.7rem;
  }
  .qa-rule-group {
    display: grid; gap: 0.55rem; min-width: 0; padding: 0.65rem; border: 1px solid #cbd9e8; border-radius: 0.55rem;
    background-color: #ffffff;
  }
  .qa-rule-group-header {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
  }
  .qa-rule-group-title {
    display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap;
  }
  .qa-rule-group-title .form-label {
    margin: 0;
  }
  .qa-rule-group-match-mode {
    min-width: 12rem;
  }
  .qa-rule-section {
    display: grid; gap: 0.45rem;
  }
  .qa-rule-section-title {
    margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--color-text);
  }
  .qa-visibility-group-name {
    width: 100%;
  }
  .qa-rules-table select,
  .qa-rules-table input {
    max-width: 100%;
  }
  @media (max-width: 1100px) {
    .qa-rules-table {
      min-width: 0;
    }
    .qa-rules-table thead {
      display: none;
    }
    .qa-rules-table,
    .qa-rules-table tbody {
      display: block; width: 100%;
    }
    .qa-rules-table tr {
      width: 100%;
    }
    .qa-rules-table td {
      display: block; width: 100%;
    }
    .qa-rules-table th:nth-child(n),
    .qa-rules-table td:nth-child(n) {
      width: auto;
    }
    .qa-rules-table tr {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 0.45rem;
      padding: 0.55rem 0; border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    }
    .qa-rules-table tbody td {
      min-width: 0; padding: 0; border-bottom: 0;
    }
    .qa-rules-table tbody td:last-child {
      grid-column: 1 / -1; min-width: 0; justify-content: flex-start;
    }
    .qa-rules-table select,
    .qa-rules-table input {
      width: 100%; min-width: 0;
    }
  }
  @media (max-width: 720px) {
    .qa-rules-table tr {
      grid-template-columns: 1fr;
    }
    .qa-rules-table tbody td:last-child {
      justify-content: flex-start;
    }
  }
  .collapsible-section-body {
    padding-top: 0.6rem;
  }
  .qa-card-title-wrap {
    flex: 1 1 260px; min-width: 0;
  }
  .qa-card-title {
    margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--color-text);
  }
  .qa-card-subtitle {
    margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis;
  }
  .qa-card-badge {
    display: inline-flex; align-items: center; border-radius: 999px; padding: 0.15rem 0.5rem; font-size: 0.78rem;
    font-weight: 700; border: 1px solid var(--color-border);
  }
  .qa-card-badge.active {
    background: #e8f7ec; color: #1f6b3b; border-color: #b7e0c2;
  }
  .action-import-panel {
    display: grid; gap: 0.85rem; padding: 0.9rem; margin-bottom: 1rem; border: 1px solid var(--color-border);
    border-radius: 0.65rem; background: #f8fafc;
  }
  .import-preview-card {
    display: grid; gap: 0.75rem; padding: 0.85rem; border: 1px solid var(--color-border); border-radius: 0.6rem;
    background: #fff;
  }
  .import-preview-grid {
    display: grid; gap: 0.75rem;
  }
  .import-mapping-row {
    display: grid; gap: 0.35rem; padding: 0.65rem 0.75rem; border: 1px solid var(--color-border);
    border-radius: 0.55rem; background: #fff;
  }
  .import-mapping-meta {
    font-size: 0.83rem; color: var(--color-text-muted);
  }
  .import-mapping-row.needs-attention,
  .import-preview-card.needs-attention {
    border-color: #d97706; background: #fff8eb;
  }
  .qa-card-badge.inactive {
    background: #f3f4f6; color: #6b7280;
  }
  .qa-top-layout {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr); gap: 0.9rem 1.2rem;
    align-items: start;
  }
  .qa-top-fields {
    display: grid; gap: 0.6rem; min-width: 0;
  }
  .qa-top-fields input {
    width: 100%;
  }
  .qa-success-wrap input {
    min-width: 0;
  }
  .qa-top-toggles {
    display: grid; gap: 0.45rem; align-content: start; padding-top: 1.45rem;
  }
  .qa-top-toggles .inline-checkbox {
    margin-right: 0; margin-bottom: 0;
  }
  @media (max-width: 900px) {
    .qa-top-layout {
      grid-template-columns: 1fr;
    }
    .qa-top-toggles {
      padding-top: 0;
    }
  }
  th,
  td {
    padding: 0.45rem 0.55rem; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top;
  }
  th {
    font-weight: 600; color: var(--color-text-muted); background-color: #f0f4f8; position: relative;
  }
  .notes-cell {
    font-size: 0.85rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis;
  }
  th.phone-col,
  td.phone-col {
    min-width: 220px;
  }
  th.wide-col,
  td.wide-col {
    min-width: 240px;
  }
  .location-col {
    min-width: 360px;
  }
  .notes-col {
    min-width: 260px;
  }
  tbody tr {
    transition: background-color 0.2s ease;
  }
  tbody tr:hover {
    background-color: #f8fafc;
  }
  tbody tr.selected {
    background-color: #e3f2fd;
  }
  #customers-table tbody tr {
    cursor: pointer;
  }
  #customers-table tbody tr .select-col {
    cursor: default;
  }
  tbody .empty-row td {
    text-align: center; color: var(--color-text-muted);
  }
  .select-col {
    width: 42px; min-width: 42px; max-width: 60px; text-align: center;
  }
  input[type="radio"],
  input[type="checkbox"] {
    width: 18px; cursor: pointer;
  }
  .form-row {
    display: flex; flex-direction: column; gap: 0.2rem;
  }
  .form-row label {
    font-weight: 600; color: var(--color-text-muted);
  }
  .form-row.dual {
    flex-direction: row; gap: 0.75rem;
  }
  .form-row.dual > div {
    flex: 1; display: flex; flex-direction: column; gap: 0.2rem;
  }
  .form-row input,
  .form-row textarea,
  .form-row select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .field-value {
    border: 1px solid var(--color-border); border-radius: 0.5rem; padding: 0.5rem 0.65rem;
    background-color: #f9fafb; min-height: 2.5rem; display: flex; align-items: center; width: 100%;
    line-height: 1.4;
  }
  .field-value.multiline {
    min-height: 6rem; align-items: flex-start; white-space: pre-wrap;
  }
  .field-value.empty {
    color: var(--color-text-muted); font-style: italic;
  }
  .form-row input:focus-visible,
  .form-row textarea:focus-visible,
  .form-row select:focus-visible {
    outline: none;
  }
  .form-row.checkbox-row {
    flex-direction: row; align-items: center; gap: 0.5rem;
  }
  .form-row.checkbox-row label {
    margin: 0; font-weight: 600; color: var(--color-text-muted);
  }
  .form-row.checkbox-row input[type="checkbox"] {
    width: 18px;
  }
  .button-row {
    display: flex; flex-direction: row; gap: 0.5rem; flex-wrap: wrap;
  }
  .form-row.button-row {
    align-items: center; justify-content: flex-end;
  }
  .button-row.split-buttons {
    justify-content: center;
  }
  .form-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem;
  }
  .form-grid.customer-details-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
  @media (min-width: 1024px) {
    .form-grid.customer-details-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }
  .form-grid.two-column {
    grid-template-columns: 1fr; align-items: start;
  }
  @media (min-width: 960px) {
    .form-grid.two-column {
      grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    }
  }
  .form-card {
    display: flex; flex-direction: column; gap: 0.9rem;
  }
  .form-card.full-width {
    grid-column: 1 / -1;
  }
  .form-card-split {
    display: flex; gap: 1rem; flex-wrap: wrap; grid-column: 1 / -1;
  }
  .form-card-split .form-card {
    flex: 1 1 320px; margin: 0;
  }
  .form-card.notes-card .form-row {
    flex: 1; display: flex; flex-direction: column;
  }
  .form-card.notes-card textarea {
    flex: 1;
  }
  .inline-label {
    margin-left: 0.75rem; margin-right: 0.35rem;
  }
  .transfer-controls {
    display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem;
  }
  .inventory-actions {
    display: flex; gap: 0.35rem; flex-wrap: nowrap;
  }
  .inventory-actions .btn-xs {
    white-space: nowrap;
  }
  .inventory-actions .btn-xxs {
    white-space: nowrap; font-size: 10px; padding: 0.2rem 0.4rem;
  }
  .btn-xxs {
    padding: 0.2rem 0.4rem; font-size: 10px;
  }
  .inventory-actions-cell {
    width: 110px;
  }
  #inventory-table {
    font-size: 12px;
  }
  #inventory-table th {
    vertical-align: middle;
  }
  #inventory-table th span {
    display: block; line-height: 1.05; margin: 0; padding: 0;
  }
  .input-compact {
    width: 90px;
  }
  .small-table table {
    width: 100%;
  }
  .subpanel {
    margin-top: 1.25rem; border: 1px solid var(--color-border); border-radius: 0.85rem; padding: 1rem 1.1rem;
    background: #f9fbff;
  }
  .subpanel-header {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  }
  .session-meta {
    display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap;
    margin-bottom: 0.75rem;
  }
  .totals-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.9rem; margin-bottom: 1rem;
  }
  .metric-value {
    font-size: 1.4rem; font-weight: 700; color: var(--color-text);
  }
  .active-row {
    background: #eef4ff;
  }
  #inventory-location-form {
    display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;
  }
  #inventory-location-name {
    flex: 1;
  }
  #inventory-location-form .form-label {
    margin: 0; min-width: 110px;
  }
  @media (min-width: 960px) {
    .customer-orders-card {
      box-sizing: border-box;
    }
  }
  .customer-orders-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  }
  .customer-order-totals {
    display: grid; gap: 0.15rem; justify-items: end; color: var(--color-text-muted); font-size: 0.85rem;
    font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  @media (max-width: 560px) {
    .customer-orders-header {
      align-items: flex-start; flex-direction: column;
    }
    .customer-order-totals {
      justify-items: start;
    }
  }
  .customer-summary-heading {
    font-size: 1.35rem; font-weight: 700; color: var(--color-text); margin: 0;
  }
  .customer-summary-text {
    display: flex; flex-direction: column; gap: 0.35rem; color: var(--color-text);
  }
  .customer-summary-address {
    margin-top: 0.25rem; line-height: 1.4;
  }
  .customer-summary-contact {
    display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.4rem;
  }
  .customer-summary-line.muted {
    color: var(--color-text-muted);
  }
  .customer-summary-notes {
    margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--color-border);
  }
  .customer-notes-label {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted);
    margin-bottom: 0.35rem;
  }
  .customer-notes-body {
    font-size: 0.9rem; line-height: 1.5; color: var(--color-text);
  }
  .customer-notes-body.empty {
    color: var(--color-text-muted); font-style: italic;
  }
  .customer-summary-tags {
    margin-top: 0.8rem; padding-top: 0.65rem; border-top: 1px solid var(--color-border);
  }
  .customer-tags-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted);
    margin-bottom: 0.35rem;
  }
  .customer-tag-list {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.22rem 0.3rem; min-height: 1.35rem;
  }
  .customer-tag-chip {
    display: inline-flex; align-items: center; gap: 0.18rem; max-width: 100%; border: 1px solid #d8cfc2;
    border-radius: 0.18rem; background: #eee9df; color: #2d3748; font-size: 0.72rem; line-height: 1.15;
    padding: 0.12rem 0.22rem;
  }
  .customer-tag-name {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .customer-tag-remove {
    appearance: none; cursor: pointer; opacity: 0; width: 0.7rem; transition: opacity 0.12s ease;
  }
  .customer-tag-chip:hover .customer-tag-remove,
  .customer-tag-remove:focus-visible {
    opacity: 1;
  }
  .customer-tag-remove:focus-visible {
    outline: 1px solid #b42318; outline-offset: 1px;
  }
  .customer-tag-add {
    cursor: pointer;
  }
  .customer-tags-empty {
    color: var(--color-text-muted); font-size: 0.78rem; font-style: italic;
  }
  .customer-tag-modal {
    width: min(520px, 95vw);
  }
  .customer-tag-existing {
    margin-bottom: 0.8rem;
  }
  .customer-tag-existing-label {
    margin-bottom: 0.35rem; color: var(--color-text-muted); font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
  }
  .customer-tag-existing-list {
    display: flex; flex-wrap: wrap; gap: 0.3rem; max-height: 8rem; overflow-y: auto; padding: 0.15rem 0.05rem;
  }
  .customer-tag-existing-choice {
    border: 1px solid #d8cfc2; border-radius: 0.18rem; background: #eee9df; color: #2d3748; cursor: pointer;
    font-size: 0.72rem; line-height: 1.15; padding: 0.16rem 0.34rem;
  }
  .customer-tag-existing-choice:hover,
  .customer-tag-existing-choice:focus-visible {
    border-color: var(--color-primary); background: #eef6ff;
  }
  .customer-tag-existing-choice.selected {
    border-color: var(--color-primary); background: var(--color-primary); color: #ffffff;
  }
  .customer-tag-existing-choice:disabled {
    cursor: not-allowed; opacity: 0.45;
  }
  .customer-tag-existing-empty {
    color: var(--color-text-muted); font-size: 0.8rem; font-style: italic;
  }
  .customer-tag-writein {
    margin-top: 0.2rem;
  }
  .customer-tag-inputs {
    display: grid; gap: 0.45rem;
  }
  .customer-tag-input-row {
    display: flex;
  }
  .customer-tag-input {
    width: 100%; border: 1px solid var(--color-border); border-radius: 0.45rem; padding: 0.45rem 0.55rem;
    font-size: 0.95rem;
  }
  .customer-tag-input:focus-visible {
    outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(31, 122, 224, 0.18);
  }
  .customer-tag-modal-actions {
    display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
  }
  .tag-filter-modal {
    width: min(620px, 95vw);
  }
  .tag-filter-options {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
  }
  .tag-filter-option {
    display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid #d8cfc2; border-radius: 0.35rem;
    background: #f7f4ee; color: #2d3748; cursor: pointer; font-size: 0.85rem; font-weight: 700; line-height: 1.2;
    padding: 0.35rem 0.5rem;
  }
  .tag-filter-option input {
    width: 15px;
  }
  .tag-filter-option.selected,
  .tag-filter-option:focus-within {
    border-color: var(--color-primary); background: #eef6ff; color: var(--color-primary);
  }
  .tag-filter-empty {
    margin: 0; color: var(--color-text-muted); font-style: italic;
  }
  .tag-filter-modal-actions {
    display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap;
  }
  .customer-related {
    margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--color-border);
  }
  .customer-related-row {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  }
  .customer-related-label {
    margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--color-text);
  }
  .customer-related-control select {
    width: auto; min-width: 200px;
  }
  .customer-orders-card {
    display: flex; flex-direction: column; gap: 0.75rem;
  }
  .customer-orders-title {
    font-size: 1rem; font-weight: 600; color: var(--color-text);
  }
  .customer-orders-subtitle {
    font-size: 0.9rem; color: var(--color-text-muted); margin-top: 0.25rem;
  }
  .customer-orders-list {
    border: 1px solid var(--color-border); border-radius: 0.65rem; min-height: 0; overflow-x: hidden;
  }
  .customer-order-row {
    align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0.7rem;
    color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-border);
  }
  .customer-order-row:last-child {
    border-bottom: 0;
  }
  .customer-order-row:hover,
  .customer-order-row:focus-visible {
    background: var(--color-surface-muted, #f8fafc);
  }
  .customer-order-main {
    min-width: 0; display: flex; flex-direction: column; gap: 0.15rem;
  }
  .customer-order-title {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600;
  }
  .customer-order-meta,
  .customer-orders-footnote,
  .customer-orders-empty {
    color: var(--color-text-muted); font-size: 0.8rem;
  }
  .customer-order-status {
    flex: 0 0 auto; color: var(--color-text-muted); font-size: 0.8rem; white-space: nowrap;
  }
  .pricing-card {
    padding: 1rem 1.1rem; gap: 0.75rem;
  }
  .pricing-card .form-card-header {
    margin-bottom: 0.1rem;
  }
  .pricing-card .tier-list {
    gap: 0.5rem;
  }
  .form-card-title {
    margin: 0; font-size: 1rem; font-weight: 600; color: var(--color-text);
  }
  .form-card-header {
    display: flex; flex-direction: column; gap: 0.5rem;
  }
  .form-help-text {
    margin: 0; font-size: 0.875rem; color: var(--color-text-muted);
  }
  .form-help-text.error {
    color: var(--color-danger);
  }
  .form-actions-inline {
    display: flex; justify-content: flex-end; margin-top: 0.75rem; gap: 0.75rem;
  }
  .option-picker {
    display: flex; flex-direction: column; gap: 0.75rem;
  }
  .option-picker-empty,
  .option-picker-empty-wrapper {
    font-size: 0.9rem; color: var(--color-text-muted); margin: 0;
  }
  .option-picker-empty.error {
    color: var(--color-danger);
  }
  .option-row {
    display: flex; gap: 0.75rem; align-items: flex-end;
  }
  .option-field {
    flex: 1; display: flex; flex-direction: column; gap: 0.25rem;
  }
  .option-field label {
    font-weight: 600; color: var(--color-text-muted);
  }
  .option-remove-btn {
    white-space: nowrap;
  }
  .inline-link {
    color: var(--color-primary); text-decoration: none; font-weight: 600;
  }
  .inline-link:hover,
  .inline-link:focus {
    text-decoration: underline;
  }
  .tier-list {
    display: block;
  }
  .tier-table {
    width: 100%; border-collapse: collapse;
  }
  .tier-table thead th {
    text-align: left; font-size: 0.85rem; color: var(--color-text-muted); font-weight: 600; padding-bottom: 0.35rem;
  }
  .tier-table tbody td {
    padding: 0.35rem 0.35rem 0.35rem 0;
  }
  .tier-table tbody td:last-child {
    padding-right: 0; text-align: right;
  }
  .tier-table input {
    width: 100%;
  }
  .tier-remove-btn {
    padding: 0.3rem 0.6rem; font-size: 0.85rem; white-space: nowrap;
  }
  .panel-summary {
    border: 1px solid var(--color-border); border-radius: 0.75rem; padding: 1rem 1.25rem; background-color: #f0f4f8;
    min-width: 220px; display: flex; flex-direction: column; gap: 0.75rem;
  }
  .panel-summary-title {
    margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--color-text);
  }
  .panel-summary-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; margin: 0;
  }
  .panel-summary-grid div {
    display: flex; flex-direction: column; gap: 0.2rem;
  }
  .panel-summary-grid dt {
    margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted);
  }
  .panel-summary-grid dd {
    margin: 0; font-weight: 600;
  }
  .component-list {
    display: flex; flex-direction: column; gap: 1rem;
  }
  .component-list-empty {
    margin: 0; padding: 1rem; border: 1px dashed var(--color-border); border-radius: 0.75rem; text-align: center;
    color: var(--color-text-muted); background-color: rgba(15, 23, 42, 0.02);
  }
  .component-list-empty.error {
    color: var(--color-danger); border-color: var(--color-danger); background-color: rgba(214, 69, 69, 0.08);
  }
  .component-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; padding: 1rem;
    border: 1px solid var(--color-border); border-radius: 0.75rem; background-color: #f9fbff;
  }
  .options-layout {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 1.5rem; align-items: flex-start;
  }
  @media (max-width: 900px) {
    .options-layout {
      grid-template-columns: 1fr;
    }
  }
  .component-field {
    display: flex; flex-direction: column; gap: 0.25rem;
  }
  .component-field label {
    font-weight: 600; color: var(--color-text-muted);
  }
  .component-row-summary {
    display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; color: var(--color-text-muted);
  }
  .component-row-summary p {
    margin: 0;
  }
  .component-row-summary span {
    font-weight: 600; color: var(--color-text);
  }
  .component-remove-btn {
    align-self: flex-start; white-space: nowrap;
  }
  .crm-summary-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem;
  }
  .crm-summary-card {
    border: 1px solid var(--color-border); border-radius: 0.75rem; padding: 0.9rem 1rem; background-color: #f8fafc;
    display: flex; flex-direction: column; gap: 0.2rem;
  }
  .crm-summary-label {
    margin: 0; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em;
    color: var(--color-text-muted);
  }
  .crm-summary-value {
    margin: 0; font-size: 1.45rem; font-weight: 600; color: var(--color-text);
  }
  .crm-summary-meta {
    margin: 0; color: var(--color-text-muted); font-size: 0.9rem;
  }
  .connections-selector {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  }
  .connections-selector label {
    font-weight: 600; color: var(--color-text);
  }
  .connections-selector select {
    min-width: 260px;
  }
  .connections-helper-text {
    margin: 0.25rem 0 0.5rem; color: var(--color-text-muted);
  }
  .timeline-empty {
    margin: 0; color: var(--color-text-muted); font-style: italic;
  }
  .followup-panel .crm-panel-subtitle {
    margin-bottom: 0;
  }
  .followup-list {
    list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; max-height: 520px;
    overflow-y: auto; padding-right: 0.25rem;
  }
  .followup-item {
    border: 1px solid var(--color-border); border-radius: 0.65rem; padding: 0.6rem 0.75rem; display: flex;
    flex-direction: column; gap: 0.2rem; background-color: #ffffff;
  }
  .followup-item header {
    display: flex; justify-content: space-between; gap: 0.5rem; font-weight: 600;
  }
  .followup-time {
    color: var(--color-primary);
  }
  .followup-meta {
    margin: 0; color: var(--color-text-muted); font-size: 0.85rem;
  }
  .followup-note {
    margin: 0; color: var(--color-text);
  }
  .followup-empty {
    margin: 0; color: var(--color-text-muted); font-style: italic;
  }
  .customer-link {
    color: var(--color-primary-dark); text-decoration: none; font-weight: 600;
  }
  .customer-link:hover,
  .customer-link:focus-visible {
    text-decoration: underline;
  }
  .connections-empty-state {
    border: 1px dashed var(--color-border); border-radius: 0.9rem; padding: 2rem; text-align: center;
    background-color: rgba(15, 23, 42, 0.02); display: flex; flex-direction: column; gap: 1rem; align-items: center;
  }
  .connections-overview-grid .full-span {
    grid-column: 1 / -1;
  }
  .filter-field {
    display: flex; align-items: center; gap: 0.5rem;
  }
  .filter-field select,
  .filter-field input[type="search"] {
    min-width: 200px;
  }
  .overview-date-range {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.3rem;
    color: var(--color-text-muted); font-size: 0.78rem; font-weight: 700;
  }
  .overview-date-range input[type="date"]:focus-visible {
    outline: none;
  }
  .filter-clear-btn {
    cursor: pointer;
  }
  .filter-clear-btn:disabled {
    opacity: 0.5; cursor: not-allowed;
  }
  .overview-feed {
    list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; max-height: 520px;
    overflow-y: auto; padding-right: 0.25rem;
  }
  .feed-item {
    border: 1px solid var(--color-border); border-radius: 0.65rem; padding: 0.75rem; background-color: #fff;
    display: flex; flex-direction: column; gap: 0.2rem;
  }
  .feed-meta {
    display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.85rem; color: var(--color-text-muted);
  }
  .feed-followup {
    color: var(--color-primary);
  }
  .feed-summary {
    margin: 0; font-weight: 600; color: var(--color-text);
  }
  .feed-owner {
    margin: 0; font-size: 0.9rem; color: var(--color-text-muted);
  }
  .overview-empty {
    margin: 0.2rem 0 0; color: var(--color-text-muted); font-style: italic;
  }
  .overview-idle-list {
    list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; max-height: 520px;
    overflow-y: auto; padding-right: 0.25rem;
  }
  .overview-idle-item {
    border: 1px solid var(--color-border); border-radius: 0.65rem; padding: 0.6rem 0.75rem; background-color: #fff;
    display: flex; flex-direction: column; gap: 0.15rem;
  }
  .idle-last-interaction {
    margin: 0; font-size: 0.85rem; color: var(--color-text-muted);
  }
  .idle-table-header {
    display: grid; grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(140px, 1fr)); gap: 0.5rem;
    margin-bottom: 0.4rem;
  }
  .connections-idle-table-scroll {
    max-width: 100%; overflow-x: auto;
  }
  .idle-sort {
    text-align: left; cursor: pointer;
  }
  .overview-idle-item .idle-row-main {
    display: grid; grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(140px, 1fr)); gap: 0.5rem;
    align-items: center; font-weight: 600;
  }
  .idle-date {
    font-size: 0.9rem; color: var(--color-text);
  }
  .idle-date.date-overdue {
    color: var(--color-danger);
  }
  .idle-details {
    margin: 0; font-size: 0.85rem; color: var(--color-text-muted);
  }
  @media (max-width: 600px) {
    .connections-idle-table {
      min-width: 496px;
    }
  }
  .crm-columns {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr); gap: 1rem; align-items: start;
  }
  @media (max-width: 1100px) {
    .crm-columns {
      grid-template-columns: 1fr;
    }
  }
  .crm-panel {
    display: flex; flex-direction: column; gap: 1rem;
  }
  .crm-panel-header {
    display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; align-items: flex-start;
  }
  .panel-count {
    font-size: 0.9rem; font-weight: 600; color: var(--color-text-muted); flex-shrink: 0; margin-left: auto;
  }
  .crm-panel-title {
    margin: 0; font-size: 1.05rem; font-weight: 600;
  }
  .crm-panel-subtitle {
    margin: 0.15rem 0 0; color: var(--color-text-muted); font-size: 0.9rem;
  }
  .chip-row {
    display: flex; gap: 0.35rem; flex-wrap: wrap;
  }
  .chip {
    border: 1px solid var(--color-border); background-color: #ffffff; border-radius: 2rem; padding: 0.25rem 0.75rem;
    font-size: 0.85rem; cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease;
  }
  .chip.active {
    background-color: rgba(31, 122, 224, 0.1); border-color: var(--color-primary); color: var(--color-primary);
  }
  .timeline {
    list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--color-border);
  }
  .timeline-entry {
    margin-left: 1rem; padding: 0.75rem 0 0.75rem 1rem; position: relative;
  }
  .timeline-entry::before {
    content: ""; position: absolute; left: -1.18rem; top: 1rem; width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid var(--color-primary); background-color: #ffffff;
  }
  .timeline-entry-header {
    display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.85rem; color: var(--color-text-muted);
  }
  .timeline-entry-header-right {
    display: flex; flex-direction: column; gap: 0.2rem;
  }
  .timeline-entry-followup {
    color: var(--color-primary);
  }
  .timeline-entry-summary {
    margin: 0.25rem 0; font-weight: 600; color: var(--color-text);
  }
  .timeline-entry-meta {
    font-size: 0.85rem; color: var(--color-text-muted);
  }
  .timeline-entry-next {
    margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--color-text);
  }
  .timeline-entry-actions {
    display: flex; gap: 0.4rem; margin-top: 0.4rem;
  }
  .timeline-entry-actions .text-link {
    padding: 0; font-size: 0.85rem;
  }
  .timeline-entry-actions .text-link.delete-link {
    color: var(--color-danger);
  }
  .crm-inline-form {
    border-top: 1px solid var(--color-border); padding-top: 0.75rem; margin-top: 0.5rem; display: flex;
    flex-direction: column; gap: 0.6rem;
  }
  .interaction-log-dialog {
    width: min(40rem, calc(100vw - 2rem)); border: 0; padding: 0; background: transparent;
  }
  .interaction-log-dialog::backdrop {
    background: rgba(15,23,42,.42);
  }
  .interaction-log-dialog-content {
    max-height: calc(100vh - 2rem); overflow: auto; padding: 1rem 1.1rem; border: 1px solid #cbd5e1;
    border-radius: 8px; background: #fff; box-shadow: 0 18px 50px rgba(15,23,42,.25);
  }
  .interaction-log-dialog-content .crm-inline-form {
    border-top: 0; margin-top: .75rem; padding-top: 0;
  }
  .crm-stack {
    display: flex; flex-direction: column; gap: 0.9rem;
  }
  .crm-subpanel {
    border: 1px solid var(--color-border); border-radius: 0.85rem; padding: 0.9rem 1rem; background-color: #f9fbff;
    display: flex; flex-direction: column; gap: 0.75rem;
  }
  .call-list,
  .task-list,
  .playbook-list {
    list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem;
  }
  .call-item {
    border: 1px solid var(--color-border); border-radius: 0.75rem; padding: 0.75rem 0.85rem;
    background-color: #ffffff; display: flex; flex-direction: column;
  }
  .task-item {
    border: 1px solid var(--color-border); border-radius: 0.75rem; padding: 0.75rem 0.85rem;
    background-color: #ffffff; display: flex;
  }
  .playbook-item {
    border: 1px solid var(--color-border); border-radius: 0.75rem; padding: 0.75rem 0.85rem;
    background-color: #ffffff; display: flex; flex-direction: column; gap: 0.2rem;
  }
  .call-item {
    gap: 0.1rem;
  }
  .call-item-header {
    display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; align-items: center;
  }
  .call-contact,
  .task-title,
  .playbook-title {
    margin: 0; font-weight: 600; color: var(--color-text);
  }
  .call-meta,
  .call-topic,
  .task-meta,
  .playbook-description {
    margin: 0; color: var(--color-text-muted); font-size: 0.85rem;
  }
  .call-time {
    font-weight: 600; color: var(--color-primary);
  }
  .task-item {
    flex-direction: row; justify-content: space-between; align-items: center; gap: 0.75rem;
  }
  .playbook-description {
    line-height: 1.4;
  }
  .is-hidden,
  .hidden {
    display: none !important;
  }
  .muted-text {
    color: var(--color-text-muted); font-size: 0.9rem;
  }
  .print-jobs-table {
    font-size: 0.9rem; width: 100%; table-layout: auto; min-width: 0; border-collapse: collapse; border-spacing: 0;
  }
  .print-jobs-table thead th {
    font-size: 0.8rem; padding: 0.3rem 0.35rem; border-bottom: 1px solid var(--color-border);
  }
  .print-jobs-table tbody tr {
    cursor: pointer; background-color: #ffffff;
  }
  .print-jobs-table tbody tr:hover {
    background-color: #f8fafc;
  }
  .print-jobs-table tbody td {
    padding: 0.25rem 0.35rem; vertical-align: top;
  }
  .print-jobs-table .print-jobs-nowrap {
    white-space: nowrap; width: 1%; overflow: hidden; text-overflow: ellipsis;
  }
  .print-jobs-table .print-jobs-task-name {
    min-width: 0; max-width: none; overflow-wrap: anywhere; white-space: normal;
  }
  .print-jobs-table tbody td.assignee-working {
    font-weight: 700;
  }
  .modal-open {
    overflow: hidden;
  }
  .print-jobs-table tbody tr.status-tinted {
    background-color: var(--status-bg);
  }
  .print-jobs-table tbody tr.status-tinted td {
    color: var(--status-fg, inherit);
  }
  .print-jobs-table .status-pill {
    font-weight: 600;
  }
  .modal-backdrop {
    position: fixed; inset: 0; background-color: rgba(15, 23, 42, 0.4); z-index: 90;
  }
  .modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(840px, 95vw);
    max-height: 90vh; background-color: #ffffff; border-radius: 0.9rem;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25); z-index: 100; display: flex; flex-direction: column;
    overflow-y: auto;
  }
  dialog.modal:not([open]),
  dialog.customer-document-preview:not([open]) {
    display: none;
  }
  dialog.modal[open],
  dialog.customer-document-preview[open] {
    display: flex;
  }
  .training-reset-modal {
    width: min(520px, 95vw);
  }
  .modal-content {
    display: flex; flex-direction: column; height: 100%;
  }
  .modal-header {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem 0.5rem;
    border-bottom: 1px solid var(--color-border);
  }
  .modal-subtitle {
    margin: 0; color: var(--color-text-muted); font-weight: 700;
  }
  .modal-assignee {
    margin: 0.15rem 0 0.45rem; color: var(--color-text-muted); font-weight: 600;
  }
  .modal-task-links {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  }
  .modal-task-id {
    margin: 0.1rem 0 0; color: var(--color-text-muted); font-size: 0.8rem;
  }
  .modal-meta {
    margin: 0.15rem 0 0; color: var(--color-text-muted); font-size: 0.9rem;
  }
  .modal-body {
    padding: 1rem 1.25rem 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem;
  }
  .scan-input-row {
    display: flex; flex-direction: column; align-items: stretch; gap: 0.5rem; margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem 0; flex-wrap: wrap;
  }
  .scan-input-row label {
    margin: 0; font-weight: 600;
  }
  .scan-input-row input {
    flex: 1 1 auto;
  }
  .scan-field {
    display: flex; flex-direction: column; gap: 0.35rem;
  }
  .scan-field-row {
    display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
  }
  .scan-input-wrapper {
    position: relative; flex: 1 1 auto; min-width: 200px;
  }
  .scan-input-wrapper input {
    width: 100%;
  }
  .scan-input-clear {
    position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%); min-width: 1.6rem;
    padding: 0.1rem 0.35rem;
  }
  .scan-video {
    width: 100%; max-height: 240px; border-radius: 0.5rem; border: 1px solid var(--color-border); background: #000;
    object-fit: cover;
  }
  .scan-confirm {
    margin-top: 0.75rem; padding: 0.75rem; border: 1px solid var(--color-border); border-radius: 0.6rem;
    background-color: #ffffff; display: flex; flex-direction: column; gap: 0.6rem;
  }
  .scan-confirm-text {
    margin: 0; font-weight: 600;
  }
  .scan-confirm-actions {
    display: flex; gap: 0.5rem; flex-wrap: wrap;
  }
  .scan-batch {
    margin-top: 0.75rem; padding: 0.75rem; border: 1px solid var(--color-border); border-radius: 0.6rem;
    background-color: #ffffff; display: flex; flex-direction: column; gap: 0.6rem;
  }
  .scan-batch-list {
    display: flex; flex-direction: column; gap: 0.4rem; max-height: 160px; overflow-y: auto;
  }
  .scan-batch-empty {
    margin: 0; color: var(--color-text-muted);
  }
  .scan-batch-item {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0.4rem;
    border-radius: 0.4rem; background: #f8f8f8;
  }
  .scan-batch-text {
    font-size: 0.95rem;
  }
  .scan-batch-remove {
    min-width: 1.8rem; padding: 0.1rem 0.4rem;
  }
  .scan-batch-actions {
    display: flex; gap: 0.5rem; justify-content: flex-end;
  }
  .scan-inline {
    display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
  }
  .scan-inline .scan-controls {
    display: flex; gap: 0.4rem;
  }
  .scan-inline input {
    flex: 1 1 220px;
  }
  .scan-inline .scan-controls .active {
    background-color: #22c55e; color: #0f172a;
  }
  .scan-video-frame {
    border: 2px solid var(--color-border); border-radius: 0.6rem; background: #0b0f17; overflow: hidden;
    margin-top: 0.75rem;
  }
  .scan-video-frame.scan-success {
    border-color: #16a34a; box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
  }
  .scan-video-frame.scan-failure {
    border-color: #dc2626; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
  }
  .scan-indicator-banner {
    width: 100%; text-align: center; padding: 0.4rem 0.75rem; font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.02em; text-transform: uppercase; background: #111827; color: #e2e8f0; opacity: 0.35;
    transition: opacity 0.2s ease;
  }
  .scan-indicator-banner.active {
    opacity: 1; animation: scan-indicator-pop 1s ease-out;
  }
  .scan-indicator-banner.success {
    background: #16a34a; color: #052e16;
  }
  .scan-indicator-banner.failure {
    background: #dc2626; color: #fee2e2;
  }
  @keyframes scan-indicator-pop {
  0% {
    opacity: 0.3;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}
  .scan-video-frame .scan-video {
    border: none; border-radius: 0 0 0.5rem 0.5rem; max-height: 280px;
  }
  .full-summary {
    margin-top: 0.75rem; border: 1px solid var(--color-border); border-radius: 0.6rem; background: #ffffff;
  }
  .full-summary-toggle {
    width: 100%; text-align: left;
  }
  .full-summary-body {
    padding: 0.75rem; padding-top: 0;
  }
  .full-summary.collapsed .full-summary-body {
    display: none;
  }
  .status-area {
    margin-top: 0.75rem;
  }
  .status-box {
    min-height: 48px; padding: 0.75rem; border: 1px solid var(--color-border); border-radius: 0.5rem;
    background: #f8fafc;
  }
  .status-box .error {
    color: var(--color-danger); font-weight: 600;
  }
  .status-box .warning {
    color: #b7791f; font-weight: 600;
  }
  .scan-separator {
    border: none; border-top: 1px solid var(--color-border); margin: 0 0 0.75rem;
  }
  .quick-actions {
    border: 1px solid var(--color-border); border-radius: 0.6rem; padding: 0.4rem 0.5rem; background-color: #f5f7fb;
    display: flex; flex-direction: column; gap: 0.35rem;
  }
  .quick-actions-header {
    margin: 0;
  }
  .quick-actions-row {
    display: flex; flex-wrap: wrap; gap: 0.35rem;
  }
  .quick-action-btn {
    font-size: 0.8rem; padding: 0.25rem 0.5rem; border-radius: 0.45rem; border: 1px solid var(--color-border);
    background-color: #ffffff; color: var(--color-text); cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
  }
  .quick-action-btn:hover,
  .quick-action-btn:focus-visible {
    background-color: #eef2f7; border-color: var(--color-primary); outline: none;
  }
  .quick-action-btn:disabled {
    opacity: 0.6; cursor: not-allowed;
  }
  .modal-description {
    white-space: pre-wrap; background-color: #f8fafc; border-radius: 0.6rem; padding: 0.75rem;
    border: 1px solid var(--color-border); min-height: 3rem;
  }
  .history-section,
  .comment-section {
    display: flex; flex-direction: column; gap: 0.5rem;
  }
  .comment-tabs {
    display: flex; gap: 0.35rem; flex-wrap: wrap;
  }
  .comment-tab {
    border: 1px solid var(--color-border); border-radius: 999px; background-color: #ffffff;
    color: var(--color-text); font-size: 0.85rem; font-weight: 600; padding: 0.35rem 0.9rem; cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
  }
  .comment-tab.active {
    background-color: #eef2f7; border-color: var(--color-primary); color: var(--color-primary);
  }
  .comment-tab:focus-visible {
    outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(31, 122, 224, 0.2);
  }
  .comment-panels {
    border: 1px solid var(--color-border); border-radius: 0.7rem; padding: 0.85rem; background-color: #f8fafc;
  }
  .comment-panel {
    display: none; flex-direction: column; gap: 0.5rem;
  }
  .comment-panel.active {
    display: flex;
  }
  .comment-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.5rem;
  }
  .drive-link-section .drive-link {
    display: inline-flex; align-items: center; gap: 0.4rem; color: var(--color-primary); text-decoration: none;
    font-weight: 600;
  }
  .drive-link-section .drive-link::after {
    content: "↗"; font-size: 0.9rem;
  }
  .drive-link-section .drive-link:hover,
  .drive-link-section .drive-link:focus-visible {
    text-decoration: underline;
  }
  .history-list {
    border: 1px solid var(--color-border); border-radius: 0.6rem; padding: 0.75rem; max-height: 260px;
    overflow-y: auto; display: flex; flex-direction: column; gap: 0.65rem; background-color: #f8fafc;
  }
  .history-entry {
    display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: 0.5rem; font-size: 0.9rem;
  }
  .history-date {
    font-weight: 600; color: var(--color-text-muted);
  }
  .history-user {
    margin: 0; font-weight: 600; color: var(--color-text);
  }
  .history-text {
    margin: 0.1rem 0 0; color: var(--color-text); white-space: pre-wrap;
  }
  .comment-section form {
    display: flex; flex-direction: column; gap: 0.5rem;
  }
  .form-label {
    font-weight: 600; color: var(--color-text-muted);
  }
  .comment-section textarea {
    resize: vertical;
  }
  .comment-section input:focus-visible,
  .comment-section textarea:focus-visible {
    outline: none;
  }
  .empty-state {
    margin: 0; font-style: italic; color: var(--color-text-muted);
  }
  .form-actions {
    margin-top: 2rem; display: flex; justify-content: flex-end; gap: 0.75rem;
  }
  .toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem; background-color: var(--color-sidebar); color: #ffffff;
    padding: 0.75rem 1rem; border-radius: 0.5rem; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3);
    transition: opacity 0.2s ease, transform 0.2s ease; opacity: 0; transform: translateY(10px); z-index: 200;
  }
  .toast.error {
    background-color: var(--color-danger);
  }
  .toast.visible {
    opacity: 1; transform: translateY(0);
  }
  .toast.hidden {
    display: none;
  }
  .page-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem;
  }
  .page-header .subtitle {
    color: var(--color-text-muted); margin: 0.25rem 0 0;
  }
  .header-actions {
    display: flex; align-items: center; gap: 0.5rem;
  }
  .card {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 0.75rem; padding: 1rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06); margin-bottom: 1rem;
  }
  .card-header {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem;
  }
  .filters input[type="search"] {
    min-width: 220px;
  }
  .table-wrapper {
    overflow-x: auto;
  }
  .cell-title {
    font-weight: 600; margin-bottom: 0.15rem;
  }
  .cell-sub {
    color: var(--color-text-muted); font-size: 0.9rem;
  }
  .rich-editor {
    background: #ffffff; min-height: 200px;
  }
  .training-question-body-editor {
    display: block; width: 100%; max-width: 100%; overflow: hidden; box-sizing: border-box;
  }
  .training-question-body-editor.ql-container {
    min-height: 400px; height: 400px;
  }
  .training-question-body-editor .ql-editor {
    min-height: 332px; height: 332px; max-height: 332px; overflow-y: auto;
  }
  @media (max-width: 768px) {
    .training-question-body-editor {
      width: 100%; min-width: 0;
    }
    .training-question-body-editor.ql-container {
      min-height: 352px; height: 352px;
    }
    .training-question-body-editor .ql-editor {
      min-height: 284px; height: 284px; max-height: 284px;
    }
  }
  .prose {
    line-height: 1.6;
  }
  .prose h1,
  .prose h2,
  .prose h3,
  .prose h4 {
    margin: 0.75rem 0 0.35rem;
  }
  .prose p {
    margin: 0.35rem 0;
  }
  .prose ul,
  .prose ol {
    padding-left: 1.25rem;
  }
  .stacked-feed {
    display: flex; flex-direction: column; gap: 1rem;
  }
  .news-card {
    display: flex; flex-direction: column; gap: 0.5rem;
  }
  .news-card-header h3 {
    margin: 0;
  }
  .news-card-meta {
    color: var(--color-text-muted); margin: 0.15rem 0 0; font-size: 0.95rem; display: flex; align-items: center;
    justify-content: space-between; gap: 0.75rem;
  }
  .news-card-body {
    line-height: 1.6; white-space: pre-wrap; tab-size: 4;
  }
  .news-card-body p {
    margin: 0.35rem 0;
  }
  .news-card-actions {
    display: flex; gap: 0.75rem; align-items: center;
  }
  .link-button {
    background: none; border: none; color: var(--color-primary); cursor: pointer; padding: 0; font: inherit;
    text-decoration: underline;
  }
  .pagination-controls {
    display: flex; gap: 0.5rem; justify-content: flex-start; margin-top: 0.5rem;
  }
  @media (max-width: 900px) {
    .app-body {
      flex-direction: column;
    }
    .mobile-menu-toggle {
      display: inline-flex;
    }
    .sidebar {
      display: none; position: fixed; top: 0; left: 0; height: 100vh; width: 260px; max-width: 80vw; z-index: 200;
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.25); overflow-y: auto;
    }
    .mobile-menu-open .sidebar {
      display: flex;
    }
    .mobile-menu-backdrop {
      display: none;
    }
    .mobile-menu-open .mobile-menu-backdrop {
      display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 150;
    }
    .main-content {
      padding: 1.25rem;
    }
    .training-grid,
    .training-placeholder-grid,
    .training-management-grid {
      grid-template-columns: 1fr;
    }
    .training-management-card {
      align-items: flex-start; flex-direction: column;
    }
    table {
      min-width: 100%;
    }
  }
  .timeline-entry-type {
    font-weight: 600; color: var(--color-text);
  }
  .mobile-landing {
    display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 140px);
    padding: 2rem 1.5rem;
  }
  .mobile-landing-card {
    width: min(520px, 100%); text-align: center; background: #ffffff; border: 1px solid var(--color-border);
    border-radius: 1rem; padding: 2.25rem 2rem; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  }
  .mobile-landing-card h2 {
    margin: 0 0 0.75rem; font-size: 1.9rem;
  }
  .mobile-landing-card p {
    margin: 0 0 1.75rem; color: var(--color-text-muted);
  }
  .mobile-landing-actions {
    display: grid; gap: 1rem;
  }
  .mobile-landing-btn {
    justify-content: center; font-size: 1.2rem; padding: 0.9rem 1.5rem; border-radius: 0.75rem;
    letter-spacing: 0.04em;
  }
  .pickup-code-modal {
    width: min(560px, 95vw);
  }
  .pickup-code-modal-content {
    position: relative;
  }
  .pickup-code-header {
    position: relative; display: flex; justify-content: center; align-items: center; text-align: center;
    padding: 1.25rem 1.25rem 0.75rem;
  }
  .pickup-code-header-copy {
    width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  }
  .pickup-code-header-copy h3 {
    margin: 0 0 0.3rem;
  }
  .pickup-code-header-copy .modal-subtitle,
  .pickup-code-header-copy .muted-text {
    margin: 0;
  }
  .pickup-code-close {
    position: absolute; top: 0.9rem; right: 1rem;
  }
  .pickup-code-body {
    display: flex; flex-direction: column; align-items: center; gap: 0.9rem; text-align: center;
    padding: 1.25rem 1.25rem 1.5rem;
  }
  .pickup-code-barcode {
    width: min(100%, 520px); padding: 1rem; border: 1px solid var(--color-border); border-radius: 0.8rem;
    background: #ffffff; margin: 0 auto;
  }
  .pickup-code-barcode svg {
    display: block; width: 100%; height: auto;
  }
  .pickup-code-plain {
    margin: 0.7rem 0 0; font-size: 0.92rem; font-weight: 600; word-break: break-word;
  }
  .pickup-code-help {
    margin: 0; color: var(--color-text-muted); max-width: 32ch;
  }
  .barcode-maker-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem;
  }
  .barcode-entry-card {
    gap: 0.75rem;
  }
  .barcode-entry-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
  }
  .barcode-entry-title {
    margin: 0; color: var(--color-text);
  }
  .barcode-mode-row {
    min-width: 220px;
  }
  .barcode-mode-select:focus-visible {
    outline: none;
  }
  .barcode-entry-card textarea {
    resize: vertical;
  }
  .barcode-data-block {
    display: block;
  }
  .barcode-token-row {
    margin-top: -0.2rem;
  }
  .barcode-contact-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.8rem;
  }
  .contact-compact-row {
    display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 0.45rem;
  }
  .customer-order-actions {
    display: inline-flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: .12rem;
  }
  .customer-order-total {
    color: var(--color-text); font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  body[data-ui-system="v1"] .customer-order-total.tbd-price {
    color: var(--ds-warning); font-style: italic;
  }
  .customer-order-select {
    margin: 0;
  }
  .customer-order-row {
    display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  }
  .customer-order-document-actions {
    display: flex; flex: 0 0 auto; justify-content: flex-end; gap: .4rem; padding-top: .1rem;
  }
  .job-description-actions {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: start;
  }
  .job-document-actions {
    display: flex; flex-direction: column; gap: .25rem;
  }
  .job-document-link {
    appearance: none; text-align: right; cursor: pointer;
  }
  .job-document-preview .customer-document-preview-content {
    width: min(54rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto;
  }
  .customer-order-print {
    border: 0; background: transparent; color: #2563eb; padding: 0; cursor: pointer; font: inherit;
  }
  .customer-order-print:hover,
  .customer-order-print:focus-visible {
    text-decoration: underline;
  }
  .customer-documents-panel {
    margin-top: 0;
  }
  .customer-connections-panel {
    margin-top: 1rem;
  }
  .customer-documents-list {
    display: grid; gap: .35rem;
  }
  .customer-document-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; align-items: center;
    border: 1px solid #dbe4ef; background: #fff; border-radius: 6px; padding: .25rem;
  }
  .customer-document-open {
    display: grid; grid-template-columns: 7rem minmax(0,1fr) auto; gap: .75rem; align-items: center; min-width: 0;
    text-align: left; cursor: pointer;
  }
  .customer-document-open span {
    color: #486581; font-size: .82rem;
  }
  .customer-document-delete {
    cursor: pointer;
  }
  @media (max-width: 760px) {
    .customer-document-open {
      grid-template-columns: 1fr; gap: .15rem;
    }
  }
  .customer-print-menu,
  .customer-document-preview {
    border: 0; padding: 0; background: transparent;
  }
  .customer-print-menu::backdrop,
  .customer-document-preview::backdrop {
    background: rgba(15,23,42,.42);
  }
  .customer-print-menu-content {
    width: min(24rem, calc(100vw - 2rem)); padding: 1rem; background: #fff; border: 1px solid #cbd5e1;
    border-radius: 8px; box-shadow: 0 12px 30px rgba(15,23,42,.2);
  }
  .customer-print-menu-content header,
  .customer-document-preview-content header {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  }
  .customer-document-preview-content footer {
    display: flex; align-items: center; justify-content: flex-end; gap: .5rem;
  }
  #customer-document-print[hidden],
  #job-document-print[hidden] {
    display: none !important;
  }
  .customer-print-menu-actions {
    display: flex; gap: .45rem; flex-wrap: wrap;
  }
  .customer-document-preview-content {
    width: min(54rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; padding: .75rem;
    background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 18px 50px rgba(15,23,42,.25);
  }
  .customer-document-confirm {
    width: min(28rem, calc(100vw - 2rem)); border: 0; padding: 0; background: transparent;
  }
  .customer-document-confirm::backdrop {
    background: rgba(15,23,42,.42);
  }
  .customer-document-confirm-content {
    padding: 1rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff;
    box-shadow: 0 18px 50px rgba(15,23,42,.25);
  }
  .customer-document-confirm-content h3 {
    margin: 0; font-size: 1rem;
  }
  .customer-document-confirm-content p {
    margin: .45rem 0 .9rem; color: #486581; font-size: .85rem;
  }
  .customer-document-confirm-content > div {
    display: flex; justify-content: flex-end; gap: .45rem;
  }
  .app-confirm-dialog {
    width: min(28rem, calc(100vw - 2rem)); border: 0; padding: 0; background: transparent;
  }
  .app-confirm-dialog::backdrop {
    background: rgba(15,23,42,.42);
  }
  .app-confirm-dialog-content {
    padding: 1rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff;
    box-shadow: 0 18px 50px rgba(15,23,42,.25);
  }
  .app-confirm-dialog-content h3 {
    margin: 0; font-size: 1rem;
  }
  .app-confirm-dialog-content p {
    margin: .45rem 0 .9rem; color: #486581; font-size: .85rem;
  }
  .app-confirm-dialog-content > div {
    display: flex; justify-content: flex-end; gap: .45rem;
  }
  @media (max-width: 560px) {
    .print-document--commercial {
      padding: 1.15rem;
    }
    .print-document-masthead {
      flex-direction: column; gap: 1rem;
    }
    .print-document-meta {
      text-align: left;
    }
    .print-document-bill-to {
      grid-template-columns: 1fr; gap: .35rem;
    }
    .print-document-bill-to-contact {
      padding-left: 0; border-left: 0;
    }
    .print-document-table-head,
    .print-document-line {
      grid-template-columns: minmax(0,1fr) 5rem;
    }
    .print-document-table-head span:nth-child(2),
    .print-document-line > span:nth-child(2) {
      display: none;
    }
  }
  .contact-compact-row label {
    margin: 0; text-align: right; font-weight: 600; color: var(--color-text-muted);
  }
  .contact-compact-row textarea {
    resize: vertical;
  }
  .contact-full-row {
    grid-column: 1 / -1;
  }
  .barcode-preview {
    border: 1px solid var(--color-border); border-radius: 0.6rem; background: #f8fafc; min-height: 3rem;
    padding: 0.55rem 0.65rem; white-space: pre-wrap; word-break: break-word;
  }
  .barcode-token-pill {
    display: inline-flex; align-items: center; justify-content: center; border: 1px solid #a5b9cf;
    border-radius: 999px; padding: 0.1rem 0.45rem; margin: 0 0.12rem; background: #e8f1fa; font-size: 0.8rem;
    font-weight: 700; line-height: 1.2; color: #1a4f84;
  }
  .barcode-controls-card {
    margin-top: 0.4rem; gap: 0.95rem;
  }
  .barcode-controls-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.85rem;
  }
  @media (max-width: 900px) {
    .barcode-maker-grid,
    .barcode-contact-grid {
      grid-template-columns: 1fr;
    }
    .contact-compact-row {
      grid-template-columns: 84px minmax(0, 1fr);
    }
  }
}

/* Specialized content and interaction mechanics */
@layer content {
  .inventory-barcode-editor [data-barcode-rows] {
    display: grid; gap: 6px; margin-bottom: 6px;
  }
  .inventory-barcode-row {
    display: flex; align-items: center; gap: 6px;
  }
  .inventory-barcode-row input {
    flex: 1 1 0; min-width: 0; width: 100%;
  }
  .inventory-barcode-row button {
    flex: 0 0 auto;
  }
  .inventory-item-name-heading {
    display: flex; align-items: baseline; gap: var(--ds-space-1); min-width: 0;
  }
  .inventory-item-name-heading h3 {
    overflow-wrap: anywhere;
  }
  body[data-ui-system="v1"] .inventory-item-name-heading .inventory-name-edit {
    display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; cursor: pointer;
  }
  .inventory-name-edit:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 2px;
  }
  .inventory-name-suggest {
    margin-top: var(--ds-space-1);
  }
  body[data-ui-system="v1"] dialog.inventory-name-dialog[open] {
    width: min(36rem, calc(100vw - 24px));
  }
  .inventory-name-field,
  .inventory-name-actions {
    margin-top: var(--ds-space-3);
  }
  .inventory-name-field input {
    width: 100%; box-sizing: border-box;
  }
  body[data-ui-system="v1"] dialog.inventory-item-dialog[open] {
    width: min(940px, calc(100vw - 32px)); padding: var(--ds-space-4);
  }
  body[data-ui-system="v1"] .inventory-item-dialog .modal-content {
    width: 100%; max-width: none; padding: 0; margin: 0; border: 0; box-shadow: none; background: transparent;
  }
  .inventory-item-dialog .modal-header > div {
    min-width: 0;
  }
  .inventory-item-dialog .form-row {
    margin: 0;
  }
  .inventory-item-dialog .form-grid {
    gap: var(--ds-space-2);
  }
  .inventory-item-dialog :is(input:not([type=hidden]), select) {
    width: 100%; box-sizing: border-box;
  }
  .inventory-item-dialog fieldset {
    background: var(--ds-surface-quiet); border: 1px solid var(--ds-border); padding: var(--ds-space-3);
    border-radius: var(--ds-radius-control);
  }
  .inventory-item-dialog .form-label {
    display: block;
  }
  .pricing-item-title-line {
    display: flex; align-items: baseline; gap: var(--ds-space-1); min-width: 0;
  }
  .pricing-item-title-line h3 {
    overflow-wrap: anywhere; margin: 0;
  }
  body[data-ui-system="v1"] .pricing-item-title-line .inventory-name-edit {
    display: inline-flex; flex: 0 0 auto; align-items: center; cursor: pointer;
  }
  body[data-ui-system="v1"] .ui-autocomplete {
    position: fixed; z-index: 10; overflow: auto; background: var(--ds-surface); color: var(--ds-text);
    border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-control);
    font-size: var(--ds-font-body); font-weight: 400;
  }
  .ui-autocomplete[hidden] {
    display: none;
  }
  .ui-autocomplete ul {
    list-style: none; margin: 0; padding: 0;
  }
  .ui-autocomplete [role="option"] {
    padding: 5px 9px; cursor: pointer; overflow-wrap: anywhere;
  }
  body[data-ui-system="v1"] .ui-autocomplete [aria-selected="true"] {
    background: var(--ds-action); color: var(--ds-action-text);
  }
  body[data-ui-system="v1"] .ui-autocomplete [role="option"]:hover:not([aria-selected="true"]) {
    background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] .ui-autocomplete-hint {
    padding: var(--ds-space-1) var(--ds-space-2); border-top: 1px solid var(--ds-border);
    color: var(--ds-text-muted); font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] .ui-autocomplete [role="option"] small {
    display: block; font-size: var(--ds-font-metadata); color: inherit;
  }
  .ui-file-dropzone {
    box-sizing: border-box; display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: center;
    justify-items: stretch; gap: .2rem .6rem; min-width: 0; padding: .5rem .6rem;
    border: 2px dashed var(--ds-border-strong, var(--border, #9fb3c8)); border-radius: 8px;
    background-color: var(--ds-surface-quiet, #f5f8fb);
    background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(31,103,178,.035) 10px 11px);
    text-align: left; transition: border-color .15s, background-color .15s, box-shadow .15s;
  }
  .ui-file-dropzone:focus-within {
    border-color: var(--focus, #2684ff);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus, #2684ff) 18%, transparent);
  }
  .ui-file-dropzone.is-dragging {
    border-color: var(--link, #1f67b2); background-color: var(--focus-bg, #edf5ff);
    background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(31,103,178,.08) 10px 11px);
  }
  .ui-file-dropzone__icon {
    grid-column: 1; grid-row: 1; width: 1.7rem; height: 1.7rem; justify-self: center; color: var(--link, #1f67b2);
  }
  .ui-file-dropzone__content {
    grid-column: 2; grid-row: 1; display: grid; gap: .12rem; min-width: 0;
  }
  .ui-file-dropzone__copy {
    margin: 0; color: var(--text, #334e68); font-size: .82rem; font-weight: 650; line-height: 1.2;
  }
  .ui-file-dropzone__hint,
  .ui-file-dropzone small {
    color: var(--muted-text, #52677d); font-size: .7rem; line-height: 1.2;
  }
  .ui-file-dropzone__actions {
    display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; min-width: 0; margin-top: .15rem;
  }
  .ui-file-dropzone__name {
    min-width: 0; overflow-wrap: anywhere;
  }
  .ui-file-dropzone__input {
    position: absolute; width: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
    clip-path: inset(50%);
  }
  body[data-ui-system="v1"] .ui-file-dropzone [hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .ui-file-dropzone .ui-file-dropzone__name {
    white-space: normal; text-align: left;
  }
  body[data-ui-system="v1"] .ui-file-dropzone .ui-file-dropzone__name:disabled {
    cursor: default;
  }
  .custom-order-item-grid,
  .custom-component-row {
    display: grid; gap: .55rem; align-items: end;
  }
  .custom-order-item-grid {
    grid-template-columns: minmax(0,1fr) 7rem 8rem;
  }
  .custom-order-components {
    position: relative; margin-top: .8rem;
  }
  .custom-order-components h4 {
    margin: .3rem 0;
  }
  .custom-order-components>input {
    width: 100%; box-sizing: border-box;
  }
  .custom-component-row {
    grid-template-columns: minmax(10rem,1fr) minmax(5rem,.6fr) auto; margin: .45rem 0; padding: .5rem;
    border: 1px solid #dbe4ef; border-radius: 6px;
  }
  .custom-component-row input {
    min-width: 0;
  }
  .custom-component-row small {
    color: #64748b;
  }
  @media (max-width:700px) {
    .custom-order-item-grid {
      grid-template-columns: 1fr;
    }
    .custom-component-row {
      grid-template-columns: 1fr 1fr;
    }
    .custom-component-row strong {
      grid-column: 1/-1;
    }
  }
  .job-toolbar {
    display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .8rem 0;
  }
  .job-table-wrap {
    overflow: auto;
  }
  .job-table {
    width: 100%; border-collapse: collapse;
  }
  .job-table th,
  .job-table td {
    padding: .65rem; text-align: left; border-bottom: 1px solid #ddd;
  }
  .job-dialog {
    border-radius: 12px;
  }
  .job-dialog label {
    display: block; margin: .6rem 0;
  }
  .job-dialog input:not([type=checkbox]):not([type=color]),
  .job-dialog select,
  .job-dialog textarea {
    max-width: 100%;
  }
  .job-fields {
    display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: .5rem;
  }
  .job-timeline-entry {
    display: flex; align-items: baseline; gap: .45rem; border-left: 3px solid #ddd; padding: .35rem .55rem;
    margin: .25rem 0; white-space: normal; line-height: 1.35;
  }
  .job-timeline-entry small {
    flex: 0 0 auto; color: #64748b; white-space: nowrap;
  }
  .job-timeline-entry small::after {
    content: "·"; margin-left: .45rem; margin-right: .45rem;
  }
  .job-timeline-entry p {
    display: inline; margin: 0; white-space: pre-wrap;
  }
  .job-timeline-entry details {
    display: inline; margin: 0;
  }
  .job-timeline-entry button {
    flex: 0 0 auto;
  }
  .job-rule {
    padding: .5rem; background: #f3f4f6; margin: .5rem 0;
  }
  .job-error {
    color: #b91c1c;
  }
  #scan-video {
    width: 100%;
  }
  .job-selected-customer-card {
    flex-wrap: wrap;
  }
  .job-selected-customer-card>span {
    display: flex; flex-direction: column; min-width: 0;
  }
  .print-job-row {
    cursor: pointer;
  }
  .print-job-row:hover,
  .print-job-row:focus {
    background: var(--hover-bg,#f1f5f9); outline: none;
  }
  .print-jobs-page .print-jobs-top-grid {
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  }
  .print-jobs-page .toolbar-left {
    display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .5rem;
  }
  .print-jobs-page .toolbar-left .search-input {
    min-width: min(32rem,70vw);
  }
  .job-dialog {
    border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%;
    overflow: visible;
  }
  .job-dialog::backdrop {
    background: rgba(15,23,42,.58);
  }
  .job-dialog .modal-content {
    width: min(760px,calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; margin: 1rem auto;
    border-radius: 12px; background: #fff; box-shadow: 0 20px 60px rgba(15,23,42,.28); padding: 1.25rem;
  }
  .job-dialog .modal-content>h3 {
    margin-top: 0;
  }
  .job-dialog .modal-content>form {
    margin: 0;
  }
  .job-dialog .modal-content>form>header {
    border-bottom: 1px solid #e2e8f0; padding-bottom: .65rem;
  }
  .job-dialog #existing-job-controls {
    border-top: 1px solid #e2e8f0; margin-top: 1rem; padding-top: 1rem;
  }
  .job-dialog #job-timeline {
    max-height: 20rem; overflow: auto; border: 1px solid #e2e8f0; border-radius: 6px;
  }
  .job-dialog #detail-fields {
    border: 1px solid #e2e8f0; border-radius: 6px; padding: .65rem; margin: .75rem 0;
  }
  .job-dialog #detail-fields label {
    margin: .25rem 0;
  }
  .job-dialog #detail-fields label input,
  .job-dialog #detail-fields label select,
  .job-dialog #detail-fields label textarea {
    display: block; width: 100%; box-sizing: border-box;
  }
  .job-dialog #existing-job-controls h4 {
    margin-bottom: .35rem;
  }
  .job-dialog #job-timeline {
    gap: 0; padding: .35rem .5rem;
  }
  .job-dialog #job-timeline>section {
    margin: 0; padding: 0;
  }
  .job-dialog #job-timeline .job-timeline-entry {
    display: block; margin: 0; padding: .25rem .55rem; line-height: 1.2;
  }
  .job-dialog #job-timeline .job-timeline-entry small {
    display: inline;
  }
  .job-dialog #job-timeline .job-timeline-action {
    display: inline; vertical-align: baseline;
  }
  .job-dialog #job-timeline .job-comment-entry {
    position: relative; padding-right: 4rem;
  }
  .job-dialog #job-timeline .job-comment-entry .job-timeline-action {
    position: absolute; top: 50%; transform: translateY(-50%); margin: 0; display: inline-flex;
  }
  .job-dialog #job-timeline .job-comment-entry .job-timeline-edit {
    right: 2.1rem;
  }
  .job-dialog #job-timeline .job-comment-entry .job-timeline-remove {
    right: .55rem;
  }
  .comment-edit-dialog[open] {
    display: block; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: min(1000px,calc(100vw - 2rem)); height: auto; max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem); margin: 0; padding: .75rem;
  }
  .comment-edit-dialog .modal-content {
    width: auto; height: auto; margin: 0; padding: 0;
  }
  .comment-edit-dialog .modal-content>form>header {
    padding: 0 0 .5rem; margin: 0 0 .5rem; border-bottom: 0;
  }
  .comment-edit-dialog .modal-header h3 {
    margin: 0;
  }
  .comment-edit-dialog textarea {
    display: block; width: 100%; box-sizing: border-box; resize: vertical;
  }
  .comment-edit-dialog .job-save-row {
    margin-top: .5rem;
  }
  .job-dialog #project-fields {
    display: grid; grid-template-columns: minmax(12rem,1fr) 4rem 5rem 5.5rem; align-items: center; gap: .2rem .5rem;
    margin: .4rem 0;
  }
  .job-dialog #project-fields>div {
    display: contents;
  }
  .job-dialog #project-fields .project-field-heading {
    display: contents; font-size: .76rem; color: var(--color-text-muted);
  }
  .job-dialog #project-fields input[type=checkbox] {
    justify-self: center;
  }
  .job-dialog #project-fields>div>span {
    min-width: 0;
  }
  .job-dialog #project-fields>div>label {
    display: inline-flex; justify-self: center; margin: 0;
  }
  .job-dialog #project-fields>div>label input {
    margin: 0;
  }
  #setup-dialog {
    width: min(1050px,96vw); padding: .75rem;
  }
  #setup-dialog>h3 {
    display: inline-block; margin: .15rem .75rem .5rem 0;
  }
  #setup-dialog>button[data-close] {
    float: right; margin: 0 0 .35rem;
  }
  .job-dialog fieldset {
    clear: both; padding: .45rem .6rem; margin: .45rem 0;
  }
  .job-dialog fieldset legend {
    padding: 0 .25rem; font-weight: 600; font-size: .9rem;
  }
  .job-dialog fieldset>label {
    display: inline-flex; align-items: center; gap: .2rem; margin: .1rem .35rem .1rem 0; vertical-align: middle;
    white-space: nowrap; font-size: .82rem;
  }
  .job-dialog fieldset>label input:not([type=checkbox]):not([type=color]),
  .job-dialog fieldset>label select {
    width: auto; min-width: 5.5rem;
  }
  .job-dialog fieldset>label textarea {
    vertical-align: middle;
  }
  .job-dialog fieldset>.job-toolbar {
    margin: .25rem 0;
  }
  .job-dialog fieldset>div[id$="-fields"],
  .job-dialog fieldset>div[id$="-options"],
  .job-dialog fieldset>div[id$="-steps"],
  .job-dialog fieldset>div[id$="-groups"] {
    display: flex; flex-wrap: wrap; align-items: center; gap: .25rem;
  }
  .job-dialog fieldset>div[id$="-fields"]>div,
  .job-dialog fieldset>div[id$="-options"]>div,
  .job-dialog fieldset>div[id$="-steps"]>.job-rule,
  .job-dialog fieldset>div[id$="-groups"]>.job-rule {
    display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; padding: .25rem .35rem; margin: .1rem 0;
  }
  .job-dialog fieldset>div[id$="-fields"]>div {
    background: #f8fafc; border: 1px solid #e2e8f0;
  }
  .job-dialog fieldset>div[id$="-steps"]>.job-rule,
  .job-dialog fieldset>div[id$="-groups"]>.job-rule {
    flex: 1 1 100%; background: #f3f4f6;
  }
  .job-dialog fieldset h4 {
    display: inline-block; margin: .35rem .65rem .2rem 0; font-size: .9rem;
  }
  .job-dialog fieldset p {
    display: inline; margin: .15rem .5rem .15rem 0; font-size: .82rem;
  }
  .job-dialog fieldset button {
    margin: .1rem .2rem .1rem 0;
  }
  @media (max-width:700px) {
    #setup-dialog {
      padding: .6rem;
    }
    .job-dialog fieldset>label {
      white-space: normal; flex-wrap: wrap;
    }
    .job-dialog fieldset>label input:not([type=checkbox]):not([type=color]),
    .job-dialog fieldset>label select {
      min-width: 8rem;
    }
    .job-dialog fieldset>div[id$="-steps"]>.job-rule,
    .job-dialog fieldset>div[id$="-groups"]>.job-rule {
      overflow-x: auto;
    }
  }
  .job-dialog article {
    margin: 1rem 0; padding-top: .85rem; border-top: 1px solid #e2e8f0;
  }
  .job-dialog article h4 {
    margin: .1rem 0 .5rem;
  }
  .job-dialog .comment-tabs {
    display: flex; gap: .25rem; border-bottom: 1px solid #cbd5e1; margin-bottom: .75rem;
  }
  .job-dialog .comment-tab {
    border: 0; border-bottom: 2px solid transparent; background: transparent; color: #475569; padding: .45rem .7rem;
    cursor: pointer;
  }
  .job-dialog .comment-tab.active {
    border-bottom-color: #2563eb; color: #1d4ed8; font-weight: 600;
  }
  .job-dialog .comment-panel[hidden] {
    display: none;
  }
  .job-dialog .history-section {
    margin-top: 1.25rem;
  }
  .job-dialog .job-timeline-action {
    display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent;
    box-shadow: none; padding: 0; margin-left: .55rem; min-width: 0; width: 1em; height: 1em; font-size: 1rem;
    line-height: 1; color: #475569; cursor: pointer;
  }
  .job-dialog .job-timeline-action:hover,
  .job-dialog .job-timeline-action:focus-visible {
    background: transparent; color: #0f172a;
  }
  .job-dialog .job-timeline-remove {
    font-size: 1.15rem; font-weight: 600;
  }
  .job-dialog .comment-tab:disabled {
    color: #94a3b8; cursor: not-allowed;
  }
  .job-timeline-entry p>details,
  .job-timeline-entry p>details>summary {
    display: inline;
  }
  .job-timeline-entry p>details>summary {
    list-style: none; cursor: pointer;
  }
  .job-timeline-entry p>details>summary::-webkit-details-marker {
    display: none;
  }
  .job-dialog #job-timeline .job-timeline-expandable {
    cursor: pointer;
  }
  .job-dialog #job-timeline .job-timeline-expandable:focus-visible {
    outline: 2px solid #2563eb; outline-offset: -2px;
  }
  .job-dialog #job-timeline .job-timeline-expandable>details>summary,
  .job-dialog #job-timeline .job-timeline-expandable p>details>summary {
    display: none;
  }
  .job-dialog #job-timeline .job-timeline-expandable>details {
    display: block; margin: 0;
  }
  .job-dialog #job-timeline .job-timeline-expandable>details[open] {
    margin-top: .35rem; padding-top: .35rem; border-top: 1px solid #e2e8f0;
  }
  .job-dialog #job-timeline .job-timeline-expandable>details>*:not(summary) {
    cursor: default;
  }
  .job-dialog:not([open]) {
    display: none;
  }
  .job-dialog[open] {
    display: block;
  }
  dialog.job-dialog,
  dialog#setup-dialog {
    position: fixed; inset: 0; transform: none; margin: 0; padding: 0; width: 100%; height: 100%; max-width: none;
    max-height: none; box-sizing: border-box; border-radius: 0; box-shadow: none; overflow: hidden;
  }
  dialog.job-dialog > .modal-content {
    height: auto; box-sizing: border-box; max-height: calc(100dvh - 2rem); margin: 1rem auto; overflow-y: auto;
    overscroll-behavior: contain;
  }
  .job-customer-picker {
    grid-column: 1 / -1; border: 1px solid #dbe4ef; border-radius: 10px; padding: .85rem; background: #f8fafc;
  }
  .job-customer-picker h4 {
    margin: .05rem 0 .15rem;
  }
  .job-customer-picker>input {
    display: block; width: 100%; box-sizing: border-box;
  }
  .job-customer-no-results {
    margin: 0; padding: .5rem; color: #64748b; font-size: .85rem;
  }
  .job-selected-customer {
    margin: .55rem 0;
  }
  .job-selected-customer-card {
    display: flex; justify-content: space-between; align-items: center; gap: .75rem; background: #e0f2fe;
    border: 1px solid #7dd3fc; border-radius: 7px; padding: .6rem;
  }
  .job-selected-customer-card small {
    display: block; color: #075985;
  }
  .customer-create-grid {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem;
  }
  .customer-create-grid label {
    margin: 0;
  }
  .customer-create-grid input,
  .customer-create-grid textarea {
    display: block; width: 100%; box-sizing: border-box;
  }
  .customer-create-notes {
    grid-column: 1 / -1;
  }
  @media (max-width:650px) {
    .customer-create-grid {
      grid-template-columns: 1fr;
    }
    .customer-create-notes {
      grid-column: auto;
    }
  }
  .job-field-control {
    display: flex; align-items: center; gap: .4rem;
  }
  .job-field-control>input,
  .job-field-control>select,
  .job-field-control>textarea {
    flex: 1 1 auto; min-width: 0;
  }
  .job-field-save {
    flex: 0 0 auto; width: 1.9rem; height: 1.9rem; padding: 0; border: 1px solid #cbd5e1; border-radius: 5px;
    background: #fff; color: #1e3a5f; cursor: pointer;
  }
  .job-field-save:disabled {
    opacity: .45; cursor: not-allowed;
  }
  .job-order-panel {
    background: #f8fafc; border: 1px solid #dbe4ef; border-radius: 8px; padding: 1rem; box-sizing: border-box;
  }
  .job-order-heading {
    display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start;
  }
  .job-order-heading h4 {
    margin: .1rem 0;
  }
  .job-order-heading p {
    margin: .15rem 0; color: #64748b;
  }
  .job-order-controls {
    display: grid; grid-template-columns: minmax(16rem,1.4fr) minmax(12rem,1.2fr) 9rem auto auto; align-items: end;
    gap: .6rem;
  }
  .job-order-controls label,
  .job-order-recipe-picker {
    margin: .35rem 0 0; min-width: 0;
  }
  .job-order-controls input,
  .job-order-controls select {
    display: block; box-sizing: border-box; width: 100%; min-width: 0;
  }
  .job-order-recipe-picker>span {
    display: block;
  }
  .job-order-search-row {
    display: flex; gap: .35rem; align-items: center;
  }
  .job-order-search-row input {
    flex: 1 1 auto; min-width: 0;
  }
  .job-order-recipe-results {
    position: absolute; z-index: 5; left: 0; right: 0; display: grid; gap: .3rem; margin-top: .3rem; padding: .3rem;
    background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; box-shadow: 0 8px 20px #0f172a22;
  }
  .job-order-recipe-picker {
    position: relative;
  }
  .job-order-recipe-result {
    display: flex; justify-content: space-between; gap: .6rem; text-align: left; background: #fff;
    border: 1px solid #e2e8f0; border-radius: 5px; padding: .45rem; cursor: pointer;
  }
  .job-order-recipe-result:hover,
  .job-order-recipe-result:focus {
    border-color: #2563eb; background: #eff6ff;
  }
  .job-order-recipe-result small {
    display: block; color: #64748b;
  }
  .job-order-items {
    display: grid; gap: .5rem; margin: .65rem 0;
  }
  .job-order-item {
    border: 1px solid #cbd5e1; border-radius: 7px; background: white; overflow: hidden;
  }
  .job-order-item>summary {
    cursor: pointer; display: grid; gap: .75rem; align-items: center; padding: .65rem;
  }
  .job-order-item>summary::marker {
    color: #64748b;
  }
  .job-order-item .order-item-description {
    min-width: 0; overflow-wrap: anywhere;
  }
  .job-order-item .order-item-recipe {
    display: block; color: #64748b; font-size: .78rem;
  }
  .job-order-money {
    font-family: "Roboto Mono",monospace; white-space: nowrap;
  }
  .job-order-detail {
    padding: .65rem; border-top: 1px solid #e2e8f0;
  }
  .job-order-metrics {
    display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .35rem; margin-bottom: .6rem;
  }
  .job-order-metrics span {
    display: flex; flex-direction: column; color: #64748b; font-size: .75rem;
  }
  .job-order-metrics strong {
    color: #102a43; font-size: .85rem;
  }
  .job-order-table {
    width: 100%; border-collapse: collapse; font-size: .8rem;
  }
  .job-order-table th,
  .job-order-table td {
    padding: .35rem; border-bottom: 1px solid #e2e8f0; text-align: right;
  }
  .job-order-table th:first-child,
  .job-order-table td:first-child {
    text-align: left; overflow-wrap: anywhere;
  }
  .job-order-actions {
    display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem;
  }
  .job-order-add {
    border-top: 1px solid #dbe4ef; margin-top: .65rem; padding-top: .6rem;
  }
  .job-order-add h5 {
    margin: .1rem 0;
  }
  @media (max-width:700px) {
    .job-order-controls {
      grid-template-columns: 1fr 1fr;
    }
    .job-order-controls button {
      grid-column: 1/-1;
    }
    .job-order-item>summary {
      grid-template-columns: minmax(0,1fr) max-content;
    }
    .job-order-item>summary>:nth-child(n/**/+3) {
      display: none;
    }
    .job-order-metrics {
      grid-template-columns: repeat(2,1fr);
    }
  }
  .job-order-item>summary {
    grid-template-columns: max-content minmax(0,1fr) max-content max-content;
  }
  .job-order-inline-edit {
    cursor: pointer; white-space: nowrap;
  }
  .job-order-recipe-detail {
    margin: 0 0 .55rem; color: #64748b; font-size: .82rem;
  }
  .job-order-metrics {
    text-align: center;
  }
  .job-order-metrics span {
    align-items: center;
  }
  .job-order-panel [hidden] {
    display: none !important;
  }
  .job-order-item .order-item-description>strong {
    display: block;
  }
  .job-order-item .order-item-description>.order-item-number {
    display: block; margin-top: 1px; color: #627d98; font: .68rem/1.2 "Roboto Mono",monospace;
  }
  .job-order-item .order-item-production-summary {
    display: block; margin-top: 1px; color: #64748b; font-size: .72rem; font-weight: 400; line-height: 1.25;
  }
  dialog.order-item-edit-dialog:not([open]) {
    display: none;
  }
  dialog.order-item-edit-dialog {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(440px,calc(100vw - 2rem));
    height: auto; max-width: calc(100vw - 2rem); max-height: calc(100vh - 2rem); margin: 0; padding: 0;
    border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; box-shadow: 0 20px 60px rgba(15,23,42,.28);
    overflow: hidden;
  }
  dialog.order-item-edit-dialog .modal-content {
    display: block; width: 100%; height: auto; min-height: 0; max-width: none; max-height: none; margin: 0;
    padding: 1.25rem; box-sizing: border-box; overflow: hidden;
  }
  dialog.order-item-edit-dialog form {
    width: 100%; box-sizing: border-box;
  }
  dialog.order-item-edit-dialog::backdrop {
    background: rgba(15,23,42,.58);
  }
  dialog.order-item-edit-dialog label {
    display: block; margin: .7rem 0;
  }
  dialog.order-item-edit-dialog input {
    display: block; box-sizing: border-box; width: 100%;
  }
  dialog#custom-order-item-dialog {
    display: block; inset: auto; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: min(760px,calc(100vw - 2rem)); height: auto; max-height: calc(100dvh - 2rem); margin: 0; padding: 0;
    overflow: auto;
  }
  dialog#custom-order-item-dialog:not([open]) {
    display: none !important;
  }
  dialog#custom-order-item-dialog > .modal-content {
    display: block; height: auto; min-height: 0; width: 100%; margin: 0; padding: 1.25rem; overflow: visible;
  }
  #custom-order-item-dialog form {
    margin: 0;
  }
  #custom-order-item-dialog .modal-header {
    padding: 0 0 .75rem; margin: 0 0 .75rem; align-items: flex-start; gap: 1rem;
  }
  #custom-order-item-dialog .modal-header h3 {
    margin: 0;
  }
  #custom-order-item-dialog .modal-subtitle {
    margin: .35rem 0 0; font-weight: 400;
  }
  #custom-order-item-dialog label {
    margin: 0; min-width: 0;
  }
  #custom-order-item-dialog .custom-order-item-grid {
    margin: 0 0 1rem;
  }
  #custom-order-item-dialog .custom-order-components {
    margin: 0;
  }
  #custom-order-item-dialog .custom-order-specification {
    margin: 0 0 1rem; padding-top: .65rem; border-top: 1px solid #e2e8f0;
  }
  #custom-order-item-dialog .custom-order-specification h4,
  #custom-order-item-dialog .custom-order-components h4 {
    margin: 0 0 .5rem;
  }
  #custom-order-item-dialog #custom-component-results {
    position: static; margin: .5rem 0; max-height: 14rem; overflow: auto;
  }
  #custom-order-item-dialog [hidden] {
    display: none !important;
  }
  #custom-order-item-dialog #custom-order-components {
    display: grid; gap: .5rem; margin: .75rem 0;
  }
  #custom-order-item-dialog .custom-component-row {
    margin: 0;
  }
  #custom-order-item-dialog .custom-component-catalog {
    grid-template-columns: 1.25rem minmax(0,1fr) minmax(9rem,.5fr) 4rem; align-items: center; gap: .5rem;
    padding: .35rem .5rem;
  }
  #custom-order-item-dialog .custom-component-catalog strong {
    grid-column: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: .85rem;
  }
  #custom-order-item-dialog .custom-component-catalog small {
    white-space: nowrap; font-size: .75rem; text-align: right; justify-self: end;
  }
  #custom-order-item-dialog .custom-component-catalog input {
    margin: 0; text-align: right;
  }
  #custom-order-item-dialog .custom-component-calculation {
    grid-column: 2 / -1; color: #475569; font-size: .75rem; text-align: left; justify-self: start;
    white-space: normal;
  }
  #custom-order-item-dialog .custom-component-remove {
    border: 0; background: transparent; color: #dc2626; cursor: pointer; padding: 0; margin: 0; font-size: 1.25rem;
    line-height: 1; width: 1.25rem;
  }
  #custom-order-item-dialog .custom-component-remove:hover {
    color: #991b1b;
  }
  #custom-order-item-dialog .custom-component-remove:focus-visible {
    outline: 2px solid #dc2626; outline-offset: 2px;
  }
  #custom-order-item-dialog .custom-component-add-row {
    display: flex; gap: .5rem; align-items: center;
  }
  #custom-order-item-dialog .custom-component-add-row input {
    flex: 1; min-width: 0; margin: 0;
  }
  #custom-order-item-dialog .custom-component-add-row button {
    flex: none; white-space: nowrap; margin: 0;
  }
  #custom-order-item-dialog .custom-component-manual {
    grid-template-columns: 1.25rem minmax(0,1fr) minmax(9rem,.5fr) 4rem; align-items: center; gap: .5rem;
    padding: .5rem;
  }
  #custom-order-item-dialog .custom-component-manual strong {
    display: none;
  }
  #custom-order-item-dialog .custom-component-manual .manual-component-name {
    grid-column: 2; grid-row: 1;
  }
  #custom-order-item-dialog .custom-component-manual .manual-component-quantity {
    grid-column: 3; grid-row: 1; text-align: right;
  }
  #custom-order-item-dialog .custom-component-manual .manual-component-unit {
    grid-column: 4; grid-row: 1; text-align: right;
  }
  #custom-order-item-dialog .custom-component-manual .manual-component-sale {
    grid-column: 2; grid-row: 2;
  }
  #custom-order-item-dialog .custom-component-manual .manual-component-cost {
    grid-column: 3 / 5; grid-row: 2;
  }
  #custom-order-item-dialog .custom-component-manual .custom-component-calculation {
    grid-row: 3;
  }
  #custom-order-item-dialog .custom-component-manual input {
    margin: 0;
  }
  #custom-order-item-dialog #custom-order-preview {
    margin: .75rem 0;
  }
  #custom-order-item-dialog #custom-order-batch-preview {
    margin: -.55rem 0 .85rem; min-height: 1rem; font-size: 12px; line-height: 1rem; font-weight: 600;
    font-variant-numeric: tabular-nums; color: #1e3a5f;
  }
  #custom-order-item-dialog .job-save-row {
    margin: 0;
  }
  #custom-order-item-dialog .custom-order-output-control {
    position: relative; display: block;
  }
  #custom-order-item-dialog .custom-order-output-control button {
    position: absolute; top: 50%; right: .45rem; transform: translateY(-50%); cursor: pointer;
  }
  #custom-order-item-dialog .custom-order-output-control button[hidden] {
    display: none !important;
  }
  dialog#batch-output-unlock-dialog {
    position: fixed; inset: 50% auto auto 50%; transform: translate(-50%,-50%);
    width: min(420px,calc(100vw - 2rem)); margin: 0; padding: 1.25rem; border: 1px solid #cbd5e1;
    border-radius: 12px; background: #fff; box-shadow: 0 20px 60px rgba(15,23,42,.3); color: #102a43;
  }
  dialog#batch-output-unlock-dialog:not([open]) {
    display: none;
  }
  dialog#batch-output-unlock-dialog::backdrop {
    background: rgba(15,23,42,.62);
  }
  #batch-output-unlock-dialog h3 {
    margin: 0 0 .65rem; font-size: 1.05rem;
  }
  #batch-output-unlock-dialog p {
    margin: .5rem 0; color: #486581; line-height: 1.45;
  }
  #batch-output-unlock-dialog .job-save-row {
    display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem;
  }
  .job-order-history-section {
    margin: .55rem 0; padding: .45rem .55rem; border-left: 2px solid #94a3b8; border-radius: 0 4px 4px 0;
    background: #f8fafc; color: #64748b; font-size: .7rem;
  }
  .job-order-history-section + .job-order-history-section {
    border-top: 1px solid #e2e8f0;
  }
  .job-order-history-section > strong {
    display: block; margin: 0 0 .25rem; color: #334155; font-size: .72rem;
  }
  .job-order-history-section > p {
    margin: .15rem 0;
  }
  .job-order-history-section .job-order-table {
    font-size: .68rem;
  }
  .job-order-history-section .job-order-table th,
  .job-order-history-section .job-order-table td {
    padding: .22rem .28rem;
  }
  .job-follow-controls {
    display: flex; align-items: center; gap: .2rem;
  }
  .job-followers-count {
    min-width: 2rem;
  }
  #comment-panel {
    position: relative;
  }
  .comment-mention-suggestions {
    position: absolute; z-index: 5; left: 0; right: 0; bottom: 3.8rem; display: grid; max-height: 12rem;
    overflow: auto; padding: .25rem; border: 1px solid var(--ds-border,#cbd5e1); border-radius: 6px;
    background: var(--ds-surface,#fff); box-shadow: 0 4px 14px #102a4326;
  }
  .comment-mention-suggestions[hidden] {
    display: none;
  }
  .comment-mention-suggestions button {
    text-align: left;
  }
  .job-followers-list {
    margin: 0; padding: 0 0 0 1.2rem;
  }
  .job-order-applied-adjustment {
    display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-2); margin: .25rem 0;
    padding: .25rem 0; border-top: 1px solid var(--ds-border); color: var(--ds-text-secondary);
    font-size: var(--ds-font-body);
  }
  .job-order-adjustments {
    margin-top: .2rem;
  }
  .order-item-financials {
    display: grid; align-self: start; gap: 0; width: 100%; min-width: 0; font-size: var(--ds-font-body,13px);
    line-height: 1.2;
  }
  .order-item-price-line,
  .job-order-price-adjustment {
    display: grid; grid-template-columns: minmax(0,1fr) max-content; align-items: start; column-gap: 8px; margin: 0;
    padding: 0;
  }
  .order-item-quantity,
  .order-item-adjustment-name {
    min-width: 0; text-align: left;
  }
  .order-item-quantity {
    white-space: nowrap;
  }
  .order-item-price-line>.job-order-money,
  .order-item-adjustment-value {
    justify-self: end; text-align: right; font-size: var(--ds-font-body,13px); line-height: 1.2;
  }
  .job-order-price-adjustment {
    color: var(--ds-text-muted,#64748b); font-size: var(--ds-font-body,13px); line-height: 1.2; white-space: normal;
  }
  @media (max-width:700px) {
    .order-item-quantity {
      display: none;
    }
  }
  .job-order-add .ui-action-summary-row > :last-child {
    display: flex; flex-direction: column; align-items: flex-end;
  }
  #job-order-adjustments {
    order: 1; width: 100%; font-variant-numeric: tabular-nums;
  }
  #job-order-summary {
    order: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; width: 100%;
    font-variant-numeric: tabular-nums;
  }
  .job-order-summary-line {
    display: flex; justify-content: space-between; gap: 1rem; width: 100%; white-space: nowrap;
  }
  .job-order-adjustment-row {
    align-items: center; margin: 0; padding: 2px 0; border: 0; color: inherit;
  }
  .job-order-adjustment-description {
    position: relative; display: block; min-width: 0;
  }
  .job-order-adjustment-remove {
    position: absolute; top: 50%; left: -1.5rem; display: inline-flex; align-items: center;
    justify-content: flex-end; transform: translateY(-50%); flex: 0 0 auto; width: 1.25rem; min-width: 1.25rem;
    height: 1.25rem; padding: 0 .15rem 0 0; border: 0; background: transparent; color: var(--ds-danger,#b42318);
    font-size: 1rem; line-height: 1;
  }
  .job-order-adjustment-remove:hover,
  .job-order-adjustment-remove:focus-visible {
    color: var(--ds-danger-strong,#8f1d14); background: transparent;
  }
  .job-order-adjustment-remove:focus-visible {
    outline: 2px solid var(--ds-focus,#1768b7); outline-offset: 1px;
  }
  #job-detail .job-order-add > .ui-action-summary-row {
    display: grid; grid-template-columns: minmax(0,1fr) 19.5rem; align-items: start; gap: 8px 12px;
  }
  #job-detail .job-order-add > .ui-action-summary-row > :last-child {
    width: 100%; margin-inline-start: 0;
  }
  #job-order-add-actions {
    display: grid; grid-template-columns: minmax(0,1fr); align-items: stretch; gap: 6px; min-width: 0;
  }
  #job-order-quick-add {
    width: 100%; max-width: 24rem; min-width: 0;
  }
  .job-order-add-buttons {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  }
  #job-order-adjustments .job-order-adjustment-remove {
    appearance: none; border: 0; box-shadow: none; background: transparent; color: var(--ds-danger,#b42318);
  }
  @media (max-width:700px) {
    #job-detail .job-order-add > .ui-action-summary-row {
      grid-template-columns: minmax(0,1fr);
    }
    #job-order-add-actions {
      min-width: 0;
    }
  }
  .job-order-history-table-scroll {
    max-width: 100%; overflow-x: auto;
  }
  .job-order-history-section .job-order-table {
    table-layout: auto;
  }
  .job-order-history-section .job-order-table th,
  .job-order-history-section .job-order-table td:not(:first-child) {
    white-space: nowrap; overflow-wrap: normal; word-break: normal;
  }
  .job-order-history-section .job-order-table td:first-child {
    white-space: normal; overflow-wrap: normal; word-break: normal;
  }
  body[data-ui-system="v1"] #job-detail #job-timeline .job-activity-document-link {
    appearance: none; display: inline; min-height: 0; min-width: 0; margin: 0; border: 0; background: transparent;
    padding: 0; font: inherit; letter-spacing: inherit; color: inherit; white-space: normal;
    vertical-align: baseline; cursor: pointer; text-align: left;
  }
  .job-activity-document-link:hover {
    text-decoration: underline;
  }
  body[data-ui-system="v1"] dialog.ui-dialog.inventory-shipment[open] {
    width: min(900px,calc(100vw - 24px)); max-width: calc(100vw - 24px);
  }
  .shipment-editor {
    display: grid; gap: var(--ds-space-3);
  }
  .shipment-location {
    width: 22rem; max-width: 100%;
  }
  .shipment-order {
    width: 12rem; max-width: 100%;
  }
  .shipment-lines {
    display: grid; gap: var(--ds-space-2); max-height: 55vh; overflow: auto; padding: var(--ds-space-1);
  }
  .shipment-line {
    display: grid; grid-template-columns: minmax(0,1fr) 8rem 7rem auto; align-items: start; gap: var(--ds-space-2);
    border-bottom: 1px solid var(--ds-border); padding-bottom: var(--ds-space-2);
  }
  .shipment-remove {
    align-self: start; margin-top: 1.4rem;
  }
  .shipment-conversion,
  .shipment-line-error {
    grid-column: 1/-1; margin: 0; overflow-wrap: anywhere; font-size: var(--ds-font-metadata);
  }
  .shipment-line-error,
  #shipment-error {
    color: var(--ds-danger);
  }
  .shipment-conversion {
    color: var(--ds-text-secondary);
  }
  .inventory-shipment [hidden] {
    display: none !important;
  }
  .shipment-summary-list {
    padding-left: 1.2rem; margin: var(--ds-space-2) 0;
  }
  @media (max-width:620px) {
    .shipment-line {
      grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto;
    }
    .shipment-item-field {
      grid-column: 1/-1;
    }
    .shipment-remove {
      margin-top: 1.4rem;
    }
  }
  .shipment-line-error:empty,
  .shipment-conversion:empty,
  #shipment-error:empty {
    display: none;
  }
  .company-branding .branding-grid {
    display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px 16px; padding: 14px;
    background: var(--ui-section); border: 1px solid var(--ui-line); border-radius: 8px;
  }
  .branding-top-controls {
    display: flex; align-items: flex-start; justify-content: flex-start; gap: 16px; flex-wrap: wrap;
  }
  .branding-top-controls > label {
    width: 280px; max-width: 100%;
  }
  .branding-top-controls > .branding-favicon {
    flex: 0 1 auto; max-width: 100%;
  }
  .company-profile-fields {
    grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px;
    padding-top: 10px; border-top: 1px solid var(--ui-line);
  }
  .company-profile-fields header {
    grid-column: 1 / -1;
  }
  .company-profile-fields header :is(h4,p) {
    margin: 0;
  }
  .company-profile-fields header p {
    margin-top: 3px;
  }
  @media (max-width: 900px) {
    .company-profile-fields {
      grid-template-columns: 1fr 1fr;
    }
  }
  @media (max-width: 640px) {
    .company-profile-fields {
      grid-template-columns: 1fr;
    }
  }
  .company-branding .branding-grid label {
    display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; font-weight: 600;
  }
  .company-branding .branding-grid input {
    width: 100%;
  }
  .company-branding .branding-actions {
    grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  }
  .company-branding .branding-actions button {
    margin-left: auto;
  }
  .company-branding .branding-favicon {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0;
  }
  .branding-column-heading {
    font-size: 13px; font-weight: 600;
  }
  .branding-favicon-controls {
    display: flex; align-items: flex-start; justify-content: flex-start; gap: 12px; flex-wrap: wrap;
  }
  .company-branding .branding-favicon input[type=file] {
    width: 260px; max-width: 100%;
  }
  .company-branding .branding-favicon .branding-checkbox {
    min-height: 36px;
  }
  .favicon-chooser {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px;
    font-weight: 600;
  }
  .company-branding .favicon-file-input {
    position: absolute; width: 1px; opacity: 0;
  }
  .company-branding .branding-grid .favicon-file-button {
    display: inline-flex; justify-content: center; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px;
    background: white; cursor: pointer;
  }
  .favicon-chooser:focus-within .favicon-file-button {
    outline: 2px solid var(--ui-accent); outline-offset: 2px;
  }
  #favicon-filename:empty {
    display: none;
  }
  #favicon-filename {
    max-width: 220px; overflow-wrap: anywhere; font-weight: 400;
  }
  @media (max-width: 1100px) {
    .company-branding .branding-grid {
      grid-template-columns: 1fr;
    }
  }
  .company-branding #branding-message {
    margin: 0; font-size: 13px;
  }
  .company-branding #branding-message:empty {
    display: none;
  }
  .company-branding .branding-grid .branding-checkbox {
    flex-direction: row; align-items: center;
  }
  .company-branding .branding-grid .branding-checkbox input {
    width: 16px;
  }
  .company-branding .branding-grid button {
    justify-self: end;
  }
  @media (max-width: 640px) {
    .company-branding .branding-grid {
      grid-template-columns: 1fr;
    }
  }
  .print-jobs-page,
  dialog.job-dialog {
    color: var(--ui-ink); font-size: 14px; line-height: 1.5;
  }
  .job-dialog :is(input, select, textarea):focus-visible,
  .print-jobs-page :is(input, select):focus-visible {
    outline: 2px solid #93c5fd; outline-offset: 1px;
  }
  .job-dialog input[type=checkbox] {
    width: 16px; accent-color: var(--ui-accent);
  }
  dialog.job-dialog > .modal-content {
    width: min(900px, calc(100vw - 32px)); padding: 24px 28px; border-radius: 14px; background: #fff;
    box-shadow: 0 24px 80px #0f172a33; border: 0; outline: none; background-clip: padding-box;
  }
  #job-detail .modal-header {
    padding: 0 0 12px; margin-bottom: 12px; align-items: flex-start;
  }
  #job-detail .modal-header h3 {
    margin: 0 0 4px; font-size: 23px; line-height: 1.25; font-weight: 650;
  }
  #job-detail .modal-subtitle {
    font-size: 13px; font-weight: 500; color: var(--ui-muted);
  }
  #job-detail .modal-meta {
    margin-top: 6px; font-size: 12px; color: var(--ui-muted);
  }
  #job-detail .job-summary-grid {
    display: grid; grid-template-columns: 2fr 1fr; gap: 10px 16px;
  }
  #job-detail .job-customer-picker {
    padding: 10px 12px; background: var(--ui-soft);
  }
  #job-detail .job-customer-picker h4 {
    margin: 0 0 5px; font-size: 12px;
  }
  #job-detail .job-selected-customer {
    margin: 0;
  }
  #job-detail .job-selected-customer-card {
    padding: 0; border: 0; background: transparent; gap: 10px;
  }
  #job-detail .job-details-footer {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: 10px;
  }
  #job-detail .job-details-footer .job-save-row {
    margin: 0;
  }
  #job-detail .job-summary-grid > label {
    display: flex; flex-direction: column; gap: 6px; margin: 0; font-weight: 600; font-size: 12px; color: #475569;
  }
  #job-detail .job-summary-grid :is(input, select, textarea) {
    width: 100%;
  }
  #job-detail .job-description-field {
    grid-column: 1 / -1;
  }
  #job-detail textarea {
    resize: vertical; width: 100%;
  }
  #job-detail .job-state-controls {
    grid-column: 1 / -1; display: flex; gap: 20px;
  }
  #job-detail .job-state-controls label {
    display: inline-flex; gap: 8px; align-items: center; margin: 0; font-size: 13px;
  }
  #job-detail article {
    margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--ui-line);
  }
  #job-detail article h4 {
    font-size: 13px; font-weight: 650; margin: 0 0 8px;
  }
  #job-detail #detail-fields {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; padding: 0; margin: 0;
    border: 0;
  }
  #job-detail #detail-fields label {
    margin: 0; font-size: 12px; font-weight: 600; color: #475569;
  }
  #job-detail #detail-fields label :is(input, select, textarea) {
    margin-top: 6px;
  }
  #job-detail .job-save-row {
    display: flex; justify-content: flex-end; margin-top: 20px;
  }
  #job-detail #existing-job-controls {
    margin-top: 12px; padding-top: 10px;
  }
  #job-detail .job-toolbar {
    gap: 10px; margin: 0 0 16px; font-size: 12px;
  }
  #job-detail .job-toolbar label {
    display: flex; gap: 8px; align-items: center; margin: 0;
  }
  #job-detail a {
    color: var(--ui-accent); text-decoration: none;
  }
  #job-detail a:hover {
    text-decoration: underline;
  }
  #job-detail code {
    color: var(--ui-muted); font-size: 11px;
  }
  #job-detail .quick-actions[hidden] {
    display: none;
  }
  #job-detail #job-timeline {
    background: var(--ui-soft); padding: 8px 10px; border: 1px solid var(--ui-line); max-height: 240px;
  }
  #job-detail .job-timeline-entry {
    border: 0; padding: 5px 0; margin: 0; display: block; font-size: 12px;
  }
  #job-detail .job-timeline-entry small {
    display: inline; font-size: 11px; color: var(--ui-muted);
  }
  #job-detail .job-timeline-entry p {
    display: inline;
  }
  #job-detail .comment-tabs {
    display: flex; gap: 6px; align-items: flex-end; margin: 0; padding: 0 8px; border: 0; position: relative;
    top: 1px; z-index: 1;
  }
  #job-detail .comment-tab {
    padding: 10px 14px; margin: 0; line-height: 1.25; border: 1px solid var(--ui-line);
    border-bottom: 1px solid var(--ui-line); border-radius: 8px 8px 0 0; background: white; color: var(--ui-muted);
    font-size: 13px; font-weight: 600; box-shadow: none;
  }
  #job-detail .comment-tab.active {
    background: var(--ui-section); color: var(--ui-ink); border-color: var(--ui-line);
    border-bottom-color: var(--ui-section); box-shadow: none;
  }
  #job-detail .comment-tab:focus-visible {
    outline: 2px solid var(--ui-accent); outline-offset: -4px;
  }
  #job-detail .comment-tab:disabled {
    color: var(--ui-muted); opacity: .5; cursor: not-allowed;
  }
  #job-detail .comment-panel {
    background: var(--ui-section); border: 1px solid var(--ui-line); border-radius: 8px; padding: 16px; margin: 0;
  }
  #job-detail .comment-panel:not([hidden]) {
    display: flex; flex-direction: column; align-items: stretch;
  }
  #job-detail .comment-panel[hidden] {
    display: none;
  }
  #job-detail .comment-panel label {
    font-size: 12px; font-weight: 600;
  }
  #job-detail .comment-panel textarea {
    margin: 0 0 10px;
  }
  .print-jobs-page #job-table {
    background: white;
  }
  .print-jobs-page #job-table thead th {
    background: var(--ui-soft); color: #475569; font-size: 12px;
  }
  .print-jobs-page #job-table td {
    font-size: 13px;
  }
  .print-jobs-page #job-message:empty,
  #setup-message:empty {
    display: none;
  }
  #setup-dialog fieldset {
    border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: var(--ui-section);
    margin: 24px 0;
  }
  #setup-dialog legend {
    color: var(--ui-ink); font-weight: 650;
  }
  #setup-dialog .workspace-header {
    display: flex; justify-content: space-between; gap: 16px; padding-bottom: 20px;
    border-bottom: 1px solid var(--ui-line);
  }
  #setup-dialog .workspace-header h3 {
    margin: 0 0 6px; font-size: 23px; line-height: 1.25;
  }
  #setup-dialog .workspace-header p {
    margin: 0; color: var(--ui-muted); font-size: 13px;
  }
  #setup-dialog fieldset {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; padding: 20px;
  }
  #setup-dialog fieldset legend {
    padding: 3px 8px; font-size: 14px; background: var(--ui-section); border-radius: 4px;
  }
  #setup-dialog fieldset > label {
    display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 0; font-size: 12px;
    font-weight: 600; color: #475569; white-space: normal;
  }
  #setup-dialog fieldset > label :is(input:not([type=checkbox]), select) {
    width: 100%; min-width: 0;
  }
  #setup-dialog fieldset > .workspace-selector {
    grid-column: 1 / -1; padding-bottom: 16px; border-bottom: 1px solid var(--ui-line);
  }
  #setup-dialog fieldset > .workspace-checkbox {
    flex-direction: row; align-items: center; align-self: end; min-height: 36px; gap: 8px;
  }
  #setup-dialog fieldset > :is(p, h4, div, button, #condition-root) {
    grid-column: 1 / -1;
  }
  #setup-dialog fieldset > p {
    display: block; margin: 0; font-size: 12px; color: var(--ui-muted);
  }
  #setup-dialog fieldset > h4 {
    margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--ui-line); font-size: 13px;
  }
  #setup-dialog fieldset button {
    margin: 0;
  }
  #setup-dialog fieldset > button {
    justify-self: start;
  }
  #setup-dialog fieldset > button.primary {
    justify-self: end;
  }
  #setup-dialog #project-fields {
    grid-template-columns: minmax(0, 1fr) 80px 90px 100px; gap: 10px 12px; padding: 12px; margin: 0;
    background: white; border: 1px solid var(--ui-line); border-radius: 8px;
  }
  #setup-dialog #project-fields > div > label {
    font-size: 0; gap: 0;
  }
  #setup-dialog #project-fields .project-field-heading {
    font-size: 12px;
  }
  #setup-dialog #project-fields .project-field-heading strong:not(:first-child) {
    text-align: center;
  }
  #setup-dialog :is(#field-options, #action-steps, #condition-groups) {
    flex-direction: column; align-items: stretch; gap: 10px;
  }
  #setup-dialog #field-options > div {
    background: white; padding: 10px 12px; border-radius: 6px; gap: 8px;
  }
  #setup-dialog #field-options > div > span {
    flex: 1; font-size: 13px;
  }
  #setup-dialog :is(#action-steps, #condition-groups) > .job-rule {
    flex: auto; padding: 12px; margin: 0; border: 1px solid var(--ui-line); border-radius: 8px; background: white;
    gap: 8px;
  }
  #setup-dialog .job-rule span {
    display: inline-flex; flex-wrap: wrap; gap: 8px;
  }
  #setup-dialog .job-toolbar {
    justify-content: flex-end; gap: 12px; margin: 0;
  }
  @media (max-width: 640px) {
    dialog.job-dialog > .modal-content {
      padding: 20px 16px; width: calc(100vw - 16px);
    }
    #job-detail .job-summary-grid,
    #job-detail #detail-fields {
      grid-template-columns: 1fr;
    }
    #job-detail .modal-header h3 {
      font-size: 20px;
    }
    #job-detail .job-toolbar {
      flex-wrap: wrap;
    }
    #setup-dialog fieldset {
      grid-template-columns: 1fr; padding: 14px;
    }
    #setup-dialog #project-fields {
      grid-template-columns: minmax(0, 1fr) 65px 75px 85px; gap: 8px;
    }
  }
  body[data-ui-system="v1"] #native-print-jobs .print-jobs-top-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "commands scan" "filters count";
    align-items: center; gap: 9px 12px; width: 100%; max-width: none;
  }
  body[data-ui-system="v1"] #native-print-jobs .print-jobs-top-left,
  body[data-ui-system="v1"] #native-print-jobs .print-jobs-top-right {
    display: contents;
  }
  body[data-ui-system="v1"] #native-print-jobs .print-jobs-button-row {
    grid-area: commands; display: flex; align-items: center; gap: 7px; margin: 0;
  }
  body[data-ui-system="v1"] #native-print-jobs .print-jobs-actions-right {
    grid-area: scan; justify-self: end;
  }
  body[data-ui-system="v1"] #native-print-jobs .toolbar-left {
    grid-area: filters; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0;
  }
  body[data-ui-system="v1"] #native-print-jobs .toolbar-right {
    grid-area: count; justify-self: end; white-space: nowrap; font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] #native-print-jobs #scan-open {
    border-color: var(--ds-border-strong); background: var(--ds-surface); color: var(--ds-text);
  }
  body[data-ui-system="v1"] #native-print-jobs #job-search {
    flex: 1 1 24rem; width: min(100%, 28rem); min-width: 12rem; max-width: 28rem;
  }
  body[data-ui-system="v1"] #native-print-jobs #job-state {
    width: 13ch;
  }
  body[data-ui-system="v1"] #native-print-jobs #filter-field {
    width: min(25ch, 100%);
  }
  body[data-ui-system="v1"] dialog#job-filter-dialog .job-filter-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 10px 14px;
    margin: 10px 0 16px;
  }
  body[data-ui-system="v1"] #native-print-jobs #job-count {
    color: inherit; opacity: 0.84; font-size: 11px; font-variant-numeric: tabular-nums;
  }
  body[data-ui-system="v1"] #native-print-jobs #job-message:empty {
    display: none;
  }
  body[data-ui-system="v1"] #native-print-jobs #job-message:not(:empty) {
    margin: 10px 0 0; font-size: 12px;
  }
  body[data-ui-system="v1"] #native-print-jobs .print-jobs-pagination {
    justify-content: flex-end; gap: 6px; margin: 9px 0 0;
  }
  body[data-ui-system="v1"] dialog.job-dialog:not([open]),
  body[data-ui-system="v1"] dialog#batch-output-unlock-dialog:not([open]) {
    display: none !important;
  }
  body[data-ui-system="v1"] dialog.job-dialog[open] > .modal-content {
    width: min(850px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: 12px auto;
    padding: 16px 20px 18px; border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-surface);
    background: var(--ds-surface); box-shadow: 0 14px 40px rgba(20, 40, 55, 0.23); color: var(--ds-text);
    font-size: var(--ds-font-body); line-height: var(--ds-line-body); overflow-y: auto;
    overscroll-behavior: contain;
  }
  body[data-ui-system="v1"] dialog.job-dialog .modal-header {
    align-items: start; gap: 12px; margin: 0 0 11px; padding: 0 0 10px; border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] #job-detail .job-dialog-header-copy {
    min-width: 0;
  }
  body[data-ui-system="v1"] #job-detail .job-title-trigger {
    display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; text-align: left; cursor: pointer;
  }
  body[data-ui-system="v1"] #job-detail .job-title-pencil {
    color: var(--ds-text-secondary); font-size: 13px; font-weight: 400;
  }
  body[data-ui-system="v1"] #job-detail .job-title-trigger:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 3px;
  }
  body[data-ui-system="v1"] #job-detail .new-job-title-input {
    width: min(32rem, 100%); box-sizing: border-box;
  }
  body[data-ui-system="v1"] #job-detail .new-job-assignee-input {
    max-width: 15rem;
  }
  body[data-ui-system="v1"] #job-detail .job-dialog-header-actions {
    display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 6px;
  }
  body[data-ui-system="v1"] #job-detail .job-dialog-header-actions .job-state-controls {
    display: flex; grid-column: auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px 12px;
  }
  body[data-ui-system="v1"] dialog.job-dialog .modal-header h3 {
    margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700;
  }
  body[data-ui-system="v1"] #job-detail .modal-header h3 {
    font-size: 19px;
  }
  body[data-ui-system="v1"] dialog.job-dialog .modal-subtitle,
  body[data-ui-system="v1"] dialog.job-dialog .modal-meta {
    margin: 3px 0 0; color: var(--ds-text-secondary); font-size: 11px;
  }
  body[data-ui-system="v1"] dialog.job-dialog :is(input:not([type="checkbox"]), select, textarea) {
    box-sizing: border-box;
  }
  body[data-ui-system="v1"] dialog.job-dialog label {
    font-size: var(--ds-font-label);
  }
  body[data-ui-system="v1"] #job-detail .job-summary-grid {
    grid-template-columns: minmax(0, 2fr) minmax(10rem, 1fr); gap: 9px 14px;
  }
  body[data-ui-system="v1"] #job-detail .job-customer-picker {
    padding: 8px 10px; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control);
    background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] #job-detail .job-customer-picker h4 {
    margin: 0 0 4px; color: var(--ds-text); font-size: var(--ds-font-label);
  }
  body[data-ui-system="v1"] #job-detail .job-customer-picker .form-help-text {
    margin: 0 0 6px; font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] #job-detail .job-customer-picker > input {
    width: 100%; max-width: 36rem;
  }
  body[data-ui-system="v1"] #job-detail .job-selected-customer-card {
    min-height: 30px; padding: 2px 0; border: 0; background: transparent;
  }
  body[data-ui-system="v1"] #job-detail .job-selected-customer-card small {
    color: var(--ds-text-secondary); font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] #job-detail .job-summary-grid > label {
    gap: 4px;
  }
  body[data-ui-system="v1"] #job-detail .job-description-field textarea {
    resize: vertical;
  }
  body[data-ui-system="v1"] #job-detail .job-description-field {
    display: block;
  }
  body[data-ui-system="v1"] #job-detail .job-inline-section-heading {
    display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
  }
  body[data-ui-system="v1"] #job-detail .job-inline-section-heading h4 {
    margin: 0; font-size: var(--ds-font-label); font-weight: 650;
  }
  body[data-ui-system="v1"] #job-detail .job-inline-edit {
    width: 24px; cursor: pointer;
  }
  body[data-ui-system="v1"] #job-detail .job-inline-edit:hover,
  body[data-ui-system="v1"] #job-detail .job-inline-edit:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 1px;
  }
  body[data-ui-system="v1"] #job-detail #detail-description {
    display: block; width: 100%; box-sizing: border-box;
  }
  body[data-ui-system="v1"] #job-detail #detail-description:read-only {
    border-color: var(--ds-border); background: var(--ds-surface-quiet); color: var(--ds-text-secondary);
    cursor: default;
  }
  body[data-ui-system="v1"] #job-detail .job-inline-edit-actions {
    display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px;
  }
  body[data-ui-system="v1"] #job-detail .job-inline-edit-actions[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] #job-detail .job-details-footer {
    align-items: center; margin-top: 10px;
  }
  body[data-ui-system="v1"] #job-detail .job-details-footer[hidden],
  body[data-ui-system="v1"] #job-detail #job-save-button[hidden] {
    display: none !important;
  }
  body[data-ui-system="v1"] #job-detail .job-state-controls {
    gap: 16px;
  }
  body[data-ui-system="v1"] #job-detail .job-state-controls label {
    gap: 6px; font-size: var(--ds-font-body); font-weight: 400;
  }
  body[data-ui-system="v1"] #job-detail .job-save-row {
    margin: 0;
  }
  body[data-ui-system="v1"] #job-detail .job-detail-section {
    margin: 11px 0 0; padding: 10px 0 0; border-top: 1px solid var(--ds-border); border-right: 0; border-bottom: 0;
    border-left: 0; border-radius: 0; background: transparent;
  }
  body[data-ui-system="v1"] #job-detail .job-detail-section h4 {
    margin: 0; color: var(--ds-text); font-size: 14px; line-height: 1.3;
  }
  body[data-ui-system="v1"] #job-detail .job-section-heading {
    display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 12px;
    margin-bottom: 8px;
  }
  body[data-ui-system="v1"] #job-detail #job-fields-save-note {
    color: var(--ds-text-muted); font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] #job-detail #detail-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; margin: 0; padding: 0; border: 0;
  }
  body[data-ui-system="v1"] #job-detail #detail-fields .job-field-label {
    display: grid; align-content: start; gap: 4px; min-width: 0; margin: 0; color: var(--ds-text-secondary);
    font-size: var(--ds-font-label); font-weight: 600;
  }
  body[data-ui-system="v1"] #job-detail #detail-fields .job-field-label:has(textarea) {
    grid-column: 1 / -1;
  }
  body[data-ui-system="v1"] #job-detail #detail-fields .job-field-control {
    min-width: 0; gap: 6px;
  }
  body[data-ui-system="v1"] #job-detail #detail-fields .job-field-control :is(input, select, textarea) {
    margin-top: 0;
  }
  body[data-ui-system="v1"] #job-detail #detail-fields .job-field-control :is(input[type="number"], input[type="date"]) {
    flex: 0 1 18ch; width: min(100%, 18ch);
  }
  body[data-ui-system="v1"] #job-detail #detail-fields .job-field-control select {
    max-width: 28rem;
  }
  body[data-ui-system="v1"] #job-detail #detail-fields .job-field-control input[type="checkbox"] {
    flex: 0 0 auto; width: 16px; margin: 6px 0;
  }
  body[data-ui-system="v1"] #job-detail .job-field-save {
    width: 31px; height: 31px; border-color: var(--ds-border-strong); border-radius: var(--ds-radius-control);
    color: var(--ds-action);
  }
  body[data-ui-system="v1"] #job-detail .job-field-save:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 2px;
  }
  body[data-ui-system="v1"] #job-detail #existing-job-controls {
    margin: 0; padding: 0; border: 0;
  }
  body[data-ui-system="v1"] #job-detail #job-deep-link {
    color: var(--ds-action); font: inherit; font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] #job-detail .job-location-trigger,
  body[data-ui-system="v1"] #job-detail .job-assignee-trigger {
    cursor: pointer; text-underline-offset: 2px;
  }
  body[data-ui-system="v1"] #job-detail :is(#job-deep-link, .job-location-trigger, .job-assignee-trigger):focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 2px;
  }
  body[data-ui-system="v1"] dialog.compact-edit-dialog[open] > .modal-content {
    width: min(28rem, calc(100vw - 24px)); max-height: none;
  }
  body[data-ui-system="v1"] .compact-edit-actions {
    display: flex; justify-content: flex-end; margin-top: 12px;
  }
  body[data-ui-system="v1"] .simple-order-catalog {
    max-height: 16rem; min-height: 4rem; overflow: auto; margin-block: 8px;
  }
  body[data-ui-system="v1"] .simple-order-selection {
    border: 0; margin: 12px 0 0; padding: 0; min-width: 0;
  }
  body[data-ui-system="v1"] .browse-order-section + .browse-order-section {
    margin-top: 16px;
  }
  body[data-ui-system="v1"] .browse-order-section > h4 {
    margin: 0 0 8px;
  }
  body[data-ui-system="v1"] dialog.job-transfer-dialog[open] > .modal-content {
    width: min(24rem, calc(100vw - 24px)); max-height: none;
  }
  body[data-ui-system="v1"] .job-transfer-actions {
    display: flex; justify-content: flex-end; margin-top: 12px;
  }
  body[data-ui-system="v1"] #job-detail .quick-actions {
    display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  }
  body[data-ui-system="v1"] #job-detail .quick-actions[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] #job-detail .quick-actions-header {
    flex: 0 0 auto; margin: 0;
  }
  body[data-ui-system="v1"] #job-detail .quick-actions-row {
    gap: 6px;
  }
  body[data-ui-system="v1"] #job-detail #job-timeline {
    max-height: min(21rem, 42vh); margin: 7px 0 0; padding: 0; overflow: auto; border: 0;
    border-top: 1px solid var(--ds-border); border-radius: 0; background: transparent;
  }
  body[data-ui-system="v1"] #job-detail #job-timeline .job-timeline-entry {
    padding: 5px 4px; border: 0; border-bottom: 1px solid var(--ds-border); border-radius: 0;
    background: transparent; color: var(--ds-text); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere;
  }
  body[data-ui-system="v1"] #job-detail #job-timeline .job-timeline-entry small {
    color: var(--ds-text-muted); font-size: 10px;
  }
  body[data-ui-system="v1"] #job-detail #job-timeline :is(pre, table) {
    max-width: 100%; overflow: auto;
  }
  body[data-ui-system="v1"] #job-detail .job-order-panel {
    padding: 10px 0 0; border: 0; border-radius: 0; background: transparent;
  }
  body[data-ui-system="v1"] #job-detail .job-order-controls {
    grid-template-columns: minmax(11rem, 2fr) minmax(9rem, 1.4fr) 7.5rem auto auto; gap: 7px;
  }
  body[data-ui-system="v1"] #job-detail .job-order-heading {
    gap: 8px; align-items: baseline;
  }
  body[data-ui-system="v1"] #job-detail .job-order-heading .form-help-text {
    margin: 2px 0 0; color: var(--ds-text-muted); font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] #job-detail #job-order-summary {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px; width: 100%; color: var(--ds-text);
    font-size: var(--ds-font-body); font-variant-numeric: tabular-nums; white-space: normal;
  }
  body[data-ui-system="v1"] #job-detail #job-order-summary .job-order-summary-line {
    white-space: nowrap;
  }
  body[data-ui-system="v1"] #job-detail .job-order-items {
    gap: 0; margin: 8px 0; border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] #job-detail .job-order-item {
    border: 0; border-bottom: 1px solid var(--ds-border); border-radius: 0; background: transparent;
  }
  body[data-ui-system="v1"] #job-detail .job-order-item:last-child {
    border-bottom: 0;
  }
  body[data-ui-system="v1"] #job-detail .job-order-items:empty {
    border-top: 0; margin: 0;
  }
  body[data-ui-system="v1"] #job-detail .job-order-item > summary {
    grid-template-columns: auto minmax(0, 1fr) 19.5rem; align-items: start; gap: 6px 12px; padding: 7px 0;
    font-size: var(--ds-font-body);
  }
  body[data-ui-system="v1"] #job-detail .job-order-item > summary:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: -2px;
  }
  body[data-ui-system="v1"] #job-detail .job-order-detail {
    margin: 0 8px 8px; padding: 8px 10px; border: 1px solid var(--ds-border); border-left: 2px solid #94a3b8;
    border-radius: 0 4px 4px 0; background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] #job-detail .job-order-metrics {
    gap: 5px; margin-bottom: 7px;
  }
  body[data-ui-system="v1"] #job-detail .job-order-detail > .form-help-text + .job-order-metrics {
    margin-top: var(--ds-space-2);
  }
  body[data-ui-system="v1"] #job-detail .job-order-table {
    min-width: 0; font-size: 11px;
  }
  body[data-ui-system="v1"] #job-detail .job-order-table :is(th, td) {
    padding: 4px 6px; border-bottom-color: var(--ds-border); font-size: 11px;
  }
  body[data-ui-system="v1"] #job-detail .job-order-add {
    margin-top: 8px; padding-top: 9px; border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] #job-detail .job-order-add-actions {
    display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; flex: 1 1 auto; min-width: 0;
    gap: 6px;
  }
  body[data-ui-system="v1"] #job-detail .job-order-add > .ui-action-summary-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 19.5rem; align-items: start; gap: 8px 12px;
  }
  body[data-ui-system="v1"] #job-detail .job-order-add > .ui-action-summary-row > :last-child {
    width: 100%; margin-inline-start: 0;
  }
  body[data-ui-system="v1"] #job-detail #job-order-adjustments .job-order-adjustment-remove {
    appearance: none; border: 0; outline-offset: 2px; box-shadow: none; background: transparent;
    color: var(--ds-danger, #b42318);
  }
  body[data-ui-system="v1"] #job-detail .job-order-add-buttons {
    display: flex; align-items: center; flex: 0 0 auto; flex-wrap: nowrap; gap: 6px;
  }
  body[data-ui-system="v1"] #job-detail .job-order-quick-add {
    flex: 0 1 auto; min-width: 0; width: 100%; max-width: 24rem; margin: 0;
  }
  body[data-ui-system="v1"] #job-detail .job-order-quick-add input {
    width: 100%; margin: 0;
  }
  body[data-ui-system="v1"] #job-detail #job-order-quick-results {
    max-height: 16rem; overflow: auto;
  }
  body[data-ui-system="v1"] #job-detail .job-order-recipe-composer {
    margin-top: 8px;
  }
  body[data-ui-system="v1"] #job-detail .job-order-recipe-composer[hidden] {
    display: none !important;
  }
  body[data-ui-system="v1"] #job-detail #job-order-status:empty {
    display: none;
  }
  body[data-ui-system="v1"] #job-detail .comment-panel {
    display: grid; gap: 6px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  }
  body[data-ui-system="v1"] #job-detail .comment-panel label {
    margin: 0;
  }
  body[data-ui-system="v1"] #job-detail #new-comment {
    width: 100%; min-height: 68px; margin: 0; resize: vertical;
  }
  body[data-ui-system="v1"] #job-detail #post-comment {
    justify-self: end; align-self: end;
  }
  body[data-ui-system="v1"] #comment-edit-dialog[open] {
    width: min(720px, calc(100vw - 24px)); max-width: calc(100vw - 24px);
  }
  body[data-ui-system="v1"] #custom-order-item-dialog[open] > .modal-content {
    width: 100%; padding: 16px 18px 18px;
  }
  body[data-ui-system="v1"] #custom-order-item-dialog #custom-spec-finishing-note {
    height: 4rem; min-height: 4rem; box-sizing: border-box;
  }
  @media (max-width: 760px) {
    body[data-ui-system="v1"] #job-detail .job-order-controls {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body[data-ui-system="v1"] #job-detail .job-order-recipe-picker {
      grid-column: 1 / -1;
    }
    body[data-ui-system="v1"] #job-detail .job-order-controls button {
      grid-column: auto;
    }
    body[data-ui-system="v1"] #job-detail .job-order-item > summary {
      grid-template-columns: minmax(0, 1fr) max-content;
    }
    body[data-ui-system="v1"] #job-detail .order-item-financials {
      width: auto; max-width: min(19.5rem, 55vw);
    }
    body[data-ui-system="v1"] #job-detail .job-order-item > summary > :nth-child(1) {
      grid-column: 2; grid-row: 2;
    }
    body[data-ui-system="v1"] #job-detail .job-order-item > summary > :nth-child(2) {
      grid-column: 1; grid-row: 1;
    }
    body[data-ui-system="v1"] #job-detail .job-order-item > summary > :nth-child(3) {
      display: grid; grid-column: 2; grid-row: 1; justify-self: end; width: 100%;
    }
    body[data-ui-system="v1"] #job-detail .job-order-detail {
      overflow-x: auto;
    }
    body[data-ui-system="v1"] #job-detail .job-order-table {
      min-width: 34rem;
    }
  }
  @media (max-width: 900px) {
    body[data-ui-system="v1"] #native-print-jobs .print-jobs-top-grid {
      max-width: none;
    }
    body[data-ui-system="v1"] #native-print-jobs .print-jobs-top-right {
      margin: 0;
    }
  }
  @media (max-width: 650px) {
    body[data-ui-system="v1"] #job-detail .job-order-add > .ui-action-summary-row,
    body[data-ui-system="v1"] #job-detail .job-summary-grid,
    body[data-ui-system="v1"] #job-detail #detail-fields {
      grid-template-columns: minmax(0, 1fr);
    }
    body[data-ui-system="v1"] #job-detail .job-field-label:has(textarea) {
      grid-column: 1;
    }
    body[data-ui-system="v1"] #native-print-jobs .print-jobs-top-grid {
      grid-template-areas: "commands scan" "filters filters" "count count"; gap: 8px;
    }
    body[data-ui-system="v1"] #native-print-jobs .toolbar-right {
      justify-self: start;
    }
    body[data-ui-system="v1"] #native-print-jobs #job-search {
      flex-basis: 100%; max-width: none;
    }
    body[data-ui-system="v1"] dialog.job-dialog[open] > .modal-content {
      width: calc(100vw - 16px); max-height: calc(100dvh - 16px); margin: 8px auto; padding: 14px 12px 16px;
    }
  }
  @media (max-width: 430px) {
    body[data-ui-system="v1"] #job-detail .job-order-controls > label {
      grid-column: 1 / -1;
    }
    body[data-ui-system="v1"] #job-detail .job-order-heading {
      align-items: start; flex-wrap: wrap;
    }
    body[data-ui-system="v1"] #job-detail .job-order-metrics {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body[data-ui-system="v1"] #native-print-jobs .print-jobs-top-grid {
      grid-template-columns: minmax(0, 1fr); grid-template-areas: "commands" "scan" "filters" "count";
    }
    body[data-ui-system="v1"] #native-print-jobs .print-jobs-actions-right {
      justify-self: start;
    }
    body[data-ui-system="v1"] #native-print-jobs .toolbar-left {
      align-items: stretch;
    }
    body[data-ui-system="v1"] #native-print-jobs #job-state,
    body[data-ui-system="v1"] #native-print-jobs #filter-field {
      flex: 1 1 8rem; width: auto;
    }
  }
  @media (max-width: 540px) {
    body[data-ui-system="v1"] #job-detail .job-order-add-actions {
      flex-wrap: wrap;
    }
    body[data-ui-system="v1"] #job-detail .job-order-quick-add {
      flex: 1 1 100%;
    }
  }
  body[data-ui-system="v1"] #native-print-jobs .tbd-price {
    color: #9a6700; font-style: italic;
  }
  body[data-ui-system="v1"] #native-print-jobs .tbd-price-note {
    display: block; color: #627d98; font-size: .72rem; font-weight: 400;
  }
  body[data-ui-system="v1"][data-page="print_jobs"] .main-content {
    padding: 18px 20px 28px;
  }
  body[data-ui-system="v1"] #print-job-settings {
    max-width: none; margin: 0;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-header {
    align-items: end; gap: 12px; margin: 0 0 16px;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-header h2 {
    margin: 3px 0 0; font-size: var(--ds-font-page); line-height: 1.25;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-header .muted-text {
    margin: 3px 0 0; color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] #print-job-settings .back-link {
    color: var(--ds-action); font-size: 11px; font-weight: 600; text-decoration: none;
  }
  body[data-ui-system="v1"] #print-job-settings .back-link:hover {
    text-decoration: underline;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-message:empty {
    display: none;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-message:not(:empty) {
    min-height: 0; margin: 0 0 10px; font-size: 12px;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-layout {
    display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: start;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-nav {
    position: sticky; top: 12px; display: block; min-width: 0; padding: 3px 11px 0 0; border: 0;
    border-right: 1px solid var(--ds-border); border-radius: 0; background: transparent; box-shadow: none;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-projects-nav {
    margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-resource-nav {
    margin: 2px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-resource-nav-button {
    min-height: 32px; padding: 7px 9px; border-radius: var(--ds-radius-control); color: var(--ds-text-secondary);
    font-size: 13px; font-weight: 600;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-resource-nav-button:hover {
    background: #eef4f7; color: var(--ds-text);
  }
  body[data-ui-system="v1"] #print-job-settings .settings-resource-nav-button[aria-current="true"] {
    background: #e4eff7; color: #205c89; font-weight: 700;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-resource-nav-button:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 2px;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-main {
    display: block; min-width: 0;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-card {
    display: block; min-width: 0; max-width: 1020px;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-card[hidden] {
    display: none !important;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-card-header {
    align-items: start; gap: 12px; margin: 0 0 14px;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-card-header h3 {
    margin: 2px 0 0; color: var(--ds-text); font-size: 18px; line-height: 1.25;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-card-header .muted-text {
    margin: 3px 0 0; color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] #print-job-settings .eyebrow {
    margin: 0; color: var(--ds-text-muted); font-size: 10px; letter-spacing: 0.07em;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-actions {
    gap: 8px; margin-top: 14px;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-actions > :only-child {
    margin-left: auto;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-list-item {
    min-height: 38px; padding: 7px 9px; border: 0; border-bottom: 1px solid var(--ds-border); border-radius: 0;
    color: var(--ds-text); font-size: 13px;
  }
  body[data-ui-system="v1"] #print-job-settings .resource-list-item {
    border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] #print-job-settings .field-order-row {
    display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] #print-job-settings .field-order-row .resource-list-item {
    flex: 1; min-width: 0; border-bottom: 0;
  }
  body[data-ui-system="v1"] #print-job-settings .field-order-control {
    display: flex; align-items: center; gap: 6px; font-size: var(--ds-font-label); margin: 0;
  }
  body[data-ui-system="v1"] #print-job-settings .field-order-control input {
    width: 5rem; min-width: 0;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-list-item:hover {
    background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] #print-job-settings .settings-list-item.selected {
    background: #eaf2f8;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-project-list,
  body[data-ui-system="v1"] #print-job-settings .resource-list {
    gap: 0; border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] #print-job-settings .settings-archive {
    margin-top: 12px; padding-top: 10px; border-top-color: var(--ds-border); font-size: 12px;
  }
  body[data-ui-system="v1"] #print-job-settings .empty-state {
    margin: 0; padding: 10px 2px; color: var(--ds-text-muted); font-size: 12px;
  }
  body[data-ui-system="v1"] #print-job-settings .status-badge {
    padding: 2px 6px; border-radius: var(--ds-radius-control); font-size: 11px;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-card label,
  body[data-ui-system="v1"] #print-job-settings .resource-editor label {
    gap: 4px; margin: 0; color: var(--ds-text-secondary); font-size: var(--ds-font-label); font-weight: 600;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-form-grid {
    display: grid; grid-template-columns: minmax(0, 24rem) minmax(8rem, 12rem) minmax(7rem, 10rem);
    align-items: end; gap: 9px 14px; max-width: 52rem;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-form-grid > :nth-child(1) {
    grid-column: 1 / 3;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-form-grid > :nth-child(2) {
    grid-column: 3;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-form-grid > :nth-child(3) {
    grid-column: 1;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-form-grid > :nth-child(4) {
    grid-column: 2;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-form-grid > :nth-child(5) {
    grid-column: 1;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-form-grid > :nth-child(6) {
    grid-column: 2;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-check {
    margin: 10px 0 0; font-size: 13px; font-weight: 400;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-check input {
    width: 16px; margin: 0; accent-color: var(--ds-action);
  }
  body[data-ui-system="v1"] #print-job-settings .settings-disclosure {
    margin-top: 14px; padding-top: 11px; border-top-color: var(--ds-border);
  }
  body[data-ui-system="v1"] #print-job-settings .settings-disclosure summary {
    color: var(--ds-text); font-size: 14px;
  }
  body[data-ui-system="v1"] #print-job-settings .settings-disclosure > .muted-text {
    margin: 3px 0 8px; font-size: 11px;
  }
  body[data-ui-system="v1"] #print-job-settings .mapping-list {
    gap: 0; margin-top: 8px; border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] #print-job-settings .mapping-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 5rem 6.5rem 5rem; gap: 8px; min-height: 38px;
    padding: 6px 2px; border: 0; border-bottom: 1px solid var(--ds-border); border-radius: 0;
    background: transparent;
  }
  body[data-ui-system="v1"] #print-job-settings .mapping-row > span:not(:first-child) {
    white-space: nowrap; font-weight: 400;
  }
  body[data-ui-system="v1"] #print-job-settings #project-form > .settings-actions {
    margin-top: 18px;
  }
  body[data-ui-system="v1"] #print-job-settings #project-form > .settings-actions #delete-project {
    order: -1;
  }
  body[data-ui-system="v1"] #print-job-settings #project-form > .settings-actions button[type="submit"] {
    margin-left: auto;
  }
  body[data-ui-system="v1"] #print-job-settings .resource-overview-actions {
    margin: 0 0 10px;
  }
  body[data-ui-system="v1"] #print-job-settings .resource-editor-panel .resource-editor {
    margin: 0; padding: 0; border: 0;
  }
  body[data-ui-system="v1"] #print-job-settings #field-form {
    display: grid; grid-template-columns: minmax(0, 32rem) 10ch; align-items: end; gap: 10px 14px; max-width: 52rem;
  }
  body[data-ui-system="v1"] #print-job-settings #field-form[hidden] {
    display: none !important;
  }
  body[data-ui-system="v1"] #print-job-settings #field-form > .settings-card-header {
    grid-column: 1 / -1; margin-bottom: 3px;
  }
  body[data-ui-system="v1"] #print-job-settings #field-form > label:first-of-type {
    grid-column: 1 / -1; max-width: none;
  }
  body[data-ui-system="v1"] #print-job-settings #field-form > label:nth-of-type(2) {
    grid-column: 1; max-width: none;
  }
  body[data-ui-system="v1"] #print-job-settings #field-form > label:nth-of-type(3) {
    grid-column: 2; max-width: none;
  }
  body[data-ui-system="v1"] #print-job-settings #field-form > .settings-check {
    grid-column: 1 / -1; margin-top: 2px;
  }
  body[data-ui-system="v1"] #print-job-settings #field-form > .option-list {
    grid-column: 1 / -1;
  }
  body[data-ui-system="v1"] #print-job-settings #field-form > .settings-actions {
    grid-column: 1 / -1; margin-top: 6px;
  }
  body[data-ui-system="v1"] #print-job-settings .option-list {
    display: grid; gap: 0; margin-top: 3px;
  }
  body[data-ui-system="v1"] #print-job-settings .option-list:empty {
    display: none;
  }
  body[data-ui-system="v1"] #print-job-settings .option-list > .muted-text {
    margin: 2px 0 8px; color: var(--ds-text-secondary); font-size: 11px; line-height: 1.4;
  }
  body[data-ui-system="v1"] #print-job-settings .option-row {
    display: grid; grid-template-columns: minmax(0, 26rem) minmax(6rem, 1fr) auto auto; align-items: center;
    gap: 8px; min-height: 45px; padding: 6px 1px; border: 0; border-top: 1px solid var(--ds-border);
    border-radius: 0; background: transparent;
  }
  body[data-ui-system="v1"] #print-job-settings .option-row .option-label-input {
    width: 100%;
  }
  body[data-ui-system="v1"] #print-job-settings .option-usage {
    color: var(--ds-text-muted); font-size: 11px;
  }
  body[data-ui-system="v1"] #print-job-settings .option-add {
    display: flex; justify-content: flex-start; min-height: 44px; padding: 6px 1px; border: 0;
    border-top: 1px solid var(--ds-border); border-radius: 0; background: transparent;
  }
  body[data-ui-system="v1"] #print-job-settings .option-add input {
    flex: 0 1 26rem; width: min(100%, 26rem);
  }
  body[data-ui-system="v1"] #print-job-settings #action-form {
    display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 13rem) 10ch; align-items: end; gap: 10px 14px;
    max-width: 65rem;
  }
  body[data-ui-system="v1"] #print-job-settings #action-form[hidden] {
    display: none !important;
  }
  body[data-ui-system="v1"] #print-job-settings #action-form > .settings-card-header {
    grid-column: 1 / -1; margin-bottom: 3px;
  }
  body[data-ui-system="v1"] #print-job-settings #action-form > label:first-of-type {
    grid-column: 1 / -1;
  }
  body[data-ui-system="v1"] #print-job-settings #action-form > .settings-check {
    grid-column: 1 / -1; margin-top: 2px;
  }
  body[data-ui-system="v1"] #print-job-settings #action-form > .settings-disclosure,
  body[data-ui-system="v1"] #print-job-settings #action-form > .settings-actions {
    grid-column: 1 / -1; margin-top: 6px;
  }
  body[data-ui-system="v1"] #print-job-settings .builder-list {
    gap: 0; margin: 8px 0; border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] #print-job-settings .builder-row {
    display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 7px; min-height: 44px; padding: 7px 1px;
    border: 0; border-bottom: 1px solid var(--ds-border); border-radius: 0; background: transparent;
  }
  body[data-ui-system="v1"] #print-job-settings .builder-row select {
    flex: 0 1 11rem;
  }
  body[data-ui-system="v1"] #print-job-settings .builder-row .builder-value {
    flex: 1 1 12rem; max-width: 28rem;
  }
  body[data-ui-system="v1"] #print-job-settings .condition-rules {
    display: grid; gap: 6px; flex: 1 1 26rem; min-width: 0;
  }
  body[data-ui-system="v1"] #print-job-settings .condition-rule {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  }
  body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog[open] {
    inset: 0; width: min(660px, calc(100vw - 24px)); height: fit-content; max-height: calc(100dvh - 24px);
    margin: auto; padding: 0; border-radius: var(--ds-radius-surface);
  }
  body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog > form {
    padding: 18px 20px 20px;
  }
  body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog .settings-dialog-header {
    padding: 0 0 11px; border-bottom-color: var(--ds-border);
  }
  body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog .settings-dialog-header h2 {
    margin: 2px 0 0; font-size: 18px;
  }
  body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog .settings-dialog-header p:last-child {
    margin: 4px 0 0; font-size: 12px;
  }
  body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog fieldset {
    margin: 12px 0 0; padding: 10px 0 0; border: 0; border-top: 1px solid var(--ds-border); border-radius: 0;
  }
  body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog legend {
    padding: 0 7px 0 0; color: var(--ds-text); font-size: 13px;
  }
  body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog .choice-row {
    margin: 7px 0; font-size: 12px;
  }
  body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog .settings-summary {
    margin-top: 12px; padding: 8px 10px; background: var(--ds-surface-quiet); font-size: 12px;
  }
  body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog .settings-dialog-actions {
    margin-top: 14px;
  }
  @media (max-width: 900px) {
    body[data-ui-system="v1"] #print-job-settings .settings-layout {
      grid-template-columns: minmax(0, 1fr); gap: 12px;
    }
    body[data-ui-system="v1"] #print-job-settings .settings-nav {
      position: static; display: flex; flex-wrap: wrap; gap: 4px; padding: 0 0 10px; border-right: 0;
      border-bottom: 1px solid var(--ds-border);
    }
    body[data-ui-system="v1"] #print-job-settings .settings-resource-nav {
      margin: 0;
    }
    body[data-ui-system="v1"] #print-job-settings .settings-resource-nav-button {
      gap: 6px;
    }
  }
  @media (max-width: 620px) {
    body[data-ui-system="v1"][data-page="print_jobs"] .main-content {
      padding: 14px 12px 24px;
    }
    body[data-ui-system="v1"] #print-job-settings .settings-header {
      align-items: start;
    }
    body[data-ui-system="v1"] #print-job-settings .settings-form-grid {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    body[data-ui-system="v1"] #print-job-settings .settings-form-grid > :nth-child(n) {
      grid-column: auto;
    }
    body[data-ui-system="v1"] #print-job-settings .settings-form-grid > :first-child {
      grid-column: 1 / -1;
    }
    body[data-ui-system="v1"] #print-job-settings #field-form {
      grid-template-columns: minmax(0, 1fr) 10ch;
    }
    body[data-ui-system="v1"] #print-job-settings #action-form {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    body[data-ui-system="v1"] #print-job-settings #action-form > label:nth-of-type(4) {
      grid-column: 1;
    }
    body[data-ui-system="v1"] #print-job-settings .option-row {
      grid-template-columns: minmax(0, 1fr) auto auto;
    }
    body[data-ui-system="v1"] #print-job-settings .option-usage {
      grid-column: 1 / -1; grid-row: 2;
    }
    body[data-ui-system="v1"] dialog.settings-dialog.ui-dialog > form {
      padding: 14px;
    }
  }
  @media (max-width: 430px) {
    body[data-ui-system="v1"] #print-job-settings .settings-header h2 {
      font-size: 20px;
    }
    body[data-ui-system="v1"] #print-job-settings .settings-form-grid {
      grid-template-columns: minmax(0, 1fr);
    }
    body[data-ui-system="v1"] #print-job-settings .settings-form-grid > :nth-child(n) {
      grid-column: 1 / -1;
    }
    body[data-ui-system="v1"] #print-job-settings #field-form {
      grid-template-columns: minmax(0, 1fr);
    }
    body[data-ui-system="v1"] #print-job-settings #field-form > label:nth-of-type(3) {
      grid-column: 1;
    }
    body[data-ui-system="v1"] #print-job-settings #action-form {
      grid-template-columns: minmax(0, 1fr);
    }
    body[data-ui-system="v1"] #print-job-settings #action-form > label {
      grid-column: 1 / -1;
    }
    body[data-ui-system="v1"] #print-job-settings .option-row {
      grid-template-columns: minmax(0, 1fr) auto;
    }
    body[data-ui-system="v1"] #print-job-settings .option-row .option-label-input {
      grid-column: 1 / -1;
    }
    body[data-ui-system="v1"] #print-job-settings .option-usage {
      grid-column: 1; grid-row: auto;
    }
  }
  .imposition-helper-page {
    color: var(--ui-ink); font-size: 14px;
  }
  .imposition-helper-page .panel-header {
    margin-bottom: 16px;
  }
  .imposition-helper-page .panel-title {
    margin: 0;
  }
  .imposition-helper-page .panel-subtitle {
    margin: 4px 0 0; color: var(--ui-muted);
  }
  .imposition-card {
    min-width: 0; overflow: hidden;
  }
  .imposition-section-heading,
  .imposition-orientation-header,
  .imposition-results-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  }
  .imposition-section-heading h3,
  .imposition-orientation-header h3,
  .imposition-results-header h3 {
    margin: 0; font-size: 15px; font-weight: 650; color: #102a43;
  }
  .imposition-section-heading p,
  .imposition-orientation-header p,
  .imposition-results-header p {
    margin: 3px 0 0; color: var(--ui-muted); font-size: 12px;
  }
  .imposition-control-grid {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-items: end; margin-top: 16px;
  }
  .imposition-field {
    display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; color: #334155; font-size: 12px;
    font-weight: 650;
  }
  .imposition-field :is(input,select) {
    box-sizing: border-box; width: 100%; min-width: 0;
  }
  .imposition-field :is(input,select):focus-visible {
    outline: 2px solid #93c5fd; outline-offset: 1px;
  }
  .imposition-unit-label {
    color: #64748b; font-weight: 500;
  }
  .imposition-custom-sheet {
    display: grid; grid-column: 1/-1; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px;
  }
  .imposition-custom-sheet[hidden] {
    display: none;
  }
  .imposition-hint {
    margin: 12px 0 0; color: #64748b; font-size: 11px; line-height: 1.5;
  }
  .imposition-orientation-settings {
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ds-border,var(--ui-line));
  }
  .imposition-best-fit {
    flex: none; cursor: pointer;
  }
  .imposition-orientation-control {
    min-width: 0; margin: 0; padding: 0; border: 0;
  }
  .imposition-orientation-control legend {
    margin-bottom: 6px; padding: 0; color: #475569; font-size: 11px; font-weight: 650;
  }
  .imposition-segmented {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0; border: 0; border-radius: 0;
    background: transparent;
  }
  .imposition-segmented button {
    min-width: 0; cursor: pointer;
  }
  .imposition-results {
    display: flex; flex-direction: column;
  }
  .imposition-result-note:empty,
  .imposition-yield:empty,
  #imposition-result-description:empty,
  .imposition-sheet-catalog-status:empty {
    display: none;
  }
  .imposition-results-header + #imposition-result-description:empty + .imposition-yield:empty + .imposition-diagram-wrap {
    margin-top: 14px;
  }
  .imposition-yield {
    margin: 16px 0 12px; color: #102a43; font-size: 25px; font-weight: 700; letter-spacing: -.025em;
  }
  .imposition-yield small {
    margin-left: 5px; color: #64748b; font-size: 13px; font-weight: 500; letter-spacing: 0;
  }
  .imposition-diagram-wrap {
    display: flex; align-items: center; justify-content: center; min-height: 240px; max-height: 520px;
    padding: 16px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; overflow: hidden;
  }
  .imposition-diagram {
    display: block; width: 100%; height: auto; max-height: 480px;
  }
  .imposition-legend {
    display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 12px; color: #64748b; font-size: 10px;
  }
  .imposition-legend span {
    display: inline-flex; align-items: center; gap: 5px;
  }
  .imposition-legend i {
    display: inline-block; width: 11px; height: 11px; border: 1px solid #94a3b8; border-radius: 2px;
    background: #fff;
  }
  .imposition-legend .legend-printable {
    border-color: #c4b5fd; background: #f5f3ff;
  }
  .imposition-legend .legend-nonprintable {
    border-color: #a8a29e; background-color: #fefce8;
    background-image: repeating-linear-gradient(45deg,transparent 0 4px,#64748b 4px 4.5px),repeating-linear-gradient(-45deg,transparent 0 4px,#64748b 4px 4.5px);
  }
  .imposition-legend .legend-bleed {
    border-color: #3b82f6; background: #bfdbfe;
  }
  .imposition-legend .legend-trim {
    border-color: #c2410c; background: #fff7ed;
  }
  .imposition-result-note {
    margin: 12px 0 0; color: #64748b; font-size: 11px; line-height: 1.5;
  }
  .imposition-empty-diagram {
    fill: #64748b; font: 2px sans-serif; text-anchor: middle;
  }
  .imposition-sheet-catalog-controls {
    display: grid; grid-template-columns: minmax(180px,.7fr) minmax(260px,1.3fr); gap: 12px; margin-top: 14px;
  }
  .imposition-sheet-catalog-status,
  .imposition-sheet-catalog-note {
    margin: 9px 0 0; color: #64748b; font-size: 11px; line-height: 1.5;
  }
  .imposition-sheet-catalog-note {
    margin-top: 3px;
  }
  .imposition-print-specs {
    display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 16px;
  }
  .imposition-print-specs-title {
    padding-bottom: 10px; color: #334155; font-size: 12px; font-weight: 650; white-space: nowrap;
  }
  .imposition-print-choice {
    flex: 0 0 auto; min-width: 0; margin: 0; padding: 0; border: 0;
  }
  .imposition-print-choice legend {
    margin-bottom: 5px; padding: 0; color: #475569; font-size: 11px; font-weight: 650;
  }
  .imposition-print-choice .imposition-segmented {
    grid-template-columns: auto auto;
  }
  .imposition-print-choice .imposition-segmented button {
    white-space: nowrap;
  }
  .imposition-print-specs #imposition-send-to-recipe {
    margin-left: auto;
  }
  .imposition-print-specs #imposition-send-to-recipe:disabled {
    cursor: not-allowed; opacity: .55;
  }
  @media (max-width:520px) {
    .imposition-card {
      --imposition-card-padding: 14px;
    }
    .imposition-control-grid {
      gap: 10px;
    }
    .imposition-diagram-wrap {
      min-height: 180px; padding: 10px;
    }
    .imposition-yield {
      font-size: 22px;
    }
    .imposition-sheet-catalog-controls {
      grid-template-columns: 1fr;
    }
    .imposition-print-specs {
      gap: 9px;
    }
    .imposition-print-specs-title {
      padding-bottom: 0;
    }
    .imposition-print-specs #imposition-send-to-recipe {
      margin-left: 0;
    }
  }
  .imposition-helper-page .imposition-card {
    --imposition-card-padding: 18px;
  }
  .imposition-helper-page .imposition-card>.imposition-section-heading,
  .imposition-helper-page .imposition-results>.imposition-results-header {
    border-bottom: 1px solid var(--ds-border,var(--ui-line));
  }
  .imposition-helper-page .imposition-results #imposition-result-description {
    margin: 10px 0 0; color: var(--ds-text-secondary,var(--ui-muted)); font-size: 12px;
  }
  .imposition-helper-page :is(.imposition-section-heading,.imposition-orientation-header,.imposition-results-header) h3 {
    color: var(--ds-text-primary,#102a43);
  }
  .imposition-helper-page :is(.imposition-section-heading,.imposition-orientation-header,.imposition-results-header) p {
    color: var(--ds-text-secondary,var(--ui-muted));
  }
  .imposition-helper-page .imposition-orientation-header {
    align-items: center; margin: 0; padding: 10.5px 12px; border: 1px solid var(--ds-border,var(--ui-line));
    border-radius: var(--ds-radius-sm,6px);
    background: linear-gradient(180deg,color-mix(in srgb,var(--ds-surface-quiet,#f5f8fb) 88%,var(--ds-action,#1e66ae) 12%),color-mix(in srgb,var(--ds-surface-quiet,#f5f8fb) 95%,var(--ds-action,#1e66ae) 5%));
  }
  @media (max-width:520px) {
    .imposition-helper-page .imposition-card {
      --imposition-card-padding: 14px;
    }
  }
  .barcode-setup-stack {
    display: grid; gap: var(--ds-space-3); min-width: 0;
  }
  .barcode-card-body {
    display: grid; gap: var(--ds-space-2); padding: var(--ds-space-3); min-width: 0;
  }
  .barcode-maker-panel .form-row {
    margin: 0; min-width: 0;
  }
  .barcode-maker-panel .barcode-mode-row {
    min-width: 0;
  }
  .barcode-maker-panel .barcode-mode-select {
    width: 100%; min-width: 0; box-sizing: border-box;
  }
  .barcode-maker-panel .barcode-entry-card textarea {
    box-sizing: border-box; width: 100%;
  }
  .barcode-maker-panel .barcode-controls-card {
    margin: 0;
  }
  .barcode-maker-panel .barcode-controls-grid {
    display: flex; align-items: end; flex-wrap: wrap; gap: var(--ds-space-2);
  }
  .barcode-controls-grid>.form-row {
    flex: 0 1 auto; max-width: 100%;
  }
  .barcode-maker-panel .barcode-contact-grid {
    grid-template-columns: minmax(0,1fr);
  }
  .barcode-sheet-canvas {
    height: min(64vh,640px); min-height: 320px; max-height: none; margin: 0; box-sizing: border-box;
  }
  .barcode-sheet-surface {
    position: relative; flex: none; background: white; box-shadow: var(--ds-shadow-surface,0 1px 4px #0f172a24);
  }
  #barcode-sheet-frame {
    position: absolute; inset: 0; border: 0; transform-origin: top left; pointer-events: none;
  }
  .barcode-sheet-preview p {
    margin: 0;
  }
  .barcode-sheet-preview p:empty {
    display: none;
  }
  .barcode-maker-panel [hidden] {
    display: none !important;
  }
  .barcode-entry-footer {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-1);
  }
  .barcode-plain-text {
    display: flex; align-items: center; gap: var(--ds-space-1); margin: 0; min-width: 0;
    font-size: var(--ds-font-label); font-weight: 600; line-height: 1.3; white-space: nowrap;
  }
  .barcode-plain-text input {
    flex: none; margin: 0;
  }
  .preflight-header h2 {
    margin: .1rem 0;
  }
  .preflight-header p {
    margin: .2rem 0; color: var(--muted-text,#52677d);
  }
  .preflight-form {
    display: grid; gap: 1rem;
  }
  .preflight-card {
    min-width: 0;
  }
  .preflight-card h3 {
    margin: 0 0 .8rem; font-size: 1.05rem;
  }
  .preflight-grid {
    display: grid; gap: .8rem; align-items: start;
  }
  .preflight-grid--source {
    grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr));
  }
  .preflight-grid--dimensions {
    grid-template-columns: repeat(auto-fit,minmax(min(100%,150px),1fr));
  }
  .preflight-field {
    display: grid; gap: .3rem; color: var(--text,#334e68); font-size: .88rem; font-weight: 600; min-width: 0;
  }
  .preflight-field input,
  .preflight-field select {
    width: 100%; min-width: 0; box-sizing: border-box;
  }
  .preflight-field small {
    font-weight: 400; color: var(--muted-text,#52677d);
  }
  .preflight-guides {
    display: flex; border: 1px solid var(--border,#d6e0e8); border-radius: 6px; margin: .9rem 0 0;
  }
  .preflight-guides legend {
    font-weight: 600; padding: 0 .25rem;
  }
  .preflight-guides label {
    display: flex; align-items: center;
  }
  .preflight-check {
    display: flex; align-items: center; gap: .4rem;
  }
  .preflight-guides input,
  .preflight-check input {
    width: auto;
  }
  .preflight-template-actions {
    flex-wrap: wrap; margin-top: 1rem; border-top: 1px solid var(--border,#d6e0e8); padding-top: .8rem;
  }
  .preflight-template-name {
    flex: 1 1 280px;
  }
  .preflight-button-row {
    display: flex; gap: .5rem; flex-wrap: wrap;
  }
  .preflight-primary-actions {
    margin-top: .75rem;
  }
  .preflight-note,
  .preflight-status {
    color: var(--muted-text,#52677d); font-size: .9rem;
  }
  .preflight-status:empty {
    display: none;
  }
  .preflight-status.is-error {
    color: #a61b1b;
  }
  .preflight-result {
    margin-top: 1rem;
  }
  .preflight-summary {
    font-weight: 600; margin: .2rem 0;
  }
  .preflight-findings {
    margin: .4rem 0; padding-left: 1.3rem;
  }
  .preflight-preview {
    display: block;
  }
  .preflight-result img {
    display: block; max-width: 100%; max-height: 70vh; margin: 1rem auto; border: 1px solid var(--border,#d6e0e8);
    object-fit: contain; background: #f8fafc;
  }
  .preflight-page [hidden] {
    display: none !important;
  }
  @media (max-width:600px) {
    .preflight-template-actions {
      align-items: stretch;
    }
    .preflight-button-row>* {
      flex: 1 1 auto;
    }
  }
  .preflight-output-value {
    display: flex; align-items: center; min-height: 2.4rem; padding: .45rem .65rem;
    border: 1px solid var(--border,#bcccdc); border-radius: 4px; background: var(--surface,#fff);
    box-sizing: border-box; color: var(--text,#334e68); font-weight: 500;
  }
  .preflight-controls {
    display: grid; align-content: start; min-width: 0;
  }
  .preflight-preview-card .preflight-result {
    display: flex; flex: 1; flex-direction: column; justify-content: center; min-height: 0;
  }
  .preflight-preview-placeholder {
    margin: auto; text-align: center; color: var(--ds-text-secondary,var(--muted-text,#52677d));
  }
  .preflight-preview-card img {
    max-height: 70vh;
  }
  .preflight-name-dialog {
    width: min(32rem,calc(100vw - 2rem)); border: 1px solid var(--ds-border,var(--border,#d6e0e8));
    border-radius: var(--ds-radius-md,8px); padding: 1.25rem; background: var(--ds-surface,var(--surface,#fff));
    color: var(--ds-text-primary,var(--text,#334e68)); box-shadow: var(--ds-shadow-overlay,0 1rem 3rem #102a4333);
  }
  .preflight-name-dialog::backdrop {
    background: #102a43a6;
  }
  .preflight-name-dialog h3 {
    margin: 0 0 1rem; font-size: 1.1rem;
  }
  .preflight-name-dialog .preflight-button-row {
    justify-content: flex-end; margin-top: 1rem;
  }
  @media (max-width:760px) {
    .preflight-template-actions {
      align-items: stretch;
    }
    .preflight-button-row>* {
      flex: 1 1 auto;
    }
  }
  .preflight-processing {
    display: flex; align-items: center; justify-content: center; gap: .65rem; margin: .5rem 0;
    color: var(--ds-text-secondary,var(--muted-text,#52677d)); font-weight: 600;
  }
  .preflight-spinner {
    width: 1.15rem; height: 1.15rem; box-sizing: border-box;
    border: 2px solid var(--ds-border,var(--border,#d6e0e8)); border-top-color: var(--link,#1f67b2);
    border-radius: 50%; animation: preflight-spin .75s linear infinite;
  }
  @keyframes preflight-spin{to{transform:rotate(360deg)}}
  @media (prefers-reduced-motion:reduce) {
    .preflight-spinner {
      animation: none; border-top-color: var(--ds-border,var(--border,#d6e0e8));
      border-right-color: var(--link,#1f67b2);
    }
  }
  .preflight-grid--controls {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .preflight-check {
    grid-column: 1/-1;
  }
  .preflight-guides {
    flex-wrap: nowrap; align-items: center; gap: .25rem .6rem; padding: .45rem .55rem;
  }
  .preflight-guides label {
    gap: .2rem; white-space: nowrap; font-size: .78rem;
  }
  .preflight-preview-card {
    grid-column: 2; position: sticky; top: var(--ds-space-3,1rem); display: flex; flex-direction: column;
  }
  .preflight-output-stack {
    grid-column: 3; display: grid; align-content: start; gap: .75rem; min-width: 0;
    container: preflight-output-stack/inline-size;
  }
  @media (max-width:1180px) {
    .preflight-preview-card,
    .preflight-output-stack {
      grid-column: 2;
    }
    .preflight-guides {
      flex-wrap: wrap;
    }
  }
  @media (max-width:760px) {
    .preflight-preview-card,
    .preflight-output-stack {
      grid-column: 1;
    }
    .preflight-preview-card {
      position: static;
    }
  }
  .preflight-template-button-row {
    align-items: center; gap: .35rem; flex-wrap: nowrap;
  }
  .preflight-template-protection-note {
    flex: 1 1 100%; font-weight: 400;
  }
  .preflight-template-actions {
    display: grid; justify-content: start; align-items: start; gap: .55rem;
  }
  .preflight-template-transfer {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .65rem;
    border-top: 1px solid var(--border,#d6e0e8); padding-top: .65rem;
  }
  .preflight-template-transfer small {
    flex-basis: 100%; color: var(--ds-text-secondary,var(--muted-text,#52677d));
  }
  @media (max-width:1180px) {
    .preflight-template-button-row {
      flex-wrap: wrap;
    }
  }
  .preflight-output-card .preflight-output-value {
    height: 2.4rem; min-height: 2.4rem;
  }
  .preflight-rotation-field .preflight-check {
    grid-column: auto; margin: 0; font-weight: 400;
  }
  .preflight-fold-positions {
    grid-column: 1/-1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; min-width: 0;
  }
  @media (max-width:380px) {
    .preflight-fold-positions {
      grid-template-columns: minmax(0,1fr);
    }
  }
  .preflight-controls {
    gap: .55rem;
  }
  .preflight-controls .preflight-section {
    min-width: 0; overflow: hidden;
  }
  .preflight-controls .preflight-section-body {
    display: grid; gap: .55rem; padding: .6rem .7rem; background: var(--ds-surface,var(--surface,#fff));
  }
  .preflight-controls .preflight-field {
    gap: .2rem; font-size: .78rem; line-height: 1.2;
  }
  .preflight-dimension-matrix {
    display: grid; gap: .25rem;
  }
  .preflight-dimension-row {
    display: grid; grid-template-columns: minmax(3.8rem,.9fr) minmax(0,1fr) 1rem minmax(0,1fr) 1rem;
    align-items: center; gap: .25rem; min-width: 0;
  }
  .preflight-dimension-name {
    color: var(--ds-text-primary,var(--text,#334e68)); font-size: .78rem; font-weight: 600; line-height: 1.15;
  }
  .preflight-dimension-input {
    display: block; min-width: 0;
  }
  .preflight-dimension-axis {
    display: grid; place-items: center; min-height: 1.75rem; border-radius: 4px;
    background: var(--ds-surface-quiet,#f5f8fb); color: var(--ds-text-secondary,var(--muted-text,#52677d));
    font-size: .68rem; font-weight: 700;
  }
  .preflight-controls .preflight-grid--controls {
    gap: .5rem;
  }
  .preflight-crop-grid {
    display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .45rem; min-width: 0;
  }
  .preflight-controls .preflight-fold-positions {
    grid-column: auto; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem;
  }
  .preflight-controls .preflight-guides {
    flex-wrap: nowrap; justify-content: space-between; gap: .25rem; margin: 0; padding: .1rem 0; border: 0;
  }
  .preflight-controls .preflight-guides label {
    display: flex; align-items: center; gap: .2rem; white-space: nowrap; font-size: .72rem;
  }
  .preflight-controls .preflight-guides input {
    width: auto; margin: 0;
  }
  .preflight-template-protection-note,
  .preflight-template-transfer-note {
    color: var(--ds-text-secondary,var(--muted-text,#52677d)); font-size: .68rem; line-height: 1.25;
  }
  .preflight-controls .preflight-section-body>.preflight-template-protection-note {
    margin-top: .1rem;
  }
  @media (max-width:420px) {
    .preflight-controls .preflight-guides {
      flex-wrap: wrap; justify-content: flex-start; gap: .45rem .8rem;
    }
  }
  .preflight-controls .preflight-section-icon {
    display: block; flex: 0 0 1.15rem; width: 1.15rem; height: 1.15rem; color: var(--ds-action,#1768b7); fill: none;
    stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  .preflight-controls {
    container: preflight-controls/inline-size;
  }
  .preflight-controls .preflight-crop-grid>.preflight-field {
    white-space: nowrap; font-size: .58rem; letter-spacing: -.015em;
  }
  @container preflight-controls (max-width:320px) {
    .preflight-controls .preflight-crop-grid {
      grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .preflight-controls .preflight-fold-positions {
      grid-template-columns: minmax(0,1fr);
    }
    .preflight-controls .preflight-guides {
      flex-wrap: wrap; justify-content: flex-start; gap: .45rem .8rem;
    }
  }
  .preflight-preview-card,
  .preflight-preview-controls-card,
  .preflight-output-card {
    overflow: hidden;
  }
  .preflight-preview-card .preflight-workspace-body,
  .preflight-preview-controls-card .preflight-workspace-body,
  .preflight-output-card .preflight-workspace-body {
    padding: 1rem;
  }
  .preflight-preview-card .preflight-workspace-body {
    display: flex; flex: 1; flex-direction: column; min-height: 0;
  }
  .preflight-preview-toolbar {
    display: flex; align-items: flex-start; gap: .55rem; min-width: 0;
  }
  .preflight-rotation-controls {
    display: grid; flex: 1 1 7rem; align-content: start; gap: .35rem; min-width: 0;
  }
  .preflight-rotation-controls>.preflight-field {
    gap: .25rem; font-size: .72rem; line-height: 1.2;
  }
  .preflight-rotation-controls .preflight-check {
    grid-column: auto; margin: 0; font-size: .72rem; font-weight: 400; white-space: nowrap;
  }
  .preflight-page-control {
    flex: 0 1 8rem; min-width: 0;
  }
  .preflight-page-control>.preflight-field {
    display: block; margin-bottom: .25rem; font-size: .72rem; line-height: 1.2;
  }
  .preflight-page-stepper {
    display: grid; grid-template-columns: 1.9rem minmax(2rem,1fr) 1.9rem; align-items: center; gap: .2rem;
    min-width: 0;
  }
  .preflight-page-stepper button {
    display: grid; place-items: center; min-width: 0;
  }
  .preflight-page-stepper input {
    box-sizing: border-box; width: 100%; min-width: 0; text-align: center;
  }
  .preflight-preview-toolbar>#preflight-apply {
    flex: 0 0 auto; margin-top: 1.2rem; padding: .45rem .65rem; white-space: nowrap;
  }
  .preflight-output-settings {
    grid-template-columns: minmax(0,1fr);
  }
  .preflight-result {
    border-top: 0; padding-top: 0;
  }
  @container preflight-output-stack (max-width:340px) {
    .preflight-preview-toolbar {
      flex-wrap: wrap;
    }
    .preflight-rotation-controls {
      flex: 1 0 100%; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: end;
    }
    .preflight-page-control {
      flex: 1 1 7rem;
    }
  }
  .preflight-template-select-row {
    display: flex; align-items: center; gap: var(--ds-space-1); min-width: 0;
  }
  .preflight-template-select-row select {
    flex: 1; min-width: 0;
  }
  .preflight-template-select-row .preflight-lock-button {
    flex: 0 0 auto; min-width: 2.1rem;
  }
  .preflight-template-action-row {
    flex-wrap: wrap; gap: var(--ds-space-1);
  }
  .preflight-controls .preflight-subheading {
    margin: var(--ds-space-1) 0 0; font-size: var(--ds-font-label); color: var(--ds-text-secondary);
  }
  .preflight-preview-controls-card .preflight-workspace-body {
    display: grid; gap: var(--ds-space-2);
  }
  .preflight-controls .preflight-template-action-row {
    display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .preflight-preview-controls-card .preflight-preview-toolbar {
    display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end;
  }
  .preflight-preview-toolbar .preflight-rotation-controls {
    grid-column: 1/-1; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: end;
  }
  .preflight-preview-toolbar .preflight-rotation-controls .preflight-check {
    white-space: normal;
  }
  .preflight-preview-toolbar>#preflight-apply {
    align-self: end; margin: 0;
  }
  @media (min-width:761px) and (max-width:1180px) {
    .preflight-controls {
      grid-row: 1 / span 2;
    }
    .preflight-preview-card {
      grid-row: 1;
    }
    .preflight-output-stack {
      grid-row: 2;
    }
  }
  .preflight-preview-card .preflight-preview-placeholder {
    display: flex; flex: 1; align-self: stretch; margin: 0; min-height: 18rem;
  }
  .preflight-preview-placeholder .ui-file-dropzone {
    flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: var(--ds-space-2); text-align: center;
  }
  .preflight-preview-placeholder .ui-file-dropzone__content {
    justify-items: center;
  }
  .preflight-preview-placeholder .ui-file-dropzone__actions {
    justify-content: center;
  }
  .preflight-preview-actions {
    display: flex; justify-content: flex-end; padding: 0 var(--ds-space-4) var(--ds-space-3);
  }
  body[data-ui-system="v1"] {
    background: var(--ds-canvas); color: var(--ds-text); font-size: var(--ds-font-body);
  }
  body[data-ui-system="v1"] .main-content {
    min-width: 0; padding: 18px 20px 24px; background-color: var(--ds-canvas);
    background-image: url("images/cmykwave.png"); background-position: right top; background-repeat: no-repeat;
    background-size: auto; border-top-left-radius: 10px;
  }
  body[data-ui-system="v1"] .ui-page-header > :first-child {
    min-width: 0;
  }
  body[data-ui-system="v1"] .ui-page-header .panel-header-body {
    display: block; gap: 0;
  }
  body[data-ui-system="v1"] .main-content .ui-page-header h2 {
    margin: 0; color: var(--ds-text); font-size: var(--ds-font-page); font-weight: 700; line-height: 1.25;
  }
  body[data-ui-system="v1"] :is(.page-header, .panel-header, .modal-header) {
    gap: 8px 12px;
  }
  body[data-ui-system="v1"] .ui-action-summary-row {
    display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .ui-action-summary-row > :last-child {
    margin-inline-start: auto; text-align: end;
  }
  body[data-ui-system="v1"] .page-header {
    margin: 0 0 12px; align-items: center;
  }
  body[data-ui-system="v1"] .home-workspace {
    display: grid; gap: 12px; min-width: 0;
  }
  body[data-ui-system="v1"] .home-page-header {
    margin-bottom: 8px;
  }
  body[data-ui-system="v1"] .home-workspaces-heading h2,
  body[data-ui-system="v1"] .home-workspace-navigation {
    margin: 0;
  }
  body[data-ui-system="v1"] .home-workspace-actions {
    gap: 12px;
  }
  body[data-ui-system="v1"] .home-workspace-actions .home-save-status {
    margin-inline-end: 4px;
  }
  body[data-ui-system="v1"] .home-workspace-actions .home-save-status:empty {
    display: none;
  }
  body[data-ui-system="v1"] #home-workspace-error {
    color: var(--ds-danger);
  }
  @media (max-width: 700px) {
    body[data-ui-system="v1"] .home-workspace-navigation .ui-navigation-scrollport {
      flex-basis: 100%;
    }
    body[data-ui-system="v1"] .home-workspace-navigation .home-workspace-actions {
      justify-content: flex-start; flex-wrap: wrap; width: 100%; margin-inline-start: 0;
    }
  }
  body[data-ui-system="v1"] .home-empty-state h3 {
    margin: 0; font-size: 16px; line-height: 1.25;
  }
  body[data-ui-system="v1"] .home-empty-state p {
    margin: 4px 0 0; color: var(--ds-text-secondary); font-size: 13px;
  }
  body[data-ui-system="v1"] .home-widget-region {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px;
    min-height: 72px; padding: 10px;
  }
  body[data-ui-system="v1"] .home-widget[data-widget-width="full"] {
    grid-column: 1 / -1;
  }
  body[data-ui-system="v1"] .home-widget-region[data-home-grid-ready] {
    grid-auto-rows: 10px; row-gap: 0;
  }
  body[data-ui-system="v1"] .home-widget {
    overflow: hidden; position: relative; display: flex; flex-direction: column; box-sizing: border-box;
  }
  body[data-ui-system="v1"] .home-widget-header {
    flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px;
    padding: 12px 14px 8px;
  }
  body[data-ui-system="v1"] .home-widget-heading {
    flex: 1 1 auto; min-width: 0;
  }
  body[data-ui-system="v1"] .home-widget-header-actions {
    display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end;
    gap: 8px; min-width: 0; max-width: 100%; margin-inline-start: auto;
  }
  body[data-ui-system="v1"] .home-widget-header h3 {
    margin: 0; font-size: 14px; line-height: 1.25;
  }
  body[data-ui-system="v1"] .home-widget-description {
    margin: 3px 0 0; color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] .home-widget-message {
    color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] .home-widget-body {
    padding: 0 14px 12px; min-height: 0; overflow: auto; scrollbar-width: none;
  }
  body[data-ui-system="v1"] .home-widget-body::-webkit-scrollbar {
    display: none;
  }
  body[data-ui-system="v1"] .home-widget-body:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: -2px;
  }
  body[data-ui-system="v1"] .home-widget .home-print-jobs-table-scroll {
    max-height: none;
  }
  body[data-ui-system="v1"] .home-news-list {
    display: grid; gap: 4px; margin: 0; padding: 0; list-style: none;
  }
  body[data-ui-system="v1"] .home-news-post {
    min-width: 0;
  }
  body[data-ui-system="v1"] .home-news-post-trigger {
    display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 2px 10px; width: 100%; min-width: 0;
  }
  body[data-ui-system="v1"] .home-news-post-title {
    min-width: 0; font-weight: 600;
  }
  body[data-ui-system="v1"] .home-news-post-meta {
    margin-inline-start: auto; color: var(--ds-text-muted); font-size: 11px; font-weight: 400;
  }
  body[data-ui-system="v1"] .home-widget-resizer {
    position: absolute; bottom: 0; left: 14px; right: 14px; height: 12px; cursor: ns-resize; touch-action: none;
    border-radius: 4px; background: linear-gradient(var(--ds-border), var(--ds-border)) center / 36px 3px no-repeat;
  }
  body[data-ui-system="v1"] .home-widget-resizer[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .home-widget-resizer:focus-visible {
    outline: 2px solid var(--ds-focus);
  }
  body[data-ui-system="v1"] .home-widget-message {
    margin: 0;
  }
  body[data-ui-system="v1"] .home-inbox {
    display: grid; gap: 8px; min-width: 0;
  }
  body[data-ui-system="v1"] .home-inbox-toolbar {
    display: grid; grid-template-columns: 1fr auto; gap: 7px; align-items: center;
  }
  body[data-ui-system="v1"] .home-inbox-tabs {
    display: flex; grid-column: 1 / -1; gap: 4px; overflow-x: auto; scrollbar-width: none;
  }
  body[data-ui-system="v1"] .home-inbox-tabs::-webkit-scrollbar {
    display: none;
  }
  body[data-ui-system="v1"] .home-inbox-tab {
    white-space: nowrap;
  }
  body[data-ui-system="v1"] .home-inbox-tab span {
    margin-inline-start: 3px;
  }
  body[data-ui-system="v1"] .home-inbox-search {
    min-width: 0;
  }
  body[data-ui-system="v1"] .home-inbox-toolbar > [data-inbox-archive-all] {
    min-height: 30px; padding: 4px 7px; font-size: 12px;
  }
  body[data-ui-system="v1"] .home-inbox-bulk {
    display: flex; align-items: center; gap: 8px; color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] .home-inbox-bulk[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .home-inbox-status {
    margin: 0; color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] .home-inbox-list {
    display: grid; grid-template-columns: 16px max-content minmax(0,1fr) auto; gap: 0 8px; min-width: 0;
  }
  body[data-ui-system="v1"] .home-inbox-entry {
    display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: start; gap: 5px 8px;
    min-width: 0; padding: 7px 4px; border: 0; border-bottom: 1px solid var(--ds-border); border-radius: 0;
    background: transparent;
  }
  body[data-ui-system="v1"] .home-inbox-select {
    align-self: start; width: 14px; height: 14px; margin: 3px 0 0;
  }
  body[data-ui-system="v1"] .home-inbox-entry-main {
    display: grid; grid-template-columns: subgrid; align-items: start; column-gap: 10px; grid-column: 2 / span 2;
    grid-row: 1; width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ds-text);
    text-align: start;
  }
  body[data-ui-system="v1"] .home-inbox-entry-main:disabled {
    cursor: default; opacity: 1;
  }
  body[data-ui-system="v1"] .home-inbox-entry-main:not(:disabled) {
    cursor: pointer;
  }
  body[data-ui-system="v1"] .home-inbox-entry-main:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 2px;
  }
  body[data-ui-system="v1"] .home-inbox-context {
    grid-column: 1; color: var(--ds-text-secondary); font-size: 11px; font-weight: 400; line-height: 1.4;
    white-space: nowrap;
  }
  body[data-ui-system="v1"] .home-inbox-details {
    display: block; grid-column: 2; min-width: 0; color: var(--ds-text); font-size: 12px; font-weight: 400;
    line-height: 1.4; overflow-wrap: anywhere;
  }
  body[data-ui-system="v1"] .home-inbox-entry.is-unread :is(.home-inbox-details, .home-inbox-context) {
    font-weight: 650;
  }
  body[data-ui-system="v1"] .home-inbox-job {
    color: var(--ds-action);
  }
  body[data-ui-system="v1"] .home-inbox-separator {
    color: var(--ds-text-muted);
  }
  body[data-ui-system="v1"] .home-inbox-summary-line {
    display: block; min-width: 0; overflow-wrap: anywhere;
  }
  body[data-ui-system="v1"] .home-inbox-comment-text {
    display: block; margin-top: 1px; white-space: pre-wrap; overflow-wrap: anywhere;
  }
  body[data-ui-system="v1"] .home-inbox-entry-actions {
    display: flex; grid-column: 4; grid-row: 1; align-items: flex-start; gap: 4px;
  }
  body[data-ui-system="v1"] .home-inbox-entry-actions .home-inbox-icon-button {
    display: inline-flex; flex: 0 0 22px; width: 22px; min-width: 22px; height: 22px; min-height: 22px;
    align-items: center; justify-content: center; padding: 2px; border: 0; border-radius: 3px;
    background: transparent; color: var(--ds-text-secondary); cursor: pointer;
  }
  body[data-ui-system="v1"] .home-inbox-entry-actions .home-inbox-read-status.has-count {
    flex: 0 0 auto; width: auto; min-width: 22px; height: 22px; padding: 0;
  }
  body[data-ui-system="v1"] .home-inbox-read-count {
    display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center;
    padding: 0 4px; border-radius: 999px; background: var(--ds-action); color: var(--ds-surface); font-size: 10px;
    font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  }
  body[data-ui-system="v1"] .home-inbox-entry-actions .home-inbox-icon-button:hover {
    background: transparent; color: var(--ds-text);
  }
  body[data-ui-system="v1"] .home-inbox-entry-actions .home-inbox-icon-button:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 1px;
  }
  body[data-ui-system="v1"] .home-inbox-entry-actions .home-inbox-icon-button:active {
    background: transparent;
  }
  body[data-ui-system="v1"] .home-inbox-icon-button svg {
    display: block; width: 16px; height: 16px;
  }
  body[data-ui-system="v1"] .home-inbox-icon-button.is-active {
    color: var(--ds-action);
  }
  body[data-ui-system="v1"] .home-inbox-group-heading {
    grid-column: 1 / -1; margin: 5px 0 0; color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] .home-inbox-empty {
    grid-column: 1 / -1; margin: 4px 0; color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] .home-inbox-more {
    justify-self: start;
  }
  @media (max-width: 540px) {
    body[data-ui-system="v1"] .home-inbox-list {
      grid-template-columns: minmax(0,1fr); column-gap: 0;
    }
    body[data-ui-system="v1"] .home-inbox-entry {
      grid-template-columns: 16px minmax(0,1fr);
    }
    body[data-ui-system="v1"] .home-inbox-entry-main {
      grid-template-columns: minmax(0,1fr); grid-column: 2; row-gap: 2px;
    }
    body[data-ui-system="v1"] .home-inbox-context,
    body[data-ui-system="v1"] .home-inbox-details {
      grid-column: 1;
    }
    body[data-ui-system="v1"] .home-inbox-entry-actions {
      grid-column: 2; grid-row: 2; justify-self: end;
    }
  }
  body[data-ui-system="v1"] .home-toolbar {
    display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px;
    margin-inline-start: auto;
  }
  body[data-ui-system="v1"] .home-save-status {
    color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] .home-save-status--error {
    color: var(--ds-danger);
  }
  body[data-ui-system="v1"] .home-widget-actions {
    display: flex; gap: 4px;
  }
  body[data-ui-system="v1"] .home-icon-control,
  body[data-ui-system="v1"] .home-widget-icon-control {
    display: inline-grid; width: 28px; min-width: 28px; place-items: center;
  }
  body[data-ui-system="v1"] .home-icon-control span {
    font-size: 19px; line-height: 1;
  }
  body[data-ui-system="v1"] .home-widget-icon-control svg {
    width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round;
    stroke-width: 1.8;
  }
  body[data-ui-system="v1"] .home-widget[data-home-dragging="true"] {
    opacity: .55;
  }
  body[data-ui-system="v1"] .home-widget-header[data-home-drag-surface] {
    transition: background-color 120ms ease;
  }
  body[data-ui-system="v1"] .home-widget-header[data-home-drag-surface][draggable="true"] {
    cursor: grab; user-select: none;
  }
  body[data-ui-system="v1"] .home-widget-header[data-home-drag-surface][draggable="true"]:active {
    cursor: grabbing;
  }
  body[data-ui-system="v1"] .home-widget-header[data-home-drag-surface][draggable="true"]:focus-visible {
    outline: 2px solid var(--ds-action); outline-offset: -2px;
  }
  body[data-ui-system="v1"] .legal-notices-page {
    display: grid; gap: 12px;
  }
  body[data-ui-system="v1"] .legal-draft-notice {
    border-inline-start: 4px solid var(--ds-warning, #b7791f);
  }
  body[data-ui-system="v1"] .legal-draft-notice p {
    margin: 4px 0 0; color: var(--ds-text-secondary);
  }
  body[data-ui-system="v1"] .legal-notices-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start;
  }
  body[data-ui-system="v1"] .legal-notice-document {
    min-width: 0;
  }
  body[data-ui-system="v1"] .legal-notice-document > header {
    padding-bottom: 10px; border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .legal-notice-document h3 {
    margin: 0; font-size: 16px;
  }
  body[data-ui-system="v1"] .legal-notice-content {
    color: var(--ds-text); font-size: var(--ds-font-body); line-height: 1.55;
  }
  body[data-ui-system="v1"] .legal-notice-content :is(p, ul, ol) {
    margin: 12px 0;
  }
  body[data-ui-system="v1"] .legal-notice-content :is(ul, ol) {
    padding-inline-start: 22px;
  }
  body[data-ui-system="v1"] .legal-notice-content h2 {
    margin: 24px 0 8px; font-size: 15px;
  }
  body[data-ui-system="v1"] .legal-notice-content h3 {
    margin: 18px 0 6px; font-size: 14px;
  }
  body[data-ui-system="v1"] .legal-notice-content code {
    overflow-wrap: anywhere;
  }
  body[data-ui-system="v1"] .legal-draft-callout {
    margin: 12px 0; padding: 10px 12px; border-inline-start: 3px solid var(--ds-action);
    background: var(--ds-surface-subtle, #f4f7fb);
  }
  body[data-ui-system="v1"] .legal-draft-callout p {
    margin: 0;
  }
  body[data-ui-system="v1"] .legal-draft-table-scroll {
    overflow-x: auto; margin: 12px 0;
  }
  body[data-ui-system="v1"] .legal-draft-table-scroll table {
    width: 100%; border-collapse: collapse;
  }
  body[data-ui-system="v1"] .legal-draft-table-scroll :is(th, td) {
    padding: 6px 8px; border: 1px solid var(--ds-border); text-align: start; vertical-align: top;
  }
  @media (max-width: 900px) {
    body[data-ui-system="v1"] .legal-notices-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  body[data-ui-system="v1"] .home-empty-add {
    margin-top: 10px;
  }
  body[data-ui-system="v1"] .home-widget-choice {
    display: grid; grid-template-columns: auto 1fr; gap: 2px 7px; margin: 7px 0;
  }
  body[data-ui-system="v1"] .home-widget-choice small {
    grid-column: 2; color: var(--ds-text-secondary); font-weight: 400;
  }
  body[data-ui-system="v1"] .home-widget-picker {
    min-width: 0; margin: 0; padding: 8px 10px 10px; border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control);
  }
  body[data-ui-system="v1"] .home-widget-picker > legend {
    padding: 0 4px; color: var(--ds-text-secondary); font-size: 12px; font-weight: 600;
  }
  body[data-ui-system="v1"] .home-widget-picker-options {
    display: grid; gap: 2px; max-height: 220px; overflow-y: auto; overscroll-behavior: contain;
    scrollbar-gutter: stable; padding: 1px 3px 1px 0;
  }
  body[data-ui-system="v1"] .home-widget-picker-options > .home-widget-choice {
    display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 2px 8px; align-items: center;
    margin: 0; padding: 5px 7px; border-radius: var(--ds-radius-control); cursor: pointer;
  }
  body[data-ui-system="v1"] .home-widget-picker-options > .home-widget-choice:hover,
  body[data-ui-system="v1"] .home-widget-picker-options > .home-widget-choice:has(input:checked) {
    background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] .home-widget-picker-options > .home-widget-choice:has(input:focus-visible) {
    outline: 2px solid var(--ds-focus); outline-offset: 1px;
  }
  body[data-ui-system="v1"] .home-widget-picker-options .home-widget-choice-name {
    min-width: 0; color: var(--ds-text);
  }
  body[data-ui-system="v1"] .home-widget-picker-options .home-widget-choice small {
    grid-column: 2; min-width: 0; color: var(--ds-text-secondary); font-weight: 400;
  }
  body[data-ui-system="v1"] .home-connections-config {
    display: grid; gap: var(--ds-space-4); min-width: 0;
  }
  body[data-ui-system="v1"] .home-connections-config-sections {
    border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .home-connections-config-section {
    position: relative; min-width: 0; padding: var(--ds-space-2) 0; border: 0; border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .home-connections-config-section-heading {
    display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
    gap: var(--ds-space-1) var(--ds-space-3); min-width: 0; padding-inline-end: 36px;
  }
  body[data-ui-system="v1"] .home-connections-config-toggle {
    display: flex; grid-template-columns: none; align-items: center; gap: var(--ds-space-2);
    margin: 0; font-weight: 650;
  }
  body[data-ui-system="v1"] .home-connections-config-section-summary {
    margin: 0; color: var(--ds-text-secondary); font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] .home-connections-config-details {
    margin-inline-start: 22px;
  }
  body[data-ui-system="v1"] .home-connections-config-details > summary,
  body[data-ui-system="v1"] .home-connections-config-filters > summary {
    cursor: pointer;
  }
  body[data-ui-system="v1"] .home-connections-config-details > .home-connections-config-gear {
    position: absolute; inset-block-start: var(--ds-space-1); inset-inline-end: 0; display: grid;
    place-items: center; width: 28px; height: 28px; padding: 0; list-style: none;
    color: var(--ds-text-secondary);
  }
  body[data-ui-system="v1"] .home-connections-config-gear::marker {
    content: "";
  }
  body[data-ui-system="v1"] .home-connections-config-gear::-webkit-details-marker {
    display: none;
  }
  body[data-ui-system="v1"] .home-connections-config-gear svg {
    width: 16px; height: 16px;
  }
  body[data-ui-system="v1"] .home-connections-config-gear:hover {
    color: var(--ds-action); background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] .home-connections-config-gear:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 1px;
  }
  body[data-ui-system="v1"] .home-connections-config-controls {
    margin: var(--ds-space-2) 0 var(--ds-space-2) var(--ds-space-3);
  }
  body[data-ui-system="v1"] .home-connections-date-range {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-3);
    min-width: 0;
  }
  body[data-ui-system="v1"] .home-connections-date-range[hidden],
  body[data-ui-system="v1"] .home-connections-config-section [hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .home-connections-config-error {
    margin: 0; color: var(--ds-danger); font-size: var(--ds-font-label);
  }
  body[data-ui-system="v1"] .home-connections-config-filters {
    border-top: 1px solid var(--ds-border); padding-top: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .home-connections-config-filters > summary > span {
    margin-inline-start: var(--ds-space-2); color: var(--ds-text-secondary);
    font-size: var(--ds-font-metadata); font-weight: 400;
  }
  body[data-ui-system="v1"] .home-connections-config-filter-content {
    margin-inline-start: 22px; padding-top: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .home-connections-config-filter-content > p {
    margin: 0 0 var(--ds-space-2);
  }
  body[data-ui-system="v1"] .home-connections-config-filter-fields > .ui-field {
    flex: 1 1 14rem; min-width: min(100%, 12rem);
  }
  body[data-ui-system="v1"] .home-connections-config-presentation,
  body[data-ui-system="v1"] .home-connections-config-layout {
    min-width: 0; margin: 0; padding: var(--ds-space-2) var(--ds-space-3);
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control);
  }
  body[data-ui-system="v1"] .home-connections-config-presentation > legend,
  body[data-ui-system="v1"] .home-connections-config-layout > legend {
    padding: 0 var(--ds-space-1); font-weight: 650;
  }
  body[data-ui-system="v1"] .home-widget-width {
    min-width: 0; margin: 0; padding: var(--ds-space-2) var(--ds-space-3);
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control);
  }
  body[data-ui-system="v1"] .home-widget-width > legend {
    padding: 0 var(--ds-space-1); font-weight: 650;
  }
  body[data-ui-system="v1"] .home-widget-width-options {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-4);
  }
  body[data-ui-system="v1"] .home-widget-width-options > .home-widget-choice {
    display: inline-flex; grid-template-columns: none; align-items: center; gap: var(--ds-space-2); margin: 0;
  }
  body[data-ui-system="v1"] .home-connections-config-layout > .ui-meta {
    display: block; margin-bottom: var(--ds-space-1);
  }
  body[data-ui-system="v1"] .home-widget-link-options {
    display: grid; gap: 2px;
  }
  body[data-ui-system="v1"] .home-job-filter-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 10px 14px;
    margin: 10px 0 16px;
  }
  body[data-ui-system="v1"] .home-widget-count {
    margin: 0 0 6px; color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] .home-print-jobs-table-scroll {
    max-height: 19rem; margin: 0;
  }
  body[data-ui-system="v1"] .home-chart-frame {
    position: relative; width: 100%; min-width: 0; height: 260px;
  }
  body[data-ui-system="v1"] .home-chart-frame[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .home-chart-summary {
    margin-top: 8px;
  }
  body[data-ui-system="v1"] .home-chart-summary summary {
    cursor: pointer; color: var(--ds-text-secondary);
  }
  body[data-ui-system="v1"] .home-chart-summary .ui-data-table-scroll {
    max-height: 16rem; margin-top: 8px;
  }
  body[data-ui-system="v1"] .home-print-jobs-table {
    width: 100%; min-width: 38rem;
  }
  body[data-ui-system="v1"] .home-print-jobs-table :is(th, td) {
    padding: 5px 7px;
  }
  body[data-ui-system="v1"] .home-print-jobs-table th {
    position: static;
  }
  body[data-ui-system="v1"] .home-print-jobs-table .home-print-jobs-age {
    text-align: end;
  }
  body[data-ui-system="v1"] .home-print-jobs-table .home-print-jobs-job {
    min-width: 0;
  }
  body[data-ui-system="v1"] .home-print-job-link {
    display: block; overflow: hidden; color: var(--ds-link); text-overflow: ellipsis; white-space: nowrap;
  }
  body[data-ui-system="v1"] .home-print-job-link:hover {
    text-decoration: underline;
  }
  body[data-ui-system="v1"] .home-quick-links-list {
    display: grid; grid-auto-rows: 1fr; width: max-content; max-width: 100%; gap: var(--ds-space-1); margin: 0;
    padding: 0; list-style: none;
  }
  body[data-ui-system="v1"] .home-quick-link {
    display: inline-flex; align-items: center; justify-content: flex-start; text-align: left; gap: 7px; width: 100%;
    max-width: 100%; box-sizing: border-box;
  }
  @media (max-width: 720px) {
    body[data-ui-system="v1"] .home-widget-region {
      grid-template-columns: minmax(0, 1fr);
    }
    body[data-ui-system="v1"] .home-toolbar {
      width: 100%; justify-content: flex-start; margin-inline-start: 0;
    }
  }
  body[data-ui-system="v1"] :is(.page-header h2, .panel-title) {
    margin: 0;
  }
  body[data-ui-system="v1"] :is(.page-subtitle, .panel-subtitle, .modal-subtitle, .muted-text, .form-help-text) {
    color: var(--ds-text-secondary);
  }
  body[data-ui-system="v1"] :is(.page-subtitle, .panel-subtitle, .modal-subtitle) {
    margin: 3px 0 0; font-size: 12px; line-height: 1.35;
  }
  body[data-ui-system="v1"] :is(.eyebrow, .subheading) {
    margin: 0 0 3px; font-size: 10px; line-height: 1.2; font-weight: 700; letter-spacing: .06em;
  }
  body[data-ui-system="v1"] .panel {
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius-surface); background: var(--ds-surface);
    box-shadow: 0 1px 2px rgba(23, 43, 59, .045); padding: 14px;
  }
  body[data-ui-system="v1"]:is(
  [data-page="training"],
  [data-page="inventory"],
  [data-page="make_barcode"]
) .main-content > .panel.active {
    padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  }
  body[data-ui-system="v1"] .ui-navigation-workspace {
    min-width: 0; width: 100%;
  }
  body[data-ui-system="v1"] .ui-navigation-scrollport {
    flex: 1 1 0; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  }
  body[data-ui-system="v1"] .ui-navigation-scrollport::-webkit-scrollbar {
    display: none;
  }
  body[data-ui-system="v1"] .ui-navigation-items {
    display: flex; align-items: center; gap: 4px; width: max-content; margin: 0; padding: 0;
  }
  body[data-ui-system="v1"] .ui-navigation-actions {
    display: flex; flex: 0 0 auto; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 100%;
    margin-inline-start: auto;
  }
  body[data-ui-system="v1"] .ui-data-table-scroll {
    position: relative; width: 100%; min-width: 0; max-width: 100%; max-height: min(70vh, 800px);
    margin-block-start: 12px; padding: 0; overflow: auto; border: 1px solid var(--ds-border); border-radius: 4px;
    background: var(--ds-surface);
  }
  body[data-ui-system="v1"] .ui-data-table {
    display: grid; width: max-content; min-width: 0; max-width: none; table-layout: auto; border-collapse: collapse;
    background: var(--ds-surface); color: var(--ds-text); font-size: var(--ds-font-table);
    font-variant-numeric: tabular-nums;
  }
  body[data-ui-system="v1"] .ui-data-table[data-fill-column] {
    width: 100%; min-width: max-content;
  }
  body[data-ui-system="v1"] .ui-data-table[data-column-layout="spread"] {
    width: 100%; min-width: min-content;
  }
  body[data-ui-system="v1"] .ui-data-table :is(thead, tbody, tr) {
    display: contents;
  }
  body[data-ui-system="v1"] .ui-data-table :is(th, td) {
    box-sizing: border-box; width: auto; min-width: 0; max-width: none; padding: 6px 8px; overflow: hidden;
    border: 0; line-height: 1.35; font-size: var(--ds-font-table); white-space: nowrap; text-overflow: ellipsis;
    vertical-align: middle; box-shadow: inset 0 -1px var(--ds-border);
  }
  body[data-ui-system="v1"] .ui-data-table th {
    position: sticky; top: 0; z-index: 2; min-width: 48px; background: var(--ds-surface-quiet);
    color: var(--ds-text-secondary); font-size: 12px; font-weight: 700; text-align: start;
  }
  body[data-ui-system="v1"] .ui-data-table .select-col {
    min-width: 32px; text-align: center;
  }
  body[data-ui-system="v1"] .ui-data-table th[aria-sort] {
    cursor: pointer;
  }
  body[data-ui-system="v1"] .ui-data-table th:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: -2px;
  }
  body[data-ui-system="v1"] .ui-data-table th[aria-sort]::after {
    content: ""; position: static; display: inline-block; width: 0; height: 0; margin-inline: 6px 2px; border: 0;
    border-inline: 4px solid transparent; border-top: 6px solid var(--ds-text-muted); transform: none;
    vertical-align: middle;
  }
  body[data-ui-system="v1"] .ui-data-table th[aria-sort="ascending"]::after {
    border-top: 0; border-bottom: 6px solid var(--ds-action);
  }
  body[data-ui-system="v1"] .ui-data-table th[aria-sort="descending"]::after {
    border-top-color: var(--ds-action);
  }
  body[data-ui-system="v1"] .ui-data-table tbody tr:not(.empty-row) {
    cursor: pointer;
  }
  body[data-ui-system="v1"] .ui-data-table tbody tr:focus-visible > td {
    box-shadow: inset 0 2px var(--ds-focus), inset 0 -2px var(--ds-focus);
  }
  body[data-ui-system="v1"] .ui-data-table .empty-row td {
    grid-column: 1 / -1; padding: 16px 12px; color: var(--ds-text-muted);
  }
  body[data-ui-system="v1"] .ui-column-resizer {
    position: absolute; inset-block: 0; inset-inline-end: 0; width: 8px; border-inline-end: 2px solid transparent;
    cursor: col-resize; touch-action: none;
  }
  body[data-ui-system="v1"] .ui-data-table th:hover .ui-column-resizer,
  body[data-ui-system="v1"] .ui-column-resizer:focus-visible {
    border-inline-end-color: var(--ds-border-strong);
  }
  body[data-ui-system="v1"] .ui-column-resizer:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: -2px;
  }
  body[data-ui-system="v1"].ui-column-resizing,
  body[data-ui-system="v1"].ui-column-resizing * {
    cursor: col-resize !important; user-select: none !important;
  }
  body[data-ui-system="v1"] .panel + .panel {
    margin-top: 12px;
  }
  body[data-ui-system="v1"] .ui-table tbody tr > td {
    background-color: var(--ds-surface);
  }
  body[data-ui-system="v1"] .ui-table tbody tr:is(:hover, :focus-visible) > td {
    background-color: var(--ds-row-hover, var(--ds-surface-quiet));
  }
  body[data-ui-system="v1"] .ui-table tbody tr.selected > td {
    background-color: var(--ds-row-selected, #e8f1fb);
  }
  body[data-ui-system="v1"] .panel-header {
    margin: 0 0 12px; padding: 0; align-items: center;
  }
  body[data-ui-system="v1"] .panel-body {
    padding: 0;
  }
  body[data-ui-system="v1"] :is(.panel-actions, .panel-button-row, .header-actions, .button-row, .form-actions, .toolbar-left, .toolbar-right) {
    gap: 6px;
  }
  body[data-ui-system="v1"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), select, textarea) {
    max-width: 100%;
  }
  body[data-ui-system="v1"] textarea {
    resize: vertical;
  }
  body[data-ui-system="v1"] :is(input, select, textarea, button, a):focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 1px;
  }
  body[data-ui-system="v1"] :is(.form-grid, .form-field, .form-row, label) {
    font-size: var(--ds-font-label);
  }
  body[data-ui-system="v1"] :is(.form-grid, .form-field) {
    gap: 8px;
  }
  body[data-ui-system="v1"] :is(.form-label, .form-field > span, label > span:first-child) {
    color: var(--ds-text-secondary); font-weight: 600;
  }
  body[data-ui-system="v1"] .form-actions {
    margin-top: 12px;
  }
  body[data-ui-system="v1"] :is(.panel-toolbar, .job-toolbar) {
    gap: 8px; margin-bottom: 8px; padding: 0;
  }
  body[data-ui-system="v1"] .table-container {
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); background: var(--ds-surface);
    box-shadow: none;
  }
  body[data-ui-system="v1"] table {
    font-size: var(--ds-font-table);
  }
  body[data-ui-system="v1"] th {
    height: 30px; padding: 5px 8px; background: var(--ds-surface-quiet); color: var(--ds-text-secondary);
    font-size: 11px; line-height: 1.2; font-weight: 700;
  }
  body[data-ui-system="v1"] td {
    min-height: 32px; padding: 6px 8px; line-height: 1.3;
  }
  body[data-ui-system="v1"] tbody tr:hover {
    background: color-mix(in srgb, var(--ds-action), transparent 96%);
  }
  body[data-ui-system="v1"] :is(.modal-content, dialog) {
    border-radius: 7px;
  }
  body[data-ui-system="v1"] .modal-content {
    padding: 16px; box-shadow: 0 16px 40px rgba(15, 23, 42, .22);
  }
  body[data-ui-system="v1"] .modal-header {
    margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .modal-header h3 {
    margin: 0; font-size: 17px; line-height: 1.25;
  }
  body[data-ui-system="v1"] .modal-body {
    padding: 0;
  }
  body[data-ui-system="v1"] :is(.dashboard-grid, .training-grid, .training-management-grid) {
    gap: 12px;
  }
  body[data-ui-system="v1"] :is(.company-admin-page, .profile-page) {
    font-size: 13px;
  }
  body[data-ui-system="v1"] :is(.training-card h3, .form-card-title, .crm-panel-title, .recipe-panel-heading h3, .settings-card-header h3) {
    margin-top: 0;
  }
  body[data-ui-system="v1"] :is(.alert, .empty-state) {
    padding: 10px 12px; border-radius: var(--ds-radius-control); font-size: 12px;
  }
  body[data-ui-system="v1"] details > summary {
    cursor: pointer; font-size: 13px; font-weight: 650;
  }
  @media (max-width: 900px) {
    body[data-ui-system="v1"] .main-content {
      padding: 14px 12px 18px; border-radius: 0;
    }
  }
  @media (max-width: 640px) {
    body[data-ui-system="v1"] .panel {
      padding: 12px;
    }
    body[data-ui-system="v1"] :is(.page-header, .panel-header) {
      align-items: stretch;
    }
  }
  body[data-ui-system="v1"] .pricing-recipes-page {
    min-width: 0; color: var(--ds-text);
  }
  body[data-ui-system="v1"] [hidden] {
    display: none !important;
  }
  body[data-ui-system="v1"] .pricing-recipes-header {
    display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); min-width: 0;
    margin: 0 0 var(--ds-space-3);
  }
  body[data-ui-system="v1"] .pricing-recipes-header > :first-child {
    min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-builder-actions {
    display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-space-2); margin-inline-start: auto;
  }
  body[data-ui-system="v1"] :is(.recipe-panel, .pricing-admin-panel) {
    min-width: 0;
  }
  body[data-ui-system="v1"] :is(.recipe-panel-heading, .pricing-panel-heading, .recipe-search-heading, .recipe-section-heading, .pricing-editor-heading, .pricing-tier-heading, .pricing-editor-actions) {
    display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ds-space-2); min-width: 0;
  }
  body[data-ui-system="v1"] :is(.recipe-panel-heading, .pricing-panel-heading) {
    margin: 0 0 var(--ds-space-3);
  }
  body[data-ui-system="v1"] :is(.recipe-panel-heading p, .pricing-panel-heading p, .recipe-search-heading p) {
    margin: var(--ds-space-1) 0 0; color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] :is(.recipe-management, .recipe-builder, .recipe-library-page, .pricing-admin) :is(h2, h3, h4, p) {
    min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-count {
    flex: 0 0 auto; padding: 3px 8px; border: 1px solid var(--ds-border); border-radius: 999px;
    background: var(--ds-surface-quiet); color: var(--ds-text-secondary); font-size: var(--ds-font-metadata);
    white-space: nowrap;
  }
  body[data-ui-system="v1"] .recipe-library-grid {
    display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 1fr); align-items: start;
    gap: var(--ds-space-3); min-width: 0;
  }
  body[data-ui-system="v1"] :is(.recipe-library-list-panel, .recipe-library-preview-panel) {
    min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-library-list-panel {
    display: flex; flex-direction: column;
  }
  body[data-ui-system="v1"] .recipe-library-filter,
  body[data-ui-system="v1"] .recipe-builder label,
  body[data-ui-system="v1"] .pricing-admin label {
    display: grid; align-content: start; gap: var(--ds-space-1); min-width: 0; color: var(--ds-text-secondary);
    font-size: var(--ds-font-label); font-weight: 600;
  }
  body[data-ui-system="v1"] .recipe-library-filter {
    margin: 0 0 var(--ds-space-3);
  }
  body[data-ui-system="v1"] :is(.recipe-builder, .recipe-library-page, .pricing-admin) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), select, textarea) {
    box-sizing: border-box; width: 100%; min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-library-scroll {
    min-height: 8rem; max-height: min(62vh, 42rem); overflow: auto; padding-inline-end: 3px;
  }
  body[data-ui-system="v1"] .recipe-library-category {
    display: grid; gap: var(--ds-space-1);
  }
  body[data-ui-system="v1"] .recipe-library-category + .recipe-library-category {
    margin-block-start: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .recipe-library-subcategory {
    margin-inline-start: var(--ds-space-3); margin-block-start: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .recipe-library-category summary {
    margin: 0; color: var(--ds-text-muted); font-size: var(--ds-font-metadata); letter-spacing: .04em;
    text-transform: uppercase; cursor: pointer;
  }
  body[data-ui-system="v1"] .recipe-library-item .recipe-library-sku {
    color: var(--ds-text-muted); font-size: 13px; font-weight: 400;
  }
  body[data-ui-system="v1"] .recipe-library-item {
    display: block; width: 100%; min-width: 0; text-align: start; cursor: pointer;
  }
  body[data-ui-system="v1"] .saved-recipe {
    display: grid; gap: 3px; width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control); background: var(--ds-surface); color: var(--ds-text);
    text-align: start; text-decoration: none; cursor: pointer;
  }
  body[data-ui-system="v1"] .recipe-library-preview-panel {
    display: flex; flex-direction: column;
  }
  body[data-ui-system="v1"] .recipe-library-preview-panel .recipe-calculation {
    min-width: 0; overflow: auto;
  }
  body[data-ui-system="v1"] .recipe-library-preview-empty {
    padding-block: var(--ds-space-4);
  }
  body[data-ui-system="v1"] .recipe-side-rail {
    display: grid; align-content: start; gap: var(--ds-space-3); min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-editor-heading-actions,
  body[data-ui-system="v1"] .pricing-editor-heading-actions {
    display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .recipe-editor-panel[data-mode="view"] #recipe-editor-fields {
    opacity: .72;
  }
  body[data-ui-system="v1"] .recipe-library-item {
    padding-inline-end: 8px;
  }
  body[data-ui-system="v1"] .recipe-tool-launch-panel {
    display: flex; flex-direction: column; align-items: flex-start; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .recipe-search-card {
    min-width: 0; margin-block-end: var(--ds-space-3); padding: 10px;
  }
  body[data-ui-system="v1"] .recipe-search-heading {
    align-items: center; margin-block-end: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .recipe-search-row,
  body[data-ui-system="v1"] .recipe-preview-controls {
    display: flex; align-items: end; flex-wrap: wrap; gap: var(--ds-space-2); min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-search-input-wrap {
    position: relative; flex: 1 1 12rem; min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-search-suggestions {
    position: absolute; z-index: 5; inset: calc(100% + 4px) 0 auto; display: grid; gap: 2px; padding: 4px;
    border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-control);
    background: var(--ds-surface); box-shadow: 0 8px 20px rgba(15, 43, 59, .14);
  }
  body[data-ui-system="v1"] .recipe-suggestion {
    display: grid; gap: 2px; padding: 7px 8px; border: 0; border-radius: var(--ds-radius-control);
    background: transparent; color: var(--ds-text); text-align: start; cursor: pointer;
  }
  body[data-ui-system="v1"] .recipe-suggestion:hover {
    background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] .recipe-suggestion small,
  body[data-ui-system="v1"] :is(.recipe-tags-empty, .optional-label, .component-unit, .pricing-catalog-main small, .pricing-tier-count) {
    color: var(--ds-text-muted); font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] :is(.recipe-import-status, .pricing-import-status) {
    min-height: 0; margin: var(--ds-space-2) 0 0; color: var(--ds-success); font-size: 12px;
  }
  body[data-ui-system="v1"] :is(.recipe-import-status, .pricing-import-status):empty {
    display: none;
  }
  body[data-ui-system="v1"] :is(.recipe-import-status.error, .pricing-import-status.error, .recipe-csv-preview .error) {
    color: var(--ds-danger);
  }
  body[data-ui-system="v1"] :is(.recipe-catalog-toolbar, .recipe-form-grid, .pricing-editor-grid) {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-2) var(--ds-space-3);
    min-width: 0; margin: var(--ds-space-3) 0;
  }
  body[data-ui-system="v1"] :is(.recipe-name-field, .recipe-wide-field) {
    grid-column: 1 / -1;
  }
  body[data-ui-system="v1"] .recipe-tag-editor,
  body[data-ui-system="v1"] .recipe-tag-list {
    display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-space-1); min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-tag-list {
    flex: 1 1 auto;
  }
  body[data-ui-system="v1"] .recipe-tag-chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 5px;
    border: 1px solid color-mix(in srgb, var(--ds-action) 28%, var(--ds-border)); border-radius: 999px;
    background: color-mix(in srgb, var(--ds-action) 9%, var(--ds-surface)); color: var(--ds-action-hover);
    font-size: 12px; line-height: 1.25;
  }
  body[data-ui-system="v1"] .recipe-tag-remove {
    display: inline-grid; place-items: center; width: 14px; height: 14px; min-width: 14px; min-height: 14px;
    padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ds-action); font-size: 13px;
    line-height: 1; cursor: pointer;
  }
  body[data-ui-system="v1"] .recipe-tag-remove:hover:not(:disabled) {
    background: color-mix(in srgb, var(--ds-action) 14%, transparent);
  }
  body[data-ui-system="v1"] :is(.recipe-section, .recipe-production-specification) {
    min-width: 0; margin-block-start: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .recipe-section-heading {
    align-items: center; margin-block-end: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .section-help {
    max-width: 52ch; margin: var(--ds-space-1) 0 0; color: var(--ds-text-muted); font-size: 12px; font-weight: 400;
  }
  body[data-ui-system="v1"] .recipe-production-specification > summary {
    display: flex; align-items: center; gap: var(--ds-space-2); list-style: none; cursor: pointer;
  }
  body[data-ui-system="v1"] .recipe-production-specification > summary::-webkit-details-marker {
    display: none;
  }
  body[data-ui-system="v1"] .recipe-production-specification > summary::after {
    content: "⌄"; margin-inline-start: auto; color: var(--ds-text-muted); font-size: 18px; line-height: 1;
    transition: transform .15s ease;
  }
  body[data-ui-system="v1"] .recipe-production-specification:not([open]) > summary::after {
    transform: rotate(-90deg);
  }
  body[data-ui-system="v1"] .recipe-spec-content {
    padding-block-start: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .recipe-spec-layout {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(15rem, .9fr); gap: var(--ds-space-3);
    min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-spec-layout label {
    display: grid; align-content: start; gap: var(--ds-space-1); min-width: 0; color: var(--ds-text-secondary);
    font-size: var(--ds-font-label); font-weight: 600;
  }
  body[data-ui-system="v1"] .recipe-spec-layout :is(input, select, textarea) {
    box-sizing: border-box; width: 100%; min-width: 0;
  }
  body[data-ui-system="v1"] :is(.recipe-spec-dimensions, .recipe-spec-controls) {
    display: grid; align-content: start; align-self: start; gap: var(--ds-space-2); min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-spec-size {
    display: grid; grid-template-columns: minmax(6rem, 7rem) repeat(2, minmax(0, 1fr)); align-items: start;
    gap: var(--ds-space-2); min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-spec-size > strong {
    padding-block-start: 7px; font-size: 12px;
  }
  body[data-ui-system="v1"] .recipe-spec-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-ui-system="v1"] .recipe-spec-controls .recipe-spec-output {
    grid-column: 2; max-width: none;
  }
  body[data-ui-system="v1"] .recipe-spec-note {
    grid-column: 1;
  }
  body[data-ui-system="v1"] .recipe-spec-secondary {
    display: grid; align-content: start; gap: var(--ds-space-2); min-width: 0;
  }
  body[data-ui-system="v1"] .recipe-spec-variable-help {
    grid-column: 1 / -1; margin: 0; color: var(--ds-text-muted); font-size: var(--ds-font-size-sm);
  }
  body[data-ui-system="v1"] :is(.recipe-catalog-list, .saved-recipes, .pricing-catalog-list) {
    max-height: min(62vh, 42rem); overflow: auto;
  }
  body[data-ui-system="v1"] :is(.catalog-row, .pricing-catalog-row) {
    display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-2); min-width: 0;
    padding: 8px 0; border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] :is(.catalog-row > div, .pricing-catalog-main) {
    display: grid; gap: 2px; min-width: 0;
  }
  body[data-ui-system="v1"] :is(.catalog-row strong, .pricing-catalog-main strong) {
    color: var(--ds-text-secondary); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] :is(.catalog-row span, .pricing-catalog-main span) {
    min-width: 0; overflow: hidden; color: var(--ds-text); font-size: 12px; text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-ui-system="v1"] :is(.pricing-catalog-actions, .recipe-library-actions) {
    display: flex; align-items: center; flex: 0 0 auto; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .pricing-categories {
    display: flex; flex-wrap: wrap; gap: var(--ds-space-1); padding-block-end: var(--ds-space-2);
    border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .pricing-category {
    min-height: 30px; padding: 4px 9px; border: 1px solid var(--ds-border-strong); border-radius: 999px;
    background: var(--ds-surface); color: var(--ds-text-secondary); font: inherit; font-size: 12px; cursor: pointer;
  }
  body[data-ui-system="v1"] :is(.pricing-category.active, .pricing-category:hover) {
    border-color: var(--ds-action); background: var(--ds-surface-quiet); color: var(--ds-text);
  }
  body[data-ui-system="v1"] .pricing-catalog-toolbar {
    margin-block: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .pricing-catalog-actions {
    white-space: nowrap;
  }
  body[data-ui-system="v1"] :is(.pricing-editor-source, .pricing-csv-preview) {
    margin-block: var(--ds-space-3); padding: 10px; border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control); background: var(--ds-surface-quiet); color: var(--ds-text-secondary);
    font-size: 12px;
  }
  body[data-ui-system="v1"] .pricing-csv-preview p {
    margin: 0;
  }
  body[data-ui-system="v1"] .pricing-csv-preview ul {
    max-height: 9rem; margin: var(--ds-space-2) 0 0; overflow: auto; padding-inline-start: 20px;
  }
  body[data-ui-system="v1"] .pricing-csv-preview .warning {
    margin-block-start: var(--ds-space-2); color: var(--ds-warning);
  }
  body[data-ui-system="v1"] .pricing-item-editor {
    max-width: 900px; margin: var(--ds-space-3) auto 0;
  }
  body[data-ui-system="v1"] .pricing-item-editor[data-mode="view"] #pricing-item-fields {
    opacity: .72;
  }
  body[data-ui-system="v1"] .print-pricing-center-column {
    min-width: 0;
  }
  body[data-ui-system="v1"] .print-pricing-center-column .pricing-item-editor {
    width: 100%; max-width: none; margin: 0;
  }
  body[data-ui-system="v1"] .pricing-editor-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 14rem); margin-block-start: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .pricing-tier-heading {
    align-items: center; padding-block-end: var(--ds-space-2); border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .pricing-tier-table {
    margin-block-start: var(--ds-space-2); overflow-x: auto;
  }
  body[data-ui-system="v1"] .pricing-tier-header,
  body[data-ui-system="v1"] .pricing-tier-row {
    display: grid; grid-template-columns: minmax(8rem, 1fr) repeat(2, minmax(7.5rem, 1fr)) 4rem;
    align-items: center; gap: var(--ds-space-2); min-width: 28rem;
  }
  body[data-ui-system="v1"] .pricing-tier-header {
    padding-block: 5px; color: var(--ds-text-muted); font-size: var(--ds-font-metadata); font-weight: 700;
  }
  body[data-ui-system="v1"] .pricing-tier-row {
    margin-block-end: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .pricing-editor-actions {
    align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-block-start: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .pricing-editor-actions .pricing-import-status {
    margin-inline-end: auto;
  }
  body[data-ui-system="v1"] .pricing-import-confirmation {
    position: fixed; z-index: 20; inset: 0; background: rgba(15, 43, 59, .42);
  }
  body[data-ui-system="v1"] .pricing-confirmation-card {
    position: absolute; top: 50%; left: 50%; width: min(30rem, calc(100% - 2rem)); max-height: calc(100% - 2rem);
    overflow: auto; padding: 16px; transform: translate(-50%, -50%); border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-surface); background: var(--ds-surface);
    box-shadow: 0 16px 40px rgba(15, 43, 59, .22);
  }
  body[data-ui-system="v1"] .pricing-confirmation-card > p {
    margin: var(--ds-space-3) 0; color: var(--ds-text-secondary);
  }
  body[data-ui-system="v1"] .pricing-confirmation-row {
    display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-2);
    padding: var(--ds-space-2) 0; border-bottom: 1px solid var(--ds-border); color: var(--ds-text-secondary);
  }
  body[data-ui-system="v1"] .pricing-confirmation-actions,
  body[data-ui-system="v1"] .recipe-tags-modal-actions {
    display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--ds-space-2);
    margin-block-start: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .recipe-transfer-section {
    padding-block-start: var(--ds-space-3); border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .recipe-transfer-section + .recipe-transfer-section {
    margin-block-start: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .recipe-transfer-section > p {
    margin-block-start: var(--ds-space-1); color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] .recipe-management-tools {
    display: flex; align-items: end; flex-wrap: wrap; gap: var(--ds-space-2);
    padding-block-start: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .recipe-management-tools > * {
    min-width: 0;
  }
  body[data-ui-system="v1"] .file-control {
    display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .file-control input[type="file"] {
    max-width: 100%;
  }
  body[data-ui-system="v1"] .configure-export-label {
    flex: 1 1 14rem;
  }
  body[data-ui-system="v1"] .configure-card {
    display: flex; flex-direction: column; align-items: stretch; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .configure-card > :is(div, p) {
    min-width: 0;
  }
  body[data-ui-system="v1"] .configure-card > p:not(.ui-eyebrow, .recipe-import-status, .pricing-import-status) {
    margin: 0; color: var(--ds-text-secondary);
  }
  body[data-ui-system="v1"] .configure-card > .recipe-panel-heading {
    width: 100%; margin: 0; flex-wrap: wrap;
  }
  body[data-ui-system="v1"] .recipe-csv-preview[hidden],
  body[data-ui-system="v1"] .pricing-import-confirmation[hidden],
  body[data-ui-system="v1"] .pricing-item-editor[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .recipe-browse-content {
    max-height: 100%; overflow: auto; padding: 0;
  }
  body[data-ui-system="v1"] .recipe-browse-content > input {
    margin-block-end: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .tag-picker-dialog {
    width: min(34rem, calc(100vw - 2rem)); max-height: min(42rem, calc(100dvh - 2rem)); padding: 0;
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius-surface); background: var(--ds-surface);
    color: var(--ds-text); box-shadow: 0 18px 48px rgb(16 35 55 / 28%);
  }
  body[data-ui-system="v1"] .tag-picker-dialog::backdrop {
    background: rgb(16 35 55 / 48%);
  }
  body[data-ui-system="v1"] .tag-picker-card {
    display: grid; gap: var(--ds-space-3); max-height: inherit; padding: var(--ds-space-4);
  }
  body[data-ui-system="v1"] .tag-picker-header {
    display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .tag-picker-actions {
    display: flex; align-items: center; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .tag-picker-input-row {
    display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .tag-picker-header {
    padding-block-end: var(--ds-space-3); border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .tag-picker-header h2,
  body[data-ui-system="v1"] .tag-picker-section h3 {
    margin: 0;
  }
  body[data-ui-system="v1"] .tag-picker-header h2 {
    font-size: var(--ds-font-section, 18px);
  }
  body[data-ui-system="v1"] .tag-picker-section h3 {
    margin-block-end: var(--ds-space-2); font-size: var(--ds-font-label);
  }
  body[data-ui-system="v1"] .tag-picker-description {
    margin: var(--ds-space-1) 0 0; color: var(--ds-text-secondary);
  }
  body[data-ui-system="v1"] .tag-picker-section {
    min-width: 0;
  }
  body[data-ui-system="v1"] .tag-picker-choices {
    display: flex; flex-wrap: wrap; gap: var(--ds-space-2); max-height: 10rem; overflow: auto;
  }
  body[data-ui-system="v1"] .tag-picker-choice {
    padding: 6px 11px; border: 1px solid var(--ds-border-strong); border-radius: 999px;
    background: var(--ds-surface); color: var(--ds-text); font: inherit; cursor: pointer;
  }
  body[data-ui-system="v1"] .tag-picker-choice:hover {
    border-color: var(--ds-action);
  }
  body[data-ui-system="v1"] .tag-picker-choice.is-selected {
    border-color: var(--ds-action); background: var(--ds-action); color: var(--ds-on-action, #fff);
    font-weight: 700;
  }
  body[data-ui-system="v1"] .tag-picker-inputs {
    display: grid; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .tag-picker-input-row input {
    flex: 1; min-width: 0;
  }
  body[data-ui-system="v1"] .tag-picker-add {
    cursor: pointer;
  }
  body[data-ui-system="v1"] .tag-picker-remove-input {
    border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-control);
    background: var(--ds-surface); color: var(--ds-text); font: inherit; cursor: pointer;
  }
  body[data-ui-system="v1"] .tag-picker-cancel,
  body[data-ui-system="v1"] .tag-picker-close {
    cursor: pointer;
  }
  body[data-ui-system="v1"] .tag-picker-remove-input {
    padding: 7px 11px;
  }
  body[data-ui-system="v1"] .tag-picker-close {
    width: 2rem;
  }
  body[data-ui-system="v1"] .tag-picker-done {
    cursor: pointer;
  }
  body[data-ui-system="v1"] .tag-picker-actions {
    justify-content: flex-end; padding-block-start: var(--ds-space-3); border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .tag-picker-empty {
    margin: 0; color: var(--ds-text-secondary);
  }
  body[data-ui-system="v1"] .calculation-summary-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0; margin: var(--ds-space-3) 0;
    overflow: hidden; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control);
    background: var(--ds-surface);
  }
  body[data-ui-system="v1"] .calculation-summary-grid > div {
    display: grid; gap: 3px; padding: 8px; border-inline-end: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .calculation-summary-grid span {
    color: var(--ds-text-muted); font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] .calculation-summary-grid strong {
    color: var(--ds-text); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 13px;
  }
  body[data-ui-system="v1"] .calculation-table {
    display: grid; grid-template-columns: minmax(0, 1fr) 3.5rem 4rem 4rem 4rem; width: 100%; min-width: 0;
    max-width: 100%; overflow: auto; font-size: 12px;
  }
  body[data-ui-system="v1"] :is(.calculation-table thead, .calculation-table tbody, .calculation-table tr) {
    display: contents;
  }
  body[data-ui-system="v1"] .calculation-table :is(th, td) {
    padding: 7px 4px; border-bottom: 1px solid var(--ds-border); text-align: end; vertical-align: top;
  }
  body[data-ui-system="v1"] .calculation-table th {
    color: var(--ds-text-muted); font-size: 10px; text-transform: uppercase; white-space: nowrap;
  }
  body[data-ui-system="v1"] .calculation-table :is(th, td):first-child {
    padding-inline-start: 8px; text-align: start;
  }
  body[data-ui-system="v1"] .calculation-table td:first-child {
    overflow-wrap: anywhere;
  }
  body[data-ui-system="v1"] .calculation-table :is(th, td):not(:first-child) {
    white-space: nowrap;
  }
  body[data-ui-system="v1"] .recipe-preview-panel,
  body[data-ui-system="v1"] .recipe-library-preview-panel {
    position: static;
  }
  body[data-ui-system="v1"] .recipe-price-breaks[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .price-break-table {
    width: 100%; min-width: 0; max-width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0;
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); overflow: hidden; font-size: 12px;
  }
  body[data-ui-system="v1"] .price-break-table :is(th, td) {
    padding: 8px; border-bottom: 1px solid var(--ds-border); text-align: end; white-space: nowrap;
  }
  body[data-ui-system="v1"] .price-break-table :is(th, td):first-child {
    text-align: start;
  }
  body[data-ui-system="v1"] .price-break-table th {
    color: var(--ds-text-muted); background: var(--ds-surface-quiet); font-size: 10px; text-transform: uppercase;
  }
  body[data-ui-system="v1"] .price-break-table tr:last-child td {
    border-bottom: 0;
  }
  body[data-ui-system="v1"] .price-break-table tr.is-current td {
    background: color-mix(in srgb, var(--ds-action), transparent 90%); color: var(--ds-text); font-weight: 700;
  }
  body[data-ui-system="v1"] #show-price-breaks {
    margin-block-start: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .recipe-preview-controls label {
    flex: 1 1 8rem;
  }
  body[data-ui-system="v1"] .recipe-catalog-note,
  body[data-ui-system="v1"] .empty-message {
    color: var(--ds-text-muted); font-size: 12px;
  }
  body[data-ui-system="v1"] .empty-message {
    padding-block: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .recipe-portability,
  body[data-ui-system="v1"] .recipe-tools {
    margin-block-start: var(--ds-space-3); padding-block-start: var(--ds-space-3);
    border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .recipe-tools summary {
    color: var(--ds-text-secondary); font-size: 12px; font-weight: 600; cursor: pointer;
  }
  body[data-ui-system="v1"] :is(.component-table-head, .component-row) {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(5rem, .55fr) 3.6rem 3.6rem; align-items: center;
    gap: var(--ds-space-2); min-width: 0;
  }
  body[data-ui-system="v1"] .component-table-head {
    padding-block-end: 5px; color: var(--ds-text-muted); font-size: 10px; font-weight: 700;
    text-transform: uppercase;
  }
  body[data-ui-system="v1"] .component-row {
    margin-block-end: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .parameter-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 8rem 7rem 6rem 4rem; gap: var(--ds-space-2); min-width: 0;
    margin-block-start: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .pricing-admin .pricing-import-actions {
    display: flex; flex-wrap: wrap; gap: var(--ds-space-2); margin-block-start: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .pricing-import-preview:not([hidden]) {
    margin-block-start: var(--ds-space-3); padding: var(--ds-space-3); border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control); background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] .pricing-import-diagnostics {
    color: var(--ds-text-secondary); font-size: var(--ds-font-body);
  }
  body[data-ui-system="v1"] .pricing-import-diagnostics summary {
    color: var(--ds-text); font-weight: 600; cursor: pointer;
  }
  body[data-ui-system="v1"] .pricing-import-review-section {
    margin-block-start: var(--ds-space-2); padding-block-start: var(--ds-space-2);
    border-block-start: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .pricing-import-review-section > summary {
    color: var(--ds-text-secondary); cursor: pointer; font-weight: 600;
  }
  body[data-ui-system="v1"] .pricing-import-diagnostic-tabs {
    width: 100%; flex-wrap: wrap; gap: 0 var(--ds-space-4); border-block-end: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .pricing-import-diagnostic-tabs + [role="tabpanel"] {
    padding-block-start: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .pricing-import-diagnostic-rows {
    display: grid; gap: var(--ds-space-2); max-height: 22rem; overflow: auto; margin: var(--ds-space-2) 0 0;
    padding-inline-start: 1.25rem;
  }
  body[data-ui-system="v1"] .pricing-import-diagnostic-rows > li {
    padding-block: var(--ds-space-2); border-block-end: 1px solid var(--ds-border); overflow-wrap: anywhere;
  }
  body[data-ui-system="v1"] .pricing-import-diagnostic-rows p {
    margin: 3px 0 0;
  }
  body[data-ui-system="v1"] :is(.pricing-import-diagnostic-error, .pricing-import-diagnostic-warning) {
    color: var(--ds-danger);
  }
  body[data-ui-system="v1"] .pricing-import-diagnostic-information {
    color: var(--ds-text-muted);
  }
  @media (max-width: 1180px) {
    body[data-ui-system="v1"] .recipe-preview-panel,
    body[data-ui-system="v1"] .recipe-preview-rail {
      grid-column: 1 / -1;
    }
  }
  @media (max-width: 1000px) {
    body[data-ui-system="v1"] .recipe-library-grid {
      grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 1fr);
    }
    body[data-ui-system="v1"] .pricing-admin-grid {
      grid-template-columns: minmax(15rem, .75fr) minmax(0, 1.25fr);
    }
    body[data-ui-system="v1"] .recipe-spec-layout {
      grid-template-columns: minmax(0, 1fr);
    }
    body[data-ui-system="v1"] :is(.recipe-spec-note, .recipe-spec-variable-help) {
      grid-column: auto; grid-row: auto;
    }
  }
  @media (max-width: 760px) {
    body[data-ui-system="v1"] .ui-action-summary-row {
      flex-wrap: wrap;
    }
    body[data-ui-system="v1"] .ui-action-summary-row > :last-child {
      width: 100%;
    }
    body[data-ui-system="v1"] .pricing-recipes-header {
      align-items: flex-start; flex-direction: column;
    }
    body[data-ui-system="v1"] .recipe-builder-actions {
      margin-inline-start: 0;
    }
    body[data-ui-system="v1"] .configure-card {
      grid-column: 1 / -1;
    }
    body[data-ui-system="v1"] .recipe-preview-panel {
      grid-column: auto;
    }
    body[data-ui-system="v1"] :is(.recipe-form-grid, .recipe-catalog-toolbar, .pricing-editor-grid) {
      grid-template-columns: minmax(0, 1fr);
    }
    body[data-ui-system="v1"] .recipe-library-scroll {
      max-height: 50vh;
    }
    body[data-ui-system="v1"] .component-table-head {
      display: none;
    }
    body[data-ui-system="v1"] .component-row {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-block-end: var(--ds-space-2);
      border-bottom: 1px solid var(--ds-border);
    }
    body[data-ui-system="v1"] .component-row .component-item {
      grid-column: 1 / -1;
    }
    body[data-ui-system="v1"] .component-row .danger {
      grid-column: 2; justify-self: end;
    }
    body[data-ui-system="v1"] .parameter-row {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body[data-ui-system="v1"] .parameter-row .danger {
      grid-column: 2; justify-self: end;
    }
    body[data-ui-system="v1"] .recipe-preview-controls,
    body[data-ui-system="v1"] .recipe-management-tools {
      align-items: stretch; flex-direction: column;
    }
    body[data-ui-system="v1"] .pricing-catalog-row {
      align-items: flex-start;
    }
  }
  @media (max-width: 540px) {
    body[data-ui-system="v1"] .recipe-spec-size {
      grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 1fr));
    }
    body[data-ui-system="v1"] .calculation-summary-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body[data-ui-system="v1"] .calculation-table {
      grid-template-columns: minmax(8rem, 1fr) 3rem 3.6rem 3.6rem 3.6rem;
    }
  }
  @media (max-width: 560px) {
    body[data-ui-system="v1"] .print-document-table-head,
    body[data-ui-system="v1"] .print-document-line {
      grid-template-columns: minmax(0, 1fr) 5rem;
    }
    body[data-ui-system="v1"] .print-document-financials {
      grid-column: 1 / -1; margin-left: auto; width: min(100%, var(--document-financial-width));
    }
    body[data-ui-system="v1"] .print-document-subtotal,
    body[data-ui-system="v1"] .print-document-totals > div {
      width: min(100%, var(--document-financial-width));
    }
  }
  body[data-ui-system="v1"] dialog#data-import-preview-dialog {
    width: min(34rem, calc(100vw - 24px));
  }
  body[data-ui-system="v1"] dialog#data-import-preview-dialog.data-import-preview-dialog--review {
    width: min(56rem, calc(100vw - 24px));
  }
  body[data-ui-system="v1"] .customer-import-review-list {
    display: grid; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .customer-import-review-row {
    display: grid; gap: var(--ds-space-2); padding: var(--ds-space-3); border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control); background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] .customer-import-review-row h5,
  body[data-ui-system="v1"] .customer-import-review-row p {
    margin: 0;
  }
  body[data-ui-system="v1"] .customer-import-review-row h5 {
    color: var(--ds-text); font-size: var(--ds-font-body);
  }
  body[data-ui-system="v1"] .customer-import-review-row > label {
    display: grid; gap: 4px;
  }
  body[data-ui-system="v1"] .customer-import-review-status {
    color: var(--ds-text-muted); font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] .customer-import-review-candidates {
    display: grid; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .customer-import-comparison-panel {
    min-width: 0; padding: var(--ds-space-2); border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control); background: var(--ds-surface);
  }
  body[data-ui-system="v1"] .customer-import-match-candidate {
    display: grid; gap: var(--ds-space-2); min-width: 0;
  }
  body[data-ui-system="v1"] .customer-import-comparison {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .customer-import-comparison-panel h6 {
    margin: 0 0 var(--ds-space-2); color: var(--ds-text); font-size: var(--ds-font-body);
  }
  body[data-ui-system="v1"] .customer-import-comparison-details {
    display: grid; grid-template-columns: minmax(5rem, .35fr) minmax(0, 1fr); gap: 3px var(--ds-space-2); margin: 0;
  }
  body[data-ui-system="v1"] .customer-import-comparison-details dt {
    color: var(--ds-text-muted); font-size: var(--ds-font-metadata);
  }
  body[data-ui-system="v1"] .customer-import-comparison-details dd {
    min-width: 0; max-height: 4rem; margin: 0; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap;
  }
  body[data-ui-system="v1"] .customer-import-review-row .customer-import-decision {
    display: flex; grid-template-columns: none; align-items: flex-start; gap: 8px; font-weight: 600;
  }
  body[data-ui-system="v1"] .customer-import-review-row .customer-import-decision input {
    flex: 0 0 auto; margin-top: 2px;
  }
  body[data-ui-system="v1"] .customer-import-match-decision,
  body[data-ui-system="v1"] .customer-import-create-decision {
    padding-top: var(--ds-space-2); border-top: 1px solid var(--ds-border);
  }
  @media (max-width: 760px) {
    body[data-ui-system="v1"] .customer-import-comparison {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .app-header {
    min-height: 48px; padding: 8px 16px; gap: 12px;
  }
  .app-header h1 {
    font-size: 18px; line-height: 1.2; font-weight: 650;
  }
  .sidebar {
    width: 196px; padding: 10px 8px; gap: 8px;
  }
  .sidebar .menu {
    flex-shrink: 0; gap: 3px;
  }
  .sidebar .menu-item,
  .sidebar .menu-group-toggle {
    box-sizing: border-box; transition: background-color 120ms ease, color 120ms ease;
  }
  .sidebar .menu-item:not(.menu-subitem) {
    display: flex; align-items: center;
  }
  .sidebar .menu-group-label,
  .sidebar .nav-item-label {
    display: inline-flex; align-items: center; min-width: 0;
  }
  .sidebar .menu-group-label {
    gap: 8px;
  }
  .sidebar .nav-icon {
    display: block; flex: 0 0 17px; width: 17px; height: 17px; color: currentColor;
  }
  .sidebar .nav-icon + .nav-item-label {
    margin-left: 8px;
  }
  .sidebar .menu-group {
    gap: 2px;
  }
  .sidebar .menu-group-items {
    gap: 2px; padding-left: 8px;
  }
  .sidebar .menu-item:hover,
  .sidebar .menu-group-toggle:hover {
    outline: none;
  }
  .sidebar .menu-item:focus-visible,
  .sidebar .menu-group-toggle:focus-visible {
    outline: 2px solid var(--brand-heading, #ffffff); outline-offset: 1px;
  }
  .sidebar-footer {
    margin-top: 0; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--color-sidebar), white 16%);
  }
  .sidebar-bottom {
    display: flex; flex-direction: column; flex-shrink: 0; gap: 8px; margin-top: auto;
  }
  @media (min-width: 901px) {
    .app-header h1 {
      flex: 0 0 196px; margin-left: -16px; display: flex; justify-content: center;
    }
    .sidebar {
      align-self: flex-start; position: sticky; top: 0; height: calc(100dvh - 48px); overflow-y: auto;
    }
  }
  @media (max-width: 900px) {
    .sidebar {
      box-sizing: border-box; height: 100dvh; width: 220px; max-width: 84vw; padding: 10px 8px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .sidebar .menu-item,
    .sidebar .menu-group-toggle {
      transition: none;
    }
  }
  body[data-ui-system="v1"] .customers-page .contacts-toolbar {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "actions actions" "search count"; align-items: center; gap: 10px 12px;
  }
  body[data-ui-system="v1"] .customers-page .contacts-primary-actions {
    grid-area: actions; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0;
    margin: 0;
  }
  body[data-ui-system="v1"] .customers-page .contacts-primary-actions > :first-child {
    margin-right: auto;
  }
  body[data-ui-system="v1"] .customers-page .contacts-search-row {
    grid-area: search; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0;
  }
  body[data-ui-system="v1"] .customers-page .contacts-search-row .search-input {
    flex: 1 1 20rem; width: auto; min-width: min(100%, 14rem); max-width: 34rem;
  }
  body[data-ui-system="v1"] .customers-page #contacts-count {
    grid-area: count; white-space: nowrap; text-align: right;
  }
  body[data-ui-system="v1"] .contacts-actions-menu {
    position: relative;
  }
  body[data-ui-system="v1"] .contacts-actions-menu > summary {
    display: inline-flex; align-items: center; list-style: none; cursor: pointer;
  }
  body[data-ui-system="v1"] .contacts-actions-menu > summary::-webkit-details-marker {
    display: none;
  }
  body[data-ui-system="v1"] .contacts-actions-menu > summary::after {
    content: "▾"; margin-left: 8px; font-size: 11px;
  }
  body[data-ui-system="v1"] .contacts-actions-menu-panel {
    position: absolute; z-index: 30; top: calc(100% + 5px); right: 0; display: grid; min-width: 170px; gap: 4px;
    padding: 6px; border: 1px solid var(--ds-border-strong); border-radius: 6px; background: var(--ds-surface);
    box-shadow: 0 8px 20px rgb(16 42 67 / 14%);
  }
  body[data-ui-system="v1"] .customers-page .active-tag-filters {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
  }
  body[data-ui-system="v1"] .customers-page .active-tag-filters.hidden {
    display: none;
  }
  body[data-ui-system="v1"] .active-tag-filter-chip {
    padding: 4px 8px; border: 1px solid var(--ds-border-strong); border-radius: 999px;
    background: var(--ds-surface-quiet); color: var(--ds-text); font-size: 12px; cursor: pointer;
  }
  body[data-ui-system="v1"] .contacts-filter-dialog {
    width: min(720px, calc(100vw - 28px)); max-width: none; max-height: min(86vh, 780px); padding: 0;
    overflow: auto; border: 1px solid var(--ds-border-strong); border-radius: 8px; background: var(--ds-surface);
    color: var(--ds-text); box-shadow: 0 18px 54px rgb(16 42 67 / 28%);
  }
  body[data-ui-system="v1"] .contacts-filter-dialog:not([open]) {
    display: none;
  }
  body[data-ui-system="v1"] .contacts-filter-dialog::backdrop {
    background: rgb(16 42 67 / 48%);
  }
  body[data-ui-system="v1"] .contacts-filter-dialog-content {
    padding: 20px;
  }
  body[data-ui-system="v1"] .contacts-filter-dialog .modal-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .contacts-filter-dialog h3 {
    margin: 0; font-size: 18px;
  }
  body[data-ui-system="v1"] .contacts-filter-dialog .modal-subtitle {
    margin: 5px 0 0; color: var(--ds-text-muted);
  }
  body[data-ui-system="v1"] .contacts-filter-fields {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px 0;
  }
  body[data-ui-system="v1"] .contacts-filter-field {
    display: grid; gap: 5px; min-width: 0; font-size: 13px; font-weight: 600;
  }
  body[data-ui-system="v1"] .contacts-filter-field input {
    width: 100%; min-width: 0;
  }
  body[data-ui-system="v1"] .contacts-filter-job-scope {
    margin: 0; padding: 0 0 16px; border: 0; min-width: 0; font-size: 13px;
  }
  body[data-ui-system="v1"] .contacts-filter-job-scope legend {
    padding: 0 0 8px; font-weight: 600;
  }
  body[data-ui-system="v1"] .contacts-filter-tags {
    padding-top: 12px; border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .contacts-filter-tags h4 {
    margin: 0 0 8px; font-size: 14px;
  }
  body[data-ui-system="v1"] .tag-filter-options {
    display: flex; flex-wrap: wrap; gap: 7px;
  }
  body[data-ui-system="v1"] .tag-filter-option {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--ds-border);
    border-radius: 999px; background: var(--ds-surface); cursor: pointer;
  }
  body[data-ui-system="v1"] .tag-filter-option.selected {
    border-color: var(--ds-accent); background: var(--ds-selected, #e8f1fb);
  }
  body[data-ui-system="v1"] .tag-filter-actions {
    display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px;
  }
  body[data-ui-system="v1"] .tag-filter-actions #tag-filter-clear {
    margin-right: auto;
  }
  body[data-ui-system="v1"] .tag-filter-empty {
    margin: 0; color: var(--ds-text-muted);
  }
  body[data-ui-system="v1"] .export-scope-options {
    display: grid; gap: 8px; margin: 0; padding: 16px 0 0; border: 0;
  }
  body[data-ui-system="v1"] .export-scope-option {
    display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border: 1px solid var(--ds-border);
    border-radius: 6px; cursor: pointer;
  }
  body[data-ui-system="v1"] .export-scope-option input {
    margin-top: 3px;
  }
  body[data-ui-system="v1"] .export-scope-option span {
    display: grid; gap: 3px;
  }
  body[data-ui-system="v1"] .export-scope-option small {
    color: var(--ds-text-muted); font-size: 12px;
  }
  body[data-ui-system="v1"] #customer-delete-confirm {
    width: min(440px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--ds-border-strong);
    border-radius: 8px; color: var(--ds-text); box-shadow: 0 18px 54px rgb(16 42 67 / 28%);
  }
  body[data-ui-system="v1"] #customer-archive-confirm::backdrop {
    background: rgb(16 42 67 / 48%);
  }
  body[data-ui-system="v1"] .contacts-archived-filter {
    white-space: nowrap;
  }
  body[data-ui-system="v1"] .customer-document-confirm-content {
    padding: 20px;
  }
  body[data-ui-system="v1"] .customer-document-confirm-content h3 {
    margin: 0 0 8px;
  }
  body[data-ui-system="v1"] .customer-document-confirm-content p {
    margin: 0 0 18px; color: var(--ds-text-muted);
  }
  body[data-ui-system="v1"] .customer-document-confirm-content > div {
    display: flex; justify-content: flex-end; gap: 8px;
  }
  @media (max-width: 760px) {
    body[data-ui-system="v1"] .contacts-filter-fields {
      grid-template-columns: 1fr;
    }
  }
  @media (max-width: 520px) {
    body[data-ui-system="v1"] .customers-page .contacts-toolbar {
      grid-template-columns: minmax(0, 1fr); grid-template-areas: "actions" "search" "count";
    }
    body[data-ui-system="v1"] .customers-page .contacts-primary-actions {
      flex-wrap: wrap;
    }
    body[data-ui-system="v1"] .customers-page #contacts-count {
      text-align: left;
    }
    body[data-ui-system="v1"] .contacts-filter-dialog-content {
      padding: 15px;
    }
    body[data-ui-system="v1"] .contacts-filter-dialog .modal-header {
      flex-direction: column;
    }
  }
  .configure-pricing-page .configure-import-options {
    display: grid; gap: var(--ds-space-2); min-width: 0;
  }
  .configure-pricing-page .configure-import-options > p {
    margin: 0;
  }
  .configure-pricing-page .pricing-overwrite-options {
    grid-column: 1; display: grid; gap: 2px; margin-top: var(--ds-space-1);
  }
  .configure-pricing-page .pricing-overwrite-options .checkbox-inline {
    display: grid; grid-template-columns: 14px minmax(0, 1fr); align-items: center; column-gap: var(--ds-space-2);
    margin: 0; font-size: 12px; line-height: 1.35;
  }
  .configure-pricing-page .pricing-overwrite-options .checkbox-inline input[type="checkbox"] {
    width: 14px; margin: 0;
  }
  .configure-pricing-page .pricing-overwrite-options .form-help-text {
    margin: 0 0 0 22px; font-size: 12px; line-height: 1.35;
  }
  .configure-pricing-page .configure-export-controls {
    display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-space-2); min-width: 0;
    margin-inline-start: auto;
  }
  .configure-pricing-page .configure-export-menu-wrap {
    position: relative;
  }
  .configure-pricing-page .configure-export-menu-wrap > button {
    white-space: nowrap;
  }
  .configure-pricing-page .configure-export-menu {
    position: absolute; z-index: 30; inset-block-start: calc(100% + var(--ds-space-1)); inset-inline-end: 0;
    width: max-content; min-width: 10rem;
  }
  .configure-pricing-page .configure-export-menu[hidden] {
    display: none;
  }
  .configure-pricing-page .configure-export-menu-item {
    width: 100%; text-align: start; cursor: pointer;
  }
  .configure-pricing-page .recipe-export-selection-card {
    width: min(34rem, calc(100% - 2rem));
  }
  .configure-pricing-page .recipe-export-list {
    min-width: 0; margin: 0; padding: 0; border: 0;
  }
  .configure-pricing-page .recipe-export-select-all {
    display: grid; align-items: center; gap: var(--ds-space-2); min-height: 32px; padding: 4px 6px;
    border-bottom: 1px solid var(--ds-border); color: var(--ds-text-secondary); cursor: pointer;
  }
  .configure-pricing-page .recipe-export-option {
    display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; align-items: center; gap: var(--ds-space-2);
    min-height: 32px; padding: 4px 6px; border-bottom: 1px solid var(--ds-border); color: var(--ds-text-secondary);
    cursor: pointer;
  }
  .configure-pricing-page .recipe-export-select-all {
    grid-template-columns: 15px minmax(0, 1fr); font-weight: 600;
  }
  .configure-pricing-page .recipe-export-select-all input,
  .configure-pricing-page .recipe-export-option input {
    width: 14px; margin: 0;
  }
  .configure-pricing-page .recipe-export-options {
    max-height: min(50vh, 24rem); overflow: auto;
  }
  .configure-pricing-page .recipe-export-option:hover {
    background: var(--ds-surface-quiet);
  }
  .configure-pricing-page .recipe-export-option small {
    color: var(--ds-text-muted); font-size: var(--ds-font-meta);
  }
  .configure-pricing-page #configure-status:empty,
  .configure-pricing-page #import-status:empty {
    display: none;
  }
  .configure-pricing-page .transfer-options {
    align-items: end; gap: var(--ds-space-3);
  }
  .configure-pricing-page .transfer-import-only {
    grid-template-columns: minmax(0, 1fr);
  }
  .configure-pricing-page .transfer-half {
    display: grid; align-content: start; gap: var(--ds-space-2); min-width: 0;
  }
  .configure-pricing-page .transfer-half > .form-help-text {
    margin: 0;
  }
  .configure-pricing-page .transfer-half .configure-export-controls {
    margin-inline-start: 0;
  }
  .configure-pricing-page .transfer-half .configure-import-options {
    justify-items: start;
  }
  .configure-pricing-page .transfer-column-title {
    margin: 0;
  }
  .configure-pricing-page .transfer-inventory-scope {
    grid-column: 1 / -1;
  }
  .configure-pricing-page .transfer-scope-field {
    display: flex; flex-direction: row; align-items: center; gap: var(--ds-space-2); width: auto;
  }
  .configure-pricing-page .transfer-subheading {
    margin: 0; font-size: var(--ds-font-body);
  }
  .configure-pricing-page .csv-transfer {
    display: grid; gap: var(--ds-space-2); min-width: 0;
  }
  .configure-pricing-page .csv-transfer > p {
    margin: 0;
  }
  .configure-pricing-page [data-csv-status]:empty,
  .configure-pricing-page [data-transfer-location-status]:empty {
    display: none;
  }
  .configure-pricing-page .csv-transfer-diagnostics ul {
    margin: var(--ds-space-2) 0; padding-inline-start: var(--ds-space-5);
  }
  #csv-import-confirmation > p {
    margin-block: var(--ds-space-3);
  }
  #csv-import-confirmation [hidden] {
    display: none !important;
  }
  @media (max-width: 760px) {
    .configure-pricing-page .configure-export-controls {
      flex: 1 1 100%; margin-inline-start: 0;
    }
  }
  #csv-import-confirmation {
    width: min(34rem, calc(100vw - 24px));
  }
  .inventory-stock-editor [data-stock-formats][hidden] {
    display: none !important;
  }
  .inventory-stock-editor select {
    width: 100%;
  }
  .inventory-barcode-editor {
    min-width: 0;
  }
  body[data-page="inventory"] .inventory-actions {
    --ui-icon-button-width: 32px; --ui-icon-button-height: 36px;
    display: grid; grid-template-columns: var(--ui-icon-button-width); gap: 4px;
  }
  body[data-page="inventory"] .inventory-action-icon svg {
    display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round;
    stroke-linejoin: round; stroke-width: 1.7;
  }
  body[data-page="inventory"] .inventory-action-icon[data-inventory-action="receive"] svg {
    color: color-mix(in srgb, var(--ds-success), var(--ds-text-secondary) 24%);
  }
  body[data-page="inventory"] .inventory-action-icon--plain svg {
    stroke-width: 1.8;
  }
  @media (pointer: coarse) {
    body[data-page="inventory"] .inventory-actions {
      --ui-icon-button-width: 40px;
    }
  }
  body[data-ui-system="v1"] #inventory-alerts[open] {
    width: min(84rem, calc(100vw - 24px));
  }
  #inventory-alerts td form {
    flex-wrap: nowrap;
  }
  #inventory-alerts td input:not([type="checkbox"]) {
    width: 9rem;
  }
  .stock-alert-level {
    display: inline-flex; align-items: center; gap: var(--ds-space-1);
  }
  .stock-alert-level__dot {
    flex: 0 0 .5rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--stock-level-color);
  }
  .stock-alert-level--low {
    --stock-level-color: var(--ds-danger);
  }
  .stock-alert-level--good {
    --stock-level-color: var(--ds-success);
  }
  .stock-alert-level--over {
    --stock-level-color: var(--ds-warning);
  }
  .stock-alert-level--unconfigured {
    --stock-level-color: var(--ds-text-muted);
  }
  .stock-alerts-toolbar {
    display: grid;
    grid-template-columns: minmax(0, calc(var(--alerts-moh-offset, 32rem) - 32px)) max-content minmax(max-content, 1fr);
    grid-template-areas: "filters bulk transfer" "low count transfer"; align-items: center; gap: 4px 32px;
    margin-block: 8px;
  }
  .stock-alerts-filter-main {
    grid-area: filters; display: flex; align-items: end; gap: 8px; min-width: 0; max-width: 32rem;
  }
  .stock-alerts-bulk-main {
    grid-area: bulk; display: flex; align-items: end; gap: 8px; min-width: 0;
  }
  .stock-alerts-search {
    display: grid; flex: 1 1 16rem; gap: 4px; min-width: 0; color: var(--ds-text-secondary);
    font-size: var(--ds-font-label); font-weight: 600;
  }
  .stock-alerts-bulk-label {
    display: grid; gap: 4px; color: var(--ds-text-secondary); font-size: var(--ds-font-label); font-weight: 600;
    white-space: nowrap;
  }
  .stock-alerts-bulk-input-row {
    display: flex; align-items: center; gap: 6px;
  }
  .stock-alerts-low-only {
    grid-area: low; align-self: center; margin: 0; color: var(--ds-text-secondary); font-size: var(--ds-font-body);
  }
  .stock-alerts-selected-count {
    grid-area: count; align-self: center; justify-self: start; margin: 0; color: var(--ds-text-secondary);
    font-size: var(--ds-font-body);
  }
  .stock-alerts-transfer {
    grid-area: transfer; justify-self: end; display: grid; gap: 4px; align-self: start;
  }
  .stock-alerts-toolbar:not(.has-bulk-controls) {
    grid-template-columns: minmax(0, 1fr) max-content; grid-template-areas: "filters transfer" "low transfer";
  }
  body[data-page="inventory"] #inventory-alerts .ui-data-table {
    width: 100%; min-width: max-content;
  }
  body[data-page="inventory"] #inventory-alerts .ui-data-table :is(th, td) {
    display: flex; align-items: center;
  }
  body[data-page="inventory"] #inventory-alerts .ui-data-table .alerts-select-col {
    width: 34px; min-width: 34px; padding-inline: 5px; justify-content: center; text-align: center;
  }
  body[data-page="inventory"] #inventory-alerts .ui-data-table .alerts-select-col input[type="checkbox"] {
    box-sizing: border-box; flex: 0 0 16px; width: 16px; margin: 0; accent-color: var(--ds-action);
  }
  @media (max-width: 900px) {
    .stock-alerts-toolbar.has-bulk-controls {
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas: "filters transfer" "bulk transfer" "low count";
    }
    .stock-alerts-filter-main {
      max-width: none;
    }
    .stock-alerts-bulk-main {
      flex-wrap: wrap;
    }
  }
  body:is([data-page="inventory"], [data-page="make_barcode"]) {
    color: var(--ui-ink); font-size: 14px;
  }
  body:is([data-page="inventory"], [data-page="make_barcode"]) .card {
    background: white; border: 1px solid var(--ui-line); border-radius: 14px;
  }
  body:is([data-page="inventory"], [data-page="make_barcode"]) :is(input, select, textarea):focus-visible {
    outline: 2px solid #93c5fd; outline-offset: 1px;
  }
  body:is([data-page="inventory"], [data-page="make_barcode"]) .modal.hidden {
    display: none !important;
  }
  body:is([data-page="inventory"], [data-page="make_barcode"]) .modal:not(.hidden) {
    inset: 16px; transform: none; width: min(940px, calc(100vw - 32px)); height: fit-content;
    max-height: calc(100dvh - 32px); margin: auto; overflow: auto;
  }
  body:is([data-page="inventory"], [data-page="make_barcode"]) .modal-content {
    box-sizing: border-box; width: 100%; margin: 0; padding: 24px; border-radius: 14px;
  }
  body:is([data-page="inventory"], [data-page="make_barcode"]) fieldset {
    background: var(--ui-section); border: 1px solid var(--ui-line); border-radius: 8px; padding: 16px;
  }
  body[data-page="inventory"] table {
    background: white;
  }
  body[data-page="inventory"] th {
    background: var(--ui-soft);
  }
  body[data-page="inventory"] :is(th, td) {
    padding: 10px 14px;
  }
  body[data-page="inventory"] #inventory-catalog-page #catalog-table thead th {
    vertical-align: middle; white-space: nowrap;
  }
  body[data-page="inventory"] #inventory-table thead th {
    white-space: nowrap;
  }
  body[data-page="inventory"] #inventory-table :is(th, td) {
    display: flex; align-items: center;
  }
  body[data-page="inventory"] #inventory-item-modal .inventory-item-actions {
    margin-top: var(--ds-space-2);
  }
  body[data-page="inventory"]:has(#inventory-page) .app-shell {
    height: 100dvh; min-height: 0;
  }
  body[data-page="inventory"] .main-content:has(> #inventory-page) {
    display: flex; flex-direction: column;
  }
  #inventory-page,
  #inventory-page > .ui-navigation-workspace,
  #inventory-page #inventory-location-panel {
    flex: 1; min-height: 0;
  }
  body[data-ui-system="v1"] .main-content > #inventory-page,
  #inventory-page > .ui-navigation-workspace,
  #inventory-page #inventory-location-panel {
    display: flex; flex-direction: column;
  }
  #inventory-page #inventory-location-panel > :not(.ui-data-table-scroll) {
    flex-shrink: 0;
  }
  #inventory-page #inventory-location-panel > .ui-data-table-scroll {
    flex: 1; min-height: 10rem; max-height: none;
  }
  body[data-page="inventory"] #inventory-catalog-page #catalog-table thead th.sortable:focus-visible {
    outline: 2px solid var(--ds-focus, #2563eb); outline-offset: -2px;
  }
  body[data-page="inventory"] .table-container {
    background: white; border: 1px solid var(--ui-line); border-radius: 8px;
  }
  .inventory-type-row {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 0 0 18px;
  }
  .inventory-manage-action {
    margin-inline-start: auto;
  }
  .full-inventory-heading-row {
    width: 100%; align-items: flex-start;
  }
  .full-inventory-heading-row .panel-header-body {
    width: auto; flex: 1 1 auto;
  }
  .inventory-type-toggle {
    display: inline-flex; border: 1px solid #cbd5e1; border-radius: 999px; background: #e2e8f0; padding: 4px;
    gap: 4px;
  }
  .inventory-type-toggle a {
    padding: 10px 24px; border-radius: 999px; text-decoration: none; color: #475569; font-weight: 600;
    min-width: 150px; text-align: center;
  }
  .inventory-type-toggle a.selected {
    background: #334155; color: white;
  }
  @media (max-width: 640px) {
    .inventory-type-toggle a {
      min-width: 0; padding: 10px 16px;
    }
  }
  @media (max-width: 640px) {
    .full-inventory-heading-row {
      flex-wrap: wrap;
    }
  }
  body[data-page="inventory"] dialog.inventory-ledger-dialog[open] {
    width: min(88rem, calc(100vw - 24px));
  }
  body[data-page="inventory"] .inventory-ledger [hidden] {
    display: none !important;
  }
  body[data-page="inventory"] dialog.inventory-stock-destinations[open] {
    width: min(62rem, calc(100vw - 24px));
  }
  body[data-page="inventory"] :is(.inventory-archive-dialog, .inventory-ledger-dialog) > :is(p, label, form, div, footer) {
    margin-block: var(--ds-space-3) 0;
  }
  body[data-page="inventory"] .inventory-archive-dialog section > p {
    margin-block: 0 var(--ds-space-2);
  }
  body[data-page="inventory"] :is(.inventory-ledger-scroll, .inventory-transfer-scroll) {
    overflow: auto; max-height: 55dvh;
  }
  body[data-page="inventory"] :is(.inventory-ledger, .inventory-archive-dialog) .ui-data-table :is(th, td) {
    padding: var(--ds-space-1) var(--ds-space-2); vertical-align: top;
  }
  body[data-page="inventory"] .inventory-ledger .ui-data-table {
    min-width: 80rem;
  }
  body[data-page="inventory"] :is(.inventory-ledger, .inventory-stock-destinations) .ui-data-table tbody tr {
    cursor: default;
  }
  body[data-page="inventory"] :is(.inventory-ledger-scroll, .inventory-transfer-scroll) th {
    position: sticky; top: 0; z-index: 1;
  }
  body[data-page="inventory"] .inventory-stock-destinations td:nth-child(2),
  body[data-page="inventory"] .inventory-stock-destinations select {
    min-width: 18ch;
  }
  body[data-page="inventory"] .inventory-ledger footer > [role="status"] {
    margin-inline-end: auto;
  }
  body[data-page="inventory"] :is(#inventory-sku, #catalog-sku)[readonly] {
    background: var(--ds-surface-quiet); color: var(--ds-text-muted);
  }
  body[data-page="inventory"] :is(#catalog-sku-cue, #inventory-sku-cue) {
    display: block; margin-top: 4px;
  }
  body[data-page="inventory"] :is(#catalog-sku-cue, #inventory-sku-cue)[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .inventory-report {
    min-width: 0; padding: var(--ds-space-4);
  }
  body[data-ui-system="v1"] .inventory-report .panel-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  }
  body[data-ui-system="v1"] .inventory-report .panel-header h2,
  body[data-ui-system="v1"] .inventory-report .report-actions {
    margin: 0;
  }
  body[data-ui-system="v1"] .inventory-report :is(.report-filters, .report-location-form) {
    align-items: end; align-content: start; margin: 12px 0;
  }
  body[data-ui-system="v1"] .inventory-report .report-location-summary {
    display: flex; align-items: start; flex-wrap: wrap; gap: 8px 24px; margin: 12px 0 8px;
  }
  body[data-ui-system="v1"] .inventory-report .report-location-summary .report-location-form {
    flex: 0 0 auto; margin: 0;
  }
  body[data-ui-system="v1"] .inventory-report .report-summary-area {
    display: grid; flex: 1 1 28rem; min-width: 0;
  }
  body[data-ui-system="v1"] .inventory-report .report-summary-area p {
    margin: 0 0 4px;
  }
  body[data-ui-system="v1"] .inventory-report .report-summary-area p:last-child {
    margin-bottom: 0;
  }
  body[data-ui-system="v1"] .inventory-report [data-report-summary] {
    grid-area: 1 / 1;
  }
  body[data-ui-system="v1"] .inventory-report [data-report-summary][aria-hidden="true"] {
    visibility: hidden; pointer-events: none;
  }
  body[data-ui-system="v1"] .inventory-report [hidden] {
    display: none !important;
  }
  body[data-ui-system="v1"] .inventory-report .report-tabs {
    margin: 0 0 var(--ds-space-2); padding-inline: var(--ds-space-4);
  }
  body[data-ui-system="v1"] .inventory-report .report-tabs [aria-disabled="true"] {
    color: var(--ds-text-muted); cursor: default;
  }
  body[data-ui-system="v1"] .inventory-report p {
    margin: 8px 0;
  }
  body[data-ui-system="v1"] .inventory-report table {
    min-width: 640px;
  }
  body[data-ui-system="v1"] .inventory-report td {
    vertical-align: top;
  }
  body[data-ui-system="v1"] .inventory-report details {
    margin: 8px 0;
  }
  body[data-ui-system="v1"] .inventory-report tfoot :is(th, td) {
    border-top: 1px solid var(--ds-border-strong); font-weight: 700;
  }
  body[data-ui-system="v1"] .inventory-report tfoot td {
    white-space: nowrap;
  }
  body[data-ui-system="v1"] .inventory-report .inventory-ledger-scroll {
    max-height: min(70vh, 800px);
  }
  body[data-ui-system="v1"] .inventory-report .inventory-ledger-filters {
    margin-block: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .inventory-report .inventory-ledger > .ui-dialog-actions {
    margin-top: var(--ds-space-3);
  }
  .shipment-receipt-summary {
    display: flex; flex-wrap: wrap; gap: var(--ds-space-3) var(--ds-space-5); margin: var(--ds-space-3) 0;
  }
  .shipment-receipt-summary dt {
    font-size: var(--ds-font-label); font-weight: 600; color: var(--ds-text-secondary);
  }
  .shipment-receipt-summary dd {
    margin: var(--ds-space-1) 0; overflow-wrap: anywhere;
  }
  body[data-ui-system="v1"] .product-catalog-tools {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--ds-space-2);
    margin-block: var(--ds-space-3);
  }
  body[data-ui-system="v1"] .product-catalog-tools .recipe-library-filter {
    margin: 0;
  }
  body[data-ui-system="v1"] .product-catalog-add-wrap {
    position: relative;
  }
  body[data-ui-system="v1"] .product-catalog-add-trigger {
    white-space: nowrap;
  }
  body[data-ui-system="v1"] .product-catalog-add-menu {
    position: absolute; z-index: 20; inset-block-start: calc(100% + var(--ds-space-1)); inset-inline-end: 0;
    display: grid; width: max-content; min-width: 10rem;
  }
  body[data-ui-system="v1"] .product-catalog-add-menu[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .product-catalog-add-item {
    display: flex; align-items: center; text-align: start; cursor: pointer; width: 100%;
  }
  body[data-ui-system="v1"] .ui-multiselect {
    position: relative; min-width: 0;
  }
  body[data-ui-system="v1"] .ui-multiselect > summary::-webkit-details-marker {
    display: none;
  }
  body[data-ui-system="v1"] .ui-multiselect > summary::after {
    content: "▾"; flex: none;
  }
  body[data-ui-system="v1"] .ui-multiselect > summary > span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  body[data-ui-system="v1"] .ui-multiselect-menu {
    position: absolute; z-index: 20; inset-inline: 0; inset-block-start: calc(100% + var(--ds-space-1));
    padding: var(--ds-space-2); max-height: 16rem; overflow: auto;
    box-shadow: var(--ds-shadow-overlay, 0 4px 14px rgb(15 23 42 / 16%));
  }
  body[data-ui-system="v1"] .ui-multiselect .ui-check > input {
    flex: none;
  }
  body[data-ui-system="v1"] .ui-multiselect-menu p {
    margin: 0;
  }
  body[data-ui-system="v1"] dialog.recipe-delete-dialog[open] {
    width: min(30rem, calc(100vw - 24px));
  }
  body[data-ui-system="v1"] .recipe-delete-dialog #delete-recipe-message {
    margin: 8px 0 16px; color: var(--ds-text-muted);
  }
  body[data-ui-system="v1"] .recipe-delete-dialog #delete-recipe-error {
    margin: 0 0 12px;
  }
  body[data-ui-system="v1"] .product-catalog-item {
    display: flex; align-items: center; flex-wrap: wrap; gap: 2px 5px;
  }
  body[data-ui-system="v1"] .product-catalog-recipe-icon {
    display: inline-flex; width: 14px; height: 14px; flex: 0 0 14px; color: var(--ds-text-muted);
  }
  body[data-ui-system="v1"] .product-catalog-recipe-icon svg {
    display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round;
    stroke-linejoin: round; stroke-width: 1.25;
  }
  .prepriced-choices-scroll {
    overflow-x: auto;
  }
  .prepriced-choices {
    width: 100%; min-width: 440px; table-layout: fixed; border-collapse: collapse;
  }
  .prepriced-choices th,
  .prepriced-choices td {
    padding: 4px; text-align: left;
  }
  .prepriced-choices input {
    width: 100%; min-width: 65px; box-sizing: border-box;
  }
  body[data-ui-system="v1"] #product-catalog-status:empty,
  body[data-ui-system="v1"] #product-count:empty {
    display: none;
  }
  .locations-page [hidden] {
    display: none !important;
  }
  .locations-page #locations-message:empty {
    display: none;
  }
  .locations-page #location-form,
  .locations-page fieldset {
    display: grid; gap: var(--ds-space-3); min-width: 0;
  }
  .locations-page fieldset {
    border: 0; padding: 0; margin: 0;
  }
  .locations-page .location-print-settings {
    padding-block-start: var(--ds-space-3); border-block-start: 1px solid var(--ds-border);
  }
  .locations-page .location-print-settings legend {
    margin-block-end: var(--ds-space-2);
  }
  .location-settings-row,
  .location-colors {
    display: flex; flex-wrap: wrap; gap: var(--ds-space-3); align-items: end;
  }
  .location-colors input[type="color"] {
    width: 40px;
  }
  #location-field-mappings {
    overflow-x: auto;
  }
  .location-field-map {
    display: grid; grid-template-columns: minmax(8rem, 1fr) repeat(3, max-content); gap: var(--ds-space-2);
    align-items: center; border-block-end: 1px solid var(--ds-border); padding-block: var(--ds-space-1);
  }
  #location-usage-summary {
    display: grid; grid-template-columns: 1fr auto; gap: var(--ds-space-2); margin: 0 0 var(--ds-space-3);
  }
  #location-usage-summary dd {
    margin: 0; text-align: end;
  }
  #location-delete-dialog form {
    display: grid; gap: var(--ds-space-3);
  }
  #location-delete-dialog p {
    margin: 0;
  }
  #location-delete-jobs {
    display: grid; gap: var(--ds-space-3);
  }
  #location-delete-dialog [hidden],
  .inventory-archive-dialog [hidden] {
    display: none !important;
  }
  .inventory-archive-dialog > :is(p, label, form, div, footer) {
    margin-block: var(--ds-space-3) 0;
  }
  .inventory-archive-dialog section > p {
    margin-block: 0 var(--ds-space-2);
  }
  .inventory-stock-destinations[open] {
    width: min(62rem, calc(100vw - 24px));
  }
  .inventory-transfer-scroll {
    overflow: auto; max-height: 55dvh;
  }
  .inventory-archive-dialog .ui-data-table :is(th, td) {
    padding: var(--ds-space-1) var(--ds-space-2); vertical-align: top;
  }
  .inventory-transfer-scroll th {
    position: sticky; top: 0; z-index: 1;
  }
  .inventory-stock-destinations td:nth-child(2),
  .inventory-stock-destinations select {
    min-width: 18ch;
  }
  body[data-ui-system="v1"] .locations-page #print-job-settings {
    grid-column: 2 / -1;
  }
  body[data-ui-system="v1"] .locations-page #print-job-settings .settings-layout {
    grid-template-columns: minmax(0, 1fr); gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .locations-page #print-job-settings .settings-nav {
    position: static; display: flex; gap: var(--ds-space-3); border: 0; padding: 0;
  }
  body[data-ui-system="v1"] .locations-page #print-job-settings .settings-card {
    margin: 0;
  }
  body[data-ui-system="v1"] .locations-page #print-job-settings #action-form > .action-locations {
    grid-column: 1 / -1;
  }
  body[data-ui-system="v1"] .locations-page #print-job-settings #action-configuration-error {
    grid-column: 1 / -1; margin: 0;
  }
  body[data-ui-system="v1"] .locations-page #print-job-settings #action-configuration-error:empty {
    display: none;
  }
  @media (max-width:760px) {
    body[data-ui-system="v1"] .locations-page #print-job-settings {
      grid-column: 1;
    }
  }
  body[data-ui-system="v1"] .locations-page #settings-refresh {
    justify-self: start;
  }
  body[data-ui-system="v1"] .locations-page #print-job-settings .builder-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2);
  }
  body[data-ui-system="v1"] .locations-page #print-job-settings .condition-group {
    display: grid; grid-template-columns: minmax(0, 1fr);
  }
  .locations-page .location-catalog {
    overflow: visible;
  }
  .locations-page .location-catalog h3 {
    margin: 0;
  }
  .locations-page #location-list {
    display: block;
  }
  .locations-page #location-list .recipe-library-item {
    width: 100%; text-align: start; white-space: normal;
  }
  .locations-page #location-list .recipe-library-category > p {
    margin: var(--ds-space-2) 0;
  }
  body[data-ui-system="v1"] .home-connections-widget {
    display: grid; gap: var(--ds-space-2); min-width: 0;
  }
  .home-connections-sections {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--ds-space-3);
    min-width: 0;
  }
  .home-widget[data-widget-width="half"] .home-connections-sections {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-connections-section {
    min-width: 0; padding: var(--ds-space-2) var(--ds-space-3); border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-surface); background: var(--ds-surface-quiet);
  }
  .home-connections-section-header {
    display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-2);
  }
  .home-connections-section-header h4 {
    margin: 0; color: var(--ds-text); font-size: 13px; font-weight: 650;
  }
  .home-connections-count {
    min-width: 1.7em; color: var(--ds-text); font-variant-numeric: tabular-nums; font-weight: 700; text-align: end;
  }
  .home-connections-section.is-overdue .home-connections-count {
    color: var(--ds-warning);
  }
  .home-connections-records {
    display: grid; gap: 2px; margin: var(--ds-space-2) 0 0; padding: 0; list-style: none;
  }
  .home-connections-record {
    display: grid; width: 100%; gap: 2px; border-block-start: 1px solid var(--ds-border); text-align: start;
    cursor: pointer;
  }
  .home-connections-record:hover .home-connections-record-title,
  .home-connections-record:focus-visible .home-connections-record-title {
    color: var(--ds-action); text-decoration: underline;
  }
  .home-connections-record-title {
    overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap;
  }
  .home-connections-record-summary,
  .home-connections-record-meta,
  .home-connections-record time {
    overflow: hidden; color: var(--ds-text-secondary); font-size: 11px; text-overflow: ellipsis;
    white-space: nowrap;
  }
  .home-connections-empty {
    margin: var(--ds-space-2) 0 0; color: var(--ds-text-muted); font-size: 12px;
  }
  .home-connection-dialog {
    width: min(620px, calc(100vw - 24px)); max-height: min(90vh, 840px); overflow: auto;
  }
  .home-connection-dialog form {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-3);
  }
  .home-connection-dialog form > :is(label, p, .ui-dialog-actions) {
    min-width: 0;
  }
  .home-connection-dialog .home-connection-actions {
    margin-top: var(--ds-space-3);
  }
  .home-connection-dialog form > label:nth-child(1),
  .home-connection-dialog form > label:nth-child(3),
  .home-connection-dialog form > .ui-dialog-actions,
  .home-connection-dialog form > p {
    grid-column: 1 / -1;
  }
  .home-connection-detail p {
    margin: 0; padding: 8px 0; border-block-end: 1px solid var(--ds-border);
  }
  @media (max-width: 720px) {
    .home-connections-sections {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  @media (max-width: 560px) {
    .home-connection-dialog form {
      grid-template-columns: minmax(0, 1fr);
    }
    .home-connection-dialog form > :is(label, p, .ui-dialog-actions) {
      grid-column: 1;
    }
  }
  body.auth-entry {
    color-scheme: light; min-height: 100vh; margin: 0; display: grid; place-items: center; background: #fbfcfe;
    color: #162033; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 16px; line-height: normal;
  }
  body.auth-entry.auth-public-backdrop {
    background-color: #f7f9fb;
    background-image: linear-gradient(rgb(247 249 251 / 52%), rgb(247 249 251 / 52%)),
    url("images/welcome-backdrop.svg");
    background-position: center; background-size: cover; background-repeat: no-repeat;
  }
  .auth-entry *,
  .auth-entry *::before,
  .auth-entry *::after {
    box-sizing: border-box;
  }
  .auth-entry-main {
    width: min(100% - 2rem, 30rem); min-width: 0; padding: 2.5rem 2rem; text-align: center;
  }
  .auth-entry .wordmark {
    display: block; width: min(100%, 24rem); height: auto; margin: 0 auto 2.5rem;
  }
  .auth-entry h1 {
    margin: 0 0 1.5rem; font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em;
  }
  .auth-entry .google-button {
    display: inline-flex; align-items: center; justify-content: center; gap: .7rem; width: 100%;
    transition: background .15s ease, box-shadow .15s ease;
  }
  .auth-entry .google-mark {
    width: 1.25rem; height: 1.25rem;
  }
  .auth-entry .notice {
    margin: 1.25rem 0 0; color: #637087; font-size: .9rem;
  }
  .auth-entry .invitation-card {
    display: flex; flex-direction: column; justify-content: center;
  }
  .auth-entry .invitation-submit {
    cursor: pointer;
  }
  .auth-entry .invitation-submit:disabled {
    opacity: .72; cursor: not-allowed;
  }
  .auth-entry .invitation-error {
    margin: 1rem 0 0; color: #b42332; font-size: .9rem; line-height: 1.4;
  }
  body[data-ui-system="v1"].auth-entry .auth-entry-main.main-content {
    flex: none; padding: 2.5rem 2rem; border-radius: 0; background: transparent;
  }
  .auth-entry .onboarding-card {
    text-align: left;
  }
  .auth-entry .onboarding-card h1 {
    margin-bottom: var(--ds-space-2);
  }
  .auth-entry .onboarding-intro {
    margin: 0 0 var(--ds-space-5); color: var(--ds-text-secondary); font-size: 14px; line-height: 1.5;
  }
  .auth-entry .onboarding-form {
    display: grid; gap: var(--ds-space-4);
  }
  .auth-entry .onboarding-actions {
    display: flex; justify-content: flex-end; align-items: center; gap: var(--ds-space-3);
  }
  .auth-entry .onboarding-account {
    margin-top: var(--ds-space-4); color: var(--ds-text-muted); font-size: 12px; line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .auth-entry .onboarding-error {
    margin: 0; color: var(--ds-danger); font-size: 13px; line-height: 1.4;
  }
  .auth-entry .onboarding-import {
    width: min(100% - 2rem, 62rem);
  }
  .auth-entry .onboarding-welcome {
    margin-bottom: var(--ds-space-5); text-align: left;
  }
  .auth-entry .onboarding-welcome h1 {
    margin-bottom: var(--ds-space-2); overflow-wrap: anywhere;
  }
  .auth-entry .onboarding-welcome p {
    margin: 0; color: var(--ds-text-secondary); font-size: 14px; line-height: 1.5;
  }
  .auth-entry .onboarding-next {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--ds-space-3);
    margin-top: var(--ds-space-4); text-align: left;
  }
  .auth-entry .onboarding-next p {
    flex: 1 1 20rem; margin: 0; color: var(--ds-text-secondary); font-size: 13px; line-height: 1.5;
  }
  .auth-entry .onboarding-next form {
    margin: 0 0 0 auto;
  }
  .auth-entry .configure-pricing-page {
    text-align: left; font-size: var(--ds-font-body); line-height: var(--ds-line-body);
  }
  @media (max-width: 30rem) {
    .auth-entry-main,
    body[data-ui-system="v1"].auth-entry .auth-entry-main.main-content {
      padding: 1.5rem 1rem;
    }
    body.auth-entry.auth-public-backdrop {
      background-position: 88% center;
    }
  }
  body.operator-shell[data-ui-system="v1"] {
    --ops-deep-cypress: #24443A; --ops-graphite: #292B2D; --ops-burnished-copper: #C18A51; --ops-limestone: #F4F1EA;
    --ops-mist-sage: #DDE8E1; --ds-canvas: var(--ops-limestone); --ds-surface: #FFFFFF; --ds-surface-quiet: #F8F7F4;
    --ds-text: var(--ops-graphite); --ds-text-secondary: #45494B; --ds-text-muted: #666B6D; --ds-border: #D8D4CC;
    --ds-border-strong: #B8B2A8; --ds-action: var(--ops-deep-cypress); --ds-action-hover: #19362E;
    --ds-action-text: #FFFFFF; --ds-focus: var(--ops-deep-cypress); --ds-focus-ring: rgb(36 68 58 / 24%);
    --ds-brand-header: var(--ops-deep-cypress); --ds-brand-sidebar: var(--ops-mist-sage);
  }
  .operator-shell .app-header {
    background: var(--ops-deep-cypress); color: #FFFFFF;
  }
  .operator-shell .operator-menu {
    border: 1px solid #C6D5CC; background: var(--ops-mist-sage);
  }
  body.operator-shell[data-ui-system="v1"] .ui-table th {
    background: #ECE9E2; color: var(--ops-graphite);
  }
  body.operator-shell[data-ui-system="v1"] .app-header img {
    filter: brightness(0) invert(1);
  }
  .operator-shell .ui-field-error {
    color: #7C4A1E;
  }
  .operator-shell .app-header {
    display: flex; align-items: center; gap: var(--ds-space-4); padding: var(--ds-space-2) var(--ds-space-4);
  }
  .operator-shell .app-header img {
    width: 10rem; height: auto;
  }
  .operator-shell .operator-app-title {
    font-size: 28px; font-weight: 650; line-height: 1.1; white-space: nowrap;
  }
  .operator-shell .app-header form {
    margin: 0 0 0 auto;
  }
  body.operator-shell[data-ui-system="v1"] .operator-workspace {
    width: 100%; max-width: none; margin: 0; padding: 0;
  }
  .operator-shell .page-header {
    margin-bottom: var(--ds-space-4);
  }
  .operator-shell .operator-layout {
    display: grid; grid-template-columns: 12rem minmax(0, 1fr); align-items: stretch; gap: 0;
    min-height: calc(100vh - 48px);
  }
  .operator-shell .operator-menu {
    position: sticky; top: 0; align-self: stretch; box-sizing: border-box; min-height: calc(100vh - 48px);
    padding: var(--ds-space-3) var(--ds-space-2); border-radius: 0; border-top: 0; border-bottom: 0; border-left: 0;
  }
  .operator-shell .operator-content {
    min-width: 0; padding: var(--ds-space-4);
  }
  .operator-shell .operator-management-grid {
    width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: var(--ds-space-4);
  }
  .operator-shell .operator-management-card {
    grid-column: 1 / -1; min-width: 0; scroll-margin-top: var(--ds-space-4);
  }
  .operator-shell .operator-search {
    width: min(100%, 24rem); margin-bottom: var(--ds-space-3);
  }
  .operator-shell .operator-row-actions {
    display: flex; flex-wrap: wrap; gap: var(--ds-space-2);
  }
  .operator-shell #management-message {
    margin: 0 0 var(--ds-space-3);
  }
  .operator-shell #management-message:empty {
    display: none;
  }
  .operator-shell #management-delete-dialog {
    max-width: min(34rem, calc(100vw - 2rem));
  }
  .operator-shell #management-delete-description {
    overflow-wrap: anywhere;
  }
  .operator-shell #management-delete-confirm-name {
    width: 100%;
  }
  .operator-shell #operator-directory {
    max-width: 1500px;
  }
  .operator-shell .directory-search-field {
    width: min(100%, 24rem);
  }
  .operator-shell .directory-search-field input {
    width: 100%;
  }
  .operator-shell .ui-table {
    min-width: 38rem;
  }
  .operator-shell .ui-table th:first-child {
    width: 50%;
  }
  .operator-shell .ui-table td:first-child {
    overflow-wrap: anywhere;
  }
  .operator-shell .ui-table td:not(:first-child) {
    white-space: nowrap;
  }
  .operator-shell #directory-message {
    margin: var(--ds-space-3) 0 0;
  }
  .operator-shell .directory-pagination {
    margin-top: var(--ds-space-3);
  }
  .operator-shell #directory-page {
    margin-right: auto;
  }
  .operator-shell [hidden] {
    display: none !important;
  }
  @media (max-width: 480px) {
    .operator-shell .app-header {
      flex-wrap: wrap; gap: var(--ds-space-2);
    }
    .operator-shell .app-header img {
      order: 1;
    }
    .operator-shell .app-header form {
      order: 2;
    }
    .operator-shell .operator-app-title {
      order: 3; flex: 1 0 100%; max-width: 100%; box-sizing: border-box; font-size: 22px; white-space: normal;
    }
  }
  @media (max-width: 320px) {
    .operator-shell .app-header {
      padding-inline: var(--ds-space-2); gap: var(--ds-space-1);
    }
    .operator-shell .app-header img {
      width: 7rem;
    }
    .operator-shell .operator-app-title {
      font-size: 21px;
    }
  }
  @media (max-width: 760px) {
    .operator-shell .operator-layout {
      grid-template-columns: minmax(0, 1fr); gap: 0; min-height: auto;
    }
    .operator-shell .operator-menu {
      position: static; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: var(--ds-space-2);
      min-height: auto; padding: var(--ds-space-2);
    }
    .operator-shell .operator-content {
      padding: var(--ds-space-3);
    }
  }
  .saved-print-document-viewer {
    max-width: calc(100vw - 16px);
  }
  .saved-print-document-viewer .customer-document-preview-content {
    box-sizing: border-box;
  }
  .saved-print-document-viewer .saved-print-document-toolbar {
    position: sticky; top: 0; z-index: 1; background: var(--ds-surface); padding-bottom: 8px;
  }
  .saved-print-document-viewer .saved-print-document-toolbar h3 {
    margin: 0; font-size: var(--ds-font-section);
  }
  .saved-print-document-viewer [data-document-status] {
    margin: 8px 0;
  }
  .saved-print-document-viewer [data-document-status][hidden] {
    display: none;
  }
  .app-header {
    background-color: var(--color-header); box-shadow: none;
  }
  .app-header-brand-logo {
    display: block; width: min(180px, 40vw); max-height: 32px; height: auto;
  }
  @media (min-width: 901px) {
    .app-body,
    .sidebar {
      background-image: linear-gradient(to bottom, var(--color-header), var(--color-sidebar) 3rem);
    }
  }
  .app-header-brand-primary {
    color: var(--brand-heading);
  }
  .sidebar .menu-subitem {
    color: var(--brand-subheading);
  }
  .company-users-table :is(th, td) {
    vertical-align: middle;
  }
  .job-history-paragraph {
    display: block; margin: .15rem 0;
  }
}

/* Controls and navigation; headings and surfaces; tables and presentation; toolbars and action groups */
@layer components {
  body[data-ui-system="v1"] .app-header-actions {
    display: flex; align-items: center; gap: 8px; margin-inline-start: auto;
  }
  body[data-ui-system="v1"] .app-header-action {
    position: relative;
  }
  body[data-ui-system="v1"] .app-header-icon {
    position: relative; display: grid; place-items: center; width: 34px; height: 34px; min-width: 34px;
    padding: 6px; border-color: transparent; background: transparent; color: var(--brand-heading, #152637);
  }
  body[data-ui-system="v1"] .app-header-icon:hover {
    background: rgb(255 255 255 / 35%);
  }
  body[data-ui-system="v1"] .app-header-icon svg {
    width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
  }
  body[data-ui-system="v1"] .app-header-count {
    position: absolute; inset-block-start: -3px; inset-inline-end: -4px; display: grid; place-items: center;
    min-width: 17px; height: 17px; padding: 0 3px; border: 1px solid var(--color-header);
    border-radius: 999px; background: var(--ds-danger); color: #fff; font-size: 10px; line-height: 1;
    font-weight: 700;
  }
  body[data-ui-system="v1"] .app-header-count[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .app-header-popover {
    position: absolute; z-index: 100; inset-block-start: calc(100% + 8px); inset-inline-end: 0;
    display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; width: min(340px, calc(100vw - 20px));
    max-height: min(440px, calc(100dvh - 80px)); padding: 10px; overflow: hidden;
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius-surface); background: var(--ds-surface);
    color: var(--ds-text); box-shadow: 0 8px 26px rgb(20 40 55 / 22%);
  }
  body[data-ui-system="v1"] .app-header-popover[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .app-header-popover > header,
  body[data-ui-system="v1"] .app-header-popover > footer {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
  }
  body[data-ui-system="v1"] .app-header-popover > header h2 {
    margin: 0; font-size: 14px;
  }
  body[data-ui-system="v1"] .app-header-popover-list {
    display: grid; align-content: start; gap: 4px; min-height: 0; overflow: auto;
  }
  body[data-ui-system="v1"] .app-header-popover-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; width: 100%;
    padding: 6px 8px; border: 1px solid transparent; border-radius: var(--ds-radius-control);
    background: transparent; color: var(--ds-text); text-align: start; font: inherit; cursor: pointer;
  }
  body[data-ui-system="v1"] .app-header-popover-row:hover,
  body[data-ui-system="v1"] .app-header-popover-row:focus-visible {
    border-color: var(--ds-border); background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] .app-header-popover-row small {
    grid-column: 1 / -1; overflow: hidden; color: var(--ds-text-secondary); font-size: 11px;
    text-overflow: ellipsis; white-space: nowrap;
  }
  body[data-ui-system="v1"] .app-header-popover-row time {
    color: var(--ds-text-muted); font-size: 10px; white-space: nowrap;
  }
  body[data-ui-system="v1"] .app-header-popover-row.is-unread > span:first-child {
    font-weight: 700;
  }
  body[data-ui-system="v1"] .app-header-popover-empty {
    margin: 0; padding: 8px; color: var(--ds-text-secondary); font-size: 12px;
  }
  body[data-ui-system="v1"] dialog.direct-messages-dialog[open] {
    display: flex; flex-direction: column; width: min(68rem, calc(100vw - 24px));
    height: min(680px, calc(100dvh - 24px)); padding: 16px; overflow: hidden;
  }
  body[data-ui-system="v1"] dialog.direct-messages-dialog.is-maximized {
    width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px);
  }
  body[data-ui-system="v1"] .direct-messages-dialog-header {
    flex: 0 0 auto; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .direct-messages-dialog-header .modal-subtitle {
    margin: 3px 0 0; font-size: 11px;
  }
  body[data-ui-system="v1"] .direct-messages-dialog-actions {
    display: flex; flex: 0 0 auto; gap: 6px;
  }
  body[data-ui-system="v1"] .direct-messages-layout {
    display: grid; grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr); flex: 1 1 auto;
    min-height: 0; margin-top: 10px; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control);
    overflow: hidden;
  }
  body[data-ui-system="v1"] .direct-messages-sidebar {
    display: flex; flex-direction: column; min-width: 0; min-height: 0; border-inline-end: 1px solid var(--ds-border);
    background: var(--ds-surface-quiet);
  }
  body[data-ui-system="v1"] .direct-messages-sidebar-actions {
    display: grid; gap: 7px; padding: 9px; border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .direct-messages-conversations,
  body[data-ui-system="v1"] .direct-messages-recipient-results {
    display: grid; align-content: start; gap: 3px; min-height: 0; overflow: auto; padding: 5px;
  }
  body[data-ui-system="v1"] .direct-messages-recipient-search {
    display: grid; gap: 5px; min-height: 0; padding: 8px; border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .direct-messages-recipient-search[hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .direct-messages-recipient-results {
    max-height: 180px; padding: 0;
  }
  body[data-ui-system="v1"] .direct-messages-recipient-option,
  body[data-ui-system="v1"] .direct-messages-conversation-button {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 8px; width: 100%;
    min-width: 0; padding: 7px; border: 1px solid transparent; border-radius: var(--ds-radius-control);
    background: transparent; color: var(--ds-text); text-align: start; font: inherit; cursor: pointer;
  }
  body[data-ui-system="v1"] .direct-messages-conversation-button:hover,
  body[data-ui-system="v1"] .direct-messages-conversation-button[aria-current="true"],
  body[data-ui-system="v1"] .direct-messages-recipient-option:hover,
  body[data-ui-system="v1"] .direct-messages-recipient-option:focus-visible {
    border-color: var(--ds-border); background: var(--ds-surface);
  }
  body[data-ui-system="v1"] .direct-messages-conversation-name {
    overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap;
  }
  body[data-ui-system="v1"] .direct-messages-conversation-preview {
    grid-column: 1 / -1; overflow: hidden; color: var(--ds-text-secondary); font-size: 11px;
    text-overflow: ellipsis; white-space: nowrap;
  }
  body[data-ui-system="v1"] .direct-messages-conversation-time {
    color: var(--ds-text-muted); font-size: 10px; white-space: nowrap;
  }
  body[data-ui-system="v1"] .direct-messages-unread-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--ds-action);
  }
  body[data-ui-system="v1"] .direct-messages-thread {
    display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--ds-surface);
  }
  body[data-ui-system="v1"] .direct-messages-back {
    display: none;
  }
  body[data-ui-system="v1"] .direct-messages-thread-header {
    flex: 0 0 auto; padding: 10px 12px; border-bottom: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .direct-messages-thread-header h3 {
    margin: 0; font-size: 14px;
  }
  body[data-ui-system="v1"] .direct-messages-thread-header p {
    margin: 3px 0 0; color: var(--ds-text-muted); font-size: 11px;
  }
  body[data-ui-system="v1"] .direct-messages-thread-empty {
    display: grid; flex: 1 1 auto; place-items: center; padding: 20px; color: var(--ds-text-secondary);
    text-align: center; font-size: 13px;
  }
  body[data-ui-system="v1"] .direct-messages-thread-list {
    display: flex; flex: 1 1 auto; flex-direction: column; align-items: stretch; gap: 8px; min-height: 0;
    overflow: auto; padding: 12px;
  }
  body[data-ui-system="v1"] .direct-messages-bubble {
    max-width: min(78%, 38rem); padding: 8px 10px; border: 1px solid var(--ds-border);
    border-radius: 9px; background: var(--ds-surface-quiet); color: var(--ds-text); white-space: pre-wrap;
    overflow-wrap: anywhere; font-size: 13px; line-height: 1.4;
  }
  body[data-ui-system="v1"] .direct-messages-bubble.is-mine {
    align-self: flex-end; border-color: var(--ds-action); background: color-mix(in srgb, var(--ds-action) 10%, white);
  }
  body[data-ui-system="v1"] .direct-messages-bubble time {
    display: block; margin-top: 4px; color: var(--ds-text-muted); font-size: 10px; text-align: end;
  }
  body[data-ui-system="v1"] .direct-messages-composer {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 9px;
    border-top: 1px solid var(--ds-border);
  }
  body[data-ui-system="v1"] .direct-messages-composer textarea {
    min-width: 0; max-height: 140px; resize: vertical; white-space: pre-wrap;
  }
  body[data-ui-system="v1"] .direct-messages-error {
    grid-column: 1 / -1; margin: 0; color: var(--ds-danger); font-size: 11px;
  }
  body[data-ui-system="v1"] .direct-messages-older {
    flex: 0 0 auto; align-self: center; margin-top: 8px;
  }
  body[data-ui-system="v1"] .direct-messages-dialog [hidden] {
    display: none;
  }
  body[data-ui-system="v1"] .home-messages-list {
    display: grid; gap: 3px; margin: 0; padding: 0; list-style: none;
  }
  body[data-ui-system="v1"] .home-messages-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; width: 100%; min-width: 0;
  }
  body[data-ui-system="v1"] .home-messages-identity {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 6px; min-width: 0;
  }
  body[data-ui-system="v1"] .home-messages-identity strong {
    overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap;
  }
  body[data-ui-system="v1"] .home-messages-preview {
    grid-column: 1 / -1; overflow: hidden; color: var(--ds-text-secondary); font-size: 11px;
    text-overflow: ellipsis; white-space: nowrap;
  }
  body[data-ui-system="v1"] .home-messages-time {
    color: var(--ds-text-muted); font-size: 10px; white-space: nowrap;
  }
  body[data-ui-system="v1"] .home-messages-unread {
    width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--ds-action);
  }
  body[data-ui-system="v1"] .home-messages-unread-summary {
    margin: 0 0 var(--ds-space-1); color: var(--ds-text-secondary); font-size: var(--ds-font-metadata);
  }
  @media (max-width: 700px) {
    body[data-ui-system="v1"] dialog.direct-messages-dialog[open] {
      width: calc(100vw - 12px); height: calc(100dvh - 12px); max-width: none; max-height: none; padding: 10px;
    }
    body[data-ui-system="v1"] .direct-messages-dialog-header { gap: 8px; }
    body[data-ui-system="v1"] .direct-messages-dialog-actions { gap: 3px; }
    body[data-ui-system="v1"] .direct-messages-layout { display: block; position: relative; }
    body[data-ui-system="v1"] .direct-messages-sidebar,
    body[data-ui-system="v1"] .direct-messages-thread { position: absolute; inset: 0; }
    body[data-ui-system="v1"] .direct-messages-layout[data-message-view="thread"] .direct-messages-sidebar { display: none; }
    body[data-ui-system="v1"] .direct-messages-layout[data-message-view="list"] .direct-messages-thread { display: none; }
    body[data-ui-system="v1"] .direct-messages-back { display: inline-flex; align-self: flex-start; margin: 6px 10px 0; }
    body[data-ui-system="v1"] .direct-messages-composer { padding: 7px; }
    body[data-ui-system="v1"] .direct-messages-bubble { max-width: 90%; }
    body[data-ui-system="v1"] .app-header-actions { gap: 2px; }
  }

  body[data-ui-system="v1"] {
    --ds-font-body: 13px; --ds-font-table: 12px; --ds-font-label: 12px; --ds-font-page: 21px;
    --ds-font-section: 15px; --ds-font-metadata: 11px; --ds-line-body: 1.4; --ds-link: var(--ds-action);
  }
  :where(.ui-button, .ui-navigation-item, .ui-navigation-control) {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px; box-sizing: border-box;
    min-width: 0; min-height: 33px; padding: 5px 11px; border: 1px solid var(--ds-border-strong);
    border-radius: var(--ds-radius-control);
    background: linear-gradient(to bottom, color-mix(in srgb, var(--ds-surface) 92%, var(--ds-text)), var(--ds-surface));
    color: var(--ds-text-secondary); box-shadow: var(--ui-shell-control-shadow); font: inherit;
    font-size: var(--ds-font-body); font-weight: 600; line-height: 1.35; text-align: center; text-decoration: none;
    cursor: pointer;
  }
  :where(.ui-navigation-row, .report-tabs) .ui-navigation-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px; box-sizing: border-box;
    min-width: 0; border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-control);
    background: linear-gradient(to bottom, color-mix(in srgb, var(--ds-surface) 92%, var(--ds-text)), var(--ds-surface));
    box-shadow: var(--ui-shell-control-shadow); font: inherit; font-weight: 600; line-height: 1.35;
    text-align: center; text-decoration: none; cursor: pointer;
  }
  :where(.ui-button, .ui-navigation-item, .ui-navigation-control):hover:not(:disabled):not([aria-disabled="true"]),
  :where(.ui-navigation-row, .report-tabs) .ui-navigation-link:hover {
    border-color: var(--ds-text-secondary); background-color: var(--ds-surface-quiet);
    box-shadow: var(--ui-shell-control-shadow-hover);
  }
  :where(.ui-button, .ui-navigation-item, .ui-navigation-control):active:not(:disabled) {
    background-image: none; box-shadow: var(--ui-shell-control-shadow-pressed);
  }
  :where(.ui-button, .ui-navigation-item, .ui-navigation-control):is([aria-pressed="true"], [aria-selected="true"], [aria-current="page"], .selected) {
    border-color: var(--ds-action); color: var(--ds-action);
    background: linear-gradient(to bottom, color-mix(in srgb, var(--ds-surface-quiet) 88%, var(--ds-action)), var(--ds-surface-quiet));
    box-shadow: var(--ui-shell-control-shadow-active);
  }
  .ui-button--primary {
    background: var(--ds-action); border-color: var(--ds-action); color: var(--ds-action-text);
  }
  .ui-button--primary:hover:not(:disabled) {
    background: var(--ds-action-hover); border-color: var(--ds-action-hover);
  }
  .ui-button--danger {
    color: var(--ds-danger); border-color: color-mix(in srgb, var(--ds-danger) 45%, white);
  }
  .ui-button--quiet {
    background: transparent; box-shadow: none;
  }
  @media (max-width: 700px) {
    .ui-button--narrow-mobile {
      padding-inline: 7px;
    }
  }
  .ui-button--compact,
  .ui-navigation-item,
  .ui-navigation-control,
  :where(.ui-navigation-row, .report-tabs) .ui-navigation-link {
    min-height: 28px; padding: 3px 7px; font-size: 12px; white-space: nowrap;
  }
  .ui-button--icon {
    display: inline-grid; place-items: center; padding: 0;
    width: var(--ui-icon-button-width, 28px); height: var(--ui-icon-button-height, 28px);
    min-height: var(--ui-icon-button-height, 28px);
  }
  .ui-button--wrap {
    white-space: normal; text-align: start; justify-content: start; width: 100%;
  }
  :where(.ui-button, .ui-navigation-item, .ui-navigation-control):is(:disabled, [aria-disabled="true"]) {
    opacity: .52; cursor: not-allowed;
  }
  .ui-button[aria-busy="true"] {
    cursor: progress;
  }
  .ui-navigation-link {
    color: var(--ds-action); text-decoration: none;
  }
  .ui-navigation-link:hover {
    text-decoration: underline;
  }
  .ui-navigation-row .ui-navigation-link:hover {
    text-decoration: none;
  }
  :where(.ui-itemedit-button, .ui-inboxrow-button, .ui-disclosure, .ui-menu-item) {
    border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ds-text-secondary);
    font: inherit; text-align: start; cursor: pointer;
  }
  .ui-itemedit-button {
    padding: 2px 4px; color: var(--ds-action); font-size: 12px;
  }
  .ui-inboxrow-button {
    padding: 0; min-height: 0;
  }
  .ui-menu-item {
    display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 4px 8px;
    border-radius: 4px; text-decoration: none;
  }
  .ui-menu-item:hover {
    background: var(--ds-surface-quiet);
  }
  .ui-menu-item[aria-current="page"] {
    background: #e8f1f8; color: var(--ds-action); font-weight: 700;
  }
  .ui-menu-subitem {
    padding-inline-start: 20px;
  }
  .ui-menu {
    display: grid; align-content: start; gap: 2px; min-width: 0;
  }
  :where(.ui-control) {
    box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 33px; height: auto; padding: 5px 9px;
    border: 1px solid var(--ds-border-strong); border-radius: 4px; background: var(--ds-surface);
    color: var(--ds-text); font: inherit; font-size: 13px; line-height: 1.4;
  }
  .ui-navigation-row :is(.ui-button, .ui-control) {
    min-height: 28px; padding: 3px 7px;
  }
  textarea.ui-control {
    min-height: 72px; resize: vertical;
  }
  .ui-control:disabled {
    background: var(--ds-surface-quiet); color: var(--ds-text-muted); cursor: not-allowed;
  }
  .ui-control[aria-invalid="true"] {
    border-color: var(--ds-danger);
  }
  .ui-control--numeric {
    width: min(100%, 12ch);
  }
  .ui-control--short {
    width: min(100%, 22ch);
  }
  .ui-control--medium {
    width: min(100%, 36ch);
  }
  .ui-control--long {
    width: min(100%, 60ch);
  }
  .ui-control--fill {
    width: 100%;
  }
  .ui-control--toolbar {
    min-height: 30px; padding-block: 3px;
  }
  :where(.ui-field) {
    display: grid; align-content: start; gap: 4px; min-width: 0; color: var(--ds-text-secondary); font-size: 12px;
    font-weight: 600;
  }
  .ui-field-help {
    color: var(--ds-text-muted); font-size: 11px; font-weight: 400;
  }
  .ui-field-error,
  .ui-message--error {
    color: var(--ds-danger); font-size: 12px;
  }
  .ui-check {
    display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px;
  }
  .ui-check > input {
    flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--ds-action);
  }
  :where(.ui-button, .ui-control, .ui-menu-item, .ui-navigation-item, .ui-navigation-link, .ui-navigation-control, .ui-itemedit-button, .ui-inboxrow-button, .ui-disclosure, .ui-check > input):focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 2px; box-shadow: 0 0 0 3px var(--ds-focus-ring);
  }
  .ui-navigation-scrollport :where(.ui-navigation-item, .ui-navigation-link):focus-visible {
    outline-offset: -2px;
  }
  :where(.ui-page-title) {
    margin: 0; color: var(--ds-text); font-size: 21px; line-height: 1.25; font-weight: 700;
  }
  :where(.ui-section-title) {
    margin: 0; color: var(--ds-text); font-size: 15px; line-height: 1.3; font-weight: 700;
  }
  :where(.ui-subtitle) {
    margin: 4px 0 0; color: var(--ds-text-secondary); font-size: 12px; line-height: 1.4;
  }
  .ui-meta {
    color: var(--ds-text-muted); font-size: 11px;
  }
  .ui-eyebrow {
    margin: 0; color: var(--ds-text-muted); font-size: 10px; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase;
  }
  .ui-surface {
    min-width: 0; background: var(--ds-panel-surface, var(--ds-surface)); border: 1px solid var(--ds-border);
    border-radius: 7px;
    box-shadow: none;
  }
  .ui-surface--home-widget {
    background: var(--ds-panel-surface-quiet, var(--ds-surface-quiet));
  }
  .ui-surface--preview-area {
    background-color: var(--ds-surface);
  }
  .ui-surface--home-connections-overdue {
    border-inline-start: 3px solid var(--ds-warning);
  }
  .ui-surface--padded {
    padding: 14px;
  }
  .ui-inset {
    min-width: 0; background: var(--ds-panel-surface-quiet, var(--ds-surface-quiet));
    border: 1px solid var(--ds-border); border-radius: 4px;
  }
  .ui-inset--padded {
    padding: 12px;
  }
  .ui-surface--flush {
    padding: 0; overflow: hidden;
  }
  .ui-panel-section-heading {
    display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 12px; border: 0;
    border-bottom: 1px solid var(--ds-border); border-radius: 0;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--ds-surface-quiet) 88%, var(--ds-action)), var(--ds-surface-quiet));
    color: var(--ds-text); font-size: 14px; font-weight: 650; line-height: 1.2;
  }
  .ui-panel-section-body {
    display: grid; gap: 12px; min-width: 0; padding: 12px;
  }
  .ui-panel-section-body > p {
    margin: 0;
  }
  .ui-separator {
    height: 0; margin: 16px 0; border: 0; border-top: 1px solid var(--ds-border);
  }
  .ui-disclosure {
    display: list-item; padding: 10px 12px; font-size: 14px; font-weight: 650;
  }
  .ui-disclosure::marker {
    color: var(--ds-action);
  }
  .ui-disclosure .ui-subtitle {
    display: block; margin-left: 16px; font-weight: 400;
  }
  .ui-table-scroll {
    min-width: 0; overflow: auto; border: 1px solid var(--ds-border); background: var(--ds-surface);
  }
  .ui-table {
    width: 100%; border-collapse: collapse; background: var(--ds-surface); color: var(--ds-text); font-size: 12px;
  }
  .ui-table :is(th, td) {
    padding: 7px 8px; border-bottom: 0; vertical-align: middle; text-align: start;
  }
  .ui-table th {
    color: var(--ds-text-secondary); font-weight: 700; white-space: nowrap;
  }
  .ui-table tbody tr:hover {
    background: #f2f7fa;
  }
  .ui-table tbody tr[aria-selected="true"] {
    background: #e8f1f8;
  }
  .ui-table .ui-number {
    text-align: end; font-variant-numeric: tabular-nums;
  }
  .ui-table--compact :is(th, td) {
    padding: 4px 8px;
  }
  .ui-status {
    display: inline-flex; align-items: center; max-width: 100%; padding: 2px 6px; border-radius: 4px;
    background: #e8f1f8; color: #245d89; font-size: 11px; font-weight: 700;
  }
  .ui-status--success {
    background: #e7f2eb; color: var(--ds-success);
  }
  .ui-status--warning {
    background: #fcf3da; color: var(--ds-warning);
  }
  .ui-message {
    color: var(--ds-text-secondary); font-size: 13px;
  }
  .ui-message:empty {
    display: none;
  }
  .ui-message--success {
    color: var(--ds-success);
  }
  .ui-message--warning {
    color: var(--ds-warning);
  }
  .ui-toolbar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0;
  }
  .ui-field-row {
    display: flex; flex-wrap: wrap; min-width: 0;
  }
  .ui-field-row {
    align-items: end; gap: 8px 12px;
  }
  .ui-toolbar-group {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0;
  }
  .ui-toolbar-end {
    margin-inline-start: auto;
  }
  .ui-record-list {
    margin: 0; padding: 0; list-style: none;
  }
  .ui-record-list > li {
    display: grid; gap: var(--ds-space-1); min-width: 0; overflow-wrap: anywhere;
  }
  .ui-record-list > li + li {
    margin-block-start: var(--ds-space-2); padding-block-start: var(--ds-space-2);
    border-block-start: 1px solid var(--ds-border);
  }
  .ui-disclosure + .ui-record-list {
    margin-block-start: var(--ds-space-1);
  }
  .ui-field-stack,
  .ui-stack {
    display: grid; align-content: start; gap: 12px; min-width: 0;
  }
  .ui-action-summary-row {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  }
  .ui-action-summary-row > :last-child {
    margin-inline-start: auto; text-align: end;
  }
  dialog.ui-dialog:not([open]) {
    display: none;
  }
  dialog.ui-dialog[open] {
    box-sizing: border-box; width: min(48rem, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto;
    padding: 20px; overflow: auto; border: 1px solid var(--ds-border-strong); border-radius: 7px;
    background: var(--ds-surface); color: var(--ds-text); box-shadow: 0 12px 36px rgb(20 40 55 / 20%);
  }
  dialog.ui-dialog::backdrop {
    background: rgb(20 35 48 / 55%);
  }
  .ui-dialog-header {
    display: flex; align-items: start; justify-content: space-between; gap: 12px; min-width: 0;
  }
  .ui-dialog-title {
    margin: 0; color: var(--ds-text); font-size: 18px; line-height: 1.25; font-weight: 700;
  }
  .ui-dialog-actions {
    display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 8px;
  }
  .ui-dialog-section {
    margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--ds-border);
  }
  .ui-catalog-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0;
    min-height: 32px; padding: 5px 8px; border: 1px solid var(--ds-border); border-radius: 4px;
    background: var(--ds-surface); color: var(--ds-text); font: inherit; font-size: 13px; text-align: start;
    cursor: pointer;
  }
  .ui-catalog-row:hover,
  .ui-catalog-row.selected {
    border-color: var(--ds-border-strong); background: var(--ds-surface-quiet);
  }
  .ui-catalog-row:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: -2px;
  }
  .ui-itemedit-button--danger {
    color: var(--ds-danger);
  }
  :where(.ui-navigation-row, .report-tabs) .ui-navigation-link {
    color: var(--ds-text-secondary);
  }
  .ui-button--attention {
    background: var(--ops-burnished-copper, #b77938); border-color: var(--ops-burnished-copper, #b77938);
    color: var(--ops-graphite, #172b3b);
  }
  .ui-button--attention:hover:not(:disabled) {
    background: #b47941; border-color: #a66e38;
  }
  .app-header {
    min-height: 48px; padding: 8px 16px; gap: 12px;
  }
  .app-header h1 {
    font-size: 18px; line-height: 1.2; font-weight: 650;
  }
  .sidebar {
    width: 196px; padding: 10px 8px; gap: 8px;
  }
  .sidebar .menu {
    flex-shrink: 0; gap: 3px;
  }
  .sidebar .menu-item,
  .sidebar .menu-group-toggle {
    box-sizing: border-box; min-height: 32px; padding: 6px 9px; border-radius: 4px; font-size: 13px;
    line-height: 1.25; transition: background-color 120ms ease, color 120ms ease;
  }
  .sidebar .menu-item:not(.menu-subitem) {
    display: flex; align-items: center;
  }
  .sidebar .menu-group-label,
  .sidebar .nav-item-label {
    display: inline-flex; align-items: center; min-width: 0;
  }
  .sidebar .menu-group-label {
    gap: 8px;
  }
  .sidebar .nav-icon {
    display: block; flex: 0 0 17px; width: 17px; height: 17px; color: currentColor;
  }
  .sidebar .nav-icon + .nav-item-label {
    margin-left: 8px;
  }
  .sidebar .menu-group {
    gap: 2px;
  }
  .sidebar .menu-group-items {
    gap: 2px; padding-left: 8px;
  }
  .sidebar .menu-item.menu-subitem {
    min-height: 30px; padding: 5px 8px 5px 12px; font-size: 12px;
  }
  .sidebar .menu-item:hover,
  .sidebar .menu-group-toggle:hover {
    outline: none; background-color: color-mix(in srgb, var(--color-sidebar), white 16%);
    color: var(--brand-heading, #ffffff);
  }
  .sidebar .menu-item:focus-visible,
  .sidebar .menu-group-toggle:focus-visible {
    outline: 2px solid var(--brand-heading, #ffffff); outline-offset: 1px;
    background-color: color-mix(in srgb, var(--color-sidebar), white 16%);
  }
  .sidebar .menu-item.active {
    font-weight: 600;
  }
  .sidebar .menu-group-toggle.active {
    color: var(--brand-heading, #ffffff); font-weight: 600;
  }
  .sidebar .menu-item.active:hover {
    background-color: color-mix(in srgb, var(--color-sidebar), white 23%);
  }
  .sidebar .menu-item,
  .sidebar .menu-group-toggle {
    box-shadow: var(--ui-shell-control-shadow);
  }
  .sidebar .menu-item.menu-subitem {
    box-shadow: none;
  }
  .sidebar .menu-group-toggle[aria-expanded="true"] {
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%),
              inset 0 -1px 0 rgb(0 0 0 / 12%);
  }
  .sidebar .menu-item:hover,
  .sidebar .menu-group-toggle:hover,
  .sidebar .menu-item:focus-visible,
  .sidebar .menu-group-toggle:focus-visible {
    box-shadow: var(--ui-shell-control-shadow-hover);
  }
  .sidebar .menu-item.menu-subitem:hover,
  .sidebar .menu-item.menu-subitem:focus-visible {
    box-shadow: var(--ui-shell-control-shadow-subitem-hover);
  }
  .sidebar .menu-item.active {
    box-shadow: var(--ui-shell-control-shadow-active);
  }
  .sidebar .menu-item:active,
  .sidebar .menu-group-toggle:active {
    box-shadow: var(--ui-shell-control-shadow-pressed);
  }
  .ui-control--color {
    flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; padding: 3px; cursor: pointer;
  }
  .ui-control--color::-webkit-color-swatch-wrapper {
    padding: 0;
  }
  .ui-control--color::-webkit-color-swatch,
  .ui-control--color::-moz-color-swatch {
    border: 0; border-radius: 3px;
  }
  .visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
  }
  .ui-button,
  .ui-navigation-item,
  .ui-navigation-control,
  :where(.ui-navigation-row, .report-tabs) .ui-navigation-link {
    background-color: var(--ds-surface);
  }
  .ui-button--primary {
    background-color: var(--ds-action);
  }
  .ui-button--quiet {
    background-color: transparent;
  }
  .ui-button--attention {
    background-color: var(--ops-burnished-copper, #b77938);
  }
  .ui-menu-item--filled {
    border: 1px solid transparent; background: var(--ds-surface); color: var(--ds-text);
  }
  .ui-menu-item--filled[aria-current="page"] {
    border-color: var(--ds-action); background: var(--ds-action); color: var(--ds-action-text);
  }
  .ui-menu-item--filled[aria-current="page"]:hover {
    background: var(--ds-action-hover);
  }
  .ui-table th {
    background: var(--ds-table-heading);
  }
  .ui-table--wide {
    min-width: 38rem;
  }
  .ui-inboxrow-button--record {
    display: grid; width: 100%; gap: 2px; padding: 5px 0; line-height: 1.35;
  }
  .ui-button--provider {
    width: 100%; min-height: 48px; gap: 11px; padding: 12px 16px; font-size: 16px;
  }
  .ui-surface--entry {
    padding: 32px;
  }
  @media (max-width: 480px) {
    .ui-surface--entry {
      padding: 24px 16px;
    }
  }
  .sidebar :is(.menu-item, .menu-group-toggle) {
    border: 0; background: transparent; color: var(--brand-heading, #fff); font: inherit; text-decoration: none;
  }
  .sidebar .menu-subitem {
    color: var(--brand-subheading, #d9e2ec);
  }
  .sidebar .menu-item.active {
    color: var(--brand-heading, #fff); background-color: color-mix(in srgb, var(--color-sidebar), white 18%);
  }
  .sidebar .menu-group-toggle.active {
    background-color: color-mix(in srgb, var(--color-sidebar), white 10%);
  }
  .sidebar :is(.menu-item, .menu-group-toggle):hover {
    background-color: color-mix(in srgb, var(--color-sidebar), white 16%);
  }
  .ui-panel-section-heading--inset {
    margin: -14px -14px 0;
  }
  .ui-itemedit-button--title {
    padding: 0; color: var(--ds-text); font: inherit; font-weight: 650;
  }
  .ui-itemedit-button--icon {
    display: inline-grid; place-items: center; width: 22px; height: 22px; min-height: 22px; padding: 2px;
  }
  .ui-itemedit-button:hover {
    text-decoration: underline;
  }
  .ui-panel-section-heading :where(h3) {
    margin: 0; font: inherit;
  }
  .ui-button--start {
    justify-content: flex-start; text-align: left;
  }
  .ui-table-sort {
    display: inline-flex; align-items: center; gap: 4px; width: 100%; border: 0; padding: 0;
    background: transparent; color: inherit; font: inherit; font-weight: inherit; text-align: start;
    cursor: pointer;
  }
  .ui-table-sort:focus-visible {
    outline: 2px solid var(--ds-focus); outline-offset: 2px;
  }
}

/* Shared page arrangements and responsive rules */
@layer layouts {
  body[data-ui-system="v1"] .direct-messages-sidebar-actions > .ui-button {
    justify-self: start;
  }
  body[data-ui-system="v1"] .home-connections-config > .ui-section-title {
    margin: 0;
  }
  .main-content {
    min-width: 0; padding: 18px 20px 24px;
  }
  .ui-page-frame {
    min-width: 0; width: 100%;
  }
  .ui-page {
    min-width: 0; max-width: none; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0;
    background: transparent; box-shadow: none; color: inherit; font-size: inherit; line-height: inherit;
  }
  .ui-page-header {
    display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-width: 0;
    margin: 0 0 12px; padding: 0; grid-column: 1 / -1;
  }
  .ui-page-header > :first-child {
    min-width: 0;
  }
  .ui-layout {
    display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.65fr) minmax(0,.95fr); align-items: start;
    gap: 12px; min-width: 0;
  }
  .ui-layout > * {
    min-width: 0;
  }
  .ui-layout--full > *,
  .ui-track-full {
    grid-column: 1 / -1;
  }
  .ui-layout--reading > :not(.ui-page-header),
  .ui-track-12 {
    grid-column: 1 / 3;
  }
  .ui-track-1 {
    grid-column: 1;
  }
  .ui-track-2 {
    grid-column: 2;
  }
  .ui-track-3 {
    grid-column: 3;
  }
  .ui-track-23 {
    grid-column: 2 / 4;
  }
  .ui-track-12,
  .ui-track-23,
  .ui-track-full {
    container: ui-region / inline-size;
  }
  .ui-layout > .ui-page-header {
    margin-bottom: 0;
  }
  .ui-split {
    display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; gap: 12px; min-width: 0;
  }
  .ui-split > * {
    min-width: 0;
  }
  .ui-split--stretch {
    align-items: stretch;
  }
  .ui-page-body {
    min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px;
  }
  .ui-navigation-workspace {
    width: 100%; min-width: 0;
  }
  .ui-navigation-workspace > .ui-navigation-row + * {
    margin-top: 8px;
  }
  .ui-navigation-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-inline: 15px; min-width: 0;
  }
  .ui-navigation-content {
    min-width: 0; padding: 14px; background: var(--ds-panel-surface, var(--ds-surface)); border: 1px solid var(--ds-border);
    border-radius: 7px;
  }
  .ui-navigation-actions {
    display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto;
  }
  .ui-navigation-scrollport {
    flex: 1 1 0; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  }
  .ui-navigation-items {
    display: flex; align-items: center; gap: 4px; width: max-content; margin: 0; padding: 0;
  }
  .ui-reading-timeline {
    max-height: 65dvh; overflow-y: auto; overscroll-behavior: contain;
  }
  .auth-message-shell {
    display: grid; place-items: center; min-height: 100dvh;
  }
  .auth-message-shell main {
    width: min(100% - 24px, 30rem); padding-block: 24px; text-align: center;
  }
  .auth-message-shell .wordmark {
    display: block; width: min(100%, 21rem); height: auto; margin: 0 auto 24px;
  }
  .auth-message-shell .message {
    padding: 20px; border: 1px solid var(--ds-border); border-radius: 7px; background: var(--ds-surface);
  }
  .auth-message-shell h1 {
    margin: 0 0 12px; font-size: 21px;
  }
  .auth-message-shell p {
    margin: 0 0 16px; color: var(--ds-text-secondary);
  }
  .auth-message-shell .actions {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  }
  .auth-message-shell .interest-form {
    display: grid; gap: 12px; margin-bottom: 20px; text-align: start;
  }
  @media (max-width: 1180px) {
    .ui-layout {
      grid-template-columns: minmax(0,.8fr) minmax(0,1.65fr);
    }
    .ui-track-3 {
      grid-column: 1 / -1;
    }
    .ui-track-23 {
      grid-column: 2;
    }
    .ui-track-12,
    .ui-layout--left-wide > .ui-track-3 {
      grid-column: 1 / -1;
    }
  }
  @media (max-width: 900px) {
    .main-content {
      padding: 14px 12px 24px;
    }
  }
  @media (max-width: 760px) {
    .ui-layout {
      grid-template-columns: minmax(0,1fr);
    }
    .ui-layout > * {
      grid-column: 1 / -1;
    }
    .ui-split {
      grid-template-columns: minmax(0,1fr);
    }
    .ui-reading-timeline {
      max-height: none; overflow: visible;
    }
    dialog.ui-dialog[open] {
      padding: 16px;
    }
  }
  @container ui-region (max-width: 620px) {
    .ui-split {
      grid-template-columns: minmax(0,1fr);
    }
  }
  .ui-layout-contents {
    display: contents;
  }
  .ui-span-all {
    grid-column: 1 / -1;
  }
  .ui-padding-none {
    padding: 0;
  }
  .ui-gap-before {
    margin-top: 8px;
  }
  .ui-actions-end {
    justify-content: flex-end;
  }
  @media (max-width: 760px) {
    .ui-track-1,
    .ui-track-2,
    .ui-track-3,
    .ui-track-12,
    .ui-track-23 {
      grid-column: 1 / -1;
    }
  }
  @media (max-width: 760px) {
    .ui-layout--reading > :not(.ui-page-header) {
      grid-column: 1 / -1;
    }
  }
}
