/* Shared HCS page primitives. Domain-specific styles stay in main.css. */

.hcs-document-form-fields,
.hcs-document-form-actions { display: grid; gap: var(--hcs-space-2); align-content: start; min-width: 0; }
.hcs-document-file-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--hcs-space-2);
}
.hcs-document-file-list,
.hcs-document-file-list table,
.hcs-document-file-list tbody tr,
.hcs-document-file-list td {
    height: auto;
}
.hcs-document-file-list :is(th, td) {
    padding-block: var(--hcs-space-2);
}
.hcs-document-preview-pane .hcs-pdf-frame {
    min-height: 28rem;
}
.hcs-document-preview-pane .hcs-pdf-frame__viewport,
.hcs-document-preview-pane .hcs-pdf-frame__embed {
    min-height: 0;
}
.hcs-document-preview-pane .hcs-file-preview-card {
    margin: 0;
    max-width: none;
    min-height: 0;
}
/* Two columns, but the left stack stays content-sized so later fields sit tight. */
@media (min-width: 992px) {
    .hcs-document-detail-row:has(.hcs-document-form-fields) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: var(--hcs-space-4) var(--hcs-space-6);
        margin: 0;
        align-items: start;
    }
    .hcs-document-detail-row:has(.hcs-document-form-fields) > * {
        width: auto;
        max-width: none;
        padding: 0;
        margin: 0;
    }
    .hcs-document-detail-row:has(.hcs-document-form-fields) .hcs-document-form-pane > .hcs-catalog-form {
        align-content: start;
        gap: var(--hcs-space-2);
    }
    .hcs-document-detail-row:has(.hcs-document-form-fields) .hcs-document-form-fields > .field:last-child { margin-bottom: 0; }
    .hcs-document-detail-row:has(.hcs-document-form-fields) .hcs-document-preview-pane {
        min-height: 0;
        overflow: hidden;
    }
}
.hcs-document-preview-empty {
    background: var(--hcs-color-background);
    border: 1px solid var(--hcs-color-border);
    border-radius: var(--hcs-radius);
    color: var(--hcs-color-ink);
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}
.hcs-document-preview-empty__heading {
    border-bottom: 1px solid var(--hcs-color-border);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    padding: 1rem 1.25rem;
}
.hcs-document-preview-empty__body {
    align-items: center;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 340px;
    padding: 2rem 1.5rem;
    text-align: center;
}
.hcs-document-preview-empty__body::before { content: ""; flex: 1; }
.hcs-document-preview-empty__body::after { content: ""; flex: 2; }
.hcs-document-preview-empty__icon {
    color: var(--hcs-color-primary-strong);
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
}
.hcs-document-preview-empty__body h3 { color: var(--hcs-color-ink); font-size: 1.05rem; font-weight: 600; margin: 0 0 .65rem; }
.hcs-document-preview-empty__body p { margin: 0 0 .5rem; }
.hcs-document-preview-empty__body :is(p, small) { color: var(--hcs-color-muted); max-width: 28rem; }
@media (max-width: 991.98px) {
    .hcs-document-preview-empty__body { min-height: 220px; padding: 1.5rem 1rem; }
}

.hcs-login-redirect {
    align-items: center;
    color: var(--hcs-color-muted);
    display: flex;
    gap: var(--hcs-space-3);
    justify-content: center;
    min-height: min(60dvh, 24rem);
    padding: var(--hcs-space-6) var(--hcs-page-gutter);
    text-align: center;
}

.hcs-app-shell :where(a, button, summary):focus-visible,
.hcs-app-shell :where(input[type="checkbox"], input[type="radio"]):focus-visible,
.hcs-auth-login-page :where(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--hcs-color-primary, var(--color-primary, #00B4A9));
    outline-offset: 2px;
}

.hcs-app-shell .hcs-touch-target,
.hcs-app-shell .btn,
.hcs-app-shell button:not(.week-cell):not(.hcs-ws-dn):not(.tree-toggle):not(.icon-btn):not(.cal-type):not(.cal-event):not(.queue-tab):not(.doc-action):not(.doc-action-label):not(.send-doc-tab):not(.process-side-tab):not(.vb-tab):not(.select2-selection__clear):not(.doc-title-open):not(.post-actions-meta-btn):not(.post-action):not(.comment-meta-btn):not(.comment-react-open):not(.react-choice):not(.hcs-ws-doc-name):not(.hcs-ws-proj-name):not(.hcs-ws-task-name):not(.hcs-ws-ev-name):not(.hcs-ws-project__task-name):not(.admin-role-option__select):not(.admin-role-option__more-btn):not(.hcs-settings-switch):not(.hcs-storage-switch):not(.hcs-storage-provider),
.hcs-app-shell [role="button"]:not(.week-cell):not(.hcs-ws-dn):not(.icon-btn):not(.queue-tab):not(.send-doc-tab):not(.process-side-tab):not(.vb-tab):not(.select2-selection__clear):not(.doc-title-open):not(.post-actions-meta-btn):not(.post-action) {
    min-height: var(--hcs-touch-target);
}

.hcs-app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.hcs-app-shell select,
.hcs-app-shell textarea {
    font-size: 1rem;
}

.hcs-page {
    margin: 0 auto;
    max-width: var(--hcs-content-max-width);
    min-width: 0;
    width: 100%;
}

.hcs-page__header {
    align-items: flex-end;
    display: flex;
    gap: var(--hcs-space-4);
    justify-content: space-between;
    margin-bottom: var(--hcs-space-4);
}

.hcs-page__header h1,
.hcs-page__header h2 {
    color: var(--hcs-color-heading);
    font-size: var(--hcs-font-size-title);
    letter-spacing: -.025em;
    margin: 0;
    text-wrap: balance;
}

.hcs-page__header p {
    color: var(--hcs-color-muted);
    margin: var(--hcs-space-2) 0 0;
    max-width: 65ch;
}

.hcs-page__actions,
.hcs-toolbar,
.hcs-filter-bar,
.hcs-modal-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--hcs-space-2);
}

.hcs-page__actions,
.hcs-modal-actions {
    justify-content: flex-end;
}

.hcs-toolbar,
.hcs-filter-bar {
    justify-content: space-between;
    margin-bottom: var(--hcs-space-4);
}

.hcs-filter-panel {
    background: var(--hcs-color-surface-muted);
    border: 1px solid var(--hcs-color-border);
    border-radius: var(--hcs-radius-md);
    padding: var(--hcs-space-4);
}

.hcs-data-surface {
    background: var(--hcs-color-surface);
    border: 1px solid var(--hcs-color-border);
    border-radius: var(--hcs-radius-md);
    box-shadow: var(--hcs-shadow-sm);
    min-width: 0;
}

.hcs-table-wrap {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    overscroll-behavior-inline: contain;
}

.hcs-table-wrap .docs-table-scroll,
.hcs-table-wrap--scroll {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.hcs-table-wrap--scroll,
.docs-table-scroll {
    scrollbar-color: #9aafbc transparent;
    scrollbar-width: thin;
}

.hcs-table-scroll-hint {
    color: var(--hcs-color-muted);
    display: none;
    font-size: .82rem;
    margin: 0;
    padding: 0 var(--hcs-space-4) var(--hcs-space-3);
}

.hcs-mobile-list {
    display: grid;
    gap: var(--hcs-space-3);
}

.hcs-mobile-list > * {
    min-width: 0;
}

.hcs-state {
    align-items: center;
    color: var(--hcs-color-muted);
    display: grid;
    gap: var(--hcs-space-2);
    justify-items: center;
    min-height: 10rem;
    padding: var(--hcs-space-6) var(--hcs-space-4);
    text-align: center;
}

.hcs-state h2,
.hcs-state p {
    margin: 0;
}

.hcs-state h2 {
    color: var(--hcs-color-heading);
    font-size: var(--hcs-font-size-section-title);
}

.hcs-state--error {
    color: var(--hcs-color-danger);
}

.hcs-state--error h2 {
    color: var(--hcs-color-danger);
}

.hcs-app-shell .hcs-status-badge,
.hcs-app-shell .hcs-priority-badge,
.hcs-app-shell .hcs-progress-badge {
    line-height: 1;
    overflow-wrap: normal;
    word-break: normal;
}

.hcs-app-shell .hcs-icon-button,
.hcs-app-shell .hcs-nav-toggle,
.hcs-app-shell .hcs-user-menu summary,
.hcs-app-shell .hcs-nav-menu__trigger {
    min-height: var(--hcs-touch-target);
}

.hcs-app-shell .hcs-catalog-grid-card,
.hcs-app-shell .card {
    min-width: 0;
}

/* Contain wide data grids at the data surface. A grid item defaults to its
   min-content width; without this guard a 900px table can widen the whole
   .hcs-document-layout and make the page/header appear horizontally clipped. */
.hcs-app-shell .hcs-document-layout,
.hcs-app-shell .hcs-document-layout > *,
.hcs-app-shell .hcs-catalog-page {
    max-width: 100%;
    min-width: 0;
}

.hcs-app-shell .hcs-catalog-grid-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.hcs-app-shell .hcs-catalog-grid-card > .card-body,
.hcs-app-shell .hcs-catalog-grid-card .table-responsive {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hcs-sr-only {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}

.hcs-stack {
    display: grid;
    gap: var(--hcs-space-4);
}

.hcs-cluster {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--hcs-space-2);
}

.hcs-truncate {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hcs-only-mobile {
    display: none !important;
}

.hcs-only-desktop {
    display: block !important;
}

@media (max-width: 767.98px) {
    .hcs-only-mobile {
        display: block !important;
    }

    .hcs-only-desktop {
        display: none !important;
    }

    .hcs-page__header,
    .hcs-toolbar,
    .hcs-filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .hcs-page__header h1 {
        font-size: var(--hcs-font-size-title);
    }

    .hcs-page__actions,
    .hcs-modal-actions {
        justify-content: stretch;
        width: 100%;
    }

    .hcs-page__actions > .btn,
    .hcs-page__actions > button,
    .hcs-modal-actions > .btn,
    .hcs-modal-actions > button {
        flex: 1 1 12rem;
    }

    .hcs-filter-panel {
        padding: var(--hcs-space-3);
    }

    .hcs-app-shell .hcs-catalog-form .form-control,
    .hcs-app-shell .hcs-catalog-form .form-select,
    .hcs-app-shell .hcs-catalog-form .numeric-picker,
    .hcs-app-shell .hcs-catalog-form .b-is-datepicker,
    .hcs-app-shell .hcs-catalog-form .b-is-datepicker .form-control,
    .hcs-app-shell .hcs-document-page input.form-control:not(textarea),
    .hcs-app-shell .hcs-document-page .form-select,
    .hcs-app-shell .hcs-catalog-search .form-control,
    .hcs-app-shell .hcs-catalog-search .input-group-text,
    .hcs-app-shell .hcs-catalog-search .btn,
    .hcs-app-shell .hcs-catalog-filter-toggle,
    .hcs-app-shell .hcs-users-search-input,
    .hcs-app-shell .hcs-users-search-bar .btn,
    .hcs-app-shell .hcs-users-filter-toggle {
        height: auto;
        max-height: none !important;
        min-height: var(--hcs-control-height);
    }

    .hcs-table-scroll-hint {
        display: block;
    }

    .hcs-table-wrap--scroll table {
        min-width: 48rem;
    }

    .hcs-app-shell .hcs-catalog-grid-card .card-body {
        padding: var(--hcs-space-4);
    }

    .hcs-app-shell .hcs-catalog-grid {
        min-width: 760px;
    }

    .hcs-app-shell .hcs-catalog-grid td:has(.hcs-row-actions) {
        background: var(--hcs-color-surface);
        position: sticky;
        right: 0;
        z-index: 2;
    }

    .hcs-app-shell .hcs-catalog-grid td:has(.hcs-row-actions)::before {
        background: rgba(19, 47, 70, .08);
        content: "";
        inset: 0 auto 0 -.4rem;
        pointer-events: none;
        position: absolute;
        width: .4rem;
    }
}

@media (min-width: 768px) {
    .hcs-app-shell .hcs-catalog-grid-card .card-body {
        overflow-x: auto;
    }
}

/* Cross-page responsive defaults. Keep complex data grids scrollable; opt simple
   four-column tables into the stacked pattern with .hcs-table-wrap--stacked. */
.hcs-app-shell .hcs-workspace {
    --ws-accent: var(--color-primary);
    --ws-text: var(--color-foreground, var(--hcs-color-ink));
    --ws-muted: var(--color-muted, var(--hcs-color-muted));
    --ws-faint: var(--color-gray-400, #94A3B8);
    --ws-line: var(--color-border, var(--hcs-color-border));
}

.hcs-app-shell .hcs-account-page :where(.hcs-account-tab, .hcs-account-avatar__upload),
.hcs-app-shell .hcs-notification-panel :where(button, a:not(.hcs-notification-panel__item)),
.hcs-app-shell .hcs-signatures-panel :where(button, label[role="button"]) {
    min-height: var(--hcs-touch-target);
}

.hcs-app-shell .hcs-table-wrap {
    overflow: hidden;
}

.hcs-app-shell :where(.table-responsive, .hcs-users-grid-card .card-body, .hcs-table-wrap .docs-table-scroll, .hcs-table-wrap--scroll) {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hcs-app-shell :where(.card, .hcs-language-grid-card, .hcs-language-text-grid-card, .hcs-ou-members-card, .hcs-data-table):has(.table-responsive) {
    overflow: hidden;
}

.hcs-app-shell :where(.hcs-catalog-grid, .hcs-users-grid) {
    min-width: 48rem;
}

.hcs-app-shell :where(.hcs-catalog-grid, .hcs-users-grid) th,
.hcs-app-shell :where(.hcs-catalog-grid, .hcs-users-grid) td {
    vertical-align: middle;
}

.hcs-app-shell :where(.hcs-modal-actions, .hcs-signature-dialog__actions) {
    gap: var(--hcs-space-2);
}

.hcs-app-shell .modal-dialog {
    max-width: min(100% - 2rem, 48rem);
}

.hcs-app-shell .modal-content {
    max-height: calc(100dvh - 2rem);
}

.hcs-app-shell .modal-body {
    min-height: 0;
    overflow-anchor: none;
    overflow-y: auto;
}

.hcs-app-shell .hcs-datepicker,
.hcs-app-shell .modal .hcs-datepicker .b-is-datepicker {
    overflow: visible;
    position: relative;
}

.hcs-datepicker-layer {
    display: contents;
}

body:has(.hcs-app-shell) .hcs-datepicker-layer .datepicker-calendar.dropdown-menu,
body:has(.hcs-app-shell) .datepicker-calendar.dropdown-menu[data-hcs-hosted] {
    background: #fff;
    border: 1px solid var(--hcs-input-border);
    box-shadow: var(--hcs-shadow-md, 0 12px 32px rgba(23, 50, 68, .18));
    color: var(--hcs-color-ink);
    z-index: 1065;
}

body:has(.hcs-app-shell) .datepicker-calendar,
body:has(.hcs-app-shell) .datepicker-header,
body:has(.hcs-app-shell) .datepicker-header button,
body:has(.hcs-app-shell) .datepicker-title,
body:has(.hcs-app-shell) .datepicker-title select,
body:has(.hcs-app-shell) .datepicker-title input,
body:has(.hcs-app-shell) .datepicker-weekday,
body:has(.hcs-app-shell) .datepicker-time,
body:has(.hcs-app-shell) .datepicker-time-input,
body:has(.hcs-app-shell) .datepicker-button,
body:has(.hcs-app-shell) .datepicker-calendar .btn {
    color: var(--hcs-color-ink);
}

body:has(.hcs-app-shell) .datepicker-weekday {
    color: var(--hcs-color-muted);
}

body:has(.hcs-app-shell) .datepicker-day:not(.datepicker-day-selected):not(.datepicker-day-range-start):not(.datepicker-day-range-end),
body:has(.hcs-app-shell) .datepicker-month:not(.datepicker-month-selected) {
    color: var(--hcs-color-ink);
}

body:has(.hcs-app-shell) .datepicker-day-outside:not(.datepicker-day-selected) {
    color: var(--hcs-color-muted);
    opacity: 1;
}

.hcs-table-mobile-hint {
    color: var(--hcs-color-muted);
    display: none;
    font-size: .82rem;
    margin: 0;
    padding: var(--hcs-space-3) var(--hcs-space-4) 0;
}

.hcs-table-wrap--stacked table {
    width: 100%;
}

@media (max-width: 767.98px) {
    .hcs-app-shell .hcs-workspace .hcs-ws-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hcs-app-shell .hcs-workspace .hcs-ws-card-hd {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .hcs-app-shell .hcs-workspace .hcs-ws-card-hd .btn:not(.hcs-ws-add) {
        flex: 1 1 100%;
        justify-content: center;
    }

    .hcs-app-shell .hcs-account-tabs {
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .hcs-app-shell .hcs-account-tabs::-webkit-scrollbar {
        display: none;
    }

    .hcs-app-shell .hcs-account-tab {
        flex: 0 0 max-content;
    }

    .hcs-app-shell .hcs-users-grid-card .card-body {
        padding-inline: var(--hcs-space-3);
    }

    .hcs-table-mobile-hint {
        display: block;
    }

    .hcs-table-wrap--stacked {
        overflow: visible;
    }

    .hcs-table-wrap--stacked table,
    .hcs-table-wrap--stacked tbody,
    .hcs-table-wrap--stacked tr,
    .hcs-table-wrap--stacked td {
        display: block;
        width: 100%;
    }

    .hcs-table-wrap--stacked thead {
        height: 1px;
        overflow: hidden;
        position: absolute;
        width: 1px;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .hcs-table-wrap--stacked tbody {
        display: grid;
        gap: var(--hcs-space-3);
        padding: var(--hcs-space-3);
    }

    .hcs-table-wrap--stacked tr {
        background: var(--hcs-color-surface);
        border: 1px solid var(--hcs-color-border);
        border-radius: var(--hcs-radius-md);
        box-shadow: var(--hcs-shadow-sm);
        padding: var(--hcs-space-2) var(--hcs-space-4);
    }

    .hcs-table-wrap--stacked td {
        border: 0;
        display: grid;
        gap: var(--hcs-space-2);
        grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
        padding: var(--hcs-space-3) 0;
        text-align: start;
    }

    .hcs-table-wrap--stacked td + td {
        border-top: 1px solid var(--hcs-color-border);
    }

    .hcs-table-wrap--stacked td::before {
        color: var(--hcs-color-muted);
        content: attr(data-label);
        font-size: .78rem;
        font-weight: 600;
    }
}

@media (max-width: 419.98px) {
    .hcs-app-shell .hcs-workspace .hcs-ws-kpis {
        grid-template-columns: 1fr;
    }

    .hcs-table-wrap--stacked td {
        grid-template-columns: 1fr;
        gap: var(--hcs-space-1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hcs-app-shell *,
    .hcs-auth-login-page * {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }

    .hcs-loading-icon {
        animation: none;
    }
}

/* Employee trust ratings */
.hcs-rating-page { max-width: var(--hcs-content-max-width); margin: 0 auto; padding: var(--hcs-space-6) var(--hcs-page-gutter); color: var(--hcs-color-ink); }
.hcs-rating-page__header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--hcs-space-5); margin-bottom: var(--hcs-space-4); }
.hcs-rating-page__kicker { margin: 0 0 .15rem; color: var(--hcs-color-muted); font-size: var(--hcs-text-xs); font-weight: var(--hcs-font-weight-semibold); letter-spacing: .04em; text-transform: uppercase; }
.hcs-rating-page__header h1 { margin: 0; color: var(--hcs-color-primary, var(--color-primary, #00b4a9)); font-size: var(--hcs-font-size-title); }
.hcs-rating-page__lede { margin: .35rem 0 0; max-width: 62ch; color: var(--hcs-color-muted); }
.hcs-rating-subnav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--hcs-space-4); }
.hcs-rating-subnav__link { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.25rem; padding: 0 .9rem; border: 1px solid var(--hcs-color-border); border-radius: 999px; background: var(--hcs-color-surface); color: var(--hcs-color-muted); font-size: var(--hcs-text-sm); font-weight: var(--hcs-font-weight-semibold); text-decoration: none; }
.hcs-rating-subnav__link:hover { color: var(--hcs-color-heading); background: var(--hcs-color-surface-muted); }
.hcs-rating-subnav__link.is-active,
.hcs-rating-subnav__link.is-active:active { border-color: var(--hcs-color-primary); background: var(--hcs-color-primary); color: #fff; }
.hcs-rating-subnav__link:active:not(.is-active) { background: var(--hcs-color-surface-muted); color: var(--hcs-color-heading); }
.hcs-rating-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hcs-space-2); margin-bottom: var(--hcs-space-4); padding: .75rem; border: 1px solid var(--hcs-color-border); border-radius: var(--hcs-radius-lg); background: var(--hcs-color-surface); box-shadow: var(--hcs-shadow-sm); }
.hcs-rating-filters__search { display: flex; flex: 1 1 16rem; align-items: center; gap: .65rem; min-width: min(100%, 16rem); padding: 0 .85rem; border: 1px solid var(--hcs-color-border); border-radius: 999px; background: var(--hcs-color-surface-muted, #f6f8f8); }
.hcs-rating-filters__search i { color: var(--hcs-color-muted); }
.hcs-rating-filters__department { flex: 0 1 20rem; min-width: 0; width: 100%; }
.hcs-rating-filters__search .form-control { flex: 1; min-width: 0; height: 2.5rem; border: 0; background: transparent; box-shadow: none; }
.hcs-rating-filters .form-select { width: auto; min-width: 12rem; height: 2.5rem; border-radius: 999px; }
.hcs-rating-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hcs-space-3); margin-bottom: var(--hcs-space-4); }
.hcs-rating-stat { display: flex; flex-direction: column; gap: .2rem; min-height: 5.25rem; padding: 1rem 1.1rem; border: 1px solid var(--hcs-color-border); border-radius: var(--hcs-radius-lg); background: var(--hcs-color-surface); }
.hcs-rating-stat strong { color: var(--hcs-color-heading); font-size: 1.5rem; line-height: 1.1; }
.hcs-rating-stat span { color: var(--hcs-color-muted); font-size: var(--hcs-text-sm); }
.hcs-rating-stat--hint { justify-content: center; background: var(--hcs-color-primary-soft, #e0f7f5); border-color: transparent; color: var(--hcs-color-primary-strong, #007f7c); }
.hcs-rating-stat--hint i { margin-bottom: .35rem; color: var(--hcs-color-primary, #00b4a9); }
.hcs-rating-stat--hint span { color: var(--hcs-color-primary-strong, #007f7c); }
.hcs-rating-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: var(--hcs-space-4); }
.hcs-rating-card, .hcs-rating-panel, .hcs-rating-toolbar, .hcs-rating-table-card, .hcs-rating-kpi { border: 1px solid var(--hcs-color-border); border-radius: var(--hcs-radius-lg); background: var(--hcs-color-surface); box-shadow: var(--hcs-shadow-sm); }
.hcs-rating-card { display: flex; flex-direction: column; overflow: hidden; }
.hcs-rating-card.is-rated { box-shadow: inset 3px 0 0 var(--hcs-color-success, #2f9e73); }
.hcs-rating-card__identity, .hcs-rating-table-person { display: flex; align-items: center; gap: var(--hcs-space-3); min-width: 0; }
.hcs-rating-card__identity { align-items: flex-start; padding: 1.15rem 1.15rem .85rem; }
.hcs-rating-card__who { flex: 1 1 auto; min-width: 0; }
.hcs-rating-card__identity h2 { overflow: hidden; margin: 0; color: var(--hcs-color-heading); font-size: 1.05rem; text-overflow: ellipsis; white-space: nowrap; }
.hcs-rating-card__identity p { margin: .2rem 0 0; color: var(--hcs-color-muted); font-size: var(--hcs-text-sm); }
.hcs-rating-chip { display: inline-flex; max-width: 100%; margin-top: .4rem; padding: .15rem .55rem; overflow: hidden; border-radius: 999px; background: var(--hcs-color-surface-muted); color: var(--hcs-color-muted); font-size: var(--hcs-text-xs); font-weight: var(--hcs-font-weight-semibold); text-overflow: ellipsis; white-space: nowrap; }
.hcs-rating-avatar { display: inline-grid; flex: 0 0 3.5rem; width: 3.5rem; height: 3.5rem; overflow: hidden; place-items: center; border-radius: 50%; background: var(--hcs-color-primary-light, #e0f7f5); box-shadow: 0 0 0 3px var(--hcs-color-primary-soft, #e0f7f5); color: var(--hcs-color-primary-strong, #007f7c); font-weight: var(--hcs-font-weight-bold); object-fit: cover; }
.hcs-rating-avatar--small { flex-basis: 2rem; width: 2rem; height: 2rem; font-size: var(--hcs-text-xs); box-shadow: none; }
.hcs-rating-card__scorebox { display: grid; justify-items: end; gap: .15rem; margin-left: auto; color: var(--hcs-color-muted); font-size: var(--hcs-text-xs); text-align: right; }
.hcs-rating-card__scorebox strong { color: var(--hcs-color-heading); font-size: 1.15rem; line-height: 1; }
.hcs-rating-card__noscore { max-width: 7.5rem; color: var(--hcs-color-muted); font-weight: var(--hcs-font-weight-semibold); }
.hcs-rating-meter { display: flex; gap: .12rem; color: #d7b23a; font-size: .78rem; }
.hcs-rating-card__summary { display: flex; align-items: baseline; justify-content: space-between; gap: var(--hcs-space-2); color: var(--hcs-color-muted); font-size: var(--hcs-text-sm); }
.hcs-rating-score { color: var(--hcs-color-heading); font-weight: var(--hcs-font-weight-bold); white-space: nowrap; }
.hcs-rating-score i, .hcs-rating-kpi strong i { color: #d7b23a; }
.hcs-rating-card__action { display: grid; gap: .65rem; margin: 0 .85rem .85rem; padding: .85rem .9rem; border: 0; border-radius: var(--hcs-radius); background: linear-gradient(180deg, var(--hcs-color-primary-soft, #e8f8f6) 0%, var(--hcs-color-surface) 72%); }
.hcs-rating-card__action-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.hcs-rating-card__action-label, .hcs-rating-card__hint, .hcs-rating-card__locked { color: var(--hcs-color-muted); font-size: var(--hcs-text-xs); font-weight: var(--hcs-font-weight-semibold); }
.hcs-rating-card__locked { display: inline-flex; align-items: center; gap: .3rem; color: var(--hcs-color-success, #2f9e73); }
.hcs-rating-stars { display: flex; gap: .1rem; }
.hcs-rating-star { display: inline-grid; width: 2.4rem; height: 2.4rem; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #e4d19a; cursor: pointer; font-size: 1.45rem; transition: color var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard), transform var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard), background var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard); }
.hcs-rating-star:hover, .hcs-rating-star:focus-visible { background: rgb(215 178 58 / 12%); transform: translateY(-1px); }
.hcs-rating-star:hover, .hcs-rating-star:focus-visible, .hcs-rating-star.is-active { color: #e0b21d; }
.hcs-rating-star:focus-visible, .hcs-rating-page select:focus-visible, .hcs-rating-page input:focus-visible, .hcs-rating-page a:focus-visible { outline: none; box-shadow: var(--hcs-focus-ring); }
.hcs-rating-star:disabled { cursor: default; }
.hcs-rating-star:disabled:not(.is-active) { opacity: .55; }
.hcs-rating-toolbar { padding: var(--hcs-space-4); }
.hcs-rating-toolbar__fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--hcs-space-3); }
.hcs-rating-panel, .hcs-rating-table-card { overflow: hidden; }
.hcs-rating-table-card table { min-width: 760px; }
.hcs-rating-table-card th { background: var(--hcs-color-surface-muted); color: var(--hcs-color-muted); font-size: var(--hcs-text-xs); text-transform: uppercase; }
.hcs-rating-backlink { display: inline-flex; align-items: center; margin-bottom: var(--hcs-space-2); color: var(--hcs-color-primary-strong); font-size: var(--hcs-text-sm); font-weight: var(--hcs-font-weight-semibold); text-decoration: none; }
.hcs-rating-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hcs-space-4); }
.hcs-rating-kpi .card-body { display: grid; gap: var(--hcs-space-2); min-height: 7rem; align-content: center; }
.hcs-rating-kpi span, .hcs-rating-kpi small { color: var(--hcs-color-muted); font-size: var(--hcs-text-sm); }
.hcs-rating-kpi strong { color: var(--hcs-color-heading); font-size: clamp(1.35rem, 2.5vw, 2rem); }
.hcs-rating-kpi small { font-size: var(--hcs-text-xs); }
.hcs-rating-detail-grid, .hcs-rating-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hcs-space-4); }
.hcs-rating-panel--wide { grid-column: span 2; }
.hcs-rating-panel .card-body { padding: var(--hcs-space-4); }
.hcs-rating-panel h2 { margin: 0 0 var(--hcs-space-4); color: var(--hcs-color-heading); font-size: var(--hcs-font-size-section-title); }
.hcs-rating-distribution-row { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 2rem; align-items: center; gap: var(--hcs-space-2); margin-bottom: var(--hcs-space-3); font-size: var(--hcs-text-sm); }
.hcs-rating-distribution-row > span { color: var(--hcs-color-muted); white-space: nowrap; }
.hcs-rating-distribution-row > span i { color: #d7b23a; }
.hcs-rating-distribution-track { height: .55rem; overflow: hidden; border-radius: 999px; background: var(--hcs-color-surface-muted); }
.hcs-rating-distribution-fill { height: 100%; border-radius: inherit; background: var(--hcs-color-primary); }
.hcs-rating-privacy-note { margin: var(--hcs-space-4) 0 0; color: var(--hcs-color-muted); font-size: var(--hcs-text-sm); }
.hcs-chart-data-table { margin-top: var(--hcs-space-3); overflow-x: auto; }
.hcs-chart-data-table table { min-width: 100%; font-size: var(--hcs-text-sm); }
.hcs-chart-data-table caption { color: var(--hcs-color-muted); caption-side: top; font-size: var(--hcs-text-xs); text-align: left; }

@media (max-width: 767.98px) {
    .hcs-rating-page { padding-top: var(--hcs-space-4); }
    .hcs-rating-page__header { align-items: stretch; flex-direction: column; }
    .hcs-rating-filters { flex-direction: column; align-items: stretch; }
    .hcs-rating-filters__department { flex-basis: auto; }
    .hcs-rating-filters .form-select { width: 100%; min-width: 0; }
    .hcs-rating-stats, .hcs-rating-toolbar__fields, .hcs-rating-kpi-grid, .hcs-rating-detail-grid, .hcs-rating-dashboard-grid { grid-template-columns: 1fr; }
    .hcs-rating-panel--wide { grid-column: auto; }
}

@media (max-width: 575.98px) {
    .hcs-rating-page { padding-right: var(--hcs-space-3); padding-left: var(--hcs-space-3); }
    .hcs-rating-grid { grid-template-columns: 1fr; }
    .hcs-rating-card__identity { flex-wrap: wrap; }
    .hcs-rating-card__scorebox { justify-items: start; margin-left: 4.1rem; text-align: left; }
    .hcs-rating-table-wrap--stacked table, .hcs-rating-table-wrap--stacked thead, .hcs-rating-table-wrap--stacked tbody, .hcs-rating-table-wrap--stacked th, .hcs-rating-table-wrap--stacked td, .hcs-rating-table-wrap--stacked tr { display: block; }
    .hcs-rating-table-wrap--stacked thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .hcs-rating-table-wrap--stacked tr { border-bottom: 1px solid var(--hcs-color-border); padding: var(--hcs-space-3); }
    .hcs-rating-table-wrap--stacked td { display: flex; justify-content: space-between; gap: var(--hcs-space-3); border: 0; padding: .35rem 0; text-align: right; }
    .hcs-rating-table-wrap--stacked td::before { color: var(--hcs-color-muted); content: attr(data-label); font-weight: var(--hcs-font-weight-semibold); text-align: left; }
    .hcs-rating-table-wrap--stacked td.text-end { text-align: right !important; }
    .hcs-rating-card__summary { align-items: flex-start; flex-direction: column; }
}

/* Enterprise visual layer. Keep these selectors on HCS wrappers so the
   LeptonX and Blazorise packages remain untouched and upgradeable. */
.hcs-app-shell {
    color-scheme: light;
    color: var(--hcs-color-ink);
    font-family: var(--hcs-font-family);

    /* Bootstrap bridge is scoped to the HCS shell, leaving vendor theme
       defaults intact for login and other host-owned surfaces. */
    --bs-primary: var(--hcs-color-primary);
    --bs-primary-rgb: 0, 180, 169;
    --bs-secondary: var(--color-secondary, #007F7C);
    --bs-secondary-rgb: 0, 127, 124;
    --bs-success: var(--hcs-color-success);
    --bs-success-rgb: 0, 127, 124;
    --bs-warning: #d68a23;
    --bs-warning-rgb: 214, 138, 35;
    --bs-danger: var(--hcs-color-danger);
    --bs-danger-rgb: 227, 30, 36;
    --bs-info: var(--hcs-color-info);
    --bs-info-rgb: 0, 180, 169;
    --bs-body-color: var(--hcs-color-ink);
    --bs-body-color-rgb: 26, 26, 46;
    --bs-body-bg: var(--hcs-color-background);
    --bs-border-color: var(--hcs-color-border);
    --bs-heading-color: var(--hcs-color-heading);
    --bs-border-radius: 6px;
    --bs-border-radius-sm: 5px;
    --bs-border-radius-lg: 8px;
    --bs-link-color: var(--hcs-color-link);
    --bs-link-color-rgb: 0, 180, 169;
    --bs-link-hover-color: var(--hcs-color-link-hover);
    --bs-link-hover-color-rgb: 0, 127, 124;
    --bs-focus-ring-color: rgba(0, 180, 169, .28);
}

/* Bootstrap resolves anchor colors from the RGB variables above. Keep
   ordinary content links on the HCS primary scale while preserving the
   branded shell, button, menu and preview-link treatments. */
.hcs-app-shell :where(a[href]:not(.btn):not(.kpi):not(.notice):not(.event-link):not(.hcs-brand):not(.hcs-icon-button):not(.hcs-top-nav__link):not(.hcs-nav-menu__panel a):not(.hcs-user-menu__panel a):not(.hcs-skip-link):not(.hcs-chat-preview__download):not(.msg-file):not(.msg-task-open)):not(.page-home a) {
    color: var(--hcs-color-link);
}

.hcs-app-shell :where(a[href]:not(.btn):not(.kpi):not(.notice):not(.event-link):not(.hcs-brand):not(.hcs-icon-button):not(.hcs-top-nav__link):not(.hcs-nav-menu__panel a):not(.hcs-user-menu__panel a):not(.hcs-skip-link):not(.hcs-chat-preview__download):not(.msg-file):not(.msg-task-open)):not(.page-home a):hover,
.hcs-app-shell :where(a[href]:not(.btn):not(.kpi):not(.notice):not(.event-link):not(.hcs-brand):not(.hcs-icon-button):not(.hcs-top-nav__link):not(.hcs-nav-menu__panel a):not(.hcs-user-menu__panel a):not(.hcs-skip-link):not(.hcs-chat-preview__download):not(.msg-file):not(.msg-task-open)):not(.page-home a):focus-visible {
    color: var(--hcs-color-link-hover);
}

.hcs-app-shell :where(.hcs-page, .hcs-catalog-page, .hcs-document-page, .hcs-admin-page, .hcs-account-page, .hcs-workspace) {
    max-width: var(--hcs-content-max-width);
    min-width: 0;
    width: 100%;
}

.hcs-app-shell .hcs-catalog-page {
    background: transparent;
    margin: 0 auto;
    min-height: auto;
    padding: 0;
}

.hcs-app-shell :where(.hcs-page__header, .hcs-document-page__header, .hcs-catalog-titlebar) {
    align-items: flex-end;
    border-bottom: 1px solid transparent;
    gap: var(--hcs-space-4);
    margin-bottom: var(--hcs-space-5);
}

.hcs-app-shell :where(.hcs-page__header h1, .hcs-page__header h2, .hcs-document-page__header h1, .hcs-catalog-titlebar h1) {
    color: var(--hcs-color-heading);
    font-size: var(--hcs-font-size-title);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.2;
}

.hcs-app-shell :where(.hcs-page__header p, .hcs-document-page__header p, .hcs-catalog-titlebar__eyebrow) {
    color: var(--hcs-color-muted);
    font-size: .88rem;
}

.hcs-app-shell :where(.card, .hcs-data-surface, .hcs-catalog-grid-card) {
    background: var(--hcs-color-surface);
    border: 1px solid var(--hcs-color-border);
    border-radius: var(--hcs-radius-md);
    box-shadow: var(--hcs-shadow-sm);
}

.hcs-app-shell :where(.card-header, .card-footer) {
    background: var(--hcs-color-surface);
    border-color: var(--hcs-color-border);
    padding: var(--hcs-space-4) var(--hcs-space-5);
}

.hcs-app-shell :where(.card-header strong, .card-header h2, .card-header h3) {
    color: var(--hcs-color-heading);
    font-size: var(--hcs-font-size-card-title);
    font-weight: 700;
}

.hcs-app-shell :where(.hcs-ws-card-title, .hcs-kanban-title, .hcs-workflow-panel-heading > strong) {
    color: var(--hcs-color-heading);
}

.hcs-app-shell :where(.hcs-provider-card h2, .hcs-document-list h2) {
    color: var(--hcs-color-heading);
    font-size: var(--hcs-font-size-card-title);
}

.hcs-app-shell :where(.card-body, .hcs-catalog-grid-card .card-body) { padding: var(--hcs-space-5); }

.hcs-app-shell .btn:not(.btn-sm):not(.btn-lg) {
    align-items: center;
    box-sizing: border-box;
    border-radius: var(--hcs-radius-sm);
    display: inline-flex;
    font-size: .86rem;
    font-weight: 600;
    justify-content: center;
    line-height: var(--hcs-button-line-height);
    max-height: none;
    min-height: var(--hcs-button-height);
    transition: background var(--hcs-motion-fast) var(--hcs-motion-ease), border-color var(--hcs-motion-fast) var(--hcs-motion-ease), box-shadow var(--hcs-motion-fast) var(--hcs-motion-ease), color var(--hcs-motion-fast) var(--hcs-motion-ease);
}

/* Keep small button and anchor variants on the same baseline as Blazorise
   buttons. Explicit Bootstrap spacing utilities remain opt-in overrides. */
.hcs-app-shell .btn.btn-sm {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    line-height: var(--hcs-button-line-height);
    max-height: none;
    min-height: var(--hcs-button-height-sm);
}

.hcs-app-shell .btn:not(.btn-sm):not(.btn-lg):not(.p-0):not(.px-0):not(.py-0) {
    padding: var(--hcs-button-padding-y) var(--hcs-button-padding-x);
}

.hcs-app-shell .btn.btn-sm:not(.p-0):not(.px-0):not(.py-0) {
    padding: var(--hcs-button-padding-y-sm) var(--hcs-button-padding-x-sm);
}

.hcs-app-shell .btn.p-0,
.hcs-app-shell .btn:not(.btn-sm):not(.btn-lg).p-0 {
    align-items: center;
    display: inline-flex;
    line-height: var(--hcs-button-line-height);
    min-height: var(--hcs-button-height-sm);
    padding: 0;
}

.hcs-app-shell .btn:not(.btn-sm):not(.btn-lg).px-0 {
    padding-block: var(--hcs-button-padding-y);
    padding-inline: 0;
}

.hcs-app-shell .btn:not(.btn-sm):not(.btn-lg).py-0 {
    padding-block: 0;
    padding-inline: var(--hcs-button-padding-x);
}

.hcs-app-shell .btn.btn-sm.px-0 {
    padding-block: var(--hcs-button-padding-y-sm);
    padding-inline: 0;
}

.hcs-app-shell .btn.btn-sm.py-0 {
    padding-block: 0;
    padding-inline: var(--hcs-button-padding-x-sm);
}

/* Grid items stretch by default; standalone form actions should size to their
   content so an <a class="btn"> and a <Button> look identical. */
.hcs-app-shell .hcs-catalog-form > .btn {
    justify-self: start;
    max-width: 100%;
}

/* Icon/text actions in data rows use one predictable hit area across pages. */
.hcs-app-shell .hcs-row-actions > .btn,
.hcs-app-shell .hcs-action-button {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    line-height: 1;
    max-height: none;
    min-height: var(--hcs-action-button-size);
    min-width: var(--hcs-action-button-size);
    padding: var(--hcs-action-button-padding);
}

/* The kanban overflow trigger is icon-only, but still needs the same usable
   hit area as other small controls. */
.hcs-app-shell .hcs-kanban-menu__toggle {
    height: var(--hcs-button-height-sm);
    max-height: none;
    min-height: var(--hcs-button-height-sm);
    padding: 0 !important;
    width: var(--hcs-button-height-sm);
}

/* Filled: 1px border matches fill (no contrasting ring). Outline: visible teal
   stroke. Cancel is outline, not a second primary. Modals portal under body. */
body:has(.hcs-app-shell) .btn-primary,
.hcs-app-shell .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--hcs-color-primary);
    --bs-btn-border-color: var(--hcs-color-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--hcs-color-primary-strong);
    --bs-btn-hover-border-color: var(--hcs-color-primary-strong);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--hcs-color-primary-strong);
    --bs-btn-active-border-color: var(--hcs-color-primary-strong);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--hcs-color-primary);
    --bs-btn-disabled-border-color: var(--hcs-color-primary);
    --bs-btn-focus-box-shadow: none;
    --bs-btn-hover-shadow: none;
    background-color: var(--hcs-color-primary);
    border: var(--hcs-button-border-width, 1px) solid var(--hcs-color-primary);
    color: #fff;
}
body:has(.hcs-app-shell) .btn-primary:hover:not(:disabled),
.hcs-app-shell .btn-primary:hover:not(:disabled) {
    background-color: var(--hcs-color-primary-strong);
    border-color: var(--hcs-color-primary-strong);
    box-shadow: none;
    color: #fff;
}
body:has(.hcs-app-shell) .btn-primary:focus-visible,
.hcs-app-shell .btn-primary:focus-visible {
    background-color: var(--hcs-color-primary-strong);
    border-color: var(--hcs-color-primary-strong);
    box-shadow: var(--hcs-focus-ring);
    color: #fff;
}
body:has(.hcs-app-shell) .btn-primary:is(:active, .active, .show):not(:disabled),
.hcs-app-shell .btn-primary:is(:active, .active, .show):not(:disabled) {
    background-color: var(--hcs-color-primary-strong);
    border-color: var(--hcs-color-primary-strong);
    color: #fff;
}
body:has(.hcs-app-shell) .btn-primary.hcs-catalog-save:hover:not(:disabled),
.hcs-app-shell .btn-primary.hcs-catalog-save:hover:not(:disabled) {
    background-color: var(--hcs-color-primary-strong);
    border-color: var(--hcs-color-primary-strong);
    box-shadow: none;
}
body:has(.hcs-app-shell) .btn-secondary,
.hcs-app-shell .btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--color-secondary, #007F7C);
    --bs-btn-border-color: var(--color-secondary, #007F7C);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--hcs-color-primary-strong);
    --bs-btn-hover-border-color: var(--hcs-color-primary-strong);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--hcs-color-primary-strong);
    --bs-btn-active-border-color: var(--hcs-color-primary-strong);
    background-color: var(--color-secondary, #007F7C);
    border: var(--hcs-button-border-width, 1px) solid var(--color-secondary, #007F7C);
    color: #fff;
}
body:has(.hcs-app-shell) .btn-secondary:is(:hover, :active, .active, .show):not(:disabled):not(.hcs-catalog-cancel):not(.hcs-modal-cancel):not(.hcs-catalog-close),
.hcs-app-shell .btn-secondary:is(:hover, :active, .active, .show):not(:disabled):not(.hcs-catalog-cancel):not(.hcs-modal-cancel):not(.hcs-catalog-close) {
    background-color: var(--hcs-color-primary-strong);
    border-color: var(--hcs-color-primary-strong);
    color: #fff;
}
body:has(.hcs-app-shell) .btn-outline-primary,
body:has(.hcs-app-shell) .btn-outline,
.hcs-app-shell .btn-outline-primary,
.hcs-app-shell .btn-outline {
    --bs-btn-color: var(--hcs-color-primary);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--hcs-color-primary);
    --bs-btn-hover-color: var(--hcs-color-primary-strong);
    --bs-btn-hover-bg: var(--hcs-color-primary-soft);
    --bs-btn-hover-border-color: var(--hcs-color-primary);
    --bs-btn-active-color: var(--hcs-color-primary-strong);
    --bs-btn-active-bg: var(--hcs-color-primary-soft);
    --bs-btn-active-border-color: var(--hcs-color-primary);
    background-color: transparent;
    border: var(--hcs-button-border-width, 1px) solid var(--hcs-color-primary);
    color: var(--hcs-color-primary);
}
body:has(.hcs-app-shell) .btn-outline-primary:hover:not(:disabled),
body:has(.hcs-app-shell) .btn-outline-primary:focus-visible,
body:has(.hcs-app-shell) .btn-outline:hover:not(:disabled),
body:has(.hcs-app-shell) .btn-outline:focus-visible,
.hcs-app-shell .btn-outline-primary:hover:not(:disabled),
.hcs-app-shell .btn-outline-primary:focus-visible,
.hcs-app-shell .btn-outline:hover:not(:disabled),
.hcs-app-shell .btn-outline:focus-visible {
    background-color: var(--hcs-color-primary-soft);
    border-color: var(--hcs-color-primary);
    color: var(--hcs-color-primary-strong);
}
body:has(.hcs-app-shell) .btn-outline-primary:is(:active, .active, .show):not(:disabled),
body:has(.hcs-app-shell) .btn-outline:is(:active, .active, .show):not(:disabled),
.hcs-app-shell .btn-outline-primary:is(:active, .active, .show):not(:disabled),
.hcs-app-shell .btn-outline:is(:active, .active, .show):not(:disabled) {
    background-color: var(--hcs-color-primary-soft);
    border-color: var(--hcs-color-primary);
    color: var(--hcs-color-primary-strong);
}
body:has(.hcs-app-shell) .btn.hcs-catalog-cancel,
body:has(.hcs-app-shell) .btn.hcs-modal-cancel,
.hcs-app-shell .btn.hcs-catalog-cancel,
.hcs-app-shell .btn.hcs-modal-cancel {
    --bs-btn-color: var(--hcs-color-primary);
    --bs-btn-bg: var(--hcs-color-surface);
    --bs-btn-border-color: var(--hcs-color-primary);
    --bs-btn-hover-color: var(--hcs-color-primary-strong);
    --bs-btn-hover-bg: var(--hcs-color-primary-soft);
    --bs-btn-hover-border-color: var(--hcs-color-primary);
    --bs-btn-active-color: var(--hcs-color-primary-strong);
    --bs-btn-active-bg: var(--hcs-color-primary-soft);
    --bs-btn-active-border-color: var(--hcs-color-primary);
    background-color: var(--hcs-color-surface);
    border: var(--hcs-button-border-width, 1px) solid var(--hcs-color-primary);
    color: var(--hcs-color-primary);
}
body:has(.hcs-app-shell) .btn.hcs-catalog-cancel:hover:not(:disabled),
body:has(.hcs-app-shell) .btn.hcs-modal-cancel:hover:not(:disabled),
.hcs-app-shell .btn.hcs-catalog-cancel:hover:not(:disabled),
.hcs-app-shell .btn.hcs-modal-cancel:hover:not(:disabled) {
    background-color: var(--hcs-color-primary-soft);
    border-color: var(--hcs-color-primary);
    box-shadow: none;
    color: var(--hcs-color-primary-strong);
}
body:has(.hcs-app-shell) .btn.hcs-catalog-cancel:is(:active, .active):not(:disabled),
body:has(.hcs-app-shell) .btn.hcs-modal-cancel:is(:active, .active):not(:disabled),
.hcs-app-shell .btn.hcs-catalog-cancel:is(:active, .active):not(:disabled),
.hcs-app-shell .btn.hcs-modal-cancel:is(:active, .active):not(:disabled) {
    background-color: var(--hcs-color-primary-soft);
    border-color: var(--hcs-color-primary);
    color: var(--hcs-color-primary-strong);
}
body:has(.hcs-app-shell) .modal .btn.btn-primary,
body:has(.hcs-app-shell) .modal .btn.hcs-catalog-save {
    background-color: var(--hcs-color-primary) !important;
    border-color: var(--hcs-color-primary) !important;
    color: #fff !important;
}

body:has(.hcs-app-shell) .modal .btn.btn-primary:hover:not(:disabled),
body:has(.hcs-app-shell) .modal .btn.hcs-catalog-save:hover:not(:disabled),
body:has(.hcs-app-shell) .modal .btn.btn-primary:is(:active, .active):not(:disabled),
body:has(.hcs-app-shell) .modal .btn.hcs-catalog-save:is(:active, .active):not(:disabled) {
    background-color: var(--hcs-color-primary-strong) !important;
    border-color: var(--hcs-color-primary-strong) !important;
    color: #fff !important;
}

body:has(.hcs-app-shell) .modal .btn.hcs-catalog-cancel,
body:has(.hcs-app-shell) .modal .btn.hcs-modal-cancel {
    background-color: var(--hcs-color-surface, #fff) !important;
    border-color: var(--hcs-color-danger) !important;
    color: var(--hcs-color-danger) !important;
}

body:has(.hcs-app-shell) .modal .btn.hcs-catalog-cancel:hover:not(:disabled),
body:has(.hcs-app-shell) .modal .btn.hcs-modal-cancel:hover:not(:disabled),
body:has(.hcs-app-shell) .modal .btn.hcs-catalog-cancel:is(:active, .active):not(:disabled),
body:has(.hcs-app-shell) .modal .btn.hcs-modal-cancel:is(:active, .active):not(:disabled) {
    background-color: color-mix(in srgb, var(--hcs-color-danger) 8%, var(--hcs-color-surface, #fff)) !important;
    border-color: var(--hcs-color-danger) !important;
    color: var(--hcs-color-danger) !important;
}

body:has(.hcs-app-shell) .btn.hcs-catalog-cancel:focus-visible,
body:has(.hcs-app-shell) .btn.hcs-modal-cancel:focus-visible,
.hcs-app-shell .btn.hcs-catalog-cancel:focus-visible,
.hcs-app-shell .btn.hcs-modal-cancel:focus-visible {
    background-color: var(--hcs-color-primary-soft);
    border-color: var(--hcs-color-primary);
    box-shadow: var(--hcs-focus-ring);
    color: var(--hcs-color-primary-strong);
}

body:has(.hcs-app-shell) .modal .btn.hcs-calendar-edit {
    background-color: var(--hcs-color-surface, #fff) !important;
    border-color: #2563eb !important;
    color: #1d4ed8 !important;
    gap: .5rem;
}

body:has(.hcs-app-shell) .modal .btn.hcs-calendar-edit:hover:not(:disabled) {
    background-color: #eff6ff !important;
    border-color: #1d4ed8 !important;
}

body:has(.hcs-app-shell) .modal .btn.hcs-calendar-edit:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Blazorise 2.3 days are buttons (.datepicker-day). Hover must not use
   white text on the light primary wash — that fails WCAG contrast. */
body:has(.hcs-app-shell) .datepicker-day:hover:not(:disabled):not(.datepicker-day-selected):not(.datepicker-day-range-start):not(.datepicker-day-range-end),
body:has(.hcs-app-shell) .datepicker-month:hover:not(:disabled):not(.datepicker-month-selected),
body:has(.hcs-app-shell) .datepicker-day-focused:not(.datepicker-day-selected):not(.datepicker-day-range-start):not(.datepicker-day-range-end) {
    background: var(--hcs-color-primary-soft) !important;
    border-color: var(--hcs-color-primary) !important;
    color: var(--hcs-color-ink) !important;
}

body:has(.hcs-app-shell) .datepicker-day-selected,
body:has(.hcs-app-shell) .datepicker-day-range-start,
body:has(.hcs-app-shell) .datepicker-day-range-end,
body:has(.hcs-app-shell) .datepicker-month-selected {
    background: var(--hcs-color-primary) !important;
    border-color: var(--hcs-color-primary) !important;
    color: #fff !important;
}

body:has(.hcs-app-shell) .datepicker-day-selected:hover:not(:disabled),
body:has(.hcs-app-shell) .datepicker-day-range-start:hover:not(:disabled),
body:has(.hcs-app-shell) .datepicker-day-range-end:hover:not(:disabled),
body:has(.hcs-app-shell) .datepicker-month-selected:hover:not(:disabled) {
    background: var(--hcs-color-primary-strong) !important;
    border-color: var(--hcs-color-primary-strong) !important;
    color: #fff !important;
}
 
body:has(.hcs-app-shell) .datepicker-day-today:not(.datepicker-day-selected) {
    background: transparent;
    border-color: var(--hcs-color-primary);
    color: var(--hcs-color-ink);
}

body:has(.hcs-app-shell) .flatpickr-day.today {
    border-color: var(--hcs-color-primary);
}

body:has(.hcs-app-shell) .flatpickr-months .flatpickr-prev-month,
body:has(.hcs-app-shell) .flatpickr-months .flatpickr-next-month,
body:has(.hcs-app-shell) .flatpickr-months .flatpickr-prev-month svg,
body:has(.hcs-app-shell) .flatpickr-months .flatpickr-next-month svg,
body:has(.hcs-app-shell) .datepicker .datepicker-header .datepicker-prev,
body:has(.hcs-app-shell) .datepicker .datepicker-header .datepicker-next {
    color: var(--hcs-color-primary);
    fill: var(--hcs-color-primary);
    stroke: var(--hcs-color-primary);
}
.hcs-app-shell .btn-light,
.hcs-app-shell .btn-outline-light,
.hcs-app-shell .hcs-catalog-filter-reset,
.hcs-app-shell .hcs-users-filter-reset { background: transparent; border-color: var(--hcs-color-primary); color: var(--hcs-color-primary); }
.hcs-app-shell .btn-light:hover:not(:disabled),
.hcs-app-shell .btn-light:focus-visible,
.hcs-app-shell .btn-outline-light:hover:not(:disabled),
.hcs-app-shell .btn-outline-light:focus-visible,
.hcs-app-shell .hcs-catalog-filter-reset:hover:not(:disabled),
.hcs-app-shell .hcs-catalog-filter-reset:focus-visible,
.hcs-app-shell .hcs-users-filter-reset:hover:not(:disabled),
.hcs-app-shell .hcs-users-filter-reset:focus-visible { background: var(--hcs-color-primary-soft); border-color: var(--hcs-color-primary); color: var(--hcs-color-primary-strong); }
.hcs-app-shell .btn-danger, .hcs-app-shell .btn-outline-danger { color: var(--hcs-color-danger); }
.hcs-app-shell .btn-danger { background: var(--hcs-color-danger); border-color: var(--hcs-color-danger); color: #fff; }

.hcs-app-shell :where(.form-control, .form-select, select, .select, .b-is-datepicker .form-control, .select2-container .select2-selection) {
    background-color: var(--hcs-color-surface);
    border-color: var(--hcs-input-border);
    border-radius: var(--input-radius);
    color: var(--hcs-color-ink);
    min-height: var(--input-height);
}

.hcs-app-shell .pager-total {
    color: var(--hcs-color-muted, #64748b);
    font-size: .8125rem;
    font-weight: 600;
    margin-right: auto;
    white-space: nowrap;
}
    /* min-height: 32px;
    height: 32px;
    border-radius: var(--radius-xl);
} */ 

.hcs-app-shell textarea.form-control,
.hcs-app-shell textarea.input,
.hcs-app-shell .hcs-catalog-form textarea:not(.select2-search__field) {
    border-radius: var(--input-radius-multiline, var(--radius-xl));
    min-height: 7rem;
}

/* Same halo as Auth login: 1px teal border + 0.2rem translucent spread.
   Do not add outline — that paints a second solid ring. Modal is portaled
   under body, so this is scoped to the document, not .hcs-app-shell. */
body:has(.hcs-app-shell) :is(.form-control, .form-select, select, textarea):focus,
body:has(.hcs-app-shell) :is(.form-control, .form-select, select, textarea):focus-visible,
body:has(.hcs-app-shell) .select2-container--focus .select2-selection,
body:has(.hcs-app-shell) .select2-container--open .select2-selection,
body:has(.hcs-app-shell) .b-is-datepicker .form-control:focus,
body:has(.hcs-app-shell) .b-is-datepicker .form-control:focus-visible {
    border-color: var(--hcs-color-primary);
    box-shadow: var(--hcs-focus-ring) !important;
    outline: 0 !important;
}

.hcs-empty .hcs-catalog-create.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}
.hcs-empty .hcs-catalog-create.btn i {
    color: inherit;
    font-size: 1em;
    line-height: 1;
    margin: 0;
}

.hcs-catalog-page[aria-labelledby="provider-settings-title"] .hcs-empty .hcs-catalog-create.btn {
    height: auto;
    min-height: 58px !important;
    max-height: none !important;
    padding: 1rem 1.5rem !important;
}

/* Numeric steppers are half-height controls, not full-size action buttons. */
body:has(.hcs-app-shell) .b-numeric > input.form-control { padding-right: 2rem; }
body:has(.hcs-app-shell) .b-numeric > .b-numeric-handler-wrap {
    top: 1px;
    right: 1px;
    bottom: 1px;
    height: auto;
    width: 26px;
    overflow: hidden;
    background: var(--hcs-input-background);
    border: 0;
    border-left: 1px solid var(--hcs-input-border);
    border-radius: 0 var(--input-radius) var(--input-radius) 0;
}
body:has(.hcs-app-shell) .b-numeric:focus-within > .b-numeric-handler-wrap { opacity: 1; }
body:has(.hcs-app-shell) .b-numeric .b-numeric-handler.btn {
    align-items: center;
    justify-content: center;
    display: flex;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 50% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    color: var(--hcs-color-muted);
    font-size: .75rem;
    line-height: 1;
    box-shadow: none !important;
    transform: none !important;
}
body:has(.hcs-app-shell) .b-numeric .b-numeric-handler-down.btn { border-top: 1px solid var(--hcs-input-border) !important; }
body:has(.hcs-app-shell) .b-numeric .b-numeric-handler.btn:hover:not(:disabled) {
    background: var(--hcs-color-primary-soft);
    color: var(--hcs-color-primary-strong);
}
body:has(.hcs-app-shell) .b-numeric .b-numeric-handler.btn:focus-visible {
    outline: 2px solid var(--hcs-input-border-focus) !important;
    outline-offset: -2px;
}

/* Medical and geographic catalogs share the same search/reset toolbar. */
.hcs-app-shell .hcs-catalog-page[aria-labelledby="reference-catalog-title"] .hcs-catalog-filter-row {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
}
.hcs-app-shell .hcs-catalog-page[aria-labelledby="reference-catalog-title"] .hcs-catalog-filter-row > .btn {
    align-items: center;
    justify-content: center;
    display: inline-flex;
    box-sizing: border-box;
    height: var(--hcs-control-height-compact);
    min-height: var(--hcs-control-height-compact) !important;
    max-height: var(--hcs-control-height-compact) !important;
    padding: 0 .9rem;
    white-space: nowrap;
}

/* Calendar legend must not stretch the search focus ring or the reset button. */
.hcs-app-shell .hcs-catalog-filter-row:has(> .hcs-cal-legend) {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 1rem;
}
.hcs-app-shell .hcs-catalog-filter-row:has(> .hcs-cal-legend) > .hcs-catalog-filter-reset {
    box-sizing: border-box;
    height: var(--hcs-control-height-compact);
    min-height: var(--hcs-control-height-compact) !important;
    max-height: var(--hcs-control-height-compact) !important;
    padding: 0 .9rem;
    white-space: nowrap;
}
.hcs-app-shell .hcs-catalog-filter-row > .hcs-cal-legend {
    flex-wrap: nowrap;
    margin: 0;
    white-space: nowrap;
}
@media (max-width: 991.98px) {
    .hcs-app-shell .hcs-catalog-filter-row:has(> .hcs-cal-legend) {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .hcs-app-shell .hcs-catalog-filter-row > .hcs-cal-legend {
        grid-column: 1 / -1;
        min-width: 0;
        overflow-x: auto;
    }
}

/* Joined search controls share one outer focus ring, including the submit button. */
body:has(.hcs-app-shell) :is(.hcs-catalog-search, .hcs-users-search-bar) {
    border-radius: var(--hcs-radius);
}

body:has(.hcs-app-shell) :is(.hcs-catalog-search, .hcs-users-search-bar):focus-within {
    box-shadow: var(--hcs-focus-ring);
}

body:has(.hcs-app-shell) :is(.hcs-catalog-search, .hcs-users-search-bar) :is(.form-control, .btn):focus {
    box-shadow: none !important;
}

/* An inset indicator identifies the button when keyboard focus moves to it. */
body:has(.hcs-app-shell) :is(.hcs-catalog-search, .hcs-users-search-bar) .btn:focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: -4px;
}

/* Keep the joined edge aligned while the button is pressed. */
body:has(.hcs-app-shell) :is(.hcs-catalog-search, .hcs-users-search-bar) .btn:active:not(:disabled) {
    transform: none;
}

/* 4px overlay offset so open option lists sit as a layer, not a glued extension.
   Modal + Select2 menus portal under body, so this is document-scoped. */
body:has(.hcs-app-shell) {
    --bs-dropdown-spacer: var(--hcs-popover-offset, .25rem);
    --bs-primary: var(--hcs-color-primary);
    --bs-primary-rgb: 0, 180, 169;
    --bs-secondary: var(--color-secondary, #007F7C);
    --bs-secondary-rgb: 0, 127, 124;
    --bs-success: var(--hcs-color-success);
    --bs-success-rgb: 0, 127, 124;
    --bs-warning: #d68a23;
    --bs-warning-rgb: 214, 138, 35;
    --bs-danger: var(--hcs-color-danger);
    --bs-danger-rgb: 227, 30, 36;
    --bs-info: var(--hcs-color-info);
    --bs-info-rgb: 0, 180, 169;
    --bs-link-color: var(--hcs-color-link);
    --bs-link-color-rgb: 0, 180, 169;
    --bs-link-hover-color: var(--hcs-color-link-hover);
    --bs-link-hover-color-rgb: 0, 127, 124;
    --bs-focus-ring-color: rgba(0, 180, 169, .28);
}

/* Select2 must match native inputs: same border/ink, one padding layer,
   centered chevron, clear not stacked on the arrow, menu glued to the field. */
body:has(.hcs-app-shell) .select2-container {
    width: 100% !important;
}

body:has(.hcs-app-shell) .select2-container .select2-selection--single {
    align-items: center;
    background-color: var(--hcs-color-surface);
    border: 1px solid var(--hcs-color-border) !important;
    border-radius: var(--input-radius) !important;
    box-sizing: border-box;
    color: var(--hcs-color-ink);
    display: flex;
    height: var(--input-height) !important;
    max-height: none !important;
    min-height: var(--input-height) !important;
    overflow: hidden;
    padding: 0 !important;
    position: relative;
}

body:has(.hcs-app-shell) .select2-container--default .select2-selection--single .select2-selection__rendered {
    align-items: center;
    color: inherit !important;
    display: flex !important;
    flex: 1;
    font-size: 1rem;
    height: 100% !important;
    line-height: 1.25 !important;
    min-width: 0;
    overflow: hidden;
    padding: 0 3.5rem 0 .75rem !important;
    width: 100%;
}

body:has(.hcs-app-shell) .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: inherit !important;
}

body:has(.hcs-app-shell) .select2-container--default .select2-selection--single .select2-selection__clear,
body:has(.hcs-app-shell) .select2-selection--single button.select2-selection__clear,
.hcs-app-shell .select2-selection--single .select2-selection__clear {
    align-items: center;
    appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--color-muted, #64748b);
    cursor: pointer;
    display: inline-flex !important;
    float: none !important;
    font-size: 1.125rem;
    font-weight: 400;
    height: 24px !important;
    justify-content: center;
    line-height: 1 !important;
    margin: 0 !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    position: absolute;
    right: 2.25rem;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    width: 24px !important;
    z-index: 2;
}

body:has(.hcs-app-shell) .select2-container--default .select2-selection--single .select2-selection__clear:hover,
.hcs-app-shell .select2-selection--single .select2-selection__clear:hover {
    color: var(--hcs-color-ink, var(--color-gray-800, #1e293b));
}

body:has(.hcs-app-shell) .select2-selection--single .select2-selection__clear span,
body:has(.hcs-app-shell) .select2-selection--single .select2-selection__clear-icon {
    font-size: inherit;
    line-height: 1;
}

body:has(.hcs-app-shell) .select2-container--default .select2-selection--single .select2-selection__arrow {
    align-items: center;
    display: flex !important;
    height: 100% !important;
    justify-content: flex-end;
    margin: 0;
    padding-right: .5rem;
    position: absolute;
    right: 0;
    top: 0 !important;
    width: 1.5rem !important;
}

body:has(.hcs-app-shell) .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border: 0 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2324465e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    height: 12px !important;
    left: auto !important;
    margin: 0 !important;
    position: static !important;
    top: auto !important;
    width: 16px !important;
}

body:has(.hcs-app-shell) .select2-dropdown {
    background: var(--hcs-color-surface);
    border: 1px solid var(--hcs-input-border);
    border-radius: var(--input-radius, var(--hcs-radius-sm));
    box-shadow: var(--shadow-sm, var(--hcs-focus-ring));
    color: var(--hcs-color-ink);
    overflow: hidden;
    padding: .5rem;
    z-index: 1060;
}

body:has(.hcs-app-shell) .select2-dropdown--below {
    margin-top: 8px;
}

body:has(.hcs-app-shell) .select2-dropdown--above {
    margin-bottom: 8px;
    margin-top: 0;
}

body:has(.hcs-app-shell) .select2-container--open.select2-container--below .select2-selection--single,
body:has(.hcs-app-shell) .select2-container--open.select2-container--above .select2-selection--single {
    border-radius: var(--input-radius, var(--hcs-radius-sm)) !important;
}

body:has(.hcs-app-shell) .select2-search--dropdown {
    padding: 0 0 .35rem;
}

body:has(.hcs-app-shell) .select2-results {
    border: 0;
}

body:has(.hcs-app-shell) .select2-search--dropdown .select2-search__field {
    background: var(--hcs-color-surface);
    border: 1px solid var(--hcs-input-border) !important;
    border-radius: var(--hcs-radius-sm);
    box-shadow: none !important;
    box-sizing: border-box;
    color: var(--hcs-color-ink);
    font-size: 1rem;
    outline: 0;
    padding: .35rem .5rem !important;
    width: 100% !important;
}

body:has(.hcs-app-shell) .select2-search--dropdown .select2-search__field:focus,
body:has(.hcs-app-shell) .select2-search--dropdown .select2-search__field:focus-visible {
    border-color: var(--hcs-color-primary) !important;
    box-shadow: none !important;
}

body:has(.hcs-app-shell) .select2-results__option {
    border-radius: 3px;
    color: var(--hcs-color-ink);
    padding: .4rem .5rem;
}

body:has(.hcs-app-shell) .select2-results__option.select2-results__option--highlighted,
body:has(.hcs-app-shell) .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--hcs-color-primary-soft) !important;
    color: var(--hcs-color-ink) !important;
}

body:has(.hcs-app-shell) .select2-container--default .select2-results__option--selected {
    background: var(--hcs-color-primary) !important;
    color: #fff !important;
}

body:has(.hcs-app-shell) .select2-container--default .select2-results__option--selected.select2-results__option--highlighted {
    background: var(--hcs-color-primary-strong) !important;
    color: #fff !important;
}

body:has(.hcs-app-shell) .select2-results__message {
    color: var(--hcs-color-muted);
    padding: .45rem .5rem;
}

@supports selector(::picker(select)) {
    /* Closed customizable select is a flex column by default, so the value
       sits at the top and leftover icon space makes the field taller than
       a matching input. Row + center keeps Bootstrap's chevron and the text. */
    body:has(.hcs-app-shell) select.form-select:not([multiple]):not([size]):not(.hcs-catalog-select2) {
        appearance: base-select !important;
        align-items: center;
        display: flex;
        flex-direction: row;
    }

    body:has(.hcs-app-shell) select.form-select:not([multiple]):not([size]):not(.hcs-catalog-select2) > button,
    body:has(.hcs-app-shell) select.form-select:not([multiple]):not([size]):not(.hcs-catalog-select2) selectedcontent {
        align-items: center;
        display: flex;
        flex: 1 1 auto;
        height: 100%;
        min-height: 0;
        min-width: 0;
        overflow: hidden;
        padding: 0;
    }

    /* UA picker-icon wraps below a block-level select. Keep Bootstrap's
       background chevron and take the extra triangle out of flow. */
    body:has(.hcs-app-shell) select.form-select:not([multiple]):not([size]):not(.hcs-catalog-select2)::picker-icon {
        content: none;
        display: none !important;
        flex: 0 0 0;
        height: 0;
        margin: 0;
        opacity: 0;
        overflow: hidden;
        padding: 0;
        pointer-events: none;
        position: absolute;
        width: 0;
    }

    body:has(.hcs-app-shell) select.form-select:not([multiple]):not([size]):not(.hcs-catalog-select2)::picker(select) {
        appearance: base-select;
        background: var(--hcs-color-surface);
        border: 1px solid var(--hcs-input-border);
        border-radius: var(--input-radius, var(--hcs-radius-sm));
        box-shadow: var(--hcs-shadow-md);
        color: var(--hcs-color-ink);
        margin-block: var(--hcs-popover-offset, .25rem);
        overflow: hidden;
        padding: .15rem;
        z-index: var(--hcs-z-popover);
    }

    body:has(.hcs-app-shell) select.form-select:not([multiple]):not([size]):not(.hcs-catalog-select2) option {
        border-radius: 3px;
        padding: .4rem .65rem;
    }

    /* Filter options must not inherit the control's full-height line box. */
    body:has(.hcs-app-shell) :is(.hcs-catalog-advanced-filter, .hcs-users-advanced-filters) select.form-select:not([multiple]):not([size]):not(.hcs-catalog-select2) option {
        font-size: inherit;
        line-height: 1.5;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    body:has(.hcs-app-shell) :is(.hcs-catalog-advanced-filter, .hcs-users-advanced-filters) select.form-select:not([multiple]):not([size]):not(.hcs-catalog-select2)::picker(select) {
        box-sizing: border-box;
        max-height: min(18rem, 60dvh);
        overflow-y: auto;
        width: anchor-size(width);
    }

    body:has(.hcs-app-shell) select.form-select:not([multiple]):not([size]):not(.hcs-catalog-select2) option:checked,
    body:has(.hcs-app-shell) select.form-select:not([multiple]):not([size]):not(.hcs-catalog-select2) option:hover {
        background-color: var(--hcs-color-primary-soft);
        color: var(--hcs-color-primary-strong);
    }
}
.hcs-app-shell :where(.form-label, .field-label, label) { color: var(--hcs-color-ink); font-size: .82rem; font-weight: 600; }
.hcs-app-shell :where(.form-text, .invalid-feedback, .validation-message) { font-size: .76rem; }
.hcs-app-shell .invalid-feedback, .hcs-app-shell .validation-message { color: var(--hcs-color-danger); }

.hcs-app-shell :where(.table, .b-table) { --bs-table-bg: var(--hcs-color-surface); --bs-table-border-color: var(--hcs-color-border); color: var(--hcs-color-ink); margin-bottom: 0; }
.hcs-app-shell :where(.table, .b-table) > :not(caption) > * > * { padding: .78rem .85rem; vertical-align: middle; }
.hcs-app-shell :where(.table, .b-table) > thead > tr > th { background: var(--hcs-color-surface-muted); color: var(--hcs-color-muted); font-size: .7rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.hcs-app-shell :where(.table, .b-table) > tbody > tr { transition: background var(--hcs-motion-fast) var(--hcs-motion-ease); }
.hcs-app-shell :where(.table, .b-table) > tbody > tr:hover { background: #f8fbfc; }
.hcs-app-shell :where(.table, .b-table) > tbody > tr > td { font-size: .86rem; }
.hcs-app-shell :where(.table-responsive, .hcs-table-wrap, .hcs-catalog-grid-card .card-body) { scrollbar-color: #a6b8c4 transparent; scrollbar-width: thin; }

.hcs-app-shell .pagination { gap: .25rem; }
.hcs-app-shell .pagination .page-link { border-color: var(--hcs-color-border); border-radius: var(--hcs-radius-sm); color: var(--hcs-color-ink); min-height: var(--hcs-touch-target); min-width: var(--hcs-touch-target); text-align: center; }
.hcs-app-shell .pagination .page-item.active .page-link { background: var(--hcs-color-primary); border-color: var(--hcs-color-primary); color: #fff; }

.hcs-app-shell :where(.modal-content, .hcs-catalog-modal) { border: 1px solid var(--hcs-color-border); border-radius: var(--hcs-radius-lg); box-shadow: var(--hcs-shadow-md); overflow: visible; }
.hcs-app-shell :where(.modal-header, .hcs-catalog-modal__header, .modal-footer, .hcs-catalog-modal__footer) { background: var(--hcs-color-surface); border-color: var(--hcs-color-border); padding: var(--hcs-space-4) var(--hcs-space-5); }

.hcs-app-shell .hcs-catalog-modal__footer .btn.hcs-catalog-view-detail {
    margin-inline-end: auto;
}
.hcs-app-shell :where(.modal-title, .hcs-catalog-modal__header .modal-title) { color: var(--hcs-color-heading); font-size: var(--hcs-font-size-card-title); font-weight: 700; }
.hcs-app-shell :where(.modal-body, .hcs-catalog-modal__body) { background: var(--hcs-color-surface); padding: var(--hcs-space-5); }
.hcs-app-shell :where(.alert) { border-radius: var(--hcs-radius-md); font-size: .86rem; }

.hcs-app-shell :where(.hcs-status-badge, .hcs-priority-badge, .hcs-progress-badge) { border: 1px solid transparent; border-radius: var(--radius-full, 9999px); font-size: 11px; font-weight: 600; padding: 0 8px; }
.hcs-app-shell .hcs-status-badge--success, .hcs-app-shell .hcs-progress-badge--done { background: #e3f3ed; color: #12634f; }
.hcs-app-shell .hcs-progress-badge--cancelled { background: #fde8e8; color: #dc2626; }
.hcs-app-shell .hcs-status-badge--danger, .hcs-app-shell .hcs-priority-badge--high { background: #fbe8e7; color: #9b2118; }
.hcs-app-shell .hcs-status-badge--warning, .hcs-app-shell .hcs-priority-badge--normal { background: #fff2d9; color: #8a4d00; }
.hcs-app-shell .hcs-status-badge--info { background: #e7efff; color: #1d4ed8; }

@media (max-width: 767.98px) {
    .hcs-app-shell :where(.card-body, .hcs-catalog-grid-card .card-body, .modal-body, .hcs-catalog-modal__body) { padding: var(--hcs-space-4); }
    .hcs-app-shell :where(.hcs-page__header, .hcs-document-page__header, .hcs-catalog-titlebar) { align-items: stretch; flex-direction: column; margin-bottom: var(--hcs-space-4); }
    .hcs-app-shell :where(.hcs-page__actions, .hcs-catalog-page__actions) { width: 100%; }
    .hcs-app-shell :where(.hcs-page__actions > .btn, .hcs-catalog-page__actions > .btn) { flex: 1 1 auto; }
}

.hcs-app-shell .hcs-survey-results__filter-row { align-items: flex-end; gap: var(--hcs-space-3); }
.hcs-app-shell .hcs-survey-results__location-filter { min-width: 0; }
.hcs-app-shell .hcs-survey-results__location-filter .select2-container { display: block; width: 100% !important; }

.hcs-app-shell .hcs-catalog-form .select2-container .select2-selection--single,
.hcs-catalog-form .select2-container .select2-selection--single {
    background-color: var(--catalog-input, var(--hcs-color-surface));
    color: var(--color-gray-700);
}

.hcs-app-shell .hcs-catalog-form .select2-container--focus .select2-selection--single,
.hcs-app-shell .hcs-catalog-form .select2-container--open .select2-selection--single {
    border-color: var(--hcs-input-border-focus) !important;
}

/* Shared field surfaces, including forms and modals portaled outside the shell.
   Keep state rules together so page styles cannot change the background on focus. */
body:has(.hcs-app-shell) :is(.hcs-catalog-search, .hcs-users-search-bar) {
    --hcs-input-background: var(--hcs-color-background);
}

body:has(.hcs-app-shell) :is(.form-control, .form-select, select, .select, .select2-container .select2-selection, .hcs-datepicker__icon) {
    background-color: var(--hcs-input-background) !important;
    border-color: var(--hcs-input-border) !important;
}

body:has(.hcs-app-shell) :is(.form-control, .form-select, select, .select):hover:where(:not(:focus):not(:disabled):not([readonly])),
body:has(.hcs-app-shell) .select2-container:where(:not(.select2-container--disabled):not(.select2-container--focus):not(.select2-container--open)) .select2-selection:hover {
    border-color: var(--hcs-input-border-hover) !important;
}

body:has(.hcs-app-shell) :is(.form-control, .form-select, select, .select):focus,
body:has(.hcs-app-shell) :is(.select2-container--focus, .select2-container--open) .select2-selection {
    border-color: var(--hcs-input-border-focus) !important;
}

body:has(.hcs-app-shell) .form-control[readonly] {
    background-color: var(--hcs-input-background-readonly) !important;
}

/* Date pickers may prevent typing while still allowing calendar selection. */
body:has(.hcs-app-shell) :is(.hcs-datepicker, .b-is-datepicker) .form-control[readonly]:not(:disabled) {
    background-color: var(--hcs-input-background) !important;
}

body:has(.hcs-app-shell) :is(.form-control, .form-select, .hcs-datepicker__icon):disabled,
body:has(.hcs-app-shell) .select2-container--disabled .select2-selection {
    background-color: var(--hcs-input-background-disabled) !important;
    border-color: var(--hcs-input-border) !important;
    color: var(--hcs-color-muted) !important;
    box-shadow: none !important;
}

body:has(.hcs-app-shell) :is(.form-control, .form-select):is(.is-invalid, .invalid, [aria-invalid="true"]),
body:has(.hcs-app-shell) select:is(.is-invalid, .invalid, [aria-invalid="true"]) + .select2-container .select2-selection {
    border-color: var(--hcs-color-danger) !important;
}

/* Multi-user fields use the same user layout as single-user fields, but grow
   with their selections instead of letting Select2's floated chips overflow. */
body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection--multiple {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem;
    height: auto !important;
    min-height: 40px !important;
    padding: 4px 3.5rem 4px 16px !important;
    box-sizing: border-box;
    box-shadow: var(--shadow-sm) !important;
    position: relative;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection--multiple::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 16px;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    pointer-events: none;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection--multiple .select2-selection__placeholder {
    color: var(--hcs-color-ink);
    line-height: 30px;
    padding: 0;
    margin: 0;
    float: none;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection--multiple .select2-selection__rendered {
    display: contents;
    padding: 0 !important;
    margin: 0;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection__choice {
    display: inline-flex;
    align-items: center;
    float: none;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 .25rem 0 0 !important;
    min-height: 0 !important;
    height: 30px;
    border: 0 !important;
    border-radius: var(--hcs-radius-sm, 8px);
    background: transparent !important;
    color: var(--hcs-color-ink);
    line-height: 1.5;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection__choice__display {
    min-width: 0;
    padding: 0;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection__choice__remove {
    position: static;
    order: 1;
    flex: 0 0 24px;
    width: 24px;
    height: 28px;
    min-height: 0 !important;
    padding: 0;
    margin: 0 .25rem 0 0;
    border: 0;
    background: transparent;
    color: var(--hcs-color-muted);
    font: inherit;
    line-height: 28px;
    text-align: center;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-search--inline {
    flex: 1 1 8rem;
    float: none;
    min-width: 0;
    max-width: 100%;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-search--inline .select2-search__field {
    width: 100% !important;
    min-height: 28px !important;
    height: 28px !important;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    font: inherit;
    line-height: 28px;
    vertical-align: middle;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection--multiple:focus-within {
    border-color: var(--hcs-input-border-focus) !important;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection--multiple .select2-selection__clear {
    position: absolute;
    right: 2.25rem;
    top: 8px;
    width: 24px !important;
    height: 24px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--hcs-color-muted);
    line-height: 1 !important;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection--multiple .hcs-user-option {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection--multiple .hcs-user-option__avatar {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
}

body:has(.hcs-app-shell) select.hcs-user-select2 + .select2-container .select2-selection--multiple :is(.hcs-user-option__copy, .hcs-user-option__name) {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hcs-app-shell select.hcs-user-select2 + .select2-container .hcs-user-option {
    align-items: center;
    display: flex;
    gap: .5rem;
    min-width: 0;
    width: 100%;
}

.hcs-app-shell select.hcs-user-select2 + .select2-container .select2-selection--single .hcs-user-option__avatar {
    flex: 0 0 28px;
    height: 28px;
    width: 28px;
}

.hcs-app-shell select.hcs-user-select2 + .select2-container .select2-selection--single .hcs-user-option__copy {
    display: block;
    min-width: 0;
    overflow: hidden;
}

.hcs-app-shell select.hcs-user-select2 + .select2-container .select2-selection--single .hcs-user-option__name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .hcs-app-shell .hcs-survey-results__filter-row { align-items: stretch; }
    .hcs-app-shell .hcs-survey-results__location-filter { max-width: none; }
}

/* === Enterprise motion system ===
   Keep motion purposeful, tokenized and limited to compositor-friendly
   properties. Component logic owns state; these rules only express it. */
@keyframes hcs-motion-surface-enter {
    from {
        opacity: 0;
        transform: translate3d(0, var(--hcs-motion-distance-md), 0) scale(.99);
    }

    to {
        opacity: 1;
        /* `none` (not identity translate3d) so fill-mode does not create a
           containing block that traps Bootstrap `position: fixed` modals. */
        transform: none;
    }
}

@keyframes hcs-motion-dashboard-enter {
    from {
        opacity: 0;
        transform: translate3d(0, var(--hcs-motion-distance-md), 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes hcs-motion-validation-enter {
    from {
        opacity: 0;
        transform: translate3d(0, calc(var(--hcs-motion-distance-sm) * -1), 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes hcs-motion-validation-shake {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(-3px, 0, 0); }
    50% { transform: translate3d(3px, 0, 0); }
    75% { transform: translate3d(-2px, 0, 0); }
}

@keyframes hcs-motion-skeleton-pulse {
    0%, 100% { opacity: .62; }
    50% { opacity: 1; }
}

.hcs-app-shell .btn,
.hcs-app-shell .hcs-action-button,
.hcs-app-shell .hcs-icon-button,
.hcs-app-shell .hcs-nav-toggle,
.hcs-app-shell .hcs-ws-action,
.hcs-app-shell .hcs-ws-icon-action,
.hcs-app-shell .hcs-ws-view,
.hcs-app-shell .hcs-signature-button,
.hcs-app-shell .hcs-signature-upload-cta,
.hcs-app-shell .hcs-signature-icon-button {
    transition: background-color var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        border-color var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        box-shadow var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        color var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        opacity var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        transform var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard);
}

.hcs-app-shell .btn:active:not(:disabled),
.hcs-app-shell .hcs-action-button:active:not(:disabled),
.hcs-app-shell .hcs-icon-button:active:not(:disabled),
.hcs-app-shell .hcs-nav-toggle:active:not(:disabled),
.hcs-app-shell .hcs-ws-action:active:not(:disabled),
.hcs-app-shell .hcs-ws-icon-action:active:not(:disabled),
.hcs-app-shell .hcs-ws-view:active,
.hcs-app-shell .hcs-signature-button:active:not(:disabled),
.hcs-app-shell .hcs-signature-upload-cta:active:not(:disabled),
.hcs-app-shell .hcs-signature-icon-button:active:not(:disabled) {
    transform: translateY(1px) scale(var(--hcs-motion-press-scale));
}

.hcs-app-shell .hcs-nav-menu__trigger,
.hcs-app-shell .hcs-user-menu__panel a,
.hcs-app-shell .hcs-user-menu__action,
.hcs-app-shell .hcs-lang-switch__trigger,
.hcs-app-shell .hcs-lang-switch__item,
.hcs-app-shell .hcs-nav-menu__panel a,
.hcs-app-shell .hcs-notification-panel__item,
.hcs-app-shell .hcs-notification-panel__mark-all,
.hcs-app-shell .hcs-notification-panel__footer a,
.hcs-app-shell .hcs-account-tab,
.hcs-app-shell .hcs-user-tabs button,
.hcs-app-shell .hcs-signing-tab,
.hcs-app-shell .hcs-chat__tabs button,
.hcs-app-shell .hcs-survey-tabs button,
.hcs-app-shell .nav-tabs .nav-link,
.hcs-app-shell .nav-pills .nav-link {
    transition: background-color var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        border-color var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        box-shadow var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        color var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        opacity var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        transform var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard);
}

.hcs-app-shell .hcs-account-tab:active,
.hcs-app-shell .hcs-user-tabs button:active,
.hcs-app-shell .hcs-signing-tab:active,
.hcs-app-shell .hcs-chat__tabs button:active,
.hcs-app-shell .hcs-survey-tabs button:active,
.hcs-app-shell .nav-tabs .nav-link:active,
.hcs-app-shell .nav-pills .nav-link:active {
    transform: translateY(1px) scale(var(--hcs-motion-press-scale));
}

.hcs-app-shell .form-control,
.hcs-app-shell .form-select,
.hcs-app-shell select,
.hcs-app-shell textarea,
.hcs-app-shell .select2-container .select2-selection {
    transition: background-color var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        border-color var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        box-shadow var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard),
        color var(--hcs-motion-duration-quick) var(--hcs-motion-ease-standard);
}

.hcs-app-shell .invalid-feedback,
.hcs-app-shell .validation-message,
.hcs-app-shell .hcs-account-field-error {
    animation: hcs-motion-validation-enter var(--hcs-motion-duration-standard) var(--hcs-motion-ease-enter) both;
}

.hcs-app-shell .is-invalid,
.hcs-app-shell [aria-invalid="true"] {
    animation: hcs-motion-validation-shake var(--hcs-motion-duration-standard) var(--hcs-motion-ease-standard) both;
}

.hcs-app-shell .modal.fade .modal-dialog {
    transform: translate3d(0, var(--hcs-motion-distance-md), 0) scale(.99);
    transition: transform var(--hcs-motion-duration-standard) var(--hcs-motion-ease-exit);
}

.hcs-app-shell .modal.show .modal-dialog {
    transform: none;
    transition-duration: var(--hcs-motion-duration-modal);
    transition-timing-function: var(--hcs-motion-ease-enter);
}

.modal-backdrop.fade {
    opacity: 0;
    transition: opacity var(--hcs-motion-duration-standard) var(--hcs-motion-ease-standard);
}

.modal-backdrop.show { opacity: var(--hcs-motion-scrim-opacity); }

.hcs-app-shell .dropdown-menu:not(.datepicker-calendar),
.hcs-app-shell .hcs-lang-switch__panel,
.hcs-app-shell .hcs-notification-panel {
    animation: hcs-motion-surface-enter var(--hcs-motion-duration-quick) var(--hcs-motion-ease-enter) both;
    transform-origin: top right;
}

.hcs-app-shell .datepicker-calendar.dropdown-menu {
    animation: none;
    transform-origin: top left;
}

.hcs-app-shell .hcs-chat-modal {
    animation: hcs-motion-surface-enter var(--hcs-motion-duration-standard) var(--hcs-motion-ease-standard) both;
}

.hcs-app-shell .hcs-chat-modal__panel {
    animation: hcs-motion-surface-enter var(--hcs-motion-duration-standard) var(--hcs-motion-ease-enter) both;
    transform-origin: top center;
}

/* Animate inner content, not modal hosts. A filled transform on
   `.hcs-account-panel` / `.hcs-user-tab-panel` makes `.modal` overlay only
   that panel (hero, tabs and the rest of the page stay undimmed). */
.hcs-app-shell .hcs-account-panel > .hcs-account-content-grid,
.hcs-app-shell .hcs-signatures-panel,
.hcs-app-shell .hcs-user-tab-panel:not([hidden]) > :not(.hcs-user-signing):not(.modal) {
    animation: hcs-motion-surface-enter var(--hcs-motion-duration-standard) var(--hcs-motion-ease-enter) both;
}

.hcs-app-shell .hcs-skeleton span,
.hcs-app-shell .hcs-account-skeleton,
.hcs-app-shell .hcs-signature-card--skeleton span {
    animation: hcs-motion-skeleton-pulse var(--hcs-motion-duration-skeleton) var(--hcs-motion-ease-ambient) infinite;
}

.hcs-app-shell .hcs-loading {
    animation: hcs-motion-surface-enter var(--hcs-motion-duration-standard) var(--hcs-motion-ease-enter) both;
}

.hcs-app-shell .hcs-loading .fa-spin {
    animation-duration: var(--hcs-motion-duration-spinner);
}

.hcs-app-shell .hcs-notification-toast {
    animation: hcs-motion-surface-enter var(--hcs-motion-duration-standard) var(--hcs-motion-ease-enter) both;
    transform-origin: top right;
}

.hcs-app-shell .hcs-workspace > .hcs-ws-kpis,
.hcs-app-shell .hcs-workspace > .hcs-ws-grid-73,
.hcs-app-shell .hcs-workspace > .hcs-ws-grid-37 {
    animation: hcs-motion-dashboard-enter var(--hcs-motion-duration-slow) var(--hcs-motion-ease-enter) both;
    animation-delay: calc(var(--hcs-motion-stagger) * var(--hcs-motion-index, 0));
}

.hcs-app-shell .hcs-workspace > .hcs-ws-kpis { --hcs-motion-index: 1; }
.hcs-app-shell .hcs-workspace > .hcs-ws-grid-73 { --hcs-motion-index: 2; }
.hcs-app-shell .hcs-workspace > .hcs-ws-grid-37:nth-child(4) { --hcs-motion-index: 3; }
.hcs-app-shell .hcs-workspace > .hcs-ws-grid-37:nth-child(5) { --hcs-motion-index: 4; }
.hcs-app-shell .hcs-workspace > .hcs-ws-grid-37:nth-child(6) { --hcs-motion-index: 5; }

@media (prefers-reduced-motion: reduce) {
    .hcs-app-shell .hcs-workspace > .hcs-ws-filter,
    .hcs-app-shell .hcs-workspace > .hcs-ws-kpis,
    .hcs-app-shell .hcs-workspace > .hcs-ws-grid-73,
    .hcs-app-shell .hcs-workspace > .hcs-ws-grid-37,
    .hcs-app-shell .hcs-loading,
    .hcs-app-shell .hcs-notification-toast,
    .hcs-app-shell .hcs-notification-panel,
    .hcs-app-shell .hcs-chat-modal,
    .hcs-app-shell .hcs-chat-modal__panel {
        animation: none;
    }
}

.hcs-progress-slider {
    align-items: center;
    display: flex;
    gap: 12px;
    min-height: 32px;
    width: 100%;
}

.hcs-progress-slider__value {
    color: var(--color-primary, #007f7c);
    flex: 0 0 auto;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    min-width: 3.25rem;
    text-align: right;
}

.hcs-progress-range,
.hcs-app-shell .hcs-progress-range {
    -webkit-appearance: none;
    appearance: none;
    accent-color: var(--color-primary, #007f7c);
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    display: block;
    flex: 1 1 auto;
    height: 28px !important;
    margin: 0;
    max-height: none !important;
    min-height: 28px !important;
    padding: 0 !important;
    width: 100%;
}

.hcs-progress-range:focus,
.hcs-progress-range:focus-visible {
    outline: none;
}

.hcs-progress-range:focus-visible::-webkit-slider-thumb,
.hcs-progress-range:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary, #007f7c) 35%, transparent);
}

.hcs-progress-range::-webkit-slider-runnable-track {
    background: linear-gradient(
        to right,
        var(--color-primary, #007f7c) 0 var(--hcs-progress, 0%),
        var(--color-gray-200, #d7e2e6) var(--hcs-progress, 0%) 100%
    );
    border: 0;
    border-radius: 999px;
    height: 8px;
}

.hcs-progress-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-white, #fff);
    border: 2px solid var(--color-primary, #007f7c);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
    height: 20px;
    margin-top: -6px;
    width: 20px;
}

.hcs-progress-range::-moz-range-track {
    background: var(--color-gray-200, #d7e2e6);
    border: 0;
    border-radius: 999px;
    height: 8px;
}

.hcs-progress-range::-moz-range-progress {
    background: var(--color-primary, #007f7c);
    border-radius: 999px;
    height: 8px;
}

.hcs-progress-range::-moz-range-thumb {
    background: var(--color-white, #fff);
    border: 2px solid var(--color-primary, #007f7c);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
    height: 20px;
    width: 20px;
}
