:root {
    --admin-content-inset: 16px;
    --table-cell-padding-block: 2px;
    --table-font-size: 12px;
    --table-line-height: 1.25;
    --table-action-size: 15px;
    --table-action-icon-size: 10px;
    --table-action-gap: 4px;
}

body {
    font-family: system-ui, sans-serif;
    font-size: 14px;
    margin: 0;
}

[data-medical-group-dependent][hidden] {
    display: none !important;
}

table th,
table td {
    padding-top: var(--table-cell-padding-block) !important;
    padding-bottom: var(--table-cell-padding-block) !important;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border-subtle, #ddd);
}

.account-button {
    background-color: maroon;
    color: white;
    border: none;
    border-radius: 9999px; /* fully rounded */
    padding: 0.5rem 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
}

    .account-button:hover {
        background-color: #800000; /* darker maroon on hover */
    }

.account-button--small {
    font-size: 12px;
    line-height: 16px;
    padding: 0.3rem 0.7rem;
    font-weight: 500;
}

.account-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.account-name {
    font-size: 12px;
    color: var(--ink, #1f2a3a);
}

.impersonation-select {
    font-size: 12px;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--border, #b8c4d3);
    border-radius: 4px;
    min-width: 220px;
}

.impersonation-icon-button {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.impersonation-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.impersonation-details {
    position: relative;
}

.impersonation-details > summary {
    list-style: none;
}

.impersonation-details > summary::-webkit-details-marker {
    display: none;
}

.impersonation-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    min-width: 260px;
    background: var(--surface, #fff);
    border: 1px solid var(--border-subtle, #cfd7e3);
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    z-index: 1000;
    padding: 6px 0;
}

.impersonation-option {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: var(--ink, #1f2a3a);
    font-size: 12px;
}

.impersonation-option:hover {
    background: var(--surface-hover, #eef3fb);
}

.impersonation-icon {
    width: 12px;
    height: 12px;
    display: block;
}

.impersonation-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.impersonation-modal {
    background: var(--surface, #fff);
    border-radius: 8px;
    width: min(360px, calc(100vw - 24px));
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.impersonation-modal h4 {
    margin: 0 0 6px 0;
}

.impersonation-modal p {
    margin: 0 0 10px 0;
    font-size: 13px;
}

.impersonation-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.brand {
    font-weight: 600;
    text-decoration: none;
}

.spacer {
    flex: 1;
}

.container {
    padding: .75rem;
}

.data-grid,
.medical-practices-facilities-grid,
.schedule-grid,
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #c6d0da);
    border-radius: 6px;
    overflow: hidden;
}

.table-shell {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--border, #c6d0da);
    border-radius: 6px;
    padding: .625rem;
    margin-bottom: .75rem;
    background: var(--surface-subtle, #fbfcfe);
}

.table-shell h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--ink, #1f2a3a);
}

.table-title-bar {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: .75rem;
    width: 100%;
    margin: 0;
}

.table-title-bar__title {
    grid-column: 2;
    min-width: 0;
    margin: 0 !important;
    text-align: center;
}

.table-title-bar__title h4 {
    margin: 0;
}

.table-title-bar__actions {
    grid-column: 3;
    min-width: 0;
    justify-self: end;
}

.table-title-bar--panel-background {
    background: var(--surface-subtle, #f8fafc);
}

.table-col--actions,
.table-col--active,
.table-col--header-width {
    width: 1%;
    white-space: nowrap !important;
}

@media (max-width: 700px) {
    .table-title-bar {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 4px;
    }

    .table-title-bar__title {
        grid-column: 1;
        grid-row: 1;
    }

    .table-title-bar__actions {
        grid-column: 1;
        grid-row: 2;
        justify-self: end;
    }

}

.table-scroll {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.table-scroll--with-pager {
    border: 1px solid var(--border, #c6d0da);
    border-radius: 6px;
    background: var(--surface, #ffffff);
}

.table-scroll--with-pager > .data-grid,
.table-scroll--with-pager > .medical-practices-facilities-grid,
.table-scroll--with-pager > .schedule-grid,
.table-scroll--with-pager > .table {
    border: 0;
    border-radius: 0;
}

.table-scroll--with-pager > .data-grid thead tr:first-child th,
.table-scroll--with-pager > .medical-practices-facilities-grid thead tr:first-child th,
.table-scroll--with-pager > .schedule-grid thead tr:first-child th,
.table-scroll--with-pager > .table thead tr:first-child th {
    border-top: 0;
}

.table-scroll--with-pager > .data-grid th:first-child,
.table-scroll--with-pager > .data-grid td:first-child,
.table-scroll--with-pager > .medical-practices-facilities-grid th:first-child,
.table-scroll--with-pager > .medical-practices-facilities-grid td:first-child,
.table-scroll--with-pager > .schedule-grid th:first-child,
.table-scroll--with-pager > .schedule-grid td:first-child,
.table-scroll--with-pager > .table th:first-child,
.table-scroll--with-pager > .table td:first-child {
    border-left: 0;
}

.table-scroll--with-pager > .data-grid th:last-child,
.table-scroll--with-pager > .data-grid td:last-child,
.table-scroll--with-pager > .medical-practices-facilities-grid th:last-child,
.table-scroll--with-pager > .medical-practices-facilities-grid td:last-child,
.table-scroll--with-pager > .schedule-grid th:last-child,
.table-scroll--with-pager > .schedule-grid td:last-child,
.table-scroll--with-pager > .table th:last-child,
.table-scroll--with-pager > .table td:last-child {
    border-right: 0;
}

.table-scroll--with-pager > .data-grid tbody tr:last-child td,
.table-scroll--with-pager > .medical-practices-facilities-grid tbody tr:last-child td,
.table-scroll--with-pager > .schedule-grid tbody tr:last-child td,
.table-scroll--with-pager > .table tbody tr:last-child td {
    border-bottom: 0;
}

.data-grid th,
.data-grid td,
.medical-practices-facilities-grid th,
.medical-practices-facilities-grid td,
.schedule-grid th,
.schedule-grid td,
.table th,
.table td {
    border: 1px solid var(--border, #c6d0da);
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
}

.data-grid th,
.medical-practices-facilities-grid th,
.schedule-grid th,
.table th {
    background: var(--surface-heading, #eef2f7);
    color: var(--ink, #1f2a3a);
    font-weight: 700;
}

.schedule-grid .schedule-grid__numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.sftp-wakeup-details {
    display: inline-block;
    max-width: 32rem;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.medical-practices-pager {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
    padding: 2px 10px;
    border-top: 1px solid var(--border, #c6d0da);
    background: var(--success-surface, #dff3df);
}

.medical-practices-page-numbers {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.medical-practices-page-btn {
    min-height: 28px;
    min-width: 30px;
    border: 1px solid var(--border, #aebbc9);
    border-radius: 4px;
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.medical-practices-page-btn.active {
    background: var(--selected-surface, #2f4f4f);
    border-color: var(--selected-border, #243d3d);
    color: #ffffff;
}

.medical-practices-pager .btn {
    margin-left: 0;
}

.medical-practices-pager .btn:disabled,
.medical-practices-page-btn:disabled {
    cursor: default;
    opacity: 0.55;
}

.medical-practices-page-ellipsis {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 4px;
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    font-weight: 700;
}

.medical-practices-page-size-label {
    margin-left: 12px;
    margin-right: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink, #1f2a3a);
    white-space: nowrap;
}

.medical-practices-page-size-input {
    width: 12ch;
    max-width: 12ch;
    border: 1px solid var(--border, #aebbc9);
    border-radius: 4px;
    padding: 4px 6px;
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    font-size: 12px;
}

.medical-practices-page { display:grid; gap:.625rem; min-width:0; max-width:100%; }
.medical-practices-toolbar, .medical-practices-actions, .medical-practices-grid-header { display:flex; align-items:center; justify-content:space-between; gap:.5rem; flex-wrap:wrap; }
.medical-practices-select, .medical-practices-input, .medical-practices-inline-input, .sftp-config-picker { border:1px solid var(--border, #aebbc9); border-radius:5px; padding:.32rem .45rem; background:var(--surface, #fff); }
.medical-practices-panel, .table-shell { border:1px solid var(--border-subtle, #d8dee6); border-radius:7px; background:var(--surface, #fff); padding:.625rem; }
.medical-practices-facilities-grid { width:100%; border-collapse:collapse; }
.medical-practices-facilities-grid th, .medical-practices-facilities-grid td { border:1px solid var(--border-subtle, #d8dee6); padding:2px .42rem; text-align:left; }
.medical-practices-facilities-grid th { background:var(--surface-heading, #edf1f4); }
.medical-practice-modal-backdrop[hidden] { display:none; }
.medical-practice-modal-backdrop { position:fixed; inset:0; z-index:1050; background:rgb(0 0 0 / 45%); display:flex; align-items:center; justify-content:center; padding:1rem; }
.medical-practice-modal { background:var(--surface, #fff); border-radius:8px; width:min(58rem, 96vw); max-height:92vh; overflow:auto; padding:1.25rem; box-shadow:0 20px 50px rgb(0 0 0 / 25%); }
.medical-practice-modal-title, .medical-practice-modal-actions { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.medical-practice-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(14rem,1fr)); gap:.75rem; }
.medical-practice-form-grid label { display:grid; gap:.3rem; }
.medical-practice-modal-actions { justify-content:flex-end; margin-top:1rem; }
.medical-practices-error { color:var(--danger-ink, #b42318); }
.medical-practices-required { color:var(--danger-ink, #b42318); }

.admin-users-modal-backdrop { position:fixed; inset:0; z-index:2000; background:rgb(15 23 42 / 45%); display:none; align-items:center; justify-content:center; padding:2rem 1rem; }
.admin-users-modal { width:min(52vw,860px); min-width:420px; max-height:85vh; overflow-y:auto; background:var(--surface, #fff); border-radius:12px; border:1px solid var(--border-subtle, #d6dee8); box-shadow:0 24px 48px rgb(15 23 42 / 28%); padding:1rem 1.1rem; }
.admin-users-form-grid { display:grid; grid-template-columns:1fr; gap:.7rem; margin-top:.75rem; }
.admin-users-form-grid label { display:flex; flex-direction:column; gap:.3rem; font-weight:600; }
.admin-users-input { width:100%; border:1px solid var(--border, #bcc9d6); border-radius:8px; padding:.45rem .55rem; font-weight:400; }
.admin-users-required { color:var(--danger-ink, #b42318); }
.admin-users-checkbox { display:inline-flex; align-items:center; gap:.35rem; margin-top:.9rem; }
.admin-users-modal-actions { display:flex; justify-content:flex-end; gap:.6rem; margin-top:.9rem; }
.sftp-row-errors-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(15rem,1fr)); gap:.75rem 1.5rem; margin:0; }
.sftp-row-errors-summary div { min-width:0; }
.sftp-row-errors-summary dt { font-weight:700; }
.sftp-row-errors-summary dd { margin:.2rem 0 0; overflow-wrap:anywhere; }
.sftp-row-errors-run-panel { display:table; width:auto; max-width:100%; }
.sftp-row-errors-run-panel .medical-practices-grid-wrap { max-width:100%; }
.sftp-row-errors-summary { grid-template-columns:repeat(auto-fit,minmax(min(15rem,100%),max-content)); }
.sftp-row-error-detail-table { width:min(100%,64rem); table-layout:fixed; }
.sftp-row-error-detail-table th:first-child { width:min(18rem,35%); overflow-wrap:anywhere; }
.sftp-row-error-detail-table td { overflow-wrap:anywhere; }
.sftp-row-error-detail-layout { display:grid; grid-template-columns:minmax(36rem,2fr) minmax(22rem,1fr); gap:1rem; align-items:start; }
.sftp-associated-appointment-panel { min-width:0; }
.sftp-associated-appointment-panel h4 { margin:0 0 .5rem; color:var(--ink, #1f2a3a); font-size:13px; }
.sftp-associated-appointment-table { width:100%; table-layout:fixed; }
.sftp-associated-appointment-table th:first-child { width:45%; overflow-wrap:anywhere; }
.sftp-associated-appointment-table td { overflow-wrap:anywhere; }
.sftp-row-error-detail-id { margin:.25rem 0; font-weight:600; overflow-wrap:anywhere; }
.sftp-row-error-comparison-legend { display:flex; flex-wrap:wrap; gap:.5rem 1rem; margin:.5rem 0 .75rem; font-size:.875rem; }
.sftp-row-error-comparison-legend[hidden] { display:none; }
.sftp-row-error-comparison-legend > span { display:inline-flex; align-items:center; gap:.35rem; }
.sftp-row-error-comparison-swatch { width:1rem; height:1rem; border:1px solid var(--ink-muted, #64748b); border-radius:2px; background:var(--surface, #fff); }
.sftp-comparison-match { background-color:var(--success-surface, #d1fae5); color:var(--success-ink, #064e3b); box-shadow:inset 4px 0 var(--success-border, #047857); }
.sftp-comparison-different { background-color:var(--danger-surface, #ffe4e6); color:var(--danger-ink, #881337); box-shadow:inset 4px 0 var(--danger-border, #be123c); }
.sftp-comparison-status { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (forced-colors: active) {
    .sftp-comparison-match { outline:2px solid Highlight; outline-offset:-3px; }
    .sftp-comparison-different { outline:2px dashed Highlight; outline-offset:-3px; }
}
@media (max-width: 1100px) {
    .sftp-row-error-detail-layout { grid-template-columns:minmax(0,1fr); }
}
.sftp-progress-table { width:max-content; min-width:100%; table-layout:auto; }
.sftp-progress-table th,
.sftp-progress-table td { width:1%; padding:2px .4rem; white-space:nowrap; }
.sftp-progress-table th { max-width:8rem; white-space:normal; line-height:1.15; }
.sftp-progress-table .sftp-progress-long-col { width:auto; max-width:14rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sftp-function-log-wrap { width:100%; max-width:100%; }
.sftp-function-log-table { width:100%; max-width:100%; table-layout:fixed; }
.sftp-function-log-table .sftp-function-started-col { width:12rem; }
.sftp-function-log-table .sftp-function-result-col { width:12rem; }
.sftp-function-log-table th,
.sftp-function-log-table td { white-space:nowrap; }
.sftp-function-log-table td:last-child { overflow:hidden; }
.sftp-function-log-table .sftp-wakeup-details { display:block; max-width:100%; white-space:nowrap; }
@media (max-width:900px) { .admin-users-modal { width:min(94vw,860px); min-width:0; } }

.table-pager {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 2px 7px;
    border-top: 1px solid var(--border, #c6d0da);
    background: var(--success-surface, #dff3df);
}

.table-pager[hidden] {
    display: none !important;
}

.table-pager__pages {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.table-pager__button {
    min-width: 27px;
    min-height: 25.2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border, #aebbc9);
    border-radius: 4px;
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    font-size: 10.8px;
    font-weight: 700;
    cursor: pointer;
}

.table-pager__button--icon svg {
    width: 14.4px;
    height: 14.4px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.table-pager__button[aria-current="page"] {
    background: var(--selected-surface, #2f4f4f);
    border-color: var(--selected-border, #243d3d);
    color: #ffffff;
}

.table-pager__button:disabled {
    cursor: default;
    opacity: 0.55;
}

.table-pager__button:focus-visible,
.table-pager__page-size-input:focus-visible {
    outline: 3px solid var(--focus, #2563eb);
    outline-offset: 2px;
}

.table-pager__ellipsis {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 4px;
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    font-weight: 700;
}

.table-pager__page-size-label {
    margin-left: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink, #1f2a3a);
    white-space: nowrap;
}

.table-pager__page-size-input {
    width: 12ch;
    max-width: 12ch;
    border: 1px solid var(--border, #aebbc9);
    border-radius: 4px;
    padding: 4px 6px;
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    font-size: 12px;
}

@media (forced-colors: active) {
    .table-pager__button[aria-current="page"] {
        border: 2px solid Highlight;
        background: Highlight;
        color: HighlightText;
    }

}

.comparison-workspace { display:grid; gap:.5rem; }
.comparison-workspace__title { text-align:center; margin-bottom:0; }
.comparison-workspace__announcement { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.comparison-content { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:0; align-items:start; }
.comparison-content--without-status { grid-template-columns:minmax(0,1fr); }
.comparison-content--without-status .comparison-results { padding-left:0; }
.comparison-filters { display:grid; gap:.625rem; min-width:0; padding-right:3px; border-right:1px solid var(--border-subtle, #d8dee6); align-self:stretch; }
.comparison-filters[hidden] { display:none; }
.comparison-control-bar { display:grid; grid-column:1; grid-row:1; grid-template-columns:max-content max-content; width:max-content; max-width:100%; justify-self:start; gap:.25rem .5rem; padding:.3rem; border:1px solid var(--border-subtle, #d8dee6); border-radius:7px; background:var(--surface-subtle, #f8fafc); }
.comparison-control-bar__date { grid-column:1; grid-row:1; width:6.75rem; justify-self:start; }
.comparison-control-bar__basis { grid-column:2; grid-row:1; justify-self:end; }
.comparison-control-bar__pivot { grid-column:1; grid-row:2; width:6.75rem; justify-self:start; }
.comparison-control-bar__view { grid-column:2; grid-row:2; width:6.75rem; justify-self:end; }
.comparison-field { display:grid; gap:.1rem; min-width:0; font-size:.78rem; font-weight:600; }
.comparison-field input, .comparison-field select { box-sizing:border-box; width:100%; height:1.55rem; min-height:1.55rem; border:1px solid var(--border, #aebbc9); border-radius:5px; padding:0 .35rem; background:var(--surface, #fff); line-height:1; }
.comparison-date-control { display:flex; position:relative; }
.comparison-date-control > input[type="text"] { border-radius:5px; min-width:0; padding-right:1.75rem; }
.segmented-control-field { display:grid; gap:.1rem; font-size:.78rem; font-weight:600; }
.segmented-control-well { display:inline-flex; align-items:stretch; padding:2px; border:1px solid var(--success-border, #879b91); border-radius:7px; background:var(--success-surface, #c9ddd0); box-shadow:inset 0 2px 4px rgb(31 42 58 / 20%); }
.segmented-control-well [role="radio"] { box-sizing:border-box; min-width:4.25rem; height:1.55rem; min-height:1.55rem; padding:0 .4rem; border:1px solid var(--success-border, #9fc69f); border-radius:4px; background:var(--success-surface, #dff3df); color:var(--ink, #1f2a3a); font:inherit; line-height:1; box-shadow:inset 0 2px 3px rgb(31 42 58 / 22%); }
.segmented-control-well [role="radio"] + [role="radio"] { margin-left:3px; }
.segmented-control-well [role="radio"][aria-checked="true"] { background:var(--selected-surface, #2f4f4f); color:#fff; border-color:var(--selected-border, #243d3d); box-shadow:inset 0 1px 0 rgb(255 255 255 / 40%); }
.segmented-control-well [role="radio"]:focus-visible { outline:3px solid #1677c8; outline-offset:2px; z-index:1; }
.segmented-control-well [role="radio"]:disabled { opacity:.55; cursor:not-allowed; }
.comparison-statuses { border:0; padding:0; margin:0; }
.comparison-statuses legend { font-size:.78rem; font-weight:700; margin-bottom:.25rem; }
.comparison-statuses > div { display:grid; gap:.25rem; font-size:.78rem; }
.comparison-statuses label { white-space:nowrap; }
.comparison-results { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:.5rem; min-width:0; padding-left:3px; align-items:start; }
.comparison-matrix--previous { grid-column:1; grid-row:2; }
.comparison-matrix--current { grid-column:2; grid-row:2; }
.comparison-matrix { min-width:0; border:1px solid var(--border-subtle, #d8dee6); border-radius:7px 7px 0 0; background:var(--surface, #fff); overflow:hidden; }
.comparison-matrix > .table-title-bar { min-height:2.5rem; margin:0; padding:.38rem .5rem; background:var(--surface-heading, #f3f5f7); border-bottom:1px solid var(--border-subtle, #d8dee6); }
.comparison-matrix .table-title-bar__title { font-size:.82rem; }
.comparison-display-field { display:flex; align-items:center; gap:.3rem; white-space:nowrap; }
.comparison-display-field .segmented-control-well { padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.comparison-display-field .segmented-control-well [role="radio"] { min-width:2rem; min-height:1.65rem; padding:.2rem .35rem; }
.comparison-table { width:100%; border-collapse:collapse; font-size:.76rem; }
.comparison-table th, .comparison-table td { padding:2px .4rem; border:1px solid var(--border-subtle, #d8dee6); text-align:right; white-space:nowrap; }
.comparison-table th:first-child { text-align:left; position:sticky; left:0; background:var(--surface-subtle, #f8fafc); z-index:1; }
.comparison-table thead th { background:var(--surface-heading, #edf1f4); }
.comparison-table tbody tr:nth-child(even) td { background:var(--surface-subtle, #fafbfc); }
.comparison-total-row th, .comparison-total-row td { font-weight:700; background:var(--success-surface, #e7f2ea); }
.comparison-table tfoot th, .comparison-table tfoot td { border-bottom:0; }
.scheduling-total-row th, .scheduling-total-row td { font-weight:700; background:var(--success-surface, #e7f2ea); font-variant-numeric:tabular-nums; }
.schedule-grid tfoot th, .schedule-grid tfoot td { border-bottom:0; }
.comparison-matrix > .table-pager { margin:0; }
.comparison-sort { border:0; padding:0; background:transparent; font:inherit; font-weight:700; color:inherit; cursor:pointer; }
.comparison-loading { margin:.5rem; padding:.5rem .75rem; border-radius:6px; background:var(--info-surface, #edf6ff); color:var(--info-ink, #164e75); }
.comparison-period-error { margin:.5rem .5rem .25rem; }
.comparison-period-error.comparison-period-error--notice { color:var(--ink-muted); }
.comparison-retry { margin:0 .5rem .5rem; }
@media (max-width: 1050px) { .comparison-content { grid-template-columns:1fr; gap:.625rem; } .comparison-results { grid-column:1; padding-left:0; } .comparison-filters { grid-template-columns:1fr; align-items:start; align-self:start; padding-right:0; border-right:0; } .comparison-statuses > div { display:flex; flex-wrap:wrap; gap:.25rem .75rem; } }
@media (max-width: 760px) { .comparison-results { grid-template-columns:1fr; } .comparison-control-bar, .comparison-matrix--previous, .comparison-matrix--current { grid-column:1; } .comparison-control-bar { grid-row:1; grid-template-columns:1fr; width:auto; max-width:none; justify-self:stretch; } .comparison-control-bar__date { grid-column:1; grid-row:1; width:auto; justify-self:stretch; } .comparison-control-bar__basis { grid-column:1; grid-row:2; justify-self:stretch; } .comparison-control-bar__pivot { grid-column:1; grid-row:3; width:auto; justify-self:stretch; } .comparison-control-bar__view { grid-column:1; grid-row:4; width:auto; justify-self:stretch; } .comparison-matrix--previous { grid-row:2; } .comparison-matrix--current { grid-row:3; } }
@media (forced-colors: active) { .segmented-control-well, .segmented-control-well [role="radio"] { forced-color-adjust:auto; } .segmented-control-well [role="radio"][aria-checked="true"] { outline:2px solid Highlight; } }

.sftp-order-col {
    width: 70px;
    min-width: 70px;
    text-align: right !important;
}

.data-grid tbody tr:hover,
.medical-practices-facilities-grid tbody tr:hover,
.schedule-grid tbody tr:hover,
.table tbody tr:hover {
    background: var(--surface-subtle, #f8fbff);
}

.table > :not(caption) > * > * {
    background-color: transparent;
    border: 1px solid var(--border, #c6d0da);
    box-shadow: none;
}

.table.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: transparent;
    box-shadow: none;
}

.btn {
    margin-left: 1rem;
    text-decoration: none;
}

/* Brand logo in top bar */
.topbar .brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.topbar .brand-logo {
    height: 60px;
    width: auto;
    display: block;
}

/* Dashboard layout */
.dashboard-shell {
    display: grid;
    gap: 16px;
}

.rcm-wheel { min-width:0; overflow:visible; border-radius:18px; background:var(--surface-subtle,#f6f8fc); color:var(--ink,#213047); padding:28px 20px 20px; }
.rcm-wheel__heading { position:relative; z-index:4; text-align:center; }
.rcm-wheel__heading h1 { margin:7px 0 5px; color:var(--ink,#213047); font-size:clamp(24px,3vw,34px); font-weight:600; letter-spacing:-.025em; }
.rcm-wheel__heading > p:last-child { margin:0; color:var(--ink-muted,#5d6b80); font-size:14px; }
.rcm-wheel__eyebrow { margin:0; color:var(--ink-muted,#52647c); font-size:11px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; }
.rcm-wheel__visual { position:relative; width:min(100%,1000px); height:660px; margin:28px auto 0; }
.rcm-wheel__ring { position:absolute; top:50%; left:50%; width:440px; height:440px; border-radius:50%; background:conic-gradient(from -22.5deg,var(--ribbon-peach,#B0C4DE) 0deg 43deg,transparent 43deg 45deg,var(--ribbon-pink,#B0E0E6) 45deg 88deg,transparent 88deg 90deg,var(--ribbon-blue,#4682B4) 90deg 133deg,transparent 133deg 135deg,var(--ribbon-coral,#6495ED) 135deg 178deg,transparent 178deg 180deg,var(--ribbon-mint,#7B68EE) 180deg 223deg,transparent 223deg 225deg,var(--ribbon-green,#6A5ACD) 225deg 268deg,transparent 268deg 270deg,var(--ribbon-lavender,#483D8B) 270deg 313deg,transparent 313deg 315deg,var(--ribbon-slate,#4B0082) 315deg 358deg,transparent 358deg); mask:radial-gradient(circle,transparent 59%,#000 59.5%,#000 68%,transparent 68.5%); transform:translate(-50%,-50%); opacity:.78; }
.rcm-wheel__flow span { --flow-angle:calc(var(--flow-index) * 45deg); position:absolute; top:50%; left:50%; box-sizing:border-box; width:22px; height:22px; margin:-11px; border:1px solid var(--border-subtle,#d6deea); border-radius:50%; background:var(--surface,#fff); box-shadow:0 2px 5px rgb(23 37 61 / 12%); transform:rotate(var(--flow-angle)) translateY(-223px) rotate(90deg); }
.rcm-wheel__flow span::before { content:""; position:absolute; top:6px; left:5px; width:7px; height:7px; border-top:2px solid var(--ink-muted,#52647c); border-right:2px solid var(--ink-muted,#52647c); transform:rotate(45deg); }
.rcm-wheel__center { position:absolute; top:50%; left:50%; box-sizing:border-box; display:flex; width:272px; height:272px; align-items:center; flex-direction:column; justify-content:center; border:1px solid var(--border-subtle,#e2e8f2); border-radius:50%; background:var(--surface,#fff); box-shadow:0 15px 50px rgb(40 60 94 / 8%); text-align:center; transform:translate(-50%,-50%); z-index:2; }
.rcm-wheel__center-default, .rcm-wheel__center-preview { display:flex; width:100%; height:100%; align-items:center; flex-direction:column; justify-content:center; }
.rcm-wheel__center [hidden] { display:none; }
.rcm-wheel__center img { display:block; width:min(68%,184px); max-height:58px; object-fit:contain; }
.rcm-wheel__center strong { margin-top:13px; font-size:22px; font-weight:600; letter-spacing:-.02em; }
.rcm-wheel__center span { margin-top:7px; color:var(--ink-muted,#5d6b80); font-size:13px; line-height:1.45; }
.rcm-wheel__stages { margin:0; padding:0; list-style:none; }
.rcm-wheel__stage { --stage-color:var(--ribbon-peach,#B0C4DE); position:absolute; top:var(--stage-y); left:var(--stage-x); box-sizing:border-box; display:flex; width:192px; min-height:106px; flex-direction:column; justify-content:center; overflow:hidden; border:1px solid var(--border-subtle,#e2e8f2); border-top:4px solid var(--stage-color); border-radius:14px; background:var(--surface,#fff); box-shadow:0 7px 24px rgb(41 60 93 / 7%); transform:translate(-50%,-50%); z-index:3; }
.rcm-wheel__stage-link, .rcm-wheel__stage-content { box-sizing:border-box; display:flex; width:100%; min-height:102px; flex-direction:column; justify-content:center; padding:14px 17px; color:inherit; text-decoration:none; }
.rcm-wheel__stage--available { transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.rcm-wheel__stage--available:hover, .rcm-wheel__stage--available:focus-within { transform:translate(-50%,-50%) scale(1.25); z-index:5; border-color:var(--stage-color); box-shadow:0 10px 30px rgb(41 60 93 / 16%); }
.rcm-wheel__stage-link:focus-visible { border-radius:10px; outline:3px solid var(--stage-color); outline-offset:-5px; }
.rcm-wheel__stage-number { margin-bottom:8px; color:var(--stage-color); font-size:11px; font-weight:700; letter-spacing:.12em; }
.rcm-wheel__stage strong { font-size:14px; font-weight:600; line-height:1.3; }
.rcm-wheel__stage-link > span:last-child, .rcm-wheel__stage-content > span:last-child { margin-top:5px; color:var(--ink-muted,#5d6b80); font-size:11px; line-height:1.35; }
.rcm-wheel__stage-link { flex:1; cursor:pointer; }
.rcm-wheel__stage.rcm-wheel__stage--restricted { --stage-color:#87919e; background:#edf0f3; color:#596575; cursor:default; box-shadow:none; }
.rcm-wheel__stage--restricted .rcm-wheel__stage-content > span:last-child { color:inherit; }
.rcm-wheel__restriction .visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.rcm-wheel__restriction { position:absolute; top:10px; right:10px; display:flex; }
html[data-theme="dark"] .rcm-wheel__stage--restricted { --stage-color:#778391; background:#25303b; color:#acb6c2; border-color:#45515e; }
.rcm-wheel__stage--scheduling { --stage-color:var(--ribbon-peach,#B0C4DE); --stage-x:50%; --stage-y:7%; }
.rcm-wheel__stage--charge-entry { --stage-color:var(--ribbon-pink,#B0E0E6); --stage-x:78%; --stage-y:23%; }
.rcm-wheel__stage--claim-submission { --stage-color:var(--ribbon-blue,#4682B4); --stage-x:89%; --stage-y:50%; }
.rcm-wheel__stage--accounts-receivable { --stage-color:var(--ribbon-coral,#6495ED); --stage-x:78%; --stage-y:77%; }
.rcm-wheel__stage--denial-management { --stage-color:var(--ribbon-mint,#7B68EE); --stage-x:50%; --stage-y:93%; }
.rcm-wheel__stage--payments { --stage-color:var(--ribbon-green,#6A5ACD); --stage-x:22%; --stage-y:77%; }
.rcm-wheel__stage--patient-billing { --stage-color:var(--ribbon-lavender,#483D8B); --stage-x:11%; --stage-y:50%; }
.rcm-wheel__stage--reports { --stage-color:var(--ribbon-slate,#4B0082); --stage-x:22%; --stage-y:23%; }
@media (max-width:840px) {
    .rcm-wheel { padding-inline:16px; }
    .rcm-wheel__visual { display:grid; height:auto; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:22px; }
    .rcm-wheel__ring, .rcm-wheel__flow { display:none; }
    .rcm-wheel__center { position:static; width:100%; height:auto; min-height:180px; grid-column:1 / -1; border-radius:16px; padding:20px; transform:none; }
    .rcm-wheel__stages { display:contents; }
    .rcm-wheel__stage { position:relative; top:auto; left:auto; width:100%; min-height:124px; transform:none; }
    .rcm-wheel__stage--available:hover, .rcm-wheel__stage--available:focus-within { transform:scale(1.25); }
}
@media (max-width:480px) {
    .rcm-wheel__visual { grid-template-columns:minmax(0,1fr); }
    .rcm-wheel__center { grid-column:auto; }
}
@media (prefers-reduced-motion:reduce) {
    .rcm-wheel__stage--available { transition:none; }
    .rcm-wheel__stage--available:hover, .rcm-wheel__stage--available:focus-within { transform:translate(-50%,-50%); }
}
@media (max-width:840px) and (prefers-reduced-motion:reduce) {
    .rcm-wheel__stage--available:hover, .rcm-wheel__stage--available:focus-within { transform:none; }
}
@media (forced-colors:active) {
    .rcm-wheel__ring, .rcm-wheel__flow { display:none; }
    .rcm-wheel__stage { border:2px solid CanvasText; }
}

.panel-band {
    background: transparent;
    padding: 6px var(--admin-content-inset) 0;
    border-bottom: 0;
}

.panel-ribbon {
    margin-bottom: 0;
    padding-bottom: 2px;
}

.dashboard-hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    background: var(--info-surface, #cfe8fb);
    padding: 16px 20px;
    border-radius: 10px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--ink, #1f2a3a);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
    align-items: start;
}

.card-ribbon {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 18px;
}

.dashboard-ribbon-top {
    margin-bottom: 0;
    padding-bottom: 2px;
}

.card-ribbon::-webkit-scrollbar {
    height: 8px;
}

.card-ribbon::-webkit-scrollbar-thumb {
    background: var(--info-surface, #c6d4e2);
    border-radius: 999px;
}

.admin-menu-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 0;
    padding: 0;
    background: var(--surface-heading, #000000);
}

.admin-menu-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border, #b8c6d6);
    border-radius: 6px;
    background: var(--surface, #ffffff);
    color: var(--ink, #213047);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.admin-menu-button--users {
    background: var(--success-surface, #dff3df);
    border-color: var(--success-border, #9fc69f);
    color: var(--ink, #1f2a3a);
}

.admin-menu-button--medical-practices {
    background: var(--warning-surface, #f2e8b5);
    border-color: var(--warning-border, #c8b85f);
    color: var(--ink, #1f2a3a);
}

.admin-menu-button--onboarding {
    background: #4d74b8;
    border-color: #3c5f9c;
    color: #ffffff;
}

.admin-menu-button--sftp-status {
    background: #0f6b78;
    border-color: #0b5661;
    color: #ffffff;
}

.admin-menu-button--azure-key-vault {
    background: var(--selected-surface, #2f4f4f);
    border-color: var(--selected-border, #243d3d);
    color: #ffffff;
}

.admin-menu-button--cease {
    background: #9a1b1b;
    border-color: #7f1515;
    color: #ffffff;
}

.workflow-control { display: flex; align-items: center; gap: .5rem; }
.workflow-control > a { font-size: .8rem; max-width: 24rem; }
.workflow-control > button:disabled { cursor: wait; opacity: .7; }
.sftp-cessation-note { display: block; font-size: .8rem; white-space: normal; }

.admin-menu-button:hover,
.admin-menu-button.active {
    filter: brightness(0.94);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.32);
}

.admin-menu-button:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
}

@media (forced-colors: active) {
    .admin-menu-button:focus-visible {
        outline-color: Highlight;
    }
}

.onboarding-toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-bottom: 14px;
}

.onboarding-page .medical-practices-selector label,
.onboarding-actions .medical-practices-inline-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink, #1f2a3a);
}

.onboarding-page .medical-practices-select,
.onboarding-page .medical-practices-inline-input {
    border: 1px solid var(--border, #aebbc9);
    border-radius: 6px;
    box-sizing: border-box;
    height: 26px;
    min-height: 26px;
    padding: 0 8px;
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
}

.onboarding-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.onboarding-actions .medical-practices-inline-label {
    white-space: nowrap;
}

.onboarding-page .onboarding-file-name-col {
    min-width: 280px;
    max-width: 440px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.onboarding-page .sftp-order-col {
    width: 46px;
    min-width: 46px;
}

.onboarding-page .onboarding-date-time-col {
    width: 104px;
    min-width: 104px;
    white-space: nowrap;
}

.onboarding-page .onboarding-count-col {
    width: 76px;
    min-width: 76px;
    text-align: right !important;
    white-space: nowrap;
}

.onboarding-page .onboarding-status-col {
    width: 150px;
    min-width: 150px;
    max-width: 220px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.onboarding-page .onboarding-read-status {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.onboarding-page .onboarding-read-status--active {
    color: var(--success-ink, #2f4f4f);
}

.onboarding-page .onboarding-read-status--stale {
    color: var(--danger-ink, #9a1b1b);
}

.onboarding-page .onboarding-read-status--idle {
    color: var(--ink-muted, #5a6470);
}

.onboarding-page .sftp-config-actions-cell {
    min-width: 0;
    white-space: nowrap;
}

.onboarding-page .sftp-config-delete-btn,
.onboarding-page .sftp-config-reactivate-btn,
.onboarding-page .sftp-config-read-btn {
    padding: 0;
    border: 1px solid var(--border, #c7d1db);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    cursor: pointer;
}

.onboarding-page .sftp-config-read-btn {
    background: var(--success-surface, #dff3df);
    color: var(--ink, #1f2a3a);
}

.onboarding-page .sftp-config-delete-btn {
    background: var(--warning-surface, #f2e8b5);
    color: var(--ink, #1f2a3a);
}

.onboarding-page .sftp-config-reactivate-btn {
    background: #4d74b8;
    color: #ffffff;
}

.onboarding-page .sftp-config-read-btn:hover,
.onboarding-page .sftp-config-delete-btn:hover,
.onboarding-page .sftp-config-reactivate-btn:hover {
    filter: brightness(0.94);
}

.onboarding-page .sftp-config-delete-btn:disabled,
.onboarding-page .sftp-config-reactivate-btn:disabled,
.onboarding-page .sftp-config-read-btn:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.onboarding-page .sftp-config-icon {
    display: block;
}

#onboardingConfirmModal.medical-practice-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#onboardingConfirmModal .medical-practice-modal {
    background: var(--surface, #ffffff);
    border-radius: 8px;
    width: min(420px, calc(100vw - 24px));
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

#onboardingConfirmModal .medical-practice-modal h4 {
    margin: 0;
}

#onboardingConfirmModal .medical-practice-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

#onboardingConfirmModal .sftp-confirm-message {
    margin: 12px 0 0 0;
    font-size: 13px;
    color: var(--ink, #1f2a3a);
}

@media (max-width: 900px) {
    .onboarding-toolbar,
    .onboarding-actions {
        flex-wrap: wrap;
    }
}

.ribbon-card {
    flex: 0 0 190px;
    display: grid;
    gap: 0;
    padding: 2px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--ink, #1f2a3a);
    border: 1px solid var(--border-subtle, #d6dde6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    position: relative;
}

.ribbon-card::after {
    content: "";
    position: absolute;
    right: -12px;
    top: 12px;
    width: 0;
    height: 0;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 12px solid rgba(255, 255, 255, 0.6);
}

.ribbon-title {
    font-size: 11px;
    font-weight: 600;
}

.ribbon-card__content {
    display: grid;
    gap: 4px;
}

.ribbon-meta {
    font-size: 13px;
    font-weight: 700;
}

.ribbon-sub {
    font-size: 10px;
    color: var(--ink-muted, #4f5d70);
}

.ribbon-lag-indicator {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.ribbon-lag-indicator__mark {
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 15px;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
}

.ribbon-lag-indicator--warning .ribbon-lag-indicator__mark {
    background: #b45309;
}

.ribbon-lag-indicator--critical .ribbon-lag-indicator__mark {
    background: #991b1b;
}

.ribbon-lag-indicator:focus-visible {
    outline: 2px solid var(--focus, #1d4ed8);
    outline-offset: -4px;
}

.scheduling-panel-lag-modal {
    width: min(420px, calc(100vw - 24px));
    padding: 14px;
}

.scheduling-panel-lag-modal h4,
.scheduling-panel-lag-modal__message {
    margin: 0;
}

.scheduling-panel-lag-modal__message {
    margin-top: 10px;
    line-height: 1.45;
}

.ribbon-lag-indicator:hover::after,
.ribbon-lag-indicator:focus::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: max-content;
    max-width: 280px;
    padding: 7px 9px;
    border: 1px solid var(--danger-border, #f1a8a8);
    border-radius: 7px;
    background: var(--danger-surface, #fee2e2);
    color: var(--danger-ink, #7f1d1d);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    white-space: normal;
    z-index: 100;
}

.ribbon-card--peach { background: var(--ribbon-peach, #B0C4DE); }
.ribbon-card--pink { background: var(--ribbon-pink, #B0E0E6); }
.ribbon-card--blue { background: var(--ribbon-blue, #4682B4); }
.ribbon-card--coral { background: var(--ribbon-coral, #6495ED); }
.ribbon-card--mint { background: var(--ribbon-mint, #7B68EE); }
.ribbon-card--green { background: var(--ribbon-green, #6A5ACD); }
.ribbon-card--lavender { background: var(--ribbon-lavender, #483D8B); }
.ribbon-card--slate { background: var(--ribbon-slate, #4B0082); }

.dashboard-nav {
    border: 1px solid var(--border-subtle, #cfd7e3);
    border-radius: 8px;
    background: var(--surface-subtle, #f4f4f4);
    padding: 10px;
}

.dashboard-nav-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.dashboard-nav a {
    display: block;
    background: #9a9a9a;
    color: #fff;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
}

.dashboard-nav a + a {
    margin-top: 6px;
}

.dashboard-section {
    border: 1px solid var(--border-subtle, #d8e1ea);
    border-radius: 10px;
    padding: 16px;
    background: var(--surface, #fff);
}

.dashboard-section h3 {
    margin-top: 0;
    font-size: 16px;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-title {
        font-size: 22px;
    }

    .ribbon-card {
        flex: 0 0 160px;
    }
}

.btn.btn-primary {
    background: #5a7fb8;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
}

.btn.btn-primary:hover {
    background: #486a9b;
}

/* Dashboard ribbon updates: remove arrows + apply Innovanta color scheme */
.ribbon-card {
    border-radius: 10px;
    padding-right: 12px;
}

.ribbon-card::after,
.ribbon-card::before {
    content: none;
}

.ribbon-card--peach { background: var(--ribbon-peach, #B0C4DE); }
.ribbon-card--pink { background: var(--ribbon-pink, #B0E0E6); }
.ribbon-card--blue { background: var(--ribbon-blue, #4682B4); }
.ribbon-card--coral { background: var(--ribbon-coral, #6495ED); }
.ribbon-card--mint { background: var(--ribbon-mint, #7B68EE); }
.ribbon-card--green { background: var(--ribbon-green, #6A5ACD); }
.ribbon-card--lavender { background: var(--ribbon-lavender, #483D8B); }
.ribbon-card--slate { background: var(--ribbon-slate, #4B0082); }

.ribbon-card--blue,
.ribbon-card--coral,
.ribbon-card--mint,
.ribbon-card--green,
.ribbon-card--lavender,
.ribbon-card--slate {
    color: #ffffff;
}

.ribbon-card--blue .ribbon-sub,
.ribbon-card--coral .ribbon-sub,
.ribbon-card--mint .ribbon-sub,
.ribbon-card--green .ribbon-sub,
.ribbon-card--lavender .ribbon-sub,
.ribbon-card--slate .ribbon-sub {
    color: #f2f5fb;
}

.topbar-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--ink, #1f2a3a);
    margin-left: 12px;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-heading, #1f2a3a);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
}

.nav-toggle-icon {
    font-size: 18px;
    line-height: 1;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
}

.dashboard-grid--nav {
    grid-template-columns: minmax(0, 1fr) 220px;
}

.dashboard-nav {
    display: none;
}

.dashboard-nav--open {
    display: block;
}

.ribbon-card--admin {
    background: var(--selected-surface, #2F4F4F);
}

.ribbon-card--admin,
.ribbon-card--admin .ribbon-sub {
    color: #ffffff;
}

:root:not([data-theme="dark"]) .ribbon-card {
    color: var(--ink, #1f2a3a);
}

:root:not([data-theme="dark"]) .ribbon-card .ribbon-title {
    font-weight: 700;
}

:root:not([data-theme="dark"]) .ribbon-card .ribbon-sub {
    color: var(--ink-muted, #4f5d70);
}

:root:not([data-theme="dark"]) :is(.ribbon-card--mint, .ribbon-card--green, .ribbon-card--lavender, .ribbon-card--slate, .ribbon-card--admin),
:root:not([data-theme="dark"]) :is(.ribbon-card--mint, .ribbon-card--green, .ribbon-card--lavender, .ribbon-card--slate, .ribbon-card--admin) .ribbon-sub {
    color: #ffffff;
}

.schedule-filter {
    display: inline-grid;
    width: fit-content;
    max-width: 100%;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border-subtle, #d8e1ea);
    border-radius: 8px;
    background: var(--surface-subtle, #f8fafc);
    margin-bottom: 10px;
}

.data-grid-control {
    display: inline-grid;
    width: fit-content;
    max-width: 100%;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border-subtle, #d8e1ea);
    border-radius: 8px;
    background: var(--surface-subtle, #f8fafc);
    margin-bottom: 10px;
}

.data-grid-control__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.data-grid-control__quick {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.data-grid-control__btn {
    border: 1px solid var(--border, #9aa9bb);
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    border-radius: 5px;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.data-grid-control__btn:hover {
    background: var(--surface-hover, #eef3fb);
}

.data-grid-control__toolbar > .data-grid-control__btn:first-of-type { margin-left:auto; }
.scheduling-sync-button[aria-pressed="true"] { background:var(--selected-surface, #2f4f4f); color:#fff; border-color:var(--selected-border, #243d3d); box-shadow:inset 0 1px 0 rgb(255 255 255 / 35%); }
.scheduling-sync-button:focus-visible { outline:3px solid #1677c8; outline-offset:2px; }
.scheduling-sync-button:disabled { cursor:not-allowed; opacity:.55; }
@media (forced-colors: active) { .scheduling-sync-button[aria-pressed="true"] { outline:2px solid Highlight; } }

.data-grid-control__btn--quick {
    padding-right: 18px;
    position: relative;
}

.data-grid-control__btn--quick::after {
    content: "";
    position: absolute;
    right: 7px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--ink, #1f2a3a);
    border-bottom: 2px solid var(--ink, #1f2a3a);
    transform: translateY(-65%) rotate(45deg);
}

.data-grid-control__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 45;
    min-width: 130px;
    border: 1px solid var(--border, #c4cfdd);
    border-radius: 6px;
    background: var(--surface, #ffffff);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    padding: 4px;
    display: grid;
    gap: 2px;
}

.data-grid-control__menu[hidden] {
    display: none !important;
}

.data-grid-control__menu--cascade {
    left: calc(100% + 4px);
    top: 0;
}

.data-grid-control__menu-item {
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: 4px;
    padding: 5px 7px;
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    cursor: pointer;
}

.data-grid-control__menu-item:hover {
    background: var(--surface-hover, #eef3fb);
}

.data-grid-control__fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(115px, 170px));
    gap: 8px;
}

.data-grid-control__field {
    display: grid;
    gap: 4px;
}

.data-grid-control__date {
    position: relative;
}

.data-grid-control__label {
    font-weight: 600;
    font-size: 12px;
    color: var(--ink, #1f2a3a);
}

.data-grid-control__input {
    border: 1px solid var(--border, #aebbc9);
    border-radius: 6px;
    padding: 4px 7px;
    font-size: 12px;
    min-height: 28px;
    color: var(--ink, #1f2a3a);
    background: var(--surface, #fff);
}

.data-grid-control__date-input {
    box-sizing: border-box;
    width: 100%;
    padding-right: 30px;
}

.data-grid-control__calendar-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ink, #334155);
    cursor: pointer;
    transform: translateY(-50%);
}

.data-grid-control__calendar-btn:hover,
.data-grid-control__calendar-btn:focus-visible {
    background: var(--surface-hover, #eef3fb);
    color: var(--ink, #1f2a3a);
}

.data-grid-control__calendar-btn:focus-visible {
    outline: 2px solid #4d74b8;
    outline-offset: 1px;
}

.data-grid-control__calendar-icon {
    width: 15px;
    height: 15px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.data-grid-control__calendar {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: auto;
    z-index: 55;
    box-sizing: border-box;
    width: min(224px, var(--data-grid-calendar-available-width, calc(100vw - 16px)));
    padding: 8px;
    border: 1px solid var(--border, #c4cfdd);
    border-radius: 6px;
    background: var(--surface, #ffffff);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    transform: translateX(var(--data-grid-calendar-shift-x, 0px));
}

.data-grid-control__calendar[hidden] {
    display: none !important;
}

.data-grid-control__calendar-header {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.data-grid-control__calendar-title {
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.data-grid-control__calendar-nav {
    width: 28px;
    height: 26px;
    border: 1px solid var(--border, #c6d0da);
    border-radius: 4px;
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.data-grid-control__calendar-nav:hover,
.data-grid-control__calendar-nav:focus-visible {
    background: var(--surface-hover, #eef3fb);
}

.data-grid-control__calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.data-grid-control__calendar-weekday {
    padding: 2px 0;
    color: var(--ink-muted, #4f5d70);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.data-grid-control__calendar-day {
    min-width: 0;
    height: 26px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.data-grid-control__calendar-day:hover,
.data-grid-control__calendar-day:focus-visible {
    border-color: var(--border, #9aa9bb);
    background: var(--surface-hover, #eef3fb);
}

.data-grid-control__calendar-day--outside {
    color: var(--ink-faint, #8492a6);
}

.data-grid-control__calendar-day--today {
    border-color: #4d74b8;
}

.data-grid-control__calendar-day--selected {
    border-color: var(--selected-border, #243d3d);
    background: var(--selected-surface, #2f4f4f);
    color: #ffffff;
}

.data-grid-control__calendar-day--selected:hover,
.data-grid-control__calendar-day--selected:focus-visible {
    background: var(--selected-border, #243d3d);
    color: #ffffff;
}

.data-grid-control__select {
    appearance: auto;
}

.data-grid-control__validation {
    margin: 0 0 10px 0;
    color: var(--danger-ink, #9a1b1b);
    font-weight: 600;
    font-size: 12px;
}

.data-grid-control__loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px 0;
    color: var(--ink, #334155);
    font-size: 12px;
    font-weight: 700;
}

.data-grid-control__spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border, #c6d0da);
    border-top-color: #4d74b8;
    border-radius: 50%;
    animation: data-grid-control-spin 0.8s linear infinite;
}

@keyframes data-grid-control-spin {
    to {
        transform: rotate(360deg);
    }
}

.schedule-filter__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.schedule-filter__quick {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.schedule-filter__label {
    font-weight: 600;
    font-size: 12px;
    color: var(--ink, #1f2a3a);
}

.schedule-filter__quick-btn,
.schedule-filter__default-btn {
    border: 1px solid var(--border, #9aa9bb);
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    border-radius: 5px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    cursor: pointer;
}

.schedule-filter__quick-btn:hover,
.schedule-filter__default-btn:hover {
    background: var(--surface-hover, #eef3fb);
}

.schedule-filter__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(96px, 127px));
    gap: 8px;
}

.schedule-filter__field {
    display: grid;
    gap: 4px;
}

.schedule-filter__field-label {
    font-weight: 600;
    font-size: 12px;
    color: var(--ink, #1f2a3a);
}

.schedule-filter__input {
    border: 1px solid var(--border, #aebbc9);
    border-radius: 6px;
    padding: 4px 7px;
    font-size: 12px;
    min-height: 28px;
    color: var(--ink, #1f2a3a);
    background: var(--surface, #fff);
}

.schedule-trend-cards {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.schedule-trend-card {
    border: 1px solid var(--border, #9aa4ab);
    border-radius: 10px;
    padding: 2px 1rem;
}

.schedule-trend-card h4 {
    margin: 0 0 0.45rem 0;
    font-size: 1rem;
}

.schedule-trend-card--current {
    background: var(--success-surface, #dff3df);
    padding: 2px;
}

.schedule-trend-card--trend {
    background: var(--warning-surface, #f2e8b5);
    padding-block: 2px;
}

.schedule-trend-kv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem 1.25rem;
    font-size: 0.71rem;
}

.schedule-trend-kv--compact {
    gap: 0.2rem 0.8rem;
}

.schedule-trend-kv .label {
    font-weight: 700;
    margin-right: 0.35rem;
}

.schedule-trend-range {
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.schedule-current-compact {
    display: grid;
    gap: 0.3rem;
}

.schedule-current-compact__labels,
.schedule-current-compact__values {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(120px, 1fr));
    column-gap: 1rem;
    align-items: center;
}

.schedule-current-compact__labels {
    font-weight: 700;
}

.schedule-trend-periods {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 1rem;
}

.schedule-trend-period h5 {
    margin: 0 0 0.45rem 0;
    font-size: 0.95rem;
}

.schedule-trend-bottom {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
}

.metric-line-chart {
    display: grid;
    gap: 8px;
    width: 100%;
    min-height: 280px;
}

.metric-line-chart svg {
    width: 100%;
    height: 240px;
    border: 1px solid var(--border, #c6d0da);
    background: var(--surface, #ffffff);
}

.metric-line-chart__axis {
    stroke: var(--ink-muted, #66768a);
    stroke-width: 1;
}

.metric-line-chart__line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.metric-line-chart__line--encounter {
    stroke: var(--chart-blue, #2f6f9f);
}

.metric-line-chart__line--charge {
    stroke: var(--chart-purple, #8a4f9f);
}

.metric-line-chart__line--claim {
    stroke: var(--chart-green, #3f7f4f);
}

.metric-line-chart__tick {
    fill: var(--ink, #3d4b5e);
    font-size: 11px;
}

.metric-line-chart__tick--middle {
    text-anchor: middle;
}

.metric-line-chart__tick--end {
    text-anchor: end;
}

.metric-line-chart__legend {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
}

.metric-line-chart__swatch {
    display: inline-block;
    width: 18px;
    height: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

.metric-line-chart__swatch--encounter {
    background: var(--chart-blue, #2f6f9f);
}

.metric-line-chart__swatch--charge {
    background: var(--chart-purple, #8a4f9f);
}

.metric-line-chart__swatch--claim {
    background: var(--chart-green, #3f7f4f);
}

.claim-submission-batch-summary {
    display: grid;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 700px) {
    .schedule-trend-periods {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }
}

.scheduling-encounters-table-shell {
    width: 50%;
}

.scheduling-appointments-table-shell {
    width: 90%;
}

.scheduling-table-header {
    margin-bottom: 0;
}

.scheduling-table-header h4 {
    margin: 0;
}

.scheduling-chart-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.scheduling-display-toggle {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border, #9aa9bb);
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface, #ffffff);
}

.scheduling-display-toggle__button {
    min-width: 30px;
    min-height: 26px;
    border: 1px solid var(--border, #9aa9bb);
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.scheduling-chart-controls--compact .scheduling-display-toggle__button {
    min-width: 27px;
    min-height: 23.4px;
    font-size: 10.8px;
}

.scheduling-chart-controls--compact .scheduling-chart-button {
    padding: 2.7px 8.1px;
    border-radius: 4.5px;
    font-size: 10.8px;
}

.scheduling-display-toggle .scheduling-display-toggle__button {
    border: 0;
    border-right: 1px solid var(--border, #c6d0da);
    border-radius: 0;
}

.scheduling-display-toggle__button:last-child {
    border-right: 0;
}

.scheduling-display-toggle__button:hover {
    background: var(--surface-hover, #eef3fb);
}

.scheduling-display-toggle__button--active {
    background: var(--action-primary, #2f6f9f);
    color: #ffffff;
}

.scheduling-display-toggle__button--active:hover {
    background: #285f88;
}

.scheduling-chart-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.scheduling-chart-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.42);
}

.scheduling-chart-modal-backdrop[hidden] {
    display: none !important;
}

.scheduling-chart-modal {
    display: grid;
    gap: 14px;
    width: min(760px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid var(--border, #c6d0da);
    border-radius: 8px;
    background: var(--surface, #ffffff);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    padding: 16px;
}

.scheduling-chart-modal__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.scheduling-chart-modal__header h4 {
    margin: 0;
    color: var(--ink, #1f2a3a);
    font-size: 16px;
}

.scheduling-chart-modal__header p {
    margin: 4px 0 0 0;
    color: var(--ink-muted, #4f5d70);
    font-size: 12px;
    font-weight: 700;
}

.scheduling-chart-modal__close {
    min-width: 28px;
    min-height: 28px;
    border: 1px solid var(--border, #9aa9bb);
    border-radius: 5px;
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.scheduling-chart-modal__close:hover {
    background: var(--surface-hover, #eef3fb);
}

.scheduling-pie-chart {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(240px, 1fr);
    align-items: center;
    gap: 18px;
}

.scheduling-pie-chart__visual {
    display: grid;
    justify-items: center;
}

.scheduling-pie-chart__svg {
    width: min(260px, 100%);
    height: auto;
    display: block;
}

.scheduling-pie-chart__slice {
    stroke: #ffffff;
    stroke-width: 2;
}

.scheduling-pie-chart__slice:hover {
    filter: brightness(0.94);
}

.scheduling-pie-chart__center {
    fill: var(--surface, #ffffff);
    stroke: var(--border-subtle, #d8e1ea);
    stroke-width: 1;
}

.scheduling-pie-chart__total,
.scheduling-pie-chart__total-label {
    fill: var(--ink, #1f2a3a);
    text-anchor: middle;
}

.scheduling-pie-chart__total {
    font-size: 22px;
    font-weight: 800;
}

.scheduling-pie-chart__total-label {
    font-size: 11px;
    font-weight: 700;
}

.scheduling-pie-chart__legend {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.scheduling-pie-chart__legend-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 2px 0;
    border-bottom: 1px solid var(--surface-heading, #eef2f7);
    color: var(--ink, #1f2a3a);
    font-size: 12px;
}

.scheduling-pie-chart__legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.scheduling-pie-chart__legend-label {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.scheduling-pie-chart__legend-primary {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.scheduling-pie-chart__legend-secondary {
    color: var(--ink-muted, #4f5d70);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.scheduling-pie-chart__empty {
    display: flex;
    align-items: center;
    min-height: 120px;
    color: var(--ink-muted, #4f5d70);
    font-size: 12px;
    font-weight: 700;
}

.appointment-year-strip-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin: 0 0 10px 0;
    max-width: 100%;
}

.appointment-year-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0 0 10px 0;
    overflow-x: auto;
    width: fit-content;
    max-width: 100%;
}

.appointment-year-strip__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
    min-width: max-content;
}

.appointment-year-strip--two-year {
    --appointment-month-width: 10ch;
}

.appointment-year-strip--two-year .appointment-year-strip__row {
    grid-template-columns: 52px minmax(0, 1fr);
}

.appointment-year-strip--two-year .appointment-year-strip__year {
    box-sizing: border-box;
    width: 100%;
}

.appointment-year-strip--dual-count {
    --appointment-month-width: 14ch;
}

.appointment-year-strip--dual-count .appointment-year-strip__months {
    grid-template-columns: repeat(12, minmax(var(--appointment-month-width), max-content));
}

.appointment-year-strip__year {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: end;
    min-width: 46px;
    padding: 2px 6px;
    border: 1px solid var(--border, #c6d0da);
    border-radius: 6px;
    background: var(--surface-heading, #eef2f7);
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.appointment-year-strip__row + .appointment-year-strip__row .appointment-year-strip__year {
    border-top: 0;
}

.appointment-year-strip__months {
    display: grid;
    grid-template-columns: repeat(12, minmax(var(--appointment-month-width, 7ch), var(--appointment-month-width, 7ch)));
    gap: 0;
    min-width: max-content;
}

.appointment-year-strip__row-label {
    padding: 1px 2px;
    border: 1px solid var(--border, #c6d0da);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: var(--surface-heading, #eef2f7);
    color: var(--ink, #1f2a3a);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.appointment-year-strip--calendar .appointment-year-strip__row-label,
.appointment-year-strip--buckets .appointment-year-strip__row-label {
    grid-column: 1 / -1;
}

.appointment-year-strip__row-status {
    grid-column: 1 / -1;
    min-height: 0;
    padding: 2px 10px;
    border: 1px solid var(--border, #c6d0da);
    color: var(--ink-muted, #4f5d70);
    line-height: 1;
    text-align: center;
}

.appointment-year-strip__month {
    display: grid;
    align-content: center;
    gap: 0;
    min-height: 0;
    padding: 1px 2px 2px 2px;
    border: 1px solid var(--border, #c6d0da);
    border-radius: 0;
    color: var(--ink, #1f2a3a);
    text-align: center;
}

.appointment-year-strip__month--past {
    background: var(--surface-subtle, #f2f5f9);
}

.appointment-year-strip__month--current {
    background: var(--success-surface, #dff3df);
    border-color: var(--success-border, #8fbd8f);
    box-shadow: inset 0 0 0 1px var(--success-border, #8fbd8f);
}

.appointment-year-strip__month--future {
    background: var(--info-surface, #eef6fb);
}

.charge-entry-uncharged-strip__bucket {
    appearance: none;
    font: inherit;
    cursor: pointer;
}

.charge-entry-uncharged-strip__bucket:focus-visible {
    outline: 2px solid var(--focus, #2563eb);
    outline-offset: 2px;
}

.charge-entry-uncharged-strip__bucket--selected {
    box-shadow: inset 0 0 0 2px var(--focus, #2563eb);
}

.charge-entry-detail-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 1rem 0;
}

.charge-entry-detail-toolbar__field {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--ink, #334155);
}

.charge-entry-detail-grid__header {
    margin-bottom: 0;
}

.charge-entry-detail-grid__header h4 {
    margin: 0;
}

.charge-entry-date-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.charge-entry-date-filter {
    box-sizing: border-box;
    align-content: start;
}

.charge-entry-date-filter__title {
    margin: 0;
    font-size: 0.95rem;
    color: var(--ink, #334155);
}

.charge-entry-matrix {
    margin: 1rem 0;
}

.charge-entry-matrix__message {
    margin: 0.25rem 0 0;
    color: var(--ink-muted, #475569);
    font-size: 0.85rem;
}

.charge-entry-matrix__mode {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--border, #94a3b8);
    border-radius: 0.4rem;
}

.charge-entry-matrix__mode-button {
    min-width: 2.35rem;
    min-height: 2rem;
    border: 0;
    border-right: 1px solid var(--border-subtle, #cbd5e1);
    background: var(--surface, #fff);
    color: var(--ink, #334155);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.charge-entry-matrix__mode-button:last-child {
    border-right: 0;
}

.charge-entry-matrix__mode-button--active {
    background: #1f6f43;
    color: #fff;
}

.charge-entry-matrix__mode-button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid var(--focus, #2563eb);
    outline-offset: -2px;
}

.charge-entry-matrix__table th,
.charge-entry-matrix__table td {
    min-width: 8rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.charge-entry-matrix__table th:first-child,
.charge-entry-matrix__table td:first-child {
    min-width: 14rem;
}

.claim-matrix__total-column,
.charge-entry-matrix__total-column,
.scheduling-appointments__total-column {
    border-left: 2px solid var(--border, #94a3b8);
    font-weight: 700;
}

.charge-entry-detail-grid__row--missing-patient td {
    background: var(--danger-surface, #fee2e2);
    color: var(--danger-ink, #7f1d1d);
}

.charge-entry-detail-grid__row--relationship-mismatch td {
    background: var(--warning-surface, #fef3c7);
    color: var(--warning-ink, #78350f);
}

.charge-entry-detail-grid__row--missing-patient:hover td {
    background: var(--danger-hover, #fecaca);
}

.charge-entry-detail-grid__row--relationship-mismatch:hover td {
    background: var(--warning-hover, #fde68a);
}

.charge-entry-detail-area--hidden {
    display: none;
}

.charge-entry-filter-row th {
    background: var(--surface-subtle, #f8fafc);
}

.charge-entry-filter-row .schedule-filter__input {
    width: 100%;
    min-width: 10rem;
}

.appointment-year-strip__label {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.05;
    white-space: nowrap;
}

.appointment-year-strip__count {
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    white-space: nowrap;
}

.appointment-year-strip__counts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: baseline;
    column-gap: 0.35ch;
}

.appointment-year-strip__count-value {
    min-width: 0;
    text-align: center;
    cursor: help;
}

.appointment-year-strip__count-separator {
    color: var(--ink-muted, #64748b);
    font-weight: 600;
}

.appointment-year-strip__status {
    margin: -2px 0 10px 0;
    color: var(--ink-muted, #4f5d70);
    font-size: 12px;
}

#payment-year-strip-status {
    min-height: 1.2em;
}

.charge-entry-dos-entry {
    display: grid;
    grid-template-columns: max-content auto;
    align-items: baseline;
    gap: 6px;
    margin: -4px 0 8px 0;
    color: var(--ink, #1f2a3a);
    font-size: 12px;
}

.kpi-landing-title {
    margin: 0 0 12px 0;
    color: var(--ink, #1f2a3a);
    font-size: 18px;
    text-align: center;
}

.charge-entry-pager-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }

.charge-entry-dos-entry__label {
    font-size: 12px;
    font-weight: 700;
}

.charge-entry-dos-entry__value {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.charge-entry-uncharged-strip {
    margin-bottom: 10px;
}

.charge-entry-uncharged-strip__buckets {
    grid-template-columns: repeat(12, minmax(var(--appointment-month-width, 7ch), var(--appointment-month-width, 7ch)));
}

.charge-entry-uncharged-strip__bucket--empty {
    cursor: default;
}

.schedule-error {
    margin: 8px 0 12px 0;
    color: var(--danger-ink, #9a1b1b);
    font-weight: 600;
    font-size: 12px;
}

.scheduling-detail-link,
.scheduling-detail-page__back {
    color: var(--info-ink, #145da0);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.scheduling-detail-link:focus-visible,
.scheduling-detail-page__back:focus-visible {
    outline: 2px solid var(--focus, #2563eb);
    outline-offset: 2px;
}

.scheduling-detail-page__back {
    display: inline-block;
    margin-bottom: 8px;
}

.scheduling-detail-page__context {
    margin: -4px 0 12px;
    color: var(--ink-muted, #4f5d70);
    font-size: 13px;
}

.scheduling-detail-page__heading--centered {
    text-align: center;
}

.scheduling-detail-page__date-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scheduling-detail-page__table-shell {
    width: 100%;
}

.scheduling-detail-page__table th,
.scheduling-detail-page__table td {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .schedule-filter {
        width: 100%;
    }

    .schedule-filter__row {
        grid-template-columns: 1fr;
    }

    .schedule-trend-kv {
        grid-template-columns: 1fr;
    }

    .schedule-current-compact__labels,
    .schedule-current-compact__values {
        grid-template-columns: 1fr;
        row-gap: 0.25rem;
    }

    .schedule-trend-periods {
        grid-template-columns: 1fr;
    }

    .data-grid-control {
        width: 100%;
    }

    .data-grid-control__fields {
        grid-template-columns: 1fr;
    }

    .data-grid-control__menu--cascade {
        position: static;
        margin-top: 4px;
        left: auto;
        top: auto;
    }

    .scheduling-encounters-table-shell {
        width: 100%;
    }

    .scheduling-appointments-table-shell {
        width: 100%;
    }

    .scheduling-pie-chart {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .appointment-year-strip-layout {
        grid-template-columns: minmax(0, 1fr);
    }

}

@media (max-width: 520px) {

    .scheduling-chart-modal-backdrop {
        padding: 10px;
    }

    .scheduling-chart-modal {
        padding: 12px;
    }

    .scheduling-pie-chart__legend-item {
        grid-template-columns: 14px minmax(0, 1fr) auto;
    }

    .scheduling-pie-chart__legend-secondary {
        grid-column: 2 / -1;
    }
}

/* Retained page styling for the Medical Practices and admin Razor Page migration. */
.medical-practices-page h3 {
    margin-bottom: 4px;
    text-align: center;
}

.medical-practices-note {
    margin: 0 0 14px;
    color: var(--ink-muted, #4f5d70);
    font-size: 12px;
}

.medical-practices-status,
.medical-practices-error {
    margin: 8px 0;
    font-size: 12px;
    font-weight: 600;
}

.medical-practices-toolbar {
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 14px;
}

.medical-practices-actions,
.medical-practices-grid-header {
    justify-content: flex-start;
}

.medical-practices-ingestion-strip {
    --appointment-month-width: 10ch;
}

.medical-practices-ingestion-strip .appointment-year-strip__year {
    border-radius: 6px;
}

.medical-practices-ingestion-strip .appointment-year-strip__months {
    grid-template-columns: repeat(12, minmax(var(--appointment-month-width, 10ch), var(--appointment-month-width, 10ch)));
}

.medical-practices-ingestion-strip .appointment-year-strip__row-label,
.medical-practices-ingestion-strip .appointment-year-strip__month {
    min-width: 0;
    text-align: center;
}

.medical-practices-ingestion-strip .appointment-year-strip__count {
    padding-right: 2px;
    padding-left: 2px;
}

.medical-practices-selector label,
.medical-practices-inline-label,
.sftp-config-picker-label {
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    font-weight: 600;
}

.medical-practices-inline-input {
    min-width: 220px;
    min-height: 32px;
}

.medical-practices-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 34px;
    margin-left: 0;
    border: 0;
    cursor: pointer;
}

.medical-practices-action-btn.disabled {
    pointer-events: none;
    opacity: .5;
}

.medical-practices-panel {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: .75rem;
}

.medical-practices-grid-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 0;
}

.medical-practices-grid-wrap h4 {
    margin: 0 0 8px;
    color: var(--ink, #1f2a3a);
    font-size: 13px;
}

.medical-practice-cutoff-field {
    width: min(280px, 100%);
    margin: 0 0 14px;
}

.medical-practice-cutoff-field[hidden] {
    display: none;
}

.medical-practice-cutoff-field .data-grid-control__date {
    margin-top: 4px;
}

.medical-practice-cutoff-field .medical-practices-error {
    display: block;
    min-height: 16px;
    margin: 3px 0 0;
}

.medical-practices-row-actions {
    width: 1%;
    text-align: center;
    white-space: nowrap;
}

.medical-practices-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border, #c7d1db);
    border-radius: 4px;
    background: var(--surface, #fff);
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
    cursor: pointer;
}

.medical-practices-icon-btn:hover {
    background: var(--surface-hover, #ebf3f9);
}

.medical-practices-icon-btn--delete:hover {
    background: var(--danger-surface, #f9ecec);
}

.medical-practices-icon-btn:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.medical-practices-action-icon {
    display: block;
}

.sftp-config-row-action-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border, #c7d1db);
    border-radius: 3px;
    background: var(--surface, #fff);
    vertical-align: middle;
    cursor: pointer;
}

.medical-practices-facilities-grid .sftp-config-actions-cell {
    line-height: 0;
}

.sftp-config-row-action-button:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.sftp-config-row-action-icon {
    display: block;
}

.facilities-table th,
.facilities-table td {
    padding-block: 2px;
}

.onboarding-page .medical-practices-facilities-grid th,
.onboarding-page .medical-practices-facilities-grid td,
.sftp-ingestion-status-page .medical-practices-facilities-grid th,
.sftp-ingestion-status-page .medical-practices-facilities-grid td {
    padding-block: 2px;
}

.sftp-config-version-marker {
    display: inline-block;
    margin-right: 6px;
    color: var(--ink-muted, #5a6470);
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.medical-practice-modal {
    width: fit-content;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    background: var(--surface-heading, #f1f3f5);
}

.medical-practice-form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.medical-practice-form-grid label {
    width: min(420px, calc(100vw - 80px));
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    font-weight: 600;
}

.medical-practices-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--ink, #1f2a3a);
    font-size: 12px;
    font-weight: 600;
}

.sftp-config-picker-label {
    display: grid;
    gap: 4px;
}

.sftp-config-picker-help {
    color: var(--ink-muted, #4f5d70);
    font-weight: 500;
}

.sftp-config-picker {
    width: min(420px, calc(100vw - 80px));
    min-height: 220px;
    font-size: 12px;
}

.sftp-confirm-message {
    margin: 6px 0 2px;
    color: var(--ink, #1f2a3a);
    font-size: 13px;
}

textarea.medical-practices-input {
    min-height: 180px;
    resize: vertical;
}

.sftp-confirm-modal {
    width: min(420px, calc(100vw - 24px));
}

@media (max-width: 900px) {
    .medical-practices-selector,
    .medical-practices-grid-wrap,
    .medical-practices-panel {
        width: 100%;
    }

    .medical-practices-selector {
        min-width: 100%;
    }

    .medical-practices-panel {
        padding: 12px;
    }

    .medical-practice-form-grid label {
        width: 100%;
    }
}

.landing-page {
    display: grid;
    gap: 18px;
    max-width: 1120px;
    margin: 0 auto;
    color: var(--ink, #1f2a3a);
}

.landing-statement {
    margin: 0;
    color: var(--ink, #000000);
    font-size: 14px;
    line-height: 1.45;
}

.landing-faq-bot {
    display: grid;
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--border, #c6d0da);
    border-radius: 8px;
    background: var(--surface-subtle, #fbfcfe);
}

.landing-faq-bot__header {
    display: grid;
    gap: 6px;
}

.landing-faq-bot__header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.landing-faq-bot__layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.landing-faq-bot__questions,
.landing-faq-bot__follow-ups {
    display: grid;
    gap: 8px;
}

.landing-faq-bot [hidden] {
    display: none !important;
}

.landing-faq-bot__question,
.landing-faq-bot__follow-up {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border, #b8c6d6);
    border-radius: 6px;
    background: var(--surface, #ffffff);
    color: var(--ink, #1f2a3a);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    padding: 10px 12px;
    text-align: left;
}

.landing-faq-bot__question:hover,
.landing-faq-bot__follow-up:hover,
.landing-faq-bot__question--active,
.landing-faq-bot__follow-up--active {
    background: var(--success-surface, #dff3df);
    border-color: var(--success-border, #8fbd8f);
}

.landing-faq-bot__answer {
    display: grid;
    gap: 12px;
    min-height: 260px;
    padding: 18px;
    border: 1px solid var(--border-subtle, #d8e1ea);
    border-radius: 8px;
    background: var(--surface, #ffffff);
}

.landing-faq-bot__speaker {
    margin: 0;
    color: var(--ink-muted, #5a6470);
    font-size: 12px;
    font-weight: 800;
}

.landing-faq-bot__empty {
    color: var(--ink, #334155);
    font-size: 14px;
    line-height: 1.55;
}

.landing-faq-bot__answer h3,
.landing-faq-bot__follow-up-answer h4 {
    margin: 0;
    font-size: 19px;
    line-height: 1.25;
}

.landing-faq-bot__answer p,
.landing-faq-bot__follow-up-answer p {
    margin: 0;
    color: var(--ink, #334155);
    font-size: 14px;
    line-height: 1.55;
}

.landing-faq-bot__follow-ups {
    margin-top: 2px;
}

.landing-faq-bot__follow-up {
    min-height: 38px;
    background: var(--warning-surface, #f2e8b5);
    border-color: var(--warning-border, #c8b85f);
}

.landing-faq-bot__follow-up--active,
.landing-faq-bot__follow-up:hover {
    background: #4d74b8;
    border-color: #3c5f9c;
    color: #ffffff;
}

.landing-faq-bot__follow-up-answer {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-left: 4px solid #4d74b8;
    background: var(--surface-subtle, #f8fafc);
}

@media (max-width: 800px) {
    .landing-faq-bot {
        padding: 18px;
    }

    .landing-faq-bot__layout {
        grid-template-columns: 1fr;
    }
}

.scheduling-export-button {
    align-items: center;
    display: inline-flex;
    gap: 0.22rem;
}

.scheduling-export-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.scheduling-export-button svg {
    fill: none;
    height: 1rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
    width: 1rem;
}

/* Align every page-level group selector with the IHAdmin menu strip.
   Native select intrinsic sizing uses the full option list, not the selection. */
.container:has(> .medical-group-selection-page) {
    padding-inline: var(--admin-content-inset);
}
.medical-group-selection-page {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
}
.summary-grains-page.medical-group-selection-page {
    max-width: none;
    margin-inline: 0;
    padding-inline: 0;
}
.medical-group-page-selector {
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    margin: 0;
    padding: 0;
}
[data-medical-group-page-selector] {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    max-width: 100%;
    height: 26px;
    font: inherit;
    border: 1px solid var(--border, #aebbc9);
    border-radius: 5px;
    padding: 0 8px;
    background: var(--surface, #fff);
    color: var(--ink, #1f2a3a);
}
.medical-group-selection-page .onboarding-toolbar {
    flex-wrap: wrap;
}

/* Every HTML table, including dynamically populated and modal tables, shares
   the SFTP reference density. Content may grow; rows never have a fixed height. */
table th,
table td {
    font-size: var(--table-font-size);
    line-height: var(--table-line-height);
    vertical-align: middle;
}

table td .table-row-action {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-width: 1px;
    min-width: var(--table-action-size);
    min-height: var(--table-action-size);
    padding: 0 4px;
    margin: 0;
    font: inherit;
    line-height: 1;
    vertical-align: middle;
}

table td .table-row-action--icon {
    width: var(--table-action-size);
    height: var(--table-action-size);
    padding: 0;
}

table td .table-row-action > svg {
    display: block;
    width: var(--table-action-icon-size);
    height: var(--table-action-icon-size);
    flex: none;
}

table td .table-row-action + .table-row-action {
    margin-left: var(--table-action-gap);
}

table td .table-row-action:focus-visible {
    outline: 2px solid #165b91;
    outline-offset: 1px;
}

/* Story 241: one range and a date facet for the Charges table only. */
.charge-entry-date-filters--single { grid-template-columns: minmax(0, 1fr); }
.charge-entry-date-choices { border: 1px solid #cbd5e1; border-radius: .35rem; margin-bottom: .6rem; }
.charge-entry-date-choices[hidden] { display: none; }
#chargeEntryDateChoiceItems { display: flex; flex-wrap: wrap; gap: .4rem 1rem; max-height: 12rem; overflow-y: auto; }
#chargeEntryDateChoiceItems label { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }

/* Claims Submission: presentation stays usable while reporting is unavailable. */
[data-claim-submission-page] > h3 {
    display: flex;
    align-items: center;
    min-height: 32px;
    margin: 0;
}
[data-claim-submission-page] .data-grid-control { box-sizing:border-box; }
.claim-kpis { display:flex; flex-wrap:wrap; align-items:flex-start; gap:2px; margin:.5rem 0; }
.claim-kpi { flex:0 1 auto; max-width:100%; padding:0; border:0; background:transparent; color:var(--ink,#1f2a3a); font:inherit; text-align:left; cursor:pointer; perspective:1000px; min-width:0; }
.claim-kpi:focus-visible { outline:3px solid var(--focus,#225fad); outline-offset:4px; border-radius:8px; }
.claim-kpi__turn { display:grid; transform-style:preserve-3d; transition:transform 240ms ease; }
.claim-kpi[aria-pressed="true"] .claim-kpi__turn { transform:rotateY(180deg); }
.claim-kpi__face { box-sizing:border-box; display:flex; flex-direction:column; gap:2px; grid-area:1/1; padding:6px 8px; line-height:1.25; border:1px solid var(--border,#c6d0da); border-top:3px solid var(--chart-blue,#2f6f9f); border-radius:8px; background:var(--surface,#fff); backface-visibility:hidden; overflow-wrap:anywhere; }
/* Only the visible face contributes to the tile's content-sized dimensions. */
.claim-kpi__face[aria-hidden="true"] { display:none; }
.claim-kpi--clean .claim-kpi__face { border-top-color:var(--chart-green,#3f7f4f); }
.claim-kpi__back { transform:rotateY(180deg); font-size:.82rem; }
.claim-kpi__title { font-size:1rem; font-weight:600; }
.claim-kpi__value { font-size:2.25rem; font-weight:600; font-variant-numeric:tabular-nums; }
.claim-kpi__unit { font-size:.9rem; font-weight:400; }
.claim-kpi__comparison,.claim-report-notice { color:var(--ink-muted,#4f5d70); }
.claim-report-notice { margin:.5rem 0 1rem; }
.claim-trend { margin:1rem 0; padding:1rem; border:1px solid var(--border-subtle,#d8dee6); border-radius:7px; background:var(--surface,#fff); }
.claim-trend__heading { display:flex; justify-content:space-between; gap:.5rem; flex-wrap:wrap; }
.claim-trend__heading h4 { margin:0 0 .5rem; }
.claim-trend__legend { display:flex; gap:.5rem 1rem; flex-wrap:wrap; }
.claim-trend__legend button { border:0; background:transparent; color:var(--ink,#1f2a3a); padding:.4rem 0; font:inherit; cursor:pointer; }
.claim-trend__legend button[aria-pressed="false"] { text-decoration:line-through; }
.claim-trend__swatch { display:inline-block; width:1.25rem; margin-right:.4rem; border-top:3px solid var(--claim-series); vertical-align:middle; }
.claim-trend svg { width:100%; display:block; }
.claim-trend svg[hidden], [data-claim-status-table][hidden], [data-claim-matrix][hidden] { display:none; }
.claim-trend svg text { fill:var(--ink-muted,#4f5d70); font-size:12px; }
.claim-trend__detail { min-height:1.3em; font-size:.82rem; }
.claim-matrix [role="status"] { margin:.5rem 0; }
.claim-matrix td,.claim-matrix th:not(:first-child) { text-align:right; }
@media(prefers-reduced-motion:reduce) { .claim-kpi__turn { transition:none; } }

/* Charge performance tiles share the Charges table's selected population. */
.charge-entry-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.charge-entry-kpi {
    position: relative;
    flex: 1 1 210px;
    max-width: 360px;
    padding: 14px;
    border: 1px solid var(--border, #ccd8e5);
    border-radius: 8px;
    background: var(--ribbon-pink, #B0E0E6);
    color: var(--ink, #243247);
}

.charge-entry-kpi__title {
    margin: 0 0 6px;
    font-size: 14px;
}

.charge-entry-kpi__value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}


/* Appointment totals follows the shared Innovanta chart palette and surfaces. */
.appointment-totals { min-width: 0; margin: 18px 0; padding: 18px; border: 1px solid var(--border-subtle, #d8dee6); border-radius: 12px; background: var(--surface, #fff); color: var(--ink, #1f2a3a); }
.appointment-totals__heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.appointment-totals__heading h4 { margin: 0; }
.appointment-totals [data-summary], .appointment-totals [data-detail] { font-size: .85rem; line-height: 1.5; }
.appointment-totals__legend { display: flex; flex-wrap: wrap; gap: 8px; margin:12px 0; }
.appointment-totals__legend button { border: 1px solid var(--border-subtle, #d8dee6); border-left: 5px solid var(--series-color); border-radius: 6px; background: var(--surface, #fff); color: inherit; padding: 6px 10px; cursor: pointer; }
.appointment-totals__legend button[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }
.appointment-totals__legend button[data-prior] { border-left-width: 1px; }
.appointment-totals__legend button[data-prior]::before { content: ''; display: inline-block; width: 20px; border-top: 2px dashed currentColor; margin-right: 6px; vertical-align: middle; }

.graph-table-switch { --account-control-height: calc(16px + .6rem); justify-self: end; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; border-radius: 999px; color: inherit; background: transparent; box-shadow: none; cursor: pointer; white-space: nowrap; }
.graph-table-switch[aria-checked="false"] .theme-switch__knob { transform: translateX(0); }
.graph-table-switch[aria-checked="true"] .theme-switch__knob { transform: translateX(calc(54px - var(--account-control-height))); }
.graph-table-switch:focus-visible { outline: 3px solid var(--focus, #225fad); outline-offset: 4px; }
.claim-trend__heading .claim-trend__view[hidden] { display: none; }
.claim-trend__heading:has(.claim-trend__view[hidden]) h4 { grid-column: 2; }
@media (max-width: 520px) {
    .claim-trend__heading:has(.claim-trend__view[hidden]) h4 { grid-column: 1 / -1; }
    .claim-trend__heading:has(.claim-trend__view[hidden]) .graph-table-switch { grid-column: 2; }
}
.claim-trend__heading:has(.graph-table-switch), .appointment-totals__heading:has(.graph-table-switch) { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.claim-trend__heading:has(.graph-table-switch) > [data-charge-trend-period], .appointment-totals__heading:has(.graph-table-switch) > [data-range] { display: none; }
[data-report-table][hidden], .claim-trend__scroll[hidden], .appointment-totals__scroll[hidden], .claim-trend__legend[hidden], .claim-trend__detail[hidden] { display: none; }
.report-count-table { max-width: 100%; margin-top: 12px; }
.report-count-table caption { text-align: left; padding: 6px 0; font-weight: 600; }
.report-count-table th { white-space: nowrap; }
@media (max-width: 520px) { .claim-trend__heading:has(.graph-table-switch), .appointment-totals__heading:has(.graph-table-switch) { grid-template-columns: 1fr auto; } .claim-trend__heading:has(.graph-table-switch) h4, .appointment-totals__heading:has(.graph-table-switch) h4 { grid-column: 1 / -1; grid-row: 1; } }
.appointment-totals button:focus-visible, .appointment-totals select:focus-visible, .appointment-totals input:focus-visible { outline: 2px solid var(--chart-blue, #2f6f9f); outline-offset: 3px; }
.appointment-totals svg { display: block; width: 100%; height: 340px; }
.appointment-totals svg text { fill: currentColor; font-size: 11px; }
.appointment-totals__grid { stroke: var(--border-subtle, #d8dee6); stroke-width: 1; }
.appointment-totals__inspect { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; }
.appointment-totals__inspect select { max-width: 100%; }
@media (max-width: 550px) { .appointment-totals { padding: 10px; } }
/* Claims trend inspection stays within the plot at narrow widths. */
.claim-trend__plot { position:relative; }
.claim-trend__tooltip { position:absolute; z-index:2; max-width:min(260px, 100%); padding:.65rem .8rem; border:1px solid var(--border-subtle,#d8dee6); border-radius:6px; background:var(--surface,#fff); color:var(--ink,#1f2a3a); box-shadow:0 3px 12px #0002; pointer-events:none; overflow-wrap:anywhere; white-space:pre-line; }
.claim-trend__tooltip[hidden] { display:none; }
.claim-trend__help { font-size:.82rem; color:var(--ink-muted); margin-top:.4rem; }
.claim-trend__hit:focus-visible { outline:2px solid var(--focus,#3478b8); outline-offset:2px; }

/* Shared KPI geometry. Screen theme is separate from the chart series palette. */
.report-kpis { display:flex; flex-wrap:wrap; align-items:stretch; gap:12px; margin:16px 0; }
.report-kpi { position:relative; box-sizing:border-box; flex:1 1 240px; max-width:360px; min-width:0; }
.report-kpi:focus-visible { outline:3px solid var(--focus,#225fad); outline-offset:3px; border-radius:8px; }
.report-kpi .claim-kpi__face { padding:14px; gap:6px; border:1px solid var(--border,#ccd8e5); background:var(--ribbon-blue,#4682B4); color:var(--ribbon-blue-ink,#000); }
.report-kpi .claim-kpi__front { height:100%; gap:0; }
.report-kpi[data-charge-kpi] .claim-kpi__face { background:var(--ribbon-pink,#B0E0E6); color:var(--ink,#243247); }
.report-kpi .claim-kpi__turn { height:100%; }
.report-kpi .claim-kpi__title, .report-kpi .charge-entry-kpi__title { font-size:14px; font-weight:600; line-height:1.4; margin:0 0 6px; }
.report-kpi .claim-kpi__value, .report-kpi .charge-entry-kpi__value { font-size:24px; font-weight:600; line-height:1.4; font-variant-numeric:tabular-nums; }
.report-kpi .claim-kpi__unit { font-size:inherit; font-weight:inherit; }
.report-kpi .claim-kpi__comparison { display:none; }
:root[data-theme="dark"] .report-kpi .claim-kpi__face { color:var(--ink); }
@media print {
    .report-kpi { max-width:none; }
}

/* US 232: equal side columns center the title independently of the controls. */
.claim-trend__heading--view { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:start; gap:1rem; }
.claim-trend__heading--view h4 { text-align:center; }
.claim-trend__heading--view [data-claim-trend-period], .claim-trend__heading--view [data-charge-trend-period] { text-align:right; }
.claim-trend__view { display:flex; align-items:center; gap:.5rem; }
.claim-trend__view select { width:auto; }
@media (max-width:700px) {
    .claim-trend__heading--view { grid-template-columns:1fr; }
    .claim-trend__heading--view h4 { grid-row:1; }
    .claim-trend__heading--view [data-claim-trend-period], .claim-trend__heading--view [data-charge-trend-period] { text-align:left; }
}

.claim-trend__scroll { overflow-x:auto; }
.claim-trend__scroll .claim-trend__plot { width:max-content; min-width:100%; }
/* Story 83: tactile display controls and one-column sorting. */
.denial-display { display:flex; gap:4px; }
.denial-display button { min-width:38px; min-height:32px; border:1px solid var(--border,#9ca3af); border-radius:5px; color:inherit; background:var(--surface-heading,#f3f4f6); box-shadow:inset 0 1px 0 #ffffff80,0 3px 0 #64748b; cursor:pointer; }
.denial-display button[aria-pressed="true"] { box-shadow:inset 0 2px 4px #0005; transform:translateY(2px); background:var(--ribbon-mint,#d9d2fa); }
.denial-display button:focus-visible,.denial-sort:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.denial-sort { display:flex; align-items:center; justify-content:space-between; gap:.7rem; width:100%; border:0; padding:.2rem; color:inherit; background:transparent; font:inherit; font-weight:inherit; cursor:pointer; }
.denial-sort__triangle { display:inline-block; transition:transform .15s; }
.denial-sort__triangle[hidden] { display:none; }
.denial-sort__triangle--asc { transform:rotate(180deg); }
.denial-total,.denial-matrix tfoot { font-weight:700; }
.denial-dollar-note { margin:.7rem 1rem; font-size:.85rem; }
@media (prefers-reduced-motion:reduce) { .denial-sort__triangle { transition:none; } }

.appointment-totals__heading [data-range] { text-align: right; font-size: .85rem; }
.appointment-totals__view { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.appointment-totals__view select { border: 1px solid var(--border-subtle, #d8dee6); background: var(--surface, #fff); color: inherit; border-radius: 6px; padding: 6px 10px; }
.appointment-totals__scroll { overflow-x: auto; max-width: 100%; }
.appointment-totals [data-plot] { position: relative; }
.appointment-totals__tooltip { position: absolute; z-index: 2; max-width: min(260px, 80vw); padding: .65rem .8rem; border: 1px solid var(--border-subtle, #d8dee6); border-radius: 6px; background: var(--surface, #fff); color: var(--ink, #1f2a3a); box-shadow: 0 3px 12px #0002; pointer-events: none; overflow-wrap: anywhere; font-size: .85rem; }
.appointment-totals [data-bucket-target]:focus { outline: 2px solid var(--innovanta-series-blue); outline-offset: -2px; }
@media (max-width: 650px) {
    .appointment-totals__heading { grid-template-columns: 1fr; }
    .appointment-totals__heading h4 { grid-row: 1; text-align: center; }
    .appointment-totals__heading [data-range] { text-align: left; }
}
