/* Laboratory console direction. Loaded last so the selected visual target wins. */
:root {
  --product-navy: #073f51;
  --product-navy-strong: #063446;
  --product-teal: #0799a8;
  --product-teal-soft: #e8f6f7;
  --product-red: #d84444;
  --product-red-soft: #fff0f0;
  --product-amber: #dc820e;
  --product-amber-soft: #fff5e6;
  --product-green: #219653;
  --product-green-soft: #eaf8ef;
  --product-ink: #102a37;
  --product-muted: #677783;
  --product-line: #dbe3e7;
  --product-line-strong: #c8d3d9;
  --product-canvas: #f5f7f8;
  --product-surface: #fff;
  --sidebar-width: 220px;
  --topbar-height: 72px;
}

html,
body {
  background: var(--product-canvas);
  color: var(--product-ink);
  letter-spacing: 0;
}

.product-sidebar {
  border-inline-start: 0;
  background: var(--product-navy-strong);
  color: #fff;
}

.sidebar-brand {
  min-height: var(--topbar-height);
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  padding: 10px 12px;
}

.sidebar-brand img {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 5px;
  background: #10a6b4;
  padding: 7px;
}

.sidebar-brand strong,
.sidebar-footer strong {
  color: #fff;
  font-size: 12px;
}

.sidebar-brand small,
.sidebar-footer small {
  color: #aac0cb;
  font-size: 9px;
}

.product-sidebar .icon-btn {
  border-color: rgba(255, 255, 255, .16);
  background: transparent;
  color: #d4e2e8;
}

.sidebar-navigation {
  gap: 3px;
  padding: 14px 7px 20px;
}

.sidebar-item,
.sidebar-child {
  min-height: 43px;
  gap: 10px;
  border-radius: 4px;
  color: #d2e0e6;
  padding: 8px 11px;
}

.sidebar-item span,
.sidebar-child span {
  font-size: 11.5px;
  font-weight: 650;
}

.sidebar-item:hover,
.sidebar-child:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sidebar-item.active {
  background: #078c9b;
  color: #fff;
  box-shadow: inset -3px 0 0 #22c1ca;
}

.sidebar-child.active {
  background: rgba(8, 153, 168, .24);
  color: #8ce6ea;
}

.sidebar-children {
  border-right-color: rgba(255, 255, 255, .19);
}

.sidebar-footer {
  min-height: 62px;
  border-top-color: rgba(255, 255, 255, .11);
  background: #052f40;
}

.app .product-topbar {
  min-height: var(--topbar-height);
  gap: 14px;
  border-bottom-color: var(--product-line);
  background: #fff;
  padding: 9px 18px;
}

.dashboard-mode .page-identity > span,
.dashboard-mode .page-identity h1 {
  display: none;
}

.dashboard-mode .page-identity p {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background: #fff;
  padding: 0 10px;
  color: var(--product-ink);
  font-size: 10px;
}

.dashboard-mode .density-toggle,
.dashboard-mode .quick-actions-popover {
  display: none;
}

.page-identity h1 {
  font-size: 16px;
}

.global-search-shell {
  max-width: 610px;
}

.searchbox {
  min-height: 42px;
  border-radius: 5px;
  background: #fbfcfd;
}

.searchbox input {
  font-size: 11px;
}

.context-filters select {
  height: 40px;
  border-radius: 5px;
  font-size: 10px;
}

.context-filters {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.tenant-switcher,
.tenant-context-badge {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background: #f8fbfc;
  color: var(--product-navy-strong);
}

.tenant-switcher {
  padding-inline-start: 9px;
}

.tenant-switcher > span,
.tenant-context-badge > span {
  display: grid;
  min-width: 0;
  line-height: 1.35;
}

.tenant-switcher > span {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px;
}

.tenant-switcher small,
.tenant-context-badge small {
  color: var(--product-muted);
  font-size: 8px;
  font-weight: 700;
}

.tenant-switcher select {
  min-width: 148px;
  max-width: 220px;
  border: 0;
  border-inline-start: 1px solid var(--product-line);
  background: #fff;
  font-weight: 750;
}

.tenant-context-badge {
  max-width: 230px;
  padding: 6px 10px;
}

.tenant-context-badge strong {
  overflow: hidden;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-context-select select {
  max-width: 170px;
}

.profile-popover > summary {
  border: 1px solid transparent;
}

.page-content {
  padding: 16px 18px 36px;
}

.page-content > section,
.dashboard-home,
.lab-console-dashboard {
  max-width: 1580px;
}

.app .panel {
  border-radius: 5px;
  box-shadow: none;
}

.app .btn {
  min-height: 36px;
  border-radius: 4px;
  font-size: 10px;
}

.app .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 4px;
}

.lab-console-dashboard {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 12px;
  margin-inline: auto;
}

.lab-console-dashboard > *,
.lab-console-main > *,
.lab-console-kpis > button {
  min-width: 0;
}

.lab-console-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 76px;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background: #fff;
}

.lab-console-kpis > button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-inline-start: 1px solid var(--product-line);
  background: #fff;
  padding: 11px 24px;
  color: var(--product-ink);
  text-align: right;
  cursor: pointer;
}

.lab-console-kpis > button:last-child {
  border-inline-start: 0;
}

.lab-console-kpis > button:hover,
.lab-console-kpis > button:focus-visible {
  background: #f9fbfc;
  outline: 0;
}

.lab-console-kpis > button > span:last-child {
  display: grid;
  gap: 1px;
}

.lab-console-kpis small {
  color: var(--product-muted);
  font-size: 10px;
}

.lab-console-kpis strong {
  font-size: 20px;
  line-height: 1.35;
}

.console-kpi-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 5px;
  background: #eef4f6;
  color: var(--product-navy);
}

.console-kpi-icon.info { color: #0799a8; }
.console-kpi-icon.danger { color: #dc3f43; }
.console-kpi-icon.warning { color: #e4860a; }
.console-kpi-icon.success { color: #219653; }

.lab-console-main {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(620px, 1fr);
  align-items: stretch;
  gap: 12px;
}

.lab-console-main > * {
  direction: rtl;
}

.selected-sample-panel,
.lab-queue-panel {
  min-height: 610px;
}

.selected-sample-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

.selected-sample-head {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--product-line);
  padding: 12px 14px;
}

.selected-sample-head > div {
  display: grid;
  gap: 3px;
}

.selected-sample-head span {
  color: var(--product-muted);
  font-size: 9px;
}

.selected-sample-head strong {
  font-size: 13px;
}

.lab-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  border-radius: 3px;
  background: #eef3f5;
  padding: 4px 7px;
  color: #566873;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.lab-status > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.lab-status.danger { background: var(--product-red-soft); color: var(--product-red); }
.lab-status.warning { background: var(--product-amber-soft); color: var(--product-amber); }
.lab-status.success { background: var(--product-green-soft); color: var(--product-green); }
.lab-status.info { background: #eaf5fb; color: #1679b7; }

.selected-sample-meta {
  display: grid;
  gap: 5px;
  border-bottom: 1px solid var(--product-line);
  padding: 10px 14px;
}

.selected-sample-meta > div,
.result-technician {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selected-sample-meta span,
.result-technician span {
  color: var(--product-muted);
  font-size: 8.5px;
}

.selected-sample-meta strong,
.result-technician strong {
  overflow: hidden;
  max-width: 65%;
  font-size: 9.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.selected-timeline {
  border-bottom: 1px solid var(--product-line);
  padding: 12px 14px 9px;
}

.selected-timeline h3,
.quick-result-entry h3,
.selected-extra h3 {
  margin: 0 0 10px;
  font-size: 11px;
}

.selected-timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  min-height: 45px;
}

.selected-timeline-step:not(:last-child)::after {
  position: absolute;
  top: 22px;
  right: 11px;
  width: 1px;
  height: 24px;
  background: #cbd6da;
  content: "";
}

.selected-timeline-step > span {
  z-index: 1;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #cbd6da;
  border-radius: 50%;
  background: #fff;
  color: #72828c;
}

.selected-timeline-step.complete > span {
  border-color: #29a45e;
  background: #edfaf2;
  color: #219653;
}

.selected-timeline-step.active > span {
  border-color: #187fc0;
  box-shadow: 0 0 0 3px #e8f4fb;
  color: #187fc0;
}

.selected-timeline-step > div {
  display: grid;
  align-content: start;
  gap: 2px;
  padding-top: 1px;
}

.selected-timeline-step strong { font-size: 9.5px; }
.selected-timeline-step small { color: var(--product-muted); font-size: 8px; }

.quick-result-entry {
  border-bottom: 1px solid var(--product-line);
  padding: 12px 14px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-label span {
  color: var(--product-muted);
  font-size: 8px;
}

.result-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 9px;
}

.result-fields label {
  display: grid;
  gap: 4px;
}

.result-fields label > span {
  color: var(--product-muted);
  font-size: 7.8px;
}

.result-fields input,
.result-fields output {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 36px;
  align-items: center;
  border: 1px solid var(--product-line-strong);
  border-radius: 4px;
  background: #fff;
  padding: 0 8px;
  color: var(--product-ink);
  font-size: 9.5px;
}

.result-fields input:focus {
  border-color: var(--product-teal);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(7, 153, 168, .1);
}

.result-technician {
  min-height: 34px;
  border-top: 1px solid #edf1f3;
  padding-top: 7px;
}

.quick-result-actions {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 7px;
  margin-top: 9px;
}

.quick-result-actions .btn {
  justify-content: center;
}

.selected-extra {
  padding: 12px 14px 14px;
}

.selected-extra dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.selected-extra dl > div {
  display: flex;
  justify-content: space-between;
  gap: 9px;
}

.selected-extra dt {
  color: var(--product-muted);
  font-size: 8px;
}

.selected-extra dd {
  overflow: hidden;
  margin: 0;
  font-size: 8.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lab-queue-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden !important;
}

.lab-queue-head {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--product-line);
  padding: 10px 14px;
}

.lab-queue-head h2 {
  margin: 0;
  font-size: 14px;
}

.lab-queue-head p {
  margin: 2px 0 0;
  color: var(--product-muted);
  font-size: 8.5px;
}

.queue-head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.queue-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--product-line);
  padding: 8px 12px;
}

.queue-filters button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--product-line);
  border-radius: 4px;
  background: #fff;
  padding: 5px 10px;
  color: var(--product-muted);
  font-size: 8.5px;
  cursor: pointer;
}

.queue-filters button span {
  color: inherit;
  font-size: 8px;
}

.queue-filters button:hover {
  border-color: #9ebcc2;
  color: var(--product-ink);
}

.queue-filters button.active {
  border-color: var(--product-teal);
  background: var(--product-teal-soft);
  color: #076a74;
  font-weight: 700;
}

.lab-queue-table-wrap {
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.lab-queue-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.lab-queue-table th {
  height: 38px;
  border-bottom: 1px solid var(--product-line-strong);
  background: #fbfcfd;
  color: #536671;
  padding: 6px 8px;
  font-size: 8px;
  font-weight: 700;
  text-align: right;
}

.lab-queue-table td {
  height: 48px;
  overflow: hidden;
  border-bottom: 1px solid #e9eef0;
  padding: 6px 8px;
  color: #2c414c;
  font-size: 8.8px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lab-queue-table th:nth-child(1) { width: 15%; }
.lab-queue-table th:nth-child(2) { width: 14%; }
.lab-queue-table th:nth-child(3) { width: 9%; }
.lab-queue-table th:nth-child(4) { width: 15%; }
.lab-queue-table th:nth-child(5) { width: 17%; }
.lab-queue-table th:nth-child(6) { width: 17%; }
.lab-queue-table th:nth-child(7) { width: 13%; }

.lab-queue-table tbody tr {
  background: #fff;
  cursor: pointer;
  transition: background 120ms ease;
}

.lab-queue-table tbody tr:hover,
.lab-queue-table tbody tr:focus-visible {
  background: #f4fafb;
  outline: 0;
}

.lab-queue-table tbody tr.selected {
  background: #eaf8fa;
  box-shadow: inset -3px 0 0 var(--product-teal);
}

.lab-queue-table td strong,
.lab-queue-table td small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lab-queue-table td strong { font-size: 9px; }
.lab-queue-table td small { margin-top: 2px; color: var(--product-muted); font-size: 7.4px; }

.queue-footer {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--product-line);
  padding: 6px 12px;
}

.queue-footer > span {
  color: var(--product-muted);
  font-size: 8px;
}

.lab-console-analytics {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 12px;
}

.lab-console-analytics > * {
  direction: rtl;
  overflow: hidden !important;
}

.console-strength-chart {
  height: 190px;
}

.exception-list {
  display: grid;
}

.exception-list > button {
  display: grid;
  grid-template-columns: 78px 95px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid #e9eef0;
  background: #fff;
  padding: 7px 13px;
  color: var(--product-ink);
  text-align: right;
  cursor: pointer;
}

.exception-list > button:last-child {
  border-bottom: 0;
}

.exception-list > button:hover {
  background: #f9fbfc;
}

.exception-list span,
.exception-list em {
  overflow: hidden;
  color: var(--product-muted);
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.exception-list strong {
  font-size: 8.7px;
}

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

  .app .product-topbar {
    grid-template-columns: minmax(140px, auto) minmax(250px, 1fr) auto auto;
    gap: 9px;
    padding-inline: 13px;
  }

  .profile-copy { display: none; }
  .lab-console-main { grid-template-columns: minmax(280px, 320px) minmax(540px, 1fr); }
  .lab-console-kpis > button { padding-inline: 14px; }
}

@media (max-width: 980px) {
  .lab-console-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lab-console-kpis > button:nth-child(2) { border-inline-start: 0; }
  .lab-console-kpis > button:nth-child(-n+2) { border-bottom: 1px solid var(--product-line); }

  .lab-console-main {
    display: flex;
    flex-direction: column;
  }

  .lab-queue-panel { order: 1; min-height: 570px; }
  .selected-sample-panel { order: 2; min-height: 0; }
  .lab-console-analytics { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app .product-topbar {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-areas: "menu search toolbar";
    min-height: 62px;
    padding: 8px 10px;
  }

  .dashboard-mode .page-identity,
  .context-filters,
  .product-toolbar .profile-popover {
    display: none;
  }

  .app .mobile-menu-button { display: grid; grid-area: menu; }
  .page-content { padding: 10px 10px 84px; }
}

@media (max-width: 640px) {
  .lab-console-dashboard { gap: 9px; }

  .lab-console-dashboard > * {
    width: 100%;
    max-width: 100%;
  }

  .lab-console-kpis {
    min-height: 0;
  }

  .lab-console-kpis > button {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 66px;
    gap: 7px;
    padding: 8px 10px;
  }

  .console-kpi-icon {
    width: 32px;
    height: 32px;
  }

  .lab-console-kpis small { font-size: 8px; }
  .lab-console-kpis strong { font-size: 16px; }

  .lab-queue-head {
    align-items: flex-start;
    padding: 10px;
  }

  .lab-queue-head p { display: none; }
  .queue-head-actions .icon-btn { display: none; }
  .queue-filters { padding-inline: 8px; }

  .lab-queue-panel { min-height: 0; }
  .lab-queue-table-wrap { overflow: visible; }
  .app .lab-queue-table {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .lab-queue-table thead { display: none; }
  .lab-queue-table tbody {
    display: grid;
    width: 100%;
    min-width: 0;
  }

  .lab-queue-table tbody tr {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    border-bottom: 1px solid var(--product-line);
    padding: 10px;
  }

  .lab-queue-table td {
    display: grid;
    height: auto;
    min-height: 36px;
    align-content: start;
    gap: 2px;
    border: 0;
    padding: 0;
    white-space: normal;
  }

  .lab-queue-table td::before {
    color: var(--product-muted);
    font-size: 7.5px;
  }

  .lab-queue-table td:nth-child(1)::before { content: "وضعیت"; }
  .lab-queue-table td:nth-child(2)::before { content: "تکنسین"; }
  .lab-queue-table td:nth-child(3)::before { content: "سن آزمون"; }
  .lab-queue-table td:nth-child(4)::before { content: "طرح"; }
  .lab-queue-table td:nth-child(5)::before { content: "پروژه"; }
  .lab-queue-table td:nth-child(6)::before { content: "شماره نمونه"; }
  .lab-queue-table td:nth-child(7)::before { content: "سررسید"; }

  .queue-footer { padding-inline: 9px; }
  .queue-footer .btn { min-height: 32px; padding-inline: 4px; }

  .result-fields { grid-template-columns: 1fr; }
  .quick-result-actions { grid-template-columns: 1fr 1fr; }
  .exception-list > button { grid-template-columns: 72px 88px minmax(0, 1fr); }
  .exception-list > button > .status { display: none; }
}

/* Keep the compact product header predictable after the v3 tablet overrides. */
@media (max-width: 720px) {
  .app .product-topbar {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-areas:
      "menu identity toolbar"
      "search search search";
    gap: 6px 8px;
    min-height: 111px;
    padding: 7px 10px;
  }

  .global-search-shell {
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-self: stretch;
  }

  .global-search-shell .searchbox {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    min-width: 0;
  }

  #global-search-results-host,
  .global-search-results {
    width: 100%;
    min-width: 0;
  }

  .global-search-results {
    inset-inline: 0;
  }
}

/* Modular workspace */
.module-marketplace {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.module-market-hero {
  align-items: center;
  background: #16231f;
  border-inline-start: 4px solid #46b88a;
  color: #fff;
  display: flex;
  gap: 32px;
  justify-content: space-between;
  min-height: 156px;
  padding: 26px 30px;
}

.module-market-hero > div:first-child {
  display: grid;
  gap: 7px;
  max-width: 760px;
}

.module-market-hero > div:first-child > span {
  align-items: center;
  color: #9ee3c7;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
}

.module-market-hero h2 {
  color: #fff;
  font-size: 22px;
  line-height: 1.6;
  margin: 0;
}

.module-market-hero p {
  color: #cbd8d3;
  font-size: 13px;
  line-height: 1.9;
  margin: 0;
}

.module-market-metrics {
  display: flex;
  flex: 0 0 auto;
  gap: 1px;
}

.module-market-metrics span {
  align-items: center;
  background: #22342e;
  display: flex;
  flex-direction: column;
  min-width: 94px;
  padding: 14px;
}

.module-market-metrics strong {
  color: #fff;
  font-size: 22px;
}

.module-market-metrics small {
  color: #aabbb5;
  font-size: 11px;
}

.module-market-toolbar {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 0;
}

.module-market-toolbar .searchbox {
  flex: 0 0 min(320px, 34vw);
}

.module-category-filter {
  justify-content: flex-start;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.module-category-filter button {
  white-space: nowrap;
}

.module-category-filter button.active {
  background: #172e27;
  color: #fff;
}

.module-bundles {
  border-block: 1px solid #dde4e1;
  display: grid;
  gap: 14px;
  padding-block: 18px;
}

.module-bundles > header {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.module-bundles > header > div {
  display: grid;
  gap: 3px;
}

.module-bundles > header span,
.module-bundle-card small {
  color: #587168;
  font-size: 10px;
  font-weight: 700;
}

.module-bundles > header h3,
.module-bundle-card h3 {
  color: #1c2723;
  font-size: 15px;
  margin: 0;
}

.module-bundles > header p,
.module-bundle-card p {
  color: #69736f;
  font-size: 11px;
  line-height: 1.9;
  margin: 0;
}

.module-bundles > div {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.module-bundle-card {
  align-content: start;
  background: #f8faf9;
  border: 1px solid #dfe5e2;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
}

.module-bundle-card.enabled {
  background: #f1f8f5;
  border-color: #abd6c4;
}

.module-bundle-card > div {
  display: grid;
  gap: 4px;
}

.module-bundle-card > div > span {
  color: #5d6d66;
  font-size: 10px;
}

.module-bundle-card details {
  border-block-start: 1px solid #e2e7e5;
  font-size: 10px;
  padding-block-start: 8px;
}

.module-bundle-card summary {
  color: #2d5c4c;
  cursor: pointer;
  font-weight: 700;
}

.module-bundle-card details p {
  margin-block-start: 6px;
}

.module-bundle-card > .btn,
.module-bundle-card > .module-state {
  justify-self: start;
}

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

.module-market-card {
  background: #fff;
  border: 1px solid #dfe4e2;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-rows: auto 1fr auto auto auto;
  min-width: 0;
  padding: 18px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.module-market-card:hover {
  border-color: #aebcb7;
  box-shadow: 0 8px 22px rgb(26 43 37 / 8%);
}

.module-market-card.enabled {
  border-top: 3px solid #218963;
  padding-top: 16px;
}

.module-market-card > header,
.module-market-card > footer,
.module-detail-title {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.module-market-icon {
  align-items: center;
  background: #edf5f2;
  border: 1px solid #d7e7e1;
  border-radius: 7px;
  color: #176b4b;
  display: inline-flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.module-state {
  border: 1px solid #d5d9df;
  border-radius: 999px;
  color: #596273;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  white-space: nowrap;
}

.module-state.success { background: #ecf8f2; border-color: #b7e1cd; color: #176b4b; }
.module-state.warning { background: #fff8e8; border-color: #f0d69c; color: #875a00; }
.module-state.danger { background: #fff0f0; border-color: #efb9b9; color: #a62e2e; }
.module-state.info { background: #edf5ff; border-color: #bed5f2; color: #245b96; }

.module-market-copy {
  align-content: start;
  display: grid;
  gap: 5px;
}

.module-market-copy small {
  color: #778078;
  font-size: 10px;
  font-weight: 700;
}

.module-market-copy h3 {
  color: #1c2723;
  font-size: 15px;
  margin: 0;
}

.module-market-copy p {
  color: #66706c;
  font-size: 12px;
  line-height: 1.9;
  margin: 0;
}

.module-market-card dl,
.module-detail-facts {
  border-block: 1px solid #edf0ef;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 10px 0;
}

.module-market-card dl div,
.module-detail-facts div {
  display: grid;
  gap: 2px;
}

.module-market-card dt,
.module-detail-facts span {
  color: #8a918e;
  font-size: 10px;
}

.module-market-card dd,
.module-detail-facts strong {
  color: #303a36;
  font-size: 11px;
  margin: 0;
}

.module-dependencies,
.module-warning {
  align-items: center;
  color: #747d79;
  display: flex;
  font-size: 10px;
  gap: 5px;
  margin: 0;
}

.module-warning { color: #a25f00; }

.module-market-card > footer {
  justify-content: flex-start;
  min-height: 36px;
}

.module-market-card > footer .icon-btn {
  margin-inline-start: auto;
}

.module-disable {
  color: #8b3434;
}

.module-details-modal,
.module-settings-modal {
  max-width: min(720px, calc(100vw - 28px));
}

.module-detail-title {
  justify-content: flex-start;
}

.module-detail-title > div {
  display: grid;
  gap: 4px;
}

.module-detail-facts {
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1120px) {
  .module-bundles > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .module-market-hero,
  .module-market-toolbar { align-items: stretch; flex-direction: column; }
  .module-market-hero { gap: 20px; padding: 22px 18px; }
  .module-market-hero h2 { font-size: 18px; }
  .module-market-metrics span { flex: 1; }
  .module-bundles > header { align-items: start; flex-direction: column; gap: 8px; }
  .module-bundles > div { grid-template-columns: 1fr; }
  .module-market-toolbar .searchbox { flex-basis: auto; width: 100%; }
  .module-market-grid { grid-template-columns: 1fr; }
  .module-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.quick-sample-modal {
  max-width: min(860px, calc(100vw - 28px));
}

.quick-sample-body {
  display: grid;
  gap: 18px;
}

.quick-sample-section {
  border-bottom: 1px solid #e5e9e7;
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
}

.quick-sample-section > header {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.quick-sample-section > header > .ui-icon {
  background: #edf5f2;
  border-radius: 6px;
  color: #176b4b;
  flex: 0 0 auto;
  padding: 8px;
}

.quick-sample-section > header div {
  display: grid;
  gap: 2px;
}

.quick-sample-section h4 {
  color: #202b27;
  font-size: 14px;
  margin: 0;
}

.quick-sample-section p {
  color: #727b77;
  font-size: 11px;
  margin: 0;
}

.quick-sample-assurance {
  align-items: center;
  background: #f1f7f4;
  border-inline-start: 3px solid #31956f;
  color: #176b4b;
  display: flex;
  gap: 10px;
  padding: 12px 14px;
}

.quick-sample-assurance span {
  display: grid;
  gap: 2px;
}

.quick-sample-assurance strong { font-size: 12px; }
.quick-sample-assurance small { color: #607069; font-size: 10px; }

@media (max-width: 640px) {
  .quick-sample-body .form-grid { grid-template-columns: 1fr; }
  .quick-sample-body .span-two { grid-column: auto; }
}

.qc-lite-dashboard {
  display: grid;
  gap: 16px;
}

.qc-lite-welcome {
  align-items: center;
  background: #f3f7f5;
  border-inline-start: 4px solid #218963;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 132px;
  padding: 22px 26px;
}

.qc-lite-welcome > div {
  display: grid;
  gap: 6px;
  max-width: 740px;
}

.qc-lite-welcome > div > span {
  align-items: center;
  color: #176b4b;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  gap: 6px;
}

.qc-lite-welcome h2 {
  color: #1d2925;
  font-size: 20px;
  margin: 0;
}

.qc-lite-welcome p {
  color: #66716c;
  font-size: 12px;
  line-height: 1.9;
  margin: 0;
}

.qc-lite-primary-action {
  flex: 0 0 auto;
  min-height: 44px;
}

.qc-lite-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.qc-lite-kpis > button,
.qc-lite-kpis > div {
  align-items: center;
  background: #fff;
  border: 1px solid #e0e5e3;
  border-radius: 7px;
  color: #38423e;
  display: grid;
  gap: 3px;
  grid-template-columns: auto 1fr;
  min-height: 88px;
  padding: 14px 16px;
  text-align: start;
}

.qc-lite-kpis > button:hover {
  border-color: #9fb7ae;
}

.qc-lite-kpis > button.alert {
  border-color: #efb6b6;
}

.qc-lite-kpis > * > span {
  align-items: center;
  background: #edf5f2;
  border-radius: 6px;
  color: #176b4b;
  display: inline-flex;
  grid-row: 1 / span 2;
  height: 38px;
  justify-content: center;
  margin-inline-end: 8px;
  width: 38px;
}

.qc-lite-kpis small {
  color: #7c8581;
  font-size: 10px;
}

.qc-lite-kpis strong {
  color: #202a26;
  font-size: 18px;
}

.qc-lite-main-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 260px;
}

.qc-lite-shortcuts {
  align-content: start;
  background: #fff;
  border: 1px solid #e0e5e3;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 16px;
}

.qc-lite-shortcuts h3 {
  color: #28332f;
  font-size: 13px;
  margin: 0 0 8px;
}

.qc-lite-shortcuts > button {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #eef1f0;
  color: #42504a;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 12px 4px;
  text-align: start;
}

.qc-lite-shortcuts > button:hover {
  color: #176b4b;
}

.qc-lite-shortcuts > button > span {
  align-items: center;
  display: grid;
  gap: 2px 8px;
  grid-template-columns: auto 1fr;
}

.qc-lite-shortcuts > button > span > .ui-icon {
  grid-row: 1 / span 2;
}

.qc-lite-shortcuts strong { font-size: 11px; }
.qc-lite-shortcuts small { color: #808985; font-size: 9px; }

.qc-lite-range {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 180px;
}

.qc-lite-range span {
  align-items: center;
  background: #edf5f2;
  border-top: 3px solid #218963;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  min-height: calc(74px + var(--range-value) * .7);
  padding: 12px;
}

.qc-lite-range small { color: #74807b; font-size: 10px; }
.qc-lite-range strong { color: #1e3b31; font-size: 16px; }

@media (max-width: 900px) {
  .qc-lite-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qc-lite-main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .qc-lite-welcome { align-items: stretch; flex-direction: column; padding: 18px; }
  .qc-lite-primary-action { width: 100%; }
  .qc-lite-kpis { grid-template-columns: 1fr; }
  .qc-lite-kpis > button,
  .qc-lite-kpis > div { min-height: 72px; }
}

.onboarding-modal {
  max-width: min(760px, calc(100vw - 28px));
}

.onboarding-steps {
  background: #f5f7f6;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px 22px;
}

.onboarding-steps span {
  align-items: center;
  color: #8b938f;
  display: flex;
  gap: 7px;
  justify-content: center;
}

.onboarding-steps b {
  align-items: center;
  border: 1px solid #cdd4d1;
  border-radius: 50%;
  display: inline-flex;
  font-size: 10px;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.onboarding-steps small { font-size: 10px; }
.onboarding-steps span.active { color: #176b4b; font-weight: 700; }
.onboarding-steps span.active b { background: #176b4b; border-color: #176b4b; color: #fff; }
.onboarding-steps span.done b { background: #dff1e9; border-color: #9ed3bc; color: #176b4b; }

.onboarding-body > section {
  display: none;
  gap: 18px;
}

.onboarding-body > section.active { display: grid; }

.onboarding-body > section > header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
}

.onboarding-body > section > header > .ui-icon {
  background: #edf5f2;
  border-radius: 7px;
  color: #176b4b;
  padding: 9px;
}

.onboarding-body header div { display: grid; gap: 3px; }
.onboarding-body h4 { color: #202b27; font-size: 16px; margin: 0; }
.onboarding-body p { color: #707a75; font-size: 11px; margin: 0; }

.onboarding-review {
  border-block: 1px solid #e4e8e6;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px 0;
}

.onboarding-review div {
  display: grid;
  gap: 3px;
  padding: 4px 12px;
}

.onboarding-review span,
.onboarding-review small { color: #7b8580; font-size: 9px; }
.onboarding-review strong { color: #26322d; font-size: 12px; }

@media (max-width: 600px) {
  .onboarding-steps { padding-inline: 10px; }
  .onboarding-steps small { display: none; }
  .onboarding-review { grid-template-columns: 1fr; }
  .onboarding-review div + div { border-top: 1px solid #edf0ef; }
}

/* Guided navigation and progressively disclosed engineering forms. */
.sidebar-group {
  position: relative;
}

.sidebar-group-route {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  padding-inline-end: 38px;
  width: 100%;
}

.sidebar-group-route > span {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-group-expander {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #bcd3dc;
  cursor: pointer;
  display: flex;
  height: 30px;
  inset-inline-end: 7px;
  justify-content: center;
  padding: 0;
  position: absolute;
  top: 7px;
  width: 28px;
  z-index: 2;
}

.sidebar-group-expander:hover,
.sidebar-group-expander:focus-visible {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  outline: none;
}

@media (min-width: 981px) {
  .sidebar-collapsed .sidebar-brand {
    min-height: 94px;
    gap: 6px;
    padding-block: 8px;
  }

  .sidebar-collapsed .sidebar-collapse {
    display: grid;
  }

  .sidebar-collapsed .sidebar-group-expander {
    display: none;
  }

  .sidebar-collapsed .sidebar-group-route {
    padding-inline: 10px;
  }
}

.sidebar-children {
  background: #0a4658;
  border: 1px solid rgba(255, 255, 255, .12);
  border-right: 3px solid #23bbc4;
  border-radius: 4px;
  margin: 3px 8px 8px;
  padding: 5px;
}

.sidebar-children .sidebar-child {
  color: #cbe3e8;
  min-height: 36px;
}

.sidebar-children .sidebar-child.active {
  background: #fff;
  color: #075767;
}

.page-guide {
  background: #fff;
  border: 1px solid var(--product-line);
  border-right: 3px solid var(--product-teal);
  border-radius: 6px;
  margin: 0 0 14px;
  overflow: hidden;
}

.page-guide > summary {
  align-items: center;
  color: var(--product-ink);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 750;
  gap: 8px;
  list-style: none;
  min-height: 42px;
  padding: 9px 13px;
}

.page-guide > summary::-webkit-details-marker,
.form-advanced-fields > summary::-webkit-details-marker,
.inline-project-creator > summary::-webkit-details-marker {
  display: none;
}

.page-guide-content {
  border-top: 1px solid var(--product-line);
  display: grid;
  gap: 9px;
  padding: 12px 14px;
}

.page-guide-content p {
  color: var(--product-muted);
  font-size: 11px;
  margin: 0;
}

.page-guide-content > div {
  display: grid;
  gap: 2px;
}

.page-guide-content span {
  color: var(--product-muted);
  font-size: 10px;
}

.page-guide-content b {
  color: var(--product-ink);
  font-size: 11px;
}

.mix-component-legend {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 10px;
}

.mix-component-legend > span {
  align-items: center;
  background: #f8fafb;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  display: grid;
  gap: 7px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-height: 38px;
  padding: 6px 8px;
}

.mix-component-legend b {
  align-items: center;
  background: var(--product-navy);
  border-radius: 3px;
  color: #fff;
  display: flex;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.mix-component-legend strong {
  font-size: 11px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mix-component-legend small {
  color: var(--product-muted);
  font-size: 10px;
  white-space: nowrap;
}

.form-advanced-fields {
  background: #f8fafb;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  overflow: hidden;
}

.form-advanced-fields > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  min-height: 50px;
  padding: 9px 12px;
}

.form-advanced-fields > summary > span {
  align-items: center;
  display: grid;
  gap: 2px 8px;
  grid-template-columns: 20px minmax(0, 1fr);
}

.form-advanced-fields > summary b {
  color: var(--product-ink);
  font-size: 12px;
}

.form-advanced-fields > summary small {
  color: var(--product-muted);
  font-size: 10px;
  grid-column: 2;
}

.form-advanced-fields[open] > summary {
  background: var(--product-teal-soft);
  border-bottom: 1px solid var(--product-line);
}

.form-advanced-fields > .form-grid {
  padding: 12px;
}

.inline-project-creator {
  background: #f7fbfb;
  border: 1px dashed #79b9bf;
  border-radius: 6px;
  padding: 0;
}

.inline-project-creator > summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  list-style: none;
  min-height: 48px;
  padding: 8px 11px;
}

.inline-project-creator > summary span {
  display: grid;
  gap: 2px;
}

.inline-project-creator > summary b {
  font-size: 11px;
}

.inline-project-creator > summary small,
.inline-project-creator.is-disabled span {
  color: var(--product-muted);
  font-size: 10px;
}

.inline-project-fields {
  border-top: 1px solid var(--product-line);
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 11px;
}

.inline-project-fields label {
  display: grid;
  font-size: 10px;
  gap: 5px;
}

.inline-project-fields input {
  background: #fff;
  border: 1px solid var(--product-line-strong);
  border-radius: 4px;
  min-height: 38px;
  padding: 7px 9px;
}

.inline-project-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 0 11px 11px;
}

.inline-project-actions [role="status"] {
  color: var(--product-muted);
  font-size: 10px;
}

.inline-project-actions .danger-text { color: var(--product-red); }
.inline-project-actions .success-text { color: var(--product-green); }

.inline-project-creator.is-disabled {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

@media (max-width: 720px) {
  .mix-component-legend,
  .inline-project-fields {
    grid-template-columns: 1fr;
  }

  .inline-project-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-project-actions .btn {
    width: 100%;
  }
}

/* Product-owner sales control plane */
.owner-workspace {
  gap: 14px;
}

.owner-command-head {
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--product-line);
  border-top: 3px solid var(--product-teal);
  border-radius: 5px;
  background: var(--product-surface);
  padding: 20px 22px;
}

.owner-command-head > div:first-child {
  min-width: 0;
}

.owner-command-head > div:first-child > span {
  display: block;
  margin-bottom: 5px;
  color: var(--product-teal);
  font-size: 9px;
  font-weight: 800;
}

.owner-command-head h2 {
  margin: 0;
  color: var(--product-navy-strong);
  font-size: 19px;
  line-height: 1.55;
}

.owner-command-head p {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--product-muted);
  font-size: 10.5px;
  line-height: 1.9;
}

.owner-registration-alert {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #c4dfe2;
  border-inline-start: 4px solid var(--product-teal);
  border-radius: 5px;
  background: #f2fafb;
  padding: 10px 14px;
  color: var(--product-navy-strong);
  font: inherit;
  cursor: pointer;
}

.owner-registration-alert > span,
.owner-registration-alert > small,
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.owner-registration-alert > small {
  color: var(--product-teal);
  font-size: 10px;
  font-weight: 750;
}

.owner-registration-alert:hover {
  border-color: #79bfc6;
  background: #e9f6f7;
}

.owner-shared-workspace-notice {
  margin: 0;
}

.owner-shared-workspace-notice > div {
  display: grid;
  gap: 2px;
}

.owner-shared-workspace-notice span {
  color: var(--product-muted);
  font-size: 10px;
}

.table-actions {
  flex-wrap: wrap;
  min-width: max-content;
}

.owner-filter-band {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 210px;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background: var(--product-surface);
  padding: 10px;
}

.owner-searchbox {
  width: 100%;
  max-width: none;
}

.owner-searchbox > button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--product-muted);
  cursor: pointer;
}

.owner-searchbox > button:hover {
  background: #edf3f5;
  color: var(--product-ink);
}

.owner-filter-select,
.compact-control {
  min-width: 0;
  gap: 4px;
}

.owner-filter-select > span,
.compact-control > span {
  color: var(--product-muted);
  font-size: 8px;
  font-weight: 700;
}

.owner-filter-select select,
.compact-control select {
  min-height: 42px;
}

.owner-context-badge,
.protected-account-label {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  border: 1px solid #b9dfe2;
  border-radius: 4px;
  background: var(--product-teal-soft);
  padding: 0 10px;
  color: #076c76;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.protected-account-label {
  min-height: 28px;
  padding-inline: 8px;
}

.owner-kpis .metric-card {
  min-height: 108px;
  border-top: 2px solid #8bbcc2;
}

.owner-pipeline-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 0;
  overflow-x: auto;
  padding: 0 !important;
}

.owner-pipeline-strip > button {
  display: grid;
  min-height: 86px;
  align-content: center;
  gap: 4px;
  border: 0;
  border-inline-start: 1px solid var(--product-line);
  background: #fff;
  padding: 12px 14px;
  color: var(--product-ink);
  text-align: right;
  cursor: pointer;
}

.owner-pipeline-strip > button:first-child {
  border-inline-start: 0;
}

.owner-pipeline-strip > button:hover,
.owner-pipeline-strip > button:focus-visible {
  background: #f0f8f9;
  outline: 0;
}

.owner-pipeline-strip span {
  color: var(--product-muted);
  font-size: 8px;
  font-weight: 700;
}

.owner-pipeline-strip strong {
  color: var(--product-navy-strong);
  font-size: 18px;
}

.owner-pipeline-strip small {
  color: var(--product-teal);
  font-size: 8px;
}

.owner-overview-grid {
  align-items: start;
}

.owner-detail-panel > .panel-body {
  padding: 0;
}

.owner-company-detail {
  display: grid;
  gap: 0;
}

.owner-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--product-line);
  background: #f9fbfc;
  padding: 17px 18px;
}

.owner-detail-head > div:first-child > span {
  color: var(--product-teal);
  font-size: 8px;
  font-weight: 800;
}

.owner-detail-head h3 {
  margin: 3px 0 0;
  color: var(--product-navy-strong);
  font-size: 16px;
}

.owner-detail-head p {
  margin: 3px 0 0;
  color: var(--product-muted);
  font-size: 9px;
}

.owner-company-facts {
  gap: 0 !important;
  border-bottom: 1px solid var(--product-line);
  padding: 0 18px;
}

.owner-company-facts > div {
  min-height: 67px;
  align-content: center;
  border-bottom: 1px solid #edf1f3;
  padding: 9px 4px;
}

.owner-related-section {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--product-line);
  padding: 16px 18px;
}

.owner-related-section:last-child {
  border-bottom: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title h4 {
  margin: 0;
  color: var(--product-navy-strong);
  font-size: 11px;
}

.section-title > span {
  color: var(--product-muted);
  font-size: 8px;
}

.owner-notes {
  border-inline-start: 3px solid var(--product-amber);
  background: var(--product-amber-soft);
  padding: 13px 18px;
}

.owner-notes strong {
  color: #87510b;
  font-size: 9px;
}

.owner-notes p {
  margin: 4px 0 0;
  color: #654d31;
  font-size: 9px;
  line-height: 1.8;
}

.owner-unsubscribed-list {
  display: grid;
  padding: 0 !important;
}

.owner-unsubscribed-list > div {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--product-line);
  padding: 9px 14px;
}

.owner-unsubscribed-list > div:last-child {
  border-bottom: 0;
}

.owner-unsubscribed-list span,
.table-link {
  display: grid;
  gap: 3px;
}

.owner-unsubscribed-list small,
.cell-subline,
.table-link small {
  display: block;
  margin-top: 3px;
  color: var(--product-muted);
  font-size: 7.5px;
  line-height: 1.55;
}

.table-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--product-navy-strong);
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.table-link:hover,
.table-link:focus-visible {
  color: var(--product-teal);
  outline: 0;
}

.owner-workspace td:last-child {
  white-space: nowrap;
}

.owner-module-selector {
  align-items: end;
  background: var(--product-surface);
  border: 1px solid var(--product-line);
  border-radius: 5px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(280px, 1.4fr) minmax(180px, 1fr) minmax(180px, 1fr);
  padding: 12px;
}

.owner-module-selector > div {
  border-inline-start: 1px solid var(--product-line);
  display: grid;
  gap: 3px;
  min-height: 46px;
  padding-inline-start: 12px;
}

.owner-module-selector > div > span,
.owner-module-selector > div > small {
  color: var(--product-muted);
  font-size: 8px;
}

.owner-module-selector > div > strong {
  color: var(--product-navy-strong);
  font-size: 11px;
}

.owner-module-bundles {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.owner-module-bundle {
  align-items: center;
  background: #f8fafb;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.owner-module-bundle.enabled {
  background: #eef8f4;
  border-color: #afd8c7;
  color: #176b4b;
}

.owner-module-bundle > div,
.owner-module-name > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.owner-module-bundle strong,
.owner-module-name strong {
  font-size: 9px;
}

.owner-module-bundle small,
.owner-module-name small {
  color: var(--product-muted);
  font-size: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-module-name {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 170px;
}

.owner-module-name .module-market-icon {
  height: 32px;
  width: 32px;
}

.owner-module-mobile-action {
  display: none;
  margin-inline-start: auto;
}

.owner-module-period {
  display: grid;
  gap: 3px;
  white-space: nowrap;
}

.owner-module-period small {
  color: var(--product-muted);
  font-size: 7px;
}

.owner-module-entitlement-modal {
  max-width: min(680px, calc(100vw - 28px));
}

@media (max-width: 1180px) {
  .owner-pipeline-strip {
    grid-template-columns: repeat(7, minmax(132px, 1fr));
  }

  .owner-overview-grid {
    grid-template-columns: 1fr;
  }

  .owner-module-bundles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .owner-command-head,
  .owner-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .owner-command-head .actions,
  .owner-detail-head .actions {
    width: 100%;
  }

  .owner-filter-band {
    grid-template-columns: 1fr;
  }

  .owner-module-selector {
    grid-template-columns: 1fr;
  }

  .owner-module-selector > div {
    border-inline-start: 0;
    border-block-start: 1px solid var(--product-line);
    padding-block-start: 8px;
    padding-inline-start: 0;
  }

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

  .owner-context-badge {
    display: none;
  }

  .owner-company-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .owner-command-head {
    min-height: 0;
    padding: 15px;
  }

  .owner-command-head h2 {
    font-size: 16px;
  }

  .owner-command-head .actions,
  .owner-detail-head .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .owner-command-head .actions .btn,
  .owner-detail-head .actions .btn {
    width: 100%;
  }

  .owner-registration-alert {
    align-items: flex-start;
    flex-direction: column;
  }

  .owner-detail-head .actions .btn:last-child {
    grid-column: 1 / -1;
  }

  .owner-module-bundles {
    grid-template-columns: 1fr;
  }

  .owner-module-mobile-action {
    display: inline-flex;
  }

  .owner-company-facts {
    grid-template-columns: 1fr !important;
  }

  .owner-related-section,
  .owner-detail-head {
    padding: 13px 12px;
  }

  .owner-unsubscribed-list > div {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-unsubscribed-list .btn {
    width: 100%;
  }
}

.standard-compliance-strip {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 16px;
}

.standard-compliance-strip.success {
  background: #f0fdf4;
  border-color: #86efac;
}

.standard-compliance-strip.warning {
  background: #fffbeb;
  border-color: #fcd34d;
}

.standard-compliance-strip.danger {
  background: #fef2f2;
  border-color: #fca5a5;
}

.standard-compliance-strip > div:first-child {
  display: grid;
  gap: 3px;
}

.standard-compliance-strip strong {
  color: #172033;
  font-size: 14px;
}

.standard-compliance-strip span {
  color: #5b6475;
  font-size: 12px;
}

.delivery-ticket-modal .modal-card,
.fresh-test-modal .modal-card {
  max-width: min(1120px, calc(100vw - 32px));
}

.delivery-ticket-form,
.fresh-test-modal form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ready-mix-6044-workspace .panel-body {
  min-width: 0;
}

@media (max-width: 900px) {
  .standard-compliance-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-ticket-form,
  .fresh-test-modal form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .delivery-ticket-form,
  .fresh-test-modal form {
    grid-template-columns: 1fr;
  }
}

.paged-module-loading,
.paged-collection-controls {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-width: 0;
  padding: 18px 20px;
}

.paged-module-loading {
  min-height: 132px;
}

.paged-module-loading > div,
.paged-collection-controls > div:first-child {
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.paged-module-loading h2 {
  color: #172033;
  font-size: 17px;
  margin: 0;
}

.paged-module-loading p,
.paged-collection-controls span {
  color: #667085;
  font-size: 12px;
  margin: 0;
}

.paged-loading-icon {
  align-items: center;
  background: #eef7f2;
  border-radius: 8px;
  color: #176b4b;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.paged-loading-icon [data-lucide="loader-circle"],
.paged-collection-actions [data-lucide="loader-circle"],
.global-search-empty [data-lucide="loader-circle"] {
  animation: paged-data-spin 900ms linear infinite;
}

.paged-collection-controls {
  align-items: flex-start;
  margin-top: 12px;
}

.paged-collection-controls strong {
  align-items: center;
  color: #344054;
  display: flex;
  font-size: 13px;
  gap: 7px;
}

.paged-collection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.paged-collection-actions .btn {
  min-height: 36px;
}

.paged-collection-actions small {
  color: #667085;
  font-size: 10px;
  margin-inline-start: 3px;
}

@keyframes paged-data-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  .paged-module-loading,
  .paged-collection-controls {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .paged-collection-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .paged-collection-actions .btn {
    justify-content: flex-start;
    width: 100%;
  }
}
