/* TechBroFX compact phone layout (v33): denser Account page and TradeLocker terminal on small screens.
   Loaded last on account.html and tradelocker.html. Desktop layouts are not touched. */

/* =============================== ACCOUNT (TechBro HQ) =============================== */
@media(max-width:700px){
  .tbx{gap:10px}
  .tbx-grid,.tbx-main,.tbx-aside,.tbx-two{gap:10px}
  /* hero: one slim row + two small buttons */
  .tbx-hero{padding:12px;gap:10px 12px;border-radius:16px}
  .tbx-av{width:56px;height:56px}
  .tbx-av .tbx-ring{width:100%;height:100%}
  .tbx-av span{font-size:26px}
  .tbx-id{flex:1 1 0;min-width:0}
  .tbx-id small{font-size:9.5px;letter-spacing:.16em}
  .tbx-id h1{font-size:20px;margin:0 0 2px}
  .tbx-id p{font-size:12px;margin:0 0 6px}
  .tbx-since{display:none}
  .tbx-xp{height:7px}
  .tbx-xpt{font-size:11.5px;margin-top:4px}
  .tbx-hb{flex:1 1 100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .tbx-hb .btn{min-height:38px;padding:0 10px;font-size:13px}
  /* stat tiles: one swipe strip instead of three rows */
  .tbx-tiles{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none;padding:1px 1px 3px;-webkit-overflow-scrolling:touch}
  .tbx-tiles::-webkit-scrollbar{display:none}
  .tbx-tile{flex:0 0 auto;min-width:96px;padding:8px 12px;border-radius:12px;scroll-snap-align:start}
  .tbx-tile small{font-size:9px}
  .tbx-tile b{font-size:19px}
  .tbx-tile span{display:block;font-size:10.5px;white-space:nowrap}
  /* tabs: slim and always reachable */
  .tbx-tabs{position:sticky;top:var(--tbh,64px);z-index:30;gap:5px;margin:0;padding:6px 6px;border-radius:14px;border:1px solid var(--line);background:rgba(8,8,8,.94);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
  :root[data-theme="light"] .tbx-tabs{background:rgba(255,255,255,.95)}
  .tbx-tabs button{min-height:34px;padding:0 13px;font-size:13px}
  /* quick actions: swipe pills, no card chrome */
  .tbx-qc{padding:0;background:none;border:0;box-shadow:none;border-radius:0}
  .tbx-qc>h3{display:none}
  .tbx-qa{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:1px 1px 3px;-webkit-overflow-scrolling:touch}
  .tbx-qa::-webkit-scrollbar{display:none}
  .tbx-qa a,.tbx-qa button{flex:none;flex-direction:row;min-height:40px;padding:0 14px;border-radius:99px;gap:8px;font-size:12.5px;white-space:nowrap}
  .tbx-qa i{font-size:16px}
  /* cards */
  .tbx-c{padding:12px 13px;border-radius:14px}
  .tbx-c h3{font-size:14.5px;margin:0 0 8px}
  .tbx-c p{margin:0 0 8px}
  .tbx-msg{font-size:14px;line-height:1.5}
  .tbx-ses{margin:2px 0 8px;gap:5px}
  .tbx-ses span{padding:3px 9px;font-size:11px}
  .tbx-tip{font-size:12.5px;line-height:1.5}
  .tbx-kv{margin:6px 0 8px;gap:6px}
  .tbx-kv b{font-size:17px}
  .tbx-spark{height:64px}
  .tbx-list li{padding:6px 0}
  .tbx-acl li{padding:8px 0}
  .tbx-feed li{padding:6px 0}
  .tbx-feed li:nth-child(n+6){display:none}
  .tbx-agrid{grid-template-columns:1fr 1fr;gap:8px}
  .tbx-badge{padding:9px}
  .tbx-badge>i{font-size:24px}
  .tbx-pick{grid-template-columns:repeat(6,1fr);gap:6px}
  .tbx-pick button{font-size:20px;border-radius:10px}
  .tbx-calc{grid-template-columns:1fr 1fr;gap:8px}
  .tbx-calc input,.tbx-calc select,.tbx-f input[type=number],.tbx-f select{min-height:40px;font-size:14px}
  .tbx-f{margin-bottom:8px}
  .tbx-cardcv{max-width:100%;margin-bottom:8px}
  .tbx-sm{min-height:36px;padding:0 12px;font-size:13px}
  /* collapsible side cards (tap the title) */
  .tbx-fd>h3{display:flex;align-items:center;margin:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .tbx-fd>h3:after{content:"";margin:-3px 3px 0 auto;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .2s}
  .tbx-fd.open>h3{margin-bottom:8px}
  .tbx-fd.open>h3:after{transform:rotate(-135deg);margin-top:3px}
  .tbx-fd:not(.open)>:not(h3){display:none}
  /* Deriv wallet card */
  .acct-wallet{padding:12px;margin:10px 0;border-radius:14px}
  .aw-bal{font-size:24px}
  .aw-btns .btn{min-width:0;min-height:38px}
  #a-wallet,#a-deriv{margin-top:10px}
}

/* =============================== TRADELOCKER TERMINAL (phones and tablets) =============================== */
@media(max-width:999px){
  .tx-trade{gap:8px}
  .tx-hud{margin:0 0 6px}
  .tx-stats{margin-bottom:8px}
  .tx-findrow{gap:6px}
  .tx-cats button{padding:6px 12px;font-size:11.5px}
  .tx-mk{padding:6px}
  /* Order settings + Market info fold away until you tap them */
  .tx-info>h2,.tx-set>h2{display:flex;align-items:center;gap:8px;margin:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .tx-info>h2:after,.tx-set>h2:after{content:"";margin:-3px 3px 0 auto;width:8px;height:8px;border-right:2px solid #a1a1a1;border-bottom:2px solid #a1a1a1;transform:rotate(45deg);transition:transform .2s}
  .tx-info.open>h2,.tx-set.open>h2{margin-bottom:10px}
  .tx-info.open>h2:after,.tx-set.open>h2:after{transform:rotate(-135deg);margin-top:3px}
  .tx-info:not(.open)>:not(h2),.tx-set:not(.open)>:not(h2){display:none}
  .tx-fh{font:500 11px var(--body);letter-spacing:0;text-transform:none;color:#858585}
  .tx-info,.tx-set{padding:12px}
  /* AI Bots page: slim hero strip */
  .tx-ai{gap:8px}
  .tx-hero{flex-direction:row;align-items:center;position:static;border-radius:14px}
  .tx-hero .tx-fig{width:92px;max-width:92px;min-height:96px;align-self:stretch}
  .tx-hero .tx-fig .tx-botpic{left:6px;top:6px;width:calc(100% - 12px);height:calc(100% - 12px);border-radius:10px}
  .tx-hero .tx-fig[data-has="1"]:after{left:6px;top:6px;right:6px;bottom:6px;border-radius:10px}
  .tx-hero .tx-figtag{left:9px;right:9px;bottom:9px;padding:2px 4px;font-size:8px}
  .tx-hero-t{padding:10px 12px 10px 4px}
  .tx-hero h3{font-size:12px}
  .tx-hero h3 b{display:inline;margin-left:5px;font-size:18px}
  .tx-hero p{display:none}
  .tx-hero .tx-selbot{margin:3px 0 6px}
  .tx-hero .tx-selbot b{font-size:13px}
  .tx-hstat{gap:8px}.tx-hstat .tl-orb{width:24px;height:24px}
}
@media(max-width:640px){
  .tx .tl-card{padding:12px;border-radius:14px}
  .tx-chart{padding:8px 9px}
  .tx .tx-chart canvas{height:230px}
  .tl-card .tx-symr h2#tl-name{font-size:16px}
  .tx-big{font-size:clamp(20px,6vw,26px)}
  .tx-st{padding:5px 8px 6px}
  .tx-pos{padding:10px}
  .tx-plist{gap:5px}
  .tx-prow{padding:9px 12px;border-radius:10px}
  .tx-psym{font-size:14px}.tx-ppl{font-size:15px}
  .tx-hrow{padding:8px 12px;border-radius:10px}
  .tx-orow{padding:8px 12px;border-radius:10px}
  .tx-hsum{gap:5px;margin-bottom:8px}.tx-hsum>div{padding:6px 8px}.tx-hsum b{font-size:13px}
  /* AI bot builder */
  .tx .tl-ai{padding:10px}
  .tx .ez{gap:8px}
  .tx .ez-step{margin-top:2px;gap:8px}
  .tx .ez-step b{font-size:14px}
  .tx .ez-step small{display:none}
  .tx .ez-bots{gap:8px;padding:2px 2px 8px}
  .tx .ez-bot{width:92px;padding:5px}
  .tx .ez-bot b{font-size:11px}
  .tx .ez-sum{padding:8px 10px}
  .tx .ez-sum .ez-fine{font-size:10.5px;margin-top:2px}
  .tx .ez-grid{grid-template-columns:1fr 1fr!important;gap:8px}
  .tx .ez-f>span{font-size:11.5px}
  .tx .ez-f:not(.ez-wide)>small{display:none}
  .tx .ez-modes{grid-template-columns:1fr 1fr!important;gap:6px}
  .tx .ez-modes button{padding:9px 10px;border-radius:12px}
  .tx .ez-modes button small{font-size:11px;line-height:1.3}
  .tx .tl-go{padding:13px 14px;font-size:14px}
  .tx .tl-note{font-size:11.5px;margin:6px 0}
  .tx .ez-plan{font-size:12px;margin:6px 0}
  /* Signal Desk */
  .sg-hd{padding:10px 12px 8px;gap:8px 14px}
  .sg-title h2{font-size:17px}
  .sg-sub{font-size:10.5px;margin-top:3px}
  .sg-clock span{font-size:18px}
  .sg-ctl{padding:8px 12px 10px;gap:8px 10px}
  .sg-brief{padding:9px 12px;font-size:12.5px;line-height:1.5}
  .sg-kpi{grid-template-columns:repeat(4,1fr)}
  .sg-k{padding:8px 8px;border-right:1px solid var(--ln)!important;border-bottom:0!important}
  .sg-k:last-child{border-right:0!important}
  .sg-k small{font-size:8.5px;letter-spacing:.08em}
  .sg-k b{font-size:15px;margin:2px 0 0}
  .sg-k span{display:none}
}

@media(min-width:1000px){.tx-fh{display:none}}
