:root {
    color-scheme: light;
    --background: #fbf9f9;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #efeded;
    --surface-raised: #ffffff;
    --text: #1b1c1c;
    --muted: #44474c;
    --muted-soft: #74777d;
    --border: #e2e8f0;
    --border-strong: #c4c6cd;
    --clinical-blue: #112337;
    --clinical-blue-hover: #1a3450;
    --botanical-green: #4d6544;
    --botanical-soft: #cfebc1;
    --warm-accent: #e6c09a;
    --focus: #b6c8e2;
    --danger: #ba1a1a;
    --shadow: 0 18px 50px rgba(17, 35, 55, 0.12);
    --rail-width: 256px;
}

/* Operations visit traceability */
.visit-filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
    align-items: end;
    gap: 14px;
    margin-bottom: 18px;
}

.visit-filter-bar .form-actions { margin: 0; }

.visit-trace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
    gap: 18px;
}

.visit-lifecycle {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.visit-lifecycle li {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 12px;
    align-items: start;
}

.visit-lifecycle li > span {
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border: 2px solid #b8c4cc;
    border-radius: 999px;
    background: #fff;
}

.visit-lifecycle li.is-complete > span {
    border-color: #28745a;
    background: #28745a;
    box-shadow: 0 0 0 4px rgba(40, 116, 90, .12);
}

.visit-lifecycle li div { display: grid; gap: 2px; }
.visit-lifecycle li small { color: #667784; }
.visit-communication-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.conversation-visit-context {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    margin: 14px 18px 4px;
    padding: 18px 18px 16px 22px;
    overflow: hidden;
    border: 1px solid #cbded6;
    border-radius: 14px;
    background: linear-gradient(135deg, #f5fbf8 0%, #fff 72%);
    box-shadow: 0 8px 24px rgba(24, 62, 49, .07);
}

.conversation-visit-context-accent {
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(#28745a, #55a384);
}

.conversation-visit-context-main { min-width: 0; }
.conversation-visit-context-heading { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.conversation-visit-context-heading > div { display: grid; gap: 3px; }
.conversation-visit-context-heading strong { color: #17372c; font-size: 1rem; }
.conversation-visit-eyebrow { color: #28745a; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.conversation-visit-state { padding: 4px 9px; border-radius: 999px; background: #e3f2eb; color: #235d49; font-size: .72rem; font-weight: 750; white-space: nowrap; }

.conversation-visit-context dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
    margin: 15px 0 0;
}

.conversation-visit-context dl div { min-width: 0; }
.conversation-visit-context dt { color: #728079; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.conversation-visit-context dd { display: flex; gap: 8px; align-items: center; min-width: 0; margin: 3px 0 0; color: #263b33; font-size: .82rem; }
.conversation-visit-context code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 .78rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.conversation-visit-context dd button { border: 0; background: transparent; color: #28745a; font: inherit; font-weight: 750; cursor: pointer; }

.conversation-visit-context-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
}

.conversation-visit-context-actions a,
.conversation-visit-context-actions button {
    padding: 8px 11px;
    border: 1px solid #bdd4ca;
    border-radius: 8px;
    background: #fff;
    color: #245f4a;
    font: inherit;
    font-size: .78rem;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.integration-simulator-indicator {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 230px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #e3bd64;
    border-radius: 999px;
    background: #fff4cf;
    color: #684b08;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}
.integration-simulator-indicator[hidden] { display: none; }
.integration-simulator-dot { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #ad7700; }

.simulator-console-grid { display: grid; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.simulator-page { align-content: start; overflow-anchor: none; }
.simulator-page [hidden] { display: none !important; }
.simulator-page [data-simulator-workspace] { display: grid; gap: 20px; }
.simulator-page h2 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.simulator-page .detail-card { align-content: start; min-width: 0; }
.simulator-page form { display: grid; gap: 14px; min-width: 0; }
.simulator-page form > .button { justify-self: start; max-width: 100%; white-space: normal; }
.simulator-page .form-help, .simulator-page .eyebrow { margin: 0; }
.simulator-page .form-help, .simulator-page small { font-size: .82rem; color: #667085; }
.simulator-page fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.simulator-page legend { margin-bottom: 8px; font-size: .85rem; }
.simulator-page .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.simulator-settings-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 12px 16px; border: 1px solid #dedfe3; background: #fff; border-radius: 8px; font-size: .82rem; }
.simulator-settings-bar > label, .simulator-json-toggle { display: flex; align-items: center; gap: 8px; }
.simulator-settings-bar > label { font-weight: 700; }
.simulator-settings-bar details { margin-left: auto; }
.simulator-settings-bar input, .simulator-json-toggle input { width: 16px; height: 16px; flex: 0 0 16px; }
.simulator-page summary { cursor: pointer; font-size: .85rem; }
.simulator-page details[open] > summary { margin-bottom: 14px; }
.simulator-target-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.simulator-create-visit { border: 1px solid #cbd9d1; }
.simulator-page .field, .simulator-page select { min-width: 0; width: 100%; }
.simulator-page textarea { font: inherit; font-size: .9rem; line-height: 1.5; resize: vertical; }
.simulator-visit-target { display: grid; gap: 10px; border-top: 1px solid #e4e7ec; padding-top: 16px; }
.simulator-record-links { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: .82rem; }
.simulator-message-card { border-color: #aacbbc; }
.simulator-audience { margin: 0; padding: 10px 12px; border-radius: 7px; background: #eef6f0; color: #245f4a; font-size: .82rem; }
.simulator-audience.is-staff-only { background: #fff4df; color: #775413; }
.simulator-advanced { padding-top: 10px; border-top: 1px solid #e4e7ec; }
.simulator-advanced .field, .simulator-json-toggle { margin-top: 10px; }
.simulator-advanced [name="rawPayload"] { font-family: ui-monospace, monospace; font-size: .8rem; }
.simulator-feedback { margin: 0; padding: 10px 12px; border-radius: 7px; color: #245f4a; background: #eef6f0; font-size: .85rem; overflow-wrap: anywhere; }
.simulator-feedback.is-error { color: #b42318; background: #fff1f0; }
.simulator-fulfillment-section { display: block; }
.simulator-fulfillment-section > summary span { display: block; margin-top: 6px; color: #667085; font-size: .82rem; }
.simulator-fulfillment-section h2 { margin-bottom: 10px; }
.simulator-fulfillment-section section > .form-help { margin-bottom: 16px; }
@media (max-width: 900px) { .simulator-console-grid, .simulator-target-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .simulator-create-visit .detail-card-heading { flex-wrap: wrap; } .simulator-settings-bar details { margin-left: 0; } }
@media (max-width: 480px) { .integration-simulator-indicator { max-width: 160px; font-size: .7rem; } }

.integration-simulator-panel {
    border-color: #e3bd64;
    background: linear-gradient(145deg, #fffdf7, #fff);
}

.integration-simulator-panel hr { border: 0; border-top: 1px solid #eadfbf; margin: 22px 0; }
.integration-simulator-panel textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.conversation-simulator-composer { display: grid; gap: 8px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #d8e6df; }
.conversation-simulator-composer label { display: grid; gap: 6px; color: #245f4a; font-size: .75rem; font-weight: 750; }
.conversation-simulator-composer textarea { min-height: 64px; resize: vertical; border: 1px solid #bdd4ca; border-radius: 8px; padding: 8px; font: inherit; color: #263b33; background: #fff; }
.conversation-simulator-composer .button { justify-self: start; }

@media (max-width: 820px) {
    .visit-filter-bar,
    .visit-trace-grid { grid-template-columns: 1fr; }
    .conversation-visit-context { grid-template-columns: 1fr; margin-inline: 10px; }
    .conversation-visit-context dl { grid-template-columns: 1fr; }
    .conversation-visit-context-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
}

.payment-setup-step {
    max-width: 620px;
}

.payment-element-form {
    gap: 20px;
}

.payment-element-shell {
    min-height: 180px;
    padding: 18px;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    background: #ffffff;
}

.payment-element-loading {
    display: grid;
    min-height: 142px;
    place-items: center;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.payment-method-disclosure {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.payment-selection-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.payment-selection-summary span {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.payment-selection-summary strong {
    color: var(--text);
}

.payment-selection-summary small {
    color: var(--muted);
    font-size: 0.86rem;
}

.payments-mode-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid #d6dae0;
    border-left: 4px solid #2f6f55;
    background: #f7faf8;
}

.payments-mode-banner.is-live {
    border-left-color: #b42318;
    background: #fff7f6;
}

.payments-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
    gap: 20px;
}

.payments-settings-panel {
    padding: 20px;
    border: 1px solid #dedfe3;
    background: #ffffff;
}

.payments-settings-panel h2 {
    margin: 0 0 16px;
    font-size: 1rem;
}

.payments-catalog-summary {
    display: grid;
    gap: 10px;
    margin: 0;
}

.payments-catalog-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.payments-catalog-summary dt {
    color: var(--muted);
}

.payments-catalog-summary dd {
    margin: 0;
    font-weight: 700;
}

.payments-secret-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #536071;
    font-size: 0.82rem;
}

.pharmacy-hub-settings-page,
.beluga-health-settings-page {
    max-width: 1120px;
}

.beluga-copy-row,
.beluga-secret-panel,
.beluga-doc-fields {
    display: grid;
    gap: 12px;
    padding: 0 0 18px;
}

.beluga-secret-panel {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
}

.beluga-secret-value,
.beluga-doc-fields > div {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.beluga-secret-value small,
.beluga-doc-fields dt {
    color: #667085;
    font-size: 0.75rem;
}

.beluga-health-settings-page .copyable-value {
    display: flex;
    width: fit-content;
    max-width: 100%;
}

.beluga-health-settings-page .beluga-secret-value .copyable-value code,
.beluga-health-settings-page .beluga-doc-fields .copyable-value code,
.beluga-health-settings-page .beluga-copy-row .copyable-value code {
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

.beluga-secret-mask,
.beluga-receipt-json {
    overflow: auto;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e3e6eb;
    background: #f8f9fb;
    color: #344054;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.beluga-doc-fields {
    margin: 0;
}

.beluga-doc-fields dd {
    margin: 0;
}

.beluga-shared-check {
    margin: 0 0 18px;
}

@media (max-width: 720px) {
    .beluga-secret-panel {
        grid-template-columns: 1fr;
    }

    .beluga-secret-panel .pharmacy-hub-toolbar-actions,
    .beluga-secret-panel .button {
        width: 100%;
    }
}

.pharmacy-hub-connection-band {
    display: grid;
    border-top: 1px solid #d8dde5;
    border-bottom: 1px solid #d8dde5;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pharmacy-hub-connection-band > div {
    display: grid;
    min-width: 0;
    align-content: center;
    gap: 6px;
    padding: 16px 20px 16px 0;
}

.pharmacy-hub-connection-band > div:nth-child(even) {
    padding-left: 24px;
    border-left: 1px solid #e3e6eb;
}

.pharmacy-hub-connection-band > div:nth-child(n + 3) {
    border-top: 1px solid #e3e6eb;
}

.pharmacy-hub-connection-label,
.pharmacy-hub-toolbar span {
    color: #667085;
    font-size: 0.75rem;
}

.pharmacy-hub-connection-value {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.pharmacy-hub-connection-value strong {
    min-width: 0;
    overflow: hidden;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pharmacy-hub-connection-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #d92d20;
}

.pharmacy-hub-connection-dot.is-ready {
    background: #16803d;
}

.pharmacy-hub-toolbar,
.pharmacy-hub-routing-heading,
.pharmacy-hub-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pharmacy-hub-toolbar {
    padding: 18px 0;
}

.pharmacy-hub-toolbar > div:first-child {
    display: grid;
    gap: 2px;
}

.pharmacy-hub-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.pharmacy-hub-toolbar-actions .button {
    min-width: 116px;
}

.pharmacy-hub-toolbar-actions .button:first-child {
    min-width: 154px;
}

.pharmacy-hub-routing {
    border-top: 1px solid #d8dde5;
}

.pharmacy-hub-routing-heading {
    padding: 18px 0 12px;
}

.pharmacy-hub-routing-heading h2,
.pharmacy-hub-routing-heading p {
    margin: 0;
}

.pharmacy-hub-routing-heading h2 {
    font-size: 1rem;
}

.pharmacy-hub-routing-heading p {
    margin-top: 3px;
    color: #667085;
    font-size: 0.82rem;
}

.pharmacy-hub-event-list {
    border-top: 1px solid #e3e6eb;
}

.pharmacy-hub-event-row {
    display: grid;
    min-height: 68px;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #e3e6eb;
    grid-template-columns: minmax(240px, 1fr) minmax(190px, 0.7fr) 120px 120px 34px;
}

.pharmacy-hub-event-toggle {
    display: grid;
    min-width: 0;
    align-items: center;
    gap: 12px;
    grid-template-columns: 18px minmax(0, 1fr);
}

.pharmacy-hub-event-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.pharmacy-hub-event-toggle span,
.pharmacy-hub-test-state,
.pharmacy-hub-event-row > span {
    display: grid;
    min-width: 0;
    justify-items: start;
    gap: 3px;
}

.pharmacy-hub-event-toggle small,
.pharmacy-hub-test-state small,
.pharmacy-hub-route-error {
    color: #667085;
    font-size: 0.72rem;
    line-height: 1.25;
}

.pharmacy-hub-event-row code {
    overflow: hidden;
    color: #475467;
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pharmacy-hub-route-error {
    color: #b42318;
}

.pharmacy-hub-actions {
    justify-content: flex-start;
    padding-top: 18px;
}

.notification-settings-page {
    max-width: 1120px;
}

.notification-configuration-band {
    display: grid;
    border-block: 1px solid #d8dde5;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.notification-configuration-band > div {
    display: grid;
    min-width: 0;
    gap: 7px;
    padding: 16px;
    border-left: 1px solid #e3e6eb;
}

.notification-configuration-band > div:first-child {
    padding-left: 0;
    border-left: 0;
}

.notification-configuration-band span {
    color: #667085;
    font-size: 0.75rem;
}

.notification-configuration-band strong {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-test-form {
    display: grid;
    align-items: end;
    gap: 10px;
    padding: 18px 0;
    grid-template-columns: minmax(220px, 1fr) minmax(240px, 360px) auto;
}

.notification-test-form h2,
.notification-test-form p,
.notification-diagnostics-heading h2,
.notification-diagnostics-heading p {
    margin: 0;
}

.notification-test-form h2,
.notification-diagnostics-heading h2 {
    font-size: 1rem;
}

.notification-test-form p,
.notification-diagnostics-heading p {
    margin-top: 3px;
    color: #667085;
    font-size: 0.78rem;
}

.notification-test-form .form-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.notification-diagnostics {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid #d8dde5;
}

.notification-diagnostics-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.notification-table code {
    font-size: 0.72rem;
}

.notification-event-cell {
    display: grid;
    gap: 4px;
}

.notification-error {
    max-width: 300px;
    color: #b42318;
    font-size: 0.68rem;
    line-height: 1.25;
}

@media (max-width: 860px) {
    .notification-configuration-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notification-configuration-band > div:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    .notification-configuration-band > div:nth-child(n + 3) {
        border-top: 1px solid #e3e6eb;
    }

    .notification-test-form {
        align-items: stretch;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .notification-configuration-band {
        grid-template-columns: 1fr;
    }

    .notification-configuration-band > div,
    .notification-configuration-band > div:nth-child(odd) {
        padding-left: 0;
        border-top: 1px solid #e3e6eb;
        border-left: 0;
    }

    .notification-configuration-band > div:first-child {
        border-top: 0;
    }

    .notification-diagnostics-heading {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 860px) {
    .pharmacy-hub-event-row {
        gap: 8px 12px;
        padding: 12px 0;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .pharmacy-hub-event-row code,
    .pharmacy-hub-event-row > span,
    .pharmacy-hub-test-state {
        grid-column: 1;
    }

    .pharmacy-hub-event-row .admin-icon-button {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 620px) {
    .pharmacy-hub-connection-band {
        grid-template-columns: 1fr;
    }

    .pharmacy-hub-connection-band > div:nth-child(even) {
        padding-left: 0;
        border-left: 0;
    }

    .pharmacy-hub-toolbar,
    .pharmacy-hub-routing-heading,
    .pharmacy-hub-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pharmacy-hub-toolbar-actions,
    .pharmacy-hub-actions .button {
        width: 100%;
    }

    .pharmacy-hub-toolbar-actions .button {
        width: 100%;
    }

    .pharmacy-hub-connection-band > div:nth-child(n + 2) {
        border-top: 1px solid #e3e6eb;
    }
}

@media (max-width: 860px) {
    .payments-settings-grid {
        grid-template-columns: 1fr;
    }
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: var(--clinical-blue);
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.onboarding-page {
    overflow: hidden;
}

.catalog-page {
    min-height: 100vh;
    overflow-x: hidden;
}

.catalog-shell {
    width: min(960px, calc(100% - 40px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.catalog-header {
    display: grid;
    gap: 40px;
    padding: 8px 0 36px;
}

.catalog-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.admin-link {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--clinical-blue);
    font-size: 0.88rem;
    font-weight: 900;
    padding: 0 14px;
    text-decoration: none;
}

.admin-link:hover,
.admin-link:focus-visible {
    border-color: var(--border-strong);
    background: var(--surface-soft);
    outline: none;
}

.catalog-header h1 {
    max-width: 720px;
    margin-bottom: 10px;
}

.catalog-lede {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1rem;
}

.catalog-grid {
    display: grid;
    justify-content: center;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 420px));
}

.catalog-card {
    display: grid;
    min-height: 100%;
    overflow: hidden;
    grid-template-rows: auto 1fr auto;
    border: 1px solid #dadde2;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(17, 35, 55, 0.04);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.catalog-card:hover,
.catalog-card:focus-within {
    border-color: var(--border-strong);
    box-shadow: 0 14px 32px rgba(17, 35, 55, 0.08);
    transform: translateY(-1px);
}

.catalog-card-media {
    display: grid;
    aspect-ratio: 1;
    height: auto;
    min-height: 0;
    overflow: hidden;
    place-items: center;
    border: 1px solid #e0e5eb;
    border-radius: 8px;
    background: #f8fafb;
    margin: 16px 16px 0;
    padding: 0;
}

.catalog-card-media img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
}

.catalog-card-body {
    display: grid;
    align-content: start;
    gap: 9px;
    padding: 18px 20px 20px;
}

.catalog-card-kicker {
    margin: 0;
    color: #2b2d30;
    font-size: 0.8rem;
    font-weight: 750;
}

.catalog-card h2 {
    margin: 0;
    color: #242528;
    font-size: 1.14rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.22;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.catalog-card-generic {
    margin: 0;
    color: #71747a;
    font-size: 0.86rem;
    font-weight: 550;
}

.catalog-benefit-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.catalog-benefit-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid #9cb7d1;
    border-radius: 999px;
    background: #edf5fc;
    color: #3f6f9f;
    font-size: 0.78rem;
    font-weight: 750;
    padding: 0 10px;
}

.catalog-pricing-table {
    display: grid;
    overflow: hidden;
    border: 1px solid #9ab390;
    border-radius: 8px;
    margin-top: 4px;
}

.catalog-pricing-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 44px;
    border-top: 1px solid #9ab390;
    background: #ffffff;
    color: #111111;
    padding: 10px 12px;
    text-decoration: none;
}

.catalog-pricing-row:hover,
.catalog-pricing-row:focus-visible {
    background: #f3f7f0;
    box-shadow: inset 0 0 0 2px #5f7b55;
    outline: none;
}

.catalog-pricing-row:first-child {
    border-top: 0;
}

.catalog-pricing-row.is-popular {
    background: #edf5e7;
}

.catalog-pricing-row.is-popular:hover,
.catalog-pricing-row.is-popular:focus-visible {
    background: #e5f0de;
}

.catalog-pricing-row > span:not(.catalog-pricing-badge) {
    font-size: 0.86rem;
    font-weight: 750;
}

.catalog-pricing-row strong {
    color: #111111;
    font-size: 0.86rem;
    font-weight: 850;
    text-align: right;
    white-space: nowrap;
}

.catalog-pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    border-radius: 999px;
    background: #3f5f39;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 850;
    line-height: 1;
    padding: 7px 10px;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.catalog-pricing-empty {
    margin: 4px 0 0;
    color: #71747a;
    font-size: 0.9rem;
    font-style: italic;
}

.catalog-trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

.catalog-trust-list li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #242528;
    font-size: 0.78rem;
    font-weight: 650;
}

.catalog-trust-list img {
    display: block;
    width: 17px;
    height: 17px;
}

.catalog-meta {
    display: grid;
    gap: 8px;
    margin: 6px 0 0;
}

.catalog-meta div {
    display: grid;
    gap: 2px;
}

.catalog-meta dt {
    color: #737780;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.catalog-meta dd {
    margin: 0;
    color: #222426;
    font-size: 0.92rem;
    font-weight: 650;
}

.catalog-card-footer {
    display: grid;
    align-items: center;
    border-top: 1px solid #dadde2;
    padding: 14px 20px 16px;
}

.catalog-cta {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    background: #050505;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 850;
    text-align: center;
    text-decoration: none;
}

.catalog-cta-static {
    background: #e9ebee;
    color: #555b64;
    font-weight: 650;
}

.catalog-card-media-empty {
    background: #f8fafb;
    padding: 24px;
}

.catalog-product-placeholder {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    background: #ffffff;
    color: #69707a;
}

.catalog-product-placeholder svg {
    display: block;
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-linejoin: round;
    stroke-width: 2;
}

.catalog-state {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    padding: 20px;
}

.catalog-state-error {
    border-color: #f2c1bd;
    background: #fff7f6;
    color: var(--danger);
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--background);
}

.onboarding-rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: var(--rail-width);
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid var(--border);
    background: var(--surface-soft);
    padding: 24px;
}

.brand-mark {
    display: inline-flex;
    width: 118px;
    max-width: 100%;
    align-items: center;
    text-decoration: none;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: auto;
}

.rail-context {
    display: grid;
    gap: 0;
}

.rail-context h2 {
    margin: 0;
}

.rail-context h2 {
    color: var(--clinical-blue);
    font-size: 0.88rem;
    font-weight: 800;
}

.rail-nav {
    display: grid;
    gap: 12px;
}

.rail-item {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    padding: 12px 14px;
    text-align: left;
}

.rail-item:hover:not(:disabled),
.rail-item:focus-visible {
    background: var(--surface-muted);
    outline: none;
}

.rail-item:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible {
    box-shadow: 0 0 0 3px var(--focus);
    outline: none;
}

.rail-item.is-active {
    background: var(--botanical-soft);
    color: #364d2e;
}

.rail-item.is-locked {
    cursor: not-allowed;
    opacity: 0.48;
}

.rail-icon,
.trust-icon {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 999px;
    background: var(--surface);
}

.rail-icon img,
.trust-icon img {
    display: block;
    width: 20px;
    height: 20px;
}

.onboarding-main {
    position: relative;
    display: grid;
    width: 100%;
    height: 100vh;
    min-width: 0;
    min-height: 0;
    margin-left: var(--rail-width);
    grid-template-columns: minmax(0, 1fr) 450px;
    overflow: hidden;
}

.assessment-onboarding-shell .onboarding-main {
    margin-left: 0;
}

.mobile-brand {
    display: none;
}

.content-pane {
    display: flex;
    min-width: 0;
    min-height: 0;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 64px 32px;
}

.onboarding-step {
    width: min(100%, 420px);
    margin-block: auto;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--botanical-green);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    color: var(--clinical-blue);
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.12;
}

.step-copy {
    margin-bottom: 40px;
    color: var(--muted);
    font-size: 1rem;
}

.onboarding-form {
    display: grid;
    gap: 24px;
}

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

.field {
    display: grid;
    gap: 8px;
}

.field span,
.plan-options legend {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 800;
}

.field input,
.field select,
.field textarea {
    min-height: 50px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    padding: 0 14px;
}

.field textarea {
    min-height: 96px;
    resize: vertical;
    padding: 12px 14px;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: var(--border-strong);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--clinical-blue);
    background: var(--surface);
}

.notice {
    border-left: 4px solid var(--botanical-green);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    padding: 14px 16px;
}

.notice p,
.small-link {
    margin: 0;
    font-size: 0.82rem;
}

.small-link {
    color: var(--muted);
    text-align: center;
}

.button {
    display: inline-flex;
    min-width: 140px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 900;
    padding: 0 18px;
    text-decoration: none;
}

.button-primary {
    background: var(--clinical-blue);
    color: #ffffff;
}

.button-primary:hover,
.button-primary:focus-visible {
    background: var(--clinical-blue-hover);
}

.button-secondary {
    border-color: var(--border);
    background: var(--surface);
    color: var(--clinical-blue);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    border-color: var(--border-strong);
    background: var(--surface-soft);
}

.form-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
}

.form-actions .button:only-child {
    grid-column: 1 / -1;
}

.plan-options {
    display: grid;
    gap: 12px;
    margin: 0;
    border: 0;
    padding: 0;
}

.plan-options legend {
    margin-bottom: 8px;
    padding: 0;
}

.plan-option {
    display: grid;
    min-height: 78px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 14px;
}

.plan-option:has(input:checked) {
    border-color: var(--botanical-green);
    background: #f2f8ef;
}

.plan-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--botanical-green);
}

.plan-option strong,
.plan-option small {
    display: block;
}

.plan-option small {
    color: var(--muted);
}

.complete-step {
    width: min(100%, 520px);
}

.review-list {
    display: grid;
    gap: 12px;
    margin: 0 0 28px;
}

.review-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 14px 16px;
}

.review-list dt {
    color: var(--muted);
    font-weight: 800;
}

.review-list dd {
    margin: 0;
    color: var(--clinical-blue);
    font-weight: 900;
    overflow-wrap: anywhere;
    text-align: right;
}

.trust-pane {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    border-left: 1px solid var(--border);
    background: var(--surface-soft);
    padding: 32px;
}

.product-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
    padding: 22px;
}

.product-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    object-fit: cover;
}

.product-card h2 {
    margin: 6px 0 6px;
    color: var(--clinical-blue);
    font-size: 1.35rem;
    line-height: 1.2;
}

.product-card .product-card-kicker {
    margin: 16px 0 0;
    color: var(--botanical-green);
    font-size: 0.78rem;
    font-weight: 900;
}

.product-card p,
.trust-item p {
    margin: 0;
    color: var(--muted);
}

.trust-list {
    display: grid;
    gap: 14px;
}

.trust-item {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-raised);
    padding: 16px;
}

.trust-item h3 {
    margin: 0 0 2px;
    color: var(--clinical-blue);
    font-size: 0.92rem;
}

.trust-icon {
    background: var(--botanical-soft);
    color: #364d2e;
}

.onboarding-loading,
.onboarding-empty-state {
    display: grid;
    min-height: 100vh;
    place-items: center;
    align-content: center;
    gap: 14px;
    padding: 32px;
    text-align: center;
}

.onboarding-loading p,
.onboarding-empty-state p {
    max-width: 460px;
    margin: 0;
    color: var(--muted);
}

.assessment-onboarding-shell {
    --rail-width: 348px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 250, 252, 0.92)),
        radial-gradient(circle at 18% 18%, rgba(207, 235, 193, 0.28), transparent 34%);
}

.assessment-onboarding-rail {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

.assessment-onboarding-rail .brand-mark {
    width: 104px;
}

.assessment-onboarding-rail {
    gap: 18px;
    padding: 22px 18px;
}

.rail-context p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.rail-item.is-complete:not(.is-active) {
    color: var(--clinical-blue);
}

.rail-step-number {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
}

.rail-item.is-active .rail-step-number,
.rail-item.is-complete .rail-step-number {
    border-color: transparent;
    background: var(--clinical-blue);
    color: #fff;
}

.rail-step-check {
    display: block;
    width: 10px;
    height: 6px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(-45deg) translateY(-1px);
}

.assessment-onboarding-main {
    grid-template-columns: minmax(0, 1fr);
}

.assessment-content-pane {
    align-items: flex-start;
    justify-content: center;
    padding: 56px clamp(28px, 5vw, 72px);
}

.assessment-intake-step {
    width: min(100%, 680px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 22px 70px rgba(17, 35, 55, 0.1);
    padding: clamp(28px, 4vw, 46px);
}

.assessment-intake-step h1 {
    max-width: 680px;
    font-size: clamp(2rem, 4vw, 3.15rem);
    line-height: 1.08;
}

.onboarding-node-meta {
    margin: -2px 0 22px;
    color: var(--muted-soft);
    font-size: 0.78rem;
    font-weight: 750;
}

.assessment-intake-form {
    gap: 18px;
}

.assessment-intake-form input[type="text"],
.assessment-intake-form input[type="email"],
.assessment-intake-form input[type="tel"],
.assessment-intake-form input[type="number"],
.assessment-intake-form input[type="date"],
.assessment-intake-form input:not([type]),
.assessment-intake-form select,
.assessment-intake-form textarea {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 1.05rem;
    padding: 15px 16px;
}

.assessment-intake-form input[type="number"]::-webkit-outer-spin-button,
.assessment-intake-form input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.assessment-intake-form input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.patient-gate-step {
    align-self: center;
}

.patient-auth-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 4px;
}

.patient-auth-toggle button {
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 850;
}

.patient-auth-toggle button:hover,
.patient-auth-toggle button:focus-visible {
    color: var(--clinical-blue);
    outline: none;
}

.patient-auth-toggle button.is-active {
    background: var(--surface);
    color: var(--clinical-blue);
    box-shadow: 0 1px 3px rgba(17, 35, 55, 0.12);
}

.patient-basics-form .field-grid {
    gap: 16px;
}

.patient-consent {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 760;
    padding: 16px;
}

.patient-consent input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--clinical-blue);
}

.patient-consent-copy {
    margin: -8px 0 4px;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.45;
}

.patient-consent-copy a {
    color: var(--clinical-blue);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.patient-consent-copy a:hover,
.patient-consent-copy a:focus-visible {
    color: #2f5a7a;
}

.consent-response-template {
    display: grid;
    gap: 14px;
}

.consent-response-copy {
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfd;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.55;
    padding: 16px;
    white-space: normal;
}

.patient-profile-response-template,
.patient-address-response-template {
    display: grid;
    gap: 14px;
}

.patient-profile-response-template .patient-consent-copy {
    margin-top: -8px;
}

.photo-id-upload-template {
    display: grid;
    gap: 14px;
}

.photo-id-acceptable-types {
    border-left: 3px solid #6a8360;
    padding-left: 14px;
}

.photo-id-acceptable-types strong {
    display: block;
    margin-bottom: 6px;
    color: #24331f;
    font-size: 0.84rem;
}

.photo-id-acceptable-types ul {
    display: grid;
    gap: 4px;
    margin: 0;
    color: #4b5565;
    font-size: 0.84rem;
    padding-left: 18px;
}

.photo-id-upload-dropzone {
    position: relative;
    display: grid;
    min-height: 148px;
    align-content: center;
    justify-items: center;
    gap: 7px;
    border: 1px dashed #aab7a5;
    border-radius: 8px;
    background: #f8faf7;
    color: #344054;
    cursor: pointer;
    padding: 20px;
    text-align: center;
}

.photo-id-upload-dropzone:hover,
.photo-id-upload-dropzone:focus-within {
    border-color: #4f6b43;
    background: #f2f7ef;
}

.photo-id-upload-dropzone .material-symbols-rounded {
    color: #4f6b43;
    font-size: 28px;
}

.photo-id-upload-dropzone span {
    color: #667085;
    font-size: 0.8rem;
}

.photo-id-uploaded-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    border: 1px solid #b9d3ad;
    border-radius: 8px;
    background: #f2f8ef;
    color: #2f4a28;
    padding: 11px 13px;
}

.photo-id-uploaded-state span {
    min-width: 0;
    overflow: hidden;
    color: #52604d;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-medications-template {
    display: grid;
    gap: 12px;
}

.current-medication-row {
    display: grid;
    min-width: 0;
    align-items: end;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 30px;
}

.current-medication-row .field {
    min-width: 0;
}

.current-medications-template .current-medication-row > .current-medication-remove {
    position: relative;
    display: inline-grid;
    box-sizing: border-box;
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    align-self: end;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #ffffff;
    color: var(--danger);
    line-height: 1;
    padding: 0;
}

.current-medication-remove::before,
.current-medication-remove::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
}

.current-medication-remove::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.current-medication-remove::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.current-medications-template .current-medication-row > .current-medication-remove:hover,
.current-medications-template .current-medication-row > .current-medication-remove:focus-visible {
    border-color: #e7b4b0;
    background: #fff5f4;
    outline: none;
}

.current-medications-add {
    justify-self: start;
}

.current-medications-add::before {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    background:
        linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat;
    content: "";
}

.assessment-current-medications-node {
    display: grid;
    gap: 12px;
    padding: 10px;
}

.assessment-current-medications-preview {
    pointer-events: none;
}

.assessment-current-medications-preview .current-medication-row {
    grid-template-columns: minmax(0, 1fr) 26px;
}

.assessment-current-medications-preview .current-medication-row > .current-medication-remove {
    width: 26px;
    min-width: 26px;
    max-width: 26px;
    height: 26px;
    min-height: 26px;
    max-height: 26px;
}

.onboarding-form-error {
    margin: 0;
    border: 1px solid #f2c1bd;
    border-radius: 8px;
    background: #fff7f6;
    color: var(--danger);
    font-size: 0.88rem;
    font-weight: 720;
    padding: 12px 14px;
}

.assessment-intake-form textarea {
    min-height: 150px;
    resize: vertical;
}

.bmi-response-template {
    display: grid;
    gap: 16px;
}

.bmi-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    min-height: 82px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--clinical-blue);
    padding: 16px 18px;
    box-shadow: inset 4px 0 0 var(--botanical-green);
}

.bmi-preview strong {
    color: var(--clinical-blue);
    font-size: clamp(2rem, 4vw, 2.65rem);
    font-weight: 850;
    line-height: 1;
}

.bmi-preview span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

.bmi-field-weight {
    grid-column: 1 / -1;
}

.bmi-input-shell {
    position: relative;
    display: block;
}

.assessment-intake-form .bmi-input-shell input {
    padding-right: 78px;
}

.bmi-input-shell strong {
    position: absolute;
    right: 16px;
    top: 50%;
    color: var(--muted-soft);
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: lowercase;
    transform: translateY(-50%);
}

.onboarding-choice-list {
    display: grid;
    gap: 12px;
}

.onboarding-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 16px 18px;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.onboarding-choice:hover,
.onboarding-choice:focus-within {
    border-color: var(--clinical-blue);
    box-shadow: 0 12px 30px rgba(17, 35, 55, 0.08);
    transform: translateY(-1px);
}

.onboarding-choice input {
    width: 18px;
    height: 18px;
    accent-color: var(--clinical-blue);
}

.onboarding-choice span {
    color: var(--text);
    font-size: 1.02rem;
    font-weight: 720;
}

.product-price-variant-template {
    display: grid;
    gap: 18px;
}

.product-price-variant-group {
    display: grid;
    gap: 10px;
}

.product-price-variant-group-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 820;
}

.product-price-variant-group-heading img {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
}

.product-price-variant-card-list {
    display: grid;
    gap: 10px;
}

.product-price-variant-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 76px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 15px 16px;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.product-price-variant-card:hover,
.product-price-variant-card:focus-within {
    border-color: var(--clinical-blue);
    box-shadow: 0 12px 30px rgba(17, 35, 55, 0.08);
    transform: translateY(-1px);
}

.product-price-variant-card input {
    width: 18px;
    height: 18px;
    accent-color: var(--clinical-blue);
}

.product-price-variant-card span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.product-price-variant-card strong {
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 1rem;
    font-weight: 820;
}

.product-price-variant-card small {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 720;
}

.assessment-preview-drawer {
    display: grid;
    gap: 18px;
    min-height: calc(100vh - 96px);
}

.assessment-preview-meta {
    display: grid;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    padding: 14px 16px;
}

.assessment-preview-meta span,
.assessment-preview-meta em {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.assessment-preview-meta strong {
    color: var(--clinical-blue);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.assessment-preview-meta em {
    font-style: normal;
    text-transform: none;
}

.assessment-preview-stage {
    display: grid;
    min-height: 520px;
    place-items: center;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.94)),
        radial-gradient(circle at 18% 12%, rgba(207, 235, 193, 0.28), transparent 32%);
    padding: clamp(18px, 4vw, 42px);
}

.assessment-preview-step {
    margin-block: 0;
}

.assessment-preview-system-card,
.assessment-preview-empty-state,
.assessment-preview-empty-route {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    padding: 14px 16px;
}

.assessment-preview-system-card {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.assessment-preview-system-card .field-grid {
    gap: 12px;
}

.assessment-preview-field-stack {
    display: grid;
    gap: 14px;
}

.assessment-preview-payment-shell {
    display: grid;
    gap: 6px;
    min-height: 112px;
    align-content: center;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    padding: 18px;
}

.assessment-preview-payment-shell span,
.assessment-preview-payment-shell small,
.assessment-preview-system-note {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 760;
}

.assessment-preview-payment-shell strong {
    color: var(--clinical-blue);
    font-size: 1rem;
    font-weight: 900;
}

.assessment-preview-empty-state strong {
    color: var(--clinical-blue);
    font-size: 0.95rem;
}

.assessment-preview-empty-state p,
.assessment-preview-empty-route,
.assessment-preview-system-note {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
}

.assessment-preview-route-list {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.assessment-preview-goto {
    min-height: 58px;
    width: 100%;
    justify-content: space-between;
    text-align: left;
}

.assessment-preview-goto span,
.assessment-preview-goto small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.assessment-preview-goto small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.assessment-complete-step {
    text-align: left;
}

.admin-page {
    min-height: 100vh;
    overflow: hidden;
    background: #f7f7f8;
    color: #242528;
}

.portal-page {
    min-height: 100vh;
    overflow: hidden;
    background: #f6f7f9;
    color: #242528;
}

.portal-shell {
    display: grid;
    width: min(1440px, calc(100% - 48px));
    height: 100vh;
    min-height: 0;
    margin: 0 auto;
    padding: 22px 0;
    gap: 18px;
    grid-template-rows: auto minmax(0, 1fr);
}

.portal-header,
.portal-identity,
.portal-chat-heading,
.portal-chat-title,
.portal-chat-message-author,
.portal-chat-composer-actions,
.portal-context-list div {
    display: flex;
    align-items: center;
}

.portal-header {
    justify-content: space-between;
    gap: 20px;
}

.portal-brand img {
    display: block;
    width: 112px;
    height: auto;
}

.portal-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #d7dce3;
    border-radius: 8px;
    background: #ffffff;
    padding: 3px;
}

.portal-nav a {
    border-radius: 6px;
    color: #55606d;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 8px 12px;
    text-decoration: none;
}

.portal-nav a:hover,
.portal-nav a:focus-visible,
.portal-nav a.is-active {
    background: #edf1f5;
    color: #112337;
    outline: none;
}

.portal-identity {
    gap: 12px;
    color: #55606d;
    font-size: 0.86rem;
    min-width: 0;
}

.portal-account-chip,
.portal-sign-out-button {
    appearance: none;
    border: 1px solid #d7dce3;
    background: #ffffff;
    color: #112337;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.portal-account-chip {
    display: inline-flex;
    max-width: min(380px, 44vw);
    min-width: 0;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    padding: 4px 14px 4px 4px;
}

.portal-account-chip:hover,
.portal-account-chip:focus-visible,
.portal-sign-out-button:hover,
.portal-sign-out-button:focus-visible {
    border-color: #b8c4d4;
    background: #f9fafb;
    outline: none;
}

.portal-account-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
    line-height: 1.12;
    text-align: left;
}

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

.portal-account-copy strong {
    color: #112337;
    font-size: 0.88rem;
    font-weight: 800;
}

.portal-account-copy small {
    color: #6f7a88;
    font: inherit;
}

.portal-sign-out-button {
    min-height: 42px;
    border-radius: 8px;
    padding: 0 14px;
    white-space: nowrap;
}

.portal-identity-avatar {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    overflow: hidden;
    place-items: center;
    border: 1px solid #c9d9f5;
    border-radius: 999px;
    background: #eef8f4;
    color: #112337;
    font-size: 0.76rem;
    font-weight: 900;
}

.portal-grid {
    display: grid;
    min-height: 0;
    overflow: hidden;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: stretch;
}

.portal-chat-panel,
.portal-context-card {
    border: 1px solid #dfe4eb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(17, 35, 55, 0.08);
}

.portal-chat-panel {
    display: grid;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.portal-chat-heading {
    justify-content: space-between;
    gap: 18px;
    min-height: 76px;
    border-bottom: 1px solid #e6e9ee;
    padding: 16px 20px;
}

.portal-chat-title {
    min-width: 0;
    gap: 12px;
}

.portal-chat-heading .eyebrow {
    margin: 0 0 2px;
    color: #4d7045;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.portal-chat-heading h1,
.portal-context-card h2,
.portal-empty-chat p,
.portal-chat-message-bubble p,
.portal-chat-composer-actions p {
    margin: 0;
}

.portal-chat-heading h1 {
    color: #112337;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.08;
}

.portal-chat-heading > p {
    max-width: 330px;
    margin: 0;
    color: #697383;
    font-size: 0.86rem;
    line-height: 1.35;
    text-align: right;
}

.portal-chat-avatar {
    display: inline-grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    overflow: hidden;
    place-items: center;
    border: 1px solid #bfd4f5;
    border-radius: 999px;
    background: #eaf6f2;
    color: #112337;
    font-size: 0.82rem;
    font-weight: 850;
}

.portal-chat-messages {
    display: grid;
    align-content: start;
    gap: 18px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: #ffffff;
    padding: 20px 24px 24px;
}

.portal-chat-message-row {
    display: grid;
    width: 100%;
    align-items: end;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 720px);
}

.portal-chat-message-row.is-own {
    justify-content: end;
    grid-template-columns: minmax(0, 720px) 34px;
}

.portal-chat-message-row.is-own .portal-chat-avatar {
    grid-column: 2;
}

.portal-chat-message-row.is-own .portal-chat-message-bubble {
    grid-column: 1;
    grid-row: 1;
    border-color: #d7e7fb;
    background: #eef5ff;
}

.portal-chat-message-bubble {
    display: grid;
    min-width: 0;
    gap: 10px;
    border-radius: 8px;
    background: #f3f3f4;
    color: #242528;
    padding: 12px 14px 10px;
}

.portal-chat-message-author {
    align-items: baseline;
    gap: 6px;
    color: #242528;
    font-size: 0.82rem;
    line-height: 1.2;
}

.portal-chat-message-author strong {
    font-weight: 750;
}

.portal-chat-message-author span {
    color: #8a8f98;
}

.portal-chat-message-author em {
    color: #2f76ff;
    font-style: normal;
    font-weight: 650;
}

.portal-chat-message-bubble p {
    color: #25282d;
    font-size: 0.95rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.portal-chat-message-bubble time {
    justify-self: end;
    color: #737780;
    font-size: 0.76rem;
    line-height: 1;
}

.portal-empty-chat {
    display: grid;
    min-height: 100%;
    place-items: center;
    align-content: center;
    gap: 6px;
    color: #627083;
    text-align: center;
}

.portal-empty-chat strong {
    color: #112337;
}

.portal-chat-composer {
    display: block;
    border-top: 1px solid #e6e9ee;
    background: #ffffff;
    padding: 14px 18px 16px;
}

.portal-chat-composer-box {
    display: grid;
    gap: 8px;
    border: 1px solid #dfe4eb;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px 12px;
    box-shadow: 0 8px 22px rgba(36, 37, 40, 0.045);
}

.portal-chat-composer-mode span {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 7px;
    border: 1px solid #e0e3e8;
    border-radius: 8px;
    background: #ffffff;
    color: #4f535a;
    font-size: 0.8rem;
    padding: 6px 10px;
}

.portal-chat-composer label {
    display: grid;
    min-width: 0;
}

.portal-chat-composer label span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.portal-chat-composer textarea {
    width: 100%;
    min-height: 50px;
    max-height: 130px;
    resize: vertical;
    border: 0;
    background: transparent;
    color: #242528;
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.4;
    outline: 0;
    padding: 4px 2px;
}

.portal-chat-composer textarea:focus {
    outline: 0;
}

.portal-chat-composer textarea::placeholder {
    color: #a0a4ab;
}

.portal-chat-composer-actions {
    justify-content: space-between;
    gap: 12px;
}

.portal-chat-composer-actions p {
    color: #6f737b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.portal-chat-composer-actions p.is-secure {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #4d7045;
    font-weight: 750;
}

.portal-secure-icon {
    display: block;
    width: 16px;
    height: 16px;
}

.portal-chat-composer-actions p.is-error {
    color: #b42318;
    font-weight: 750;
}

.portal-chat-send-button {
    position: relative;
    display: inline-grid;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #112337;
    border-radius: 999px;
    background: #112337;
    color: #ffffff;
    padding: 0;
}

.portal-chat-send-button::before {
    content: "";
    width: 11px;
    height: 11px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: translateX(-2px) rotate(45deg);
}

.portal-chat-send-button:hover,
.portal-chat-send-button:focus-visible {
    background: #1b3148;
    outline: none;
}

.portal-chat-send-button.is-waiting::before,
.portal-chat-send-button .button-spinner + span {
    display: none;
}

.portal-context-card {
    align-self: start;
    display: grid;
    max-height: 100%;
    overflow-y: auto;
    gap: 14px;
    padding: 18px;
}

.portal-product-image-shell {
    display: grid;
    width: 100%;
    aspect-ratio: 1;
    min-height: 0;
    overflow: hidden;
    place-items: center;
    border: 1px solid #e0e5eb;
    border-radius: 8px;
    background: #f8fafb;
}

.portal-product-image-shell img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-context-card h2 {
    color: #112337;
    font-size: 1.25rem;
    line-height: 1.2;
}

.portal-context-card p {
    color: #4f5967;
}

.portal-context-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.portal-context-list div {
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid #edf0f3;
    padding-top: 10px;
}

.portal-context-list dt {
    color: #697383;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.portal-context-list dd {
    margin: 0;
    color: #112337;
    font-weight: 850;
    text-align: right;
    overflow-wrap: anywhere;
}

.portal-loading {
    display: grid;
    min-height: 100vh;
    place-items: center;
    align-content: center;
    gap: 12px;
    padding: 28px;
    text-align: center;
}

.portal-loading p {
    max-width: 460px;
    margin: 0;
    color: #667085;
}

.portal-orders-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
}

.portal-orders-page {
    display: grid;
    align-content: start;
    gap: 18px;
    min-height: 0;
    padding: 10px 0 40px;
}

.portal-orders-heading h1,
.portal-orders-heading p,
.portal-order-summary h2,
.portal-order-summary p,
.portal-orders-empty p {
    margin: 0;
}

.portal-orders-heading .eyebrow {
    color: #4d7045;
    font-size: 0.7rem;
    font-weight: 850;
    text-transform: uppercase;
}

.portal-orders-heading h1 {
    margin-top: 4px;
    color: #112337;
    font-size: 1.7rem;
}

.portal-orders-back {
    display: inline-block;
    margin-bottom: 14px;
    color: #405873;
    font-size: 0.82rem;
    font-weight: 800;
}

.portal-order-list {
    display: grid;
    gap: 12px;
}

.portal-order-row {
    display: grid;
    gap: 18px;
    border: 1px solid #dfe4eb;
    border-radius: 8px;
    background: #ffffff;
    padding: 20px;
}

.portal-order-row.is-detail {
    max-width: 980px;
}

.portal-order-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.portal-order-summary > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.portal-order-summary a {
    color: #405873;
    font-size: 0.74rem;
    font-weight: 850;
}

.portal-order-summary h2 {
    color: #112337;
    font-size: 1.05rem;
    line-height: 1.3;
}

.portal-order-summary p {
    color: #697383;
    font-size: 0.8rem;
}

.portal-order-status {
    flex: 0 0 auto;
    border-radius: 6px;
    background: #e5f5e8;
    color: #245b31;
    font-size: 0.7rem;
    font-weight: 850;
    padding: 6px 8px;
}

.portal-scheduling-shell { min-height: 100dvh; }
.portal-scheduling-page { display: grid; width: min(1120px, calc(100% - 32px)); margin: 28px auto 48px; gap: 20px; align-content: start; grid-auto-rows: max-content; }
.portal-scheduling-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.portal-scheduling-heading h1, .portal-scheduling-status h1 { margin: 3px 0 6px; }
.portal-scheduling-heading p, .portal-scheduling-status p { margin: 0; color: var(--muted); }
.portal-scheduling-status { display: grid; justify-items: start; max-width: 720px; margin: 8vh auto; gap: 12px; padding: 32px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.portal-scheduling-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.portal-scheduling-summary div { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.portal-scheduling-summary dt { color: var(--muted); font-size: .75rem; }
.portal-scheduling-summary dd { margin: 4px 0 0; font-weight: 700; }
.portal-scheduler-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.portal-appointment-page { width: min(840px, calc(100% - 32px)); margin-top: clamp(36px, 8vh, 88px); }
.portal-appointment-card { display: grid; grid-auto-rows: max-content; align-content: start; gap: 24px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: 0 18px 50px rgba(16, 42, 67, .08); }
.portal-appointment-card .portal-scheduling-summary div { min-height: 84px; }
.portal-appointment-card .portal-scheduler-actions .button { min-height: 48px; }
.portal-scheduler-frame { width: 100%; min-height: 720px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
@media (max-width: 720px) {
    .portal-scheduling-page { width: min(100% - 20px, 1120px); margin-top: 16px; }
    .portal-appointment-page { width: min(100% - 20px, 840px); margin-top: 24px; }
    .portal-appointment-card { gap: 18px; padding: 22px; }
    .portal-scheduling-heading { flex-direction: column; }
    .portal-scheduling-summary { grid-template-columns: 1fr; }
    .portal-appointment-card .portal-scheduler-actions { display: grid; }
    .portal-appointment-card .portal-scheduler-actions .button { width: 100%; }
    .portal-scheduler-frame { min-height: 680px; }
}

.portal-order-timeline {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.portal-order-timeline li {
    position: relative;
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 8px;
    color: #7d8794;
}

.portal-order-timeline li::after {
    position: absolute;
    top: 6px;
    right: 0;
    left: 12px;
    height: 2px;
    background: #e2e7ed;
    content: "";
}

.portal-order-timeline li:last-child::after {
    display: none;
}

.portal-order-timeline li > span {
    z-index: 1;
    width: 14px;
    height: 14px;
    border: 2px solid #cad2dc;
    border-radius: 50%;
    background: #ffffff;
}

.portal-order-timeline li.is-complete > span {
    border-color: #4d7045;
    background: #4d7045;
}

.portal-order-timeline li > div {
    display: grid;
    min-width: 0;
    gap: 3px;
    padding-right: 10px;
}

.portal-order-timeline strong {
    color: #4f5967;
    font-size: 0.73rem;
    line-height: 1.25;
}

.portal-order-timeline time {
    color: #7d8794;
    font-size: 0.66rem;
    line-height: 1.3;
}

.portal-order-metadata {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid #e7ebf0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.portal-order-metadata div {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.portal-order-metadata dt {
    color: #7d8794;
    font-size: 0.67rem;
    font-weight: 850;
    text-transform: uppercase;
}

.portal-order-metadata dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #273a50;
    font-size: 0.79rem;
    font-weight: 750;
}

.portal-order-metadata a {
    color: #355f8a;
}

.portal-orders-empty {
    display: grid;
    min-height: 280px;
    place-items: center;
    align-content: center;
    gap: 5px;
    border-block: 1px solid #dfe4eb;
    color: #697383;
}

.portal-orders-empty strong {
    color: #112337;
}

@media (max-width: 900px) {
    .portal-order-timeline {
        gap: 12px;
        grid-template-columns: 1fr;
    }

    .portal-order-timeline li {
        grid-template-columns: 14px minmax(0, 1fr);
    }

    .portal-order-timeline li::after {
        top: 12px;
        bottom: -12px;
        left: 6px;
        width: 2px;
        height: auto;
    }

    .portal-order-timeline li > div {
        padding-right: 0;
    }

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

.operations-chat-page {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: none;
    overflow: hidden;
    background: #ffffff;
}

.operations-chat-layout {
    display: grid;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    gap: 0;
    grid-template-columns: 352px minmax(0, 1fr);
}

.operations-chat-list-card {
    display: grid;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid #dedfe3;
    background: #ffffff;
    grid-template-rows: auto minmax(0, 1fr);
}

.operations-chat-list-header {
    display: grid;
    gap: 12px;
    border-bottom: 1px solid #dedfe3;
    background: #ffffff;
    padding: 14px 16px 12px;
}

.operations-chat-list-title,
.operations-chat-list-summary,
.operations-chat-thread-patient,
.operations-chat-thread-actions,
.operations-chat-composer-mode span,
.operations-chat-composer-actions,
.operations-chat-composer-tools {
    display: flex;
    align-items: center;
}

.operations-chat-list-title {
    justify-content: flex-start;
    gap: 10px;
}

.operations-chat-list-title span {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #bcd2fb;
    border-radius: 8px;
    background: #eef5ff;
}

.operations-chat-list-title .admin-icon {
    width: 16px;
    height: 16px;
    opacity: 0.95;
}

.operations-chat-list-title h1 {
    margin: 0;
    color: #242528;
    font-size: 1.02rem;
    font-weight: 850;
    line-height: 1.1;
}

.operations-chat-search {
    display: flex;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #fafbfc;
    padding: 0 10px;
}

.operations-chat-search:focus-within {
    border-color: #9ab6e5;
    box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.12);
}

.operations-chat-search .admin-icon {
    width: 15px;
    height: 15px;
    opacity: 0.78;
}

.operations-chat-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    background: transparent;
    color: #242528;
    font: inherit;
    font-size: 0.82rem;
    outline: 0;
}

.operations-chat-search input::placeholder {
    color: #a3a7ae;
}

.operations-chat-list-summary {
    gap: 6px;
    color: #676b72;
    font-size: 0.78rem;
}

.operations-chat-list-summary strong {
    color: #242528;
}

.operations-chat-list {
    display: block;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.operations-chat-list-item {
    display: grid;
    width: 100%;
    min-height: 72px;
    align-items: start;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    border: 0;
    border-bottom: 1px solid #e4e5e8;
    background: #ffffff;
    color: #242528;
    padding: 12px 14px;
    text-align: left;
}

.operations-chat-list-item:hover,
.operations-chat-list-item:focus-visible {
    background: #f8fafc;
    outline: none;
}

.operations-chat-list-item.is-active {
    background: #f4f8ff;
    box-shadow: inset 3px 0 0 #2f76ff;
}

.operations-chat-avatar {
    display: inline-grid;
    width: 34px;
    height: 34px;
    overflow: hidden;
    place-items: center;
    border: 1px solid #c9d9f5;
    border-radius: 999px;
    background: #eef8f4;
    color: #24364a;
    font-size: 0.78rem;
    font-weight: 900;
}

.operations-chat-avatar.is-large {
    width: 38px;
    height: 38px;
    font-size: 0.86rem;
}

.portal-identity-avatar img,
.portal-chat-avatar img,
.operations-chat-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.portal-identity-avatar [data-avatar-fallback],
.portal-chat-avatar [data-avatar-fallback],
.operations-chat-avatar [data-avatar-fallback] {
    display: none;
    width: 100%;
    height: 100%;
    place-items: center;
}

.portal-identity-avatar img[hidden] + [data-avatar-fallback],
.portal-chat-avatar img[hidden] + [data-avatar-fallback],
.operations-chat-avatar img[hidden] + [data-avatar-fallback] {
    display: grid;
}

.operations-chat-list-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.operations-chat-list-copy strong {
    overflow: hidden;
    color: #242528;
    font-size: 0.88rem;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.operations-chat-list-copy small {
    display: -webkit-box;
    overflow: hidden;
    color: #6f737b;
    font-size: 0.79rem;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.operations-chat-list-meta {
    display: grid;
    justify-items: end;
    gap: 6px;
    color: #6f737b;
    font-size: 0.76rem;
    white-space: nowrap;
}

.operations-chat-unread-badge {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 999px;
    background: #2f76ff;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
    padding: 0 5px;
    box-shadow: 0 0 0 4px #e7f0ff;
}

.operations-chat-detail-pane {
    display: grid;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.operations-chat-detail-pane.is-placeholder {
    grid-template-rows: minmax(0, 1fr);
}

.operations-chat-detail-pane.is-placeholder .operations-chat-empty-state {
    min-height: 0;
    height: 100%;
    padding: 40px;
}

.operations-chat-thread-header {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #dedfe3;
    background: #ffffff;
    padding: 11px 18px;
}

.operations-chat-thread-patient {
    min-width: 0;
    gap: 10px;
}

.operations-chat-thread-patient div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.operations-chat-thread-header h1,
.operations-chat-thread-header p,
.operations-chat-context-card h2,
.operations-chat-context-card h3 {
    margin: 0;
}

.operations-chat-thread-header h1 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    overflow: hidden;
    color: #242528;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.operations-chat-thread-header h1 span,
.operations-chat-thread-header h1 small {
    color: #72777f;
    font-size: 0.82rem;
    font-weight: 650;
}

.operations-chat-thread-header p {
    display: none;
}

.operations-chat-thread-actions {
    min-width: 0;
    justify-content: flex-end;
    gap: 8px;
}

.operations-chat-header-icon {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #242528;
    padding: 0;
}

.operations-chat-header-icon:hover,
.operations-chat-header-icon:focus-visible {
    background: #f4f5f7;
    outline: none;
}

.operations-chat-header-icon:disabled {
    cursor: default;
    opacity: 0.78;
}

.operations-chat-header-icon .admin-icon {
    width: 18px;
    height: 18px;
    opacity: 0.88;
}

.operations-chat-messages {
    display: grid;
    align-content: start;
    gap: 18px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: #ffffff;
    padding: 18px 24px 24px;
}

.operations-chat-message-row {
    display: grid;
    width: 100%;
    align-items: end;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 720px);
}

.operations-chat-message-row.is-own {
    justify-content: end;
    grid-template-columns: minmax(0, 720px) 34px;
}

.operations-chat-message-row.is-own .message-avatar {
    grid-column: 2;
}

.operations-chat-message-row.is-own .operations-chat-message-bubble {
    grid-column: 1;
    grid-row: 1;
    background: #eef5ff;
}

.operations-chat-message-bubble {
    display: grid;
    gap: 10px;
    min-width: 0;
    border-radius: 8px;
    background: #f3f3f4;
    color: #242528;
    padding: 12px 14px 10px;
}

.operations-chat-message-author {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: #242528;
    font-size: 0.82rem;
    line-height: 1.2;
}

.operations-chat-message-author strong {
    font-weight: 750;
}

.operations-chat-message-author span {
    color: #8a8f98;
}

.operations-chat-message-author em {
    color: #2f76ff;
    font-style: normal;
    font-weight: 650;
}

.operations-chat-message-bubble p {
    margin: 0;
    color: #242528;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.operations-chat-message-bubble time {
    justify-self: end;
    color: #737780;
    font-size: 0.76rem;
    line-height: 1;
}

.operations-chat-message-row .message-avatar {
    align-self: end;
}

.operations-chat-composer {
    display: block;
    border-top: 1px solid #dedfe3;
    background: #ffffff;
    padding: 12px 18px 14px;
}

.operations-chat-composer-box {
    display: grid;
    gap: 8px;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px 12px;
    box-shadow: 0 8px 22px rgba(36, 37, 40, 0.045);
}

.operations-chat-composer-mode span {
    width: fit-content;
    gap: 7px;
    border: 1px solid #e0e3e8;
    border-radius: 8px;
    background: #ffffff;
    color: #4f535a;
    font-size: 0.8rem;
    padding: 6px 10px;
}

.operations-chat-composer-mode .admin-icon {
    width: 14px;
    height: 14px;
}

.operations-chat-composer label {
    display: grid;
    min-width: 0;
}

.operations-chat-composer label span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.operations-chat-composer textarea {
    width: 100%;
    min-height: 42px;
    max-height: 110px;
    resize: vertical;
    border: 0;
    background: transparent;
    color: #242528;
    font: inherit;
    font-size: 0.88rem;
    line-height: 1.4;
    outline: 0;
    padding: 4px 2px;
}

.operations-chat-composer textarea::placeholder {
    color: #a0a4ab;
}

.operations-chat-composer-actions {
    justify-content: space-between;
    gap: 10px;
}

.operations-chat-composer-tools {
    gap: 8px;
}

.operations-chat-composer-tools button,
.operations-chat-composer-tools span,
.operations-chat-send-button {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
}

.operations-chat-composer-tools button,
.operations-chat-composer-tools span {
    border: 1px solid #d9dce2;
    background: #f4f5f6;
    color: #6f737b;
}

.operations-chat-composer-tools button:disabled {
    cursor: default;
    opacity: 0.72;
}

.operations-chat-composer-tools .admin-icon {
    width: 15px;
    height: 15px;
}

.operations-chat-send-button {
    position: relative;
    border: 1px solid #112337;
    background: #112337;
    color: #ffffff;
    padding: 0;
}

.operations-chat-send-button::before {
    content: "";
    width: 11px;
    height: 11px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: translateX(-2px) rotate(45deg);
}

.operations-chat-send-button:hover,
.operations-chat-send-button:focus-visible {
    background: #1b3148;
    outline: none;
}

.operations-chat-send-button.is-waiting::before,
.operations-chat-send-button .button-spinner + span {
    display: none;
}

.operations-chat-empty-state {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    min-height: 260px;
    color: #6f737b;
    text-align: center;
}

.operations-chat-empty-state.is-main {
    min-height: 100%;
}

.operations-chat-empty-icon {
    display: inline-grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid #d8e4fb;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef5ff, #f6faf3);
}

.operations-chat-empty-icon .admin-icon {
    width: 24px;
    height: 24px;
    opacity: 0.9;
}

.operations-chat-empty-state strong {
    color: #242528;
    font-size: 1.05rem;
}

.operations-chat-empty-state p {
    max-width: 360px;
    margin: 0;
    font-size: 0.86rem;
}

.operations-chat-product-history-loading,
.operations-chat-product-history-empty {
    display: grid;
    min-height: 220px;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: #6f737b;
    text-align: center;
}

.operations-chat-product-history-loading strong,
.operations-chat-product-history-empty strong {
    color: #242528;
    font-size: 0.95rem;
}

.operations-chat-product-history-empty p {
    max-width: 320px;
    margin: 0;
    font-size: 0.84rem;
}

.operations-chat-product-history-list {
    display: grid;
    gap: 10px;
}

.operations-chat-product-history-item {
    display: grid;
    gap: 10px;
    grid-template-columns: 48px minmax(0, 1fr);
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}

.operations-chat-product-history-item img {
    width: 48px;
    height: 48px;
    border: 1px solid #e5e8ee;
    border-radius: 8px;
    background: #f8fafb;
    object-fit: contain;
}

.operations-chat-product-history-copy {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.operations-chat-product-history-heading {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.operations-chat-product-history-heading h3,
.operations-chat-product-history-copy p {
    margin: 0;
}

.operations-chat-product-history-heading h3 {
    overflow: hidden;
    color: #242528;
    font-size: 0.9rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.operations-chat-product-history-link,
.operations-chat-product-history-subtle-link {
    color: inherit;
    text-decoration: none;
}

.operations-chat-product-history-link:hover,
.operations-chat-product-history-subtle-link:hover {
    color: #0f2b44;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.operations-chat-product-history-heading time,
.operations-chat-product-history-copy p,
.operations-chat-product-history-muted {
    color: #6f737b;
    font-size: 0.76rem;
}

.operations-chat-product-history-selection {
    display: grid;
    gap: 2px;
    border-radius: 7px;
    background: #f6f8fb;
    padding: 7px 8px;
}

.operations-chat-product-history-selection strong {
    color: #242528;
    font-size: 0.8rem;
}

.operations-chat-product-history-selection span {
    color: #6f737b;
    font-size: 0.76rem;
}

.operations-chat-product-history-muted {
    margin: 0;
}

.portal-chat-composer,
.operations-chat-composer {
    align-items: end;
}

.portal-chat-composer label {
    min-width: 0;
}

.portal-chat-composer label span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.portal-chat-composer textarea {
    min-height: 52px;
    max-height: 140px;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.35;
}

.portal-chat-composer textarea::placeholder {
    color: #778294;
    font: inherit;
}

.portal-chat-composer .button {
    min-width: 96px;
    min-height: 52px;
    padding: 0 20px;
    font-size: 0.95rem;
}

.chat-composer-error {
    grid-column: 1 / -1;
    margin: -4px 0 0;
    color: #b42318;
    font-size: 0.82rem;
    font-weight: 750;
}

.operations-chat-context-card {
    align-self: start;
}

.operations-chat-product-context {
    display: grid;
    align-items: center;
    gap: 12px;
    grid-template-columns: 74px minmax(0, 1fr);
}

.operations-chat-product-context img {
    width: 74px;
    height: 74px;
    border: 1px solid #e0e5eb;
    border-radius: 8px;
    background: #f8fafb;
    object-fit: contain;
}

.operations-chat-context-card h3 {
    color: #697383;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

/* legacy chat context styles retained for older rendered fragments */
.operations-chat-thread,
.operations-chat-thread-grid,
.operations-chat-panel {
    min-width: 0;
}

.admin-console {
    display: grid;
    height: 100vh;
    min-height: 100vh;
    grid-template-columns: 278px minmax(0, 1fr);
}

.admin-console.is-sidebar-collapsed {
    grid-template-columns: 68px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    height: 100vh;
    flex-direction: column;
    border-right: 1px solid #dedfe3;
    background: #f1f1f2;
    overflow: visible;
    padding: 22px 12px 12px;
    transition: width 160ms ease;
}

.admin-sidebar,
.admin-sidebar-top,
.admin-nav-block,
.admin-nav-section,
.admin-nav-children,
.admin-nav-item,
.admin-nav-subitem,
.admin-nav-section-title,
.admin-user-footer,
.admin-user-card {
    box-sizing: border-box;
    min-width: 0;
}

.admin-sidebar.is-collapsed {
    align-items: center;
    padding-inline: 8px;
}

.admin-sidebar-top,
.admin-topbar,
.admin-topbar-actions,
.admin-nav-item,
.admin-nav-section-title,
.admin-user-card,
.detail-card-heading,
.admin-title-row,
.admin-table-toolbar,
.admin-filter-row,
.admin-table-footer,
.small-command,
.admin-section-tabs,
.admin-check-row label,
.admin-inline-check,
.product-assignment label {
    display: flex;
    align-items: center;
}

.admin-sidebar-top {
    justify-content: space-between;
    padding: 0 8px 26px;
}

.admin-sidebar.is-collapsed .admin-sidebar-top {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 0 0 22px;
}

.admin-brand-logo {
    display: inline-flex;
    width: 108px;
    height: 40px;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
}

.admin-brand-logo img {
    display: block;
    width: 96px;
    height: auto;
    object-fit: contain;
}

.admin-sidebar.is-collapsed .admin-brand-logo {
    position: relative;
    width: 44px;
    height: 28px;
    overflow: hidden;
    justify-content: center;
}

.admin-sidebar.is-collapsed .admin-brand-logo img {
    display: none;
}

.admin-sidebar.is-collapsed .admin-brand-logo::after {
    content: "";
    display: block;
    width: 44px;
    height: 20px;
    background-image: url("/static/assets/provider_logo.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.admin-collapse-button,
.admin-icon-button,
.admin-back-button {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #242528;
    padding: 0;
}

.admin-collapse-button {
    width: 22px;
    height: 22px;
    border: 0;
    color: #a7abb2;
}

.admin-collapse-button::before {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: translateX(2px) rotate(-135deg);
}

.admin-sidebar.is-collapsed .admin-collapse-button::before {
    transform: translateX(-2px) rotate(45deg);
}

.admin-icon-button:hover,
.admin-back-button:hover,
.admin-icon-button:focus-visible,
.admin-back-button:focus-visible {
    border-color: #cdd1d8;
    background: #ffffff;
    outline: none;
}

.admin-collapse-button:hover,
.admin-collapse-button:focus-visible {
    color: #6f7580;
    background: transparent;
    outline: none;
}

.admin-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    opacity: 0.72;
}

.admin-nav-caret {
    width: 16px;
    height: 16px;
    margin-left: auto;
}

.admin-nav-block {
    display: grid;
    gap: 3px;
    border-bottom: 1px solid #dedfe3;
    padding: 10px 0 16px;
}

.admin-sidebar > .admin-nav-block:first-of-type {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

.admin-nav-heading {
    margin: 0 0 8px;
    color: #686b70;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-nav-item,
.admin-nav-subitem,
.admin-nav-section-title {
    width: 100%;
    min-height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #5d6066;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 10px;
    padding: 0 10px;
    text-align: left;
    text-decoration: none;
}

.admin-nav-item {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    height: auto;
    padding-block: 7px;
}

.admin-nav-section {
    display: grid;
    gap: 2px;
}

.admin-nav-section-title {
    color: #2f3238;
    cursor: default;
    font-weight: 800;
}

.admin-nav-children {
    display: grid;
    gap: 2px;
}

.admin-nav-children .admin-nav-item {
    padding-left: 34px;
}

.admin-nav-item span {
    min-width: 0;
    overflow: visible;
    line-height: 1.2;
    overflow-wrap: normal;
    text-overflow: clip;
    white-space: normal;
}

.admin-sidebar.is-collapsed .admin-nav-heading,
.admin-sidebar.is-collapsed .admin-nav-section-title,
.admin-sidebar.is-collapsed .admin-nav-item span,
.admin-sidebar.is-collapsed .admin-nav-item strong,
.admin-sidebar.is-collapsed .admin-user-card > span:not(.admin-avatar) {
    display: none;
}

.admin-sidebar.is-collapsed .admin-nav-item {
    display: flex;
    justify-content: center;
    padding: 0;
}

.admin-sidebar.is-collapsed .admin-nav-section,
.admin-sidebar.is-collapsed .admin-nav-children {
    width: 100%;
}

.admin-sidebar.is-collapsed .admin-nav-section {
    gap: 0;
}

.admin-sidebar.is-collapsed .admin-nav-section + .admin-nav-section {
    margin-top: 8px;
    border-top: 1px solid #dedfe3;
    padding-top: 8px;
}

.admin-sidebar.is-collapsed .admin-nav-children {
    gap: 6px;
}

.admin-sidebar.is-collapsed .admin-nav-children .admin-nav-item {
    padding: 0;
}

.admin-sidebar.is-collapsed .admin-nav-item .admin-icon {
    margin: 0;
}

.admin-sidebar.is-collapsed .admin-nav-block {
    width: 100%;
}

.admin-settings-nav {
    border-top: 1px solid #dedfe3;
    border-bottom: 0;
}

.admin-nav-item em {
    margin-left: auto;
    border-radius: 999px;
    background: #d9ebff;
    color: #2b70ef;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 900;
    padding: 2px 7px;
}

.admin-nav-item strong {
    min-width: 12px;
    margin-left: 0;
    color: #7a7d83;
    font-size: 0.72rem;
    justify-self: end;
    text-align: right;
}

.admin-nav-note {
    display: block;
    color: #666a71;
    font-size: 0.76rem;
    line-height: 1.45;
    padding: 0 10px;
}

.admin-nav-item:hover,
.admin-nav-item:focus-visible,
.admin-nav-subitem:hover,
.admin-nav-subitem:focus-visible {
    background: #e9eaec;
    color: #242528;
    outline: none;
}

.admin-nav-item.is-active,
.admin-nav-parent.is-active {
    background: #dedfe1;
    color: #242528;
    font-weight: 700;
}

.admin-nav-subitem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 34px;
    width: calc(100% - 34px);
    color: #666970;
}

.admin-nav-subitem.is-selected {
    color: #242528;
    font-weight: 800;
}

.admin-sidebar-spacer {
    flex: 1;
}

.admin-nav-footer {
    border-top: 1px solid #dedfe3;
    border-bottom: 0;
}

.admin-user-footer {
    position: relative;
    z-index: 120;
    display: grid;
    width: 100%;
    min-width: 0;
    border-top: 1px solid #dedfe3;
    padding: 12px 4px 0;
}

.admin-user-card {
    width: 100%;
    min-width: 0;
    gap: 10px;
    padding: 0;
}

.admin-avatar {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #74b36d;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;
    padding: 0;
}

.admin-avatar-generated {
    display: inline-grid;
    width: 100%;
    height: 100%;
    overflow: hidden;
    place-items: center;
    border-radius: inherit;
}

.admin-avatar-generated img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.admin-avatar-generated [data-avatar-fallback] {
    display: none;
    width: 100%;
    height: 100%;
    place-items: center;
}

.admin-avatar-generated img[hidden] + [data-avatar-fallback] {
    display: grid;
}

.account-avatar {
    position: relative;
    background: var(--surface-muted);
    color: var(--muted);
}

.account-avatar img {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.account-avatar[data-avatar-state="ready"] img {
    opacity: 1;
}

.account-avatar [data-account-avatar-initials] {
    display: none;
}

.account-avatar[data-avatar-state="fallback"] [data-account-avatar-initials] {
    display: inline;
}

.admin-avatar-button {
    cursor: pointer;
}

.admin-avatar-button:hover,
.admin-avatar-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(116, 179, 109, 0.22);
    outline: none;
}

.admin-user-menu {
    position: absolute;
    right: 4px;
    bottom: calc(100% + 8px);
    left: 4px;
    z-index: 200;
    display: none;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.14);
    padding: 6px;
}

.admin-user-footer.is-open .admin-user-menu {
    display: grid;
}

.admin-user-menu-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #242528;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 750;
    padding: 8px 9px;
    text-align: left;
}

.admin-user-menu-item:hover,
.admin-user-menu-item:focus-visible {
    background: #f0f1f3;
    outline: none;
}

.admin-user-menu-item .admin-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.avatar-picker-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: rgba(17, 35, 55, 0.24);
    padding: 24px;
}

.avatar-picker-modal {
    display: grid;
    width: min(560px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    overflow: hidden;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(17, 35, 55, 0.22);
}

.avatar-picker-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #e5e8ed;
    padding: 18px 20px;
}

.avatar-picker-header h2,
.avatar-picker-header p {
    margin: 0;
}

.avatar-picker-header h2 {
    color: #112337;
    font-size: 1.08rem;
    line-height: 1.15;
}

.avatar-picker-header p {
    margin-top: 4px;
    color: #687383;
    font-size: 0.84rem;
    line-height: 1.35;
}

.avatar-picker-close {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid #d9dde3;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.avatar-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

.avatar-picker-option {
    display: grid;
    justify-items: center;
    gap: 8px;
    border: 1px solid #e0e5ec;
    border-radius: 8px;
    background: #fbfcfd;
    color: #112337;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 12px 8px;
}

.avatar-picker-option:hover,
.avatar-picker-option:focus-visible,
.avatar-picker-option.is-selected {
    border-color: #8fb2db;
    background: #f4f8ff;
    outline: none;
}

.avatar-picker-option.is-selected {
    box-shadow: inset 0 0 0 2px #2f76ff;
}

.avatar-picker-preview {
    display: inline-grid;
    width: 58px;
    height: 58px;
    overflow: hidden;
    place-items: center;
    border: 1px solid #c9d9f5;
    border-radius: 999px;
    background: #eef8f4;
    color: #112337;
    font-size: 0.9rem;
    font-weight: 900;
}

.avatar-picker-preview img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.avatar-picker-preview [data-avatar-fallback] {
    display: none;
    width: 100%;
    height: 100%;
    place-items: center;
}

.avatar-picker-preview img[hidden] + [data-avatar-fallback] {
    display: grid;
}

.admin-user-card strong,
.admin-user-card small {
    display: block;
    line-height: 1.2;
}

.admin-user-card strong {
    font-size: 0.78rem;
}

.admin-user-card small {
    color: #6c7077;
    font-size: 0.7rem;
}

.admin-sidebar.is-collapsed .admin-user-footer {
    justify-items: center;
    padding-inline: 0;
}

.admin-sidebar.is-collapsed .admin-user-card {
    justify-content: center;
}

.admin-sidebar.is-collapsed .admin-user-menu {
    right: auto;
    left: 0;
    width: 188px;
}

.admin-main {
    display: grid;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #f7f7f8;
    grid-template-rows: auto minmax(0, 1fr);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 60px;
    justify-content: space-between;
    border-bottom: 1px solid #dedfe3;
    background: rgba(247, 247, 248, 0.96);
    padding: 8px 20px;
    gap: 12px;
}

.admin-topbar-actions {
    gap: 10px;
}

.admin-topbar-title {
    display: grid;
    gap: 1px;
}

.admin-topbar-title strong {
    color: #242528;
    font-size: 0.86rem;
}

.admin-topbar-title span {
    color: #676b72;
    font-size: 0.76rem;
}

.admin-icon-button {
    border-color: #d9dce2;
    background: #ffffff;
}

.admin-icon-button.is-primary {
    border-color: #2f76ff;
    background: #eff5ff;
}

.admin-search-pill {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 7px;
    border: 1px solid #d9dce2;
    border-radius: 999px;
    background: #ffffff;
    color: #6f737b;
    font-size: 0.78rem;
    padding: 0 10px;
}

.admin-search-pill kbd {
    min-width: 18px;
    border: 1px solid #dedfe3;
    border-radius: 6px;
    background: #f7f7f8;
    color: #4f535a;
    font: inherit;
    font-size: 0.72rem;
    text-align: center;
}

.admin-save-button {
    min-height: 32px;
    border: 1px solid #cfd2d8;
    border-radius: 8px;
    background: #ffffff;
    color: #3a3d42;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0 14px;
}

.admin-save-button:hover,
.admin-save-button:focus-visible {
    border-color: #9fa5b0;
    outline: none;
}

.admin-content {
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

.admin-page .button {
    width: auto;
    min-height: 36px;
    gap: 8px;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 650;
    padding: 0 13px;
    white-space: nowrap;
}

.admin-page .button .admin-icon {
    display: block;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.button.is-waiting {
    cursor: wait;
    opacity: 0.82;
}

.button-spinner {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    animation: button-spinner-rotate 700ms linear infinite;
}

@keyframes button-spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.admin-page .button-primary {
    background: #112337;
    box-shadow: 0 1px 2px rgba(17, 35, 55, 0.14);
}

.admin-page .button-primary:hover,
.admin-page .button-primary:focus-visible {
    background: #1b3148;
}

.admin-page .button-primary .admin-icon {
    filter: brightness(0) invert(1);
}

.admin-page .button-secondary {
    color: #24364a;
}

.admin-page .button-danger {
    border: 1px solid #f1c2c0;
    background: #fff7f6;
    color: #b42318;
}

.admin-page .button-danger:hover,
.admin-page .button-danger:focus-visible {
    border-color: #e58a86;
    background: #fff1f0;
    outline: none;
}

.admin-product-form,
.admin-left-stack,
.admin-right-stack {
    display: grid;
    gap: 16px;
}

.admin-simple-page {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 16px;
    max-width: 1120px;
}

.admin-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.admin-page-actions {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.admin-page-actions p {
    max-width: 260px;
    margin: 0;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: right;
}

.order-lifecycle {
    overflow: hidden;
    border-block: 1px solid #e2e7de;
    background: #f8faf7;
}

.order-lifecycle ol {
    display: grid;
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 18px;
    list-style: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.order-lifecycle li {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    color: #7a8190;
}

.order-lifecycle li:not(:last-child)::after {
    position: absolute;
    top: 16px;
    right: 12px;
    left: 44px;
    height: 1px;
    background: #d8ded4;
    content: "";
}

.order-lifecycle li > span:last-child {
    z-index: 1;
    display: grid;
    min-width: 0;
    gap: 2px;
    background: #f8faf7;
    padding-right: 10px;
}

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

.order-lifecycle strong {
    color: #4b5565;
    font-size: 0.78rem;
}

.order-lifecycle small {
    font-size: 0.7rem;
    font-weight: 700;
}

.order-lifecycle-marker {
    z-index: 2;
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 1px solid #ccd3c8;
    border-radius: 999px;
    background: #ffffff;
    color: #68707a;
    font-size: 0.72rem;
    font-weight: 850;
}

.order-lifecycle-check {
    width: 8px;
    height: 13px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
}

.order-lifecycle li.is-complete .order-lifecycle-marker {
    border-color: #91ab87;
    background: #eaf4e6;
    color: #315c2e;
}

.order-lifecycle li.is-current .order-lifecycle-marker {
    border-color: #14283d;
    background: #14283d;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(20, 40, 61, 0.12);
}

.order-lifecycle li.is-current strong {
    color: #14283d;
}

.order-fulfillment-summary {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

@media (max-width: 720px) {
    .order-lifecycle ol {
        gap: 12px 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-lifecycle li::after {
        display: none;
    }
}

@media (max-width: 440px) {
    .order-lifecycle ol {
        grid-template-columns: minmax(0, 1fr);
    }
}

.admin-page-heading h1,
.admin-page-heading p,
.admin-simple-form h2 {
    margin: 0;
}

.admin-page-heading h1 {
    font-size: 1.5rem;
    letter-spacing: 0;
}

.admin-page-heading p {
    max-width: 560px;
    color: #666a71;
    font-size: 0.9rem;
}

.admin-simple-form {
    max-width: 760px;
}

.admin-simple-form .form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.admin-user-detail-grid {
    display: grid;
    align-items: start;
    gap: 16px;
    grid-template-columns: minmax(0, 760px) minmax(240px, 320px);
}

.admin-user-actions-card {
    align-content: start;
    gap: 16px;
}

.admin-user-actions-card h2,
.admin-user-actions-card p {
    margin: 0;
}

.admin-user-actions-card h2 {
    font-size: 1rem;
    letter-spacing: 0;
}

.admin-user-actions-card p {
    margin-top: 4px;
    color: #667085;
    font-size: 0.86rem;
    line-height: 1.4;
}

.admin-user-actions-stack {
    display: grid;
    gap: 10px;
}

.admin-user-actions-stack .button {
    width: 100%;
}

.admin-user-actions-stack .button-secondary .admin-icon {
    opacity: 0.72;
}

.admin-form-note {
    max-width: 520px;
    margin: 0;
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.45;
}

.admin-two-column {
    display: grid;
    align-items: start;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) 420px;
}

.admin-text-button {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: #242528;
    font-weight: 800;
    padding: 0;
}

.admin-empty-cell {
    color: #676b72;
    padding: 20px !important;
    text-align: center !important;
}

.admin-title-row {
    gap: 12px;
}

.admin-title-row h1 {
    flex: 1;
    margin: 0;
    color: #242528;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0;
}

.admin-title-row h1 span {
    color: #777b82;
    font-weight: 500;
}

.admin-title-row .button {
    min-height: 34px;
    gap: 6px;
    font-size: 0.8rem;
    padding: 0 12px;
}

.admin-detail-grid {
    display: grid;
    align-items: start;
    gap: 16px;
    grid-template-columns: 440px minmax(0, 1fr);
}

.metric-grid {
    display: grid;
    overflow: hidden;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #ffffff;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card {
    display: grid;
    gap: 26px;
    min-height: 96px;
    padding: 16px 20px 14px;
}

.metric-card + .metric-card {
    border-left: 1px solid #dedfe3;
}

.metric-card span,
.media-label {
    color: #242528;
    font-size: 0.78rem;
}

.metric-card strong {
    font-size: 1.35rem;
}

.detail-card {
    display: grid;
    gap: 14px;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #ffffff;
    padding: 16px;
}

.copyable-id {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    gap: 5px;
    color: #667085;
}

.copyable-value {
    position: relative;
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #667085;
    cursor: copy;
    padding: 2px 4px;
}

.copyable-value code {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copyable-id-value {
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
}

.data-table .copyable-id {
    width: 100%;
    max-width: 170px;
}

.data-table .copyable-id-value {
    flex: 1 1 auto;
}

.copyable-value:hover,
.copyable-value:focus-visible {
    background: #f2f4f7;
    color: #344054;
    outline: none;
}

.copyable-value-feedback {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 5px);
    z-index: 20;
    border-radius: 4px;
    background: #242528;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: 750;
    line-height: 1;
    opacity: 0;
    padding: 4px 6px;
    pointer-events: none;
    transform: translate(-50%, 3px);
    transition: opacity 110ms ease, transform 110ms ease;
    white-space: nowrap;
}

.copyable-value.is-copied .copyable-value-feedback {
    opacity: 1;
    transform: translate(-50%, 0);
}

.copyable-value.is-copy-error .copyable-value-feedback {
    background: #b42318;
}

.copyable-stripe-price {
    color: #667085;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.3;
}

.copyable-id-route {
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 650;
    padding: 0;
}

.copyable-id-route:hover,
.copyable-id-route:focus-visible {
    color: #344054;
    outline: none;
    text-decoration: underline;
}

.table-primary-stack {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.muted-text {
    color: var(--muted);
}

.table-primary-stack strong,
.table-primary-stack small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-primary-stack small {
    color: #667085;
    font-size: 0.76rem;
}

.data-table td.interventions-table-cell,
.data-table td.orders-table-cell {
    vertical-align: top;
}

.table-id-text {
    display: block;
    max-width: 280px;
    min-width: 0;
    color: #344054;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-footnote {
    color: #667085;
    font-size: 0.68rem;
    line-height: 1.2;
}

.compact-card {
    padding: 0;
}

.admin-summary-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.admin-summary-list div {
    display: grid;
    gap: 2px;
}

.admin-summary-list dt {
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-summary-list dd {
    margin: 0;
    color: #242528;
    font-weight: 750;
}

.compact-card .detail-card-heading {
    padding: 16px 16px 0;
}

.detail-card-heading {
    min-height: 22px;
    justify-content: space-between;
    gap: 12px;
}

.detail-card-heading h2,
.timeline-panel h2 {
    margin: 0;
    color: #242528;
    font-size: 0.92rem;
    font-weight: 900;
}

.admin-field-row,
.metadata-grid,
.variant-editor {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-page .field {
    gap: 5px;
}

.admin-page .field span {
    color: #34363a;
    font-size: 0.74rem;
    font-weight: 700;
}

.admin-page .field input,
.admin-page .field select,
.admin-page .field textarea,
.admin-table-search input {
    min-height: 34px;
    border-color: #dedfe3;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.8rem;
    padding: 0 10px;
}

.admin-page .field textarea {
    min-height: 98px;
    padding: 10px;
}

.admin-form-fieldset {
    display: grid;
    gap: 12px;
    min-width: 0;
    border: 1px solid #e2e5ea;
    border-radius: 8px;
    padding: 14px;
}

.admin-form-fieldset legend {
    color: #34363a;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0 6px;
}

.pharmacy-order-form {
    max-width: none;
    gap: 16px;
}

.pharmacy-order-form .admin-field-row {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.pharmacy-order-form .pharmacy-order-header-row {
    align-items: start;
}

.pharmacy-order-form .pharmacy-order-header-row > .field {
    align-content: start;
    align-self: start;
}

.pharmacy-order-form .admin-form-fieldset {
    padding-top: 16px;
}

.pharmacy-order-form .form-actions {
    align-items: center;
    margin-top: 4px;
    padding-top: 2px;
}

.pharmacy-order-form .form-actions .button {
    width: auto;
    min-width: 130px;
}

.pharmacy-order-daw {
    min-height: 34px;
    align-self: end;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #ffffff;
    color: #34363a;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0 10px;
}

.pharmacy-order-daw input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--clinical-blue);
}

.field-label-with-meta {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.field-label-with-meta > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.required-field-indicator {
    display: inline-flex;
    min-height: 16px;
    align-items: center;
    border-radius: 999px;
    background: #fef3f2;
    color: #b42318;
    font-size: 0.64rem;
    font-weight: 850;
    line-height: 1;
    padding: 2px 6px;
    text-transform: uppercase;
}

.pharmacy-document-field {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.pharmacy-pdf-picker {
    display: grid;
    min-height: 34px;
    min-width: 0;
    align-items: center;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.pharmacy-pdf-picker-button {
    width: auto;
    min-width: 112px;
    min-height: 34px;
    padding: 0 10px;
}

.pharmacy-pdf-picker-button svg,
.pharmacy-pdf-picker-clear svg {
    width: 16px;
    height: 16px;
}

.pharmacy-pdf-picker-status {
    min-width: 0;
    overflow: hidden;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pharmacy-pdf-picker.has-selection .pharmacy-pdf-picker-status {
    color: #344054;
    font-weight: 750;
}

.pharmacy-pdf-picker-clear {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dedfe3;
    border-radius: 7px;
    background: #ffffff;
    color: #667085;
    padding: 0;
}

.pharmacy-pdf-picker-clear[hidden] {
    display: none;
}

.pharmacy-pdf-picker-clear:hover,
.pharmacy-pdf-picker-clear:focus-visible {
    border-color: #98a2b3;
    background: #f2f4f7;
    color: #242528;
    outline: none;
}

.document-file-link {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-height: 30px;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: #344054;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    padding: 2px 0;
    text-align: left;
}

.document-file-link:hover,
.document-file-link:focus-visible {
    color: #0b1f35;
    outline: none;
    text-decoration: underline;
}

.document-file-link svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.document-file-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-file-link small {
    flex: 0 0 auto;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 750;
}

.document-file-link.is-compact {
    min-height: 0;
    padding: 0;
}

.order-billing-option-form {
    max-width: none;
    margin: 16px 0 18px;
}

.order-billing-option-form .admin-field-row {
    align-items: end;
    justify-content: start;
    grid-template-columns: minmax(320px, 640px) max-content;
    gap: 12px;
}

.order-billing-option-form .button {
    width: fit-content;
    min-width: 0;
    min-height: 34px;
    align-self: end;
    padding-inline: 12px;
}

.order-billing-price-meta {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: #667085;
    font-size: 0.68rem;
}

.order-billing-price-meta > span {
    flex: 0 0 auto;
    font-weight: 650;
}

.pharmacy-order-summary {
    border: 1px solid #eef0f3;
    border-radius: 8px;
    background: #fafbfc;
    padding: 12px;
}

.pharmacy-order-summary dt {
    color: #667085;
    font-size: 0.66rem;
    font-weight: 650;
}

.pharmacy-order-summary dd {
    color: #344054;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.4;
}

.pharmacy-order-summary .copyable-value {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 500;
    padding-block: 0;
}

.pharmacy-order-summary .document-file-link {
    color: #475467;
    font-size: 0.75rem;
    font-weight: 500;
}

.pharmacy-order-summary .document-file-link small {
    font-size: 0.68rem;
    font-weight: 500;
}

.pharmacy-fulfillment-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.pharmacy-fulfillment-actions .button {
    width: auto;
    min-width: 0;
    min-height: 34px;
    padding-inline: 12px;
}

.fulfillment-related-actions {
    flex-wrap: wrap;
}

.fulfillment-related-actions .button {
    width: auto;
    min-width: 0;
    min-height: 34px;
    padding-inline: 12px;
}

.fulfillment-history-notice {
    display: flex;
    align-items: baseline;
    gap: 8px;
    border: 1px solid #ead7a5;
    border-radius: 8px;
    background: #fffaf0;
    color: #694d16;
    font-size: 0.76rem;
    padding: 10px 12px;
}

.fulfillment-history-notice strong {
    flex: 0 0 auto;
    font-weight: 650;
}

.fulfillment-history-notice span {
    font-weight: 400;
}

.fulfillment-workspace-layout {
    display: grid;
    align-items: start;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
}

.fulfillment-workspace-main {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.fulfillment-status-rail {
    position: sticky;
    top: 84px;
    display: grid;
    min-width: 0;
    max-height: calc(100vh - 108px);
    gap: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #f7f8fa;
    padding: 14px;
}

.fulfillment-status-rail-heading {
    display: grid;
    gap: 2px;
}

.fulfillment-status-rail-heading h2 {
    margin: 0;
    color: #344054;
    font-size: 0.82rem;
    font-weight: 650;
}

.fulfillment-status-rail-heading span {
    color: #667085;
    font-size: 0.68rem;
    font-weight: 400;
}

.pharmacy-tracking-band.is-side-log {
    gap: 12px;
    border: 0;
    padding: 0;
}

.pharmacy-tracking-band.is-side-log .pharmacy-lifecycle {
    grid-template-columns: 1fr;
    gap: 7px;
}

.pharmacy-tracking-band.is-side-log .pharmacy-lifecycle li {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: baseline;
    gap: 8px;
    border-bottom: 1px solid #eef0f3;
    padding-bottom: 7px;
}

.pharmacy-tracking-band.is-side-log .pharmacy-event-list > div,
.pharmacy-tracking-band.is-side-log .pharmacy-attempt-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
    border-bottom: 1px solid #eef0f3;
    padding-bottom: 8px;
    font-size: 0.68rem;
}

.pharmacy-tracking-band.is-side-log .status-badge {
    min-height: 20px;
    width: fit-content;
    font-size: 0.62rem;
    padding-inline: 6px;
}

.pharmacy-order-card,
.pharmacy-order-form {
    min-width: 0;
    max-width: 100%;
}

.pharmacy-order-card .document-file-link,
.pharmacy-order-summary .document-file-link {
    display: grid;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: 16px minmax(0, 1fr) max-content;
    overflow: hidden;
}

.pharmacy-order-card .document-file-link .admin-icon,
.pharmacy-order-summary .document-file-link .admin-icon {
    width: 16px;
    height: 16px;
}

.pharmacy-order-card .document-file-link span,
.pharmacy-order-summary .document-file-link span {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pharmacy-order-card .document-file-link small,
.pharmacy-order-summary .document-file-link small {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pharmacy-tracking-band.is-side-log .pharmacy-event-list small {
    grid-column: auto;
}

.intervention-detail-page .admin-page-heading h1 {
    font-size: 1.45rem;
    font-weight: 650;
}

.intervention-detail-page .detail-card-heading h2,
.intervention-detail-page .payments-settings-panel h2,
.intervention-detail-page .payment-reference-block h3 {
    font-size: 0.84rem;
    font-weight: 650;
}

.intervention-detail-page .detail-card-heading p {
    font-size: 0.8rem;
    font-weight: 400;
}

.intervention-detail-page .admin-summary-list dt,
.intervention-detail-page .patient-vitals-list dt,
.intervention-detail-page .payment-reference-grid dt {
    font-size: 0.66rem;
    font-weight: 600;
}

.intervention-detail-page .admin-summary-list dd,
.intervention-detail-page .patient-vitals-list dd,
.intervention-detail-page .payment-reference-grid dd {
    color: #344054;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
}

.intervention-detail-page .table-link,
.intervention-detail-page .payment-method-brand {
    font-weight: 500;
}

.intervention-payment-state {
    max-width: none;
}

.assessment-submission-detail-page .admin-page-heading h1 {
    font-size: 1.45rem;
    font-weight: 650;
}

.assessment-submission-detail-page .detail-card-heading h2 {
    font-size: 0.84rem;
    font-weight: 650;
}

.assessment-submission-context-card .admin-summary-list dt {
    font-size: 0.66rem;
    font-weight: 600;
}

.assessment-submission-context-card .admin-summary-list dd,
.assessment-submission-context-card .table-link {
    color: #344054;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
}

.assessment-submission-beluga-card .detail-card-heading p {
    margin: 6px 0 0;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.4;
}

.assessment-submission-beluga-card .beluga-master-id-block {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid #d6e4d9;
    border-radius: 8px;
    background: #f6fbf7;
}

.assessment-submission-beluga-card .beluga-master-id-block > span {
    color: #344054;
    font-size: 0.66rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.assessment-submission-beluga-card .beluga-master-id-value code {
    font-size: 0.95rem;
    font-weight: 650;
}

.assessment-submission-beluga-card .beluga-visit-result {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
}

.assessment-submission-beluga-card .beluga-visit-result.is-success {
    border: 1px solid #b7d7bf;
    background: #f6fbf7;
}

.assessment-submission-beluga-card .beluga-visit-result.is-error {
    border: 1px solid #f1b8b5;
    background: #fff7f6;
    color: #8f1f17;
}

.assessment-submission-beluga-card .beluga-visit-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.assessment-submission-beluga-card .beluga-visit-result-grid dd {
    color: #344054;
    font-size: 0.8rem;
    font-weight: 400;
}

.assessment-submission-beluga-card .beluga-visit-error-detail {
    margin: 0;
    color: #8f1f17;
    font-size: 0.8rem;
    line-height: 1.4;
}

.assessment-submission-beluga-card .beluga-visit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assessment-submission-beluga-card .pharmacy-order-blockers p {
    margin: 8px 0 0;
}

.assessment-submission-beluga-card .pharmacy-order-blockers .button {
    margin-top: 10px;
}

@media (max-width: 1020px) {
    .fulfillment-workspace-layout {
        grid-template-columns: 1fr;
    }

    .fulfillment-status-rail {
        position: static;
        max-height: none;
        border-top: 1px solid #dfe3e8;
        padding: 14px;
    }
}

.pharmacy-tracking-band {
    display: grid;
    gap: 14px;
    border-block: 1px solid #e4e7ec;
    padding-block: 14px;
}

.pharmacy-lifecycle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pharmacy-lifecycle li {
    display: grid;
    gap: 2px;
}

.pharmacy-lifecycle span,
.pharmacy-event-list h3,
.pharmacy-attempt-list h3 {
    color: #344054;
    font-size: 0.7rem;
    font-weight: 600;
}

.pharmacy-lifecycle time,
.pharmacy-event-list time {
    color: #667085;
    font-size: 0.7rem;
}

.pharmacy-event-list,
.pharmacy-attempt-list {
    display: grid;
    gap: 7px;
}

.pharmacy-event-list h3,
.pharmacy-attempt-list h3 {
    margin: 0;
}

.pharmacy-event-list > div,
.pharmacy-attempt-list > div {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 0.72rem;
}

.pharmacy-event-list small {
    grid-column: 2 / -1;
    color: #b42318;
}

.pharmacy-order-blockers {
    border: 1px solid #f1b8b5;
    border-radius: 8px;
    background: #fff7f6;
    color: #8f1f17;
    padding: 12px;
}

.pharmacy-order-blockers ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.pharmacy-order-blockers li + li {
    margin-top: 4px;
}

.pharmacy-provider-validation {
    border-color: #e5a8a3;
    background: #fff3f2;
}

.pharmacy-product-setup-blocker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.pharmacy-product-setup-blocker > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.pharmacy-product-setup-blocker small,
.pharmacy-setup-admin-note {
    color: #7a271a;
    font-size: 0.72rem;
    font-weight: 700;
}

.pharmacy-product-setup-blocker .button {
    width: auto;
    flex: 0 0 auto;
}

.pharmacy-routing-field small {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 650;
}

.pharmacy-routing-field.has-error input {
    border-color: #d92d20;
    background: #fff7f6;
}

.pharmacy-routing-field.has-error small {
    color: #b42318;
}

.pharmacy-sig-validation {
    display: grid;
    gap: 7px;
    border-top: 1px solid #edf0f3;
    padding-top: 9px;
}

.pharmacy-sig-validation > strong {
    color: #475467;
    font-size: 0.72rem;
}

.pharmacy-sig-validation ul {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
}

.pharmacy-sig-validation li {
    position: relative;
    display: grid;
    min-width: 0;
    gap: 1px;
    padding-left: 16px;
}

.pharmacy-sig-validation li::before {
    position: absolute;
    top: 4px;
    left: 1px;
    width: 8px;
    height: 8px;
    border: 1px solid currentColor;
    border-radius: 999px;
    content: "";
}

.pharmacy-sig-validation li.is-valid {
    color: #315c2e;
}

.pharmacy-sig-validation li.is-valid::before {
    background: #6a8360;
    box-shadow: inset 0 0 0 2px #ffffff;
}

.pharmacy-sig-validation li.is-invalid {
    color: #b42318;
}

.pharmacy-sig-validation li > span {
    font-size: 0.72rem;
    font-weight: 800;
}

.pharmacy-sig-validation li > small {
    overflow-wrap: anywhere;
    color: inherit;
    font-size: 0.68rem;
    font-weight: 600;
}

@media (max-width: 720px) {
    .pharmacy-product-setup-blocker {
        align-items: stretch;
        flex-direction: column;
    }

    .pharmacy-product-setup-blocker .button {
        justify-content: center;
    }

    .pharmacy-sig-validation ul {
        grid-template-columns: minmax(0, 1fr);
    }
}

[data-pharmacy-order-pdf-label] {
    display: block;
    margin-top: 0;
    color: #667085;
    font-size: 0.74rem;
    line-height: 1.35;
}

.admin-check-row {
    flex-wrap: wrap;
    gap: 12px;
}

.admin-check-row label,
.admin-inline-check,
.product-assignment label {
    gap: 7px;
    color: #555960;
    font-size: 0.78rem;
    font-weight: 700;
}

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

.media-label {
    margin: 0 0 8px;
}

.media-tile,
.upload-tile {
    display: flex;
    aspect-ratio: 1.24;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #f6f6f7;
}

.media-tile img {
    max-width: 78%;
    max-height: 86%;
    object-fit: contain;
}

.upload-tile {
    flex-direction: column;
    gap: 14px;
    border-style: dashed;
    color: #242528;
    font-size: 0.82rem;
    text-align: center;
}

.admin-stat-list {
    margin: 0;
    padding: 0 16px 16px;
}

.admin-stat-list div {
    display: flex;
    justify-content: space-between;
    color: #60636a;
    font-size: 0.78rem;
}

.admin-stat-list dd,
.admin-stat-list dt {
    margin: 0;
}

.admin-section-tabs {
    gap: 12px;
    border-bottom: 1px solid #dedfe3;
}

.admin-section-tabs button {
    min-height: 32px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #666a71;
    font-size: 0.8rem;
    padding: 0 8px;
}

.admin-section-tabs button.is-active {
    border-bottom-color: #2f76ff;
    color: #242528;
}

.formulary-upload-card {
    margin: 16px 0 20px;
}

.formulary-dose-note,
.create-from-formulary-field small {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.formulary-upload-errors {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #f1c5c5;
    border-radius: 8px;
    background: #fff6f6;
    color: var(--danger);
}

.formulary-upload-errors ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.create-from-formulary-field {
    margin-bottom: 16px;
}

.small-command {
    min-height: 32px;
    gap: 6px;
    border: 1px solid #d7d9de;
    border-radius: 8px;
    background: #ffffff;
    color: #242528;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0 12px;
}

.small-command:hover,
.small-command:focus-visible {
    border-color: #aeb4bf;
    outline: none;
}

.small-command .admin-icon {
    width: 16px;
    height: 16px;
}

.admin-table-card {
    gap: 10px;
    padding: 12px 0 0;
}

.admin-table-card .detail-card-heading {
    padding: 0 12px;
}

.admin-table-toolbar,
.admin-filter-row,
.admin-table-footer {
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
}

.admin-table-search {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 8px;
    color: #6f737b;
}

.admin-table-search input {
    width: 100%;
    border: 0;
    background: transparent;
}

.admin-table-search input::placeholder {
    color: #b3b6bc;
}

.admin-table-tools {
    display: flex;
    gap: 6px;
}

.admin-filter-row {
    justify-content: flex-start;
}

.admin-filter-row .small-command {
    margin-left: auto;
}

.filter-chip {
    min-height: 26px;
    border: 1px solid #d7d9de;
    border-radius: 8px;
    background: #ffffff;
    color: #242528;
    font-size: 0.76rem;
    padding: 0 9px;
}

.filter-chip.is-active {
    border-color: #2f76ff;
    background: #f3f7ff;
}

.admin-table-wrap {
    overflow-x: auto;
}

.data-table-shell {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
}

.assessments-table-shell {
    overflow: visible;
}

.data-table th.assessment-actions-cell,
.data-table td.assessment-actions-cell {
    width: 46px;
    padding-inline: 8px;
}

.assessment-row-menu {
    position: relative;
    display: inline-flex;
}

.assessment-row-menu-button {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #667085;
    padding: 0;
}

.assessment-row-menu-button::before {
    content: "";
    display: block;
    width: 4px;
    height: 18px;
    background: radial-gradient(circle, currentColor 1.5px, transparent 1.7px) center top / 4px 6px repeat-y;
}

.assessment-row-menu-button:hover,
.assessment-row-menu-button:focus-visible,
.assessment-row-menu.is-open .assessment-row-menu-button {
    border-color: #d0d5dd;
    background: #f2f4f7;
    color: #344054;
    outline: none;
}

.assessment-row-menu-popover {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 40;
    display: none;
    width: 128px;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.16);
    padding: 5px;
}

.assessment-row-menu.is-open .assessment-row-menu-popover {
    display: grid;
}

.assessment-row-menu-popover button {
    min-height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #344054;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0 9px;
    text-align: left;
}

.assessment-row-menu-popover button:hover,
.assessment-row-menu-popover button:focus-visible {
    background: #f2f4f7;
    outline: none;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #1f2937;
    font-size: 0.86rem;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid #eef0f3;
    padding: 14px 18px;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    background: #fbfcfd;
    color: #667085;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.data-table tbody tr {
    transition: background 140ms ease;
}

.data-table tbody tr:hover {
    background: #f9fbfd;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table-footer {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #eef0f3;
    color: #667085;
    font-size: 0.82rem;
    padding: 8px 12px;
}

.data-table-footer div {
    display: flex;
    gap: 6px;
}

.data-table-page-button {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #ffffff;
    color: #344054;
    font-size: 1rem;
}

.data-table-page-button:hover,
.data-table-page-button:focus-visible {
    background: #f2f4f7;
    outline: none;
}

.data-table-page-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.data-table [data-align="center"] {
    text-align: center;
}

.data-table [data-align="right"] {
    text-align: right;
}

.data-table-empty {
    height: 168px;
    color: #667085;
    text-align: center !important;
}

.data-table-empty strong,
.data-table-empty span {
    display: block;
}

.data-table-empty strong {
    color: #344054;
    font-size: 0.95rem;
    font-weight: 700;
}

.data-table-empty span {
    margin-top: 4px;
    font-size: 0.84rem;
}

.data-table-empty-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.button-plus {
    position: relative;
    display: block;
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
}

.button-plus::before,
.button-plus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.button-plus::before {
    width: 11px;
    height: 1.5px;
}

.button-plus::after {
    width: 1.5px;
    height: 11px;
}

.admin-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.admin-data-table th,
.admin-data-table td {
    border-top: 1px solid #dedfe3;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

.admin-data-table th {
    color: #6c7077;
    font-weight: 900;
}

.admin-data-table tbody tr {
    background: #ffffff;
}

.admin-data-table tbody tr:nth-child(even) {
    background: #f4f4f5;
}

.admin-data-table tbody tr.is-selected {
    box-shadow: inset 3px 0 0 #2f76ff;
}

.table-link {
    border: 0;
    background: transparent;
    color: #112337;
    font-weight: 700;
    padding: 0;
    text-decoration: none;
}

.table-link:hover,
.table-link:focus-visible {
    color: #1e4c78;
    text-decoration: underline;
    outline: none;
}

.status-badge {
    display: inline-flex;
    min-height: 22px;
    max-width: 100%;
    align-items: center;
    border-radius: 6px;
    background: #eef2f6;
    color: #475467;
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1.15;
    padding: 0 7px;
    white-space: nowrap;
}

.status-stack {
    display: inline-grid;
    min-width: 0;
    align-items: start;
    gap: 4px;
    justify-items: start;
}

.status-stack small {
    max-width: 150px;
    overflow: hidden;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge-active,
.status-badge-published,
.status-badge-fulfilled,
.status-badge-purchased,
.status-badge-succeeded,
.status-badge-ready,
.status-badge-submitted {
    background: #dff6e7;
    color: #166534;
}

.status-badge-filled,
.status-badge-delivered {
    background: #dff6e7;
    color: #166534;
}

.status-badge-draft,
.status-badge-created,
.status-badge-purchase_pending {
    background: #f2f4f7;
    color: #475467;
}

.status-badge-sent_to_provider,
.status-badge-sent_to_pharmacy,
.status-badge-payment_action_required {
    background: #e8f1ff;
    color: #175cd3;
}

.status-badge-pending_confirmation,
.status-badge-processing,
.status-badge-shipped,
.status-badge-void_pending {
    background: #e8f1ff;
    color: #175cd3;
}

.status-badge-on_hold {
    background: #fff4d6;
    color: #8a4b08;
}

.status-badge-paused,
.status-badge-ending {
    background: #fff4d6;
    color: #8a4b08;
}

.treatment-subscription-detail-page .admin-page-actions {
    max-width: 760px;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.subscription-management-note {
    display: grid;
    gap: 3px;
    border-top: 1px solid #d8dde5;
    border-bottom: 1px solid #d8dde5;
    padding: 14px 0;
}

.subscription-management-note span,
.subscription-management-note small {
    color: #667085;
}

.subscription-management-note small {
    font-size: 0.75rem;
}

.subscription-cycle-section {
    padding-top: 12px;
}

@media (max-width: 720px) {
    .treatment-subscription-detail-page .admin-page-actions,
    .treatment-subscription-detail-page .admin-page-actions .button {
        width: 100%;
    }
}

.status-badge-archived,
.status-badge-cancelled,
.status-badge-payment_failed,
.status-badge-submit_failed {
    background: #fff1f0;
    color: #b42318;
}

.status-badge-failed,
.status-badge-voided {
    background: #fff1f0;
    color: #b42318;
}

@media (max-width: 720px) {
    .pharmacy-fulfillment-actions {
        justify-content: flex-start;
    }

    .pharmacy-event-list > div,
    .pharmacy-attempt-list > div {
        grid-template-columns: 1fr;
    }

    .pharmacy-event-list small {
        grid-column: auto;
    }
}

.admin-table-footer {
    border-top: 1px solid #dedfe3;
    color: #242528;
    font-size: 0.75rem;
    padding: 8px 12px 10px;
}

.mini-select {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 4px;
    border: 1px solid #d7d9de;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.75rem;
    padding: 0 8px;
}

.variant-editor {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.variant-editor .admin-inline-check {
    align-self: end;
    min-height: 34px;
}

.metadata-grid {
    padding: 0 16px 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.timeline-panel {
    display: grid;
    gap: 12px;
    padding: 16px 0 0;
}

.timeline-panel p {
    margin: 0;
    color: #5b5f66;
    font-size: 0.78rem;
}

.product-assignment {
    display: grid;
    gap: 10px;
    margin: 0;
    border: 0;
    padding: 0;
}

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

.flow-node {
    display: grid;
    gap: 5px;
    min-height: 92px;
    align-content: center;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #f8f9fb;
    padding: 12px;
}

.flow-node span {
    color: #2f76ff;
    font-size: 0.7rem;
    font-weight: 900;
}

.flow-node strong {
    color: #242528;
    font-size: 0.86rem;
}

.flow-node em {
    color: #686c74;
    font-size: 0.72rem;
    font-style: normal;
    text-transform: capitalize;
}

.validation-empty,
.validation-panel {
    border-top: 1px solid #dedfe3;
    color: #666a71;
    font-size: 0.8rem;
    padding: 14px 16px 16px;
}

.validation-panel {
    border-radius: 0;
    font-weight: 800;
}

.validation-panel ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.validation-panel.is-valid {
    background: #f0fbf3;
    color: #275733;
}

.validation-panel.is-invalid {
    background: #fff7f6;
    color: var(--danger);
}

.settings-grid {
    display: grid;
    align-items: start;
    gap: 16px;
    grid-template-columns: 360px minmax(0, 1fr);
}

.settings-panel h2,
.admin-description-block h2,
.admin-future-block h2 {
    margin: 0;
    color: #242528;
    font-size: 0.95rem;
    font-weight: 850;
}

.settings-panel p,
.admin-future-block p,
.admin-description-block p {
    margin: 0;
    color: #62666d;
    font-size: 0.84rem;
    line-height: 1.5;
}

.settings-list {
    display: grid;
    gap: 8px;
    padding-top: 4px;
}

.settings-list-row {
    display: grid;
    gap: 3px;
    border: 1px solid #edf0f3;
    border-radius: 8px;
    background: #fbfcfd;
    padding: 10px;
}

.settings-list-row strong {
    color: #242528;
    font-size: 0.84rem;
}

.settings-list-row span {
    color: #6a6e75;
    font-size: 0.78rem;
}

.admin-readonly-card {
    max-width: 920px;
}

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

.admin-readonly-grid div {
    border: 1px solid #edf0f3;
    border-radius: 8px;
    background: #fbfcfd;
    padding: 10px;
}

.admin-readonly-grid dt {
    color: #6a6e75;
    font-size: 0.72rem;
    font-weight: 800;
}

.admin-readonly-grid dd {
    margin: 4px 0 0;
    color: #242528;
    font-size: 0.86rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.admin-description-block,
.admin-future-block {
    display: grid;
    gap: 8px;
    border-top: 1px solid #edf0f3;
    padding-top: 14px;
}

.admin-product-images {
    display: grid;
    gap: 16px;
}

/* Operations product record: one surface, with focused content panels. */
.product-record-page {
    max-width: 1280px;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.product-record-back { justify-self: start; }

.product-record {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.product-record-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 32px 24px;
}

.product-record-image {
    display: grid;
    place-items: center;
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    overflow: hidden;
    color: var(--muted-soft);
}

.product-record-image > img { width: 100%; height: 100%; object-fit: contain; }
.product-record-image .admin-icon { width: 28px; height: 28px; }
.product-record-title { flex: 1; min-width: 0; }
.product-record-title > p { margin: 0 0 6px; font-size: 0.8rem; color: var(--muted); }
.product-record-title h1 { margin: 0 0 10px; font-size: clamp(1.2rem, 2vw, 1.65rem); line-height: 1.3; letter-spacing: -0.025em; color: var(--clinical-blue); }
.product-record-share { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; padding-top: 4px; }
.product-assessment-link { color: var(--clinical-blue); text-decoration: underline; text-underline-offset: 3px; }

.product-record-summary {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1.2fr 1fr;
    gap: 24px;
    margin: 0;
    padding: 0 32px 28px;
}

.product-record-summary > div { min-width: 0; }
.product-record-summary dt { margin-bottom: 7px; font-size: 0.75rem; color: var(--muted); }
.product-record-summary dd { margin: 0; font-size: 0.85rem; font-weight: 550; overflow-wrap: anywhere; }
.product-record-summary .copyable-id { max-width: 100%; font-size: 0.75rem; }

.product-record-tabs {
    display: flex;
    gap: 28px;
    padding: 0 32px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.product-record-tabs button {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 16px 0 14px;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}

.product-record-tabs button[aria-selected="true"] { color: var(--clinical-blue); border-bottom-color: var(--clinical-blue); }
.product-record-tabs button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.product-record-tabs button > span { padding: 2px 6px; border-radius: 4px; background: var(--surface-muted); font-size: 0.7rem; }
.product-record-panel { padding: 28px 32px 32px; }
.product-record-panel[hidden] { display: none; }
.product-record-section-heading { margin-bottom: 20px; }
.product-record-section-heading h2 { margin: 0 0 6px; font-size: 1rem; }
.product-record-section-heading p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

.product-record-panel > .detail-card {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.product-record-panel > .admin-simple-form { max-width: 900px; gap: 18px; }
.product-record-panel .admin-simple-form h2,
.product-record-panel .detail-card-heading h2 { font-size: 1rem; margin-top: 0; }
.product-record-panel .compact-card { background: transparent; padding: 0; border: 0; }
.product-images-drawer .admin-product-images { gap: 20px; }
.product-images-drawer .product-image-carousel-main { min-height: 200px; height: 280px; width: 100%; aspect-ratio: auto; }
.product-images-drawer .product-image-upload-panel { max-width: none; }

.product-pricing-notice {
    margin: 0 0 18px;
    padding: 10px 14px;
    border-left: 3px solid var(--border-strong);
    border-radius: 3px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.product-pricing-table-wrap { overflow-x: auto; }
.product-pricing-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.85rem; }
.product-pricing-table thead th { padding: 12px 16px; background: var(--surface-soft); color: var(--muted); font-size: 0.73rem; font-weight: 600; }
.product-pricing-table tbody th,
.product-pricing-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.product-pricing-table tbody th { font-weight: 600; }
.product-pricing-table tbody tr:last-child > * { border-bottom: 0; }
.product-price-action { text-align: right; }
.product-price-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted); font-size: 0.78rem; }
.product-price-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-soft); }
.product-price-status.is-active::before { background: var(--botanical-green); }
.product-link-unavailable { margin: 0; color: var(--muted); font-size: 0.85rem; }
.product-copy-link { width: fit-content; border: 1px solid var(--border-strong); border-radius: 6px; padding: 8px 12px; background: var(--surface); color: var(--clinical-blue); font: inherit; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.product-copy-link code { font-family: inherit; }
.product-copy-link:disabled { color: var(--muted-soft); border-color: var(--border); cursor: not-allowed; background: var(--surface-soft); }

@media (max-width: 800px) {
    .product-record-header { padding: 22px; flex-wrap: wrap; gap: 16px; }
    .product-record-share { margin-left: 96px; }
    .product-record-summary { grid-template-columns: 1fr 1fr; padding: 0 22px 22px; gap: 20px; }
    .product-record-tabs { padding: 0 22px; gap: 20px; overflow-x: auto; }
    .product-record-panel { padding: 22px; }
}

@media (max-width: 540px) {
    .product-record-header { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: start; }
    .product-record-image { width: 56px; height: 56px; flex-basis: 56px; }
    .product-record-share { margin-left: 0; grid-column: 2; }
    .product-record-summary { grid-template-columns: 1fr; gap: 16px; }
    .product-record-tabs { gap: 16px; }
    .product-record-tabs button { font-size: 0.78rem; }
    .product-pricing-table thead { display: none; }
    .product-pricing-table tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--border); }
    .product-pricing-table tbody tr:last-child { border-bottom: 0; }
    .product-pricing-table tbody th,
    .product-pricing-table td { padding: 0; border: 0; }
    .product-pricing-table tbody th { grid-column: 1 / -1; }
    .product-pricing-table td[data-label="Billing"] { grid-column: 1 / -1; }
    .product-pricing-table .product-price-action { align-self: center; }
}

.product-detail-layout {
    display: grid;
    align-items: start;
    gap: 18px;
    grid-template-columns: minmax(520px, 720px) minmax(320px, 460px);
}

.product-detail-layout > .admin-product-images {
    position: sticky;
    top: 88px;
}

.product-setup-form {
    max-width: 1120px;
    margin-top: 18px;
}

.product-setup-form .site-status-banner {
    margin: 0;
}

.product-setup-form .configuration-options {
    padding: 18px;
}

.product-setup-form .configuration-options > div {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px 24px;
    align-items: start;
}

.product-setup-form .configuration-options label.field {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
    font-size: inherit;
}

.product-setup-form input[readonly] {
    background: #f8fafc;
    color: #475467;
}

.product-setup-check {
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding-top: 20px;
}

.product-billing-options > .product-billing-grid {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    align-items: start;
}

.product-billing-option {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid #edf0f3;
    border-radius: 6px;
    background: #ffffff;
}

.product-billing-option.is-disabled {
    background: #f8fafc;
    padding-bottom: 10px;
}

.product-billing-option-fields {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.product-billing-option-fields[hidden] {
    display: none;
}

.billing-price-grid,
.billing-supply-compact-grid,
.billing-supply-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.billing-supply-config {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.billing-supply-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.billing-supply-heading > div {
    display: grid;
    gap: 2px;
}

.billing-supply-heading span {
    color: var(--muted);
    font-size: 0.8rem;
}

.billing-supply-heading .button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 10px;
}

.billing-supply-config > summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 800;
}

.billing-supply-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

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

.billing-supply-advanced {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    background: #fbfcfd;
}

.billing-supply-advanced > summary {
    cursor: pointer;
    font-weight: 700;
}

.billing-supply-advanced .billing-supply-grid {
    margin-top: 10px;
}

.billing-certification-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 10px;
}

.billing-certification-row .admin-inline-check {
    padding: 0;
    min-height: 30px;
}

.supply-summary {
    border-left: 3px solid #6a8360;
    padding-left: 10px;
}

@media (max-width: 720px) {
    .product-billing-options > .product-billing-grid,
    .billing-price-grid,
    .billing-supply-compact-grid,
    .billing-supply-grid {
        grid-template-columns: 1fr;
    }

    .billing-supply-heading {
        display: grid;
    }
}

.product-billing-option .product-setup-check {
    min-height: 0;
    padding-top: 0;
}

.product-billing-option .field {
    display: grid;
}

.product-billing-option .payments-secret-status {
    min-width: 0;
}

.product-billing-option .payments-secret-status .copyable-stripe-price {
    min-width: 0;
    flex: 1 1 auto;
}

.product-billing-option .payments-secret-status span:last-child {
    overflow-wrap: anywhere;
}

.product-stripe-fields {
    margin: 0;
}

.product-stripe-fields > .product-stripe-id-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px 24px;
}

.product-diagnostic-field {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.product-diagnostic-value {
    display: block;
    min-height: 34px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #f8fafc;
    color: #344054;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.8rem;
    line-height: 1.35;
    padding: 8px 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-diagnostic-value.is-empty {
    color: #98a2b3;
    font-family: inherit;
    font-style: italic;
    font-weight: 650;
}

.product-field-label,
.product-section-label {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: #34363a;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.2;
}

.product-section-label {
    color: inherit;
    font-size: inherit;
}

.product-setup-form .configuration-options label .product-field-label > span,
.product-setup-form .configuration-options legend .product-section-label > span {
    overflow-wrap: normal;
}

.field-help-button {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd2dc;
    border-radius: 999px;
    background: #ffffff;
    color: #475467;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.field-help-button:hover,
.field-help-button:focus-visible {
    border-color: #667085;
    background: #f2f4f7;
    color: #242528;
    outline: none;
}

.data-table th .product-section-label {
    font-size: 0.72rem;
}

.product-help-drawer {
    display: grid;
    gap: 16px;
}

.product-help-drawer h3,
.product-help-drawer p {
    margin: 0;
}

.product-help-drawer h3 {
    color: #242528;
    font-size: 0.88rem;
    font-weight: 900;
}

.product-help-drawer p {
    color: #344054;
    font-size: 0.9rem;
    line-height: 1.5;
}

.product-help-drawer dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.product-help-drawer dt {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.product-help-drawer dd {
    margin: 3px 0 0;
    color: #242528;
    font-size: 0.86rem;
    line-height: 1.45;
}

.patient-detail-page {
    max-width: 1260px;
}

.patient-detail-page .admin-page-heading h1 {
    font-size: 1.45rem;
    font-weight: 650;
}

.patient-detail-page .patient-heading-subtitle {
    font-weight: 400;
}

.patient-detail-page .detail-card-heading h2,
.patient-detail-page .payment-reference-block h3 {
    font-size: 0.84rem;
    font-weight: 650;
}

.patient-detail-page .detail-card-heading p {
    font-size: 0.8rem;
    font-weight: 400;
}

.patient-detail-page .admin-summary-list dt,
.patient-detail-page .patient-vitals-list dt,
.patient-detail-page .payment-reference-grid dt {
    font-size: 0.66rem;
    font-weight: 600;
}

.patient-detail-page .admin-summary-list dd,
.patient-detail-page .patient-vitals-list dd,
.patient-detail-page .payment-reference-grid dd {
    color: #344054;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
}

.patient-detail-page .patient-photo-id-summary strong,
.patient-detail-page .patient-photo-id-summary small,
.patient-detail-page .table-link,
.patient-detail-page .table-primary-stack strong,
.patient-detail-page .table-primary-stack small,
.patient-detail-page .payment-method-brand {
    font-weight: 500;
}

.patient-detail-page .admin-data-table th {
    font-weight: 650;
}

.patient-detail-page .button {
    font-weight: 600;
}

.patient-page-heading {
    align-items: flex-end;
}

.patient-heading-subtitle {
    color: #667085;
    font-size: 0.9rem;
}

.patient-detail-layout {
    display: grid;
    align-items: start;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

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

.patient-photo-id-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.patient-photo-id-summary > span {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.patient-photo-id-summary strong,
.patient-photo-id-summary small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-photo-id-summary small,
.patient-photo-id-empty {
    color: #667085;
}

.patient-photo-id-summary .button {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 9px;
}

.patient-record-grid,
.patient-vitals-list {
    display: grid;
    gap: 12px;
}

.patient-record-grid dd,
.patient-vitals-list dd {
    overflow-wrap: anywhere;
}

.order-context-card .patient-record-grid dd {
    color: #344054;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
}

.order-context-card .patient-record-grid .table-primary-stack strong,
.order-context-card .patient-record-grid .table-primary-stack small,
.order-context-card .patient-record-grid .table-link {
    font-weight: 500;
}

.order-context-card .payment-method-brand {
    color: #242528;
    font-weight: 750;
}

.payment-reference-block {
    display: grid;
    gap: 10px;
    min-width: 0;
    border-top: 1px solid #eef0f3;
    padding-top: 14px;
}

.payment-reference-block:first-child {
    border-top: 0;
    padding-top: 0;
}

.payment-reference-block h3,
.payment-reference-block p {
    margin: 0;
}

.payment-reference-block h3 {
    color: #34363a;
    font-size: 0.8rem;
    font-weight: 800;
}

.payment-reference-grid {
    display: grid;
    gap: 12px 18px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin: 0;
}

.payment-reference-grid div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.payment-reference-grid dt {
    color: #667085;
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.payment-reference-grid dd {
    min-width: 0;
    margin: 0;
    color: #344054;
    font-size: 0.78rem;
    font-weight: 500;
}

.copyable-stripe-reference {
    color: #667085;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.3;
}

.managed-id-field {
    display: flex;
    min-height: 34px;
    min-width: 0;
    align-items: center;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #f8fafc;
    padding: 0 6px;
}

.managed-id-field .copyable-value {
    width: 100%;
}

.managed-id-field .copyable-value code {
    flex: 1 1 auto;
}

.managed-id-field .copyable-value-feedback {
    position: static;
    max-width: 0;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 0;
    background: transparent;
    color: #315c2e;
    opacity: 0;
    padding: 0;
    transform: none;
    transition: max-width 110ms ease, opacity 110ms ease, margin-left 110ms ease;
}

.managed-id-field .copyable-value.is-copied .copyable-value-feedback {
    max-width: 72px;
    margin-left: 7px;
    opacity: 1;
    transform: none;
}

.managed-id-field .copyable-value.is-copy-error .copyable-value-feedback {
    background: transparent;
    color: #b42318;
}

.pharmacy-terminal-guidance {
    max-width: 440px;
    margin: 0;
    color: #697386;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.35;
}

.patient-address-block {
    display: grid;
    gap: 2px;
}

.patient-vitals-card {
    position: sticky;
    top: 88px;
}

.patient-vitals-list {
    margin: 0;
}

.patient-vitals-list div {
    display: grid;
    gap: 4px;
    border-top: 1px solid #eef0f3;
    padding-top: 12px;
}

.patient-vitals-list div:first-child {
    border-top: 0;
    padding-top: 0;
}

.patient-vitals-list dt {
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.patient-vitals-list dd {
    margin: 0;
    color: #242528;
    font-size: 1rem;
    font-weight: 850;
}

.patient-related-card {
    gap: 16px;
}

.data-table td.patient-related-table-cell {
    vertical-align: top;
}

.patient-edit-form {
    gap: 16px;
}

.patient-edit-section {
    display: grid;
    gap: 14px;
    border: 1px solid #e3e7ec;
    border-radius: 12px;
    background: #ffffff;
    padding: 18px;
}

.patient-edit-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.patient-edit-section-heading h3,
.patient-edit-section-heading p {
    margin: 0;
}

.patient-edit-section-heading h3 {
    color: #20262e;
    font-size: 0.96rem;
}

.patient-edit-section-heading p {
    margin-top: 4px;
    color: #667085;
    font-size: 0.78rem;
}

.patient-edit-section-fields {
    display: grid;
    gap: 12px;
}

.drawer-body .patient-edit-form .admin-field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.patient-photo-id-dropzone {
    min-height: 126px;
    background: #f9fafb;
}

.patient-edit-photo-id-view {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 11px;
}

@media (max-width: 760px) {
    .patient-edit-section {
        padding: 14px;
    }

    .patient-edit-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .drawer-body .patient-edit-form .admin-field-row {
        grid-template-columns: 1fr;
    }
}

.assessment-builder-card {
    min-width: 0;
}

.assessment-builder-card textarea {
    min-height: 150px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
}

.assessment-builder-page {
    display: grid;
    min-height: calc(100vh - 70px);
    gap: 12px;
}

.assessment-metadata-card {
    gap: 10px;
    max-width: none;
    padding: 14px;
}

.assessment-metadata-card h2 {
    margin: 0;
}

.assessment-metadata-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 120px);
    margin: 0;
}

.assessment-metadata-summary div {
    display: grid;
    gap: 2px;
    border: 1px solid #edf0f3;
    border-radius: 8px;
    background: #fbfcfd;
    padding: 8px 10px;
}

.assessment-metadata-summary dt {
    color: #697386;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.assessment-metadata-summary dd {
    margin: 0;
    color: #242528;
    font-size: 0.94rem;
    font-weight: 850;
}

.assessment-metadata-form {
    display: grid;
    gap: 10px;
}

.assessment-metadata-grid {
    display: grid;
    align-items: end;
    gap: 10px;
    grid-template-columns: minmax(170px, 0.9fr) minmax(240px, 1.2fr) 150px minmax(280px, 1fr);
}

.assessment-metadata-actions {
    margin-top: 0;
}

.assessment-live-warning {
    margin: 0;
    border: 1px solid #ead6a5;
    border-radius: 8px;
    background: #fff8e6;
    color: #6d4f00;
    font-size: 0.88rem;
    font-weight: 760;
    padding: 10px 12px;
}

.assessment-product-link-card {
    display: grid;
    gap: 8px;
}

.assessment-product-link-control {
    display: grid;
    align-items: end;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.form-hint {
    margin: 0;
    color: #697386;
    font-size: 0.82rem;
}

body.is-assessment-builder-fullscreen {
    overflow: hidden;
}

body.is-operations-chat-route {
    height: 100vh;
    overflow: hidden;
}

.admin-content.is-chat-content {
    display: grid;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.assessment-flow-builder {
    display: grid;
    height: 720px;
    min-height: 720px;
    overflow: hidden;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #ffffff;
    grid-template-columns: 280px minmax(0, 1fr);
}

.assessment-flow-builder.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 850;
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
}

.assessment-flow-builder.is-draft {
    border-color: #ead6a5;
}

.assessment-flow-builder.is-draft .assessment-builder-toolbar {
    background: #fffdf7;
}

.assessment-builder-sidebar {
    display: grid;
    height: 100%;
    min-width: 0;
    min-height: 0;
    gap: 14px;
    border-right: 1px solid #e5e7eb;
    background: #fbfbfc;
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: 14px;
}

.assessment-flow-builder.is-fullscreen .assessment-builder-sidebar {
    height: 100dvh;
}

.assessment-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dde2e8;
    border-radius: 8px;
    background: #ffffff;
    padding: 8px 10px;
}

.assessment-search img {
    width: 16px;
    height: 16px;
    opacity: 0.72;
}

.assessment-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    font-size: 0.86rem;
    outline: 0;
}

.assessment-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.assessment-filter-tabs button {
    border: 1px solid #d9dee6;
    border-radius: 8px;
    background: #ffffff;
    color: #4f5661;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 6px 9px;
}

.assessment-filter-tabs button.is-active {
    border-color: #6a8360;
    color: #24331f;
}

.assessment-node-list {
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.assessment-flow-builder.is-fullscreen .assessment-node-list {
    min-height: 0;
}

.assessment-node-list-item {
    display: grid;
    gap: 2px;
    min-width: 0;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #242528;
    padding: 7px 8px;
    text-align: left;
}

.assessment-node-list-item:hover,
.assessment-node-list-item:focus-visible {
    background: #eef1ed;
    outline: none;
}

.assessment-node-list-item strong {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assessment-node-list-item strong > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assessment-node-list-item .assessment-validation-tooltip {
    bottom: auto;
    left: auto;
    right: 0;
    top: calc(100% + 6px);
    transform: none;
}

.assessment-node-list-item span {
    min-width: 0;
    overflow: hidden;
    color: #707782;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assessment-node-list-item .assessment-validation-tooltip span {
    color: inherit;
    font-size: inherit;
}

.assessment-builder-workspace {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
}

.assessment-flow-builder.is-fullscreen .assessment-builder-workspace {
    height: 100dvh;
}

.assessment-builder-toolbar {
    display: grid;
    align-items: start;
    gap: 11px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 13px 14px 12px;
}

.assessment-toolbar-title {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.assessment-toolbar-title strong {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #242528;
    font-size: 0.9rem;
    line-height: 1.2;
}

.assessment-toolbar-title span {
    color: #667085;
    font-size: 0.78rem;
}

.assessment-toolbar-title em {
    color: #6d4f00;
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 760;
    line-height: 1.35;
}

.assessment-flow-builder.is-published .assessment-toolbar-title em {
    color: #4f6b46;
}

.assessment-flow-state-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border: 1px solid #d9dee6;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.assessment-flow-state-badge.is-draft {
    border-color: #ead6a5;
    background: #fff8e6;
    color: #6d4f00;
}

.assessment-flow-state-badge.is-published {
    border-color: #bfe3c7;
    background: #edf9ef;
    color: #2f6a3a;
}

.assessment-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 10px;
    min-width: 0;
    border-top: 1px solid #edf0f3;
    padding-top: 10px;
}

.assessment-toolbar-group {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #fbfcfd;
    padding: 4px;
}

.assessment-toolbar-primary-group {
    margin-left: auto;
    border-color: #d8e2ef;
    background: #f8fafc;
}

.assessment-toolbar-group .button {
    min-height: 34px;
    border-radius: 7px;
}

.assessment-template-menu {
    position: relative;
    display: inline-flex;
}

.assessment-template-menu-button .flow-icon {
    width: 14px;
    height: 14px;
}

.assessment-template-menu-list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    display: none;
    min-width: 150px;
    overflow: hidden;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(17, 35, 55, 0.14);
    padding: 4px;
}

.assessment-template-menu.is-open .assessment-template-menu-list {
    display: grid;
}

.assessment-template-menu-list button {
    width: 100%;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #242528;
    font-size: 0.82rem;
    font-weight: 760;
    padding: 9px 10px;
    text-align: left;
}

.assessment-template-menu-list button:hover,
.assessment-template-menu-list button:focus-visible {
    background: #f2f4f7;
    outline: none;
}

.assessment-template-menu-list button.is-disabled {
    color: #98a2b3;
    cursor: not-allowed;
}

.assessment-template-menu-list button.is-disabled:hover,
.assessment-template-menu-list button.is-disabled:focus-visible {
    background: transparent;
}

.assessment-template-loading-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(17, 24, 39, 0.28);
    padding: 24px;
}

.assessment-template-loading-panel {
    display: grid;
    width: min(360px, 100%);
    justify-items: center;
    gap: 12px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(17, 35, 55, 0.22);
    padding: 26px 24px;
    text-align: center;
}

.assessment-template-loading-panel strong {
    color: #242528;
    font-size: 1rem;
    font-weight: 850;
}

.assessment-template-loading-panel p {
    margin: 0;
    color: #667085;
    font-size: 0.9rem;
    line-height: 1.45;
}

.assessment-system-node {
    display: grid;
    gap: 10px;
    padding: 10px 12px;
}

.assessment-system-node > strong {
    color: #242528;
    font-size: 0.86rem;
    font-weight: 850;
}

.assessment-system-node > span {
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.35;
}

.assessment-system-toggle {
    align-items: flex-start;
    margin: 2px 0;
}

.assessment-toolbar-primary-group .button {
    min-width: 132px;
}

.assessment-icon-button {
    width: 34px;
    min-width: 34px;
    padding: 0;
}

.assessment-toolbar-icon-group .assessment-icon-button {
    flex: 0 0 34px;
}

.assessment-validation-icon {
    position: relative;
    display: inline-grid;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 999px;
    color: #d92d20;
    cursor: help;
}

.assessment-validation-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 8;
    display: none;
    width: max-content;
    max-width: 260px;
    transform: translateX(-50%);
    border: 1px solid #f3b8b2;
    border-radius: 8px;
    background: #fff7f6;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
    color: #7a271a;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    padding: 8px 10px;
    text-align: left;
    white-space: normal;
}

.assessment-validation-tooltip span {
    display: block;
    color: inherit;
    font-size: inherit;
}

.assessment-validation-tooltip span + span {
    margin-top: 5px;
}

.assessment-validation-icon:hover .assessment-validation-tooltip,
.assessment-validation-icon:focus-visible .assessment-validation-tooltip {
    display: block;
}

.assessment-flow-loading {
    display: grid;
    min-height: 420px;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #ffffff;
    color: #667085;
    text-align: center;
}

.assessment-flow-loading strong {
    color: #242528;
    font-size: 0.95rem;
}

.assessment-flow-loading p {
    margin: 0;
    font-size: 0.84rem;
}

.loading-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #dfe3e8;
    border-top-color: #6a8360;
    border-radius: 999px;
    animation: button-spinner-rotate 700ms linear infinite;
}

.assessment-routing-guide {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e5e7eb;
    background: #f7faf5;
    color: #475467;
    font-size: 0.8rem;
    padding: 8px 12px;
}

.assessment-routing-guide.is-connecting {
    background: #eef7e8;
    color: #24331f;
}

.assessment-routing-guide strong {
    color: #24331f;
    white-space: nowrap;
}

.assessment-routing-guide button {
    display: inline-grid;
    width: 24px;
    height: 24px;
    margin-left: auto;
    place-items: center;
    border: 1px solid #bdcbb7;
    border-radius: 999px;
    background: #ffffff;
    color: #344054;
}

.assessment-routing-guide button:hover,
.assessment-routing-guide button:focus-visible {
    border-color: #6a8360;
    outline: none;
}

.assessment-routing-guide button img,
.assessment-routing-guide button .material-symbols-rounded {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

.flow-icon {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.assessment-routing-guide button .flow-icon {
    width: 14px;
    height: 14px;
}

.assessment-canvas-shell {
    position: relative;
    min-height: 0;
    overflow: hidden;
    cursor: grab;
    background-color: #fbfbfc;
    background-image: radial-gradient(#dfe3e8 1px, transparent 1px);
    background-size: 16px 16px;
    overscroll-behavior: contain;
    touch-action: none;
}

.assessment-canvas-shell.is-panning {
    cursor: grabbing;
}

.assessment-canvas-surface {
    position: relative;
    width: 100%;
    height: 100%;
}

.assessment-canvas-zoom-layer {
    position: relative;
    width: 1600px;
    height: 980px;
    transform-origin: 0 0;
}

.assessment-canvas {
    position: absolute;
    inset: 0;
    min-width: 1600px;
    min-height: 980px;
}

.assessment-edge-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 1600px;
    height: 980px;
    overflow: visible;
    pointer-events: none;
}

.assessment-edge-layer path {
    fill: none;
    stroke: #c9ced6;
    stroke-linecap: round;
    stroke-width: 2;
}

.assessment-edge-layer marker path {
    fill: #aeb6c2;
    stroke: none;
}

.assessment-edge-layer .assessment-edge-preview {
    stroke: #4f6b43;
    stroke-dasharray: 8 6;
    stroke-width: 2.5;
}

.assessment-flow-node {
    position: absolute;
    z-index: 2;
    display: grid;
    width: 430px;
    overflow: visible;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
    font-size: 12px;
    transition: box-shadow 140ms ease, border-color 140ms ease;
    cursor: default;
}

.assessment-flow-node * {
    box-sizing: border-box;
}

.assessment-flow-node.is-focused,
.assessment-flow-node.is-dragging {
    border-color: #6a8360;
    box-shadow: 0 10px 30px rgba(106, 131, 96, 0.22);
}

.assessment-flow-node.is-selected {
    border-color: #4f6b43;
    box-shadow: 0 0 0 3px rgba(79, 107, 67, 0.2), 0 10px 28px rgba(17, 24, 39, 0.12);
}

.assessment-flow-node.is-selected .assessment-node-header {
    background: #f1f6ee;
}

.assessment-flow-node.is-selected.is-dragging {
    box-shadow: 0 0 0 4px rgba(79, 107, 67, 0.26), 0 14px 34px rgba(17, 24, 39, 0.16);
}

.assessment-flow-node.is-connection-target {
    border-color: #8fb07c;
    box-shadow: 0 0 0 3px rgba(143, 176, 124, 0.18), 0 8px 24px rgba(17, 24, 39, 0.08);
    cursor: crosshair;
}

.assessment-flow-node.is-connection-target .assessment-input-handle {
    border-color: #8fb07c;
    color: #8fb07c;
}

.assessment-flow-node.is-connection-target::before {
    position: absolute;
    inset: -7px;
    border: 1px dashed #8fb07c;
    border-radius: 12px;
    content: "";
    pointer-events: none;
}

.assessment-flow-node.is-connection-drop-target {
    border-color: #4f6b43;
    box-shadow: 0 0 0 4px rgba(106, 131, 96, 0.22), 0 12px 34px rgba(17, 24, 39, 0.12);
}

.assessment-flow-node.is-connection-drop-target .assessment-input-handle {
    border-color: #4f6b43;
    background: #d7efca;
    color: #4f6b43;
    box-shadow: 0 0 0 4px rgba(106, 131, 96, 0.16);
}

.assessment-flow-node.is-connection-drop-target::before {
    border-style: solid;
    border-color: #4f6b43;
}

.assessment-flow-node.is-connection-source {
    border-color: #6a8360;
    box-shadow: 0 0 0 3px rgba(106, 131, 96, 0.14), 0 8px 24px rgba(17, 24, 39, 0.08);
}

.assessment-input-handle {
    position: absolute;
    top: 50%;
    left: -11px;
    z-index: 3;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    border: 2px solid #c5ccd5;
    border-radius: 999px;
    background: #ffffff;
    color: #aeb6c2;
}

.assessment-input-handle::after {
    position: absolute;
    inset: 4px;
    border-radius: inherit;
    background: currentColor;
    content: "";
    opacity: 0.35;
}

.assessment-node-header,
.assessment-node-config-row,
.assessment-node-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #edf0f3;
    padding: 8px;
}

.assessment-node-header {
    display: grid;
    align-items: center;
    cursor: grab;
    grid-template-columns: minmax(0, 1fr) 18px 26px 26px;
}

.assessment-node-issue-slot {
    display: inline-grid;
    min-width: 18px;
    place-items: center;
}

.assessment-node-header .assessment-question-prompt,
.assessment-answer-row input,
.assessment-answer-row select,
.assessment-node-config-row select,
.assessment-node-route select {
    min-width: 0;
    border: 1px solid #dfe3e8;
    border-radius: 7px;
    background: #ffffff;
    color: #242528;
    font: inherit;
    height: 30px;
    padding: 5px 7px;
    width: 100%;
}

.assessment-node-header .assessment-question-prompt,
.assessment-question-prompt {
    flex: 1;
    height: 32px;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.2;
}

.assessment-node-header button {
    display: inline-flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    justify-self: end;
    border: 0;
    background: transparent;
}

.assessment-node-header .assessment-node-delete-button {
    color: #c4322b;
}

.assessment-node-config-row {
    display: grid;
    color: #555c67;
    font-size: 0.72rem;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    padding: 7px 8px;
}

.assessment-node-config-row label,
.assessment-question-editor label {
    display: grid;
    gap: 4px;
}

.assessment-node-config-row span,
.assessment-question-editor span,
.assessment-node-route label span {
    color: #697386;
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.assessment-question-editor {
    display: none;
}

.assessment-answer-columns {
    display: grid;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #edf0f3;
    color: #697386;
    font-size: 0.58rem;
    font-weight: 900;
    grid-template-columns: 16px minmax(0, 1fr) 48px 76px 96px 58px;
    letter-spacing: 0;
    padding: 7px 10px 0;
    text-transform: uppercase;
}

.assessment-answer-list {
    display: grid;
    gap: 6px;
    padding: 8px;
}

.assessment-complete-node {
    display: grid;
    gap: 4px;
    border: 1px solid #edf0f3;
    border-radius: 7px;
    background: #fbfcfd;
    color: #697386;
    padding: 10px;
}

.assessment-complete-node strong {
    color: #242528;
    font-size: 0.82rem;
}

.assessment-thank-you-node {
    gap: 10px;
}

.assessment-thank-you-node textarea {
    min-height: 92px;
    resize: vertical;
}

.thank-you-complete-step .button {
    justify-self: start;
}

.assessment-consent-node {
    display: grid;
    gap: 8px;
    border: 1px solid #edf0f3;
    border-radius: 7px;
    background: #fbfcfd;
    padding: 10px;
}

.assessment-photo-id-node {
    display: grid;
    gap: 12px;
    padding: 10px;
}

.assessment-photo-id-node textarea {
    min-height: 78px;
    resize: vertical;
}

.assessment-photo-id-node small {
    color: #7a8190;
    font-weight: 500;
}

.assessment-profile-template-node {
    display: grid;
    gap: 8px;
    border: 1px solid #d9e3d4;
    border-radius: 8px;
    background: #f8faf7;
    color: #344054;
    padding: 10px;
}

.assessment-profile-template-node strong {
    color: #24331f;
    font-size: 0.8rem;
}

.assessment-profile-template-node p,
.assessment-profile-template-node small {
    margin: 0;
    color: #667085;
    font-size: 0.72rem;
    line-height: 1.4;
}

.assessment-photo-id-preview .photo-id-upload-dropzone {
    min-height: 108px;
    cursor: default;
    pointer-events: none;
}

.assessment-consent-node textarea {
    min-height: 118px;
    resize: vertical;
}

.assessment-consent-preview {
    font-size: 0.8rem;
    padding: 10px;
}

.assessment-answer-row {
    position: relative;
    display: grid;
    align-items: center;
    gap: 5px;
    border: 1px solid #edf0f3;
    border-radius: 7px;
    background: #fbfcfd;
    grid-template-areas: "grip answer score tags route delete issue handle";
    grid-template-columns: 16px minmax(0, 1fr) 48px 76px 96px 26px 18px 6px;
    padding: 6px;
}

.assessment-answer-row.is-connection-source {
    border-color: #8fb07c;
    background: #f7faf5;
    box-shadow: inset 3px 0 0 #6a8360;
}

.assessment-answer-grip {
    display: grid;
    align-self: center;
    gap: 1px;
    grid-area: grip;
    justify-items: center;
}

.assessment-answer-reorder-button {
    display: inline-grid;
    width: 16px;
    height: 13px;
    place-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #98a2b3;
    padding: 0;
}

.assessment-answer-reorder-button .flow-icon {
    width: 13px;
    height: 13px;
}

.assessment-answer-reorder-button:hover:not(:disabled),
.assessment-answer-reorder-button:focus-visible {
    background: #eef2f6;
    color: #475467;
    outline: none;
}

.assessment-answer-reorder-button:disabled {
    color: #d0d5dd;
    cursor: not-allowed;
}

.assessment-answer-label-field {
    grid-area: answer;
    font-weight: 700;
}

.assessment-answer-score-field {
    grid-area: score;
    text-align: center;
}

.assessment-answer-tags-field {
    grid-area: tags;
}

.assessment-route-field {
    grid-area: route;
    border-color: #dfe3e8;
    background: #ffffff;
    color: #697386;
}

.assessment-route-field.is-connected,
.assessment-node-route select.is-connected {
    border-color: #9bb68c;
    background: #f7faf5;
    color: #24331f;
    font-weight: 800;
}

.assessment-answer-delete-button {
    grid-area: delete;
    justify-self: end;
    width: 26px;
    height: 28px;
    border: 1px solid #ffc9c6;
    border-radius: 8px;
    background: #fff5f4;
    color: #c4322b;
    font-size: 0.9rem;
    font-weight: 900;
}

.assessment-answer-issue-slot {
    display: inline-grid;
    grid-area: issue;
    min-width: 18px;
    place-items: center;
}

.assessment-add-answer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-self: start;
    border: 0;
    background: transparent;
    color: #344054;
    font-weight: 800;
    padding: 2px 10px 10px;
}

.assessment-node-route {
    position: relative;
    padding: 10px;
}

.assessment-node-route label {
    display: grid;
    gap: 5px;
    color: #555c67;
    font-size: 0.76rem;
    font-weight: 800;
}

.assessment-handle {
    position: absolute;
    right: -11px;
    width: 18px;
    height: 18px;
    border: 2px solid #7f8a96;
    border-radius: 999px;
    background: #ffffff;
    cursor: crosshair;
}

.assessment-handle::after {
    position: absolute;
    inset: 4px;
    border-radius: inherit;
    background: currentColor;
    content: "";
    opacity: 0.42;
}

.assessment-handle:hover,
.assessment-handle.is-connected,
.assessment-handle.is-connecting {
    border-color: #4f6b43;
    background: #d7efca;
    box-shadow: 0 0 0 4px rgba(106, 131, 96, 0.16);
    color: #4f6b43;
}

.assessment-handle.is-connected {
    background: #f7faf5;
    box-shadow: none;
}

.assessment-answer-row .assessment-handle,
.assessment-node-route .assessment-handle {
    top: 50%;
    transform: translateY(-50%);
}

.assessment-node-route .assessment-handle {
    top: 50%;
}

.assessment-node-footer {
    justify-content: space-between;
    color: #7b818c;
    font-size: 0.76rem;
}

.assessment-node-footer strong {
    color: #555c67;
}

.assessment-node-footer .copyable-id {
    max-width: 170px;
    padding: 3px 7px;
}

.assessment-node-footer .copyable-id span {
    font-size: 0.62rem;
}

.assessment-node-footer .copyable-id code {
    max-width: 112px;
    font-size: 0.66rem;
}

.assessment-builder-controls {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.12);
    padding: 8px;
}

.assessment-builder-controls button {
    border: 0;
    background: transparent;
    color: #344054;
    font-weight: 900;
}

.assessment-pan-controls {
    display: grid;
    gap: 2px;
    grid-template-areas:
        ". up ."
        "left fit right"
        ". down .";
    grid-template-columns: 28px 28px 28px;
}

.assessment-pan-controls button,
.assessment-zoom-controls button {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.assessment-pan-controls button:hover,
.assessment-zoom-controls button:hover,
.assessment-builder-controls > button:hover {
    background: #eef1ed;
}

.assessment-pan-controls [data-assessment-pan="up"] {
    grid-area: up;
}

.assessment-pan-controls [data-assessment-pan="left"] {
    grid-area: left;
}

.assessment-pan-controls [data-assessment-fit] {
    grid-area: fit;
}

.assessment-pan-controls [data-assessment-pan="right"] {
    grid-area: right;
}

.assessment-pan-controls [data-assessment-pan="down"] {
    grid-area: down;
}

.assessment-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-left: 1px solid #edf0f3;
    border-right: 1px solid #edf0f3;
    padding: 0 10px;
}

.assessment-zoom-reset {
    min-width: 44px;
    width: auto;
    color: #555c67;
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
}

.assessment-builder-controls > button {
    border-radius: 6px;
    padding: 7px 9px;
}

.site-settings-page {
    max-width: 980px;
}

.site-legal-settings {
    display: grid;
    gap: 14px;
    border-top: 1px solid #dedfe3;
    border-bottom: 1px solid #dedfe3;
    padding: 20px 0;
}

.site-legal-settings h2 {
    margin: 0;
}

.site-legal-settings .form-actions {
    justify-content: flex-start;
}

.site-logo-summary {
    display: grid;
    align-items: center;
    gap: 18px;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    grid-template-columns: 220px minmax(0, 1fr);
}

.site-status-banner {
    display: grid;
    gap: 4px;
    border: 1px solid #f2c1bd;
    border-radius: 8px;
    background: #fff7f6;
    color: #7a271a;
    padding: 12px 14px;
}

.site-status-banner strong {
    color: #b42318;
    font-size: 0.86rem;
}

.site-status-banner span {
    font-size: 0.8rem;
}

.site-logo-preview-card {
    display: grid;
    min-height: 116px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #edf0f3;
    border-radius: 8px;
    background: #f7f8f9;
    padding: 16px;
}

.site-logo-preview-card img {
    max-width: 100%;
    max-height: 88px;
    object-fit: contain;
}

.site-logo-summary-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.site-logo-summary-copy h2,
.site-logo-upload-card h2 {
    margin: 0;
    color: #242528;
    font-size: 1rem;
    font-weight: 900;
}

.site-logo-summary-copy p:not(.eyebrow),
.site-logo-upload-card p {
    margin: 0;
    color: #62666d;
    font-size: 0.84rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.site-logo-manager {
    display: grid;
    gap: 14px;
}

.site-logo-upload-card {
    display: grid;
    align-items: stretch;
    gap: 16px;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #ffffff;
    padding: 16px;
    grid-template-columns: 260px minmax(0, 1fr);
}

.site-logo-upload-card > div:first-child {
    grid-column: 1 / -1;
}

.media-dropzone,
.site-logo-dropzone,
.product-image-dropzone {
    position: relative;
    display: grid;
    place-items: center;
    gap: 6px;
    border: 1px dashed #b9c0ca;
    border-radius: 8px;
    background: #fbfcfd;
    color: #5d636c;
    cursor: pointer;
    padding: 18px;
    text-align: center;
}

.media-dropzone:hover,
.media-dropzone:focus-within {
    border-color: #6a8360;
    background: #f3f7f1;
}

.assessment-file-dropzone {
    min-height: 148px;
}

.site-logo-dropzone {
    min-height: 164px;
}

.media-dropzone.is-dragging,
.site-logo-dropzone.is-dragging {
    border-color: #6a8360;
    background: #f3f7f1;
}

.media-dropzone input,
.site-logo-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.media-glyph {
    position: relative;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: #eef1ed;
}

.media-glyph > span {
    position: relative;
    width: 15px;
    height: 15px;
}

.media-glyph-image > span {
    border: 2px solid #6f7a86;
    border-radius: 4px;
}

.media-glyph-image > span::before {
    content: "";
    position: absolute;
    left: 2px;
    bottom: 2px;
    width: 9px;
    height: 7px;
    background: linear-gradient(135deg, transparent 48%, #6a8360 50%);
}

.media-glyph-image > span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 3px;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: #9aa4b0;
}

.media-glyph-upload::before {
    content: "";
    width: 18px;
    height: 18px;
    background: #6f7a86;
    -webkit-mask: url("/static/assets/icons/admin/upload.svg") center / contain no-repeat;
    mask: url("/static/assets/icons/admin/upload.svg") center / contain no-repeat;
}

.media-glyph-upload > span {
    display: none;
}

.media-dropzone strong,
.site-logo-dropzone strong {
    max-width: 100%;
    color: #242528;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.media-dropzone small,
.site-logo-dropzone small {
    color: #747982;
    font-size: 0.75rem;
    font-weight: 700;
}

.site-logo-upload-fields {
    display: grid;
    align-content: start;
    gap: 12px;
}

.site-logo-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.site-logo-tile .product-image-preview {
    aspect-ratio: 2.4;
    background: #fbfcfd;
}

.product-image-staging {
    align-content: start;
}

.product-image-staging .detail-card-heading {
    padding-bottom: 0;
}

.product-image-staging .detail-card-heading p {
    max-width: 420px;
    font-size: 0.84rem;
    line-height: 1.45;
}

.product-image-upload-panel {
    display: grid;
    gap: 10px;
    border-top: 1px solid #edf0f3;
    padding-top: 14px;
}

.product-image-upload-panel .button {
    justify-self: start;
}

.compact-upload-zone {
    min-height: 104px;
}

.product-image-dropzone {
    min-height: 150px;
}

.media-dropzone.is-dragging,
.product-image-dropzone.is-dragging {
    border-color: #6a8360;
    background: #f3f7f1;
}

.media-dropzone strong,
.product-image-dropzone strong {
    color: #242528;
    font-size: 0.9rem;
}

.media-dropzone small,
.product-image-dropzone small {
    color: #747982;
    font-size: 0.75rem;
    font-weight: 700;
}

.product-image-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.product-image-empty-carousel,
.product-image-carousel {
    display: grid;
    gap: 12px;
}

.product-image-carousel-stage {
    display: grid;
    align-items: center;
    gap: 8px;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.product-image-carousel-main {
    position: relative;
    display: grid;
    aspect-ratio: 1.35;
    place-items: center;
    overflow: hidden;
    border: 1px solid #edf0f3;
    border-radius: 8px;
    background: #f7f8fa;
    color: #68707a;
    text-align: center;
}

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

.media-empty-state {
    display: grid;
    gap: 8px;
    place-items: center;
    text-align: center;
}

.product-image-empty-carousel .product-image-carousel-main {
    gap: 8px;
    min-height: 260px;
    padding: 24px;
}

.product-image-empty-carousel strong {
    color: #242528;
    font-size: 0.95rem;
}

.product-image-empty-carousel small {
    color: #69707a;
    font-size: 0.78rem;
    font-weight: 750;
}

.product-carousel-button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #d7dbe1;
    border-radius: 999px;
    background: #ffffff;
    color: #4e5661;
    cursor: pointer;
}

.product-carousel-button:hover,
.product-carousel-button:focus-visible {
    border-color: #9ea6b2;
    color: #14283d;
}

.product-carousel-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.product-image-carousel-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border-radius: 999px;
    background: rgba(20, 40, 61, 0.88);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 850;
    padding: 5px 8px;
}

.product-image-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.product-image-thumb {
    position: relative;
    display: grid;
    width: 58px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 7px;
    background: #f2f3f4;
    color: #68707a;
    cursor: pointer;
}

.product-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-thumb.is-selected {
    border-color: #14283d;
}

.product-image-thumb.is-primary::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #6a8360;
    box-shadow: 0 0 0 2px #ffffff;
}

.product-image-edit-panel {
    display: grid;
    gap: 10px;
    border-top: 1px solid #edf0f3;
    padding-top: 12px;
}

.product-image-tile {
    display: grid;
    gap: 10px;
    border: 1px solid #edf0f3;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}

.product-image-tile.is-primary {
    border-color: #9fb897;
    box-shadow: inset 0 0 0 1px #9fb897;
}

.product-image-preview {
    display: grid;
    aspect-ratio: 1.2;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    background: #f2f3f4;
    color: #757982;
    font-size: 0.78rem;
    font-weight: 750;
}

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

.product-image-meta {
    display: grid;
    gap: 4px;
}

.product-image-meta strong,
.product-image-meta span {
    overflow-wrap: anywhere;
}

.product-image-meta strong {
    color: #242528;
    font-size: 0.84rem;
}

.product-image-meta span {
    color: #6a6e75;
    font-size: 0.75rem;
}

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

.product-image-edit-form {
    display: grid;
    gap: 8px;
}

.empty-state {
    display: grid;
    gap: 4px;
    border: 1px dashed #d7dbe1;
    border-radius: 8px;
    color: #6a6e75;
    padding: 14px;
}

.empty-state strong {
    color: #242528;
    font-size: 0.86rem;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    justify-content: flex-end;
    background: rgba(17, 24, 39, 0);
    opacity: 0;
    pointer-events: none;
    transition: background 160ms ease, opacity 160ms ease;
}

.drawer-backdrop.is-open {
    background: rgba(17, 24, 39, 0.26);
    opacity: 1;
    pointer-events: auto;
}

.drawer-panel {
    display: grid;
    width: var(--drawer-width, 66.6667vw);
    max-width: calc(100vw - 32px);
    min-width: 0;
    max-height: 100vh;
    grid-template-rows: auto minmax(0, 1fr);
    border-left: 1px solid #dfe3e8;
    background: #f7f7f8;
    box-shadow: -24px 0 48px rgba(17, 24, 39, 0.18);
    transform: translateX(100%);
    transition: transform 180ms ease;
}

.drawer-backdrop.is-open .drawer-panel {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #dfe3e8;
    background: #ffffff;
    padding: 18px 18px 16px;
}

.drawer-header > div,
.drawer-body {
    min-width: 0;
}

.drawer-header h2,
.drawer-header p {
    margin: 0;
}

.drawer-header h2 {
    color: #242528;
    font-size: 1.05rem;
}

.drawer-header p {
    margin-top: 3px;
    color: #667085;
    font-size: 0.84rem;
}

.drawer-close {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #ffffff;
    color: #344054;
    font-size: 1.1rem;
}

.drawer-close:hover,
.drawer-close:focus-visible {
    background: #f2f4f7;
    outline: none;
}

.drawer-body {
    overflow: auto;
    padding: 14px;
}

.drawer-body .detail-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.drawer-body .admin-simple-form {
    max-width: none;
}

.drawer-body .admin-simple-form .form-actions {
    margin-top: 14px;
}

.manual-link-panel {
    display: grid;
    gap: 14px;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
}

.manual-link-panel .muted {
    margin: 0;
    color: #475467;
    line-height: 1.5;
}

.manual-link-panel .form-label {
    color: #242528;
    font-size: 0.86rem;
    font-weight: 800;
}

.manual-link-field {
    width: 100%;
    min-height: 160px;
    resize: vertical;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #f8fafc;
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 12px;
}

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

.configuration-form-grid .field-wide,
.configuration-form-grid .configuration-options {
    grid-column: 1 / -1;
}

.configuration-check {
    min-height: 48px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-top: 24px;
}

.configuration-check input[type="checkbox"],
.configuration-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.configuration-options {
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.configuration-options legend {
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
}

.configuration-options > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.configuration-options label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    font-size: 0.875rem;
}

.configuration-options label span {
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .configuration-form-grid,
    .configuration-options > div,
    .product-billing-options > .product-billing-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 761px) and (max-width: 1180px) {
    .product-billing-options > .product-billing-grid {
        grid-template-columns: repeat(2, minmax(170px, 1fr));
    }
}

.drawer-body .admin-field-row {
    grid-template-columns: 1fr;
}

.popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 960;
    display: grid;
    place-items: center;
    background: rgba(17, 24, 39, 0);
    opacity: 0;
    padding: 20px;
    pointer-events: none;
    transition: background 160ms ease, opacity 160ms ease;
}

.popup-backdrop.is-open {
    background: rgba(17, 24, 39, 0.34);
    opacity: 1;
    pointer-events: auto;
}

.popup-panel {
    display: grid;
    width: min(420px, 100%);
    gap: 18px;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 54px rgba(17, 24, 39, 0.22);
    padding: 18px;
    transform: translateY(8px) scale(0.98);
    transition: transform 160ms ease;
}

.popup-panel.popup-panel-wide {
    width: min(620px, 100%);
}

.popup-body {
    min-width: 0;
}

.intervention-billing-popup .popup-header h2 {
    font-weight: 650;
}

.intervention-billing-option-list {
    display: grid;
    gap: 8px;
}

.intervention-billing-popup .patient-consent {
    align-items: start;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 10px;
}

.intervention-billing-popup .patient-consent > span {
    display: grid;
    gap: 2px;
    color: #344054;
    font-size: 0.78rem;
    font-weight: 400;
}

.intervention-billing-popup .patient-consent small {
    color: #667085;
    font-size: 0.7rem;
    font-weight: 400;
}

.billing-option-choice-name {
    font-weight: 600;
}

.popup-backdrop.is-open .popup-panel {
    transform: translateY(0) scale(1);
}

.popup-header {
    display: grid;
    gap: 6px;
}

.popup-header h2,
.popup-header p {
    margin: 0;
}

.popup-header h2 {
    color: #242528;
    font-size: 1rem;
    font-weight: 850;
}

.popup-header p {
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.45;
}

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

.popup-button-secondary {
    border: 1px solid #dfe3e8;
    background: #ffffff;
    color: #344054;
}

.popup-button-secondary:hover,
.popup-button-secondary:focus-visible {
    background: #f2f4f7;
    outline: none;
}

.popup-button-danger {
    border: 1px solid #f1c2c0;
    background: #b42318;
    color: #ffffff;
}

.popup-button-danger:hover,
.popup-button-danger:focus-visible {
    background: #a32017;
    outline: none;
}

.document-viewer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 970;
    display: grid;
    place-items: center;
    background: rgba(17, 24, 39, 0);
    opacity: 0;
    padding: 20px;
    pointer-events: none;
    transition: background 160ms ease, opacity 160ms ease;
}

.document-viewer-backdrop.is-open {
    background: rgba(17, 24, 39, 0.46);
    opacity: 1;
    pointer-events: auto;
}

.document-viewer-panel {
    display: grid;
    width: min(1040px, 100%);
    height: min(760px, calc(100vh - 40px));
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 54px rgba(17, 24, 39, 0.24);
    transform: translateY(8px) scale(0.98);
    transition: transform 160ms ease;
}

.document-viewer-backdrop.is-open .document-viewer-panel {
    transform: translateY(0) scale(1);
}

.document-viewer-header {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #eef0f3;
    padding: 12px 14px;
}

.document-viewer-header h2 {
    min-width: 0;
    overflow: hidden;
    color: #242528;
    font-size: 0.95rem;
    font-weight: 850;
    margin: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-viewer-actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.document-viewer-actions .button {
    min-height: 32px;
    padding: 6px 10px;
}

.document-viewer-close {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #ffffff;
    color: #344054;
}

.document-viewer-close:hover,
.document-viewer-close:focus-visible {
    background: #f2f4f7;
    outline: none;
}

.document-viewer-close .flow-icon {
    width: 18px;
    height: 18px;
}

.document-viewer-body {
    display: grid;
    min-height: 0;
    background: #f8fafc;
}

.document-viewer-status {
    display: grid;
    place-content: center;
    gap: 6px;
    color: #667085;
    font-size: 0.88rem;
    padding: 24px;
    text-align: center;
}

.document-viewer-status strong,
.document-viewer-status span {
    display: block;
}

.document-viewer-status.is-error strong {
    color: #b42318;
}

.document-viewer-body iframe,
.document-viewer-body img {
    width: 100%;
    height: 100%;
    border: 0;
}

.document-viewer-body img {
    object-fit: contain;
    padding: 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.button:disabled,
.small-command:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.toast-rack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1000;
    display: grid;
    width: min(380px, calc(100vw - 32px));
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: grid;
    align-items: center;
    grid-template-columns: 10px minmax(0, 1fr) 28px;
    gap: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.14);
    color: #344054;
    font-size: 0.9rem;
    opacity: 0;
    padding: 12px 10px 12px 14px;
    pointer-events: auto;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast__marker {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #2f76ff;
}

.toast--success .toast__marker {
    background: #16a34a;
}

.toast--error .toast__marker {
    background: #dc2626;
}

.toast--warning .toast__marker {
    background: #d97706;
}

.toast__message {
    min-width: 0;
    font-weight: 650;
}

.toast__close {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #667085;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

.toast__close:hover,
.toast__close:focus-visible {
    background: #f2f4f7;
    color: #344054;
    outline: none;
}

.login-page {
    min-height: 100vh;
    background: #f6f7f9;
    color: #172033;
}

.login-page,
.login-page body {
    overflow: auto;
}

.login-page [data-login-root],
.staff-password-page [data-staff-password-root] {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.login-panel {
    width: min(100%, 420px);
    display: grid;
    gap: 24px;
    padding: 32px;
    border: 1px solid #dedfe3;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.login-brand img {
    width: 104px;
    height: auto;
    display: block;
}

.login-heading {
    display: grid;
    gap: 8px;
}

.login-heading h1 {
    margin: 0;
    color: #10233b;
    font-size: 2rem;
}

.login-hint {
    margin: 0;
    color: #667085;
    font-size: 0.95rem;
    line-height: 1.45;
}

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

.login-message {
    margin: 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
}

.login-message-muted {
    color: #475467;
    background: #f2f4f7;
}

.login-message-success {
    color: #245b3b;
    background: #e7f5ec;
}

.login-message-error {
    color: #b42318;
    background: #fff1f0;
}

.staff-password-page {
    background:
        radial-gradient(circle at top left, rgba(76, 103, 70, 0.11), transparent 34rem),
        linear-gradient(135deg, #f7f9fb 0%, #eef2f6 100%);
}

.staff-password-panel {
    width: min(100%, 520px);
    gap: 20px;
    padding: 36px;
}

.staff-password-panel .login-brand img {
    width: 128px;
}

.staff-password-panel .login-heading h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    line-height: 1.02;
}

.staff-password-panel .login-hint {
    max-width: 32rem;
    font-size: 1.05rem;
}

.staff-password-panel .login-message {
    padding: 12px 14px;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.45;
}

.staff-password-panel .field {
    gap: 8px;
}

.staff-password-panel .field input {
    height: 56px;
}

.staff-password-panel .button {
    min-height: 56px;
}

@media (max-width: 1080px) {
    .catalog-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 420px));
    }

    .admin-console {
        grid-template-columns: 258px minmax(0, 1fr);
    }

    .admin-detail-grid {
        grid-template-columns: 1fr;
    }

    .variant-editor,
    .metadata-grid,
    .admin-two-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-user-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-user-actions-card {
        max-width: 760px;
    }

    .admin-workspace {
        grid-template-columns: 1fr;
    }

    .site-logo-summary,
    .site-logo-upload-card {
        grid-template-columns: 1fr;
    }

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

    .portal-page {
        overflow: auto;
    }

    .portal-shell {
        height: auto;
        min-height: 100vh;
    }

    .portal-grid {
        align-items: start;
        overflow: visible;
        grid-template-columns: 1fr;
    }

    .operations-chat-layout {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .portal-context-card {
        max-height: none;
        overflow: visible;
        order: -1;
    }

    .portal-chat-panel {
        min-height: 640px;
    }

    .onboarding-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .assessment-onboarding-main {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .trust-pane {
        display: none;
    }
}

@media (max-width: 760px) {
    .catalog-shell {
        width: min(100% - 32px, 960px);
        padding-top: 24px;
    }

    .catalog-header {
        gap: 32px;
    }

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

    .catalog-card h2 {
        font-size: 1.16rem;
    }

    .portal-shell {
        width: min(100% - 28px, 1280px);
        padding: 18px 0;
    }

    .portal-header,
    .portal-identity,
    .operations-chat-thread-header,
    .operations-chat-composer {
        display: grid;
        justify-items: stretch;
    }

    .portal-nav {
        width: 100%;
    }

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

    .portal-order-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-order-metadata {
        grid-template-columns: 1fr;
    }

    .portal-account-copy {
        justify-items: start;
    }

    .portal-account-chip,
    .portal-sign-out-button {
        width: 100%;
        max-width: none;
        justify-content: center;
    }

    .portal-account-chip {
        justify-content: flex-start;
    }

    .portal-chat-heading {
        display: grid;
        align-items: start;
    }

    .portal-chat-heading > p {
        max-width: none;
        text-align: left;
    }

    .portal-chat-panel,
    .operations-chat-detail-pane {
        min-height: 0;
    }

    .operations-chat-page {
        height: 100%;
        min-height: 0;
    }

    .operations-chat-layout {
        height: 100%;
        min-height: 0;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(180px, 38vh) minmax(0, 1fr);
        overflow: hidden;
    }

    .operations-chat-list-card {
        height: 100%;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid #dedfe3;
    }

    .operations-chat-detail-pane {
        height: 100%;
    }

    .operations-chat-thread-actions {
        display: grid;
        justify-content: stretch;
    }

    .operations-chat-messages {
        padding: 20px;
    }

    .operations-chat-composer {
        padding: 16px;
    }

    .operations-chat-composer-actions {
        display: flex;
    }

    .portal-chat-composer {
        padding: 16px;
    }

    .portal-chat-composer-actions {
        display: flex;
        align-items: flex-end;
    }

    .chat-message,
    .operations-chat-messages .chat-message {
        width: 100%;
    }

    .portal-chat-message-row,
    .portal-chat-message-row.is-own {
        justify-content: stretch;
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .portal-chat-message-row.is-own .portal-chat-avatar {
        grid-column: 1;
    }

    .portal-chat-message-row.is-own .portal-chat-message-bubble {
        grid-column: 2;
    }

    .operations-chat-message-row,
    .operations-chat-message-row.is-own {
        justify-content: stretch;
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .operations-chat-message-row.is-own .message-avatar {
        grid-column: 1;
    }

    .operations-chat-message-row.is-own .operations-chat-message-bubble {
        grid-column: 2;
    }

    .onboarding-page {
        overflow: auto;
    }

    .app-shell {
        display: block;
    }

    .onboarding-rail {
        display: none;
    }

    .onboarding-main {
        height: auto;
        min-height: 100vh;
        margin-left: 0;
        overflow: visible;
    }

    .assessment-onboarding-main {
        grid-template-columns: 1fr;
    }

    .mobile-brand {
        display: none;
        padding: 28px 20px 0;
    }

    .content-pane {
        min-height: calc(100vh - 72px);
        align-items: flex-start;
        padding: 42px 20px 56px;
    }

    .field-grid,
    .bmi-input-grid,
    .form-actions,
    .admin-form-grid,
    .flow-preview,
    .admin-field-row,
    .settings-grid,
    .admin-readonly-grid,
    .metadata-grid,
    .variant-editor,
    .media-grid,
    .admin-two-column,
    .product-detail-layout,
    .patient-detail-layout,
    .patient-record-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-layout > .admin-product-images,
    .patient-vitals-card {
        position: static;
    }

    .order-billing-option-form .admin-field-row {
        grid-template-columns: 1fr;
    }

    .order-billing-option-form .button {
        width: fit-content;
    }

    .admin-page-heading {
        display: grid;
    }

    .admin-page {
        overflow: auto;
    }

    .admin-console {
        display: block;
        height: auto;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid #dedfe3;
    }

    .admin-collapse-button {
        display: none;
    }

    .admin-nav-block:not(:first-of-type),
    .admin-user-footer {
        display: none;
    }

    .admin-content {
        overflow: visible;
        padding: 16px;
    }

    .assessment-flow-builder.is-fullscreen {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .assessment-flow-builder.is-fullscreen .assessment-builder-sidebar {
        height: auto;
        max-height: 34dvh;
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .assessment-flow-builder.is-fullscreen .assessment-builder-workspace {
        height: auto;
        min-height: 0;
    }

    .assessment-toolbar-actions,
    .assessment-flow-builder.is-fullscreen .assessment-toolbar-actions {
        justify-content: flex-start;
    }

    .assessment-toolbar-primary-group {
        margin-left: 0;
    }

    .assessment-toolbar-group {
        flex-wrap: wrap;
    }

    .assessment-template-menu {
        flex: 1 1 auto;
    }

    .assessment-template-menu .button {
        width: 100%;
    }

    .assessment-preview-drawer {
        min-height: auto;
    }

    .assessment-preview-stage {
        min-height: 0;
        padding: 16px;
    }

    .assessment-preview-step {
        width: 100%;
        padding: 24px 20px;
    }

    .assessment-preview-goto {
        display: grid;
        justify-items: start;
    }

    .assessment-toolbar-group .button {
        flex: 1 1 auto;
    }

    .admin-topbar {
        position: static;
        padding-left: 16px;
    }

    .admin-search-pill {
        display: none;
    }

    .admin-title-row {
        align-items: flex-start;
    }

    .admin-title-row h1 {
        font-size: 1.1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .step-copy {
        margin-bottom: 28px;
    }
}

/* Channel-specific messaging: explicit participants and recipient-specific composers. */
[data-conversation-workspace] { min-width: 0; min-height: 0; width: 100%; height: 100%; }
.conversation-workspace { display: grid; grid-template-columns: 300px minmax(0,1fr); grid-template-rows: auto auto minmax(0,1fr); min-width: 0; height: 100%; min-height: 0; background: var(--surface); overflow: hidden; }
.conversation-workspace-heading { grid-column: 1; grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.conversation-workspace-heading h1 { margin: 0; font-size: 1.1rem; color: var(--clinical-blue); }
.conversation-workspace-heading p { margin: 4px 0 0; font-size: .83rem; color: var(--muted); }
.conversation-channel-tabs { grid-column: 2; grid-row: 1; display: flex; align-items: stretch; gap: 22px; padding: 0 20px; border-bottom: 1px solid var(--border); overflow-x: auto; flex-shrink: 0; }
.conversation-channel-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 12px 0; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 650; white-space: nowrap; cursor: pointer; }
.conversation-channel-tabs button[aria-pressed="true"] { color: var(--clinical-blue); border-bottom-color: var(--clinical-blue); }
.conversation-channel-tabs button span:not(:empty) { margin-left: 6px; border-radius: 4px; background: var(--surface-muted); padding: 2px 5px; font-size: .7rem; }
.conversation-layout { grid-column: 1/-1; grid-row: 3; display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 0; }
.conversation-directory { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--border); }
.conversation-search { display: grid; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.conversation-search input { min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: .82rem; }
.conversation-search select { min-width: 0; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: .78rem; }
.conversation-patient-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.conversation-patient-badges > span { padding: 1px 5px; border: 1px solid var(--border); border-radius: 4px; font-size: .63rem; color: var(--muted); background: var(--surface-soft); }
.conversation-visit-picker { display: flex; align-items: center; gap: 10px; padding: 8px 20px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .78rem; }
.conversation-visit-picker select { min-width: 0; flex: 1; max-width: 580px; border: 1px solid var(--border); border-radius: 5px; padding: 7px 9px; background: var(--surface); color: var(--text); font: inherit; }
.conversation-search small { color: var(--muted); font-size: .72rem; }
.conversation-list { overflow-y: auto; flex: 1; min-height: 0; }
.conversation-list-section { padding: 8px 14px; background: var(--surface-soft); color: var(--muted); font-size: .72rem; font-weight: 600; }
.conversation-list > button { display: flex; align-items: start; width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; padding: 12px 14px; gap: 10px; font: inherit; font-size: .82rem; cursor: pointer; }
.conversation-person-avatar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden; font-size: .75rem; }
.conversation-person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conversation-list-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.conversation-list-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-list-preview { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.conversation-list-meta { display: grid; justify-items: end; gap: 8px; max-width: 55px; font-size: .65rem; color: var(--muted); }
.conversation-list .conversation-list-meta b { background: var(--clinical-blue); color: white; border-radius: 10px; padding: 1px 6px; min-width: 18px; text-align: center; }
.conversation-list > button[aria-current="true"] { background: #edf2f6; box-shadow: inset 3px 0 var(--clinical-blue); }
.conversation-list p { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 2px 0 0; color: var(--muted); }
.conversation-list small { color: var(--muted); font-size: .72rem; }
.conversation-list b { justify-self: start; color: var(--clinical-blue); font-size: .72rem; }
.conversation-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.conversation-thread-heading { display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-bottom: 1px solid var(--border); }
.conversation-thread-heading h2 > span { color: var(--muted); font-size: .76rem; font-weight: 400; margin-left: 10px; }
.conversation-patient-link { margin-left: auto; font-size: .75rem; white-space: nowrap; }
.conversation-thread-heading h2 { margin: 0; font-size: 1rem; }
.conversation-thread-heading p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.conversation-private { margin: 0; padding: 9px 22px; background: #fff4df; color: #795817; font-size: .78rem; }
.conversation-related { display: flex; gap: 18px; padding: 8px 22px; }
.conversation-related button,.conversation-older { border: 0; background: transparent; padding: 4px 0; color: var(--clinical-blue); text-decoration: underline; text-underline-offset: 3px; font-size: .78rem; cursor: pointer; }
.conversation-history { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 20px; background: #fafbfc; }
.conversation-message { max-width: 85%; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 12px 15px; font-size: .85rem; overflow-wrap: anywhere; }
.conversation-message-row { display: flex; align-items: flex-start; gap: 9px; max-width: 85%; min-width: 0; flex-shrink: 0; }
.conversation-message-row.is-own { align-self: flex-end; flex-direction: row-reverse; }
.conversation-message-row > .conversation-message { min-width: 0; max-width: 100%; }
.conversation-message-avatar { display: inline-grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; font-size: .7rem; font-weight: 650; }
.conversation-message-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conversation-message.is-own { align-self: flex-end; background: #edf3f7; border-color: #dce5ed; }
.conversation-message header,.conversation-message footer { display: flex; gap: 10px; flex-wrap: wrap; font-size: .72rem; color: var(--muted); }
.conversation-message header strong { color: var(--text); }
.conversation-message > p { margin: 9px 0; white-space: pre-wrap; }
.conversation-message img { width: auto; max-width: 100%; max-height: 240px; border-radius: 6px; }
.conversation-message footer { justify-content: space-between; }
.conversation-composer { flex-shrink: 0; padding: 10px 16px 12px; border-top: 1px solid var(--border); }
.conversation-composer > label { display: block; color: var(--muted); font-weight: 550; font-size: .73rem; margin-bottom: 6px; }
.conversation-compose-row { display: flex; align-items: end; gap: 8px; }
.conversation-composer textarea { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--border-strong); border-radius: 7px; padding: 9px 10px; resize: vertical; min-height: 46px; max-height: 130px; font: inherit; font-size: .85rem; }
.conversation-compose-row .button { flex-shrink: 0; min-height: 38px; padding: 8px 14px; font-size: .82rem; }
.conversation-composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.conversation-photo-button { position: relative; cursor: pointer; font-size: .8rem; color: var(--clinical-blue); border: 1px solid var(--border-strong); border-radius: 6px; padding: 8px 12px; }
.conversation-photo-button:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.conversation-photo-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.conversation-photo-preview { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: .78rem; color: var(--muted); }
.conversation-photo-preview img { width: 42px; height: 42px; object-fit: cover; border-radius: 4px; }
.conversation-send-unavailable { margin: 0; padding: 18px 22px; border-top: 1px solid var(--border); background: var(--surface-soft); color: var(--muted); font-size: .82rem; }
.conversation-empty { margin: 0; padding: 24px; color: var(--muted); font-size: .85rem; }
.conversation-empty h2 { font-size: 1rem; }
.conversation-error,.conversation-delivery-error { grid-column: 1/-1; grid-row: 2; padding: 10px 20px; margin: 0; color: var(--danger); background: #fff4f2; font-size: .82rem; }
.conversation-error button { margin-left: 12px; cursor: pointer; }
.conversation-new-button { font-size: .7rem; padding: 4px 6px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 4px; cursor: pointer; }
.conversation-unresolved { grid-column: 1/-1; grid-row: 3; min-height: 0; overflow: auto; padding: 22px; }
.conversation-unresolved h2 { margin-top: 0; font-size: 1rem; }
.conversation-unresolved article { padding: 16px 0; border-top: 1px solid var(--border); }
.conversation-unresolved input,.conversation-message input,.conversation-message select { display: block; padding: 8px; margin: 8px 0; width: 100%; border: 1px solid var(--border); }
.portal-messages-shell {
    grid-template-rows: auto auto minmax(0, 1fr);
}
.portal-messages-shell > .portal-orders-page {
    gap: 8px;
    padding: 0;
}
.portal-messages-shell > .portal-orders-page .portal-orders-heading h2 {
    margin: 2px 0 0;
    font-size: 1rem;
}
.portal-messages-shell > .portal-orders-page .portal-order-row {
    padding: 10px 14px;
}
.portal-shell > [data-conversation-workspace] { padding: 0; height: auto; min-height: 0; }
@media(max-width: 720px) {
    .conversation-workspace { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto minmax(0,1fr); height: 100%; min-height: 0; }
    .conversation-workspace-heading { grid-column: 1; grid-row: 1; padding: 10px 14px; }
    .conversation-channel-tabs { grid-column: 1; grid-row: 2; }
    .conversation-error { grid-row: 3; }
    .conversation-layout,.conversation-unresolved { grid-row: 4; }
    .conversation-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .conversation-list { display: flex; overflow-x: auto; overflow-y: hidden; max-height: 145px; border-right: 0; border-bottom: 1px solid var(--border); }
    .conversation-list-section { display: none; }
    .conversation-directory { max-height: 175px; border-right: 0; }
    .conversation-workspace.is-staff .conversation-directory { max-height: 220px; }
    .conversation-search { padding: 8px 12px; }
    .conversation-search small { display: none; }
    .conversation-list > button { flex: 0 0 240px; padding: 10px; }
    .conversation-list > button[aria-current="true"] { box-shadow: inset 0 -3px var(--clinical-blue); }
    .conversation-list p { -webkit-line-clamp: 1; }
    .conversation-workspace-heading,.conversation-thread-heading { padding: 14px 16px; }
    .conversation-channel-tabs { padding: 0 16px; gap: 18px; }
    .conversation-composer,.conversation-history { padding: 14px; }
    .conversation-message { max-width: 95%; }
    .conversation-message-row { max-width: 100%; gap: 7px; }
    .conversation-composer-actions { flex-wrap: wrap; }
    .portal-shell > [data-conversation-workspace] { padding: 0; }
    .conversation-thread-heading h2 > span { display: block; margin-left: 0; }
}

.conversation-unresolved input[type="checkbox"] { display: inline-block; width: auto; margin-right: 6px; }
.conversation-unresolved .conversation-unresolved-item { max-width: 860px; margin-top: 16px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.conversation-unresolved-item > header { display: flex; align-items: center; gap: 10px; }
.conversation-unresolved-item > header > span { color: var(--muted); font-size: .75rem; }
.conversation-unresolved-item > p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .86rem; }
.conversation-unresolved-item > small { color: var(--muted); overflow-wrap: anywhere; }
.conversation-resolution-form { display: grid; gap: 14px; margin-top: 18px; }
.conversation-resolution-form > label { display: grid; gap: 6px; font-size: .8rem; }
.conversation-resolution-form input[data-associate-input] { box-sizing: border-box; margin: 0; border-radius: 6px; font: inherit; }
.conversation-resolution-form > .conversation-resolution-check { display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.conversation-unresolved .conversation-resolution-check input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; }
.conversation-resolution-actions { display: flex; justify-content: flex-end; }
.conversation-unresolved .conversation-resolve-button { min-height: 40px; min-width: 0; padding: 9px 16px; border-radius: 6px; font-size: .82rem; line-height: 1.4; }
.conversation-resolution-error { color: var(--danger); }
