
/* =====================================================================
   MYNQORA V6.4 — PHONE EXPERIENCE
   Scope: phones only (<= 767px). Tablet/desktop are intentionally untouched.
   ===================================================================== */

.mqm-topbar,.mqm-bottom-nav,.mqm-overlay,.mqm-public-topbar{display:none}

@media (max-width:767px){
  :root{
    --mqm-top:64px;
    --mqm-bottom:72px;
    --mqm-bg:#020b12;
    --mqm-surface:#061722;
    --mqm-surface2:#081d29;
    --mqm-line:#123747;
    --mqm-text:#f2f8fa;
    --mqm-muted:#8198a7;
    --mqm-teal:#1fe1cc;
  }

  html{overflow-x:hidden!important;background:var(--mqm-bg)}
  body{overflow-x:hidden!important;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
  input,select,textarea{font-size:16px!important}

  /* ===================== SIGNED-IN PHONE SHELL ===================== */
  body.mq-app-body{
    padding:0!important;
    background:
      radial-gradient(circle at 50% -160px,rgba(20,174,163,.08),transparent 420px),
      #020b12!important;
  }
  .mq-app-body .mq6-topbar,
  .mq-app-body .mq6-sidebar{display:none!important}

  .mq-app-body .mq6-app-main{
    margin:0!important;
    padding-top:calc(var(--mqm-top) + env(safe-area-inset-top,0px))!important;
    padding-bottom:calc(var(--mqm-bottom) + 18px + env(safe-area-inset-bottom,0px))!important;
    min-width:0!important;
    width:100%!important;
  }

  .mqm-topbar{
    position:fixed;
    z-index:5000;
    top:0;left:0;right:0;
    height:calc(var(--mqm-top) + env(safe-area-inset-top,0px));
    padding:env(safe-area-inset-top,0px) 12px 0;
    display:grid;
    grid-template-columns:72px 1fr 86px;
    align-items:center;
    border-bottom:1px solid rgba(23,58,72,.82);
    background:rgba(2,11,18,.91);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
  }

  .mqm-profile{
    width:39px;height:39px;
    display:grid;place-items:center;
    border-radius:50%;
    border:1px solid #17616c;
    color:#eafffc;
    text-decoration:none;
    background:#071c27;
    font-weight:800;
    justify-self:start;
  }

  .mqm-brand{
    display:flex;align-items:center;justify-content:center;
    gap:8px;text-decoration:none;color:#f7fbfc;
    min-width:0;
  }
  .mqm-brand img{width:33px;height:33px;object-fit:contain;display:block;filter:drop-shadow(0 0 12px rgba(31,225,204,.25))}
  .mqm-brand b{font-size:13px;letter-spacing:.17em;white-space:nowrap}

  .mqm-top-actions{display:flex;justify-content:flex-end;align-items:center;gap:5px}
  .mqm-lang{
    width:36px;height:36px;display:grid;place-items:center;
    border:1px solid #123a48;border-radius:11px;
    color:#dcebed;text-decoration:none;font-size:12px;font-weight:800;
    background:#061620;
  }
  .mqm-notify{position:relative}
  .mqm-notify summary{
    width:38px;height:38px;display:grid;place-items:center;
    border:0;list-style:none;cursor:pointer;color:#dcebed;
    position:relative;
  }
  .mqm-notify summary::-webkit-details-marker{display:none}
  .mqm-notify summary svg{width:20px;height:20px}
  .mqm-notify summary i{
    position:absolute;top:1px;right:0;
    min-width:16px;height:16px;padding:0 4px;
    display:grid;place-items:center;border-radius:20px;
    background:#19cfb9;color:#021310;font-size:9px;font-style:normal;font-weight:900;
    border:2px solid #020b12;
  }
  .mqm-notify-panel{
    position:fixed;
    z-index:5300;
    top:calc(var(--mqm-top) + env(safe-area-inset-top,0px) - 1px);
    left:10px;right:10px;
    max-height:62vh;overflow:auto;
    padding:14px;border:1px solid #123747;border-radius:0 0 16px 16px;
    background:rgba(4,18,28,.985);
    box-shadow:0 24px 60px rgba(0,0,0,.42);
    direction:inherit;
  }
  .mqm-notify-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
  .mqm-notify-head a{color:#25dbc4;font-size:12px}
  .mqm-note{display:grid;grid-template-columns:28px 1fr;gap:9px;padding:10px 0;border-top:1px solid rgba(38,72,86,.5);color:#dce7eb;text-decoration:none}
  .mqm-note b,.mqm-note small{display:block}.mqm-note small{color:#7f96a4;margin-top:3px;font-size:11px}
  .mqm-notify-panel>p{color:#7f96a4;margin:12px 0}

  /* Bottom navigation */
  .mqm-bottom-nav{
    position:fixed;
    z-index:5000;
    left:0;right:0;bottom:0;
    min-height:calc(var(--mqm-bottom) + env(safe-area-inset-bottom,0px));
    padding:7px 7px env(safe-area-inset-bottom,0px);
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:3px;
    border-top:1px solid rgba(28,65,78,.92);
    background:rgba(3,13,21,.94);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    box-shadow:0 -14px 40px rgba(0,0,0,.28);
  }
  .mqm-bottom-nav>a,.mqm-bottom-nav>button{
    min-width:0;height:58px;padding:5px 2px;
    border:0;border-radius:12px;background:transparent;
    color:#768e9c;text-decoration:none;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
    font:inherit;cursor:pointer;
  }
  .mqm-bottom-nav svg{width:20px;height:20px}
  .mqm-bottom-nav span{font-size:10px;line-height:1;white-space:nowrap}
  .mqm-bottom-nav .active{color:#2ce2cb;background:rgba(15,128,132,.12)}
  .mqm-dots{height:20px!important;display:flex!important;align-items:center;justify-content:center;gap:3px}
  .mqm-dots i{width:4px;height:4px;background:currentColor;border-radius:50%}

  /* More / public menu bottom sheet */
  .mqm-overlay{
    position:fixed;z-index:6000;inset:0;
    display:flex;align-items:flex-end;
    background:rgba(0,5,9,.58);
    opacity:0;visibility:hidden;
    transition:opacity .18s ease,visibility .18s ease;
  }
  .mqm-overlay[hidden]{display:none!important}
  .mqm-overlay.is-visible{opacity:1;visibility:visible}
  .mqm-sheet{
    width:100%;max-height:min(82vh,720px);
    overflow:auto;
    border:1px solid #153b49;border-bottom:0;
    border-radius:24px 24px 0 0;
    padding:8px 14px calc(20px + env(safe-area-inset-bottom,0px));
    background:
      radial-gradient(circle at 50% -80px,rgba(25,207,185,.12),transparent 280px),
      #06141e;
    box-shadow:0 -28px 70px rgba(0,0,0,.5);
    transform:translateY(24px);
    transition:transform .2s ease;
  }
  .mqm-overlay.is-visible .mqm-sheet{transform:none}
  .mqm-sheet-handle{width:42px;height:4px;border-radius:5px;background:#31505d;margin:3px auto 12px}
  .mqm-sheet-user,.mqm-public-sheet-head{
    display:flex;align-items:center;justify-content:space-between;gap:12px;
    padding:7px 3px 15px;border-bottom:1px solid rgba(38,71,84,.62);
  }
  .mqm-sheet-user-main{display:flex;align-items:center;gap:11px;min-width:0}
  .mqm-sheet-avatar{width:43px;height:43px;border-radius:50%;display:grid;place-items:center;background:#0b514e;color:#edfffc;font-weight:900}
  .mqm-sheet-user-main b,.mqm-sheet-user-main small{display:block}
  .mqm-sheet-user-main small{color:#78919f;font-size:11px;margin-top:2px}
  .mqm-close{
    width:38px;height:38px;border-radius:12px;border:1px solid #183b49;
    background:#081a24;color:#b9c9d0;font-size:24px;line-height:1;cursor:pointer;
  }
  .mqm-sheet-grid{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;
    padding-top:13px;
  }
  .mqm-sheet-grid>a{
    min-height:73px;padding:12px 13px;border-radius:14px;
    border:1px solid rgba(25,60,73,.86);
    background:#071923;color:#d7e5e9;text-decoration:none;
    display:flex;align-items:center;gap:11px;position:relative;
  }
  .mqm-sheet-grid>a svg{width:21px;height:21px;flex:0 0 21px;color:#67a3ad}
  .mqm-sheet-grid>a span{font-size:13px;font-weight:700}
  .mqm-sheet-grid>a.active{border-color:#157583;background:rgba(12,84,91,.22);color:#31e3cd}
  .mqm-sheet-grid>a em{position:absolute;top:7px;left:8px;font-style:normal;font-size:8px;border-radius:8px;padding:2px 5px;background:#075159;color:#36e6d3}
  .mqm-sheet-grid .mqm-logout{color:#ff91a0;border-color:rgba(255,102,123,.2);background:rgba(255,102,123,.045)}
  .mqm-sheet-grid .mqm-logout svg{color:#ff8192}

  body.mqm-menu-open{overflow:hidden!important}

  /* ===================== APP CONTENT ON PHONE ===================== */
  .mq6-dashboard-shell{padding:10px!important}
  .mq6-summary-grid,.mq6-main-grid,.mq6-bottom-grid{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  .mq6-summary-grid .mq6-card{height:auto!important;min-height:122px!important}
  .mq6-main-grid>.mq6-card{height:auto!important;min-height:330px!important}
  .mq6-bottom-grid>.mq6-card{height:auto!important;min-height:210px!important}
  .mq6-card{border-radius:15px!important}
  .mq6-card-head{padding:14px 14px 8px!important}
  .mq6-card-head h2{font-size:15px!important}

  .mq6-bank-banner{grid-template-columns:1fr!important;height:auto!important;padding:18px!important;border-radius:15px!important}
  .mq6-bank-art{display:none!important}

  /* Market widget: no clipping on narrow screens */
  .mq6-market-widget{overflow:hidden!important;min-width:0!important}
  .mq6-market-widget tv-market-data{
    width:100%!important;min-width:100%!important;
    margin:0!important;transform:none!important;
    height:330px!important;min-height:330px!important;
  }
  .mq6-market-card{overflow:hidden!important}
  .mq6-markets-page{width:calc(100% - 20px)!important;margin:0 auto!important;padding:10px 0 24px!important}
  .mq6-markets-head{padding:17px!important;border-radius:15px!important}
  .mq6-market-live-card,.mq6-hot-card{height:auto!important;min-height:500px!important;overflow:hidden!important}
  .mq6-market-big-widget,.mq6-hot-widget{height:460px!important;max-width:100%!important;overflow:hidden!important}

  /* Legacy utility pages */
  .mq-app-body .mq6-app-main>.page-head{padding:10px 10px 5px!important}
  .mq-app-body .mq6-app-main>.page-head>.container{
    width:100%!important;padding:17px!important;border-radius:15px!important;
  }
  .mq-app-body .mq6-app-main>.page-head h1{font-size:24px!important}
  .mq-app-body .mq6-app-main>.section{padding:4px 10px 22px!important}
  .mq-app-body .mq6-app-main>.section>.container{width:100%!important}
  .mq-app-body .mq6-app-main>.section .stats{grid-template-columns:1fr!important;gap:9px!important}
  .mq-app-body .mq6-app-main>.section .panel,
  .mq-app-body .mq6-app-main>.section .form-card,
  .mq-app-body .mq6-app-main>.section .card{padding:15px!important;border-radius:15px!important}
  .mq-app-body .mq6-app-main>.section .grid-main,
  .mq-app-body .mq6-app-main>.section .grid-3,
  .mq-app-body .mq6-app-main>.section .calc-grid{
    grid-template-columns:1fr!important;
  }
  .mq-app-body .mq6-app-main>.section .table-wrap{
    width:100%!important;max-width:100%!important;
    overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;
  }
  .mq-app-body .mq6-app-main>.section table{min-width:650px!important}
  .mq-app-body .mq6-app-main>.section .btn{min-height:44px!important}
  .mq-app-body .mq6-app-main>.section .form-grid{grid-template-columns:1fr!important}

  /* Floating help sits above bottom nav */
  .m-floating-guide{
    bottom:calc(var(--mqm-bottom) + 13px + env(safe-area-inset-bottom,0px))!important;
    z-index:4800!important;
  }

  /* ===================== PUBLIC / VISITOR PHONE ===================== */
  body.mq-public-body{padding-top:calc(60px + env(safe-area-inset-top,0px))!important}
  .mq-public-body .site-header{display:none!important}

  .mqm-public-topbar{
    position:fixed;z-index:5000;top:0;left:0;right:0;
    height:calc(60px + env(safe-area-inset-top,0px));
    padding:env(safe-area-inset-top,0px) 13px 0;
    display:flex;align-items:center;justify-content:space-between;
    border-bottom:1px solid #102c38;
    background:rgba(2,11,18,.92);
    backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
  }
  .mqm-public-brand{display:flex;align-items:center;gap:8px;text-decoration:none;color:#f2f8fa}
  .mqm-public-brand img{width:34px;height:34px;object-fit:contain}
  .mqm-public-brand b{font-size:13px;letter-spacing:.17em}
  .mqm-public-actions{display:flex;align-items:center;gap:7px}
  .mqm-public-lang,.mqm-public-menu{
    width:39px;height:39px;border:1px solid #163b49;border-radius:12px;
    background:#061721;color:#dcebed;display:grid;place-items:center;
    text-decoration:none;font:inherit;font-weight:800;
  }
  .mqm-public-menu{padding:0}
  .mqm-public-menu i{width:17px;height:1.5px;background:currentColor;border-radius:3px;display:block;margin:2px auto}

  .mqm-public-sheet-head>a{display:flex;align-items:center;gap:8px;color:#f4f9fa;text-decoration:none}
  .mqm-public-sheet-head img{width:36px;height:36px}.mqm-public-sheet-head b{letter-spacing:.16em;font-size:13px}
  .mqm-public-links{display:flex;flex-direction:column;padding:8px 0}
  .mqm-public-links a{
    min-height:51px;padding:0 8px;color:#d7e5e9;text-decoration:none;
    display:flex;align-items:center;justify-content:space-between;
    border-bottom:1px solid rgba(34,66,80,.48);
  }
  .mqm-public-links a b{color:#3edcc6;font-size:22px;font-weight:400}
  html[dir="rtl"] .mqm-public-links a b{transform:rotate(180deg)}
  .mqm-public-cta{display:grid;gap:8px;padding-top:10px}
  .mqm-public-cta .btn{width:100%;min-height:46px;justify-content:center}

  /* Public hero + blogs become true phone sections */
  .mq-public-body main{overflow:hidden}
  .mq-public-body .container{width:100%!important;max-width:100%!important;padding-left:15px!important;padding-right:15px!important}
  .mq-public-body h1{font-size:clamp(40px,12vw,62px)!important;line-height:1.03!important}
  .mq-public-body .hero{padding-top:34px!important}
  .mq-public-body .hero-grid,
  .mq-public-body .v25-public-learn .container,
  .mq-public-body .v25-trust-grid{grid-template-columns:1fr!important}
  .mq-public-body .hero-actions{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  .mq-public-body .hero-actions .btn{width:100%!important;justify-content:center!important;min-height:48px!important}
  .mq-public-blog-head{align-items:stretch!important;flex-direction:column!important;gap:14px!important}
  .mq-public-blog-grid{grid-template-columns:1fr!important}
  .mq-public-blog-card{min-height:220px!important;padding:18px!important}
}

@media (max-width:390px){
  .mqm-topbar{grid-template-columns:55px 1fr 79px;padding-left:8px;padding-right:8px}
  .mqm-brand b{display:none}
  .mqm-bottom-nav span{font-size:9px}
  .mqm-sheet-grid{gap:7px}
  .mqm-sheet-grid>a{padding:10px;min-height:68px}
}
