/* XMARKETS M07-X15 • Responsive Design Layer • 2026-10-26
 * Presentation only. No finance/trade behavior, notifications or status handling changed.
 * Loaded after the existing page styles and scoped to existing XMarkets view classes.
 */
:root{
  --xm15-bg:#090b0c;--xm15-panel:#151719;--xm15-panel2:#1a1d1e;
  --xm15-line:rgba(239,231,211,.12);--xm15-line-active:rgba(212,180,121,.36);
  --xm15-gold:#ddbd84;--xm15-gold2:#f1d5a0;--xm15-text:#f3f1ed;
  --xm15-muted:#aab0b0;--xm15-radius:16px;--xm15-shadow:0 18px 45px rgba(0,0,0,.20);
  --xm15-pad:clamp(13px,2vw,27px);color-scheme:dark;
}
html{scroll-padding-top:18px}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
*,*::before,*::after{box-sizing:border-box}
:where(main,section,article,form,nav,aside,header,footer){min-width:0}
:where(p,small,li,label,dd,dt){overflow-wrap:break-word}
:where(a,button,input,select,textarea,[role="button"]):focus-visible{outline:2px solid var(--xm15-gold2)!important;outline-offset:3px!important}
:where(input,select,textarea){accent-color:var(--xm15-gold);max-width:100%}
:where(button,input,select,textarea){font-family:inherit}
:where(button,[role="button"]):not(:disabled){cursor:pointer}
:where(button,input,select,textarea,a){-webkit-tap-highlight-color:rgba(212,180,121,.17)}
:where(button,a,select,input,textarea){touch-action:manipulation}
:where([disabled],[aria-disabled="true"]){cursor:not-allowed!important}
:where(table){font-variant-numeric:tabular-nums}
::selection{color:#fff4da;background:rgba(200,154,75,.33)}
/* Auth: no viewport lock, easy-thumb mobile forms, calmer hero + consistent branding. */
body:has(.xm-auth){overflow-y:auto!important;min-height:100dvh;background-color:var(--xm15-bg)!important}
.xm-auth{min-height:100dvh!important;padding:clamp(16px,3.5vw,48px)!important;align-items:center!important}
.xm-auth-shell{width:min(1180px,100%)!important;gap:clamp(22px,5vw,75px)!important;min-width:0!important}
.xm-auth-copy h1{letter-spacing:-.06em!important;line-height:1.04!important;font-size:clamp(36px,4.8vw,66px)!important}
.xm-auth-copy>p{font-size:clamp(13px,1.2vw,15px)!important;line-height:1.65!important;color:#a5aaa9!important}
.xm-login-card,.xm-register-card{max-width:100%!important;border:1px solid var(--xm15-line-active)!important;border-radius:23px!important;background:linear-gradient(155deg,rgba(29,31,30,.96),rgba(13,16,17,.96))!important;box-shadow:0 25px 75px rgba(0,0,0,.24)!important}
.xm-login-card :where(input,select),.xm-register-card :where(input,select){min-height:48px!important;font-size:16px!important;border-radius:12px!important}
.xm-login-card :where(button[type="submit"],input[type="submit"]),.xm-register-card :where(button[type="submit"],input[type="submit"]){min-height:48px!important;border-radius:12px!important;font-weight:750!important}
.xm-login-card :where(label),.xm-register-card :where(label){line-height:1.4!important}
.xm-auth :where(.xm-orbit,.xm-scan){pointer-events:none}
/* User dashboard frame: honor existing mobile drawer and existing bottom dock. */
body[data-xm-module]{background:#090b0d!important;color:var(--xm15-text);overflow-x:clip}
body[data-xm-module] .xm-main{min-width:0!important}
body[data-xm-module] .xm-module-area{max-width:1720px;min-width:0;margin-inline:auto}
body[data-xm-module] .xm-topbar{border-bottom-color:var(--xm15-line)!important;backdrop-filter:saturate(110%) blur(10px)}
body[data-xm-module] .xm-topbar-title h1{font-size:clamp(17px,1.7vw,24px)!important;letter-spacing:-.04em}
body[data-xm-module] .xm-topbar-context{font-size:9px;letter-spacing:.19em}
body[data-xm-module] .xm-sidebar{border-right:1px solid var(--xm15-line)!important}
body[data-xm-module] .xm-sidebar :where(a,button){transition:color .15s ease,background .15s ease,border-color .15s ease}
body[data-xm-module] .xm-sidebar .xm-menu a.active{color:var(--xm15-gold2)!important;background:rgba(215,179,119,.09)!important;border-color:rgba(215,179,119,.22)!important}
body[data-xm-module] :where(.xm-card,.xm-wallet-card,.xm-terminal-card,.xm-market-card,.xm-surface){border-radius:var(--xm15-radius);min-width:0}
body[data-xm-module] :where(.xm-card,.xm-wallet-card,.xm-surface){border-color:var(--xm15-line)}
body[data-xm-module] :where(h2,h3){letter-spacing:-.03em}
/* Trading terminal: chart first, compact details without touching order logic. */
body[data-xm-module="terminal"] .xm-live-terminal{max-width:none!important;min-width:0!important}
body[data-xm-module="terminal"] .xm-terminal-head{gap:16px!important;min-width:0!important}
body[data-xm-module="terminal"] .xm-live-terminal .xm-terminal-card{border-radius:16px!important;border-color:var(--xm15-line)!important}
body[data-xm-module="terminal"] .xm-live-terminal .xm-terminal-grid>*{min-width:0!important}
body[data-xm-module="terminal"] :where(.xm-market-watch-card,.xm-chart-card,.xm-order-card){min-width:0!important}
body[data-xm-module="terminal"] :where(button,select,input){max-width:100%}
/* Markets, wallet, portfolio, positions, bot store. */
body[data-xm-module="markets"] .xm-market-card{border-color:var(--xm15-line)!important;transition:border-color .15s ease,background-color .15s ease}
body[data-xm-module="markets"] .xm-market-card:hover{border-color:var(--xm15-line-active)!important}
body[data-xm-module="wallet"] .xm-wallet-buttons{display:flex;flex-wrap:wrap;gap:10px}
body[data-xm-module="wallet"] .xm-wallet-buttons :where(button,a){min-height:44px;flex:0 1 auto}
body[data-xm-module="wallet"] :where(.xm-wallet-card,.xm-status-card){border-color:var(--xm15-line)!important}
body[data-xm-module="bots"] .xb-shell{max-width:1520px!important;width:100%;padding-inline:clamp(10px,1.6vw,24px)!important}
body[data-xm-module="bots"] .xb-head h2{letter-spacing:-.045em}
body[data-xm-module="bots"] .xb-card{display:flex;flex-direction:column;gap:0;min-height:100%;background:linear-gradient(160deg,#191b1e,#111315)!important;border-color:var(--xm15-line)!important;box-shadow:var(--xm15-shadow)}
body[data-xm-module="bots"] .xb-card:hover{border-color:var(--xm15-line-active)!important}
body[data-xm-module="bots"] .xb-card .xb-cardfoot{margin-top:auto!important}
body[data-xm-module="bots"] .xb-card :where(button,.xb-button){width:100%;min-height:46px}
body[data-xm-module="bots"] .xb-card .xb-purchase{margin-top:12px}
body[data-xm-module="bots"] .xb-banner{line-height:1.6}
/* Admin dashboard: clean density, visual hierarchy, readable mobile sections. */
body:has(> .xm-shell) .xm-shell .xm-main{min-width:0}
body:has(> .xm-shell) :where(.xm-metric,.xm-panel,.xm-shortcut){border-color:var(--xm15-line)!important;border-radius:16px!important}
body:has(> .xm-shell) :where(.xm-metric,.xm-shortcut):hover{border-color:var(--xm15-line-active)!important}
body:has(> .xm-shell) .xm-sidebar{scrollbar-width:thin}
body:has(> .xm-shell) .xm-page-intro h1{font-size:clamp(30px,3vw,44px)}
body:has(> .xm-shell) .xm-section-label{align-items:end}
body:has(> .xm-shell) .xm-nav-link{min-height:42px}
body:has(> .xm-shell) :where(.xm-panel,.xm-record-list,.xm-shortcuts,.xm-feature-grid){min-width:0}
/* Admin standalone screens incl. Bot Store, SHARP, Publishing, financial tools. */
.xb-adminnav{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px clamp(14px,3vw,30px)!important;min-height:62px!important;border-color:var(--xm15-line)!important}
body:not([data-xm-module]) .xb-shell{width:min(1470px,100%);padding:clamp(16px,2vw,34px)!important}
body:not([data-xm-module]) :where(.xb-panel,.xb-card,.xm14-panel){border-color:var(--xm15-line)!important;border-radius:17px!important}
body:not([data-xm-module]) .xb-formgrid{grid-template-columns:repeat(auto-fit,minmax(min(215px,100%),1fr))!important;gap:14px!important}
body:not([data-xm-module]) :where(.xb-tablewrap,.xm14-tablewrap){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
body:not([data-xm-module]) :where(.xb-admin-table input,.xb-admin-table select){width:100%;min-width:0!important}
body:not([data-xm-module]) .xm14-shell{max-width:1480px;width:min(1480px,100%);margin-inline:auto}
body:not([data-xm-module]) :where(.xm14-nav,.xm14-hero,.xm14-panel){min-width:0}
/* Small screens. Applied late in cascade; no display:none on notices, payment or trading controls. */
@media(max-width:900px){
  .xm-auth{align-items:center!important;justify-content:flex-start!important;flex-direction:column!important;padding:20px 16px 32px!important}
  .xm-auth-shell{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:18px!important;width:calc(100vw - 40px)!important;max-width:560px!important;flex:none!important;margin-inline:auto!important}
  .xm-auth-copy{text-align:left!important;padding:0!important}
  .xm-mini-brand{justify-content:flex-start!important;margin:0 0 13px!important}
  .xm-auth-copy h1{font-size:clamp(29px,6.2vw,39px)!important;line-height:1.08!important;margin:8px 0!important}
  .xm-auth-copy>p{margin-top:8px!important;margin-bottom:2px!important;font-size:13px!important}
  .xm-data-strip,.xm-steps{display:none!important}
  .xm-login-card,.xm-register-card{width:100%!important;margin:0!important;border-radius:20px!important}
  body[data-xm-module="bots"] .xb-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body:has(> .xm-shell) .xm-main{padding-inline:clamp(13px,3vw,24px)!important}
}
@media(max-width:700px){
  :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){font-size:16px!important}
  :where(button,[role="button"]){min-height:40px}
  .xm-auth{padding:14px 12px 30px!important}
  .xm-auth-shell{width:calc(100vw - 24px)!important;max-width:560px!important;flex:none!important}
  .xm-auth-copy{padding:0 2px!important}
  .xm-auth-copy h1{font-size:clamp(26px,7vw,36px)!important;line-height:1.1!important}
  .xm-auth-copy>p{font-size:12px!important;line-height:1.5!important}
  .xm-login-card,.xm-register-card{padding:clamp(16px,4vw,26px)!important}
  .xm-login-card h2,.xm-register-card h2{font-size:clamp(25px,7vw,33px)!important;line-height:1.14}
  .xm-form{padding-inline:0!important}
  .xm-form :where(input,select){min-height:48px!important}
  .xm-auth :where(.xm-orbit,.xm-scan){display:none!important}
  body[data-xm-module] .xm-main{padding-bottom:calc(85px + env(safe-area-inset-bottom,0px))!important;min-width:0!important}
  body[data-xm-module] .xm-topbar{min-height:61px!important;padding-inline:14px!important}
  body[data-xm-module] .xm-module-area{padding-inline:clamp(10px,3vw,18px)!important;min-width:0!important}
  body[data-xm-module] .xm-mobile-dock{padding-bottom:max(5px,env(safe-area-inset-bottom,0px))!important;min-height:68px!important;box-shadow:0 -10px 25px rgba(0,0,0,.4)!important}
  body[data-xm-module] .xm-mobile-dock :where(a,button){min-height:46px!important}
  body[data-xm-module="bots"] .xb-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  body[data-xm-module="bots"] .xb-shell{padding-inline:0!important}
  body[data-xm-module="bots"] .xb-head{align-items:start}
  body[data-xm-module="bots"] .xb-head h2{font-size:clamp(27px,7.5vw,35px)!important}
  body[data-xm-module="bots"] .xb-card{padding:18px!important}
  body[data-xm-module="wallet"] .xm-wallet-buttons{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body[data-xm-module="wallet"] .xm-wallet-buttons :where(button,a){width:100%!important;min-height:46px!important;white-space:normal!important}
  body[data-xm-module="terminal"] .xm-terminal-head{flex-wrap:wrap!important}
  body[data-xm-module="terminal"] .xm-live-terminal .xm-terminal-grid{display:block!important}
  body[data-xm-module="terminal"] .xm-live-terminal #xm-live-chart{height:clamp(255px,45vh,350px)!important;min-height:235px!important}
  body[data-xm-module="terminal"] :where(.xm-terminal-mobile-tabs button,.xm-market-btn,.xm-tf){min-height:39px}
  body[data-xm-module="markets"] .xm-market-commandbar{gap:10px}
  body[data-xm-module="markets"] .xm-market-card{min-width:0!important}
  body:has(> .xm-shell) .xm-main{padding-inline:14px!important}
  body:has(> .xm-shell) .xm-page-intro{padding-block:22px!important}
  body:has(> .xm-shell) .xm-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  body:has(> .xm-shell) .xm-metric{padding:14px 12px!important}
  body:has(> .xm-shell) .xm-metric-value{font-size:clamp(25px,7vw,32px)!important}
  body:has(> .xm-shell) .xm-section-label{flex-wrap:wrap}
  body:not([data-xm-module]) .xb-shell{padding:16px 12px 30px!important}
  body:not([data-xm-module]) .xb-formgrid{grid-template-columns:1fr!important}
  body:not([data-xm-module]) :where(.xb-panel,.xm14-panel){padding:17px 14px!important}
  body:not([data-xm-module]) .xb-adminnav{padding:12px!important}
  body:not([data-xm-module]) :where(.xm14-shell,.xm14-grid){min-width:0;max-width:100%}
  body:not([data-xm-module]) :where(.xm14-grid){grid-template-columns:1fr!important}
  body:not([data-xm-module]) :where(.xb-shell button,.xb-shell .xb-button){min-height:45px}
  body:not([data-xm-module]) .xb-tablewrap{position:relative}
  body:not([data-xm-module]) .xb-tablewrap table{min-width:560px}
}
@media(max-width:390px){
  body[data-xm-module="wallet"] .xm-wallet-buttons{grid-template-columns:1fr!important}
  body[data-xm-module="bots"] .xb-card h3{font-size:21px!important}
  body:has(> .xm-shell) .xm-header-right .xm-session-pill{display:none}
}
@media(min-width:1100px){
  body[data-xm-module="bots"] .xb-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  body[data-xm-module="bots"] .xb-card{padding:19px!important}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
