.topbar .brand > span { display: none !important; }
.topbar .brand { gap: 0; }
.dme-old-patient-tab { display: none !important; }
.dme-patient-view-toggle { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid #ddd8d3; border-radius: 8px; background: #fff; align-self: center; flex-shrink: 0; }
.dme-patient-view-toggle button { padding: 8px 13px; border: 0; border-radius: 5px; background: transparent; color: #625c5e; font: inherit; font-size: 13px; cursor: pointer; }
.dme-patient-view-toggle button[aria-pressed="true"] { background: #71101b; color: #fff; }
.dme-patient-view-toggle button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.main[data-patient-view="cards"] .customer-patient-list,
.main[data-patient-view="cards"] .workbench-mobile-cards { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr)); gap: 18px; padding: 18px; }
.main[data-patient-view="cards"] .customer-patient-row,
.main[data-patient-view="cards"] .workbench-patient-card { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 22px; border: 1px solid #e2dcd7; border-radius: 12px; background: #fff; box-shadow: 0 2px 5px #2b131306; min-width: 0; }
.main[data-patient-view="cards"] .customer-patient-row > div { width: auto; min-width: 0; }
.main[data-patient-view="cards"] .customer-patient-row .patient-name,
.main[data-patient-view="cards"] .workbench-patient-card .patient-name { font-size: 19px; font-weight: 650; text-align: left; }
.main[data-patient-view="cards"] .patient-name[data-initials]::before { content: attr(data-initials); display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px; border-radius: 50%; background: #f3e9e5; color: #71101b; font-size: 14px; }
.main[data-patient-view="cards"] .customer-case-status { border-top: 1px solid #eee8e3; padding-top: 12px; }
.main[data-patient-view="cards"] .customer-patient-row .customer-next-action { margin-top: auto; }
.main[data-patient-view="cards"] .workbench-desktop-table { display: none !important; }
@media (max-width: 700px) {
  .main[data-patient-view] > .page-heading { flex-wrap: wrap; gap: 12px; }
  .dme-patient-view-toggle { margin-top: 8px; }
}
.dme-native-patient-profile, .dme-native-patient-history { border-top: 1px solid #e5e1dd; padding-top: 18px; margin-top: 20px; }
.dme-native-patient-profile .patient-service-date { margin: 14px 0; }
.dme-native-patient-history { overflow-x: auto; }
.dme-shipping-connection { background: #fff; border: 1px solid #dedbd6; border-radius: 9px; padding: 16px; margin: 0 0 20px; }
.dme-shipping-connection p { font-size: 13px; line-height: 1.5; margin: 8px 0; }
.dme-shipping-connection[data-connection="connected"] > strong { color: #22804b; }
.dme-shipping-connection[data-connection="attention"] > strong { color: #8a5900; }
.dme-shipping-scope { color: #746e70; }
.dme-simple-headers > .page-heading .eyebrow,
.dme-simple-headers > .page-heading > div > p,
.dme-simple-headers > .page-heading .workspace-role-label,
.dme-simple-headers > .page-heading .contextual-back,
.dme-simple-headers > .workspace-section-tabs > span,
.dme-simple-headers .dme-duplicate-heading,
.dme-simple-headers .dme-duplicate-intro,
.dme-dashboard-heading > div > .dme-section-kicker,
.dme-dashboard-heading > div > p {
  display: none !important;
}
.dme-simple-headers > .page-heading { align-items: center; margin-bottom: 20px; }
.dme-simple-headers > .page-heading h1 { margin: 0; }
.dme-simple-headers .section-heading:has(.dme-duplicate-heading) { padding-block: 10px; }

.dme-billing-filter { display: grid; gap: 7px; max-width: 250px; margin: 0 0 20px; font-size: 13px; }
.dme-billing-filter select { min-height: 40px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; background: white; font: inherit; }
.dme-patient-summary { margin: 0 0 20px; padding: 20px; background: #faf9f7; border: 1px solid #e4dfd9; border-radius: 10px; }
.dme-patient-summary[hidden] { display: none !important; }
.dme-patient-summary h3 { margin: 0 0 8px; font-size: 18px; }
.dme-patient-summary h4 { margin: 16px 0 8px; font-size: 14px; }
.dme-patient-summary p, .dme-patient-summary li { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.dme-summary-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.dme-summary-facts dt { font-size: 11px; color: #777; margin-bottom: 5px; }
.dme-summary-facts dd { margin: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.dme-ai-summary { border-top: 1px solid #ddd6d0; margin-top: 18px; padding-top: 4px; }
.dme-ai-summary button:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 520px) { .dme-summary-facts { grid-template-columns: 1fr; } }
.dme-progress-link {
  display: block; width: 100%; border: 0; padding: 4px 2px; background: transparent;
  text-align: left; cursor: pointer; border-radius: 6px; font: inherit;
}
.dme-progress-link:hover { background: #f3f1ef; }
.dme-progress-link:focus-visible { outline: 2px solid #71101b; outline-offset: 3px; }
.dme-progress-navigation { margin: 8px 0 0; font-size: 12px; color: #71101b; }

.dme-feedback-button { flex-shrink: 0; white-space: nowrap; }
.dme-feedback-dialog {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto;
  box-sizing: border-box; border: 1px solid #e0d9d7; border-radius: 12px; padding: 24px; color: #38252a;
}
.dme-feedback-dialog::backdrop { background: rgb(30 20 25 / 45%); }
.dme-feedback-dialog form { display: grid; gap: 16px; }
.dme-feedback-dialog header, .dme-feedback-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dme-feedback-dialog h2, .dme-feedback-dialog p { margin: 0; }
.dme-feedback-dialog p { font-size: 13px; line-height: 1.5; }
.dme-feedback-dialog label { display: grid; gap: 8px; font-size: 13px; }
.dme-feedback-dialog input, .dme-feedback-dialog select, .dme-feedback-dialog textarea {
  box-sizing: border-box; width: 100%; padding: 10px; border: 1px solid #d9d2ce; border-radius: 6px; font: inherit;
}
.dme-feedback-dialog [hidden] { display: none !important; }
.dme-feedback-status { color: #71101b; font-weight: 600; }
.dme-feedback-delivery { color: #766c70; }
@media (max-width: 760px) {
  .topbar:has(.dme-feedback-button) { flex-wrap: wrap; }
  .dme-feedback-button { margin-left: auto; }
  .dme-feedback-dialog select, .dme-feedback-dialog textarea { font-size: 16px; }
}
.dme-field-wide { grid-column: 1 / -1; }
.dme-typeahead { position: relative; min-width: 0; display: grid; gap: 5px; }
.dme-typeahead-hint { color: #777078; font-size: 11px; line-height: 1.4; font-weight: normal; }
.dme-typeahead-options {
  position: absolute; z-index: 20; top: 44px; left: 0; right: 0; max-height: 230px;
  overflow-y: auto; border: 1px solid #d9cbd0; border-radius: 8px; background: #fff;
  box-shadow: 0 8px 24px rgb(35 20 25 / 15%);
}
.dme-typeahead-options [role="option"] { padding: 11px 12px; cursor: pointer; border-bottom: 1px solid #f0eceb; font-size: 13px; font-weight: normal; }
.dme-typeahead-options [role="option"]:hover,
.dme-typeahead-options [aria-selected="true"] { background: #f8eeee; color: #71101b; }
.dme-typeahead-options [role="option"] small { display: block; margin-top: 4px; font-size: 11px; color: #756c71; }
.dme-intake-review { border: 1px solid #e6d8b7; background: #fffaf0; border-radius: 8px; padding: 16px; }
.dme-intake-review h3 { margin: 0 0 8px; font-size: 15px; }
.dme-intake-review ul { padding-left: 20px; font-size: 12px; line-height: 1.7; margin: 10px 0; }
.dme-procedure-note { color: #716b70; }

.dme-request-progress .request-summary > h2,
.dme-request-progress .request-summary > small.cell-sub { display: none !important; }
.drawer.dme-request-progress > header > div:first-child { flex: 1; min-width: 0; }
.dme-patient-progress { margin: 15px 0 12px; }
.dme-patient-progress ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; list-style: none; margin: 0; padding: 0; }
.dme-order-submission-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 12px; }
.dme-progress-step { min-width: 0; }
.dme-progress-segment { display: block; height: 9px; background: #e9e7ed; border-radius: 6px; margin-bottom: 7px; }
.dme-progress-label { display: block; font-size: 10px; font-weight: 650; color: #827c88; line-height: 1.4; }
.dme-progress-step.is-complete .dme-progress-segment,
.dme-progress-step.is-warning .dme-progress-segment,
.dme-progress-step.is-blocked .dme-progress-segment,
.dme-progress-step.is-cancelled .dme-progress-segment,
.dme-progress-step.is-current .dme-progress-segment { background: var(--step-color); }
.dme-progress-step.is-complete .dme-progress-label,
.dme-progress-step.is-current .dme-progress-label { color: var(--step-color); }
.dme-progress-step[aria-current="step"] .dme-progress-segment { outline: 2px solid var(--step-color); outline-offset: 2px; }
.dme-progress-step.is-blocked .dme-progress-label,
.dme-progress-step.is-warning .dme-progress-label,
.dme-progress-step.is-cancelled .dme-progress-label { color: var(--step-color); }
.dme-progress-state { display: block; font-size: 9px; color: #666; line-height: 1.4; margin-top: 3px; }
.dme-progress-legend { font-size: 10px; color: #666; line-height: 1.5; margin: 8px 0 0; }
.dme-progress-current { margin: 12px 0 0; padding: 8px 10px; border-radius: 6px; background: #edf7f0; color: #22603b; font-size: 12px; font-weight: 600; line-height: 1.5; }
.dme-progress-current[data-signal="blocked"] { background: #fcedee; color: #a02831; }
.dme-progress-current[data-signal="warning"] { background: #fff7dc; color: #805c00; }
@media (max-width: 600px) {
  .dme-patient-progress ol { gap: 4px; }
  .dme-progress-label { font-size: 9px; }
  .drawer.dme-request-progress > header { gap: 10px; }
}

.dme-diagnosis-picker { display: grid; gap: 12px; }
.dme-diagnosis-results { display: grid; max-height: 240px; overflow-y: auto; gap: 4px; }
.dme-diagnosis-results button, .dme-diagnosis-selected button {
  border: 1px solid #ded7d2; border-radius: 5px; background: #fff; color: #71101b;
  padding: 9px 11px; font: inherit; font-size: 13px; cursor: pointer; text-align: left;
}
.dme-diagnosis-results button:hover { background: #f9efee; }
.dme-diagnosis-results button:disabled { opacity: .5; cursor: default; }
.dme-diagnosis-selected { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.dme-diagnosis-selected li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #faf6f3; padding: 10px; border-radius: 6px; }
.dme-diagnosis-selected span { flex: 1 1 260px; font-size: 13px; }
.dme-diagnosis-status { color: #71101b; }

.dme-legacy-case-type { display: none !important; }
.dme-orthopedic-case { display: grid; gap: 5px; margin: 4px 0 8px; overflow-wrap: anywhere; }
.dme-orthopedic-case small { display: block; line-height: 1.5; }
.dme-orthopedic-case small strong { display: inline; font-size: inherit; font-weight: 600; color: #51464a; }

.dme-patients-page .workspace-section-tabs > span,
.dme-patients-page .page-heading .eyebrow,
.dme-patients-page .page-heading > div > p,
.dme-patients-page .page-heading .workspace-role-label,
.dme-patients-page .page-heading .dme-native-refresh,
.dme-patients-page .workspace-freshness,
.dme-patients-page .agreement-alerts,
.dme-patients-page .customer-patient-tracker > .section-heading > div {
  display: none !important;
}
.dme-patients-page .customer-patient-tracker > .section-heading {
  justify-content: flex-end;
  padding-block: 12px;
}
.dme-intake-feedback { color: #5a2530; font-size: 13px; }

.dme-practice-home .customer-patient-tracker,
.dme-practice-home .customer-quick-links,
.dme-practice-home .customer-billing-strip,
.dme-practice-home .daily-recent-updates,
.dme-practice-home .daily-attention {
  display: none !important;
}

.dme-help-templates { margin-bottom: 20px; }

.dme-practice-home .customer-start { display: none !important; }
.dme-home-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.dme-intake-primary {
  border: 1px solid #71101b; background: #71101b; color: white; border-radius: 6px;
  padding: 10px 14px; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
}
.dme-intake-primary:disabled { opacity: .55; cursor: wait; }
.dme-patient-intake {
  width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 40px);
  box-sizing: border-box; padding: 24px; border: 1px solid #e3dfdb;
  border-radius: 12px; color: #38252a; overflow-y: auto;
}
.dme-patient-intake::backdrop { background: rgb(30 20 25 / 45%); }
.dme-patient-intake form { display: grid; gap: 20px; }
.dme-patient-intake header, .dme-patient-intake footer { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.dme-patient-intake h2 { margin: 0 0 8px; }
.dme-patient-intake p { margin: 0; font-size: 13px; line-height: 1.5; }
.dme-intake-note { background: #faf5ec; padding: 12px; border-radius: 6px; }
.dme-patient-intake fieldset { margin: 0; padding: 16px; min-width: 0; border: 1px solid #e3dfdb; border-radius: 8px; }
.dme-patient-intake legend { font-size: 14px; font-weight: 650; padding: 0 6px; }
.dme-intake-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dme-patient-intake label { display: grid; gap: 7px; min-width: 0; font-size: 13px; }
.dme-patient-intake input:not([type="checkbox"]), .dme-patient-intake select, .dme-patient-intake textarea {
  box-sizing: border-box; width: 100%; min-width: 0; padding: 10px; border: 1px solid #d9d2ce; border-radius: 6px; font: inherit; background: white;
}
.dme-patient-intake input:focus-visible, .dme-patient-intake select:focus-visible, .dme-patient-intake textarea:focus-visible {
  outline: 2px solid #71101b; outline-offset: 2px;
}
.dme-patient-intake .dme-intake-check { display: flex; align-items: center; margin: 16px 0; }
.dme-patient-intake [hidden] { display: none !important; }
.dme-patient-intake footer { align-items: center; flex-wrap: wrap; }
.dme-patient-intake footer span { flex: 1; font-size: 12px; line-height: 1.5; color: #716b70; }
@media (max-width: 760px) {
  .dme-dashboard-heading { flex-wrap: wrap; }
  .dme-home-actions { justify-content: flex-start; }
  .dme-intake-grid { grid-template-columns: 1fr; }
  .dme-patient-intake { padding: 16px; }
  .dme-patient-intake input, .dme-patient-intake select, .dme-patient-intake textarea { font-size: 16px !important; }
  .dme-patient-intake footer span { flex-basis: 100%; }
}

.dme-receipt-dialog {
  width: min(520px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid #e3dfdb;
  border-radius: 12px;
  color: #38252a;
}
.dme-receipt-dialog::backdrop { background: rgb(30 20 25 / 45%); }
.dme-receipt-dialog form { display: grid; gap: 16px; }
.dme-receipt-dialog h2, .dme-receipt-dialog p { margin: 0; }
.dme-receipt-dialog p, .dme-receipt-dialog small { font-size: 13px; line-height: 1.5; }
.dme-receipt-dialog label { display: grid; gap: 8px; font-size: 13px; }
.dme-receipt-dialog input:not([type="checkbox"]) { padding: 10px; border: 1px solid #d9d2ce; border-radius: 6px; font: inherit; }
.dme-receipt-dialog .dme-receipt-checkbox { display: flex; align-items: center; }
.dme-receipt-actions { display: flex; justify-content: flex-end; gap: 12px; }
.dme-receipt-error { color: #9b1224; }
.dme-urgent-documents > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.customer-patient-tracker {
  --dme-tracker-inset: 22px;
}

.customer-patient-tracker > .section-heading,
.customer-patient-tracker > .customer-filter-options,
.customer-patient-tracker .customer-patient-row,
.customer-patient-tracker > .pagination {
  padding-inline: var(--dme-tracker-inset);
}

.customer-patient-tracker > .customer-request-filters {
  margin-inline: var(--dme-tracker-inset);
}

@media (max-width: 760px) {
  .customer-patient-tracker {
    --dme-tracker-inset: 16px;
  }
}

.dme-queue-view .customer-portal-home,
.dme-practice-home .main > .page-heading,
.dme-practice-home .workspace-freshness,
[data-dme-hidden] {
  display: none !important;
}

.dme-portal-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin: 0 12px;
  padding: 4px;
  border: 1px solid #e4ddd7;
  border-radius: 9px;
  background: #faf8f5;
}

.dme-portal-switch a {
  color: #5a2530;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  border-radius: 6px;
  padding: 9px 12px;
}

.dme-portal-switch a[aria-current="page"] {
  color: #fff;
  background: #71101b;
}

.dme-home-dashboard {
  display: grid;
  gap: 18px;
  margin: 18px 0 22px;
}

.dme-dashboard-heading,
.dme-urgent-documents > header,
.dme-template-section > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.dme-dashboard-heading h1,
.dme-urgent-documents h2,
.dme-template-section h2 {
  margin: 5px 0 7px;
  color: #242124;
  font-size: clamp(20px, 2vw, 25px);
}

.dme-dashboard-heading p,
.dme-urgent-documents header p,
.dme-template-section header p {
  margin: 0;
  max-width: 780px;
  color: #68636a;
  font-size: 13px;
  line-height: 1.55;
}

.dme-section-kicker {
  color: #796f68;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
}

.dme-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.dme-metric-card {
  display: flex;
  min-width: 0;
  min-height: 146px;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 17px;
  border: 1px solid #e3dfdb;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dme-metric-card:hover {
  border-color: #b58d91;
  box-shadow: 0 5px 18px #4e26300d;
  transform: translateY(-1px);
}

.dme-metric-card:focus-visible,
.dme-urgent-row button:focus-visible,
.dme-template-copy:focus-visible {
  outline: 2px solid #71101b;
  outline-offset: 3px;
}

.dme-metric-label {
  color: #28191d;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.dme-metric-value {
  color: #502631;
  font-size: clamp(25px, 2.3vw, 34px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.dme-metric-detail {
  color: #777179;
  font-size: 11px;
  line-height: 1.4;
}

.dme-metric-action {
  margin-top: auto;
  color: #71101b;
  font-size: 12px;
  font-weight: 700;
}

.dme-urgent-documents,
.dme-template-section {
  display: grid;
  gap: 15px;
  padding: 20px;
  border: 1px solid #e3dfdb;
  border-radius: 10px;
  background: #fff;
}

.dme-urgent-list {
  display: grid;
  gap: 9px;
}

.dme-urgent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid #eee9e5;
}

.dme-urgent-row strong {
  color: #38252a;
  font-size: 14px;
}

.dme-urgent-row p {
  margin: 4px 0 0;
  color: #716b70;
  font-size: 12px;
}

.dme-urgent-row button,
.dme-template-copy {
  flex: 0 0 auto;
  border: 1px solid #d9cdd0;
  border-radius: 7px;
  padding: 9px 12px;
  color: #71101b;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dme-empty-state,
.dme-dashboard-message,
.dme-claim-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 7px;
  color: #514a4e;
  background: #faf7f3;
  font-size: 13px;
  line-height: 1.5;
}

.dme-dashboard-message:empty {
  display: none;
}

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

.dme-template {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e7e1dc;
  border-radius: 8px;
  background: #fcfbf9;
}

.dme-template summary {
  color: #38252a;
  font-weight: 700;
  cursor: pointer;
}

.dme-template pre {
  max-height: 340px;
  margin: 12px 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #514a4e;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.65;
}

.dme-queue-heading h1 {
  margin: 16px 0 8px;
  color: #38252a;
}

.dme-queue-heading p {
  color: #716b70;
  font-size: 13px;
}

.dme-back-link {
  color: #71101b;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.dme-queue-table-wrap {
  overflow-x: auto;
  border: 1px solid #e3dfdb;
  border-radius: 10px;
  background: #fff;
}

.dme-queue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dme-queue-table th,
.dme-queue-table td {
  padding: 16px;
  border-bottom: 1px solid #e8e2dd;
  text-align: left;
  line-height: 1.5;
}

.dme-queue-table th {
  color: #716b70;
  background: #fcfaf7;
  font-size: 11px;
  font-weight: 650;
}

@media (max-width: 1100px) {
  .dme-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar .workspace-global-search {
    order: 4;
    width: 100%;
  }

  .dme-portal-switch {
    order: 3;
    width: 100%;
    margin: 4px 0 0;
    justify-content: stretch;
  }

  .dme-portal-switch a {
    flex: 1;
    text-align: center;
  }

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

  .dme-template-grid {
    grid-template-columns: 1fr;
  }

  .dme-urgent-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .dme-metric-grid {
    grid-template-columns: 1fr;
  }

  .dme-urgent-documents,
  .dme-template-section {
    padding: 16px;
  }
}
