@font-face {
  font-family: "Geist Sans";
  src: url("/fonts/geist/Geist-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --aat-primary: #3154b8;
  --aat-primary-dark: #243f91;
  --aat-primary-soft: #edf2ff;
  --aat-canvas: #f7f7fa;
  --aat-surface: #fff;
  --aat-surface-soft: #fbfbfd;
  --aat-border: #e2e1e8;
  --aat-border-strong: #d6d4df;
  --aat-text: #24212b;
  --aat-text-muted: #706b78;
  --aat-success: #1f8a68;
  --aat-attention: #b7790b;
  --aat-danger: #c43d4f;
  --aat-information: #2563a8;
  --aat-shadow: 0 7px 22px rgb(35 30 50 / 8%);
  --aat-shadow-soft: 0 2px 8px rgb(35 30 50 / 6%);
  --aat-radius: 10px;
  --aat-radius-small: 7px;
  --aat-type-display: 32px;
  --aat-type-heading: 20px;
  --aat-type-subheading: 16px;
  --aat-type-body: 15px;
  --aat-type-control: 14px;
  --aat-type-dense: 14px;
  --aat-type-small: 13px;
  --aat-type-eyebrow: 12px;
  --aat-font-sans: "Geist Sans", "Segoe UI Variable Text", Inter,
    system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --suite-rail-width: 76px;
  --app-navigation-width: 240px;
  --app-header-height: 70px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family: var(--aat-font-sans);
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--aat-canvas);
  color: var(--aat-text);
  font-family: var(--aat-font-sans);
  font-size: var(--aat-type-body);
  line-height: 1.5;
}

a {
  color: var(--aat-primary);
}

a:hover {
  color: var(--aat-primary-dark);
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgb(49 84 184 / 32%);
  outline-offset: 2px;
}

.sales-orders-heading,
.sales-orders-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.sales-orders-heading {
  margin-bottom: 24px;
}

.sales-orders-heading h1 {
  margin: 2px 0 6px;
  font-size: var(--aat-type-display);
}

.sales-orders-heading p:last-child {
  margin: 0;
  color: var(--aat-text-muted);
}

.sales-orders-directory {
  overflow: hidden;
  border: 1px solid var(--aat-border);
  border-radius: var(--aat-radius);
  background: var(--aat-surface);
  box-shadow: var(--aat-shadow-soft);
}

.sales-orders-toolbar {
  padding: 20px 22px;
  border-bottom: 1px solid var(--aat-border);
}

.sales-orders-toolbar h2 {
  margin: 2px 0 0;
  font-size: var(--aat-type-heading);
}

.sales-orders-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sales-orders-search input {
  width: 280px;
  border: 1px solid var(--aat-border-strong);
  border-radius: var(--aat-radius-small);
  padding: 9px 11px;
}

.sales-orders-search button {
  border: 0;
  border-radius: var(--aat-radius-small);
  background: var(--aat-primary);
  color: #fff;
  padding: 9px 13px;
}

.sales-orders-table-wrap { overflow-x: auto; }
.sales-orders-table { width: 100%; border-collapse: collapse; font-size: var(--aat-type-small); }
.sales-orders-table th { background: var(--aat-primary-dark); color: #fff; font-size: 11px; letter-spacing: .03em; text-align: left; text-transform: uppercase; }
.sales-orders-table th, .sales-orders-table td { padding: 13px 16px; border-bottom: 1px solid var(--aat-border); white-space: nowrap; }
.sales-orders-table tr:last-child td { border-bottom: 0; }
.sales-orders-table td { color: var(--aat-text-muted); }
.sales-orders-table td strong { color: var(--aat-primary-dark); }
.sales-orders-empty { margin: 24px; }
.sales-orders-heading-actions { display: flex; align-items: center; gap: 10px; }
.sales-order-count { border: 1px solid var(--aat-border); border-radius: 999px; background: #fff; padding: 7px 11px; color: var(--aat-text-muted); font-size: 11px; font-weight: 650; }
.sales-order-views { display: grid; grid-template-columns: repeat(8,minmax(105px,1fr)); gap: 8px; margin-bottom: 14px; }
.sales-order-views a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; border: 1px solid var(--aat-border); border-radius: 7px; background: #fff; padding: 9px 10px; color: var(--aat-text-muted); font-size: 10px; font-weight: 650; text-decoration: none; box-shadow: 0 2px 8px rgb(17 42 90 / 4%); }
.sales-order-views a:hover { border-color: #aebfe4; color: var(--aat-primary-dark); }
.sales-order-views a.active { border-color: var(--aat-primary); background: #eef3ff; color: var(--aat-primary-dark); box-shadow: inset 0 -2px 0 var(--aat-primary); }
.sales-order-views a.attention strong { background: #fff2cf; color: #8a5b00; }
.sales-order-views strong { display: inline-grid; min-width: 23px; height: 23px; place-items: center; border-radius: 999px; background: var(--aat-surface-soft); color: var(--aat-primary-dark); font-size: 10px; }
.sales-orders-toolbar > div > small { color: var(--aat-text-muted); font-size: 10px; }
.sales-orders-table.operational { min-width: 1940px; }
.sales-orders-table.operational th,.sales-orders-table.operational td { padding: 10px 12px; }
.sales-orders-table.operational td { vertical-align: middle; }
.sales-orders-table.operational td:first-child { border-left: 3px solid transparent; }
.sales-orders-table.operational tr.needs-attention td:first-child { border-left-color: #e1ad31; }
.sales-orders-table.operational td > small { display: block; margin-top: 4px; color: var(--aat-text-muted); font-size: 9px; }
.sales-orders-table.operational td > strong { color: var(--aat-text); font-size: 11px; }
.sales-order-customer { color: var(--aat-text); font-size: 11px; text-decoration: none; }
.sales-order-customer:hover { color: var(--aat-primary-dark); text-decoration: underline; }
.sales-orders-table .order-summary-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.sales-orders-table .number { text-align: right; }
.sales-orders-table .overdue { color: #a33b2b; }
.sales-orders-table .amount-due { color: var(--aat-primary-dark); }
.order-source-badge,.workflow-badge { display: inline-flex; max-width: 155px; overflow: hidden; border-radius: 999px; padding: 4px 8px; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.order-source-badge { background: #eef2f8; color: #43536f; }
.order-source-badge.website { background: #e7f4f5; color: #17676d; }
.order-source-badge.customerservicemanual { background: #eef3ff; color: #294b9c; }
.workflow-badge.production { background: #e7f4ea; color: #246b38; }
.workflow-badge.artwork { background: #f0eefe; color: #5346a2; }
.workflow-badge.invoice { background: #e9f1fc; color: #27588f; }
.open-order { display: inline-flex; border: 1px solid var(--aat-primary); border-radius: 5px; padding: 5px 8px; color: var(--aat-primary-dark); font-size: 10px; font-weight: 700; text-decoration: none; }
.open-order:hover { background: var(--aat-primary); color: #fff; }
.sales-orders-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--aat-border); padding: 12px 16px; color: var(--aat-text-muted); font-size: 10px; }
.sales-orders-pagination div { display: flex; gap: 8px; }
.sales-orders-pagination a { border: 1px solid var(--aat-border-strong); border-radius: 5px; background: #fff; padding: 6px 9px; color: var(--aat-primary-dark); font-weight: 650; text-decoration: none; }
.sales-order-new,
.sales-order-create-actions button {
  border: 1px solid var(--aat-primary);
  border-radius: var(--aat-radius-small);
  background: var(--aat-primary);
  padding: 9px 14px;
  color: #fff;
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
  text-decoration: none;
}
.sales-order-new:hover { background: var(--aat-primary-dark); color: #fff; }
.sales-order-create { overflow: hidden; border-radius: var(--aat-radius); }
.sales-order-create-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 22px; }
.sales-order-create-grid label { display: grid; gap: 6px; color: var(--aat-text-muted); font-size: var(--aat-type-small); font-weight: var(--aat-weight-semibold); }
.sales-order-create-grid input,
.sales-order-create-grid select,
.sales-order-create-grid textarea { width: 100%; border: 1px solid var(--aat-border-strong); border-radius: var(--aat-radius-small); background: var(--aat-surface); padding: 9px 10px; color: var(--aat-text); font-weight: var(--aat-weight-normal); }
.sales-order-create-wide { grid-column: span 3; }
.sales-order-create-grid .sales-order-check { display: flex; align-items: center; grid-template-columns: auto 1fr; gap: 8px; color: var(--aat-text); }
.sales-order-create-grid .sales-order-check input { width: auto; }
.sales-order-create-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; border-top: 1px solid var(--aat-border); background: var(--aat-surface-soft); padding: 15px 22px; }
.sales-order-create-actions a { color: var(--aat-text-muted); text-decoration: none; }
.sales-order-create-full { display: grid; gap: 18px; }
.sales-order-create-header { display: grid; grid-template-columns: repeat(5,minmax(140px,1fr)); border-top: 0; border-radius: 0 0 var(--aat-radius) var(--aat-radius); padding: 18px; gap: 14px 16px; }
.sales-order-create-header label { display: grid; align-content: start; gap: 5px; color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); font-weight: var(--aat-weight-semibold); }
.sales-order-create-header input,.sales-order-create-header select,.sales-order-create-header textarea,.sales-order-line-editor input,.sales-order-line-editor select { min-width: 0; width: 100%; border: 1px solid var(--aat-border-strong); border-radius: 5px; background: #fff; padding: 7px 8px; color: var(--aat-text); font-size: var(--aat-type-small); }
.sales-order-create-header .sales-order-check { display: flex; align-items: center; padding-top: 22px; color: var(--aat-text); }
.sales-order-create-header .sales-order-check input { width: auto; }
.sales-order-create-header .create-summary { grid-column: span 5; }
.sales-order-create-header.sales-order-header-columns { grid-template-columns: 1.25fr .9fr .9fr 1fr .62fr; align-items: start; padding: 16px 18px 18px; }
.sales-order-header-columns .order-field-column { display: grid; align-content: start; gap: 10px; min-width: 0; padding-right: 16px; }
.sales-order-header-columns .order-field-column + .order-field-column { border-left: 1px solid var(--aat-border); padding-left: 16px; }
.sales-order-header-columns .order-field-column:last-child { padding-right: 0; }
.sales-order-header-columns label { gap: 4px; }
.sales-order-header-columns textarea { min-height: 66px; resize: vertical; }
.sales-order-header-columns .flags-column { gap: 15px; padding-top: 21px; }
.sales-order-header-columns .flags-column .sales-order-check { padding-top: 0; white-space: nowrap; }
.sales-order-header-columns .order-copy-row { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr; gap: 16px; margin: 2px -18px -18px; border-top: 1px solid var(--aat-border); background: #fbfcfe; padding: 12px 18px 14px; }
.sales-order-header-columns .order-copy-row label { min-width: 0; }
.sales-order-header-columns .order-copy-row textarea { min-height: 58px; }
.workflow-select { border-color: transparent !important; font-weight: var(--aat-weight-semibold); transition: background-color .15s ease,color .15s ease; }
.workflow-select[data-tone="neutral"] { background-color: #f0f1f4; color: #4f5868; }
.workflow-select[data-tone="blue"] { background-color: #e6f0ff; color: #174ea6; }
.workflow-select[data-tone="green"] { background-color: #e5f5df; color: #26743b; }
.workflow-select[data-tone="amber"] { background-color: #fff1c9; color: #8a5a00; }
.workflow-select[data-tone="red"] { background-color: #fde8e7; color: #a12622; }
.route-badge { display: inline-flex; border-radius: 5px; background: #e5f5df; padding: 4px 9px; color: #26743b; }
.route-badge.ledger { background: #e9e7ff; color: #4f3aa8; }
.sales-order-line-editor .remove-line { border: 0; background: transparent; color: var(--aat-text-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.sales-order-line-editor .remove-line:hover { color: var(--aat-danger, #b42318); }
.sales-order-line-editor .line-editor-footer > div:first-child { display: flex; gap: 8px; }
.sales-order-line-editor .line-editor-footer > div:first-child button { border: 1px solid var(--aat-border-strong); border-radius: 5px; background: #fff; padding: 7px 11px; color: var(--aat-primary-dark); font-size: var(--aat-type-small); font-weight: var(--aat-weight-semibold); cursor: pointer; }
.sales-order-line-editor .line-editor-footer > div:first-child button:hover { border-color: var(--aat-primary); background: #f4f7ff; }
.sales-order-line-editor table { min-width: 1120px; }
.sales-order-line-editor th:nth-child(2) { width: 95px; }
.sales-order-line-editor th:nth-child(3) { width: 210px; }
.sales-order-line-editor th:nth-child(4) { width: 280px; }
.sales-order-line-editor th:nth-child(5) { width: 80px; }
.sales-order-line-editor th:nth-child(6) { width: 85px; }
.sales-order-line-editor th:nth-child(7) { width: 150px; }
.sales-order-line-editor th,.sales-order-line-editor td { padding: 7px; }
.sales-order-line-editor .line-total { min-width: 115px; text-align: right; white-space: nowrap; }
.unit-display { display: inline-flex; min-width: 42px; min-height: 31px; align-items: center; justify-content: center; border: 1px solid #d5dce8; border-radius: 5px; background: #f3f5f8; padding: 5px 8px; color: #4d5869; font-size: var(--aat-type-small); font-weight: 700; }
.line-editor-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 12px 16px; }
.line-editor-footer > button { border: 1px solid var(--aat-border-strong); border-radius: 5px; background: #fff; padding: 7px 11px; color: var(--aat-primary-dark); }
.line-editor-footer .sales-order-totals { padding: 0; }
.line-editor-footer .sales-order-totals label { display: inline-flex; justify-content: flex-end; align-items: center; gap: 4px; }
.line-editor-footer .invoice-discount { width: 70px; text-align: right; }
.sales-order-line-editor .line-editor-footer { min-height: 0; }

/* Full operational case file for a sales order. */
.sales-order-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.sales-order-breadcrumb a { text-decoration: none; }
.sales-order-breadcrumb strong { color: var(--aat-text); font-weight: var(--aat-weight-medium); }
.sales-order-reference { color: var(--aat-primary-dark); font-weight: var(--aat-weight-semibold); text-decoration: none; }
.sales-order-reference:hover { text-decoration: underline; }

.sales-order-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--aat-border);
  padding: 4px 0 14px;
}

.sales-order-identity { min-width: 0; }
.sales-order-eyebrow { display: block; margin-bottom: 8px; color: var(--aat-text-muted); font-size: 13px; font-weight: var(--aat-weight-medium); }
.sales-order-title h1 { display: flex; min-width: 0; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0 0 7px; font-size: clamp(26px, 2.4vw, 34px); font-weight: 400; letter-spacing: -.025em; line-height: 1.15; }
.sales-order-title-separator { color: var(--aat-text-muted); font-weight: 300; }
.sales-order-customer-name { overflow: hidden; min-width: 0; max-width: 620px; text-overflow: ellipsis; }
.sales-order-title p { margin: 0; color: var(--aat-text-muted); font-size: 12px; }
.sales-order-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.sales-order-actions button {
  min-height: 35px;
  border: 1px solid var(--aat-border-strong);
  border-radius: var(--aat-radius-small);
  background: var(--aat-surface);
  padding: 6px 11px;
  color: var(--aat-text-muted);
}
.sales-order-actions button,.sales-order-actions .sales-order-edit { gap: 6px; white-space: nowrap; }
.sales-order-actions form { display: inline-flex; margin: 0; }
.sales-order-action-link,.sales-order-more > summary { display: inline-flex; min-height: 35px; align-items: center; gap: 6px; border: 1px solid var(--aat-border-strong); border-radius: var(--aat-radius-small); background: #fff; padding: 6px 10px; color: var(--aat-text); font-size: var(--aat-type-small); text-decoration: none; white-space: nowrap; }
.sales-order-more { position: relative; }
.sales-order-more > summary { cursor: pointer; list-style: none; }
.sales-order-more > form { position: absolute; z-index: 20; top: calc(100% + 5px); right: 0; display: grid; width: 170px; border: 1px solid var(--aat-border); border-radius: 7px; background: #fff; padding: 5px; box-shadow: var(--aat-shadow-soft); }
.sales-order-more > form button { width: 100%; justify-content: flex-start; border: 0; }
.print-document-menu > div { position: absolute; z-index: 20; top: calc(100% + 5px); right: 0; display: grid; width: 170px; border: 1px solid var(--aat-border); border-radius: 7px; background: #fff; padding: 5px; box-shadow: var(--aat-shadow-soft); }
.print-document-menu > div a { border-radius: 5px; padding: 8px 10px; color: var(--aat-text); font-size: var(--aat-type-small); text-decoration: none; }
.print-document-menu > div a:hover { background: var(--aat-surface-soft); color: var(--aat-primary-dark); }
.sales-order-actions .action-icon { display: inline-grid; width: 15px; place-items: center; color: var(--aat-primary-dark); font-size: 13px; font-weight: 700; }
.sales-order-actions .sales-order-edit .action-icon { color: inherit; }
.sales-order-actions .action-caret { margin-left: 2px; font-size: 12px; }
.sales-order-actions .sales-order-edit { min-height: 35px; display: inline-flex; align-items: center; border: 1px solid var(--aat-primary); border-radius: var(--aat-radius-small); background: var(--aat-primary); padding: 6px 12px; color: #fff; font-size: var(--aat-type-small); font-weight: var(--aat-weight-semibold); text-decoration: none; }
.sales-order-alert { border-radius: var(--aat-radius-small); padding: 11px 14px; font-size: var(--aat-type-small); font-weight: var(--aat-weight-semibold); }
.sales-order-alert.success { border: 1px solid #8ecb9a; background: #edf8ef; color: #176b2d; }
.sales-order-alert.error { border: 1px solid #efb1aa; background: #fff1ef; color: #a12622; }
.sales-order-case-grid { display: grid; grid-template-columns: 1.55fr 1fr; margin-top: 18px; }
.sales-order-case-panel { min-width: 0; padding: 20px; }
.sales-order-case-panel + .sales-order-case-panel { border-left: 1px solid var(--aat-border); }
.sales-order-case-panel h2,.sales-order-history h2 { margin: 0 0 5px; font-size: 16px; }
.case-help,.case-section-heading p { margin: 0 0 16px; color: var(--aat-text-muted); font-size: var(--aat-type-small); }
.case-empty { margin: 18px 0; color: var(--aat-text-muted); font-size: var(--aat-type-small); }
.case-file-list { display: grid; gap: 8px; margin-bottom: 16px; }
.case-file-list article { display: flex; align-items: center; gap: 10px; border: 1px solid var(--aat-border); border-radius: 6px; padding: 10px; }
.case-file-list article div { display: grid; min-width: 0; }
.case-file-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-file-list small,.case-timeline small { color: var(--aat-text-muted); }
.case-file-icon { border-radius: 4px; background: #e9f2fb; padding: 7px; color: var(--aat-primary); font-size: 10px; font-weight: 800; }
.case-upload { display: grid; grid-template-columns: 180px 1fr auto; gap: 8px; }
.case-upload select,.case-upload input,.case-note-form textarea { min-width: 0; border: 1px solid var(--aat-border-strong); border-radius: 5px; background: #fff; padding: 8px; }
.case-upload button,.case-note-form button { border: 0; border-radius: 5px; background: var(--aat-primary); padding: 8px 13px; color: #fff; font-weight: var(--aat-weight-semibold); }
.case-upload button:disabled { opacity: .5; }
.case-storage-warning { margin: 10px 0 0; color: #8a6116; font-size: 12px; }
.case-note-form { display: grid; gap: 10px; }
.case-note-form button { justify-self: end; }
.sales-order-history { margin-top: 18px; padding: 20px; }
.case-section-heading { display: flex; justify-content: space-between; }
.case-section-heading span { color: var(--aat-text-muted); font-size: var(--aat-type-small); }
.case-timeline { display: grid; gap: 0; }
.case-timeline article { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 0 0 18px; }
.case-timeline article:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 0; width: 1px; background: var(--aat-border-strong); }
.timeline-dot { z-index: 1; width: 11px; height: 11px; margin-top: 4px; border: 2px solid #fff; border-radius: 50%; background: var(--aat-primary); box-shadow: 0 0 0 1px var(--aat-primary); }
.case-timeline p { margin: 3px 0; color: var(--aat-text-muted); }
.sales-order-actions button:disabled { cursor: default; opacity: .78; }
.sales-order-actions button.primary-action { border-color: var(--aat-primary); background: var(--aat-primary); color: #fff; font-weight: var(--aat-weight-semibold); }
.sales-order-actions button.primary-action:hover { background: var(--aat-primary-dark); }
.sales-order-open,
.sales-status {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  border-radius: 5px;
  background: #e6f5ea;
  padding: 4px 10px;
  color: #24743d;
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
}

.sales-order-tabs {
  display: flex;
  overflow-x: auto;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--aat-border);
  padding: 0 8px;
  background: var(--aat-surface);
}
.sales-order-tabs span,
.sales-order-tabs a {
  flex: 0 0 auto;
  border-bottom: 2px solid transparent;
  padding: 11px 15px 10px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-medium);
  text-decoration: none;
}
.sales-order-tabs a:hover { background: var(--aat-surface-soft); color: var(--aat-primary-dark); }
.sales-order-tabs .active { border-color: var(--aat-primary); color: var(--aat-primary-dark); }
.saved-order-readiness { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 12px; border: 1px solid; border-top: 0; border-radius: 0 0 7px 7px; padding: 9px 13px; }
.saved-order-readiness > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.saved-order-readiness > div > span { display: inline-grid; flex: 0 0 22px; width: 22px; height: 22px; place-items: center; border-radius: 50%; font-weight: 800; }
.saved-order-readiness strong { white-space: nowrap; }
.saved-order-readiness p { overflow: hidden; margin: 0; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.saved-order-readiness a { border: 1px solid currentColor; border-radius: 5px; padding: 5px 8px; color: inherit; font-size: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.saved-order-readiness.warning { border-color: #e4c66c; background: #fffaf0; color: #78570b; }
.saved-order-readiness.warning > div > span { background: #f7dc82; }
.saved-order-readiness.ready { border-color: #9ed0a8; background: #f1faf3; color: #28673a; }
.saved-order-readiness.ready > div > span { background: #d6efd9; }
.order-command-strip { display: grid; grid-template-columns: repeat(4,minmax(130px,1fr)) minmax(150px,.8fr); gap: 1px; margin: 12px 0; overflow: hidden; border: 1px solid var(--aat-border); border-radius: 8px; background: var(--aat-border); box-shadow: var(--aat-shadow-soft); }
.order-command-strip > a { display: grid; gap: 2px; min-width: 0; background: #fff; padding: 11px 14px; color: inherit; text-decoration: none; }
.order-command-strip > a:hover { background: #f5f8fe; }
.order-command-strip span { color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); font-weight: 650; text-transform: uppercase; }
.order-command-strip strong { overflow: hidden; color: var(--aat-primary-dark); font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.order-command-strip small { overflow: hidden; color: var(--aat-text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.order-command-strip form { display: grid; background: #fff; padding: 8px; }
.order-command-strip button { border: 1px solid #77bd86; border-radius: 6px; background: #e8f6eb; padding: 7px 10px; color: #226638; font-weight: 750; }
.order-command-strip button span { display: block; margin-top: 2px; color: #4b7857; font-size: 9px; text-transform: none; }
.order-command-strip button:disabled { border-color: #d6bd7a; background: #fff8e8; color: #765710; opacity: 1; }
.order-command-strip button:disabled span { color: #8b6d26; }
.line-stock-badge { display: inline-flex; border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.line-stock-badge.available { background: #e6f5ea; color: #24743d; }
.line-stock-badge.short { background: #fdebe6; color: #9b3e29; }
.line-stock-badge.unchecked { background: #eef1f5; color: #5f6878; }
.sales-order-anchor { scroll-margin-top: calc(var(--app-header-height) + 18px); }
.customer-terms {
  display: grid;
  gap: 3px;
  border: 1px solid #cbd8f4;
  border-radius: 5px;
  background: #f2f6ff;
  padding: 8px 10px;
}
.customer-terms > span { color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); font-weight: var(--aat-weight-medium); }
.customer-terms > strong { color: var(--aat-primary-dark); font-size: var(--aat-type-small); }
.customer-terms > small { color: var(--aat-text-muted); font-size: 10px; }
.commercial-summary { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; padding: 0; overflow: hidden; }
.commercial-summary > span { display: grid; min-width: 0; gap: 3px; padding: 8px 9px; }
.commercial-summary > span + span { border-left: 1px solid #d8e2f5; }
.commercial-summary small { color: var(--aat-text-muted); font-size: 8px; font-style: normal; font-weight: 700; text-transform: uppercase; }
.commercial-summary strong { overflow: hidden; color: var(--aat-primary-dark); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.commercial-summary em { overflow: hidden; color: var(--aat-text-muted); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.sell-to-contact-details { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.8fr); gap: 8px; }
.sell-to-contact-details[hidden] { display: none; }
.sell-to-contact-details > span { display: grid; min-width: 0; gap: 2px; border: 1px solid #dbe4f2; border-radius: 5px; background: #fbfcff; padding: 7px 9px; }
.sell-to-contact-details small { color: var(--aat-text-muted); font-size: 9px; font-weight: 650; text-transform: uppercase; }
.sell-to-contact-details a { overflow: hidden; color: var(--aat-primary-dark); font-size: 10px; font-weight: 650; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.sell-to-contact-details a:hover { text-decoration: underline; }
.sell-to-contact-details a.missing { color: var(--aat-text-muted); font-weight: 500; pointer-events: none; }
.sales-order-tab-panel { min-height: 430px; border: 1px solid var(--aat-border); border-top: 0; border-radius: 0 0 var(--aat-radius) var(--aat-radius); background: var(--aat-surface); padding: 24px; box-shadow: var(--aat-shadow-soft); }
.sales-order-tab-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--aat-border); padding-bottom: 18px; }
.sales-order-tab-panel h2 { margin: 4px 0; font-size: 25px; }
.sales-order-tab-panel p { margin: 4px 0; color: var(--aat-text-muted); }
.tab-panel-eyebrow { color: var(--aat-primary); font-size: var(--aat-type-eyebrow); font-weight: var(--aat-weight-semibold); text-transform: uppercase; }
.return-order { border: 1px solid var(--aat-primary); border-radius: var(--aat-radius-small); background: #fff; padding: 8px 13px; color: var(--aat-primary-dark); font-weight: var(--aat-weight-semibold); }
.customer-tab-facts, .shipping-address-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.customer-tab-facts > span, .shipping-address-grid article { display: grid; gap: 5px; border: 1px solid var(--aat-border); border-radius: var(--aat-radius-small); background: var(--aat-surface-soft); padding: 15px; }
.customer-tab-facts small, .shipping-address-grid small { color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); }
.shipping-address-grid article > div { display: flex; justify-content: space-between; gap: 10px; }
.shipping-address-grid article.selected { border-color: var(--aat-primary); background: #f2f6ff; box-shadow: 0 0 0 2px rgb(47 91 190 / 12%); }
.select-address { justify-self: start; border: 1px solid var(--aat-primary); border-radius: 5px; background: #fff; padding: 6px 9px; color: var(--aat-primary-dark); font-size: var(--aat-type-small); font-weight: var(--aat-weight-semibold); }
.delivery-fields { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; margin-top: 20px; }
.delivery-fields label { display: grid; gap: 6px; color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); font-weight: var(--aat-weight-semibold); }
.delivery-fields input,.delivery-fields textarea { border: 1px solid var(--aat-border-strong); border-radius: 6px; padding: 9px; color: var(--aat-text); font: inherit; }
.delivery-fields textarea { min-height: 70px; resize: vertical; }
.default-address { border-radius: 999px; background: #e6f5ea; padding: 2px 7px; color: #24743d; font-size: 10px; }
.invoice-tab-summary { display: grid; grid-template-columns: repeat(3,minmax(180px,1fr)); gap: 14px; margin-top: 20px; }
.invoice-tab-summary > span { display: grid; gap: 7px; border: 1px solid var(--aat-border); border-radius: var(--aat-radius-small); padding: 18px; }
.invoice-tab-summary small { color: var(--aat-text-muted); }
.invoice-tab-summary strong { color: var(--aat-primary-dark); font-size: 22px; }
body.sms-composer-open { overflow: hidden; }
.sms-composer-backdrop { position: fixed; z-index: 1090; inset: 0; background: rgb(24 21 35 / 42%); backdrop-filter: blur(2px); }
.sms-composer-modal { position: fixed; z-index: 1100; top: 50%; left: 50%; width: min(560px,calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; transform: translate(-50%,-50%); border: 1px solid #d7d5dd; border-radius: 14px; background: #fff; box-shadow: 0 28px 80px rgb(20 17 32 / 28%); }
.sms-composer-modal > header,.sms-composer-modal > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; }
.sms-composer-modal > header { border-bottom: 1px solid #e5e3e9; }
.sms-composer-modal > header h3 { margin: 2px 0; font-size: 22px; }
.sms-composer-modal > header p { margin: 0; color: var(--aat-text-muted); font-size: 12px; }
.sms-composer-modal > footer { border-top: 1px solid #e5e3e9; background: #fbfafc; }
.sms-composer-modal > footer > div { display: flex; gap: 8px; }
.sms-composer-modal button { min-height: 36px; border: 1px solid #cfd7e3; border-radius: 7px; background: #fff; padding: 7px 12px; color: #344156; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.2; cursor: pointer; box-shadow: 0 1px 2px rgb(30 48 78 / 5%); transition: border-color .15s ease,background-color .15s ease,color .15s ease,box-shadow .15s ease; }
.sms-composer-modal button:hover:not(:disabled) { border-color: #9eafd0; background: #f4f7fc; color: var(--aat-primary-dark); }
.sms-composer-modal button:focus-visible { outline: 3px solid rgb(49 91 197 / 20%); outline-offset: 2px; }
.sms-composer-modal > header .saved-sms-close { min-width: 68px; background: #f8fafc; }
.sms-composer-modal .primary-action { border-color: var(--aat-primary); background: var(--aat-primary); color: #fff; box-shadow: 0 3px 8px rgb(35 75 156 / 16%); }
.sms-composer-modal .primary-action:hover:not(:disabled) { border-color: var(--aat-primary-dark); background: var(--aat-primary-dark); color: #fff; }
.sms-composer-modal button:disabled { border-color: #dfe4ec; background: #eef1f5; color: #9aa4b3; cursor: not-allowed; box-shadow: none; opacity: 1; }
.sms-composer-body { display: grid; gap: 16px; padding: 18px; }
.sms-recipient-field,.sms-message-field { display: grid; gap: 6px; }
.sms-recipient-field label,.sms-message-field label { font-size: 11px; font-weight: 750; text-transform: uppercase; }
.sms-recipient-field input,.sms-message-field textarea { width: 100%; border: 1px solid var(--aat-border-strong); border-radius: 6px; padding: 9px 10px; }
.sms-recipient-field small,.sms-message-field span { color: var(--aat-text-muted); font-size: 11px; }
.sms-message-field > div { display: flex; justify-content: space-between; gap: 12px; }
.sms-message-field textarea { min-height: 150px; resize: vertical; }
.sms-delivery-notice { border: 1px solid #f1d49e; border-radius: 9px; background: #fff8e9; padding: 12px 14px; }
.sms-delivery-notice strong { color: #7b4f00; font-size: 12px; }
.sms-delivery-notice p { margin: 4px 0 0; color: #735f3b; font-size: 11px; }
.sms-provider-status { display: inline-flex; align-items: center; gap: 7px; color: var(--aat-text-muted); font-size: 11px; }
.sms-provider-status > span { width: 8px; height: 8px; border-radius: 50%; background: #d99b2b; }

.sales-order-card {
  border: 1px solid var(--aat-border);
  background: var(--aat-surface);
  box-shadow: var(--aat-shadow-soft);
}
.sales-order-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  margin-bottom: 18px;
  border-top: 0;
  border-radius: 0 0 var(--aat-radius) var(--aat-radius);
}
.sales-field {
  display: grid;
  min-height: 86px;
  align-content: start;
  gap: 5px;
  border-right: 1px solid var(--aat-border);
  border-bottom: 1px solid var(--aat-border);
  padding: 13px 15px;
}
.sales-field:nth-last-child(-n+5) { border-bottom: 0; }
.sales-field:nth-child(5n) { border-right: 0; }
.sales-field > span,
.sales-order-work p > span { color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); font-weight: var(--aat-weight-medium); }
.sales-field > strong { font-size: var(--aat-type-small); font-weight: var(--aat-weight-semibold); }
.sales-field > small { color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); }
.sales-field-notes { grid-column: span 5; min-height: 96px; border-right: 0; }
.sales-field-notes > strong { max-width: 760px; color: var(--aat-text); font-weight: var(--aat-weight-normal); white-space: pre-line; }
.saved-order-header { overflow: hidden; margin-bottom: 18px; border-radius: 7px; }
.saved-order-header-columns { display: grid; grid-template-columns: 1.3fr .9fr .95fr 1fr .72fr; min-height: 190px; padding: 14px 16px 12px; }
.saved-order-field-column { display: grid; min-width: 0; align-content: start; gap: 10px; padding: 0 16px; border-left: 1px solid var(--aat-border); }
.saved-order-field-column:first-child { padding-left: 0; border-left: 0; }
.saved-order-field-column:last-child { padding-right: 0; }
.saved-order-field-column .sales-field { min-height: 0; gap: 3px; border: 0; padding: 0; }
.saved-order-field-column .sales-field > span { font-size: 9px; font-weight: 650; }
.saved-order-field-column .sales-field > strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.saved-order-field-column .sales-field > small { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.saved-order-field-column .field-link { color: var(--aat-primary-dark); }
.customer-match-field a { justify-self: start; border: 1px solid #b7c7e8; border-radius: 5px; background: #f7f9ff; padding: 4px 8px; color: var(--aat-primary-dark); font-size: 10px; font-weight: 700; text-decoration: none; }
.customer-match-field a:hover { border-color: var(--aat-primary); background: #eef3ff; }
.saved-customer-match { display: grid; gap: 7px; border: 1px solid #c4d3f3; border-radius: 6px; background: #f4f7ff; padding: 9px; }
.saved-customer-match label { display: grid; gap: 3px; color: var(--aat-text-muted); font-size: 9px; font-weight: 650; }
.saved-customer-match input,
.saved-customer-match select { width: 100%; min-width: 0; height: 30px; border: 1px solid #c9cfdd; border-radius: 4px; background: #fff; padding: 4px 7px; color: var(--aat-text); font-size: 10px; }
.saved-customer-match button { justify-self: start; border: 1px solid var(--aat-primary); border-radius: 4px; background: var(--aat-primary); padding: 6px 10px; color: #fff; font-size: 10px; font-weight: 700; }
.saved-match-contact-detail { min-height: 12px; color: var(--aat-text-muted); font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }
.saved-web-order { overflow: hidden; margin-bottom: 18px; }
.saved-web-order[hidden] { display: none; }
body.sales-web-order-active .sales-order-tabs ~ :not(#web-order):not(script):not(.sms-composer-backdrop):not(.sms-composer-modal) { display: none !important; }
.sales-order-actions .sales-order-release { border-color: #8ec69a; background: #e5f5e8; color: #246b36; font-weight: 750; }
.sales-order-actions .sales-order-release:hover { border-color: #63aa73; background: #d7efdc; }
.sales-order-actions .sales-order-release:disabled { border-color: #d6dce7; background: #f1f3f6; color: #8991a0; cursor: not-allowed; }
.saved-order-readiness .procurement-advisory { margin-left: auto; color: #765515; font-size: 10px; font-weight: 650; }
.purchasing-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.purchasing-heading h1 { margin: 2px 0 4px; }
.purchasing-heading > div > p:last-child { margin: 0; color: var(--aat-text-muted); }
.purchasing-create,.purchasing-actions button { border: 1px solid #bdc9df; border-radius: 5px; background: #fff; padding: 8px 12px; color: var(--aat-primary-dark); font-weight: 700; }
.purchasing-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: hidden; margin: 14px 0; border: 1px solid var(--aat-border); border-radius: 7px; background: #fff; }
.purchasing-summary article { display: grid; gap: 4px; padding: 16px 18px; border-right: 1px solid var(--aat-border); }
.purchasing-summary article:last-child { border-right: 0; }
.purchasing-summary span,.purchasing-summary small { color: var(--aat-text-muted); font-size: 10px; }
.purchasing-summary strong { color: var(--aat-primary-dark); font-size: 22px; }
.purchasing-directory { overflow: hidden; border: 1px solid var(--aat-border); border-radius: 7px; background: #fff; box-shadow: 0 3px 12px rgba(20,42,85,.06); }
.purchasing-directory > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--aat-border); padding: 15px 18px; }
.purchasing-directory h2 { margin: 2px 0 0; font-size: 18px; }
.purchasing-actions { display: flex; gap: 8px; }
.purchasing-empty { padding: 54px 24px; text-align: center; }
.purchasing-empty h3 { margin: 0 0 7px; }
.purchasing-empty p { max-width: 650px; margin: 0 auto; color: var(--aat-text-muted); }
.purchasing-heading-actions,.purchasing-search { display:flex; align-items:center; gap:8px; }
.purchasing-secondary { display:inline-flex; min-height:36px; align-items:center; border:1px solid #bdc9df; border-radius:5px; background:#fff; padding:8px 12px; color:var(--aat-primary-dark); font-weight:700; text-decoration:none; }
.purchasing-schema-notice { display:flex; gap:10px; border-left:4px solid #e2ad2f; background:#fff9e9; padding:12px 16px; color:#71510b; }
.purchasing-schema-notice span { color:#826b38; }
.purchasing-table-wrap { overflow-x:auto; }
.purchasing-table { width:100%; border-collapse:collapse; }
.purchasing-table th { background:var(--aat-primary-dark); padding:10px 12px; color:#fff; font-size:11px; text-align:left; text-transform:uppercase; }
.purchasing-table td { border-bottom:1px solid var(--aat-border); padding:11px 12px; vertical-align:top; }
.purchasing-table td small { display:block; margin-top:3px; color:var(--aat-text-muted); }
.purchasing-status { display:inline-flex; border-radius:999px; background:#edf3ff; padding:4px 8px; color:var(--aat-primary-dark); font-size:11px; font-weight:700; }
.purchasing-search input { min-width:280px; border:1px solid var(--aat-border); border-radius:6px; padding:9px 11px; }
.purchasing-search button { border:0; border-radius:6px; background:var(--aat-primary); padding:9px 13px; color:#fff; font-weight:700; }
.purchasing-demand-review>header p:last-child{max-width:720px;margin:5px 0 0;color:var(--aat-text-muted);font-size:11px}.purchasing-review-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid var(--aat-border);background:#f8faff}.purchasing-review-summary article{display:grid;gap:3px;padding:16px 18px;border-right:1px solid var(--aat-border)}.purchasing-review-summary article:last-child{border:0}.purchasing-review-summary span,.purchasing-review-summary small{color:var(--aat-text-muted);font-size:10px}.purchasing-review-summary strong{color:var(--aat-primary-dark);font-size:22px}.purchasing-review-guidance{display:flex;align-items:center;gap:8px;border-bottom:1px solid #efdcae;background:#fff8e8;padding:11px 18px;color:#765710;font-size:11px}.purchasing-review-guidance span{color:#806d3e}.purchasing-issue-table td:nth-child(3){max-width:650px;color:#4c596b}.purchasing-row-action{display:inline-flex;white-space:nowrap;border:1px solid #b9c7e2;border-radius:5px;background:#fff;padding:6px 9px;color:var(--aat-primary-dark);font-size:10px;font-weight:750;text-decoration:none}.purchasing-row-action:hover{border-color:var(--aat-primary);background:#f2f6ff}.purchasing-review-error{margin:16px}.purchasing-review-clear{display:flex;align-items:center;gap:13px;padding:28px}.purchasing-review-clear>span{display:grid;width:34px;height:34px;place-items:center;border-radius:50%;background:#e7f6eb;color:#24703b;font-weight:800}.purchasing-review-clear strong{color:#2c6040}.purchasing-review-clear p{margin:4px 0 0;color:var(--aat-text-muted);font-size:11px}@media(max-width:760px){.purchasing-review-summary{grid-template-columns:1fr}.purchasing-review-summary article{border-right:0;border-bottom:1px solid var(--aat-border)}.purchasing-review-guidance{align-items:flex-start;flex-direction:column}}
.supplier-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; padding:18px; }
.supplier-card { display:block; border:1px solid var(--aat-border); border-radius:8px; background:var(--aat-surface-soft); padding:16px; color:inherit; text-decoration:none; transition:border-color .15s,box-shadow .15s,transform .15s; }
.supplier-card:hover { border-color:#9cb4e7; box-shadow:0 7px 18px rgba(28,63,137,.12); transform:translateY(-1px); }
.supplier-card > div:first-child { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.supplier-card h3 { margin:12px 0 5px; }
.supplier-card p { min-height:20px; margin:0; color:var(--aat-text-muted); }
.supplier-card dl { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:16px 0 0; }
.supplier-card dt { color:var(--aat-text-muted); font-size:10px; text-transform:uppercase; }.supplier-card dd { margin:3px 0 0; font-weight:700; }
.supplier-number { color:var(--aat-text-muted); font-size:11px; font-weight:700; }
.supplier-open { display:block; margin-top:14px; color:var(--aat-primary); font-size:12px; font-weight:800; }
.supplier-detail-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:14px; }
.supplier-detail-heading h1 { margin:0; font-size:28px; }.supplier-detail-heading p { margin:5px 0 0; color:var(--aat-text-muted); }
.supplier-breadcrumb { display:flex; gap:8px; margin-bottom:10px; color:var(--aat-text-muted); font-size:11px; }.supplier-breadcrumb a { color:var(--aat-primary); text-decoration:none; }
.supplier-title-line,.supplier-heading-actions { display:flex; align-items:center; gap:10px; }
.supplier-state { border-radius:999px; padding:5px 10px; font-size:11px; font-weight:800; }.supplier-state.is-active { background:#e2f4e5; color:#28743b; }.supplier-state.is-blocked { background:#fde8e7; color:#a43c35; }
.supplier-tabs { display:flex; gap:28px; border:1px solid var(--aat-border); border-bottom:2px solid #d9e1f0; border-radius:7px 7px 0 0; background:#fff; padding:0 18px; }
.supplier-tabs a { border-bottom:3px solid transparent; padding:13px 2px 10px; color:var(--aat-text-muted); font-size:12px; font-weight:700; text-decoration:none; }.supplier-tabs a:first-child,.supplier-tabs a:hover { border-color:var(--aat-primary); color:var(--aat-primary-dark); }
.supplier-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); overflow:hidden; border:1px solid var(--aat-border); border-top:0; border-radius:0 0 7px 7px; background:#fff; margin-bottom:14px; }
.supplier-kpis article { display:grid; gap:4px; padding:15px 18px; border-right:1px solid var(--aat-border); }.supplier-kpis article:last-child { border-right:0; }.supplier-kpis span,.supplier-kpis small { color:var(--aat-text-muted); font-size:10px; }.supplier-kpis strong { color:var(--aat-primary-dark); font-size:22px; }
.supplier-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; scroll-margin-top:80px; }
.supplier-panel { overflow:hidden; border:1px solid var(--aat-border); border-radius:7px; background:#fff; box-shadow:0 3px 12px rgba(20,42,85,.05); scroll-margin-top:80px; }
.supplier-panel > header { display:flex; align-items:center; justify-content:space-between; gap:18px; border-bottom:1px solid var(--aat-border); padding:13px 16px; }.supplier-panel > header span { color:var(--aat-primary); font-size:10px; font-weight:800; text-transform:uppercase; }.supplier-panel > header h2 { margin:2px 0 0; font-size:17px; }
.supplier-facts { display:grid; grid-template-columns:1fr 1fr; margin:0; }.supplier-facts div { min-height:72px; border-right:1px solid var(--aat-border); border-bottom:1px solid var(--aat-border); padding:13px 16px; }.supplier-facts div:nth-child(2n) { border-right:0; }.supplier-facts dt,.supplier-primary-contact span,.supplier-note span { color:var(--aat-text-muted); font-size:10px; text-transform:uppercase; }.supplier-facts dd { margin:5px 0 0; font-weight:700; }
.supplier-primary-contact { display:grid; gap:0; }.supplier-primary-contact > div { display:grid; gap:5px; border-bottom:1px solid var(--aat-border); padding:13px 16px; }.supplier-primary-contact strong { overflow-wrap:anywhere; }.supplier-note { margin:14px; border-left:4px solid #e2ad2f; background:#fff9e9; padding:12px; }.supplier-note p { margin:5px 0 0; }
.supplier-count { border-radius:999px; background:#edf3ff; padding:5px 9px; }.supplier-list > div { display:grid; grid-template-columns:minmax(150px,1fr) minmax(130px,.7fr) minmax(200px,1.4fr); gap:14px; border-bottom:1px solid var(--aat-border); padding:13px 16px; }.supplier-list > div:last-child { border-bottom:0; }.supplier-list span,.supplier-list small { color:var(--aat-text-muted); }
.supplier-panel-empty { padding:28px 16px; color:var(--aat-text-muted); text-align:center; }.supplier-items-panel { margin-bottom:14px; }.supplier-items-panel footer { border-top:1px solid var(--aat-border); padding:11px 16px; color:var(--aat-text-muted); font-size:11px; }.supplier-items-table td:first-child { color:var(--aat-primary-dark); }.supplier-preferred { display:inline-flex; border-radius:4px; background:#e3f3e4; padding:4px 7px; color:#28743b; font-size:10px; font-weight:800; }
@media(max-width:1100px){.supplier-detail-grid{grid-template-columns:1fr}.supplier-kpis{grid-template-columns:repeat(2,1fr)}.supplier-kpis article:nth-child(2){border-right:0}.supplier-heading-actions{flex-wrap:wrap;justify-content:flex-end}}
@media(max-width:720px){.supplier-detail-heading{align-items:flex-start;flex-direction:column}.supplier-kpis{grid-template-columns:1fr}.supplier-kpis article{border-right:0;border-bottom:1px solid var(--aat-border)}.supplier-tabs{gap:16px;overflow-x:auto}.supplier-facts{grid-template-columns:1fr}.supplier-facts div{border-right:0}.supplier-list>div{grid-template-columns:1fr;gap:4px}}
.item-heading,.item-detail-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:16px; }.item-heading h1,.item-detail-heading h1 { margin:2px 0 4px; }.item-heading p,.item-detail-heading p { margin:0; color:var(--aat-text-muted); }
.item-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:hidden; margin-bottom:14px; border:1px solid var(--aat-border); border-radius:7px; background:#fff; }.item-kpis article { display:grid; gap:4px; padding:15px 18px; border-right:1px solid var(--aat-border); border-bottom:1px solid var(--aat-border); }.item-kpis article:nth-child(3n) { border-right:0; }.item-kpis article:nth-last-child(-n+3) { border-bottom:0; }.item-kpis span,.item-kpis small { color:var(--aat-text-muted); font-size:10px; }.item-kpis strong { color:var(--aat-primary-dark); font-size:22px; }.item-kpis .item-kpi-name { overflow:hidden; font-size:15px; text-overflow:ellipsis; white-space:nowrap; }
.item-directory { overflow:hidden; border:1px solid var(--aat-border); border-radius:7px; background:#fff; box-shadow:0 3px 12px rgba(20,42,85,.06); }.item-directory>header { display:flex; align-items:center; justify-content:space-between; gap:18px; border-bottom:1px solid var(--aat-border); padding:15px 18px; }.item-directory h2 { margin:2px 0 0; font-size:18px; }
.item-filters { display:flex; gap:8px; }.item-filters input,.item-filters select { min-width:220px; border:1px solid var(--aat-border); border-radius:6px; background:#fff; padding:9px 11px; }.item-filters select { min-width:160px; }.item-filters button { border:0; border-radius:6px; background:var(--aat-primary); padding:9px 14px; color:#fff; font-weight:700; }
.item-master-table a { color:var(--aat-primary-dark); text-decoration:none; }.item-master-table tr:hover td { background:#f7f9fd; }.item-status { display:inline-flex; border-radius:999px; padding:4px 8px; font-size:10px; font-weight:800; }.item-status.is-active { background:#e3f3e4; color:#28743b; }.item-status.is-inactive { background:#eef0f4; color:#596071; }.item-source-missing { color:#a76b00; font-size:11px; font-weight:800; }.item-open { font-weight:800; white-space:nowrap; }
.item-pager { display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--aat-border); padding:12px 16px; color:var(--aat-text-muted); font-size:11px; }.item-pager div { display:flex; gap:8px; }.item-pager a { border:1px solid var(--aat-border); border-radius:5px; padding:6px 9px; color:var(--aat-primary-dark); font-weight:700; text-decoration:none; }
.item-detail-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); border-radius:0 0 7px 7px; border-top:0; }.item-detail-kpis article { border-bottom:0; }.item-detail-kpis article:nth-child(3) { border-right:1px solid var(--aat-border); }.item-detail-kpis article:nth-child(4) { border-right:0; }.item-section { margin-bottom:14px; scroll-margin-top:80px; }.item-source-warning { margin:16px; border-left:4px solid #e2ad2f; background:#fff9e9; padding:16px; }.item-source-warning strong { color:#815c0c; }.item-source-warning p { margin:5px 0 0; color:#71510b; }.item-guid { overflow-wrap:anywhere; font-size:11px; }
@media(max-width:1000px){.item-kpis{grid-template-columns:repeat(2,1fr)}.item-kpis article:nth-child(2){border-right:0}.item-directory>header{align-items:stretch;flex-direction:column}.item-filters{flex-wrap:wrap}}
@media(max-width:650px){.item-heading,.item-detail-heading{align-items:flex-start;flex-direction:column}.item-kpis{grid-template-columns:1fr}.item-kpis article{border-right:0;border-bottom:1px solid var(--aat-border)}.item-filters{flex-direction:column}.item-filters input,.item-filters select{min-width:0;width:100%}}
@media(max-width:900px){.supplier-grid{grid-template-columns:1fr}.purchasing-heading-actions,.purchasing-search{align-items:stretch;flex-direction:column}.purchasing-search input{min-width:0}}
.saved-web-order > header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--aat-border); background: linear-gradient(90deg, #f8fbff, #fff); padding: 14px 16px; }
.saved-web-order > header h2 { margin: 2px 0; font-size: 18px; }
.saved-web-order > header p { margin: 0; color: var(--aat-text-muted); font-size: 10px; }
.saved-web-state { border-radius: 999px; background: #e7f5ea; padding: 6px 10px; color: #23733b; font-size: 10px; font-weight: 700; }
.saved-web-order-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, .8fr); }
.saved-web-order-main { min-width: 0; border-right: 1px solid var(--aat-border); padding: 14px 16px; }
.saved-web-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--aat-border); border-radius: 6px; }
.saved-web-overview > div { display: grid; min-width: 0; gap: 3px; border-left: 1px solid var(--aat-border); padding: 10px 12px; }
.saved-web-overview > div:first-child { border-left: 0; }
.saved-web-overview span,
.saved-web-order-side article > span { color: var(--aat-text-muted); font-size: 9px; font-weight: 650; text-transform: uppercase; }
.saved-web-overview strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.saved-web-overview small { overflow: hidden; color: var(--aat-text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.saved-web-items { margin-top: 14px; }
.saved-web-items h3,
.saved-web-order-side h3 { margin: 0 0 9px; font-size: 12px; }
.saved-web-item { display: grid; grid-template-columns: minmax(0, 1fr) 130px 100px; align-items: start; gap: 12px; border-top: 1px solid var(--aat-border); padding: 10px 0; font-size: 10px; }
.saved-web-item > div { display: grid; gap: 2px; }
.saved-web-item > div > span { color: var(--aat-primary-dark); font-size: 9px; font-weight: 700; }
.saved-web-item > div > strong { font-size: 11px; }
.saved-web-item > div > small { color: #8a5a00; font-size: 9px; }
.saved-web-item > span,
.saved-web-item > strong { justify-self: end; white-space: nowrap; }
.saved-web-order-side { display: grid; align-content: start; gap: 12px; background: #fbfcfe; padding: 14px; }
.saved-web-order-side article { display: grid; gap: 5px; border: 1px solid var(--aat-border); border-radius: 6px; background: #fff; padding: 12px; }
.saved-web-order-side article > strong { margin-bottom: 5px; font-size: 10px; line-height: 1.45; }
.saved-web-payment p { display: flex; justify-content: space-between; gap: 15px; margin: 0; font-size: 10px; }
.saved-web-payment .due { margin-top: 5px; border-top: 1px solid var(--aat-border); padding-top: 7px; color: var(--aat-primary-dark); }
@media (max-width: 1100px) { .saved-web-order-grid { grid-template-columns: 1fr; } .saved-web-order-main { border-right: 0; border-bottom: 1px solid var(--aat-border); } .saved-web-overview { grid-template-columns: repeat(2, 1fr); } .saved-web-overview > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--aat-border); } .saved-web-overview > div:nth-child(4) { border-top: 1px solid var(--aat-border); } }
@media (min-width: 901px) and (max-width: 1349px) { .sales-order-title { align-items: stretch; flex-direction: column; } .sales-order-title-copy { display: grid; grid-template-columns: minmax(190px,.55fr) minmax(520px,1.45fr); width: 100%; } .sales-order-actions { justify-content: flex-start; } }
.saved-order-field-column .saved-terms { gap: 2px; border: 1px solid #cbd8f4; background: #f2f6ff; padding: 7px 9px; }
.saved-status { display: flex; min-height: 30px; align-items: center; border-radius: 5px; padding: 5px 9px; }
.saved-status.invoice { background: #e8f1ff; color: #2453a6; }
.saved-status.production { background: #e8f6eb; color: #24743d; }
.saved-order-flags { gap: 12px; padding-top: 5px; }
.saved-order-flags > span { display: flex; align-items: center; gap: 7px; color: var(--aat-text); font-size: 10px; font-weight: 600; }
.saved-order-flags .sales-field:first-of-type { margin-top: 7px; }
.flag-box { position: relative; display: inline-grid; width: 15px; height: 15px; border: 1px solid #9da4b3; border-radius: 3px; background: #fff; place-items: center; }
.flag-box.checked { border-color: #168a9b; background: #168a9b; }
.flag-box.checked::after { color: #fff; content: "✓"; font-size: 10px; font-style: normal; font-weight: 800; }
.saved-order-summary { display: grid; gap: 4px; border-top: 1px solid var(--aat-border); background: #fbfcfe; padding: 10px 16px 12px; }
.saved-order-summary > span { color: var(--aat-text-muted); font-size: 9px; font-weight: 650; }
.saved-order-summary > strong { min-height: 20px; font-size: 11px; font-weight: 500; white-space: pre-line; }
.saved-order-addresses { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: -8px 0 18px; }
.saved-order-addresses article { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px 12px; border: 1px solid var(--aat-border); border-radius: 7px; background: #fff; padding: 10px 13px; box-shadow: var(--aat-shadow-soft); }
.saved-order-addresses article > div { display: flex; align-items: center; gap: 8px; }
.saved-order-addresses article > div span { color: var(--aat-text-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.saved-order-addresses article > div strong { border-radius: 999px; background: #e8f5eb; padding: 2px 7px; color: #28723e; font-size: 9px; }
.saved-order-addresses article > p { grid-column: 1; overflow: hidden; margin: 0; color: var(--aat-text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.saved-order-addresses article > a { grid-column: 2; grid-row: 1 / span 2; color: var(--aat-primary-dark); font-size: 10px; font-weight: 700; text-decoration: none; }

.sales-order-lines { overflow: hidden; margin-bottom: 18px; border-radius: var(--aat-radius); }
.sales-order-lines > table { width: 100%; border-collapse: collapse; font-size: var(--aat-type-small); }
.sales-order-lines th { background: var(--aat-primary-dark); color: #fff; font-size: 10px; font-weight: var(--aat-weight-semibold); letter-spacing: .035em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.sales-order-lines th, .sales-order-lines td { border-right: 1px solid rgb(226 225 232 / 70%); border-bottom: 1px solid var(--aat-border); padding: 10px 11px; vertical-align: top; }
.sales-order-lines th:last-child, .sales-order-lines td:last-child { border-right: 0; }
.sales-order-lines td:nth-child(4), .sales-order-lines td:nth-child(6), .sales-order-lines td:nth-child(7), .sales-order-lines td:nth-child(8), .sales-order-lines td:nth-child(9) { text-align: right; white-space: nowrap; }
.sales-order-lines td:nth-child(3) { min-width: 230px; }
.sales-order-lines td strong { color: var(--aat-text); font-weight: var(--aat-weight-medium); }
.sales-order-lines .qty-assigned { color: var(--aat-primary-dark); font-weight: var(--aat-weight-semibold); text-align: center; }
.sales-order-line-editor > table { min-width: 1320px; }
.sales-order-totals { display: grid; justify-content: end; gap: 7px; padding: 15px 18px 17px; }
.sales-order-totals span { display: grid; grid-template-columns: 185px minmax(105px, auto); gap: 24px; color: var(--aat-text-muted); font-size: var(--aat-type-small); text-align: right; }
.sales-order-totals strong { color: var(--aat-text); font-weight: var(--aat-weight-semibold); }
.sales-order-totals .total { margin-top: 2px; border-top: 1px solid var(--aat-border-strong); padding-top: 9px; color: var(--aat-text); font-size: var(--aat-type-subheading); font-weight: var(--aat-weight-semibold); }
.sales-order-totals .total strong { font-size: var(--aat-type-subheading); }
.sales-order-totals .payment { margin-top: 5px; padding-top: 8px; color: var(--aat-text-muted); }
.sales-order-totals .amount-due { color: var(--aat-primary-dark); font-weight: var(--aat-weight-semibold); }
.sales-order-totals .amount-due strong { color: var(--aat-primary-dark); font-size: var(--aat-type-subheading); }

.sales-order-work { display: grid; grid-template-columns: 1.05fr 1.1fr .95fr; margin-bottom: 20px; border-radius: var(--aat-radius); }
.sales-order-work > div { min-width: 0; padding: 17px 19px; border-right: 1px solid var(--aat-border); }
.sales-order-work > div:last-child { border-right: 0; }
.sales-order-work h2 { margin: 0 0 14px; font-size: var(--aat-type-subheading); }
.sales-order-work p { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 9px; }
.sales-order-work p > strong { font-size: var(--aat-type-small); font-weight: var(--aat-weight-semibold); text-align: right; }
.sales-order-note { display: block !important; min-height: 92px; border: 1px solid var(--aat-border); border-radius: var(--aat-radius-small); background: var(--aat-surface-soft); padding: 10px; color: var(--aat-text); font-size: var(--aat-type-small); line-height: 1.45; white-space: pre-line; }
.sales-order-work-editable label { display: grid; grid-template-columns: minmax(105px, .8fr) minmax(140px, 1.2fr); align-items: center; gap: 12px; margin-bottom: 10px; }
.sales-order-work-editable label > span { color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); font-weight: var(--aat-weight-medium); }
.sales-order-work-editable select,.sales-order-work-editable input { width: 100%; min-width: 0; border: 1px solid var(--aat-border-strong); border-radius: 5px; background: #fff; padding: 7px 8px; color: var(--aat-text); font-size: var(--aat-type-small); }
.sales-order-work-editable small { display: block; margin-top: 12px; color: var(--aat-text-muted); line-height: 1.4; }
.sales-order-work-editable .sales-order-note { width: 100%; min-height: 132px; resize: vertical; background: #fff; }
.web-order-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 12px; border-radius: 7px; }
.web-order-summary > div { display: grid; gap: 4px; padding: 12px 15px; border-right: 1px solid var(--aat-border); }
.web-order-summary > div:last-child { border-right: 0; }
.web-order-summary span { color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); font-weight: 600; text-transform: uppercase; }
.web-order-summary strong { color: var(--aat-primary-dark); font-size: var(--aat-type-small); }
.web-order-preparing { display: flex; align-items: center; gap: 14px; margin-top: 18px; border: 1px dashed #b9c8e3; border-radius: 8px; background: #f7f9fd; padding: 18px; }
.web-order-preparing-icon { display: grid; min-width: 46px; height: 46px; place-items: center; border-radius: 8px; background: var(--aat-primary-dark); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.web-order-preparing strong { color: var(--aat-primary-dark); }
.web-order-preparing p { margin: 4px 0 0; color: var(--aat-text-muted); font-size: var(--aat-type-small); }
.web-order-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.web-order-compare article { min-height: 190px; border: 1px solid var(--aat-border); border-radius: 8px; background: var(--aat-surface-soft); padding: 18px; }
.web-order-compare article:first-child { border-style: dashed; }
.web-order-compare article > span { color: var(--aat-primary); font-size: var(--aat-type-eyebrow); font-weight: 700; text-transform: uppercase; }
.web-order-compare h3 { margin: 8px 0; color: var(--aat-primary-dark); }
.web-order-compare small { color: var(--aat-text-muted); line-height: 1.5; }
.web-order-compare dl { display: grid; gap: 8px; margin: 14px 0 0; }
.web-order-compare dl div { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--aat-border); padding-top: 8px; }
.web-order-compare dt { color: var(--aat-text-muted); }
.web-order-compare dd { margin: 0; font-weight: 650; text-align: right; }
.line-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--aat-border); padding: 12px 15px; }
.line-editor-heading h2 { margin: 2px 0 0; font-size: var(--aat-type-subheading); }
.line-editor-heading button { border: 1px solid var(--aat-primary); border-radius: 6px; background: #fff; padding: 7px 11px; color: var(--aat-primary-dark); font-weight: 650; }
.sales-order-line-editor tbody tr { cursor: default; }
.sales-order-line-editor tbody tr:hover { background: #f7f9fd; }
.sales-order-line-editor tbody tr.stock-shortage .available-qty { color: #a33b24; font-weight: 700; }
body.erp-drawer-open { overflow: hidden; }
.erp-drawer-backdrop { position: fixed; z-index: 1110; inset: 0; background: rgb(24 35 55 / 28%); }
.erp-drawer { position: fixed; z-index: 1120; top: var(--app-header-height); right: 0; bottom: 0; width: min(520px,calc(100vw - 24px)); overflow: auto; border-left: 1px solid var(--aat-border); background: #fff; box-shadow: -18px 0 50px rgb(20 39 75 / 18%); }
.erp-drawer > header { display: flex; align-items: start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--aat-border); padding: 20px; }
.erp-drawer h2 { margin: 3px 0; }
.erp-drawer header p { margin: 0; color: var(--aat-text-muted); font-size: var(--aat-type-small); }
.drawer-close { border: 1px solid var(--aat-border-strong); border-radius: 6px; background: #fff; padding: 7px 10px; }
.drawer-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 16px 20px; }
.drawer-search input { min-width: 0; border: 1px solid var(--aat-border-strong); border-radius: 6px; padding: 10px 11px; }
.drawer-search button,.catalogue-results button { border: 1px solid var(--aat-primary); border-radius: 6px; background: var(--aat-primary); padding: 8px 11px; color: #fff; font-weight: 650; }
.catalogue-results { display: grid; gap: 10px; padding: 0 20px 24px; }
.catalogue-results article { display: grid; gap: 7px; border: 1px solid var(--aat-border); border-radius: 8px; padding: 14px; }
.catalogue-results article > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.catalogue-results article p,.catalogue-results article small { margin: 0; }
.catalogue-results article small,.drawer-empty { color: var(--aat-text-muted); }
.catalogue-results article button { justify-self: end; }
.drawer-error { border: 1px solid #efb1aa; border-radius: 8px; background: #fff1ef; padding: 14px; color: #8f2f22; }
.drawer-error p { margin: 5px 0 0; font-size: var(--aat-type-small); }
.stock-state { border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 700; }
.stock-state.available { background: #e6f5ea; color: #24743d; }
.stock-state.unavailable { background: #fff1df; color: #8a5a0a; }
.line-detail-content { padding: 20px; }
.line-detail-hero { border-bottom: 1px solid var(--aat-border); padding-bottom: 16px; }
.line-detail-hero > span { color: var(--aat-primary); font-size: var(--aat-type-eyebrow); font-weight: 700; text-transform: uppercase; }
.line-detail-hero h3 { margin: 7px 0 3px; }
.line-detail-hero p { margin: 0; color: var(--aat-text-muted); }
.line-detail-content dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.line-detail-content dl div { display: grid; gap: 5px; border: 1px solid var(--aat-border); border-radius: 7px; padding: 12px; }
.line-detail-content dt { color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); }
.line-detail-content dd { margin: 0; font-weight: 700; }
.line-detail-content dd.warning { color: #a33b24; }
.drawer-note { border: 1px solid #d5dfef; border-radius: 7px; background: #f4f7fb; padding: 12px; color: var(--aat-text-muted); font-size: var(--aat-type-small); line-height: 1.45; }
.order-source-picker { display: grid; grid-template-columns: 1fr; align-items: stretch; }
.source-brand-preview { display: grid; min-height: 48px; place-items: center; align-content: center; gap: 1px; overflow: hidden; border: 1px solid var(--aat-border); border-radius: 5px; background: #fff; padding: 4px 8px; }
.source-brand-preview img { width: auto; height: 30px; object-fit: contain; }
.source-brand-preview img.national { max-width: 105px; height: 24px; }
.source-brand-preview strong { color: var(--aat-primary-dark); font-size: 11px; }
.source-brand-preview span { color: var(--aat-text-muted); font-size: 8px; font-weight: 700; letter-spacing: .08em; line-height: 1; text-transform: uppercase; }
.order-source-picker select { height: auto !important; min-height: 48px; }
.sales-order-title-copy { display: flex; align-items: center; gap: 16px; min-width: 0; }
.title-brand-preview { min-width: 118px; min-height: 54px; border-color: #cbd6e9; box-shadow: 0 2px 8px rgba(20,42,85,.06); }
.title-brand-preview img { height: 34px; }
.title-brand-preview img.national { max-width: 112px; height: 27px; }
.saved-title-source { display: grid; grid-template-columns: 108px auto; align-items: stretch; gap: 7px; }
.saved-title-source .title-brand-preview { min-width: 108px; min-height: 50px; }
.saved-title-source-meta { display: flex; align-items: stretch; overflow: hidden; border: 1px solid #cbd6e9; border-radius: 5px; background: #fff; }
.saved-title-source-meta > span { display: grid; min-width: 88px; align-content: center; gap: 2px; border-left: 1px solid var(--aat-border); padding: 5px 9px; color: var(--aat-text-muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.saved-title-source-meta > span:first-child { min-width: 145px; border-left: 0; }
.saved-title-source-meta strong { overflow: hidden; color: var(--aat-primary-dark); font-size: 10px; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.title-brand-control { display: grid; grid-template-columns: 118px minmax(170px,220px); align-items: stretch; gap: 6px; }
.title-brand-control select { min-width: 0; border: 1px solid #cbd6e9; border-radius: 5px; background: #fff; padding: 6px 9px; color: var(--aat-text); font-size: 10px; font-weight: 600; }
.sales-channel-display { display: flex; align-items: center; gap: 8px; min-height: 32px; border: 1px solid var(--aat-border); border-radius: 5px; background: #f6f7f9; padding: 5px 8px; }
.sales-channel-display span { border-radius: 999px; background: #e7ebf2; padding: 3px 7px; color: #536075; font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.sales-channel-display strong { color: var(--aat-text); font-size: 10px; }
.signoff-grid { display: grid; gap: 2px; }

@media (max-width: 1100px) {
  .order-command-strip { grid-template-columns: repeat(3,minmax(140px,1fr)); }
  .web-order-compare { grid-template-columns: 1fr; }
  .sales-order-create-header.sales-order-header-columns { grid-template-columns: repeat(3,minmax(180px,1fr)); }
  .sales-order-header-columns .order-field-column + .order-field-column { border-left: 0; padding-left: 0; }
  .sales-order-create-header { grid-template-columns: repeat(3,minmax(140px,1fr)); }
  .sales-order-create-header .create-summary { grid-column: span 3; }
  .sales-order-fields { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
  .saved-order-header-columns { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px 0; }
  .saved-order-field-column:nth-child(4) { padding-left: 0; border-left: 0; }
  .sales-field:nth-last-child(-n+5) { border-bottom: 1px solid var(--aat-border); }
  .sales-field:nth-child(5n) { border-right: 1px solid var(--aat-border); }
  .sales-field:nth-child(3n) { border-right: 0; }
  .sales-field:nth-last-child(-n+3) { border-bottom: 0; }
  .sales-field-notes { grid-column: span 3; }
  .sales-order-lines { overflow-x: auto; }
  .sales-order-lines > table { min-width: 940px; }
}

@media (max-width: 767.98px) {
  .web-order-summary { grid-template-columns: 1fr 1fr; }
  .sales-order-create-header.sales-order-header-columns { grid-template-columns: 1fr; }
  .sales-order-header-columns .order-field-column { padding-right: 0; }
  .sales-orders-heading-actions { align-items: stretch; flex-direction: column; }
  .sales-order-create-grid { grid-template-columns: 1fr; }
  .sales-order-create-wide { grid-column: auto; }
  .sales-order-create-header { grid-template-columns: 1fr 1fr; }
  .sales-order-create-header .create-summary { grid-column: span 2; }
  .line-editor-footer { flex-direction: column; }
  .sales-order-title { flex-direction: column; }
  .sales-order-actions { justify-content: flex-start; }
  .sales-order-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .saved-order-header-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .saved-order-field-column:nth-child(odd) { padding-left: 0; border-left: 0; }
  .saved-order-field-column:nth-child(even) { padding-right: 0; }
  .sales-field:nth-child(3n) { border-right: 1px solid var(--aat-border); }
  .sales-field:nth-child(2n) { border-right: 0; }
  .sales-field:nth-last-child(-n+3) { border-bottom: 1px solid var(--aat-border); }
  .sales-field:nth-last-child(-n+2) { border-bottom: 0; }
  .sales-field-notes { grid-column: span 2; }
  .sales-order-work { grid-template-columns: 1fr; }
  .sales-order-work > div { border-right: 0; border-bottom: 1px solid var(--aat-border); }
  .sales-order-work > div:last-child { border-bottom: 0; }
}

+/* Read-only ERP and Xero reporting surfaces. */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 24px;
}

.metric-card,
.report-panel,
.report-filter {
  border: 1px solid var(--aat-border);
  border-radius: var(--aat-radius);
  background: var(--aat-surface);
  box-shadow: var(--aat-shadow-soft);
}
.report-tabs { display: inline-flex; gap: 4px; margin-bottom: 12px; border: 1px solid var(--aat-border); border-radius: 12px; background: #eef1f7; padding: 4px; }
.report-tabs a { display: grid; min-width: 190px; gap: 1px; border-radius: 8px; padding: 9px 14px; color: var(--aat-text-muted); text-decoration: none; }
.report-tabs a:hover { color: var(--aat-text); }
.report-tabs a.is-active { background: #fff; color: var(--aat-text); box-shadow: 0 2px 8px rgb(30 42 76 / 10%); }
.report-tabs span { font-size: 13px; font-weight: 800; }
.report-tabs small { color: inherit; font-size: 10px; opacity: .76; }
.report-empty-state { display: grid; min-height: 310px; place-content: center; justify-items: center; border: 1px solid var(--aat-border); border-radius: 16px; background: radial-gradient(circle at 50% 0, #eef3ff, #fff 55%); padding: 42px; text-align: center; box-shadow: var(--aat-shadow-soft); }
.report-empty-state > span { color: var(--aat-primary); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.report-empty-state h2 { margin: 8px 0 6px; font-size: 25px; }
.report-empty-state p { max-width: 520px; margin: 0; color: var(--aat-text-muted); }
.report-empty-state > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.report-empty-state a { border-radius: 8px; background: var(--aat-primary); padding: 9px 14px; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }

.metric-card {
  display: grid;
  min-height: 128px;
  align-content: start;
  gap: 5px;
  padding: 18px;
}

.metric-card > span,
.report-panel-heading span {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-eyebrow);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.metric-card strong { font-size: 26px; line-height: 1.2; }
.metric-card small { color: var(--aat-text-muted); }
.metric-card-attention { border-color: color-mix(in srgb, var(--aat-attention) 42%, var(--aat-border)); }
.metric-card-attention strong { color: var(--aat-attention); }
.metric-card-link a { margin-top: auto; font-weight: 700; }

.report-heading { margin-bottom: 16px; }
.report-hero {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  border: 1px solid #243c83;
  border-radius: 18px;
  background: radial-gradient(circle at 82% 0%, rgb(122 148 255 / 35%), transparent 36%), linear-gradient(125deg, #172650 0%, #253f87 62%, #513e89 100%);
  padding: 28px 30px;
  color: #fff;
  box-shadow: 0 18px 45px rgb(20 40 95 / 20%);
}
.report-hero::after { position: absolute; width: 240px; height: 240px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 50%; content: ""; inset: -125px -45px auto auto; }
.report-hero .page-eyebrow { color: #b9c9ff; }
.report-hero h1 { margin: 2px 0 8px; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; }
.report-hero p:last-child { max-width: 680px; margin-bottom: 0; color: #d8e1ff; }
.report-hero-overview { position: relative; z-index: 1; display: grid; min-width: 250px; overflow: hidden; border: 1px solid rgb(255 255 255 / 18%); border-radius: 14px; background: rgb(255 255 255 / 9%); backdrop-filter: blur(10px); }
.report-hero-overview > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid rgb(255 255 255 / 13%); padding: 10px 14px; }
.report-hero-overview > div:last-child { border-bottom: 0; }
.report-hero-overview span { color: #bac8ed; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.report-hero-overview strong { font-size: 13px; white-space: nowrap; }
.report-hero-overview strong i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: currentColor; }
.report-hero-overview .is-live { color: #71e1ae; }
.report-hero-overview .is-offline { color: #ffd27e; }
.report-filter {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
}

.report-filter label { display: grid; gap: 5px; color: var(--aat-text-muted); font-size: var(--aat-type-small); font-weight: 600; }
.report-filter input,
.report-filter select { min-height: 40px; border: 1px solid var(--aat-border-strong); border-radius: 7px; background: #fff; padding: 7px 10px; color: var(--aat-text); }
.report-filter button { min-height: 40px; }
.report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.report-entity-card { position: relative; overflow: hidden; min-height: 168px; grid-template-columns: minmax(0, 1fr); border: 0; padding: 20px; box-shadow: 0 12px 30px rgb(33 45 81 / 10%); }
.report-entity-card::before { position: absolute; width: 150px; height: 150px; border-radius: 50%; background: currentColor; content: ""; opacity: .055; inset: -80px -48px auto auto; }
.report-card-value { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.report-card-value > strong { color: var(--aat-text); font-size: clamp(27px, 3vw, 36px); letter-spacing: -.035em; }
.report-card-value > em { margin-left: auto; color: var(--aat-text-muted); font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.report-card-value > span { border-radius: 999px; padding: 5px 7px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.report-card-value .is-up { background: #e8f8f0; color: #147c58; }
.report-card-value .is-down { background: #fff0ed; color: #b74436; }
.report-entity-title { display: flex; align-items: center; justify-content: space-between; }
.report-entity-title > span { color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.report-entity-title i { width: 11px; height: 11px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 12%, transparent); }
.report-entity-au { color: #3f64c7; }
.report-entity-nt { color: #d97923; }
.report-entity-nz { color: #25936f; }
.report-entity-au-nt { color: #7654bc; }
.report-card-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--aat-text-muted); }
.report-card-stats b { color: var(--aat-text); font-weight: 700; }
.report-card-xero { display: grid; width: calc(100% + 40px); justify-self: stretch; box-sizing: border-box; gap: 4px; margin: auto -20px -20px; background: rgb(245 247 251 / 82%); padding: 10px 20px; color: var(--aat-text-muted); font-size: 11px; }
.report-card-xero span { min-width: 0; overflow-wrap: anywhere; }
.report-card-xero span:last-child { color: color-mix(in srgb, var(--aat-text-muted) 78%, transparent); font-size: 10px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.report-visual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.report-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 16px; margin-bottom: 16px; }
.report-side-stack { display: grid; min-width: 0; gap: 16px; }
.report-panel { min-width: 0; padding: 18px; }
.report-chart-panel { padding: 22px 22px 16px; }
.report-trend-panel { min-height: 455px; padding: 24px; }
.report-division-trends { display: grid; gap: 12px; }
.report-division-trend { display: grid; min-height: 112px; grid-template-columns: minmax(150px, .7fr) minmax(260px, 1.3fr); align-items: center; gap: 22px; border: 1px solid var(--aat-border); border-radius: 13px; background: linear-gradient(100deg, #fff, #fbfcff); padding: 14px 18px; }
.report-division-trend header { display: grid; gap: 8px; }
.report-division-trend header > div { display: flex; align-items: center; gap: 8px; }
.report-division-trend header i { width: 9px; height: 9px; border-radius: 3px; background: currentColor; }
.report-division-trend header strong { color: var(--aat-text); font-size: 13px; }
.report-division-trend header span { color: var(--aat-text-muted); font-size: 11px; }
.report-division-trend header > b { color: var(--aat-text); font-size: 22px; letter-spacing: -.03em; }
.report-division-au { color: #3f64c7; }
.report-division-nt { color: #d97923; }
.report-division-nz { color: #25936f; }
.report-division-au-nt { color: #7654bc; }
.report-mini-chart { display: flex; height: 78px; align-items: end; justify-content: stretch; gap: 10px; border-bottom: 1px solid var(--aat-border); }
.report-mini-chart > div { position: relative; display: grid; height: 100%; flex: 1; align-items: end; grid-template-rows: 1fr 15px; text-align: center; }
.report-mini-chart > div > i { width: min(100%, 52px); height: var(--mini-height); min-height: 3px; justify-self: center; border-radius: 5px 5px 0 0; background: currentColor; opacity: .86; }
.report-mini-chart span { position: absolute; top: 0; right: 0; left: 0; color: var(--aat-text); font-size: 10px; font-weight: 700; }
.report-mini-chart small { color: var(--aat-text-muted); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.report-panel-wide { grid-column: 1 / -1; }
.report-panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.report-panel-heading h2 { margin: 3px 0 0; font-size: 20px; }
.report-panel-heading small { color: var(--aat-text-muted); text-align: right; }
.report-chart-legend { display: flex; flex-wrap: wrap; gap: 14px; min-height: 22px; margin: -5px 0 18px; color: var(--aat-text-muted); font-size: 12px; }
.report-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.report-chart-legend i { width: 9px; height: 9px; border-radius: 3px; background: currentColor; }
.report-legend-au { color: #3f64c7; }
.report-legend-nt { color: #d97923; }
.report-legend-nz { color: #25936f; }
.report-legend-au-nt { color: #7654bc; }
.report-line-chart { position: relative; min-height: 330px; overflow: hidden; border-radius: 12px; background: linear-gradient(180deg, #fbfcff, #fff); }
.report-line-chart svg { position: relative; z-index: 1; display: block; width: 100%; height: 290px; overflow: visible; }
.report-line-grid { position: absolute; display: grid; height: 245px; grid-template-rows: repeat(4, 1fr); inset: 16px 28px auto 44px; }
.report-line-grid i { border-bottom: 1px dashed #dfe4ee; }
.report-line { color: var(--aat-primary); }
.report-line polyline { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; vector-effect: non-scaling-stroke; }
.report-line circle { fill: #fff; stroke: currentColor; stroke-width: 3; vector-effect: non-scaling-stroke; }
.report-line-au { color: #3f64c7; }
.report-line-nt { color: #d97923; }
.report-line-nz { color: #25936f; }
.report-line-au-nt { color: #7654bc; }
.report-line-labels { display: flex; justify-content: space-between; margin: -22px 5.5% 0; color: var(--aat-text-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.report-mix-panel { min-height: 245px; padding: 20px; }
.report-mix-body { display: flex; align-items: center; justify-content: space-around; gap: 20px; }
.report-donut { display: grid; width: 132px; height: 132px; flex: 0 0 132px; place-items: center; border-radius: 50%; background: conic-gradient(#3f64c7 0 var(--au-share), #d97923 var(--au-share) calc(var(--au-share) + var(--nt-share)), #25936f calc(var(--au-share) + var(--nt-share)) 100%); }
.report-donut::before { width: 88px; height: 88px; border-radius: 50%; background: #fff; content: ""; grid-area: 1 / 1; box-shadow: inset 0 0 0 1px var(--aat-border); }
.report-donut > div { z-index: 1; display: grid; grid-area: 1 / 1; text-align: center; }
.report-donut strong { font-size: 20px; letter-spacing: -.03em; }
.report-donut span { color: var(--aat-text-muted); font-size: 11px; }
.report-mix-list { display: grid; min-width: 110px; gap: 10px; }
.report-mix-list > div { display: grid; align-items: center; grid-template-columns: 8px 1fr auto; gap: 7px; font-size: 12px; }
.report-mix-list i { width: 8px; height: 8px; border-radius: 3px; background: currentColor; }
.report-mix-list span { color: var(--aat-text-muted); }
.report-mix-list strong { color: var(--aat-text); }
.report-mix-au { color: #3f64c7; }
.report-mix-nt { color: #d97923; }
.report-mix-nz { color: #25936f; }
.report-mix-au-nt { color: #7654bc; }
.report-insight-panel { padding: 20px; background: linear-gradient(140deg, #192750, #273d7c); color: #fff; }
.report-insight-panel .report-panel-heading span { color: #9eb4ef; }
.report-insight-panel .report-panel-heading h2 { color: #fff; }
.report-insights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-insights > div { display: grid; gap: 2px; border: 1px solid rgb(255 255 255 / 13%); border-radius: 10px; background: rgb(255 255 255 / 7%); padding: 10px; }
.report-insights span, .report-insights small { color: #b8c5e9; font-size: 10px; }
.report-insights strong { font-size: 17px; }
.report-insights .is-up { color: #76e2b0; }
.report-insights .is-down { color: #ff9d8f; }
.report-insight-panel > p { margin: 12px 0 0; color: #b8c5e9; font-size: 11px; line-height: 1.45; }
.report-volume-panel { margin-bottom: 16px; padding: 22px 24px 12px; }
.report-grouped-chart-compact { min-height: 205px; padding-top: 10px; }
.report-grouped-chart-compact .report-month-group { height: 185px; grid-template-rows: 150px 24px; }
.report-grouped-chart { display: flex; min-height: 255px; align-items: stretch; gap: clamp(14px, 3vw, 30px); overflow-x: auto; border-bottom: 1px solid var(--aat-border); background: repeating-linear-gradient(to bottom, transparent 0, transparent 61px, var(--aat-border) 62px); padding: 24px 10px 0; }
.report-month-group { display: grid; min-width: 105px; flex: 1 0 105px; grid-template-rows: 210px 28px; gap: 8px; text-align: center; }
.report-month-group > strong { color: var(--aat-text-muted); font-size: 12px; text-transform: uppercase; }
.report-bars { display: flex; align-items: end; justify-content: center; gap: 5px; }
.report-column { position: relative; width: clamp(22px, 2.8vw, 38px); height: 100%; color: var(--aat-primary); }
.report-column > i { position: absolute; height: var(--bar-height); min-height: 3px; border-radius: 6px 6px 2px 2px; background: currentColor; box-shadow: inset 0 1px rgb(255 255 255 / 25%); inset: auto 0 0; transition: height .25s ease; }
.report-column > span { position: absolute; bottom: calc(var(--bar-height) + 5px); left: 50%; opacity: 0; border-radius: 5px; background: #182344; padding: 4px 6px; color: #fff; font-size: 10px; font-weight: 700; pointer-events: none; transform: translateX(-50%) translateY(3px); transition: .15s ease; white-space: nowrap; z-index: 2; }
.report-column:hover > span { opacity: 1; transform: translateX(-50%) translateY(0); }
.report-column-au { color: #3f64c7; }
.report-column-nt { color: #d97923; }
.report-column-nz { color: #25936f; }
.report-column-au-nt { color: #7654bc; }
.report-chart { display: flex; min-height: 250px; align-items: end; gap: 10px; overflow-x: auto; padding: 22px 4px 0; }
.report-bar-item { display: grid; min-width: 68px; height: 220px; flex: 1 0 68px; grid-template-rows: 22px 1fr 22px; gap: 5px; text-align: center; }
.report-bar-item strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.report-bar-item small { color: var(--aat-text-muted); white-space: nowrap; }
.report-bar { position: relative; overflow: hidden; border-radius: 5px 5px 2px 2px; background: var(--aat-primary-soft); }
.report-bar i { position: absolute; inset: auto 0 0; min-height: 2px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #5273d1, var(--aat-primary)); }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th,
.report-table td { border-bottom: 1px solid var(--aat-border); padding: 9px 6px; text-align: left; }
.report-table th { color: var(--aat-text-muted); font-size: var(--aat-type-small); font-weight: 600; }
.report-table th:not(:first-child),
.report-table td:not(:first-child) { text-align: right; }
.report-pnl { margin-bottom: 24px; }
.report-pnl h3 { margin: 22px 0 5px; color: var(--aat-text-muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.report-pnl-table td:last-child { font-variant-numeric: tabular-nums; }
.report-summary-row { background: var(--aat-surface-soft); font-weight: 700; }
.report-alert { border: 1px solid color-mix(in srgb, var(--aat-attention) 35%, var(--aat-border)); border-radius: 8px; background: #fff9ea; padding: 12px 14px; color: #76530c; }
.report-data-note { margin: -4px 0 18px; border-left: 3px solid var(--aat-information); background: #eef6ff; padding: 10px 12px; color: #244f7d; font-size: var(--aat-type-small); }

@media (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-metrics { grid-template-columns: 1fr; }
  .report-visual-grid { grid-template-columns: 1fr; }
  .report-dashboard-grid { grid-template-columns: 1fr; }
  .report-side-stack { grid-template-columns: 1fr; }
  .report-mix-body { justify-content: center; }
  .report-mix-list { min-width: 150px; }
}

@media (max-width: 640px) {
  .metric-grid,
  .report-grid { grid-template-columns: 1fr; }
  .report-metrics { grid-template-columns: 1fr; }
  .report-side-stack { grid-template-columns: 1fr; }
  .report-hero { align-items: start; flex-direction: column; padding: 22px; }
  .report-hero-overview { min-width: 0; width: 100%; }
  .report-division-trend { grid-template-columns: 1fr; gap: 10px; }
  .report-filter { align-items: stretch; flex-direction: column; }
  .report-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .report-tabs a { min-width: 0; }
  .report-filter button { width: 100%; }
  .report-panel-wide { grid-column: auto; }
  .report-panel-heading { align-items: start; flex-direction: column; }
  .report-panel-heading small { text-align: left; }
}


/* Item master links ERP identity to source-owned intranet catalogue content. */
.item-mapping-success {
  margin: 12px 0;
  border: 1px solid #9bd8ab;
  border-radius: 8px;
  background: #edf9f0;
  padding: 11px 14px;
  color: #176b32;
  font-weight: 650;
}

.item-web-production {
  scroll-margin-top: 90px;
}

.item-map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  align-items: end;
  gap: 28px;
  padding: 22px;
}

.item-map-workspace h3,
.item-product-card h3,
.item-product-results h3 {
  margin: 0 0 5px;
  color: var(--aat-text);
  font-size: 1rem;
}

.item-map-workspace p,
.item-product-card p,
.item-product-results p {
  margin: 0;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.item-map-search label {
  display: block;
  margin-bottom: 6px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
  font-weight: 650;
}

.item-map-search > div {
  display: flex;
  gap: 8px;
}

.item-map-search input {
  min-width: 0;
  min-height: 40px;
  flex: 1 1 auto;
  border: 1px solid var(--aat-border);
  border-radius: 7px;
  padding: 8px 11px;
}

.item-product-results {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--aat-border);
}

.item-product-mappings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 16px;
}

.item-product-results article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--aat-border);
}

.item-product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-height: 132px;
  border: 1px solid var(--aat-border);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.item-product-results article:last-child {
  border-bottom: 0;
}

.item-product-image {
  display: grid;
  width: 72px;
  height: 60px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--aat-border);
  border-radius: 8px;
  background: #fff;
  color: var(--aat-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.item-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-product-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--app-accent-dark);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.item-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.item-product-tags span {
  border-radius: 999px;
  background: var(--app-accent-soft);
  padding: 3px 8px;
  color: var(--app-accent-dark);
  font-size: 0.7rem;
  font-weight: 650;
}

.item-product-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.item-product-card .item-product-actions a {
  color: var(--aat-primary-dark);
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.item-map-disclosure {
  border-top: 1px solid var(--aat-border);
  background: #fbfcff;
}

.item-map-disclosure summary {
  cursor: pointer;
  padding: 13px 16px;
  color: var(--aat-primary-dark);
  font-size: 0.78rem;
  font-weight: 750;
}

.item-map-disclosure[open] summary {
  border-bottom: 1px solid var(--aat-border);
}

.item-product-actions small {
  color: var(--aat-text-muted);
  font-size: 0.7rem;
}

@media (max-width: 820px) {
  .item-map-workspace {
    grid-template-columns: 1fr;
  }

  .item-product-results article {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .item-product-mappings { grid-template-columns: 1fr; }
  .item-product-card { min-height: 0; }

  .item-product-actions,
  .item-product-results form {
    grid-column: 1 / -1;
    justify-items: stretch;
  }
}

/* Sales Order entry usability pass: compact, polished additions to the wide workspace. */
.workflow-select { box-shadow: none; }
.field-validation { display: block; min-height: 12px; margin-top: 3px; color: #b42318; font-size: 10px; }
.field-validation:empty { display: none; }
.selected-customer { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 24px; border-bottom: 1px solid #dbe4f2; padding: 3px 1px 6px; }
.selected-customer span { overflow: hidden; color: var(--aat-primary-dark); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.selected-customer small { overflow: hidden; color: var(--aat-text-muted); text-overflow: ellipsis; white-space: nowrap; }
.sales-order-readiness { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; border: 1px solid #ead9a9; border-left: 4px solid #e1b84e; border-radius: 6px; background: #fffdf7; padding: 7px 13px 7px 10px; }
.sales-order-readiness > div { display: flex; align-items: center; gap: 10px; }
.sales-order-readiness p { margin: 2px 0 0; color: #6d5521; font-size: var(--aat-type-small); }
.sales-order-readiness > span { white-space: nowrap; color: #815b00; font-size: var(--aat-type-small); font-weight: 700; }
.readiness-icon { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: #f4d785; color: #513900; font-size: 11px; font-weight: 800; }
.sales-order-readiness.ready { border-color: #bcdcc2; border-left-color: #55a667; background: #f7fcf7; }
.sales-order-readiness.ready p,.sales-order-readiness.ready > span { color: #26743b; }
.sales-order-readiness.ready .readiness-icon { background: #bce6c2; color: #1d6330; font-size: 0; }
.sales-order-readiness.ready .readiness-icon::before { content: "✓"; font-size: 14px; }
.selected-address-strip { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: hidden; border: 1px solid var(--aat-border); border-radius: 7px; background: #fff; }
.selected-address-strip article { display: grid; grid-template-columns: 118px minmax(0,1fr) auto; align-items: center; gap: 14px; min-height: 68px; padding: 10px 14px; transition: background .15s,border-color .15s; }
.selected-address-strip article + article { border-left: 1px solid var(--aat-border); }
.selected-address-strip article.selected { background: #fbfefc; }
.address-card-label,.address-card-copy { display: grid; min-width: 0; gap: 3px; }
.selected-address-strip span { color: var(--aat-text-muted); font-size: var(--aat-type-eyebrow); font-weight: 700; text-transform: uppercase; }
.selected-address-strip em { justify-self: start; border-radius: 999px; background: #fff3d6; padding: 2px 7px; color: #8a6415; font-size: 8px; font-style: normal; font-weight: 750; text-transform: uppercase; }
.selected-address-strip article.selected em { background: #e4f5e8; color: #28713d; }
.selected-address-strip strong { overflow: hidden; color: var(--aat-primary-dark); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.selected-address-strip small { overflow: hidden; color: var(--aat-text-muted); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.selected-address-strip button { border: 1px solid #b8c7e6; border-radius: 5px; background: #fff; padding: 6px 10px; color: var(--aat-primary-dark); font-size: 10px; font-weight: 700; }
.selected-address-strip button:hover { border-color: var(--aat-primary); background: #f4f7ff; }
.sales-order-line-editor { overflow-x: auto; overflow-y: visible; max-height: none; }
.sales-order-line-editor tr.stock-shortage td { background-color: #fff5f3; }
.sales-order-line-editor tr.stock-shortage .available-qty { color: #b42318; font-weight: 800; }
.sales-order-line-editor tr.stock-shortage .available-qty::after { content: "Low"; display: block; font-size: 9px; text-transform: uppercase; }
.sales-order-line-editor .line-editor-footer { position: static; border-top: 1px solid var(--aat-border); background: #fff; }
.line-editor-footer .sales-order-totals { min-width: 340px; }
.sales-order-create-actions .primary-action { border-color: var(--aat-primary); background: var(--aat-primary); color: #fff; }

@media (max-width: 900px) {
  .selected-address-strip { grid-template-columns: 1fr; }
  .selected-address-strip article { grid-template-columns: 105px 1fr auto; }
  .selected-address-strip article + article { border-top: 1px solid var(--aat-border); border-left: 0; }
  .selected-address-strip small { text-align: left; }
  .sales-order-readiness { align-items: flex-start; flex-direction: column; }
  .sales-order-title { align-items: flex-start; flex-direction: column; }
  .sales-order-title-copy { align-items: flex-start; flex-direction: column; }
  .saved-title-source { width: 100%; grid-template-columns: 108px minmax(0,1fr); }
  .saved-title-source-meta > span { flex: 1; min-width: 0; }
  .title-brand-control { grid-template-columns: 112px minmax(180px,1fr); width: 100%; }
  .sales-order-header-columns .order-copy-row { grid-template-columns: 1fr; margin-right: 0; margin-left: 0; padding-right: 0; padding-left: 0; }
}

/* Final Sales Order desktop refinement: match the approved dense navy workspace. */
@media (min-width: 1101px) {
  .sales-order-breadcrumb { margin-bottom: 8px; font-size: 11px; }
  .sales-order-title { align-items: flex-end; margin-bottom: 10px; }
  .sales-order-title h1 { font-size: 30px; }
  .sales-order-actions { flex-wrap: nowrap; gap: 6px; }
  .sales-order-actions button,.sales-order-actions .sales-order-edit,.sales-order-actions .sales-order-action-link,.sales-order-actions .sales-order-open { min-height: 32px; padding: 5px 10px; border-radius: 4px; font-size: 11px; }
  .sales-order-tabs { min-height: 38px; border: 1px solid var(--aat-border); border-bottom: 0; border-radius: 7px 7px 0 0; background: #fff; padding: 0 12px; }
  .sales-order-tabs a,.sales-order-tabs span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 13px; font-size: 11px; }
  .sales-order-create-full { gap: 12px; }
  .sales-order-readiness { min-height: 38px; margin-top: -12px; border-radius: 0 0 6px 6px; padding-top: 5px; padding-bottom: 5px; }
  .sales-order-readiness p { display: inline; margin-left: 6px; }
  .sales-order-readiness strong { font-size: 12px; }
  .sales-order-create-header.sales-order-header-columns { grid-template-columns: 1.28fr .92fr .94fr 1fr .62fr; gap: 10px 14px; border-radius: 7px; padding: 14px 16px 16px; }
  .sales-order-header-columns .order-field-column { gap: 8px; padding-right: 14px; }
  .sales-order-header-columns .order-field-column + .order-field-column { padding-left: 14px; }
  .sales-order-header-columns .flags-column { gap: 13px; padding-top: 23px; }
  .sales-order-create-header label { gap: 3px; font-size: 10px; }
  .sales-order-create-header input,.sales-order-create-header select { height: 32px; padding: 5px 8px; font-size: 11px; }
  .customer-terms { gap: 2px; padding: 7px 9px; }
  .customer-terms > strong { font-size: 11px; }
  .selected-customer { min-height: 22px; padding-bottom: 4px; font-size: 11px; }
  .sales-order-header-columns .order-copy-row { gap: 14px; margin: 3px -16px -16px; padding: 10px 16px 12px; }
  .sales-order-header-columns .order-copy-row textarea { min-height: 52px; padding: 7px 9px; font-size: 11px; }
  .selected-address-strip article { min-height: 58px; padding: 7px 12px; }
  .selected-address-strip span,.selected-address-strip strong,.selected-address-strip small { font-size: 10px; }
  .sales-order-lines { margin-bottom: 12px; border-radius: 7px; box-shadow: 0 2px 8px rgba(20,42,85,.05); }
  .sales-order-line-editor > table { min-width: 1440px; table-layout: fixed; }
  .sales-order-line-editor th,.sales-order-line-editor td { height: 40px; padding: 5px 6px; vertical-align: middle; }
  .sales-order-line-editor th { height: 34px; padding-top: 6px; padding-bottom: 6px; font-size: 9px; }
  .sales-order-line-editor th:nth-child(1) { width: 42px; }
  .sales-order-line-editor th:nth-child(2) { width: 84px; }
  .sales-order-line-editor th:nth-child(3) { width: 180px; }
  .sales-order-line-editor th:nth-child(4) { width: 350px; }
  .sales-order-line-editor th:nth-child(5) { width: 64px; }
  .sales-order-line-editor th:nth-child(6) { width: 78px; }
  .sales-order-line-editor th:nth-child(7) { width: 88px; }
  .sales-order-line-editor th:nth-child(8) { width: 62px; }
  .sales-order-line-editor th:nth-child(9) { width: 122px; }
  .sales-order-line-editor th:nth-child(10),.sales-order-line-editor th:nth-child(11) { width: 70px; }
  .sales-order-line-editor th:nth-child(12) { width: 122px; }
  .sales-order-line-editor th:nth-child(13) { width: 38px; }
  .sales-order-line-editor input,.sales-order-line-editor select { height: 30px; padding: 4px 6px; border-radius: 4px; font-size: 10px; }
  .sales-order-line-editor .line-number,.sales-order-line-editor .available-qty,.sales-order-line-editor .qty-assigned,.sales-order-line-editor .line-total { font-size: 10px; }
  .line-editor-footer { min-height: 112px; padding: 9px 13px 11px; }
  .line-editor-footer .sales-order-totals { min-width: 365px; gap: 4px; }
  .line-editor-footer .sales-order-totals span { grid-template-columns: 190px 105px; gap: 18px; font-size: 10px; }
  .line-editor-footer .sales-order-totals .total { padding-top: 6px; font-size: 12px; }
  .line-editor-footer .sales-order-totals .payment { margin-top: 1px; padding-top: 4px; }
  .sales-order-line-editor .line-editor-footer > div:first-child button { padding: 6px 10px; font-size: 10px; }
  .sales-order-work { grid-template-columns: 1fr 1.15fr .85fr; margin-top: 0; margin-bottom: 14px; border-radius: 7px; box-shadow: 0 2px 8px rgba(20,42,85,.05); }
  .sales-order-work > div { padding: 13px 16px; }
  .sales-order-work h2 { margin-bottom: 10px; font-size: 12px; }
  .sales-order-work-editable label { grid-template-columns: 105px 1fr; gap: 9px; margin-bottom: 7px; }
  .sales-order-work-editable select,.sales-order-work-editable input { height: 30px; padding: 4px 7px; font-size: 10px; }
  .sales-order-work-editable small,.sales-order-work p { font-size: 10px; }
  .sales-order-create-actions { min-height: 52px; border: 1px solid var(--aat-border); border-radius: 7px; box-shadow: 0 3px 12px rgba(20,42,85,.07); }
}

@media (max-width: 479.98px) {
  .sales-order-tabs { padding: 0; }
  .saved-title-source { grid-template-columns: 1fr; }
  .saved-title-source .title-brand-preview { justify-self: start; }
  .saved-title-source-meta { width: 100%; }
  .saved-title-source-meta > span:first-child { min-width: 0; }
  .sales-order-tabs span, .sales-order-tabs a { padding-inline: 11px; }
  .sales-order-fields { grid-template-columns: 1fr; }
  .saved-order-header-columns { grid-template-columns: 1fr; gap: 16px; }
  .saved-order-field-column,.saved-order-field-column:nth-child(even),.saved-order-field-column:nth-child(odd) { padding: 0; border-left: 0; }
  .sales-field, .sales-field:nth-child(2n), .sales-field:nth-child(3n), .sales-field:nth-child(5n) { border-right: 0; border-bottom: 1px solid var(--aat-border); }
  .sales-field:last-child { border-bottom: 0; }
  .sales-field-notes { grid-column: auto; }
  .sales-order-totals { justify-content: stretch; }
  .sales-order-totals span { grid-template-columns: 1fr auto; gap: 12px; }
}

.aat-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns:
    var(--suite-rail-width)
    var(--app-navigation-width)
    minmax(0, 1fr);
  grid-template-rows: var(--app-header-height) minmax(0, 1fr);
}

.suite-rail {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: grid;
  width: var(--suite-rail-width);
  grid-template-rows: 70px minmax(0, 1fr);
  background: #2d3038;
  color: #fff;
}

.suite-mark {
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
}

.suite-mark span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 12px;
  background: rgb(255 255 255 / 8%);
  font-size: 18px;
  font-weight: 600;
}

.suite-links {
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: none;
}

.suite-links::-webkit-scrollbar {
  display: none;
}

.suite-link {
  display: grid;
  min-height: 58px;
  place-items: center;
  gap: 3px;
  border-radius: 8px;
  color: #e9ebef;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.08;
  text-align: center;
  text-decoration: none;
}

.suite-link svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.suite-link:hover {
  background: rgb(255 255 255 / 8%);
  color: #fff;
}

.suite-link.active {
  background: var(--aat-primary);
  color: #fff;
}

.suite-link.is-unavailable {
  cursor: not-allowed;
  opacity: 0.42;
}

.app-header {
  position: sticky;
  z-index: 35;
  top: 0;
  grid-column: 2 / 4;
  grid-row: 1;
  display: flex;
  min-width: 0;
  height: var(--app-header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--aat-border);
  background: rgb(255 255 255 / 96%);
  padding: 0 24px;
  backdrop-filter: blur(10px);
}

.app-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--aat-border);
  border-radius: var(--aat-radius-small);
  background: #fff;
  color: var(--aat-text);
}

.app-menu-toggle svg,
.header-icon-button svg,
.app-search svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-context {
  display: grid;
  flex: 0 0 auto;
  line-height: 1.2;
}

.app-context span {
  color: var(--aat-primary);
  font-size: var(--aat-type-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-context strong {
  font-size: var(--aat-type-subheading);
  font-weight: 600;
}

.app-header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.app-search {
  display: flex;
  width: min(340px, 30vw);
  height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--aat-border);
  border-radius: var(--aat-radius-small);
  background: var(--aat-surface-soft);
  padding: 0 12px;
  color: var(--aat-text-muted);
}

.app-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-control);
}

.app-search input:disabled {
  opacity: 1;
}

.header-icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--aat-border);
  border-radius: var(--aat-radius-small);
  background: #fff;
  color: var(--aat-text-muted);
}

.header-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  border-radius: var(--aat-radius-small);
  cursor: pointer;
  list-style: none;
  padding: 4px 8px;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-menu summary:hover {
  background: var(--aat-primary-soft);
}

.account-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--aat-primary);
  color: #fff;
  font-size: var(--aat-type-control);
  font-weight: 600;
}

.account-copy {
  display: grid;
  max-width: 190px;
  line-height: 1.2;
}

.account-copy strong,
.account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  font-size: var(--aat-type-small);
  font-weight: 600;
}

.account-copy small {
  color: var(--aat-text-muted);
  font-size: 11px;
}

.account-popover {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 230px;
  gap: 8px;
  border: 1px solid var(--aat-border);
  border-radius: var(--aat-radius);
  background: #fff;
  box-shadow: var(--aat-shadow);
  padding: 14px;
}

.account-popover span {
  overflow-wrap: anywhere;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.account-popover a,
.account-sign-in {
  font-size: var(--aat-type-control);
  font-weight: 600;
  text-decoration: none;
}

.app-navigation {
  position: fixed;
  z-index: 30;
  inset:
    var(--app-header-height) auto 0
    var(--suite-rail-width);
  display: grid;
  width: var(--app-navigation-width);
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-right: 1px solid var(--aat-border);
  background: #fff;
}

.app-navigation-heading {
  display: grid;
  padding: 22px 20px 16px;
  line-height: 1.2;
}

.app-navigation-heading span {
  color: var(--aat-primary);
  font-size: var(--aat-type-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-navigation-heading strong {
  font-size: var(--aat-type-heading);
  font-weight: 600;
}

.app-navigation-links {
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  padding: 4px 12px 20px;
}

.app-navigation-link {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--aat-text);
  font-size: var(--aat-type-control);
  font-weight: 500;
  text-decoration: none;
}

.app-navigation-link svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.app-navigation-link:hover {
  background: var(--aat-primary-soft);
  color: var(--aat-primary-dark);
}

.app-navigation-link.active {
  background: var(--aat-primary);
  color: #fff;
  font-weight: 600;
}

.app-navigation-footer {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--aat-border);
  padding: 14px 20px 18px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.app-navigation-footer a {
  font-weight: 500;
  text-decoration: none;
}

.app-navigation-scrim {
  display: none;
}

.app-workspace {
  min-width: 0;
  grid-column: 3;
  grid-row: 2;
}

.app-main {
  width: 100%;
  min-width: 0;
  padding: 24px;
}

.page-heading,
.migration-page-heading,
.migration-panel-header,
.migration-candidate-header,
.migration-decision-actions,
.migration-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-heading,
.migration-page-heading {
  margin: 0 0 24px;
}

.page-heading h1,
.migration-page-heading h1 {
  margin: 0;
  font-size: var(--aat-type-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.page-heading p:not(.page-eyebrow),
.migration-page-heading p:not(.migration-eyebrow) {
  max-width: 54rem;
  margin: 6px 0 0;
  color: var(--aat-text-muted);
}

.page-eyebrow,
.migration-eyebrow,
.migration-panel-kicker {
  margin: 0 0 4px;
  color: var(--aat-primary);
  font-size: var(--aat-type-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-panel,
.migration-panel {
  margin-bottom: 16px;
  border: 1px solid var(--aat-border);
  border-radius: var(--aat-radius);
  background: var(--aat-surface);
  box-shadow: var(--aat-shadow-soft);
  padding: 20px;
}

.migration-panel-header {
  margin: -2px 0 16px;
  border-bottom: 1px solid var(--aat-border);
  padding-bottom: 14px;
}

.migration-panel-header h2 {
  margin: 0;
  font-size: var(--aat-type-heading);
  font-weight: 600;
}

.migration-candidate h3 {
  margin: 0;
  font-size: var(--aat-type-subheading);
  font-weight: 600;
}

.migration-count,
.migration-range,
.migration-status {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
  font-weight: 600;
}

.migration-filter-grid {
  display: grid;
  align-items: end;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.migration-filter-grid label,
.migration-decision-form label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--aat-type-control);
  font-weight: 600;
}

.migration-filter-grid select,
.migration-decision-form select,
.migration-decision-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--aat-border-strong);
  border-radius: var(--aat-radius-small);
  background: #fff;
  padding: 9px 11px;
}

.migration-decision-form textarea {
  min-height: 112px;
}

.btn {
  min-height: 40px;
  border-radius: var(--aat-radius-small);
  font-size: var(--aat-type-control);
  font-weight: 600;
}

.btn-primary {
  border-color: var(--aat-primary);
  background: var(--aat-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--aat-primary-dark);
  background: var(--aat-primary-dark);
}

.btn-outline-primary {
  border-color: var(--aat-primary);
  color: var(--aat-primary);
}

.btn-outline-primary:hover {
  border-color: var(--aat-primary);
  background: var(--aat-primary);
}

.migration-table {
  margin: 0;
  font-size: var(--aat-type-dense);
}

.migration-table thead th {
  border-bottom-color: var(--aat-border);
  color: var(--aat-text-muted);
  font-size: var(--aat-type-eyebrow);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.migration-table tbody td {
  border-bottom-color: #eeedf2;
}

.migration-type {
  font-weight: 600;
}

.migration-empty {
  border: 1px dashed var(--aat-border-strong);
  border-radius: var(--aat-radius);
  padding: 40px 24px;
  text-align: center;
}

.migration-empty-copy {
  margin: 0;
  color: var(--aat-text-muted);
}

.migration-pagination {
  margin-top: 16px;
  border-top: 1px solid var(--aat-border);
  padding-top: 16px;
}

.migration-pagination span[aria-disabled="true"] {
  color: #9894a1;
}

.migration-summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.migration-summary-grid div,
.migration-candidate dl div {
  min-width: 0;
}

.migration-summary-grid dt,
.migration-candidate dt {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
}

.migration-summary-grid dd,
.migration-candidate dd {
  overflow-wrap: anywhere;
}

.migration-candidate-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.migration-candidate {
  border: 1px solid var(--aat-border);
  border-radius: var(--aat-radius);
  padding: 16px;
}

.migration-candidate.is-subject {
  border-color: var(--aat-primary);
  box-shadow: inset 0 3px 0 var(--aat-primary);
}

.migration-candidate-header span {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-eyebrow);
}

.migration-candidate dl {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.migration-candidate dd {
  margin: 2px 0 0;
}

.migration-decision-form {
  display: grid;
  max-width: 48rem;
  gap: 16px;
}

.migration-help {
  margin: 5px 0 0;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.migration-decision-actions {
  justify-content: flex-start;
}

.migration-decision-actions span {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.migration-history {
  display: grid;
  gap: 16px;
  margin: 0;
  padding-left: 24px;
}

.migration-history span,
.migration-history small {
  display: block;
  color: var(--aat-text-muted);
}

.migration-history p {
  margin: 5px 0;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-card {
  min-width: 0;
  border: 1px solid var(--aat-border);
  border-radius: var(--aat-radius);
  background: #fff;
  box-shadow: var(--aat-shadow-soft);
  padding: 20px;
}

.dashboard-card svg {
  width: 28px;
  height: 28px;
  margin-bottom: 20px;
  fill: none;
  stroke: var(--aat-primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.dashboard-card h2 {
  margin: 0 0 6px;
  font-size: var(--aat-type-heading);
  font-weight: 600;
}

.dashboard-card p {
  margin: 0;
  color: var(--aat-text-muted);
}

.dashboard-card a {
  display: inline-flex;
  margin-top: 16px;
  font-size: var(--aat-type-control);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 1199.98px) {
  .account-copy {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  :root {
    --suite-rail-width: 64px;
    --app-header-height: 64px;
  }

  .aat-shell {
    grid-template-columns: var(--suite-rail-width) minmax(0, 1fr);
    grid-template-rows: var(--app-header-height) minmax(0, 1fr);
  }

  .suite-rail {
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .suite-link {
    min-height: 54px;
    font-size: 9px;
  }

  .app-header {
    grid-column: 2;
    padding: 0 16px;
  }

  .app-menu-toggle {
    display: inline-flex;
  }

  .app-context {
    margin-right: auto;
  }

  .app-search {
    width: min(300px, 32vw);
  }

  .app-navigation {
    z-index: 45;
    inset:
      var(--app-header-height) auto 0
      var(--suite-rail-width);
    transform: translateX(-105%);
    box-shadow: var(--aat-shadow);
    transition: transform 160ms ease;
  }

  body.is-app-menu-open .app-navigation {
    transform: translateX(0);
  }

  .app-navigation-scrim {
    position: fixed;
    z-index: 40;
    inset:
      var(--app-header-height) 0 0
      var(--suite-rail-width);
    display: block;
    border: 0;
    background: rgb(24 26 31 / 36%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
  }

  body.is-app-menu-open .app-navigation-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .app-workspace {
    grid-column: 2;
  }

  .app-main {
    padding: 16px;
  }
}

@media (max-width: 767.98px) {
  :root {
    --aat-type-display: 28px;
    --aat-type-heading: 19px;
  }

  .app-header {
    gap: 10px;
    padding: 0 12px;
  }

  .app-context span,
  .app-search,
  .header-icon-button {
    display: none;
  }

  .app-context strong {
    font-size: 15px;
  }

  .page-heading,
  .migration-page-heading,
  .migration-panel-header,
  .migration-decision-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .migration-filter-grid,
  .migration-summary-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .work-panel,
  .migration-panel,
  .dashboard-card {
    padding: 16px;
  }
}

/* Customer directory workspace. */
.customer-workspace-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.customer-workspace-heading h1 {
  margin: 2px 0 4px;
  font-size: var(--aat-type-display);
  font-weight: var(--aat-weight-semibold);
  letter-spacing: -0.035em;
}

.customer-workspace-heading > div > p:last-child {
  max-width: 640px;
  margin: 0;
  color: var(--aat-text-muted);
}

.customer-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--aat-border);
  border-radius: 12px;
  background: var(--aat-surface);
  box-shadow: 0 4px 14px rgb(34 30 44 / 4%);
}

.customer-metric-strip article {
  display: grid;
  min-height: 112px;
  align-content: center;
  gap: 1px;
  padding: 18px 22px;
  border-right: 1px solid var(--aat-border);
}

.customer-metric-strip article:last-child {
  border-right: 0;
}

.customer-metric-strip span,
.customer-metric-strip small {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-metric-strip strong {
  color: var(--aat-text);
  font-size: var(--aat-type-metric);
  font-weight: var(--aat-weight-semibold);
  line-height: 1.25;
}

.customer-metric-strip .customer-metric-highlight {
  background: var(--app-accent-soft);
}

.customer-metric-highlight strong,
.customer-metric-highlight span {
  color: var(--app-accent-dark);
}

.customer-directory {
  overflow: hidden;
  border: 1px solid var(--aat-border);
  border-radius: 12px;
  background: var(--aat-surface);
  box-shadow: 0 4px 14px rgb(34 30 44 / 4%);
}

.customer-directory-toolbar {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
}

.customer-directory-toolbar h2 {
  margin: 1px 0 0;
  font-size: var(--aat-type-heading);
  font-weight: var(--aat-weight-semibold);
}

.customer-directory-search {
  position: relative;
  display: flex;
  width: min(100%, 560px);
  align-items: center;
  gap: 7px;
}

.customer-directory-search > svg {
  position: absolute;
  z-index: 1;
  left: 13px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--aat-text-muted);
  stroke-linecap: round;
  stroke-width: 2;
  pointer-events: none;
}

.customer-directory-search input {
  min-width: 180px;
  height: 42px;
  flex: 1 1 auto;
  border: 1px solid var(--aat-border);
  border-radius: 8px;
  background: var(--aat-surface-soft);
  padding: 0 13px 0 40px;
}

.customer-directory-search input:focus {
  border-color: var(--app-accent);
  outline: 0;
  box-shadow: 0 0 0 3px var(--app-focus-ring);
}

.customer-directory-search button,
.customer-directory-search a {
  display: inline-flex;
  height: 38px;
  align-items: center;
  border: 0;
  border-radius: 7px;
  padding: 0 13px;
  font-size: var(--aat-type-control);
  font-weight: var(--aat-weight-semibold);
  text-decoration: none;
}

.customer-directory-search button {
  background: var(--app-accent);
  color: #fff;
}

.customer-directory-search a {
  color: var(--app-accent-dark);
}

.customer-saved-views {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--aat-border);
  padding: 8px 22px;
  scrollbar-width: thin;
}

.customer-saved-views > span {
  flex: 0 0 auto;
  margin-right: 4px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
}

.customer-saved-views a {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--aat-border);
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--aat-text);
  font-size: var(--aat-type-small);
  text-decoration: none;
  white-space: nowrap;
}

.customer-saved-views a:hover,
.customer-saved-views a:focus-visible {
  border-color: var(--app-accent);
  outline: 0;
}

.customer-saved-views a.active {
  border-color: var(--app-accent);
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
  box-shadow: inset 0 0 0 1px var(--app-accent);
}

.customer-saved-views strong {
  min-width: 24px;
  border-radius: 999px;
  background: rgb(34 30 44 / 7%);
  padding: 2px 7px;
  font-size: 11px;
  font-weight: var(--aat-weight-semibold);
  text-align: center;
}

.customer-directory-meta {
  display: flex;
  min-height: 39px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--aat-border);
  border-bottom: 1px solid var(--aat-border);
  background: var(--aat-surface-soft);
  padding: 8px 22px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-record-list {
  display: grid;
}

.customer-record {
  display: grid;
  min-height: 94px;
  grid-template-columns: 46px minmax(190px, 1.25fr)
    minmax(300px, 2fr) minmax(210px, 1fr) 22px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--aat-border);
  padding: 14px 22px;
  color: var(--aat-text);
  text-decoration: none;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.customer-record:hover,
.customer-record:focus-visible {
  position: relative;
  z-index: 1;
  background: #fafaff;
  color: var(--aat-text);
  outline: 0;
  box-shadow: inset 3px 0 0 var(--app-accent);
}

.customer-record-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  place-items: center;
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
  font-size: var(--aat-type-subheading);
  font-weight: var(--aat-weight-semibold);
}

.customer-record-identity,
.customer-record-context {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.customer-record-identity > strong {
  overflow: hidden;
  font-size: var(--aat-type-subheading);
  font-weight: var(--aat-weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-record-identity > span {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-record-identity i {
  padding-inline: 3px;
  font-style: normal;
}

.customer-health-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: var(--aat-weight-semibold);
  line-height: 1.2;
}

.customer-health-badge i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentcolor;
}

.customer-health-badge.complete {
  background: #e7f6ed;
  color: #176b3b;
}

.customer-health-badge.address-review {
  background: #fff4dc;
  color: #8c5d08;
}

.customer-health-badge.missing-information {
  background: #f2efff;
  color: #5635a5;
}

.customer-health-badge.duplicate-review {
  background: #fdecec;
  color: #a12c2c;
}

.customer-country-chip {
  background: #f1f0f3;
  font-weight: var(--aat-weight-semibold);
}

.customer-multi-brand-chip {
  border: 1px solid color-mix(
    in srgb,
    var(--app-accent) 30%,
    var(--aat-border));
  background: transparent;
  color: var(--app-accent-dark);
}

.customer-record-coverage {
  display: grid;
  grid-template-columns: repeat(3, minmax(54px, 1fr));
  gap: 8px;
}

.customer-record-coverage > span {
  display: grid;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
  text-align: center;
}

.customer-record-coverage strong {
  color: var(--aat-text);
  font-size: var(--aat-type-subheading);
  font-weight: var(--aat-weight-semibold);
}

.customer-record-open {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--aat-text-muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.customer-record:hover .customer-record-open,
.customer-record:focus-visible .customer-record-open {
  stroke: var(--app-accent);
}

.customer-directory-empty {
  min-height: 300px;
  border: 0;
  border-radius: 0;
}

.customer-directory-footer {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-directory-footer nav {
  display: flex;
  gap: 8px;
}

.customer-directory-footer nav a,
.customer-directory-footer nav span {
  display: inline-flex;
  min-width: 74px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--aat-border);
  border-radius: 7px;
  padding: 6px 10px;
  text-decoration: none;
}

.customer-directory-footer nav a {
  color: var(--app-accent-dark);
}

.customer-directory-footer nav span {
  color: var(--aat-text-muted);
  opacity: 0.6;
}

@media (max-width: 1100px) {
  .customer-record {
    grid-template-columns: 46px minmax(180px, 1fr)
      minmax(260px, 1.5fr) 22px;
  }

  .customer-record-coverage {
    display: none;
  }
}

@media (max-width: 820px) {
  .customer-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-metric-strip article:nth-child(2) {
    border-right: 0;
  }

  .customer-metric-strip article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--aat-border);
  }

  .customer-directory-toolbar,
  .customer-workspace-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-directory-search {
    width: 100%;
  }

  .customer-saved-views {
    padding-inline: 16px;
  }

  .customer-record {
    grid-template-columns: 42px minmax(0, 1fr) 20px;
  }

  .customer-record-context {
    grid-column: 2 / 3;
  }

  .customer-record-open {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 540px) {
  .customer-metric-strip {
    grid-template-columns: 1fr;
  }

  .customer-metric-strip article,
  .customer-metric-strip article:nth-child(2) {
    min-height: 90px;
    border-right: 0;
    border-bottom: 1px solid var(--aat-border);
  }

  .customer-directory-search {
    flex-wrap: wrap;
  }

  .customer-directory-search input {
    flex-basis: calc(100% - 60px);
  }

  .customer-directory-meta,
  .customer-directory-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-record {
    padding-inline: 14px;
  }

  .customer-record-avatar {
    width: 38px;
    height: 38px;
  }
}

/* Full Customer 360 record workspace. */
.customer-breadcrumb svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.customer-object-header {
  display: flex;
  min-height: 186px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid var(--aat-border);
  border-radius: 12px 12px 0 0;
  background: var(--aat-surface);
  padding: 26px;
}

.customer-object-primary {
  display: flex;
  min-width: 0;
  gap: 18px;
}

.customer-object-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 14px;
  place-items: center;
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
  font-size: 22px;
  font-weight: var(--aat-weight-semibold);
}

.customer-object-primary > div {
  min-width: 0;
}

.customer-object-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.customer-object-title h1 {
  margin: 0 6px 0 0;
  font-size: 27px;
  font-weight: var(--aat-weight-semibold);
  letter-spacing: -0.035em;
}

.customer-state {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: var(--aat-type-small);
  font-style: normal;
  font-weight: var(--aat-weight-semibold);
  text-transform: capitalize;
}

.customer-state-active {
  background: #e8f7ed;
  color: #176635;
}

.customer-state-brand {
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
}

.customer-object-primary > div > p {
  margin: 6px 0 20px;
  color: var(--aat-text-muted);
  text-transform: capitalize;
}

.customer-object-primary > div > p i {
  padding-inline: 5px;
  font-style: normal;
}

.customer-object-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.customer-object-facts > span {
  display: grid;
  min-width: 140px;
  gap: 2px;
}

.customer-object-facts small {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-object-facts strong {
  overflow: hidden;
  max-width: 250px;
  font-weight: var(--aat-weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-object-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.customer-object-actions button:disabled,
.customer-section-panel > header button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.customer-more-action {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid var(--aat-border);
  border-radius: 7px;
  place-items: center;
  background: var(--aat-surface);
  color: var(--aat-text-muted);
}

.customer-more-action svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.customer-workspace-tabs {
  display: flex;
  min-height: 51px;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  border: 1px solid var(--aat-border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--aat-surface);
  padding: 0 16px;
}

.customer-workspace-tabs a,
.customer-workspace-tabs > span {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-medium);
  text-decoration: none;
}

.customer-workspace-tabs a:hover,
.customer-workspace-tabs a:focus-visible {
  color: var(--app-accent-dark);
}

.customer-workspace-tabs a.active {
  color: var(--app-accent-dark);
  font-weight: var(--aat-weight-semibold);
}

.customer-workspace-tabs a.active::after {
  position: absolute;
  right: 9px;
  bottom: 0;
  left: 9px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--app-accent);
  content: "";
}

.customer-workspace-tabs > span[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.48;
}

.customer-workspace-tabs small {
  display: grid;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  place-items: center;
  background: var(--aat-surface-soft);
  font-size: 10px;
}

.customer-overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--aat-border);
  border-radius: 10px;
  background: var(--aat-surface);
}

.customer-overview-metrics article {
  display: grid;
  min-height: 90px;
  align-content: center;
  gap: 1px;
  border-right: 1px solid var(--aat-border);
  padding: 14px 20px;
}

.customer-overview-metrics article:last-child {
  border-right: 0;
}

.customer-overview-metrics span,
.customer-overview-metrics small {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-overview-metrics strong {
  font-size: 21px;
  font-weight: var(--aat-weight-semibold);
}

.customer-overview-layout,
.customer-accounts-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}

.customer-overview-main,
.customer-overview-side {
  display: grid;
  gap: 18px;
}

.customer-work-panel {
  overflow: hidden;
  border: 1px solid var(--aat-border);
  border-radius: 11px;
  background: var(--aat-surface);
  box-shadow: 0 3px 10px rgb(34 30 44 / 3%);
}

.customer-work-panel > header {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--aat-border);
  padding: 14px 18px;
}

.customer-work-panel > header h2 {
  margin: 1px 0 0;
  font-size: var(--aat-type-heading);
  font-weight: var(--aat-weight-semibold);
}

.customer-work-panel > header p:last-child {
  margin: 4px 0 0;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-work-panel > header > a {
  color: var(--app-accent-dark);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
  text-decoration: none;
}

.customer-summary-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.customer-summary-cards article {
  display: grid;
  min-height: 118px;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--aat-border);
  border-radius: 9px;
  background: var(--aat-surface-soft);
  padding: 14px;
}

.customer-summary-cards svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--app-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.customer-summary-cards article > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.customer-summary-cards small,
.customer-summary-cards em {
  overflow: hidden;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-summary-cards strong {
  overflow: hidden;
  font-weight: var(--aat-weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-summary-cards a {
  grid-column: 2;
  color: var(--app-accent-dark);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
  text-decoration: none;
}

.customer-pending-badge {
  border-radius: 999px;
  background: #fff5df;
  padding: 4px 9px;
  color: #7a5210;
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
}

.customer-commercial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-commercial-grid article {
  display: grid;
  min-height: 116px;
  align-content: center;
  gap: 2px;
  border-right: 1px solid var(--aat-border);
  padding: 16px;
}

.customer-commercial-grid article:last-child {
  border-right: 0;
}

.customer-commercial-grid small,
.customer-commercial-grid span {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-commercial-grid strong {
  font-size: 20px;
  font-weight: var(--aat-weight-semibold);
}

.customer-workspace-empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  padding: 24px;
  color: var(--aat-text-muted);
  text-align: center;
}

.customer-workspace-empty svg {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  fill: none;
  stroke: var(--aat-text-muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.customer-workspace-empty strong {
  color: var(--aat-text);
}

.customer-workspace-empty p {
  max-width: 470px;
  margin: 5px 0 0;
  font-size: var(--aat-type-small);
}

.customer-brand-account-list,
.customer-entity-list {
  display: grid;
}

.customer-brand-account-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--aat-border);
  padding: 12px 16px;
}

.customer-brand-account-list article:last-child {
  border-bottom: 0;
}

.customer-brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  place-items: center;
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
}

.customer-brand-account-list article > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.customer-brand-account-list strong {
  overflow: hidden;
  font-size: var(--aat-type-small);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-brand-account-list small {
  color: var(--aat-text-muted);
}

.customer-link-state {
  border-radius: 999px;
  background: #e8f7ed;
  padding: 3px 7px;
  color: #176635;
  font-size: 10px;
  font-style: normal;
  font-weight: var(--aat-weight-semibold);
}

.customer-entity-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 12px;
  border-bottom: 1px solid var(--aat-border);
  padding: 12px 16px;
}

.customer-entity-list article:last-child {
  border-bottom: 0;
}

.customer-entity-list strong {
  font-weight: var(--aat-weight-semibold);
}

.customer-entity-list span {
  color: var(--app-accent-dark);
  font-weight: var(--aat-weight-semibold);
}

.customer-entity-list small {
  grid-column: 1 / -1;
  color: var(--aat-text-muted);
  text-transform: capitalize;
}

.customer-readiness-panel ul,
.customer-integration-list {
  display: grid;
  margin: 0;
  padding: 10px 16px 14px;
  list-style: none;
}

.customer-readiness-panel li {
  position: relative;
  padding: 7px 4px 7px 24px;
  font-size: var(--aat-type-small);
}

.customer-readiness-panel li::before {
  position: absolute;
  top: 9px;
  left: 3px;
  display: grid;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  place-items: center;
  color: #fff;
  content: "✓";
  font-size: 9px;
}

.customer-readiness-panel li.ready::before {
  background: #21834a;
}

.customer-readiness-panel li.pending::before {
  background: #b98017;
  content: "!";
}

.customer-readiness-panel li.review::before {
  background: #b04b42;
  content: "!";
}

.customer-health-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  margin: 0 16px 16px;
  border-radius: 7px;
  background: var(--app-accent);
  padding: 8px 13px;
  color: #fff;
  font-size: var(--aat-type-control);
  font-weight: var(--aat-weight-semibold);
  text-decoration: none;
}

.customer-health-action:hover,
.customer-health-action:focus-visible {
  background: var(--app-accent-dark);
  color: #fff;
  outline: 0;
}

.customer-object-eyebrow {
  margin: 0 0 2px;
}

.customer-section-panel {
  margin-top: 18px;
}

.customer-account-channel-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  border-bottom: 1px solid var(--aat-border);
  background: var(--aat-surface-soft);
  padding: 12px 18px;
}

.customer-account-channel-strip > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.customer-account-channel-strip small {
  color: var(--aat-text-muted);
}

.customer-account-channel-strip em {
  border-radius: 999px;
  background: var(--app-accent-soft);
  padding: 2px 6px;
  color: var(--app-accent-dark);
  font-size: 10px;
  font-style: normal;
}

.customer-contact-directory {
  display: grid;
}

.customer-contact-directory > article {
  display: grid;
  min-height: 86px;
  grid-template-columns: 42px minmax(180px, 0.8fr) minmax(260px, 1.4fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--aat-border);
  padding: 13px 18px;
}

.customer-contact-directory > article:last-child {
  border-bottom: 0;
}

.customer-contact-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  place-items: center;
  background: var(--aat-surface-soft);
  color: var(--app-accent-dark);
  font-weight: var(--aat-weight-semibold);
}

.customer-contact-identity,
.customer-contact-channels {
  display: grid;
  gap: 2px;
}

.customer-contact-identity strong {
  font-weight: var(--aat-weight-semibold);
}

.customer-contact-identity span,
.customer-contact-identity small,
.customer-contact-channels small {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-contact-identity small {
  color: var(--app-accent-dark);
  font-weight: var(--aat-weight-semibold);
}

.customer-contact-channels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
}

.customer-contact-channels > span {
  display: grid;
  overflow-wrap: anywhere;
}

.customer-address-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.customer-address-directory > article {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  border: 1px solid var(--aat-border);
  border-radius: 9px;
  background: var(--aat-surface-soft);
  padding: 15px;
}

.customer-address-directory article > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.customer-address-directory header > span:first-child {
  display: grid;
}

.customer-address-directory header small,
.customer-address-label {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-address-directory address {
  margin: 16px 0;
  font-style: normal;
}

.customer-address-directory article > footer {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid var(--aat-border);
  padding-top: 9px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-card-edit {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--app-accent);
  border-radius: 7px;
  padding: 6px 12px;
  color: var(--app-accent-dark);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
  text-decoration: none;
}

.customer-card-edit:hover,
.customer-card-edit:focus-visible {
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
}

.customer-address-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customer-edit-success,
.customer-edit-notice,
.customer-edit-validation {
  border-radius: 8px;
  padding: 11px 14px;
}

.customer-edit-success {
  margin-bottom: 14px;
  border: 1px solid #9ccbb0;
  background: #edf8f1;
  color: #195c35;
}

.customer-edit-shell {
  width: min(920px, 100%);
}

.customer-edit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.customer-edit-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.customer-edit-header p:last-child {
  margin: 5px 0 0;
  color: var(--aat-text-muted);
}

.customer-edit-context {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.customer-edit-context span {
  border-radius: 999px;
  background: var(--aat-surface-soft);
  padding: 5px 9px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-edit-notice {
  margin-bottom: 16px;
  border: 1px solid #a9c7ea;
  background: #f0f7ff;
  color: #24496f;
}

.customer-edit-form {
  display: grid;
  gap: 16px;
}

.customer-edit-validation:empty {
  display: none;
}

.customer-edit-validation {
  border: 1px solid #e0a8a8;
  background: #fff1f1;
  color: #842029;
}

.customer-edit-validation ul {
  margin: 0;
}

.customer-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.customer-edit-field {
  display: grid;
  gap: 6px;
  color: var(--aat-text);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
}

.customer-edit-field-wide {
  grid-column: 1 / -1;
}

.customer-edit-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--aat-border-strong);
  border-radius: 7px;
  background: var(--aat-surface);
  padding: 8px 10px;
  color: var(--aat-text);
  font: inherit;
  font-weight: var(--aat-weight-regular);
}

.customer-edit-field input:focus {
  outline: 2px solid var(--app-accent-soft);
  border-color: var(--app-accent);
}

.customer-edit-field > span:last-child:not(:empty) {
  color: #a12622;
  font-weight: var(--aat-weight-regular);
}

.customer-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.customer-source-account-table {
  display: grid;
  overflow-x: auto;
}

.customer-source-account-head,
.customer-source-account-row {
  display: grid;
  min-width: 760px;
  grid-template-columns: 1.35fr 1.1fr 0.8fr 0.85fr 0.55fr;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--aat-border);
  padding: 11px 18px;
}

.customer-source-account-head {
  background: var(--aat-surface-soft);
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
}

.customer-source-account-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-source-account-row .customer-link-state {
  justify-self: start;
}

.customer-integration-list {
  padding: 0;
}

.customer-integration-list li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--aat-border);
  padding: 13px 16px;
}

.customer-integration-list li:last-child {
  border-bottom: 0;
}

.customer-integration-mark {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  place-items: center;
  color: #fff;
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
}

.customer-integration-mark.bc {
  background: #198c9d;
}

.customer-integration-mark.web {
  background: var(--app-accent);
}

.customer-integration-mark.xero {
  background: #16a7df;
}

.customer-integration-list li > span:nth-child(2) {
  display: grid;
}

.customer-integration-list small {
  color: var(--aat-text-muted);
}

.customer-integration-list em {
  color: var(--aat-text-muted);
  font-size: 10px;
  font-style: normal;
}

.customer-integration-list em.connected {
  color: #176635;
  font-weight: var(--aat-weight-semibold);
}

@media (max-width: 1100px) {
  .customer-object-header {
    flex-direction: column;
  }

  .customer-commercial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-commercial-grid article:nth-child(2) {
    border-right: 0;
  }

  .customer-commercial-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--aat-border);
  }

  .customer-address-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .customer-overview-layout,
  .customer-accounts-layout {
    grid-template-columns: 1fr;
  }

  .customer-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-overview-metrics article:nth-child(2) {
    border-right: 0;
  }

  .customer-overview-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--aat-border);
  }

  .customer-contact-directory > article {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .customer-contact-channels {
    grid-column: 2;
  }

  .customer-contact-directory .customer-card-edit {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .customer-object-header {
    padding: 18px 14px;
  }

  .customer-object-primary {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-object-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .customer-object-facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .customer-summary-cards,
  .customer-address-directory {
    grid-template-columns: 1fr;
  }

  .customer-edit-header {
    flex-direction: column;
  }

  .customer-edit-context {
    justify-content: flex-start;
  }

  .customer-edit-grid {
    grid-template-columns: 1fr;
  }

  .customer-edit-field-wide {
    grid-column: auto;
  }

  .customer-commercial-grid,
  .customer-overview-metrics {
    grid-template-columns: 1fr;
  }

  .customer-commercial-grid article,
  .customer-commercial-grid article:nth-child(2),
  .customer-overview-metrics article,
  .customer-overview-metrics article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--aat-border);
  }

  .customer-contact-channels {
    grid-template-columns: 1fr;
  }

  .customer-account-channel-strip {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  .account-menu summary {
    padding: 0;
  }

  .app-navigation {
    width: calc(100vw - var(--suite-rail-width));
  }

  .app-main {
    padding: 12px;
  }

  .migration-candidate-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Approved compact AAT Suite shell: launcher header + one app menu. */
:root {
  --app-header-height: 68px;
  --app-navigation-width: 194px;
}

.aat-shell {
  display: block;
  min-height: 100vh;
}

.app-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  display: flex;
  width: 100%;
  height: var(--app-header-height);
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  border-bottom: 1px solid var(--aat-border);
  background: rgb(255 255 255 / 98%);
  padding: 0;
  backdrop-filter: blur(10px);
}

.suite-launcher {
  position: relative;
  width: 58px;
  height: var(--app-header-height);
  flex: 0 0 58px;
  border-right: 1px solid var(--aat-border);
}

.suite-launcher > summary {
  display: grid;
  width: 100%;
  height: 100%;
  cursor: pointer;
  list-style: none;
  place-items: center;
  color: var(--aat-text);
}

.suite-launcher > summary::-webkit-details-marker {
  display: none;
}

.suite-launcher > summary:hover,
.suite-launcher > summary:focus-visible {
  background: var(--aat-surface-soft);
  color: var(--aat-primary-dark);
}

.suite-launcher > summary svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.suite-launcher-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  left: 8px;
  display: grid;
  width: 310px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--aat-border);
  border-radius: var(--aat-radius);
  background: #fff;
  box-shadow: var(--aat-shadow);
  padding: 12px;
}

.suite-launcher-popover a,
.suite-launcher-popover span {
  display: grid;
  min-height: 58px;
  place-items: center;
  border-radius: 8px;
  padding: 8px;
  color: var(--aat-text);
  font-size: var(--aat-type-small);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
}

.suite-launcher-popover a:hover,
.suite-launcher-popover a:focus-visible,
.suite-launcher-popover a.active {
  background: var(--aat-primary-soft);
  color: var(--aat-primary-dark);
}

.suite-launcher-popover span[aria-disabled="true"] {
  color: #aaa6b0;
}

.app-context {
  display: flex;
  min-width: 174px;
  height: 100%;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  line-height: 1;
}

.app-context span {
  color: var(--aat-primary);
  font-size: var(--aat-type-eyebrow);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-context strong {
  border-left: 1px solid var(--aat-border);
  padding-left: 12px;
  font-size: var(--aat-type-control);
  font-weight: 600;
}

.app-header-actions {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 16px;
  padding-right: 18px;
}

.app-search {
  width: min(424px, 42vw);
  height: 40px;
  margin-right: auto;
  border: 1px solid var(--aat-border);
  border-radius: 8px;
  background: #fbfaff;
  padding: 0 12px;
}

.app-search input {
  order: 1;
}

.app-search svg {
  order: 2;
  width: 18px;
  height: 18px;
}

.account-menu summary {
  min-height: 40px;
  padding: 2px;
}

.account-avatar {
  width: 34px;
  height: 34px;
}

.app-navigation {
  position: fixed;
  z-index: 35;
  inset: var(--app-header-height) auto 0 0;
  display: grid;
  width: var(--app-navigation-width);
  grid-template-rows: minmax(0, 1fr) auto;
  border-right: 1px solid var(--aat-border);
  background: #fff;
}

.app-navigation-links {
  display: grid;
  align-content: start;
  gap: 5px;
  overflow-y: auto;
  padding: 18px 12px;
}

.app-navigation-link {
  min-height: 42px;
  gap: 11px;
  border-radius: 7px;
  padding: 9px 11px;
}

.app-navigation-link svg {
  width: 20px;
  height: 20px;
}

.app-navigation-link.active {
  border-left: 3px solid var(--aat-primary);
  background: var(--aat-primary-soft);
  color: var(--aat-primary-dark);
  font-weight: 600;
  padding-left: 8px;
}

.app-navigation-footer {
  padding: 12px 18px 16px;
}

.app-workspace {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--app-navigation-width);
  padding-top: var(--app-header-height);
}

.app-main {
  width: min(100%, 1280px);
  min-width: 0;
  margin: 0 auto;
  padding: 24px;
}

@media (max-width: 991.98px) {
  :root {
    --app-header-height: 64px;
  }

  .app-menu-toggle {
    display: inline-flex;
    flex: 0 0 40px;
    margin-left: 10px;
  }

  .app-context {
    min-width: auto;
    margin-right: 12px;
    padding-inline: 12px;
  }

  .app-search {
    width: min(360px, 42vw);
  }

  .app-navigation {
    z-index: 55;
    inset: var(--app-header-height) auto 0 0;
    transform: translateX(-105%);
    box-shadow: var(--aat-shadow);
    transition: transform 160ms ease;
  }

  body.is-app-menu-open .app-navigation {
    transform: translateX(0);
  }

  .app-navigation-scrim {
    position: fixed;
    z-index: 45;
    inset: var(--app-header-height) 0 0 0;
    display: block;
    border: 0;
    background: rgb(24 26 31 / 36%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
  }

  body.is-app-menu-open .app-navigation-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .app-workspace {
    margin-left: 0;
  }
}

@media (max-width: 767.98px) {
  .suite-launcher {
    width: 52px;
    flex-basis: 52px;
  }

  .suite-launcher-popover {
    width: min(310px, calc(100vw - 16px));
  }

  .app-context span,
  .app-search {
    display: none;
  }

  .app-context strong {
    border-left: 0;
    padding-left: 0;
  }

  .app-header-actions {
    justify-content: flex-end;
    padding-right: 12px;
  }

  .app-main {
    padding: 16px 12px;
  }
}

/* Canonical AAT.Suite.UI launcher-shell formatting. */
:root {
  --aat-type-display: 30px;
  --aat-type-metric: 23.25px;
  --aat-type-heading: 18px;
  --aat-type-subheading: 14px;
  --aat-type-body: 13px;
  --aat-type-control: 13px;
  --aat-type-dense: 13px;
  --aat-type-small: 11px;
  --aat-type-eyebrow: 10px;
  --aat-weight-regular: 400;
  --aat-weight-medium: 500;
  --aat-weight-semibold: 600;
  --app-accent: #3154b8;
  --app-accent-dark: #243f91;
  --app-accent-soft: #edf2ff;
  --app-focus-ring: rgb(49 84 184 / 16%);
  --suite-rail: 0px;
  --app-sidebar-width: 236px;
  --app-topbar-height: 70px;
}

body.aat-app {
  overflow-x: hidden;
  background: var(--aat-canvas);
  color: var(--aat-text);
  font-family: var(--aat-font-sans);
  font-size: var(--aat-type-body);
  font-weight: var(--aat-weight-regular);
  line-height: 1.5;
}

.aat-icon {
  width: var(--aat-icon-size, 1.25em);
  height: var(--aat-icon-size, 1.25em);
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  vertical-align: -0.2em;
}

.aat-header {
  min-height: var(--app-topbar-height);
}

.suite-launcher {
  position: fixed;
  z-index: 60;
  inset: 0 auto auto 0;
  width: auto;
  height: auto;
  border: 0;
}

.suite-launcher-button {
  display: grid;
  width: var(--app-topbar-height);
  height: var(--app-topbar-height);
  padding: 0;
  border: 0;
  border-right: 1px solid var(--aat-border);
  border-bottom: 1px solid var(--aat-border);
  place-items: center;
  background: var(--aat-surface);
  color: var(--aat-text);
}

.suite-launcher-button:hover,
.suite-launcher-button:focus-visible,
.suite-launcher-button[aria-expanded="true"] {
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
  outline: 0;
}

.suite-launcher-button:focus-visible {
  box-shadow: inset 0 0 0 3px var(--app-focus-ring);
}

.suite-launcher-grid {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  gap: 3px;
}

.suite-launcher-grid i {
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
}

.suite-launcher-panel {
  position: fixed;
  z-index: 80;
  inset: var(--app-topbar-height) auto auto 0;
  width: min(420px, calc(100vw - 20px));
  max-height: calc(100vh - var(--app-topbar-height) - 14px);
  padding: 22px;
  overflow-y: auto;
  border: 1px solid var(--aat-border);
  border-top: 0;
  border-radius: 0 0 14px 0;
  background: var(--aat-surface);
  box-shadow: 0 18px 48px rgb(29 25 43 / 20%);
}

.suite-launcher-panel[hidden] {
  display: none;
}

.suite-launcher-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.suite-launcher-header > span:last-child {
  display: grid;
}

.suite-launcher-header strong {
  color: var(--aat-text);
  font-size: var(--aat-type-heading);
  font-weight: var(--aat-weight-semibold);
}

.suite-launcher-header small {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.suite-launcher-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  place-items: center;
  background: linear-gradient(145deg, #4b3a78, #7659c7);
  color: #fff;
}

.suite-launcher-mark svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.suite-launcher-search {
  position: relative;
  display: block;
  margin-bottom: 18px;
}

.suite-launcher-search .aat-icon {
  position: absolute;
  top: 11px;
  left: 12px;
  color: var(--aat-text-muted);
  pointer-events: none;
}

.suite-launcher-search input {
  width: 100%;
  height: 42px;
  padding: 0 13px 0 40px;
  border: 1px solid var(--aat-border-strong);
  border-radius: 8px;
  background: var(--aat-surface);
  color: var(--aat-text);
}

.suite-launcher-search input:focus {
  border-color: var(--app-accent);
  outline: 0;
  box-shadow: 0 0 0 3px var(--app-focus-ring);
}

.suite-launcher-apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.suite-launcher-app,
.suite-launcher-app:visited {
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--aat-text);
  text-decoration: none;
}

a.suite-launcher-app:hover,
a.suite-launcher-app:focus-visible {
  border-color: var(--aat-border);
  background: var(--aat-canvas);
  color: var(--app-accent-dark);
  outline: 0;
}

.suite-launcher-app.active {
  border-color: color-mix(
    in srgb,
    var(--app-accent) 24%,
    var(--aat-border));
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
}

.suite-launcher-app.unavailable {
  color: var(--aat-text-muted);
  cursor: not-allowed;
  opacity: 0.58;
}

.suite-launcher-app[hidden] {
  display: none;
}

.suite-launcher-app > span:last-child {
  display: grid;
  min-width: 0;
}

.suite-launcher-app strong {
  overflow-wrap: break-word;
  color: inherit;
  font-size: var(--aat-type-body);
  font-weight: var(--aat-weight-semibold);
  line-height: 1.25;
  white-space: normal;
}

.suite-launcher-app small {
  color: var(--aat-text-muted);
  font-size: 11px;
}

.suite-launcher-app-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
  place-items: center;
  background: var(--aat-surface-soft);
  color: var(--app-accent-dark);
}

.suite-launcher-app.active .suite-launcher-app-icon {
  background: var(--app-accent);
  color: #fff;
}

.suite-launcher-app-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.suite-launcher-empty {
  margin: 18px 0 4px;
  color: var(--aat-text-muted);
  text-align: center;
}

.app-topbar {
  position: fixed;
  z-index: 35;
  inset: 0 0 auto 0;
  display: flex;
  height: var(--app-topbar-height);
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--aat-border);
  background: var(--aat-surface);
  box-shadow: 0 1px 3px rgb(27 25 32 / 4%);
  padding: 0 28px 0 88px;
}

.app-context {
  display: flex;
  min-width: 0;
  height: auto;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 0;
  color: var(--aat-text);
  line-height: 1;
  white-space: nowrap;
}

.app-context span {
  border: 0;
  border-right: 1px solid var(--aat-border);
  padding: 0 12px 0 0;
  color: var(--app-accent);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
  letter-spacing: 0.08em;
}

.app-context strong {
  border: 0;
  padding: 0;
  font-size: var(--aat-type-subheading);
  font-weight: var(--aat-weight-semibold);
}

.app-search {
  position: relative;
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin-right: auto;
  border: 0;
  background: transparent;
  padding: 0;
}

.app-search input {
  width: 100%;
  height: 40px;
  padding: 0 46px 0 15px;
  border: 1px solid var(--aat-border);
  border-radius: 8px;
  outline: 0;
  background: var(--aat-surface-soft);
  color: var(--aat-text);
}

.app-search button {
  position: absolute;
  top: 4px;
  right: 5px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  place-items: center;
  background: transparent;
  color: var(--aat-text-muted);
}

.app-search svg {
  width: 18px;
  height: 18px;
}

.account-avatar {
  width: 38px;
  height: 38px;
  background: var(--app-accent);
}

.app-sidebar {
  position: fixed;
  z-index: 25;
  inset: var(--app-topbar-height) auto 0 0;
  display: flex;
  width: var(--app-sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--aat-border);
  background: var(--aat-surface);
  transition: width 180ms ease;
}

.app-sidebar .app-navigation {
  position: static;
  display: grid;
  width: auto;
  flex: 0 0 auto;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 18px 12px;
}

.app-nav-link {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 13px;
  padding: 9px 13px;
  border-radius: 8px;
  color: #4d4a53;
  font-size: var(--aat-type-body);
  font-weight: var(--aat-weight-medium);
  text-decoration: none;
}

.app-nav-link svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.app-nav-link:hover,
.app-nav-link:focus-visible {
  background: #f4f3f5;
  color: var(--app-accent-dark);
}

.app-nav-link.active {
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
  box-shadow: inset 3px 0 0 var(--app-accent);
}

.app-sidebar-toggle {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0;
  place-items: center;
  align-self: flex-end;
  margin: auto 0 12px;
  border: 1px solid var(--aat-border);
  border-right: 0;
  border-radius: var(--aat-radius-small) 0 0
    var(--aat-radius-small);
  background: var(--aat-canvas);
  color: var(--aat-text-muted);
}

.app-sidebar-toggle:hover,
.app-sidebar-toggle:focus-visible {
  border-color: var(--app-accent);
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
  outline: 3px solid var(--app-focus-ring);
}

.app-sidebar-toggle .aat-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 160ms ease;
}

.app-workspace {
  min-width: 0;
  min-height: calc(100vh - var(--app-topbar-height));
  margin-top: var(--app-topbar-height);
  margin-left: var(--app-sidebar-width);
  padding: 22px 28px 52px;
  transition: margin-left 180ms ease;
}

.app-main {
  width: 100%;
  max-width: 1500px;
  min-width: 0;
  margin-inline: auto;
  padding: 0;
}

.app-sidebar-collapsed .app-sidebar {
  width: 36px;
}

.app-sidebar-collapsed .app-navigation {
  display: none;
}

.app-sidebar-collapsed .app-sidebar-toggle {
  align-self: flex-start;
  border-right: 1px solid var(--aat-border);
  border-left: 0;
  border-radius: 0 var(--aat-radius-small)
    var(--aat-radius-small) 0;
}

.app-sidebar-collapsed .app-sidebar-toggle .aat-icon {
  transform: rotate(180deg);
}

.app-sidebar-collapsed .app-workspace {
  margin-left: 36px;
}

@media (max-width: 900px) {
  :root {
    --app-sidebar-width: 210px;
  }

  .app-topbar {
    gap: 16px;
    padding-inline: 18px;
    padding-left: 88px;
  }

  .app-context strong {
    display: none;
  }
}

@media (max-width: 720px) {
  :root {
    --app-sidebar-width: 0px;
    --app-topbar-height: 64px;
  }

  .app-context {
    display: none;
  }

  .app-topbar {
    padding-left: 76px;
  }

  .suite-launcher-button {
    width: var(--app-topbar-height);
    height: var(--app-topbar-height);
  }

  .suite-launcher-panel {
    width: 100vw;
    max-height: calc(100vh - var(--app-topbar-height));
    border-right: 0;
    border-bottom-left-radius: 0;
  }

  .app-workspace,
  .app-sidebar-collapsed .app-workspace {
    margin-top: calc(var(--app-topbar-height) + 54px);
    margin-left: 0;
    padding: 16px 14px 40px;
  }

  .app-sidebar,
  .app-sidebar-collapsed .app-sidebar {
    position: fixed;
    inset: var(--app-topbar-height) 0 auto 0;
    width: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--aat-border);
  }

  .app-sidebar .app-navigation,
  .app-sidebar-collapsed .app-navigation {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    padding: 7px 10px;
  }

  .app-nav-link {
    min-height: 38px;
    flex: 0 0 auto;
    padding: 7px 10px;
  }

  .app-sidebar-toggle {
    display: none;
  }
}

@media (max-width: 440px) {
  .suite-launcher-panel {
    padding: 18px 14px;
  }

  .suite-launcher-apps {
    grid-template-columns: 1fr;
  }

  .suite-launcher-app {
    min-height: 64px;
  }
}

/* Customer Master pilot inspection. */
.customer-page-heading {
  gap: 20px;
}

.pilot-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--app-accent) 28%, var(--aat-border));
  border-radius: 999px;
  background: var(--app-accent-soft);
  padding: 4px 10px;
  color: var(--app-accent-dark);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-semibold);
  white-space: nowrap;
}

.customer-search-form {
  max-width: 720px;
}

.customer-search-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: var(--aat-weight-semibold);
}

.customer-search-row {
  display: flex;
  gap: 8px;
}

.customer-search-row input {
  min-width: 220px;
  min-height: 40px;
  flex: 1 1 auto;
  border: 1px solid var(--aat-border);
  border-radius: 8px;
  background: var(--aat-surface-soft);
  padding: 8px 12px;
}

.customer-name {
  display: block;
  color: var(--aat-text);
  font-weight: var(--aat-weight-semibold);
  text-decoration: none;
}

.customer-name:hover,
.customer-name:focus-visible {
  color: var(--app-accent-dark);
  text-decoration: underline;
}

.customer-number,
.customer-data-label,
.customer-section-note {
  display: block;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-chip-list,
.customer-heading-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.customer-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--aat-surface-soft);
  padding: 3px 8px;
  color: var(--aat-text);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-medium);
}

.customer-brand-chip {
  background: var(--app-accent-soft);
  color: var(--app-accent-dark);
}

.customer-breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
}

.customer-summary-grid,
.customer-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.customer-summary-grid .migration-panel {
  margin-bottom: 0;
}

.customer-definition-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.customer-definition-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}

.customer-definition-list dt {
  color: var(--aat-text-muted);
  font-size: var(--aat-type-small);
  font-weight: var(--aat-weight-medium);
}

.customer-definition-list dd {
  margin: 0;
}

.customer-card-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.customer-mini-card,
.customer-data-card,
.customer-account-points {
  display: grid;
  gap: 5px;
  border: 1px solid var(--aat-border);
  border-radius: 9px;
  background: var(--aat-surface-soft);
  padding: 13px;
}

.customer-mini-card span,
.customer-mini-card small,
.customer-data-card small,
.customer-contact-point small {
  color: var(--aat-text-muted);
}

.customer-data-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.customer-data-card address {
  margin: 6px 0;
  font-style: normal;
}

.customer-contact-point {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-account-points {
  margin-bottom: 16px;
}

.customer-section-note {
  margin: 12px 0 0;
}

@media (max-width: 767.98px) {
  .customer-search-row,
  .customer-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-summary-grid,
  .customer-card-grid {
    grid-template-columns: 1fr;
  }

  .customer-definition-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
