
/* ===== Signal Labs v3.1 Stable Patch ===== */
html,body{overflow-x:hidden!important;}
body{padding-bottom:0!important;}
img.sl-logo-img{display:block;width:44px;height:44px;object-fit:contain;border-radius:12px;}
.logo-mark{background:none!important;box-shadow:none!important;overflow:hidden!important;}
.logo-mark img{width:86px;height:86px;object-fit:contain;border-radius:22px;}
.side-logo{background:none!important;box-shadow:none!important;overflow:hidden!important;}
.side-logo img{width:44px;height:44px;object-fit:contain;border-radius:12px;}
.top-actions .theme-toggle,.top-actions [data-theme-btn],.top-actions .sl-theme-btn{display:none!important;}

/* compact flag-only language dropdown */
.lang-selectx,.sl-lang{
  position:relative!important;
  width:58px!important;
  min-width:58px!important;
  max-width:58px!important;
  height:38px!important;
  display:inline-block!important;
  flex:0 0 58px!important;
  z-index:3000!important;
}
.lang-selectx>button,.sl-lang-btn{
  width:58px!important;
  height:38px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:2px!important;
  padding:0!important;
  border:1px solid var(--line,#e6ebf2)!important;
  border-radius:13px!important;
  background:var(--card,#fff)!important;
  color:var(--text,#152033)!important;
  font-size:20px!important;
  font-weight:900!important;
  cursor:pointer!important;
  box-shadow:none!important;
  white-space:nowrap!important;
}
.lang-current,.sl-lang-current{
  display:inline-block!important;
  width:28px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  font-size:20px!important;
  line-height:1!important;
}
.lang-selectx>button span:last-child,.sl-lang-arrow{
  font-size:10px!important;
  line-height:1!important;
  opacity:.75!important;
}
.lang-menu,.sl-lang-menu{
  display:none!important;
  position:absolute!important;
  top:44px!important;
  right:0!important;
  width:58px!important;
  min-width:58px!important;
  padding:6px!important;
  background:var(--card,#fff)!important;
  border:1px solid var(--line,#e6ebf2)!important;
  border-radius:16px!important;
  box-shadow:0 14px 34px rgba(15,42,81,.16)!important;
  z-index:99999!important;
}
.lang-selectx.open .lang-menu,.sl-lang.open .sl-lang-menu{display:block!important;}
.lang-menu button,.sl-lang-menu button{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:44px!important;
  height:38px!important;
  margin:0 0 4px 0!important;
  padding:0!important;
  border:0!important;
  border-radius:10px!important;
  background:transparent!important;
  color:var(--text,#152033)!important;
  text-align:center!important;
  font-size:20px!important;
  cursor:pointer!important;
  box-shadow:none!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
.lang-menu button:last-child,.sl-lang-menu button:last-child{margin-bottom:0!important;}
.lang-menu button:hover,.sl-lang-menu button:hover{background:#eef4ff!important;}

.auth-lang{width:58px!important;right:18px!important;top:18px!important;}

/* bottom nav fixed/safe-area */
.bottom-nav{
  position:fixed!important;
  left:12px!important;
  right:12px!important;
  bottom:calc(env(safe-area-inset-bottom) + 10px)!important;
  height:70px!important;
  z-index:99999!important;
  max-width:560px!important;
  margin:0 auto!important;
  transform:none!important;
}
.bottom-nav a{min-width:64px!important;}
.bottom-nav svg{width:23px!important;height:23px!important;stroke:currentColor!important;fill:none!important;stroke-width:2.2!important;stroke-linecap:round!important;stroke-linejoin:round!important;}

/* withdraw mobile fix */
#withdrawPage,.withdraw-page{min-width:0!important;}
#withdrawPage .grid,.withdraw-page .grid{min-width:0!important;}
#withdrawPage .card,.withdraw-page .card{min-width:0!important;max-width:100%!important;overflow:hidden!important;}
#withdrawPage .table-wrap,.withdraw-page .table-wrap{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
#withdrawPage table,.withdraw-page table{width:100%!important;}

/* settings dark mode switch */
.v31-settings-panel{display:grid;gap:14px;}
.v31-setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--line,#e6ebf2);border-radius:16px;padding:16px;background:var(--card,#fff);}
.v31-setting-row p{margin:5px 0 0;color:var(--muted,#7b8798);font-size:13px;}
.v31-switch{position:relative;width:56px;height:30px;flex:0 0 56px;}
.v31-switch input{display:none!important;}
.v31-slider{position:absolute;inset:0;background:#cbd5e1;border-radius:999px;cursor:pointer;transition:.2s;}
.v31-slider:before{content:"";position:absolute;width:24px;height:24px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s;box-shadow:0 2px 6px rgba(0,0,0,.18);}
.v31-switch input:checked+.v31-slider{background:#2157d9;}
.v31-switch input:checked+.v31-slider:before{transform:translateX(26px);}

[data-theme="dark"] .topbar,
[data-theme="dark"] .card,
[data-theme="dark"] .bottom-nav,
[data-theme="dark"] .setting-menu,
[data-theme="dark"] .lang-selectx>button,
[data-theme="dark"] .lang-menu,
[data-theme="dark"] .sl-lang-btn,
[data-theme="dark"] .sl-lang-menu,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .v31-setting-row{
  background:#0d1b2f!important;
  color:#eaf1ff!important;
  border-color:#1d314f!important;
}
[data-theme="dark"] body{background:#07111f!important;color:#eaf1ff!important;}

@media(max-width:760px){
  .bottom-nav{left:8px!important;right:8px!important;bottom:calc(env(safe-area-inset-bottom) + 8px)!important;height:68px!important;border-radius:22px!important;}
  .bottom-nav a{min-width:auto!important;flex:1!important;font-size:10px!important;}
  .top-actions{gap:6px!important;}
  .user{display:none!important;}
  .auth-lang{right:12px!important;top:12px!important;}
  #withdrawPage .grid,.withdraw-page .grid{grid-template-columns:1fr!important;}
  #withdrawPage table,.withdraw-page table{min-width:420px!important;}
  #withdrawPage th,#withdrawPage td,.withdraw-page th,.withdraw-page td{font-size:13px!important;padding:10px!important;white-space:nowrap!important;}
}
.grade-circle{
  width:58px;
  height:58px;
  padding:0;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:900;
  background:linear-gradient(135deg,#2157d9,#15b8ff);
  color:#fff;
  box-shadow:0 8px 18px rgba(33,87,217,.28);
}
