/* ==========================================================
   Agamudaiyar Matrimony - cross-device responsive overrides
   Keeps existing desktop design while fixing narrow screens.
   ========================================================== */

html {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden !important;
}

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

input, select, textarea, button {
    min-width: 0;
}

/* Prevent long profile values / names from disappearing on small phones. */
[class*="profile"],
[class*="detail"],
[class*="info"],
[class*="content"],
[class*="meta"],
.form-group,
.input-group,
.row > * {
    min-width: 0;
}

@media (max-width: 991.98px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Header should take normal document space on mobile/tablet.
       This avoids overlap, scaling/repaint blur and device-specific offsets. */
    .hom-top {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        padding: 10px 0 !important;
        transform: none !important;
        filter: none !important;
        -webkit-filter: none !important;
        backface-visibility: visible !important;
    }

    .hom-top.act {
        position: relative !important;
        top: auto !important;
        animation: none !important;
        transform: none !important;
    }

    .hom-head,
    .inn-ban,
    .all-pro-head {
        margin-top: 0 !important;
    }

    .hom-nav {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .logo,
    .hom-nav .logo {
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .logo img,
    .hom-nav .ic-logo {
        max-width: 100% !important;
        object-fit: contain;
        image-rendering: auto;
    }

    /* Logged-in header: menu/logo on first row, search on the next row. */
    .search-member-id {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 8px 0 0 !important;
    }

    .search-member-id form {
        width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        gap: 8px;
    }

    .search-member-id input,
    .search-member-id .form-control {
        flex: 1 1 auto !important;
        width: 1% !important;
        min-width: 0 !important;
        height: 46px;
        font-size: 16px !important;
    }

    .search-member-id button,
    .search-member-id .btn {
        flex: 0 0 auto !important;
        min-height: 46px;
        white-space: nowrap !important;
    }

    /* Dashboard / detail containers must not keep desktop fixed widths. */
    .db,
    .db-sec-com,
    .db-new-pro-main,
    .db-new-pro-main1,
    .dashboard-user-summary,
    .profi-bio,
    .profile-details,
    .search-results-panel,
    .search-filter-panel,
    .all-matches-page,
    .search-results-v2,
    .login-main,
    .form-login,
    .edit-pro-parti {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .dashboard-user-summary,
    .results-toolbar,
    .profile-title-row,
    .profile-card-actions,
    .match-category-tabs,
    .filter-edit-row {
        min-width: 0 !important;
    }

    /* Long values on single-profile/detail pages: show full text, don't clip. */
    .pr-bio-info ul li,
    .profi-bio ul li,
    .profile-detail-list span,
    .profile-title-row h3,
    .db-pro-stat-desc,
    .db-pro-stat-name,
    .db-invoice-lhs,
    .db-invoice-rhs {
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .pr-bio-info ul li b {
        max-width: 42% !important;
        min-width: 105px;
    }

    .pr-bio-info ul li span,
    .pr-bio-info ul li p {
        min-width: 0 !important;
        max-width: 58% !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        overflow-wrap: anywhere;
    }

    /* Responsive tables retain all columns via local scrolling only. */
    .table-responsive,
    .responsive-table-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        max-width: 100%;
    }

    /* Forms */
    .login,
    .pro-edit-update {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .login .rhs,
    .login .lhs,
    .login .rhs .inn,
    .form-login,
    .ban-search {
        max-width: 100% !important;
    }

    .form-control,
    .form-select,
    .chosen-container,
    .select2-container {
        max-width: 100% !important;
    }

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

@media (max-width: 767.98px) {
    .head-top {
        display: none !important;
    }

    .hom-top {
        min-height: 0 !important;
    }

    /* Public header: clean single header block without stretched/blurred menu. */
    .hom-top .hom-nav {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 8px 10px !important;
    }

    .hom-top .logo-brand {
        margin-left: 0 !important;
    }

    .mobile-hamburger,
    .hom-top .btn-outline-dark {
        min-width: 42px;
        min-height: 42px;
        font-size: 16px;
        line-height: 1;
        transform: none !important;
        filter: none !important;
    }

    #goLogin1,
    #languageSwitcher,
    .lang-select {
        min-height: 40px;
        font-size: 13px !important;
    }

    /* Home/login/register banner should grow with form content. */
    .hom-head {
        height: auto !important;
        min-height: 0 !important;
        padding: 26px 0 34px !important;
        overflow: visible !important;
    }

    .hom-head > .container > .row,
    .hom-head .row.align-items-center {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .banner-copy {
        margin-bottom: 22px !important;
    }

    .banner-title,
    .ban-tit h1 {
        font-size: clamp(25px, 7vw, 34px) !important;
        line-height: 1.45 !important;
        overflow-wrap: anywhere;
    }

    .ban-search {
        width: 100% !important;
        float: none !important;
        margin: 0 auto !important;
        padding: 18px 14px !important;
        border-radius: 14px !important;
        overflow: visible !important;
    }

    /* login.php had Bootstrap d-none on the whole auth column. */
    .mobile-auth-column,
    .mobile-auth-column.d-none,
    .mobile-auth-column.d-md-block {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    #login_form .row > [class*="col-"],
    #registerForm_form .row > [class*="col-"],
    .pro-edit-update .row > [class*="col-md-"],
    .form-login .row > [class*="col-md-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* Keep the 3 DOB selectors usable in one row. */
    #registerForm_form .form-group .row.g-2 > .col-4 {
        width: 33.333333% !important;
        max-width: 33.333333% !important;
        flex: 0 0 33.333333% !important;
    }

    .ban-search input,
    .ban-search select,
    .ban-search textarea,
    .form-login input,
    .form-login select,
    .form-login textarea,
    .edit-pro-parti input,
    .edit-pro-parti select,
    .edit-pro-parti textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 46px;
        font-size: 16px !important;
    }

    .ban-search input[type="submit"],
    .form-login button[type="submit"],
    .form-login input[type="submit"] {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 46px;
    }

    /* Search and matches pages */
    .search-results-v2 .search-page-grid,
    .all-matches-layout {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    .search-filter-panel,
    .search-results-panel {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .profile-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .search-profile-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .search-profile-media {
        height: auto !important;
        aspect-ratio: 4 / 3;
    }

    .results-toolbar,
    .results-head {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .sort-control-wrap {
        width: 100% !important;
        flex-wrap: wrap !important;
        white-space: normal !important;
    }

    .matches-sort-select {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .match-category-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .match-category-tab {
        width: 100% !important;
        min-width: 0 !important;
        justify-content: center !important;
        white-space: normal !important;
        text-align: center;
    }

    /* Dashboard horizontal menu should wrap rather than force page scrolling. */
    .dash-menu-nav,
    .dash-menu-list {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .dash-menu-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        white-space: normal !important;
    }

    .dash-menu-list li,
    .dash-menu-link {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    .dash-menu-link {
        justify-content: center !important;
        white-space: normal !important;
        text-align: center;
    }

    /* Modals/offcanvas */
    .modal-dialog {
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        margin: 12px auto !important;
    }

    .offcanvas {
        max-width: min(86vw, 340px) !important;
    }

    footer,
    .wed-hom-footer,
    .foot-inn {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}

@media (max-width: 575.98px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hom-top .logo img {
        height: auto !important;
        max-height: 62px !important;
        width: auto !important;
        max-width: min(48vw, 180px) !important;
    }

    /* Logged-in logo is wider and contains Tamil text; allow more width. */
    .user-mobile-menu + .hom-top .logo img,
    .hom-nav .ic-logo {
        max-width: min(64vw, 230px) !important;
    }

    .search-member-id input,
    .search-member-id .form-control {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .search-member-id button,
    .search-member-id .btn {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .banner-title,
    .ban-tit h1 {
        font-size: clamp(23px, 7.3vw, 30px) !important;
    }

    .banner-features {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .banner-features li {
        width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        text-align: center !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    .banner-features span {
        display: block !important;
        line-height: 1.25 !important;
    }

    .profile-card-actions {
        flex-wrap: wrap !important;
    }

    .profile-card-actions .view-profile-btn {
        flex: 1 1 100% !important;
    }

    .filter-two-col {
        grid-template-columns: 1fr !important;
    }

    .pr-bio-info ul li {
        display: grid !important;
        grid-template-columns: minmax(105px, 40%) minmax(0, 1fr) !important;
        gap: 10px !important;
        align-items: start !important;
    }

    .pr-bio-info ul li b,
    .pr-bio-info ul li span,
    .pr-bio-info ul li p {
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        float: none !important;
    }

    .edit-pro-parti {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

@media (max-width: 400px) {
    .hom-top .container {
        padding-left: 9px !important;
        padding-right: 9px !important;
    }

    .mobile-hamburger,
    .hom-top .btn-outline-dark {
        padding-left: 9px !important;
        padding-right: 9px !important;
        font-size: 14px !important;
    }

    #goLogin1,
    #languageSwitcher,
    .lang-select {
        font-size: 12px !important;
    }

    .match-category-tabs,
    .dash-menu-list {
        grid-template-columns: 1fr !important;
    }

    .search-member-id form {
        gap: 6px !important;
    }

    .search-member-id button,
    .search-member-id .btn {
        padding-left: 10px !important;
        padding-right: 10px !important;
        font-size: 13px !important;
    }
}

/* =========================================================
   2026-09-04 Dashboard profile carousel mobile refinement
   - Suggested Profiles: 2 cards per row/viewport on phones
   - Recently Viewed Profiles: 2 cards per row/viewport on phones
   ========================================================= */
@media (max-width: 575.98px) {
    .db-new-pro-main1 {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .db-new-pro-main1 > .d-flex,
    .db-new-pro-main1 .db-tit {
        min-width: 0 !important;
    }

    .db-new-pro-main1 .db-tit {
        font-size: 22px !important;
        line-height: 1.25 !important;
        margin-bottom: 14px !important;
        white-space: normal !important;
    }

    .db-new-pro-main1 ul.slider {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .db-new-pro-main1 ul.slider .slick-list {
        width: 100% !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 2px 0 10px !important;
    }

    .db-new-pro-main1 ul.slider .slick-track {
        display: flex !important;
        align-items: stretch !important;
    }

    .db-new-pro-main1 ul.slider .slick-slide {
        height: auto !important;
        padding: 0 6px !important;
        box-sizing: border-box !important;
    }

    .db-new-pro-main1 ul.slider .slick-slide > div,
    .db-new-pro-main1 ul.slider .slick-slide > li {
        /* height: 100% !important; */
        width: 100% !important;
    }

    .db-new-pro-main1 ul.slider.slick-initialized li {
        width: 100% !important;
        margin: 0 !important;
        float: none !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .db-new-pro-main1 .db-new-pro {
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        border-radius: 13px !important;
    }

    .db-new-pro-main1 .db-new-pro .profile,
    .db-new-pro-main1 .db-new-pro img.profile,
    .db-new-pro-main1 .db-new-pro img.pro {
        width: 100% !important;
        height: 175px !important;
        min-height: 175px !important;
        object-fit: cover !important;
        border-radius: 13px !important;
    }

    .db-new-pro-main1 .db-new-pro .bi-lock-fill.profile,
    .db-new-pro-main1 .db-new-pro > .bi-lock-fill {
        width: 100% !important;
        height: 175px !important;
        min-height: 175px !important;
        font-size: 5.3rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #fff3f7 !important;
    }

    .db-new-pro-main1 .wedd-rel-con {
        width: calc(100% - 16px) !important;
        margin: -24px 8px 0 !important;
        padding: 10px 7px 9px !important;
        min-height: 102px !important;
        box-sizing: border-box !important;
    }

    .db-new-pro-main1 .wedd-rel-con h5 {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
        margin: 0 0 3px !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .db-new-pro-main1 .wedd-rel-con .age,
    .db-new-pro-main1 .wedd-rel-con span.age {
        font-size: 11px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }

    .db-new-pro-main1 .wedd-rel-con .icon-section {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 5px !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }
}

@media (max-width: 360px) {
    .db-new-pro-main1 ul.slider .slick-slide {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .db-new-pro-main1 .db-new-pro .profile,
    .db-new-pro-main1 .db-new-pro img.profile,
    .db-new-pro-main1 .db-new-pro img.pro,
    .db-new-pro-main1 .db-new-pro .bi-lock-fill.profile,
    .db-new-pro-main1 .db-new-pro > .bi-lock-fill {
        height: 155px !important;
        min-height: 155px !important;
    }

    .db-new-pro-main1 .wedd-rel-con h5 {
        font-size: 12px !important;
    }
}


/* ===== Agam mobile app navigation + filter bottom sheet (v3) ===== */
.checkbox-multi-select {
    position: relative;
    width: 100%;
}
.checkbox-multi-toggle {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid #eadce2;
    border-radius: 10px;
    background: #fff;
    color: #3a333d;
    text-align: left;
}
.checkbox-multi-label {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.checkbox-multi-placeholder { color: #8f858a; font-size: 13px; }
.checkbox-selected-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid #ffc7d8;
    border-radius: 7px;
    background: #fff0f5;
    color: #d9366a;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
}
.checkbox-multi-toggle > .fa { flex: 0 0 auto; color: #f74d7e; transition: transform .2s ease; }
.checkbox-multi-select.open .checkbox-multi-toggle > .fa { transform: rotate(180deg); }
.checkbox-multi-menu {
    display: none;
    position: absolute;
    z-index: 10520;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid #eadce2;
    border-radius: 12px;
    box-shadow: 0 14px 35px rgba(43, 31, 38, .14);
}
.checkbox-multi-select.open .checkbox-multi-menu { display: block; }
.checkbox-multi-search { margin-bottom: 8px; }
.checkbox-multi-options { max-height: 230px; overflow-y: auto; overscroll-behavior: contain; }
.checkbox-multi-option {
    display: flex !important;
    align-items: center;
    gap: 9px;
    width: 100%;
    margin: 0 !important;
    padding: 9px 7px;
    border-radius: 8px;
    color: #40373c;
    font-size: 13px;
    cursor: pointer;
}
.checkbox-multi-option:hover { background: #fff4f7; }
.checkbox-multi-option input { width: 17px; height: 17px; accent-color: #f74d7e; flex: 0 0 auto; }

.mobile-filter-trigger,
.mobile-filter-close { display: none; }
.filter-head-actions { display: flex; align-items: center; gap: 8px; }
.filter-head-actions > .fa {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff0f5;
    color: #ff4b81;
}

.mobile-app-bottom-nav { display: none; }

@media (max-width: 767.98px) {
    body.has-mobile-app-nav { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
    body.mobile-filter-open { overflow: hidden !important; }

    .mobile-app-bottom-nav {
        position: fixed;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        left: 10px;
        right: 10px;
        bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 10020;
        min-height: 62px;
        padding: 6px;
        border: 1px solid #f0d9e0;
        border-radius: 20px;
        background: rgba(255,255,255,.97);
        box-shadow: 0 10px 30px rgba(44,28,35,.16);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .mobile-app-bottom-nav a {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 5px 3px;
        border-radius: 14px;
        color: #7d7378 !important;
        text-decoration: none !important;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.1;
    }
    .mobile-app-bottom-nav a i { font-size: 20px; line-height: 1; }
    .mobile-app-bottom-nav a.active {
        background: #fff0f5;
        color: #f43f78 !important;
    }

    .mobile-filter-trigger {
        display: flex;
        width: 100%;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin: 0 0 14px;
        border: 0;
        border-radius: 14px;
        background: linear-gradient(135deg,#ff5d8f,#ff3f79);
        color: #fff;
        font-size: 14px;
        font-weight: 800;
        box-shadow: 0 8px 20px rgba(255,75,129,.22);
    }

    .mobile-filter-close {
        display: inline-flex;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 12px;
        background: #f7f3f5;
        color: #554a50;
    }

    .mobile-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 10040;
        background: rgba(28,18,22,.46);
        opacity: 0;
        visibility: hidden;
        transition: opacity .22s ease, visibility .22s ease;
    }
    body.mobile-filter-open .mobile-filter-backdrop { opacity: 1; visibility: visible; }

    .search-filter-panel.mobile-popup-filter {
        display: block !important;
        position: fixed !important;
        z-index: 10050 !important;
        left: 0 !important;
        right: 0 !important;
        top: 7vh !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 93vh !important;
        margin: 0 !important;
        padding: 18px 16px calc(24px + env(safe-area-inset-bottom)) !important;
        border-radius: 24px 24px 0 0 !important;
        border: 0 !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        box-shadow: 0 -12px 40px rgba(31,18,24,.18) !important;
        transform: translateY(105%);
        transition: transform .26s ease;
        background: #fff !important;
    }
    body.mobile-filter-open .search-filter-panel.mobile-popup-filter { transform: translateY(0); }
    .mobile-popup-filter .search-filter-head {
        position: sticky;
        z-index: 4;
        top: -18px;
        margin: -18px -16px 16px;
        padding: 16px;
        background: #fff;
        border-radius: 24px 24px 0 0;
    }
    .mobile-popup-filter .search-filter-form { display: block !important; }
    .mobile-popup-filter .search-submit-btn {
        position: sticky;
        bottom: 0;
        z-index: 3;
        min-height: 48px;
        margin-top: 12px;
    }
    .mobile-popup-filter .checkbox-multi-menu {
        position: static;
        margin-top: 6px;
        max-height: none;
        box-shadow: none;
    }
    .mobile-popup-filter .checkbox-multi-options { max-height: 210px; }
}

/* ===== Agam Matrimony mobile app shell (v4) ===== */
.agam-mobile-app-header { display: none; }

@media (max-width: 767.98px) {
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Replace website chrome with native-app-like chrome on logged-in mobile pages */
    body.mobile-app-user .head-top,
    body.mobile-app-user .hom-top {
        display: none !important;
    }

    .agam-mobile-app-header {
        position: sticky;
        top: 0;
        z-index: 10015;
        width: 100%;
        min-height: 118px;
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
        background: rgba(255,255,255,.98);
        border-bottom: 1px solid #f2e5e9;
        box-shadow: 0 4px 18px rgba(52,31,39,.06);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .agam-app-header-main {
        width: 100%;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        gap: 8px;
    }

    .agam-app-header-tools {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 108px;
        gap: 8px;
        align-items: center;
    }

    .agam-app-member-search {
        min-width: 0;
        display: flex;
        align-items: center;
        height: 40px;
        border: 1px solid #f0d8e1;
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
    }

    .agam-app-member-search input {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        height: 100%;
        border: 0;
        padding: 0 10px;
        color: #3e2528;
        font-size: 13px;
        outline: 0;
    }

    .agam-app-member-search button {
        flex: 0 0 42px;
        width: 42px;
        height: 40px;
        border: 0;
        background: #f74d7e;
        color: #fff;
        font-size: 14px;
    }

    .agam-app-lang-select {
        width: 100% !important;
        min-width: 0 !important;
        height: 40px;
        padding: 0 8px !important;
        border-color: #f0d8e1 !important;
        border-radius: 12px !important;
        color: #f74d7e !important;
        font-size: 12px !important;
        background: #fff !important;
    }

    .agam-app-icon-btn,
    .agam-app-profile-btn {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        border-radius: 14px;
        background: #fff3f7;
        color: #ef3f76;
        text-decoration: none !important;
        box-shadow: inset 0 0 0 1px #f8dbe4;
    }

    .agam-app-icon-btn {
        font-size: 19px;
        cursor: pointer;
    }

    .agam-app-profile-btn {
        overflow: hidden;
        justify-self: end;
    }

    .agam-app-profile-btn img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        border-radius: inherit;
    }

    .agam-app-brand {
        min-width: 0;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        text-decoration: none !important;
    }

    .agam-app-brand img {
        display: block;
        max-width: min(100%, 245px);
        width: auto;
        height: 44px;
        object-fit: contain;
    }

    /* Content gets app-like spacing rather than desktop header spacing */
    body.mobile-app-user .hom-head,
    body.mobile-app-user .db,
    body.mobile-app-user .db-main,
    body.mobile-app-user .wedd-pro,
    body.mobile-app-user .inn-ban,
    body.mobile-app-user main {
        margin-top: 0 !important;
    }

    body.has-mobile-app-nav {
        padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    }

    /* Real app-style bottom tab bar */
    .mobile-app-bottom-nav {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        min-height: 68px !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 0 !important;
        padding: 7px 5px calc(7px + env(safe-area-inset-bottom)) !important;
        border: 0 !important;
        border-top: 1px solid #f0e1e6 !important;
        border-radius: 0 !important;
        background: rgba(255,255,255,.985) !important;
        box-shadow: 0 -5px 20px rgba(48,29,36,.08) !important;
    }

    .mobile-app-bottom-nav a {
        min-height: 52px;
        gap: 4px !important;
        padding: 5px 1px !important;
        border-radius: 12px !important;
        color: #8d8186 !important;
        font-size: 9.5px !important;
        font-weight: 700 !important;
        letter-spacing: -.05px;
    }

    .mobile-app-bottom-nav a i {
        width: 30px;
        height: 27px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 19px !important;
        line-height: 1 !important;
        border-radius: 10px;
    }

    .mobile-app-bottom-nav a.active {
        background: transparent !important;
        color: #f43f78 !important;
    }

    .mobile-app-bottom-nav a.active i {
        background: #fff0f5;
    }

    /* Desktop copyright/footer is not part of logged-in app shell */
    body.mobile-app-user > section .cr,
    body.mobile-app-user .site-footer {
        display: none !important;
    }

    /* Floating WhatsApp should not cover bottom navigation */
    body.mobile-app-user .whatsapp-float {
        bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    }

    /* Offcanvas menu also feels like an app drawer */
    .user-mobile-menu {
        width: min(86vw, 330px) !important;
        border: 0 !important;
        border-radius: 0 22px 22px 0;
    }

    .user-mobile-menu .offcanvas-header {
        padding: calc(18px + env(safe-area-inset-top)) 18px 14px !important;
        background: #fff8fa;
    }

    .user-mobile-menu .offcanvas-body {
        padding: 14px 16px calc(22px + env(safe-area-inset-bottom));
    }

    .mobile-profile-box {
        border-radius: 16px !important;
        padding: 13px !important;
        background: #fff1f5 !important;
    }

    .mobile-user-links a {
        min-height: 48px;
        padding: 12px 8px !important;
        border-radius: 10px;
        border-bottom: 0 !important;
        margin-bottom: 3px;
    }

    .mobile-user-links a:active {
        background: #fff1f5;
    }
}

@media (max-width: 360px) {
    .agam-mobile-app-header {
        padding-left: 10px;
        padding-right: 10px;
    }
    .agam-app-header-main {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
    }
    .agam-app-header-tools {
        grid-template-columns: minmax(0, 1fr) 92px;
    }
    .agam-app-icon-btn,
    .agam-app-profile-btn {
        width: 40px;
        height: 40px;
    }
    .agam-app-brand img { height: 39px; }
    .mobile-app-bottom-nav a { font-size: 8.8px !important; }
    .mobile-app-bottom-nav a i { font-size: 18px !important; }
}


@media (max-width: 575.98px) {

    .dashboard-user-summary {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px !important;
    }

    .dashboard-user-summary__photo-wrap {
        flex: 0 0 72px;
        width: 72px;
        height: 72px;
    }

    .dashboard-user-summary__photo {
        width: 72px !important;
        height: 72px !important;
        border-radius: 10px;
        object-fit: cover;
    }

    .dashboard-user-summary__content {
        flex: 1;
        min-width: 0;
    }

    .dashboard-user-summary__eyebrow {
        display: none;
    }

    .dashboard-user-summary__name {
        font-size: 18px !important;
        line-height: 1.2;
        margin: 0 0 6px !important;
        font-weight: 700;
    }

    .dashboard-user-summary__meta {
        display: flex;
        flex-wrap: wrap;
        gap: 5px 12px;
        margin: 0 !important;
    }

    .dashboard-user-summary__meta span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 12px;
        line-height: 1.3;
        white-space: nowrap;
    }

    .dashboard-user-summary__meta span:last-child {
        flex-basis: 100%;
    }

    .dashboard-user-summary__meta i {
        font-size: 12px;
        color: #f74d7e;
    }
}
