/**
 *
 * You can write your CSS code here, DO NOT touch the default JavaScript file
 * because it will make it harder for you to update.
 *
 */

/*# sourceMappingURL=custom.css.map */
@font-face {
    font-family: Helvetica;
    src: url(../fonts/Helvetica.ttf);
}

/* Shared page heading ----------------------------------------------------- */
.app-header-title {
    min-width: 0;
}

.app-page-heading {
    position: relative;
    width: min(100%, 560px);
    padding: 16px 22px 17px 25px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.28));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 12px 30px rgba(16, 25, 54, 0.09);
    backdrop-filter: blur(4px) saturate(125%);
    -webkit-backdrop-filter: blur(4px) saturate(125%);
}

.app-page-heading::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 0;
    width: 5px;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(180deg, #ed1c24 0 34%, #f4c027 34% 66%, #1a4798 66% 100%);
}

.app-page-heading-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    color: #1a4798;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.115em;
    line-height: 1.3;
    text-transform: uppercase;
}

.app-page-heading-mark {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #ed1c24;
    box-shadow: 11px 0 0 #f4c027, 22px 0 0 #1a4798;
    margin-right: 22px;
}

.app-page-heading-title {
    max-width: 100%;
    line-height: 1.14;
}

#main-header-web .app-page-heading-title #pageTitle {
    display: block;
    color: #101936 !important;
    font-size: clamp(1.65rem, 2vw, 2.15rem) !important;
    font-weight: 800;
    letter-spacing: -0.035em;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.42);
    text-wrap: balance;
}

.app-page-heading-subtitle {
    max-width: 510px;
    margin-top: 7px;
    color: #56617d;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.45;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.46);
    text-wrap: pretty;
}

html[data-bs-theme="dark"] .app-page-heading {
    border-color: rgba(188, 211, 255, 0.28);
    background: linear-gradient(135deg, rgba(24, 34, 53, 0.62), rgba(24, 34, 53, 0.34));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 14px 34px rgba(0, 0, 0, 0.22);
}

html[data-bs-theme="dark"] .app-page-heading-eyebrow {
    color: #8db9ff;
}

html[data-bs-theme="dark"] #main-header-web .app-page-heading-title #pageTitle {
    color: #f8fafc !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
}

html[data-bs-theme="dark"] .app-page-heading-subtitle {
    color: #c1cada;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
}

@media (min-width: 992px) {
    body[data-kt-sticky-header="on"] #main-header-web .app-page-heading {
        padding: 0;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    body[data-kt-sticky-header="on"] #main-header-web .app-page-heading::before,
    body[data-kt-sticky-header="on"] #main-header-web .app-page-heading-eyebrow {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .app-header-title {
        padding-right: 72px !important;
        padding-left: 72px !important;
    }

    .app-page-heading {
        width: 100%;
        padding: 13px 16px 14px 19px;
        border-radius: 15px;
        text-align: left;
    }

    .app-page-heading::before {
        top: 11px;
        bottom: 11px;
        width: 4px;
    }

    .app-page-heading-eyebrow {
        margin-bottom: 4px;
        font-size: 0.57rem;
        letter-spacing: 0.075em;
    }

    #main-header-web .app-page-heading-title #pageTitle {
        font-size: clamp(1.25rem, 5.5vw, 1.55rem) !important;
        line-height: 1.15;
        text-align: left;
    }

    .app-page-heading-subtitle {
        margin-top: 5px;
        color: #56617d !important;
        font-size: 0.78rem !important;
        line-height: 1.35;
        text-align: left;
    }

    html[data-bs-theme="dark"] .app-page-heading-subtitle {
        color: #c1cada !important;
    }
}

@font-face {
    font-family: Inter;
    src: url(../fonts/Futura.ttf);
}

@font-face {
    font-family: Poppins;
    src: url(../fonts/poppins.ttf);
    font-display: swap;
}

body {
    font-family: Poppins;
}

/* Keep the header artwork declarative so sticky-header initialization and
   page navigation cannot remove a background that was added only by JS. */
#main-header-web.header {
    background: var(--dcs-bg-primary, #f5f7fb) url("../images/banner-light.png") no-repeat center center / 100% 100%;
}

[data-bs-theme="dark"] #main-header-web.header {
    background-image: url("../images/banner-dark.svg");
    background-color: var(--dcs-bg-primary, #0f172a);
}

[data-bs-theme="light"] #main-header-web.header #pageTitle {
    color: #000 !important;
}

[data-bs-theme="dark"] #main-header-web.header #pageTitle {
    color: #fff !important;
}

body.page-loader-active {
    cursor: wait;
}

.app-page-loader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.app-page-loader.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app-page-loader__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 280px);
}

.app-page-loader__logo {
    width: 128px;
    max-width: 32vw;
    height: auto;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

.app-page-loader__bar {
    position: relative;
    width: clamp(64px, 12vw, 100px);
    height: 6px;
    margin-top: 1.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--bs-gray-200, #e9ecef);
}

.app-page-loader__bar span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -45%;
    width: 45%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ed1c24 0%, #f4c027 48%, #1A4798 100%);
    animation: app-page-loader-bar 1.05s ease-in-out infinite;
}

@keyframes app-page-loader-bar {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(320%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-page-loader,
    .app-page-loader__bar span {
        transition: none;
        animation: none;
    }

    .app-page-loader__bar span {
        left: 0;
        width: 100%;
    }
}

html,
body {
    max-width: 100%;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.page,
.wrapper,
.content,
.container,
.container-fluid,
.container-xxl,
.row,
.card,
.card-body,
.card-header,
.modal-content,
.tab-content,
.tab-pane {
    min-width: 0;
}

.form-control,
.form-select,
.input-group,
.select2-container {
    max-width: 100%;
}

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

.btn,
.menu-link,
.nav-link,
.badge,
.form-label,
.text-muted,
.fw-semibold,
.fw-bold {
    overflow-wrap: anywhere;
}

.create-user-form {
    width: 100%;
}

.create-user-modal {
    border: 0;
    border-radius: 8px;
}

.create-user-modal .modal-header,
.create-user-modal .modal-body,
.create-user-modal .modal-footer {
    padding-right: 1.75rem;
    padding-left: 1.75rem;
}

.create-user-modal .modal-header {
    align-items: flex-start;
}

.create-user-modal .modal-body {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.create-user-modal .modal-footer {
    gap: 0.75rem;
    padding-top: 1rem;
    padding-bottom: 1.25rem;
}

.create-user-form .form-label {
    margin-bottom: 0.55rem;
    color: var(--bs-gray-700);
    font-size: 0.95rem;
    font-weight: 600;
}

.create-user-form .form-control,
.create-user-form .form-select {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border-color: var(--bs-gray-300);
    border-radius: 8px;
    color: var(--bs-gray-800);
    background-color: var(--bs-body-bg);
}

.create-user-form .form-control:focus,
.create-user-form .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(26, 71, 152, 0.12);
}

@media (max-width: 575.98px) {
    .create-user-modal .modal-header,
    .create-user-modal .modal-body,
    .create-user-modal .modal-footer {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .create-user-modal .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .create-user-modal .modal-footer .btn {
        width: 100%;
    }

}

/* Shared application theme ------------------------------------------------- */
:root {
    --dcs-bg-primary: #f5f7fb;
    --dcs-bg-card: #ffffff;
    --dcs-bg-dropdown: #ffffff;
    --dcs-text-primary: #101936;
    --dcs-text-secondary: #737b98;
    --dcs-border-color: #e5e9f0;
    --dcs-input-bg: #ffffff;
    --dcs-hover-bg: #f4f7fb;
    --dcs-unread-bg: #edf6ff;
    --dcs-shadow-color: rgba(15, 23, 42, 0.08);
}

html[data-bs-theme="dark"] {
    --dcs-bg-primary: #0f172a;
    --dcs-bg-card: #182235;
    --dcs-bg-dropdown: #182235;
    --dcs-text-primary: #f8fafc;
    --dcs-text-secondary: #aab4c8;
    --dcs-border-color: #2c384d;
    --dcs-input-bg: #111c2e;
    --dcs-hover-bg: #223049;
    --dcs-unread-bg: #1d3553;
    --dcs-shadow-color: rgba(0, 0, 0, 0.25);
}

body,
.page,
.wrapper,
.content {
    color: var(--dcs-text-primary);
    background-color: var(--dcs-bg-primary);
}

/* Short patient screens should use the available application height instead
   of leaving a large inactive strip below their only card. */
@media (min-width: 992px) {
    .viewport-fill-content {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
    }

    .viewport-fill-content > .card,
    .viewport-fill-content > form {
        flex: 1 1 auto;
        margin-bottom: 0 !important;
    }

    .viewport-fill-content > form {
        display: flex;
        flex-direction: column;
    }

    .viewport-fill-content > form > .card {
        flex: 1 1 auto;
        margin-bottom: 0 !important;
    }
}

body,
.page,
.wrapper,
.content,
.card,
.menu-sub-dropdown,
.modal-content,
.form-control,
.form-select,
.btn,
.table,
.app-page-loader,
.swal2-popup {
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#main-header-web.header {
    background: var(--dcs-bg-primary) url("../images/banner-light.png") no-repeat center center / 100% 100%;
}

html[data-bs-theme="dark"] #main-header-web.header {
    background-color: var(--dcs-bg-primary);
    background-image: url("../images/banner-dark.svg");
}

html[data-bs-theme="light"] #main-header-web.header #pageTitle {
    color: #101936 !important;
}

html[data-bs-theme="dark"] #main-header-web.header #pageTitle {
    color: #ffffff !important;
}

.theme-toggle-row {
    cursor: pointer;
    user-select: none;
}

.theme-toggle-row .form-check-input {
    width: 2.65rem;
    height: 1.4rem;
    cursor: pointer;
}

.theme-icon-dark,
html[data-bs-theme="dark"] .theme-icon-light {
    display: none;
}

html[data-bs-theme="dark"] .theme-icon-dark {
    display: inline-block;
    color: #8db9ff;
}

html[data-bs-theme="dark"] body,
html[data-bs-theme="dark"] .page,
html[data-bs-theme="dark"] .wrapper,
html[data-bs-theme="dark"] .content {
    color: var(--dcs-text-primary);
    background-color: var(--dcs-bg-primary) !important;
}

html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .offcanvas,
html[data-bs-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] .menu-sub-dropdown,
html[data-bs-theme="dark"] .accordion-item,
html[data-bs-theme="dark"] .list-group-item,
html[data-bs-theme="dark"] .dt-container,
html[data-bs-theme="dark"] .dataTables_wrapper {
    color: var(--dcs-text-primary);
    background-color: var(--dcs-bg-card);
    border-color: var(--dcs-border-color);
    box-shadow: 0 0.5rem 1.5rem var(--dcs-shadow-color);
}

html[data-bs-theme="dark"] .menu-sub-dropdown,
html[data-bs-theme="dark"] .profile-dropdown-panel {
    background-color: var(--dcs-bg-dropdown) !important;
    border: 1px solid var(--dcs-border-color);
}

html[data-bs-theme="dark"] .card-header,
html[data-bs-theme="dark"] .card-footer,
html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-footer,
html[data-bs-theme="dark"] .separator,
html[data-bs-theme="dark"] hr {
    border-color: var(--dcs-border-color) !important;
}

html[data-bs-theme="dark"] .menu-link,
html[data-bs-theme="dark"] .menu-title,
html[data-bs-theme="dark"] .menu-section,
html[data-bs-theme="dark"] .card-title,
html[data-bs-theme="dark"] .modal-title,
html[data-bs-theme="dark"] label,
html[data-bs-theme="dark"] legend,
html[data-bs-theme="dark"] .text-gray-700,
html[data-bs-theme="dark"] .text-gray-800,
html[data-bs-theme="dark"] .text-gray-900 {
    color: var(--dcs-text-primary) !important;
}

html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .text-gray-400,
html[data-bs-theme="dark"] .text-gray-500,
html[data-bs-theme="dark"] .text-gray-600,
html[data-bs-theme="dark"] .form-text,
html[data-bs-theme="dark"] .dt-info,
html[data-bs-theme="dark"] .dataTables_info,
html[data-bs-theme="dark"] .trainee-feed-message,
html[data-bs-theme="dark"] .trainee-feed-time {
    color: var(--dcs-text-secondary) !important;
}

html[data-bs-theme="dark"] .menu-sub-dropdown .menu-link:hover,
html[data-bs-theme="dark"] .menu-sub-dropdown .menu-link:focus,
html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus,
html[data-bs-theme="dark"] .trainee-feed-item:hover,
html[data-bs-theme="dark"] .trainee-feed-item:focus,
html[data-bs-theme="dark"] .announcement-item:hover,
html[data-bs-theme="dark"] .announcement-item:focus,
html[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    color: var(--dcs-text-primary);
    background-color: var(--dcs-hover-bg) !important;
}

html[data-bs-theme="dark"] .trainee-feed-item.is-unread,
html[data-bs-theme="dark"] .announcement-item.bg-light-primary,
html[data-bs-theme="dark"] .trainee-announcement-row.is-unread {
    color: var(--dcs-text-primary);
    background-color: var(--dcs-unread-bg) !important;
    border-color: #355983 !important;
}

html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .form-check-input,
html[data-bs-theme="dark"] .input-group-text,
html[data-bs-theme="dark"] .select2-selection,
html[data-bs-theme="dark"] .select2-dropdown,
html[data-bs-theme="dark"] .dt-input,
html[data-bs-theme="dark"] .dataTables_filter input,
html[data-bs-theme="dark"] .dataTables_length select {
    color: var(--dcs-text-primary) !important;
    background-color: var(--dcs-input-bg) !important;
    border-color: var(--dcs-border-color) !important;
}

html[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--dcs-text-secondary);
    opacity: 0.8;
}

html[data-bs-theme="dark"] .form-control:disabled,
html[data-bs-theme="dark"] .form-select:disabled {
    color: #7f8ca3 !important;
    background-color: #162033 !important;
}

html[data-bs-theme="dark"] .table,
html[data-bs-theme="dark"] table.dataTable {
    --bs-table-color: var(--dcs-text-primary);
    --bs-table-bg: var(--dcs-bg-card);
    --bs-table-border-color: var(--dcs-border-color);
    --bs-table-hover-color: var(--dcs-text-primary);
    --bs-table-hover-bg: var(--dcs-hover-bg);
    color: var(--dcs-text-primary) !important;
    background-color: var(--dcs-bg-card) !important;
    border-color: var(--dcs-border-color) !important;
}

html[data-bs-theme="dark"] .table > :not(caption) > * > *,
html[data-bs-theme="dark"] table.dataTable > :not(caption) > * > * {
    color: inherit;
    background-color: inherit;
    border-bottom-color: var(--dcs-border-color) !important;
    box-shadow: none;
}

html[data-bs-theme="dark"] .pagination .page-link,
html[data-bs-theme="dark"] .dt-paging-button {
    color: var(--dcs-text-secondary) !important;
    background-color: var(--dcs-input-bg) !important;
    border-color: var(--dcs-border-color) !important;
}

html[data-bs-theme="dark"] .pagination .active > .page-link,
html[data-bs-theme="dark"] .dt-paging-button.current {
    color: #ffffff !important;
    background-color: var(--bs-primary) !important;
}

html[data-bs-theme="dark"] .aside,
html[data-bs-theme="dark"] .aside-logo,
html[data-bs-theme="dark"] .aside-menu,
html[data-bs-theme="dark"] .aside-footer,
html[data-bs-theme="dark"] .mobile-navigation-panel {
    background-color: #111c2e !important;
    border-color: var(--dcs-border-color) !important;
}

html[data-bs-theme="dark"] .detail-field,
html[data-bs-theme="dark"] .bg-light,
html[data-bs-theme="dark"] .bg-light-secondary,
html[data-bs-theme="dark"] .bg-gray-100 {
    color: var(--dcs-text-primary) !important;
    background-color: var(--dcs-hover-bg) !important;
}

html[data-bs-theme="dark"] .app-page-loader {
    background: rgba(15, 23, 42, 0.9);
}

html[data-bs-theme="dark"] .swal2-popup {
    color: var(--dcs-text-primary);
    background: var(--dcs-bg-card);
    border: 1px solid var(--dcs-border-color);
    box-shadow: 0 1rem 3rem var(--dcs-shadow-color);
}

html[data-bs-theme="dark"] .swal2-title,
html[data-bs-theme="dark"] .swal2-html-container {
    color: var(--dcs-text-primary);
}

html[data-bs-theme="dark"] .swal2-input,
html[data-bs-theme="dark"] .swal2-select,
html[data-bs-theme="dark"] .swal2-textarea {
    color: var(--dcs-text-primary);
    background: var(--dcs-input-bg);
    border-color: var(--dcs-border-color);
}

html[data-bs-theme="dark"] a:not(.btn):not(.menu-link) {
    text-underline-offset: 0.15em;
}

html[data-bs-theme="dark"] img,
html[data-bs-theme="dark"] svg,
html[data-bs-theme="dark"] .logo {
    filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
    body,
    .page,
    .wrapper,
    .content,
    .card,
    .menu-sub-dropdown,
    .modal-content,
    .form-control,
    .form-select,
    .btn,
    .table,
    .app-page-loader,
    .swal2-popup {
        transition: none !important;
    }
}

.patient-barangay-select-wrap {
    position: relative;
}

.patient-barangay-trigger {
    display: flex;
    align-items: center;
    height: 48px;
    min-height: 0;
    line-height: 1.5;
    color: var(--bs-gray-800);
}

.patient-barangay-trigger span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-barangay-menu {
    position: fixed;
    top: var(--barangay-menu-top, 0);
    left: var(--barangay-menu-left, 0);
    width: var(--barangay-menu-width, 320px);
    z-index: 1055;
    padding: 0.75rem;
    overflow-y: clip;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    background: var(--bs-body-bg);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.patient-barangay-search {
    margin-bottom: 0.5rem;
}

.patient-barangay-options {
    max-height: 280px;
    overflow-y: auto;
}

.patient-barangay-option {
    display: block;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 0;
    border-radius: 0.5rem;
    color: var(--bs-gray-800);
    background: transparent;
    font: inherit;
    text-align: left;
}

.patient-barangay-option:hover,
.patient-barangay-option:focus,
.patient-barangay-option[aria-selected="true"] {
    color: var(--bs-primary);
    background: var(--bs-primary-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.swal2-popup {
    font-family: 'Poppins', sans-serif !important;
}

:root, [data-bs-theme="light"] {
    --bs-blue: #1A4798;
    --bs-red: #ed1c24;
    --bs-yellow: #f4c027;
}

.card.multicolor-border {
    position: relative;
    --red-end: 30%;
    --yellow-end: 50%;
}

.card.multicolor-border::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 8px; /* border thickness */
    background: linear-gradient(
        to right,
        #dc3545 0%,
        #dc3545 var(--red-end),
        #ffc107 var(--red-end),
        #ffc107 var(--yellow-end),
        #0d6efd var(--yellow-end),
        #0d6efd 100%
    );
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    transition: width 0.2s ease-in-out;
}

.card.multicolor-border:hover::before {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(17, 24, 39, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mobile-nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1041;
    display: flex;
    flex-direction: column;
    width: min(88vw, 340px);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding: 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    background: var(--bs-body-bg);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    transform: translateX(-105%);
    transition: transform 0.24s ease;
}

.mobile-nav-drawer.is-open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.mobile-nav-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 0.75rem;
    color: var(--bs-gray-900);
    font-weight: 700;
}

.mobile-nav-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex: 0 0 auto;
}

.mobile-nav-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    color: var(--bs-gray-700);
    background: var(--bs-gray-100);
}

.mobile-nav-list {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.25rem 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-height: 52px;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 0;
    border-radius: 8px;
    color: var(--bs-gray-800);
    background: transparent;
    font-weight: 600;
    text-align: left;
}

.mobile-nav-item i {
    width: 22px;
    color: var(--bs-primary);
    font-size: 1.1rem;
    text-align: center;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus,
.mobile-nav-item.active {
    color: var(--bs-primary);
    background: var(--bs-primary-light);
}

.mobile-nav-logout {
    flex: 0 0 auto;
    padding-top: 1rem;
    border-top: 1px solid var(--bs-border-color);
}

.mobile-nav-button {
    color: var(--bs-danger);
}

.mobile-nav-button i {
    color: var(--bs-danger);
}

.dropdown-logout-link {
    background: transparent;
}

.dropdown-logout-link:hover,
.dropdown-logout-link:focus {
    color: var(--bs-danger) !important;
    background: var(--bs-danger-light) !important;
}

.dropdown-logout-link:hover i,
.dropdown-logout-link:focus i,
.dropdown-logout-link:hover .menu-title,
.dropdown-logout-link:focus .menu-title {
    color: var(--bs-danger) !important;
}

body.mobile-nav-open {
    overflow: hidden;
}

.menu-sub-dropdown {
    max-width: calc(100vw - 1.5rem);
    overflow-wrap: anywhere;
}

.menu-sub-dropdown .menu-content,
.menu-sub-dropdown .menu-link,
.menu-sub-dropdown .menu-title {
    min-width: 0;
}

/* Audit tables keep short values legible; Responsive moves secondary fields
   into expandable rows when their minimum widths no longer fit. */
.log-page-card {
    container: log-card / inline-size;
}

.log-page-card .card-header,
.log-page-card form > .d-flex {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.log-page-card .dataTables_wrapper .row {
    margin-right: 0;
    margin-left: 0;
}

.log-page-card .dataTables_wrapper .row > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

.log-page-card .log-table thead th {
    white-space: nowrap !important;
    word-break: normal;
    overflow-wrap: normal;
}

.log-table tbody td {
    vertical-align: top;
    line-height: 1.6;
    padding-top: 1rem;
    padding-bottom: 1rem;
    word-break: normal;
    overflow-wrap: normal;
}

/* Reserve the expand control's space before Responsive measures columns. */
.log-table > thead > tr > th:first-child,
.log-table > tbody > tr:not(.child) > td:first-child {
    padding-left: 30px !important;
}

.log-table .log-date {
    min-width: 10rem;
    width: 10rem;
}

.log-table .log-user,
.log-table .log-subject {
    min-width: 10rem;
    max-width: 14rem;
    overflow-wrap: anywhere;
}

.log-table .log-label {
    min-width: 9rem;
    overflow-wrap: anywhere;
}

.log-table .log-duration {
    min-width: 8rem;
    white-space: nowrap;
}

.log-table .log-ip {
    min-width: 11rem;
    max-width: 14rem;
    overflow-wrap: anywhere;
}

.log-table .log-description,
.log-table .log-details {
    min-width: 16rem;
    max-width: 24rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.log-table > tbody > tr.child ul.dtr-details {
    display: block;
    width: 100%;
}

.log-table > tbody > tr.child ul.dtr-details > li {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 0.5rem 1rem;
    padding: 0.75rem 0;
}

.log-table > tbody > tr.child .dtr-title,
.log-table > tbody > tr.child .dtr-data {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

@container log-card (max-width: 36rem) {
    .log-page-card .card-body,
    .log-page-card .card-header {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .log-table .log-user {
        min-width: 7rem;
        max-width: 9rem;
    }

    .log-table > tbody > tr.child ul.dtr-details > li {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.25rem;
    }

    .log-page-card .dt-search {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
}

.session-logs-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.session-logs-filters > div {
    min-width: 0;
}

.session-logs-filter-actions {
    grid-column: 1 / -1;
}

.session-logs-notice {
    line-height: 1.6;
}

.session-logs-notice i {
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.session-logs-hint {
    display: none;
}

.session-logs-card:has(.session-logs-table.collapsed) .session-logs-hint {
    display: block;
}

.session-logs-table .session-log-date,
.session-logs-table .session-log-time {
    display: block;
    white-space: nowrap;
}

.session-logs-table .log-date {
    min-width: 10rem;
    width: 10rem;
}

.session-logs-table .log-user {
    width: 12rem;
}

.session-logs-table .log-details {
    width: 20rem;
    max-width: 20rem;
}

.session-logs-table > tbody > tr.child ul.dtr-details > li {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.session-logs-card .data-table-toolbar {
    padding-bottom: 1rem;
}

.session-logs-card .dt-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.session-logs-card .dt-search input {
    min-width: 0;
    margin-left: 0;
}

@container log-card (min-width: 80rem) {
    .session-logs-filters {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@container log-card (max-width: 36rem) {
    .session-logs-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .session-logs-filter-actions > .btn {
        flex: 1 1 auto;
    }

    .session-logs-card .dt-search {
        align-items: stretch;
        width: 100%;
        text-align: left;
    }

    .session-logs-card .dt-search input {
        width: 100% !important;
    }

    .session-logs-table .log-user {
        min-width: 11rem;
        width: 11rem;
    }
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper {
    width: 100%;
    min-width: 0;
}

.dataTables_wrapper .dt-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dataTables_wrapper .dt-button {
    margin: 0 !important;
    white-space: normal;
}

.dataTables_wrapper .data-table-actions {
    min-width: 0;
}

/* Keep the adjacent patient age and creator columns visually distinct. */
.data-table th.patient-age-column,
.data-table td.patient-age-column {
    padding-right: 1.5rem !important;
}

.data-table th.patient-created-by-column,
.data-table td.patient-created-by-column {
    min-width: 12rem;
    padding-left: 4rem !important;
}

@media (max-width: 767.98px) {
    .data-table th.patient-created-by-column,
    .data-table td.patient-created-by-column {
        min-width: 8rem;
        padding-left: 0.75rem !important;
    }

    .data-table th.patient-age-column,
    .data-table td.patient-age-column {
        padding-right: 0.75rem !important;
    }

    .data-table th.patient-number-column,
    .data-table td.patient-number-column {
        min-width: 6.5rem;
    }

    .data-table th.patient-name-column,
    .data-table td.patient-name-column {
        min-width: 8rem;
    }
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dt-search {
    min-width: min(100%, 18rem);
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dt-search label {
    width: 100%;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dt-search input {
    max-width: 100%;
}

.card .card-header {
    gap: 1rem;
}

.card .card-header > div {
    min-width: 0;
}

.card .card-header h1,
.card .card-header h2,
.card .card-header h3,
.card .card-header h4,
.card .card-header h5,
.card .card-header h6,
.card .card-header span,
.card .card-header p {
    overflow-wrap: anywhere;
}

.bg-light.rounded-4,
.border.rounded,
.border.rounded-4 {
    min-width: 0;
}

.bg-light.rounded-4 h1,
.bg-light.rounded-4 h2,
.bg-light.rounded-4 h3,
.bg-light.rounded-4 h4,
.bg-light.rounded-4 h5,
.bg-light.rounded-4 h6,
.bg-light.rounded-4 div,
.bg-light.rounded-4 span {
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .aside {
        display: none !important;
    }

    .wrapper,
    .content,
    .header,
    #main-header-web {
        margin-left: 0 !important;
        padding-left: 0 !important;
        left: 0 !important;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .app-header-container {
        display: grid !important;
        grid-template-columns: 52px minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .app-header-title {
        grid-column: 2;
        width: auto;
        flex: none;
        min-width: 0;
        max-width: none;
        margin-right: 0 !important;
        order: initial;
    }

    .app-header-title h1,
    .app-header-title #pageTitle,
    .app-header-title small {
        max-width: 100%;
    }

    .app-header-title #pageTitle {
        display: block;
        overflow-wrap: anywhere;
        line-height: 1.15;
        font-size: 1.35rem !important;
    }

    .app-header-title small {
        display: block;
        line-height: 1.35;
    }

    .app-header-actions {
        grid-column: 3;
        order: initial;
        flex: 0 0 auto;
        margin-left: 0;
        flex-wrap: nowrap !important;
    }

    .mobile-menu-toggle {
        grid-column: 1;
        order: initial;
    }

    #main-header-web .mobile-menu-toggle,
    #main-header-web .app-header-actions .btn.btn-icon {
        width: 52px !important;
        min-width: 52px !important;
        height: 52px !important;
        min-height: 52px !important;
        flex: 0 0 52px !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0.875rem;
    }

    #main-header-web .mobile-menu-toggle i,
    #main-header-web .app-header-actions .btn.btn-icon i {
        font-size: 1.35rem !important;
        line-height: 1 !important;
    }

    #main-header-web .app-header-actions,
    #main-header-web .app-header-actions > div {
        align-items: center;
    }

    #main-header-web .app-header-actions > div {
        display: flex;
        height: 52px;
    }

    #main-header-web.header {
        min-height: 170px;
        background-position: center top !important;
    }

    .content .container-xxl {
        padding-top: 1.25rem !important;
        padding-bottom: 1.5rem !important;
    }

    .card {
        border-radius: 0.85rem;
    }

    .card .card-header {
        align-items: flex-start !important;
        flex-wrap: wrap;
        padding: 1.25rem !important;
    }

    .card .card-header .btn,
    .card .card-header .btn-group {
        flex-shrink: 0;
    }

    .card .card-body {
        padding: 1.25rem !important;
    }

    .row {
        --bs-gutter-x: 1rem;
    }

    .modal-dialog {
        margin-right: 0.75rem;
        margin-left: 0.75rem;
    }

    .modal-body,
    .modal-header,
    .modal-footer {
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }

    .modal-footer {
        gap: 0.75rem;
    }

    .table-responsive {
        overflow-x: auto !important;
    }

    .dataTables_wrapper .row {
        gap: 0.75rem;
    }

    .dataTables_wrapper .data-table-toolbar > [class*="col-"],
    .dataTables_wrapper .data-table-footer > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        justify-content: flex-start !important;
    }

    .dataTables_wrapper .data-table-actions {
        align-items: stretch !important;
        flex-direction: column;
    }

    .dataTables_wrapper .dt-buttons {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
        width: 100%;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dt-length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dt-search,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dt-info,
    .dataTables_wrapper .dataTables_paginate,
    .dataTables_wrapper .dt-paging {
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dt-search input {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dt-search {
        width: 100%;
        min-width: 0;
    }

    .dataTables_wrapper .dataTables_paginate,
    .dataTables_wrapper .dt-paging {
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }
}

@media (min-width: 992px) {
    .mobile-nav-overlay,
    .mobile-nav-drawer {
        display: none;
    }
}

/* Admin and trainer dashboard cards in dark mode. */
html[data-bs-theme="dark"] .admin-dashboard-shell .dashboard-card {
    color: var(--dcs-text-primary) !important;
    background-color: var(--dcs-bg-card) !important;
    border-color: var(--dcs-border-color) !important;
    box-shadow: 0 14px 34px rgba(2, 8, 23, 0.2) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .admin-summary-card {
    background: linear-gradient(
        135deg,
        #182235 0%,
        #182235 62%,
        color-mix(in srgb, var(--summary-accent) 13%, #182235) 100%
    ) !important;
    border-right: 1px solid color-mix(in srgb, var(--summary-accent) 22%, #2c384d) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--summary-accent) 18%, #2c384d) !important;
    border-left: 1px solid color-mix(in srgb, var(--summary-accent) 18%, #2c384d) !important;
    box-shadow: 0 16px 36px rgba(2, 8, 23, 0.24) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .admin-summary-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: radial-gradient(
        circle at 92% 18%,
        color-mix(in srgb, var(--summary-accent) 12%, transparent),
        transparent 42%
    );
    pointer-events: none;
}

html[data-bs-theme="dark"] .admin-dashboard-shell a:hover .admin-summary-card,
html[data-bs-theme="dark"] .admin-dashboard-shell a:focus-visible .admin-summary-card {
    background: linear-gradient(
        135deg,
        #1b2940 0%,
        #1b2940 58%,
        color-mix(in srgb, var(--summary-accent) 18%, #1b2940) 100%
    ) !important;
    border-right-color: color-mix(in srgb, var(--summary-accent) 38%, #2c384d) !important;
    border-bottom-color: color-mix(in srgb, var(--summary-accent) 30%, #2c384d) !important;
    border-left-color: color-mix(in srgb, var(--summary-accent) 30%, #2c384d) !important;
    box-shadow: 0 20px 42px rgba(2, 8, 23, 0.3),
        0 0 0 1px color-mix(in srgb, var(--summary-accent) 16%, transparent) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .admin-summary-label,
html[data-bs-theme="dark"] .admin-dashboard-shell .admin-summary-description {
    color: var(--dcs-text-secondary) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .admin-summary-value {
    color: color-mix(in srgb, var(--summary-accent) 84%, white) !important;
    text-shadow: 0 6px 20px color-mix(in srgb, var(--summary-accent) 24%, transparent);
}

html[data-bs-theme="dark"] .admin-dashboard-shell .admin-summary-icon {
    color: color-mix(in srgb, var(--summary-accent) 20%, transparent) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .care-stat-card {
    background: linear-gradient(145deg, #182235 0%, #1a2740 100%) !important;
    border: 1px solid var(--dcs-border-color) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .care-chart-card,
html[data-bs-theme="dark"] .admin-dashboard-shell .analytics-ranking,
html[data-bs-theme="dark"] .admin-dashboard-shell .admin-recent-patients {
    background: linear-gradient(150deg, #182235 0%, #172136 100%) !important;
    border: 1px solid var(--dcs-border-color) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .care-analytics-filter label,
html[data-bs-theme="dark"] .admin-dashboard-shell .admin-recent-subtitle,
html[data-bs-theme="dark"] .admin-dashboard-shell .admin-recent-table th,
html[data-bs-theme="dark"] .admin-dashboard-shell .admin-empty-state {
    color: var(--dcs-text-secondary) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .admin-recent-title,
html[data-bs-theme="dark"] .admin-dashboard-shell .admin-recent-table td,
html[data-bs-theme="dark"] .admin-dashboard-shell .admin-patient-name {
    color: var(--dcs-text-primary) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .admin-patient-number {
    color: #7db4ff !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .admin-recent-table td {
    border-color: var(--dcs-border-color) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell .admin-recent-table tbody tr:hover td {
    background: var(--dcs-hover-bg) !important;
}

html[data-bs-theme="dark"] .admin-dashboard-shell a:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--summary-accent, #38bdf8) 75%, white);
    outline-offset: 4px;
    border-radius: 18px;
}

@media (prefers-reduced-motion: reduce) {
    html[data-bs-theme="dark"] .admin-dashboard-shell .admin-summary-card,
    html[data-bs-theme="dark"] .admin-dashboard-shell .admin-summary-icon {
        transition: none !important;
        transform: none !important;
    }
}

/* Trainee dashboard header actions in dark mode. */
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button {
    color: #eaf4ff !important;
    background: #182235 !important;
    border: 1px solid #31415b !important;
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
    transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease,
        border-color 0.18s ease, box-shadow 0.18s ease;
}

html[data-bs-theme="dark"] .trainee-portal .portal-icon-button i,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button i::before,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button .path1,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button .path2 {
    color: #eaf4ff !important;
    opacity: 1 !important;
}

html[data-bs-theme="dark"] .trainee-portal .portal-icon-button:hover,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button:focus-visible,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button[aria-expanded="true"] {
    color: #ffffff !important;
    background: #1d3553 !important;
    border-color: #4d83bd !important;
    box-shadow: 0 12px 28px rgba(2, 8, 23, 0.3),
        0 0 0 3px rgba(56, 189, 248, 0.1) !important;
    transform: translateY(-2px);
}

html[data-bs-theme="dark"] .trainee-portal .portal-icon-button:hover i,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button:focus-visible i,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button[aria-expanded="true"] i,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button:hover .path1,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button:hover .path2,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button[aria-expanded="true"] .path1,
html[data-bs-theme="dark"] .trainee-portal .portal-icon-button[aria-expanded="true"] .path2 {
    color: #7dd3fc !important;
}

html[data-bs-theme="dark"] .trainee-portal .portal-icon-button:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.85);
    outline-offset: 3px;
}

html[data-bs-theme="dark"] .trainee-portal .portal-icon-button:active {
    transform: translateY(0) scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
    html[data-bs-theme="dark"] .trainee-portal .portal-icon-button {
        transition: none !important;
        transform: none !important;
    }
}

/* Shared header actions across admin, trainer, and trainee pages. */
html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle {
    color: #eaf4ff !important;
    background-color: #182235 !important;
    border: 1px solid #31415b !important;
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
    transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease,
        border-color 0.18s ease, box-shadow 0.18s ease;
}

html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon i,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle i,
html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon .path1,
html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon .path2,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle .path1,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle .path2 {
    color: #eaf4ff !important;
    opacity: 1 !important;
}

html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon:hover,
html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon:focus-visible,
html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon.show,
html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon[aria-expanded="true"],
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle:hover,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle:focus-visible,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle[aria-expanded="true"] {
    color: #ffffff !important;
    background-color: #1d3553 !important;
    border-color: #4d83bd !important;
    box-shadow: 0 12px 28px rgba(2, 8, 23, 0.3),
        0 0 0 3px rgba(56, 189, 248, 0.1) !important;
    transform: translateY(-2px);
}

html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon:hover i,
html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon:focus-visible i,
html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon.show i,
html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon[aria-expanded="true"] i,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle:hover i,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle:focus-visible i,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle[aria-expanded="true"] i {
    color: #7dd3fc !important;
}

html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon:focus-visible,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.85);
    outline-offset: 3px;
}

html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon:active,
html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle:active {
    transform: translateY(0) scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
    html[data-bs-theme="dark"] #main-header-web .app-header-actions .btn.btn-icon,
    html[data-bs-theme="dark"] #main-header-web .mobile-menu-toggle {
        transition: none !important;
        transform: none !important;
    }
}

/* Dark sidebar navigation: soft, contained hover and active states. */
html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item > .menu-link {
    width: 112px;
    margin-inline: auto;
    padding: 8px 6px !important;
    border: 1px solid transparent;
    border-radius: 20px;
    background: transparent !important;
    box-shadow: none;
    transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease,
        border-color 0.18s ease, box-shadow 0.18s ease;
}

html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item > .menu-link .menu-icon {
    background-color: #182235;
    border: 1px solid #26344c;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease,
        border-color 0.18s ease, box-shadow 0.18s ease;
}

html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item > .menu-link small {
    color: #aab4c8 !important;
    transition: color 0.18s ease;
}

html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item:not(.here) > .menu-link:hover,
html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item:not(.here).hover > .menu-link {
    color: #dbeafe !important;
    background-color: rgba(59, 130, 246, 0.09) !important;
    border-color: rgba(96, 165, 250, 0.16);
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.18);
    transform: translateY(-2px);
}

html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item:not(.here) > .menu-link:hover .menu-icon,
html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item:not(.here).hover > .menu-link .menu-icon {
    color: #7dd3fc;
    background-color: #1d3553;
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: 0 8px 20px rgba(2, 8, 23, 0.22);
    transform: scale(1.035);
}

html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item:not(.here) > .menu-link:hover .menu-icon i,
html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item:not(.here).hover > .menu-link .menu-icon i,
html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item:not(.here) > .menu-link:hover small,
html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item:not(.here).hover > .menu-link small {
    color: #7dd3fc !important;
}

html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item.here > .menu-link {
    background-color: rgba(14, 165, 233, 0.08) !important;
    border-color: rgba(56, 189, 248, 0.13);
}

html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item.here > .menu-link .menu-icon {
    border-color: rgba(125, 211, 252, 0.45);
    box-shadow: 0 9px 22px rgba(0, 158, 247, 0.2);
}

html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item.here > .menu-link small {
    color: #e0f2fe !important;
}

html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item.here > .menu-link:hover {
    background-color: rgba(14, 165, 233, 0.13) !important;
    border-color: rgba(56, 189, 248, 0.24);
    transform: translateY(-1px);
}

html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item > .menu-link:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.8);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item > .menu-link,
    html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item > .menu-link .menu-icon,
    html[data-bs-theme="dark"] .aside .aside-menu .menu > .menu-item > .menu-link small {
        transition: none !important;
        transform: none !important;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    #careActivityModal .modal-dialog {
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 767.98px) {
    #main-header-web.header {
        position: relative;
        min-height: 265px;
        padding: 0 !important;
        background-position: center bottom !important;
        background-size: 760px auto !important;
    }

    .app-header-container {
        position: relative;
        display: block !important;
        min-height: 265px;
        padding: 52px 16px 0 !important;
    }

    .mobile-menu-toggle {
        position: absolute;
        top: 132px;
        left: 16px;
        z-index: 2;
        order: initial;
    }

    .app-header-title {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
        padding: 0 88px;
        text-align: center;
        order: initial;
    }

    .app-header-title h1 {
        align-items: center !important;
        width: 100%;
        margin: 0 !important;
        text-align: center;
    }

    .app-header-title #pageTitle {
        color: var(--bs-gray-900) !important;
        font-size: 1.5rem !important;
        line-height: 1.1;
        text-wrap: balance;
    }

    .app-header-title small {
        color: #8790ad !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        line-height: 1.35;
        text-wrap: balance;
    }

    .app-header-actions {
        position: absolute;
        top: 132px;
        right: 16px;
        z-index: 2;
        gap: 10px !important;
        margin-left: 0 !important;
        order: initial;
    }

    .mobile-menu-toggle,
    .app-header-actions .btn-icon {
        width: 52px;
        height: 52px;
        margin: 0;
    }

    .app-header-actions,
    .app-header-actions > div {
        align-items: center;
    }

    .app-header-actions > div {
        display: flex;
        height: 52px;
    }

    #main-header-web .mobile-menu-toggle,
    #main-header-web .app-header-actions .btn.btn-icon {
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        flex-basis: 44px !important;
        border-radius: 0.75rem;
    }

    #main-header-web .mobile-menu-toggle i,
    #main-header-web .app-header-actions .btn.btn-icon i {
        font-size: 1.1rem !important;
    }

    #main-header-web .app-header-actions {
        gap: 8px !important;
    }

    #main-header-web .app-header-actions > div {
        height: 44px;
    }

    .d-flex.justify-content-between:not(.app-header-container):not(.mobile-nav-header),
    .d-flex.justify-content-end:not(.app-header-actions),
    .d-flex.align-items-center.justify-content-between:not(.app-header-container):not(.mobile-nav-header) {
        flex-wrap: wrap;
    }

    .card .card-header {
        display: flex !important;
        flex-direction: column;
    }

    .card .card-header > .d-flex,
    .card .card-header > .btn,
    .card .card-header > a,
    .card .card-header > button {
        width: 100%;
    }

    .card .card-header > .d-flex {
        flex-wrap: wrap;
    }

    .card .card-header .btn {
        justify-content: center;
    }

    .btn:not(.btn-icon) {
        white-space: normal;
    }

    .modal-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
    }

    #careActivityModal .care-activity-modal-footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    #careActivityModal .care-activity-modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.25rem;
    }

    .nav-tabs .nav-item,
    .nav-tabs .nav-link {
        flex: 0 0 auto;
    }

    form .d-flex.justify-content-between,
    form .d-flex.justify-content-end,
    form .d-flex.text-end {
        align-items: stretch !important;
        flex-direction: column;
    }

    form .text-end {
        text-align: left !important;
    }

    form .btn:not(.btn-icon) {
        width: 100%;
    }

    form .row [class*="col-"].d-flex {
        align-items: stretch !important;
        flex-direction: column;
    }

    #patientStepActions {
        align-items: stretch !important;
        flex-direction: column;
    }

    #patientStepActions > div {
        width: 100%;
    }

    #patientStepActions > .text-end {
        display: flex;
        gap: 0.75rem;
        text-align: left !important;
    }

    #patientStepActions > .text-end .btn:not(.btn-icon) {
        flex: 1 1 0;
        width: auto !important;
        min-width: 0;
        margin-right: 0 !important;
    }

    .admin-recent-table,
    .recent-patient-header,
    .recent-patient {
        min-width: 680px;
    }
}

@media (max-width: 575.98px) {
    .app-header-container {
        display: block !important;
        grid-template-columns: none;
        min-height: 265px;
        padding: 52px 16px 0 !important;
    }

    .app-header-title {
        grid-column: auto;
        max-width: 100%;
        padding: 0 88px;
        order: initial;
    }

    .app-header-title #pageTitle {
        font-size: 1.65rem !important;
    }

    .app-header-title small {
        font-size: 0.95rem !important;
    }

    .app-header-actions {
        top: 132px;
        right: 16px;
        grid-column: auto;
        order: initial;
    }

    .mobile-menu-toggle {
        top: 132px;
        left: 16px;
        grid-column: auto;
    }

    #announcementMenu {
        width: min(350px, calc(100vw - 24px)) !important;
    }

    .menu-sub-dropdown.w-275px,
    .menu-sub-dropdown.w-350px {
        width: calc(100vw - 24px) !important;
    }

    .content .container-xxl {
        padding-right: 0.75rem !important;
        padding-left: 0.75rem !important;
    }

    .card .card-header,
    .card .card-body {
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }
}

/* Keep the shared DataTables search control aligned on every page. */
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dt-search {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    text-align: left;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dt-search label {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.75rem;
    width: auto;
    margin: 0;
    white-space: nowrap;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dt-search input {
    flex: 0 1 16rem;
    width: min(16rem, 100%) !important;
    min-width: 0;
    margin: 0 !important;
}

/* Keep sortable patient-report headings readable instead of breaking words
   around the DataTables ordering indicators. The wrapper remains scrollable
   on narrower screens. */
.patient-report-table {
    min-width: 82rem;
}

.patient-report-table thead th {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

/* Keep the account lists readable while DataTables moves lower-priority
   fields into its responsive detail row on tablet and mobile screens. */
.users-tabs-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
}

.users-tabs-scroll .nav-tabs {
    min-width: max-content;
}

.users-tabs-scroll .nav-link {
    white-space: nowrap;
}

.registrar-users-table thead th,
.registrar-users-table tbody td {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.registrar-users-table tbody td:nth-child(2) {
    white-space: normal;
    overflow-wrap: anywhere;
}

.registrar-users-table .user-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.registrar-users-table .user-actions > * {
    flex: 0 0 auto;
}

.registrar-users-table .user-action-icon {
    display: none;
}

.cms-page-card {
    container: cms-card / inline-size;
}

.cms-page-card .cms-items-table thead th {
    white-space: nowrap !important;
    word-break: normal;
    overflow-wrap: normal;
}

.cms-items-table .cms-category-column {
    min-width: 7rem;
}

.cms-items-table .cms-name-column {
    min-width: 11rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.cms-items-table .cms-description-column {
    min-width: 10rem;
}

.cms-items-table .cms-status-column {
    min-width: 5.5rem;
}

.cms-items-table .cms-date-column {
    min-width: 9rem;
}

.cms-items-table .cms-actions-column {
    min-width: 8rem;
}

.cms-items-table .cms-table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    white-space: nowrap;
}

.cms-items-table .cms-action-icon {
    display: none;
}

.cms-items-table > tbody > tr.child ul.dtr-details,
.cms-items-table > tbody > tr.child ul.dtr-details > li {
    width: 100%;
}

.cms-items-table > tbody > tr.child span.dtr-data {
    overflow-wrap: anywhere;
    white-space: normal;
}

@container cms-card (max-width: 48rem) {
    .cms-items-table .cms-actions-column {
        min-width: 5.5rem;
    }

    .cms-items-table .cms-table-actions {
        gap: 0.375rem;
    }

    .cms-items-table .cms-table-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        padding: 0;
    }

    .cms-items-table .cms-action-icon {
        display: inline-block;
    }

    .cms-items-table .cms-action-label {
        display: none;
    }
}

@container cms-card (max-width: 36rem) {
    .cms-items-table > tbody > tr.child ul.dtr-details > li {
        display: grid;
        grid-template-columns: minmax(5.5rem, 0.8fr) minmax(0, 1.2fr);
        gap: 0.75rem;
    }

    .cms-items-table > tbody > tr.child span.dtr-title {
        min-width: 0;
        white-space: normal;
    }

    .cms-items-table .cms-name-column {
        min-width: 8rem;
    }
}

@media (max-width: 991.98px) {
    .registrar-users-card .card-header .card-title,
    .registrar-users-card .card-header > .btn {
        margin: 0;
    }

    .registrar-users-table > tbody > tr.child ul.dtr-details,
    .registrar-users-table > tbody > tr.child ul.dtr-details > li {
        width: 100%;
    }

    .registrar-users-table > tbody > tr.child span.dtr-title {
        min-width: 8.5rem;
        white-space: normal;
    }

    .registrar-users-table > tbody > tr.child span.dtr-data {
        min-width: 0;
        overflow-wrap: anywhere;
        white-space: normal;
    }
}

@media (max-width: 575.98px) {
    .registrar-users-card .card-header > .btn {
        width: 100%;
    }

    .registrar-users-card .card-body {
        padding-right: 0.75rem !important;
        padding-left: 0.75rem !important;
    }

    .registrar-users-table .user-actions {
        gap: 0.375rem;
    }

    .registrar-users-table .user-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        padding: 0;
    }

    .registrar-users-table .user-action-icon {
        display: inline-block;
    }

    .registrar-users-table .user-action-label {
        display: none;
    }

    .registrar-users-table > tbody > tr.child ul.dtr-details > li {
        display: grid;
        grid-template-columns: minmax(6.75rem, 0.8fr) minmax(0, 1.2fr);
        gap: 0.75rem;
    }

    .registrar-users-table > tbody > tr.child span.dtr-title {
        min-width: 0;
    }
}

/* The activity table has several descriptive columns, so retain enough table
   width for sortable headings and let its responsive wrapper handle overflow. */
.care-activities-table {
    min-width: 90rem;
}

.care-activities-table thead th {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

@media (max-width: 767.98px) {
    .care-activities-table {
        width: 100% !important;
        min-width: 0;
        max-width: 100%;
    }

    .care-activities-table tbody td {
        min-width: 0;
        white-space: normal;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .care-activities-table > tbody > tr.child > td.child {
        padding: 0.25rem 0 1rem !important;
    }

    .care-activities-table ul.dtr-details {
        display: block !important;
        width: 100% !important;
        margin: 0;
    }

    .care-activities-table ul.dtr-details > li {
        display: grid !important;
        grid-template-columns: minmax(6.75rem, 34%) minmax(0, 1fr);
        gap: 0.75rem;
        width: 100%;
        padding: 0.625rem 0 !important;
    }

    .care-activities-table .dtr-title,
    .care-activities-table .dtr-data {
        min-width: 0;
        white-space: normal;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .care-activities-table .dtr-title {
        width: auto !important;
    }
}

/* Shared Patient and Care Activity detail layout. */
.detail-page-shell {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
}

.detail-page-shell > .card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(16, 25, 54, 0.07) !important;
}

.detail-page-card .detail-page-header,
.detail-page-shell .detail-page-section-header {
    min-height: 0;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
}

.detail-page-heading {
    min-width: 0;
}

.detail-page-heading h2 {
    color: var(--bs-gray-900);
    font-size: 1.35rem;
    line-height: 1.25;
}

.detail-page-heading p,
.detail-page-heading span {
    display: block;
    margin-top: 0.25rem;
    color: var(--bs-gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
}

.detail-page-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 0.625rem;
}

.detail-page-actions .btn {
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 1rem;
    white-space: nowrap;
}

.detail-page-card > .card-body,
.detail-page-remarks > .card-body {
    padding: 0 1.75rem 1.75rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.detail-grid + .detail-grid {
    margin-top: 1rem;
}

.detail-field {
    grid-column: span 3;
    min-width: 0;
    min-height: 5.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.125rem;
    border-radius: 0.875rem;
    background: var(--bs-gray-100);
}

.detail-field--span-1 { grid-column: span 1; }
.detail-field--span-2 { grid-column: span 2; }
.detail-field--span-3 { grid-column: span 3; }
.detail-field--span-4 { grid-column: span 4; }
.detail-field--span-6 { grid-column: span 6; }
.detail-field--full { grid-column: 1 / -1; }

.detail-field__label {
    display: block;
    margin-bottom: 0.375rem;
    color: var(--bs-gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.25;
}

.detail-field__value {
    min-width: 0;
    color: var(--bs-gray-900);
    font-size: 1.1rem;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.detail-field__meta {
    margin-top: 0.125rem;
    color: var(--bs-gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
}

.detail-page-remarks {
    margin-top: 1.25rem;
}

.detail-page-remarks .detail-remark {
    border-color: var(--bs-gray-200) !important;
    border-radius: 0.875rem !important;
    padding: 1rem 1.125rem !important;
}

@media (max-width: 1199.98px) {
    .detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-field,
    .detail-field--span-1,
    .detail-field--span-2,
    .detail-field--span-3,
    .detail-field--span-4,
    .detail-field--span-6 {
        grid-column: span 1;
    }

    .detail-field--full,
    .detail-field--tablet-full {
        grid-column: 1 / -1;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .care-activity-details-card .detail-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .care-activity-details-card .detail-field--span-4 {
        grid-column: span 2;
    }

    .care-activity-details-card .detail-field--span-6 {
        grid-column: span 3;
    }

    .care-activity-details-card .detail-field--full {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .card .card-header > .mobile-page-actions {
        width: auto !important;
        align-self: flex-end;
        flex: 0 0 auto;
    }

    .mobile-page-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    .mobile-page-actions .btn {
        width: auto !important;
        min-width: 0;
        min-height: 40px;
        height: 40px;
        flex: 0 0 auto !important;
        padding: 0.5rem 0.875rem !important;
        border-radius: 0.65rem;
        font-size: 0.9rem;
        line-height: 1;
        white-space: nowrap;
    }

    .detail-page-card .detail-page-header,
    .detail-page-shell .detail-page-section-header {
        align-items: flex-start !important;
        flex-direction: column;
        padding: 1.25rem;
    }

    .detail-page-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .detail-page-actions .btn {
        flex: 0 1 auto;
        width: auto !important;
    }

    .detail-page-card > .card-body,
    .detail-page-remarks > .card-body {
        padding: 0 1.25rem 1.25rem !important;
    }

    .detail-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }

    .detail-grid + .detail-grid {
        margin-top: 0.75rem;
    }

    .detail-field,
    .detail-field--span-1,
    .detail-field--span-2,
    .detail-field--span-3,
    .detail-field--span-4,
    .detail-field--span-6,
    .detail-field--full,
    .detail-field--tablet-full {
        grid-column: 1;
    }

    .patient-details-card .detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.625rem;
    }

    .patient-details-card .detail-field {
        grid-column: span 1;
        min-height: 4.5rem;
        padding: 0.875rem 1rem;
    }

    .patient-details-card .detail-field--full {
        grid-column: 1 / -1;
    }

    .patient-details-card .detail-field__label {
        margin-bottom: 0.3rem;
        font-size: 0.9rem;
    }

    .patient-details-card .detail-field__value {
        font-size: 1.15rem;
        line-height: 1.35;
    }
}

@media (max-width: 575.98px) {
    .detail-page-shell > .card {
        border-radius: 0.875rem;
    }

    .detail-field {
        min-height: 4.75rem;
        padding: 0.875rem 1rem;
        border-radius: 0.75rem;
    }

    .detail-page-heading h2 {
        font-size: 1.2rem;
    }

    .detail-page-heading p,
    .detail-page-heading span {
        font-size: 0.8rem;
    }
}

@media (max-width: 359.98px) {
    .patient-details-card .detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .patient-details-card .detail-field,
    .patient-details-card .detail-field--full {
        grid-column: 1;
    }
}

@media (max-width: 991.98px) {
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dt-search {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dt-search input {
        flex: 1 1 auto;
    }
}

/* Dashboard-specific surfaces declared by inline component styles. */
html[data-bs-theme="dark"] .available-trainees-panel,
html[data-bs-theme="dark"] .care-stat-card,
html[data-bs-theme="dark"] .care-chart-card,
html[data-bs-theme="dark"] .analytics-ranking,
html[data-bs-theme="dark"] .admin-recent-patients {
    color: var(--dcs-text-primary) !important;
    background: var(--dcs-bg-card) !important;
    border-color: var(--dcs-border-color) !important;
    box-shadow: 0 0.5rem 1.5rem var(--dcs-shadow-color) !important;
}

html[data-bs-theme="dark"] .available-trainees-header,
html[data-bs-theme="dark"] .available-trainee-item,
html[data-bs-theme="dark"] .analytics-rank-row {
    border-color: var(--dcs-border-color) !important;
}

html[data-bs-theme="dark"] .available-trainees-header h2,
html[data-bs-theme="dark"] .available-trainee-name,
html[data-bs-theme="dark"] .care-analytics-heading h2,
html[data-bs-theme="dark"] .care-chart-card h3,
html[data-bs-theme="dark"] .analytics-ranking h3,
html[data-bs-theme="dark"] .care-analytics .admin-recent-patients h3,
html[data-bs-theme="dark"] .analytics-rank-row strong,
html[data-bs-theme="dark"] .cms-create-modal .modal-title {
    color: var(--dcs-text-primary) !important;
}

html[data-bs-theme="dark"] .available-trainees-header p,
html[data-bs-theme="dark"] .available-trainee-email,
html[data-bs-theme="dark"] .available-trainee-activity,
html[data-bs-theme="dark"] .available-trainees-empty,
html[data-bs-theme="dark"] .care-analytics-heading p,
html[data-bs-theme="dark"] .care-stat-card span,
html[data-bs-theme="dark"] .analytics-rank-row span,
html[data-bs-theme="dark"] .analytics-rank-row small,
html[data-bs-theme="dark"] .analytics-empty,
html[data-bs-theme="dark"] .care-analytics .admin-recent-patients .card-header p {
    color: var(--dcs-text-secondary) !important;
}

html[data-bs-theme="dark"] .available-trainees-close {
    color: var(--dcs-text-secondary) !important;
    background: var(--dcs-hover-bg) !important;
}

/* Desktop header artwork intentionally continues behind the first content
   card, matching the dashboard's layered hero treatment. */
@media (min-width: 992px) {
    body:not([data-kt-sticky-header="on"]) #main-header-web.header {
        height: 300px;
        background-position: center top;
        background-size: 100% auto;
    }

    body:not([data-kt-sticky-header="on"]) #main-header-web .header-container {
        height: 170px;
        min-height: 170px;
        flex-grow: 0;
    }

    body:not([data-kt-sticky-header="on"]) #main-header-web .header-offset {
        height: 130px;
    }

    body:not(.trainee-dashboard-page) main.content > .container-xxl {
        position: relative;
        z-index: 2;
        margin-top: -60px;
    }
}

/* Shared desktop sticky header. The expanded header uses the banner artwork,
   but the fixed state must be an opaque, compact bar so scrolling content
   cannot show through or overlap the heading. */
@media (min-width: 992px) {
    body[data-kt-sticky-header="on"] #main-header-web.header {
        position: fixed;
        height: 84px !important;
        min-height: 84px;
        overflow: visible;
        background-color: var(--dcs-bg-primary) !important;
        background-image: none !important;
        border-bottom: 1px solid var(--dcs-border-color);
        box-shadow: 0 12px 32px var(--dcs-shadow-color) !important;
    }

    body[data-kt-sticky-header="on"] #main-header-web.header::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 3px;
        background: linear-gradient(90deg, #ed1c24 0%, #f4c027 48%, #1a4798 100%);
        opacity: 0.88;
        pointer-events: none;
    }

    body[data-kt-sticky-header="on"] #main-header-web .header-container {
        height: 84px !important;
        min-height: 84px !important;
        flex-grow: 1 !important;
        padding-top: 0;
        padding-bottom: 0;
    }

    body[data-kt-sticky-header="on"] #main-header-web .header-offset {
        display: none !important;
        height: 0 !important;
    }

    body[data-kt-sticky-header="on"] #main-header-web .app-header-title {
        max-width: min(620px, 55vw);
        margin-right: 2rem !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body[data-kt-sticky-header="on"] #main-header-web .app-header-title h1 {
        margin: 0 !important;
    }

    body[data-kt-sticky-header="on"] #main-header-web #pageTitle {
        color: var(--dcs-text-primary) !important;
        font-size: 1.45rem !important;
        line-height: 1.2;
    }

    body[data-kt-sticky-header="on"] #main-header-web .app-page-heading-subtitle {
        display: block;
        max-width: 100%;
        margin-top: 3px;
        overflow: hidden;
        color: var(--dcs-text-secondary) !important;
        font-size: 0.9rem !important;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body[data-kt-sticky-header="on"] #main-header-web .app-header-actions {
        flex-wrap: nowrap !important;
    }
}

/* Responsive page-heading layout corrections ---------------------------- */
@media (min-width: 768px) and (max-width: 991.98px) {
    #main-header-web .app-header-container {
        grid-template-columns: 52px minmax(0, 1fr) auto;
        gap: 16px;
    }

    #main-header-web .app-header-title {
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    #main-header-web .app-page-heading {
        width: 100%;
        max-width: 610px;
        padding: 12px 18px 13px 21px;
        border-radius: 16px;
        backdrop-filter: blur(3px) saturate(120%);
        -webkit-backdrop-filter: blur(3px) saturate(120%);
    }

    #main-header-web .app-page-heading::before {
        top: 11px;
        bottom: 11px;
        width: 4px;
    }

    #main-header-web .app-page-heading-eyebrow {
        margin-bottom: 3px;
        font-size: 0.6rem;
    }

    #main-header-web .app-page-heading-title #pageTitle {
        font-size: clamp(1.4rem, 3vw, 1.75rem) !important;
    }

    #main-header-web .app-page-heading-subtitle {
        margin-top: 4px;
        font-size: 0.82rem;
        line-height: 1.35;
    }
}

@media (max-width: 767.98px) {
    #main-header-web.header,
    #main-header-web .app-header-container {
        min-height: 300px;
    }

    #main-header-web .app-header-container {
        padding: 0 16px !important;
    }

    #main-header-web .app-header-title {
        position: absolute;
        top: 26px;
        right: 16px;
        left: 16px;
        z-index: 2;
        display: block !important;
        width: auto;
        max-width: none;
        margin: 0 !important;
        padding: 0 !important;
    }

    #main-header-web .app-page-heading {
        width: 100%;
        max-width: none;
        min-height: 108px;
        padding: 14px 17px 14px 21px;
        border-radius: 16px;
        backdrop-filter: blur(2px) saturate(118%);
        -webkit-backdrop-filter: blur(2px) saturate(118%);
    }

    #main-header-web .app-page-heading-title,
    #main-header-web .app-page-heading-title #pageTitle,
    #main-header-web .app-page-heading-subtitle {
        width: 100%;
        max-width: 100%;
        text-align: left;
    }

    #main-header-web .app-page-heading-title #pageTitle {
        font-size: clamp(1.35rem, 5.8vw, 1.7rem) !important;
    }

    #main-header-web .app-page-heading-subtitle {
        display: -webkit-box;
        margin-top: 5px;
        overflow: hidden;
        font-size: clamp(0.76rem, 3.15vw, 0.88rem) !important;
        line-height: 1.35;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    #main-header-web .mobile-menu-toggle,
    #main-header-web .app-header-actions {
        top: 158px;
    }

    #main-header-web .mobile-menu-toggle {
        left: 16px;
    }

    #main-header-web .app-header-actions {
        right: 16px;
    }
}

@media (max-width: 420px) {
    #main-header-web .app-page-heading-eyebrow {
        font-size: 0.52rem;
        letter-spacing: 0.055em;
    }

    #main-header-web .app-page-heading-mark {
        transform: scale(0.86);
        transform-origin: left center;
    }

    #main-header-web .mobile-menu-toggle,
    #main-header-web .app-header-actions .btn.btn-icon {
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        flex-basis: 48px !important;
    }

    #main-header-web .app-header-actions {
        gap: 7px !important;
    }
}

/* Shared modal visual system --------------------------------------------- */
:root {
    --dcs-modal-accent: #1a4798;
    --dcs-modal-accent-rgb: 26, 71, 152;
    --dcs-modal-warm: #f4c027;
    --dcs-modal-danger: #ed1c24;
    --dcs-modal-surface: #ffffff;
    --dcs-modal-muted-surface: #f6f8fc;
}

html[data-bs-theme="dark"] {
    --dcs-modal-surface: #182235;
    --dcs-modal-muted-surface: #111c2e;
}

.modal-backdrop.show {
    opacity: 0.56;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Keep password management centered even when shared tablet styles change modal margins. */
#changePasswordModal .modal-dialog {
    width: calc(100% - 1.5rem);
    max-width: 500px;
    margin: 0.75rem auto;
    padding: 0;
    height: calc(100% - 1.5rem);
    height: calc(100dvh - 1.5rem);
    min-height: 0;
}

#changePasswordModal .modal-content {
    min-width: 0;
    max-height: 100%;
}

#changePasswordModal .modal-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#changePasswordModal .modal-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

#changePasswordModal .input-group {
    flex-wrap: nowrap;
}

#changePasswordModal .input-group .form-control {
    min-width: 0;
}

#changePasswordModal [data-password-toggle] {
    flex: 0 0 auto;
    padding-inline: 0.75rem;
    white-space: nowrap;
}

#changePasswordModal .modal-footer {
    flex-direction: row;
}

#changePasswordModal .modal-footer .btn {
    width: auto;
    min-width: 0;
}

@media (max-width: 575.98px) {
    #changePasswordModal .modal-header {
        gap: 0.65rem;
    }

    #changePasswordModal .form-control {
        font-size: 16px;
    }

    #changePasswordModal .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    #changePasswordModal .modal-footer .btn {
        width: 100%;
    }
}

.dcs-modal .modal-dialog {
    padding: 0.4rem;
}

.dcs-modal .modal-content {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(var(--dcs-modal-accent-rgb), 0.1) !important;
    border-radius: 1.35rem !important;
    background: var(--dcs-modal-surface);
    box-shadow:
        0 1.75rem 5rem rgba(15, 25, 54, 0.22),
        0 0.35rem 1rem rgba(15, 25, 54, 0.08) !important;
}

.dcs-modal .modal-content::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2;
    height: 5px;
    background: linear-gradient(90deg, var(--dcs-modal-danger) 0 33%, var(--dcs-modal-warm) 33% 66%, var(--dcs-modal-accent) 66% 100%);
    content: "";
}

.dcs-modal .modal-header {
    position: relative;
    gap: 1rem;
    min-height: 88px;
    padding: 1.45rem 1.65rem 1.25rem;
    border-bottom: 1px solid var(--dcs-border-color);
    background:
        radial-gradient(circle at 88% 12%, rgba(244, 192, 39, 0.16), transparent 24%),
        linear-gradient(135deg, rgba(var(--dcs-modal-accent-rgb), 0.09), rgba(var(--dcs-modal-accent-rgb), 0.015) 58%);
}

.dcs-modal .modal-header > :not(.btn-close) {
    position: relative;
    z-index: 1;
}

.dcs-modal .modal-title {
    color: var(--dcs-text-primary);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.dcs-modal__icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--dcs-modal-accent-rgb), 0.12);
    border-radius: 15px;
    color: var(--dcs-modal-accent);
    background: rgba(var(--dcs-modal-accent-rgb), 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dcs-modal__icon svg {
    width: 23px;
    height: 23px;
    overflow: visible;
    stroke: currentColor;
}

.dcs-modal .modal-header .btn-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    margin: 0 0 0 auto;
    padding: 0;
    border-radius: 12px;
    background-color: rgba(var(--dcs-modal-accent-rgb), 0.08);
    background-size: 0.75rem;
    opacity: 0.72;
    transition: transform 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
}

.dcs-modal .modal-header .btn-close:hover,
.dcs-modal .modal-header .btn-close:focus-visible {
    transform: rotate(5deg) scale(1.04);
    background-color: rgba(var(--dcs-modal-accent-rgb), 0.15);
    opacity: 1;
}

.dcs-modal .modal-body {
    padding: 1.55rem 1.65rem;
    background: linear-gradient(180deg, var(--dcs-modal-surface), var(--dcs-modal-muted-surface));
}

.dcs-modal .modal-body > .row,
.dcs-modal .modal-body > .announcement-form-panel,
.dcs-modal .modal-body > .dashboard-announcement-modal-message,
.dcs-modal .modal-body > .announcement-modal-message {
    position: relative;
    z-index: 1;
}

.dcs-modal .modal-footer {
    gap: 0.75rem;
    padding: 1rem 1.65rem 1.25rem;
    border-top: 1px solid var(--dcs-border-color);
    background: var(--dcs-modal-surface);
}

.dcs-modal .modal-footer .btn {
    min-height: 42px;
    margin: 0;
    padding: 0.68rem 1.2rem;
    border-radius: 0.78rem;
    font-weight: 600;
}

.dcs-modal .modal-footer .btn-primary,
.swal2-popup .swal2-actions .btn-primary {
    border-color: var(--dcs-modal-accent);
    background: linear-gradient(135deg, #2360c5, var(--dcs-modal-accent));
    box-shadow: 0 0.45rem 1rem rgba(var(--dcs-modal-accent-rgb), 0.2);
}

.dcs-modal .form-control,
.dcs-modal .form-select,
.dcs-modal .select2-selection {
    border-radius: 0.78rem !important;
}

.dcs-modal .form-control:focus,
.dcs-modal .form-select:focus {
    border-color: rgba(var(--dcs-modal-accent-rgb), 0.55);
    box-shadow: 0 0 0 0.22rem rgba(var(--dcs-modal-accent-rgb), 0.1);
}

.modal.fade .modal-dialog {
    transform: translateY(14px) scale(0.975);
    transition: transform 0.22s ease-out;
}

.modal.show .modal-dialog {
    transform: none;
}

/* SweetAlert is also used as a dialog throughout the application. */
.swal2-popup {
    overflow: hidden;
    padding: 2rem 2rem 1.75rem !important;
    border: 1px solid rgba(var(--dcs-modal-accent-rgb), 0.1) !important;
    border-radius: 1.35rem !important;
    background: var(--dcs-modal-surface) !important;
    box-shadow: 0 1.75rem 5rem rgba(15, 25, 54, 0.24) !important;
}

.swal2-popup::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--dcs-modal-danger) 0 33%, var(--dcs-modal-warm) 33% 66%, var(--dcs-modal-accent) 66% 100%);
    content: "";
}

.swal2-popup .swal2-icon {
    border-width: 3px;
    transform: scale(0.9);
}

.swal2-popup .swal2-title {
    padding-top: 0.35rem;
    color: var(--dcs-text-primary);
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

.swal2-popup .swal2-html-container {
    color: var(--dcs-text-secondary);
    font-size: 0.98rem;
    line-height: 1.65;
}

.swal2-popup .swal2-actions {
    gap: 0.65rem;
}

.swal2-popup .swal2-actions .btn {
    min-width: 104px;
    min-height: 42px;
    margin: 0;
    border-radius: 0.78rem;
    font-weight: 600;
}

html[data-bs-theme="dark"] .dcs-modal .modal-header {
    background:
        radial-gradient(circle at 88% 12%, rgba(244, 192, 39, 0.1), transparent 24%),
        linear-gradient(135deg, rgba(75, 130, 222, 0.13), rgba(24, 34, 53, 0.3) 58%);
}

html[data-bs-theme="dark"] .dcs-modal__icon {
    color: #8db9ff;
    background: rgba(75, 130, 222, 0.14);
    box-shadow: none;
}

@media (max-width: 575.98px) {
    .dcs-modal .modal-dialog {
        padding: 0;
    }

    .dcs-modal .modal-content {
        border-radius: 1.1rem !important;
    }

    .dcs-modal .modal-header {
        min-height: 76px;
        padding: 1.2rem 1rem 1rem !important;
    }

    .dcs-modal__icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 13px;
    }

    .dcs-modal .modal-body {
        padding: 1.15rem 1rem !important;
    }

    .dcs-modal .modal-footer {
        padding: 0.9rem 1rem 1rem !important;
    }

    .swal2-popup {
        width: calc(100% - 1.5rem) !important;
        padding: 1.6rem 1.15rem 1.25rem !important;
    }
}

/* Patient vital signs ---------------------------------------------------- */
.vital-signs-card .card-body {
    min-width: 0;
}

.vital-signs-table th {
    min-width: 8.5rem;
    vertical-align: middle;
    white-space: normal;
}

.vital-signs-table th:first-child,
.vital-signs-table th:last-child {
    min-width: 10.5rem;
}

.vital-signs-table tbody td:nth-child(n + 2):nth-child(-n + 5) {
    text-align: right;
}

.vital-signs-table .vital-reading {
    display: inline-grid;
    grid-template-columns: 4rem 1rem;
    align-items: center;
    column-gap: 0.4rem;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.vital-signs-table .vital-reading__value {
    text-align: right;
}

.vital-signs-table .vital-trend-spacer {
    display: inline-block;
    width: 1rem;
    height: 1rem;
}

.vital-signs-table .vital-trend {
    display: inline-flex;
    width: 1rem;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    vertical-align: -0.05rem;
    cursor: help;
    filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.14));
    transition: transform 0.15s ease, filter 0.15s ease;
}

.vital-signs-table .vital-trend:hover {
    transform: translateY(-1px) scale(1.12);
    filter: drop-shadow(0 2px 2px rgba(15, 23, 42, 0.2));
}

.vital-signs-table .vital-trend--increase,
.vital-signs-table .vital-trend--increase i {
    color: #087443 !important;
}

.vital-signs-table .vital-trend--decrease,
.vital-signs-table .vital-trend--decrease i {
    color: #d02f40 !important;
}

.vital-signs-table .vital-trend--same,
.vital-signs-table .vital-trend--same i {
    color: #1769c2 !important;
}

html[data-bs-theme="dark"] .vital-signs-table .vital-trend--increase,
html[data-bs-theme="dark"] .vital-signs-table .vital-trend--increase i {
    color: #6ed7a4 !important;
}

html[data-bs-theme="dark"] .vital-signs-table .vital-trend--decrease,
html[data-bs-theme="dark"] .vital-signs-table .vital-trend--decrease i {
    color: #ff8996 !important;
}

html[data-bs-theme="dark"] .vital-signs-table .vital-trend--same,
html[data-bs-theme="dark"] .vital-signs-table .vital-trend--same i {
    color: #8db9ff !important;
}

.vital-signs-empty {
    display: flex;
    min-height: 9rem;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 1.5rem;
    border: 1px dashed var(--dcs-border-color, #e5e9f0);
    border-radius: 0.85rem;
    color: var(--dcs-text-secondary, #737b98);
    text-align: center;
}

.vital-signs-empty__icon {
    display: inline-grid;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #ed1c24;
    background: rgba(237, 28, 36, 0.1);
    font-size: 1.2rem;
}

@media (max-width: 575.98px) {
    .vital-signs-empty {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal.fade .modal-dialog,
    .dcs-modal .modal-header .btn-close {
        transition: none;
    }
}

/* Patient form ---------------------------------------------------------- */
.patient-form-card {
    width: 100%;
    max-width: none;
    overflow: visible;
    border: 1px solid var(--dcs-border-color);
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.055);
}

.patient-form-card__header {
    min-height: auto;
    padding-bottom: 1rem !important;
}

.patient-form-card__heading {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.patient-form-card__heading .text-muted {
    max-width: 28rem;
    line-height: 1.5;
    text-align: right;
}

.patient-form-card #patientTabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.4rem;
    overflow: visible;
    border: 1px solid var(--dcs-border-color);
    border-radius: 0.9rem;
    background: var(--dcs-hover-bg);
}

.patient-form-card #patientTabs.patient-tabs--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.patient-form-card #patientTabs .nav-item,
.patient-form-card #patientTabs .nav-link {
    width: 100%;
    min-width: 0;
}

.patient-form-card #patientTabs .nav-link {
    min-height: 44px;
    padding: 0.7rem 0.75rem;
    border: 0;
    border-radius: 0.65rem;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
}

.patient-form-card #patientTabs .nav-link.active {
    color: var(--bs-primary);
    background: var(--dcs-bg-card);
    box-shadow: 0 0.25rem 0.8rem rgba(15, 23, 42, 0.08);
}

.patient-form-card .form-control,
.patient-form-card .form-select {
    min-height: 46px;
}

.patient-form-card #patientStepActions {
    padding-top: 1.25rem;
    border-top: 1px solid var(--dcs-border-color);
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .patient-form-card .card-header,
    .patient-form-card .card-body {
        padding-right: clamp(1.5rem, 3vw, 2.25rem) !important;
        padding-left: clamp(1.5rem, 3vw, 2.25rem) !important;
    }

    .patient-form-card .row {
        --bs-gutter-x: 1.25rem;
        --bs-gutter-y: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .patient-form-card__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
    }

    .patient-form-card__heading .text-muted {
        max-width: none;
        text-align: left;
    }

    .patient-form-card #patientTabs,
    .patient-form-card #patientTabs.patient-tabs--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .patient-form-card #patientStepActions {
        flex-wrap: wrap;
    }
}

@media (max-width: 575.98px) {
    .patient-form-card #patientStepActions {
        align-items: stretch !important;
        flex-direction: column;
    }

    .patient-form-card #patientStepActions > div {
        width: 100%;
    }

    .patient-form-card #patientStepActions > .text-end {
        display: flex;
        gap: 0.75rem;
    }

    .patient-form-card #patientStepActions > .text-end .btn {
        min-width: 0;
        flex: 1 1 0;
        margin-right: 0 !important;
    }
}

@media (max-width: 359.98px) {
    .patient-form-card #patientTabs,
    .patient-form-card #patientTabs.patient-tabs--four {
        grid-template-columns: minmax(0, 1fr);
    }
}
