/* === EXTRACTED MEDIA QUERIES === */

@media (min-width: 992px) {

    /* Header/nav dropdowns: anchor absolutely below toggle */
    .top-header .dropdown-menu,
    .nav-left-menus .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        bottom: auto !important;
        margin-top: 8px !important;
        transform: none !important;
    }

    .top-header .dropdown-menu.dropdown-menu-end,
    .nav-left-menus .dropdown-menu.dropdown-menu-end {
        left: auto !important;
        right: 0 !important;
    }

    /* Finance/left nav dropdowns open left-aligned */
    .top-header .dropdown>.dropdown-menu:not(.dropdown-menu-end) {
        /* left: 0 !important; */
    }
}

@media (min-width: 844px) {
    .table>:not(caption)>*>* {
        padding: .35rem .825rem;
    }
}

@media (min-width: 992px) {
    .modal-column-split {
        border-right: 1px dashed rgba(22, 16, 106, 0.25);
    }

    .table-responsive {
        /* overflow: visible; */
        min-height: 34vh;
    }

    .table-responsive.overflow-x-auto {
        overflow: hidden !important;
        overflow-x: auto !important;
    }

    .table-responsive.overflow-x-auto .table {
        /* white-space: pre-line; */
    }

    .side-link:hover {
        background: var(--primary);
        color: #fff;
    }

    .link-member-box {
        min-height: 500px;
    }

    .w-lg-70 {
        width: 70% !important;
    }

}

@media (max-width: 338px) {
    .xxs-d-none {
        display: none;
    }
}

@media (min-width: 576px) {
    .auto-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }
}

@media (min-width: 992px) {
    .auto-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}

@media (min-width: 1400px) {
    .auto-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 5px;
        /* Still very tight on massive ultra-wide */
    }
}

@media (max-width: 575.98px) {
    .alphabet-sort-container {
        margin-bottom: 16px;
    }

    .alphabet-scroll-wrapper {
        gap: 6px;
    }

    .alpha-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .alpha-btn:first-child {
        padding: 0 16px;
    }

    .cms-section .table {
        .created-by-img img {
            order: 2;
        }

        .approved-by-img img {
            order: 2;
        }
    }

    .created-by-img img {
        order: 2;
    }

    .pulse-indicator::after {
        left: -2px;
        top: -1px;
    }
}

@media (max-width: 767.98px) {
    .mobile-hide {
        display: none !important;
    }

    .mobile-card-table thead {
        display: none;
    }

    .modal-theme-glass .modal-content::after {
        /* opacity: 0.25; */
    }

    .modal-theme-glass .modal-footer {
        z-index: 1;
    }

    .mobile-card-table tbody tr {
        display: block;
        background: var(--white);
        border-radius: 16px;
        margin-bottom: 1.25rem;
        padding: 1.25rem;
        box-shadow: 0 4px 15px rgba(22, 16, 106, 0.05);
        border: 1px solid rgba(22, 16, 106, 0.05);
        transition: var(--transition);
        position: relative;
        overflow: hidden;
    }

    .mobile-card-table tbody tr:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-hover);
    }

    .mobile-card-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        padding: 0.85rem 0;
        text-align: right;
        font-size: 0.85rem;
        min-height: auto;
    }

    .mobile-card-table tbody td:last-child {
        border-bottom: 0;
        margin-top: 0rem;
        /* justify-content: center; */
        /* background: rgba(22, 16, 106, 0.02); */
        border-radius: 10px;
        padding: 0.75rem;
    }

    .mobile-card-table .dropdown-menu {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .h-260 {
        height: 180px !important;
    }
}

@media (max-width: 767.98px) {
    .modern-banner-wrap {
        height: 180px;
    }
}

@media (min-width: 992px) {
    .d-md-unset {
        display: unset !important;
    }

    .hide-desktop {
        display: none !important;
    }

    .modal-theme-glass .modal-footer {
        z-index: 1;
    }

    .top-header {
        margin: 8px 8px 0;
        top: 8px;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .top-header .nav-left-menus {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        box-shadow: var(--shadow-header);
        padding: 10px 10px;
        border-radius: 50px;
    }

    .top-header .nav-left-menus a:first-child {
        padding: 6px 10px;
    }

    .header-right .dropdown .dropdown-search {
        top: 0 !important;
    }

    .w-lg-80 {
        width: 80% !important;
    }

    .w-lg-85 {
        width: 85% !important;
    }

    .header-left {
        justify-content: start;
    }

    body .border-radius-0 {
        border-radius: 0 !important;
    }

}

@media (max-width: 576px) {
    .db-hero-banner {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 18px;
    }

    .db-hero-banner .db-hero-left {
        width: 100%;
        min-width: 0;
    }

    .db-hero-banner .db-hero-right {
        width: 100%;
    }

    .db-hero-banner .db-hero-btn {
        width: 100%;
        justify-content: center;
    }

    .theme-tab-nav .nav-link {
        padding: 12px 16px !important;
    }

    .add-top-btns {
        justify-content: end;
    }

    .item-mandatory {
        margin-right: auto;
    }

    .text-welcome {
        font-size: 1.45rem;
    }

    .sticky-footer {
        position: relative;
        width: 96%;
        margin: 0 auto !important;
        z-index: 1040 !important;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08) !important;
        padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
        /* iPhone safe area */
    }

    body {
        padding-bottom: 10px !important;
        /* Prevent content overlapping with fixed footer */
    }

}

@media (min-width: 993px) {
    .hide-mobile-nav {
        display: none !important;
    }

    .search-box-container {
        width: 100%;
        max-width: 300px;
    }

    .h-lg-100 {
        height: 100% !important;
    }
}

@media (max-width: 992px) {
    .profile-dropdown-circle {
        width: 34px !important;
        height: 34px !important;
    }
}

@media (max-width: 767.98px) {

    /* 1. Kill the standard table layout */
    .mobile-card-table,
    .mobile-card-table thead,
    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table th,
    .mobile-card-table td {
        display: block;
        width: 100%;
    }

    /* 2. Hide the header row visually (keep accessible) */
    .mobile-card-table thead tr {
        position: absolute;
        left: -9999px;
        top: -9999px;
    }

    /* 3. Each row becomes a card */
    .mobile-card-table tbody tr {
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.07);
        border-radius: 14px;
        width: 96%;
        margin: 12px auto;
        padding: 14px 14px 10px;
        box-shadow: 0 2px 12px rgba(22, 16, 106, 0.07);
        position: relative;
        animation: cardSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        will-change: transform;
    }

    @keyframes cardSlideIn {
        from {
            opacity: 0;
            transform: translateY(16px) scale(0.98);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    /* Stagger per row */
    .mobile-card-table tbody tr:nth-child(1) {
        animation-delay: 0.04s;
    }

    .mobile-card-table tbody tr:nth-child(2) {
        animation-delay: 0.08s;
    }

    .mobile-card-table tbody tr:nth-child(3) {
        animation-delay: 0.12s;
    }

    .mobile-card-table tbody tr:nth-child(4) {
        animation-delay: 0.16s;
    }

    .mobile-card-table tbody tr:nth-child(5) {
        animation-delay: 0.20s;
    }

    /* Hover lift */
    .mobile-card-table tbody tr:hover {
        box-shadow: 0 6px 24px rgba(22, 16, 106, 0.14);
        transform: translateY(-2px);
        background: linear-gradient(135deg, rgba(22, 16, 106, 0.04) 0%, rgba(255, 255, 255, 1) 100%);
        border-color: rgba(22, 16, 106, 0.18);
        background: rgb(236 236 236);
    }

    /* 4. Each cell = label-value row */
    .mobile-card-table tbody td {
        padding: 5px 5px !important;
        padding-bottom: 0px !important;
        border: none !important;
        font-size: 0.85rem;
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start;
        gap: 8px;
        color: inherit !important;
        text-align: right;
        /* Override Bootstrap display:table-cell on <td> */
        box-sizing: border-box;
    }

    /* 5. data-label becomes inline label prefix */
    .mobile-card-table tbody td::before {
        content: attr(data-label) !important;
        display: block;
        font-size: 0.8rem;
        font-weight: 600;
        text-transform: capitalize;
        letter-spacing: 0.02em;
        color: #7b84a0;
        opacity: 1;
        min-width: auto;
        flex-shrink: 0;
        text-align: left;
        margin-right: 1.5rem;
    }


    /* 6. Action dropdown — absolute top-right of card */
    .mobile-card-table tbody td.dropdown,
    .mobile-card-table tbody td[data-label="Action"],
    .mobile-card-table tbody td[data-label="action"],
    .mobile-card-table tbody td[data-label="Actions"],
    .mobile-card-table tbody td[data-label="actions"] {
        position: absolute;
        top: 14px;
        right: 14px;
        width: auto;
        padding: 0;
    }

    .mobile-card-table tbody td.dropdown::before,
    .mobile-card-table tbody td[data-label="Action"]::before,
    .mobile-card-table tbody td[data-label="action"]::before,
    .mobile-card-table tbody td[data-label="Actions"]::before,
    .mobile-card-table tbody td[data-label="actions"]::before {
        display: none;
    }

    /* 7. First TD (ID/Reg No) — card title style */
    .mobile-card-table tbody td:first-child {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--primary, #16106a) !important;
        padding-bottom: 8px !important;
        margin-bottom: 4px;
        border-bottom: none !important;
        justify-content: flex-start !important;
        text-align: left;
    }

    .mobile-card-table tbody td:first-child::before {
        display: none;
    }

    /* 8. Remove desktop padding helpers */
    .mobile-card-table tbody td.ps-4 {
        padding-left: 0 !important;
    }

    /* 9. Unlock overflow when dropdown is open */
    .table-responsive:has(.dropdown-menu.show) {
        overflow: visible !important;
    }

    /* 10. Remove horizontal scroll wrapper in card mode */
    .table-responsive:has(.mobile-card-table) {
        overflow-x: visible;
        padding-bottom: 4px;
    }

    /* 11. Hide Email & Address columns on mobile — too long for card layout */
    .mobile-card-table tbody td[data-label="Email"],
    .mobile-card-table tbody td[data-label="email"],
    .mobile-card-table tbody td[data-label="E-mail"],
    .mobile-card-table tbody td[data-label="E-Mail"],
    .mobile-card-table tbody td[data-label="Address"],
    .mobile-card-table tbody td[data-label="address"],
    .mobile-card-table tbody td[data-label="Full Address"],
    .mobile-card-table tbody td.td-email,
    .mobile-card-table tbody td.td-address,
    .mobile-card-table tbody td.col-email,
    .mobile-card-table tbody td.col-address {
        display: none !important;
    }
}


@media (min-width: 768px) and (max-width: 991.98px) {

    .mobile-card-table td,
    .mobile-card-table th {
        font-size: 0.78rem;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
}

@media (min-width: 768px) {

    /* Ensure the dropdown menu sits on top of everything */
    .dropdown-menu.dropdown-coa-menu.show {
        z-index: 1050;
        /* Standard Bootstrap high z-index */
        position: absolute;
    }

    /* Ensure the table cell doesn't trap the dropdown */
    td.dropdown {
        position: relative;
        overflow: visible !important;
    }

    .glass-card.overflow-hidden01 div:first-child {
        border-top-left-radius: var(--radius-card);
        border-top-right-radius: var(--radius-card);
    }

    .glass-card.overflow-hidden01 div:last-child {
        border-bottom-left-radius: var(--radius-card);
        border-bottom-right-radius: var(--radius-card);
    }
}

@media (min-width: 576px) {
    .mem-thumb-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
    }
}

@media (min-width: 768px) {
    .mem-thumb-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
}

@media (min-width: 992px) {
    .mem-thumb-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 8px;
    }

    .w-lg-auto {
        width: auto !important;
    }
}

@media (min-width: 1200px) {
    .mem-thumb-grid {
        grid-template-columns: repeat(9, 1fr);
        gap: 9px;
    }
}

@media (min-width: 1400px) {
    .mem-thumb-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 10px;
    }
}

@media (min-width: 480px) {
    .exec-thumb-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (min-width: 768px) {
    .exec-thumb-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

@media (min-width: 992px) {
    .exec-thumb-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }
}

@media (min-width: 1200px) {
    .exec-thumb-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 14px;
    }
}

@media (min-width: 1400px) {
    .exec-thumb-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 14px;
    }
}

@media (max-width: 575.98px) {
    .perm-accordion-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .perm-accordion-header .perm-header-actions {
        margin-left: auto;
    }
}

@media (max-width: 767.98px) {
    #rolesAccordion .accordion-body .row>[class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .table-responsive.overflow-x-auto {
        overflow-x: auto !important;
    }

    .mobile-table-responsive {
        overflow-x: auto !important;
    }
}

@media (max-width: 575.98px) {
    #rolesAccordion .accordion-body .row>[class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Filter select labels wrap gracefully */
    .perm-filter-label {
        font-size: 0.6rem;
    }
}

@media (max-width: 767.98px) {

    /* Description text in mobile */
    .perm-desc {
        font-size: 0.78rem;
    }

    /* Group header row stays full-width (not converted to card) */
    .perm-group-header,
    .perm-group-header td,
    .perm-group-td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        padding: 10px 16px !important;
        margin: 0 !important;
        background: rgba(22, 16, 106, 0.05) !important;
        font-weight: 700;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        animation: none !important;
    }

    /* Hide the checkbox column on mobile — too cramped */
    .perm-table .perm-td-check {
        display: none !important;
    }

    /* Module name td: takes full width as card header */
    .perm-table .perm-td-module {
        border-bottom: 1px dashed rgba(0, 0, 0, 0.08) !important;
        padding-bottom: 10px !important;
        margin-bottom: 4px;
        font-size: 0.88rem;
    }

    .perm-table .perm-td-module::before {
        display: none !important;
    }

    /* Switch tds: lay out horizontally side by side */
    .perm-table .perm-td-switch {
        display: inline-flex !important;
        width: auto !important;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 6px 12px !important;
        font-size: 0.7rem;
        border: none !important;
    }

    /* Wrap all switch tds in a flex row */
    .perm-table tbody tr {
        display: flex !important;
        flex-wrap: wrap;
    }

    .perm-table tbody tr .perm-td-module {
        flex: 0 0 100%;
        display: block !important;
        text-align: left;
    }

    .perm-table tbody tr .perm-td-switch {
        flex: 1;
        min-width: 0;
    }

    /* Switch label via ::before — show short label above switch */
    .perm-table .perm-td-switch::before {
        content: attr(data-label);
        display: block;
        font-size: 0.62rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--primary, #16106a);
        opacity: 0.65;
        min-width: unset !important;
        text-align: center;
    }

    /* Switch itself centered */
    .perm-table .perm-td-switch .form-check.perm-switch {
        display: flex;
        justify-content: center;
        margin: 0 auto;
    }

    /* Larger tap target for switches on mobile */
    .perm-table .perm-switch .form-check-input {
        width: 2.4em;
        height: 1.3em;
        cursor: pointer;
    }
}

@media (max-width: 575.98px) {
    .news-ticker-bar {
        height: 30px;
    }

    .news-ticker-label {
        font-size: 0.55rem;
        padding: 0 8px;
        gap: 3px;
    }

    .news-ticker-item {
        font-size: 0.65rem;
        padding: 0 14px;
    }

    .news-ticker-close {
        width: 30px;
    }
}

@media (min-width: 768px) {
    .db-grid-view {
        grid-template-columns: repeat(2, 1fr);
    }

    .db-span-8,
    .db-span-4 {
        grid-column: span 1;
    }

    .db-span-8 {
        grid-column: span 2;
    }

    .tab-content .modern-glass-card {
        z-index: auto;
    }
}

@media (min-width: 1200px) {
    .db-grid-view {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-flow: row dense;
    }

    .db-span-8 {
        grid-column: span 2;
    }

    .db-span-4 {
        grid-column: span 1;
    }
}

@media (max-width: 1199.98px) {
    .db-card-standard {
        height: auto;
        min-height: 400px;
    }

    .db-card-body-scroll {
        overflow-y: visible;
        /* Let the page scroll on smaller screens for these cards */
    }
}

@media (max-width: 767.98px) {
    .db-card-standard {
        min-height: auto;
    }

    nav[aria-label="breadcrumb"] {
        display: none;
    }
}

@media (max-width: 991.98px) {

    .settings-sidebar-primary,
    .settings-sidebar-secondary {
        width: 100% !important;
        border-right: 0 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .table-content-scroll {
        max-height: none;
    }
}

@media (max-width: 991.98px) {

    /* Modal Header & Progress */
    #stepLabel {
        font-size: 0.85rem;
    }

    /* Import Options Container (Step 2): stack sidebar on top */
    .import-options-container {
        flex-direction: column;
        min-height: auto !important;
    }

    /* Sidebar: full-width horizontal scroll nav */
    .options-sidebar {
        width: 100% !important;
        border-right: 0 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .options-sidebar .list-group {
        flex-direction: row;
        padding: 6px;
        gap: 4px;
    }

    .options-sidebar .list-group-item {
        white-space: nowrap;
        border-radius: 50px !important;
        padding: 5px 14px !important;
        font-size: 0.75rem !important;
    }

    /* Content area: reduce padding */
    .options-content {
        padding: 1rem !important;
    }

    /* ── Mapping Layout: Stack Left → Center → Right vertically ── */
    .options-content .d-flex.gap-2.flex-grow-1 {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    /* Left & Right panes: full width */
    .mapping-pane-left,
    .mapping-pane-right {
        flex: 0 0 100% !important;
        width: 100% !important;
    }

    /* List boxes: shorter on mobile */
    .mapping-list-box {
        height: 360px !important;
        min-height: 360px !important;
    }

    /* Hide the type legend on mobile to save space */
    .mapping-pane-left .d-flex.gap-2.flex-wrap.mt-2 {
        display: none !important;
    }

    /* ── Center Controls: horizontal row on mobile ── */
    .mapping-center-controls {
        flex-direction: row !important;
        width: 100% !important;
        padding-top: 0 !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
    }

    /* Hide Up/Down reorder buttons on mobile */
    .mapping-center-controls .border-top {
        display: none !important;
    }

    .mapping-center-controls button[title="Move Up"],
    .mapping-center-controls button[title="Move Down"] {
        display: none !important;
    }

    /* Expand Add/Remove buttons to share available width */
    #btnAddMapping,
    #btnRemoveMapping {
        flex: 1 !important;
        width: auto !important;
        white-space: nowrap;
    }

    /* ── Right Pane Footer: Row 1 (New Field / New Group / Rename) ── */
    .mapping-pane-right .d-flex.gap-1.mt-2 {
        flex-wrap: wrap;
        gap: 6px !important;
    }

    .mapping-pane-right .d-flex.gap-1.mt-2 .btn {
        flex: 1 1 30%;
        min-width: 0;
    }

    /* ── Right Pane Footer: Row 2 (Modify / Customizations) ── */
    .d-flex.align-items-center.justify-content-between.mt-1.pt-1.border-top {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Hide "Customizations:" label on small screens */
    .d-flex.align-items-center.justify-content-between.mt-1.pt-1.border-top .text-muted.fw-semibold {
        display: none !important;
    }

    /* Dropdowns in footer row: shrink text */
    .d-flex.align-items-center.justify-content-between.mt-1.pt-1.border-top .dropdown .btn {
        font-size: 0.68rem !important;
        padding: 4px 8px !important;
    }

    /* Section header badge: smaller on mobile */
    .options-content .badge {
        font-size: 0.65rem !important;
    }

    /* Empty State Adjustments */
    .glass-card[style*="min-height: 540px"] {
        min-height: auto !important;
        padding: 3rem 1.5rem !important;
    }

    .glass-card[style*="min-height: 540px"] .display-1 {
        font-size: 4rem;
    }

    .glass-card[style*="min-height: 540px"] h2 {
        font-size: 1.5rem;
    }

    .glass-card[style*="min-height: 540px"] p {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .options-sidebar .list-group-item {
        font-size: 0.75rem !important;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 5px 0;
    }

    /* Step 1: Upload Zone Mobile Fixes */
    .upload-zone[style*="min-height: 350px"] {
        min-height: 280px !important;
        padding: 2rem 1rem !important;
    }

    .upload-zone i.display-4 {
        font-size: 3rem;
    }

    .upload-zone h3 {
        font-size: 1.25rem;
    }

    .upload-zone p {
        font-size: 0.85rem;
        margin-bottom: 1.5rem !important;
    }

    /* Modal Body mobile padding */
    .modal-body.p-0 .p-4 {
        padding: 1.25rem !important;
    }

    /* Header adjustments */
    .modal-header.p-4 {
        padding: 1.25rem !important;
    }

    .modal-header .bg-primary.p-3 {
        padding: 0.75rem !important;
    }

    .modal-header h4 {
        font-size: 1.1rem;
    }

    /* Sidebar Active State Fix */
    .options-sidebar .list-group-item.active {
        background-color: var(--primary, #16106a) !important;
        color: #fff !important;
        box-shadow: 0 4px 10px rgba(22, 16, 106, 0.2);
        line-height: 1.9;
    }

    .modal-import .modal-footer {
        flex-direction: column-reverse;
    }

    /* Mapping Buttons refinement */
    .import-options-container .col-2.pt-5 {
        padding-top: 1rem !important;
        margin-bottom: 1rem;
        gap: 10px !important;
    }

    /* Tree View Mobile Scaling */
    .tree-view.small {
        font-size: 0.78rem !important;
    }

    .tree-view .ms-4 {
        margin-left: 1rem !important;
    }

    .tree-item {
        padding: 4px 0;
    }

    /* Footer buttons sizing */
    .modal-footer .btn {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 992px) {
    .d-lg-flex {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .modal-theme-glass .modal-content::before {
        background: rgb(252 237 238 / 45%);
    }

    .stepper-card {
        margin: 12px 8px;
    }

    .panels-body {
        padding: 20px 16px;
    }

    .step-footer {
        padding: 16px;
        /* flex-direction: column-reverse; */
        gap: 12px;
    }

    .footer-left,
    .footer-right {
        /* width: 100%; */
        justify-content: center;
    }

    .step-counter,
    .footer-mid {
        display: none;
    }

    .step-footer .footer-mid {
        order: 0;
        display: none;
    }

    .stepper-bar {
        padding: 18px 16px 0;
    }

    .step-node {
        min-width: 60px;
    }

    .step-tag {
        font-size: 0.62rem;
    }

    .type-picker-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .invitee-search-row {
        flex-direction: column;
    }

    .step-pane .invitee-search-row .inv-level-select {
        width: 100%;
    }

    .step-footer .footer-left .btn-skip {
        padding: 9px 0px;
        padding-left: 5px;
    }

    .add-stepper-form .stepper-card {
        margin: 0;
    }

    .review-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .review-field {
        padding: 12px 16px;
    }

    .ticket-header,
    .ticket-body,
    .ticket-footer {
        padding: 25px 20px;
    }

    .ticket-details-grid {
        grid-template-columns: 1fr;
        grid-auto-flow: row;
        gap: 18px 0;
    }

    /* Force exact mobile order: Executive → Location → Date → Time */
    .ticket-details-grid .td-item:nth-child(1) {
        order: 1;
    }

    .ticket-details-grid .td-item:nth-child(2) {
        order: 2;
    }

    .ticket-details-grid .td-item:nth-child(3) {
        order: 3;
    }

    .ticket-details-grid .td-item:nth-child(4) {
        order: 4;
    }

    .ticket-rows-container {
        grid-template-columns: 1fr;
    }

    .td-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .td-label {
        font-size: 0.7rem;
        letter-spacing: 0.7px;
        color: var(--primary);
        display: flex;
        align-items: center;
        gap: 5px;
        white-space: nowrap;
    }

    .td-label i {
        font-size: 0.85rem;
    }

    .td-value {
        font-size: 1rem;
        font-weight: 700;
        color: #1e293b;
        padding-left: 2px;
        word-break: break-word;
    }

    .ticket-allowances .td-value {
        text-align: end;
    }

    .ticket-col-icon {
        margin-right: 12px;
    }

    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .ticket-icon-bg {
        order: -1;
        align-self: flex-start;
        margin-top: 0;
        margin-bottom: -5px;
        font-size: 1.8rem;
    }

    .ticket-total-box {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .page-heading-area {
        padding: 16px 14px 0;
    }

    .progress-summary {
        padding: 10px 14px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .type-picker-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .agenda-add-row {
        flex-wrap: wrap;
    }

    .btn-add {
        width: 100%;
        justify-content: center;
    }

    .success-stats {
        gap: 16px;
    }

    .page-h1 {
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .login-card-wrap {
        max-width: 100%;
    }

    .otp-box {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
    }

    .login-stat-num {
        font-size: 1rem;
    }

    .login-stats-row {
        gap: 6px;
    }

    .lp-step-line {
        width: 30px;
    }

    .login-tab-btn {
        font-size: 0.76rem;
        padding: 8px 8px;
        gap: 4px;
    }

    .login-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 360px) {
    .otp-boxes {
        gap: 6px;
    }

    .otp-box {
        width: 33px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .login-page-root {
        padding: 1rem;
    }
}

@media (max-width: 374px) {
    .logo-wrap {
        width: 80px;
    }

    .data-card-wrap h5#displayAadharName {
        font-size: clamp(0.71rem, 2vw + 0.15rem, 1.55rem);
    }

    .stat-label {
        font-size: clamp(0.1rem, 2vw + 0.15rem, 1.55rem);
    }

    .stat-num {
        font-size: clamp(0.1rem, 2vw + 0.15rem, 1.55rem);
    }
}

@media (max-width: 395px) {
    .logo-wrap {
        width: 100px;
    }
}

/* ==========================================
   ALLOWANCES MOBILE OVERRIDES
   ========================================== */
@media (max-width: 767.98px) {
    .allowance-filters-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .filter-pill-select {
        width: 100% !important;
        flex-wrap: wrap !important;
        height: auto !important;
        padding: 12px !important;
        border-radius: 12px !important;
    }

    .filter-pill-select .filter-select-box {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-top: 10px !important;
        text-overflow: ellipsis;
    }

    .summary-pill-card {
        width: 100% !important;
        justify-content: space-between !important;
    }
}

@media (max-width: 767.98px) {
    .share-details-row {
        flex-wrap: wrap !important;
    }

    .share-details-info {
        flex: 1 1 100% !important;
    }

    .share-input-wrap {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 8px !important;
        margin-left: 0 !important;
    }
}

/* ==========================================
   MEETING VIEW ROW — RESPONSIVE OVERRIDES
   ========================================== */

/* Mobile: full-width cards, tighter padding */
@media (max-width: 575.98px) {
    .meeting-view-row .profile-value-box {
        padding: 11px 13px 10px;
        border-radius: 12px;
    }

    .meeting-view-row .value-box-content {
        font-size: 0.85rem;
    }
}

/* Tablet: ensure 2-column layout looks balanced */
@media (min-width: 576px) and (max-width: 991.98px) {
    .meeting-view-row .profile-value-box {
        padding: 13px 15px 11px;
    }
}

/* Desktop xl: equal height in a 4-col row */
@media (min-width: 1200px) {
    .meeting-view-row {
        align-items: stretch;
    }

    .meeting-view-row>[class*="col-"] {
        display: flex;
        flex-direction: column;
    }

    .meeting-view-row .profile-value-box {
        flex: 1;
    }
}

/* ==========================================
   MEETING AGENDA LIST — RESPONSIVE OVERRIDES
   ========================================== */

/* Mobile ≤ 575px: stack title + actions vertically */
@media (max-width: 575.98px) {
    .agenda-list-item {
        flex-direction: column;
        gap: 8px;
        padding: 12px 14px;
    }

    .agenda-title {
        font-size: 0.85rem;
        padding-right: 0;
    }

    .agenda-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .btn-add-minutes {
        font-size: 0.72rem;
        padding: 5px 12px;
    }

    .btn-delete-agenda {
        /* width: 30px; */
        /* height: 30px; */
        font-size: 0.82rem;
    }
}

/* Tablet 576–767px: keep inline but tighten sizes */
@media (min-width: 576px) and (max-width: 767.98px) {
    .agenda-list-item {
        padding: 11px 14px;
    }

    .agenda-title {
        font-size: 0.87rem;
    }

    .btn-add-minutes {
        font-size: 0.73rem;
        padding: 5px 12px;
    }
}

/* ==========================================
   BILL DETAIL MODAL RESPONSIVE STYLES
   ========================================== */
@media (max-width: 991.98px) {
    #billDetailModal .row.g-0 {
        flex-direction: column !important;
        overflow-y: auto !important;
    }

    #billDetailModal .col-lg-8 {
        height: 55vh !important;
        min-height: 350px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    #billDetailModal .col-lg-4 {
        height: auto !important;
    }

    #billDetailModal #billViewerBody {
        height: 100% !important;
        min-height: 280px !important;
    }

    #billDetailModal #billModalImg {
        max-height: 100% !important;
        max-width: 90% !important;
        object-fit: contain;
    }

    #billDetailModal .col-lg-4 .btn-close {
        display: none !important;
    }

    #billDetailModal .col-lg-4 .p-4.pt-5.pb-3 {
        padding: 1.5rem 1.25rem 1rem !important;
    }

    #billDetailModal .col-lg-4 .modal-body.p-4.pt-2 {
        padding: 0.5rem 1.25rem 1.5rem !important;
        height: auto !important;
        overflow: visible !important;
    }

    #billDetailModal .col-lg-4 .p-4.rounded-4.mb-4 {
        padding: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    #billDetailModal #detailEst {
        font-size: 1.5rem !important;
    }

    #billDetailModal #detailAmount {
        font-size: 2rem !important;
    }

    #billDetailModal .nav-bill-btn {
        width: 38px !important;
        height: 38px !important;
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
    }

    #billDetailModal .nav-bill-btn i {
        font-size: 1.25rem !important;
    }
}

/* Responsive adjustments for insurance details grid */
@media (max-width: 991.98px) {
    .ins-split-layout {
        flex-direction: column;
        gap: 24px;
    }

    .ins-ticket-glow-wrap {
        flex: 1;
        max-width: 100%;
    }

    .ins-ticket-card {
        width: 100%;
    }

    .ins-info-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .ins-details-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ins-info-cards-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ins-hero-summary-card {
        padding: 0;
    }

    .ins-hero-amount-value {
        font-size: 26px;
    }

    .ins-hero-details-row {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }

    .ins-hero-detail-col:not(:last-child)::after {
        display: none;
    }

    .ins-member-badge {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        padding: 22px 20px;
    }

    .ins-member-info {
        align-items: center;
        text-align: center;
    }

    .ins-member-location {
        align-self: center;
        justify-content: center;
        width: fit-content;
        margin-top: 4px;
    }

    /* Member card stats: allow text wrapping on mid-size phones */
    .ins-member-stat-value {
        white-space: normal;
        word-break: break-word;
        font-size: 12.5px;
    }
}

@media (max-width: 575.98px) {
    .ins-ticket-card {
        border-radius: 16px;
    }

    .ins-ticket-header {
        padding: 18px 20px;
    }

    .ins-ticket-amount-value {
        font-size: 28px;
    }

    .ins-ticket-body {
        padding: 16px 20px 20px;
        gap: 14px;
    }

    .ins-ticket-barcode-container {
        margin-top: 8px;
        padding-top: 8px;
    }

    .ins-barcode-lines {
        height: 24px;
    }

    .ins-detail-strip {
        padding: 10px 14px;
        border-radius: 12px;
    }

    .ins-strip-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 8px;
    }

    .ins-strip-value {
        font-size: 13px;
    }

    .ins-detail-item {
        padding: 10px 14px;
        gap: 12px;
    }

    .ins-detail-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .ins-detail-value {
        font-size: 14px;
    }

    .ins-info-card {
        padding: 12px 16px;
        gap: 12px;
    }

    .ins-info-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .ins-info-value {
        font-size: 14px;
    }

    .ins-step-dot {
        width: 20px;
        height: 20px;
        border-width: 3px;
    }

    .ins-claim-steps::before {
        top: 18px;
    }

    .ins-step-label {
        font-size: 9.5px;
        letter-spacing: 0.2px;
    }

    .ins-member-badge {
        padding: 18px 16px;
        gap: 12px;
    }

    .ins-member-card-header {
        padding: 24px 18px 20px;
    }

    .ins-member-card-avatar {
        width: 60px;
        height: 60px;
    }

    .ins-member-card-name {
        font-size: 15px;
    }

    /* Stack stats vertically on small phones */
    .ins-member-card-body {
        flex-direction: column;
    }

    .ins-member-stat {
        padding: 14px 18px;
        gap: 12px;
        width: 100%;
    }

    /* Divider becomes horizontal when stacked */
    .ins-member-stat-divider {
        width: 100%;
        height: 1px;
        align-self: auto;
    }

    .ins-member-stat-icon {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .ins-member-stat-value {
        white-space: normal;
        word-break: break-word;
        font-size: 12.5px;
    }
}

/* ==========================================================================
   ALLOWANCE DETAILS HEADER — MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 767.98px) {

    /* Stack title and actions vertically */
    .allowance-header-section {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    /* Title: fluid font size */
    .allowance-header-title {
        font-size: clamp(0.88rem, 3vw + 0.2rem, 1rem) !important;
        line-height: 1.4;
    }

    /* Actions row: wrap, full width, spread evenly */
    .allowance-header-actions {
        width: 100% !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }

    /* Badges: smaller padding, auto-adjustable text */
    #selectedSumBadge,
    .allowance-header-actions>div {
        font-size: clamp(0.7rem, 2vw + 0.1rem, 0.8rem) !important;
        padding: 5px 10px !important;
    }

    /* Amount value inside badge */
    #totalApprovedAmtBadge {
        font-size: clamp(0.82rem, 2.5vw + 0.1rem, 0.95rem) !important;
    }

    /* Settle button: fill available width on very small screens */
    .allowance-settle-btn {
        width: 100% !important;
        justify-content: center !important;
        font-size: clamp(0.75rem, 2.2vw + 0.1rem, 0.85rem) !important;
        padding: 8px 12px !important;
    }
}

@media (max-width: 480px) {
    .allowance-header-title {
        font-size: clamp(0.82rem, 4vw + 0.1rem, 0.95rem) !important;
    }

    #selectedSumBadge,
    .allowance-header-actions>div {
        font-size: clamp(0.68rem, 2.5vw + 0.05rem, 0.78rem) !important;
        padding: 4px 8px !important;
    }
}

/* ==========================================================================
   MOBILE TYPOGRAPHY — AUTO-ADJUSTABLE FONTS (max-width: 767.98px)
   All content elements: body, headings, paragraphs, spans, table cells, etc.

   Uses clamp() for fluid scaling between 320px and 767px viewports.
   ========================================================================== */

@media (max-width: 767.98px) {

    /* ── Base body text ─────────────────────────────────────────── */
    body {
        font-size: clamp(0.82rem, 2.2vw + 0.3rem, 0.95rem) !important;
        line-height: 1.6;
    }

    /* ── Headings ───────────────────────────────────────────────── */
    h1,
    .h1 {
        font-size: clamp(1.35rem, 5vw + 0.4rem, 2rem) !important;
        line-height: 1.25;
    }

    h2,
    .h2 {
        font-size: clamp(1.15rem, 4vw + 0.3rem, 1.65rem) !important;
        line-height: 1.3;
    }

    h3,
    .h3 {
        font-size: clamp(1rem, 3.5vw + 0.2rem, 1.4rem) !important;
        line-height: 1.35;
    }

    h4,
    .h4 {
        font-size: clamp(0.9rem, 3vw + 0.15rem, 1.2rem) !important;
        line-height: 1.4;
    }

    h5,
    .h5 {
        font-size: clamp(0.85rem, 2.5vw + 0.1rem, 1.05rem) !important;
        line-height: 1.45;
    }

    h6,
    .h6 {
        font-size: clamp(0.8rem, 2.2vw + 0.1rem, 0.95rem) !important;
        line-height: 1.5;
    }

    /* ── Paragraphs & inline text ──────────────────────────────── */
    p {
        font-size: clamp(0.82rem, 2.2vw + 0.3rem, 0.95rem) !important;
        line-height: 1.65;
    }

    span {
        font-size: inherit;
    }

    /* ── Table cells ───────────────────────────────────────────── */
    table th,
    table thead th,
    .table th {
        font-size: clamp(0.7rem, 1.8vw + 0.2rem, 0.82rem) !important;
        white-space: nowrap;
    }

    table td,
    table tbody td,
    .table td {
        font-size: clamp(0.75rem, 2vw + 0.2rem, 0.85rem) !important;
    }

    /* ── Labels & form elements ────────────────────────────────── */
    label,
    .form-label {
        font-size: clamp(0.75rem, 2vw + 0.15rem, 0.85rem) !important;
    }

    .form-control,
    .form-select {
        font-size: clamp(0.8rem, 2.2vw + 0.2rem, 0.9rem) !important;
    }

    /* ── Buttons ───────────────────────────────────────────────── */
    .btn {
        font-size: clamp(0.78rem, 2vw + 0.2rem, 0.88rem) !important;
    }

    .btn-sm {
        font-size: clamp(0.7rem, 1.8vw + 0.15rem, 0.8rem) !important;
    }

    .btn-lg {
        font-size: clamp(0.88rem, 2.2vw + 0.2rem, 1rem) !important;
    }

    /* ── Badges / pills ────────────────────────────────────────── */
    .badge {
        font-size: clamp(0.6rem, 1.5vw + 0.1rem, 0.72rem) !important;
    }

    /* ── Custom font-size utility classes ──────────────────────── */
    .fs-xtra-tiny,
    .fs-xtra-tiny-8 {
        font-size: clamp(0.7rem, 1.5vw + 0.1rem, 0.65rem) !important;
    }

    .fs-tiny,
    .fs-tiny-9 {
        font-size: clamp(0.65rem, 1.7vw + 0.1rem, 0.72rem) !important;
    }

    .fs-small,
    .fs-sm-8 {
        font-size: clamp(0.75rem, 2vw + 0.1rem, 0.82rem) !important;
    }

    .fs-sm-75 {
        font-size: clamp(0.7rem, 1.8vw + 0.1rem, 0.78rem) !important;
    }

    .fs-sm-82 {
        font-size: clamp(0.76rem, 2vw + 0.1rem, 0.82rem) !important;
    }

    .fs-sm-85,
    .fs-7 {
        font-size: clamp(0.78rem, 2.1vw + 0.1rem, 0.85rem) !important;
    }

    .fs-sm-9,
    .fs-75 {
        font-size: clamp(0.8rem, 2.2vw + 0.1rem, 0.9rem) !important;
    }

    .fs-medium {
        font-size: clamp(0.88rem, 2.5vw + 0.1rem, 1rem) !important;
    }

    .fs-8 {
        font-size: clamp(0.8rem, 2.2vw + 0.1rem, 0.9rem) !important;
    }

    .fs-95 {
        font-size: clamp(0.85rem, 2.3vw + 0.1rem, 0.95rem) !important;
    }

    .fs-lg-18 {
        font-size: clamp(1rem, 3vw + 0.2rem, 1.25rem) !important;
    }

    .fs-xtra-small {
        font-size: clamp(0.65rem, 1.8vw + 0.1rem, 0.75rem) !important;
    }

    .font-12 {
        font-size: clamp(0.65rem, 1.7vw + 0.1rem, 0.75rem) !important;
    }

    /* ── Stat / display numbers ────────────────────────────────── */
    .stat-num {
        font-size: clamp(1rem, 3.5vw + 0.3rem, 1.35rem) !important;
    }

    .stat-label {
        font-size: clamp(0.62rem, 1.6vw + 0.1rem, 0.72rem) !important;
    }

    .text-stat-num {
        font-size: clamp(1rem, 3vw + 0.3rem, 1.3rem) !important;
    }

    .text-section-title {
        font-size: clamp(0.9rem, 2.5vw + 0.2rem, 1.05rem) !important;
    }

    .text-welcome {
        font-size: clamp(1.2rem, 4vw + 0.3rem, 1.65rem) !important;
    }

    .text-sm-label {
        font-size: clamp(0.62rem, 1.6vw + 0.1rem, 0.72rem) !important;
    }

    /* ── Page title / hero headings ────────────────────────────── */
    .page-h1 {
        font-size: clamp(1.1rem, 3.5vw + 0.3rem, 1.4rem) !important;
    }

    .page-heading-area h1,
    .page-heading-area h2,
    .page-heading-area h3 {
        font-size: clamp(1rem, 3vw + 0.3rem, 1.3rem) !important;
    }

    /* ── Card / profile value boxes ────────────────────────────── */
    .value-box-label {
        font-size: clamp(0.62rem, 1.6vw + 0.1rem, 0.7rem) !important;
    }

    .value-box-content {
        font-size: clamp(0.8rem, 2.2vw + 0.15rem, 0.9rem) !important;
    }

    /* ── Accordion / sidebar list ──────────────────────────────── */
    .acc-btn {
        font-size: clamp(0.8rem, 2.2vw + 0.1rem, 0.9rem) !important;
    }

    .list-group-item {
        font-size: clamp(0.78rem, 2vw + 0.1rem, 0.88rem) !important;
    }

    /* ── Dropdown menus ────────────────────────────────────────── */
    .dropdown-item {
        font-size: clamp(0.78rem, 2vw + 0.1rem, 0.87rem) !important;
    }

    .dropdown-header {
        font-size: clamp(0.62rem, 1.6vw + 0.1rem, 0.7rem) !important;
    }

    /* ── Modals ────────────────────────────────────────────────── */
    .modal-title {
        font-size: clamp(0.95rem, 2.8vw + 0.2rem, 1.15rem) !important;
    }

    .modal-body p,
    .modal-body span,
    .modal-body label {
        font-size: clamp(0.8rem, 2.2vw + 0.15rem, 0.9rem) !important;
    }

    /* ── Navigation / header ───────────────────────────────────── */
    .nav-link {
        font-size: clamp(0.78rem, 2vw + 0.1rem, 0.88rem) !important;
    }

    .navbar-brand {
        font-size: clamp(0.9rem, 2.5vw + 0.15rem, 1.05rem) !important;
    }

    /* ── Breadcrumbs ───────────────────────────────────────────── */
    .breadcrumb-item,
    .breadcrumb-item a {
        font-size: clamp(0.72rem, 1.8vw + 0.1rem, 0.8rem) !important;
    }

    /* ── Alerts ────────────────────────────────────────────────── */
    .alert {
        font-size: clamp(0.8rem, 2.2vw + 0.15rem, 0.9rem) !important;
    }

    /* ── Tooltips / popovers ───────────────────────────────────── */
    .tooltip-inner {
        font-size: clamp(0.7rem, 1.8vw + 0.1rem, 0.78rem) !important;
    }

    /* ── Placeholder / helper text ─────────────────────────────── */
    ::placeholder {
        font-size: clamp(0.78rem, 2vw + 0.1rem, 0.87rem) !important;
    }

    /* ── Pagination ────────────────────────────────────────────── */
    .page-link {
        font-size: clamp(0.75rem, 2vw + 0.1rem, 0.85rem) !important;
    }

    /* ── Progress label ─────────────────────────────────────────── */
    .prog-label,
    .prog-pct {
        font-size: clamp(0.68rem, 1.8vw + 0.1rem, 0.76rem) !important;
    }

    /* ── Section headings inside cards ─────────────────────────── */
    .card-title {
        font-size: clamp(0.88rem, 2.5vw + 0.15rem, 1.05rem) !important;
    }

    .card-subtitle {
        font-size: clamp(0.75rem, 2vw + 0.1rem, 0.85rem) !important;
    }

    /* ── Small / sub text ──────────────────────────────────────── */
    small,
    .small {
        font-size: clamp(0.68rem, 1.7vw + 0.1rem, 0.78rem) !important;
    }

    /* ── Ticker / news bar ─────────────────────────────────────── */
    .news-ticker-item {
        font-size: clamp(0.62rem, 1.6vw + 0.08rem, 0.72rem) !important;
    }

    /* ── Insurance detail values ───────────────────────────────── */
    .ins-strip-value,
    .ins-detail-value,
    .ins-info-value {
        font-size: clamp(0.78rem, 2vw + 0.1rem, 0.88rem) !important;
    }

    .ins-hero-amount-value {
        font-size: clamp(1.3rem, 4vw + 0.3rem, 1.8rem) !important;
    }

    /* ── Ticket / meeting values ───────────────────────────────── */
    .td-value {
        font-size: clamp(0.88rem, 2.5vw + 0.15rem, 1rem) !important;
    }

    .td-label {
        font-size: clamp(0.62rem, 1.6vw + 0.1rem, 0.72rem) !important;
    }

    /* ── Profile value / salary badge ──────────────────────────── */
    .profile-info-val {
        font-size: clamp(0.9rem, 2.5vw + 0.2rem, 1.1rem) !important;
    }

    .profile-info-lbl {
        font-size: clamp(0.6rem, 1.5vw + 0.08rem, 0.68rem) !important;
    }

    .salary-badge {
        font-size: clamp(0.72rem, 1.8vw + 0.1rem, 0.82rem) !important;
    }

}

/* ── Extra-small phones (≤ 480px): tighten further ─────────────── */
@media (max-width: 480px) {

    h1,
    .h1 {
        font-size: clamp(1.2rem, 6vw + 0.2rem, 1.5rem) !important;
    }

    h2,
    .h2 {
        font-size: clamp(1.05rem, 5vw + 0.2rem, 1.3rem) !important;
    }

    h3,
    .h3 {
        font-size: clamp(0.95rem, 4.5vw + 0.15rem, 1.15rem) !important;
    }

    h4,
    .h4 {
        font-size: clamp(0.88rem, 4vw + 0.1rem, 1.05rem) !important;
    }

    h5,
    .h5 {
        font-size: clamp(0.82rem, 3.5vw + 0.1rem, 0.95rem) !important;
    }

    h6,
    .h6 {
        font-size: clamp(0.78rem, 3vw + 0.1rem, 0.88rem) !important;
    }

    body,
    p {
        font-size: clamp(0.78rem, 3vw + 0.1rem, 0.88rem) !important;
    }

    table th,
    table thead th,
    .table th {
        font-size: clamp(0.65rem, 2vw + 0.1rem, 0.75rem) !important;
    }

    table td,
    table tbody td,
    .table td {
        font-size: clamp(0.7rem, 2.2vw + 0.1rem, 0.8rem) !important;
    }

    .mobile-card-table tbody td::before {
        font-size: clamp(0.7rem, 2.2vw + 0.1rem, 0.8rem) !important;
    }

    .modal-title {
        font-size: clamp(0.88rem, 3.5vw + 0.15rem, 1.05rem) !important;
    }

    .stat-num {
        font-size: clamp(0.95rem, 4vw + 0.2rem, 1.2rem) !important;
    }
}

/* Work Report Modal — horizontal scroll on mobile only */
@media (max-width: 767.98px) {
    .report-work-items .table-responsive1.wrk-report-modal {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 16vh;
    }

    .report-work-items {

        .td-description {
            min-width: 20rem;
        }

        .td-date {
            min-width: 6rem;
        }
    }

    .alt-log-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 12px;
    }
}

/* Attached bill link — fluid font size */
.wr-attached-bill a {
    font-size: clamp(0.6rem, 1.5vw + 0.35rem, 0.75rem);
}

@media (max-width: 575.98px) {
    .wr-attached-bill a {
        font-size: clamp(0.58rem, 2.5vw + 0.2rem, 0.7rem);
    }
}

/* Work Report View — header bar mobile responsive */
@media (max-width: 767.98px) {

    /* Fluid title font size */
    #viewWRCodeHeader {
        font-size: clamp(0.9rem, 4vw + 0.2rem, 1.1rem) !important;
        word-break: break-all;
    }

    /* Tighten modal header padding on mobile — keep right gap for abs close btn */
    #viewWorkReportDetailsModal .modal-header {
        padding: 0.75rem 1rem !important;
    }

    /* Header bar wraps: title full-width, download button on next row */
    #viewWorkReportDetailsModal .modal-header .wr-view-header-bar,
    .modal-header .wr-view-header-bar {
        flex-wrap: nowrap !important;
    }

    /* Actions row: only the download button, close is absolute */
    .wr-view-header-actions {
        width: auto;
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }

    /* Download button grows to fill available space */
    .wr-view-header-actions .btn-coa-primary.btn-round2 {
        flex: 1 1 0;
        justify-content: center;
        min-height: 36px;
        font-size: clamp(0.75rem, 3vw + 0.2rem, 0.88rem);
    }
}

@media (max-width: 380px) {


    /* Full-width download button on very small phones */
    .wr-view-header-actions .btn-coa-primary.btn-round2 {
        width: auto;
    }
}

/* Member Personal Details — card header responsive */
@media (max-width: 767.98px) {

    /* Stack the two flex groups vertically */
    .member-personal-details-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.6rem;
        padding: 1rem 1.25rem !important;
    }

    /* Left group: name + status badge + edit icon */
    .member-personal-details-header>div:first-child {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Name: fluid font size */
    .member-personal-details-header h5 {
        font-size: clamp(0.95rem, 4vw + 0.2rem, 1.15rem) !important;
        word-break: break-word;
        margin-bottom: 0;
    }

    /* Right group: Change Status — push to start, not end */
    .member-personal-details-header>div:last-child {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .member-personal-details-header {
        padding: 0.85rem 1rem !important;
    }

    .member-personal-details-header h5 {
        font-size: clamp(0.88rem, 5vw + 0.1rem, 1.05rem) !important;
    }
}