/* V1.0.259 — VIP topbar, scoped visual-only upgrade */
.v247-user-topbar{
  --gold:#ffd56a;--gold2:#ffb339;--diamond:#b8f3ff;--blue:#4aa8ff;--violet:#916eff;
  position:relative;isolation:isolate;
  background:
    radial-gradient(circle at 68% -130%,rgba(122,82,255,.20),transparent 36%),
    radial-gradient(circle at 10% -100%,rgba(45,190,255,.12),transparent 34%),
    linear-gradient(180deg,#06172c,#041222)!important;
  border-bottom:1px solid rgba(73,153,224,.34)!important;
  box-shadow:0 9px 30px rgba(0,0,0,.28),inset 0 -1px 0 rgba(90,178,255,.04)!important;
}
.v247-user-topbar::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,#35a7ff 20%,#9e76ff 48%,#ffd466 78%,transparent);
  background-size:220% 100%;animation:v259Rail 8s linear infinite;box-shadow:0 0 14px rgba(65,143,255,.22)
}
.v247-user-topbar .searchbox,
.v247-user-topbar .env,
.v247-user-topbar .support-toolbar-button,
.v247-user-topbar .robot-tool-button,
.v247-user-topbar .v247-language-switch,
.v247-user-topbar .v247-motion-topbar,
.v247-user-topbar .notification-button,
.v247-user-topbar .logout-button{
  border-color:rgba(72,145,211,.38)!important;
  background:
    radial-gradient(circle at 100% 0,rgba(123,89,255,.08),transparent 36%),
    linear-gradient(145deg,#08213d,#06172c)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 7px 18px rgba(0,0,0,.14)!important;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,filter .18s ease!important
}
.v247-user-topbar .searchbox:hover,
.v247-user-topbar .env:hover,
.v247-user-topbar .support-toolbar-button:hover,
.v247-user-topbar .robot-tool-button:hover,
.v247-user-topbar .v247-language-switch:hover,
.v247-user-topbar .v247-motion-topbar:hover,
.v247-user-topbar .notification-button:hover,
.v247-user-topbar .logout-button:hover{
  transform:translateY(-1px);border-color:rgba(88,183,255,.68)!important;filter:brightness(1.05);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 10px 24px rgba(0,0,0,.18),0 0 18px rgba(65,145,255,.11)!important
}
.v247-user-topbar .searchbox:focus-within{border-color:#4ab1ff!important;box-shadow:0 0 0 2px rgba(74,177,255,.08),0 0 22px rgba(55,135,255,.12)!important}
.v247-user-topbar .support-toolbar-button{background:radial-gradient(circle at 18% 0,rgba(78,190,255,.18),transparent 42%),linear-gradient(145deg,#0b3265,#172f70)!important}
.v247-user-topbar .robot-tool-button{color:#c2a7ff!important;border-color:rgba(127,91,230,.5)!important;background:radial-gradient(circle at 50% 0,rgba(177,112,255,.20),transparent 48%),linear-gradient(145deg,#181048,#0b1b37)!important}
.v247-user-topbar .notification-button{color:#ffd264!important;background:radial-gradient(circle at 50% 0,rgba(255,196,67,.13),transparent 45%),linear-gradient(145deg,#13243b,#08182e)!important}
.v247-user-topbar .logout-button{background:radial-gradient(circle at 100% 0,rgba(76,155,255,.10),transparent 40%),linear-gradient(145deg,#0a2a4c,#071b33)!important}

/* Both badges share the strongest VIP system */
.v247-user-topbar .topbar-v259-badge{
  --a:#0b2948;--b:#07182d;--line:rgba(88,177,255,.50);--glow:rgba(48,137,255,.28);--accent:#8edcff;
  position:relative;isolation:isolate;height:44px;min-height:44px;display:inline-flex;align-items:center;gap:10px;
  padding:0 13px 0 9px;overflow:hidden;border:1px solid var(--line)!important;border-radius:15px!important;
  background:radial-gradient(circle at 100% 0,color-mix(in srgb,var(--accent) 20%,transparent),transparent 40%),
             radial-gradient(circle at 0 100%,rgba(255,206,89,.08),transparent 45%),
             linear-gradient(145deg,var(--a),var(--b))!important;
  color:#f7fbff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px rgba(67,120,202,.08),0 10px 24px rgba(0,0,0,.22),0 0 0 1px rgba(9,27,50,.64)!important;
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease,filter .2s ease!important
}
.v247-user-topbar .topbar-v259-badge:hover{transform:translateY(-2px) scale(1.012);border-color:color-mix(in srgb,var(--accent) 85%,#fff)!important;filter:brightness(1.06);box-shadow:inset 0 1px rgba(255,255,255,.17),0 15px 32px rgba(0,0,0,.28),0 0 28px var(--glow)!important}
.v247-user-topbar .topbar-v259-badge:active{transform:translateY(0) scale(.984)}
.v247-user-topbar .tier-basic{--a:#0a2b4b;--b:#07182d;--line:rgba(70,176,255,.50);--glow:rgba(48,148,255,.24);--accent:#63c9ff}
.v247-user-topbar .tier-standard{--a:#102d52;--b:#081a34;--line:rgba(96,185,255,.55);--glow:rgba(65,148,255,.28);--accent:#8bdcff}
.v247-user-topbar .tier-professional{--a:#1b2454;--b:#0b1937;--line:rgba(143,120,255,.56);--glow:rgba(115,89,255,.32);--accent:#b7a4ff}
.v247-user-topbar .tier-agency{--a:#332919;--b:#111c2c;--line:rgba(255,205,84,.62);--glow:rgba(255,184,56,.29);--accent:#ffd56a}
.v247-user-topbar .tier-premium{--a:#17294e;--b:#081a32;--line:rgba(103,173,255,.50);--glow:rgba(86,130,255,.28);--accent:#9ec7ff}
.v247-user-topbar .topbar-v259-credit{--a:#0a2f4d;--b:#07172c;--line:rgba(71,190,255,.56);--glow:rgba(35,155,255,.29);--accent:#6fe8ff}

.v247-user-topbar .topbar-v259-aurora{position:absolute;inset:-70% -15%;pointer-events:none;background:radial-gradient(circle at 25% 50%,rgba(87,205,255,.19),transparent 19%),radial-gradient(circle at 72% 42%,rgba(255,204,87,.18),transparent 18%),radial-gradient(circle at 51% 62%,rgba(151,102,255,.13),transparent 20%);filter:blur(8px);animation:v259Aurora 7s ease-in-out infinite alternate}
.v247-user-topbar .topbar-v259-orbit{position:absolute;width:88px;height:88px;left:-28px;bottom:-56px;border-radius:50%;border:1px solid rgba(174,234,255,.16);pointer-events:none;animation:v259Orbit 9s linear infinite}
.v247-user-topbar .topbar-v259-orbit::before{content:"";position:absolute;inset:12px;border-radius:50%;border:1px solid rgba(255,210,91,.15)}
.v247-user-topbar .topbar-v259-orbit::after{content:"";position:absolute;width:7px;height:7px;right:5px;top:17px;border-radius:50%;background:#fff4b4;box-shadow:0 0 13px #ffd05a,0 0 22px rgba(87,199,255,.42)}
.v247-user-topbar .topbar-v259-shine{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}
.v247-user-topbar .topbar-v259-shine::after{content:"";position:absolute;top:-30%;left:-38%;width:31%;height:170%;transform:skewX(-24deg) translateX(-180%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.10),rgba(255,225,132,.38),rgba(255,255,255,.10),transparent);animation:v259Shine 4.9s ease-in-out infinite}
.v247-user-topbar .topbar-v259-gems{position:absolute;inset:0;pointer-events:none}
.v247-user-topbar .topbar-v259-gems i{position:absolute;width:5px;height:5px;transform:rotate(45deg);background:linear-gradient(135deg,#fff,#9eeeff 42%,#ffd160);box-shadow:0 0 9px rgba(157,232,255,.72),0 0 14px rgba(255,206,81,.34);border-radius:1px;animation:v259Gem 2.4s ease-in-out infinite}
.v247-user-topbar .topbar-v259-gems i:nth-child(1){right:12px;top:7px}.v247-user-topbar .topbar-v259-gems i:nth-child(2){right:33%;bottom:6px;animation-delay:.65s;transform:rotate(45deg) scale(.72)}.v247-user-topbar .topbar-v259-gems i:nth-child(3){left:42%;top:5px;animation-delay:1.25s;transform:rotate(45deg) scale(.55)}

.v247-user-topbar .topbar-v259-icon{position:relative;flex:none;width:29px;height:29px;display:grid;place-items:center;border-radius:10px;border:1px solid rgba(136,202,255,.30);background:radial-gradient(circle at 50% 0,rgba(255,220,128,.18),transparent 50%),linear-gradient(145deg,#173d6c,#102749);color:#dff4ff;box-shadow:inset 0 1px rgba(255,255,255,.16),0 0 15px rgba(55,142,255,.18)}
.v247-user-topbar .tier-agency .topbar-v259-icon{color:#ffe6a0;border-color:rgba(255,212,105,.38);background:linear-gradient(145deg,#5c481d,#21314a);box-shadow:inset 0 1px rgba(255,255,255,.14),0 0 16px rgba(255,190,55,.22)}
.v247-user-topbar .topbar-v259-credit-icon{color:#bdf4ff;background:linear-gradient(145deg,#11547c,#163261)}
.v247-user-topbar .topbar-v259-icon svg{width:18px;height:18px;filter:drop-shadow(0 0 5px currentColor)}
.v247-user-topbar .topbar-v259-icon>b{position:absolute;right:-7px;bottom:-5px;display:grid;place-items:center;min-width:19px;height:11px;padding:0 4px;border-radius:999px;border:1px solid rgba(255,230,164,.48);background:linear-gradient(180deg,#ffe58e,#e99a26);color:#412600;font-size:6px;line-height:1;font-weight:950;letter-spacing:.04em;box-shadow:0 0 11px rgba(255,190,64,.35)}

.v247-user-topbar .topbar-v259-copy{position:relative;z-index:2;display:flex;flex-direction:column;min-width:0;line-height:1}
.v247-user-topbar .topbar-v259-copy small{margin-bottom:4px;color:#8fb4d7;font-size:7.5px;line-height:1;text-transform:uppercase;letter-spacing:.12em}
.v247-user-topbar .topbar-v259-copy strong{color:#f8fbff;font-size:13px;line-height:1;font-weight:900;white-space:nowrap;text-shadow:0 0 12px rgba(120,190,255,.14)}
.v247-user-topbar .topbar-v259-credit .topbar-v259-copy strong{color:#bbf6ff;font-size:14px}
.v247-user-topbar .tier-agency .topbar-v259-copy strong{color:#fff1c5}
.v247-user-topbar .topbar-v259-days{position:relative;z-index:2;margin-left:4px;min-width:53px;height:24px;padding:0 9px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;border:1px solid rgba(85,226,162,.31);background:radial-gradient(circle at 50% 0,rgba(90,255,184,.09),transparent 58%),linear-gradient(180deg,#0b3a44,#082a38);color:#80f0bb;font-size:10px;font-weight:850;font-style:normal;box-shadow:inset 0 1px rgba(255,255,255,.08),0 0 11px rgba(38,220,141,.10)}

.v247-user-topbar .support-toolbar-button::before,.v247-user-topbar .notification-button::before{content:"";position:absolute;width:4px;height:4px;right:6px;top:5px;transform:rotate(45deg);border-radius:1px;background:#fff1a4;box-shadow:0 0 8px #ffd05d;animation:v259Gem 2.1s ease-in-out infinite}

@keyframes v259Rail{from{background-position:0 0}to{background-position:220% 0}}
@keyframes v259Shine{0%,52%{transform:skewX(-24deg) translateX(-180%)}72%,100%{transform:skewX(-24deg) translateX(470%)}}
@keyframes v259Gem{0%,100%{opacity:.48;filter:brightness(.9);scale:.78}50%{opacity:1;filter:brightness(1.35);scale:1.16}}
@keyframes v259Aurora{from{transform:translate3d(-2%,0,0) rotate(-3deg)}to{transform:translate3d(4%,2%,0) rotate(3deg)}}
@keyframes v259Orbit{to{transform:rotate(360deg)}}

body.dashboard-motion-off .v247-user-topbar::after,
body.dashboard-motion-off .v247-user-topbar .topbar-v259-aurora,
body.dashboard-motion-off .v247-user-topbar .topbar-v259-orbit,
body.dashboard-motion-off .v247-user-topbar .topbar-v259-shine::after,
body.dashboard-motion-off .v247-user-topbar .topbar-v259-gems i,
body.dashboard-motion-off .v247-user-topbar .support-toolbar-button::before,
body.dashboard-motion-off .v247-user-topbar .notification-button::before{animation:none!important}
@media(prefers-reduced-motion:reduce){
  .v247-user-topbar::after,.v247-user-topbar .topbar-v259-aurora,.v247-user-topbar .topbar-v259-orbit,
  .v247-user-topbar .topbar-v259-shine::after,.v247-user-topbar .topbar-v259-gems i,
  .v247-user-topbar .support-toolbar-button::before,.v247-user-topbar .notification-button::before{animation:none!important}
}
@media(max-width:1500px) and (min-width:1181px){
  .v247-user-topbar .topbar-v259-badge{padding-left:8px;padding-right:10px}
  .v247-user-topbar .topbar-v259-copy strong{font-size:12px}
  .v247-user-topbar .topbar-v259-credit .topbar-v259-copy strong{font-size:13px}
  .v247-user-topbar .topbar-v259-days{min-width:47px;padding:0 7px}
}
@media(max-width:1180px){.v247-user-topbar .topbar-v259-badge{padding-left:8px;padding-right:9px}.v247-user-topbar .topbar-v259-days{display:none}}


/* V1.0.260 — Desktop compact-fit patch
   Only fixes user topbar width/overflow. */

.v247-user-topbar{
  overflow-x:hidden!important;
  overflow-y:visible!important;
}

.v247-user-topbar .topbar{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  grid-template-columns:minmax(180px,1fr) auto!important;
  gap:12px!important;
  padding-left:22px!important;
  padding-right:14px!important;
}

.v247-user-topbar .topbar-left{
  min-width:0!important;
  width:auto!important;
}

.v247-user-topbar .topbar-right{
  min-width:0!important;
  width:auto!important;
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  flex-wrap:nowrap!important;
  overflow:visible!important;
}

.v247-user-topbar .searchbox{
  width:100%!important;
  max-width:460px!important;
  min-width:160px!important;
}

.v247-user-topbar .searchbox input{
  min-width:0!important;
}

.v247-user-topbar .env,
.v247-user-topbar .support-toolbar-button,
.v247-user-topbar .robot-tool-button,
.v247-user-topbar .v247-language-switch,
.v247-user-topbar .v247-motion-topbar,
.v247-user-topbar .notification-button,
.v247-user-topbar .logout-button{
  flex:0 0 auto!important;
  min-width:0!important;
}

/* Compact premium badges without changing their data/actions. */
.v247-user-topbar .topbar-v259-badge{
  height:38px!important;
  min-height:38px!important;
  gap:7px!important;
  padding:0 9px 0 7px!important;
  border-radius:12px!important;
  flex:0 0 auto!important;
}

.v247-user-topbar .topbar-v259-icon{
  width:24px!important;
  height:24px!important;
  border-radius:8px!important;
}

.v247-user-topbar .topbar-v259-icon svg{
  width:15px!important;
  height:15px!important;
}

.v247-user-topbar .topbar-v259-icon>b{
  right:-5px!important;
  bottom:-4px!important;
  min-width:16px!important;
  height:9px!important;
  padding:0 3px!important;
  font-size:5px!important;
}

.v247-user-topbar .topbar-v259-copy small{
  margin-bottom:3px!important;
  font-size:6.5px!important;
  letter-spacing:.08em!important;
}

.v247-user-topbar .topbar-v259-copy strong{
  font-size:11px!important;
}

.v247-user-topbar .topbar-v259-credit .topbar-v259-copy strong{
  font-size:11.5px!important;
}

.v247-user-topbar .topbar-v259-days{
  min-width:43px!important;
  height:20px!important;
  margin-left:2px!important;
  padding:0 7px!important;
  font-size:8.5px!important;
}

.v247-user-topbar .env{
  height:38px!important;
  padding:0 10px!important;
}

.v247-user-topbar .support-toolbar-button{
  height:38px!important;
  padding:0 10px!important;
}

.v247-user-topbar .robot-tool-button,
.v247-user-topbar .v247-motion-topbar,
.v247-user-topbar .notification-button{
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  padding:0!important;
}

.v247-user-topbar .v247-language-switch{
  height:38px!important;
  padding:3px!important;
  gap:2px!important;
}

.v247-user-topbar .v247-language-switch button{
  min-width:31px!important;
  height:30px!important;
  padding:0 7px!important;
  font-size:9px!important;
}

.v247-user-topbar .logout-button{
  height:38px!important;
  padding:0 12px!important;
}

/* 1600px class desktop — exact class of the screenshot. */
@media(max-width:1700px) and (min-width:1401px){
  .v247-user-topbar .topbar{
    grid-template-columns:minmax(170px,.82fr) auto!important;
    gap:10px!important;
    padding-left:16px!important;
    padding-right:10px!important;
  }
  .v247-user-topbar .searchbox{
    max-width:350px!important;
  }
  .v247-user-topbar .topbar-right{
    gap:6px!important;
  }
}

/* Smaller desktop — continue pulling the controls left instead of creating scroll. */
@media(max-width:1400px) and (min-width:1181px){
  .v247-user-topbar .topbar{
    grid-template-columns:minmax(135px,.58fr) auto!important;
    gap:8px!important;
    padding-left:12px!important;
    padding-right:8px!important;
  }
  .v247-user-topbar .searchbox{
    max-width:260px!important;
    min-width:135px!important;
  }
  .v247-user-topbar .topbar-right{
    gap:5px!important;
  }
  .v247-user-topbar .topbar-v259-copy small{
    display:none!important;
  }
  .v247-user-topbar .topbar-v259-days{
    display:none!important;
  }
  .v247-user-topbar .support-toolbar-button,
  .v247-user-topbar .logout-button{
    padding-left:8px!important;
    padding-right:8px!important;
  }
}

html,body{
  max-width:100%;
  overflow-x:hidden!important;
}


/* V1.0.261 — force all user-topbar controls to fit on desktop.
   Visual/layout only. No behavior/data changes. */

.v247-user-topbar .topbar{
  display:grid!important;
  grid-template-columns:minmax(150px, min(28vw, 390px)) minmax(0,1fr)!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  gap:8px!important;
  padding-left:12px!important;
  padding-right:8px!important;
}

.v247-user-topbar .topbar-left{
  min-width:0!important;
  overflow:hidden!important;
}

.v247-user-topbar .topbar-right{
  min-width:0!important;
  width:100%!important;
  margin-left:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:5px!important;
  flex-wrap:nowrap!important;
  overflow:visible!important;
}

.v247-user-topbar .searchbox{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}

.v247-user-topbar .searchbox-brand{
  flex:0 0 auto!important;
  margin-left:auto!important;
}

/* Reduce every control just enough to keep logout + notification visible. */
.v247-user-topbar .env,
.v247-user-topbar .support-toolbar-button,
.v247-user-topbar .robot-tool-button,
.v247-user-topbar .v247-language-switch,
.v247-user-topbar .v247-motion-topbar,
.v247-user-topbar .notification-button,
.v247-user-topbar .logout-button,
.v247-user-topbar .topbar-v259-badge{
  flex:0 0 auto!important;
  min-width:0!important;
}

.v247-user-topbar .env{
  height:36px!important;
  padding:0 8px!important;
  font-size:10px!important;
}

.v247-user-topbar .support-toolbar-button{
  height:36px!important;
  padding:0 9px!important;
  font-size:10px!important;
}

.v247-user-topbar .robot-tool-button,
.v247-user-topbar .v247-motion-topbar,
.v247-user-topbar .notification-button{
  width:36px!important;
  min-width:36px!important;
  height:36px!important;
  padding:0!important;
}

.v247-user-topbar .logout-button{
  height:36px!important;
  padding:0 10px!important;
  font-size:10px!important;
  white-space:nowrap!important;
}

.v247-user-topbar .v247-language-switch{
  height:36px!important;
  padding:2px!important;
  gap:1px!important;
}

.v247-user-topbar .v247-language-switch button{
  min-width:27px!important;
  height:30px!important;
  padding:0 5px!important;
  font-size:8.5px!important;
}

.v247-user-topbar .topbar-v259-badge{
  height:36px!important;
  min-height:36px!important;
  gap:5px!important;
  padding:0 7px 0 6px!important;
  border-radius:11px!important;
}

.v247-user-topbar .topbar-v259-icon{
  width:22px!important;
  height:22px!important;
  border-radius:7px!important;
}

.v247-user-topbar .topbar-v259-icon svg{
  width:13px!important;
  height:13px!important;
}

.v247-user-topbar .topbar-v259-icon>b{
  min-width:14px!important;
  height:8px!important;
  right:-4px!important;
  bottom:-4px!important;
  padding:0 2px!important;
  font-size:4.5px!important;
}

.v247-user-topbar .topbar-v259-copy small{
  margin-bottom:2px!important;
  font-size:5.8px!important;
  letter-spacing:.06em!important;
}

.v247-user-topbar .topbar-v259-copy strong{
  font-size:10px!important;
  max-width:92px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.v247-user-topbar .topbar-v259-credit .topbar-v259-copy strong{
  font-size:10.5px!important;
  max-width:86px!important;
}

.v247-user-topbar .topbar-v259-days{
  min-width:38px!important;
  height:18px!important;
  padding:0 5px!important;
  margin-left:1px!important;
  font-size:7.5px!important;
}

/* 1600px and below: prioritize showing every function. */
@media(max-width:1700px) and (min-width:1181px){
  .v247-user-topbar .topbar{
    grid-template-columns:minmax(120px,22vw) minmax(0,1fr)!important;
    gap:6px!important;
    padding-left:8px!important;
    padding-right:5px!important;
  }

  .v247-user-topbar .topbar-right{
    gap:4px!important;
  }

  .v247-user-topbar .searchbox{
    min-width:0!important;
  }

  .v247-user-topbar .searchbox input{
    font-size:10px!important;
  }

  .v247-user-topbar .searchbox-brand{
    padding-left:7px!important;
    padding-right:7px!important;
    font-size:8px!important;
  }

  .v247-user-topbar .topbar-v259-copy small{
    display:none!important;
  }

  .v247-user-topbar .support-toolbar-button{
    padding-left:8px!important;
    padding-right:8px!important;
  }

  .v247-user-topbar .logout-button{
    padding-left:8px!important;
    padding-right:8px!important;
  }
}

/* 1500px and below: hide only decorative/secondary text, never the functions. */
@media(max-width:1500px) and (min-width:1181px){
  .v247-user-topbar .topbar{
    grid-template-columns:minmax(105px,18vw) minmax(0,1fr)!important;
  }

  .v247-user-topbar .topbar-v259-days{
    display:none!important;
  }

  .v247-user-topbar .env{
    font-size:0!important;
    width:34px!important;
    min-width:34px!important;
    padding:0!important;
    justify-content:center!important;
  }

  .v247-user-topbar .env::after{
    content:"●";
    font-size:11px;
    color:#48e4a4;
  }

  .v247-user-topbar .support-toolbar-button{
    min-width:34px!important;
    padding:0 7px!important;
  }
}

/* Never create a horizontal scrollbar from the application topbar. */
.v247-user-topbar,
.v247-user-topbar .topbar,
.v247-user-topbar .topbar-left,
.v247-user-topbar .topbar-right{
  max-width:100%!important;
}

html,body{
  width:100%;
  max-width:100%;
  overflow-x:hidden!important;
}


/* V1.0.262 — Full-visible topbar
   Shrinks search and pulls the complete right toolset left.
   Visual/layout only. No pricing, credit, subscription or action logic changes. */

.v247-user-topbar{
  overflow-x:hidden!important;
}

.v247-user-topbar .topbar{
  display:grid!important;
  grid-template-columns:clamp(210px,18vw,300px) minmax(0,1fr)!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  gap:8px!important;
  padding:0 10px!important;
  align-items:center!important;
}

.v247-user-topbar .topbar-left{
  min-width:0!important;
  width:100%!important;
  overflow:hidden!important;
}

.v247-user-topbar .searchbox{
  width:100%!important;
  min-width:0!important;
  max-width:300px!important;
}

.v247-user-topbar .searchbox input{
  min-width:0!important;
  font-size:10px!important;
}

.v247-user-topbar .searchbox-brand{
  flex:0 0 auto!important;
  padding-left:7px!important;
  padding-right:7px!important;
  font-size:8px!important;
}

.v247-user-topbar .topbar-right{
  min-width:0!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:5px!important;
  overflow:visible!important;
}

/* Keep every right-side function present. */
.v247-user-topbar .env,
.v247-user-topbar .support-toolbar-button,
.v247-user-topbar .robot-tool-button,
.v247-user-topbar .topbar-v259-badge,
.v247-user-topbar .v247-language-switch,
.v247-user-topbar .v247-motion-topbar,
.v247-user-topbar .notification-button,
.v247-user-topbar .logout-button{
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 auto!important;
  min-width:0!important;
}

/* Slightly tighter controls. */
.v247-user-topbar .env{
  height:34px!important;
  padding:0 8px!important;
  font-size:9.5px!important;
}

.v247-user-topbar .support-toolbar-button{
  height:34px!important;
  padding:0 8px!important;
  font-size:9.5px!important;
}

.v247-user-topbar .robot-tool-button,
.v247-user-topbar .v247-motion-topbar,
.v247-user-topbar .notification-button{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  padding:0!important;
}

.v247-user-topbar .logout-button{
  height:34px!important;
  padding:0 10px!important;
  font-size:9.5px!important;
  white-space:nowrap!important;
}

.v247-user-topbar .v247-language-switch{
  height:34px!important;
  padding:2px!important;
  gap:1px!important;
}

.v247-user-topbar .v247-language-switch button{
  min-width:25px!important;
  height:28px!important;
  padding:0 5px!important;
  font-size:8px!important;
}

/* Credit & plan stay premium, but more compact. */
.v247-user-topbar .topbar-v259-badge{
  height:34px!important;
  min-height:34px!important;
  gap:5px!important;
  padding:0 7px 0 6px!important;
  border-radius:10px!important;
}

.v247-user-topbar .topbar-v259-icon{
  width:21px!important;
  height:21px!important;
  border-radius:7px!important;
}

.v247-user-topbar .topbar-v259-icon svg{
  width:12px!important;
  height:12px!important;
}

.v247-user-topbar .topbar-v259-copy small{
  display:none!important;
}

.v247-user-topbar .topbar-v259-copy strong{
  font-size:9.5px!important;
  line-height:1!important;
  max-width:88px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.v247-user-topbar .topbar-v259-credit .topbar-v259-copy strong{
  font-size:10px!important;
  max-width:82px!important;
}

.v247-user-topbar .topbar-v259-days{
  min-width:36px!important;
  height:17px!important;
  padding:0 5px!important;
  margin-left:1px!important;
  font-size:7px!important;
}

/* 1600-class screens: this is the key fix for the screenshot supplied. */
@media(max-width:1700px) and (min-width:1501px){
  .v247-user-topbar .topbar{
    grid-template-columns:240px minmax(0,1fr)!important;
    gap:6px!important;
    padding-left:8px!important;
    padding-right:6px!important;
  }
  .v247-user-topbar .searchbox{
    max-width:240px!important;
  }
  .v247-user-topbar .topbar-right{
    gap:4px!important;
  }
}

/* 1440–1500: preserve every function, trim only secondary width. */
@media(max-width:1500px) and (min-width:1367px){
  .v247-user-topbar .topbar{
    grid-template-columns:210px minmax(0,1fr)!important;
    gap:5px!important;
    padding-left:7px!important;
    padding-right:5px!important;
  }
  .v247-user-topbar .searchbox{
    max-width:210px!important;
  }
  .v247-user-topbar .topbar-right{
    gap:3px!important;
  }
  .v247-user-topbar .topbar-v259-days{
    display:none!important;
  }
  .v247-user-topbar .env{
    padding-left:7px!important;
    padding-right:7px!important;
  }
  .v247-user-topbar .support-toolbar-button,
  .v247-user-topbar .logout-button{
    padding-left:7px!important;
    padding-right:7px!important;
  }
}

/* 1366 and below desktop: keep icons/buttons visible; compress text, not functions. */
@media(max-width:1366px) and (min-width:981px){
  .v247-user-topbar .topbar{
    grid-template-columns:180px minmax(0,1fr)!important;
    gap:4px!important;
    padding-left:6px!important;
    padding-right:4px!important;
  }
  .v247-user-topbar .searchbox{
    max-width:180px!important;
  }
  .v247-user-topbar .topbar-right{
    gap:3px!important;
  }
  .v247-user-topbar .topbar-v259-days{
    display:none!important;
  }
  .v247-user-topbar .env{
    width:32px!important;
    min-width:32px!important;
    padding:0!important;
    font-size:0!important;
    justify-content:center!important;
  }
  .v247-user-topbar .env::after{
    content:"●";
    color:#46e69d;
    font-size:10px;
  }
  .v247-user-topbar .support-toolbar-button{
    padding-left:6px!important;
    padding-right:6px!important;
  }
  .v247-user-topbar .logout-button{
    padding-left:7px!important;
    padding-right:7px!important;
  }
  .v247-user-topbar .topbar-v259-copy strong{
    max-width:72px!important;
  }
  .v247-user-topbar .topbar-v259-credit .topbar-v259-copy strong{
    max-width:70px!important;
  }
}

/* Absolute guard against page-wide horizontal scrolling. */
html,body{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
}


/* ============================================================
   BOT VIỆT AI V1.0.263 — EXACT TOPBAR FIT
   Root fix: restore the real user header to position: fixed.
   Scope: .v247-user-topbar only.
   ============================================================ */

.v247-user-topbar{
  position:fixed!important;
  top:0!important;
  left:var(--sidebar)!important;
  right:0!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  padding:0 8px!important;
  gap:5px!important;
  overflow:hidden!important;
}

.v247-user-topbar>.menu-toggle{
  flex:0 0 auto!important;
}

.v247-user-topbar>.searchbox{
  flex:0 1 260px!important;
  width:260px!important;
  min-width:130px!important;
  max-width:260px!important;
}

.v247-user-topbar>.searchbox input{
  min-width:0!important;
  width:100%!important;
}

.v247-user-topbar>.top-spacer{
  display:block!important;
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
}

.v247-user-topbar>.env,
.v247-user-topbar>.support-toolbar-button,
.v247-user-topbar>.robot-tool-button,
.v247-user-topbar>.topbar-v259-badge,
.v247-user-topbar>.v247-language-switch,
.v247-user-topbar>.v247-motion-topbar,
.v247-user-topbar>.notification-button,
.v247-user-topbar>.logout-button{
  flex:0 0 auto!important;
  visibility:visible!important;
  opacity:1!important;
}

@media(min-width:1701px){
  .v247-user-topbar{
    padding-left:12px!important;
    padding-right:12px!important;
    gap:7px!important;
  }

  .v247-user-topbar>.searchbox{
    flex-basis:300px!important;
    width:300px!important;
    max-width:300px!important;
  }
}

@media(max-width:1700px) and (min-width:1501px){
  .v247-user-topbar{
    padding-left:8px!important;
    padding-right:8px!important;
    gap:5px!important;
  }

  .v247-user-topbar>.searchbox{
    flex-basis:230px!important;
    width:230px!important;
    max-width:230px!important;
  }
}

@media(max-width:1500px) and (min-width:1401px){
  .v247-user-topbar{
    padding-left:6px!important;
    padding-right:6px!important;
    gap:4px!important;
  }

  .v247-user-topbar>.searchbox{
    flex-basis:180px!important;
    width:180px!important;
    max-width:180px!important;
    min-width:120px!important;
  }

  .v247-user-topbar .searchbox-brand{
    display:none!important;
  }

  .v247-user-topbar>.topbar-v259-days{
    display:none!important;
  }
}

@media(max-width:1400px) and (min-width:981px){
  .v247-user-topbar{
    padding-left:5px!important;
    padding-right:5px!important;
    gap:3px!important;
  }

  .v247-user-topbar>.searchbox{
    flex-basis:145px!important;
    width:145px!important;
    min-width:100px!important;
    max-width:145px!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }

  .v247-user-topbar .searchbox-brand{
    display:none!important;
  }

  .v247-user-topbar>.topbar-v259-days{
    display:none!important;
  }

  .v247-user-topbar>.env{
    padding-left:6px!important;
    padding-right:6px!important;
    font-size:9px!important;
  }

  .v247-user-topbar>.support-toolbar-button{
    padding-left:6px!important;
    padding-right:6px!important;
  }

  .v247-user-topbar>.logout-button{
    padding-left:7px!important;
    padding-right:7px!important;
  }

  .v247-user-topbar>.topbar-v259-badge{
    gap:4px!important;
    padding-left:5px!important;
    padding-right:6px!important;
  }

  .v247-user-topbar .topbar-v259-copy strong{
    max-width:72px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}

html,
body{
  max-width:100%!important;
  overflow-x:hidden!important;
}
