/* =====================================================================
   ConvertBD - MOBILE APP LAYER
   ---------------------------------------------------------------------
   * Only affects phones (max-width: 767px). Desktop is NOT touched.
   * Load this file AFTER css/style.css and css/stylesheet.css.
   * Works together with js/mobile-app.js (bottom tab bar + "More" sheet).
===================================================================== */

/* The bottom bar / sheet exist in the DOM on every screen,
   but are hidden unless we are on a phone. */
.mapp-nav,
.mapp-sheet,
.mapp-sheet-bg {
    display: none;
}

@media (max-width: 767px) {

    :root {
        --m-green: #2e9e44;
        --m-green-dark: #1f7a33;
        --m-green-soft: #eaf6ec;
        --m-bg: #f1f4f1;
        --m-card: #ffffff;
        --m-text: #1b2a1f;
        --m-muted: #6b7a6f;
        --m-line: #e3e9e4;
        --m-radius: 16px;
        --m-nav-h: 62px;
        --m-bar-h: 56px;
        --m-safe-b: env(safe-area-inset-bottom, 0px);
        --m-safe-t: env(safe-area-inset-top, 0px);
    }

    /* ---------- base ---------- */
    html {
        -webkit-text-size-adjust: 100%;
        scroll-padding-top: calc(var(--m-bar-h) + var(--m-safe-t) + 8px);
    }

    [id] {
        scroll-margin-top: calc(var(--m-bar-h) + var(--m-safe-t) + 8px) !important;
    }

    /* NOTE: never put overflow:hidden on html AND body together - it can
       freeze page scrolling on phones. "clip" hides sideways overflow
       without turning the body into a scroll container. */
    html,
    body {
        background: var(--m-bg) !important;
        height: auto !important;
        min-height: 0;
    }

    @supports (overflow-x: clip) {
        body {
            overflow-x: clip;
        }
    }

    body {
        font-size: 15px;
        color: var(--m-text);
        -webkit-tap-highlight-color: transparent;
        -webkit-font-smoothing: antialiased;
        padding-bottom: calc(var(--m-nav-h) + var(--m-safe-b) + 14px) !important;
    }

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

    a,
    button,
    .btn,
    select,
    label {
        touch-action: manipulation;
    }

    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .row {
        margin-left: -6px !important;
        margin-right: -6px !important;
    }

    [class*="col-"] {
        padding-left: 6px;
        padding-right: 6px;
    }

    h1 { font-size: 22px; }
    h2 { font-size: 19px; }
    h3 { font-size: 16px; }

    /* ---------- top app bar ---------- */
    /* The app bar (logo + balance + bell) is FLOATING: it is fixed to the
       top of the screen and always visible. .header only keeps the space
       for it, so the operator strip starts right under the bar. */
    body .header {
        position: relative !important;
        z-index: 1040;
        background: #fff !important;
        padding-top: calc(var(--m-bar-h) + var(--m-safe-t)) !important;
        border: 0 !important;
        border-bottom: 1px solid var(--m-line) !important;
        min-height: 0 !important;
    }

    body .header-in {
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
        min-height: 0 !important;
        height: auto !important;
    }

    body .header-in > .container > .row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        margin: 0 !important;
        padding: 0;
    }

    /* logo column = the floating bar itself (full width, fixed to the top) */
    body .header-in > .container > .row > [class*="col-"]:nth-child(1) {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1040;
        display: flex;
        align-items: center;
        width: auto !important;
        height: calc(var(--m-bar-h) + var(--m-safe-t));
        padding: var(--m-safe-t) 12px 0 12px !important;
        float: none;
        background: rgba(255, 255, 255, .96);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        backdrop-filter: saturate(180%) blur(14px);
        border-bottom: 1px solid var(--m-line);
        box-shadow: 0 4px 18px rgba(20, 50, 28, .08);
        transition: box-shadow .2s ease;
    }

    body.mapp-scrolled .header-in > .container > .row > [class*="col-"]:nth-child(1) {
        box-shadow: 0 6px 22px rgba(20, 50, 28, .16);
    }

    body .header-in > .container > .row > [class*="col-"]:nth-child(1) > .row {
        flex: 1 1 auto;
        min-width: 0;
    }

    body .header-in .logo {
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
        float: none !important;
    }

    body .header-in .logo img {
        height: 34px !important;
        width: auto !important;
        max-width: min(170px, calc(100vw - 200px));
    }

    /* login / account (third column) = floats on the right side of the bar */
    body .header-in > .container > .row > [class*="col-"]:nth-child(3) {
        position: fixed !important;
        top: var(--m-safe-t);
        right: 0;
        z-index: 1041;
        display: flex;
        align-items: center;
        width: auto !important;
        height: var(--m-bar-h);
        padding: 0 12px 0 0 !important;
        float: none;
    }

    body .header-in > .container > .row > [class*="col-"]:nth-child(3) > .row,
    body .header-top,
    body .top2 {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
    }

    body .header-top,
    body .top2,
    body .login-reg {
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        text-align: right !important;
        background: transparent !important;
    }

    /* Logged-out: compact pill buttons */
    body .login-reg .signup,
    body .login-reg .login {
        display: inline-flex !important;
        align-items: center;
        gap: 5px;
        height: 36px;
        padding: 0 14px !important;
        border-radius: 999px !important;
        font-size: 13px !important;
        font-weight: 600;
        text-decoration: none !important;
        line-height: 1 !important;
    }

    body .login-reg .signup {
        background: var(--m-green-soft) !important;
        color: var(--m-green-dark) !important;
        border: 1px solid #cfe8d4 !important;
    }

    body .login-reg .login {
        background: var(--m-green) !important;
        color: #fff !important;
        border: 1px solid var(--m-green) !important;
    }

    /* Logged-in: icons only (text is hidden, balance + bell stay) */
    body .login-reg {
        font-size: 0 !important;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
    }

    body .login-reg > a:first-child:not(.signup):not(.login) {
        display: none !important;               /* big avatar icon: account is in bottom bar */
    }

    body .login-reg .member,
    body .login-reg .hidden-xs {
        display: none !important;
    }

    body .login-reg .label-success {
        display: inline-flex;
        align-items: center;
        height: 36px;
        font-size: 13px !important;
        font-weight: 700;
        padding: 0 12px !important;
        border-radius: 999px;
        background: var(--m-green) !important;
        white-space: nowrap;
        line-height: 1;
    }

    body .login-reg .label-success::before {
        font-family: FontAwesome;
        content: "\f0d6";
        font-weight: normal;
        margin-right: 6px;
        font-size: 14px;
    }

    body .login-reg .ex-notify-bell {
        margin: 0 !important;
        width: 38px;
        height: 38px;
        padding: 0 !important;
        border-radius: 50% !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 16px !important;
        background: #fff7e8 !important;
        border: 1px solid #f6e3bd !important;
    }

    /* account dropdown trigger becomes a round icon */
    body #account_nav {
        display: none !important;                /* profile icon removed on phones */
    }

    body #account_nav > .btn {
        width: 38px;
        height: 38px;
        padding: 0 !important;
        border-radius: 50% !important;
        font-size: 0 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--m-green-soft) !important;
        border: 1px solid #cfe8d4 !important;
    }

    body #account_nav > .btn .caret {
        display: none;
    }

    body #account_nav > .btn i {
        font-size: 16px !important;
    }

    body #account_nav .dropdown-menu {
        position: fixed !important;
        top: calc(56px + var(--m-safe-t)) !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        border-radius: 14px !important;
        max-height: 70vh;
        overflow-y: auto;
        box-shadow: 0 14px 40px rgba(0, 0, 0, .18) !important;
    }

    body #account_nav .dropdown-menu > li > a {
        padding: 13px 16px !important;
        font-size: 15px !important;
    }

    /* language flags are not needed in the bar */
    body #languages {
        display: none !important;
    }

    /* operator: slim status strip under the bar */
    body .header-in > .container > .row > [class*="col-"]:nth-child(2) {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        float: none;
        padding: 0;
        text-align: center;
    }

    body .header-in > .container > .row > [class*="col-"]:nth-child(2) > .row {
        margin: 0 !important;
    }

    /* operator box (Operator: online, working time, phones) - centred card */
    body .operator_box {
        padding: 10px 12px !important;
        margin: 8px 0 10px !important;
        text-align: center !important;
        font-size: 13px;
        line-height: 1.8;
        background: #f6faf6;
        border: 1px solid var(--m-line) !important;
        border-radius: var(--m-radius) !important;
        box-shadow: none !important;
    }

    body .operator_box b {
        white-space: nowrap;
        display: inline-block;
    }

    body .operator_box > i.fa-user-circle-o {
        font-size: 22px !important;
    }

    body .operator_box .label {
        font-size: 11px;
        padding: 4px 9px;
        border-radius: 999px;
    }

    /* the old top menu bar is replaced by the bottom tab bar */
    body .menu-ctnr {
        display: none !important;
    }

    /* ---------- scrolling notice ---------- */
    body #body-ctnr marquee {
        display: block;
        border-radius: 12px;
        margin: 10px 0 0;
        border: 1px solid var(--m-line);
        background: #fffdf5 !important;
    }

    body #body-ctnr marquee h3 {
        font-size: 12.5px !important;
        line-height: 1.5;
        margin: 0;
        padding: 9px 0;
        white-space: nowrap;
    }

    body .pt-3 {
        padding-top: 0 !important;
    }

    /* ---------- cards ---------- */
    body .widget,
    body .site-warning,
    body .panel,
    body .well,
    body .box,
    body .testimonial,
    body .news_box {
        border-radius: var(--m-radius) !important;
        box-shadow: 0 2px 14px rgba(20, 50, 28, .07) !important;
    }

    body .widget {
        border: 1px solid var(--m-line);
        margin-top: 12px;
        margin-bottom: 12px;
    }

    body .site-warning {
        margin: 12px 0 !important;
    }

    body .home_h1 {
        font-size: 28px !important;
        font-weight: 700;
        margin: 0 0 14px !important;
    }

    /* ---------- exchange form (home) ---------- */
    body #currency_send,
    body #currency_receive {
        font-size: 16px;
    }

    body .bootstrap-select {
        width: 100% !important;
    }

    body .bootstrap-select > .btn,
    body .form-control:not(.input-sm),
    body select.form-control:not(.input-sm),
    body input[type="text"]:not(.input-sm),
    body input[type="email"]:not(.input-sm),
    body input[type="password"]:not(.input-sm),
    body input[type="number"]:not(.input-sm),
    body input[type="tel"]:not(.input-sm),
    body textarea {
        min-height: 50px;
        border-radius: 14px !important;
        font-size: 16px !important;               /* stops iOS zoom on focus */
        border: 1.5px solid var(--m-line) !important;
        background: #fbfdfb !important;
        box-shadow: none !important;
    }

    body textarea {
        min-height: 110px;
    }

    body .form-control:focus,
    body input:focus,
    body textarea:focus,
    body .bootstrap-select.open > .btn {
        border-color: var(--m-green) !important;
        box-shadow: 0 0 0 3px rgba(46, 158, 68, .15) !important;
        outline: 0 !important;
    }

    /* pages force a 300px dropdown with !important - keep it inside the screen */
    body .bootstrap-select .dropdown-menu {
        width: auto !important;
        min-width: 100% !important;
        max-width: calc(100vw - 24px) !important;
        border-radius: 14px;
    }

    body .bootstrap-select .dropdown-menu li a {
        padding: 12px 14px;
    }

    /* old <br> spacing hacks used for xs */
    body br.visible-xs {
        display: none !important;
    }

    body form[name="form3"] h3 {
        font-size: 12px;
        letter-spacing: .08em;
        font-weight: 700;
        color: var(--m-muted);
        margin: 4px 0 8px;
    }

    body .swap-col {
        padding: 0 !important;
        margin: -6px 0;
        position: relative;
        z-index: 2;
    }

    body .swap-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--m-green) !important;
        color: #fff !important;
        border: 4px solid #fff !important;
        box-shadow: 0 4px 12px rgba(46, 158, 68, .35);
    }

    body .swap-btn i {
        transform: rotate(90deg);
    }

    body .home_btn {
        margin: 8px 0 0;
    }

    body .btn-lg,
    body .btn-success,
    body .btn-primary {
        border-radius: 14px !important;
    }

    body form .btn-lg,
    body #exbutton {
        width: 100%;
        min-height: 54px;
        font-size: 17px !important;
        font-weight: 700;
    }

    body .btn:not(.btn-xs):not(.btn-sm):not(.btn-link):not(.close) {
        min-height: 44px;
    }

    body .btn-success {
        background: var(--m-green) !important;
        border-color: var(--m-green-dark) !important;
    }

    body .btn:active {
        transform: scale(.97);
    }

    body hr {
        border-color: var(--m-line);
    }

    /* ---------- tables become swipeable ---------- */
    .mapp-table-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .mapp-table-wrap > table {
        margin-bottom: 0 !important;
    }

    body .table > thead > tr > th {
        background: var(--m-green-soft);
        white-space: nowrap;
        font-size: 12.5px;
    }

    body .table > tbody > tr > td {
        font-size: 13.5px;
        vertical-align: middle;
    }

    /* ---------- modal -> bottom sheet ---------- */
    body .modal.fade .modal-dialog {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0 !important;
        transform: translate3d(0, 100%, 0);
        transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    }

    body .modal.in .modal-dialog {
        transform: translate3d(0, 0, 0);
    }

    body .modal-content {
        border: 0 !important;
        border-radius: 22px 22px 0 0 !important;
        padding-bottom: var(--m-safe-b);
        max-height: 88vh;
        overflow-y: auto;
    }

    body .modal-header {
        border: 0;
        padding: 18px 18px 6px;
    }

    body .modal-header::before {
        content: "";
        display: block;
        width: 40px;
        height: 4px;
        border-radius: 4px;
        background: #d5ddd7;
        margin: -8px auto 12px;
    }

    /* ---------- footer ---------- */
    body #footer {
        margin-top: 18px !important;
        padding: 18px 0 8px !important;
        text-align: center;
        border-radius: 22px 22px 0 0;
    }

    body #footer [class*="col-"] {
        margin-bottom: 14px;
    }

    body #footer h3 {
        font-size: 14px !important;
        text-transform: uppercase;
        letter-spacing: .06em;
        margin: 6px 0 8px;
    }

    body #footer ul li {
        display: inline-block;
        margin: 3px 8px;
    }

    body #footer .copyright {
        white-space: normal !important;
        font-size: 12px;
    }

    body #footer .fa-2x {
        font-size: 26px;
        margin: 0 6px;
    }

    /* ---------- floating items sit above the tab bar ---------- */
    body .scrollup {
        bottom: calc(var(--m-nav-h) + var(--m-safe-b) + 14px) !important;
        right: 14px !important;
        z-index: 1030 !important;
    }

    body #ex-live-chat {
        bottom: calc(var(--m-nav-h) + var(--m-safe-b) + 14px) !important;
        right: 14px !important;
    }

    /* ---------- bottom tab bar ---------- */
    .mapp-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        height: calc(var(--m-nav-h) + var(--m-safe-b));
        padding: 0 6px var(--m-safe-b);
        background: rgba(255, 255, 255, .96);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        backdrop-filter: saturate(180%) blur(14px);
        border-top: 1px solid var(--m-line);
        box-shadow: 0 -6px 24px rgba(20, 50, 28, .07);
        transition: transform .22s ease;
    }

    body.mapp-kb .mapp-nav {
        transform: translateY(110%);              /* hide while typing */
    }

    .mapp-tab {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--m-muted) !important;
        font-size: 11px;
        font-weight: 600;
        text-decoration: none !important;
        background: none;
        border: 0;
        padding: 0;
        position: relative;
    }

    .mapp-tab i {
        font-size: 21px;
        line-height: 1;
        transition: transform .2s ease;
    }

    .mapp-tab.active {
        color: var(--m-green-dark) !important;
    }

    .mapp-tab.active i {
        transform: translateY(-2px);
    }

    .mapp-tab.active::after {
        content: "";
        position: absolute;
        top: 0;
        width: 26px;
        height: 3px;
        border-radius: 0 0 4px 4px;
        background: var(--m-green);
    }

    .mapp-tab:active i {
        transform: scale(.88);
    }

    /* center "Exchange" button */
    .mapp-tab.mapp-fab {
        flex: 0 0 74px;
    }

    .mapp-tab.mapp-fab i {
        width: 52px;
        height: 52px;
        margin-top: -22px;
        border-radius: 50%;
        background: linear-gradient(135deg, #3bb558, #1f7a33);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        box-shadow: 0 6px 16px rgba(31, 122, 51, .45);
        border: 4px solid #fff;
    }

    .mapp-tab.mapp-fab.active::after {
        display: none;
    }

    .mapp-badge {
        position: absolute;
        top: 7px;
        left: 56%;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 8px;
        background: #e74c3c;
        color: #fff;
        font-size: 10px;
        line-height: 16px;
        text-align: center;
    }

    /* ---------- "More" bottom sheet ---------- */
    .mapp-sheet-bg {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1060;
        background: rgba(10, 20, 14, .45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }

    .mapp-sheet {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1070;
        background: #fff;
        border-radius: 22px 22px 0 0;
        padding: 10px 16px calc(var(--m-safe-b) + 18px);
        max-height: 82vh;
        overflow-y: auto;
        transform: translateY(105%);
        transition: transform .3s cubic-bezier(.2, .8, .2, 1);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, .18);
    }

    body.mapp-sheet-open .mapp-sheet {
        transform: translateY(0);
    }

    body.mapp-sheet-open .mapp-sheet-bg {
        opacity: 1;
        pointer-events: auto;
    }

    body.mapp-sheet-open {
        overflow: hidden;
        touch-action: none;
    }

    .mapp-sheet-grip {
        width: 42px;
        height: 4px;
        border-radius: 4px;
        background: #d5ddd7;
        margin: 0 auto 14px;
    }

    .mapp-sheet h4 {
        margin: 0 0 12px;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--m-muted);
    }

    .mapp-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));   /* always 3 per row */
        gap: 10px;
    }

    .mapp-grid a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 14px 6px;
        border-radius: 14px;
        background: #f5f8f5;
        color: var(--m-text) !important;
        font-size: 12.5px;
        font-weight: 600;
        text-align: center;
        text-decoration: none !important;
        line-height: 1.25;
        word-break: break-word;
    }

    .mapp-grid a i {
        font-size: 22px;
        color: var(--m-green);
    }

    .mapp-grid a:active {
        background: var(--m-green-soft);
    }

    /* ---------- page entrance ---------- */
    @media (prefers-reduced-motion: no-preference) {
        body #body-ctnr {
            animation: mappIn .28s ease both;
        }

        @keyframes mappIn {
            from { opacity: 0; transform: translateY(8px); }
            to   { opacity: 1; transform: none; }
        }
    }
}

/* compact header buttons on narrow phones */
@media (max-width: 400px) {
    body .login-reg .signup,
    body .login-reg .login {
        padding: 0 12px !important;
        font-size: 12.5px !important;
        gap: 0;
    }

    body .login-reg .signup i,
    body .login-reg .login i {
        display: none;
    }

    body .login-reg .label-success {
        padding: 0 10px !important;
        font-size: 12.5px !important;
    }

    body .login-reg .label-success::before {
        display: none;
    }
}

/* very small phones */
@media (max-width: 360px) {
    .mapp-tab {
        font-size: 10px;
    }

    /* keep 3 per row on small phones too - just tighter */
    .mapp-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .mapp-grid a {
        padding: 12px 4px;
        font-size: 11.5px;
    }

    .mapp-grid a i {
        font-size: 20px;
    }

    body .header-in .logo img {
        max-height: 28px !important;
    }
}


/* =====================================================================
   PAGE GROUPS  (body gets class "page-<filename>" from header.inc.php)
===================================================================== */
@media (max-width: 767px) {

    /* ---- inner pages: back button in the app bar ---- */
    .mapp-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        margin-right: 8px;
        border-radius: 50%;
        background: var(--m-green-soft);
        color: var(--m-green-dark) !important;
        font-size: 18px;
        text-decoration: none !important;
        flex: 0 0 auto;
    }

    body .header-in .logo.mapp-has-back {
        display: flex !important;
        align-items: center;
    }

    /* ---- login / signup / forgot / activation: centred card ---- */
    body.page-login #body-ctnr,
    body.page-signup #body-ctnr,
    body.page-forgot #body-ctnr,
    body.page-activate #body-ctnr,
    body.page-activation_email #body-ctnr,
    body.page-verify_email #body-ctnr {
        padding-top: 8px !important;
    }

    body.page-login .widget,
    body.page-signup .widget,
    body.page-forgot .widget {
        padding: 18px 16px !important;
    }

    body.page-login .input-group,
    body.page-signup .input-group {
        width: 100%;
    }

    body.page-login .input-group-addon {
        border-radius: 14px 0 0 14px !important;
        background: var(--m-green-soft);
        border-color: var(--m-line);
    }

    body.page-login .input-group .form-control {
        border-radius: 0 14px 14px 0 !important;
    }

    body .checkbox label,
    body .radio label {
        padding-top: 2px;
        line-height: 1.5;
    }

    body input[type="checkbox"],
    body input[type="radio"] {
        width: 20px;
        height: 20px;
    }

    /* ---- reading pages ---- */
    body.page-aboutus #body-ctnr .container,
    body.page-terms #body-ctnr .container,
    body.page-privacy #body-ctnr .container,
    body.page-howitworks #body-ctnr .container,
    body.page-why-choose-convertbd #body-ctnr .container,
    body.page-content #body-ctnr .container,
    body.page-help #body-ctnr .container,
    body.page-news #body-ctnr .container {
        font-size: 15px;
        line-height: 1.7;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }

    body.page-aboutus img,
    body.page-terms img,
    body.page-privacy img,
    body.page-content img,
    body.page-news img,
    body.page-help img {
        height: auto !important;
        border-radius: 10px;
    }

    body.page-aboutus iframe,
    body.page-content iframe,
    body.page-news iframe {
        width: 100% !important;
    }

    body .pull-right.hidden-xs {
        display: none !important;
    }

    /* ---- rates / fees tables ---- */
    body.page-rates .table,
    body.page-rat .table,
    body.page-live-rate .table,
    body.page-buy_sell_rate .table,
    body.page-transaction-fee .table {
        font-size: 13px;
    }

    /* ---- exchange steps: keep the main button reachable ---- */
    body.page-exchange .btn-lg,
    body.page-exchange_step2 .btn-lg,
    body.page-exchange_step3 .btn-lg,
    body.page-exchange_step3s .btn-lg {
        width: 100%;
        min-height: 54px;
        font-size: 17px !important;
        font-weight: 700;
    }

    body.page-exchange_step3 pre,
    body.page-exchange_step3s pre,
    body.page-exchange_step3 code,
    body.page-exchange_step3s code {
        white-space: pre-wrap;
        word-break: break-all;
    }

    /* ---- account pages ---- */
    body.page-myaccount .nav-tabs,
    body.page-orders .nav-tabs,
    body.page-user-account .nav-tabs,
    body.page-mybalance .nav-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: 1px solid var(--m-line);
        scrollbar-width: none;
    }

    body.page-myaccount .nav-tabs::-webkit-scrollbar,
    body.page-orders .nav-tabs::-webkit-scrollbar,
    body.page-user-account .nav-tabs::-webkit-scrollbar,
    body.page-mybalance .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    body.page-myaccount .nav-tabs > li,
    body.page-orders .nav-tabs > li,
    body.page-user-account .nav-tabs > li,
    body.page-mybalance .nav-tabs > li {
        float: none;
        flex: 0 0 auto;
    }

    /* ---- support / chat ---- */
    body.page-chat #body-ctnr .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* ---- 404 ---- */
    body.page-404 #body-ctnr {
        text-align: center;
    }

    body.page-404 img {
        max-width: 80%;
        height: auto;
    }

    /* ---- alerts look like app toasts ---- */
    body .alert {
        border-radius: 14px;
        border-width: 1px;
        font-size: 14px;
        padding: 12px 14px;
    }

    /* ---- long unbroken text (wallet addresses, order ids) ---- */
    body #body-ctnr {
        overflow-wrap: anywhere;
    }
}

/* =====================================================================
   HEADER FIX - neutralise the old "fixed logo bar" from header.inc.php
   (it used position:fixed + .logo a {width:100%}, which fought with the
   new sticky app bar and stretched the back button into an ellipse)
===================================================================== */
@media (max-width: 767px) {

    body .header-in .logo {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        z-index: auto !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        float: none !important;
        clear: none !important;
        display: flex !important;
        align-items: center !important;
    }

    body .header-in .logo a {
        display: flex !important;
        align-items: center !important;
        height: auto !important;
        width: auto !important;
    }

    body .header-in .logo img {
        height: auto !important;
        width: auto !important;
        max-height: 34px !important;
        max-width: min(170px, calc(100vw - 200px)) !important;
        float: none !important;
    }

    /* inner pages also carry the round back button -> logo gets a bit less room */
    body .header-in .logo.mapp-has-back img {
        max-width: min(170px, calc(100vw - 252px)) !important;
    }

    /* round back button - fixed size, cannot be stretched by other rules */
    body .header-in .logo a.mapp-back {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        flex: 0 0 38px !important;
        justify-content: center !important;
        margin: 0 10px 0 0 !important;
        padding: 0 !important;
        border-radius: 50% !important;
    }

    body .header-in > .container {
        min-height: 0 !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    body .header-in .row {
        min-height: 0 !important;
    }

    /* nested rows had a negative margin that pushed the support icon to the edge */
    body .header-in .row .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* centre "Exchange" label with the other tab labels */
    .mapp-tab.mapp-fab span {
        position: relative;
        top: -4px;
    }
}

.mapp-grid a { position: relative; }

.mapp-grid .mapp-count {
    position: absolute;
    top: 6px;
    right: 14px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #f0ad4e;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
}

/* =====================================================================
   mobile-app.css এর শেষে এই পুরো অংশটা বসান
   (Welcome + user name + close button + notification count)
   আগে বসানো পুরনো WELCOME CARD / WELCOME (simple) CSS মুছে এটা দিন
===================================================================== */

/* ===== WELCOME (simple) ===== */
.mapp-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 16px 14px;
    padding: 0 0 14px;
    border-bottom: 1px solid #eee;
    background: none;
    box-shadow: none;
    color: #222;
}

.mapp-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eaf6e4;
    color: #2e9e44;
    font-size: 18px;
    font-weight: 700;
    line-height: 42px;
    text-align: center;
}

.mapp-welcome-text {
    flex: 1 1 auto;
    min-width: 0;
}

/* WELCOME BACK -> Welcome back */
.mapp-welcome-text small {
    display: block;
    font-size: 12px;
    color: #888;
    letter-spacing: 0;
    text-transform: lowercase;
    margin-bottom: 1px;
}

.mapp-welcome-text small::first-letter {
    text-transform: uppercase;
}

.mapp-welcome-text strong {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== CLOSE BUTTON ===== */
.mapp-close {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f3f3;
    color: #666;
    font-size: 16px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mapp-close:active {
    background: #e4e4e4;
}

/* ===== NOTIFICATION COUNT ===== */
.mapp-grid a {
    position: relative;
}

.mapp-grid .mapp-count {
    position: absolute;
    top: 6px;
    right: 14px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #f0ad4e;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
}

/* =====================================================================
   mobile-app.css এর শেষে এই পুরো অংশটা বসান
   (Welcome + user name + close button + notification count + click effect)
   আগে বসানো আমার দেওয়া সব পুরনো CSS মুছে শুধু এটা দিন
   JS ফাইলে কোনো বদল লাগবে না
===================================================================== */

/* ===== WELCOME (simple) ===== */
.mapp-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 16px 14px;
    padding: 0 0 14px;
    border-bottom: 1px solid #eee;
    background: none;
    box-shadow: none;
    color: #222;
}

.mapp-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eaf6e4;
    color: #2e9e44;
    font-size: 18px;
    font-weight: 700;
    line-height: 42px;
    text-align: center;
}

.mapp-welcome-text {
    flex: 1 1 auto;
    min-width: 0;
}

/* WELCOME BACK -> Welcome back */
.mapp-welcome-text small {
    display: block;
    font-size: 12px;
    color: #888;
    letter-spacing: 0;
    text-transform: lowercase;
    margin-bottom: 1px;
}

.mapp-welcome-text small::first-letter {
    text-transform: uppercase;
}

.mapp-welcome-text strong {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== CLOSE BUTTON ===== */
.mapp-close {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f3f3;
    color: #666;
    font-size: 16px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mapp-close:active {
    background: #e4e4e4;
}

/* ===== MENU ITEMS + CLICK EFFECT (পুরো বক্স সবুজ, আইকন-লেখা সাদা) ===== */
.mapp-grid a {
    position: relative;
    border-radius: 12px;
    transition: background 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

/* আঙুল চেপে ধরলে + ক্লিক হয়ে গেলে (পেজ লোড হওয়ার সময়) */
.mapp-grid a:active,
.mapp-grid a.mapp-clicked {
    background: #2e9e44;
    transform: scale(0.96);
}

.mapp-grid a:active i,
.mapp-grid a:active span,
.mapp-grid a.mapp-clicked i,
.mapp-grid a.mapp-clicked span {
    color: #ffffff !important;
}

/* ===== এখন যে পেজে আছেন, সেই আইটেম সবসময় সবুজ ===== */
.mapp-grid a.mapp-current {
    background: #2e9e44;
}

.mapp-grid a.mapp-current i,
.mapp-grid a.mapp-current span {
    color: #ffffff !important;
}

/* ===== NOTIFICATION COUNT ===== */
.mapp-grid .mapp-count {
    position: absolute;
    top: 6px;
    right: 14px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #f0ad4e;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
}

/* ===== MORE MENU: current page = green box + white icon/text ===== */
@media (max-width: 767px) {
    body .mapp-sheet .mapp-grid a.mapp-current,
    body .mapp-sheet .mapp-grid a.mapp-clicked,
    body .mapp-sheet .mapp-grid a:active {
        background: #2e9e44 !important;
    }

    body .mapp-sheet .mapp-grid a.mapp-current i,
    body .mapp-sheet .mapp-grid a.mapp-current span,
    body .mapp-sheet .mapp-grid a.mapp-clicked i,
    body .mapp-sheet .mapp-grid a.mapp-clicked span,
    body .mapp-sheet .mapp-grid a:active i,
    body .mapp-sheet .mapp-grid a:active span {
        color: #ffffff !important;
    }
}

/* ===== Welcome section er gap komano ===== */
body .mapp-sheet {
    padding-top: 8px !important;
}

body .mapp-sheet .mapp-sheet-grip {
    margin: 0 auto 8px !important;      /* grip er niche gap */
}

body .mapp-sheet .mapp-welcome {
    margin: 0 0 8px !important;         /* upore 0, niche 8px */
    padding: 0 0 8px !important;        /* border er age gap */
    gap: 10px;
}

body .mapp-sheet .mapp-welcome-text small {
    margin: 0 !important;
    line-height: 1.2;
}

body .mapp-sheet .mapp-welcome-text strong {
    line-height: 1.2;
    margin: 0 !important;
}