/* Shared record-form and task-rail layout. Business fields and actions stay in owning views. */
/* Keep the original list heading row over its rows, below application chrome.
   Moving within the table also works with horizontal overflow and sticky Actions. */
:is(table.hcp-record-table, .table-wrap > table) > thead > tr.hcp-list-sticky-heading {
  position: relative;
  z-index: 4;
  transform: translateY(var(--hcp-list-header-shift, 0px));
  background: #cfe6ff;
}
:is(table.hcp-record-table, .table-wrap > table) > thead > tr.hcp-list-sticky-heading > :is(th, td) {
  background: #cfe6ff;
}
.hcp-loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; min-height: 18rem; padding: 2rem 1rem; background: #fff; color: #000; text-align: center; }
.hcp-loading-screen .hcp-loading-spinner { display: block; width: 2.5rem; height: 2.5rem; border: .3rem solid #e1e1e1; border-top-color: #c00000; border-radius: 50%; animation: hcp-loading-spin .8s linear infinite; }
.hcp-loading-screen .hcp-loading-title { color: #000; font-size: 1.2rem; font-weight: 600; }
.hcp-loading-screen p { margin: 0; color: #555; }
.hcp-loading-screen.hcp-loading-page { position: fixed; inset: 0; z-index: 2000; min-height: 100vh; background: rgba(255, 255, 255, .97); }
.hcp-form-modal .hcp-loading-screen { min-height: 12rem; }
/* Modal shell is shared by Admin, Portal and WSM; field layouts stay app-owned. */
.hcp-form-modal { --hcp-modal-width: 960px; box-sizing: border-box; width: min(var(--hcp-modal-width), 96vw); max-width: 96vw; max-height: 90vh; max-height: 90dvh; margin: auto; padding: 0; overflow: hidden; border: 1px solid #cad5df; border-radius: 18px; background: #fff; color: #000; box-shadow: 0 16px 48px #0004; }
.hcp-form-modal[data-hcp-modal-size="small"] { --hcp-modal-width: 560px; }
.hcp-form-modal[data-hcp-modal-size="wide"] { --hcp-modal-width: 1560px; }
.hcp-form-modal[open] { display: flex; flex-direction: column; }
.hcp-form-modal::backdrop { background: rgb(15 23 42 / 45%); }
.hcp-modal-header { display: flex; flex: 0 0 auto; align-items: center; gap: 16px; padding: 15px 24px; border-bottom: 2px dashed #808080; background: #fff; }
.hcp-modal-heading { flex: 1; min-width: 0; }
.hcp-form-modal .hcp-modal-heading > h2 { min-width: 0; margin: 0; color: #000; font-size: 23px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.hcp-modal-module { margin: 0 0 5px; color: #c00000; font-size: 14px; font-weight: 600; line-height: 1.3; text-transform: uppercase; }
.hcp-modal-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.hcp-modal-header-actions[hidden], .hcp-modal-module[hidden] { display: none; }
.hcp-modal-header-actions .hcp-modal-mobile-action-icon { display: none; }
.hcp-modal-header-actions .hcp-modal-action-content { display: inline-flex; align-items: center; gap: 8px; }
[data-hcp-native-action-source] { display: none !important; }
.hcp-form-modal[data-hcp-native-dialog] > form { flex: 1 1 auto; min-height: 0; max-width: 100%; margin: 0; padding: 0; overflow: auto; }
.hcp-form-modal[data-hcp-native-dialog] > .site-dialog-notice:empty { display: none; }
.hcp-modal-close { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; box-sizing: border-box; width: 44px; height: 44px; margin: 0; padding: 4px 8px; border: 0; border-radius: 3px; background: transparent; color: inherit; font: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
[data-hcp-redundant-close], [data-account-state-help][hidden] { display: none !important; }
.hcp-form-modal .hcp-modal-close:focus-visible { outline: 2px solid #1675be; outline-offset: 2px; }
.hcp-modal-header > .hcp-modal-close { border-left: 1px solid #d9dfe8; border-radius: 0; }
.hcp-modal-body { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; }
.hcp-modal-frame { display: block; width: 100%; height: auto; min-height: 0; border: 0; }
.hcp-modal-frame[hidden] { display: none; }
[data-hcp-modal-promoted-actions], [data-hcp-modal-promoted-heading] { display: none !important; }
@media (max-width: 767.98px) {
  .hcp-form-modal { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .hcp-modal-frame { height: 100%; min-height: 0; }
  .hcp-modal-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px 16px; }
  .hcp-modal-heading { grid-column: 1; grid-row: 1; }
  .hcp-modal-header > .hcp-modal-close { grid-column: 2; grid-row: 1; }
  .hcp-modal-header-actions { grid-column: 2; grid-row: 1; align-self: start; flex-wrap: nowrap; gap: 8px; }
  .hcp-modal-header-actions .hcp-modal-action-content { display: none; }
  .hcp-modal-header-actions .hcp-modal-mobile-action-icon { display: inline-block; width: 24px; height: 24px; }
  .hcp-modal-header-actions .hcp-modal-action-proxy:has(> .hcp-modal-mobile-action-icon) { min-width: 44px; min-height: 44px; padding: 10px; gap: 0; }
}
@keyframes hcp-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hcp-loading-screen .hcp-loading-spinner { animation-duration: 2s; } }
.hcp-lucide-svg { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:is(.hcp-admin-menu-toggle, .hcp-portal-menu-toggle, .wsm-mobile-menu > summary) > .hcp-lucide-svg { color: red; }
.hcp-service-label { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; white-space: nowrap; }
.hcp-service-label > .hcp-service-icon { flex: 0 0 auto; color: red; width: 1.2em; height: 1.2em; }
:root { --hcp-add-icon-size: 1.35rem; --hcp-add-icon-weight: 700; --hcp-add-icon-line-height: 1; }
.hcp-action-plus { color: red; font-size: var(--hcp-action-plus-size, inherit); font-weight: var(--hcp-action-plus-weight, inherit); line-height: var(--hcp-action-plus-line-height, inherit); }
.hcp-toolbar-action[data-hcp-toolbar-action="add"] { --hcp-action-plus-size: var(--hcp-add-icon-size); --hcp-action-plus-weight: var(--hcp-add-icon-weight); --hcp-action-plus-line-height: var(--hcp-add-icon-line-height); }
.hcp-sort-button { text-decoration: none; }
/* HCP import state belongs in Select, independently of supplier business status. */
.hcp-imported-marker { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; color: #198754; vertical-align: middle; }
.hcp-imported-marker > .hcp-lucide-svg { width: 1.25rem; height: 1.25rem; stroke-width: 3; }
.hcp-pencil-icon.hcp-lucide-host, .hcp-scan-icon.hcp-lucide-host { transform: none; }
/* Tab View shares Integration's plain labels, full-width divider and active underline. */
.hcp-tab-view { flex: 1 0 100%; min-width: 0; width: 100%; background: #fff; }
.hcp-tab-view > .hcp-tab-nav { display: flex; flex-wrap: wrap; align-items: end; gap: 0 .25rem; width: 100%; margin: 0; padding: 12px 1.25rem 0; border: 0; border-bottom: 1px solid #d9e1e9; background: #fff; }
.hcp-tab-view > .hcp-tab-nav > .hcp-tab-link { display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 -1px; padding: .45rem .75rem .55rem; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #000; font-weight: 500; text-decoration: none; white-space: nowrap; }
.hcp-tab-view > .hcp-tab-nav > .hcp-tab-link:hover { border-bottom-color: #a8b2bd; color: #000; }
.hcp-tab-view > .hcp-tab-nav > .hcp-tab-link.active { border-bottom-color: #c00000; background: transparent; color: #000; font-weight: 600; }
.hcp-tab-view > .hcp-tab-nav > .hcp-tab-link:focus-visible { position: relative; z-index: 1; outline: 2px solid #1675be; outline-offset: 2px; }
.hcp-tab-view > .hcp-tab-nav > .hcp-tab-link[aria-disabled="true"] { color: #666; cursor: default; border-bottom-color: transparent; }
.hcp-tab-count { padding: .2em .5em; border-radius: .25rem; background: #f8f9fa; color: #000; font-size: .75em; font-weight: 600; line-height: 1; }
.hcp-tab-content { min-width: 0; width: 100%; }
.hcp-tab-view > .hcp-tab-content > .hcp-tab-panel { display: block; width: 100%; min-width: 0; }
.hcp-tab-view > .hcp-tab-content > .hcp-tab-panel[hidden] { display: none; }
@media (max-width: 767px) { .hcp-tab-view > .hcp-tab-nav { padding-left: .5rem; padding-right: .5rem; } }
.hcp-shared-inline-actions { display: inline-flex; flex-flow: row nowrap; align-items: flex-start; gap: .5rem; min-width: max-content; margin: 0; padding: 0; white-space: nowrap; }
.hcp-shared-inline-actions .hcp-shared-inline-action { display: inline-flex; flex: 0 0 auto; flex-direction: column; align-items: center; min-width: 2rem; }
.hcp-shared-inline-actions .hcp-shared-inline-action > .form-label { margin: 0 0 .35rem; color: #000; font-size: .75rem; font-weight: 500; line-height: 1; text-align: center; white-space: nowrap; }
.hcp-shared-inline-actions button.hcp-action-icon { background: #5cb85c; border-color: #5cb85c; color: #fff; }
.hcp-shared-inline-actions button.hcp-action-icon:hover { background: #4cae4c; border-color: #449d44; }
.hcp-shared-list-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; min-width: 0; width: 100%; background: #fff; }
.hcp-shared-list-actions:has(> form[hidden]:only-child) { display: none; }
.hcp-record-toolbar.hcp-shared-list-actions > .hcp-toolbar-action { display: inline-flex; align-items: center; gap: .35rem; min-height: 0; padding: .15rem .05rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #000; font-size: .8rem; font-weight: 500; line-height: 1.4; text-decoration: none; }
.hcp-record-toolbar.hcp-shared-list-actions > .hcp-toolbar-action:hover { color: #000; background: transparent; text-decoration: underline; }
.hcp-record-toolbar.hcp-shared-list-actions > .hcp-toolbar-action:focus-visible { outline: 2px solid #1675be; outline-offset: 3px; }
.hcp-compact-modal-toolbar.hcp-record-toolbar.hcp-shared-list-actions { min-height: 0; margin: 0; padding-block: 4px; padding-inline: 24px; }
.hcp-shared-record-body > form:has(> .hcp-compact-modal-toolbar) > .validation-summary-valid { display: none; }
.hcp-compact-modal-toolbar.hcp-record-toolbar.hcp-shared-list-actions > .hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone]:is(a, button) { font-size: .9rem; padding-inline: 0; }
@media (max-width: 767.98px) {
  .hcp-compact-modal-toolbar.hcp-record-toolbar.hcp-shared-list-actions { padding-inline: 16px; }
}
[data-hcp-modal-layout="small-desktop"] .hcp-compact-modal-toolbar.hcp-record-toolbar.hcp-shared-list-actions { padding-inline: 24px; }
/* Shared action-context variants. Specific markers win even when app workspace CSS is loaded later. */
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone]:is(a, button):not([data-hcp-action-variant="auth"]):not([data-hcp-action-variant="public"]) { display: inline-flex; align-items: center; justify-content: center; gap: var(--hcp-action-icon-gap, .35rem); box-sizing: border-box; font: inherit; font-size: .8rem; font-weight: 500; line-height: 1.4; text-decoration: none; box-shadow: none; cursor: pointer; }
.hcp-shared-action[data-hcp-action-variant="toolbar"][data-hcp-action-tone]:is(a, button) { min-height: 0; width: auto; padding: .15rem .05rem; border: 0; border-radius: 0; background: transparent; color: #000; }
.hcp-shared-action[data-hcp-action-variant="toolbar"][data-hcp-action-tone]:is(a, button):hover { background: transparent; text-decoration: underline; }
.hcp-shared-action[data-hcp-action-variant="form"][data-hcp-action-tone]:is(a, button) { --hcp-action-icon-gap: 8px; min-height: 2.4rem; padding: .4rem .75rem; border: 1px solid #999; border-radius: 4px; background: #fff; color: #000; }
.hcp-shared-action[data-hcp-action-variant="row"][data-hcp-action-tone]:is(a, button), .hcp-shared-action[data-hcp-action-variant="inline"][data-hcp-action-tone]:is(a, button) { flex: 0 0 auto; width: 2rem; min-width: 2rem; height: 2rem; min-height: 2rem; padding: 0; border: 1px solid #999; border-radius: .5rem; background: #fff; color: #000; line-height: 1; }
.hcp-shared-action[data-hcp-action-variant="row"][data-hcp-action-tone]:has(> :not(svg):not(.visually-hidden):not([aria-hidden="true"]):not(.hcp-lucide-host)) { width: auto; padding-inline: .4rem; }
.hcp-shared-action:is([data-hcp-action-variant="row"], [data-hcp-action-variant="inline"])[data-hcp-action-tone][data-hcp-action-caption="visible"]:is(a, button) { width: auto; height: auto; min-height: 2rem; padding: .3rem .4rem; white-space: normal; overflow-wrap: anywhere; }
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone="neutral"]:is(a, button):not([data-hcp-action-variant="auth"]):not([data-hcp-action-variant="public"]) { color: #000 !important; }
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone="danger"]:is(a, button) { color: #b42318 !important; }
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone="warning"]:is(a, button) { color: #8a5700 !important; }
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone="positive"]:is(a, button) { color: #198754 !important; }
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone="primary"]:is(a, button):not([data-hcp-action-variant="auth"]):not([data-hcp-action-variant="public"]) { border-color: #5cb85c; background: #5cb85c; color: #fff !important; }
.hcp-shared-action[data-hcp-action-variant="auth"][data-hcp-action-tone]:is(a, button) { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.4rem; padding: .4rem .75rem; border: 1px solid #999; border-radius: 4px; font-size: .8rem; font-weight: 500; line-height: 1.4; background: #fff; color: #000; text-decoration: none; box-shadow: none; }
.hcp-shared-action[data-hcp-action-variant="auth"][data-hcp-action-tone="primary"]:is(a, button) { background: #111827; border-color: #111827; color: #fff !important; }
.hcp-shared-action[data-hcp-action-variant="auth"][data-hcp-action-tone="primary"]:is(a, button):hover:not(:disabled):not([aria-disabled="true"]) { background: #1f2937; border-color: #1f2937; }
.hcp-shared-action[data-hcp-action-variant="form"][data-hcp-action-tone="danger"]:is(a, button), .hcp-shared-action[data-hcp-action-variant="auth"][data-hcp-action-tone="danger"]:is(a, button) { background: #b42318; border-color: #b42318; color: #fff !important; }
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone="primary"]:is(a, button):not([data-hcp-action-variant="auth"]):not([data-hcp-action-variant="public"]):hover:not(:disabled):not([aria-disabled="true"]) { background: #4cae4c; border-color: #449d44; }
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone="neutral"]:is(a, button):not([data-hcp-action-variant="toolbar"]):hover:not(:disabled):not([aria-disabled="true"]) { background: #f7f7f7; }
.hcp-shared-action[data-hcp-action-variant="row"][data-hcp-action-tone="danger"]:is(a, button):hover:not(:disabled):not([aria-disabled="true"]) { background: #fff1f0; color: #8f1c13 !important; }
.hcp-shared-action[data-hcp-action-variant="auth"][data-hcp-action-tone="neutral"]:is(a, button) { color: #000 !important; }
.hcp-shared-action:is([data-hcp-action-variant="form"], [data-hcp-action-variant="auth"])[data-hcp-action-tone="danger"]:is(a, button):hover:not(:disabled):not([aria-disabled="true"]) { background: #8f1c13; border-color: #8f1c13; color: #fff !important; }
.hcp-shared-action[data-hcp-action-variant]:is([data-hcp-action-tone="warning"], [data-hcp-action-tone="positive"]):is(a, button):hover:not(:disabled):not([aria-disabled="true"]) { background: #f7f7f7; }
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone]:is(a, button):focus-visible { outline: 2px solid #1675be; outline-offset: 3px; }
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone]:is(a, button):is(:disabled, [aria-disabled="true"]) { opacity: .55; cursor: not-allowed; text-decoration: none; }
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone] .hcp-lucide-svg { width: 1em; height: 1em; flex: 0 0 auto; pointer-events: none; }

.hcp-shared-action[data-hcp-action-variant="form"][data-hcp-action-tone] .hcp-lucide-svg { width: 20px; height: 20px; }
@media (max-width: 767.98px) {
  .hcp-modal-header-actions .hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone] > .hcp-modal-mobile-action-icon { width: 24px; height: 24px; }
  .hcp-modal-header-actions .hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone]:has(> .hcp-modal-mobile-action-icon) { min-width: 44px; min-height: 44px; padding: 10px; gap: 0; }
}
.hcp-shared-action[data-hcp-action-variant][data-hcp-action-tone] :is([aria-hidden="true"], .visually-hidden) { pointer-events: none; }
.hcp-shared-action[data-hcp-action-variant="toolbar"][data-hcp-action-tone] .hcp-lucide-svg:has(> use[href$="#plus"]) { color: red; font-size: var(--hcp-add-icon-size); width: 1em; height: 1em; }
.hcp-action-scope[data-hcp-action-scope="form"]:is(div, nav, span) { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .75rem; }
.hcp-record-toolbar.hcp-shared-list-actions > .hcp-inline-pagination { flex: 0 0 auto; min-width: 0; margin-left: auto; white-space: nowrap; }
.hcp-record-toolbar.hcp-shared-list-actions .hcp-compact-pagination { flex-wrap: nowrap; }
.hcp-compact-size-label select,
.hcp-inline-pagination select[data-hcp-page-size] { background-color: #fff; }
.hcp-compact-pagination .hcp-compact-page-button { display: inline-grid; place-items: center; min-width: 1.8rem; min-height: 1.8rem; padding: 0; border: 0; background: #fff; color: #c62828; cursor: pointer; }
.hcp-compact-pagination .hcp-compact-page-button:disabled { opacity: .35; cursor: default; }
.hcp-compact-pagination .hcp-compact-page-button:focus-visible { outline: 2px solid #1675be; outline-offset: 2px; }
.hcp-compact-pagination .hcp-compact-page-icon { display: block; width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
table > thead > tr.hcp-column-filters > th { background-color: #e1e1e1; }
.hcp-column-filters [data-hcp-actions-filter] { text-align: center; white-space: nowrap; }
.hcp-column-filters [data-hcp-actions-filter] :is(a, button) { color: #000; background: transparent; border: 0; padding: .2rem .3rem; font: inherit; text-decoration: none; cursor: pointer; }
.hcp-column-filters [data-hcp-actions-filter] :is(a, button):hover { text-decoration: underline; }
/* Keep the separator inside the sticky Actions cell; collapsed table borders stay with adjacent cells. */
/* Shared column widths: Actions stays exact; spare container space is shared by content columns. */
.hcp-record-table.hcp-responsive-columns { --hcp-list-total: var(--hcp-list-desktop-total); --hcp-list-actions-width: var(--hcp-list-actions-desktop); --hcp-list-action-gap: 8px; table-layout: fixed; width: max(100%, var(--hcp-list-total)); min-width: var(--hcp-list-total); }
.hcp-responsive-columns > colgroup > .hcp-list-content-col { --hcp-column-width: calc((100% - var(--hcp-list-actions-width)) * var(--hcp-column-desktop-share)); }
.hcp-responsive-columns > colgroup > .hcp-list-actions-col { --hcp-column-width: var(--hcp-list-actions-width); }
.hcp-record-table.hcp-responsive-columns > :is(thead, tbody, tfoot) > tr > :last-child:is([data-hcp-actions-column], [data-hcp-actions-filter]),
.hcp-record-table.hcp-responsive-columns:has(> thead > tr:first-child > th[data-hcp-actions-column]) > :is(tbody, tfoot) > tr > :last-child:not([colspan]) { box-sizing: border-box; width: var(--hcp-list-actions-width); min-width: var(--hcp-list-actions-width); max-width: var(--hcp-list-actions-width); padding-inline: .5rem; white-space: normal; overflow-wrap: anywhere; }
.hcp-responsive-columns [data-hcp-actions-filter] :is(a, button) { white-space: normal; overflow-wrap: anywhere; }
.hcp-responsive-columns:has(> thead > tr:first-child > th[data-hcp-actions-column]) > tbody > tr > td:last-child:not([colspan]) .hcp-table-actions { display: flex; flex-wrap: wrap; gap: var(--hcp-list-action-gap); justify-content: center; min-width: 0; max-width: 100%; }
.hcp-responsive-columns:has(> thead > tr:first-child > th[data-hcp-actions-column]) > tbody > tr > td:last-child:not([colspan]) :is(.hcp-table-actions > *, .hcp-shared-action[data-hcp-action-caption="visible"]) { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .hcp-record-table.hcp-responsive-columns { --hcp-list-total: var(--hcp-list-mobile-total); --hcp-list-actions-width: var(--hcp-list-actions-mobile); --hcp-list-action-gap: 4px; }
  .hcp-responsive-columns > colgroup > .hcp-list-content-col { --hcp-column-width: calc((100% - var(--hcp-list-actions-width)) * var(--hcp-column-mobile-share)); }
}
:is(.hcp-record-table, .table-wrap > table):has(> thead > tr:first-child > th:last-child[data-hcp-actions-column]:not([data-no-sticky])) > tbody > tr > td:last-child:not([colspan]) { border-left: 0; }
:is(.hcp-record-table, .table-wrap > table):has(> thead > tr:first-child > th:last-child[data-hcp-actions-column]:not([data-no-sticky])) > tbody > tr > td:last-child:not([colspan])::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px dashed #ccc; pointer-events: none; }
.hcp-workspace-content .hcp-record-toolbar .hcp-compact-page-label { display: inline-flex; flex: 0 0 auto; min-width: 0; }
.hcp-workspace-content .hcp-record-toolbar .hcp-compact-page-label input { flex: 0 0 3.2rem; width: 3.2rem; min-width: 3.2rem; text-align: center; }
.hcp-shared-record-form { margin: 1rem; background: #fff; color: #000; }
.hcp-shared-record-form .hcp-shared-record-heading { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid #dbe2e8; background: #cfe6ff; }
.hcp-shared-record-form .hcp-shared-record-heading h1 { margin: 0; color: #000; font-size: 1.05rem; }
.hcp-shared-record-form .hcp-shared-record-heading .hcp-eyebrow { margin: 0 0 .2rem; color: #c00000; }
.hcp-shared-record-icon { display: inline-grid; place-items: center; width: 2rem; height: 2rem; color: #000; }
.hcp-shared-record-form .hcp-shared-record-body { padding: 0 !important; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.hcp-shared-record-form .hcp-shared-record-body > form { margin: 0; }
.hcp-shared-record-form .hcp-shared-record-body [data-valmsg-summary="true"] { margin: .75rem 1rem; }
.hcp-shared-form-row { display: grid; grid-template-columns: minmax(11rem, 25%) minmax(0, 1fr); min-height: 2.7rem; border-bottom: 1px solid #e1e1e1; color: #000; }
.hcp-shared-form-row > :is(label, .hcp-field-caption) { display: flex; align-items: center; justify-content: flex-end; margin: 0; padding: .6rem .85rem; background: #f7f7f7; color: #000; text-align: right; font-weight: 400; }
.hcp-shared-form-control { display: grid; align-content: center; gap: .25rem; min-width: 0; padding: .45rem .85rem; }
.hcp-shared-form-control :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) { width: min(100%, 38rem); min-height: 1.9rem; margin: 0; }
/* Plain direct controls have a shared baseline without requiring Bootstrap.
   Zero specificity preserves existing app/custom control and state styles. */
:where(.hcp-shared-form-control > :is(input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="tel"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="time"], input[type="month"], input[type="week"], select, textarea):not(.form-control):not(.form-select)) {
  box-sizing: border-box;
  min-width: 0;
  padding: .3rem .45rem;
  border: 1px solid #ccd3db;
  border-radius: 0;
  background-color: #fff;
  color: inherit;
  font: inherit;
}
:where(.hcp-shared-form-control > :is(input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="tel"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="time"], input[type="month"], input[type="week"], select, textarea):not(.form-control):not(.form-select):focus-visible) {
  outline: 2px solid #1675be;
  outline-offset: 1px;
}
.hcp-shared-form-control :is(input[type="checkbox"], input[type="radio"]) { width: 1.05rem; height: 1.05rem; border: 1px solid #666; }
.hcp-shared-form-control .text-danger { display: block; }
.hcp-shared-form-help { margin: .2rem 0; color: #555; font-size: .8rem; }
.hcp-shared-form-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .75rem; margin: 0 !important; padding: .8rem 1rem !important; border-top: 1px solid #dbe2e8; }
.hcp-shared-form-actions .btn { display: inline-flex; align-items: center; gap: .35rem; }
.hcp-shared-form-actions .btn-primary { background: #5cb85c; border-color: #5cb85c; color: #fff; }
.hcp-shared-form-actions .btn-primary:hover { background: #4cae4c; border-color: #449d44; }

.hcp-shared-workspace { display: grid; grid-template-columns: minmax(12rem, 13.5rem) minmax(0, 1fr); align-items: stretch; min-width: 0; max-width: 100%; overflow: hidden; border-top: 1px solid #d9e1e9; background: #fff; }
.hcp-shared-workspace > .hcp-provider-work-area { min-width: 0; max-width: 100%; overflow: hidden; background: #fff; }
.hcp-shared-task-rail { min-width: 0; align-self: stretch; border-right: 1px solid #d9e1e9; background: #fff; color: #000; }
.hcp-shared-task-rail .hcp-provider-action-rail-heading { background: #fff; }
.hcp-shared-task-rail .hcp-provider-action-rail-heading :is(h2, p) { color: #333; }
.hcp-shared-task-rail .hcp-provider-action-group h3 { color: #c00000; }
.hcp-shared-task-rail .hcp-provider-action-menu { padding-left: 0; padding-right: 0; }
.hcp-shared-task-rail .hcp-provider-action-row { width: 100%; margin: 0; border-radius: 0; background: transparent; color: #000; }
.hcp-shared-task-rail .hcp-provider-action-row > .hcp-lucide-svg { color: inherit; stroke: currentColor; }
.hcp-shared-task-rail .hcp-provider-action-row:is(:hover, :focus-visible) { background: #eef3f6; color: #000; }
.hcp-shared-task-rail .hcp-provider-action-row:focus-visible { outline: 2px solid #1675be; outline-offset: -2px; }
.hcp-shared-task-rail .hcp-provider-action-row:is(.active, .is-active, [aria-selected="true"]) { background: #e6f2fb; box-shadow: inset 3px 0 #1675be; color: #000; }
.hcp-shared-task-rail .hcp-provider-action-disclosure > summary { color: #000; }
.hcp-shared-task-rail .hcp-provider-action-group > div { padding: 0; }
.hcp-shared-task-rail .hcp-task-children { margin: 0; padding: 0; list-style: none; }
.hcp-shared-task-rail .hcp-task-children > li { margin: 0; padding: 0; }
.hcp-shared-task-rail .hcp-task-children .hcp-provider-action-row { padding-left: 2rem; }
@media (max-width: 767px) {
  .hcp-record-toolbar.hcp-shared-list-actions { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; white-space: nowrap; }
  .hcp-record-toolbar.hcp-shared-list-actions > * { flex: 0 0 auto; }
  .hcp-record-toolbar.hcp-shared-list-actions :is(a, button, label),
  .hcp-record-toolbar.hcp-shared-list-actions .hcp-shared-action[data-hcp-action-variant] { white-space: nowrap; overflow-wrap: normal; }
  .hcp-record-toolbar.hcp-shared-list-actions > .hcp-inline-pagination { flex: 0 0 auto; flex-wrap: nowrap; white-space: nowrap; }
  .hcp-record-toolbar.hcp-shared-list-actions .hcp-compact-pagination { flex-wrap: nowrap; }
  /* Expanded task forms remain readable inside a scrolling action strip. */
  .hcp-record-toolbar.hcp-shared-list-actions > details > form { white-space: normal; }
  .hcp-record-toolbar.hcp-shared-list-actions > details > form label { white-space: normal; }
  .hcp-shared-workspace { grid-template-columns: minmax(0, 1fr); }
  .hcp-shared-form-row { grid-template-columns: minmax(0, 1fr); }
  .hcp-shared-form-row > :is(label, .hcp-field-caption) { justify-content: flex-start; padding: .5rem .85rem .15rem; background: #f7f7f7; text-align: left; }
  .hcp-shared-form-control { padding: .4rem .85rem .7rem; }
  .hcp-shared-task-rail { border-right: 0; border-bottom: 1px solid #d9e1e9; }
  .hcp-shared-task-rail .hcp-provider-action-disclosure > summary { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; cursor: pointer; }
  .hcp-shared-task-rail .hcp-provider-action-disclosure:not([open]) > .hcp-provider-action-menu { display: none; }
}

/* Explicitly adopted action feedback is fixed and never adds space to the page. */
[data-hcp-feedback-source][hidden] { display: none !important; }
.hcp-feedback-host { position: fixed; z-index: 1090; left: auto; right: max(1rem, env(safe-area-inset-right)); top: var(--hcp-feedback-top, 1rem); bottom: auto; width: min(28rem, calc(100vw - 2rem)); pointer-events: none; overflow: hidden; }
.hcp-admin-body:has(.hcp-admin-topbar) .hcp-feedback-host { --hcp-feedback-top: 10rem; }
.hcp-feedback-stack { display: flex; flex-direction: column; gap: .65rem; max-height: min(48dvh, 30rem, var(--hcp-feedback-height, 48dvh)); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: .25rem; pointer-events: auto; }
.hcp-feedback-stack:empty { display: none; }
.hcp-feedback-card.alert { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) 2rem; gap: .65rem; align-items: start; margin: 0; padding: .85rem; border-radius: .65rem; box-shadow: 0 4px 18px #00000026; border: 1px solid #b8d2e4; background: #eff7fc; color: #000; overflow-wrap: anywhere; }
.hcp-feedback-card { transition: transform 200ms ease-in, opacity 200ms ease-in; }
.hcp-feedback-card.is-leaving { transform: translateX(110%); opacity: 0; }
.hcp-feedback-card.alert-success { background: #edf7ef; border-color: #a3caae; }
.hcp-feedback-card.alert-warning { background: #fff8e6; border-color: #dfc57e; }
.hcp-feedback-card.alert-danger { background: #fff1f0; border-color: #dda5a1; }
.hcp-feedback-icon { width: 1.25rem; height: 1.25rem; margin-top: .15rem; }
.hcp-feedback-dismiss { display: inline-flex; align-items: center; justify-content: center; width: 2rem; min-height: 2rem; padding: 0; background: transparent; color: inherit; border: 0; border-radius: .25rem; font-size: 1.4rem; cursor: pointer; }
.hcp-feedback-dismiss[hidden] { display: none; }
.hcp-feedback-dismiss:hover { background: #0000000c; }
.hcp-feedback-dismiss:focus-visible, .hcp-feedback-card a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.hcp-feedback-card [data-hcp-feedback-content] > :last-child { margin-bottom: 0; }
.hcp-feedback-card [data-hcp-feedback-content] :is(p, strong, span, div, h2, dl, dt, dd, code, a) { color: #000; }
@media (max-width: 576px) {
  .hcp-feedback-host { left: auto; right: max(.65rem, env(safe-area-inset-right)); width: min(28rem, calc(100vw - 1.3rem)); bottom: auto; }
  .hcp-feedback-stack { max-height: min(42dvh, var(--hcp-feedback-height, 42dvh)); }
  .hcp-feedback-card.alert { padding: .65rem; gap: .5rem; grid-template-columns: 1.25rem minmax(0, 1fr) 2.75rem; }
  .hcp-feedback-dismiss { width: 2.75rem; min-height: 2.75rem; }
}
.hcp-feedback-menu { display: inline-flex; align-items: center; }
.hcp-feedback-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: .5rem; border: 1px solid transparent; border-radius: 3px; background: #fff; color: #000; cursor: pointer; }
.hcp-feedback-bell[hidden], .hcp-feedback-history[hidden], .hcp-feedback-count[hidden], .hcp-feedback-empty[hidden], .hcp-feedback-history-list[hidden] { display: none; }
.hcp-feedback-bell:is(:hover, :focus-visible, [aria-expanded="true"]) { color: maroon; border-color: #cbd6e2; }
.hcp-feedback-bell:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.hcp-feedback-count { position: absolute; top: .1rem; right: 0; min-width: 1rem; padding: 0 .15rem; border-radius: .5rem; background: #fff; color: #000; font-size: .65rem; line-height: 1.2; }
.hcp-feedback-history { position: fixed; z-index: 1100; width: min(28rem, calc(100vw - 1.3rem)); max-height: min(65dvh, var(--hcp-feedback-panel-height, 65dvh)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d9e1e9; border-radius: .5rem; box-shadow: 0 6px 24px #00000026; background: #fff; color: #000; white-space: normal; }
.hcp-feedback-history > header { padding: .85rem 1rem; border-bottom: 1px solid #d9e1e9; flex-shrink: 0; }
.hcp-feedback-history h2 { margin: 0; color: #000; font-size: 1rem; font-weight: 600; }
.hcp-feedback-history > header p { margin: .25rem 0 0; font-size: .8rem; }
.hcp-feedback-empty { margin: 0; padding: 1rem; }
.hcp-feedback-history-list { overflow-y: auto; overscroll-behavior: contain; list-style: none; padding: 0; margin: 0; }
.hcp-feedback-history-list:focus-visible { outline: 2px solid #000; outline-offset: -2px; }
.hcp-feedback-history-item { padding: .75rem 1rem; border-bottom: 1px solid #e3e8ee; border-left: 3px solid #b8d2e4; overflow-wrap: anywhere; }
.hcp-feedback-history-item:last-child { border-bottom: 0; }
.hcp-feedback-history-item[data-severity="success"] { border-left-color: #5cb85c; }
.hcp-feedback-history-item[data-severity="warning"] { border-left-color: #dfc57e; }
.hcp-feedback-history-item[data-severity="error"] { border-left-color: #dda5a1; }
.hcp-feedback-history-meta { display: flex; justify-content: space-between; gap: .75rem; font-size: .75rem; }
.hcp-feedback-history-item p { margin: .3rem 0 0; font-size: .9rem; color: #000; }
@media (prefers-reduced-motion: reduce) { .hcp-feedback-card { transition: none; } }
@media print { .hcp-feedback-host, .hcp-feedback-menu { display: none; } }
.hcp-record-toolbar[data-provider-generated-actions][hidden] { display: none; }
[data-hcp-snapshot-count-summary][hidden] { display: none !important; }
.hcp-mapped-value { min-width: 0; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.hcp-mapped-value-scalar { white-space: pre-wrap; }
.hcp-mapped-value:focus-visible { outline: 2px solid #000; outline-offset: -2px; }
.hcp-mapped-value-object, .hcp-mapped-value-array { margin: 0; padding: 0; }
.hcp-mapped-value-property { display: grid; grid-template-columns: minmax(5rem, .75fr) minmax(0, 1.25fr); gap: .4rem; padding: .25rem 0; }
.hcp-mapped-value-property > dt { margin: 0; padding: .2rem .35rem; font-weight: 600; background: #f7f7f7; }
.hcp-mapped-value-property > dd { min-width: 0; margin: 0; padding: .2rem .35rem; }
.hcp-mapped-value-array { list-style: none; }
.hcp-mapped-value-item { padding: .4rem 0; border-bottom: 1px solid #e1e1e1; }
.hcp-mapped-value-item:last-child { border-bottom: 0; }
.hcp-mapped-value-item-label { display: block; margin-bottom: .25rem; font-weight: 600; }
td > .hcp-mapped-value:has(> .hcp-mapped-value-object, > .hcp-mapped-value-array) { min-width: 12rem; max-width: 34rem; max-height: 20rem; overflow: auto; }

/* Explicit Compact Grid opt-in: existing record forms/left-label rows elsewhere are unchanged. */
.hcp-compact-section { min-width: 0; width: 100%; margin: 0; border: 0; border-color: #ccc; }
.hcp-compact-section-heading { margin: 0; padding: .45rem 1rem; min-height: 2.15rem; background: #cfe6ff; color: #000; font-size: .9rem; font-weight: 600; line-height: 1.4; }
.hcp-compact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem .9rem; min-width: 0; padding: .75rem 1rem; background: #fff; }
.hcp-compact-grid > .hcp-shared-form-row { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; min-height: 0; margin: 0; border: 0; }
.hcp-compact-grid > .hcp-shared-form-row > :is(label, .hcp-field-caption) { display: block; justify-content: flex-start; min-height: 1.4rem; margin: 0; padding: 0 0 .3rem; background: transparent; text-align: left; font-size: .85rem; font-weight: 400; }
.hcp-compact-grid > .hcp-shared-form-row > .hcp-shared-form-control { display: grid; align-content: start; min-width: 0; padding: 0; gap: .25rem; }
.hcp-compact-grid > .hcp-shared-form-row > .hcp-shared-form-control :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 2.15rem; margin: 0; }
.hcp-compact-grid > .hcp-shared-form-row textarea { resize: vertical; }
.hcp-compact-grid .field-validation-error { display: block; overflow-wrap: anywhere; }
.hcp-phone-input { display: grid; grid-template-columns: minmax(6.8rem, 36%) minmax(0, 1fr); gap: .375rem; min-width: 0; width: 100%; }
.hcp-phone-input > :is(select, input) { box-sizing: border-box; min-width: 0; max-width: 100%; width: 100%; }
.hcp-calling-code-display { display: block; position: relative; min-width: 0; width: 100%; }
.hcp-calling-code-display > select { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; padding-inline-end: 2rem !important; }
.hcp-calling-code-caption { position: absolute; inset-block: 1px; inset-inline-start: var(--hcp-calling-padding-start, .75rem); inset-inline-end: 2rem; display: flex; align-items: center; overflow: hidden; white-space: nowrap; pointer-events: none; background: var(--hcp-calling-background, #fff); color: var(--hcp-calling-color, #000); font: var(--hcp-calling-font, inherit); }
.hcp-calling-code-caption[hidden] { display: none; }
@media (forced-colors: active) { .hcp-calling-code-caption { display: none; } }
@media (max-width: 991.98px) {
  .hcp-compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .hcp-compact-grid { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .hcp-compact-grid > .hcp-shared-form-row > .hcp-shared-form-control :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 1rem; min-height: 2.4rem; }
}

/* CG3S View: opt-in section columns; standalone CG3R field grids are not changed. */
/* Existing workflow forms can opt into the same compact rows without changing
   their form, labels, control bindings or independent submitters. */
.hcp-compact-operation > .hcp-compact-grid > label:has(> :is(input, select, textarea)) { display: grid; grid-template-columns: minmax(6.5rem, 28%) minmax(0, 1fr); align-items: center; gap: 8px; margin: 0; font-size: .8rem; }
.hcp-compact-operation > .hcp-compact-grid :is(input, select, textarea):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]) { box-sizing: border-box; min-width: 0; max-width: 100%; width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #ccc; border-radius: 0; font: inherit; background: #fff; color: #000; }
.hcp-compact-operation > .hcp-compact-grid > .row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; }
.hcp-compact-operation > .hcp-compact-grid > .row > [class*="col-"] { width: auto; min-width: 0; padding: 0; }
.hcp-compact-operation .row > [class*="col-"]:has(> label) { display: grid; grid-template-columns: minmax(6.5rem, 28%) minmax(0, 1fr); align-items: start; gap: 8px; }
.hcp-compact-operation .row > [class*="col-"] > label { margin: 0; padding: 8px 0; font-size: .8rem; }
.hcp-form-card:has(.hcp-compact-operation) { border: 0; box-shadow: none; background: #fff; }
.hcp-form-card:has(.hcp-compact-operation) > .card-body { padding: 0; }
.hcp-form-card:has(.hcp-compact-operation) .hcp-section-title h2 { display: none; }
.hcp-provider-editor:has(.hcp-provider-api-config[hidden]) .hcp-compact-sections { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 575.98px) {
  .hcp-compact-operation > .hcp-compact-grid > label:has(> :is(input, select, textarea)), .hcp-compact-operation .row > [class*="col-"]:has(> label) { grid-template-columns: minmax(0, 1fr); }
}
.hcp-compact-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 20px; min-width: 0; width: 100%; padding: 20px; box-sizing: border-box; background: #fff; overflow-wrap: anywhere; }
.hcp-compact-sections.hcp-compact-sections-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hcp-compact-sections > .hcp-compact-section { display: flex; flex-direction: column; min-width: 0; border: 1px solid #ccc; border-radius: 8px; background: #fff; overflow: hidden; }
.hcp-compact-sections > .hcp-compact-section[hidden] { display: none; }
.hcp-compact-sections > .hcp-compact-section-full { grid-column: 1 / -1; }
.hcp-compact-sections .hcp-compact-grid .hcp-compact-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; max-width: 100%; margin: 0; padding: 0; border: 0; }
.hcp-compact-sections .hcp-compact-grid [hidden] { display: none; }
.hcp-compact-sections > .hcp-compact-section > .hcp-compact-section-heading { min-width: 0; padding: 11px 20px; min-height: 42px; font-size: .9rem; }
.hcp-compact-section .hcp-shared-form-row > .hcp-shared-form-control > * { min-width: 0; }
.hcp-compact-sections > .hcp-compact-section > .hcp-compact-grid { flex: 1; grid-template-columns: minmax(0, 1fr); align-content: start; padding: 18px 20px 22px; gap: 16px; }
/* Match the approved CG3S mockup despite legacy settings-sheet heading/body rules. */
.hcp-shared-record-form:has(.hcp-compact-sections) > .hcp-shared-record-heading { min-height: 0; margin: 0; padding: 20px 24px; background: #fff; }
.hcp-shared-record-form:has(.hcp-compact-sections) > .hcp-shared-record-heading h1 { margin: 0; font-size: 23px; font-weight: 600; line-height: 1.3; }
.hcp-shared-record-form:has(.hcp-compact-sections) > .hcp-shared-record-heading .hcp-eyebrow { display: block; font-size: 12px; letter-spacing: .04em; font-weight: 600; }
.hcp-shared-record-form:has(.hcp-compact-sections) > .hcp-shared-record-body { padding: 0 !important; }
.hcp-compact-sections > .hcp-compact-section > .hcp-compact-section-heading { margin: 0; }
.hcp-compact-sections > .hcp-compact-section > .hcp-compact-grid { padding: 19px 20px 22px; }
.hcp-compact-section .hcp-shared-form-row { display: grid; grid-template-columns: minmax(6.5rem, 28%) minmax(0, 1fr); gap: 8px; align-items: start; min-width: 0; min-height: 0; margin: 0; border: 0; }
.hcp-compact-section .hcp-shared-form-row > :is(label, .hcp-field-caption) { min-height: 0; padding: .5rem 0; background: #fff; text-align: left; font-size: .8rem; line-height: 1.4; }
.hcp-compact-section .hcp-shared-form-row:has(> :is(label, .hcp-field-caption).hcp-accessible-label) { grid-template-columns: minmax(0, 1fr); }
.hcp-compact-section .hcp-shared-form-row > .hcp-shared-form-control :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]), select:not([multiple]):is(:not([size]), [size="0"], [size="1"])) { height: 39px; min-height: 39px; border: 1px solid #cbd5e1; border-radius: 0; background-color: #fff; color: #111; padding: 9px 11px; font-size: .9rem; line-height: normal; }
.hcp-shared-record-form:has(.hcp-compact-sections) .hcp-shared-form-actions { padding: 17px 24px !important; background: #fff; }
@media (max-width: 991.98px) {
  .hcp-compact-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .hcp-compact-sections { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px; }
  .hcp-compact-sections.hcp-compact-sections-two { grid-template-columns: minmax(0, 1fr); }
  .hcp-shared-record-form:has(.hcp-compact-sections) > .hcp-shared-record-heading { padding: 18px 20px; }
  .hcp-compact-section .hcp-shared-form-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .hcp-compact-section .hcp-shared-form-row > :is(label, .hcp-field-caption) { padding: 0; }
  .hcp-compact-section .hcp-shared-form-row > .hcp-shared-form-control :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]), select:not([multiple]):is(:not([size]), [size="0"], [size="1"])) { font-size: 1rem; }
}

/* Public calls to action retain the shared dark brand variant; ordinary marketing links are not action controls. */
.hcp-shared-action[data-hcp-action-variant="public"][data-hcp-action-tone]:is(a, button) { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.4rem; padding: .4rem .75rem; border: 1px solid #999; border-radius: 4px; font-size: .8rem; font-weight: 500; line-height: 1.4; background: #fff; color: #000; text-decoration: none; box-shadow: none; }
.hcp-shared-action[data-hcp-action-variant="public"][data-hcp-action-tone="primary"]:is(a, button) { background: #111827; border-color: #111827; color: #fff !important; }
.hcp-shared-action[data-hcp-action-variant="public"][data-hcp-action-tone="primary"]:is(a, button):hover:not(:disabled):not([aria-disabled="true"]) { background: #1f2937; border-color: #1f2937; }
.hcp-shared-action[data-hcp-action-variant="form"][data-hcp-action-tone="danger"]:is(a, button), .hcp-shared-action[data-hcp-action-variant="public"][data-hcp-action-tone="danger"]:is(a, button) { background: #b42318; border-color: #b42318; color: #fff !important; }
.hcp-shared-action[data-hcp-action-variant="public"][data-hcp-action-tone="neutral"]:is(a, button) { color: #000 !important; }
.hcp-shared-action:is([data-hcp-action-variant="form"], [data-hcp-action-variant="public"])[data-hcp-action-tone="danger"]:is(a, button):hover:not(:disabled):not([aria-disabled="true"]) { background: #8f1c13; border-color: #8f1c13; color: #fff !important; }
.hcp-shared-action[data-hcp-action-variant="public"][data-hcp-action-tone]:is(a, button) { min-height: 2.75rem; padding: .65rem 1rem; }

/* Bootstrap-independent accessible row captions and existing noninteractive unavailable actions. */
.hcp-shared-action > .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
span.hcp-shared-action[data-hcp-action-variant="row"][data-hcp-action-tone] { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; border: 1px solid #999; border-radius: .5rem; background: #fff; color: #000; font-size: .8rem; line-height: 1.4; vertical-align: middle; opacity: .55; }
span.hcp-shared-action[data-hcp-action-variant="row"] > svg { width: 1em; height: 1em; flex: 0 0 auto; }

/* Shared native list pager primitives; app-specific pagination geometry stays app-owned. */

.hcp-compact-pagination-host { margin-left: auto !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.hcp-compact-pagination[hidden] { display: none !important; }
.hcp-compact-size-label select { width: auto !important; min-width: 4rem; min-height: 1.8rem; padding: .1rem .25rem; border: 1px solid #cbd6e2; border-radius: 3px; font: inherit; }
.hcp-compact-range { color: #000; }
.hcp-record-table td { overflow-wrap: anywhere; }

@media (max-width: 575.98px) { .hcp-compact-pagination-host, .hcp-compact-pagination { width: 100%; justify-content: flex-start; margin-left: 0 !important; } }

/* Account section layout: shared horizontal rows, compound Name, full-width Notes. */
.hcp-accessible-label { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.hcp-account-sections.hcp-compact-sections { padding: 10px 24px 10px; }
.hcp-account-sections > .hcp-compact-section { border-radius: 18px; }
.hcp-account-sections > .hcp-compact-section > .hcp-compact-grid { padding: 16px; gap: 8px; }
.hcp-account-sections .hcp-compact-grid > .hcp-shared-form-row { display: grid; grid-template-columns: minmax(6.5rem, 28%) minmax(0, 1fr); gap: 8px; align-items: start; min-width: 0; min-height: 0; margin: 0; border: 0; }
.hcp-account-sections .hcp-compact-grid > .hcp-shared-form-row > :is(label, .hcp-field-caption) { min-height: 0; padding: .5rem 0; background: #fff; text-align: left; font-size: .8rem; }
.hcp-account-sections .hcp-compact-grid > .hcp-shared-form-row:has(> :is(label, .hcp-field-caption).hcp-accessible-label) { grid-template-columns: minmax(0, 1fr); }
.hcp-account-sections .hcp-compact-grid > .hcp-shared-form-row > .hcp-shared-form-control :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]), select:not([multiple]):is(:not([size]), [size="0"], [size="1"])) { height: 34px; min-height: 34px; padding: 6px 8px; border-radius: 4px; font-size: .8rem; }
.hcp-name-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.hcp-name-inputs > div { min-width: 0; }
.hcp-account-sections textarea { min-height: 62px; border: 1px solid #cbd5e1; border-radius: 4px; }
/* Plain, full-width Notes below the regular section row; no fourth panel. */
.hcp-compact-sections > .hcp-record-notes { grid-column: 1 / -1; display: grid; gap: 8px; min-width: 0; }
.hcp-record-notes > label { margin: 0; color: #000; font-size: .8rem; font-weight: 700; }
.hcp-record-notes > textarea { width: 100%; max-width: 100%; min-height: 85px; }
@media (max-width: 575.98px) {
  .hcp-account-sections .hcp-compact-grid > .hcp-shared-form-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .hcp-account-sections .hcp-compact-grid > .hcp-shared-form-row > :is(label, .hcp-field-caption) { padding: 0; }
  .hcp-account-sections .hcp-compact-grid > .hcp-shared-form-row > .hcp-shared-form-control :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]), select:not([multiple]):is(:not([size]), [size="0"], [size="1"])) { height: 39px; min-height: 39px; font-size: 1rem; }
}

/* The outer desktop viewport, not a 560px iframe, determines compact form rows. */
[data-hcp-modal-layout="small-desktop"] .hcp-compact-sections:has(> .hcp-compact-section:only-child) { grid-template-columns: minmax(0, 1fr); padding: 20px 44px 40px; }
[data-hcp-modal-layout="small-desktop"] form > .hcp-compact-section { width: auto; margin: 20px; padding: 0; min-width: 0; border: 1px solid #ccc; border-radius: 8px; overflow: hidden; }
[data-hcp-modal-layout="small-desktop"] form > .hcp-compact-section > .hcp-compact-grid { grid-template-columns: minmax(0, 1fr); padding: 12px; }
[data-hcp-modal-layout="small-desktop"] .hcp-shared-form-row,
[data-hcp-modal-layout="small-desktop"] .hcp-compact-section .hcp-shared-form-row { display: grid; grid-template-columns: minmax(6.5rem, 30%) minmax(0, 1fr); gap: 8px; align-items: start; }
[data-hcp-modal-layout="small-desktop"] .hcp-compact-section .hcp-shared-form-row > :is(label, .hcp-field-caption) { padding: .5rem 0; }
[data-hcp-modal-layout="small-desktop"] .hcp-shared-form-row > :is(label, .hcp-field-caption) { justify-content: flex-start; text-align: left; }
[data-hcp-modal-layout="small-desktop"] .hcp-compact-section .hcp-shared-form-row > .hcp-shared-form-control { padding: 0; }

/* Registered permission tree: one aligned matrix, separate from ordinary lists. */
.hcp-permission-tree { margin: 0 20px 16px; min-width: 0; }
.hcp-permission-tree-scroll { max-width: 100%; max-height: min(58dvh, 680px); overflow: auto; border: 1px solid #ccc; border-radius: 8px; }
.hcp-permission-tree-scroll:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.hcp-permission-tree-table { width: 100%; min-width: 720px; table-layout: fixed; border-collapse: collapse; background: #fff; color: #111; font-size: .9rem; }
.hcp-permission-tree-feature-column { width: 28%; }
.hcp-permission-tree-view-column { width: 24%; }
.hcp-permission-tree-table :is(th, td) { padding: 10px 14px; vertical-align: top; text-align: left; border-bottom: 1px solid #ddd; border-right: 1px solid #e1e1e1; overflow-wrap: anywhere; }
.hcp-permission-tree-table tr > :last-child { border-right: 0; }
.hcp-permission-tree-table thead th { position: sticky; top: 0; z-index: 3; background: #cfe6ff; font-weight: 600; }
.hcp-permission-tree-table thead th:first-child { left: 0; z-index: 4; }
.hcp-permission-tree-table tbody th { position: sticky; left: 0; z-index: 2; background: #fff; font-weight: 400; }
.hcp-permission-tree-table .hcp-permission-module-row > :is(th, td) { background: #eee; }
.hcp-permission-tree-table .hcp-permission-module-row th { font-weight: 600; }
.hcp-permission-tree-table tbody tr:not(.hcp-permission-module-row):hover > :is(th, td) { background: #f7f7f7; }
.hcp-permission-tree-table [hidden] { display: none !important; }
.hcp-permission-tree-branch, .hcp-permission-tree-table label { display: flex; align-items: center; gap: 10px; margin: 0; min-width: 0; }
.hcp-permission-tree-table label { cursor: pointer; font-weight: inherit; }
.hcp-permission-tree-table label:has(input:disabled) { cursor: default; }
.hcp-permission-tree-table input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: #c00; }
/* Read-only checked/mixed choices retain a visible white mark in every app. */
html body input[type="checkbox"]:not(.form-switch .form-check-input):disabled:is(:checked, :indeterminate) { border-color: #475569; background-color: #475569; opacity: 1; }
.hcp-permission-tree-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; width: 24px; height: 24px; padding: 2px; border: 0; background: transparent; color: inherit; }
.hcp-permission-tree-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.hcp-permission-tree-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.hcp-permission-tree-feature { padding-left: 34px; border-left: 1px dashed #ccc; margin-left: 11px; }
.hcp-permission-tree-choices { display: flex; flex-wrap: wrap; align-items: start; gap: 10px 18px; }
.hcp-permission-tree-choices label { align-items: start; }
.hcp-permission-tree-choices input { margin-top: 2px !important; }
.hcp-permission-tree-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 12px 0 0; font-size: .8rem; }
.hcp-role-editor { min-width: 0; }
.hcp-role-editor .hcp-shared-record-heading { min-height: 0; background: #fff; padding: 16px 20px; }
.hcp-role-editor .hcp-shared-record-heading .hcp-eyebrow { color: #c00; }
.hcp-role-editor .hcp-role-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: start; gap: 12px 20px; padding: 16px 20px; }
.hcp-role-details > .hcp-shared-form-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; border-bottom: 0; }
.hcp-role-details > .hcp-shared-form-row > :is(label, .hcp-field-caption) { margin: 0; padding: 0; width: auto; justify-content: flex-start; background: transparent; text-align: left; font-size: .8rem; }
.hcp-role-details .hcp-shared-form-control { width: 100%; padding: 0; min-width: 0; }
.hcp-role-details .form-control { width: 100%; min-height: 34px; padding: 6px 8px; font-size: .9rem; }
.hcp-role-details textarea.form-control { height: 34px; resize: vertical; }
.hcp-role-details > .hcp-shared-form-row:nth-child(3) { flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 24px; }
.hcp-role-details > .hcp-shared-form-row:nth-child(3) .hcp-shared-form-control { width: auto; }
.hcp-role-details > p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 767.98px) {
  .hcp-role-editor .hcp-role-details { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
  .hcp-role-details > .hcp-shared-form-row:nth-child(3) { padding-top: 0; }
  .hcp-role-details .form-control { min-height: 39px; font-size: 1rem; }
  .hcp-permission-tree { margin: 0 12px 12px; }
}

/* Explicit compact native-modal opt-in; shared record, section, table and action components remain authoritative. */
.hcp-shared-record-form:has(.hcp-compact-native-content) { margin: 0; }
.hcp-shared-record-form:has(.hcp-compact-native-content) > .hcp-shared-record-heading { padding: 16px 20px; border-bottom: 2px dashed #808080; background: #fff; }
.hcp-shared-record-form:has(.hcp-compact-native-content) > .hcp-shared-record-heading h1 { font-size: 23px; font-weight: 600; line-height: 1.3; }
.hcp-shared-record-form:has(.hcp-compact-native-content) > .hcp-shared-record-heading .hcp-eyebrow { display: block; margin: 0 0 5px; font-size: 12px; font-weight: 600; }
.hcp-compact-native-content { min-width: 0; padding: 16px 20px 20px; background: #fff; }
.hcp-modal-document main.shell:has(.hcp-compact-native-content) { padding: 0; max-width: none; }
.hcp-compact-native-content > form { margin: 0; }
.hcp-compact-native-content:has(> .hcp-compact-modal-toolbar:first-child) { padding-top: 0; }
.hcp-compact-native-content:has(> :is(form, [data-hcp-admin-readonly]) > .hcp-compact-modal-toolbar) { padding-top: 0; }
.hcp-compact-native-content > .hcp-compact-modal-toolbar.hcp-record-toolbar.hcp-shared-list-actions,
.hcp-compact-native-content > :is(form, [data-hcp-admin-readonly]) > .hcp-compact-modal-toolbar.hcp-record-toolbar.hcp-shared-list-actions { margin-inline: -20px; width: calc(100% + 40px); max-width: none; padding: 4px 24px; }
@media (max-width: 767.98px) {
  .hcp-compact-native-content > .hcp-compact-modal-toolbar.hcp-record-toolbar.hcp-shared-list-actions,
  .hcp-compact-native-content > :is(form, [data-hcp-admin-readonly]) > .hcp-compact-modal-toolbar.hcp-record-toolbar.hcp-shared-list-actions { margin-inline: -12px; width: calc(100% + 24px); padding-inline: 16px; }
  [data-hcp-modal-layout="small-desktop"] .hcp-compact-native-content > .hcp-compact-modal-toolbar.hcp-record-toolbar.hcp-shared-list-actions,
  [data-hcp-modal-layout="small-desktop"] .hcp-compact-native-content > :is(form, [data-hcp-admin-readonly]) > .hcp-compact-modal-toolbar.hcp-record-toolbar.hcp-shared-list-actions { padding-inline: 24px; }
}
.hcp-compact-native-content > :is(form, [data-hcp-admin-readonly]):has(> .hcp-compact-modal-toolbar) > .validation-summary-valid { display: none; }
.hcp-dns-service-compact .hcp-dns-role { padding: 0; background: transparent; }
[data-hcp-modal-layout="small-desktop"] .hcp-dns-service-compact .hcp-compact-sections.hcp-compact-native-sections:has(> .hcp-compact-section:only-child) { padding: 0; }
[data-hcp-modal-layout="small-desktop"] .hcp-compact-sections.hcp-compact-native-sections.hcp-compact-native-single { padding: 0; }
.hcp-compact-native-summary { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px 18px; min-width: 0; max-width: 100%; margin: 0 0 14px; padding: 0 0 4px; overflow-x: auto; white-space: nowrap; font-size: .85rem; line-height: 1.5; }
.hcp-compact-native-summary > * { flex: 0 0 auto; margin: 0; }
.hcp-compact-native-summary:focus-visible, .hcp-compact-native-table-scroll:focus-visible { outline: 2px solid #1675be; outline-offset: 2px; }
.hcp-compact-sections.hcp-compact-native-sections { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 0; }
.hcp-compact-sections.hcp-compact-native-sections.hcp-compact-native-sections-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hcp-compact-native-sections > .hcp-compact-section { border: 1px solid #ccc; border-radius: 8px; }
.hcp-compact-native-sections > .hcp-compact-section > .hcp-compact-section-heading { min-height: 0; padding: 9px 14px; }
.hcp-compact-native-sections > .hcp-compact-section > .hcp-compact-grid { padding: 12px 14px; gap: 12px; }
.hcp-compact-native-sections .hcp-shared-form-row { grid-template-columns: minmax(6.5rem, 28%) minmax(0, 1fr); }
.hcp-compact-native-sections .hcp-shared-form-row:has(> :is(label, .hcp-field-caption).hcp-accessible-label) { grid-template-columns: minmax(0, 1fr); }
.hcp-compact-native-sections .hcp-shared-form-row > .hcp-shared-form-control :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]), select:not([multiple]):is(:not([size]), [size="0"], [size="1"])) { height: 34px; min-height: 34px; padding: 6px 9px; }
.hcp-compact-native-table-scroll { min-width: 0; max-width: 100%; margin: 0; padding: 0; border: 0; }
.hcp-compact-native-table.table.hcp-record-table { width: 100%; margin: 0; border: 0; }
.hcp-compact-native-table.table.hcp-record-table > :not(caption) > * > * { padding: 8px 12px; font-size: .85rem; line-height: 1.4; }
.hcp-compact-native-table th:first-child, .hcp-compact-native-table td:first-child { width: 1%; white-space: nowrap; }
.hcp-compact-native-table th:last-child, .hcp-compact-native-table td:last-child { white-space: nowrap; }
.hcp-compact-native-table .form-check-input { margin: 0; vertical-align: middle; }
.hcp-compact-native-empty { margin: 0; padding: 12px 14px; }
.hcp-compact-native-content .hcp-shared-form-actions { margin: 0; padding: 16px 0 0 !important; border: 0; background: #fff; }
@media (max-width: 767.98px) {
  .hcp-compact-native-content { padding: 12px; }
  .hcp-compact-sections.hcp-compact-native-sections.hcp-compact-native-sections-two { grid-template-columns: minmax(0, 1fr); }
  .hcp-compact-native-table.table.hcp-record-table { min-width: 620px; }
}

/* Users mockups adopt the shared compact editor; other consumers keep their existing density. */
.hcp-users-note { margin: 0 0 14px; color: #555; font-size: .85rem; line-height: 1.45; }
.hcp-users-description { display: grid; gap: 6px; margin-top: 16px; }
.hcp-users-description > label { margin: 0; font-weight: 600; }
.hcp-users-description > textarea { width: 100%; min-height: 70px; resize: vertical; }
.hcp-users-role-options, .hcp-users-permission-options { min-width: 0; padding: 0; margin: 0; border: 0; }
.hcp-users-role-options > legend, .hcp-users-permission-options > legend { float: none; width: auto; margin: 0 0 8px; padding: 0; font-size: .9rem; font-weight: 600; }
.hcp-users-role-list { max-height: 210px; overflow: auto; border: 1px solid #ccc; border-radius: 4px; }
.hcp-users-role-list > label, .hcp-users-permission-options > label { display: flex !important; align-items: flex-start; gap: 10px; margin: 0; padding: 8px 10px; font-size: .85rem; line-height: 1.4; }
.hcp-users-role-list > label + label { border-top: 1px solid #e1e1e1; }
.hcp-users-role-list input, .hcp-users-permission-options input { flex: 0 0 auto; margin: 2px 0 0; }
.hcp-users-permission-options { padding-top: 12px; border-top: 1px solid #ddd; }
.hcp-users-permission-options > label { padding: 5px 0; }
.hcp-users-role-metadata { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px 12px; align-items: baseline; margin: 12px 0; }
.hcp-users-role-metadata :is(dt, dd) { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.hcp-users-role-metadata dt { font-weight: 600; }
.hcp-users-role-metadata dd:last-child { grid-column: 2 / -1; white-space: pre-wrap; }
.hcp-users-role-editor .hcp-role-details { padding: 12px 0; }
.hcp-users-role-editor .hcp-permission-tree { margin: 0; }
.hcp-users-role-editor .hcp-permission-tree-table :is(th, td) { padding: 7px 10px; }
.hcp-users-role-editor .hcp-permission-tree-choices { gap: 6px 12px; }
.hcp-users-role-editor .hcp-permission-tree-summary { padding-top: 8px; }
.hcp-users-compact-content > [data-hcp-admin-readonly] > .hcp-shared-list-actions,
.hcp-users-compact-content > form > .hcp-shared-list-actions { margin: 0; padding: 0 0 12px; }
.hcp-users-member-list .hcp-column-filters { display: none; }
.hcp-users-member-list .hcp-grid-summary { margin: 0; padding: 10px 0 0; border: 0; }
.hcp-users-access-section { margin-top: 16px; }
.hcp-users-section-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hcp-users-access-section .hcp-users-section-actions > h2 { margin: 0; padding: 0; font-family: inherit; font-size: .9rem; line-height: 1.4; font-weight: 600; }
.hcp-users-section-actions > .hcp-record-toolbar.hcp-shared-list-actions { flex: 0 0 auto; width: auto; min-height: 0; margin: 0 0 0 auto; padding: 0; border: 0; background: transparent; }
.hcp-users-compact-content [data-login-account-editor] .hcp-shared-form-control > :is(.badge, .btn) { justify-self: start; width: auto; max-width: 100%; }
.hcp-users-access-section .hcp-users-note { margin: 0; padding: 10px 14px; }
.hcp-users-compact-content .form-text { margin: 4px 0 0; font-size: .8rem; line-height: 1.4; }
.hcp-users-bootstrap-dialog .modal-header, .hcp-users-staff-roles > .hcp-list-heading { gap: 12px; padding: 16px 20px; border-bottom: 2px dashed #808080; background: #fff; }
.hcp-users-bootstrap-dialog .hcp-eyebrow { margin: 0 0 5px; color: #c00000; font-size: 12px; font-weight: 600; }
.hcp-users-bootstrap-dialog .hcp-users-modal-header-actions { flex: 0 0 auto; margin: 0; padding: 0 !important; border: 0; }
.hcp-users-staff-roles .hcp-record-table > :not(caption) > * > * { padding: 7px 10px; }
@media (max-width: 767.98px) {
  .hcp-users-role-metadata { grid-template-columns: auto minmax(0, 1fr); }
  .hcp-users-role-metadata dd:last-child { grid-column: auto; }
  .hcp-users-section-actions { flex-wrap: wrap; }
  .hcp-users-bootstrap-dialog .modal-header { flex-wrap: wrap; }
}
@media (max-width: 575.98px) {
  .hcp-compact-native-sections .hcp-shared-form-row { grid-template-columns: minmax(0, 1fr); }
  .hcp-compact-native-sections .hcp-shared-form-row > .hcp-shared-form-control :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select) { font-size: 1rem; }
}

/* One field typography standard in every app, including mobile, settings,
   account forms, inline editors and read-only shared field values. Keep this
   authoritative over legacy compact/small-control and app-specific sizes. */
form,
.hcp-shared-record-form,
label,
.form-label,
.col-form-label,
.form-check-label,
.hcp-field-caption,
.hcp-field-label,
.hcp-field-value,
.hcp-shared-form-control,
.form-control,
.form-control-plaintext,
.form-select,
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
select,
select option,
select optgroup,
textarea,
output,
.hcp-shared-form-control > :is(span, p, div):not(.form-text):not(.invalid-feedback):not(.valid-feedback),
:is(form, .hcp-shared-record-form, .hcp-settings-surface, .hcp-record-editor, .hcp-form-modal, .wsm-key-values) :is(dt, dd) {
  font-size: .9rem !important;
}

/* Shared desktop field-row spacing; horizontal and mobile gaps stay independent. */
@media (min-width: 768px) {
  .hcp-compact-section > .hcp-compact-grid,
  .hcp-compact-sections > .hcp-compact-section > .hcp-compact-grid,
  .hcp-compact-sections .hcp-compact-grid .hcp-compact-grid {
    row-gap: 12px;
  }

  .hcp-compact-section > .hcp-compact-grid,
  .hcp-compact-sections > .hcp-compact-section > .hcp-compact-grid {
    padding: 12px;
  }
  .hcp-compact-section > .hcp-compact-section-heading,
  .hcp-compact-sections > .hcp-compact-section > .hcp-compact-section-heading {
    padding: 12px;
    min-height: 0;
  }
  [data-hcp-modal-layout="small-desktop"] .hcp-compact-sections:has(> .hcp-compact-section:only-child) {
    padding: 20px;
  }

  /* Single-line height: text line + 6px padding on each side + borders. */
  .hcp-compact-section > .hcp-compact-grid > .hcp-shared-form-row {
    margin: 0 !important;
  }
  input:not(:is([type="hidden"], [type="checkbox"], [type="radio"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="file"], [type="range"], [type="color"])),
  select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) {
    box-sizing: border-box;
    height: calc(.9rem + 14px) !important;
    min-height: 0 !important;
    padding: 6px !important;
    line-height: 1 !important;
  }
  textarea {
    padding: 6px !important;
    line-height: 1 !important;
  }
  label, .hcp-field-caption, .hcp-field-value, .form-control-plaintext {
    line-height: 1 !important;
  }
  .hcp-compact-section .hcp-shared-form-row > :is(label, .hcp-field-caption):not(.hcp-accessible-label) {
    display: flex;
    align-items: center;
    min-height: calc(.9rem + 14px);
    padding: 0 !important;
    line-height: 1;
  }
  .hcp-form-static-value {
    display: flex;
    align-items: center;
    min-height: calc(.9rem + 14px);
    line-height: 1;
  }
  .hcp-form-static-value .badge {
    font-size: .9rem;
  }
  .hcp-compact-section .hcp-shared-form-row:has(> .hcp-shared-form-control > .hcp-form-static-value) {
    align-items: center;
  }
}

/* Desktop modals of any size may host a <768px iframe. Their parent supplies
   a density marker using the outer viewport; retain desktop density inside it.
   Ordinary mobile forms have no marker and keep their touch-sized controls. */
@media (max-width: 767.98px) {
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-section > .hcp-compact-grid,
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-sections > .hcp-compact-section > .hcp-compact-grid,
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-sections .hcp-compact-grid .hcp-compact-grid {
    row-gap: 12px;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-section > .hcp-compact-grid,
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-sections > .hcp-compact-section > .hcp-compact-grid,
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-section > .hcp-compact-section-heading,
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-sections > .hcp-compact-section > .hcp-compact-section-heading {
    padding: 12px;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-section > .hcp-compact-section-heading,
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-sections > .hcp-compact-section > .hcp-compact-section-heading {
    min-height: 0;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-sections:has(> .hcp-compact-section:only-child) {
    padding: 20px;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-section > .hcp-compact-grid > .hcp-shared-form-row {
    margin: 0 !important;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) input:not(:is([type="hidden"], [type="checkbox"], [type="radio"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="file"], [type="range"], [type="color"])),
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) {
    box-sizing: border-box;
    height: calc(.9rem + 14px) !important;
    min-height: 0 !important;
    padding: 6px !important;
    line-height: 1 !important;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) textarea {
    padding: 6px !important;
    line-height: 1 !important;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) :is(label, .hcp-field-caption, .hcp-field-value, .form-control-plaintext) {
    line-height: 1 !important;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-section .hcp-shared-form-row > :is(label, .hcp-field-caption):not(.hcp-accessible-label) {
    display: flex;
    align-items: center;
    min-height: calc(.9rem + 14px);
    padding: 0 !important;
    line-height: 1;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-form-static-value {
    display: flex;
    align-items: center;
    min-height: calc(.9rem + 14px);
    line-height: 1;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-form-static-value .badge {
    font-size: .9rem;
  }
  :is([data-hcp-modal-layout="small-desktop"], [data-hcp-form-density="desktop"]) .hcp-compact-section .hcp-shared-form-row:has(> .hcp-shared-form-control > .hcp-form-static-value) {
    align-items: center;
  }
}
