/* 2026-10-13 refined clinical workspace */
body {
  background: var(--paper);
}

.app-shell.is-customer-list .main-workspace,
.app-shell.is-focus-workspace .main-workspace,
.app-shell.is-customer-center.is-customer-detail .main-workspace {
  max-width: 1480px;
}

.main-workspace {
  padding-top: 22px;
}

.customer-topbar {
  position: relative;
  align-items: center;
  min-height: 76px;
  margin-bottom: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.customer-topbar .page-title {
  gap: 5px;
}

.customer-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.customer-title-line h1 {
  overflow: hidden;
  color: #191719;
  font-size: clamp(27px, 3vw, 36px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-title-line .customer-type-badge {
  flex: 0 0 auto;
}

.customer-topbar .top-actions {
  align-items: center;
  flex-wrap: nowrap;
}

.top-action-menu {
  position: relative;
}

.top-action-menu > summary {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--muvia);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}

.top-action-menu > summary::-webkit-details-marker {
  display: none;
}

.top-action-menu[open] > summary {
  border-color: var(--line-strong);
  box-shadow: 0 8px 20px rgba(45, 36, 39, 0.08);
}

.top-action-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  width: 190px;
  overflow: hidden;
  padding: 6px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 52px rgba(34, 28, 30, 0.14);
  backdrop-filter: blur(18px);
}

.top-action-menu-panel button {
  min-height: 40px;
  padding: 0 11px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.top-action-menu-panel button:hover {
  background: #f4f3f2;
}

.top-action-menu-panel button.danger-text {
  color: var(--danger);
}

.tabs {
  gap: 2px;
  margin: 0 0 18px;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}

.tab-btn {
  position: relative;
  min-height: 48px;
  padding: 0 15px;
  border: 0;
  font-size: 13px;
}

.tab-btn.is-active {
  color: var(--muvia);
  background: transparent;
}

.tab-btn.is-active::after {
  position: absolute;
  right: 13px;
  bottom: -1px;
  left: 13px;
  height: 2px;
  background: var(--muvia);
  content: "";
}

.visit-workflow-bar {
  margin: 0 0 18px;
  padding: 13px 16px;
  background: #fff;
  border-color: #e2dfe0;
  box-shadow: 0 8px 26px rgba(45, 36, 39, 0.035);
}

.customer-home {
  gap: 14px;
}

.customer-home-hero {
  min-height: 124px;
  padding: 24px 26px;
  background: #fff;
  border-color: #e2dfe0;
  box-shadow: 0 10px 30px rgba(45, 36, 39, 0.04);
}

.customer-home-hero h2 {
  margin-top: 7px;
  color: #1c191b;
  font-size: 26px;
}

.customer-home-actions .primary-btn,
.customer-home-actions .ghost-btn {
  min-height: 42px;
}

.customer-home-metrics {
  gap: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 9px 26px rgba(45, 36, 39, 0.035);
}

.customer-home-metrics article {
  min-height: 92px;
  padding: 17px 20px;
  border: 0;
  border-radius: 0;
}

.customer-home-metrics article + article {
  border-left: 1px solid var(--line);
}

.customer-home-metrics strong {
  font-size: 25px;
}

.customer-home-section {
  border-color: #e2dfe0;
  box-shadow: 0 10px 30px rgba(45, 36, 39, 0.04);
}

.workbench-topbar {
  min-height: 68px;
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.workbench-brand img {
  width: 38px;
}

.workbench-top-actions > input {
  background: #fff;
  border-color: #dedbdd;
}

.today-workbench {
  gap: 16px;
}

.workbench-date-rail {
  padding: 9px 11px;
  background: #fff;
  border-color: #e2dfe0;
  box-shadow: 0 8px 26px rgba(45, 36, 39, 0.035);
}

.date-rail-day {
  min-height: 62px;
}

.workbench-summary {
  grid-template-columns: minmax(150px, 0.56fr) minmax(0, 2.44fr);
  align-items: stretch;
  gap: 18px;
}

.workbench-heading {
  align-content: center;
  padding: 4px 2px;
}

.workbench-heading h1 {
  font-size: clamp(28px, 3vw, 38px);
}

.workbench-summary-metrics {
  min-height: 78px;
  background: #fff;
  border-color: #e2dfe0;
  box-shadow: 0 8px 26px rgba(45, 36, 39, 0.035);
}

.workbench-summary-metrics strong {
  font-size: clamp(22px, 2vw, 27px);
}

.collaboration-board {
  gap: 11px;
  padding: 5px 0 0;
  border-top: 0;
}

.collaboration-board-head span {
  font-size: 10px;
  letter-spacing: 0.08em;
}

.collaboration-board-head h2 {
  margin-top: 2px;
  font-size: 18px;
}

.collaboration-lanes {
  gap: 12px;
}

.collaboration-lane {
  position: relative;
  grid-template-columns: 80px minmax(142px, 0.85fr) minmax(0, 1.35fr);
  align-items: stretch;
  gap: 14px;
  min-height: 146px;
  padding: 17px 18px;
  overflow: hidden;
  background: #fff;
  border-color: #e2dfe0;
  box-shadow: 0 10px 30px rgba(45, 36, 39, 0.045);
}

.collaboration-lane::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--muvia);
  content: "";
}

.collaboration-lane.lane-exam::before {
  background: #8b6b45;
}

.collaboration-lane.lane-operation::before {
  background: var(--sage);
}

.collaboration-lane-title {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 4px;
}

.collaboration-lane-title span {
  color: var(--ink);
  font-size: 19px;
  font-weight: 850;
}

.collaboration-lane-title i {
  width: 28px;
  height: 2px;
  background: var(--muvia);
}

.lane-exam .collaboration-lane-title i {
  background: #8b6b45;
}

.lane-operation .collaboration-lane-title i {
  background: var(--sage);
}

.collaboration-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.collaboration-counts > div {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  background: #f4f3f2;
  border-radius: 8px;
}

.collaboration-counts > div.is-active {
  background: var(--muvia-soft);
}

.collaboration-counts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.collaboration-counts dd {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  font-weight: 780;
  line-height: 1;
}

.collaboration-counts .is-active dd {
  color: var(--muvia);
}

.collaboration-queues {
  display: grid;
  align-content: center;
  gap: 9px;
  min-width: 0;
}

.collaboration-queues > div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.collaboration-queues > div > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.collaboration-queues > div > div {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.collaboration-queues button {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  padding: 4px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.collaboration-queues button strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collaboration-queues button span,
.collaboration-queue-empty {
  flex: 0 0 auto;
  color: var(--subtle);
  font-size: 9px;
}

.workbench-stage-filters {
  gap: 3px;
  padding: 4px;
  background: #eae8e8;
  border-radius: 8px;
}

.workbench-stage-filters button {
  min-height: 40px;
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
}

.workbench-stage-filters button.is-active {
  background: #fff;
  border-color: transparent;
  color: var(--muvia);
  box-shadow: 0 2px 8px rgba(45, 36, 39, 0.07);
}

.workbench-stage-filters button.is-active span {
  color: var(--muvia);
}

.schedule-timeline {
  gap: 12px;
}

.schedule-ticket {
  grid-template-columns: 58px minmax(180px, 1.08fr) 104px minmax(250px, 1fr) 146px;
  grid-template-areas:
    "archetype identity status assignments actions"
    "handoff handoff handoff handoff handoff";
  min-height: 132px;
  padding: 18px 20px;
  background: #fff;
  border-color: #e1dfe0;
  box-shadow: 0 9px 28px rgba(45, 36, 39, 0.04);
}

.schedule-ticket:hover {
  box-shadow: 0 15px 36px rgba(45, 36, 39, 0.075);
}

.archetype-badge {
  grid-area: archetype;
  width: 50px;
  height: 50px;
  background: #fff;
}

.schedule-identity {
  grid-area: identity;
}

.workflow-status {
  grid-area: status;
}

.schedule-assignments {
  grid-area: assignments;
}

.schedule-actions {
  grid-area: actions;
}

.assignment-slot {
  background: #f7f6f5;
}

.schedule-handoff {
  grid-area: handoff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.1fr);
  gap: 18px;
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.schedule-handoff-source,
.schedule-handoff-input {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.schedule-handoff span {
  color: var(--muvia);
  font-size: 10px;
  font-weight: 850;
}

.schedule-handoff p {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-handoff textarea {
  width: 100%;
  min-height: 38px;
  max-height: 64px;
  resize: vertical;
  padding: 9px 10px;
  color: var(--ink);
  background: #f7f6f5;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.45;
}

.schedule-handoff textarea:focus {
  background: #fff;
  border-color: var(--line-strong);
}

.panel.sales-panel {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sales-panel > .section-title {
  align-items: center;
  margin-bottom: 14px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 9px 28px rgba(45, 36, 39, 0.04);
}

.deal-progress-panel,
.operation-confirm-panel,
.sale-board-card,
.sale-import-box,
.sale-row,
.sale-notice-card {
  border-color: #e2dfe0;
  box-shadow: 0 9px 28px rgba(45, 36, 39, 0.035);
}

.deal-progress-panel {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sales-summary-grid {
  gap: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 9px 28px rgba(45, 36, 39, 0.035);
}

.sales-summary-card {
  min-height: 82px;
  background: #fff;
  border: 0;
  border-radius: 0;
}

.sales-summary-card + .sales-summary-card {
  border-left: 1px solid var(--line);
}

.operation-confirm-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 20px;
}

.operation-confirm-head,
.operation-confirm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.operation-confirm-head > div {
  min-width: 0;
}

.operation-confirm-head > b {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: var(--muvia);
  background: #f7f1f3;
  border-radius: 6px;
  font-size: 12px;
}

.operation-project-list {
  display: grid;
  gap: 10px;
}

.operation-project-card {
  display: grid;
  grid-template-columns: minmax(210px, 1.45fr) minmax(110px, 0.55fr) minmax(120px, 0.55fr) minmax(220px, 0.9fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 15px;
  background: #fbfafb;
  border: 1px solid #e6e1e3;
  border-radius: 8px;
}

.operation-project-card.is-done {
  background: #f6faf7;
  border-color: #cbdcd3;
}

.operation-project-card.is-not-done {
  background: #faf9f7;
  border-color: #ded8d1;
}

.operation-confirm-panel.is-active {
  border-color: #cdb8c0;
  box-shadow: 0 14px 40px rgba(91, 45, 66, 0.07);
}

.operation-project-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.operation-project-main span,
.operation-project-plan span,
.operation-project-count span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.operation-project-main strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.operation-project-main p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.operation-project-plan,
.operation-project-count {
  display: grid;
  gap: 6px;
}

.operation-project-plan b {
  color: var(--ink);
  font-size: 13px;
}

.operation-project-count input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
}

.operation-project-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.operation-project-actions .chip {
  justify-content: center;
  min-height: 42px;
  text-align: center;
}

.operation-confirm-footer {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.operation-confirm-footer > span {
  color: var(--ink);
  font-size: 13px;
}

.operation-document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .operation-project-card {
    grid-template-columns: minmax(0, 1fr) 120px 150px;
  }

  .operation-project-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .operation-confirm-panel {
    padding: 15px;
  }

  .operation-confirm-head,
  .operation-confirm-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .operation-confirm-head > b {
    align-self: flex-start;
  }

  .operation-project-card,
  .operation-document-grid {
    grid-template-columns: 1fr;
  }

  .operation-project-actions {
    grid-column: auto;
  }

  .operation-confirm-footer button {
    width: 100%;
  }
}

@media (max-width: 1180px) and (min-width: 821px) {
  .collaboration-lane {
    grid-template-columns: 64px minmax(128px, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    padding-inline: 13px;
  }

  .collaboration-counts dd {
    font-size: 30px;
  }

  .collaboration-queues > div {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .schedule-ticket {
    grid-template-columns: 50px minmax(150px, 1fr) 88px minmax(245px, 1.1fr) 126px;
    padding-inline: 15px;
  }

  .schedule-handoff {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  }
}

@media (max-width: 820px) {
  .main-workspace {
    padding-top: 14px;
  }

  .customer-topbar {
    display: flex;
    align-items: center;
  }

  .customer-topbar .top-actions {
    min-width: 0;
  }

  .customer-topbar .visit-pill {
    display: none;
  }

  .client-screen-entry {
    display: none;
  }

  .customer-title-line h1 {
    font-size: 25px;
  }

  .tabs {
    margin-right: -16px;
    margin-left: -16px;
    padding-inline: 12px;
  }

  .customer-home-hero {
    align-items: flex-start;
    padding: 19px;
  }

  .customer-home-hero h2 {
    font-size: 23px;
  }

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

  .customer-home-metrics article:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .customer-home-metrics article:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .workbench-summary {
    grid-template-columns: 1fr;
  }

  .collaboration-board-head {
    display: block;
  }

  .collaboration-lanes {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 1px 1px 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .collaboration-lanes::-webkit-scrollbar {
    display: none;
  }

  .collaboration-lane,
  .collaboration-lane.is-empty {
    flex: 0 0 min(86vw, 340px);
    grid-template-columns: 66px minmax(138px, 0.9fr) minmax(0, 1.1fr);
    min-height: 132px;
    padding: 15px;
    scroll-snap-align: start;
  }

  .collaboration-counts dd {
    font-size: 30px;
  }

  .collaboration-queues > div {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .schedule-ticket {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-areas:
      "archetype identity status"
      "assignments assignments assignments"
      "handoff handoff handoff"
      "actions actions actions";
  }

  .schedule-handoff {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .schedule-handoff-source,
  .schedule-handoff-input {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .schedule-handoff p {
    white-space: normal;
  }

  .schedule-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sales-panel > .section-title {
    align-items: flex-start;
    padding: 17px;
  }

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

  .sales-summary-card:nth-child(odd) {
    border-left: 0;
  }

  .sales-summary-card:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .customer-topbar {
    gap: 10px;
  }

  .customer-title-line h1 {
    max-width: 58vw;
  }

  .top-action-menu-panel {
    position: fixed;
    top: auto;
    right: 14px;
    bottom: calc(74px + var(--safe-bottom));
    left: 14px;
    width: auto;
  }

  .workbench-summary-metrics article {
    padding-inline: 14px;
  }

  .workbench-summary-metrics strong {
    font-size: 21px;
  }

  .collaboration-lane,
  .collaboration-lane.is-empty {
    flex-basis: min(90vw, 330px);
    grid-template-columns: 62px minmax(132px, 0.9fr) minmax(0, 1.1fr);
  }

  .collaboration-lane-title span {
    font-size: 17px;
  }

  .schedule-ticket {
    padding: 14px;
  }

  .schedule-name-line h2 {
    font-size: 19px;
  }

  .schedule-handoff-source,
  .schedule-handoff-input {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Premium clinical system: workbench */
html,
body {
  background: #f8f8f7;
}

.main-workspace {
  width: min(100%, 1480px);
  padding: 24px 28px 48px;
}

.workbench-topbar {
  min-height: 82px;
  margin-bottom: 18px;
  padding: 0 2px 18px;
  border-bottom: 1px solid #dfddde;
}

.workbench-brand {
  gap: 14px;
}

.workbench-brand::after {
  order: 2;
  width: 1px;
  height: 38px;
  margin-left: 2px;
  background: #d8d4d6;
  content: "";
}

.workbench-brand img {
  width: 44px;
  height: auto;
  opacity: 0.94;
}

.workbench-brand div {
  order: 3;
  gap: 3px;
}

.workbench-brand strong {
  color: #201d1f;
  font-size: 17px;
  font-weight: 680;
}

.workbench-brand span {
  color: #8b868a;
  font-size: 11px;
  font-weight: 560;
}

.workbench-date-heading span {
  color: #8b8589;
  font-size: 10px;
  font-weight: 720;
}

.workbench-date-heading strong {
  color: #201d1f;
  font-size: 18px;
  font-weight: 720;
}

.workbench-top-actions > input {
  min-width: 270px;
  min-height: 44px;
  padding-left: 15px;
  background: #fff;
  border-color: #dedbdd;
}

.primary-btn,
.ghost-btn,
.icon-btn {
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  min-height: 44px;
  padding-inline: 17px;
  background: #5b2d42;
  border-color: #5b2d42;
  box-shadow: 0 8px 20px rgba(91, 45, 66, 0.14);
}

.ghost-btn,
.icon-btn {
  background: rgba(255, 255, 255, 0.94);
  border-color: #d9d5d7;
}

.today-workbench {
  gap: 20px;
}

.workbench-date-rail {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e3e0e1;
  box-shadow: 0 12px 36px rgba(37, 31, 34, 0.035);
}

.date-rail-day {
  min-height: 64px;
  border-radius: 7px;
}

.date-rail-day.is-selected {
  color: #fff;
  background: #5b2d42;
  box-shadow: 0 10px 22px rgba(91, 45, 66, 0.16);
}

.workbench-summary {
  grid-template-columns: minmax(180px, 0.62fr) minmax(0, 2.38fr);
  gap: 28px;
}

.workbench-heading {
  position: relative;
  align-content: end;
  min-height: 94px;
  padding: 10px 0 8px 18px;
}

.workbench-heading::before {
  position: absolute;
  top: 12px;
  bottom: 10px;
  left: 0;
  width: 3px;
  background: #5b2d42;
  border-radius: 999px;
  content: "";
}

.workbench-heading span {
  color: #8a4b61;
  font-size: 11px;
  font-weight: 760;
}

.workbench-heading h1 {
  margin-top: 4px;
  color: #181719;
  font-size: clamp(31px, 3vw, 42px);
  font-weight: 680;
}

.workbench-summary-metrics {
  min-height: 94px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfddde;
  border-radius: 8px;
  box-shadow: 0 16px 46px rgba(37, 31, 34, 0.045);
}

.workbench-summary-metrics article {
  position: relative;
  min-height: 94px;
  padding: 20px 22px;
}

.workbench-summary-metrics article:first-child::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #5b2d42;
  content: "";
}

.workbench-summary-metrics span {
  color: #777277;
  font-size: 11px;
  font-weight: 680;
}

.workbench-summary-metrics strong {
  color: #5b2d42;
  font-size: clamp(24px, 2.2vw, 31px);
  font-weight: 720;
}

.collaboration-board {
  gap: 13px;
}

.collaboration-board-head {
  padding: 2px 2px 0;
}

.collaboration-board-head span {
  color: #8a4b61;
  font-size: 10px;
  font-weight: 760;
}

.collaboration-board-head h2 {
  color: #201d1f;
  font-size: 19px;
  font-weight: 680;
}

.collaboration-lanes {
  gap: 14px;
}

.collaboration-lane {
  grid-template-columns: 76px minmax(150px, 0.82fr) minmax(0, 1.18fr);
  min-height: 154px;
  padding: 20px;
  background: #fff;
  border: 1px solid #dfddde;
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(37, 31, 34, 0.045);
}

.collaboration-lane::before {
  height: 2px;
}

.collaboration-lane-title span {
  color: #201d1f;
  font-size: 20px;
  font-weight: 680;
}

.collaboration-lane-title i {
  width: 24px;
  height: 1px;
}

.collaboration-counts {
  gap: 10px;
}

.collaboration-lane .collaboration-counts > div {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100px;
  padding: 10px 7px;
  background: #f7f6f6;
  border: 1px solid transparent;
  border-radius: 7px;
}

.collaboration-lane .collaboration-counts > div.is-active {
  background: #f5ecef;
  border-color: #ead9df;
}

.collaboration-counts dt {
  color: #777277;
  font-size: 11px;
  font-weight: 680;
  line-height: 1.2;
}

.collaboration-counts dd {
  font-size: 39px;
  font-weight: 690;
  line-height: 1;
}

.collaboration-queues {
  align-content: stretch;
  gap: 0;
  overflow: hidden;
  background: #fbfbfa;
  border: 1px solid #ece9ea;
  border-radius: 7px;
}

.collaboration-queues > div {
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 50%;
  padding: 12px 13px;
}

.collaboration-queues > div + div {
  border-top: 1px solid #ece9ea;
}

.collaboration-queues > div > span {
  color: #8c878b;
  font-size: 10px;
  font-weight: 700;
}

.collaboration-queues button strong {
  font-size: 13px;
  font-weight: 680;
}

.workbench-stage-filters {
  gap: 5px;
  padding: 5px;
  background: #eeecec;
  border: 0;
  border-radius: 8px;
}

.workbench-stage-filters button {
  min-height: 43px;
  color: #686468;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 680;
}

.workbench-stage-filters button.is-active {
  color: #fff;
  background: #5b2d42;
  box-shadow: 0 7px 18px rgba(91, 45, 66, 0.14);
}

.workbench-stage-filters button.is-active span {
  color: rgba(255, 255, 255, 0.72);
}

.schedule-timeline {
  gap: 15px;
}

.schedule-row > time {
  color: #242124;
  font-size: 16px;
  font-weight: 650;
}

.schedule-time-dot {
  width: 10px;
  height: 10px;
  background: #5b2d42;
  border: 3px solid #f8f8f7;
  box-shadow: 0 0 0 1px #bdaeb4;
}

.schedule-ticket {
  grid-template-columns: 62px minmax(190px, 1.06fr) 108px minmax(270px, 1.12fr) 150px;
  min-height: 146px;
  padding: 22px 22px 18px;
  background: #fff;
  border: 1px solid #dfddde;
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(37, 31, 34, 0.045);
}

.schedule-ticket:hover {
  border-color: #cec7ca;
  box-shadow: 0 20px 52px rgba(37, 31, 34, 0.075);
}

.archetype-badge,
.directory-archetype {
  color: #5b2d42;
  background: #faf7f8;
  border-color: #d8c8ce;
  filter: grayscale(1) sepia(0.4) saturate(1.1);
  font-size: 23px;
}

.schedule-name-line h2 {
  color: #1d1a1c;
  font-size: 21px;
  font-weight: 690;
}

.schedule-identity p {
  color: #817c80;
  font-size: 11px;
}

.schedule-identity > strong {
  color: #393438;
  font-size: 14px;
  font-weight: 650;
}

.workflow-status {
  justify-self: start;
  min-width: 84px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
  text-align: center;
}

.assignment-slot {
  min-height: 72px;
  background: #f8f7f7;
  border: 1px solid #edeaeb;
  border-radius: 7px;
}

.assignment-person strong {
  font-weight: 680;
}

.schedule-actions .primary-btn,
.schedule-actions .ghost-btn {
  min-height: 46px;
}

.schedule-handoff {
  margin-top: 2px;
  padding-top: 16px;
  border-top-color: #ebe8e9;
}

.schedule-handoff span {
  color: #7a4155;
  font-size: 10px;
  font-weight: 740;
}

.schedule-handoff p,
.schedule-handoff textarea {
  font-size: 12px;
}

.schedule-handoff textarea {
  min-height: 40px;
  background: #f8f7f7;
  border-color: #ebe8e9;
}

/* Premium clinical system: customer workspace */
.customer-topbar {
  min-height: 88px;
  margin-bottom: 0;
  padding: 0 0 18px;
}

.customer-list-back-link {
  color: #7a4155;
  font-size: 12px;
  font-weight: 680;
}

.customer-title-line h1 {
  color: #1a1819;
  font-size: clamp(29px, 3vw, 39px);
  font-weight: 690;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 18;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0 0 1px;
  background: rgba(248, 248, 247, 0.94);
  border-bottom-color: #dfddde;
  backdrop-filter: blur(18px);
}

.tab-btn {
  min-height: 52px;
  padding-inline: 14px;
  color: #777277;
  font-size: 13px;
  font-weight: 680;
}

.tab-btn.is-active {
  color: #5b2d42;
}

.visit-workflow-bar {
  min-height: 72px;
  margin-bottom: 22px;
  padding: 14px 18px;
  border: 1px solid #dfddde;
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(37, 31, 34, 0.04);
}

.panel {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.panel > .section-title,
.sales-panel > .section-title {
  align-items: center;
  margin-bottom: 16px;
  padding: 21px 22px;
  background: #fff;
  border: 1px solid #dfddde;
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(37, 31, 34, 0.04);
}

.section-title h2 {
  color: #1d1a1c;
  font-size: 23px;
  font-weight: 690;
}

.section-title p {
  color: #716d71;
  font-size: 12px;
  line-height: 1.55;
}

.consultation-intake,
.archive-sheet,
.import-box,
.consultant-tools,
.photo-archive-section,
.deal-progress-panel,
.operation-confirm-panel,
.sale-import-box,
.sale-row,
.sale-notice-card,
.decision-hero,
.customer-home-section {
  background: #fff;
  border: 1px solid #dfddde;
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(37, 31, 34, 0.04);
}

.consultation-intake {
  gap: 18px;
  padding: 21px;
}

.consultation-intake-head {
  padding-bottom: 17px;
}

.consultation-intake-head h3 {
  font-size: 21px;
  font-weight: 690;
}

.consultation-entry-status {
  background: #f8f7f7;
  border-color: #e7e3e5;
}

.consultation-entry-status.is-recorded {
  background: #f4ecef;
  border-color: #dfcbd3;
}

.consultation-choice-card,
.consultation-known-phenotypes,
.consultation-phenotype-groups section,
.consultation-detail {
  background: #fbfbfa;
  border-color: #e7e4e5;
  box-shadow: none;
}

.consultation-known-phenotypes {
  border-left: 3px solid #5b2d42;
}

.consultation-choice-card.has-selection,
.consultation-known-phenotypes.has-selection,
.metric-card.has-selection {
  background: #fff;
  border-color: #cdb8c0;
  box-shadow: 0 8px 24px rgba(91, 45, 66, 0.055);
}

.option-btn,
.chip {
  min-height: 43px;
  padding: 10px 12px;
  color: #292528;
  background: #fff;
  border-color: #dfdcdd;
  font-size: 13px;
  font-weight: 650;
}

.option-btn:hover,
.chip:hover {
  border-color: #bcaab1;
  background: #fdfbfc;
}

.option-btn.is-selected,
.chip.is-selected {
  color: #fff;
  background: #5b2d42;
  border-color: #5b2d42;
  box-shadow: 0 6px 16px rgba(91, 45, 66, 0.13);
}

.option-btn.is-none {
  color: #60786d;
}

.option-btn.is-none.is-selected {
  color: #fff;
  background: #60786d;
  border-color: #60786d;
}

.import-box,
.consultant-tools,
.archive-sheet {
  margin-bottom: 16px;
  padding: 20px;
}

.archive-sheet {
  gap: 0;
}

.archive-sheet-head {
  padding-bottom: 16px;
}

.archive-section,
.archive-detail-block {
  padding: 20px 0 8px;
  border-top-color: #ebe8e9;
}

.archive-section h3,
.archive-section-head h3 {
  color: #4d3e45;
  font-size: 14px;
  font-weight: 720;
}

.archive-field input,
.archive-field textarea,
.archive-field select,
.consultant-add-row input,
.sale-gift-input input,
.sale-row input,
.sale-row select,
.import-textarea {
  color: #242124;
  background: #fbfbfa;
  border-color: #dfdcdd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.exam-layout {
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
}

.exam-nav {
  top: 72px;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid #dfddde;
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(37, 31, 34, 0.035);
}

.exam-nav button {
  min-height: 44px;
  padding: 10px 11px;
  border-radius: 6px;
  font-weight: 650;
}

.exam-nav button.is-active {
  color: #fff;
  background: #5b2d42;
  border-color: #5b2d42;
}

.exam-nav button.is-active .exam-count {
  color: rgba(255, 255, 255, 0.72);
}

.exam-section {
  gap: 15px;
}

.exam-section-head {
  padding: 4px 2px 15px;
}

.metric-card,
.exam-photo-panel {
  padding: 18px;
  background: #fff;
  border: 1px solid #dfddde;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(37, 31, 34, 0.035);
}

.metric-head strong {
  color: #272326;
  font-size: 15px;
  font-weight: 690;
}

.metric-instruction {
  color: #817c80;
  font-size: 11px;
}

.photo-archive-section {
  margin-top: 0;
  padding: 20px;
  border-top: 1px solid #dfddde;
}

.photo-archive-section + .photo-archive-section {
  margin-top: 16px;
}

.photo-card {
  padding: 16px;
  background: #fff;
  border-color: #dfddde;
  box-shadow: 0 10px 28px rgba(37, 31, 34, 0.03);
}

.photo-frame,
.inline-photo-frame {
  background: #171416;
  border-color: #393236;
}

.sales-summary-grid,
.customer-home-metrics {
  border-color: #dfddde;
  box-shadow: 0 14px 40px rgba(37, 31, 34, 0.04);
}

.sales-action-board {
  gap: 14px;
}

.sale-board-card {
  min-height: 168px;
  padding: 18px;
  background: #fff;
  border-color: #dfddde;
  box-shadow: 0 12px 34px rgba(37, 31, 34, 0.035);
}

.sale-board-card.is-opened,
.sale-board-card.is-target,
.sale-gift-box,
.sale-preset-group,
.sale-classify-line {
  background: #fbfbfa;
}

.deal-progress-panel {
  padding: 19px;
}

.deal-progress-step {
  min-height: 64px;
  background: #f8f7f7;
}

.deal-progress-step.is-current {
  background: #f5ecef;
  border-color: #dbc5ce;
}

.customer-home-hero {
  min-height: 138px;
  padding: 26px 28px;
  border-color: #dfddde;
  box-shadow: 0 16px 44px rgba(37, 31, 34, 0.04);
}

.customer-home-hero h2 {
  color: #1b191a;
  font-size: 28px;
  font-weight: 690;
}

.customer-home-metrics article {
  min-height: 98px;
  padding: 20px 22px;
}

.customer-home-metrics strong {
  color: #5b2d42;
  font-size: 27px;
  font-weight: 710;
}

.customer-home-section {
  padding: 21px;
}

.directory-heading h1 {
  color: #1b191a;
  font-weight: 690;
}

.directory-row {
  min-height: 108px;
  background: #fff;
  border-color: #dfddde;
  box-shadow: 0 12px 34px rgba(37, 31, 34, 0.035);
}

@media (max-width: 1180px) and (min-width: 821px) {
  .main-workspace {
    padding-inline: 22px;
  }

  .workbench-top-actions > input {
    min-width: 210px;
  }

  .collaboration-lane {
    grid-template-columns: 68px minmax(136px, 0.8fr) minmax(0, 1.2fr);
    padding: 17px;
  }

  .schedule-ticket {
    grid-template-columns: 54px minmax(156px, 1fr) 92px minmax(230px, 1.08fr) 132px;
    padding-inline: 17px;
  }
}

@media (max-width: 820px) {
  .main-workspace {
    padding: 16px 16px calc(102px + var(--safe-bottom));
  }

  .workbench-summary {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .workbench-heading {
    min-height: 76px;
  }

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

  .workbench-summary-metrics article {
    min-height: 82px;
    padding: 16px;
  }

  .collaboration-lane,
  .collaboration-lane.is-empty {
    flex-basis: min(88vw, 352px);
    grid-template-columns: 62px minmax(126px, 0.85fr) minmax(0, 1.15fr);
    min-height: 142px;
    padding: 15px;
  }

  .collaboration-lane .collaboration-counts > div {
    min-height: 92px;
  }

  .collaboration-counts dd {
    font-size: 34px;
  }

  .schedule-ticket {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    padding: 17px;
  }

  .panel > .section-title,
  .sales-panel > .section-title {
    padding: 18px;
  }

  .consultation-intake,
  .archive-sheet,
  .import-box,
  .consultant-tools,
  .photo-archive-section,
  .metric-card,
  .exam-photo-panel,
  .customer-home-section {
    padding: 17px;
  }

  .exam-layout {
    grid-template-columns: 1fr;
  }

  .exam-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 6px;
    scroll-snap-type: x proximity;
  }

  .exam-nav button {
    flex: 0 0 auto;
    min-width: 118px;
    scroll-snap-align: start;
  }

  .consultation-primary-grid,
  .consultation-detail-grid,
  .consultation-note-grid,
  .consultation-phenotype-groups {
    grid-template-columns: 1fr;
  }

  .consultation-phenotype-groups section:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .workbench-heading h1 {
    font-size: 31px;
  }

  .workbench-summary-metrics strong {
    font-size: 22px;
  }

  .workbench-stage-filters {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .workbench-stage-filters button {
    flex: 0 0 auto;
    min-width: 96px;
  }

  .schedule-ticket {
    grid-template-columns: 46px minmax(0, 1fr) auto;
  }

  .archetype-badge {
    width: 44px;
    height: 44px;
  }

  .section-title h2 {
    font-size: 21px;
  }

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

/* Consultation psychology: client-led record and a concise handoff for staff. */
.consultation-topic-block {
  display: grid;
  gap: 12px;
}

.consultation-subhead {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.consultation-subhead span {
  color: var(--muvia);
  font-size: 11px;
  font-weight: 800;
}

.consultation-subhead strong {
  color: var(--ink);
  font-size: 15px;
}

.psychology-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 14px;
  align-items: start;
}

.psychology-question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.psychology-choice-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 15px;
  background: #fbfbfa;
  border: 1px solid #e7e4e5;
  border-radius: 8px;
}

.psychology-choice-card.has-selection {
  background: #fff;
  border-color: #cdb8c0;
  box-shadow: 0 8px 24px rgba(91, 45, 66, 0.055);
}

.psychology-choice-card.is-wide {
  grid-column: 1 / -1;
}

.psychology-choice-title {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.psychology-choice-title > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--muvia);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 850;
}

.psychology-choice-title > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.psychology-choice-title strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.psychology-choice-title small {
  overflow-wrap: anywhere;
  color: var(--muvia);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.psychology-choice-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.communication-guide-card {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  padding: 18px;
  color: #fff;
  background: #5b2d42;
  border: 1px solid #5b2d42;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(66, 31, 47, 0.14);
}

.communication-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}

.communication-guide-head span {
  font-weight: 800;
}

.communication-guide-head b {
  padding: 4px 8px;
  color: #5b2d42;
  background: #fff;
  border-radius: 999px;
  font-size: 10px;
}

.communication-guide-card h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

.communication-guide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.communication-guide-tags span {
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 10px;
}

.communication-guide-steps,
.communication-result-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.communication-guide-steps li,
.communication-result-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.communication-guide-steps b,
.communication-result-steps b {
  font-size: 11px;
}

.communication-guide-steps span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  line-height: 1.55;
}

.communication-result-card > strong {
  color: var(--muvia);
  font-size: 16px;
}

.communication-result-steps span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* One phenotype, one price card. */
.phenotype-pricing-section {
  display: grid;
  gap: 14px;
}

.phenotype-pricing-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.phenotype-pricing-head > div {
  display: grid;
  gap: 4px;
}

.phenotype-pricing-head span {
  color: var(--muvia);
  font-size: 11px;
  font-weight: 800;
}

.phenotype-pricing-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.phenotype-pricing-head > strong {
  color: var(--muted);
  font-size: 12px;
}

.pricing-priority-note {
  margin: 0;
  padding: 10px 12px;
  color: #7b4f1f;
  background: #fff9ef;
  border-left: 3px solid #c58a45;
  font-size: 12px;
  line-height: 1.55;
}

.sales-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.phenotype-price-card {
  align-content: start;
  min-width: 0;
  padding: 17px;
  border-color: #e4e0e2;
}

.phenotype-price-card.is-recorded {
  border-color: #cdb8c0;
  box-shadow: 0 10px 28px rgba(91, 45, 66, 0.07);
}

.phenotype-price-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 13px;
  border-bottom: 1px solid #ece8ea;
}

.phenotype-price-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.phenotype-price-title > span {
  color: var(--muvia);
  font-size: 10px;
  font-weight: 850;
}

.phenotype-price-title h4 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
}

.phenotype-price-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.phenotype-price-total {
  display: grid;
  gap: 3px;
  text-align: right;
}

.phenotype-price-total span {
  color: var(--muted);
  font-size: 10px;
}

.phenotype-price-total strong {
  color: var(--muvia);
  font-size: 18px;
  line-height: 1.2;
}

.phenotype-price-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.phenotype-price-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.phenotype-price-fields label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.phenotype-price-fields .price-phenotype-field,
.phenotype-price-fields .price-project-field,
.phenotype-price-fields label:last-child {
  grid-column: 1 / -1;
}

.phenotype-price-fields label:last-child input {
  color: var(--muvia);
  font-size: 17px;
  font-weight: 750;
}

.phenotype-project-options {
  display: grid;
  gap: 8px;
}

.phenotype-project-options > span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
}

.sale-project-library,
.sale-more-settings,
.additional-phenotype-pricing {
  border-top: 1px solid #ece8ea;
}

.sale-project-library > summary,
.sale-more-settings > summary,
.additional-phenotype-pricing > summary {
  padding: 12px 0 0;
  color: var(--muvia);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  list-style-position: inside;
}

.sale-more-settings > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sale-more-settings > summary b {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-align: right;
}

.sale-more-content {
  display: grid;
  gap: 13px;
  padding-top: 13px;
}

.sale-gift-box,
.sale-today-execution {
  display: grid;
  gap: 11px;
  padding: 13px;
  background: #fcfafb;
  border: 1px solid #e7dfe2;
  border-radius: 8px;
}

.sale-gift-head,
.sale-today-execution-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sale-gift-head > strong,
.sale-today-execution-head > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.sale-gift-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
}

.sale-gift-fields label,
.sale-today-count,
.sale-today-note {
  display: grid;
  gap: 6px;
}

.sale-gift-fields label > span,
.sale-today-count > span,
.sale-today-note > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.sale-today-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 210px;
}

.sale-today-toggle .chip {
  min-height: 36px;
  padding: 7px 12px;
}

.sale-today-count {
  grid-template-columns: minmax(0, 1fr) 108px;
  align-items: center;
}

.sale-today-count input {
  text-align: center;
}

.sale-execution-balance {
  margin: 0;
  padding: 9px 11px;
  color: #6f5360;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
  background: #f5eef1;
  border-left: 3px solid var(--brand);
  border-radius: 5px;
}

.additional-phenotype-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding-top: 12px;
}

.sale-order-empty {
  min-height: 120px;
}

.phenotype-add-btn {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 11px 12px;
  text-align: left;
  background: #fff;
  border: 1px solid #e2dddf;
  border-radius: 8px;
}

.phenotype-add-btn:hover {
  border-color: #bda7b0;
  background: #fdfafb;
}

.phenotype-add-btn strong {
  color: var(--ink);
  font-size: 13px;
}

.phenotype-add-btn span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.phenotype-add-btn b {
  justify-self: end;
  color: var(--muvia);
  font-size: 11px;
}

.finance-sale-row {
  grid-template-columns: 150px minmax(170px, 1fr) 110px 80px 120px auto;
}

.finance-sale-phenotype {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.finance-sale-phenotype span {
  color: var(--muted);
  font-size: 10px;
}

.finance-sale-phenotype strong {
  overflow-wrap: anywhere;
  color: var(--muvia);
  font-size: 12px;
}

@media (max-width: 1040px) {
  .psychology-workspace {
    grid-template-columns: 1fr;
  }

  .communication-guide-card {
    position: static;
  }

  .sales-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .psychology-question-grid,
  .additional-phenotype-grid {
    grid-template-columns: 1fr;
  }

  .psychology-choice-card.is-wide {
    grid-column: auto;
  }

  .phenotype-pricing-head {
    align-items: start;
  }

  .phenotype-price-card {
    padding: 15px;
  }

  .finance-sale-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .consultation-intake {
    padding: 15px;
  }

  .consultation-intake-head,
  .phenotype-pricing-head {
    display: grid;
  }

  .consultation-record-count {
    width: 100%;
  }

  .phenotype-price-fields {
    grid-template-columns: 1fr;
  }

  .phenotype-price-fields .price-phenotype-field,
  .phenotype-price-fields .price-project-field,
  .phenotype-price-fields label:last-child {
    grid-column: auto;
  }

  .sale-gift-head,
  .sale-today-execution-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sale-gift-fields,
  .sale-today-count {
    grid-template-columns: 1fr;
  }

  .sale-today-toggle {
    min-width: 0;
    width: 100%;
  }
}

/* Per-visit clinical history and a phone-first, task-focused workspace. */
.current-visit-record {
  position: relative;
  display: grid;
  gap: 16px;
  border-left: 3px solid var(--muvia);
}

.current-visit-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.current-visit-metrics > div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 13px 14px;
  background: #f8f6f7;
  border: 1px solid #e8e2e4;
  border-radius: 7px;
}

.current-visit-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.current-visit-metrics strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 760;
}

.current-visit-continue {
  justify-self: end;
}

.visit-timeline-item.is-current {
  border-color: #c9adb7;
  box-shadow: 0 10px 28px rgba(91, 45, 66, 0.07);
}

.visit-timeline-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.visit-record-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.visit-record-metrics i {
  padding: 4px 7px;
  color: #655b60;
  background: #f5f2f3;
  border-radius: 5px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.visit-timeline-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

@media (max-width: 820px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-shell.is-focus-workspace .main-workspace,
  .app-shell.is-customer-center.is-customer-detail .main-workspace {
    width: 100%;
    max-width: none;
    padding: 12px 12px calc(96px + var(--safe-bottom));
  }

  .visit-workflow-bar {
    display: none;
  }

  .mobile-clinic-bar.is-customer-workspace {
    gap: 7px;
  }

  .mobile-clinic-bar.is-customer-workspace .mobile-workspace-row {
    padding-top: 7px;
    border-top: 1px solid #eadfe3;
  }

  .panel > .section-title,
  .sales-panel > .section-title {
    gap: 10px;
    margin-bottom: 12px;
    padding: 15px;
    box-shadow: 0 8px 24px rgba(37, 31, 34, 0.035);
  }

  .panel > .section-title .section-actions,
  .sales-panel > .section-title .section-actions {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .panel > .section-title .section-actions button,
  .sales-panel > .section-title .section-actions button {
    flex: 0 0 auto;
  }

  .collaboration-board {
    overflow: hidden;
  }

  .collaboration-lanes {
    display: grid;
    grid-auto-columns: minmax(156px, 43vw);
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .collaboration-lanes::-webkit-scrollbar {
    display: none;
  }

  .collaboration-lane,
  .collaboration-lane.is-empty {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 10px;
    min-height: 132px;
    padding: 13px;
    scroll-snap-align: start;
  }

  .collaboration-lane-title {
    min-height: 0;
  }

  .collaboration-counts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .collaboration-lane .collaboration-counts > div {
    min-height: 64px;
    padding: 8px;
  }

  .collaboration-counts dd {
    font-size: 27px;
  }

  .collaboration-queues {
    display: none;
  }

  .schedule-ticket {
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(37, 31, 34, 0.045);
  }

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

  .current-visit-continue {
    justify-self: stretch;
    width: 100%;
  }

  .visit-timeline-item {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .visit-timeline-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
  }

  .visit-timeline-actions .text-btn,
  .visit-timeline-actions .ghost-btn {
    width: 100%;
  }

  .exam-nav {
    position: static;
    z-index: auto;
  }

  .mobile-bottom-nav {
    grid-template-columns: minmax(82px, .8fr) minmax(90px, 1fr) minmax(104px, 1.05fr);
  }
}

@media (max-width: 520px) {
  .main-workspace,
  .app-shell.is-focus-workspace .main-workspace,
  .app-shell.is-customer-center.is-customer-detail .main-workspace {
    padding: 10px 10px calc(94px + var(--safe-bottom));
  }

  .mobile-clinic-bar {
    margin: calc(-10px - env(safe-area-inset-top)) -10px 10px;
    padding: calc(9px + env(safe-area-inset-top)) 10px 9px;
  }

  .mobile-clinic-brand img {
    width: 36px;
  }

  .mobile-clinic-brand strong {
    font-size: 14px;
  }

  .mobile-clinic-brand span {
    font-size: 10px;
  }

  .mobile-type-badge {
    max-width: 84px;
    font-size: 10px;
  }

  .mobile-back-customers {
    min-height: 38px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .mobile-current-customer strong {
    font-size: 15px;
  }

  .mobile-current-customer span {
    font-size: 10px;
  }

  .app-shell.is-focus-workspace .customer-topbar,
  .app-shell.is-customer-center.is-customer-detail .customer-topbar {
    display: none;
  }

  .workbench-summary {
    gap: 8px;
  }

  .workbench-heading {
    min-height: 58px;
    padding: 12px 14px;
  }

  .workbench-heading h1 {
    font-size: 25px;
  }

  .workbench-summary-metrics {
    gap: 0;
  }

  .workbench-summary-metrics article {
    min-height: 70px;
    padding: 11px 12px;
  }

  .workbench-summary-metrics strong {
    font-size: 19px;
  }

  .collaboration-board-head h2 {
    font-size: 17px;
  }

  .collaboration-lanes {
    grid-auto-flow: initial;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .collaboration-lane,
  .collaboration-lane.is-empty {
    min-width: 0;
    min-height: 108px;
    padding: 10px 7px;
    gap: 7px;
  }

  .collaboration-lane-title {
    justify-items: center;
    padding-top: 0;
  }

  .collaboration-lane-title span {
    font-size: 15px;
  }

  .collaboration-lane-title i {
    width: 18px;
  }

  .collaboration-lane .collaboration-counts > div {
    min-height: 48px;
    padding: 5px 2px;
  }

  .collaboration-counts {
    gap: 4px;
  }

  .collaboration-counts dt {
    font-size: 9px;
  }

  .collaboration-counts dd {
    font-size: 22px;
  }

  .workbench-stage-filters {
    display: grid;
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-inline: -10px;
    padding: 8px 10px;
    background: rgba(255, 250, 250, 0.96);
    border-block: 1px solid #eee5e8;
    backdrop-filter: blur(14px);
  }

  .workbench-stage-filters button {
    min-width: 0;
    min-height: 36px;
    padding-inline: 4px;
    font-size: 10px;
    white-space: nowrap;
  }

  .schedule-ticket {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px;
  }

  .schedule-assignments {
    grid-template-columns: repeat(var(--assignment-count), minmax(92px, 1fr));
    overflow-x: auto;
  }

  .schedule-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .schedule-handoff {
    gap: 8px;
    padding-top: 10px;
  }

  .schedule-handoff-source p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .panel > .section-title,
  .sales-panel > .section-title,
  .consultation-intake,
  .archive-sheet,
  .import-box,
  .consultant-tools,
  .photo-archive-section,
  .metric-card,
  .exam-photo-panel,
  .customer-home-section {
    padding: 14px;
  }

  .section-title h2 {
    font-size: 19px;
  }

  .section-title p {
    font-size: 11px;
  }

  .exam-layout {
    gap: 12px;
  }

  .exam-nav {
    margin-inline: -2px;
  }

  .exam-nav button {
    min-width: 104px;
    min-height: 40px;
    font-size: 12px;
  }

  .exam-section-head {
    padding: 2px 2px 10px;
  }

  .exam-section-head h2 {
    font-size: 21px;
  }

  .metric-card,
  .exam-photo-panel {
    padding: 14px;
  }

  .current-visit-metrics > div {
    min-height: 62px;
    padding: 10px;
  }

  .current-visit-metrics strong {
    font-size: 17px;
  }

  .mobile-bottom-nav {
    grid-template-columns: minmax(76px, .78fr) minmax(82px, 1fr) minmax(98px, 1fr);
    gap: 6px;
    padding: 8px 9px calc(8px + var(--safe-bottom));
  }

  .mobile-bottom-nav button {
    min-height: 48px;
    padding: 8px;
    font-size: 13px;
  }

  .mobile-flow-status b {
    font-size: 12px;
  }

  .mobile-flow-status span {
    font-size: 9px;
  }
}
