/* Shared pilot workspace components. Existing brand and navigation remain authoritative. */
:root {
  --workspace-gap: 20px;
  --workspace-accent: #8a542f;
}
.workspace-toolbar,
.collection-meta,
.collection-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.workspace-toolbar {
  margin: 4px 0 22px;
}
.workspace-toolbar p,
.collection-meta p {
  margin: 5px 0 0;
}
.workspace-toolbar > div {
  min-width: 0;
}
.entity-title {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.6px;
  overflow-wrap: anywhere;
}
.filter-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  width: fit-content;
  max-width: 100%;
  background: #eceef0;
  border-radius: 12px;
  flex-wrap: wrap;
}
.filter-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
}
.filter-tabs a span {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #fff8;
}
.filter-tabs a[aria-current="page"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px #00000008;
}
.collection-search {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.collection-search label {
  flex: 1 1 260px;
  max-width: 520px;
  margin: 0;
}
.collection-search input {
  margin-bottom: 0;
}
.collection-search .text-link {
  padding-block: 10px;
}
.collection-meta {
  padding: 16px 0;
  font-size: 12px;
}
.collection-meta .mx-sync-tools {
  margin: 0;
}
.collection-meta .mx-sync-tools p:empty {
  display: none;
}
.workspace-table {
  width: 100%;
}
.workspace-table th {
  font-size: 11px;
  letter-spacing: 0.03em;
  padding-block: 14px;
}
.workspace-table td {
  padding-block: 17px;
  vertical-align: top;
}
.workspace-table td small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
.domain-table td:first-child {
  width: 27%;
}
.domain-table td {
  overflow-wrap: anywhere;
  max-width: 290px;
}
.entity-link {
  font-weight: 650;
}
.entity-link:hover,
.text-link:hover {
  color: var(--workspace-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.collection-pagination {
  justify-content: flex-end;
  padding-top: 20px;
  font-size: 12px;
}
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.evidence-card h3 {
  font-size: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 600;
}
.evidence-card p {
  margin: 14px 0 0;
}
.workspace-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--workspace-gap);
}
.workspace-detail-grid > *,
.evidence-grid > * {
  min-width: 0;
}
.task-checklist {
  padding-left: 20px;
  margin: 16px 0 24px;
}
.task-checklist li {
  padding: 5px 0;
}
.domain-hosts,
.support-contact {
  overflow-wrap: anywhere;
}
.domain-decision-form,
.feedback-form {
  max-width: 850px;
}
.domain-decision-form textarea,
.feedback-form textarea {
  display: block;
  width: 100%;
  font: inherit;
  resize: vertical;
  min-height: 105px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  margin-top: 7px;
}
.disclosure-panel > summary {
  font-weight: 650;
  padding: 4px 0;
  cursor: pointer;
  min-height: 36px;
  align-content: center;
}
.disclosure-content {
  padding-top: 20px;
}
.support-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.next-actions {
  margin-bottom: 24px;
}
.next-actions .panel-heading h2 {
  margin-top: 5px;
  font-size: 19px;
}
.next-action {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.next-action > div {
  flex: 1;
  min-width: 0;
}
.next-action h3 {
  font-size: 14px;
  margin-bottom: 4px;
}
.next-action p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.task-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #f5f0eb;
  border-radius: 11px;
  color: var(--workspace-accent);
}
.task-icon svg {
  width: 18px;
  height: 18px;
}
.task-icon.warning {
  background: #fff4df;
  color: #825715;
}
.context-note {
  padding: 12px 15px;
  border-radius: 9px;
  background: #f4f5f6;
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 0;
}
.freshness-note {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 18px;
}
.journey-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  margin: 18px 0 24px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.journey-strip li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}
.journey-strip li > span {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3f1ee;
  color: #6f5845;
  font-weight: 650;
  font-size: 12px;
}
.journey-strip strong {
  font-size: 12px;
  display: block;
}
.journey-strip small {
  font-size: 11px;
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.evidence-journey {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.evidence-journey .recorded > span {
  background: #edf5f0;
  color: #346446;
}
.connection-hub > summary {
  font-size: 16px;
}
.collection-panel {
  margin-bottom: 14px;
}
.workspace-table [hidden],
[data-filter-row][hidden] {
  display: none !important;
}
/* Visible inset focus follows the existing owner's preference. */
.content :is(a, button, input, select, textarea, summary):focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--workspace-accent);
  border-radius: 5px;
}
@media (max-width: 1150px) {
  .evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .evidence-journey {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .workspace-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .journey-strip,
  .evidence-journey {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .workspace-toolbar {
    align-items: flex-start;
  }
  .filter-tabs {
    width: 100%;
  }
  .filter-tabs a {
    flex: 1 1 40%;
    justify-content: space-between;
    padding: 10px;
    font-size: 12px;
  }
  .domain-table,
  .domain-table tbody,
  .domain-table tr,
  .domain-table td {
    display: block;
    width: 100%;
    max-width: none;
  }
  .domain-table thead {
    display: none;
  }
  .domain-table tr {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
  }
  .domain-table td,
  .domain-table td:first-child {
    width: 100%;
    border: 0;
    padding: 7px 0;
  }
  .domain-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 5px;
  }
  .domain-table td:first-child::before,
  .domain-table td:last-child::before {
    display: none;
  }
  .domain-table td:first-child a {
    font-size: 15px;
  }
  .next-action {
    flex-wrap: wrap;
    gap: 12px;
  }
  .next-action > div {
    flex-basis: calc(100% - 55px);
  }
  .next-action > a {
    margin-left: 50px;
  }
  .next-actions .panel-heading {
    flex-wrap: wrap;
    gap: 12px;
  }
}
@media (max-width: 400px) {
  .evidence-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .collection-pagination {
    justify-content: flex-start;
  }
}

/* Put service evidence and next actions in the same desktop scan area. */
.home-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  grid-template-areas: "metrics metrics" "services tasks" "products tasks" "bottom bottom";
  gap: 20px;
}
.home-dashboard > .home-metrics {
  grid-area: metrics;
  margin: 0 0 4px;
}
.home-dashboard > .home-section-heading {
  grid-area: services;
  margin: 0;
}
.home-dashboard > .home-products {
  grid-area: products;
  margin: 0;
  gap: 16px;
}
.home-dashboard > .next-actions {
  grid-area: tasks;
  margin: 0;
  align-self: start;
}
.home-dashboard > .home-bottom-grid {
  grid-area: bottom;
  margin: 4px 0 0;
}
.home-dashboard > .next-actions .panel-heading {
  display: block;
}
.home-dashboard > .next-actions .panel-heading > a {
  display: inline-block;
  margin-top: 12px;
}
.home-dashboard > .next-actions .next-action {
  flex-wrap: wrap;
  gap: 10px;
}
.home-dashboard > .next-actions .next-action > div {
  flex-basis: calc(100% - 50px);
}
.home-dashboard > .next-actions .next-action > a {
  margin-left: 48px;
}
@media (max-width: 1200px) {
  .home-dashboard {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "metrics" "services" "products" "tasks" "bottom";
  }
}

.backup-heading .actions,
.workspace-toolbar .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-dashboard > .home-products {
  align-self: start;
}
.home-product {
  gap: 18px;
}
.home-product-actions {
  margin-top: 0;
}
.home-product .freshness-note {
  margin-bottom: 0;
}
#recovery-guide pre {
  max-width: 100%;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#recovery-guide code {
  font-family: Inter, sans-serif;
  font-size: 12px;
}

.portal-identity {
  display: grid;
  gap: 4px;
  padding: 0 14px 20px;
  color: #fff;
}
.portal-identity strong {
  font-size: 22px;
  letter-spacing: 0.02em;
}
.portal-identity small {
  color: #b8bcc3;
  font-size: 11px;
}
.portal-switcher {
  position: relative;
  flex-shrink: 0;
}
.portal-switcher > summary {
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
}
.portal-switcher nav {
  position: absolute;
  z-index: 100;
  right: 0;
  top: calc(100% + 8px);
  width: 180px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px #0002;
}
.portal-switcher a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
}
.portal-switcher a:hover,
.portal-switcher a[aria-current] {
  background: var(--bg);
}
@media (min-width: 901px) {
  body[data-sidebar-mode="compact"] .portal-identity {
    padding: 0 0 14px;
    text-align: center;
  }
  body[data-sidebar-mode="compact"] .portal-identity strong {
    font-size: 11px;
  }
  body[data-sidebar-mode="compact"] .portal-identity small {
    display: none;
  }
}
@media (max-width: 650px) {
  body[data-product] .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  body[data-product] .topbar-right {
    flex-wrap: wrap;
    max-width: 100%;
  }
}
