body.carewex-modern .carewex-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 18px 22px;
    border: 1px solid #d5e5e5;
    border-radius: 18px;
    background:
        radial-gradient(circle at 96% 4%, rgba(201, 231, 242, 0.62), transparent 25%),
        linear-gradient(110deg, #f8fcfb 0%, #f2f7fb 100%);
    box-shadow: 0 8px 24px rgba(27, 55, 80, 0.055);
}

body.carewex-modern .carewex-page-heading-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 16px;
}

body.carewex-modern .carewex-page-heading-copy {
    min-width: 0;
}

body.carewex-modern .carewex-page-icon {
    display: inline-grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border: 1px solid #b8dcd4;
    border-radius: 17px;
    background: #e4f4ef;
    color: #176f65;
    box-shadow: 0 6px 14px rgba(23, 111, 101, 0.12);
    animation: carewex-icon-arrive 420ms ease-out both;
}

body.carewex-modern .carewex-page-icon i {
    font-size: 25px;
}

body.carewex-modern #carewex-page-identity[data-area="clinical"] .carewex-page-icon {
    border-color: #b7d9d4;
    background: #e7f5f1;
    color: #126b60;
}

body.carewex-modern #carewex-page-identity[data-area="diagnostics"] .carewex-page-icon {
    border-color: #bfd9ec;
    background: #e9f4fc;
    color: #286994;
}

body.carewex-modern #carewex-page-identity[data-area="operations"] .carewex-page-icon {
    border-color: #d3cae8;
    background: #f1eef9;
    color: #65518e;
}

body.carewex-modern #carewex-page-identity[data-area="administration"] .carewex-page-icon {
    border-color: #ecd8b7;
    background: #fff5e7;
    color: #90651e;
}

body.carewex-modern #carewex-page-identity[data-area="records"] .carewex-page-icon {
    border-color: #c8d6e5;
    background: #edf3fa;
    color: #486784;
}

body.carewex-modern .carewex-page-category {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding: 4px 10px;
    border: 1px solid #d5e5e2;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #41646b;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

body.carewex-modern .carewex-page-category::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #278276;
    content: "";
}

body.carewex-modern #carewex-page-identity[data-area="diagnostics"] .carewex-page-category::before {
    background: #3987b5;
}

body.carewex-modern #carewex-page-identity[data-area="operations"] .carewex-page-category::before {
    background: #7862a8;
}

body.carewex-modern #carewex-page-identity[data-area="administration"] .carewex-page-category::before {
    background: #b17c26;
}

body.carewex-modern .carewex-page-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

body.carewex-modern .carewex-workspace-link {
    min-height: 44px;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body.carewex-modern .carewex-workspace-link:hover {
    border-color: #91c6bb;
    box-shadow: 0 5px 14px rgba(21, 94, 85, 0.11);
    transform: translateY(-1px);
}

body.carewex-modern .carewex-content-surface.ui-panel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.carewex-modern .carewex-content-surface > .ui-panel-content {
    min-width: 0;
}

body.carewex-modern .ui-panel .ui-panel-titlebar {
    background: linear-gradient(100deg, #f0f8f6 0%, #f6f9fc 100%);
}

body.carewex-modern .ui-dashboard {
    align-items: stretch;
}

body.carewex-modern .carewex-queue-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

body.carewex-modern .carewex-queue-link {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 60px;
    padding: 10px 12px;
    border: 1px solid #cee2df;
    border-radius: 12px;
    background: #f4faf9;
    color: #185b56;
    text-decoration: none;
}

body.carewex-modern .carewex-queue-link:hover,
body.carewex-modern .carewex-queue-link:focus-visible {
    background: #e5f3ef;
    border-color: #81b4a9;
}

body.carewex-modern .carewex-queue-link > .fa:first-child {
    display: grid;
    height: 2.5rem;
    place-items: center;
    border-radius: 10px;
    background: #ddefea;
}

body.carewex-modern .carewex-care-planner .fc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

body.carewex-modern .carewex-care-planner .fc-toolbar .fc-clear {
    display: none;
}

body.carewex-modern .carewex-care-planner .fc-toolbar button {
    height: auto;
    min-height: 44px;
}

@media (max-width: 1100px) {
    body.carewex-modern .carewex-pending-bills [id$=":datePanel"] > table,
    body.carewex-modern .carewex-pending-bills [id$=":datePanel"] > table > tbody,
    body.carewex-modern .carewex-pending-bills [id$=":datePanel"] > table > tbody > tr,
    body.carewex-modern .carewex-pending-bills [id$=":datePanel"] > table > tbody > tr > td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    body.carewex-modern .carewex-pending-bills [id$=":datePanel"] > table > tbody > tr > td:empty {
        display: none;
    }

    body.carewex-modern .carewex-pending-bills [id$=":datePanel"] .ui-calendar input {
        width: 100%;
        box-sizing: border-box;
    }

    body.carewex-modern .carewex-pending-bills [id$=":datePanel"] .ui-selectonemenu {
        max-width: 100%;
        box-sizing: border-box;
    }
}

body.carewex-modern .ui-dashboard-column > .ui-panel {
    border: 1px solid #e1eaf0;
    border-radius: 14px;
    box-shadow: 0 5px 16px rgba(27, 55, 80, 0.045);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body.carewex-modern .ui-dashboard-column > .ui-panel:hover {
    border-color: #c4dcd8;
    box-shadow: 0 9px 22px rgba(27, 55, 80, 0.085);
    transform: translateY(-2px);
}

body.carewex-modern .carewex-provider-breakdown-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 12px;
    padding: 9px 0;
    border-bottom: 1px solid #e8eef2;
    list-style: none;
}

body.carewex-modern .carewex-provider-breakdown-item strong {
    color: #285d64;
    font-variant-numeric: tabular-nums;
}

body.carewex-modern .carewex-provider-breakdown-track {
    grid-column: 1 / -1;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9f1f3;
}

body.carewex-modern .carewex-provider-breakdown-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #287f78, #67b2a1);
    transition: width 180ms ease;
}

body.carewex-modern #carewex-main .jqplot-target {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

body.carewex-modern #carewex-main .ui-datatable-empty-message td,
body.carewex-modern #carewex-main .ui-datalist-empty-message,
body.carewex-modern #carewex-main .ui-datagrid-empty-message,
body.carewex-modern #carewex-main .ui-datascroller-empty-message {
    padding: 22px 18px;
    border: 1px dashed #c8d8e1;
    border-radius: 10px;
    background: #f7fafc;
    color: #536b7b;
    line-height: 1.6;
    text-align: center;
    white-space: normal;
}

body.carewex-modern #carewex-main .ui-datatable-empty-message td::before,
body.carewex-modern #carewex-main .ui-datalist-empty-message::before,
body.carewex-modern #carewex-main .ui-datagrid-empty-message::before,
body.carewex-modern #carewex-main .ui-datascroller-empty-message::before,
body.carewex-modern #carewex-main .carewex-empty-state::before {
    display: block;
    margin-bottom: 8px;
    color: #438d86;
    content: "\f05a";
    font-family: FontAwesome;
    font-size: 19px;
}

body.carewex-modern .carewex-panel-icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    margin-right: 9px;
    place-items: center;
    border-radius: 8px;
    background: #e2f1ed;
    color: #176f65;
    font-size: 13px;
    vertical-align: middle;
}

body.carewex-modern .ui-inputfield,
body.carewex-modern .ui-selectonemenu,
body.carewex-modern .ui-autocomplete-input,
body.carewex-modern .ui-calendar input,
body.carewex-modern textarea {
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

body.carewex-modern .ui-inputfield:not(.ui-state-disabled):hover,
body.carewex-modern .ui-selectonemenu:not(.ui-state-disabled):hover,
body.carewex-modern .ui-autocomplete-input:not(.ui-state-disabled):hover,
body.carewex-modern .ui-calendar input:not(:disabled):hover,
body.carewex-modern textarea:not(:disabled):hover {
    border-color: #8dbbb3;
}

body.carewex-modern .ui-inputfield:focus-visible,
body.carewex-modern .ui-selectonemenu.ui-state-focus,
body.carewex-modern .ui-autocomplete-input:focus-visible,
body.carewex-modern .ui-calendar input:focus-visible,
body.carewex-modern textarea:focus-visible {
    border-color: #208276;
    box-shadow: 0 0 0 3px rgba(32, 130, 118, 0.17);
}

body.carewex-modern .ui-panelgrid > tbody > tr:focus-within > td,
body.carewex-modern .carewex-form-grid > tbody > tr:focus-within > td {
    background: #f0f8f6;
}

body.carewex-modern .ui-outputlabel-rfi {
    color: #a8473c;
    font-weight: 800;
}

body.carewex-modern .ui-button,
body.carewex-modern button:not(.ui-button) {
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

body.carewex-modern .ui-button:focus-visible,
body.carewex-modern button:focus-visible,
body.carewex-modern a:focus-visible {
    outline: 3px solid rgba(32, 130, 118, 0.65);
    outline-offset: 3px;
}

body.carewex-modern .ui-button:not(.ui-state-disabled):active,
body.carewex-modern button:not(:disabled):active {
    transform: translateY(1px);
}

body.carewex-modern .carewex-action-icon {
    margin-right: 0.45em;
}

body.carewex-modern .carewex-module-card > a {
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body.carewex-modern .carewex-module-card > a:hover {
    transform: translateY(-2px);
}

body.carewex-modern .carewex-module-card > a:hover .carewex-module-icon,
body.carewex-modern .carewex-module-card > a:focus-visible .carewex-module-icon {
    transform: scale(1.06);
}

body.carewex-modern .carewex-module-icon {
    transition: transform 180ms ease, box-shadow 180ms ease;
}

body.carewex-modern .ui-datatable tbody tr {
    transition: background-color 140ms ease;
}

@keyframes carewex-icon-arrive {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    body.carewex-modern .carewex-page-heading {
        align-items: flex-start;
        padding: 15px;
    }

    body.carewex-modern .carewex-page-heading-actions {
        width: 100%;
        justify-content: flex-start;
    }

    body.carewex-modern .ui-dashboard {
        gap: 12px;
    }

    body.carewex-modern .ui-dashboard-column {
        flex-basis: 100%;
    }

    body.carewex-modern .ui-dashboard-column > .ui-panel {
        height: auto;
    }

    body.carewex-modern #carewex-main .ui-datagrid-column {
        float: none;
        width: 100% !important;
        box-sizing: border-box;
    }

    body.carewex-modern .carewex-page-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 14px;
    }

    body.carewex-modern .carewex-page-icon i {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.carewex-modern .carewex-page-icon {
        animation: none;
    }

    body.carewex-modern .carewex-workspace-link,
    body.carewex-modern .ui-button,
    body.carewex-modern button,
    body.carewex-modern .carewex-module-card > a,
    body.carewex-modern .carewex-module-icon,
    body.carewex-modern .ui-dashboard-column > .ui-panel,
    body.carewex-modern .carewex-provider-breakdown-track > span,
    body.carewex-modern .ui-inputfield,
    body.carewex-modern .ui-selectonemenu,
    body.carewex-modern .ui-autocomplete-input,
    body.carewex-modern .ui-calendar input,
    body.carewex-modern textarea {
        transition: none;
    }
}
