.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100%;
}

/* Scoped content refresh for in-scope admin routes. Keep shell and excluded pages intact. */
.crm-page-refresh .c-main {
    --crm-ink: #17242e;
    --crm-muted: #64736f;
    --crm-teal: #007e6e;
    --crm-line: #e5e1d7;
    color: var(--crm-ink);
}

.crm-page-refresh .c-main .container-fluid {
    max-width: 1560px;
}

.crm-page-refresh .c-main p,
.crm-page-refresh .c-main li {
    line-height: 1.55;
}

.crm-page-refresh .c-main label {
    margin-bottom: 6px;
    color: #34464b;
    font-size: 13px;
    font-weight: 650;
}

.crm-page-refresh .c-main .required::after {
    color: #bd4b48;
}

.crm-page-refresh .c-main h1,
.crm-page-refresh .c-main h2,
.crm-page-refresh .c-main h3,
.crm-page-refresh .c-main h4,
.crm-page-refresh .c-main h5 {
    color: var(--crm-ink);
    letter-spacing: -.015em;
}

.crm-page-refresh .c-main > .container-fluid > .card,
.crm-page-refresh .c-main .container-fluid > .row > [class*="col-"] > .card,
.crm-page-refresh .c-main .card:not(.card-header),
.crm-page-refresh .c-main .health-profile-card,
.crm-page-refresh .c-main .health-detail-card,
.crm-page-refresh .c-main .health-edit-card {
    border: 1px solid var(--crm-line);
    border-radius: 14px;
    background: #fffdf8;
    box-shadow: 0 3px 12px rgba(32, 45, 39, .045);
    overflow: hidden;
}

.crm-page-refresh .c-main .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--crm-line);
    background: #fffdf8;
    color: var(--crm-ink);
    font-weight: 700;
}

.crm-page-refresh .c-main .card-body {
    padding: 18px;
}

.crm-page-refresh .c-main .card-body > .row:last-child,
.crm-page-refresh .c-main .card-body > form:last-child {
    margin-bottom: 0;
}

.crm-page-refresh .c-main .card-body > form[role="search"],
.crm-page-refresh .c-main form.row.align-items-end {
    padding: 12px;
    border: 1px solid #ebe7dc;
    border-radius: 10px;
    background: #faf9f4;
}

.crm-page-refresh .c-main .table {
    color: #26383f;
    margin-bottom: 0;
}

.crm-page-refresh .c-main .table-responsive {
    border-radius: 9px;
}

.crm-page-refresh .c-main .table thead th {
    border-top: 0;
    border-bottom: 1px solid #dcd8ce;
    background: #f7f6ef;
    color: #586873;
    font-size: 11px;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.crm-page-refresh .c-main .table td,
.crm-page-refresh .c-main .table th {
    vertical-align: middle;
}

.crm-page-refresh .c-main .table tbody tr:hover {
    background-color: #f8faf6;
}

.crm-page-refresh .c-main .table .btn {
    margin: 2px;
}

.crm-page-refresh .c-main .form-control,
.crm-page-refresh .c-main .custom-select {
    min-height: 42px;
    border-color: #d9d4c8;
    border-radius: 8px;
    background-color: #fffefa;
    box-shadow: none;
}

.crm-page-refresh .c-main textarea.form-control {
    min-height: 104px;
}

.crm-page-refresh .c-main .form-control:focus,
.crm-page-refresh .c-main .custom-select:focus {
    border-color: #63a99a;
    box-shadow: 0 0 0 3px rgba(0, 126, 110, .13);
}

.crm-page-refresh .c-main .btn-primary,
.crm-page-refresh .c-main .btn-success {
    border-color: var(--crm-teal);
    background: var(--crm-teal);
    color: #fff;
}

.crm-page-refresh .c-main .btn-primary:hover,
.crm-page-refresh .c-main .btn-success:hover {
    border-color: #006658;
    background: #006658;
}

.crm-page-refresh .c-main .btn,
.crm-page-refresh .c-main .page-link {
    min-height: 38px;
}

.crm-page-refresh .c-main .btn-xs {
    min-height: 34px;
    padding: 6px 9px;
}

.crm-page-refresh .c-main .pagination {
    flex-wrap: wrap;
    gap: 3px;
}

.crm-page-refresh .c-main .alert {
    border-radius: 10px;
}

.crm-page-refresh .c-main .invalid-feedback,
.crm-page-refresh .c-main .help-block {
    font-size: 12px;
}

.crm-page-refresh .c-main .help-block,
.crm-page-refresh .c-main .text-muted {
    color: var(--crm-muted) !important;
}

.crm-page-refresh .c-main :focus-visible,
.auth-page-refresh :focus-visible {
    outline: 3px solid rgba(0, 126, 110, .3);
    outline-offset: 2px;
}

.crm-page-refresh .travel-quick-nav {
    position: sticky;
    z-index: 5;
    top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--crm-line);
    border-radius: 12px;
    background: rgba(255, 253, 248, .96);
}

.crm-page-refresh #indiaMap,
.crm-page-refresh #worldMap {
    min-height: 340px;
}

.crm-page-refresh .travel-actions .btn {
    min-width: 44px;
    min-height: 44px;
}

.auth-page-refresh .form-control {
    min-height: 44px;
    border-radius: 8px;
}

@media (max-width: 767.98px) {
    .crm-page-refresh .c-main .container-fluid {
        padding: 14px 12px calc(78px + env(safe-area-inset-bottom));
    }

    .crm-page-refresh .c-main .card-header,
    .crm-page-refresh .c-main .card-body {
        padding: 14px;
    }

    .crm-page-refresh .c-main .card-header > .btn,
    .crm-page-refresh .c-main .card-header > a.btn {
        flex: 0 0 auto;
    }

    .crm-page-refresh .c-main .form-group {
        margin-bottom: 14px;
    }

    .crm-page-refresh .c-main .card-body > form[role="search"],
    .crm-page-refresh .c-main form.row.align-items-end {
        padding: 10px;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table {
        display: block;
        width: 100%;
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table thead {
        display: none;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table tbody,
    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table tr,
    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table td {
        display: block;
        width: 100%;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table tr {
        margin-bottom: 10px;
        padding: 6px 12px;
        border: 1px solid var(--crm-line);
        border-radius: 10px;
        background: #fffdf8;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 0;
        border: 0;
        border-bottom: 1px solid #efede5;
        overflow-wrap: anywhere;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table td:last-child {
        border-bottom: 0;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table td[data-label]::before {
        flex: 0 0 36%;
        color: var(--crm-muted);
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .035em;
        text-transform: uppercase;
        overflow-wrap: normal;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table td[data-mobile-actions="true"] {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table td[data-mobile-actions="true"]::before {
        flex-basis: 100%;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table td[data-mobile-actions="true"] form {
        display: inline-flex;
        margin: 0;
    }

    .crm-page-refresh:not(.crm-travel-page) .c-main .table-responsive:not(.simple-table-scroll) .table td[colspan] {
        display: block;
    }

    .crm-page-refresh .c-main .table-responsive.simple-table-scroll > .table {
        display: table;
        min-width: 620px;
    }

    .crm-page-refresh .c-main .btn {
        min-height: 42px;
    }

    .crm-page-refresh .c-main .btn-xs {
        min-height: 38px;
    }

    .crm-page-refresh .c-main .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .crm-page-refresh .c-main .travel-quick-nav {
        top: 2px;
    }

    .crm-page-refresh #indiaMap,
    .crm-page-refresh #worldMap {
        min-height: 320px;
    }

    .crm-page-refresh .travel-actions {
        display: flex;
        gap: 5px;
    }
}

.simple-table-scroll {
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    max-height: min(72vh, calc(100vh - 230px));
}

.simple-table-scroll .datatable {
    min-width: max-content;
    width: max-content;
    border-collapse: separate;
    border-spacing: 0;
}

.simple-table-scroll .datatable th,
.simple-table-scroll .datatable td {
    white-space: nowrap;
}

.simple-table-scroll .datatable {
    --simple-table-sticky-top: 64px;
    --simple-table-head-first-row-height: 42px;
}

.simple-table-scroll .datatable thead tr.simple-table-header-row th,
.simple-table-scroll .datatable thead tr:first-child th {
    position: sticky;
    top: var(--simple-table-sticky-top);
    z-index: 30;
    background: #f3f7ff;
}

.simple-table-scroll .datatable thead tr.simple-table-filter-row th,
.simple-table-scroll .datatable thead tr:nth-child(2) th {
    position: sticky;
    top: calc(var(--simple-table-sticky-top) + var(--simple-table-head-first-row-height));
    z-index: 29;
    background: #f8fbff;
}

.simple-table-scroll .datatable tbody td.simple-table-sticky-first-col {
    position: sticky;
    left: 0;
    z-index: 12;
    background-color: #fff !important;
    box-shadow: 1px 0 0 #d8dbe0;
}

.simple-table-scroll .datatable thead th.simple-table-sticky-first-col {
    position: sticky;
    left: 0;
    z-index: 32;
    background: #eef4ff;
    box-shadow: 1px 0 0 #d8dbe0;
}

.simple-table-scroll .datatable thead tr.simple-table-header-row th.simple-table-sticky-first-col,
.simple-table-scroll .datatable thead tr:first-child th.simple-table-sticky-first-col {
    z-index: 40;
}

.simple-table-scroll .datatable thead tr.simple-table-filter-row th.simple-table-sticky-first-col,
.simple-table-scroll .datatable thead tr:nth-child(2) th.simple-table-sticky-first-col {
    z-index: 39;
}

.simple-table-scroll .datatable .simple-table-id-col {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
}

.simple-table-scroll .datatable thead .simple-table-id-col input,
.simple-table-scroll .datatable thead .simple-table-id-col select {
    width: 100%;
    min-width: 0;
}

.simple-table-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.simple-table-toolbar-left,
.simple-table-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.simple-table-per-page {
    min-width: 110px;
}

.simple-table-global-search {
    min-width: 220px;
}

.simple-table thead th.simple-table-sortable {
    cursor: pointer;
    user-select: none;
}

.simple-table thead th.simple-table-sort-asc::after {
    content: " ▲";
    font-size: 10px;
}

.simple-table thead th.simple-table-sort-desc::after {
    content: " ▼";
    font-size: 10px;
}

.simple-table-pager {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.simple-table-pages {
    display: flex;
    gap: 6px;
}

.simple-table-pages .btn {
    min-width: 38px;
}

.simple-select-all,
.simple-row-select {
    width: 16px;
    height: 16px;
}

.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

.mobile-upload-status {
    word-break: break-word;
}

.mobile-upload-status.text-danger {
    color: #b42318 !important;
}

.c-sidebar-nav-record-link {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 4px 12px;
    min-width: 0;
    width: calc(100% - 24px);
}

.c-sidebar .c-sidebar-nav-record-link .c-sidebar-nav-link {
    flex: 1 1 auto;
    min-width: 0;
    width: 0;
    margin: 0;
    padding-left: 8px;
    padding-right: 8px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.c-sidebar-nav-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--accent-1);
    text-decoration: none;
}

.c-sidebar-nav-add:hover,
.c-sidebar-nav-add:focus {
    color: #fff;
    background: rgba(0, 225, 255, 0.16);
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .simple-table-global-search {
        min-width: 170px;
    }
}

@media (max-width: 767.98px) {
    .simple-table-scroll {
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        max-height: min(68vh, calc(100vh - 210px));
    }

    .simple-table-scroll .datatable {
        width: max-content;
        min-width: 100%;
    }

    .simple-table-scroll .datatable th,
    .simple-table-scroll .datatable td {
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 10px;
        min-width: 120px;
    }

    .simple-table-scroll .datatable .datatable-select-col,
    .simple-table-scroll .datatable .simple-table-id-col {
        min-width: 48px;
        width: 48px;
        max-width: 48px;
    }

    .simple-table-scroll .datatable tbody td.simple-table-sticky-first-col {
        position: static;
        left: auto;
        z-index: auto;
        box-shadow: none;
    }

    .simple-table-scroll .datatable thead th.simple-table-sticky-first-col {
        left: auto;
        z-index: 30;
        box-shadow: none;
    }

    .simple-table-scroll .datatable thead tr.simple-table-header-row th,
    .simple-table-scroll .datatable thead tr:first-child th {
        top: var(--simple-table-sticky-top);
    }

    .simple-table-scroll .datatable thead tr.simple-table-filter-row th,
    .simple-table-scroll .datatable thead tr:nth-child(2) th {
        top: calc(var(--simple-table-sticky-top) + var(--simple-table-head-first-row-height));
    }

    .simple-table-toolbar .btn,
    .simple-table-toolbar .form-control,
    .simple-table-toolbar .custom-select {
        min-height: 40px;
    }

    .quick-attachment-plus {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }
}

.sidebar .nav-item {
    cursor: pointer;
}

.btn-default {
    color: #23282c;
    background-color: #f0f3f5;
    border-color: #f0f3f5;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #23282c;
    background-color: #d9e1e6;
    border-color: #d1dbe1;
}

.btn-group-xs>.btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.searchable-title {
    font-weight: bold;
}

.searchable-fields {
    padding-left: 5px;
}

.searchable-link {
    padding: 0 5px 0 5px;
}

.searchable-link:hover {
    cursor: pointer;
    background: #eaeaea;
}

.quick-attachment-upload.is-dragover .quick-attachment-plus {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1d4ed8;
    box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.18);
    transform: translateY(-1px);
}

.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.form-group .required::after {
    content: " *";
    color: red;
}

.form-check.is-invalid~.invalid-feedback {
    display: block;
}

.c-sidebar-brand .c-sidebar-brand-full:hover {
    color: inherit;
}

.famlocker-brand {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

.brand-mark-picture { display: inline-flex; flex: 0 0 auto; align-items: center; }
.brand-mark { display: block; width: 1.35em; height: 1.2em; object-fit: contain; }

.famlocker-brand img {
    flex: 0 0 auto;
    height: 1.35em;
    width: 1.35em;
}

.c-header-brand.famlocker-brand img {
    height: 1.15em;
    width: 1.15em;
}

.auth-brand-icon .brand-mark { width: 40px; height: 36px; }
.login-logo-circle .brand-mark { width: 38px; height: 34px; }

.custom-select.form-control-sm {
    padding: 0.25rem 1.5rem;
}

td.pin {
    color: red;
}

input[type="date"] {
    position: relative;
}

/* create a new arrow, because we are going to mess up the native one
see "List of symbols" below if you want another, you could also try to add a font-awesome icon.. */
input[type="date"]:after {
    content: ""; 
    color: #555;
    padding: 0 5px;
}

/* change color of symbol on hover */
input[type="date"]:hover:after {
    color: #bf1400;
}

/* make the native arrow invisible and stretch it over the whole field so you can click anywhere in the input field to trigger the native datepicker*/
input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    color: transparent;
    background: transparent;
}

/* adjust increase/decrease button */
input[type="date"]::-webkit-inner-spin-button {
    z-index: 1;
}

/* adjust clear button */
input[type="date"]::-webkit-clear-button {
    z-index: 1;
}

.health-overview-page { max-width:1120px; margin:0 auto; color:#1d2b35; }
.health-overview-page .health-heading,
.health-overview-page .health-section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.health-overview-page .health-heading { margin:4px 0 20px; }
.health-overview-page .health-heading h1 { margin:0; color:#17242e; font-size:28px; font-weight:750; }
.health-overview-page .health-heading p:last-child { margin:5px 0 0; color:#62716f; }
.health-overview-page .health-eyebrow { margin:0 0 4px; color:#007e6e; font-size:11px; font-weight:750; letter-spacing:.08em; text-transform:uppercase; }
.health-overview-page .health-member-picker { width:min(100%,280px); }
.health-overview-page .health-member-picker label { display:block; margin-bottom:5px; font-size:12px; font-weight:700; }
.health-overview-page .health-member-picker select { min-height:44px; }
.health-overview-page .health-profile-card,
.health-overview-page .health-history-card { min-width:0; border:1px solid #e2ddcf; border-radius:14px; background:#fffdf8; box-shadow:0 2px 5px rgba(42,54,48,.04); }
.health-overview-page .health-profile-card { margin-bottom:14px; padding:18px; }
.health-overview-page .health-history-card { padding:18px; }
.health-overview-page .health-section-heading { margin-bottom:12px; }
.health-overview-page .health-section-heading h2 { margin:0; color:#17242e; font-size:18px; font-weight:750; }
.health-history-count { margin:4px 0 0; color:#687873; font-size:12px; }
.health-overview-page .health-actions,
.health-overview-page .health-section-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.health-overview-page .health-button { display:inline-flex; min-height:44px; align-items:center; justify-content:center; gap:8px; padding:9px 14px; border:1px solid #d9d4c8; border-radius:9px; font-size:13px; font-weight:700; text-decoration:none!important; }
.health-overview-page .health-button-secondary { background:#fff; color:#263942!important; }
.health-overview-page .health-button-primary { border-color:#007e6e; background:#007e6e; color:#fff!important; }
.health-overview-page .health-button-primary:hover { border-color:#006658; background:#006658; }
.health-overview-page .health-button:focus-visible,
.health-history-item:focus-visible,
.health-history-more-filters summary:focus-visible { outline:3px solid #4e9e8f; outline-offset:2px; }
.health-overview-page .health-link { display:inline-flex; min-height:44px; align-items:center; color:#007e6e; font-size:13px; font-weight:700; }
.health-overview-page .health-profile-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; }
.health-overview-page .health-profile-facts>div { min-width:0; padding:12px 8px; border-top:1px solid #eee9df; }
.health-overview-page .health-profile-facts dt { margin-bottom:4px; color:#687873; font-size:12px; font-weight:750; letter-spacing:.04em; text-transform:uppercase; }
.health-overview-page .health-profile-facts dd { margin:0; color:#26383f; font-size:14px; line-height:1.5; white-space:pre-line; overflow-wrap:anywhere; }
.health-overview-page .health-profile-sharing { display:flex; align-items:center; gap:7px; margin:0 0 8px; color:#176f61; font-size:12px; font-weight:700; }
.health-overview-page .health-access-note { display:flex; align-items:center; gap:8px; margin:0 0 12px; color:#62716f; font-size:12px; }
.health-overview-page .health-access-note i { color:#007e6e; }
.health-overview-page .health-record-date { color:#687873; font-size:12px; }
.health-overview-page .health-empty { margin:10px 0; color:#64736f; font-size:13px; }
.health-history-filters { margin:0 0 12px; padding:12px; border:1px solid #e8e3d8; border-radius:12px; background:#fff; }
.health-history-filter-main { display:grid; grid-template-columns:minmax(220px,1fr) minmax(150px,210px) auto auto; align-items:center; gap:8px; }
.health-history-filters .form-control { min-width:0; min-height:44px; }
.health-history-clear { display:inline-flex; min-height:44px; align-items:center; padding:0 8px; color:#007e6e!important; font-size:12px; font-weight:700; white-space:nowrap; }
.health-history-more-filters { margin-top:8px; border-top:1px solid #eee9df; }
.health-history-more-filters summary { display:flex; min-height:42px; align-items:center; justify-content:space-between; color:#176f61; cursor:pointer; font-size:12px; font-weight:700; list-style:none; }
.health-history-more-filters summary::-webkit-details-marker { display:none; }
.health-history-more-filters[open] summary span { transform:rotate(180deg); }
.health-history-filter-extra { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; align-items:end; gap:10px; padding:4px 0 2px; }
.health-history-filter-extra label { min-width:0; margin:0; color:#53635f; font-size:12px; font-weight:700; }
.health-history-filter-extra .form-control { display:block; margin-top:5px; }
.health-history-list { display:grid; }
.health-history-item { display:grid; grid-template-columns:132px 116px minmax(0,1.2fr) minmax(120px,.8fr); align-items:center; gap:8px 14px; min-height:70px; padding:12px 4px; border-top:1px solid #eee9df; color:#26383f!important; text-decoration:none!important; }
.health-history-item:hover { background:#fbfaf5; }
.health-history-item:hover strong,.health-history-item:focus-visible strong { text-decoration:underline; }
.health-history-item strong { overflow-wrap:anywhere; font-size:14px; }
.health-history-main { display:grid; min-width:0; gap:4px; }
.health-history-main>span,.health-history-meta { color:#64736f; font-size:12px; overflow-wrap:anywhere; }
.health-history-kind { width:max-content; padding:5px 9px; border-radius:999px; background:#e4f2ed; color:#176f61; font-size:11px; font-weight:750; }
.health-history-meta { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px 12px; }
.health-history-meta small { font-size:12px; }
.health-pagination-summary { margin-top:12px; color:#687873; font-size:12px; text-align:right; }
@media(max-width:767.98px) {
    .health-overview-page .health-heading { align-items:stretch; flex-direction:column; }
    .health-overview-page .health-heading h1 { font-size:24px; }
    .health-overview-page .health-member-picker { width:100%; }
    .health-overview-page .health-profile-facts { grid-template-columns:1fr; }
    .health-overview-page .health-section-heading { align-items:flex-start; flex-direction:column; }
    .health-overview-page .health-section-actions { width:100%; justify-content:flex-start; flex-wrap:wrap; }
    .health-overview-page .health-section-actions .health-button { width:100%; }
    .health-overview-page .health-profile-card,
    .health-overview-page .health-history-card { padding:14px; }
    .health-history-filter-main { grid-template-columns:minmax(0,1fr) auto; }
    .health-history-filter-main input[type="search"] { grid-column:1 / -1; }
    .health-history-clear { grid-column:1 / -1; justify-content:center; }
    .health-history-filter-extra { grid-template-columns:minmax(0,1fr); }
    .health-history-filter-extra .health-button { width:100%; }
    .health-history-item { grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:8px 10px; min-height:0; padding:14px 2px; }
    .health-history-item .health-history-main,
    .health-history-item .health-history-meta { grid-column:1 / -1; }
    .health-history-meta { justify-content:flex-start; }
    .health-pagination-summary { text-align:left; }
    .health-pagination { justify-content:center; }
}

.health-records-page,
.health-record-detail-page,
.health-form-page { max-width:1160px; margin:0 auto; color:#1d2b35; }
.health-back-link { display:inline-flex; min-height:44px; align-items:center; gap:8px; margin:0 0 10px; color:#246c5d!important; font-size:13px; font-weight:700; text-decoration:none!important; }
.health-back-link:hover { text-decoration:underline!important; }
.health-records-heading,
.health-record-detail-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:18px; }
.health-records-heading h1,
.health-record-detail-heading h1,
.health-form-heading h1 { margin:0; color:#17242e; font-size:28px; font-weight:750; }
.health-records-heading p,
.health-record-detail-heading p,
.health-form-heading p { margin:5px 0 0; color:#62716f; font-size:13px; }
.health-records-heading .btn,
.health-record-detail-heading .btn { min-height:44px; }
.health-records-context { margin:0 0 4px!important; color:#007e6e!important; font-size:12px!important; font-weight:700; }
.health-records-filters { margin:0 0 16px; padding:14px; border:1px solid #e2ddcf; border-radius:12px; background:#fffdf8; }
.health-records-filter-row { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.health-records-filter-controls { display:grid; grid-template-columns:minmax(200px,1.5fr) repeat(3,minmax(130px,1fr)) auto auto; align-items:center; gap:8px; width:100%; }
.health-records-filter-controls .form-control { min-width:0; min-height:44px; }
.health-my-records { display:inline-flex; min-height:44px; align-items:center; gap:9px; margin:0; color:#25383b; font-size:13px; font-weight:700; white-space:nowrap; }
.health-my-records input { width:18px; height:18px; accent-color:#007e6e; }
.health-clear-filters { color:#007e6e; font-size:12px; font-weight:700; white-space:nowrap; }
.health-records-table-wrap { border:1px solid #e2ddcf; border-radius:12px; background:#fffdf8; }
.health-records-table-wrap .table { margin:0; }
.health-records-table-wrap th { white-space:nowrap; }
.health-records-table-wrap td { vertical-align:middle; overflow-wrap:anywhere; }
.health-records-table-wrap td[data-mobile-actions="true"] .btn { margin:2px; }
.health-records-table-wrap .health-list-empty { padding:22px; color:#62716f; text-align:center; }
.health-pagination { display:flex; justify-content:flex-end; margin-top:14px; }
.health-record-detail-page .health-record-breadcrumbs { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 12px; padding:0; list-style:none; }
.health-record-detail-page .health-record-breadcrumbs li { display:inline-flex; min-height:40px; align-items:center; gap:8px; color:#62716f; font-size:13px; }
.health-record-detail-page .health-record-breadcrumbs li+li:before { content:"/"; color:#9aa49f; }
.health-record-detail-page .health-record-breadcrumbs a { display:inline-flex; min-height:40px; align-items:center; color:#246c5d; font-weight:700; text-decoration:none; }
.health-record-detail-page .health-record-breadcrumbs li[aria-current="page"] { color:#26383f; font-weight:700; }
.health-record-detail-page .health-record-breadcrumbs a:hover { text-decoration:underline; }
.health-record-detail-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.health-record-detail-actions form { display:inline-flex; margin:0; }
.health-record-detail-heading { align-items:center; }
.health-detail-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.health-record-detail-page .health-detail-card { min-width:0; overflow:hidden; border:1px solid #e2ddcf; border-radius:14px; background:#fffdf8; box-shadow:0 2px 5px rgba(42,54,48,.04); }
.health-record-detail-page .health-detail-card h2 { margin:0; padding:16px 18px; border-bottom:1px solid #e8e2d6; color:#17242e; font-size:16px; font-weight:750; }
.health-record-detail-page .health-detail-card-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-right:16px; }
.health-record-detail-page .health-detail-card-heading h2 { flex:1; }
.health-record-detail-page .health-detail-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; padding:8px 18px; }
.health-record-detail-page .health-detail-facts>div { min-width:0; padding:14px 4px; border-bottom:1px solid #eee9df; }
    .health-record-detail-page .health-detail-facts dt { margin-bottom:5px; color:#687873; font-size:12px; font-weight:750; letter-spacing:.04em; text-transform:uppercase; }
.health-record-detail-page .health-detail-facts dd { margin:0; color:#26383f; font-size:14px; line-height:1.55; white-space:pre-line; overflow-wrap:anywhere; }
.health-record-detail-page .health-detail-facts>div:nth-last-child(-n+2) { border-bottom:0; }
.health-attachment-list,
.health-linked-records { margin:0; padding:8px 18px; list-style:none; }
.health-attachment-list li,
.health-linked-records li { display:flex; min-width:0; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid #eee9df; }
.health-attachment-list li:last-child,
.health-linked-records li:last-child { border-bottom:0; }
.health-attachment-list li>a,
.health-linked-records li>a { min-width:0; color:#176f61; overflow-wrap:anywhere; }
.health-attachment-list li>i { color:#63736e; }
    .health-attachment-list li>span,
    .health-linked-records li>span { margin-left:auto; color:#687873; font-size:12px; white-space:nowrap; }
.health-access-card { padding-bottom:14px; }
.health-access-card p { margin:12px 18px 0; color:#62716f; font-size:13px; }
.health-access-badge { display:inline-flex; flex:0 0 auto; align-items:center; gap:6px; padding:6px 9px; border-radius:20px; background:#e7f2ec; color:#176f61; font-size:11px; font-weight:700; }
.health-detail-card .health-empty { margin:0; padding:16px 18px; color:#62716f; font-size:13px; }
.health-form-heading { margin:0 0 16px; }
.health-form-shell { overflow:visible; border:1px solid #dce7e2; border-radius:12px; background:#fffdf8; }
.health-form-shell>.card-body { padding:20px; }
.health-record-form .record-form-section-title { color:#203238; }
.health-record-form .card-header { background:#fbfaf5; }
.health-existing-attachments { display:flex; flex-direction:column; gap:8px; }
.health-existing-attachments .form-label { font-weight:700; }
.health-existing-attachments a { display:inline-flex; min-height:40px; align-items:center; gap:8px; color:#176f61; overflow-wrap:anywhere; }
@media(max-width:767.98px) {
    .health-records-heading,
    .health-record-detail-heading { align-items:stretch; flex-direction:column; }
    .health-records-heading h1,
    .health-record-detail-heading h1,
    .health-form-heading h1 { font-size:24px; }
    .health-records-heading>.btn { width:100%; }
    .health-records-filter-row { align-items:stretch; flex-direction:column; }
    .health-records-filter-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .health-records-filter-controls input[type="search"] { grid-column:1/-1; }
    .health-records-filter-controls .btn { grid-column:1; }
    .health-clear-filters { align-self:center; }
    .health-record-detail-actions { justify-content:stretch; }
    .health-record-detail-actions .btn,
    .health-record-detail-actions form { flex:1; }
    .health-record-detail-actions form .btn { width:100%; }
    .health-detail-layout { grid-template-columns:1fr; }
    .health-record-detail-page .health-detail-facts { grid-template-columns:1fr; padding:2px 14px; }
    .health-record-detail-page .health-detail-facts>div,
    .health-record-detail-page .health-detail-facts>div:nth-last-child(-n+2) { border-bottom:1px solid #eee9df; }
    .health-record-detail-page .health-detail-facts>div:last-child { border-bottom:0; }
    .health-form-shell>.card-body { padding:14px; }
    .health-attachment-list li,
    .health-linked-records li { flex-wrap:wrap; }
    .health-records-table-wrap td[data-label]::before { font-size:12px; }
    .health-records-table-wrap td[data-mobile-actions="true"] .btn { min-height:44px; }
}

@media(min-width:768px) and (max-width:991.98px) {
    .health-records-filter-row { align-items:stretch; flex-direction:column; }
    .health-records-filter-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .health-records-filter-controls input[type="search"] { grid-column:1/-1; }
}

/* Guest authentication screens */
body.auth-page-refresh {
    display: block;
    min-width: 320px;
    margin: 0;
    background: #f6f4eb;
    color: #17242e;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-viewport,
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-viewport {
    width: 100%;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 36px 20px 20px;
}

.auth-frame {
    width: 100%;
    max-width: 456px;
    padding: 30px 32px 24px;
    border: 1px solid #e2ded2;
    border-radius: 18px;
    background: #fffefa;
    box-shadow: 0 2px 5px rgba(36, 48, 40, .08);
}

.auth-brand {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
    text-align: center;
}

.auth-brand-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 13px;
    background: transparent;
    font-size: 22px;
}

.auth-brand-copy {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 3px;
}

.auth-brand-name {
    color: #17242e;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.auth-brand-context {
    color: #596970;
    font-size: 14px;
}

.auth-card {
    color: #17242e;
}

.auth-heading {
    margin-bottom: 22px;
}

.auth-heading h1 {
    margin: 0;
    color: #17242e;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.25;
}

.auth-heading p {
    margin: 8px 0 0;
    color: #53636b;
    font-size: 15px;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.auth-field label,
.auth-label-row label {
    margin: 0;
    color: #17242e;
    font-size: 14px;
    font-weight: 600;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-label-row a,
.auth-switch-link a,
.auth-otp-actions a,
.auth-link-button {
    color: #007a63;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.auth-label-row a:hover,
.auth-switch-link a:hover,
.auth-otp-actions a:hover,
.auth-link-button:hover {
    color: #005f4d;
    text-decoration: underline;
}

.auth-control {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #dcd7ca;
    border-radius: 8px;
    outline: none;
    background: #fffefa;
    color: #17242e;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    box-shadow: none;
}

.auth-control:focus {
    border-color: #168a72;
    box-shadow: 0 0 0 3px rgba(0, 134, 107, .15);
}

.auth-control.is-invalid {
    border-color: #b53e3e;
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap .auth-control {
    padding-right: 54px;
}

.auth-password-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #52636c;
    cursor: pointer;
    font-size: 16px;
}

.auth-checkbox {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    margin: -4px 0 0;
    color: #53636b;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

.auth-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #00866b;
}

.auth-primary-button {
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid #00866b;
    border-radius: 8px;
    background: #00866b;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    transition: background-color .16s ease, border-color .16s ease;
}

.auth-primary-button:hover {
    border-color: #006d58;
    background: #006d58;
}

.auth-switch-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 14px 0 0;
    color: #53636b;
    font-size: 14px;
    text-align: center;
}

.auth-switch-link a,
.auth-otp-actions a,
.auth-link-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
}

.auth-otp-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 8px;
}

.auth-otp-actions form {
    margin: 0;
}

.auth-link-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.auth-otp-control {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 20px;
    letter-spacing: .45em;
    text-align: center;
}

.auth-alert {
    margin: 0 0 18px;
    padding: 11px 12px;
    border: 1px solid #d9e5df;
    border-radius: 8px;
    background: #f2f8f4;
    color: #285c4b;
    font-size: 14px;
    line-height: 1.5;
}

.auth-alert-error,
.auth-field-error {
    border-color: #e5c5c2;
    background: #fff5f3;
    color: #9a302a;
}

.auth-field-error {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.auth-security-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e6e1d6;
    color: #53636b;
    font-size: 13px;
    line-height: 1.5;
}

.auth-security-note i {
    margin-top: 2px;
    color: #00866b;
    font-size: 17px;
}

.auth-security-note p {
    margin: 0;
}

.auth-footer {
    margin-top: 18px;
    color: #65747a;
    font-size: 12px;
    text-align: center;
}

.auth-page-refresh :focus-visible {
    outline: 3px solid rgba(0, 126, 110, .38);
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    .auth-page {
        justify-content: flex-start;
        padding: max(24px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    }

    .auth-frame {
        max-width: 456px;
        padding: 12px 0 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .auth-brand {
        margin-bottom: 22px;
    }

    .auth-card {
        padding: 24px 20px;
        border: 1px solid #e2ded2;
        border-radius: 16px;
        background: #fffefa;
        box-shadow: 0 2px 5px rgba(36, 48, 40, .08);
    }

    .auth-heading h1 {
        font-size: 24px;
    }

    .auth-footer {
        max-width: 340px;
        margin-top: 18px;
    }
}

@media (min-width: 576px) and (max-height: 700px) {
    .auth-page {
        justify-content: flex-start;
        padding-top: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page-refresh *,
    .auth-page-refresh *::before,
    .auth-page-refresh *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

.access-settings-contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.access-settings-contact-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.crm-page-refresh .c-main .btn.access-settings-contact-remove {
    min-height: 44px;
    white-space: nowrap;
}
