/* Mobile authentication and trading layout. All financial behavior stays in existing scripts. */
@media(max-width:760px){
 .auth-page .screen>main{width:100%;max-width:520px;margin:0 auto;padding:28px 20px 40px;box-sizing:border-box}
 .auth-page .auth-grid{grid-template-columns:minmax(0,1fr);min-height:0;align-items:start;gap:24px;padding:0}
 .auth-page .auth-grid>div{min-width:0}
 .auth-page .auth-grid>div:first-child>img[alt=""]{display:none}
 .auth-page .auth-grid>div:first-child>img[alt="SELLBUYEX.IO"]{width:148px;max-width:65%;height:auto}
 .auth-page .screen .auth-grid h2{font-size:28px;line-height:1.4;letter-spacing:-.025em;margin:18px 0 8px;overflow-wrap:anywhere}
 .auth-page .auth-grid>div:first-child>p{font-size:14px;line-height:1.7;margin:0;color:var(--ui-muted)}
 .auth-page .screen .auth-grid section{margin:0;padding:22px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-panel)}
 .auth-page .auth-grid form label{font-size:13px;line-height:1.6;color:var(--ui-muted)}
 .auth-page .screen .auth-grid input{width:100%;min-width:0;min-height:48px;font-size:16px;line-height:1.5;margin:7px 0 18px;padding:11px 12px;border-color:var(--ui-line);background:var(--ui-field);color:var(--ui-ink);border-radius:8px}
 .auth-page .screen .auth-grid button{min-height:44px;font-size:14px;line-height:1.6;padding:10px 14px;border-radius:8px;white-space:normal;overflow-wrap:anywhere}
 .auth-page .screen .auth-grid .auth-primary{width:100%;margin:4px 0 0;border:1px solid transparent;background:var(--ui-accent);color:var(--ui-accent-ink);font-weight:650}
 .auth-page .screen .auth-grid form>[role=status]:empty{display:none}
 .auth-page .screen .auth-grid form>[role=status]:not(:empty){font-size:13px;line-height:1.7;margin:14px 0 0;color:var(--ui-muted)}
 .auth-page .screen .auth-grid section>.action{display:block;width:100%;margin:16px 0 0;text-align:center;padding:10px 12px;min-height:44px;border-color:var(--ui-line);font-size:14px;line-height:1.6;box-sizing:border-box;color:var(--ui-accent)}
 .auth-page .auth-grid form>div:not([hidden])>small{display:block;margin:4px 0 10px;font-size:12px;line-height:1.6;color:var(--ui-muted)}
 .auth-page .auth-grid form>div:not([hidden])>button{margin:0 8px 12px 0;border:1px solid var(--ui-line);background:var(--ui-field);color:var(--ui-ink)}
 .desk-page .screen main{min-width:0;padding:0 0 24px}
 .desk-page .screen h1{display:flex;align-items:center;flex-wrap:wrap;gap:8px;width:100%;min-height:66px;height:auto;box-sizing:border-box;padding:12px 16px 24px;margin:0;font-size:19px;line-height:1.5}
 .desk-page .screen h1 small{left:54px;bottom:4px;max-width:calc(100% - 70px);font-size:11px;line-height:1.5;white-space:normal}
 .desk-page .screen h1 .action{margin:0 0 0 auto;padding:6px 12px;font-size:13px;line-height:1.5;min-height:36px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-accent-soft);color:var(--ui-accent);white-space:nowrap;flex:none}
 .desk-page .desk-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;align-items:start;width:100%;box-sizing:border-box;padding:12px 16px 16px;border-bottom:1px solid var(--ui-line);font-variant-numeric:tabular-nums}
 .desk-page .desk-stats>strong{font-size:22px;line-height:1.3;max-width:100%;min-width:0}
 .desk-page .desk-stats>b{justify-self:end;align-self:center;font-size:14px;line-height:1.4}
 .desk-page .desk-stats>div{min-width:0}
 .desk-page .desk-stats>div small{font-size:10px;line-height:1.5;margin-bottom:3px;color:var(--ui-muted)}
 .desk-page .desk-stats>div b{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
 .desk-page .desk-stats>.feed-status{grid-column:1/-1;font-size:10px;line-height:1.4;margin-top:-4px}
 .desk-page .desk-layout{grid-template-columns:minmax(0,1fr)}
 .desk-page .desk-layout>aside:first-child{padding:12px 12px 8px}
 .desk-page .desk-layout>aside:first-child>input{min-height:44px;font-size:16px;margin:0 0 8px}
 .desk-page .desk-tabs{max-width:100%;gap:4px}
 .desk-page .desk-tabs button{min-height:36px;font-size:12px}
 .desk-page .desk-layout .live-market-list{gap:6px;padding:6px 0 4px;overscroll-behavior-x:contain}
 .desk-page .desk-layout .live-market-list a{padding:8px;border:1px solid var(--ui-line);border-radius:8px;min-width:140px;box-sizing:border-box;font-size:12px}
 .desk-page .chart-tools{min-width:0;padding:6px 10px;gap:4px}
 .desk-page .chart-tools :is(button,select){min-height:36px;padding:6px;font-size:11px}
 .desk-page .price-legend{font-size:10px;line-height:1.6;padding:6px 12px;overflow-wrap:anywhere}
 .desk-page .live-chart{height:300px;max-width:100%}
 .desk-page .desk-chart.chart-expanded .live-chart{height:calc(100dvh - 110px)}
 .desk-page .desk-layout>aside:last-child{display:block;min-width:0;overflow-x:auto;overscroll-behavior-x:contain}
 .desk-page .desk-layout>div>section:not(.desk-chart){padding:16px;margin:0 0 8px;min-width:0}
 .desk-page #spot-order{scroll-margin-top:70px}
 .desk-page #spot-order>.action{margin:8px 8px 0 0;padding:9px 12px;font-size:13px;border-color:var(--ui-line);border-radius:8px}
 .desk-page .screen .trade-forms{gap:12px;min-width:0}
 .desk-page .screen .trade-forms fieldset{margin:12px 0;padding:0;min-width:0}
 .desk-page .screen .trade-forms input[type=number]{font-size:16px;min-height:44px;padding:10px 8px;min-width:0;width:100%;box-sizing:border-box}
 .desk-page .trade-forms label{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
 .desk-page .order-modes button{min-height:40px;font-size:13px}
 .desk-page .allocation-steps{gap:2px;flex-wrap:wrap}
 .desk-page .allocation-steps button{min-height:28px;font-size:10px;padding:2px}
 .desk-page .trade-forms .trade-submit{min-height:44px;font-size:14px;white-space:normal;overflow-wrap:anywhere}
 .desk-page .margin-account{min-width:0;overflow-x:auto}
}
@media(max-width:380px){.auth-page .screen>main{padding:24px 16px 32px}.auth-page .screen .auth-grid section{padding:18px}.auth-page .screen .auth-grid h2{font-size:25px}.desk-page .desk-stats{gap:10px 12px}.desk-page .desk-stats>strong{font-size:20px}}

/* Shared desktop/mobile OTP timers and touch-friendly resend controls. */
.auth-code-step .auth-code-expiry{display:block!important;margin:12px 0!important;padding:10px 12px;border:1px solid var(--ui-line,#bccbd5);border-radius:8px;background:var(--ui-field,#eef2f5);font-size:14px!important;line-height:1.6;color:var(--ui-ink,#243747);font-variant-numeric:tabular-nums}.auth-code-step .auth-code-expiry.is-expired{color:#d64c59;border-color:#d64c5980}.auth-code-actions{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0 18px}.auth-code-actions>button{margin:0!important;min-height:44px;padding:10px 14px!important;font-size:14px!important;border:1px solid var(--ui-line,#bccbd5);border-radius:8px;line-height:1.5}.auth-code-actions>button:disabled{opacity:.65;cursor:wait}

@media (min-width: 761px) and (max-width: 850px) {
 .desk-page .desk-layout > aside:last-child {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
 }
}
