/* =========================================================
   Theme layer
   Loaded AFTER site.css. Warm paper surfaces, one sans (Inter) type scale,
   calm teal accent, quiet icon sidebar. Remove the <link> in
   _Layout.cshtml to switch back to the previous look.
   ========================================================= */

:root {
    /* palette */
    --cl-bg:            #ffffff;
    --cl-page:          #f6f7f8;
    --cl-sidebar:       #fafafa;
    --cl-card:          #ffffff;
    --cl-text:          #1f1e1d;
    --cl-text-2:        #3d3d3a;
    --cl-muted:         #6b6b6b;
    --cl-faint:         #a3a3a3;
    --cl-border:        #ebebeb;
    --cl-border-2:      #dedede;
    --cl-hover:         #f0f0f0;
    --cl-active:        #ebebeb;
    --cl-accent:        #2b6c7e;
    --cl-accent-2:      #22586a;
    --cl-accent-soft:   #eaf3f5;
    --cl-ok:            #4a7a57;
    --cl-ok-bg:         #edf3ec;
    --cl-warn:          #93641c;
    --cl-warn-bg:       #f7f0e1;
    --cl-open:          #a5473d;
    --cl-open-bg:       #f8ecea;
    --cl-sans:          "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --cl-shadow-sm:     0 1px 2px rgba(31, 30, 29, .04);
    --cl-shadow:        0 .25rem 1.25rem rgba(31, 30, 29, .045);
    --cl-shadow-pop:    0 .5rem 2rem rgba(31, 30, 29, .10);

    /* remap the app's own tokens so every var()-based rule follows */
    --db-primary:       var(--cl-accent);
    --db-primary-dark:  var(--cl-accent-2);
    --db-primary-light: var(--cl-accent-soft);
    --db-sidebar-bg:    var(--cl-sidebar);
    --db-sidebar-w:     264px;
    --db-topbar-h:      56px;
    --db-text:          var(--cl-text);
    --db-text-muted:    var(--cl-muted);
    --db-border:        var(--cl-border);
    --db-surface:       var(--cl-bg);
    --db-card:          var(--cl-card);
    --db-card-shadow:   var(--cl-shadow-sm);
    --db-radius:        12px;
    --db-radius-sm:     8px;
    --db-font:          var(--cl-sans);
    --db-success-bg:    var(--cl-ok-bg);
    --db-success-fg:    var(--cl-ok);
    --db-danger-bg:     var(--cl-open-bg);
    --db-danger-fg:     var(--cl-open);
    --db-warn-bg:       var(--cl-warn-bg);
    --db-warn-fg:       var(--cl-warn);

    /* bootstrap */
    --bs-body-bg:       var(--cl-bg);
    --bs-body-color:    var(--cl-text);
    --bs-border-color:  var(--cl-border);
    --bs-link-color:    var(--cl-accent);
    --bs-link-hover-color: var(--cl-accent-2);
    --bs-primary:       var(--cl-accent);
    --bs-primary-rgb:   43, 108, 126;
    --bs-secondary-color: var(--cl-muted);
}

html { font-size: 14.5px; }

body {
    background: var(--cl-bg);
    color: var(--cl-text);
    font-family: var(--cl-sans);
    letter-spacing: -0.005em;
    /* Same-width digits so amounts, counts and IDs line up in columns */
    font-variant-numeric: tabular-nums;
}

::selection { background: rgba(43, 108, 126, .16); }

a { color: var(--cl-accent); }
a:hover { color: var(--cl-accent-2); }

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

/* ---------- Headings: Inter, same family as body text ---------- */
h1, h2, h3,
main.page-content .an-title,
main.page-content .cn-title,
main.page-content .cd-title,
main.page-content .dash-brand-title,
main.page-content .pn-page-title,
main.page-content .dir-title,
main.page-content .mr-title,
main.page-content .trash-title,
main.page-content .page-header h1,
main.page-content .cn-detail-name,
main.page-content .cn-patient-name,
main.page-content .pn-detail-title,
main.page-content .pn-detail-title-plain,
main.page-content .ls-detail-name,
main.page-content .tr-patient-name {
    font-family: var(--cl-sans);
    font-weight: 600;
    color: var(--cl-text);
    letter-spacing: -0.015em;
}
main.page-content .cd-title,
main.page-content .dash-brand-title,
main.page-content .page-header h1,
main.page-content .dir-title,
main.page-content .pn-page-title,
main.page-content .cn-title,
main.page-content .an-title,
main.page-content .trash-title {
    font-size: 1.6rem;
    line-height: 1.25;
}
.cd-sub, .dash-lead, .page-header p {
    color: var(--cl-muted);
    font-size: .92rem;
}
.dash-eyebrow, .cn-dash-eyebrow, .dash-ops-eyebrow, .empty-state-label {
    color: var(--cl-muted);
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
    font-size: .8rem;
}

/* ---------- Shell ---------- */
.app-shell { background: var(--cl-bg); }
/* Soft grey canvas so white cards, filters and tables stand out from the page */
.main-content,
.page-content { background: var(--cl-page); }

.sidebar {
    width: var(--db-sidebar-w);
    background: var(--cl-sidebar);
    border-right: 1px solid var(--cl-border);
    box-shadow: none;
    scrollbar-width: thin;
    scrollbar-color: var(--cl-border-2) transparent;
}

.sidebar-brand {
    border-bottom: none;
    padding: 1.05rem 1.1rem .6rem;
    gap: .6rem;
}
.app-logo { display: block; height: 2.4rem; width: auto; }
.sidebar-brand .app-logo { height: 2.5rem; }
.auth-split-brand-top .app-logo { height: 2.2rem; }
.auth-split .auth-logo { justify-content: center; margin-bottom: 1.5rem; }
.auth-split .auth-logo .app-logo { height: 2.75rem; }
.sidebar-brand .brand-text {
    font-family: var(--cl-sans);
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--cl-text);
    letter-spacing: -0.01em;
}
.sidebar-brand .brand-sub {
    color: var(--cl-muted);
    text-transform: none;
    letter-spacing: 0;
    font-size: .72rem;
    font-weight: 400;
}
.brand-mark {
    width: 1.9rem;
    height: 1.9rem;
    min-width: 1.9rem;
    border-radius: 8px;
    background: var(--cl-accent);
    color: #fff;
    font-family: var(--cl-sans);
    font-size: 1rem;
    font-weight: 600;
}

.sidebar-nav { padding: .35rem 0 .75rem; }

.sidebar-section {
    color: var(--cl-muted);
    text-transform: none;
    letter-spacing: 0;
    font-size: .76rem;
    font-weight: 500;
    padding: .9rem 1.15rem .3rem;
    margin-top: .2rem;
}

.sidebar-link,
.sidebar-group-toggle {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: 1px .55rem;
    padding: .5rem .65rem;
    border-radius: 8px;
    border-left: none;
    color: var(--cl-text-2);
    font-size: .92rem;
    font-weight: 400;
    line-height: 1.25;
    transition: background-color .12s ease, color .12s ease;
}
.sidebar-group { margin: 0; }
.sidebar-group > .sidebar-group-toggle { margin: 1px .55rem; }

.sidebar-link:hover,
.sidebar-group-toggle:hover {
    background: var(--cl-hover);
    color: var(--cl-text);
}
.sidebar-link.active,
.sidebar-nav > .sidebar-link.active {
    background: var(--cl-active);
    color: var(--cl-text);
    font-weight: 500;
    box-shadow: none;
    border-left: none;
}
/* An open group header shouldn't shout — the child carries the active state. */
.sidebar-group-toggle.active {
    background: transparent;
    color: var(--cl-text);
    font-weight: 500;
}
.sidebar-group-toggle.active:hover { background: var(--cl-hover); }
.sidebar-group-toggle::after { margin-left: auto; opacity: .45; }

/* Icon slot: every top-level item reserves it so labels line up. */
.sidebar-link:not(.sidebar-sublink)::before,
.sidebar-group-toggle::before {
    content: "";
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    background-color: var(--cl-ico-c, transparent);
    -webkit-mask: var(--cl-ico) center / contain no-repeat;
            mask: var(--cl-ico) center / contain no-repeat;
    opacity: .85;
}
.sidebar-back-btn::before { display: none !important; }

.sidebar-subnav {
    position: relative;
    padding: .1rem 0 .3rem 0;
    margin-left: 1.75rem;
}
.sidebar-subnav::before {
    content: "";
    position: absolute;
    left: .1rem;
    top: .2rem;
    bottom: .45rem;
    width: 1px;
    background: var(--cl-border-2);
}
.sidebar-sublink {
    margin: 1px .55rem 1px .55rem !important;
    padding: .42rem .65rem !important;
    font-size: .86rem !important;
    font-weight: 400 !important;
    color: var(--cl-muted);
}
.sidebar-sublink:hover { color: var(--cl-text); }
.sidebar-sublink.active { color: var(--cl-text); font-weight: 500 !important; }

.sidebar-back-btn {
    background: transparent;
    border: 1px solid var(--cl-border-2);
    color: var(--cl-text-2);
    border-radius: 8px;
    font-weight: 500;
    margin: .25rem .55rem .5rem;
    width: calc(100% - 1.1rem);
}
.sidebar-back-btn:hover { background: var(--cl-hover); color: var(--cl-text); }

/* Footer: Claude-style account row */
.sidebar-footer {
    background: var(--cl-sidebar);
    border-top: 1px solid var(--cl-border);
    padding: .65rem .55rem .8rem;
}
.sidebar-user-btn { border-radius: 10px; padding: .45rem .5rem; }
.sidebar-user-btn:hover { background: var(--cl-hover); }
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--cl-text-2);
    color: #fff;
    border: none;
    font-size: .78rem;
    font-weight: 600;
}
.user-info .user-name { color: var(--cl-text); font-weight: 500; font-size: .86rem; }
.user-info .user-role { color: var(--cl-muted); font-size: .74rem; }
.profile-caret { border-top-color: var(--cl-faint); }
.sidebar-settings-btn { color: var(--cl-muted); border-radius: 8px; }
.sidebar-settings-btn:hover,
.sidebar-settings-btn.active {
    background: var(--cl-hover);
    color: var(--cl-text);
    border-color: transparent;
}
.btn-logout {
    background: transparent;
    border: 1px solid transparent;
    color: var(--cl-muted);
    border-radius: 8px;
    font-weight: 500;
    font-size: .84rem;
    text-align: left;
    padding-left: .6rem;
}
.btn-logout:hover {
    background: var(--cl-hover);
    border-color: transparent;
    color: var(--cl-open);
}
.profile-dropdown,
.db-menu-list {
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: 12px;
    box-shadow: var(--cl-shadow-pop);
    padding: .35rem;
}
.profile-dropdown-label,
.db-menu-label { color: var(--cl-muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.profile-dropdown-item,
.db-menu-item { border-radius: 8px; color: var(--cl-text-2); font-weight: 400; }
.profile-dropdown-item:hover,
.profile-dropdown-item.active,
.db-menu-item:hover { background: var(--cl-hover); color: var(--cl-text); }

/* Top bar: quiet, borderless, same paper as the page */
/* Same grey as the page canvas (--cl-page, slightly see-through for the blur); the
   bottom border is what separates the bar from the page. */
.topbar {
    background: rgba(246, 247, 248, .92);
    -webkit-backdrop-filter: saturate(1.2) blur(8px);
            backdrop-filter: saturate(1.2) blur(8px);
    border-bottom: 1px solid var(--cl-border-2);
    padding: 0 1.25rem;
}
.topbar-title {
    font-family: var(--cl-sans);
    font-size: .95rem;
    font-weight: 400;
    color: var(--cl-text-2);
}
.sidebar-toggle {
    border: none;
    background: transparent;
    color: var(--cl-muted);
    border-radius: 8px;
}
.sidebar-toggle:hover { background: var(--cl-hover); color: var(--cl-text); }
.topbar-date { color: var(--cl-muted); font-weight: 400; }
.topbar-time { color: var(--cl-text-2); font-weight: 500; }
.topbar-offset {
    background: transparent;
    border: 1px solid var(--cl-border-2);
    color: var(--cl-muted);
    font-weight: 500;
}

.page-content { padding: 1.5rem 2rem 2.25rem; }
.dash-footer { color: var(--cl-faint); background: transparent; border-top: none; }

/* ---------- Surfaces ---------- */
.db-card,
.dash-panel,
.dash-ops-panel,
.cn-dash-chart-panel,
.cn-dash-filter-panel,
.cn-dash-filters-panel {
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: 16px;
    box-shadow: var(--cl-shadow-sm);
}
.db-card-header { background: transparent; border-bottom-color: var(--cl-border); }
.db-card-header h2 { font-family: var(--cl-sans); font-weight: 600; font-size: 1.08rem; color: var(--cl-text); }

.dash-hero {
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

/* ---------- Tables ---------- */
.db-table thead th,
.cn-dash-table th {
    background: #fafafa;
    color: var(--cl-muted);
    font-size: .74rem;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
    border-bottom: 1px solid var(--cl-border);
}
.db-table td,
.cn-dash-table td { color: var(--cl-text-2); border-bottom-color: #f0f0f0; }
.db-table tbody tr:hover,
.cn-dash-table tbody tr:hover { background: #fcfcfc; }

/* ---------- Forms ---------- */
.form-label { color: var(--cl-text-2); font-weight: 500; }
.form-control,
.form-select {
    background-color: var(--cl-card);
    border: 1px solid var(--cl-border-2);
    border-radius: 8px;
    color: var(--cl-text);
}
.form-control::placeholder { color: var(--cl-faint); }
.form-control:focus,
.form-select:focus {
    border-color: #bdbdbd;
    box-shadow: 0 0 0 3px rgba(31, 30, 29, .06);
}
.form-check-input:checked {
    background-color: var(--cl-text-2);
    border-color: var(--cl-text-2);
}
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(31, 30, 29, .08); border-color: #bdbdbd; }

/* ---------- Buttons ---------- */
.btn {
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: 0;
}
.btn-primary,
.btn-primary:focus {
    background: var(--cl-accent);
    border-color: var(--cl-accent);
    color: #fff;
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active {
    background: var(--cl-accent-2) !important;
    border-color: var(--cl-accent-2) !important;
    color: #fff !important;
}
.btn-secondary,
.btn-outline,
.btn-outline-secondary,
.btn-light {
    background: var(--cl-card);
    border: 1px solid var(--cl-border-2);
    color: var(--cl-text-2);
}
.btn-secondary:hover,
.btn-outline:hover,
.btn-outline-secondary:hover,
.btn-light:hover {
    background: var(--cl-hover);
    border-color: var(--cl-border-2);
    color: var(--cl-text);
}
.btn-outline-primary {
    color: var(--cl-accent);
    border-color: #b7d3da;
    background: transparent;
}
.btn-outline-primary:hover { background: var(--cl-accent-soft); color: var(--cl-accent-2); border-color: var(--cl-accent); }
.btn-danger { background: var(--cl-open); border-color: var(--cl-open); }
.btn-danger:hover { background: #8f3b32; border-color: #8f3b32; }
.btn-outline-danger { color: var(--cl-open); border-color: #e2bdb6; background: transparent; }
.btn-outline-danger:hover { background: var(--cl-open-bg); color: #8f3b32; border-color: var(--cl-open); }
.btn-link { color: var(--cl-accent); }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(43, 108, 126, .22); }

/* ---------- Badges & alerts ---------- */
.badge-status { border-radius: 999px; font-weight: 500; padding: .18rem .55rem; }
.badge-status.member,
.badge-status.no { background: #f2f2f2; color: var(--cl-text-2); border-color: var(--cl-border); }
.db-alert { border-radius: 12px; }

/* ---------- Modals ---------- */
.modal-content {
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: 16px;
    box-shadow: var(--cl-shadow-pop);
}
.modal-header, .modal-footer { border-color: var(--cl-border); }
.modal-title { font-family: var(--cl-sans); font-weight: 600; color: var(--cl-text); }

/* =========================================================
   Billing Dashboard (CodedNotesDashboard)
   ========================================================= */
.cn-dash-page {
    --cn-ok:        var(--cl-ok);
    --cn-ok-bg:     var(--cl-ok-bg);
    --cn-ok-ring:   #a9c6ad;
    --cn-warn:      var(--cl-warn);
    --cn-warn-bg:   var(--cl-warn-bg);
    --cn-warn-ring: #e2c891;
    --cn-open:      var(--cl-open);
    --cn-open-bg:   var(--cl-open-bg);
    --cn-open-ring: #e2aaa1;
}
.cn-dash-header { margin-bottom: 1.5rem; }

/* Filter panel reads like Claude's composer: one soft rounded box */
.cn-dash-filter-panel,
.cn-dash-page .cn-dash-filter-panel {
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: 20px;
    box-shadow: var(--cl-shadow);
    padding: 1rem 1.15rem;
}
.cn-dash-page .cn-dash-filter-panel .cn-dash-period-view-label,
.cn-dash-period-view-label {
    color: var(--cl-muted);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}
.cn-dash-period-btn {
    border: 1px solid var(--cl-border-2);
    border-radius: 8px;
    background: var(--cl-card);
    color: var(--cl-text-2);
}
.cn-dash-period-btn:hover:not(:disabled) {
    background: var(--cl-hover);
    border-color: var(--cl-border-2);
    color: var(--cl-text);
}
.cn-dash-period-btn:disabled { color: #d6d6d6; }
.cn-dash-period-label {
    border: 1px solid var(--cl-border-2);
    border-radius: 8px;
    background: #fafafa;
    color: var(--cl-text);
    font-weight: 500;
}

/* Cards */
.cn-dash-card {
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-top: 1px solid var(--cl-border);
    border-radius: 16px;
    box-shadow: var(--cl-shadow-sm);
}
.cn-dash-chart-panel { border-radius: 16px; }
.cn-dash-chart-title,
.cn-dash-filters-title {
    font-family: var(--cl-sans);
    font-weight: 500;
    font-size: 1.12rem;
    color: var(--cl-text);
    letter-spacing: -0.01em;
}
.cn-dash-chart-sub,
.cn-dash-filters-sub,
.cn-dash-stat-hint,
.cn-dash-series-empty,
.cn-dash-date-sep,
.cn-dash-billed-status-sep,
.cn-dash-billed-status-tail { color: var(--cl-muted); }
.cn-dash-chart-updated {
    border-top-color: var(--cl-border);
    color: var(--cl-muted);
    font-weight: 400;
}

/* Stat tiles */
.cn-dash-stat {
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: 14px;
    box-shadow: none;
}
.cn-dash-stat:hover {
    border-color: var(--cl-border-2);
    box-shadow: var(--cl-shadow);
    transform: none;
}
.cn-dash-stat-icon { border-radius: 10px; }
.cn-dash-stat--total .cn-dash-stat-icon { background: var(--cl-accent-soft); color: var(--cl-accent-2); }
.cn-dash-stat-value {
    font-family: var(--cl-sans);
    font-weight: 500;
    color: var(--cl-text);
    letter-spacing: -0.02em;
    font-variant-numeric: lining-nums tabular-nums;
}
.cn-dash-stat-label {
    color: var(--cl-muted);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}

/* View toggle: segmented control */
.cn-dash-view-toggle {
    padding: 2px;
    gap: 2px;
    background: #f2f2f2;
    border-radius: 10px;
}
.cn-dash-view-btn {
    border: none;
    background: transparent;
    color: var(--cl-muted);
    border-radius: 8px;
}
.cn-dash-view-btn:hover { color: var(--cl-text); }
.cn-dash-view-btn.is-active {
    background: var(--cl-card);
    color: var(--cl-text);
    border: none;
    box-shadow: 0 1px 2px rgba(31, 30, 29, .10);
}

/* Bars */
.cn-dash-bars {
    background: #fcfcfc;
    border: 1px solid var(--cl-border);
    border-radius: 12px;
}
.cn-dash-bar-track {
    background: #f4f4f4;
    border: none;
    border-radius: 6px 6px 3px 3px;
}
.cn-dash-bar-stack { border-radius: 6px 6px 2px 2px; }
.cn-dash-bar-seg--count     { background: linear-gradient(180deg, #6fa3b1 0%, var(--cl-accent) 100%); }
.cn-dash-bar-seg--billed    { background: linear-gradient(180deg, #8fb39a 0%, var(--cl-ok) 100%); }
.cn-dash-bar-seg--remaining { background: linear-gradient(180deg, #ecc9c2 0%, #c4887d 100%); }
.cn-dash-bar-label { text-shadow: 0 0 3px rgba(31, 30, 29, .45), 0 1px 2px rgba(31, 30, 29, .4); }

.cn-dash-breakdown-bar { background: #f2f2f2; }
.cn-dash-breakdown-seg--billed    { background: var(--cl-ok); }
.cn-dash-breakdown-seg--nonbuild  { background: #d08a5d; }
.cn-dash-breakdown-seg--exception { background: #8a7fb0; }
.cn-dash-dot--billed    { background: var(--cl-ok); }
.cn-dash-dot--nonbuild  { background: #d08a5d; }
.cn-dash-dot--exception { background: #8a7fb0; }

.cn-dash-series-chart .cn-dash-dot--nonbuild { background: #c4887d; }

.cn-dash-table-wrap { border-color: var(--cl-border); border-radius: 12px; }

/* Filter chips / toggles */
.cn-dash-toggle {
    border-color: var(--cl-border-2);
    border-radius: 999px;
    background: var(--cl-card);
    color: var(--cl-text-2);
}
.cn-dash-toggle:has(input:checked) {
    background: var(--cl-active);
    border-color: var(--cl-border-2);
    color: var(--cl-text);
}
.cn-dash-filter-badge {
    background: var(--cl-accent-soft);
    color: var(--cl-accent-2);
    border-color: transparent;
}

.cn-dash-unmatched-dialog {
    border-radius: 16px;
    border: 1px solid var(--cl-border);
    box-shadow: var(--cl-shadow-pop);
}

/* Spinner in accent */
.cn-dash-loading-spinner { border-top-color: var(--cl-accent); }

/* ---------- Sidebar icons (matched by link target) ---------- */
.sidebar-nav .sidebar-link[href$="/Dashboard/Modules"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 10.5 12 3.5l8.5 7'/%3E%3Cpath d='M5.5 9v11h13V9'/%3E%3Cpath d='M10 20v-5.5h4V20'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href$="/Dashboard"], .sidebar-nav .sidebar-link[href*="/Dashboard?"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10'/%3E%3Cpath d='M10 20V4'/%3E%3Cpath d='M16 20v-7'/%3E%3Cpath d='M21 20H3'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/UnmatchedDashboard"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 14.5 7 17a3.2 3.2 0 0 1-4.5-4.5L5 10'/%3E%3Cpath d='M14.5 9.5 17 7a3.2 3.2 0 0 1 4.5 4.5L19 14'/%3E%3Cpath d='M8 3v2.5M3 8h2.5M16 21v-2.5M21 16h-2.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Notifications"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16V11a6 6 0 0 1 12 0v5l1.5 2h-15z'/%3E%3Cpath d='M10 20.5a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-group:has(a[href*="/EmrRecords"], .sidebar-nav a[href*="/CodedNotes"]) > .sidebar-group-toggle { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6.5A1.5 1.5 0 0 0 5 4.5v15A1.5 1.5 0 0 0 6.5 21h11a1.5 1.5 0 0 0 1.5-1.5V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M8.5 13h7M8.5 16.5h5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-group:has(a[href*="/TransactionReports"]) > .sidebar-group-toggle { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h15l-3.5-3.5'/%3E%3Cpath d='M20 16H5l3.5 3.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-group:has(a[href*="/Demographics"]) > .sidebar-group-toggle { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0'/%3E%3Cpath d='M16 4.6a3.5 3.5 0 0 1 0 6.8'/%3E%3Cpath d='M18.5 14.2A6.5 6.5 0 0 1 21.5 20'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-group:has(a[href*="/LogSheets"]) > .sidebar-group-toggle { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4.5' width='14' height='16.5' rx='1.5'/%3E%3Cpath d='M9 4.5V3h6v1.5'/%3E%3Cpath d='m9 13 2 2 4-4'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-group:has(a[href*="/Optum"]) > .sidebar-group-toggle { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4.5 6v5.5c0 4.6 3.2 8.2 7.5 9.5 4.3-1.3 7.5-4.9 7.5-9.5V6z'/%3E%3Cpath d='M12 9v6M9 12h6'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Trash"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5h16'/%3E%3Cpath d='M9 6.5V4h6v2.5'/%3E%3Cpath d='M6 6.5 7 21h10l1-14.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Directories/Patients"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 21a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Directories/Providers"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3v6a5 5 0 0 0 10 0V3'/%3E%3Cpath d='M11 14v2.5a4.5 4.5 0 0 0 9 0V14'/%3E%3Ccircle cx='20' cy='12' r='2'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Directories/NursingHomes"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='1.5'/%3E%3Cpath d='M9 7h1.5M13.5 7H15M9 11h1.5M13.5 11H15M9 15h1.5M13.5 15H15'/%3E%3Cpath d='M10.5 21v-3h3v3'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Directories/Companies"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='1.5'/%3E%3Cpath d='M8.5 7V4.5h7V7'/%3E%3Cpath d='M3 12.5h18'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Directories/Insurances"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18M7 15h4'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href$="/Settings"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h10M18 6h2M4 12h4M12 12h8M4 18h12M20 18h0'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Ccircle cx='18' cy='18' r='2'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/AccessControl"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0'/%3E%3Cpath d='M16 4.6a3.5 3.5 0 0 1 0 6.8'/%3E%3Cpath d='M18.5 14.2A6.5 6.5 0 0 1 21.5 20'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/AccessAccountability"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z'/%3E%3Ccircle cx='12' cy='12' r='2.75'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Audit"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h12M8 12h12M8 18h12'/%3E%3Ccircle cx='4' cy='6' r='.6'/%3E%3Ccircle cx='4' cy='12' r='.6'/%3E%3Ccircle cx='4' cy='18' r='.6'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Analytics"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l2.5-6 5 12 2.5-6h4'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/TransactionReportReminders"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/MissingPatientIds"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/TransactionMissingPatientIds"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Migration"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3.5' width='6' height='5' rx='1'/%3E%3Crect x='15' y='15.5' width='6' height='5' rx='1'/%3E%3Cpath d='M6 8.5v4a2 2 0 0 0 2 2h7.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/CodingDashboard"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='1.5'/%3E%3Cpath d='M9.5 2.5V6M14.5 2.5V6M9.5 18v3.5M14.5 18v3.5M2.5 9.5H6M2.5 14.5H6M18 9.5h3.5M18 14.5h3.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-group:has(a[href*="/CodingLearning"]) > .sidebar-group-toggle { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='1.5'/%3E%3Cpath d='M9.5 2.5V6M14.5 2.5V6M9.5 18v3.5M14.5 18v3.5M2.5 9.5H6M2.5 14.5H6M18 9.5h3.5M18 14.5h3.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/LogSheetClaudeDashboard"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='1.5'/%3E%3Cpath d='M9.5 2.5V6M14.5 2.5V6M9.5 18v3.5M14.5 18v3.5M2.5 9.5H6M2.5 14.5H6M18 9.5h3.5M18 14.5h3.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/LogSheets/Settings"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3v4M15 3v4'/%3E%3Cpath d='M6.5 7h11v3.5a5.5 5.5 0 0 1-11 0z'/%3E%3Cpath d='M12 16v5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/CptDashboard"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10'/%3E%3Cpath d='M10 20V4'/%3E%3Cpath d='M16 20v-7'/%3E%3Cpath d='M21 20H3'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Matching"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l2.5-6 5 12 2.5-6h4'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Security/Organization"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10.5' rx='1.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Security/DatabaseBackups"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5.5' rx='7.5' ry='2.5'/%3E%3Cpath d='M4.5 5.5v13c0 1.4 3.4 2.5 7.5 2.5s7.5-1.1 7.5-2.5v-13'/%3E%3Cpath d='M4.5 12c0 1.4 3.4 2.5 7.5 2.5s7.5-1.1 7.5-2.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }
.sidebar-nav .sidebar-link[href*="/Security/TwoFactor"] { --cl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='m11 12 9-9M17 6l2.5 2.5M14.5 8.5 16.5 10.5'/%3E%3C/svg%3E"); --cl-ico-c: currentColor; }

/* ---------- Auth pages ---------- */
.auth-wrapper { background: var(--cl-bg); }
.auth-card {
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: 20px;
    box-shadow: var(--cl-shadow);
}
.auth-card h1 { font-family: var(--cl-sans); font-weight: 600; font-size: 1.75rem; }
.auth-logo > div > div:first-child { font-family: var(--cl-sans); font-weight: 600; font-size: 1.1rem; }
.auth-card .form-control:focus { border-color: #bdbdbd; box-shadow: 0 0 0 3px rgba(31, 30, 29, .06); }
.auth-card .btn-primary { background: var(--cl-accent); border-color: var(--cl-accent); font-weight: 500; }
.auth-card .btn-primary:hover { background: var(--cl-accent-2); border-color: var(--cl-accent-2); }

/* Login: split layout (brand panel + form) */
.auth-wrapper.auth-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    padding: 0;
    background: var(--cl-page);
}
.auth-split-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem 3rem;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .14), transparent 45%),
        radial-gradient(circle at 10% 95%, rgba(255, 255, 255, .08), transparent 40%),
        linear-gradient(160deg, #2b6c7e 0%, #1d4f5d 100%);
}
.auth-split-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
    pointer-events: none;
}
.auth-split-brand > * { position: relative; z-index: 1; }
.auth-split-brand-top {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 600;
    font-size: .88rem;
    letter-spacing: -.01em;
}
.auth-split-brand-top .brand-mark {
    width: 1.6rem;
    height: 1.6rem;
    min-width: 1.6rem;
    font-size: .68rem;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
}
.auth-split-brand-body { max-width: 23rem; }
.auth-split-brand-body h2 {
    font-size: 1.45rem;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -.02em;
    margin: 0 0 .6rem;
    color: #fff;
}
.auth-split-brand-body p {
    font-size: .84rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .72);
    margin: 0 0 1.6rem;
}
.auth-split-points {
    list-style: none;
    padding: .35rem;
    margin: 0;
    display: grid;
    gap: .15rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(2px);
}
.auth-split-points li {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .55rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .88);
}
.auth-split-points li + li { border-top: 1px solid rgba(255, 255, 255, .07); border-radius: 0 0 8px 8px; }
.auth-split-points svg {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    padding: .38rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, .12);
    color: #cfe6ec;
}
.auth-split-illustration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-split-illustration img {
    width: 100%;
    max-width: 30rem;
    height: auto;
}
.auth-split-welcome {
    text-align: center;
    max-width: 22rem;
    margin: 0 auto;
}
.auth-split-welcome h2 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -.02em;
    color: #fff;
    margin: 0 0 .35rem;
}
.auth-split-welcome p {
    font-size: .84rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .75);
    margin: 0;
}
.auth-split-brand-foot {
    font-size: .7rem;
    color: rgba(255, 255, 255, .5);
}

.auth-split-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--cl-bg);
}
.auth-split .auth-card {
    max-width: 400px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}
.auth-split .auth-logo { display: none; }
.auth-split .auth-card h1 {
    font-size: 1.75rem;
    letter-spacing: -.025em;
    margin-bottom: .4rem;
}
.auth-split .auth-card .subtitle { margin-bottom: 2rem; font-size: .92rem; }
.auth-split .auth-card .form-label {
    font-size: .84rem;
    font-weight: 500;
    color: var(--cl-text);
    margin-bottom: .4rem;
}
.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}
.auth-forgot { font-size: .82rem; font-weight: 500; }

.auth-input { position: relative; }
.auth-input-icon {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cl-faint);
    pointer-events: none;
    transition: color .15s ease;
}
.auth-split .auth-input .form-control {
    height: 2.85rem;
    padding-left: 2.6rem;
    border-radius: 10px;
    border-color: #dedede;
    font-size: .92rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-split .auth-input .form-control:focus {
    border-color: var(--cl-accent);
    box-shadow: 0 0 0 3px rgba(43, 108, 126, .14);
}
.auth-input:focus-within .auth-input-icon { color: var(--cl-accent); }
.auth-split .password-field .form-control { padding-right: 2.75rem; }
.auth-split .auth-input .form-control.input-validation-error { border-color: var(--cl-open); }

.auth-capslock {
    margin-top: .4rem;
    font-size: .78rem;
    font-weight: 500;
    color: var(--cl-warn);
}

.auth-split .auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    height: 2.85rem;
    margin-top: 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: .92rem;
}
.auth-split .auth-submit:focus-visible { box-shadow: 0 0 0 3px rgba(43, 108, 126, .3); }
.auth-split .auth-submit:disabled { opacity: .85; }
.auth-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}
.auth-submit.is-loading .auth-spinner { display: inline-block; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-notice {
    margin: 1.75rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--cl-border);
    font-size: .76rem;
    color: var(--cl-muted);
    text-align: center;
}

@media (max-width: 900px) {
    .auth-wrapper.auth-split { grid-template-columns: minmax(0, 1fr); }
    .auth-split-brand { display: none; }
    .auth-split-main { padding: 2rem 1rem; background: var(--cl-page); }
    .auth-split .auth-card {
        padding: 2rem 1.5rem;
        border: 1px solid var(--cl-border);
        border-radius: 16px;
        background: var(--cl-card);
        box-shadow: var(--cl-shadow);
    }
    .auth-split .auth-logo { display: flex; }
}

@media (max-width: 768px) {
    .page-content { padding: 1rem 1rem 1.5rem; }
    main.page-content .cd-title,
    main.page-content .dash-brand-title,
    main.page-content .page-header h1 { font-size: 1.6rem; }
}

/* =========================================================
   Billing Dashboard — the three progress cards
   (EMR coded notes · Transaction patients · YourPChoice patients)
   Layout adapts to each card's own width via container queries,
   so it reads well whether 1, 2 or 3 cards share the row.
   ========================================================= */
.cn-dash-page .cn-dash-card {
    container-type: inline-size;
    container-name: cncard;
    overflow: visible;
}

/* -- Header: title on its own line, actions in one tidy row -- */
.cn-dash-page .cn-dash-card > .cn-dash-filters-panel {
    background: var(--cl-card);
    border-radius: 16px 16px 0 0;
    padding: 1.1rem 1.25rem .9rem;
    gap: .75rem;
}
.cn-dash-page .cn-dash-card .cn-dash-filters-head {
    flex-direction: column;
    align-items: stretch;
    gap: .7rem;
    margin: 0;
    padding: 0;
    border: none;
}
.cn-dash-page .cn-dash-card .cn-dash-filters-title {
    font-size: 1.2rem;
    line-height: 1.25;
}
.cn-dash-page .cn-dash-card .cn-dash-filters-sub {
    margin-top: .2rem;
    font-size: .82rem;
    color: var(--cl-muted);
}
.cn-dash-page .cn-dash-card .cn-dash-filters-actions {
    justify-content: flex-start;
    gap: .45rem;
}
.cn-dash-page .cn-dash-card .cn-dash-filters-actions .btn { padding: .38rem .8rem; font-size: .8rem; }
.cn-dash-page .cn-dash-card .cn-dash-filter-badge {
    order: 10;
    margin-left: auto;
    padding: .22rem .6rem;
    font-size: .74rem;
    font-weight: 600;
    background: var(--cl-accent-soft);
    color: var(--cl-accent-2);
    border: 1px solid #cfe2e7;
}

/* -- Card filters: sentence-case labels, even pills -- */
.cn-dash-page .cn-dash-card .pn-cn-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem .75rem;
    padding: .85rem 0 0;
    margin: 0;
    border-top: 1px solid var(--cl-border);
    border-bottom: none;
}
.cn-dash-page .pn-filter-field > .pn-filter-field-label,
.cn-dash-page .pn-filter-field > .cn-dash-period-view-label {
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--cl-muted);
}
.cn-dash-page .pn-filter-field .form-select,
.cn-dash-page .pn-filter-field .form-control,
.cn-dash-page .cn-ms-btn {
    border: 1px solid var(--cl-border-2);
    border-radius: 8px;
    color: var(--cl-text-2);
    min-height: 2.25rem;
}
.cn-dash-page .cn-ms-btn { min-width: 8.5rem; }
.cn-dash-page .cn-ms-meta { color: var(--cl-text-2); font-size: .82rem; max-width: 12rem; }
.cn-dash-page .cn-ms--active .cn-ms-btn {
    background: var(--cl-accent-soft);
    border-color: #a9c9d1;
    box-shadow: none;
}
.cn-dash-page .cn-ms--active .cn-ms-meta { color: var(--cl-accent-2); font-weight: 600; }
.cn-dash-page .cn-ms-menu {
    border: 1px solid var(--cl-border);
    border-radius: 12px;
    box-shadow: var(--cl-shadow-pop);
}

/* -- Body -- */
.cn-dash-page .cn-dash-card > .cn-dash-panel-host { padding: 0 1.25rem 1.15rem; }
.cn-dash-page .cn-dash-card .cn-dash-chart-panel { padding-top: .9rem; border-top: 1px solid var(--cl-border); border-radius: 0; }
.cn-dash-page .cn-dash-card .cn-dash-chart-head { align-items: center; margin-bottom: .85rem; }
.cn-dash-page .cn-dash-card .cn-dash-chart-sub {
    font-size: .8rem;
    line-height: 1.4;
    color: var(--cl-muted);
}

/* -- Summary: total strip on top, match tiles beneath -- */
.cn-dash-page .cn-dash-stats--count-match {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    margin-bottom: 1rem;
}
.cn-dash-page .cn-dash-stats--count-match .cn-dash-stat--total,
.cn-dash-page .cn-dash-stat--total-hero {
    grid-column: 1 / -1;
    padding: .8rem 1rem;
    background: var(--cl-accent-soft);
    border: 1px solid #d3e5ea;
    border-radius: 12px;
}
.cn-dash-page .cn-dash-stats--count-match .cn-dash-stat--total .cn-dash-stat-link {
    flex-direction: row;
    align-items: baseline;
    gap: .55rem;
}
.cn-dash-page .cn-dash-stats--count-match .cn-dash-stat--total .cn-dash-stat-value {
    font-size: 1.85rem;
    line-height: 1.1;
    color: var(--cl-text);
}
.cn-dash-page .cn-dash-stats--count-match .cn-dash-stat--total .cn-dash-stat-label {
    font-size: .9rem;
    color: var(--cl-accent-2);
    font-weight: 500;
}

.cn-dash-page .cn-dash-match-tile {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: .85rem;
    padding: .85rem .95rem;
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: 12px;
    box-shadow: none;
}
.cn-dash-page .cn-dash-match-tile .cn-dash-stat-label,
.cn-dash-page .cn-dash-report-pie .cn-dash-stat-label {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--cl-text);
    margin-bottom: .15rem;
}
.cn-dash-page .cn-dash-report-pie-copy { gap: .2rem; }

/* Donut: calm green vs soft rose, readable percentage */
.cn-dash-page .cn-dash-donut,
.cn-dash-page .cn-dash-stats--count-match .cn-dash-donut {
    width: 64px;
    height: 64px;
    box-shadow: none;
    background:
        radial-gradient(circle closest-side, #fff 70%, transparent 71%),
        conic-gradient(var(--cl-ok) 0 calc(var(--pct) * 1%), #ecd3cd 0);
}
.cn-dash-page .cn-dash-donut-pct {
    font-size: .82rem;
    font-weight: 600;
    color: var(--cl-text);
}

/* Matched / still open: plain coloured lines, never clipped */
.cn-dash-page .cn-dash-match-pill,
.cn-dash-page .cn-dash-report-pie-matched,
.cn-dash-page .cn-dash-report-pie-open,
.cn-dash-page .cn-dash-report-pie-open-plain {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    width: auto;
    max-width: 100%;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: .86rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: normal;
    text-align: left;
}
.cn-dash-page .cn-dash-match-pill::before {
    content: "";
    flex: 0 0 .5rem;
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
}
.cn-dash-page .cn-dash-match-pill--hit,
.cn-dash-page .cn-dash-report-pie-matched { color: var(--cl-ok); }
.cn-dash-page .cn-dash-match-pill--hit::before { background: var(--cl-ok); }
.cn-dash-page .cn-dash-match-pill--miss { color: var(--cl-open) !important; }
.cn-dash-page .cn-dash-match-pill--miss::before { background: #d9a49a; }
.cn-dash-page .cn-dash-match-pill--hit:hover { color: #3a6345; }

/* Narrow card: stack the match tiles */
@container cncard (max-width: 430px) {
    .cn-dash-page .cn-dash-stats--count-match { grid-template-columns: minmax(0, 1fr); }
}

/* Non-dual stat tiles (EMR / Transaction base): same calm tiles */
.cn-dash-page .cn-dash-stats--chart { gap: .65rem; }
@container cncard (max-width: 430px) {
    .cn-dash-page .cn-dash-stats--chart:not(.cn-dash-stats--count-match) { grid-template-columns: minmax(0, 1fr); }
}

/* -- Bar chart: full width, light bars, dark readable labels -- */
.cn-dash-page .cn-dash-bars {
    height: 250px;
    gap: .35rem;
    padding: .6rem .5rem .5rem;
    background:
        repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #f0f0f0 calc(25% - 1px), #f0f0f0 25%),
        #fff;
    border: 1px solid var(--cl-border);
    border-radius: 12px;
}
.cn-dash-page .cn-dash-bar-col {
    flex: 1 0 1.9rem;
    width: auto;
    min-width: 1.9rem;
    max-width: 4.5rem;
}
.cn-dash-page .cn-dash-bar-track {
    background: transparent;
    border: none;
    border-radius: 6px 6px 2px 2px;
    overflow: visible;
}
.cn-dash-page .cn-dash-bar-stack { border-radius: 6px 6px 2px 2px; }
.cn-dash-page .cn-dash-bar-seg--count     { background: linear-gradient(180deg, #c3dde4 0%, #8dbac6 100%); }
.cn-dash-page .cn-dash-bar-seg--billed    { background: linear-gradient(180deg, #c9dfcd 0%, #93bc9e 100%); }
.cn-dash-page .cn-dash-bar-seg--remaining { background: linear-gradient(180deg, #f2dcd7 0%, #ddaea4 100%); }
.cn-dash-page .cn-dash-bar-col:hover .cn-dash-bar-seg { filter: brightness(.94); }
.cn-dash-page .cn-dash-bar-label {
    inset: .45rem 0 .45rem;
    color: #1d3a43;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: 0;
    text-shadow: 0 0 2px #fff, 0 0 3px rgba(255, 255, 255, .9);
}
.cn-dash-page .cn-dash-bars::-webkit-scrollbar { height: 8px; }
.cn-dash-page .cn-dash-bars::-webkit-scrollbar-thumb { background: #d6d6d6; border-radius: 999px; }
.cn-dash-page .cn-dash-bars { scrollbar-width: thin; scrollbar-color: #d6d6d6 transparent; }

.cn-dash-page .cn-dash-series-chart .cn-dash-dot--billed    { background: #93bc9e; }
.cn-dash-page .cn-dash-series-chart .cn-dash-dot--nonbuild  { background: #ddaea4; }
.cn-dash-page .cn-dash-chart-hint { font-size: .76rem; color: var(--cl-muted); margin-top: .55rem; }

/* -- Footnotes under the chart -- */
.cn-dash-page .cn-dash-series-chart .cn-dash-stat-hint--missing-id1,
.cn-dash-page .cn-dash-stat-hint--missing-id1 {
    display: flex;
    gap: .45rem;
    align-items: flex-start;
    margin-top: .7rem;
    padding: .5rem .7rem;
    font-size: .78rem;
    line-height: 1.4;
    color: var(--cl-warn);
    background: var(--cl-warn-bg);
    border-radius: 8px;
}
.cn-dash-page .cn-dash-stat-hint--missing-id1::before {
    content: "i";
    flex: 0 0 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-size: .65rem;
    font-weight: 700;
    font-style: italic;
    font-family: var(--cl-sans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: .1rem;
}
.cn-dash-page .cn-dash-explain {
    margin-top: .6rem;
    border: 1px solid var(--cl-border);
    border-radius: 10px;
    background: #fff;
}
.cn-dash-page .cn-dash-explain > summary { font-weight: 500; color: var(--cl-text-2); font-size: .8rem; padding: .55rem .8rem; }
.cn-dash-page .cn-dash-explain > summary::before { color: var(--cl-muted); }
.cn-dash-page .cn-dash-dual-reconcile { border-left-color: var(--cl-accent); border-color: var(--cl-border); color: var(--cl-text-2); }
.cn-dash-page .cn-dash-chart-updated { font-size: .76rem; }

/* Cards wrap instead of squeezing (overrides the inline flex basis on the columns) */
.cn-dash-page .cn-dash-stack > .cn-dash-stack-col {
    flex: 1 1 340px !important;
    min-width: min(100%, 340px) !important;
}
@container cncard (max-width: 380px) {
    .cn-dash-page .cn-dash-card .cn-dash-chart-head { flex-direction: column; align-items: flex-start; gap: .55rem; }
}

/* =========================================================
   Card tabs
   ========================================================= */
.cn-dash-page .cn-dash-stack > .cn-dash-tabbar {
    flex: 1 1 100%;
    order: -1;
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: .75rem;
    margin-bottom: -.15rem;
}
.cn-dash-page .cn-dash-stack > .cn-dash-tabbar[hidden] { display: none !important; }
.cn-dash-tabs {
    flex: 1 1 auto;
    display: flex;
    gap: .25rem;
    padding: .3rem;
    background: #f4f4f4;
    border: 1px solid var(--cl-border);
    border-radius: 14px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.cn-dash-tab {
    flex: 1 1 0;
    min-width: 11rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    padding: .6rem .9rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--cl-muted);
    text-align: left;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.cn-dash-tab:hover { background: rgba(255, 255, 255, .6); color: var(--cl-text); }
.cn-dash-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(43, 108, 126, .22); }
.cn-dash-tab.is-active {
    background: #fff;
    color: var(--cl-text);
    border-color: var(--cl-border);
    box-shadow: 0 1px 3px rgba(31, 30, 29, .08);
}
.cn-dash-tab-title {
    font-family: var(--cl-sans);
    font-size: 1.02rem;
    font-weight: 500;
    color: inherit;
    line-height: 1.25;
}
.cn-dash-tab-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .5rem;
    font-size: .8rem;
    color: var(--cl-muted);
}
.cn-dash-tab-meta strong { font-size: .95rem; font-weight: 600; color: var(--cl-text-2); font-variant-numeric: tabular-nums; }
.cn-dash-tab.is-active .cn-dash-tab-meta strong { color: var(--cl-accent-2); }
.cn-dash-tab-loading { font-style: italic; }
.cn-dash-tab-badge {
    padding: .05rem .45rem;
    border-radius: 999px;
    background: var(--cl-accent-soft);
    color: var(--cl-accent-2);
    font-size: .7rem;
    font-weight: 600;
}

.cn-dash-layout-toggle {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: .3rem;
    background: #f4f4f4;
    border: 1px solid var(--cl-border);
    border-radius: 14px;
}
.cn-dash-layout-toggle button {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--cl-muted);
    cursor: pointer;
}
.cn-dash-layout-toggle button:hover { color: var(--cl-text); }
.cn-dash-layout-toggle button[aria-pressed="true"] {
    background: #fff;
    color: var(--cl-text);
    box-shadow: 0 1px 3px rgba(31, 30, 29, .08);
}
.cn-dash-layout-toggle svg {
    width: 1.1rem; height: 1.1rem;
    fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round;
}

/* Tabbed: only the chosen card, full width (beats the inline styles set by the page script) */
.cn-dash-page .cn-dash-stack.is-tabbed > .cn-dash-stack-col:not(.is-tab-active) { display: none !important; }
.cn-dash-page .cn-dash-stack.is-tabbed > .cn-dash-stack-col.is-tab-active {
    flex: 1 1 100% !important;
    min-width: 0 !important;
}
/* The tab already names the card */
.cn-dash-page .cn-dash-stack.is-tabbed .cn-dash-filters-title { display: none; }
.cn-dash-page .cn-dash-stack.is-tabbed .cn-dash-card { border-top-left-radius: 16px; }

/* Wide card: header in one row, stats in one row, taller chart */
@container cncard (min-width: 760px) {
    .cn-dash-page .cn-dash-card .cn-dash-filters-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .cn-dash-page .cn-dash-card .cn-dash-filters-actions { flex-wrap: nowrap; }
    .cn-dash-page .cn-dash-card .cn-dash-filter-badge { order: -1; margin-left: 0; margin-right: .25rem; }
    .cn-dash-page .cn-dash-stats--count-match {
        grid-template-columns: minmax(12rem, .8fr) repeat(2, minmax(0, 1fr));
    }
    .cn-dash-page .cn-dash-stats--count-match .cn-dash-stat--total,
    .cn-dash-page .cn-dash-stat--total-hero {
        grid-column: auto;
        display: flex;
        align-items: center;
    }
    .cn-dash-page .cn-dash-stats--count-match .cn-dash-stat--total .cn-dash-stat-link {
        flex-direction: column;
        align-items: flex-start;
        gap: .15rem;
    }
    .cn-dash-page .cn-dash-stats--count-match .cn-dash-stat--total .cn-dash-stat-value { font-size: 2.3rem; }
    .cn-dash-page .cn-dash-match-tile { padding: 1rem 1.15rem; }
    .cn-dash-page .cn-dash-bars { height: 300px; }
    .cn-dash-page .cn-dash-bar-label { font-size: .72rem; }
}

@media (max-width: 640px) {
    .cn-dash-tabbar { flex-direction: column-reverse; align-items: stretch; }
    .cn-dash-layout-toggle { align-self: flex-end; }
    .cn-dash-tab { min-width: 9.5rem; }
}

/* =========================================================
   Billing Dashboard — calm polish
   One sans type scale, tabular numbers, 8px rhythm, one accent,
   muted status tones, horizontal provider chart, quiet notes.
   ========================================================= */
.cn-dash-page {
    --cn-gap:       8px;
    --cn-ink:       var(--cl-text);
    --cn-ink-2:     #45484c;
    --cn-quiet:     #6a6f75;           /* 5.1:1 on white */
    --cn-line:      #e6e8eb;
    --cn-grid:      #eef0f2;
    --cn-wash:      #f6f7f8;
    --cn-hit:       #3e6b4c;           /* muted green, 6:1 */
    --cn-hit-dot:   #6f9a7a;
    --cn-miss:      #94493f;           /* muted brick, 6.4:1 */
    --cn-miss-dot:  #d6a69c;
    --cn-bar:       #7fa9b5;
    --cn-bar-hi:    #5f93a2;
    --cn-bar-other: #c9cfd4;
}

/* Calm neutral canvas behind the white cards */
.page-content:has(.cn-dash-page) { background: var(--cl-page); }

/* One sans-serif scale across the dashboard */
body .cn-dash-page :is(h1, h2, h3,
    .cd-title, .cn-dash-tab-title, .cn-dash-stat-value,
    .cn-dash-chart-title, .cn-dash-filters-title) {
    font-family: var(--cl-sans);
    letter-spacing: -0.01em;
}
body .cn-dash-page .cd-title { font-size: 1.6rem; font-weight: 600; }
.cn-dash-page :is(.cn-dash-stat-value, .cn-dash-donut-pct, .cn-dash-tab-meta,
    .cn-dash-match-pill, .cn-dash-bar-value, .cn-dash-filter-badge, .cn-dash-tab-badge,
    .cn-dash-table td) {
    font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- Source tabs ---------- */
.cn-dash-page .cn-dash-stack > .cn-dash-tabbar { gap: var(--cn-gap); margin-bottom: 0; }
.cn-dash-page .cn-dash-tabs,
.cn-dash-page .cn-dash-layout-toggle {
    padding: 4px;
    gap: 4px;
    background: #eceef0;
    border-color: var(--cn-line);
    border-radius: 12px;
}
.cn-dash-page .cn-dash-tab {
    gap: 4px;
    padding: 10px 16px 12px;
    border-radius: 9px;
    color: var(--cn-quiet);
}
.cn-dash-page .cn-dash-tab:hover { background: rgba(255, 255, 255, .7); }
.cn-dash-page .cn-dash-tab.is-active {
    background: #fff;
    border-color: var(--cn-line);
    box-shadow: inset 0 -3px 0 var(--cl-accent), 0 1px 2px rgba(31, 30, 29, .08);
}
.cn-dash-page .cn-dash-tab-title { font-size: .92rem; font-weight: 600; line-height: 1.3; }
.cn-dash-page .cn-dash-tab:not(.is-active) .cn-dash-tab-title { font-weight: 500; }
.cn-dash-page .cn-dash-tab-meta { gap: 4px 8px; font-size: .8rem; align-items: center; }
.cn-dash-page .cn-dash-tab-meta strong { font-size: 1rem; font-weight: 600; color: var(--cn-ink-2); }
.cn-dash-page .cn-dash-tab.is-active .cn-dash-tab-meta strong { color: var(--cn-ink); }
.cn-dash-page .cn-dash-tab-badge {
    padding: 2px 8px;
    border: 1px solid var(--cn-line);
    background: #f4f5f6;
    color: var(--cn-quiet);
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.4;
}
.cn-dash-page .cn-dash-tab.is-active .cn-dash-tab-badge {
    background: var(--cl-accent-soft);
    border-color: #cfe2e7;
    color: var(--cl-accent-2);
}
.cn-dash-page .cn-dash-layout-toggle button { width: 36px; height: 36px; border-radius: 8px; }

/* ---------- Card header + filters (8px rhythm, one control height) ---------- */
.cn-dash-page .cn-dash-card { border-color: var(--cn-line); border-radius: 12px; }
.cn-dash-page .cn-dash-stack.is-tabbed .cn-dash-card { border-top-left-radius: 12px; }
.cn-dash-page .cn-dash-card > .cn-dash-filters-panel {
    padding: 16px 24px;
    gap: 16px;
    border-radius: 12px 12px 0 0;
}
.cn-dash-page .cn-dash-card .cn-dash-filters-head { gap: var(--cn-gap); }
.cn-dash-page .cn-dash-card .cn-dash-filters-sub { margin: 0; font-size: .8rem; color: var(--cn-quiet); }
.cn-dash-page .cn-dash-card .cn-dash-filters-actions { gap: var(--cn-gap); align-items: center; }
.cn-dash-page .cn-dash-card .cn-dash-filters-actions .btn {
    min-height: 34px;
    padding: 0 14px;
    font-size: .8rem;
    font-weight: 500;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
}
.cn-dash-page .cn-dash-card .cn-dash-filters-actions .btn[hidden] { display: none; }
.cn-dash-page .cn-dash-card .cn-dash-filter-badge {
    padding: 4px 10px;
    font-size: .74rem;
    font-weight: 500;
    line-height: 1.3;
    border: 1px solid #cfe2e7;
}
.cn-dash-page .cn-dash-card .pn-cn-filters {
    gap: 16px;
    padding-top: 16px;
    border-top-color: var(--cn-line);
}
.cn-dash-page .pn-filter-field > .pn-filter-field-label,
.cn-dash-page .pn-filter-field > .cn-dash-period-view-label {
    font-size: .75rem;
    font-weight: 500;
    color: var(--cn-quiet);
}
.cn-dash-page .pn-filter-field .form-select,
.cn-dash-page .pn-filter-field .form-control,
.cn-dash-page .cn-ms-btn {
    min-height: 34px;
    border-color: #d9dcdf;
    border-radius: 8px;
    font-size: .82rem;
}
.cn-dash-page .cn-ms-btn { min-width: 9rem; }

/* ---------- Chart panel + KPI row ---------- */
.cn-dash-page .cn-dash-card > .cn-dash-panel-host { padding: 0 24px 24px; }
.cn-dash-page .cn-dash-card .cn-dash-chart-panel { padding-top: 16px; border-top-color: var(--cn-line); }
.cn-dash-page .cn-dash-card .cn-dash-chart-head { margin-bottom: 16px; }
.cn-dash-page .cn-dash-card .cn-dash-chart-sub { font-size: .8rem; color: var(--cn-quiet); }
.cn-dash-page .cn-dash-view-toggle { background: #eceef0; border-radius: 8px; }

.cn-dash-page .cn-dash-stats--count-match { gap: 16px; margin-bottom: 16px; }
.cn-dash-page .cn-dash-stats--count-match .cn-dash-stat--total,
.cn-dash-page .cn-dash-stat--total-hero {
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--cn-line);
    border-left: 3px solid var(--cl-accent);
    border-radius: 10px;
}
.cn-dash-page .cn-dash-stat-value {
    font-weight: 600;
    color: var(--cn-ink);
    letter-spacing: -0.02em;
}
.cn-dash-page .cn-dash-stats--count-match .cn-dash-stat--total .cn-dash-stat-value { color: var(--cn-ink); }
.cn-dash-page .cn-dash-stats--count-match .cn-dash-stat--total .cn-dash-stat-label {
    font-size: .82rem;
    font-weight: 500;
    color: var(--cn-quiet);
}
.cn-dash-page .cn-dash-match-tile {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 20px;
    border-color: var(--cn-line);
    border-radius: 10px;
}
.cn-dash-page .cn-dash-match-tile .cn-dash-stat-label,
.cn-dash-page .cn-dash-report-pie .cn-dash-stat-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--cn-ink);
    margin-bottom: 4px;
}
.cn-dash-page .cn-dash-donut,
.cn-dash-page .cn-dash-stats--count-match .cn-dash-donut {
    width: 72px;
    height: 72px;
    background:
        radial-gradient(circle closest-side, #fff 76%, transparent 77%),
        conic-gradient(var(--cn-hit-dot) 0 calc(var(--pct) * 1%), #ece4e1 0);
}
.cn-dash-page .cn-dash-donut-pct { font-size: .95rem; font-weight: 600; color: var(--cn-ink); }
.cn-dash-page .cn-dash-match-pill,
.cn-dash-page .cn-dash-report-pie-matched,
.cn-dash-page .cn-dash-report-pie-open,
.cn-dash-page .cn-dash-report-pie-open-plain {
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
}
.cn-dash-page .cn-dash-match-pill--hit,
.cn-dash-page .cn-dash-report-pie-matched { color: var(--cn-hit); }
.cn-dash-page .cn-dash-match-pill--hit::before { background: var(--cn-hit-dot); }
.cn-dash-page .cn-dash-match-pill--miss { color: var(--cn-miss) !important; }
.cn-dash-page .cn-dash-match-pill--miss::before { background: var(--cn-miss-dot); }
.cn-dash-page a.cn-dash-match-pill:hover,
.cn-dash-page button.cn-dash-match-pill:hover {
    text-decoration: underline;
    text-underline-offset: .18em;
    text-decoration-thickness: 1px;
}

/* ---------- Horizontal provider chart ---------- */
.cn-dash-page .cn-dash-bars.cn-dash-bars--h {
    --lbl: 13rem;
    --val: 4.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 8px 8px 8px 0;
    background: #fff;
    border: 1px solid var(--cn-line);
    border-radius: 10px;
}
/* Filters apply on each tick here, so the dropdown's own Apply button is not needed */
.cn-dash-page .cn-ms-menu-foot { display: none; }
/* Top rows only until "Show all" is pressed */
.cn-dash-page .cn-dash-bars--h[data-bars-collapsed="1"] .cn-dash-bar-col.is-extra { display: none; }
.cn-dash-page .cn-dash-chart-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
    margin: 0 0 8px;
    font-size: .8rem;
    color: var(--cn-quiet);
}
.cn-dash-page .cn-dash-chart-caption strong { font-size: .85rem; font-weight: 600; color: var(--cn-ink); }
.cn-dash-page .cn-dash-bars-more {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--cl-accent-2);
    background: #fff;
    border: 1px solid var(--cn-line);
    border-radius: 8px;
    cursor: pointer;
}
.cn-dash-page .cn-dash-bars-more:hover { background: var(--cn-wash); border-color: #cfd4d8; }
.cn-dash-page .cn-dash-bars-more:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(43, 108, 126, .25); }
/* Notes block above the chart */
.cn-dash-page .cn-dash-series-notes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cn-dash-page .cn-dash-series-notes:not(:has(> :not([hidden]))) { display: none; }
.cn-dash-page .cn-dash-series-notes > .cn-dash-stat-hint--missing-id1,
.cn-dash-page .cn-dash-series-notes > .cn-dash-explain { margin-top: 0; }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-col {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: var(--lbl) minmax(0, 1fr) var(--val);
    column-gap: 12px;
    align-items: center;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 26px;
    border-radius: 6px;
    /* faint quarter gridlines across the bar area only */
    background:
        repeating-linear-gradient(to right, var(--cn-grid) 0 1px, transparent 1px 25%)
        calc(var(--lbl) + 12px) 0 / calc(100% - var(--lbl) - var(--val) - 24px) 100% no-repeat;
}
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-col:hover { background-color: var(--cn-wash); }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-track { display: contents; }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-label {
    grid-column: 1;
    grid-row: 1;
    position: static;
    inset: auto;
    display: block;
    width: auto;
    padding: 0 0 0 12px;
    writing-mode: horizontal-tb;
    transform: none;
    text-align: right;
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 26px;
    color: var(--cn-ink-2);
    text-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-stack {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    width: var(--bar);
    height: 14px;
    min-height: 0;
    min-width: 3px;
    flex-direction: row;
    border-radius: 0 4px 4px 0;
}
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-seg { width: auto; min-height: 0; min-width: 2px; height: 100%; }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-seg--count     { background: var(--cn-bar); }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-seg--billed    { background: var(--cn-hit-dot); }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-seg--remaining { background: var(--cn-miss-dot); }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-col:hover .cn-dash-bar-seg { filter: none; }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-col:hover .cn-dash-bar-seg--count { background: var(--cn-bar-hi); }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-col.is-other .cn-dash-bar-seg--count { background: var(--cn-bar-other); }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-col.is-other .cn-dash-bar-label { color: var(--cn-quiet); font-style: italic; }
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-value {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
    font-size: .78rem;
    font-weight: 500;
    color: var(--cn-quiet);
}
.cn-dash-page .cn-dash-bars--h .cn-dash-bar-col:hover .cn-dash-bar-value { color: var(--cn-ink); }
@container cncard (max-width: 560px) {
    .cn-dash-page .cn-dash-bars.cn-dash-bars--h { --lbl: 8.5rem; --val: 3.5rem; }
}
.cn-dash-page .cn-dash-series-chart .cn-dash-dot--billed   { background: var(--cn-hit-dot); }
.cn-dash-page .cn-dash-series-chart .cn-dash-dot--nonbuild { background: var(--cn-miss-dot); }
.cn-dash-page .cn-dash-chart-hint { margin-top: var(--cn-gap); font-size: .75rem; color: var(--cn-quiet); }

/* ---------- Notes under the chart ---------- */
/* Missing patient ID: amber warning callout (rows are left out of every number on the card) */
.cn-dash-page .cn-dash-series-chart .cn-dash-stat-hint--missing-id1,
.cn-dash-page .cn-dash-stat-hint--missing-id1 {
    gap: 10px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 10px 12px;
    font-size: .78rem;
    line-height: 1.45;
    color: #7a4b0c;
    background: #fff8eb;
    border: 1px solid #f1d9a8;
    border-left: 3px solid #d98a1c;
    border-radius: 8px;
    text-decoration: none;
}
.cn-dash-page .cn-dash-stat-hint--missing-id1::before {
    content: "!";
    margin-top: .1em;
    border: none;
    background: #d98a1c;
    color: #fff;
    font-family: var(--cl-sans);
    font-style: normal;
    font-weight: 700;
}
.cn-dash-page a.cn-dash-stat-hint--missing-id1:hover { background: #fff3db; border-color: #e8c47f; border-left-color: #c47a12; color: #5f3a08; }
.cn-dash-page a.cn-dash-stat-hint--missing-id1:hover,
.cn-dash-page a.cn-dash-stat-hint--missing-id1:focus-visible { text-decoration: none; }
.cn-dash-page a.cn-dash-stat-hint--missing-id1:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(217, 138, 28, .3); }

.cn-dash-page .cn-dash-explain {
    margin-top: var(--cn-gap);
    border: 1px solid var(--cn-line);
    border-radius: 8px;
    background: #fff;
}
.cn-dash-page .cn-dash-explain > summary {
    padding: 8px 12px;
    font-size: .78rem;
    font-weight: 500;
    color: var(--cn-ink-2);
    border-radius: 8px;
    outline: none;
}
.cn-dash-page .cn-dash-explain > summary:hover { color: var(--cn-ink); }
.cn-dash-page .cn-dash-explain > summary:focus-visible { box-shadow: 0 0 0 3px rgba(43, 108, 126, .25); }
.cn-dash-page .cn-dash-explain > summary::before { color: var(--cn-quiet); font-size: .7rem; }
.cn-dash-page .cn-dash-explain[open] > summary { border-bottom: 1px solid var(--cn-line); border-radius: 8px 8px 0 0; }
.cn-dash-page .cn-dash-explain-body { gap: 8px; padding: 12px; }
/* Each peer card gets one block: sentence first, then its "View them" links */
.cn-dash-page .cn-dash-explain-body > [data-dual-reconcile="1"] { order: 1; }
.cn-dash-page .cn-dash-explain-body > [data-dual-billed="txn"]  { order: 2; }
.cn-dash-page .cn-dash-explain-body > [data-shared-links]       { order: 2; margin: -2px 0 4px 13px; }
.cn-dash-page .cn-dash-explain-body > [data-shared-links][hidden] { display: none; }
.cn-dash-page .cn-dash-explain-body > [data-dual-reconcile="2"] { order: 3; }
.cn-dash-page .cn-dash-explain-body > [data-dual-billed="ypc"]  { order: 4; }
.cn-dash-page .cn-dash-dual-reconcile {
    margin: 0;
    padding: 8px 10px;
    background: var(--cn-wash);
    border: 1px solid var(--cn-line);
    border-left: 3px solid var(--cl-accent);
    border-radius: 6px;
    font-size: .78rem;
    line-height: 1.5;
    color: var(--cn-ink);
}
.cn-dash-page .cn-dash-explain-body > [data-dual-billed] { margin: -2px 0 4px 13px; }
/* Pills already separate the links */
.cn-dash-page .cn-dash-billed-status-note .cn-dash-billed-status-sep { display: none; }
.cn-dash-page .cn-dash-billed-status-note {
    gap: 4px 8px;
    align-items: center;
    font-size: .76rem;
    line-height: 1.5;
    color: var(--cn-quiet);
}
.cn-dash-page .cn-dash-billed-status-lead { color: var(--cn-quiet); font-weight: 500; }
.cn-dash-page .cn-dash-billed-status-sep,
.cn-dash-page .cn-dash-billed-status-tail { color: #b3b8bd; }
/* Error / Draft links as small status pills */
.cn-dash-page .cn-dash-stat-hint--billed-status {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 500;
    color: var(--cn-miss);
    background: #fbf1ef;
    border: 1px solid #efd3cd;
}
.cn-dash-page a.cn-dash-stat-hint--billed-status:hover,
.cn-dash-page a.cn-dash-stat-hint--billed-status:focus-visible {
    text-decoration: none;
    background: #f6e3df;
    border-color: #e2b8af;
    outline: none;
}
.cn-dash-page .cn-dash-chart-updated { margin-top: 16px; padding-top: 12px; font-size: .75rem; color: var(--cn-quiet); }

/* Transaction Patients: drill from Billing Dashboard "notes on more than one line" */
.tr-shared-note-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 0 0 12px;
    padding: 10px 14px;
    font-size: .82rem;
    line-height: 1.45;
    color: #7a4b0c;
    background: #fff8eb;
    border: 1px solid #f1d9a8;
    border-left: 3px solid #d98a1c;
    border-radius: 8px;
}
.tr-shared-note-banner strong { color: #5f3a08; }
.tr-shared-note-banner a { font-weight: 500; color: var(--cl-accent-2, #1f5f6f); white-space: nowrap; }

/* Coded Notes: "on 2 lines" under the Billed badge when a note is shared */
.cn-build-lines { display: block; margin-top: 2px; font-size: .7rem; color: #9a5b0c; white-space: nowrap; }

/* Shared-note list: one header row per EMR note, its lines indented under it */
.tr-lines-table tr.tr-note-group-head > td {
    padding: 7px 12px;
    font-size: .76rem;
    background: var(--cn-wash, #f4f7f8);
    border-top: 2px solid var(--cl-border, #dfe5e8);
}
.tr-lines-table tr.tr-note-group-head:first-child > td { border-top: 0; }
.tr-note-group-label { font-weight: 600; color: var(--cl-text, #1f2933); margin-right: 10px; }
.tr-note-group-count { color: var(--cl-muted, #6b7780); margin-right: 12px; }
.tr-lines-table tr.tr-note-group-head a { color: var(--cl-accent-2, #1f5f6f); font-weight: 500; }
.tr-lines-table tr.tr-note-group-row > td:first-child { box-shadow: inset 3px 0 0 var(--cl-accent, #2b6c7e); }

/* Dashboard explainer sentence that opens the rows behind it */
.cn-dash-page .cn-dash-dual-reconcile-link {
    color: var(--cl-accent-2);
    text-decoration: underline;
    text-decoration-color: rgba(43, 108, 126, .35);
    text-underline-offset: .18em;
}
.cn-dash-page .cn-dash-dual-reconcile-link:hover,
.cn-dash-page .cn-dash-dual-reconcile-link:focus-visible { text-decoration-color: currentColor; }

/* Unmatched Dashboard: page shows the first rows per list; CSV has all */
.um-more-rows {
    margin: 8px 0 0;
    font-size: .8rem;
    color: var(--cl-muted);
}
.um-more-rows a { font-weight: 500; }

/* Unmatched Dashboard: immediate feedback while a filter change reloads the page */
.um-filter-bar.is-loading select { pointer-events: none; opacity: .6; }
.um-loading-note {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--cl-accent-2);
}
.um-loading-note::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid rgba(43, 108, 126, .25);
    border-top-color: var(--cl-accent);
    border-radius: 50%;
    animation: um-spin .7s linear infinite;
}
@keyframes um-spin { to { transform: rotate(360deg); } }
body.um-loading .um-stats,
body.um-loading .um-panel { opacity: .45; transition: opacity .15s ease; }

/* Unmatched Dashboard: layout and surfaces */
.um-page { gap: 18px; }

/* Export menu */
.um-export { position: relative; }
.um-export > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.um-export > summary::-webkit-details-marker { display: none; }
.um-export > summary::after {
    content: ""; width: 6px; height: 6px; margin-top: -3px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); transition: transform .15s ease;
}
.um-export[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.um-export-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
    width: 17rem; padding: 6px;
    background: var(--cl-card); border: 1px solid var(--cl-border);
    border-radius: 12px; box-shadow: var(--cl-shadow-pop);
}
.um-export-menu a {
    display: flex; flex-direction: column; gap: 1px;
    padding: 8px 10px; border-radius: 8px;
    color: var(--cl-text); text-decoration: none;
}
.um-export-menu a:hover,
.um-export-menu a:focus-visible { background: var(--cl-hover); color: var(--cl-text); }
.um-export-menu strong { font-size: .84rem; font-weight: 600; }
.um-export-menu span { font-size: .75rem; color: var(--cl-muted); }

/* Filter bar: period group, then scope filters */
.um-filter-bar {
    gap: 12px 20px;
    padding: 14px 16px;
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: 12px;
    box-shadow: var(--cl-shadow-sm);
}
.um-filter-group { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.um-filter-group--period { padding-right: 20px; border-right: 1px solid var(--cl-border); }
.um-filter-bar .pn-filter-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.um-filter-bar .pn-filter-field-label {
    font-size: .75rem; font-weight: 500; letter-spacing: 0; text-transform: none;
    color: var(--cl-muted); white-space: nowrap;
}
.um-filter-bar .form-select {
    min-height: 2.25rem; width: auto; min-width: 7.5rem; max-width: 15rem;
    border: 1px solid var(--cl-border-2); border-radius: 8px;
    color: var(--cl-text-2); font-size: .84rem;
}
.um-filter-bar .form-select:focus { border-color: var(--cl-accent); box-shadow: 0 0 0 3px var(--cl-accent-soft); }
.um-period-hint { margin: 0; font-size: inherit; color: var(--cl-faint); }
.um-period {
    display: inline-flex; align-items: stretch; gap: 0; margin: 0;
    height: 2.25rem;
    border: 1px solid var(--cl-border-2); border-radius: 8px; background: var(--cl-card);
    overflow: hidden;
}
.um-period-label {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 11rem; padding: 0 10px;
    font-size: .86rem; font-weight: 600; color: var(--cl-text);
    border-left: 1px solid var(--cl-border); border-right: 1px solid var(--cl-border);
}
.um-period-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.25rem; padding: 0 0 2px; border: 0; background: transparent;
    font-size: 1.2rem; line-height: 1; color: var(--cl-text-2); text-decoration: none;
}
.um-period-btn:hover { background: var(--cl-hover); color: var(--cl-text); }
.um-period-btn:disabled { color: var(--cl-faint); background: transparent; cursor: not-allowed; }

/* Stat groups */
.um-stats {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 12px;
}
.um-stat-group {
    display: flex; flex-direction: column; gap: 8px;
    padding: 10px; min-width: 0;
    background: var(--cl-page); border: 1px solid var(--cl-border); border-radius: 12px;
}
.um-stat-group-title {
    padding: 0 4px;
    font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--cl-muted);
}
.um-stat-group.is-active .um-stat-group-title { color: var(--cl-accent-2); }
.um-stat-group-items { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.um-stat,
a.um-stat {
    position: relative;
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 14px;
    background: var(--cl-card); border: 1px solid var(--cl-border); border-radius: 10px;
    box-shadow: var(--cl-shadow-sm);
}
a.um-stat:hover,
a.um-stat:focus-visible { border-color: var(--cl-border-2); box-shadow: var(--cl-shadow); }
.um-stat-group.is-active { background: var(--cl-accent-soft); border-color: #cfe2e7; }
a.um-stat.is-active { border-color: var(--cl-accent); box-shadow: 0 0 0 1px var(--cl-accent); }
.um-stat-label {
    order: 0; margin: 0;
    display: flex; align-items: center; gap: 6px;
    font-size: .8rem; font-weight: 500; color: var(--cl-text-2);
}
.um-stat-label::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
    background: var(--cl-ok);
}
.um-stat.has-gap .um-stat-label::before { background: var(--cl-open); }
.um-stat-value {
    font-size: 1.6rem; font-weight: 650; line-height: 1.15; letter-spacing: -.01em;
    color: var(--cl-text);
}
.um-stat.has-gap .um-stat-value { color: var(--cl-open); }
.um-stat.is-zero .um-stat-value { color: var(--cl-faint); font-weight: 500; }
.um-stat-meta { margin: 0; font-size: .74rem; color: var(--cl-muted); }
@media (max-width: 1100px) {
    .um-stats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .um-stat-group-items { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .um-filter-group--period { padding-right: 0; border-right: 0; }
}

/* Tabs */
.um-tabs { gap: 4px; border-bottom: 1px solid var(--cl-border); }
.um-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 12px; font-size: .86rem; font-weight: 500; color: var(--cl-muted);
}
.um-tab:hover { color: var(--cl-text); }
.um-tab.active { color: var(--cl-text); font-weight: 600; border-bottom-color: var(--cl-accent); }
.um-tab-count {
    min-width: 1.4rem; padding: 1px 7px; border-radius: 999px;
    font-size: .72rem; font-weight: 600; text-align: center;
    background: var(--cl-active); color: var(--cl-muted);
}
.um-tab.active .um-tab-count { background: var(--cl-accent-soft); color: var(--cl-accent-2); }

/* Panels */
.um-split { gap: 14px; }
/* EMR / Transaction / YourPChoice cards: side by side (wrap when narrow) or one at a time. */
.um-split--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.um-split--3.is-single { grid-template-columns: minmax(0, 1fr); }
.um-split > .um-panel[hidden] { display: none; }
/* "Show all" / "Show fewer" jump targets: land below the sticky top bar. */
/* Out of flow so it never becomes a flex/grid item (it pushed headings off to the centre). */
.um-anchor { position: absolute; top: 0; left: 0; width: 0; height: 0; scroll-margin-top: 90px; }
.um-panel-head, .um-block-title { position: relative; }
.um-file { scroll-margin-top: 90px; }
.um-stats { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); }
@media (max-width: 1400px) {
    .um-stats { grid-template-columns: 1fr; }
}

/* Card tab strip + layout toggle (reuses the Billing Dashboard .cn-dash-tabs / .cn-dash-layout-toggle) */
.um-tabbar { display: flex; align-items: stretch; gap: .75rem; }
.um-tabbar.is-split { justify-content: flex-end; }
.um-tabbar.is-split .um-panel-tabs { display: none; }
.um-panel-tabs .cn-dash-tab-title { font-size: .95rem; }
@media (max-width: 640px) {
    .um-tabbar { flex-direction: column; }
    .um-tabbar .cn-dash-layout-toggle { align-self: flex-end; }
    .um-panel-tabs .cn-dash-tab { min-width: 9.5rem; }
}
.um-panel {
    padding: 0;
    background: var(--cl-card); border: 1px solid var(--cl-border); border-radius: 12px;
    box-shadow: var(--cl-shadow-sm); overflow: hidden;
}
.um-panel-head {
    align-items: center; margin: 0; padding: 12px 16px;
    border-bottom: 1px solid var(--cl-border);
}
.um-panel-head h2 { font-size: .95rem; font-weight: 650; color: var(--cl-text); }
.um-panel-head span { font-size: .76rem; color: var(--cl-muted); }
.um-panel > .um-file:first-of-type { margin-top: 12px; }
.um-panel > .um-file { margin: 0 12px 10px; }
.um-panel > .table-responsive { padding: 0 6px; }
.um-panel > .um-more-rows { padding: 0 16px 12px; }
.um-empty { color: var(--cl-muted); }
.um-empty--clear {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    margin: 0; padding: 28px 16px 30px; text-align: center;
}
.um-empty--clear::before {
    content: ""; width: 32px; height: 32px; margin-bottom: 6px; border-radius: 50%;
    background: var(--cl-ok-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a7a57' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.um-empty--clear strong { font-size: .9rem; font-weight: 600; color: var(--cl-text); }
.um-empty--clear span { font-size: .8rem; max-width: 26rem; }

/* File rows */
.um-file { background: var(--cl-card); border: 1px solid var(--cl-border); border-radius: 10px; overflow: hidden; }
.um-file > summary { gap: 6px 8px; padding: 10px 12px; }
.um-file > summary:hover { background: var(--cl-page); }
.um-file > summary::before {
    content: ""; width: 6px; height: 6px; flex: 0 0 auto; margin-right: 4px;
    border-right: 1.5px solid var(--cl-muted); border-bottom: 1.5px solid var(--cl-muted);
    transform: rotate(-45deg); transition: transform .15s ease;
}
.um-file[open] > summary::before { transform: rotate(45deg); }
.um-file-name { font-weight: 600; color: var(--cl-text); }
.um-file-meta { color: var(--cl-muted); font-size: .78rem; }
.um-pill {
    padding: 1px 8px; border-radius: 999px; white-space: nowrap;
    font-size: .72rem; font-weight: 600;
    background: var(--cl-ok-bg); color: var(--cl-ok);
}
.um-pill.has-gap { background: var(--cl-open-bg); color: var(--cl-open); }
.um-file-export {
    padding: 2px 8px; border: 1px solid var(--cl-border-2); border-radius: 6px;
    font-size: .72rem; font-weight: 600; color: var(--cl-text-2);
}
.um-file-export:hover { background: var(--cl-hover); text-decoration: none; }
.um-file-block { border-top: 1px solid var(--cl-border); padding: 12px 12px 14px; }
.um-file-block-head { justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.um-file-block .table-responsive { margin: 0; }
.um-file-block .um-more-rows { margin-top: 10px; }

/* Section header: status dot · title · count, with a one-line explanation under it */
.um-block-title {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    column-gap: 8px;
    row-gap: 1px;
    min-width: 0;
}
.um-block-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--cl-ok);
}
.um-block-title.has-gap .um-block-dot { background: var(--cl-open); }
.um-block-title strong { font-size: .9rem; font-weight: 650; color: var(--cl-text); }
.um-block-count {
    justify-self: start;
    padding: 1px 8px; border-radius: 999px;
    font-size: .74rem; font-weight: 650; font-variant-numeric: tabular-nums;
    background: var(--cl-ok-bg); color: var(--cl-ok);
}
.um-block-title.has-gap .um-block-count { background: var(--cl-open-bg); color: var(--cl-open); }
.um-block-sub {
    grid-column: 2 / -1;
    font-size: .76rem; color: var(--cl-muted);
}
.um-file-block .um-empty-inline {
    padding: 10px 12px; border-radius: 8px;
    background: var(--cl-ok-bg); color: var(--cl-ok); font-size: .8rem;
}

/* Easier row scanning in long lists */
.um-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--cl-page) 60%, transparent); }
.um-table tbody tr:hover td { background: var(--cl-hover); }
.um-table td { font-size: .82rem; vertical-align: middle; }
.um-table td:first-child { font-weight: 600; }
.um-file .table-responsive { border: 1px solid var(--cl-border); border-radius: 8px; padding: 0; }
.um-file > .table-responsive { margin: 0 12px 12px; }
.um-file > .um-more-rows { padding: 0 12px 12px; margin: 0; }
.um-table th {
    font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
    color: var(--cl-muted); background: var(--cl-page);
}
.um-table td, .um-table th { padding: 7px 10px; border-color: var(--cl-border); }
.um-table tbody tr:hover td { background: var(--cl-page); }
.um-table tbody tr:last-child td { border-bottom: 0; }

/* Billing Dashboard filters: labelled rows (Period / Scope / Group & filter), one control height */
.cn-dash-page .cn-dash-filter-panel {
    --cd-ctl-h: 34px;
    gap: 0;
    padding: 0;
    border-radius: 14px;
    box-shadow: var(--cl-shadow-sm);
    overflow: visible;
}
.cn-dash-page .cn-dash-filter-panel .cn-dash-frow {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    align-items: end;
    gap: 0 12px;
    margin: 0;
    padding: 12px 18px;
    border-top: 1px solid var(--cl-border);
    overflow: visible;
}
.cn-dash-page .cn-dash-filter-panel .cn-dash-frow:first-child { border-top: 0; padding-top: 14px; }
.cn-dash-page .cn-dash-filter-panel .cn-dash-frow:last-child { padding-bottom: 14px; }
.cn-dash-page .cn-dash-filter-panel .cn-dash-frow > * { flex: none; }
.cn-dash-frow-title {
    align-self: end;
    line-height: var(--cd-ctl-h, 34px);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--cl-faint);
    white-space: nowrap;
}
.cn-dash-frow-body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
    min-width: 0;
}
.cn-dash-frow-body > * { flex: 0 0 auto; margin: 0; }
/* Company picker wrapper: lays out as if the multi-select sat directly in the row. */
.cn-dash-company-pick { display: contents; }
.cn-dash-company-pick[hidden] { display: none; }

/* Field label above control, same spacing for selects, multi-selects and date ranges */
.cn-dash-frow-body .cn-dash-period-view,
.cn-dash-frow-body .pn-filter-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
}
.cn-dash-page .cn-dash-filter-panel .cn-dash-frow-body .cn-dash-period-view-label,
.cn-dash-page .cn-dash-filter-panel .cn-dash-frow-body .pn-filter-field-label {
    margin: 0;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    color: var(--cl-muted);
    white-space: nowrap;
}

/* One control height and shape */
.cn-dash-frow-body .form-select,
.cn-dash-frow-body .form-control,
.cn-dash-frow-body .cn-ms-btn {
    height: var(--cd-ctl-h);
    min-height: var(--cd-ctl-h);
    padding-top: 0;
    padding-bottom: 0;
    border: 1px solid var(--cl-border-2);
    border-radius: 8px;
    background-color: var(--cl-card);
    font-size: .84rem;
    color: var(--cl-text-2);
    box-shadow: none;
}
.cn-dash-frow-body .form-select { width: auto; min-width: 8rem; padding-right: 2rem; }
.cn-dash-frow-body .form-select:focus,
.cn-dash-frow-body .form-control:focus,
.cn-dash-frow-body .cn-ms-btn:focus-visible {
    border-color: var(--cl-accent);
    box-shadow: 0 0 0 3px var(--cl-accent-soft);
    outline: 0;
}
.cn-dash-frow-body .cn-ms { min-width: 9.5rem; max-width: 13rem; }
.cn-dash-frow-body .cn-ms-btn { min-width: 0; width: 100%; padding-left: 10px; padding-right: 8px; }
.cn-dash-frow-body .cn-ms-meta { font-size: .84rem; color: var(--cl-text-2); }
.cn-dash-frow-body .cn-ms--active .cn-ms-btn { border-color: #a9c9d1; background: var(--cl-accent-soft); }
.cn-dash-frow-body .cn-ms--active .cn-ms-meta { color: var(--cl-accent-2); font-weight: 600; }
.cn-dash-frow-body .cn-dash-date { width: 9.25rem; min-width: 0; }

/* Range: period stepper and its dates read as one control */
.cn-dash-range { display: flex; align-items: center; gap: 8px; }
.cn-dash-page .cn-dash-filter-panel .cn-dash-range .cn-dash-period-stepper {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    height: var(--cd-ctl-h);
    border: 1px solid var(--cl-border-2);
    border-radius: 8px;
    background: var(--cl-card);
    overflow: hidden;
}
.cn-dash-range .cn-dash-period-btn {
    width: 32px;
    height: auto;
    padding: 0 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--cl-text-2);
}
.cn-dash-range .cn-dash-period-btn:hover:not(:disabled) { background: var(--cl-hover); color: var(--cl-text); border: 0; }
.cn-dash-range .cn-dash-period-btn:disabled { color: var(--cl-faint); background: transparent; }
.cn-dash-range .cn-dash-period-label {
    min-width: 10.5rem;
    padding: 0 12px;
    border: 0;
    border-left: 1px solid var(--cl-border);
    border-right: 1px solid var(--cl-border);
    border-radius: 0;
    background: transparent;
    font-size: .86rem;
    font-weight: 600;
    color: var(--cl-text);
}
.cn-dash-range-dates { display: flex; align-items: center; gap: 6px; }
.cn-dash-range-sep { color: var(--cl-faint); font-size: .85rem; }

/* DOS / Created secondary ranges sit in the Period row */
.cn-dash-frow-body .cn-dash-date-row { display: flex; align-items: flex-end; gap: 8px; }
.cn-dash-frow-body .cn-dash-date-row.d-none { display: none !important; }
.cn-dash-frow-body .cn-dash-date-row:not(.d-none) {
    padding-left: 12px;
    border-left: 1px solid var(--cl-border);
}

/* Right dock: Saved filters + Reset all, matched to control height */
.cn-dash-page .cn-dash-dock { padding-top: 14px; gap: 8px; min-width: 9.5rem; }
.cn-dash-page .cn-dash-dock .sf-trigger,
.cn-dash-page .cn-dash-dock .cn-dash-reset-btn {
    min-height: 34px;
    border-radius: 8px;
    font-size: .82rem;
}
.cn-dash-page .cn-dash-dock .cn-dash-reset-btn {
    border-color: transparent;
    background: transparent;
    color: var(--cl-muted);
}
.cn-dash-page .cn-dash-dock .cn-dash-reset-btn:hover { background: var(--cl-hover); color: var(--cl-text); }

@media (max-width: 900px) {
    .cn-dash-page .cn-dash-filter-panel .cn-dash-frow { grid-template-columns: 1fr; gap: 6px; }
    .cn-dash-frow-title { line-height: 1.2; align-self: start; }
    .cn-dash-range { flex-wrap: wrap; }
    .cn-dash-page .cn-dash-dock { padding-top: 0; }
}

/* Notifications: sticky tabs + one-row week/filter toolbar */
.nt-page .nt-sticky-chrome {
    margin: 0 0 14px;
    padding: 8px 0 10px;
    background: var(--cl-page);
    border-bottom: 0;
    box-shadow: none;
}
.nt-page .nt-tabs {
    gap: 2px;
    margin: 0 0 12px;
    border-bottom: 1px solid var(--cl-border);
}
.nt-page .nt-sticky-chrome:not(.nt-sticky-chrome--providers) .nt-tabs { margin-bottom: 0; }
.nt-page .nt-tabs .pn-tab {
    gap: 7px;
    margin-bottom: -1px;
    padding: 8px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    font-size: .86rem;
    font-weight: 500;
    color: var(--cl-muted);
    box-shadow: none;
}
.nt-page .nt-tabs .pn-tab:hover { background: transparent; color: var(--cl-text); }
.nt-page .nt-tabs .pn-tab.active {
    background: transparent;
    color: var(--cl-text);
    font-weight: 600;
    border-bottom-color: var(--cl-accent);
}
.nt-tab-count {
    min-width: 1.4rem;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--cl-active);
    color: var(--cl-muted);
    font-size: .72rem;
    font-weight: 600;
    text-align: center;
}
.pn-tab.active .nt-tab-count { background: var(--cl-accent-soft); color: var(--cl-accent-2); }

.nt-page .nt-filter-panel {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    padding: 12px 14px;
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: 12px;
    box-shadow: var(--cl-shadow-sm);
}
.nt-page .nt-filter-panel .btn,
.nt-page .nt-filter-panel .form-control,
.nt-page .nt-filter-panel .form-select { height: 34px; min-height: 34px; border-radius: 8px; font-size: .82rem; }
.nt-page .nt-filter-panel .form-control,
.nt-page .nt-filter-panel .form-select { border-color: var(--cl-border-2); color: var(--cl-text-2); }

/* Week group: pager, range, Billing/Calendar toggle */
.nt-page .nt-week-bar { flex: 0 1 auto; flex-wrap: wrap; gap: 10px 14px; margin: 0; }
.nt-pager {
    display: inline-flex;
    border: 1px solid var(--cl-border-2);
    border-radius: 8px;
    background: var(--cl-card);
    overflow: hidden;
}
.nt-page .nt-pager .btn {
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--cl-text-2);
    font-weight: 500;
}
.nt-page .nt-pager .btn + .btn { border-left: 1px solid var(--cl-border); }
.nt-page .nt-pager .btn:hover { background: var(--cl-hover); color: var(--cl-text); }
.nt-page .nt-pager .btn.disabled { opacity: 1; color: var(--cl-faint); background: transparent; }
.nt-page .nt-week-range { margin: 0; align-items: baseline; gap: 6px; }
.nt-page .nt-filter-panel .mr-last-label {
    font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cl-faint);
}
.nt-page .nt-week-range .mr-last-value { font-size: .88rem; font-weight: 600; color: var(--cl-text); }
.nt-page .nt-filter-panel .nt-week-mode {
    padding: 2px;
    gap: 2px;
    border: 1px solid var(--cl-border-2);
    border-radius: 8px;
    background: var(--cl-page);
}
.nt-page .nt-filter-panel .nt-week-mode-opt {
    height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-size: .8rem;
    font-weight: 500;
    color: var(--cl-muted);
}
.nt-page .nt-filter-panel .nt-week-mode-opt + .nt-week-mode-opt { border-left: 0; }
.nt-page .nt-filter-panel .nt-week-mode-opt:hover { color: var(--cl-text); }
.nt-page .nt-filter-panel .nt-week-mode-opt.is-on {
    background: var(--cl-card);
    color: var(--cl-accent-2);
    font-weight: 600;
    box-shadow: var(--cl-shadow-sm);
}

/* Filter group: search, status, exceptions, actions */
.nt-page .nt-provider-filters {
    flex: 1 1 32rem;
    gap: 10px;
    padding: 0 0 0 20px;
    border-top: 0;
    border-left: 1px solid var(--cl-border);
}
.nt-page .nt-provider-filters .nt-search { flex: 1 1 14rem; max-width: 22rem; }
.nt-page .nt-provider-filters .form-select { width: 9.5rem; }
.nt-page .nt-check { margin: 0; font-size: .82rem; color: var(--cl-text-2); }
.nt-page .nt-check input[type="checkbox"] { accent-color: var(--cl-accent); }
.nt-page .nt-filter-end { gap: 8px; }
.nt-page .nt-filter-end .btn-outline-secondary { border-color: transparent; background: transparent; color: var(--cl-muted); }
.nt-page .nt-filter-end .btn-outline-secondary:hover { background: var(--cl-hover); color: var(--cl-text); }
.nt-page .nt-sub { margin: 0 0 12px; font-size: .82rem; color: var(--cl-muted); }

@media (max-width: 1200px) {
    .nt-page .nt-provider-filters { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--cl-border); flex-basis: 100%; }
}

/* =========================================================
   Main (Dashboard/Modules) — calm hub
   Scoped to .dash-home so Settings / Access pages that reuse
   .dash-panel keep their look.
   ========================================================= */
.dash-home .dash-hero { margin-bottom: 20px; padding-top: 4px; padding-bottom: 0; }
.dash-home .dash-hero-top { align-items: flex-end; }
.dash-home .dash-eyebrow { margin-bottom: 4px; }
.dash-home .dash-brand-title { margin-bottom: 4px; }
.dash-home .dash-lead { font-size: .9rem; }

/* ---------- Start my day ---------- */
.dash-home .dash-ops-digest { margin-bottom: 28px; }
.dash-home .dash-ops-panel { overflow: hidden; }
.dash-home .dash-ops-head {
    align-items: center;
    padding: 18px 20px 16px;
    background: transparent;
    border-bottom: 1px solid var(--cl-border);
}
.dash-home .dash-ops-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: var(--cl-accent-2);
    font-weight: 600;
}
.dash-home .dash-ops-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cl-accent);
}
.dash-home .dash-ops-title {
    font-family: var(--cl-sans);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--cl-text);
    letter-spacing: -0.015em;
}
.dash-home .dash-ops-lead { color: var(--cl-muted); font-size: .84rem; }
.dash-home .dash-ops-checked { color: var(--cl-text-2); font-weight: 500; }

.dash-home .dash-ops-metrics {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0;
    padding: 0;
}
.dash-home .dash-ops-tile {
    position: relative;
    gap: 6px;
    padding: 16px 20px 18px;
    border: none;
    border-right: 1px solid var(--cl-border);
    border-radius: 0;
    background: var(--cl-card);
    transition: background-color .15s ease;
}
.dash-home .dash-ops-tile:last-child { border-right: none; }
.dash-home .dash-ops-tile:hover {
    transform: none;
    box-shadow: none;
    background: #fafbfb;
}
.dash-home .dash-ops-tile:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(43, 108, 126, .35);
}
/* A thin top bar marks tiles that need work, instead of tinting the whole card */
.dash-home .dash-ops-tile.is-alert,
.dash-home .dash-ops-tile.is-alert:hover { background: var(--cl-card); border-color: var(--cl-border); }
.dash-home .dash-ops-tile.is-alert::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: var(--cl-open);
    opacity: .55;
}
.dash-home .dash-ops-tile.is-alert:hover { background: #fdfaf9; }

.dash-home .dash-ops-tile-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--cl-text-2);
}
.dash-home .dash-ops-tile-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--cl-ok);
    opacity: .7;
}
.dash-home .dash-ops-tile.is-alert .dash-ops-tile-dot { background: var(--cl-open); opacity: 1; }

.dash-home .dash-ops-tile-value {
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--cl-text);
    font-variant-numeric: tabular-nums lining-nums;
}
.dash-home .dash-ops-tile.is-alert .dash-ops-tile-value { color: var(--cl-open); }
.dash-home .dash-ops-tile.is-clear .dash-ops-tile-value { color: var(--cl-faint); }

.dash-home .dash-ops-tile-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--cl-muted);
}
.dash-home .dash-ops-tile.is-alert .dash-ops-tile-action { color: var(--cl-accent-2); }
.dash-home .dash-ops-tile-arrow {
    opacity: 0;
    transform: translateX(-3px);
    transition: opacity .15s ease, transform .15s ease;
}
.dash-home .dash-ops-tile:hover .dash-ops-tile-arrow,
.dash-home .dash-ops-tile:focus-visible .dash-ops-tile-arrow { opacity: 1; transform: none; }

/* ---------- Modules ---------- */
.dash-home-section-title {
    margin: 0 0 12px;
    font-family: var(--cl-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--cl-text);
    letter-spacing: -0.01em;
}
.dash-home .dash-module-grid { column-gap: 16px; margin-top: 0; }
.dash-home .dash-module-grid > .dash-section { margin-bottom: 16px; }
.dash-home .dash-module-grid .dash-panel { border-radius: 14px; }
.dash-home .dash-panel-title {
    padding: 14px 18px 6px;
    background: transparent;
    border-bottom: none;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--cl-muted);
}
.dash-home .dash-list { padding: 0 6px 6px; }
.dash-home .dash-row {
    gap: 12px;
    padding: 10px 12px;
    border-bottom: none;
    border-radius: 10px;
    transition: background-color .12s ease;
}
.dash-home .dash-row + .dash-row { margin-top: 1px; }
.dash-home .dash-row:hover { background: var(--cl-page); }
.dash-home .dash-row:focus-visible {
    outline: none;
    background: var(--cl-page);
    box-shadow: 0 0 0 2px rgba(43, 108, 126, .3);
}
.dash-home .dash-row-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--cl-accent-soft);
    color: var(--cl-accent-2);
    transition: background-color .12s ease, color .12s ease;
}
.dash-home .dash-row:hover .dash-row-icon { background: var(--cl-accent); color: #fff; }
.dash-home .dash-row-name { font-size: .92rem; font-weight: 500; color: var(--cl-text); }
.dash-home .dash-row:hover .dash-row-name { color: var(--cl-text); }
.dash-home .dash-row-desc { font-size: .78rem; color: var(--cl-muted); }
.dash-home .dash-row::after {
    color: var(--cl-faint);
    transition: transform .12s ease, color .12s ease;
}
.dash-home .dash-row:hover::after { color: var(--cl-accent); transform: translateX(2px); }

@media (max-width: 640px) {
    .dash-home .dash-ops-head { padding: 16px; }
    .dash-home .dash-ops-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-home .dash-ops-tile { padding: 14px 16px; border-bottom: 1px solid var(--cl-border); }
    .dash-home .dash-ops-tile:nth-child(2n) { border-right: none; }
    .dash-home .dash-ops-tile.is-alert::before { left: 16px; right: 16px; }
    .dash-home .dash-ops-tile-value { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) {
    .dash-home .dash-ops-tile-arrow,
    .dash-home .dash-row::after { transition: none; }
}

/* =========================================================
   List pages follow EMR Coded Notes / EMR Records: grouped segmented
   tabs, the shared summary strip and the shared table. Only counts on
   tabs and column alignment hooks are added here; no per-page restyling.
   ========================================================= */
.cn-tab-count {
    display: inline-block;
    min-width: 1.4rem;
    margin-left: .35rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: .7rem;
    font-weight: 650;
    line-height: 1.45;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.cn-tab.active .cn-tab-count { background: rgba(255, 255, 255, .22); color: #fff; }
/* Tabs that sit on their own row (not inside the toolbar) keep the toolbar's spacing. */
.cn-tab-groups.ls-status-tabs,
.cn-tab-groups.demo-tabs { margin-bottom: .75rem; }

/* Provider Submissions / Verification: column alignment. */
.ls-table .ls-col-id,
.ls-table .ls-col-nowrap { white-space: nowrap; }
.ls-table .ls-col-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ls-table .ls-col-num .ls-onsheet { align-items: flex-end; }
.ls-table .ls-onsheet-split { display: block; margin-top: .25rem; }
.ls-table .ls-col-status { min-width: 12rem; max-width: 17rem; }
.ls-table .ls-status-msg {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}
.ls-table .ls-col-actions { width: 1%; white-space: nowrap; }

/* YourPChoice Patients (LogSheets/Patients): EMR Coded Notes list layout; only the
   Patient ID box and the one-line Entry cell need their own rules. */
.emr-cn-filters .ls-patient-id-input { width: 8.5rem; flex: 0 0 auto; }
.ls-patients-table .ls-col-entry .ls-match-cell { flex-direction: row; align-items: center; gap: .4rem; }
