/* css/tokens.css */
:root {
  /* --- Renkler --- */
  --bg-0: #070914;
  --bg-1: #0c1022;
  --panel-0: #0d1428;
  --panel-1: #121a33;
  --border: rgba(140, 130, 255, 0.14);
  --border-strong: rgba(140, 130, 255, 0.28);

  --purple: #7c5cff;
  --purple-soft: #a78bfa;
  --blue: #3b82f6;
  --pink: #8b5cf6;
  --cyan: #38bdf8;

  --text-0: #f3f2fb;
  --text-1: #c7c6dd;
  --text-2: #8b8ba7;
  --text-3: #5b5b78;

  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;

  --gradient-primary: linear-gradient(135deg, var(--purple) 0%, var(--blue) 100%);
  --gradient-accent: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);

  /* --- Tipografi --- */
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* --- Boşluk / şekil --- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --sidebar-w: 260px;
  --panel-w: 300px;

  --shadow-glow-purple: 0 0 24px rgba(124, 92, 255, 0.25);
  --shadow-glow-pink: 0 0 24px rgba(255, 110, 199, 0.2);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(120% 120% at 10% 0%, var(--bg-1) 0%, var(--bg-0) 55%);
  color: var(--text-0);
  font-family: var(--font-body);
  min-height: 100%;
}

body {
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: rgba(124, 92, 255, 0.35); }

/* Erişilebilirlik: klavye odak göstergesi */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--purple-soft);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: linear-gradient(180deg, var(--panel-1) 0%, var(--panel-0) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 18px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 26px rgba(124, 92, 255, 0.5); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-1);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.06); }

.btn-danger {
  background: rgba(251, 113, 133, 0.12);
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-0);
  font-size: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.input:focus {
  border-color: var(--purple-soft);
  background: rgba(124, 92, 255, 0.06);
  outline: none;
}
.input::placeholder { color: var(--text-3); }

.text-muted { color: var(--text-2); }
.text-dim { color: var(--text-3); }

.skeleton {
  background: linear-gradient(90deg, var(--panel-0) 25%, var(--panel-1) 50%, var(--panel-0) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }


@keyframes usernameGradient{0%{background-position:0% 50%}100%{background-position:220% 50%}}
@keyframes profileFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes profileGlow{0%,100%{box-shadow:0 0 0 rgba(124,92,255,0)}50%{box-shadow:0 12px 38px rgba(124,92,255,.18)}}
@keyframes bannerDrift{0%,100%{background-position:50% 50%}50%{background-position:56% 46%}}

/* css/layout.css */
/* =========================================================
   Wiantex Forum - Complete Layout
   Desktop + Tablet + Mobile
   ========================================================= */


/* =========================================================
   GLOBAL MOBILE SAFETY
   ========================================================= */

html {
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  max-width: 100vw;
  min-width: 0;
  overflow-x: hidden;
}


/* ===== App shell ===== */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  min-width: 0;
  width: 100%;
}


/* ===== Sidebar ===== */

.sidebar {
  border-right: 1px solid var(--border);
  background: rgba(8, 11, 24, 0.6);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  margin-bottom: 2px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  box-shadow: var(--shadow-glow-purple);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.14em;
}


.sidebar-brand {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:62px;
  padding:4px 6px;
  border-radius:14px;
  text-decoration:none;
  transition:background .18s ease, transform .18s ease;
}
.sidebar-brand:hover {
  background:rgba(139,92,246,.08);
  transform:translateY(-1px);
}
.sidebar-brand-logo {
  display:block;
  width:min(100%,190px);
  height:auto;
  max-height:64px;
  object-fit:contain;
}

/* ===== Sidebar Navigation ===== */

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-label {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.12em;
  padding: 10px 12px 6px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.15s ease,
    color 0.15s ease;
  position: relative;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-0);
}

.nav-item.active {
  background:
    linear-gradient(
      90deg,
      rgba(124, 92, 255, 0.18),
      rgba(124, 92, 255, 0.02)
    );
  color: #fff;
  box-shadow: inset 2px 0 0 var(--purple-soft);
}

.nav-item .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 7px;
  border-radius: 999px;
}

.nav-item .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ===== Main ===== */

.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  width: 100%;
}


/* =========================================================
   TOP NAVBAR
   ========================================================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;

  display: flex;
  align-items: center;
  gap: 18px;

  padding: 16px 28px;

  border-bottom: 1px solid var(--border);

  background: rgba(5, 7, 18, 0.72);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.search-box {
  flex: 1;
  max-width: 420px;

  display: flex;
  align-items: center;
  gap: 9px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);

  padding: 9px 12px;

  color: var(--text-2);
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-0);
  font-size: 14px;
  width: 100%;
}

.kbd {
  font-size: 10px;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  font-family: var(--font-body);
}

.navbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  border: 1px solid var(--border);

  background: rgba(255, 255, 255, 0.02);

  color: var(--text-1);

  position: relative;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-0);
}

.icon-btn .ping {
  position: absolute;
  top: -3px;
  right: -3px;

  width: 9px;
  height: 9px;

  border-radius: 50%;

  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

.hamburger {
  display: none;
}


/* =========================================================
   AVATAR
   ========================================================= */

.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--gradient-primary);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);

  flex-shrink: 0;
}

.avatar-frame-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: var(--avatar-box-size, 36px);
  height: var(--avatar-box-size, 36px);
  vertical-align: middle;
}

.avatar-frame-img {
  position: absolute;
  top: 0;
  left: 0;

  pointer-events: none;
  object-fit: contain;
}


/* =========================================================
   CONTENT
   ========================================================= */

.content-wrap {
  padding: 30px;
  min-width: 0;
  width: 100%;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr var(--panel-w);

  gap: 26px;
  align-items: start;

  min-width: 0;
}

.main-col {
  min-width: 0;
}

.right-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;

  position: sticky;
  top: 86px;

  min-width: 0;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  border-radius: var(--radius-lg);
  padding: 36px 32px;

  background:
    radial-gradient(
      80% 140% at 100% 0%,
      rgba(124, 92, 255, 0.22) 0%,
      transparent 60%
    ),
    radial-gradient(
      60% 100% at 0% 100%,
      rgba(255, 110, 199, 0.12) 0%,
      transparent 60%
    ),
    linear-gradient(
      180deg,
      var(--panel-1) 0%,
      var(--panel-0) 100%
    );

  border: 1px solid var(--border);

  position: relative;
  overflow: hidden;

  margin-bottom: 26px;

  min-width: 0;
  max-width: 100%;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.hero p {
  color: var(--text-1);
  font-size: 14.5px;
  max-width: 520px;
  margin-bottom: 20px;
}

.hero-stats {
  display: flex;
  gap: 28px;
}

.hero-stat strong {
  font-family: var(--font-display);
  font-size: 22px;
  display: block;
}

.hero-stat span {
  font-size: 12px;
  color: var(--text-2);
}


/* =========================================================
   SECTION HEADERS
   ========================================================= */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-head p {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 2px;
}

.section-link {
  font-size: 12.5px;
  color: var(--purple-soft);
  font-weight: 600;
}


/* =========================================================
   TOPIC CARDS
   ========================================================= */

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 12px;

  min-width: 0;
}

.topic-card {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 16px 18px;

  border-radius: var(--radius-md);
  border: 1px solid var(--border);

  background: rgba(255, 255, 255, 0.015);

  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;

  min-width: 0;
  max-width: 100%;
}

.topic-card:hover {
  border-color: var(--border-strong);
  background: rgba(124, 92, 255, 0.04);
  transform: translateY(-1px);
}

.topic-icon {
  width: 40px;
  height: 40px;

  border-radius: 10px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-icon svg {
  width: 19px;
  height: 19px;
}

.topic-main {
  flex: 1;
  min-width: 0;
}

.topic-title {
  display: flex;
  align-items: center;
  gap: 7px;

  font-size: 14.5px;
  font-weight: 600;

  margin-bottom: 4px;

  min-width: 0;
}

.topic-title span.text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-meta {
  font-size: 12.5px;
  color: var(--text-2);

  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.topic-author-avatar { display:inline-flex; width:18px; height:18px; flex:0 0 18px; align-items:center; justify-content:center; vertical-align:middle; }
.topic-author-name { min-width:0; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topic-meta .avatar-wrap { flex: 0 0 auto; width:18px !important; height:18px !important; }
.topic-meta .avatar-wrap .avatar { width:18px !important; height:18px !important; }
.topic-meta .avatar-frame-wrap { width:18px !important; height:18px !important; flex:0 0 18px !important; overflow:visible !important; }
.topic-meta .avatar-frame-img { max-width:none !important; }

.topic-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.topic-stat {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-2);
}

.topic-stat strong {
  display: block;
  color: var(--text-0);
  font-size: 13.5px;
  font-weight: 700;
}

.topic-time {
  flex-shrink: 0;
  text-align: right;

  font-size: 12px;
  color: var(--text-3);

  min-width: 74px;
}


/* =========================================================
   RIGHT PANEL
   ========================================================= */

.widget {
  padding: 20px;
  min-width: 0;
}

.widget h3 {
  font-size: 13.5px;
  margin-bottom: 14px;

  display: flex;
  align-items: center;
  gap: 7px;
}

.stat-row {
  display: flex;
  justify-content: space-between;

  padding: 8px 0;

  font-size: 13px;

  border-bottom: 1px dashed var(--border);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row span:last-child {
  color: var(--text-0);
  font-weight: 700;
}

.leader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.leader-rank {
  width: 18px;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 700;
}

.leader-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}

.leader-count {
  font-size: 12px;
  color: var(--text-2);
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  border-top: 1px solid var(--border);

  padding: 26px 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  color: var(--text-3);
  font-size: 12.5px;

  flex-wrap: wrap;
  gap: 10px;

  width: 100%;
  min-width: 0;
}

/* Footer linkleri içerik alanının üstüne yapışmasın */
.footer-links {
  position: relative;
  top: 7px;
}

.footer a {
  color: var(--text-2);
  margin-left: 16px;
}

.footer a:hover {
  color: var(--text-0);
}


/* =========================================================
   DRAWER
   ========================================================= */

.drawer-overlay {
  display: none;

  position: fixed;
  inset: 0;

  background: rgba(2, 3, 8, 0.6);

  backdrop-filter: blur(2px);

  z-index: 45;
}

.drawer-overlay.open {
  display: block;
}


/* =========================================================
   BOTTOM NAVIGATION
   ========================================================= */

.bottom-nav {
  display: none;

  position: fixed;

  left: 0;
  right: 0;
  bottom: 0;

  width: 100%;
  max-width: 100vw;

  background: rgba(8, 11, 24, 0.94);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-top: 1px solid var(--border);

  padding:
    8px 6px
    calc(8px + env(safe-area-inset-bottom, 0px));

  justify-content: space-around;

  z-index: 9999;

  box-sizing: border-box;

  overflow: visible;
}

.bottom-nav a {
  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 3px;

  font-size: 10px;

  color: var(--text-2);

  padding: 4px 10px;

  min-width: 0;

  text-align: center;

  text-decoration: none;
}

.bottom-nav a.active {
  color: var(--purple-soft);
}

.bottom-nav svg {
  width: 20px;
  height: 20px;

  flex-shrink: 0;
}


/* =========================================================
   CENTER + BUTTON
   ========================================================= */

.bottom-nav .fab {
  width: 42px;
  height: 42px;

  min-width: 42px;
  min-height: 42px;

  border-radius: 50%;

  background: var(--gradient-primary);

  display: flex;
  align-items: center;
  justify-content: center;

  margin-top: -20px;

  padding: 0;

  flex-shrink: 0;

  box-shadow:
    0 4px 16px rgba(124, 92, 255, 0.45);
}

.bottom-nav .fab svg {
  width: 20px;
  height: 20px;

  color: #fff;

  flex-shrink: 0;
}


/* =========================================================
   FORUM POST
   ========================================================= */

.post-card {
  padding: 20px 22px;
  min-width: 0;
}

.post-row {
  display: flex;
  gap: 16px;

  min-width: 0;
}

.post-author {
  flex-shrink: 0;

  width: 78px;

  display: flex;
  flex-direction: column;

  align-items: center;

  text-align: center;
}

.post-author-info {
  margin-top: 8px;

  display: flex;
  flex-direction: column;

  align-items: center;

  gap: 5px;
}

.post-username {
  font-size: 12.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.post-username-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  color: var(--text-0) !important;
  text-decoration: none !important;
  line-height: 1.25;
}

.post-username-link .post-username-text {
  display: inline-block;
  color: inherit;
  opacity: 1;
  visibility: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-roles {
  display: flex;
  flex-wrap: wrap;

  justify-content: center;

  gap: 4px;
}

.post-roles .badge {
  font-size: 9.5px;
  padding: 1px 7px;
}

.post-msgcount {
  font-size: 10.5px;
}

.post-body {
  flex: 1;
  min-width: 0;
}

.post-content {
  font-size: 14.5px;
  line-height: 1.65;

  color: var(--text-1);

  white-space: pre-wrap;

  overflow-wrap: anywhere;
  word-break: break-word;

  max-width: 100%;
}

.post-content p {
  margin: 0 0 10px;
}

.post-content p:last-child {
  margin-bottom: 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.post-content a {
  color: var(--purple-soft);

  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-content blockquote {
  border-left: 3px solid var(--border-strong);

  margin: 8px 0;

  padding: 4px 0 4px 12px;

  color: var(--text-2);

  max-width: 100%;
}

.post-content code {
  background: rgba(255,255,255,0.06);

  padding: 1px 6px;

  border-radius: 5px;

  font-size: 0.92em;

  overflow-wrap: anywhere;
}

.post-content pre {
  background: rgba(255,255,255,0.04);

  border: 1px solid var(--border);

  border-radius: var(--radius-sm);

  padding: 10px 12px;

  overflow-x: auto;

  white-space: pre;

  max-width: 100%;
}

.post-content ul,
.post-content ol {
  padding-left: 22px;
  margin: 0 0 10px;
}


/* =========================================================
   RESPONSIVE - 1080
   ========================================================= */

@media (max-width: 1080px) {

  .content-grid {
    grid-template-columns: 1fr;
  }

  .main-col {
    order: 1;
  }

  .right-panel {
    order: 2;

    position: static;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 14px;

    margin-top: 22px;
  }

  .right-panel .widget-community,
  .right-panel .widget-cta {
    grid-column: 1 / -1;
  }
}


/* =========================================================
   RESPONSIVE - 900
   ========================================================= */

@media (max-width: 900px) {

  .app {
    grid-template-columns: 1fr;

    width: 100%;
    max-width: 100vw;

    min-height: 100dvh;

    overflow-x: hidden;
  }

  .main {
    width: 100%;
    max-width: 100vw;

    min-width: 0;
    min-height: 100dvh;

    overflow-x: hidden;
  }


  /* Sidebar */

  .sidebar {
    position: fixed;

    left: 0;
    top: 0;
    bottom: 0;

    width: 270px;

    transform: translateX(-100%);

    transition: transform 0.22s ease;

    z-index: 10000;

    box-shadow: 20px 0 60px rgba(0,0,0,0.5);
  }

  .sidebar.open {
    transform: translateX(0);
  }


  /* Navbar */

  .hamburger {
    display: flex;
  }

  .search-box {
    display: none;
  }

  .kbd {
    display: none;
  }


  /* Content */

  .content-wrap {
    width: 100%;
    max-width: 100vw;

    min-width: 0;

    padding: 18px;

    padding-bottom:
      calc(88px + env(safe-area-inset-bottom, 0px));

    overflow-x: hidden;
  }

  .content-grid {
    width: 100%;
    max-width: 100%;

    min-width: 0;

    gap: 18px;
  }


  /* Right panel */

  .right-panel {
    grid-template-columns: 1fr;
  }

  .right-panel .widget-community,
  .right-panel .widget-cta {
    display: none;
  }


  /* =====================================================
     BOTTOM NAV - 6 EQUAL COLUMNS
     ===================================================== */

  .bottom-nav {
    display: grid;

    grid-template-columns:
      repeat(6, minmax(0, 1fr));

    width: 100%;
    max-width: 100vw;

    left: 0;
    right: 0;
    bottom: 0;

    padding:
      8px 4px
      calc(8px + env(safe-area-inset-bottom, 0px));

    justify-content: initial;

    align-items: center;

    box-sizing: border-box;

    overflow: visible;

    z-index: 9999;
  }


  /* Every navigation item gets exactly one column */

  .bottom-nav > a {
    width: 100%;
    min-width: 0;
    max-width: 100%;

    height: 44px;

    margin: 0;
    padding: 3px 1px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 3px;

    font-size: 9px;

    line-height: 1.1;

    text-align: center;

    overflow: visible;
  }


  .bottom-nav > a svg {
    width: 19px;
    height: 19px;

    flex-shrink: 0;
  }


  /* Center plus stays in its own column */

  .bottom-nav > a.fab {
    width: 42px;
    height: 42px;

    min-width: 42px;
    min-height: 42px;

    max-width: 42px;

    justify-self: center;
    align-self: center;

    margin: -18px auto 0;

    padding: 0;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: var(--gradient-primary);

    box-shadow:
      0 4px 16px rgba(124, 92, 255, 0.45);
  }


  .bottom-nav > a.fab svg {
    width: 20px;
    height: 20px;
  }


  /* Cards */

  .hero,
  .topic-card,
  .post-card,
  .widget {
    max-width: 100%;
    min-width: 0;
  }

  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }

  pre,
  table {
    max-width: 100%;
    overflow-x: auto;
  }
}


/* =========================================================
   RESPONSIVE - 700
   ========================================================= */

@media (max-width: 700px) {

  .topic-list {
    gap: 10px;
  }

  .topic-card {
    padding: 12px 13px;
    gap: 10px;
  }

  .topic-title {
    font-size: 13.5px;
  }

  .topic-meta {
    font-size: 11.5px;
  }


  /* Forum post mobile */

  .post-card {
    padding: 13px 14px;
  }

  .post-row {
    flex-direction: column;
    gap: 10px;
  }

  .post-author {
    flex-direction: row;

    align-items: center;

    text-align: left;

    width: auto;

    gap: 10px;
  }

  .post-author img.avatar,
  .post-author .avatar-frame-wrap {
    transform: none;
    flex-shrink: 0;
  }

  .post-author-info {
    margin-top: 0;

    align-items: flex-start;

    gap: 3px;
  }

  .post-roles {
    justify-content: flex-start;
  }

  .post-msgcount {
    display: none;
  }

  .post-body {
    border-top: 1px dashed var(--border);

    padding-top: 10px;

    min-width: 0;
  }

  .post-content {
    font-size: 13.5px;

    line-height: 1.55;
  }
}


/* =========================================================
   RESPONSIVE - 560
   ========================================================= */

@media (max-width: 560px) {

  .navbar {
    padding: 12px 14px;
  }

  .hero {
    padding: 22px 18px;
  }

  .hero h1 {
    font-size: 21px;
  }

  .hero-stats {
    gap: 18px;
  }

  .topic-card {
    padding: 12px;
    gap: 10px;
  }

  .topic-stats {
    display: none;
  }

  .topic-time {
    min-width: 54px;
  }


  .content-wrap {
    padding: 14px;

    padding-bottom:
      calc(88px + env(safe-area-inset-bottom, 0px));
  }


  /* Footer */

  .footer {
    flex-direction: column;

    align-items: flex-start;

    padding-left: 10px;
    padding-right: 10px;

    padding-bottom:
      calc(100px + env(safe-area-inset-bottom, 0px));
  }

  .footer a {
    margin-left: 0;
    margin-right: 14px;
  }


  /* =====================================================
     SMALL MOBILE BOTTOM NAV
     ===================================================== */

  .bottom-nav {
    grid-template-columns:
      repeat(6, minmax(0, 1fr));

    padding-left: 2px;
    padding-right: 2px;
  }

  .bottom-nav > a {
    height: 43px;

    padding-left: 0;
    padding-right: 0;

    font-size: 8.5px;

    gap: 2px;
  }

  .bottom-nav > a svg {
    width: 18px;
    height: 18px;
  }

  .bottom-nav > a.fab {
    width: 40px;
    height: 40px;

    min-width: 40px;
    min-height: 40px;

    max-width: 40px;

    margin-top: -17px;
  }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

  .navbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .content-wrap {
    padding-left: 9px;
    padding-right: 9px;
  }

  .bottom-nav {
    grid-template-columns:
      repeat(6, minmax(0, 1fr));

    padding-left: 1px;
    padding-right: 1px;
  }

  .bottom-nav > a {
    font-size: 8px;

    padding-left: 0;
    padding-right: 0;
  }

  .bottom-nav > a svg {
    width: 17px;
    height: 17px;
  }

  .bottom-nav > a.fab {
    width: 38px;
    height: 38px;

    min-width: 38px;
    min-height: 38px;

    max-width: 38px;
  }
}


/* =========================================================
   UNREAD MESSAGE DOT
   ========================================================= */

.bottom-nav-dot {
  position: absolute;

  top: 2px;
  right: 14px;

  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--danger, #ef4444);

  border:
    2px solid rgba(8, 11, 24, 0.92);

  box-sizing: content-box;
}


/* =========================================================
   DIRECT MESSAGES
   ========================================================= */

.messages-shell {
  display: grid;

  grid-template-columns: 280px 1fr;

  height: clamp(420px, calc(100vh - 180px), 760px);

  min-height: 420px;
  max-height: none;

  overflow: hidden;

  min-width: 0;
}

.conv-list {
  border-right: 1px solid var(--border);

  overflow-y: auto;

  min-width: 0;
}

.conv-list-item {
  position: relative;

  display: flex;

  gap: 10px;

  align-items: center;

  padding: 12px 14px;

  border-bottom: 1px solid var(--border);

  transition: background 0.15s;

  min-width: 0;
}

.conv-list-item:hover {
  background: rgba(255,255,255,0.03);
}

.conv-chat {
  display: flex;

  flex-direction: column;

  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.conv-chat-header {
  padding: 14px 18px;

  border-bottom: 1px solid var(--border);

  display: flex;

  align-items: center;

  gap: 10px;

  background: rgba(10, 12, 22, 0.55);

  backdrop-filter: blur(6px);
}

.conv-chat-body {
  flex: 1 1 auto;

  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;

  padding: 18px;

  display: flex;

  flex-direction: column;

  gap: 10px;

  min-width: 0;
}

.conv-chat-input {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 4;

  padding: 10px 12px;

  border-top: 1px solid var(--border);

  display: flex;

  gap: 8px;

  background: rgba(10, 12, 22, 0.55);

  backdrop-filter: blur(6px);
}

.chat-back-btn {
  display: none;

  color: var(--text-1);
}


/* =========================================================
   MOBILE FULLSCREEN CHAT
   ========================================================= */

@media (max-width: 900px) {
  .messages-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    max-height: none;
    border: none;
    border-radius: 0;
    width: 100%;
  }

  .chat-section-head {
    display: none;
  }

  .conv-list {
    display: block;
    border-right: none;
  }

  .conv-chat {
    display: none;
  }

  body.chat-open {
    overflow: hidden;
  }

  body.chat-open .conv-list {
    display: none;
  }

  body.chat-open .conv-chat {
    display: flex;
  }

  body.chat-open .chat-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.chat-open .navbar,
  body.chat-open .bottom-nav,
  body.chat-open .footer,
  body.chat-open .hamburger {
    display: none !important;
  }

  body.chat-open .content-wrap {
    padding: 0 !important;
  }

  body.chat-open .messages-shell {
    position: fixed;
    inset: 0;
    z-index: 99999;
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    background: var(--bg-1, #0b0d18);
  }

  body.chat-open .conv-chat-header {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }

  body.chat-open .conv-chat-body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }

  body.chat-open .conv-chat-input {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    width: 100%;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 12, 22, 0.96);
  }

  body.chat-open .conv-chat-input .input {
    min-width: 0;
  }
}

/* =========================================================
   MOBILE BOTTOM NAV - FINAL FIX
   ========================================================= */

@media (max-width: 900px) {
  .bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-height: 62px;
    padding: 8px 2px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0;
    gap: 0;
    align-items: center;
    justify-items: center;
    overflow: visible !important;
  }

  .bottom-nav > a {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 3px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px;
    font-size: 9px;
    line-height: 1;
    text-align: center;
    overflow: visible !important;
    box-sizing: border-box;
  }

  .bottom-nav > a span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bottom-nav > a svg {
    width: 19px !important;
    height: 19px !important;
    flex: 0 0 auto;
    display: block;
  }

  .bottom-nav > a.active {
    color: var(--purple-soft);
  }

  .bottom-nav > a.fab {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    margin: -18px auto 0 !important;
    padding: 0 !important;
    justify-self: center;
    align-self: center;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50%;
    overflow: visible !important;
  }

  .bottom-nav > a.fab svg {
    width: 20px !important;
    height: 20px !important;
  }

  .bottom-nav-dot {
    position: absolute !important;
    top: 1px !important;
    right: 18% !important;
    width: 7px !important;
    height: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50%;
    box-sizing: content-box !important;
  }
}

@media (max-width: 560px) {
  .bottom-nav {
    min-height: 60px;
    padding-left: 1px !important;
    padding-right: 1px !important;
  }

  .bottom-nav > a {
    height: 44px !important;
    font-size: 8.5px;
    gap: 2px;
  }

  .bottom-nav > a svg {
    width: 18px !important;
    height: 18px !important;
  }

  .bottom-nav > a.fab {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    margin-top: -17px !important;
  }
}

@media (max-width: 380px) {
  .bottom-nav > a {
    font-size: 8px;
  }

  .bottom-nav > a svg {
    width: 17px !important;
    height: 17px !important;
  }

  .bottom-nav > a.fab {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
  }
}

/* =========================================================
   HEADER EXTRAS: TOP PROFILE MENU
   ========================================================= */
 .profile-menu { position:relative; z-index:120; }
.profile-trigger {
  -webkit-appearance:none;
  appearance:none;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:auto;
  min-width:48px;
  height:44px;
  padding:4px 8px 4px 5px;
  margin:0;
  border:1px solid rgba(167,139,250,.22);
  border-radius:14px;
  background:linear-gradient(180deg, rgba(22,28,55,.94) 0%, rgba(12,16,34,.98) 100%);
  color:var(--text-1);
  box-shadow:
    0 8px 24px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 1px rgba(124,92,255,.04);
  cursor:pointer;
  overflow:hidden;
  transition:border-color .18s ease, background .18s ease, transform .15s ease, box-shadow .18s ease;
}
.profile-trigger:hover {
  border-color:rgba(167,139,250,.48);
  background:linear-gradient(180deg, rgba(28,33,66,.98) 0%, rgba(14,18,39,.99) 100%);
  box-shadow:
    0 10px 30px rgba(0,0,0,.34),
    0 0 0 1px rgba(124,92,255,.08),
    0 0 22px rgba(124,92,255,.12),
    inset 0 1px 0 rgba(255,255,255,.07);
}
.profile-trigger:focus-visible {
  outline:2px solid rgba(167,139,250,.9);
  outline-offset:2px;
}
.profile-trigger:active { transform:translateY(1px) scale(.985); }
.profile-trigger .avatar,
.profile-trigger .avatar-frame-wrap {
  filter:drop-shadow(0 2px 7px rgba(0,0,0,.34));
}
.profile-trigger .avatar {
  border:1px solid rgba(255,255,255,.10);
}
.profile-chevron {
  display:flex;
  color:var(--text-2);
  transition:transform .18s ease, color .18s ease;
}
.profile-trigger:hover .profile-chevron { color:var(--text-0); }
.profile-chevron { display:flex; transition:transform .18s ease; }
.profile-menu.open .profile-chevron { transform:rotate(180deg); }
 .profile-dropdown {
  position:absolute;
  top:calc(100% + 9px);
  right:0;
  width:198px;
  padding:8px;
  border:1px solid rgba(167,139,250,.24);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(18,24,48,.98) 0%, rgba(10,14,30,.99) 100%);
  box-shadow:
    0 22px 55px rgba(0,0,0,.46),
    0 0 26px rgba(124,92,255,.10),
    inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  opacity:0;
  visibility:hidden;
  transform:translateY(-5px) scale(.98);
  transform-origin:top right;
  transition:opacity .16s ease, transform .16s ease, visibility .16s ease;
  z-index:100;
}
.profile-menu.open .profile-dropdown { opacity:1; visibility:visible; transform:translateY(0) scale(1); }
 .profile-dropdown a {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:40px;
  padding:10px 11px;
  border:1px solid transparent;
  border-radius:11px;
  color:var(--text-1);
  font-size:13px;
  font-weight:650;
  transition:background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.profile-dropdown a:hover {
  background:linear-gradient(90deg, rgba(124,92,255,.15), rgba(124,92,255,.07));
  border-color:rgba(167,139,250,.16);
  color:var(--text-0);
  transform:translateX(1px);
}
.profile-dropdown a + a { margin-top:4px; }
.profile-dropdown .profile-logout:hover {
  background:linear-gradient(90deg, rgba(251,113,133,.14), rgba(251,113,133,.06));
  border-color:rgba(251,113,133,.16);
  color:#ffd6dc;
}




/* Social/DM actions */
.dm-header-action{margin:0}.dm-mini-action{padding:6px 9px;font-size:11px;border-radius:10px;display:inline-flex;align-items:center;gap:5px}.msg-actions{display:flex;gap:4px;margin-top:3px;justify-content:flex-end;opacity:.78}.msg-action-btn{border:0;background:transparent;color:var(--text-3);font-size:10px;padding:2px 4px;cursor:pointer;display:inline-flex;gap:3px;align-items:center}.msg-action-btn:hover{color:var(--text-0)}.msg-action-btn.danger:hover{color:var(--danger)}.msg-deleted{font-style:italic;color:var(--text-3);opacity:.8}.msg-media-audio{width:260px;max-width:68vw;height:38px}.msg-voice{width:42px;height:42px;flex:0 0 42px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:50%;cursor:pointer;color:var(--text-2);background:rgba(255,255,255,.035);transition:.18s ease}.msg-voice:hover{color:var(--text-0);border-color:var(--border-strong);transform:translateY(-1px)}.msg-voice.recording{color:#fff;border-color:rgba(239,68,68,.55);background:rgba(239,68,68,.16);animation:msgRecordPulse 1s ease-in-out infinite}.msg-recording-status{align-self:center;color:var(--danger);font-size:11px;white-space:nowrap}.member-card-main{display:flex;gap:12px;align-items:center;text-decoration:none;color:inherit}.member-card-actions{display:flex;gap:6px;margin-top:12px}.member-card-actions .btn{padding:6px 8px;font-size:10.5px}.msg-row[data-message-id] .msg-bubble{max-width:100%}@keyframes msgRecordPulse{0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,.22)}50%{box-shadow:0 0 0 6px rgba(239,68,68,0)}}

/* Wiantex media / activity / cosmetics polish */
.activity-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-left:4px;vertical-align:middle;background:#6b7280;box-shadow:0 0 0 2px rgba(107,114,128,.12)}
.activity-dot.online{background:#34d399;box-shadow:0 0 0 3px rgba(52,211,153,.12),0 0 9px rgba(52,211,153,.35)}
.activity-dot.offline{background:#6b7280}
.forum-attach{display:inline-flex;align-items:center;gap:8px;width:max-content;padding:8px 11px;border:1px solid var(--border);border-radius:10px;color:var(--text-2);cursor:pointer;font-size:12px;background:rgba(255,255,255,.025);margin-bottom:10px}
.forum-attach:hover{border-color:var(--border-strong);color:var(--text-0);transform:translateY(-1px)}
.forum-media-wrap{margin-top:10px;max-width:min(720px,100%);border-radius:14px;overflow:hidden;border:1px solid var(--border);background:rgba(0,0,0,.18)}
.forum-media{display:block;width:100%;max-height:560px;object-fit:contain;background:#0a0b10}
.woin-logo{width:20px;height:20px;object-fit:contain;display:inline-block;vertical-align:middle;filter:drop-shadow(0 2px 7px rgba(255,196,50,.22))}
.msg-audio-card{display:flex;align-items:center;gap:10px;min-width:240px;max-width:min(330px,72vw);padding:10px 12px;border:1px solid rgba(255,255,255,.1);border-radius:14px;background:rgba(255,255,255,.05)}
.msg-audio-icon{width:34px;height:34px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:rgba(124,92,255,.18);color:#c4b5fd;flex:0 0 34px}
.msg-audio-card audio{width:100%;height:34px}
.msg-actions{flex-wrap:wrap;max-width:100%;overflow-wrap:anywhere}
.post-username{min-width:0;display:flex;align-items:center;gap:4px;flex-wrap:wrap}

.woin-inline-logo{display:inline-block;object-fit:contain;vertical-align:middle;filter:drop-shadow(0 2px 6px rgba(255,196,50,.2))}
.conv-chat-header .activity-dot{flex:0 0 7px}
.msg-row>.activity-dot{align-self:flex-end;flex:0 0 7px;margin-left:-6px;margin-bottom:7px}

.avatar-wrap{position:relative}
.avatar-online-dot{position:absolute;right:-1px;bottom:-1px;width:8px;height:8px;border-radius:50%;border:2px solid var(--panel-1,#121a33);z-index:5;display:block}
.avatar-online-dot.online{background:#34d399;box-shadow:0 0 8px rgba(52,211,153,.55)}
.avatar-online-dot.offline{background:#64748b}

/* Messages UI repair: stable conversation chooser, clean actions, compact composer */
.messages-shell{min-width:0;overflow:hidden;border-radius:14px}
.conv-list{min-width:0;overflow-x:hidden}
.conv-list-item{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:10px;min-width:0}
.conv-list-item > div{min-width:0}
.conv-title-row,.conv-preview{display:flex;align-items:center;min-width:0;gap:8px}
.conv-username,.conv-preview-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conv-time{flex:0 0 auto;white-space:nowrap}
.conv-preview-text{flex:1 1 auto}
.conv-unread-badge{flex:0 0 auto}
.conv-chat-header{display:flex;flex-wrap:nowrap;min-width:0;gap:8px}
.conv-chat-header > a:not(.chat-back-btn){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-header-action{flex:0 0 auto;min-width:0}
.dm-mini-action{white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.msg-row{min-width:0;display:grid;grid-template-columns:26px minmax(0,1fr);gap:8px;align-items:end}
.msg-row.mine{grid-template-columns:minmax(0,1fr) 26px}
.msg-row.mine > .avatar-wrap{grid-column:2}
.msg-row.mine > div{grid-column:1}
.msg-row:not(.mine) > .avatar-wrap{grid-column:1}
.msg-row:not(.mine) > div{grid-column:2}
.msg-bubble{max-width:min(78ch,100%);overflow:hidden;word-break:break-word}
.msg-text{overflow-wrap:anywhere;word-break:break-word}
.msg-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap;min-height:18px}
.msg-action-btn{white-space:nowrap;line-height:1.2}
.conv-chat-input{display:flex;align-items:center;gap:7px;min-width:0}
.conv-chat-input > .msg-voice,
.conv-chat-input > .msg-attach,
.conv-chat-input > .msg-send{flex:0 0 36px;width:36px;height:36px}
.msg-composer-wrap{flex:1 1 auto;min-width:0}
.conv-chat-input .msg-composer{min-height:38px;height:38px;max-height:88px;padding:8px 12px;line-height:1.35;border-radius:14px;box-sizing:border-box}
.msg-send{display:inline-flex;align-items:center;justify-content:center}
.msg-recording-status{max-width:92px;overflow:hidden;text-overflow:ellipsis}
.empty-state{min-width:0;max-width:100%;padding:24px;text-align:center;overflow-wrap:anywhere}

@media (max-width:900px){
.sidebar-brand { min-height:54px; padding:2px 4px; }
  .sidebar-brand-logo { width:min(100%,174px); max-height:58px; }

  .messages-shell{border-radius:12px}
  .conv-list{padding-bottom:4px}
  .conv-list-item{grid-template-columns:40px minmax(0,1fr);padding:10px 12px}
  .conv-chat-header{gap:6px;padding-left:10px;padding-right:10px}
  .dm-mini-action{padding:6px 8px;font-size:10px}
  .msg-row{max-width:92%;grid-template-columns:24px minmax(0,1fr);gap:7px}
  .msg-row.mine{grid-template-columns:minmax(0,1fr) 24px}
  .conv-chat-input{gap:6px;padding:8px 9px}
  .conv-chat-input > .msg-voice,
  .conv-chat-input > .msg-attach,
  .conv-chat-input > .msg-send{flex-basis:34px;width:34px;height:34px}
  .conv-chat-input .msg-composer{height:36px;min-height:36px;max-height:78px;padding:7px 11px}
}

@media (max-width:520px){
  .conv-chat-header{flex-wrap:wrap;row-gap:5px}
  .conv-chat-header .dm-header-action{margin-left:0}
  .conv-chat-header .dm-mini-action span{display:none}
  .conv-chat-input > .msg-voice,
  .conv-chat-input > .msg-attach,
  .conv-chat-input > .msg-send{flex-basis:32px;width:32px;height:32px}
  .conv-chat-input .msg-composer{height:34px;min-height:34px;padding:6px 10px}
  .msg-row{max-width:96%}
  .msg-actions{gap:4px}
  .msg-action-btn{font-size:10px;padding:2px 3px}
}


.leaderboard-subtitle{font-size:11.5px;margin:-4px 0 8px;}
.leaderboard-empty{font-size:12.5px;margin:4px 0 0;}
.leader-rgb-star{display:inline-block;font-size:17px;line-height:1;background:linear-gradient(90deg,#ff3b30 0%,#ff9500 18%,#ffd60a 34%,#34c759 50%,#00c7be 66%,#0a84ff 82%,#af52de 100%);background-size:220% auto;-webkit-background-clip:text;background-clip:text;color:transparent;animation:leaderRgbStar 2s linear infinite;filter:drop-shadow(0 0 5px rgba(175,82,222,.25));}
.leader-count .leader-rgb-star{font-size:13px;vertical-align:-1px;}
@keyframes leaderRgbStar{0%{background-position:0% 50%}100%{background-position:220% 50%}}

/* css/components.css */
/* ===== Auth pages ===== */
.auth-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(60% 50% at 20% 10%, rgba(124, 92, 255, 0.16) 0%, transparent 60%),
    radial-gradient(50% 40% at 90% 90%, rgba(255, 110, 199, 0.12) 0%, transparent 60%),
    var(--bg-0);
}
.auth-card { width: 100%; max-width: 400px; padding: 32px 30px; }
.auth-card .brand { justify-content: center; margin-bottom: 22px; }
.auth-card h1 { font-size: 20px; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--text-2); font-size: 13.5px; margin-bottom: 24px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-1); margin-bottom: 6px; font-weight: 600; }
.field-hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.auth-card .btn-primary { width: 100%; padding: 12px; margin-top: 6px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-2); }
.auth-switch a { color: var(--purple-soft); font-weight: 600; }

/* ===== Alerts / toast ===== */
.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px solid;
  display: flex; align-items: center; gap: 8px;
}
.alert-success { background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.3); color: var(--success); }
.alert-error { background: rgba(251, 113, 133, 0.08); border-color: rgba(251, 113, 133, 0.3); color: var(--danger); }
.alert-warning { background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.3); color: var(--warning); }

.toast-stack { position: fixed; bottom: 20px; right: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--panel-1); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  font-size: 13.5px; display: flex; align-items: center; gap: 8px;
  animation: toast-in 0.2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-2); }
.empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 14px; margin-bottom: 16px; }

/* ===== Pagination ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 13px; color: var(--text-1);
  border: 1px solid var(--border);
}
.pagination a:hover { border-color: var(--border-strong); }
.pagination .active { background: var(--gradient-primary); color: #fff; border-color: transparent; }

/* ===== Error pages ===== */
.error-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.error-shell .code {
  font-family: var(--font-display); font-size: 72px; font-weight: 800;
  background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-shell h1 { font-size: 20px; margin: 10px 0 8px; }
.error-shell p { color: var(--text-2); margin-bottom: 22px; }

@media (max-width: 700px) {
  .card[style*="260px 1fr"] { grid-template-columns: 1fr !important; }
}

/* ===== Market ===== */
.market-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background:
    radial-gradient(60% 140% at 0% 0%, rgba(124, 92, 255, 0.22) 0%, transparent 60%),
    radial-gradient(50% 120% at 100% 100%, rgba(255, 110, 199, 0.16) 0%, transparent 60%),
    linear-gradient(180deg, var(--panel-1) 0%, var(--panel-0) 100%);
}
.market-hero h2 { font-size: 19px; display: flex; align-items: center; gap: 9px; }
.market-hero p { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.market-balance {
  display: flex; align-items: center; gap: 10px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 18px 10px 14px;
  font-weight: 800; font-size: 15.5px;
  box-shadow: var(--shadow-glow-purple);
}
.market-balance .coin-spin { color: var(--warning); display: inline-flex; animation: coinSpin 3.2s linear infinite; }
@keyframes coinSpin { 0%, 80% { transform: rotateY(0deg); } 90% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }

.market-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 7px;
}
.market-tab-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 17px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; color: var(--text-2);
  background: transparent; border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.market-tab-btn:hover { color: var(--text-0); }
.market-tab-btn.active { background: var(--gradient-primary); color: #fff; box-shadow: 0 4px 16px rgba(124, 92, 255, 0.35); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.shop-card {
  position: relative;
  padding: 20px 18px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.shop-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.shop-card.owned { opacity: 0.82; }
.shop-card-media {
  width: 68px; height: 68px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.shop-card-media img { width: 56px; height: 56px; object-fit: contain; }
.shop-card-name { font-weight: 700; font-size: 13.5px; margin-bottom: 10px; min-height: 34px; display: flex; align-items: center; justify-content: center; }
.shop-price-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(251, 191, 36, 0.12); color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px; padding: 4px 12px;
  font-weight: 800; font-size: 13px; margin-bottom: 12px;
}
.shop-owned-ribbon {
  position: absolute; top: 10px; right: 10px;
  background: rgba(52, 211, 153, 0.15); color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px; font-size: 10.5px; font-weight: 800;
  padding: 3px 9px; display: flex; align-items: center; gap: 3px;
}

.package-card {
  position: relative;
  padding: 20px 20px 18px;
  display: flex; flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.package-card.owned { opacity: 0.82; }
.package-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.package-card-title { font-weight: 800; font-size: 14.5px; margin-bottom: 10px; }
.package-item-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(124, 92, 255, 0.08); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; color: var(--text-1);
}
.package-items { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.package-price-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }

/* Paket içeriği rozetleri — rütbe (renkli/animasyonlu isim), çerçeve (gerçek görsel), XP (ikon) */
.package-item-chip img {
  width: 18px; height: 18px; object-fit: contain; border-radius: 5px;
  background: rgba(255, 255, 255, 0.06); flex-shrink: 0;
}
.package-item-chip.role-effect { border-color: transparent; }
.package-item-chip-frame { display: inline-flex; align-items: center; gap: 6px; }
.package-item-chip-admin img { vertical-align: middle; }

.xp-calc-card { padding: 24px; max-width: 380px; }
.xp-calc-rate { font-size: 13px; color: var(--text-2); margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.xp-calc-preview {
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 12px;
  font-size: 13.5px; color: var(--cyan); font-weight: 700;
  display: flex; align-items: center; gap: 7px;
}

@media (max-width: 560px) {
  .market-hero { padding: 18px; }
  .market-tabs { overflow-x: auto; flex-wrap: nowrap; }
}

/* ===== Rütbe efektleri (rol animasyonları) ===== */
@keyframes roleShine {
  to { background-position: 300% center; }
}
@keyframes roleGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.role-effect { display: inline-block; }
/* "Secret Rol" — otomatik seviye rozeti (50/150/250). Normal kozmetik rütbelerden
   kasıtlı olarak ayrı bir satırda ve ince kesikli çerçeveyle gösterilir, karışmasın. */
.secret-role-badge { border: 1px dashed currentColor; opacity: 0.92; font-size: 11.5px; }

/* ===== Admin: rol / şifre talepleri panelleri ===== */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); font-weight: 600; }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.color-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--border-strong); vertical-align: middle; }

/* ===== Kullanıcı adı otomatik-tamamlama (rütbe verme + @mention) ===== */
.ac-wrap { position: relative; }
.ac-dropdown {
  position: absolute; z-index: 70; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--panel-1); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
  overflow: hidden; max-height: 260px; overflow-y: auto;
  display: none;
}
.ac-dropdown.open { display: block; }
.ac-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; cursor: pointer; font-size: 13px;
}
.ac-item img, .ac-item .ac-avatar, .ac-item .ac-avatar-fallback {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--gradient-primary); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.ac-item:hover, .ac-item.active { background: rgba(124, 92, 255, 0.12); }
.ac-empty { padding: 10px 12px; font-size: 12.5px; color: var(--text-3); }

/* @mention — yazı içinde vurgulanmış kullanıcı bağlantısı */
.mention-tag {
  color: var(--purple-soft); font-weight: 700;
  background: rgba(124, 92, 255, 0.12);
  padding: 1px 5px; border-radius: 5px;
}
.mention-tag:hover { background: rgba(124, 92, 255, 0.22); }

/* ===== Dış link uyarı modalı ===== */
.wt-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5, 7, 18, 0.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: wt-fade-in 0.15s ease;
}
@keyframes wt-fade-in { from { opacity: 0; } to { opacity: 1; } }
.wt-modal {
  background: linear-gradient(180deg, var(--panel-1) 0%, var(--panel-0) 100%);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); max-width: 400px; width: 100%; padding: 24px;
}
.wt-modal h3 { font-size: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; color: var(--warning); }
.wt-modal p { font-size: 13.5px; color: var(--text-1); line-height: 1.6; margin-bottom: 8px; }
.wt-modal .wt-modal-link {
  font-size: 12px; color: var(--text-3); word-break: break-all;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; margin-bottom: 18px;
}
.wt-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== Özel Mesajlar (DM) — yeniden tasarım =====
   NOT: .conv-list-item'ın display:flex + boyut kuralları layout.css'te
   tanımlı (masaüstü/mobil grid ile birlikte). Burada sadece link
   sıfırlama ve aktif durum stilini ekliyoruz — flex/gap/padding'i
   BURADA TEKRAR TANIMLAMA, iki dosya çakışıp sıralamaya göre birbirini
   ezebilir. */
.conv-list-item { text-decoration: none; color: inherit; }
.conv-list-item.active { background: rgba(124, 92, 255, 0.1); }
.conv-list-item.active::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  background: var(--gradient-primary); border-radius: 0 4px 4px 0;
}
.conv-title-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.conv-username { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.conv-username.has-unread { font-weight: 800; color: var(--text-0, #fff); }
.conv-time { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.conv-preview {
  font-size: 12.5px; color: var(--text-3); margin-top: 2px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-width: 0;
}
.conv-preview-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.conv-preview.has-unread { color: var(--text-1); }
.conv-preview.has-unread .conv-preview-text { font-weight: 600; }
.conv-unread-badge {
  background: var(--gradient-primary); color: #fff; font-size: 10.5px; font-weight: 800;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.msg-row { display: flex; gap: 10px; align-items: flex-end; max-width: 78%; min-width:0; }
.msg-row > .avatar,.msg-row > .avatar-frame-wrap{flex:0 0 auto;}
.msg-row.mine { align-self: flex-end; flex-direction: row-reverse; }
/* DM avatarları mesajlar arasında kaybolmasın: her mesajda sabit görünür. */
.msg-row .avatar { width: 26px; height: 26px; flex: 0 0 26px; visibility: visible !important; opacity: 1 !important; display: block; }
.msg-row .avatar-frame-wrap { flex: 0 0 auto; visibility: visible !important; opacity: 1 !important; }
.msg-row.show-avatar .avatar,
.msg-row:not(.show-avatar) .avatar { visibility: visible !important; opacity: 1 !important; }
.msg-bubble {
  padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.5;
  box-shadow: 0 2px 10px rgba(0,0,0,.15); word-break: break-word;
}
.msg-row.mine .msg-bubble { border-bottom-right-radius: 4px; }
.msg-row:not(.mine) .msg-bubble { border-bottom-left-radius: 4px; }
.msg-time { font-size: 10px; color: var(--text-3); margin-top: 3px; padding: 0 4px; }
.msg-row.mine .msg-time { text-align: right; }
.msg-day-divider {
  text-align: center; font-size: 11px; color: var(--text-3);
  margin: 14px 0 6px; position: relative;
}

.conv-chat-input { align-items: flex-end; }
.conv-chat-input .input {
  min-height: 42px;
  max-height: 128px;
  resize: none;
  overflow-y: auto;
  border-radius: 18px;
  padding: 10px 14px;
  line-height: 1.45;
  flex: 1 1 auto;
}
.conv-chat-input .btn-primary {
  border-radius: 50%; width: 42px; height: 42px; padding: 0; flex: 0 0 42px;
}
.conv-chat-input .input:focus {
  box-shadow: 0 0 0 2px rgba(124,92,255,.18);
}
.msg-composer {
  width: 100%;
}
.msg-send {
  align-self: flex-end;
}

.msg-media{display:block;max-width:min(320px,72vw);border-radius:12px;object-fit:cover;background:rgba(0,0,0,.18)}
.msg-media-image{max-height:360px;width:auto;height:auto}
.msg-media-video{width:320px;max-width:72vw;max-height:360px}
.msg-text{white-space:pre-wrap;overflow-wrap:anywhere}
.msg-bubble:has(.msg-media) .msg-text{margin-top:7px}
.msg-attach{width:42px;height:42px;flex:0 0 42px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:50%;cursor:pointer;color:var(--text-2);background:rgba(255,255,255,.035);transition:.18s ease}
.msg-attach:hover{color:var(--text-0);border-color:var(--border-strong);background:rgba(255,255,255,.06);transform:translateY(-1px)}
.msg-composer-wrap{position:relative;flex:1 1 auto;min-width:0}
.msg-attach-name{position:absolute;left:12px;right:12px;bottom:100%;margin-bottom:5px;font-size:11px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:var(--panel-1);border:1px solid var(--border);padding:4px 8px;border-radius:8px}
.profile-main-avatar{display:inline-flex;align-items:center;margin-top:0!important}
.profile-main-avatar.has-banner{margin-top:-46px!important}
.avatar-frame-wrap{overflow:visible!important;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;position:relative}
.avatar-frame-wrap .avatar{position:relative;z-index:1}
.avatar-frame-img{pointer-events:none!important}


@media (max-width: 900px) {
  .msg-row { max-width: 86%; }
}

/* ===== Anasayfa: Geri sayım + Canlı sohbet ===== */
.live-widgets-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  margin-bottom: 26px;
  align-items: stretch;
}

.countdown-card { padding: 20px; }
.countdown-card h3 { font-size: 13.5px; display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.countdown-display { display: flex; gap: 10px; }
.countdown-unit {
  flex: 1; text-align: center;
  background: rgba(124, 92, 255, 0.08); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 4px;
}
.countdown-unit span {
  display: block; font-family: var(--font-display); font-weight: 800; font-size: 22px;
  background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.countdown-unit small { font-size: 10px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.countdown-done {
  display: flex; align-items: center; gap: 7px;
  color: var(--success); font-weight: 700; font-size: 13.5px;
  background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius-sm); padding: 10px 12px;
}

.livechat-card { padding: 18px 18px 14px; display: flex; flex-direction: column; }
.livechat-card h3 { font-size: 13.5px; display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.lc-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 6px var(--success); animation: lcPulse 1.6s ease-in-out infinite; margin-left: 2px;
}
@keyframes lcPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.lc-messages {
  flex: 1; min-height: 190px; max-height: 240px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding-right: 4px; margin-bottom: 12px;
}
.lc-msg { display: flex; gap: 8px; align-items: flex-start; }
.lc-avatar, .lc-avatar-fallback {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--gradient-primary); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.lc-msg-body { min-width: 0; flex: 1; }
.lc-msg-head { display: flex; align-items: baseline; gap: 6px; }
.lc-username { font-size: 12.5px; font-weight: 700; }
.lc-time { font-size: 10.5px; color: var(--text-3); }
.lc-msg-text { font-size: 13px; color: var(--text-1); word-break: break-word; overflow-wrap: anywhere; margin-top: 1px; }

.lc-input-row { display: flex; gap: 8px; }
.lc-input-row .input { padding: 9px 12px; font-size: 13px; }
.lc-input-row .btn { padding: 9px 14px; }
.lc-login-cta { text-align: center; font-size: 12.5px; }
.lc-login-cta a { color: var(--purple-soft); font-weight: 600; }

@media (max-width: 760px) {
  .live-widgets-row { grid-template-columns: 1fr; }
}


/* DM polling / notification jump */
.message-jump-highlight { animation: messageJumpHighlight 1.8s ease; }
@keyframes messageJumpHighlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,92,255,0); }
  20% { box-shadow: 0 0 0 5px rgba(124,92,255,.28); border-radius: 18px; }
  70% { box-shadow: 0 0 0 3px rgba(124,92,255,.16); border-radius: 18px; }
}

.verified-badge{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:linear-gradient(135deg,#60a5fa 0%,#7c5cff 100%);color:#fff;box-shadow:0 0 0 2px rgba(96,165,250,.12),0 4px 12px rgba(124,92,255,.22);vertical-align:middle;flex:0 0 16px}.verified-badge-orange{background:linear-gradient(135deg,#f59e0b 0%,#f97316 100%);box-shadow:0 0 0 2px rgba(245,158,11,.16),0 4px 13px rgba(249,115,22,.28)}.verified-badge-red{background:linear-gradient(135deg,#ef4444 0%,#b91c1c 100%);box-shadow:0 0 0 2px rgba(239,68,68,.17),0 4px 14px rgba(220,38,38,.32)}
.profile-hero{position:relative;overflow:hidden}.profile-banner{height:185px;border-radius:16px;overflow:hidden;background:linear-gradient(135deg,var(--panel-1),var(--panel-0));background-size:cover;background-position:center;position:relative;margin:-2px -2px 20px}.profile-banner:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(7,9,20,.05),rgba(7,9,20,.72));pointer-events:none}.profile-main-avatar{position:relative;z-index:2;margin-top:-46px;width:max-content}.nav-profile-dot{position:absolute;right:1px;bottom:1px;width:10px;height:10px;border-radius:50%;border:2px solid var(--panel-0)}.nav-profile-status{font-size:11px;color:var(--text-2);display:block;margin-top:2px}.profile-social-link{display:inline-flex;align-items:center;gap:7px}.social-tag{opacity:.55;font-size:10px}

.profile-hero[data-animation="float"] .profile-main-avatar{animation:profileFloat 3s ease-in-out infinite}.profile-hero[data-animation="glow"]{animation:profileGlow 4s ease-in-out infinite}.profile-hero[data-animation="banner"] .profile-banner{animation:bannerDrift 12s ease-in-out infinite}


/* Social/DM actions */
.dm-header-action{margin:0}.dm-mini-action{padding:6px 9px;font-size:11px;border-radius:10px;display:inline-flex;align-items:center;gap:5px}.msg-actions{display:flex;gap:4px;margin-top:3px;justify-content:flex-end;opacity:.78}.msg-action-btn{border:0;background:transparent;color:var(--text-3);font-size:10px;padding:2px 4px;cursor:pointer;display:inline-flex;gap:3px;align-items:center}.msg-action-btn:hover{color:var(--text-0)}.msg-action-btn.danger:hover{color:var(--danger)}.msg-deleted{font-style:italic;color:var(--text-3);opacity:.8}.msg-media-audio{width:260px;max-width:68vw;height:38px}.msg-voice{width:42px;height:42px;flex:0 0 42px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:50%;cursor:pointer;color:var(--text-2);background:rgba(255,255,255,.035);transition:.18s ease}.msg-voice:hover{color:var(--text-0);border-color:var(--border-strong);transform:translateY(-1px)}.msg-voice.recording{color:#fff;border-color:rgba(239,68,68,.55);background:rgba(239,68,68,.16);animation:msgRecordPulse 1s ease-in-out infinite}.msg-recording-status{align-self:center;color:var(--danger);font-size:11px;white-space:nowrap}.member-card-main{display:flex;gap:12px;align-items:center;text-decoration:none;color:inherit}.member-card-actions{display:flex;gap:6px;margin-top:12px}.member-card-actions .btn{padding:6px 8px;font-size:10.5px}.msg-row[data-message-id] .msg-bubble{max-width:100%}@keyframes msgRecordPulse{0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,.22)}50%{box-shadow:0 0 0 6px rgba(239,68,68,0)}}

/* Wiantex media / activity / cosmetics polish */
.activity-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-left:4px;vertical-align:middle;background:#6b7280;box-shadow:0 0 0 2px rgba(107,114,128,.12)}
.activity-dot.online{background:#34d399;box-shadow:0 0 0 3px rgba(52,211,153,.12),0 0 9px rgba(52,211,153,.35)}
.activity-dot.offline{background:#6b7280}
.forum-attach{display:inline-flex;align-items:center;gap:8px;width:max-content;padding:8px 11px;border:1px solid var(--border);border-radius:10px;color:var(--text-2);cursor:pointer;font-size:12px;background:rgba(255,255,255,.025);margin-bottom:10px}
.forum-attach:hover{border-color:var(--border-strong);color:var(--text-0);transform:translateY(-1px)}
.forum-media-wrap{margin-top:10px;max-width:min(720px,100%);border-radius:14px;overflow:hidden;border:1px solid var(--border);background:rgba(0,0,0,.18)}
.forum-media{display:block;width:100%;max-height:560px;object-fit:contain;background:#0a0b10}
.woin-logo{width:20px;height:20px;object-fit:contain;display:inline-block;vertical-align:middle;filter:drop-shadow(0 2px 7px rgba(255,196,50,.22))}
.msg-audio-card{display:flex;align-items:center;gap:10px;min-width:240px;max-width:min(330px,72vw);padding:10px 12px;border:1px solid rgba(255,255,255,.1);border-radius:14px;background:rgba(255,255,255,.05)}
.msg-audio-icon{width:34px;height:34px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:rgba(124,92,255,.18);color:#c4b5fd;flex:0 0 34px}
.msg-audio-card audio{width:100%;height:34px}
.msg-actions{flex-wrap:wrap;max-width:100%;overflow-wrap:anywhere}
.post-username{min-width:0;display:flex;align-items:center;gap:4px;flex-wrap:wrap}

.woin-inline-logo{display:inline-block;object-fit:contain;vertical-align:middle;filter:drop-shadow(0 2px 6px rgba(255,196,50,.2))}
.conv-chat-header .activity-dot{flex:0 0 7px}
.msg-row>.activity-dot{align-self:flex-end;flex:0 0 7px;margin-left:-6px;margin-bottom:7px}

/* User marketplace */
.market-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.market-product-card{overflow:hidden;padding:0;display:flex;flex-direction:column;min-width:0}
.market-product-image,.market-product-placeholder{width:100%;height:180px;object-fit:cover;background:linear-gradient(135deg,rgba(124,92,255,.16),rgba(59,130,246,.08));display:flex;align-items:center;justify-content:center;color:var(--purple-soft,#a78bfa)}
.market-product-body{padding:16px;display:flex;flex-direction:column;gap:10px}
.market-product-body h3{font-size:15px;margin:0}
.market-product-body p{font-size:12.5px;line-height:1.55;color:var(--text-muted,#9aa0b7);margin:0;min-height:58px}
.market-product-meta{display:flex;align-items:center;justify-content:space-between;gap:8px}
.market-product-meta a{font-size:12px;color:var(--text-main,#f4f5fb);text-decoration:none}
.market-product-form{display:grid;gap:12px;max-width:760px}
@media(max-width:700px){.market-product-grid{grid-template-columns:1fr}.market-product-image,.market-product-placeholder{height:150px}}

.avatar-wrap{position:relative}
.avatar-online-dot{position:absolute;right:-1px;bottom:-1px;width:8px;height:8px;border-radius:50%;border:2px solid var(--panel-1,#121a33);z-index:5;display:block}
.avatar-online-dot.online{background:#34d399;box-shadow:0 0 8px rgba(52,211,153,.55)}
.avatar-online-dot.offline{background:#64748b}

/* Profile level progress - classic */
.profile-level-bar{position:relative;display:block;width:100%;height:10px;min-height:10px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.10);box-shadow:inset 0 1px 3px rgba(0,0,0,.28)}
.profile-level-fill{display:block;height:100%;min-width:4px;border-radius:999px;background:linear-gradient(90deg,#7c3aed 0%,#6366f1 50%,#3b82f6 100%);box-shadow:0 0 10px rgba(99,102,241,.28)}

/* Message rendering hardening */
.msg-text{overflow-wrap:anywhere;word-break:break-word;min-width:0;}
.msg-bubble{min-width:0;max-width:100%;overflow-wrap:anywhere;}
.msg-media{display:block;max-width:min(100%,420px);height:auto;}
.msg-media-video{width:min(420px,100%);max-height:60vh;background:#05070d;}
.msg-media-image{max-height:55vh;object-fit:contain;border-radius:10px;}
.msg-media-audio,.msg-audio-card{max-width:100%;width:min(320px,100%);}
.conv-chat-header>*{min-width:0;}
.conv-chat-header>a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@media (max-width:600px){
 .messages-shell{min-width:0;width:100%;}
 .msg-row{max-width:92%;min-width:0;}
 .msg-bubble{padding:9px 10px;}
 .msg-actions{flex-wrap:wrap;}
}

/* Profile/frame stability fix: keep frame overlay visual without changing layout metrics. */
.avatar-frame-wrap{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:visible!important;
  isolation:isolate!important;
  vertical-align:middle!important;
}
.avatar-frame-wrap .avatar-frame-base{position:relative!important;z-index:1!important;display:block!important;}
.avatar-frame-wrap .avatar{position:relative!important;z-index:1!important;display:block!important;}
.avatar-frame-wrap .avatar-frame-img{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:138%!important;
  height:138%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  display:block!important;
  pointer-events:none!important;
  z-index:3!important;
}
.profile-main-avatar .avatar-frame-wrap{
  width:84px!important;height:84px!important;flex:0 0 84px!important;
  overflow:visible!important;padding:0!important;border:0!important;
}
.profile-main-avatar .avatar-frame-wrap .avatar-frame-base,
.profile-main-avatar .avatar-frame-wrap .avatar{width:84px!important;height:84px!important;max-width:84px!important;max-height:84px!important;}
.profile-main-avatar .avatar-frame-wrap .avatar-frame-img{width:116px!important;height:116px!important;}
@media (max-width:700px){
  .profile-main-avatar .avatar-frame-wrap{width:72px!important;height:72px!important;flex-basis:72px!important;}
  .profile-main-avatar .avatar-frame-wrap .avatar-frame-base,
  .profile-main-avatar .avatar-frame-wrap .avatar{width:72px!important;height:72px!important;max-width:72px!important;max-height:72px!important;}
  .profile-main-avatar .avatar-frame-wrap .avatar-frame-img{width:100px!important;height:100px!important;}
}
@media (max-width:390px){
  .profile-main-avatar .avatar-frame-wrap{width:64px!important;height:64px!important;flex-basis:64px!important;}
  .profile-main-avatar .avatar-frame-wrap .avatar-frame-base,
  .profile-main-avatar .avatar-frame-wrap .avatar{width:64px!important;height:64px!important;max-width:64px!important;max-height:64px!important;}
  .profile-main-avatar .avatar-frame-wrap .avatar-frame-img{width:88px!important;height:88px!important;}
}

/* final avatar/frame fix is loaded from avatar-frame-final-fix.css */

/* assets/mobile.css */
/* Wiantex global mobile fullscreen fix */
html { min-height:100%; background:#070713; }
body { min-height:100dvh; margin:0; overflow-x:hidden; }

@media (max-width:760px) {
  .app, .main, .content-wrap { width:100%; max-width:none; }
  .main { min-height:100dvh; padding-bottom:calc(86px + env(safe-area-inset-bottom)) !important; }

  .bottom-nav {
    position:fixed !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    width:100% !important;
    z-index:9999 !important;
    padding-bottom:env(safe-area-inset-bottom) !important;
  }

  .footer { padding-bottom:calc(90px + env(safe-area-inset-bottom)) !important; }
  .footer-links { margin-top: 6px; }
}

@media (max-width:900px) {
  body.drawer-open { overflow:hidden; }
  .sidebar { max-width:86vw; }
}

/* Mobile-only polish */
@media (max-width: 900px) {
  .navbar-desktop-only { display:none !important; }
  .desktop-flash-area { display:none !important; }
  .navbar { padding:12px 14px; gap:10px; }
  .navbar-actions { gap:7px; }
  .profile-chevron { display:none; }
  .profile-trigger { padding:1px; border-radius:10px; }
  .profile-dropdown { right:0; width:170px; }

  .bottom-nav > a.fab {
    width:50px !important;
    height:50px !important;
    min-width:50px !important;
    min-height:50px !important;
    max-width:50px !important;
    margin:-23px auto 0 !important;
    border:3px solid rgba(255,255,255,.72);
    box-shadow:0 10px 28px rgba(124,92,255,.38), 0 0 0 5px rgba(124,92,255,.10), inset 0 1px 0 rgba(255,255,255,.30);
  }
  .bottom-nav > a.fab svg { width:22px; height:22px; filter:drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
}

@media(max-width:700px){.profile-banner{height:135px}.profile-main-avatar{margin-top:-34px}.profile-hero{padding:13px!important}}

/* css/wiantex-compat.css */
/* Wiantex compatibility layer: preserves legacy UI while supporting current functionality. */
.avatar-presence-dot{position:absolute;right:-3px;bottom:-3px;width:16px;height:16px;border-radius:50%;border:2px solid var(--panel-1,#121a33);z-index:6;display:flex;align-items:center;justify-content:center;box-sizing:border-box;box-shadow:0 0 0 1px rgba(0,0,0,.12),0 2px 8px rgba(0,0,0,.28)}
.avatar-presence-dot .presence-svg-icon{display:block;width:9px;height:9px}
.avatar-presence-online{color:#35d07f;background:#123b2c}.avatar-presence-busy{color:#ffad33;background:#4a3210}.avatar-presence-dnd{color:#ff5f67;background:#4a171b}.avatar-presence-away{color:#c5cad6;background:#303746}.avatar-presence-sleep{color:#b19cff;background:#2d2254}.avatar-presence-offline{color:#64748b;background:#202735}
.nav-profile-user-info{display:flex;flex-direction:column;min-width:0}.nav-profile-status{display:flex;align-items:center;gap:4px;line-height:1.25}
.nav-presence-icon{display:inline-flex;width:14px;justify-content:center;align-items:center}
.presence-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.presence-option{position:relative;display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--border);border-radius:12px;background:var(--panel-0);cursor:pointer}.presence-option input{position:absolute;opacity:0;pointer-events:none}.presence-option-icon{display:inline-flex;width:24px;justify-content:center;align-items:center}.presence-option-text{font-size:13px;font-weight:600}
.message-internal-link,.message-external-link{color:inherit;text-decoration:underline;text-decoration-color:rgba(255,255,255,.35);text-underline-offset:2px}.message-external-link{color:#c4b5fd}.msg-link-warning{display:none}.wt-modal-overlay{position:fixed;inset:0;background:rgba(2,4,12,.72);backdrop-filter:blur(8px);z-index:9999;display:grid;place-items:center;padding:18px}.wt-modal{width:min(520px,100%);padding:20px;border:1px solid var(--border-strong);border-radius:16px;background:var(--panel-1);box-shadow:0 24px 70px rgba(0,0,0,.45)}.wt-modal h3{margin:0 0 10px;font-size:16px}.wt-modal p{margin:0 0 12px;font-size:13px;line-height:1.6}.wt-modal-link{padding:9px 10px;margin-bottom:14px;border:1px solid var(--border);border-radius:9px;word-break:break-all}.wt-modal-actions{display:flex;justify-content:flex-end;gap:8px}
@media(max-width:560px){.presence-options{grid-template-columns:1fr}.wt-modal-actions{display:grid;grid-template-columns:1fr 1fr}}

/* final avatar/frame fix is loaded from avatar-frame-final-fix.css */

/* css/ui-v2.css */
/* Wiantex UI v2 — visual layer only. Backend/markup behavior remains intact. */
:root{
  --ui-surface: color-mix(in srgb, var(--panel-1) 92%, transparent);
  --ui-surface-2: color-mix(in srgb, var(--panel-0) 94%, transparent);
  --ui-line: color-mix(in srgb, var(--border-strong) 72%, transparent);
  --ui-radius: 14px;
  --ui-radius-lg: 18px;
  --ui-space: 16px;
  --ui-content-max: 1460px;
}

body.ui-v2{
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(124,92,255,.08), transparent 62%),
    radial-gradient(700px 520px at 94% 8%, rgba(59,130,246,.07), transparent 60%),
    var(--bg-0);
}

body.ui-v2 .content-wrap{max-width:var(--ui-content-max);margin:0 auto;width:100%;padding:24px clamp(16px,2.2vw,30px) 42px}
body.ui-v2 .content-grid{grid-template-columns:minmax(0,1fr) minmax(250px,290px);gap:20px}
body.ui-v2 .right-panel{gap:14px;top:78px}

/* shared cards */
body.ui-v2 .card{
  background:linear-gradient(180deg,var(--panel-1),var(--panel-0));
  border:1px solid color-mix(in srgb,var(--border-strong) 72%, transparent);
  border-radius:var(--ui-radius);
  box-shadow:0 10px 34px rgba(0,0,0,.18);
}
body.ui-v2 .card:hover{border-color:color-mix(in srgb,var(--border-strong) 88%, transparent)}
body.ui-v2 .section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:2px 0 16px}
body.ui-v2 .section-head h2{font-size:18px;line-height:1.25;display:flex;align-items:center;gap:9px}
body.ui-v2 .section-link{font-size:12.5px;color:var(--purple-soft);font-weight:700;white-space:nowrap}

/* nav */
body.ui-v2 .sidebar{
  background:rgba(7,10,21,.86);
  border-right:1px solid color-mix(in srgb,var(--border) 88%, transparent);
  padding:18px 14px;
  gap:20px;
}
body.ui-v2 .brand{padding:4px 8px 10px}
body.ui-v2 .brand-mark{width:38px;height:38px;border-radius:11px;box-shadow:none}
body.ui-v2 .nav-group{gap:3px}
body.ui-v2 .nav-label{padding:10px 11px 6px;font-size:10px}
body.ui-v2 .nav-item{min-height:40px;padding:9px 11px;border-radius:10px;font-size:13.5px}
body.ui-v2 .nav-item:hover{background:rgba(255,255,255,.035)}
body.ui-v2 .nav-item.active{background:linear-gradient(90deg,rgba(124,92,255,.18),rgba(124,92,255,.045));box-shadow:inset 2px 0 0 var(--purple-soft)}
body.ui-v2 .nav-item .count{background:rgba(255,255,255,.045)}

body.ui-v2 .navbar{
  padding:12px clamp(16px,2vw,28px);
  background:rgba(5,7,18,.84);
  border-bottom:1px solid color-mix(in srgb,var(--border) 90%, transparent);
}
body.ui-v2 .search-box{max-width:520px;min-height:40px;border-radius:11px}
body.ui-v2 .icon-btn{width:40px;height:40px;border-radius:11px}
body.ui-v2 .profile-trigger{border-radius:12px}

/* buttons / forms */
body.ui-v2 .btn{min-height:38px;border-radius:10px;padding:9px 14px;font-size:13.5px;box-shadow:none}
body.ui-v2 .btn-primary{box-shadow:0 7px 18px rgba(77,70,229,.22)}
body.ui-v2 .btn-primary:hover{transform:translateY(-1px);box-shadow:0 9px 22px rgba(77,70,229,.28)}
body.ui-v2 .btn-danger{background:rgba(248,113,113,.09)}
body.ui-v2 .input,.ui-v2 select,.ui-v2 textarea{min-height:40px;border-radius:10px;background:rgba(255,255,255,.025);border-color:var(--border)}
body.ui-v2 textarea.input{min-height:120px}
body.ui-v2 .field{margin-bottom:15px}
body.ui-v2 .field label{font-size:12px}
body.ui-v2 .field-hint{line-height:1.45}

/* home / forum */
body.ui-v2 .hero{padding:28px;border-radius:var(--ui-radius-lg);margin-bottom:20px;background:linear-gradient(180deg,rgba(18,26,51,.98),rgba(13,20,40,.98));box-shadow:0 16px 42px rgba(0,0,0,.2)}
body.ui-v2 .hero h1{font-size:28px}
body.ui-v2 .hero p{font-size:14px}
body.ui-v2 .hero-stats{gap:22px}
body.ui-v2 .hero-stat strong{font-size:20px}
body.ui-v2 .topic-list{display:flex;flex-direction:column;gap:10px}
body.ui-v2 .topic-card{
  background:linear-gradient(180deg,rgba(16,22,43,.96),rgba(12,17,34,.96));
  border:1px solid var(--border);border-radius:13px;transition:transform .16s ease,border-color .16s ease,background .16s ease
}
body.ui-v2 .topic-card:hover{transform:translateY(-1px);border-color:var(--border-strong);background:linear-gradient(180deg,rgba(18,25,49,.98),rgba(13,19,38,.98))}
body.ui-v2 .topic-icon{border-radius:11px}
body.ui-v2 .member-card{padding:15px;border-radius:13px}
body.ui-v2 .member-card-actions .btn{min-height:34px}

/* profile */
body.ui-v2 .profile-hero{overflow:hidden;border-radius:18px}
body.ui-v2 .profile-banner{height:200px;margin:-1px -1px 18px;border-radius:16px 16px 0 0}
body.ui-v2 .profile-main-avatar{margin-top:-50px;padding-left:18px}
body.ui-v2 .profile-main-avatar .avatar-frame-wrap{box-shadow:0 10px 24px rgba(0,0,0,.28);border:4px solid var(--panel-0);border-radius:50%}
body.ui-v2 .profile-presence{font-size:12px}
body.ui-v2 .profile-level-bar{height:9px}

/* messages */
body.ui-v2 .chat-section-head{margin-bottom:12px}
body.ui-v2 .conv-list{gap:6px}
body.ui-v2 .conv-row{border-radius:12px;border:1px solid transparent}
body.ui-v2 .conv-row:hover,.ui-v2 .conv-row.active{background:rgba(124,92,255,.06);border-color:var(--border)}
body.ui-v2 .msg-row{margin-bottom:8px}
body.ui-v2 .msg-bubble{border-radius:15px;border:1px solid var(--border);box-shadow:none}
body.ui-v2 .msg-row.mine .msg-bubble{border-color:rgba(124,92,255,.25)}
body.ui-v2 .msg-composer-wrap{border-radius:15px;border:1px solid var(--border);background:rgba(10,14,29,.92);box-shadow:0 12px 30px rgba(0,0,0,.24)}
body.ui-v2 .msg-composer{min-height:44px;border-radius:12px}
body.ui-v2 .msg-voice{width:44px;height:44px}

/* admin shell */
body.ui-v2.admin-page .content-wrap{padding-top:20px}
body.ui-v2.admin-page .section-head{padding-bottom:10px;border-bottom:1px solid var(--border);margin-bottom:15px}
body.ui-v2.admin-page .admin-nav-grid{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:7px;margin-bottom:12px}
body.ui-v2.admin-page .admin-nav-link{
  min-height:42px;display:flex;align-items:center;justify-content:center;gap:7px;
  padding:8px 9px;border:1px solid var(--border);border-radius:10px;
  color:var(--text-1);background:rgba(255,255,255,.02);font-size:11.5px;font-weight:700;text-align:center
}
body.ui-v2.admin-page .admin-nav-link:hover{border-color:var(--border-strong);color:var(--text-0);background:rgba(124,92,255,.05)}
body.ui-v2.admin-page .admin-nav-link.active{color:#fff;background:linear-gradient(135deg,rgba(124,92,255,.2),rgba(59,130,246,.1));border-color:rgba(124,92,255,.35)}
body.ui-v2.admin-page .admin-secondary-links{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:16px;padding-bottom:14px;border-bottom:1px solid var(--border)}
body.ui-v2.admin-page .admin-secondary-links a{font-size:11.5px;color:var(--text-2);padding:7px 9px;border:1px solid var(--border);border-radius:9px;background:rgba(255,255,255,.018)}
body.ui-v2.admin-page .admin-secondary-links a:hover{color:var(--text-0);border-color:var(--border-strong)}
body.ui-v2.admin-page .card{box-shadow:0 8px 26px rgba(0,0,0,.16)}
body.ui-v2.admin-page .admin-table-wrap{overflow:auto;border:1px solid var(--border);border-radius:12px}
body.ui-v2.admin-page .admin-table{min-width:680px}
body.ui-v2.admin-page .admin-table th{background:rgba(255,255,255,.025);font-size:11.5px;text-transform:uppercase;letter-spacing:.04em}
body.ui-v2.admin-page .admin-table td{vertical-align:middle}
body.ui-v2.admin-page .admin-table tr:hover td{background:rgba(124,92,255,.028)}
body.ui-v2.admin-page .role-card,.ui-v2.admin-page .permission-card{border:1px solid var(--border);border-radius:13px;background:rgba(255,255,255,.018)}
body.ui-v2.admin-page .badge{border:1px solid rgba(255,255,255,.06)}
body.ui-v2.admin-page .alert{border-radius:10px}
body.ui-v2.admin-page .field{margin-bottom:12px}
body.ui-v2.admin-page .card > h3{font-size:14px}
body.ui-v2.admin-page .pagination{margin-top:16px}

/* admin stats */
body.ui-v2.admin-page .stat-grid,body.ui-v2.admin-page .stats-grid,body.ui-v2.admin-page .kpi-grid{gap:12px}
body.ui-v2.admin-page .admin-stat,.ui-v2.admin-page .stat-card{border-radius:13px}

/* mobile */
@media (max-width:1000px){
  body.ui-v2 .content-grid{grid-template-columns:1fr}
  body.ui-v2 .right-panel{position:static}
  body.ui-v2.admin-page .admin-nav-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
  body.ui-v2 .content-wrap{padding:14px 12px calc(92px + env(safe-area-inset-bottom))}
  body.ui-v2 .navbar{padding:10px 12px}
  body.ui-v2 .search-box{display:none}
  body.ui-v2 .navbar-actions{gap:6px}
  body.ui-v2 .navbar .btn.btn-ghost{min-width:56px;padding:8px 10px}
  body.ui-v2 .content-grid{gap:14px}
  body.ui-v2 .hero{padding:20px 18px;border-radius:15px}
  body.ui-v2 .hero h1{font-size:23px;line-height:1.25}
  body.ui-v2 .hero p{font-size:13.5px;line-height:1.5}
  body.ui-v2 .hero-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
  body.ui-v2 .hero-stat strong{font-size:18px}
  body.ui-v2 .hero-stat span{font-size:11px}
  body.ui-v2 .section-head h2{font-size:16px}
  body.ui-v2 .topic-card{border-radius:12px}
  body.ui-v2 .topic-card .topic-title{font-size:14px}
  body.ui-v2 .profile-banner{height:150px}
  body.ui-v2 .profile-main-avatar{margin-top:-40px;padding-left:12px}
  body.ui-v2.admin-page .admin-nav-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  body.ui-v2.admin-page .admin-secondary-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  body.ui-v2.admin-page .admin-secondary-links a{text-align:center}
  body.ui-v2.admin-page .admin-table{min-width:640px}
  body.ui-v2.admin-page .content-grid{display:block}
  body.ui-v2.admin-page .right-panel{display:none}
}
@media (max-width:480px){
  body.ui-v2 .hero-stats{grid-template-columns:repeat(2,1fr)}
  body.ui-v2 .hero-stat{padding:8px 0}
  body.ui-v2 .hero-stat strong{font-size:20px}
  body.ui-v2 .profile-banner{height:132px}
  body.ui-v2 .profile-main-avatar{margin-top:-34px}
  body.ui-v2.admin-page .admin-nav-grid{grid-template-columns:1fr 1fr}
  body.ui-v2.admin-page .admin-nav-link{min-height:44px;font-size:11px}
}
@media (max-width:360px){
  body.ui-v2 .content-wrap{padding-left:10px;padding-right:10px}
  body.ui-v2 .navbar-actions .navbar-woin{font-size:12px;min-width:58px;width:auto;justify-content:center;padding:8px 10px;white-space:nowrap;}
  body.ui-v2.admin-page .admin-secondary-links{grid-template-columns:1fr}
}

/* css/wiantex-ui-v3.css */
/* Wiantex UI v3 — controlled refresh, no backend or markup contract changes. */
:root{
  --ui-bg: #070b18;
  --ui-panel: #0d1426;
  --ui-panel-2: #111a31;
  --ui-line: rgba(148,163,184,.16);
  --ui-line-strong: rgba(148,163,184,.24);
  --ui-text: #f6f7fb;
  --ui-muted: #8f9ab3;
  --ui-purple: #7c5cff;
  --ui-blue: #3b82f6;
  --ui-radius-sm: 11px;
  --ui-radius: 15px;
  --ui-radius-lg: 18px;
  --ui-max: 1520px;
}

html{scroll-behavior:smooth;}
body.ui-v2{
  background:var(--bg-0,#070b18);
  color:var(--text-0,#f6f7fb);
  -webkit-font-smoothing:antialiased;
}
body.ui-v2 .app{min-height:100dvh;}
body.ui-v2 .main{min-width:0;}
body.ui-v2 .content-wrap{
  width:100%;
  max-width:none;
  margin:0 auto;
  padding:22px clamp(14px,2.1vw,30px) 42px;
}
body.ui-v2 .content-grid{width:100%;max-width:var(--ui-max);margin:0 auto;grid-template-columns:minmax(0,1fr) minmax(250px,300px);gap:22px;}
body.ui-v2 .main-col{min-width:0;width:100%;}
body.ui-v2 .right-panel{min-width:0;}

/* Global surfaces */
body.ui-v2 .card{
  background:linear-gradient(180deg,rgba(17,25,47,.96),rgba(11,17,33,.97));
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius);
  box-shadow:0 8px 26px rgba(0,0,0,.18);
}
body.ui-v2 .card:hover{border-color:var(--ui-line-strong);}
body.ui-v2 .section-head{margin:0 0 13px;padding:0;align-items:flex-end;}
body.ui-v2 .section-head h2{font-size:18px;letter-spacing:-.02em;gap:8px;}
body.ui-v2 .section-head p{margin-top:4px;font-size:12.5px;color:var(--ui-muted);}
body.ui-v2 .section-link{font-size:12px;}
body.ui-v2 .btn{min-height:40px;border-radius:11px;padding:9px 14px;font-size:13px;font-weight:700;}
body.ui-v2 .btn-primary{background:linear-gradient(135deg,var(--purple,#7c5cff),var(--blue,#3b82f6));box-shadow:0 8px 18px rgba(79,70,229,.18);}
body.ui-v2 .btn-ghost{background:rgba(255,255,255,.025);border:1px solid var(--ui-line);}
body.ui-v2 .input,body.ui-v2 select,body.ui-v2 textarea{
  width:100%;min-height:42px;border:1px solid var(--ui-line);border-radius:11px;background:rgba(255,255,255,.025);color:var(--ui-text);outline:none;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
body.ui-v2 .input:focus,body.ui-v2 select:focus,body.ui-v2 textarea:focus{border-color:rgba(124,92,255,.55);box-shadow:0 0 0 3px rgba(124,92,255,.10);background:rgba(255,255,255,.035);}
body.ui-v2 .field label{font-size:12px;font-weight:700;color:#bcc5d7;}
body.ui-v2 .alert{border-radius:11px;}

/* Navigation */
body.ui-v2 .sidebar{
  width:var(--sidebar-w);
  padding:17px 12px;
  gap:18px;
  background:#080d1b;
  border-right:1px solid var(--ui-line);
}
body.ui-v2 .brand{padding:3px 8px 8px;}
body.ui-v2 .brand-text strong{font-size:14px;}
body.ui-v2 .brand-text span{font-size:10px;}
body.ui-v2 .nav-group{gap:4px;}
body.ui-v2 .nav-label{padding:10px 10px 6px;font-size:9px;letter-spacing:.16em;color:#66728d;}
body.ui-v2 .nav-item{min-height:40px;padding:9px 10px;border-radius:10px;font-size:13px;}
body.ui-v2 .nav-item.active{background:linear-gradient(90deg,rgba(124,92,255,.18),rgba(124,92,255,.035));box-shadow:inset 2px 0 0 var(--purple-soft,#a78bfa);}
body.ui-v2 .navbar{
  height:64px;padding:10px clamp(14px,2vw,28px);background:#080d1b;border-bottom:1px solid var(--ui-line);
}
body.ui-v2 .search-box{height:42px;max-width:560px;border-radius:12px;border:1px solid var(--ui-line);background:rgba(255,255,255,.025);}
body.ui-v2 .icon-btn{width:42px;height:42px;border-radius:12px;border-color:var(--ui-line);}
body.ui-v2 .profile-trigger{padding:4px 6px;border:1px solid var(--ui-line);background:rgba(255,255,255,.02);}

/* Home / forum */
body.ui-v2 .hero{
  max-width:var(--ui-max);margin:0 auto 22px;padding:25px 26px;border-radius:var(--ui-radius-lg);
  background:linear-gradient(135deg,rgba(24,34,64,.98),rgba(13,20,40,.98));
  border:1px solid rgba(124,92,255,.16);box-shadow:0 14px 34px rgba(0,0,0,.18);
}
body.ui-v2 .hero h1{font-size:27px;line-height:1.2;letter-spacing:-.035em;}
body.ui-v2 .hero p{max-width:620px;margin-top:8px;color:#9ba7bf;font-size:13.5px;}
body.ui-v2 .hero-stats{display:flex;gap:28px;margin-top:20px;padding-top:15px;border-top:1px solid rgba(255,255,255,.07);}
body.ui-v2 .hero-stat strong{font-size:21px;}
body.ui-v2 .hero-stat span{font-size:11px;color:var(--ui-muted);}
body.ui-v2 .topic-list{gap:8px;}
body.ui-v2 .topic-card{border-radius:13px;background:#0d1427;border:1px solid var(--ui-line);transition:transform .14s,border-color .14s,background .14s;}
body.ui-v2 .topic-card:hover{transform:translateY(-1px);background:#101a31;border-color:var(--ui-line-strong);}

/* Profile */
body.ui-v2 .profile-hero{border-radius:var(--ui-radius-lg);background:#0d1427;border:1px solid var(--ui-line);}
body.ui-v2 .profile-banner{height:190px;}
body.ui-v2 .profile-main-avatar{padding-left:18px;}
body.ui-v2 .profile-main-avatar .avatar-frame-wrap{border:4px solid #0d1427;box-shadow:0 8px 24px rgba(0,0,0,.28);}
body.ui-v2 .profile-presence{font-weight:700;}

/* Messages */
body.ui-v2 .messages-shell{display:grid;grid-template-columns:310px minmax(0,1fr);min-height:590px;overflow:hidden;}
body.ui-v2 .conv-list{min-width:0;border-right:1px solid var(--ui-line);background:rgba(8,13,26,.74);padding:8px;overflow:auto;}
body.ui-v2 .conv-list-item{padding:10px;border-radius:11px;gap:10px;border:1px solid transparent;}
body.ui-v2 .conv-list-item:hover{background:rgba(124,92,255,.055);border-color:var(--ui-line);}
body.ui-v2 .conv-list-item.active{background:rgba(124,92,255,.10);border-color:rgba(124,92,255,.26);}
body.ui-v2 .conv-chat{min-width:0;background:#0a1020;display:flex;flex-direction:column;}
body.ui-v2 .conv-chat-header{min-height:60px;padding:10px 14px;border-bottom:1px solid var(--ui-line);background:rgba(10,16,32,.94);display:flex;align-items:center;gap:9px;}
body.ui-v2 .conv-chat-body{padding:18px 18px 10px;overflow:auto;flex:1;min-height:0;}
body.ui-v2 .msg-row{max-width:min(78%,760px);margin-bottom:8px;}
body.ui-v2 .msg-bubble{padding:10px 12px;border-radius:15px;border:1px solid var(--ui-line);line-height:1.48;}
body.ui-v2 .conv-chat-input{padding:10px 12px;border-top:1px solid var(--ui-line);background:#080d1b;}
body.ui-v2 .msg-composer-wrap{border-radius:12px;}

/* Admin refresh — shared across dashboard, users, moderation, badges, roles, settings, reports, logs, support and theme screens */
body.ui-v2.admin-page .content-wrap{max-width:1600px;}
body.ui-v2.admin-page .section-head{padding-bottom:12px;border-bottom:1px solid var(--ui-line);}
body.ui-v2.admin-page .section-head h2{font-size:19px;}
body.ui-v2.admin-page .admin-nav-grid{grid-template-columns:repeat(9,minmax(0,1fr));gap:8px;margin-bottom:10px;}
body.ui-v2.admin-page .admin-nav-link{
  min-height:44px;padding:8px 10px;border-radius:11px;border:1px solid var(--ui-line);background:#0c1324;color:#bdc6d8;font-size:11.5px;font-weight:800;
}
body.ui-v2.admin-page .admin-nav-link.active{background:linear-gradient(135deg,rgba(124,92,255,.18),rgba(59,130,246,.07));border-color:rgba(124,92,255,.35);color:#fff;}
body.ui-v2.admin-page .admin-secondary-links{gap:7px;margin-bottom:16px;padding:0 0 14px;border-bottom:1px solid var(--ui-line);}
body.ui-v2.admin-page .admin-secondary-links a{padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.018);border:1px solid var(--ui-line);}
body.ui-v2.admin-page .admin-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px;}
body.ui-v2.admin-page .admin-kpi{min-height:92px;padding:16px;display:flex;align-items:center;gap:12px;}
body.ui-v2.admin-page .admin-kpi-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(135deg,rgba(124,92,255,.17),rgba(59,130,246,.10));border:1px solid rgba(124,92,255,.18);}
body.ui-v2.admin-page .admin-kpi strong{display:block;font-size:22px;line-height:1.05;}
body.ui-v2.admin-page .admin-kpi span{display:block;margin-top:4px;font-size:11px;color:var(--ui-muted);}
body.ui-v2.admin-page .admin-card{padding:16px;}
body.ui-v2.admin-page .admin-table-wrap{border-radius:12px;border:1px solid var(--ui-line);background:#0b1221;overflow:auto;}
body.ui-v2.admin-page .admin-table{min-width:760px;}
body.ui-v2.admin-page .admin-table th{padding:12px 14px;background:#10182b;color:#8793ad;font-size:10.5px;letter-spacing:.06em;}
body.ui-v2.admin-page .admin-table td{padding:12px 14px;border-bottom:1px solid rgba(148,163,184,.08);}
body.ui-v2.admin-page .admin-table tr:last-child td{border-bottom:0;}
body.ui-v2.admin-page .admin-table tbody tr:hover td{background:rgba(124,92,255,.035);}
body.ui-v2.admin-page .role-card,body.ui-v2.admin-page .permission-card{border-radius:13px;border:1px solid var(--ui-line);background:#0c1324;}
body.ui-v2.admin-page .field{margin-bottom:13px;}
body.ui-v2.admin-page textarea.input{min-height:120px;}
body.ui-v2.admin-page .badge{font-size:10.5px;border-radius:999px;}
body.ui-v2.admin-page .pagination a,body.ui-v2.admin-page .pagination span{background:#0c1324;border-color:var(--ui-line);}
body.ui-v2.admin-page .empty-state{background:#0c1324;border:1px dashed var(--ui-line);border-radius:13px;}

/* Mobile: preserve the Wiantex mobile pattern while making every surface full width */
@media (max-width:900px){
  body.ui-v2 .content-wrap{padding:14px 14px calc(92px + env(safe-area-inset-bottom,0px));}
  body.ui-v2 .content-grid{display:block;width:100%;}
  body.ui-v2 .right-panel{margin-top:16px;}
  body.ui-v2 .hero{width:100%;padding:20px;margin-bottom:18px;}
  body.ui-v2 .hero h1{font-size:24px;}
  body.ui-v2 .hero-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
  body.ui-v2 .messages-shell{grid-template-columns:1fr;min-height:calc(100dvh - 146px);border-radius:14px;}
  body.ui-v2.chat-list .messages-shell{min-height:0;}
  body.ui-v2 .conv-list{border-right:0;border-bottom:1px solid var(--ui-line);max-height:46dvh;}
  body.ui-v2 .conv-chat{min-height:54dvh;}
  body.ui-v2 .conv-chat-body{padding:14px 12px 8px;}
  body.ui-v2 .msg-row{max-width:88%;}
  body.ui-v2 .conv-chat-input{position:sticky;bottom:0;z-index:4;}
  body.ui-v2.admin-page .admin-nav-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  body.ui-v2.admin-page .admin-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.ui-v2.admin-page .admin-secondary-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
  body.ui-v2.admin-page .admin-secondary-links a{text-align:center;}
}
@media (max-width:560px){
  body.ui-v2 .content-wrap{padding-left:10px;padding-right:10px;}
  body.ui-v2 .hero{padding:18px;}
  body.ui-v2 .hero h1{font-size:22px;}
  body.ui-v2 .hero-stats{grid-template-columns:repeat(2,1fr);}
  body.ui-v2 .topic-card{width:100%;}
  body.ui-v2 .section-head{align-items:flex-start;}
  body.ui-v2 .section-link{padding-top:4px;}
  body.ui-v2.admin-page .admin-nav-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.ui-v2.admin-page .admin-nav-link{min-height:46px;font-size:10.5px;}
  body.ui-v2.admin-page .admin-kpi-grid{grid-template-columns:1fr 1fr;gap:8px;}
  body.ui-v2.admin-page .admin-kpi{min-height:82px;padding:12px;}
  body.ui-v2.admin-page .admin-kpi strong{font-size:18px;}
}
@media (max-width:380px){
  body.ui-v2 .content-wrap{padding-left:8px;padding-right:8px;}
  body.ui-v2 .hero{padding:16px;}
  body.ui-v2.admin-page .admin-nav-grid{gap:6px;}
  body.ui-v2.admin-page .admin-secondary-links{gap:6px;}
}

/* Admin dashboard safe layout: preserve all controls while preventing the v3 nav grid from breaking the dashboard. */
body.ui-v2.admin-dashboard .content-wrap{max-width:1500px;padding-top:20px;}
body.ui-v2.admin-dashboard .admin-nav-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px;
}
body.ui-v2.admin-dashboard .admin-nav-link{min-height:46px;display:flex;align-items:center;gap:7px;line-height:1.2;}
body.ui-v2.admin-dashboard .admin-secondary-links{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:18px;padding:0 0 14px;}
body.ui-v2.admin-dashboard .admin-secondary-links a{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;}
body.ui-v2.admin-dashboard .admin-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
body.ui-v2.admin-dashboard .admin-recent-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
body.ui-v2.admin-dashboard .admin-card{min-width:0;}
body.ui-v2.admin-dashboard .admin-recent-row{min-width:0;}
body.ui-v2.admin-dashboard .admin-recent-row strong,
body.ui-v2.admin-dashboard .admin-recent-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@media (max-width:1100px){
  body.ui-v2.admin-dashboard .admin-nav-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.ui-v2.admin-dashboard .admin-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.ui-v2.admin-dashboard .admin-recent-grid{grid-template-columns:1fr;}
}
@media (max-width:700px){
  body.ui-v2.admin-dashboard .content-wrap{padding:14px 12px 84px;}
  body.ui-v2.admin-dashboard .admin-nav-grid{grid-template-columns:1fr;gap:8px;}
  body.ui-v2.admin-dashboard .admin-nav-link{min-height:44px;padding:9px 11px;}
  body.ui-v2.admin-dashboard .admin-kpi-grid{grid-template-columns:1fr 1fr;gap:8px;}
  body.ui-v2.admin-dashboard .admin-kpi{min-height:78px;padding:12px;}
  body.ui-v2.admin-dashboard .admin-kpi strong{font-size:19px;}
  body.ui-v2.admin-dashboard .admin-secondary-links{gap:6px;}
  body.ui-v2.admin-dashboard .admin-secondary-links a{font-size:11px;padding:7px 9px;}
}
@media (max-width:390px){
  body.ui-v2.admin-dashboard .admin-kpi-grid{grid-template-columns:1fr;}
}

/* Woin balance next to avatar: keep visible on mobile */
body.ui-v2 .navbar-woin{display:inline-flex !important;align-items:center;gap:6px;min-width:max-content;}
@media(max-width:380px){body.ui-v2 .navbar-woin{padding:7px 8px !important;font-size:11px !important;min-width:52px !important;}body.ui-v2 .navbar-woin svg{width:14px;height:14px;}}

/* Final responsive overflow + profile avatar fix */
body.ui-v2,
body.ui-v2 .app,
body.ui-v2 .main,
body.ui-v2 .content-wrap{max-width:100%;overflow-x:clip;}

body.ui-v2 .admin-recent-row,
body.ui-v2 .topic-card,
body.ui-v2 .topic-meta,
body.ui-v2 .section-head,
body.ui-v2 .card,
body.ui-v2 .profile-hero{min-width:0;}

body.ui-v2 .admin-recent-row strong,
body.ui-v2 .admin-recent-row span,
body.ui-v2 .topic-author-name,
body.ui-v2 .conv-username,
body.ui-v2 .conv-preview-text{
  min-width:0;
  max-width:100%;
}

body.ui-v2 .admin-recent-row span{
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

body.ui-v2 .topic-author-name{
  white-space:normal;
  overflow-wrap:anywhere;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

body.ui-v2 .profile-main-avatar{
  flex:0 0 auto;
  width:84px;
  height:84px;
  margin-top:0 !important;
  padding-left:0 !important;
  position:relative;
}
body.ui-v2 .profile-main-avatar .avatar-frame-wrap,
body.ui-v2 .profile-main-avatar .avatar,
body.ui-v2 .profile-main-avatar img{
  width:84px !important;
  height:84px !important;
  max-width:84px !important;
  max-height:84px !important;
  object-fit:cover;
  box-sizing:border-box;
}
body.ui-v2 .profile-main-avatar.has-banner{margin-top:-46px !important;}

@media (max-width:700px){
  body.ui-v2 .profile-hero > div[style*="display:flex"]{gap:12px !important;}
  body.ui-v2 .profile-main-avatar,
  body.ui-v2 .profile-main-avatar .avatar-frame-wrap,
  body.ui-v2 .profile-main-avatar .avatar,
  body.ui-v2 .profile-main-avatar img{
    width:72px !important;
    height:72px !important;
    max-width:72px !important;
    max-height:72px !important;
  }
  body.ui-v2 .profile-main-avatar.has-banner{margin-top:-38px !important;}
  body.ui-v2 .profile-hero > div[style*="display:flex"] > div[style*="flex:1"]{min-width:0 !important;flex:1 1 calc(100% - 84px) !important;}
  body.ui-v2 .profile-hero h1{max-width:100%;overflow-wrap:anywhere;word-break:break-word;}
  body.ui-v2 .profile-hero .btn{max-width:100%;min-width:0;white-space:normal;}
  body.ui-v2 .profile-hero .profile-level-bar{max-width:100%;}
}

@media (max-width:390px){
  body.ui-v2 .profile-main-avatar,
  body.ui-v2 .profile-main-avatar .avatar-frame-wrap,
  body.ui-v2 .profile-main-avatar .avatar,
  body.ui-v2 .profile-main-avatar img{
    width:64px !important;
    height:64px !important;
    max-width:64px !important;
    max-height:64px !important;
  }
  body.ui-v2 .profile-main-avatar.has-banner{margin-top:-32px !important;}
}

/* css/profile-frame-fix.css */
/* Wiantex profile + frame rendering fix (loaded last, scoped and layout-safe) */
.avatar-frame-wrap{position:relative!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important;isolation:isolate!important;vertical-align:middle!important;}
.avatar-frame-wrap .avatar-frame-base{position:relative!important;display:block!important;z-index:1!important;flex:0 0 auto!important;}
.avatar-frame-wrap .avatar{position:relative!important;z-index:1!important;display:block!important;border-radius:50%!important;}
.avatar-frame-wrap .avatar-frame-img{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:138%!important;height:138%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;display:block!important;z-index:3!important;pointer-events:none!important;}
.profile-main-avatar{width:max-content!important;flex:0 0 auto!important;overflow:visible!important;}
.profile-main-avatar .avatar-frame-wrap{width:84px!important;height:84px!important;flex:0 0 84px!important;padding:0!important;border:0!important;overflow:visible!important;}
.profile-main-avatar .avatar-frame-wrap .avatar-frame-base,.profile-main-avatar .avatar-frame-wrap .avatar{width:84px!important;height:84px!important;max-width:84px!important;max-height:84px!important;object-fit:cover!important;}
.profile-main-avatar .avatar-frame-wrap .avatar-frame-img{width:92px!important;height:92px!important;}
.profile-main-avatar .avatar-presence-dot{z-index:7!important;right:-2px!important;bottom:-2px!important;}
@media (max-width:700px){
 .profile-main-avatar .avatar-frame-wrap{width:72px!important;height:72px!important;flex-basis:72px!important;}
 .profile-main-avatar .avatar-frame-wrap .avatar-frame-base,.profile-main-avatar .avatar-frame-wrap .avatar{width:72px!important;height:72px!important;max-width:72px!important;max-height:72px!important;}
 .profile-main-avatar .avatar-frame-wrap .avatar-frame-img{width:79px!important;height:79px!important;}
}
@media (max-width:390px){
 .profile-main-avatar .avatar-frame-wrap{width:64px!important;height:64px!important;flex-basis:64px!important;}
 .profile-main-avatar .avatar-frame-wrap .avatar-frame-base,.profile-main-avatar .avatar-frame-wrap .avatar{width:64px!important;height:64px!important;max-width:64px!important;max-height:64px!important;}
 .profile-main-avatar .avatar-frame-wrap .avatar-frame-img{width:70px!important;height:70px!important;}
}

/* Profile editor preview */
.profile-preview-avatar{position:relative!important;overflow:visible!important;}
.profile-preview-avatar-base{position:relative!important;width:100%!important;height:100%!important;z-index:1!important;overflow:hidden!important;border-radius:inherit!important;}
.profile-preview-frame{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:110%!important;height:110%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;display:block!important;z-index:2!important;pointer-events:none!important;}
.profile-frame-option-preview{overflow:visible!important;}

/* css/messages-final-fix.css */

/* ===== Messages final layout stabilization ===== */
.messages-shell{
  min-width:0;
  min-height:560px;
  display:grid;
  grid-template-columns:minmax(250px,300px) minmax(0,1fr);
  overflow:hidden;
}
.messages-shell > *{min-width:0;min-height:0;}
.conv-list{min-width:0;overflow-x:hidden;overflow-y:auto;}
.conv-list-item{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  align-items:center;
  min-width:0;
  gap:10px;
}
.conv-list-item > .avatar-frame-wrap,.conv-list-item > .avatar-wrap{min-width:0;}
.conv-list-item > div{min-width:0;}
.conv-title-row,.conv-preview{min-width:0;}
.conv-username,.conv-preview-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.conv-chat{min-width:0;display:flex;flex-direction:column;overflow:hidden;}
.conv-chat-header{
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  min-width:0;
  gap:8px;
  padding:10px 14px;
}
.conv-chat-header .chat-back-btn{flex:0 0 34px;}
.conv-chat-user{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:2px;
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
}
.wianova-heading{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
  line-height:1.15;
}
.wianova-heading > span:first-child{
  white-space:nowrap;
}
.wianova-subtitle{
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  line-height:1.25;
  margin-top:0;
}
.conv-chat-user > a{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dm-header-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
}
.dm-header-action{margin:0!important;flex:0 0 auto;}
.dm-mini-action{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:34px;white-space:nowrap;
}
.conv-chat-body{
  min-width:0;min-height:0;overflow:auto;
}
.msg-row{
  min-width:0;
  max-width:min(78%,760px);
}
.msg-row > div{min-width:0;max-width:100%;}
.msg-bubble{
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.msg-actions{
  display:flex;align-items:center;justify-content:flex-end;
  flex-wrap:nowrap;gap:4px;
  min-width:0;
  white-space:nowrap;
}
.msg-action-btn{
  flex:0 0 auto;white-space:nowrap;
  padding:3px 5px;
}
.conv-chat-input{
  display:grid;
  grid-template-columns:38px 38px minmax(0,1fr) 38px;
  align-items:center;gap:7px;
  min-width:0;
}
.conv-chat-input > *{min-width:0;}
.conv-chat-input .msg-voice,.conv-chat-input .msg-attach,.conv-chat-input .msg-send{
  width:38px;height:38px;min-width:38px;
  display:inline-flex;align-items:center;justify-content:center;
  box-sizing:border-box;
}
.msg-attach{cursor:pointer;}
.msg-composer-wrap{min-width:0;width:100%;}
.conv-chat-input .msg-composer{
  display:block;width:100%;min-width:0;max-width:100%;
  height:40px;min-height:40px;max-height:96px;
  resize:none;box-sizing:border-box;
}
@media (max-width:900px){
  .messages-shell{grid-template-columns:1fr;min-height:0;max-height:none;border-radius:14px;}
  body.chat-list .conv-chat{display:none;}
  body.chat-open .conv-list{display:none;}
  body.chat-open .conv-chat{display:flex;min-height:0;height:100dvh;}
  body.chat-open .messages-shell{position:fixed;inset:0;z-index:60;width:100%;height:100dvh;margin:0;border-radius:0;}
  body.chat-open .content-wrap{padding:0!important;}
  body.chat-open .navbar,body.chat-open .bottom-nav,body.chat-open .footer,body.chat-open .hamburger{display:none!important;}
  .conv-chat-header{padding:9px 10px;gap:6px;flex-wrap:nowrap;}
  .conv-chat-user{flex:1 1 auto;min-width:0;}
  .conv-chat-user .avatar-frame-wrap{flex:0 0 auto;}
  .dm-header-actions{gap:4px;}
  .dm-mini-action{width:34px;min-width:34px;height:34px;padding:0;border-radius:9px;}
  .dm-mini-action span{display:none;}
  .conv-chat-body{padding:12px 10px 8px!important;}
  .msg-row{max-width:92%;}
  .msg-actions{gap:3px;}
  .msg-action-btn{font-size:10px;padding:3px 4px;}
  body.chat-open .conv-chat-input{
    position:fixed;left:0;right:0;bottom:0;
    display:grid;grid-template-columns:34px 34px minmax(0,1fr) 34px;
    gap:5px;padding:7px 8px calc(7px + env(safe-area-inset-bottom));
    background:rgba(8,11,24,.96);z-index:65;
  }
  .conv-chat-input > *{margin:0;}
  .conv-chat-input .msg-voice,.conv-chat-input .msg-attach,.conv-chat-input .msg-send{width:34px;height:34px;min-width:34px;}
  .conv-chat-input .msg-composer{height:34px;min-height:34px;max-height:72px;padding:6px 10px;border-radius:11px;}
}
@media (max-width:520px){
  .conv-chat-header{padding-left:8px;padding-right:8px;}
  .conv-chat-user > a{font-size:13px!important;}
  .dm-header-actions{gap:3px;}
  .dm-mini-action{width:32px;min-width:32px;height:32px;}
  body.chat-open .conv-chat-input{grid-template-columns:32px 32px minmax(0,1fr) 32px;gap:4px;padding-left:7px;padding-right:7px;}
  .conv-chat-input .msg-voice,.conv-chat-input .msg-attach,.conv-chat-input .msg-send{width:32px;height:32px;min-width:32px;}
  .conv-chat-input .msg-composer{height:32px;min-height:32px;padding:5px 9px;font-size:13px;}
  .msg-row{max-width:94%;} .msg-actions .msg-action-btn{font-size:9.5px;}
}

/* ===== FINAL MESSAGE OVERFLOW / ACTION BUTTON FIX ===== */
.messages-shell,
.messages-shell .conv-chat,
.messages-shell .conv-chat-body,
.messages-shell .conv-list{box-sizing:border-box;}

.messages-shell{overflow:hidden!important;}
.conv-chat{min-height:0!important;}
.conv-chat-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  scrollbar-gutter:stable;
}
.msg-row{min-width:0!important;}
.msg-row > div{min-width:0!important;max-width:calc(100% - 0px)!important;}
.msg-bubble{min-width:0!important;max-width:100%!important;overflow:hidden!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
.msg-text{overflow-wrap:anywhere!important;word-break:break-word!important;white-space:pre-wrap!important;}
.msg-media,.msg-media-image,.msg-media-video,.msg-media-audio{max-width:100%!important;}
.msg-media-image,.msg-media-video{height:auto!important;}
.msg-media-audio{width:min(260px,100%)!important;}

.msg-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:5px!important;
  margin-top:5px!important;
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}
.msg-action-btn{
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  min-width:0!important;
  max-width:100%!important;
  height:25px!important;
  padding:0 8px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  white-space:nowrap!important;
  line-height:1!important;
  overflow:visible!important;
}

.dm-header-actions{min-width:0!important;max-width:100%!important;}
.dm-header-action{min-width:0!important;}
.dm-mini-action{box-sizing:border-box!important;overflow:hidden!important;}

.conv-chat-input{box-sizing:border-box!important;min-width:0!important;}
.msg-composer-wrap{min-width:0!important;max-width:100%!important;}
.msg-composer{overflow-y:auto!important;overflow-x:hidden!important;}

@media (max-width:900px){
  body.chat-open .conv-chat-body{
    padding:12px 10px calc(12px + 58px + env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-y:contain!important;
  }
  body.chat-open .conv-chat-input{
    height:auto!important;
    min-height:50px!important;
    box-sizing:border-box!important;
  }
  body.chat-open .msg-actions{
    padding-right:0!important;
  }
  body.chat-open .msg-row{max-width:94%!important;}
  body.chat-open .msg-row.mine{margin-left:auto!important;}
}

@media (max-width:520px){
  .conv-chat-header{min-width:0!important;}
  .conv-chat-user{min-width:0!important;}
  .dm-header-actions{flex:0 0 auto!important;}
  .msg-actions{gap:4px!important;}
  .msg-action-btn{height:24px!important;padding:0 7px!important;font-size:9px!important;}
  body.chat-open .conv-chat-body{
    padding-left:8px!important;
    padding-right:8px!important;
    padding-bottom:calc(12px + 56px + env(safe-area-inset-bottom))!important;
  }
}

@media (max-width:380px){
  .msg-action-btn{height:22px!important;padding:0 6px!important;font-size:8.5px!important;}
  body.chat-open .conv-chat-body{padding-bottom:calc(10px + 54px + env(safe-area-inset-bottom))!important;}
}

/* ===== WiaNova AI assistant ===== */
.wianova-avatar{
  width:42px;height:42px;min-width:42px;border-radius:14px;position:relative;
  display:block;object-fit:cover;object-position:center;
  border:1px solid rgba(255,255,255,.2);
  box-shadow:0 10px 28px rgba(34,100,255,.28),0 0 0 1px rgba(112,95,255,.12);
  background:#0b1020;
  overflow:hidden;isolation:isolate;
}
.wianova-avatar-sm{width:30px;height:30px;min-width:30px;border-radius:10px;}
.wianova-ai-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:3px 7px;
  border-radius:999px;
  color:#eaf7ff;
  background:linear-gradient(135deg,rgba(108,76,255,.24),rgba(25,182,255,.18));
  border:1px solid rgba(94,185,255,.34);
  font:700 9px/1 Inter,system-ui,sans-serif;
  letter-spacing:.15px;
  vertical-align:middle;
  white-space:nowrap;
}
.wianova-name{display:flex;align-items:center;gap:6px;min-width:0}
.wianova-conv-item{position:relative}
.wianova-conv-item.active{box-shadow:inset 0 0 0 1px rgba(91,145,255,.3),0 10px 28px rgba(48,58,140,.14)}
.wianova-heading{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:800;min-width:0}
.wianova-subtitle{font-size:10px;color:var(--text-3,#8f96a8);margin-top:2px}
.wianova-send-btn{position:relative}
.wianova-send-btn::after{content:'';display:none}
[data-wianova="1"] .conv-chat-input{position:relative;z-index:100001;}
[data-wianova="1"] .msg-composer-wrap{position:relative;z-index:100002;pointer-events:auto!important;}
[data-wianova="1"] .msg-composer{position:relative;z-index:100003;display:block!important;pointer-events:auto!important;user-select:text!important;-webkit-user-select:text!important;cursor:text!important;opacity:1!important;}
[data-wianova="1"] .msg-composer{border-color:rgba(101,121,255,.34)}
[data-wianova="1"] .msg-composer:focus{border-color:rgba(112,146,255,.62);box-shadow:0 0 0 3px rgba(102,115,255,.12)}

@media (max-width:600px){
  .wianova-ai-badge{font-size:8px;padding:3px 6px}
  .wianova-heading{font-size:13px;gap:5px;line-height:1.15}
  .wianova-subtitle{font-size:9px;line-height:1.2}
}

.conv-chat-header .wianova-avatar{width:34px;height:34px;min-width:34px;border-radius:11px;font-size:11px}


/* WiaNova larger composer */
[data-wianova="1"] .msg-composer-wrap{flex:1 1 auto!important;min-width:0!important;}
[data-wianova="1"] .msg-composer{width:100%!important;min-height:58px!important;height:58px!important;max-height:140px!important;padding:14px 16px!important;line-height:1.5!important;resize:vertical!important;font-size:14px!important;border-radius:16px!important;box-sizing:border-box!important;}
[data-wianova="1"] .conv-chat-input{align-items:flex-end!important;gap:10px!important;padding:12px!important;}
[data-wianova="1"] .wianova-send-btn{width:44px!important;height:44px!important;min-width:44px!important;border-radius:13px!important;}
@media (max-width:600px){
  [data-wianova="1"] .msg-composer{min-height:54px!important;height:54px!important;max-height:120px!important;font-size:13px!important;}
  [data-wianova="1"] .conv-chat-input{padding:9px!important;gap:8px!important;}
}

/* ===== WiaNova composer FINAL layout fix =====
   The CSRF field is hidden, so WiaNova has only two visible grid items:
   composer + send button. The old 4-column DM grid left the composer in a
   38px column, making it appear as a tiny input. */
[data-wianova="1"].conv-chat-input{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 46px!important;
  align-items:end!important;
  gap:10px!important;
  padding:12px!important;
}
[data-wianova="1"] .msg-composer-wrap{
  grid-column:1!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
[data-wianova="1"] .msg-composer{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  min-height:72px!important;
  height:72px!important;
  max-height:180px!important;
  resize:vertical!important;
  box-sizing:border-box!important;
}
[data-wianova="1"] .wianova-send-btn{
  grid-column:2!important;
  width:46px!important;
  min-width:46px!important;
  height:46px!important;
  align-self:end!important;
}
@media (max-width:900px){
  body.chat-open [data-wianova="1"].conv-chat-input{
    grid-template-columns:minmax(0,1fr) 42px!important;
    gap:8px!important;
    padding:8px!important;
  }
  [data-wianova="1"] .msg-composer{
    min-height:62px!important;
    height:62px!important;
    max-height:140px!important;
  }
  [data-wianova="1"] .wianova-send-btn{
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
  }
}
@media (max-width:520px){
  body.chat-open [data-wianova="1"].conv-chat-input{
    grid-template-columns:minmax(0,1fr) 40px!important;
    gap:6px!important;
  }
  [data-wianova="1"] .msg-composer{
    min-height:58px!important;
    height:58px!important;
    font-size:13px!important;
  }
  [data-wianova="1"] .wianova-send-btn{
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
  }
}


/* ===== WiaNova mobile UI v14: isolated to WiaNova chat ===== */
[data-wianova="1"] .msg-composer-wrap{flex:1 1 auto!important;min-width:0!important;}
.wianova-typing{display:inline-flex!important;align-items:center;gap:5px!important;padding:12px 14px!important;min-width:58px!important;}
.wianova-typing span{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.45;animation:wianovaDot 1s infinite ease-in-out;}
.wianova-typing span:nth-child(2){animation-delay:.14s}.wianova-typing span:nth-child(3){animation-delay:.28s}
@keyframes wianovaDot{0%,70%,100%{transform:translateY(0);opacity:.35}35%{transform:translateY(-4px);opacity:1}}
@media(max-width:900px){
  body.chat-open .conv-chat-header:has(.wianova-heading){padding:11px 12px!important;min-height:62px!important;background:linear-gradient(180deg,rgba(13,20,42,.98),rgba(8,12,27,.96))!important;}
  body.chat-open .conv-chat-header:has(.wianova-heading) .conv-chat-user{padding-left:2px!important;}
  body.chat-open .conv-chat-header:has(.wianova-heading) .wianova-avatar{width:40px!important;height:40px!important;min-width:40px!important;border-radius:13px!important;box-shadow:0 5px 20px rgba(45,110,255,.32)!important;}
  body.chat-open .conv-chat-body{padding:14px 10px 96px!important;background:linear-gradient(180deg,rgba(7,10,22,.18),rgba(8,10,20,.02))!important;}
  body.chat-open [data-wianova="1"].conv-chat-input{display:grid!important;grid-template-columns:minmax(0,1fr) 48px!important;gap:8px!important;padding:10px 10px calc(10px + env(safe-area-inset-bottom))!important;background:rgba(7,10,22,.98)!important;border-top:1px solid rgba(101,121,255,.16)!important;backdrop-filter:blur(16px)!important;}
  body.chat-open [data-wianova="1"] .msg-composer{min-height:56px!important;height:56px!important;max-height:132px!important;font-size:15px!important;line-height:1.45!important;padding:13px 14px!important;border-radius:16px!important;}
  body.chat-open [data-wianova="1"] .wianova-send-btn{width:48px!important;min-width:48px!important;height:48px!important;border-radius:15px!important;align-self:end!important;}
  body.chat-open [data-wianova="1"] .msg-composer:focus{box-shadow:0 0 0 3px rgba(102,115,255,.14)!important;}
}
@media(max-width:520px){
  body.chat-open [data-wianova="1"].conv-chat-input{grid-template-columns:minmax(0,1fr) 46px!important;padding:8px 8px calc(8px + env(safe-area-inset-bottom))!important;}
  body.chat-open [data-wianova="1"] .msg-composer{min-height:54px!important;height:54px!important;font-size:14px!important;}
  body.chat-open [data-wianova="1"] .wianova-send-btn{width:46px!important;min-width:46px!important;height:46px!important;border-radius:14px!important;}
}

/* css/messages-button-fix.css */
/* =========================================================
   Wiantex Messages Composer — scoped composer-only repair
   Does not touch chat header, sidebar, message list or WiaNova layout.
   ========================================================= */

/* Normal DM composer: fixed-height controls + flexible message box. */
.messages-shell .conv-chat-input:not([data-wianova="1"]){
  position:relative!important;
  display:flex!important;
  align-items:flex-end!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  padding:8px!important;
}

.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-voice,
.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-attach,
.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-emoji-trigger,
.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-send{
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  max-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  max-height:40px!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:11px!important;
}

.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-composer-wrap{
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
}

.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-composer{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:40px!important;
  min-height:40px!important;
  max-height:120px!important;
  margin:0!important;
  padding:9px 12px!important;
  box-sizing:border-box!important;
  resize:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  line-height:1.35!important;
  border-radius:11px!important;
}

.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-recording-status{
  position:absolute!important;
  left:8px!important;
  bottom:calc(100% + 5px)!important;
  z-index:5!important;
}

.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-emoji-picker{
  right:8px!important;
  bottom:54px!important;
  max-width:calc(100vw - 24px)!important;
}

/* WiaNova: intentionally untouched. Only generic safe sizing. */
.messages-shell .conv-chat-input[data-wianova="1"]{
  min-width:0!important;
}

@media (max-width:760px){
  .messages-shell .conv-chat-input:not([data-wianova="1"]){
    gap:6px!important;
    padding:7px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-voice,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-attach,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-emoji-trigger,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-send{
    flex-basis:36px!important;
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    border-radius:10px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-composer{
    height:36px!important;
    min-height:36px!important;
    padding:7px 10px!important;
    border-radius:10px!important;
    font-size:13px!important;
  }
}

@media (max-width:480px){
  .messages-shell .conv-chat-input:not([data-wianova="1"]){
    gap:5px!important;
    padding:6px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-voice,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-attach,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-emoji-trigger,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-send{
    flex-basis:34px!important;
    width:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    border-radius:9px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-composer{
    height:34px!important;
    min-height:34px!important;
    padding:6px 9px!important;
    font-size:12.5px!important;
    border-radius:9px!important;
  }
}

@media (max-width:380px){
  .messages-shell .conv-chat-input:not([data-wianova="1"]){
    gap:4px!important;
    padding:5px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-voice,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-attach,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-emoji-trigger,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-send{
    flex-basis:32px!important;
    width:32px!important;
    min-width:32px!important;
    max-width:32px!important;
    height:32px!important;
    min-height:32px!important;
    max-height:32px!important;
    border-radius:8px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-composer{
    height:32px!important;
    min-height:32px!important;
    padding:5px 8px!important;
    font-size:12px!important;
    border-radius:8px!important;
  }
}

/* css/wianova.css */

/* WiaNova only. No global selectors. */
.messages-shell .wianova-avatar{width:42px;height:42px;min-width:42px;display:block;object-fit:cover;object-position:center;border-radius:12px;border:1px solid rgba(255,255,255,.16);background:#0b1020;box-shadow:0 8px 22px rgba(34,100,255,.22),0 0 0 1px rgba(112,95,255,.10)}
.messages-shell .wianova-avatar-sm{width:30px;height:30px;min-width:30px;border-radius:9px}
.messages-shell .conv-chat-header .wianova-avatar{width:34px;height:34px;min-width:34px;border-radius:10px}
.messages-shell .wianova-ai-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border-radius:999px;color:#eaf7ff;background:linear-gradient(135deg,rgba(108,76,255,.24),rgba(25,182,255,.18));border:1px solid rgba(94,185,255,.34);font:700 9px/1 Inter,system-ui,sans-serif;white-space:nowrap}
.messages-shell .wianova-name{display:flex;align-items:center;gap:6px;min-width:0}
.messages-shell .wianova-conv-item.active{box-shadow:inset 0 0 0 1px rgba(91,145,255,.30),0 10px 28px rgba(48,58,140,.14)}
.messages-shell .wianova-heading{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:800;min-width:0}
.messages-shell .wianova-subtitle{font-size:10px;color:var(--text-3,#8f96a8);margin-top:2px}
/* only the WiaNova composer */
.messages-shell form[data-wianova="1"]{display:grid;grid-template-columns:minmax(0,1fr) 46px;align-items:end;gap:10px;padding:12px}
.messages-shell form[data-wianova="1"] .msg-composer-wrap{grid-column:1;min-width:0;width:100%}
.messages-shell form[data-wianova="1"] .msg-composer{display:block;width:100%;min-width:0;min-height:74px;height:74px;max-height:180px;resize:vertical;box-sizing:border-box;pointer-events:auto;user-select:text;-webkit-user-select:text}
.messages-shell form[data-wianova="1"] .wianova-send-btn{grid-column:2;width:46px;min-width:46px;height:46px;align-self:end}
@media(max-width:900px){.messages-shell form[data-wianova="1"]{grid-template-columns:minmax(0,1fr) 42px;gap:8px;padding:8px}.messages-shell form[data-wianova="1"] .msg-composer{min-height:62px;height:62px;max-height:140px}.messages-shell form[data-wianova="1"] .wianova-send-btn{width:42px;min-width:42px;height:42px}}
@media(max-width:520px){.messages-shell .wianova-ai-badge{font-size:8px;padding:3px 6px}.messages-shell .wianova-heading{font-size:13px}.messages-shell form[data-wianova="1"]{grid-template-columns:minmax(0,1fr) 40px;gap:6px}.messages-shell form[data-wianova="1"] .msg-composer{min-height:58px;height:58px;font-size:13px}.messages-shell form[data-wianova="1"] .wianova-send-btn{width:40px;min-width:40px;height:40px}}

/* WiaNova Markdown output. Scoped so normal DM text is untouched. */
.messages-shell .msg-text.wianova-markdown{line-height:1.62;white-space:normal;overflow-wrap:anywhere}
.messages-shell .msg-text.wianova-markdown>:first-child{margin-top:0}
.messages-shell .msg-text.wianova-markdown>:last-child{margin-bottom:0}
.messages-shell .msg-text.wianova-markdown p{margin:.35em 0 .7em;white-space:pre-wrap}
.messages-shell .msg-text.wianova-markdown h3,.messages-shell .msg-text.wianova-markdown h4,.messages-shell .msg-text.wianova-markdown h5,.messages-shell .msg-text.wianova-markdown h6{margin:.8em 0 .35em;font-weight:800;line-height:1.25}
.messages-shell .msg-text.wianova-markdown h3{font-size:1.18em}.messages-shell .msg-text.wianova-markdown h4{font-size:1.1em}.messages-shell .msg-text.wianova-markdown h5,.messages-shell .msg-text.wianova-markdown h6{font-size:1em}
.messages-shell .msg-text.wianova-markdown strong{font-weight:800}.messages-shell .msg-text.wianova-markdown em{font-style:italic}.messages-shell .msg-text.wianova-markdown del{opacity:.72}
.messages-shell .msg-text.wianova-markdown ul,.messages-shell .msg-text.wianova-markdown ol{margin:.4em 0 .75em;padding-left:1.45em}
.messages-shell .msg-text.wianova-markdown li{margin:.22em 0}
.messages-shell .msg-text.wianova-markdown blockquote{margin:.55em 0;padding:.3em 0 .3em .85em;border-left:3px solid rgba(140,140,255,.45);opacity:.92;white-space:pre-wrap}
.messages-shell .msg-text.wianova-markdown code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:.92em;padding:.12em .32em;border-radius:5px;background:rgba(0,0,0,.22)}
.messages-shell .msg-text.wianova-markdown pre{margin:.65em 0;padding:.75em .85em;overflow:auto;border-radius:9px;background:rgba(0,0,0,.28);border:1px solid rgba(255,255,255,.08);white-space:pre}
.messages-shell .msg-text.wianova-markdown pre code{padding:0;background:transparent;white-space:pre}
.messages-shell .msg-text.wianova-markdown hr{border:0;border-top:1px solid rgba(255,255,255,.14);margin:.8em 0}
.messages-shell .msg-text.wianova-markdown a{text-decoration:underline;text-underline-offset:2px}


/* WiaNova copyable code bubbles */
.messages-shell .wianova-code-block{margin:.7em 0;border:1px solid rgba(255,255,255,.10);border-radius:12px;overflow:hidden;background:rgba(5,8,16,.72);box-shadow:0 8px 24px rgba(0,0,0,.14)}
.messages-shell .wianova-code-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px;border-bottom:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.035)}
.messages-shell .wianova-code-lang{font:700 10px/1.2 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;letter-spacing:.06em;opacity:.7}
.messages-shell .wianova-code-copy{appearance:none;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.07);color:inherit;border-radius:8px;padding:6px 9px;font:700 11px/1 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer;transition:transform .12s ease,background .12s ease,border-color .12s ease}
.messages-shell .wianova-code-copy:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.20)}
.messages-shell .wianova-code-copy:active{transform:scale(.97)}
.messages-shell .wianova-code-copy.is-copied{background:rgba(74,222,128,.13);border-color:rgba(74,222,128,.28)}
.messages-shell .wianova-code-block pre{margin:0!important;padding:14px 15px!important;border:0!important;border-radius:0!important;background:transparent!important;overflow:auto;max-width:100%}
.messages-shell .wianova-code-block pre code{display:block;min-width:max-content;padding:0!important;background:transparent!important;white-space:pre!important;tab-size:2}
@media(max-width:600px){.messages-shell .wianova-code-head{padding:7px 8px}.messages-shell .wianova-code-copy{padding:6px 8px;font-size:10px}.messages-shell .wianova-code-block pre{padding:12px!important;font-size:.88em}}

/* WiaNova neon identity theme - logo matched */
.messages-shell .conv-chat[data-wianova-thread="1"]{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:#070914 !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"]::before,
.messages-shell .conv-chat[data-wianova-thread="1"]::after{
  content:"";
  position:absolute;
  pointer-events:none;
  z-index:-2;
  border-radius:999px;
  filter:blur(82px);
  opacity:.50;
}
.messages-shell .conv-chat[data-wianova-thread="1"]::before{
  width:420px;height:420px;
  top:-110px;left:-120px;
  background:radial-gradient(circle at 45% 45%,rgba(191,55,255,.92) 0%,rgba(121,47,255,.58) 38%,rgba(121,47,255,0) 72%);
  animation:wiaAuraOne 12s ease-in-out infinite alternate;
}
.messages-shell .conv-chat[data-wianova-thread="1"]::after{
  width:500px;height:500px;
  right:-170px;bottom:-150px;
  background:radial-gradient(circle at 50% 50%,rgba(0,202,255,.88) 0%,rgba(30,95,255,.55) 40%,rgba(30,95,255,0) 72%);
  animation:wiaAuraTwo 14s ease-in-out infinite alternate;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .conv-chat-body{
  position:relative;
  z-index:0;
  background:
    radial-gradient(circle at 72% 18%,rgba(54,95,255,.13),transparent 31%),
    radial-gradient(circle at 18% 72%,rgba(164,42,255,.12),transparent 34%),
    linear-gradient(180deg,rgba(8,10,20,.36),rgba(5,7,15,.58));
}
.messages-shell .conv-chat[data-wianova-thread="1"] .conv-chat-header{
  background:rgba(8,10,20,.68) !important;
  border-bottom:1px solid rgba(138,112,255,.16) !important;
  box-shadow:0 14px 38px rgba(0,0,0,.18);
  backdrop-filter:blur(22px) saturate(135%);
  -webkit-backdrop-filter:blur(22px) saturate(135%);
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-avatar,
.messages-shell .wianova-conv-item .wianova-avatar{
  border-radius:14px !important;
  border:1px solid rgba(123,164,255,.42) !important;
  box-shadow:0 0 0 1px rgba(177,68,255,.16),0 8px 28px rgba(68,76,255,.34),0 0 24px rgba(71,180,255,.12) !important;
  background:#080a16 !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-ai-badge,
.messages-shell .wianova-conv-item .wianova-ai-badge{
  color:#f7f5ff !important;
  background:linear-gradient(135deg,rgba(177,52,255,.22),rgba(18,149,255,.20)) !important;
  border-color:rgba(109,151,255,.34) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07);
}
.messages-shell .conv-chat[data-wianova-thread="1"] .msg-row:not(.mine) .msg-bubble{
  background:linear-gradient(145deg,rgba(19,20,38,.82),rgba(11,15,29,.82)) !important;
  border:1px solid rgba(119,126,255,.14) !important;
  box-shadow:0 12px 32px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.035) !important;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.messages-shell .conv-chat[data-wianova-thread="1"] .msg-row.mine .msg-bubble{
  background:linear-gradient(135deg,rgba(103,52,255,.88),rgba(26,112,255,.88)) !important;
  border:1px solid rgba(147,168,255,.32) !important;
  box-shadow:0 10px 28px rgba(35,70,255,.22),inset 0 1px 0 rgba(255,255,255,.12) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"]{
  background:linear-gradient(180deg,rgba(7,9,20,0),rgba(7,9,20,.76) 18%,rgba(7,9,20,.94) 44%) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .msg-composer-wrap{
  background:linear-gradient(145deg,rgba(21,24,42,.82),rgba(12,15,29,.90)) !important;
  border:1px solid rgba(117,126,255,.22) !important;
  box-shadow:0 18px 46px rgba(0,0,0,.30),0 0 0 1px rgba(162,75,255,.06),inset 0 1px 0 rgba(255,255,255,.045) !important;
  backdrop-filter:blur(20px) saturate(125%);
  -webkit-backdrop-filter:blur(20px) saturate(125%);
}
.messages-shell .conv-chat[data-wianova-thread="1"] .msg-composer-wrap:focus-within{
  border-color:rgba(91,145,255,.48) !important;
  box-shadow:0 18px 50px rgba(0,0,0,.30),0 0 0 3px rgba(91,99,255,.10),0 0 28px rgba(100,44,255,.10) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tool,
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-img-attach{
  background:rgba(19,22,39,.72) !important;
  border:1px solid rgba(118,133,255,.18) !important;
  color:#e9edff !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
  backdrop-filter:blur(10px);
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tool:hover,
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-img-attach:hover{
  background:rgba(40,43,72,.86) !important;
  border-color:rgba(128,146,255,.34) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tool.is-active{
  background:linear-gradient(135deg,#a43cff 0%,#5b49ff 48%,#149dff 100%) !important;
  color:#fff !important;
  border-color:rgba(176,181,255,.55) !important;
  box-shadow:0 8px 24px rgba(78,70,255,.28),inset 0 1px 0 rgba(255,255,255,.20) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-send-btn{
  background:linear-gradient(135deg,#a43cff 0%,#5d4cff 50%,#12a7ff 100%) !important;
  color:#fff !important;
  border:1px solid rgba(198,203,255,.50) !important;
  box-shadow:0 10px 28px rgba(76,74,255,.34),0 0 22px rgba(29,161,255,.12) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-send-btn:hover{
  filter:brightness(1.09);
  box-shadow:0 12px 32px rgba(76,74,255,.42),0 0 26px rgba(29,161,255,.18) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-code-block{
  background:rgba(7,9,18,.86) !important;
  border-color:rgba(108,124,255,.18) !important;
  box-shadow:0 14px 34px rgba(0,0,0,.24) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-code-head{
  background:linear-gradient(90deg,rgba(136,45,255,.10),rgba(27,132,255,.08)) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-image-render-card,
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-image-wait{
  border-color:rgba(119,131,255,.18) !important;
}
.messages-shell .wianova-conv-item.active{
  background:linear-gradient(135deg,rgba(143,47,255,.10),rgba(26,119,255,.08)) !important;
  box-shadow:inset 0 0 0 1px rgba(104,132,255,.22),0 12px 30px rgba(23,36,100,.15) !important;
}
@keyframes wiaAuraOne{0%{transform:translate3d(0,0,0) scale(1)}100%{transform:translate3d(85px,55px,0) scale(1.16)}}
@keyframes wiaAuraTwo{0%{transform:translate3d(0,0,0) scale(1)}100%{transform:translate3d(-95px,-60px,0) scale(1.12)}}
@media (prefers-reduced-motion:reduce){
  .messages-shell .conv-chat[data-wianova-thread="1"]::before,
  .messages-shell .conv-chat[data-wianova-thread="1"]::after{animation:none}
}
@media(max-width:640px){
  .messages-shell .conv-chat[data-wianova-thread="1"]::before{width:300px;height:300px;filter:blur(68px);opacity:.42}
  .messages-shell .conv-chat[data-wianova-thread="1"]::after{width:340px;height:340px;filter:blur(72px);opacity:.40}
}


.messages-shell .wianova-code-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.messages-shell .wianova-code-btn{appearance:none;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.07);color:inherit;border-radius:8px;padding:6px 9px;font:700 11px/1 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer;transition:transform .12s ease,background .12s ease,border-color .12s ease}
.messages-shell .wianova-code-btn:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.20)}
.messages-shell .wianova-code-btn:active{transform:scale(.97)}
.wianova-code-modal-open{overflow:hidden}
.wianova-code-modal{position:fixed;inset:0;display:none;z-index:2000}
.wianova-code-modal.open{display:block}
.wianova-code-modal-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.72);backdrop-filter:blur(10px)}
.wianova-code-modal-card{position:relative;z-index:1;width:min(920px,calc(100vw - 28px));max-height:min(85vh,920px);margin:6vh auto 0;border:1px solid rgba(255,255,255,.10);border-radius:20px;background:linear-gradient(180deg,rgba(12,16,28,.96),rgba(7,10,20,.98));box-shadow:0 28px 90px rgba(0,0,0,.45);display:flex;flex-direction:column;overflow:hidden}
.wianova-code-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid rgba(255,255,255,.08)}
.wianova-code-modal-head strong{font-size:15px}
.wianova-code-modal-sub{font-size:12px;color:rgba(255,255,255,.55);margin-top:4px}
.wianova-code-modal-close{appearance:none;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#fff;border-radius:12px;width:38px;height:38px;font-size:24px;line-height:1;cursor:pointer}
.wianova-code-modal-pre{margin:0;flex:1;overflow:auto;padding:18px;background:transparent}
.wianova-code-modal-pre code{display:block;white-space:pre;min-width:max-content;font:500 13px/1.6 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace}
.wianova-code-modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 18px;border-top:1px solid rgba(255,255,255,.08)}
.wianova-code-modal-actions .primary{background:#fff;color:#10131b;border-color:#fff}
.messages-shell .wianova-usage-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid rgba(120,137,255,.22);background:rgba(120,137,255,.10);color:#e8eeff;font:700 11px/1 system-ui,-apple-system,"Segoe UI",sans-serif;white-space:nowrap}
.messages-shell .wianova-usage-pill.in-tools{margin-left:auto}
.messages-shell .wianova-usage-pill.is-empty{border-color:rgba(255,107,107,.26);background:rgba(255,107,107,.12);color:#ffd9d9}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tool.is-disabled{opacity:.55;cursor:not-allowed}
@media(max-width:720px){
  .messages-shell .wianova-code-actions{gap:6px}
  .messages-shell .wianova-code-btn{padding:6px 8px;font-size:10px}
  .messages-shell .wianova-usage-pill.in-tools{margin-left:0}
  .wianova-code-modal-card{width:min(100vw - 18px,920px);margin:3vh auto 0;max-height:90vh}
}

/* Live HTML-style preview */
.wianova-render-preview-card{width:min(1180px,calc(100vw - 28px));height:min(88vh,900px);max-height:none;margin:4vh auto 0}
.wianova-preview-head-actions{display:flex;align-items:center;gap:8px}
.wianova-render-browser{display:flex;flex-direction:column;flex:1;min-height:0;margin:14px 16px 0;border:1px solid rgba(255,255,255,.10);border-radius:16px;overflow:hidden;background:#fff;box-shadow:0 16px 50px rgba(0,0,0,.28)}
.wianova-render-browserbar{height:38px;flex:0 0 38px;display:flex;align-items:center;gap:7px;padding:0 12px;background:#111827;border-bottom:1px solid rgba(255,255,255,.08);color:#9ca3af;font:600 11px/1 system-ui,-apple-system,"Segoe UI",sans-serif}
.wianova-render-browserbar>span{width:9px;height:9px;border-radius:50%;background:rgba(255,255,255,.24)}
.wianova-render-browserbar>div{margin-left:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wianova-render-frame{display:block;width:100%;height:100%;min-height:0;flex:1;border:0;background:#fff}
@media(max-width:720px){.wianova-render-preview-card{width:calc(100vw - 12px);height:94vh;margin:2vh auto 0;border-radius:16px}.wianova-render-browser{margin:10px 10px 0;border-radius:12px}.wianova-code-modal-head{padding:12px}.wianova-code-modal-actions{padding:10px}}


.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-image-toggle{width:44px;min-width:44px;height:44px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.05);color:#eef2f8;display:inline-flex;align-items:center;justify-content:center;gap:0;padding:0 12px;cursor:pointer;transition:background .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-image-toggle svg{width:18px;height:18px;display:block;fill:currentColor;flex:0 0 auto}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-image-toggle:hover{background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.16);transform:translateY(-1px)}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-image-toggle.is-active{
  background:
    linear-gradient(135deg,#B02BFF 0%,#6B35FF 34%,#176BFF 68%,#00C8FF 100%);
  border-color:rgba(168,118,255,.55);
  color:#fff;
  box-shadow:
    0 10px 28px rgba(23,107,255,.30),
    0 0 22px rgba(176,43,255,.24),
    inset 0 1px 0 rgba(255,255,255,.28);
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools{justify-content:flex-start}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-usage-pill.in-tools{margin-left:0}
.wianova-render-preview-card{width:min(1100px,calc(100vw - 24px));height:min(88vh,900px);margin:4vh auto 0;overflow:hidden}
.wianova-preview-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.wianova-render-browser{display:flex;flex-direction:column;min-height:0;flex:1;margin:14px 14px 0;border:1px solid rgba(255,255,255,.08);border-radius:16px;overflow:hidden;background:#0b1020}
.wianova-render-browserbar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04);min-width:0}
.wianova-render-browserbar span{width:10px;height:10px;border-radius:999px;background:rgba(255,255,255,.28);flex:0 0 auto}
.wianova-render-browserbar div{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:rgba(255,255,255,.72)}
.wianova-render-frame{display:block;width:100%;height:100%;min-height:360px;border:0;background:#fff;flex:1}
.wianova-code-modal-actions{flex-wrap:wrap}
.wianova-code-modal-actions .wianova-code-btn{max-width:100%}
@media(max-width:720px){.wianova-render-preview-card{width:calc(100vw - 10px);height:92vh;margin:2vh auto 0;border-radius:16px}.wianova-render-browser{margin:8px 8px 0;border-radius:12px}.wianova-code-modal-head{padding:12px;align-items:flex-start}.wianova-preview-head-actions{width:auto}.wianova-code-modal-actions{padding:10px;justify-content:stretch}.wianova-code-modal-actions .wianova-code-btn{flex:1 1 140px}.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-image-toggle.is-active{width:44px;min-width:44px;gap:0}}


.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-image-toggle.is-active:hover{
  background:linear-gradient(135deg,#C13BFF 0%,#7542FF 34%,#2180FF 68%,#19D4FF 100%);
  box-shadow:
    0 12px 32px rgba(23,107,255,.36),
    0 0 28px rgba(176,43,255,.30),
    inset 0 1px 0 rgba(255,255,255,.34);
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-image-toggle.is-active svg{
  filter:drop-shadow(0 0 6px rgba(255,255,255,.30));
}


/* Hard override: WiaNova image toggle must stay a small icon button */
.messages-shell .conv-chat[data-wianova-thread="1"] button.wianova-image-toggle,
.messages-shell .conv-chat[data-wianova-thread="1"] button.wianova-image-toggle.is-active,
.messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"] button.wianova-image-toggle,
.messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"] button.wianova-image-toggle.is-active{
  width:40px !important;
  min-width:40px !important;
  max-width:40px !important;
  height:40px !important;
  min-height:40px !important;
  max-height:40px !important;
  flex:0 0 40px !important;
  padding:0 !important;
  margin:0 !important;
  gap:0 !important;
  overflow:hidden !important;
  white-space:nowrap !important;
  box-sizing:border-box !important;
  border-radius:12px !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] button.wianova-image-toggle span{display:none !important}
@media (max-width:760px){
  .messages-shell .conv-chat[data-wianova-thread="1"] button.wianova-image-toggle,
  .messages-shell .conv-chat[data-wianova-thread="1"] button.wianova-image-toggle.is-active,
  .messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"] button.wianova-image-toggle,
  .messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"] button.wianova-image-toggle.is-active{
    width:36px !important;
    min-width:36px !important;
    max-width:36px !important;
    height:36px !important;
    min-height:36px !important;
    max-height:36px !important;
    flex:0 0 36px !important;
  }
}
@media (max-width:480px){
  .messages-shell .conv-chat[data-wianova-thread="1"] button.wianova-image-toggle,
  .messages-shell .conv-chat[data-wianova-thread="1"] button.wianova-image-toggle.is-active,
  .messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"] button.wianova-image-toggle,
  .messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"] button.wianova-image-toggle.is-active{
    width:34px !important;
    min-width:34px !important;
    max-width:34px !important;
    height:34px !important;
    min-height:34px !important;
    max-height:34px !important;
    flex:0 0 34px !important;
  }
}


/* WiaNova toolbar placement: image toggle above composer, usage aligned right */
.messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"] .wianova-tools{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  width:100% !important;
  min-width:0 !important;
  overflow:visible !important;
  flex-wrap:nowrap !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex:0 0 auto !important;
  min-width:0 !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-usage-pill.in-tools{
  margin-left:auto !important;
  margin-right:0 !important;
  flex:0 0 auto !important;
  max-width:min(60vw,320px) !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  justify-self:end !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left .wianova-image-toggle{
  align-self:center !important;
}
@media(max-width:640px){
  .messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"] .wianova-tools{
    overflow:visible !important;
    flex-wrap:nowrap !important;
    gap:8px !important;
  }
  .messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left{gap:6px !important}
  .messages-shell .conv-chat[data-wianova-thread="1"] .wianova-usage-pill.in-tools{
    margin-left:auto !important;
    max-width:calc(100% - 90px) !important;
    font-size:10px !important;
    padding:5px 8px !important;
  }
}

/* 2026-09-09: compact brush image-mode button */
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left .wianova-image-toggle,
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left .wianova-image-toggle.is-active{
  width:36px !important;
  min-width:36px !important;
  max-width:36px !important;
  height:36px !important;
  min-height:36px !important;
  max-height:36px !important;
  flex:0 0 36px !important;
  padding:0 !important;
  margin:0 !important;
  display:inline-grid !important;
  place-items:center !important;
  border-radius:11px !important;
  border:1px solid rgba(159,143,255,.18) !important;
  background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.025)) !important;
  color:#cbd5ff !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 5px 14px rgba(0,0,0,.18) !important;
  overflow:hidden !important;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,background .15s ease !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left .wianova-image-toggle svg{
  width:18px !important;
  height:18px !important;
  display:block !important;
  fill:none !important;
  stroke:currentColor !important;
  stroke-width:1.75 !important;
  stroke-linecap:round !important;
  stroke-linejoin:round !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left .wianova-image-toggle:hover{
  transform:translateY(-1px) !important;
  color:#fff !important;
  border-color:rgba(138,113,255,.42) !important;
  background:linear-gradient(180deg,rgba(124,92,255,.13),rgba(37,99,235,.07)) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left .wianova-image-toggle.is-active{
  color:#fff !important;
  border-color:rgba(91,153,255,.58) !important;
  background:linear-gradient(135deg,#a92cff 0%,#6940ff 38%,#176dff 72%,#05c8ff 100%) !important;
  box-shadow:0 8px 22px rgba(61,93,255,.32),0 0 16px rgba(167,45,255,.22),inset 0 1px 0 rgba(255,255,255,.26) !important;
}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left .wianova-image-toggle.is-active svg{
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.24)) !important;
}
@media(max-width:640px){
  .messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left .wianova-image-toggle,
  .messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left .wianova-image-toggle.is-active{
    width:34px !important;min-width:34px !important;max-width:34px !important;height:34px !important;min-height:34px !important;max-height:34px !important;flex-basis:34px !important;border-radius:10px !important;
  }
  .messages-shell .conv-chat[data-wianova-thread="1"] .wianova-tools-left .wianova-image-toggle svg{width:17px !important;height:17px !important}
}


.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-video-toggle{width:36px;min-width:36px;max-width:36px;height:36px;min-height:36px;max-height:36px;flex:0 0 36px;padding:0;margin:0;border-radius:11px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.045);color:#dfe7ff;display:inline-grid;place-items:center;cursor:pointer;box-sizing:border-box;transition:.16s ease}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-video-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-video-toggle:hover{background:rgba(255,255,255,.09);transform:translateY(-1px)}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-video-toggle.is-active{background:linear-gradient(135deg,#B02BFF 0%,#6B35FF 38%,#176BFF 72%,#00C8FF 100%);border-color:rgba(153,111,255,.55);color:#fff;box-shadow:0 8px 22px rgba(52,91,255,.28),0 0 18px rgba(176,43,255,.20)}
@media(max-width:600px){.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-video-toggle{width:34px;min-width:34px;max-width:34px;height:34px;min-height:34px;max-height:34px;flex-basis:34px}.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-video-toggle svg{width:18px;height:18px}}


/* WiaNova daily image + video quota group */
.messages-shell .wianova-usage-group{display:inline-flex;align-items:center;gap:6px;min-width:0;vertical-align:middle}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-usage-group.in-tools{margin-left:auto!important;margin-right:0!important;display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important;max-width:70%!important}
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-usage-group.in-tools .wianova-usage-pill.in-tools,
.messages-shell .conv-chat[data-wianova-thread="1"] .wianova-usage-group.in-tools .wianova-usage-pill{margin-left:0!important;margin-right:0!important;max-width:none!important}
.messages-shell .wianova-usage-pill.video{border-color:rgba(168,85,247,.24);background:rgba(168,85,247,.10);color:#f2e8ff}
.messages-shell .wianova-video-toggle.is-disabled,.messages-shell .wianova-image-toggle.is-disabled{opacity:.42!important;cursor:not-allowed!important;filter:saturate(.45)!important}
@media(max-width:640px){
  .messages-shell .conv-chat[data-wianova-thread="1"] .wianova-usage-group.in-tools{gap:4px!important;max-width:calc(100% - 112px)!important;overflow:hidden!important}
  .messages-shell .conv-chat[data-wianova-thread="1"] .wianova-usage-group.in-tools .wianova-usage-pill{font-size:9px!important;padding:5px 7px!important;overflow:hidden!important;text-overflow:ellipsis!important}
}

/* css/auth-progress.css */
.wtx-auth-progress{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:20px;background:rgba(6,9,19,.94);backdrop-filter:blur(14px);opacity:0;visibility:hidden;transition:opacity .22s ease,visibility .22s ease}.wtx-auth-progress.is-open{opacity:1;visibility:visible}.wtx-auth-progress-logo{display:block;width:min(220px,72%);max-height:72px;object-fit:contain;margin:0 auto 16px}.wtx-auth-progress.wtx-auth-error .wtx-auth-progress-logo{opacity:.96}
.wtx-auth-progress-card{width:min(420px,100%);padding:28px;border:1px solid rgba(120,140,190,.22);border-radius:22px;background:linear-gradient(180deg,rgba(20,27,49,.98),rgba(11,16,30,.98));box-shadow:0 24px 90px rgba(0,0,0,.45);text-align:center}.wtx-auth-spinner{width:54px;height:54px;margin:0 auto 16px;border-radius:50%;border:4px solid rgba(255,255,255,.12);border-top-color:#7c5cff;border-right-color:#3b82f6;animation:wtxAuthSpin .8s linear infinite}.wtx-auth-progress-title{font-size:20px;font-weight:850;color:var(--text-1,#fff)}.wtx-auth-progress-sub{margin-top:7px;color:var(--text-2,#a8b0c2);font-size:13px}.wtx-auth-progress-track{height:10px;margin-top:20px;border-radius:99px;overflow:hidden;background:rgba(255,255,255,.08)}.wtx-auth-progress-fill{height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#7c5cff,#3b82f6);transition:width .18s ease}.wtx-auth-progress-percent{margin-top:10px;font-size:14px;font-weight:800;color:#c4b5fd}.wtx-auth-done{display:none;margin-top:14px;color:#c4b5fd;font-size:13px;font-weight:700}.wtx-auth-progress.is-done .wtx-auth-spinner{animation:none;border-color:#8b5cf6;position:relative}.wtx-auth-progress.is-done .wtx-auth-done{display:block}@keyframes wtxAuthSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.wtx-auth-spinner{animation:none}.wtx-auth-progress,.wtx-auth-progress-fill{transition:none}}

.auth-site-brand{justify-content:center!important;width:100%;padding:0!important;margin:0 0 22px!important}.auth-site-logo{display:block;width:min(260px,80%);height:auto;max-height:110px;object-fit:contain;margin:0 auto}.wtx-auth-progress.wtx-auth-error .wtx-auth-progress-logo{display:block;width:min(220px,72%);max-height:72px;object-fit:contain;margin:0 auto 16px}.wtx-auth-progress.wtx-auth-error .wtx-auth-progress-logo{opacity:.96}
.wtx-auth-progress-card{border-color:rgba(139,92,246,.42);box-shadow:0 24px 90px rgba(90,56,180,.22)}.wtx-auth-progress.wtx-auth-error .wtx-auth-progress-title{color:#c4b5fd}.wtx-auth-progress.wtx-auth-error .wtx-auth-spinner{border-top-color:#8b5cf6;border-right-color:#a78bfa}.wtx-auth-progress.wtx-auth-error .wtx-auth-progress-fill{background:linear-gradient(90deg,#7c5cff,#a855f7);}.wtx-auth-progress.wtx-auth-error .wtx-auth-progress-percent{color:#c4b5fd}.wtx-auth-progress.wtx-auth-error .wtx-auth-done{color:#c4b5fd}.auth-card .auth-site-logo{width:min(300px,82%);max-height:120px}

/* Wiantex auth logo bounce - login/register/forgot/reset */
.wtx-auth-progress-logo{transform-origin:50% 100%;will-change:transform;animation:wtxAuthLogoBounce 1.35s ease-in-out infinite}
@keyframes wtxAuthLogoBounce{
  0%,100%{transform:translateY(0) scale(1)}
  18%{transform:translateY(-8px) scale(1.01)}
  32%{transform:translateY(0) scale(.995)}
  46%{transform:translateY(-4px) scale(1)}
  60%{transform:translateY(0) scale(1)}
}
@media (prefers-reduced-motion:reduce){.wtx-auth-progress-logo{animation:none}}

.logout-logo{transform-origin:50% 100%;will-change:transform;animation:wtxLogoutLogoBounce 1.35s ease-in-out infinite}
@keyframes wtxLogoutLogoBounce{
  0%,100%{transform:translateY(0) scale(1)}
  18%{transform:translateY(-9px) scale(1.01)}
  32%{transform:translateY(0) scale(.995)}
  46%{transform:translateY(-5px) scale(1)}
  60%{transform:translateY(0) scale(1)}
}
@media (prefers-reduced-motion:reduce){.logout-logo{animation:none}}

/* css/avatar-forum-refresh.css */
/* Wiantex Avatar + Forum refresh: additive, backend-safe */
.avatar-presence-stack{overflow:visible!important;isolation:isolate;position:relative;}
.avatar-presence-stack .avatar-presence-dot{right:-7px!important;bottom:-7px!important;width:16px;height:16px;border:2px solid var(--bg-0,#0a0f1e);z-index:20;transform:none;}
.avatar-presence-stack .avatar-presence-dot .presence-svg-icon{width:8px;height:8px;}
.avatar-presence-stack .avatar-frame-img{pointer-events:none;}
.avatar-status-gap{position:absolute;right:-2px;bottom:-2px;width:4px;height:4px;z-index:10;pointer-events:none;}

/* Name animations: profile animation setting now animates the username, not the whole profile card. */
.username-animation-none{animation:none!important;}
.username-animation-float{display:inline-block;animation:wxNameFloat 2.8s ease-in-out infinite;will-change:transform;}
.username-animation-glow{text-shadow:0 0 10px rgba(124,92,255,.28);animation:wxNameGlow 2.4s ease-in-out infinite;}
.username-animation-banner{background-size:220% auto;animation:wxNameDrift 5.6s ease-in-out infinite;background-image:linear-gradient(90deg,currentColor,rgba(124,92,255,.72),currentColor);-webkit-background-clip:text;background-clip:text;color:transparent;}
@keyframes wxNameFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@keyframes wxNameGlow{0%,100%{filter:drop-shadow(0 0 0 rgba(124,92,255,0))}50%{filter:drop-shadow(0 0 7px rgba(124,92,255,.42))}}
@keyframes wxNameDrift{0%{background-position:0% 50%}100%{background-position:220% 50%}}

/* New forum surface */
.forum-surface{display:flex;flex-direction:column;gap:16px;min-width:0;}
.forum-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:13px 16px;border:1px solid var(--border);background:linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,.012));border-radius:14px;}
.forum-toolbar-title{display:flex;align-items:center;gap:9px;min-width:0;}
.forum-toolbar-title strong{font-size:14px;}
.forum-toolbar-title span{color:var(--text-2);font-size:12px;}
.forum-filter-row{display:flex;gap:7px;align-items:center;flex-wrap:wrap;}
.forum-filter{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid var(--border);border-radius:9px;background:rgba(255,255,255,.018);color:var(--text-1);font-size:12px;font-weight:650;}
.forum-filter.active{background:rgba(124,92,255,.12);border-color:rgba(124,92,255,.34);color:var(--text-0);}
.topic-card{border-radius:14px!important;padding:14px 16px!important;background:linear-gradient(180deg,rgba(255,255,255,.022),rgba(255,255,255,.01))!important;}
.topic-card:hover{transform:translateY(-1px);border-color:rgba(124,92,255,.34);box-shadow:0 8px 22px rgba(0,0,0,.16);}
.topic-icon{width:42px;height:42px;border-radius:12px;}
.topic-title .text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.35;}
.topic-author-name{font-weight:650;color:var(--text-1);}
.topic-stats{gap:18px!important;}
.topic-stat strong{font-variant-numeric:tabular-nums;}
.topic-time{white-space:nowrap;color:var(--text-2);font-size:11px;min-width:64px;text-align:right;}

/* category side widgets */
.forum-category-list{display:flex;flex-direction:column;gap:5px;}
.forum-category-list .leader-row{padding:9px 10px;border-radius:9px;}
.forum-category-list .leader-row:hover{background:rgba(124,92,255,.06);}

@media (max-width:700px){
  .forum-toolbar{padding:11px 12px;}
  .forum-toolbar-title{width:100%;}
  .forum-filter-row{width:100%;}
  .forum-filter{flex:1 1 auto;justify-content:center;min-height:36px;}
  .topic-card{display:grid!important;grid-template-columns:38px minmax(0,1fr);gap:10px!important;align-items:center;padding:12px!important;}
  .topic-main{min-width:0;}
  .topic-stats{display:none!important;}
  .topic-time{grid-column:2;min-width:0;text-align:left;font-size:10.5px;margin-top:-3px;}
  .topic-meta{gap:5px!important;white-space:nowrap;overflow:hidden;}
  .topic-meta > *{min-width:0;}
  .topic-meta .topic-author-avatar{flex:0 0 auto;}
  .topic-meta .topic-author-name{overflow:hidden;text-overflow:ellipsis;}
}
@media (max-width:390px){
  .avatar-presence-stack .avatar-presence-dot{width:14px;height:14px;right:-6px!important;bottom:-6px!important;}
  .avatar-presence-stack .avatar-presence-dot .presence-svg-icon{width:7px;height:7px;}
  .topic-icon{width:36px;height:36px;border-radius:10px;}
  .topic-title{font-size:13px!important;}
}

/* css/site-polish-v4.css */

/* Wiantex V4 safe visual polish - presentation only. */
:root{
  --ui-radius:14px;
  --ui-radius-sm:10px;
  --ui-gap:12px;
}

/* Shared surfaces */
.card,
.market-product-card,
.shop-card,
.package-card,
.member-card{
  border-radius:var(--ui-radius);
  border:1px solid var(--border);
  background:linear-gradient(180deg,rgba(255,255,255,.032),rgba(255,255,255,.018));
  box-shadow:0 10px 28px rgba(0,0,0,.14);
}
.card:hover,
.market-product-card:hover,
.shop-card:hover,
.package-card:hover,
.member-card:hover{
  border-color:var(--border-strong);
}

/* Market */
.market-hero{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:18px 20px;margin-bottom:14px;
  border:1px solid var(--border);border-radius:16px;
  background:linear-gradient(135deg,rgba(124,92,255,.12),rgba(72,90,196,.05));
}
.market-hero h2{display:flex;align-items:center;gap:8px;margin:0;font-size:21px;letter-spacing:-.02em}
.market-hero p{margin:5px 0 0;color:var(--text-2);font-size:12.5px}
.market-balance{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border-radius:999px;background:rgba(255,255,255,.045);border:1px solid var(--border);font-weight:700;white-space:nowrap}
.market-balance .woin-logo{width:18px;height:18px;object-fit:contain}
.market-tabs{display:flex;gap:8px;overflow-x:auto;padding:2px 1px 8px;scrollbar-width:none}
.market-tabs::-webkit-scrollbar{display:none}
.market-tab-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:8px 12px;border:1px solid var(--border);border-radius:11px;background:rgba(255,255,255,.025);color:var(--text-2);font:inherit;font-size:12px;cursor:pointer}
.market-tab-btn:hover{border-color:var(--border-strong);color:var(--text-0)}
.market-tab-btn.active{background:rgba(124,92,255,.13);border-color:rgba(124,92,255,.4);color:var(--text-0)}
.market-product-grid,.shop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.market-product-card,.shop-card,.package-card{padding:0;overflow:hidden}
.market-product-image,.market-product-placeholder{width:100%;height:154px;object-fit:cover;background:rgba(0,0,0,.16)}
.market-product-body{padding:15px}
.market-product-body h3{margin:0;font-size:14px;line-height:1.35}
.market-product-body p{margin:7px 0 12px;color:var(--text-2);font-size:12px;line-height:1.55}
.market-product-meta,.package-price-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.shop-card{padding:14px}
.shop-card-media{min-height:112px;display:flex;align-items:center;justify-content:center;border-radius:11px;background:rgba(0,0,0,.12);margin-bottom:10px;overflow:hidden}
.shop-card-media img{display:block;max-width:100%;max-height:112px;object-fit:contain}
.shop-card-name{min-height:28px;font-size:13px;font-weight:700;margin-bottom:10px}
.shop-card form,.shop-card .btn,.package-card form{width:100%}
.shop-price-pill{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid var(--border);border-radius:999px;background:rgba(255,255,255,.03);font-size:11px;font-weight:700;white-space:nowrap}
.package-card{padding:14px}
.package-card-title{display:flex;align-items:center;gap:7px;font-weight:800;font-size:14px;margin-bottom:10px}
.package-items{display:flex;flex-wrap:wrap;gap:6px;min-height:54px}
.package-item-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 7px;border:1px solid var(--border);border-radius:9px;font-size:10.5px}
.package-price-row{margin-top:14px}

/* Members */
.member-card{padding:14px!important}
.member-card-main{min-width:0}
.member-card-actions{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-top:12px!important}
.member-card-actions form{min-width:0}
.member-card-actions .btn{width:100%;justify-content:center;min-height:34px}
.member-card-actions form:last-child .btn{width:36px;padding:0}

/* Authority form */
.authority-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}

@media (max-width: 980px){
  .market-product-grid,.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 720px){
  .market-hero{align-items:flex-start;flex-direction:column;padding:15px}
  .market-balance{align-self:stretch;justify-content:center}
  .market-product-grid,.shop-grid{grid-template-columns:1fr}
  .market-product-image,.market-product-placeholder{height:170px}
  .authority-form-grid{grid-template-columns:1fr}
  .member-card-actions{grid-template-columns:minmax(0,1fr) 36px!important}
}
@media (max-width: 420px){
  .market-tabs{gap:6px}
  .market-tab-btn{min-height:36px;padding:7px 10px;font-size:11px}
  .market-product-body,.shop-card,.package-card{padding:12px}
  .member-card{padding:12px!important}
}

/* final avatar/frame fix is loaded from avatar-frame-final-fix.css */

/* css/rank-icons.css */
.rank-icon{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:0;flex:0 0 auto;opacity:.98;filter:drop-shadow(0 0 5px color-mix(in srgb,currentColor 30%,transparent))}.rank-icon svg{display:block}.rank-badge,.rank-inline{display:inline-flex;align-items:center;gap:6px;vertical-align:middle;min-width:0}.rank-badge>span:last-child,.rank-inline>span:last-child{min-width:0}.rank-role-icon,.level-rank-icon{position:relative}.rank-icon-infinity{color:#f59e0b}.secret-role-badge .level-rank-icon{filter:drop-shadow(0 0 7px currentColor)}.post-roles .rank-badge{max-width:100%}.profile-preview-meta .rank-inline{font-weight:700}@media(max-width:640px){.rank-badge{max-width:100%}}
/* css/oauth.css */
/* Wiantex OAuth / Secure Auth */
.oauth-authorize-page,.oauth-callback-page{min-height:100dvh;background:
radial-gradient(circle at 18% 12%,color-mix(in srgb,var(--purple) 18%,transparent),transparent 32%),
radial-gradient(circle at 82% 84%,color-mix(in srgb,var(--blue) 16%,transparent),transparent 34%),
var(--bg-0)}
.wtx-oauth-stage{min-height:100dvh;display:grid;place-items:center;padding:34px 16px;position:relative;overflow:hidden}
.wtx-oauth-stage:before,.wtx-oauth-stage:after{content:"";position:fixed;width:340px;height:340px;border-radius:50%;filter:blur(74px);opacity:.17;pointer-events:none;animation:wtxOAuthFloat 8s ease-in-out infinite alternate}.wtx-oauth-stage:before{background:var(--purple);left:-110px;top:-120px}.wtx-oauth-stage:after{background:var(--blue);right:-120px;bottom:-140px;animation-delay:-3s}
.wtx-oauth-consent-card{width:min(100%,620px);position:relative;z-index:1;overflow:hidden;border:1px solid color-mix(in srgb,var(--border) 82%,var(--purple) 18%);border-radius:24px;background:color-mix(in srgb,var(--panel-0) 94%,transparent);box-shadow:0 28px 90px rgba(0,0,0,.34);backdrop-filter:blur(22px)}
.wtx-oauth-window-bar{min-height:48px;padding:0 17px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--panel-1) 72%,transparent)}
.wtx-oauth-window-dots{display:flex;gap:6px}.wtx-oauth-window-dots i{display:block;width:8px;height:8px;border-radius:50%;background:var(--text-2);opacity:.55}.wtx-oauth-window-dots i:nth-child(2){opacity:.4}.wtx-oauth-window-dots i:nth-child(3){opacity:.28}
.wtx-oauth-window-title{display:flex;align-items:center;gap:6px;color:var(--text-2);font-size:10px;font-weight:800;letter-spacing:.045em;text-transform:uppercase}.wtx-oauth-pkce-badge{justify-self:end;padding:5px 7px;border:1px solid color-mix(in srgb,#38d996 25%,var(--border));border-radius:999px;color:#38d996;background:color-mix(in srgb,#38d996 8%,transparent);font-size:8.5px;font-weight:800;letter-spacing:.04em}
.wtx-oauth-identity-row{display:flex;justify-content:center;align-items:center;padding:28px 28px 16px}.wtx-oauth-app-logo,.wtx-oauth-wiantex-logo{width:66px;height:66px;border-radius:21px;display:grid;place-items:center;border:1px solid var(--border);background:var(--panel-1);box-shadow:0 14px 32px rgba(0,0,0,.16)}.wtx-oauth-app-logo{color:#fff;background:linear-gradient(135deg,color-mix(in srgb,var(--purple) 85%,#111),color-mix(in srgb,var(--blue) 75%,#111))}.wtx-oauth-wiantex-logo{padding:11px}.wtx-oauth-wiantex-logo img{width:100%;height:100%;object-fit:contain}.wtx-oauth-link-line{width:88px;height:1px;background:linear-gradient(90deg,var(--purple),var(--blue));position:relative;opacity:.8}.wtx-oauth-link-line span{position:absolute;width:8px;height:8px;border-radius:50%;background:#fff;top:50%;left:0;transform:translate(-50%,-50%);box-shadow:0 0 18px 5px color-mix(in srgb,var(--purple) 62%,transparent);animation:wtxOAuthTravel 2.2s linear infinite}
.wtx-oauth-copy{padding:0 28px;text-align:center}.wtx-oauth-eyebrow{font-size:9px;text-transform:uppercase;letter-spacing:.13em;font-weight:900;color:var(--purple);margin-bottom:8px}.wtx-oauth-copy h1,.wtx-oauth-error-card h1,.wtx-oauth-transition-card h1{margin:0;color:var(--text-0);font:800 clamp(23px,4vw,31px)/1.16 Sora,Inter,sans-serif;letter-spacing:-.035em}.wtx-oauth-copy h1 span{background:linear-gradient(135deg,var(--purple),var(--blue));-webkit-background-clip:text;background-clip:text;color:transparent}.wtx-oauth-copy p,.wtx-oauth-error-card p,.wtx-oauth-transition-card p{margin:11px auto 0;max-width:500px;color:var(--text-2);font-size:12.5px;line-height:1.65}
.wtx-oauth-account-card{margin:20px 24px 0;padding:13px 14px;display:flex;align-items:center;gap:11px;border:1px solid var(--border);border-radius:15px;background:color-mix(in srgb,var(--panel-1) 78%,transparent)}.wtx-oauth-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,var(--purple),var(--blue));color:#fff;font-weight:900}.wtx-oauth-account-card>div{min-width:0;flex:1}.wtx-oauth-account-card small{display:block;color:var(--text-2);font-size:9.5px}.wtx-oauth-account-card strong{display:block;margin-top:2px;color:var(--text-0);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wtx-oauth-verified{display:flex;align-items:center;gap:5px;color:#38d996;font-size:9.5px;font-weight:800}
.wtx-oauth-permission-title{margin:20px 28px 8px;color:var(--text-1);font-size:10.5px;font-weight:800}.oauth-scope-list{display:grid;gap:8px;margin:0 24px}.oauth-scope{display:grid;grid-template-columns:36px 1fr 24px;gap:10px;align-items:center;padding:11px 12px;border:1px solid var(--border);border-radius:13px;background:color-mix(in srgb,var(--panel-1) 66%,transparent)}.oauth-scope-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:var(--purple);background:color-mix(in srgb,var(--purple) 10%,transparent)}.oauth-scope strong{display:block;color:var(--text-0);font-size:11.5px}.oauth-scope .text-muted{margin-top:3px;font-size:10.5px;line-height:1.45}.oauth-scope-check{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;color:#38d996;background:color-mix(in srgb,#38d996 10%,transparent);border:1px solid color-mix(in srgb,#38d996 20%,transparent)}
.wtx-oauth-domain-note{display:flex;align-items:flex-start;gap:8px;margin:13px 28px 0;color:var(--text-2);font-size:10.5px;line-height:1.5}.wtx-oauth-domain-note strong{color:var(--text-1)}.wtx-oauth-form{padding:0 24px}.oauth-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;margin-top:20px}.oauth-actions .btn{min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px}.wtx-oauth-card-footer{margin-top:20px;padding:14px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--border);background:color-mix(in srgb,var(--panel-1) 48%,transparent);color:var(--text-2);font-size:9.5px}.wtx-oauth-card-footer>span{display:flex;align-items:center;gap:5px}.wtx-oauth-card-footer nav{display:flex;gap:10px}.wtx-oauth-card-footer a{color:var(--text-2);text-decoration:none}.wtx-oauth-card-footer a:hover{color:var(--text-0)}
.wtx-oauth-error-card{padding:34px;text-align:center}.wtx-oauth-status-icon{width:62px;height:62px;margin:0 auto 18px;border-radius:20px;display:grid;place-items:center}.wtx-oauth-status-icon.is-error{color:#ff6978;background:color-mix(in srgb,#ff6978 11%,transparent);border:1px solid color-mix(in srgb,#ff6978 22%,transparent)}.wtx-oauth-error-card .btn{margin-top:22px}

/* Callback transition */
.wtx-oauth-transition{min-height:100dvh;display:grid;place-items:center;padding:28px 16px}.wtx-oauth-transition-card{width:min(100%,470px);text-align:center;padding:38px 30px;border:1px solid var(--border);border-radius:25px;background:color-mix(in srgb,var(--panel-0) 94%,transparent);box-shadow:0 28px 90px rgba(0,0,0,.32);position:relative;overflow:hidden}.wtx-oauth-transition-card:before{content:"";position:absolute;inset:-1px;background:linear-gradient(115deg,transparent 20%,color-mix(in srgb,var(--purple) 8%,transparent),transparent 72%);transform:translateX(-100%);animation:wtxOAuthSheen 1.7s ease-in-out infinite;pointer-events:none}.wtx-oauth-brand-orbit{position:relative;width:92px;height:92px;margin:0 auto 24px;display:grid;place-items:center}.wtx-oauth-orbit-ring{position:absolute;inset:0;border-radius:50%;border:1px solid color-mix(in srgb,var(--purple) 45%,transparent);animation:wtxOAuthSpin 2.6s linear infinite}.wtx-oauth-orbit-ring:after{content:"";position:absolute;width:8px;height:8px;border-radius:50%;top:-4px;left:50%;background:var(--purple);box-shadow:0 0 17px var(--purple)}.wtx-oauth-orbit-ring.ring-two{inset:9px;border-color:color-mix(in srgb,var(--blue) 40%,transparent);animation-direction:reverse;animation-duration:2s}.wtx-oauth-orbit-ring.ring-two:after{background:var(--blue);box-shadow:0 0 17px var(--blue)}.wtx-oauth-orbit-core{width:55px;height:55px;border-radius:18px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--purple),var(--blue));box-shadow:0 12px 36px color-mix(in srgb,var(--purple) 25%,transparent)}.wtx-oauth-brand-orbit.is-error .wtx-oauth-orbit-core{background:linear-gradient(135deg,#ff5f6d,#c83a65)}.wtx-oauth-provider-chip{display:inline-flex;align-items:center;gap:7px;margin:17px 0 20px;padding:7px 10px;border-radius:999px;border:1px solid var(--border);background:var(--panel-1);color:var(--text-1);font-size:10px;font-weight:700}.wtx-oauth-provider-dot{width:6px;height:6px;border-radius:50%;background:#38d996;box-shadow:0 0 12px #38d996}.wtx-oauth-progress{height:4px;border-radius:999px;background:color-mix(in srgb,var(--border) 80%,transparent);overflow:hidden;margin:0 0 20px}.wtx-oauth-progress span{display:block;height:100%;width:36%;border-radius:inherit;background:linear-gradient(90deg,var(--purple),var(--blue));animation:wtxOAuthProgress 1.35s ease-in-out infinite}.wtx-oauth-transition-card .btn{min-width:180px;justify-content:center}

/* Admin OAuth cards from previous patch */
.oauth-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-all;padding:10px;background:var(--bg-1);border:1px solid var(--border);border-radius:10px}.oauth-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.oauth-client-card{padding:16px}.oauth-client-card code{font-size:11px}.oauth-muted{color:var(--text-2);font-size:12px;line-height:1.55}

@keyframes wtxOAuthTravel{0%{left:0;opacity:0}12%{opacity:1}88%{opacity:1}100%{left:100%;opacity:0}}@keyframes wtxOAuthFloat{from{transform:translate3d(0,0,0) scale(.95)}to{transform:translate3d(28px,18px,0) scale(1.08)}}@keyframes wtxOAuthSpin{to{transform:rotate(360deg)}}@keyframes wtxOAuthProgress{0%{transform:translateX(-120%)}100%{transform:translateX(360%)}}@keyframes wtxOAuthSheen{0%,35%{transform:translateX(-110%)}75%,100%{transform:translateX(110%)}}
@media(max-width:620px){.wtx-oauth-stage{padding:16px 10px}.wtx-oauth-consent-card{border-radius:20px}.wtx-oauth-window-bar{padding:0 12px}.wtx-oauth-window-title{font-size:9px}.wtx-oauth-pkce-badge{font-size:7.5px}.wtx-oauth-identity-row{padding:24px 18px 14px}.wtx-oauth-app-logo,.wtx-oauth-wiantex-logo{width:57px;height:57px;border-radius:18px}.wtx-oauth-link-line{width:58px}.wtx-oauth-copy{padding:0 18px}.wtx-oauth-copy h1{font-size:23px}.wtx-oauth-account-card,.oauth-scope-list{margin-left:14px;margin-right:14px}.wtx-oauth-permission-title,.wtx-oauth-domain-note{margin-left:18px;margin-right:18px}.wtx-oauth-form{padding:0 14px}.wtx-oauth-card-footer{align-items:flex-start;flex-direction:column}.wtx-oauth-transition-card{padding:32px 20px}.oauth-actions{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.wtx-oauth-stage:before,.wtx-oauth-stage:after,.wtx-oauth-link-line span,.wtx-oauth-orbit-ring,.wtx-oauth-progress span,.wtx-oauth-transition-card:before{animation:none!important}}

/* css/auth-security.css */
.wtx-captcha-wrap{display:flex;justify-content:center;margin:13px 0 5px;min-height:78px;overflow:hidden}.wtx-captcha-wrap .g-recaptcha{transform-origin:center top}.auth-legal-mini,.auth-legal-consent{color:var(--text-2);font-size:10px;line-height:1.55;text-align:center}.auth-legal-mini{display:flex;justify-content:center;gap:7px;margin-top:12px}.auth-legal-mini a,.auth-legal-consent a{color:var(--text-1);text-decoration:none}.auth-legal-mini a:hover,.auth-legal-consent a:hover{color:var(--text-0);text-decoration:underline}.auth-legal-consent{margin-top:10px;padding:0 8px}@media(max-width:360px){.wtx-captcha-wrap{justify-content:flex-start;transform:scale(.91);transform-origin:left top;width:110%;margin-bottom:-2px}}

/* css/avatar-frame-final-fix.css */
/* Final avatar + frame alignment: frame never changes layout metrics. */
.avatar-frame-wrap,
.avatar-wrap {
  position:relative !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  overflow:visible !important;
  vertical-align:middle !important;
  isolation:isolate !important;
  box-sizing:border-box !important;
}
.avatar-frame-wrap .avatar-frame-base {
  position:relative !important;
  width:100% !important;
  height:100% !important;
  flex:0 0 100% !important;
  display:block !important;
  z-index:1 !important;
  min-width:0 !important;
  min-height:0 !important;
}
.avatar-frame-wrap .avatar,
.avatar-wrap .avatar {
  display:block !important;
  position:relative !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  min-width:0 !important;
  min-height:0 !important;
  object-fit:cover !important;
  flex:1 1 auto !important;
  border-radius:50% !important;
  z-index:1 !important;
}
.avatar-frame-wrap .avatar-frame-img {
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  transform:translate(-50%,-50%) !important;
  object-fit:contain !important;
  display:block !important;
  z-index:3 !important;
  pointer-events:none !important;
  user-select:none !important;
}
/* Keep presence visually separate from both avatar and frame. */
.avatar-presence-stack .avatar-presence-dot {
  position:absolute !important;
  right:-7px !important;
  bottom:-7px !important;
  width:16px !important;
  height:16px !important;
  min-width:16px !important;
  min-height:16px !important;
  margin:0 !important;
  z-index:20 !important;
  transform:none !important;
}
.profile-main-avatar .avatar-frame-wrap {
  width:84px !important;
  height:84px !important;
  flex-basis:84px !important;
}
.profile-main-avatar .avatar-frame-wrap .avatar-frame-img { width:128% !important; height:128% !important; }
@media (max-width:700px) {
  .profile-main-avatar .avatar-frame-wrap { width:72px !important; height:72px !important; flex-basis:72px !important; }
}
@media (max-width:390px) {
  .profile-main-avatar .avatar-frame-wrap { width:64px !important; height:64px !important; flex-basis:64px !important; }
}
/* Prevent flex/grid parents from shrinking framed avatars. */
.avatar-frame-wrap, .avatar-wrap { min-width:0; }
.post-author .avatar-frame-wrap, .topic-meta .avatar-frame-wrap, .profile-trigger .avatar-frame-wrap, .conv-list-item .avatar-frame-wrap { flex-shrink:0 !important; }


/* Requested ratio: avatar 100%, frame 100% of the avatar-frame wrapper. */
.avatar-frame-wrap .avatar-frame-base,
.avatar-frame-wrap .avatar {
  width:100% !important;
  height:100% !important;
  flex:0 0 100% !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
}
.avatar-frame-wrap .avatar-frame-img {
  width:100% !important;
  height:100% !important;
}
.profile-main-avatar .avatar-frame-wrap .avatar-frame-base,
.profile-main-avatar .avatar-frame-wrap .avatar {
  width:100% !important;
  height:100% !important;
  flex-basis:100% !important;
}
.profile-main-avatar .avatar-frame-wrap .avatar-frame-img {
  width:100% !important;
  height:100% !important;
}
.profile-preview-avatar-base .avatar {
  width:100% !important;
  height:100% !important;
}
.profile-preview-frame {
  width:100% !important;
  height:100% !important;
}

/* css/avatar-stability-final.css */
/* Wiantex avatar/frame stability: layout-safe, responsive, presence separated. */
.avatar-wrap,
.avatar-frame-wrap,
.avatar-presence-stack {
  position:relative !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  vertical-align:middle !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  min-height:0 !important;
  overflow:visible !important;
  isolation:isolate !important;
  box-sizing:border-box !important;
}

.avatar-frame-wrap .avatar-frame-base {
  position:relative !important;
  display:block !important;
  width:100% !important;
  height:100% !important;
  flex:0 0 100% !important;
  min-width:0 !important;
  min-height:0 !important;
  z-index:1 !important;
  overflow:hidden !important;
  border-radius:50% !important;
}

.avatar-wrap .avatar,
.avatar-frame-wrap .avatar {
  position:relative !important;
  display:block !important;
  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:none !important;
  max-height:none !important;
  flex:0 0 100% !important;
  object-fit:cover !important;
  border-radius:50% !important;
  z-index:1 !important;
}

/* Frame is visual-only and never participates in layout width/height. */
.avatar-frame-wrap .avatar-frame-img {
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  width:120% !important;
  height:120% !important;
  transform:translate(-50%,-50%) !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:contain !important;
  display:block !important;
  pointer-events:none !important;
  user-select:none !important;
  z-index:3 !important;
}

/* Presence is deliberately detached from the avatar edge. */
.avatar-presence-stack .avatar-presence-dot,
.avatar-wrap .avatar-presence-dot {
  position:absolute !important;
  right:-8px !important;
  bottom:-8px !important;
  width:15px !important;
  height:15px !important;
  min-width:15px !important;
  min-height:15px !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:50% !important;
  box-sizing:border-box !important;
  z-index:8 !important;
  transform:none !important;
}

.avatar-presence-stack .avatar-presence-dot .presence-svg-icon {
  width:8px !important;
  height:8px !important;
  display:block !important;
}

.avatar-status-gap { display:none !important; }

.profile-main-avatar,
.profile-main-avatar .avatar-frame-wrap {
  overflow:visible !important;
  flex-shrink:0 !important;
}

.profile-main-avatar .avatar-frame-wrap {
  width:84px !important;
  height:84px !important;
  flex-basis:84px !important;
}

.profile-main-avatar .avatar-frame-wrap .avatar-frame-img { width:120% !important; height:120% !important; }

.profile-preview-avatar {
  position:relative !important;
  overflow:visible !important;
}
.profile-preview-frame {
  left:50% !important;
  top:50% !important;
  width:120% !important;
  height:120% !important;
  transform:translate(-50%,-50%) !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:contain !important;
  pointer-events:none !important;
}

@media (max-width:700px){
  .profile-main-avatar .avatar-frame-wrap {
    width:72px !important;
    height:72px !important;
    flex-basis:72px !important;
  }
  .profile-main-avatar .avatar-presence-dot,
  .avatar-presence-stack .avatar-presence-dot { right:-7px !important; bottom:-7px !important; width:14px !important; height:14px !important; min-width:14px !important; min-height:14px !important; }
}

@media (max-width:390px){
  .profile-main-avatar .avatar-frame-wrap {
    width:64px !important;
    height:64px !important;
    flex-basis:64px !important;
  }
}

/* css/avatar-frame-absolute-final.css */
/* Wiantex final avatar system: avatar owns layout, frame and presence are overlays. */
.avatar-wrap,
.avatar-frame-wrap,
.avatar-presence-stack {
  --avatar-size: 40px;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--avatar-size) !important;
  height: var(--avatar-size) !important;
  min-width: var(--avatar-size) !important;
  min-height: var(--avatar-size) !important;
  flex: 0 0 var(--avatar-size) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  vertical-align: middle !important;
  isolation: isolate !important;
}

.avatar-frame-base {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  flex: 0 0 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  z-index: 1 !important;
  box-sizing: border-box !important;
}

.avatar,
.avatar-fallback {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 0 0 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  box-sizing: border-box !important;
}

.avatar-fallback {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(145deg, rgba(124,92,255,.18), rgba(74,120,255,.12)) !important;
  color: var(--text-1, #d9def0) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}

.avatar-fallback-icon {
  width: 68% !important;
  height: 68% !important;
  max-width: 68% !important;
  max-height: 68% !important;
  display: block !important;
  flex: 0 0 auto !important;
}

.avatar-frame-img {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 122% !important;
  height: 122% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain !important;
  display: block !important;
  pointer-events: none !important;
  user-select: none !important;
  z-index: 4 !important;
}

.avatar-presence-dot,
.avatar-wrap .avatar-presence-dot,
.avatar-presence-stack .avatar-presence-dot {
  position: absolute !important;
  right: -7px !important;
  bottom: -7px !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  z-index: 10 !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.avatar-presence-dot .presence-svg-icon {
  width: 8px !important;
  height: 8px !important;
  display: block !important;
}

.profile-main-avatar .avatar-wrap,
.profile-main-avatar .avatar-frame-wrap {
  --avatar-size: 92px;
  width: var(--avatar-size) !important;
  height: var(--avatar-size) !important;
  min-width: var(--avatar-size) !important;
  min-height: var(--avatar-size) !important;
  flex-basis: var(--avatar-size) !important;
}

.profile-main-avatar .avatar-frame-img {
  width: 122% !important;
  height: 122% !important;
}

.profile-preview-avatar,
.profile-preview-avatar-base {
  overflow: visible !important;
  position: relative !important;
}

.profile-preview-avatar-base .avatar,
.profile-preview-avatar-base .avatar-fallback {
  width: 100% !important;
  height: 100% !important;
}

.profile-preview-frame {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 122% !important;
  height: 122% !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain !important;
  max-width: none !important;
  max-height: none !important;
  z-index: 4 !important;
  pointer-events: none !important;
}

.post-author .avatar-wrap,
.topic-meta .avatar-wrap,
.profile-trigger .avatar-wrap,
.conv-list-item .avatar-wrap,
.post-author .avatar-frame-wrap,
.topic-meta .avatar-frame-wrap,
.profile-trigger .avatar-frame-wrap,
.conv-list-item .avatar-frame-wrap {
  flex-shrink: 0 !important;
}

@media (max-width: 700px) {
  .profile-main-avatar .avatar-wrap,
  .profile-main-avatar .avatar-frame-wrap {
    --avatar-size: 78px;
  }
}

@media (max-width: 390px) {
  .profile-main-avatar .avatar-wrap,
  .profile-main-avatar .avatar-frame-wrap {
    --avatar-size: 70px;
  }
  .avatar-fallback-icon { width: 66% !important; height: 66% !important; }
  .avatar-presence-dot,
  .avatar-wrap .avatar-presence-dot,
  .avatar-presence-stack .avatar-presence-dot {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    right: -6px !important;
    bottom: -6px !important;
  }
  .avatar-presence-dot .presence-svg-icon { width: 7px !important; height: 7px !important; }
}

/* css/avatar-frame-size-final.css */
/* Profile frame sizing: visual frame only; it never changes avatar layout metrics. */
.profile-main-avatar .avatar-frame-img,
.profile-preview-frame {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 94px !important;
  height: 94px !important;
  max-width: none !important;
  max-height: none !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain !important;
  pointer-events: none !important;
  z-index: 4 !important;
}
@media (max-width: 700px) {
  .profile-main-avatar .avatar-frame-img,
  .profile-preview-frame {
    width: 80px !important;
    height: 80px !important;
  }
}
/* Keep framed profile avatars stable inside flex/grid parents. */
.profile-main-avatar .avatar-frame-wrap,
.profile-preview-avatar-base {
  overflow: visible !important;
  isolation: isolate !important;
}

/* css/avatar-frame-94-80-final.css */

/* Final fallback SVG alignment: the icon stays completely inside the avatar circle. */
.avatar-frame-wrap .avatar-fallback,
.avatar-wrap .avatar-fallback {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
  border-radius: 50% !important;
  clip-path: circle(50% at 50% 50%) !important;
}
.avatar-frame-wrap .avatar-fallback-icon,
.avatar-wrap .avatar-fallback-icon {
  width: 58% !important;
  height: 58% !important;
  max-width: 58% !important;
  max-height: 58% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  display: block !important;
  flex: 0 0 auto !important;
  object-fit: contain !important;
  overflow: visible !important;
}
@media (max-width: 700px) {
  .avatar-frame-wrap .avatar-fallback-icon,
  .avatar-wrap .avatar-fallback-icon {
    width: 56% !important;
    height: 56% !important;
    max-width: 56% !important;
    max-height: 56% !important;
  }
}
@media (max-width: 390px) {
  .avatar-frame-wrap .avatar-fallback-icon,
  .avatar-wrap .avatar-fallback-icon {
    width: 54% !important;
    height: 54% !important;
    max-width: 54% !important;
    max-height: 54% !important;
  }
}

/* css/avatar-system-final.css */
/* Wiantex final avatar renderer: the avatar is the layout box; frame and presence are overlays. */
.avatar-wrap,
.avatar-frame-wrap,
.avatar-presence-stack{
  position:relative !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  min-width:var(--avatar-size,40px) !important;
  min-height:var(--avatar-size,40px) !important;
  width:var(--avatar-size,40px) !important;
  height:var(--avatar-size,40px) !important;
  box-sizing:border-box !important;
  overflow:visible !important;
  vertical-align:middle !important;
  isolation:isolate !important;
}

.avatar-frame-base{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  border-radius:50% !important;
  overflow:hidden !important;
  margin:0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
  z-index:1 !important;
}

.avatar-wrap > .avatar,
.avatar-frame-base > .avatar,
.avatar-wrap > .avatar-fallback,
.avatar-frame-base > .avatar-fallback{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  height:100% !important;
  min-width:100% !important;
  min-height:100% !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:50% !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
  object-fit:cover !important;
  z-index:1 !important;
}

.avatar-fallback{
  background:#121a33 !important;
  border:1px solid rgba(255,255,255,.08) !important;
  isolation:isolate !important;
  clip-path:circle(50% at 50% 50%) !important;
}

.avatar-fallback-icon{
  width:72% !important;
  height:72% !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:72% !important;
  max-height:72% !important;
  display:block !important;
  flex:0 0 72% !important;
  margin:0 !important;
  padding:0 !important;
  object-fit:contain !important;
  overflow:hidden !important;
  border-radius:50% !important;
}

.avatar-frame-img{
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  transform:translate(-50%,-50%) !important;
  object-fit:contain !important;
  display:block !important;
  pointer-events:none !important;
  user-select:none !important;
  z-index:4 !important;
}

/* Profile: slightly larger avatar while keeping the requested 94/80 frame visual size. */
.profile-main-avatar .avatar-wrap,
.profile-main-avatar .avatar-frame-wrap{
  --avatar-size:96px !important;
  width:96px !important;
  height:96px !important;
  min-width:96px !important;
  min-height:96px !important;
  flex-basis:96px !important;
}
.profile-main-avatar .avatar-frame-img{ width:94px !important; height:94px !important; }

.profile-preview-avatar{
  position:relative !important;
  overflow:visible !important;
}
.profile-preview-avatar-base{
  position:relative !important;
  overflow:hidden !important;
  border-radius:50% !important;
}
.profile-preview-avatar-base .avatar,
.profile-preview-avatar-base .avatar-fallback{
  width:100% !important;
  height:100% !important;
}
.profile-preview-frame{
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  width:94px !important;
  height:94px !important;
  max-width:none !important;
  max-height:none !important;
  transform:translate(-50%,-50%) !important;
  object-fit:contain !important;
  pointer-events:none !important;
  z-index:4 !important;
}

.avatar-presence-dot,
.avatar-wrap .avatar-presence-dot,
.avatar-presence-stack .avatar-presence-dot{
  position:absolute !important;
  right:-8px !important;
  bottom:-8px !important;
  width:16px !important;
  height:16px !important;
  min-width:16px !important;
  min-height:16px !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:50% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  z-index:12 !important;
  transform:none !important;
  box-sizing:border-box !important;
}

@media(max-width:700px){
  .profile-main-avatar .avatar-wrap,
  .profile-main-avatar .avatar-frame-wrap{
    --avatar-size:82px !important;
    width:82px !important;
    height:82px !important;
    min-width:82px !important;
    min-height:82px !important;
    flex-basis:82px !important;
  }
  .profile-main-avatar .avatar-frame-img{ width:80px !important; height:80px !important; }
  .profile-preview-frame{ width:80px !important; height:80px !important; }
  .avatar-fallback-icon{ width:70% !important; height:70% !important; max-width:70% !important; max-height:70% !important; flex-basis:70% !important; }
}

@media(max-width:390px){
  .profile-main-avatar .avatar-wrap,
  .profile-main-avatar .avatar-frame-wrap{
    --avatar-size:78px !important;
    width:78px !important;
    height:78px !important;
    min-width:78px !important;
    min-height:78px !important;
    flex-basis:78px !important;
  }
  .profile-main-avatar .avatar-frame-img{ width:76px !important; height:76px !important; }
  .profile-preview-frame{ width:76px !important; height:76px !important; }
}

/* css/avatar-fallback-image-final.css */
/* Branded fallback avatar image */
.avatar-wrap .avatar-fallback,
.avatar-frame-wrap .avatar-fallback,
.avatar-frame-base .avatar-fallback{position:relative!important;display:block!important;inset:auto!important;width:100%!important;height:100%!important;border-radius:50%!important;overflow:hidden!important;flex:0 0 100%!important;background:#0b1022!important}
.avatar-wrap .avatar-fallback-image,
.avatar-frame-wrap .avatar-fallback-image,
.avatar-frame-base .avatar-fallback-image{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;object-position:center!important;border-radius:50%!important;overflow:hidden!important}
.avatar-fallback-image{position:relative!important;z-index:1!important;clip-path:circle(50% at 50% 50%)!important}

/* css/wiantex-pro-ui.css */
/*
 * Wiantex Professional UI Layer
 * Global, non-destructive visual system loaded after legacy styles.
 * Functional PHP/JS, Woin logic, avatars and verified badges are untouched.
 */

:root {
  color-scheme: dark;
  --wtx-radius-xl: 28px;
  --wtx-surface: color-mix(in srgb, var(--panel-0) 86%, transparent);
  --wtx-surface-raised: color-mix(in srgb, var(--panel-1) 92%, transparent);
  --wtx-surface-soft: rgba(255, 255, 255, .035);
  --wtx-line: rgba(153, 166, 196, .13);
  --wtx-line-active: rgba(132, 105, 255, .42);
  --wtx-shadow-sm: 0 8px 24px rgba(0, 0, 0, .20);
  --wtx-shadow-md: 0 18px 50px rgba(0, 0, 0, .28);
  --wtx-shadow-lg: 0 32px 90px rgba(0, 0, 0, .38);
  --wtx-glow: 0 0 0 1px rgba(132, 105, 255, .12), 0 18px 48px rgba(67, 56, 202, .12);
  --wtx-transition: 180ms cubic-bezier(.2, .75, .25, 1);
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scrollbar-color: rgba(132, 105, 255, .42) rgba(255, 255, 255, .025);
  scrollbar-width: thin;
}

body.wtx-pro-ui {
  background:
    radial-gradient(900px 620px at 14% -8%, color-mix(in srgb, var(--purple) 14%, transparent), transparent 66%),
    radial-gradient(780px 560px at 96% 8%, color-mix(in srgb, var(--blue) 10%, transparent), transparent 64%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 52%, var(--bg-1) 100%);
  background-attachment: fixed;
  color: var(--text-0);
  font-family: var(--font-body, Inter, system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 14px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.wtx-pro-ui::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  background-image:
    linear-gradient(rgba(255, 255, 255, .014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .014) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.wtx-pro-ui * {
  scrollbar-color: rgba(132, 105, 255, .36) transparent;
  scrollbar-width: thin;
}

.wtx-pro-ui *::-webkit-scrollbar { width: 8px; height: 8px; }
.wtx-pro-ui *::-webkit-scrollbar-track { background: transparent; }
.wtx-pro-ui *::-webkit-scrollbar-thumb {
  background: rgba(132, 105, 255, .34);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.wtx-pro-ui a,
.wtx-pro-ui button,
.wtx-pro-ui input,
.wtx-pro-ui textarea,
.wtx-pro-ui select { -webkit-tap-highlight-color: transparent; }

.wtx-pro-ui :where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid #a996ff !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(124, 92, 255, .14) !important;
}

.wtx-pro-ui h1,
.wtx-pro-ui h2,
.wtx-pro-ui h3,
.wtx-pro-ui h4 {
  color: var(--text-0);
  letter-spacing: -.025em;
  text-wrap: balance;
}

.wtx-pro-ui p { text-wrap: pretty; }
.wtx-pro-ui img, .wtx-pro-ui video { max-width: 100%; }

/* Main shell */
.wtx-pro-ui .app { min-height: 100vh; }

.wtx-pro-ui .main {
  min-width: 0;
  background: transparent;
}

.wtx-pro-ui .sidebar {
  background: rgba(9, 12, 20, .90);
  border-right: 1px solid var(--wtx-line);
  box-shadow: 16px 0 50px rgba(0, 0, 0, .16);
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
}

.wtx-pro-ui .sidebar-brand {
  min-height: 80px;
  margin: 0 6px 12px;
  padding: 14px 12px;
  border-radius: 18px;
  transition: background var(--wtx-transition), transform var(--wtx-transition);
}

.wtx-pro-ui .sidebar-brand:hover {
  background: rgba(255, 255, 255, .035);
  transform: translateY(-1px);
}

.wtx-pro-ui .sidebar-brand-logo {
  width: min(172px, 100%);
  height: auto;
  filter: drop-shadow(0 10px 22px rgba(92, 68, 255, .14));
}

.wtx-pro-ui .nav-group { gap: 4px; }

.wtx-pro-ui .nav-label {
  margin: 18px 12px 7px;
  color: #778196;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.wtx-pro-ui .nav-item {
  position: relative;
  min-height: 43px;
  margin: 1px 6px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #99a3b8;
  font-weight: 600;
  transition: color var(--wtx-transition), background var(--wtx-transition), border-color var(--wtx-transition), transform var(--wtx-transition);
}

.wtx-pro-ui .nav-item svg { opacity: .82; transition: opacity var(--wtx-transition), transform var(--wtx-transition); }

.wtx-pro-ui .nav-item:hover {
  color: #eef0f8;
  background: rgba(255, 255, 255, .042);
  border-color: rgba(255, 255, 255, .055);
  transform: translateX(2px);
}

.wtx-pro-ui .nav-item:hover svg { opacity: 1; transform: scale(1.04); }

.wtx-pro-ui .nav-item.active {
  color: #fff;
  background: linear-gradient(110deg, rgba(124, 92, 255, .20), rgba(60, 141, 255, .09));
  border-color: rgba(139, 112, 255, .22);
  box-shadow: inset 3px 0 0 #8b6cff, 0 8px 24px rgba(55, 44, 145, .10);
}

.wtx-pro-ui .nav-item.active svg { color: #ac9bff; opacity: 1; }
.wtx-pro-ui .nav-item .count { background: rgba(255, 255, 255, .055); color: #8e98aa; }

.wtx-pro-ui .navbar {
  min-height: 74px;
  padding: 13px clamp(14px, 2.2vw, 28px);
  background: rgba(8, 11, 18, .74);
  border-bottom: 1px solid var(--wtx-line);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .12);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.wtx-pro-ui .search-box {
  min-height: 44px;
  max-width: 560px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(153, 166, 196, .14);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  transition: background var(--wtx-transition), border-color var(--wtx-transition), box-shadow var(--wtx-transition);
}

.wtx-pro-ui .search-box:focus-within {
  background: rgba(17, 21, 34, .94);
  border-color: rgba(139, 112, 255, .50);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .11), 0 12px 34px rgba(0, 0, 0, .18);
}

.wtx-pro-ui .search-box input { color: #f5f6fb; }
.wtx-pro-ui .search-box input::placeholder { color: #737d90; }

.wtx-pro-ui .kbd {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  border-bottom-color: rgba(255, 255, 255, .16);
  border-radius: 7px;
  color: #7e8798;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
}

.wtx-pro-ui .navbar-actions { gap: 9px; }

.wtx-pro-ui .icon-btn,
.wtx-pro-ui .profile-trigger {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(153, 166, 196, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  transition: color var(--wtx-transition), background var(--wtx-transition), border-color var(--wtx-transition), transform var(--wtx-transition), box-shadow var(--wtx-transition);
}

.wtx-pro-ui .icon-btn:hover,
.wtx-pro-ui .profile-trigger:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(154, 132, 255, .28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  transform: translateY(-1px);
}

.wtx-pro-ui .profile-dropdown,
.wtx-pro-ui .ac-dropdown {
  background: rgba(14, 18, 29, .97);
  border: 1px solid rgba(153, 166, 196, .16);
  border-radius: 15px;
  box-shadow: var(--wtx-shadow-lg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.wtx-pro-ui .profile-dropdown a,
.wtx-pro-ui .ac-item { border-radius: 10px; }

.wtx-pro-ui .content-wrap {
  width: 100%;
  max-width: 1540px;
  margin-inline: auto;
  padding: clamp(18px, 2.2vw, 32px);
}

.wtx-pro-ui .content-grid { gap: clamp(16px, 2vw, 24px); }
.wtx-pro-ui .right-panel { gap: 15px; }

/* Surfaces and typography */
.wtx-pro-ui .card,
.wtx-pro-ui .widget,
.wtx-pro-ui .admin-card,
.wtx-pro-ui .lb-card,
.wtx-pro-ui .wx-card {
  background: linear-gradient(155deg, rgba(20, 25, 39, .92), rgba(13, 17, 28, .94));
  border: 1px solid var(--wtx-line);
  border-radius: var(--radius-md);
  box-shadow: var(--wtx-shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .025);
}

.wtx-pro-ui .section-head {
  gap: 16px;
  margin-bottom: 16px;
}

.wtx-pro-ui .section-head h2 {
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 800;
}

.wtx-pro-ui .section-head p { color: var(--text-2); }
.wtx-pro-ui .section-link { color: #aa9aff; font-weight: 700; }
.wtx-pro-ui .section-link:hover { color: #c2b7ff; }

.wtx-pro-ui .text-muted { color: #939caf !important; }
.wtx-pro-ui .text-dim { color: #697386 !important; }

/* Controls */
.wtx-pro-ui .btn {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 11px;
  font-weight: 700;
  letter-spacing: -.005em;
  transition: transform var(--wtx-transition), box-shadow var(--wtx-transition), background var(--wtx-transition), border-color var(--wtx-transition), filter var(--wtx-transition);
}

.wtx-pro-ui .btn:hover { transform: translateY(-1px); }
.wtx-pro-ui .btn:active { transform: translateY(0) scale(.985); }

.wtx-pro-ui .btn-primary {
  color: #fff;
  background: var(--gradient-primary);
  border-color: rgba(255, 255, 255, .10);
  box-shadow: 0 8px 24px rgba(72, 61, 202, .23), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.wtx-pro-ui .btn-primary:hover {
  filter: brightness(1.08) saturate(1.04);
  box-shadow: 0 12px 32px rgba(72, 61, 202, .32), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.wtx-pro-ui .btn-ghost {
  color: #c1c8d7;
  background: rgba(255, 255, 255, .035);
  border-color: rgba(153, 166, 196, .14);
}

.wtx-pro-ui .btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, .065);
  border-color: rgba(154, 132, 255, .30);
}

.wtx-pro-ui .btn-danger {
  color: #ff9aaa;
  background: rgba(244, 63, 94, .10);
  border-color: rgba(244, 63, 94, .24);
}

.wtx-pro-ui .btn-danger:hover { background: rgba(244, 63, 94, .16); border-color: rgba(244, 63, 94, .40); }

.wtx-pro-ui :where(.input, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select) {
  min-height: 43px;
  color: var(--text-0);
  background-color: rgba(255, 255, 255, .032);
  border-color: rgba(153, 166, 196, .14);
  border-radius: 11px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .10);
  transition: background var(--wtx-transition), border-color var(--wtx-transition), box-shadow var(--wtx-transition);
}

.wtx-pro-ui :where(.input, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select):hover {
  border-color: rgba(153, 166, 196, .23);
}

.wtx-pro-ui :where(.input, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select):focus {
  color: #fff;
  background-color: rgba(16, 21, 34, .94);
  border-color: rgba(139, 112, 255, .52);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .10);
  outline: none;
}

.wtx-pro-ui textarea { line-height: 1.58; resize: vertical; }
.wtx-pro-ui select option { background: #111622; color: #f6f7fb; }

.wtx-pro-ui input[type="checkbox"],
.wtx-pro-ui input[type="radio"] {
  accent-color: #8066ff;
  width: 16px;
  height: 16px;
}

.wtx-pro-ui .field label { color: #c5cbd8; font-weight: 700; }
.wtx-pro-ui .field-hint { color: #737d90; }

.wtx-pro-ui .badge {
  border: 1px solid rgba(255, 255, 255, .075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.wtx-pro-ui .alert {
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .13);
}

.wtx-pro-ui .pagination a,
.wtx-pro-ui .pagination span {
  min-width: 38px;
  min-height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
}

/* Homepage and forum */
.wtx-pro-ui .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(145, 124, 255, .20);
  border-radius: var(--wtx-radius-xl);
  background:
    radial-gradient(600px 260px at 12% 0%, rgba(139, 92, 246, .20), transparent 66%),
    radial-gradient(440px 280px at 92% 110%, rgba(56, 139, 255, .14), transparent 70%),
    linear-gradient(145deg, rgba(20, 25, 40, .96), rgba(12, 16, 27, .96));
  box-shadow: var(--wtx-shadow-md), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.wtx-pro-ui .hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  top: -150px;
  right: -70px;
  z-index: -1;
  border: 46px solid rgba(136, 104, 255, .07);
  border-radius: 50%;
}

.wtx-pro-ui .hero h1 {
  max-width: 760px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.wtx-pro-ui .hero p { max-width: 680px; color: #a3acbd; font-size: clamp(14px, 1.5vw, 16px); }

.wtx-pro-ui .hero-stats {
  gap: 10px;
  padding-top: 8px;
}

.wtx-pro-ui .hero-stat {
  min-width: 98px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 13px;
}

.wtx-pro-ui .hero-stat strong { color: #fff; }
.wtx-pro-ui .hero-stat span { color: #7e889b; }

.wtx-pro-ui .topic-list {
  overflow: hidden;
  border: 1px solid var(--wtx-line);
  border-radius: 18px;
  background: rgba(13, 17, 27, .58);
  box-shadow: var(--wtx-shadow-sm);
}

.wtx-pro-ui .topic-card {
  position: relative;
  min-height: 86px;
  padding: 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(153, 166, 196, .095);
  border-radius: 0;
  box-shadow: none;
  transition: background var(--wtx-transition), transform var(--wtx-transition);
}

.wtx-pro-ui .topic-card:last-child { border-bottom: 0; }

.wtx-pro-ui .topic-card:hover {
  background: linear-gradient(90deg, rgba(124, 92, 255, .085), rgba(255, 255, 255, .018));
  border-color: rgba(153, 166, 196, .095);
  box-shadow: inset 3px 0 0 rgba(139, 112, 255, .65);
  transform: none;
}

.wtx-pro-ui .topic-icon {
  background: linear-gradient(145deg, rgba(124, 92, 255, .16), rgba(56, 139, 255, .08));
  border: 1px solid rgba(139, 112, 255, .18);
  border-radius: 13px;
  color: #b2a5ff;
}

.wtx-pro-ui .topic-title { color: #eef0f7; font-weight: 700; }
.wtx-pro-ui .topic-card:hover .topic-title { color: #fff; }
.wtx-pro-ui .topic-meta { color: #7f899b; }
.wtx-pro-ui .topic-stat strong { color: #dce0e9; }

.wtx-pro-ui .widget { padding: 17px; }

.wtx-pro-ui .widget h3 {
  color: #e9ebf2;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.wtx-pro-ui .stat-row {
  min-height: 37px;
  border-color: rgba(153, 166, 196, .09);
}

.wtx-pro-ui .leader-row {
  min-height: 38px;
  margin-inline: -6px;
  padding: 6px;
  border-radius: 10px;
  transition: background var(--wtx-transition);
}

.wtx-pro-ui .leader-row:hover { background: rgba(255, 255, 255, .04); }

/* Topics and posts */
.wtx-pro-ui .post-card {
  overflow: hidden;
  border: 1px solid var(--wtx-line);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(19, 24, 37, .92), rgba(12, 16, 26, .94));
  box-shadow: var(--wtx-shadow-sm);
}

.wtx-pro-ui .post-author {
  background: rgba(255, 255, 255, .018);
  border-right: 1px solid rgba(153, 166, 196, .09);
}

.wtx-pro-ui .post-content { color: #d7dbe5; font-size: 14px; line-height: 1.75; }
.wtx-pro-ui .post-content a { color: #a99aff; text-decoration-color: rgba(169, 154, 255, .38); }

.wtx-pro-ui .post-content blockquote {
  background: rgba(124, 92, 255, .055);
  border-color: #7660e9;
  border-radius: 0 12px 12px 0;
}

.wtx-pro-ui .post-content pre,
.wtx-pro-ui .post-content code {
  background: #090c13;
  border-color: rgba(153, 166, 196, .14);
}

/* Profile and members */
.wtx-pro-ui .profile-hero {
  border-radius: 22px !important;
  background: linear-gradient(155deg, rgba(20, 25, 39, .96), rgba(12, 16, 26, .96));
  border-color: rgba(153, 166, 196, .14);
  box-shadow: var(--wtx-shadow-md);
}

.wtx-pro-ui .profile-banner {
  border-radius: 18px;
  box-shadow: inset 0 -50px 70px rgba(5, 7, 12, .34);
}

.wtx-pro-ui .profile-username { letter-spacing: -.035em; }

.wtx-pro-ui .profile-stat,
.wtx-pro-ui .profile-rating-card,
.wtx-pro-ui .profile-frame-option,
.wtx-pro-ui .member-card {
  border-color: var(--wtx-line) !important;
  background: rgba(255, 255, 255, .025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

.wtx-pro-ui .member-card,
.wtx-pro-ui .profile-frame-option {
  transition: transform var(--wtx-transition), background var(--wtx-transition), border-color var(--wtx-transition), box-shadow var(--wtx-transition);
}

.wtx-pro-ui .member-card:hover,
.wtx-pro-ui .profile-frame-option:hover {
  background: rgba(255, 255, 255, .043);
  border-color: rgba(139, 112, 255, .30) !important;
  box-shadow: var(--wtx-glow);
  transform: translateY(-2px);
}

/* Market */
.wtx-pro-ui .market-hero {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(139, 112, 255, .20);
  border-radius: 22px;
  background:
    radial-gradient(440px 180px at 90% 0%, rgba(62, 139, 255, .13), transparent 72%),
    linear-gradient(145deg, rgba(22, 27, 42, .96), rgba(13, 17, 28, .96));
  box-shadow: var(--wtx-shadow-md);
}

.wtx-pro-ui .market-balance,
.wtx-pro-ui .shop-price-pill {
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.wtx-pro-ui .market-tabs {
  padding: 5px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid var(--wtx-line);
  border-radius: 14px;
}

.wtx-pro-ui .market-tab-btn { border-radius: 10px; }

.wtx-pro-ui .market-product-card,
.wtx-pro-ui .shop-card,
.wtx-pro-ui .package-card {
  overflow: hidden;
  background: linear-gradient(155deg, rgba(20, 25, 39, .92), rgba(13, 17, 27, .96));
  border-color: var(--wtx-line);
  border-radius: 17px;
  box-shadow: var(--wtx-shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .025);
  transition: transform var(--wtx-transition), border-color var(--wtx-transition), box-shadow var(--wtx-transition);
}

.wtx-pro-ui .market-product-card:hover,
.wtx-pro-ui .shop-card:hover,
.wtx-pro-ui .package-card:hover {
  border-color: rgba(139, 112, 255, .34);
  box-shadow: var(--wtx-shadow-md), 0 0 0 1px rgba(124, 92, 255, .06);
  transform: translateY(-3px);
}

.wtx-pro-ui .market-product-image,
.wtx-pro-ui .market-product-placeholder,
.wtx-pro-ui .shop-card-media {
  background:
    radial-gradient(circle at 50% 15%, rgba(124, 92, 255, .13), transparent 60%),
    rgba(255, 255, 255, .018);
}

/* Messaging and WiaNova */
.wtx-pro-ui .messages-shell {
  overflow: hidden;
  border-radius: 20px;
  border-color: rgba(153, 166, 196, .15);
  background: rgba(11, 15, 24, .94);
  box-shadow: var(--wtx-shadow-md);
}

.wtx-pro-ui .conv-list {
  background: rgba(255, 255, 255, .012);
  border-right-color: rgba(153, 166, 196, .10);
}

.wtx-pro-ui .conv-list-item {
  margin: 3px 7px;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background var(--wtx-transition), border-color var(--wtx-transition), transform var(--wtx-transition);
}

.wtx-pro-ui .conv-list-item:hover { background: rgba(255, 255, 255, .035); transform: translateX(2px); }

.wtx-pro-ui .conv-list-item.active {
  background: linear-gradient(110deg, rgba(124, 92, 255, .14), rgba(56, 139, 255, .055));
  border-color: rgba(139, 112, 255, .17);
}

.wtx-pro-ui .conv-chat-header {
  background: rgba(15, 19, 30, .88);
  border-bottom-color: rgba(153, 166, 196, .10);
  backdrop-filter: blur(16px);
}

.wtx-pro-ui .conv-chat-body {
  background:
    radial-gradient(480px 300px at 85% 0%, rgba(77, 62, 190, .055), transparent 70%),
    rgba(7, 10, 17, .52);
}

.wtx-pro-ui .msg-bubble {
  border: 1px solid rgba(153, 166, 196, .10);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .14);
}

.wtx-pro-ui .msg-row.mine .msg-bubble {
  background: linear-gradient(145deg, rgba(111, 81, 234, .84), rgba(62, 102, 221, .78));
  border-color: rgba(181, 170, 255, .18);
}

.wtx-pro-ui .conv-chat-input,
.wtx-pro-ui .msg-composer {
  background: rgba(13, 17, 27, .94);
  border-top-color: rgba(153, 166, 196, .10);
}

.wtx-pro-ui .messages-shell .conv-chat[data-wianova-thread="1"] .conv-chat-header,
.wtx-pro-ui .messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"] {
  background: rgba(12, 16, 27, .82);
  backdrop-filter: blur(18px);
}

.wtx-pro-ui .messages-shell .wianova-code-block,
.wtx-pro-ui .wianova-code-modal-card,
.wtx-pro-ui .wianova-render-browser { border-color: rgba(153, 166, 196, .14); }

/* Pulses */
.wtx-pro-ui .pulses-shell,
.wtx-pro-ui .studio-shell,
.wtx-pro-ui .pulse-upload-shell { max-width: 1180px; margin-inline: auto; }

.wtx-pro-ui .pulses-hero,
.wtx-pro-ui .studio-header,
.wtx-pro-ui .pulse-upload-hero {
  border: 1px solid rgba(139, 112, 255, .18);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(21, 26, 41, .96), rgba(12, 16, 27, .96));
  box-shadow: var(--wtx-shadow-md);
}

.wtx-pro-ui .pulse-card,
.wtx-pro-ui .pc-card,
.wtx-pro-ui .pulse-comment,
.wtx-pro-ui .pc-manage {
  overflow: hidden;
  border-color: var(--wtx-line);
  border-radius: 17px;
  background: linear-gradient(155deg, rgba(20, 25, 39, .92), rgba(12, 16, 26, .95));
  box-shadow: var(--wtx-shadow-sm);
}

.wtx-pro-ui .pulse-modal { backdrop-filter: blur(9px); }
.wtx-pro-ui .pulse-modal__panel {
  border-color: rgba(153, 166, 196, .16);
  border-radius: 20px;
  background: rgba(14, 18, 29, .98);
  box-shadow: var(--wtx-shadow-lg);
}

/* Admin */
.wtx-pro-ui.admin-page .content-wrap { max-width: 1640px; }

.wtx-pro-ui .admin-nav-grid,
.wtx-pro-ui .admin-kpi-grid,
.wtx-pro-ui .admin-recent-grid { gap: 14px !important; }

.wtx-pro-ui .admin-card,
.wtx-pro-ui .admin-nav-link,
.wtx-pro-ui .admin-kpi-card,
.wtx-pro-ui .admin-recent-card {
  border-color: var(--wtx-line);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(20, 25, 39, .92), rgba(13, 17, 27, .96));
  box-shadow: var(--wtx-shadow-sm);
  transition: border-color var(--wtx-transition), transform var(--wtx-transition), box-shadow var(--wtx-transition);
}

.wtx-pro-ui .admin-nav-link:hover,
.wtx-pro-ui .admin-kpi-card:hover {
  border-color: rgba(139, 112, 255, .30);
  box-shadow: var(--wtx-glow);
  transform: translateY(-2px);
}

.wtx-pro-ui :where(.admin-table, table) { border-spacing: 0; }

.wtx-pro-ui .admin-table {
  overflow: hidden;
  border: 1px solid rgba(153, 166, 196, .11);
  border-radius: 13px;
}

.wtx-pro-ui .admin-table th {
  color: #8e98ab;
  background: rgba(255, 255, 255, .028);
  border-bottom-color: rgba(153, 166, 196, .12);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.wtx-pro-ui .admin-table td { border-bottom-color: rgba(153, 166, 196, .08); }
.wtx-pro-ui .admin-table tbody tr { transition: background var(--wtx-transition); }
.wtx-pro-ui .admin-table tbody tr:hover { background: rgba(124, 92, 255, .045); }

.wtx-pro-ui .admin-log-table-wrap,
.wtx-pro-ui .table-wrap {
  overflow: auto;
  border: 1px solid var(--wtx-line);
  border-radius: 15px;
}

/* Auth, errors and legal */
.wtx-pro-ui .auth-shell,
.wtx-pro-ui .error-shell {
  position: relative;
  isolation: isolate;
}

.wtx-pro-ui .auth-shell::before,
.wtx-pro-ui .error-shell::before {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  left: 50%;
  top: 45%;
  z-index: -1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 76, 255, .15), transparent 68%);
  filter: blur(20px);
}

.wtx-pro-ui .auth-card {
  max-width: 430px;
  padding: clamp(25px, 4vw, 38px);
  border: 1px solid rgba(153, 166, 196, .16);
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(20, 25, 39, .96), rgba(11, 15, 25, .98));
  box-shadow: var(--wtx-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.wtx-pro-ui .auth-card h1 { font-size: 23px; }
.wtx-pro-ui .auth-site-logo { filter: drop-shadow(0 12px 30px rgba(92, 68, 255, .17)); }

.wtx-pro-ui .error-shell .code {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wtx-pro-ui .wx-shell { max-width: 1180px; margin-inline: auto; }

.wtx-pro-ui .wx-hero {
  overflow: hidden;
  border: 1px solid rgba(139, 112, 255, .18);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(21, 26, 41, .96), rgba(12, 16, 27, .96));
  box-shadow: var(--wtx-shadow-md);
}

.wtx-pro-ui .wx-card { padding: clamp(18px, 3vw, 28px); }

/* Overlays, language and footer */
.wtx-pro-ui .wt-modal-overlay,
.wtx-pro-ui .group-create-modal,
.wtx-pro-ui .wianova-code-modal-backdrop {
  background: rgba(3, 5, 10, .76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.wtx-pro-ui .wt-modal,
.wtx-pro-ui .group-create-card {
  border-color: rgba(153, 166, 196, .16);
  border-radius: 20px;
  background: rgba(14, 18, 29, .98);
  box-shadow: var(--wtx-shadow-lg);
}

.wtx-pro-ui .wtx-language-switcher {
  background: rgba(12, 16, 26, .88);
  border-color: rgba(153, 166, 196, .16);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.wtx-pro-ui .footer {
  color: #778195;
  border-top-color: rgba(153, 166, 196, .09);
}

.wtx-pro-ui .footer a:hover { color: #b3a6ff; }

.wtx-pro-ui .bottom-nav {
  background: rgba(9, 12, 20, .90);
  border-top-color: rgba(153, 166, 196, .14);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .24);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
}

.wtx-pro-ui .bottom-nav > a { border-radius: 12px; }
.wtx-pro-ui .bottom-nav > a.active { color: #b5a7ff; }
.wtx-pro-ui .bottom-nav > a.fab { box-shadow: 0 12px 30px rgba(77, 62, 205, .34); }

/* Theme picker in Settings */
.wtx-pro-ui .wtx-theme-field { margin-top: 18px; }

.wtx-pro-ui .wtx-theme-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.wtx-pro-ui .wtx-theme-choice {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  min-height: 84px;
  padding: 10px;
  color: var(--text-1);
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--wtx-line);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  transition: transform var(--wtx-transition), background var(--wtx-transition), border-color var(--wtx-transition), box-shadow var(--wtx-transition);
}

.wtx-pro-ui .wtx-theme-choice:hover {
  background: rgba(255, 255, 255, .045);
  border-color: rgba(139, 112, 255, .28);
  transform: translateY(-1px);
}

.wtx-pro-ui .wtx-theme-choice:has(input:checked),
.wtx-pro-ui .wtx-theme-choice.is-previewing {
  background: rgba(124, 92, 255, .075);
  border-color: rgba(139, 112, 255, .55);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .10), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.wtx-pro-ui .wtx-theme-choice > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.wtx-pro-ui .wtx-theme-swatch {
  display: grid;
  grid-template-rows: 16px 1fr;
  width: 66px;
  height: 58px;
  overflow: hidden;
  background: var(--choice-bg);
  border: 1px solid color-mix(in srgb, var(--choice-text) 15%, transparent);
  border-radius: 10px;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .15);
}

.wtx-pro-ui .wtx-theme-swatch-bar {
  display: block;
  background: linear-gradient(90deg, var(--choice-accent), var(--choice-accent-2));
}

.wtx-pro-ui .wtx-theme-swatch-layout {
  display: grid;
  grid-template-columns: 14px 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  padding: 6px;
}

.wtx-pro-ui .wtx-theme-swatch-layout i {
  grid-row: 1 / 3;
  display: block;
  background: color-mix(in srgb, var(--choice-text) 12%, transparent);
  border-radius: 3px;
}

.wtx-pro-ui .wtx-theme-swatch-layout b {
  display: block;
  background: var(--choice-panel);
  border: 1px solid color-mix(in srgb, var(--choice-text) 10%, transparent);
  border-radius: 3px;
}

.wtx-pro-ui .wtx-theme-choice-copy { min-width: 0; }
.wtx-pro-ui .wtx-theme-choice-copy strong { display: block; overflow: hidden; color: var(--text-0); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.wtx-pro-ui .wtx-theme-choice-copy small { display: block; margin-top: 3px; color: var(--text-3); font-size: 10.5px; }

.wtx-pro-ui .wtx-theme-choice-check {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: transparent;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--wtx-line);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.wtx-pro-ui .wtx-theme-choice:has(input:checked) .wtx-theme-choice-check,
.wtx-pro-ui .wtx-theme-choice.is-previewing .wtx-theme-choice-check {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
}

/* Complete light theme */
body.wtx-pro-ui[data-wtx-theme="light"] {
  color-scheme: light;
  color: var(--text-0);
  background:
    radial-gradient(900px 620px at 14% -8%, rgba(109, 74, 255, .10), transparent 66%),
    radial-gradient(780px 560px at 96% 8%, rgba(40, 120, 232, .08), transparent 64%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 58%, #eef2f8 100%);
}

body.wtx-pro-ui[data-wtx-theme="light"]::before {
  opacity: .35;
  background-image:
    linear-gradient(rgba(32, 42, 62, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 42, 62, .035) 1px, transparent 1px);
}

body.wtx-pro-ui[data-wtx-theme="light"] ::selection { color: #171a24; background: rgba(109, 74, 255, .20); }

body.wtx-pro-ui[data-wtx-theme="light"] * {
  scrollbar-color: rgba(100, 83, 220, .34) rgba(27, 36, 54, .04);
}

body.wtx-pro-ui[data-wtx-theme="light"] *::-webkit-scrollbar-thumb { background-color: rgba(100, 83, 220, .34); }

body.wtx-pro-ui[data-wtx-theme="light"] h1,
body.wtx-pro-ui[data-wtx-theme="light"] h2,
body.wtx-pro-ui[data-wtx-theme="light"] h3,
body.wtx-pro-ui[data-wtx-theme="light"] h4 { color: #151824; }

body.wtx-pro-ui[data-wtx-theme="light"] .text-muted { color: #667085 !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .text-dim { color: #8a94a6 !important; }

body.wtx-pro-ui[data-wtx-theme="light"] .sidebar {
  background: rgba(255, 255, 255, .88) !important;
  border-right-color: rgba(52, 64, 84, .12) !important;
  box-shadow: 14px 0 42px rgba(35, 46, 70, .07);
}

body.wtx-pro-ui[data-wtx-theme="light"] .sidebar-brand:hover,
body.wtx-pro-ui[data-wtx-theme="light"] .nav-item:hover { background: rgba(56, 68, 92, .055); }

body.wtx-pro-ui[data-wtx-theme="light"] .sidebar-brand {
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(241, 244, 251, .98));
  border: 1px solid rgba(52, 64, 84, .11);
  box-shadow: 0 10px 26px rgba(35, 46, 70, .07);
}

body.wtx-pro-ui[data-wtx-theme="light"] .sidebar-brand:hover {
  background: linear-gradient(145deg, #fff, #f2f0ff);
  border-color: rgba(109, 74, 255, .24);
}

body.wtx-pro-ui[data-wtx-theme="light"] .sidebar-brand-logo {
  filter: brightness(.46) contrast(1.45) saturate(1.55) drop-shadow(0 8px 16px rgba(68, 45, 150, .15));
}

body.wtx-pro-ui[data-wtx-theme="light"] .nav-label { color: #8993a5; }

body.wtx-pro-ui[data-wtx-theme="light"] .nav-item {
  color: #5f697b;
  border-color: transparent;
}

body.wtx-pro-ui[data-wtx-theme="light"] .nav-item:hover { color: #202532; border-color: rgba(52, 64, 84, .08); }

body.wtx-pro-ui[data-wtx-theme="light"] .nav-item.active {
  color: #37277d;
  background: linear-gradient(110deg, rgba(109, 74, 255, .13), rgba(40, 120, 232, .05));
  border-color: rgba(109, 74, 255, .16);
  box-shadow: inset 3px 0 0 #7354e9, 0 8px 22px rgba(91, 72, 180, .06);
}

body.wtx-pro-ui[data-wtx-theme="light"] .nav-item.active svg { color: #6848d7; }
body.wtx-pro-ui[data-wtx-theme="light"] .nav-item .count { color: #6c7586; background: rgba(38, 48, 68, .055); }

body.wtx-pro-ui[data-wtx-theme="light"] .navbar {
  background: rgba(255, 255, 255, .78) !important;
  border-bottom-color: rgba(52, 64, 84, .11) !important;
  box-shadow: 0 10px 30px rgba(35, 46, 70, .06);
}

body.wtx-pro-ui[data-wtx-theme="light"] .search-box,
body.wtx-pro-ui[data-wtx-theme="light"] .icon-btn,
body.wtx-pro-ui[data-wtx-theme="light"] .profile-trigger {
  color: #5b6577;
  background: rgba(31, 41, 61, .035) !important;
  border-color: rgba(52, 64, 84, .13) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

body.wtx-pro-ui[data-wtx-theme="light"] .search-box:focus-within {
  background: #fff !important;
  border-color: rgba(109, 74, 255, .42) !important;
  box-shadow: 0 0 0 4px rgba(109, 74, 255, .09), 0 12px 30px rgba(42, 53, 77, .08);
}

body.wtx-pro-ui[data-wtx-theme="light"] .search-box input { color: #171b25; background: transparent; }
body.wtx-pro-ui[data-wtx-theme="light"] .search-box input::placeholder { color: #8b95a6; }
body.wtx-pro-ui[data-wtx-theme="light"] .kbd { color: #7e8797; background: rgba(31, 41, 61, .045); border-color: rgba(52, 64, 84, .10); }

body.wtx-pro-ui[data-wtx-theme="light"] .icon-btn:hover,
body.wtx-pro-ui[data-wtx-theme="light"] .profile-trigger:hover {
  color: #242936;
  background: #fff !important;
  border-color: rgba(109, 74, 255, .25) !important;
  box-shadow: 0 8px 22px rgba(35, 46, 70, .09);
}

body.wtx-pro-ui[data-wtx-theme="light"] .profile-dropdown,
body.wtx-pro-ui[data-wtx-theme="light"] .ac-dropdown {
  color: #2c3240;
  background: rgba(255, 255, 255, .98);
  border-color: rgba(52, 64, 84, .13);
  box-shadow: 0 28px 70px rgba(35, 46, 70, .16);
}

body.wtx-pro-ui[data-wtx-theme="light"] .profile-dropdown a:hover,
body.wtx-pro-ui[data-wtx-theme="light"] .ac-item:hover,
body.wtx-pro-ui[data-wtx-theme="light"] .ac-item.active { background: rgba(109, 74, 255, .075); }

body.wtx-pro-ui[data-wtx-theme="light"] .card,
body.wtx-pro-ui[data-wtx-theme="light"] .widget,
body.wtx-pro-ui[data-wtx-theme="light"] .admin-card,
body.wtx-pro-ui[data-wtx-theme="light"] .lb-card,
body.wtx-pro-ui[data-wtx-theme="light"] .wx-card {
  color: #303746;
  background: linear-gradient(155deg, rgba(255, 255, 255, .98), rgba(247, 249, 252, .98)) !important;
  border-color: rgba(52, 64, 84, .11) !important;
  box-shadow: 0 10px 30px rgba(35, 46, 70, .07), inset 0 1px 0 #fff;
}

body.wtx-pro-ui[data-wtx-theme="light"] .card:hover { border-color: rgba(109, 74, 255, .22) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .section-head p { color: #667085; }
body.wtx-pro-ui[data-wtx-theme="light"] .section-link { color: #6547cf; }

body.wtx-pro-ui[data-wtx-theme="light"] .btn-ghost,
body.wtx-pro-ui[data-wtx-theme="light"] .btn-secondary {
  color: #4a5364;
  background: rgba(31, 41, 61, .035) !important;
  border-color: rgba(52, 64, 84, .13) !important;
}

body.wtx-pro-ui[data-wtx-theme="light"] .btn-ghost:hover,
body.wtx-pro-ui[data-wtx-theme="light"] .btn-secondary:hover {
  color: #242936;
  background: #fff !important;
  border-color: rgba(109, 74, 255, .26) !important;
}

body.wtx-pro-ui[data-wtx-theme="light"] :where(.input, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select) {
  color: #202532 !important;
  background-color: rgba(255, 255, 255, .86) !important;
  border-color: rgba(52, 64, 84, .14) !important;
  box-shadow: inset 0 1px 2px rgba(31, 41, 61, .035);
}

body.wtx-pro-ui[data-wtx-theme="light"] :where(.input, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select):focus {
  background-color: #fff !important;
  border-color: rgba(109, 74, 255, .48) !important;
  box-shadow: 0 0 0 4px rgba(109, 74, 255, .09) !important;
}

body.wtx-pro-ui[data-wtx-theme="light"] :where(input, textarea)::placeholder { color: #98a1b1; }
body.wtx-pro-ui[data-wtx-theme="light"] select option { color: #1d2230; background: #fff; }
body.wtx-pro-ui[data-wtx-theme="light"] .field label { color: #424a59 !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .field-hint { color: #7a8495; }

body.wtx-pro-ui[data-wtx-theme="light"] .alert-success { color: #177a59; background: #edf9f4; border-color: #b8e6d5; }
body.wtx-pro-ui[data-wtx-theme="light"] .alert-error { color: #b42343; background: #fff0f3; border-color: #f3c1cb; }
body.wtx-pro-ui[data-wtx-theme="light"] .alert-warning { color: #895b06; background: #fff8e6; border-color: #efd99d; }

body.wtx-pro-ui[data-wtx-theme="light"] .pagination a,
body.wtx-pro-ui[data-wtx-theme="light"] .pagination span { color: #535d6f; background: #fff; border-color: rgba(52, 64, 84, .12); }
body.wtx-pro-ui[data-wtx-theme="light"] .pagination .active { color: #fff; background: var(--gradient-primary); }

body.wtx-pro-ui[data-wtx-theme="light"] .hero {
  background:
    radial-gradient(600px 260px at 12% 0%, rgba(109, 74, 255, .12), transparent 66%),
    radial-gradient(440px 280px at 92% 110%, rgba(40, 120, 232, .09), transparent 70%),
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(246, 248, 252, .98)) !important;
  border-color: rgba(109, 74, 255, .17) !important;
  box-shadow: 0 18px 48px rgba(35, 46, 70, .08), inset 0 1px 0 #fff;
}

body.wtx-pro-ui[data-wtx-theme="light"] .hero h1 { color: #171b25; }
body.wtx-pro-ui[data-wtx-theme="light"] .hero p { color: #626d7f; }
body.wtx-pro-ui[data-wtx-theme="light"] .hero-stat { background: rgba(255, 255, 255, .64); border-color: rgba(52, 64, 84, .09); }
body.wtx-pro-ui[data-wtx-theme="light"] .hero-stat strong { color: #1b202c; }
body.wtx-pro-ui[data-wtx-theme="light"] .hero-stat span { color: #6f798b; }

body.wtx-pro-ui[data-wtx-theme="light"] .topic-list {
  background: rgba(255, 255, 255, .70);
  border-color: rgba(52, 64, 84, .11);
  box-shadow: 0 10px 30px rgba(35, 46, 70, .065);
}

body.wtx-pro-ui[data-wtx-theme="light"] .topic-card {
  background: transparent !important;
  border-bottom-color: rgba(52, 64, 84, .085) !important;
}

body.wtx-pro-ui[data-wtx-theme="light"] .topic-card:hover {
  background: linear-gradient(90deg, rgba(109, 74, 255, .065), rgba(255, 255, 255, .36)) !important;
  box-shadow: inset 3px 0 0 rgba(109, 74, 255, .55);
}

body.wtx-pro-ui[data-wtx-theme="light"] .topic-title,
body.wtx-pro-ui[data-wtx-theme="light"] .topic-card:hover .topic-title { color: #222734; }
body.wtx-pro-ui[data-wtx-theme="light"] .topic-meta { color: #707a8c; }
body.wtx-pro-ui[data-wtx-theme="light"] .topic-stat strong { color: #495264; }
body.wtx-pro-ui[data-wtx-theme="light"] .topic-icon { color: #6749d5; background: rgba(109, 74, 255, .08); border-color: rgba(109, 74, 255, .14); }

body.wtx-pro-ui[data-wtx-theme="light"] .stat-row { border-color: rgba(52, 64, 84, .08); }
body.wtx-pro-ui[data-wtx-theme="light"] .leader-row:hover { background: rgba(31, 41, 61, .045); }

body.wtx-pro-ui[data-wtx-theme="light"] .post-card {
  color: #303746;
  background: linear-gradient(155deg, #fff, #f7f9fc) !important;
  border-color: rgba(52, 64, 84, .11);
  box-shadow: 0 10px 30px rgba(35, 46, 70, .07);
}

body.wtx-pro-ui[data-wtx-theme="light"] .post-author { background: rgba(31, 41, 61, .025); border-color: rgba(52, 64, 84, .08); }
body.wtx-pro-ui[data-wtx-theme="light"] .post-content { color: #343c4b; }
body.wtx-pro-ui[data-wtx-theme="light"] .post-content a { color: #6244cb; }
body.wtx-pro-ui[data-wtx-theme="light"] .post-content blockquote { color: #4c5566; background: rgba(109, 74, 255, .055); }
body.wtx-pro-ui[data-wtx-theme="light"] .post-content :not(pre) > code { color: #4b32ad; background: #f0edff; }

body.wtx-pro-ui[data-wtx-theme="light"] .profile-hero {
  color: #303746;
  background: linear-gradient(155deg, #fff, #f7f9fc) !important;
  border-color: rgba(52, 64, 84, .11) !important;
  box-shadow: 0 18px 48px rgba(35, 46, 70, .09);
}

body.wtx-pro-ui[data-wtx-theme="light"] .profile-main-avatar .avatar-frame-wrap { border-color: #fff !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .profile-stat,
body.wtx-pro-ui[data-wtx-theme="light"] .profile-rating-card,
body.wtx-pro-ui[data-wtx-theme="light"] .profile-frame-option,
body.wtx-pro-ui[data-wtx-theme="light"] .member-card { color: #303746; background: rgba(31, 41, 61, .022); border-color: rgba(52, 64, 84, .10) !important; }

body.wtx-pro-ui[data-wtx-theme="light"] .market-hero,
body.wtx-pro-ui[data-wtx-theme="light"] .pulses-hero,
body.wtx-pro-ui[data-wtx-theme="light"] .studio-header,
body.wtx-pro-ui[data-wtx-theme="light"] .pulse-upload-hero,
body.wtx-pro-ui[data-wtx-theme="light"] .wx-hero {
  color: #303746;
  background:
    radial-gradient(440px 180px at 90% 0%, rgba(40, 120, 232, .085), transparent 72%),
    linear-gradient(145deg, #fff, #f7f9fc) !important;
  border-color: rgba(109, 74, 255, .15) !important;
  box-shadow: 0 18px 48px rgba(35, 46, 70, .08);
}

body.wtx-pro-ui[data-wtx-theme="light"] .market-balance,
body.wtx-pro-ui[data-wtx-theme="light"] .shop-price-pill,
body.wtx-pro-ui[data-wtx-theme="light"] .market-tabs { color: #3e4655; background: rgba(31, 41, 61, .035); border-color: rgba(52, 64, 84, .10); }

body.wtx-pro-ui[data-wtx-theme="light"] .market-product-card,
body.wtx-pro-ui[data-wtx-theme="light"] .shop-card,
body.wtx-pro-ui[data-wtx-theme="light"] .package-card,
body.wtx-pro-ui[data-wtx-theme="light"] .pulse-card,
body.wtx-pro-ui[data-wtx-theme="light"] .pc-card,
body.wtx-pro-ui[data-wtx-theme="light"] .pulse-comment,
body.wtx-pro-ui[data-wtx-theme="light"] .pc-manage {
  color: #303746;
  background: linear-gradient(155deg, #fff, #f7f9fc) !important;
  border-color: rgba(52, 64, 84, .11) !important;
  box-shadow: 0 10px 30px rgba(35, 46, 70, .07);
}

body.wtx-pro-ui[data-wtx-theme="light"] .market-product-image,
body.wtx-pro-ui[data-wtx-theme="light"] .market-product-placeholder,
body.wtx-pro-ui[data-wtx-theme="light"] .shop-card-media { background: radial-gradient(circle at 50% 15%, rgba(109, 74, 255, .08), transparent 60%), #f5f7fb; }

body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell {
  color: #303746;
  background: rgba(255, 255, 255, .95) !important;
  border-color: rgba(52, 64, 84, .12) !important;
  box-shadow: 0 18px 48px rgba(35, 46, 70, .09);
}

body.wtx-pro-ui[data-wtx-theme="light"] .conv-list { background: rgba(245, 247, 251, .82) !important; border-right-color: rgba(52, 64, 84, .09) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-list-item { color: #465061; }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-list-item:hover { background: rgba(31, 41, 61, .045); }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-list-item.active { color: #2f245f; background: linear-gradient(110deg, rgba(109, 74, 255, .10), rgba(40, 120, 232, .035)); border-color: rgba(109, 74, 255, .14); }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-chat { background: #f8f9fc !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-chat-header { background: rgba(255, 255, 255, .88) !important; border-bottom-color: rgba(52, 64, 84, .09) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-chat-body { background: radial-gradient(480px 300px at 85% 0%, rgba(109, 74, 255, .04), transparent 70%), #f6f8fb !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .msg-row:not(.mine) .msg-bubble { color: #303746; background: #fff !important; border-color: rgba(52, 64, 84, .10); }
body.wtx-pro-ui[data-wtx-theme="light"] .msg-row.mine .msg-bubble { color: #fff; }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-chat-input,
body.wtx-pro-ui[data-wtx-theme="light"] .msg-composer { background: rgba(255, 255, 255, .94) !important; border-top-color: rgba(52, 64, 84, .09) !important; }

body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell .conv-chat[data-wianova-thread="1"] { background: #f7f9fd !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell .conv-chat[data-wianova-thread="1"] .conv-chat-header,
body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell .conv-chat[data-wianova-thread="1"] form[data-wianova="1"] { background: rgba(255, 255, 255, .90) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell .conv-chat[data-wianova-thread="1"] .msg-row:not(.mine) .msg-bubble { color: #2f3644; background: rgba(255, 255, 255, .94) !important; border-color: rgba(71, 85, 105, .13) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell .wianova-subtitle { color: #748094; }
body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell .wianova-image-toggle,
body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell .wianova-video-toggle { color: #4e596b !important; background: rgba(31, 41, 61, .045) !important; border-color: rgba(52, 64, 84, .11) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell .wianova-image-toggle.is-active,
body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell .wianova-video-toggle.is-active { color: #fff !important; background: var(--gradient-primary) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell .wianova-usage-pill { color: #51427d; background: rgba(109, 74, 255, .075); border-color: rgba(109, 74, 255, .16); }

body.wtx-pro-ui[data-wtx-theme="light"] .pulse-modal { background: rgba(30, 37, 51, .30); }
body.wtx-pro-ui[data-wtx-theme="light"] .pulse-modal__panel,
body.wtx-pro-ui[data-wtx-theme="light"] .wt-modal,
body.wtx-pro-ui[data-wtx-theme="light"] .group-create-card,
body.wtx-pro-ui[data-wtx-theme="light"] .wianova-code-modal-card {
  color: #303746;
  background: rgba(255, 255, 255, .98) !important;
  border-color: rgba(52, 64, 84, .13) !important;
  box-shadow: 0 28px 70px rgba(35, 46, 70, .18);
}

body.wtx-pro-ui[data-wtx-theme="light"] .pulse-modal__head,
body.wtx-pro-ui[data-wtx-theme="light"] .wianova-code-modal-head,
body.wtx-pro-ui[data-wtx-theme="light"] .wianova-code-modal-actions { border-color: rgba(52, 64, 84, .09); }

body.wtx-pro-ui[data-wtx-theme="light"] .admin-nav-link,
body.wtx-pro-ui[data-wtx-theme="light"] .admin-kpi,
body.wtx-pro-ui[data-wtx-theme="light"] .admin-kpi-card,
body.wtx-pro-ui[data-wtx-theme="light"] .admin-recent-card,
body.wtx-pro-ui[data-wtx-theme="light"] .role-card,
body.wtx-pro-ui[data-wtx-theme="light"] .permission-card,
body.wtx-pro-ui[data-wtx-theme="light"] .empty-state {
  color: #4c5668 !important;
  background: rgba(255, 255, 255, .82) !important;
  border-color: rgba(52, 64, 84, .11) !important;
}

body.wtx-pro-ui[data-wtx-theme="light"] .admin-nav-link.active { color: #fff !important; background: var(--gradient-primary) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .admin-table-wrap,
body.wtx-pro-ui[data-wtx-theme="light"] .admin-log-table-wrap,
body.wtx-pro-ui[data-wtx-theme="light"] .table-wrap { background: #fff !important; border-color: rgba(52, 64, 84, .11) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .admin-table { color: #343c4b; background: #fff; }
body.wtx-pro-ui[data-wtx-theme="light"] .admin-table th { color: #697386; background: #f4f6fa !important; border-bottom-color: rgba(52, 64, 84, .10); }
body.wtx-pro-ui[data-wtx-theme="light"] .admin-table td { border-bottom-color: rgba(52, 64, 84, .075); }
body.wtx-pro-ui[data-wtx-theme="light"] .admin-table tbody tr:hover,
body.wtx-pro-ui[data-wtx-theme="light"] .admin-table tbody tr:hover td { background: rgba(109, 74, 255, .04) !important; }

body.wtx-pro-ui[data-wtx-theme="light"] .auth-card {
  color: #303746;
  background: linear-gradient(155deg, rgba(255, 255, 255, .99), rgba(247, 249, 252, .99)) !important;
  border-color: rgba(52, 64, 84, .12) !important;
  box-shadow: 0 30px 80px rgba(35, 46, 70, .14), inset 0 1px 0 #fff;
}

body.wtx-pro-ui[data-wtx-theme="light"] .auth-shell::before,
body.wtx-pro-ui[data-wtx-theme="light"] .error-shell::before { background: radial-gradient(circle, rgba(109, 74, 255, .11), transparent 68%); }

body.wtx-pro-ui[data-wtx-theme="light"] .wtx-language-switcher {
  color: #4c5668;
  background: rgba(255, 255, 255, .90);
  border-color: rgba(52, 64, 84, .12);
  box-shadow: 0 10px 28px rgba(35, 46, 70, .10);
}

body.wtx-pro-ui[data-wtx-theme="light"] .wtx-language-switcher select { color: #3e4655 !important; background: transparent !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .footer { color: #707a8c; border-top-color: rgba(52, 64, 84, .09); }
body.wtx-pro-ui[data-wtx-theme="light"] .footer a:hover { color: #6041ca; }

body.wtx-pro-ui[data-wtx-theme="light"] .bottom-nav {
  color: #687285;
  background: rgba(255, 255, 255, .90) !important;
  border-top-color: rgba(52, 64, 84, .12) !important;
  box-shadow: 0 -14px 36px rgba(35, 46, 70, .10);
}

body.wtx-pro-ui[data-wtx-theme="light"] .bottom-nav > a.active { color: #6547cf; }

body.wtx-pro-ui[data-wtx-theme="light"] .wtx-theme-choice {
  color: #4e5869;
  background: rgba(31, 41, 61, .025);
  border-color: rgba(52, 64, 84, .11);
  box-shadow: inset 0 1px 0 #fff;
}

body.wtx-pro-ui[data-wtx-theme="light"] .wtx-theme-choice:hover { background: #fff; border-color: rgba(109, 74, 255, .24); }
body.wtx-pro-ui[data-wtx-theme="light"] .wtx-theme-choice:has(input:checked),
body.wtx-pro-ui[data-wtx-theme="light"] .wtx-theme-choice.is-previewing { background: rgba(109, 74, 255, .055); border-color: rgba(109, 74, 255, .43); }
body.wtx-pro-ui[data-wtx-theme="light"] .wtx-theme-choice-copy strong { color: #242936; }
body.wtx-pro-ui[data-wtx-theme="light"] .wtx-theme-choice-copy small { color: #788294; }

[dir="rtl"] body.wtx-pro-ui[data-wtx-theme="light"] .nav-item.active { box-shadow: inset -3px 0 0 #7354e9, 0 8px 22px rgba(91, 72, 180, .06); }

/* RTL */
[dir="rtl"] .wtx-pro-ui .nav-item:hover { transform: translateX(-2px); }
[dir="rtl"] .wtx-pro-ui .nav-item.active { box-shadow: inset -3px 0 0 #8b6cff, 0 8px 24px rgba(55, 44, 145, .10); }
[dir="rtl"] .wtx-pro-ui .post-author { border-right: 0; border-left: 1px solid rgba(153, 166, 196, .09); }

/* Tablet */
@media (max-width: 1180px) {
  .wtx-pro-ui .content-wrap { padding: 22px; }
  .wtx-pro-ui .right-panel { gap: 12px; }
  .wtx-pro-ui .widget { padding: 15px; }
}

@media (max-width: 980px) {
  .wtx-pro-ui .sidebar { box-shadow: 22px 0 70px rgba(0, 0, 0, .42); }
  .wtx-pro-ui .content-wrap { padding: 18px; }
  .wtx-pro-ui .navbar { min-height: 66px; padding: 10px 16px; }
  .wtx-pro-ui .hero { border-radius: 22px; }
  .wtx-pro-ui .admin-recent-grid { grid-template-columns: 1fr !important; }
}

/* Mobile */
@media (max-width: 700px) {
  body.wtx-pro-ui { font-size: 13.5px; background-attachment: scroll; }
  body.wtx-pro-ui::before { background-size: 48px 48px; opacity: .17; }

  .wtx-pro-ui .navbar {
    min-height: 60px;
    padding: 8px 11px;
    gap: 8px;
  }

  .wtx-pro-ui .navbar-actions { gap: 6px; }
  .wtx-pro-ui .navbar-actions .btn { min-height: 36px; padding: 7px 11px; }
  .wtx-pro-ui .navbar-woin { max-width: 104px; overflow: hidden; text-overflow: ellipsis; }
  .wtx-pro-ui .search-box { min-height: 40px; border-radius: 12px; }

  .wtx-pro-ui .content-wrap {
    padding: 13px 11px calc(88px + env(safe-area-inset-bottom));
  }

  .wtx-pro-ui .content-grid { gap: 13px; }
  .wtx-pro-ui .card,
  .wtx-pro-ui .widget,
  .wtx-pro-ui .post-card,
  .wtx-pro-ui .messages-shell { border-radius: 14px; }

  .wtx-pro-ui .hero {
    padding: 22px 17px;
    border-radius: 18px;
  }

  .wtx-pro-ui .hero h1 { font-size: clamp(25px, 9vw, 34px); }
  .wtx-pro-ui .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wtx-pro-ui .hero-stat { min-width: 0; }

  .wtx-pro-ui .section-head { align-items: flex-start; gap: 10px; }
  .wtx-pro-ui .section-head h2 { font-size: 19px; }

  .wtx-pro-ui .topic-list { border-radius: 14px; }
  .wtx-pro-ui .topic-card { min-height: 76px; padding: 13px 11px; }
  .wtx-pro-ui .topic-icon { border-radius: 11px; }

  .wtx-pro-ui .post-row { display: block; }
  .wtx-pro-ui .post-author {
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(153, 166, 196, .09);
    background: rgba(255, 255, 255, .018);
  }

  .wtx-pro-ui .market-hero,
  .wtx-pro-ui .pulses-hero,
  .wtx-pro-ui .studio-header,
  .wtx-pro-ui .pulse-upload-hero,
  .wtx-pro-ui .wx-hero { border-radius: 17px; }

  .wtx-pro-ui .market-tabs { border-radius: 12px; }
  .wtx-pro-ui .market-product-card,
  .wtx-pro-ui .shop-card,
  .wtx-pro-ui .package-card,
  .wtx-pro-ui .pulse-card,
  .wtx-pro-ui .pc-card { border-radius: 14px; }

  .wtx-pro-ui .messages-shell { box-shadow: none; }
  .wtx-pro-ui .conv-list-item { margin-inline: 5px; }
  .wtx-pro-ui .msg-row { max-width: 90%; }

  .wtx-pro-ui .auth-card {
    padding: 25px 19px;
    border-radius: 18px;
  }

  .wtx-pro-ui .admin-table { min-width: 650px; }
  .wtx-pro-ui .admin-log-table-wrap,
  .wtx-pro-ui .table-wrap { border-radius: 12px; }

  .wtx-pro-ui .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 420px) {
  .wtx-pro-ui .content-wrap { padding-inline: 9px; }
  .wtx-pro-ui .hero { padding-inline: 14px; }
  .wtx-pro-ui .btn { padding-inline: 13px; }
  .wtx-pro-ui .navbar-actions .btn-primary { display: none; }
  .wtx-pro-ui .market-product-grid,
  .wtx-pro-ui .shop-grid,
  .wtx-pro-ui .member-grid,
  .wtx-pro-ui .lb-grid { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  .wtx-pro-ui *,
  .wtx-pro-ui *::before,
  .wtx-pro-ui *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  body.wtx-pro-ui { background: #fff !important; color: #111 !important; }
  .wtx-pro-ui .sidebar,
  .wtx-pro-ui .navbar,
  .wtx-pro-ui .bottom-nav,
  .wtx-pro-ui .right-panel,
  .wtx-pro-ui .wtx-language-switcher { display: none !important; }
  .wtx-pro-ui .main { margin: 0 !important; }
  .wtx-pro-ui .content-wrap { max-width: none; padding: 0; }
  .wtx-pro-ui .card,
  .wtx-pro-ui .post-card { color: #111; background: #fff; border: 1px solid #bbb; box-shadow: none; }
}

/* Wiantex UI refresh 2026-09: global layout and fixed theme switcher */
html[data-wtx-theme="dark"] { --purple:#7c5cff;--blue:#3b82f6;--bg-0:#070914;--bg-1:#0c1022;--panel-0:#0d1428;--panel-1:#121a33;--text-0:#f3f2fb;--text-1:#c7c6dd;--text-2:#8b8ba7;--border:rgba(140,130,255,.14);color-scheme:dark; }
html[data-wtx-theme="light"] { --purple:#6d4aff;--blue:#2878e8;--bg-0:#f4f6fb;--bg-1:#fff;--panel-0:#fff;--panel-1:#f7f9fc;--text-0:#151824;--text-1:#3d4657;--text-2:#667085;--border:rgba(61,70,87,.13);color-scheme:light; }
html, body.wtx-pro-ui { min-height: 100%; }
body.wtx-pro-ui .app { min-height: 100dvh; }
body.wtx-pro-ui .main { min-height: 100dvh; display: flex; flex-direction: column; }
body.wtx-pro-ui .content-wrap { flex: 1 0 auto; }
body.wtx-pro-ui .footer { flex: 0 0 auto; margin-top: auto !important; padding-top: 24px; padding-bottom: 26px; }

.wtx-theme-menu { position: relative; }
.wtx-theme-trigger { display: grid !important; place-items: center; }
.wtx-theme-popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 1200; width: 248px; padding: 10px; border: 1px solid var(--wtx-line-strong); border-radius: 18px; background: rgba(13, 16, 29, .97); box-shadow: 0 22px 60px rgba(0, 0, 0, .38); backdrop-filter: blur(22px); }
.wtx-theme-popover[hidden] { display: none !important; }
.wtx-theme-popover > strong { display: block; padding: 6px 8px 9px; font-size: 12px; color: var(--wtx-muted); text-transform: uppercase; letter-spacing: .08em; }
.wtx-theme-popover button { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: center; gap: 8px; padding: 11px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--wtx-text); text-align: left; cursor: pointer; }
.wtx-theme-popover button:hover { background: rgba(255, 255, 255, .055); }
.wtx-theme-popover button.active { border-color: rgba(124, 92, 255, .28); background: rgba(124, 92, 255, .12); }
.wtx-theme-popover button > svg { width: 18px; height: 18px; color: #9a88ff; }
.wtx-theme-popover button span { display: grid; gap: 2px; }
.wtx-theme-popover button b { font-size: 13px; }
.wtx-theme-popover button small { font-size: 11px; color: var(--wtx-muted); }
.wtx-theme-popover button i { opacity: 0; color: #8c76ff; font-style: normal; }
.wtx-theme-popover button.active i { opacity: 1; }
.wtx-theme-quick { position: fixed; top: 16px; right: 16px; z-index: 4200; display: flex; gap: 4px; padding: 4px; border: 1px solid var(--wtx-line); border-radius: 999px; background: rgba(13,16,29,.88); box-shadow: 0 12px 34px rgba(0,0,0,.24); backdrop-filter: blur(16px); }
.wtx-theme-quick button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--wtx-muted); cursor: pointer; font-size: 17px; }
.wtx-theme-quick button.active { color: #fff; background: var(--gradient-primary); }

/* Profile: one orderly identity card instead of scattered inline blocks */
.wtx-pro-ui .profile-hero { padding: 0 !important; overflow: hidden; border-radius: 24px; }
.wtx-pro-ui .profile-hero[data-has-banner="0"]::before { content: ''; display: block; height: 132px; background: radial-gradient(circle at 20% 0, rgba(125, 92, 255, .30), transparent 42%), linear-gradient(125deg, #171329, #101522 58%, #0c1c2d); border-bottom: 1px solid rgba(255,255,255,.07); }
.wtx-pro-ui .profile-hero .profile-banner { height: 210px; border-radius: 0; }
.wtx-pro-ui .profile-identity-layout { position: relative; padding: 0 24px 24px; margin-top: -42px; gap: 22px !important; align-items: flex-end !important; }
.wtx-pro-ui .profile-main-avatar { flex: 0 0 auto; padding: 6px; border-radius: 26px; background: var(--wtx-panel); box-shadow: 0 14px 34px rgba(0,0,0,.26); }
.wtx-pro-ui .profile-identity-copy { padding-top: 54px; min-width: min(100%, 280px) !important; }
.wtx-pro-ui .profile-title-row { gap: 8px !important; }
.wtx-pro-ui .profile-title-row h1 { margin: 0; font-size: clamp(21px, 2vw, 28px) !important; letter-spacing: -.035em; }
.wtx-pro-ui .profile-bio { margin: 10px 0 16px !important; max-width: 680px !important; line-height: 1.65; }
.wtx-pro-ui .profile-stats-strip { gap: 8px !important; }
.wtx-pro-ui .profile-stats-strip > span,
.wtx-pro-ui .profile-stats-strip > a { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 10px; border: 1px solid var(--wtx-line); border-radius: 11px; background: rgba(255,255,255,.025); }
.wtx-pro-ui .profile-stats-strip .profile-presence { gap: 7px; padding-left: 7px; }
.wtx-pro-ui .profile-presence i { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 999px; background: color-mix(in srgb, currentColor 18%, transparent); }
.wtx-pro-ui .profile-presence i .presence-svg-icon { width: 18px !important; height: 18px !important; stroke-width: 2.4; }
.wtx-pro-ui .profile-level-block { max-width: 440px !important; margin-top: 15px !important; }
.wtx-pro-ui .profile-actions { align-self: flex-start; padding-top: 52px; justify-content: flex-end; }
.wtx-pro-ui .profile-rating-card { border-radius: 19px; }

/* Avatar presence badge: readable symbols without touching verified SVGs */
.wtx-pro-ui .avatar-presence-stack .avatar-presence-dot,
.wtx-pro-ui .avatar-wrap .avatar-presence-dot { width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important; right: -8px !important; bottom: -8px !important; border-width: 2px !important; }
.wtx-pro-ui .avatar-presence-dot .presence-svg-icon { width: 12px !important; height: 12px !important; stroke-width: 2.6; }

/* Messages and groups */
.wtx-pro-ui .chat-section-head { align-items: center; }
.wtx-pro-ui .conv-list { padding: 9px; }
.wtx-pro-ui .conv-list-label { padding: 10px 11px 7px; color: var(--wtx-muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.wtx-pro-ui .conv-list-item { margin-bottom: 4px; border: 1px solid transparent; border-radius: 14px; }
.wtx-pro-ui .conv-list-item:hover { border-color: var(--wtx-line); background: rgba(255,255,255,.045); }
.wtx-pro-ui .group-conv-avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--gradient-primary); box-shadow: 0 8px 20px rgba(96,72,220,.22); }
.wtx-pro-ui .group-create-modal { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 18px; background: rgba(3,5,12,.72); backdrop-filter: blur(10px); }
.wtx-pro-ui .group-create-modal[hidden] { display: none !important; }
.wtx-pro-ui .group-create-card { position: relative; width: min(510px, 100%); display: grid; gap: 15px; padding: 24px; border-radius: 22px; }
.wtx-pro-ui .group-create-card h3 { margin: 8px 0 5px; font-size: 20px; }
.wtx-pro-ui .group-create-card p { margin: 0; color: var(--wtx-muted); font-size: 12px; }
.wtx-pro-ui .group-create-card small { color: var(--wtx-muted); }
.wtx-pro-ui .group-modal-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--gradient-primary); }
.wtx-pro-ui .modal-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 10px; color: var(--wtx-text); background: rgba(255,255,255,.055); font-size: 22px; cursor: pointer; }
.wtx-pro-ui .group-chat-shell { border-radius: 22px; }
.wtx-pro-ui .group-info-panel { background: rgba(255,255,255,.018); }
.wtx-pro-ui .group-member-row { min-height: 42px; padding: 6px; border-radius: 11px; }
.wtx-pro-ui .group-member-row:hover { background: rgba(255,255,255,.04); }

/* Pulses: immersive vertical Shorts layout */
.wtx-pro-ui.pulses-page-body .content-wrap { padding-top: 12px; padding-bottom: 0; }
.wtx-pro-ui .pulses-hero { max-width: 500px; }
.wtx-pro-ui .pulses-feed { height: calc(100dvh - 132px); min-height: 560px; gap: 14px; padding: 0 10px 22px; scrollbar-width: none; }
.wtx-pro-ui .pulses-feed::-webkit-scrollbar { display: none; }
.wtx-pro-ui .pulse-short { position: relative; width: min(430px, calc(100vw - 36px)); height: calc(100dvh - 154px); min-height: 580px; max-height: 840px; flex: 0 0 auto; overflow: hidden; border-radius: 24px; background: #050508; }
.wtx-pro-ui .pulse-short .pulse-video-wrap { width: 100%; height: 100% !important; min-height: 0; flex: 1; aspect-ratio: auto; }
.wtx-pro-ui .pulse-short .pulse-player,
.wtx-pro-ui .pulse-short video { width: 100%; height: 100%; object-fit: cover; }
.wtx-pro-ui .pulse-short .pulse-caption { left: 16px; right: 78px; bottom: 88px; font-size: 15px; font-weight: 800; text-shadow: 0 2px 12px #000; }
.wtx-pro-ui .pulse-short .pulse-meta { position: absolute; inset: auto 0 0 0; z-index: 12; min-height: 150px; padding: 76px 82px 18px 16px; pointer-events: none; color: #fff; background: linear-gradient(180deg, transparent, rgba(0,0,0,.84)); }
.wtx-pro-ui .pulse-short .pulse-title { font-size: 15px; white-space: normal; }
.wtx-pro-ui .pulse-short .pulse-user { color: rgba(255,255,255,.76); font-size: 12px; }
.wtx-pro-ui .pulse-short .pulse-engagement { position: absolute; right: 12px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; pointer-events: auto; }
.wtx-pro-ui .pulse-short .pulse-eng-btn { width: 52px; min-height: 52px; display: grid; place-items: center; gap: 1px; padding: 6px; border-radius: 999px; color: #fff; background: rgba(18,18,24,.72); border-color: rgba(255,255,255,.15); backdrop-filter: blur(10px); }
.wtx-pro-ui .pulse-short .pulse-comments { display: none; }
.wtx-pro-ui .pulse-short .pulse-player__shade { z-index: 14; }

/* Members */
.wtx-pro-ui .member-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; gap: 14px !important; }
.wtx-pro-ui .member-card { position: relative; min-height: 160px; padding: 18px !important; overflow: hidden; border-radius: 19px; }
.wtx-pro-ui .member-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--gradient-primary); opacity: .7; }
.wtx-pro-ui .member-card-main { align-items: center; }
.wtx-pro-ui .member-card-actions { margin-top: 14px; }

/* Market */
.wtx-pro-ui.market-page .content-wrap { max-width: 1520px; }
.wtx-pro-ui .market-hero { position: relative; overflow: hidden; min-height: 126px; align-items: center; padding: 26px; }
.wtx-pro-ui .market-hero::after { content: ''; position: absolute; width: 260px; height: 260px; right: -80px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(96,165,250,.2), transparent 68%); pointer-events: none; }
.wtx-pro-ui .market-tabs { position: sticky; top: 82px; z-index: 50; padding: 7px; overflow-x: auto; scrollbar-width: none; backdrop-filter: blur(18px); }
.wtx-pro-ui .market-tabs::-webkit-scrollbar { display: none; }
.wtx-pro-ui .market-tab-btn { white-space: nowrap; min-height: 42px; }
.wtx-pro-ui .shop-grid,
.wtx-pro-ui .market-product-grid { gap: 16px !important; }
.wtx-pro-ui .shop-card,
.wtx-pro-ui .package-card,
.wtx-pro-ui .market-product-card { border-radius: 20px; }
.wtx-pro-ui .shop-card-media { min-height: 128px; border-radius: 15px; background: radial-gradient(circle at 50% 35%, rgba(124,92,255,.18), transparent 65%), rgba(255,255,255,.025); }

/* Admin: shared visual system for every panel screen */
.wtx-pro-ui.admin-page .section-head { padding: 4px 2px 14px; }
.wtx-pro-ui.admin-page .section-head h2 { font-size: clamp(21px, 2vw, 28px); }
.wtx-pro-ui.admin-page .admin-nav-grid { padding: 8px; border: 1px solid var(--wtx-line); border-radius: 18px; background: rgba(255,255,255,.018); }
.wtx-pro-ui.admin-page .admin-nav-link { min-height: 46px; border-radius: 12px; }
.wtx-pro-ui.admin-page .card { border-radius: 19px; }
.wtx-pro-ui.admin-page table { overflow: hidden; border-radius: 14px; }
.wtx-pro-ui .admin-control-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; margin-bottom: 16px; }
.wtx-pro-ui .admin-control-copy { display: flex; align-items: center; gap: 14px; }
.wtx-pro-ui .admin-control-copy h3 { margin: 0 0 5px; font-size: 15px; }
.wtx-pro-ui .admin-control-copy p { margin: 0; color: var(--wtx-muted); font-size: 12px; }
.wtx-pro-ui .admin-control-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--gradient-primary); }
.wtx-pro-ui .admin-toggle-form { display: flex; align-items: center; gap: 10px; }
.wtx-pro-ui .admin-status-pill { padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.wtx-pro-ui .admin-status-pill.is-on { color: #68e2a6; background: rgba(52,211,153,.12); }
.wtx-pro-ui .admin-status-pill.is-off { color: #ff8a9d; background: rgba(251,113,133,.12); }
.wtx-pro-ui .admin-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.wtx-pro-ui .admin-theme-card { display: grid; grid-template-columns: 160px minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 16px; }
.wtx-pro-ui .admin-theme-card p { margin: 5px 0 0; color: var(--wtx-muted); font-size: 12px; }
.wtx-pro-ui .admin-theme-preview { position: relative; height: 100px; overflow: hidden; border-radius: 14px; background: var(--preview-bg); border: 1px solid rgba(128,128,128,.16); }
.wtx-pro-ui .admin-theme-preview span { position: absolute; inset: 0 auto 0 0; width: 34px; background: var(--preview-panel); }
.wtx-pro-ui .admin-theme-preview i { position: absolute; left: 44px; right: 10px; top: 10px; height: 16px; border-radius: 7px; background: var(--preview-panel); }
.wtx-pro-ui .admin-theme-preview b { position: absolute; left: 44px; width: 46px; bottom: 12px; height: 50px; border-radius: 8px; background: linear-gradient(145deg,var(--preview-accent),var(--preview-accent-2)); }
.wtx-pro-ui .admin-theme-preview b:last-child { left: 98px; right: 10px; width: auto; background: var(--preview-panel); }

/* Light-theme additions */
body.wtx-pro-ui[data-wtx-theme="light"] .wtx-theme-popover { color: #273142; background: rgba(255,255,255,.98); border-color: rgba(52,64,84,.13); box-shadow: 0 22px 60px rgba(35,46,70,.16); }
body.wtx-pro-ui[data-wtx-theme="light"] .wtx-theme-popover button:hover { background: rgba(31,41,61,.045); }
body.wtx-pro-ui[data-wtx-theme="light"] .wtx-theme-quick { background: rgba(255,255,255,.92); border-color: rgba(52,64,84,.12); box-shadow: 0 12px 34px rgba(35,46,70,.13); }
body.wtx-pro-ui[data-wtx-theme="light"] .auth-site-logo { filter: brightness(.46) contrast(1.45) saturate(1.55) drop-shadow(0 8px 16px rgba(68,45,150,.15)); }
body.wtx-pro-ui[data-wtx-theme="light"] .profile-hero[data-has-banner="0"]::before { background: radial-gradient(circle at 20% 0, rgba(109,74,255,.18), transparent 44%), linear-gradient(125deg,#f6f3ff,#eef4ff 60%,#f7f9fc); border-bottom-color: rgba(52,64,84,.08); }
body.wtx-pro-ui[data-wtx-theme="light"] .profile-main-avatar { background: #fff; box-shadow: 0 14px 34px rgba(35,46,70,.14); }
body.wtx-pro-ui[data-wtx-theme="light"] .profile-stats-strip > span,
body.wtx-pro-ui[data-wtx-theme="light"] .profile-stats-strip > a { background: rgba(31,41,61,.025); border-color: rgba(52,64,84,.10); }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-list-item:hover,
body.wtx-pro-ui[data-wtx-theme="light"] .group-member-row:hover { background: rgba(31,41,61,.04); }
body.wtx-pro-ui[data-wtx-theme="light"] .group-create-modal { background: rgba(27,35,49,.45); }
body.wtx-pro-ui[data-wtx-theme="light"] .group-info-panel { background: #f8f9fc; }
body.wtx-pro-ui[data-wtx-theme="light"].admin-page .admin-nav-grid { background: rgba(31,41,61,.025); border-color: rgba(52,64,84,.10); }

@media (max-width: 920px) {
  .wtx-pro-ui .profile-identity-layout { align-items: flex-start !important; }
  .wtx-pro-ui .profile-actions { width: 100%; padding-top: 0; justify-content: flex-start; }
  .wtx-pro-ui .admin-theme-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .wtx-pro-ui .profile-hero[data-has-banner="0"]::before { height: 104px; }
  .wtx-pro-ui .profile-hero .profile-banner { height: 150px; }
  .wtx-pro-ui .profile-identity-layout { margin-top: -34px; padding: 0 14px 18px; gap: 10px !important; }
  .wtx-pro-ui .profile-identity-copy { width: 100%; padding-top: 0; }
  .wtx-pro-ui .profile-title-row { margin-top: 2px; }
  .wtx-pro-ui .profile-stats-strip { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wtx-pro-ui .profile-stats-strip > span,
  .wtx-pro-ui .profile-stats-strip > a { justify-content: center; text-align: center; }
  .wtx-pro-ui .profile-actions .btn,
  .wtx-pro-ui .profile-actions form { flex: 1 1 150px; }
  .wtx-pro-ui .profile-actions form .btn { width: 100%; }
  .wtx-pro-ui .pulse-short { width: 100vw; height: calc(100dvh - 112px); min-height: 0; max-height: none; border-radius: 0; border-left: 0; border-right: 0; }
  .wtx-pro-ui .pulses-feed { height: calc(100dvh - 100px); padding: 0 0 12px; gap: 8px; }
  .wtx-pro-ui .pulses-hero { display: none; }
  .wtx-pro-ui .admin-control-card { align-items: stretch; flex-direction: column; }
  .wtx-pro-ui .admin-toggle-form { justify-content: space-between; }
  .wtx-pro-ui .admin-theme-card { grid-template-columns: 1fr; }
  .wtx-pro-ui .admin-theme-preview { height: 130px; }
}

/* 2026-09-12 final polish: profile hierarchy, presence, Shorts snapping */
.wtx-pro-ui .profile-identity-layout {
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:end !important;
}
.wtx-pro-ui .profile-identity-copy { min-width:0 !important; }
.wtx-pro-ui .profile-title-row { align-items:center !important; }
.wtx-pro-ui .profile-stats-strip {
  display:flex !important;
  align-items:center;
  gap:7px !important;
}
.wtx-pro-ui .profile-stats-strip > span,
.wtx-pro-ui .profile-stats-strip > a {
  min-height:36px;
  padding:8px 11px;
  border-radius:12px;
}
.wtx-pro-ui .profile-actions {
  min-width:max-content;
  max-width:310px;
  align-content:flex-start;
}
.wtx-pro-ui .profile-actions .btn { min-height:38px; }
.wtx-pro-ui .profile-main-avatar .avatar-wrap { filter:drop-shadow(0 12px 24px rgba(0,0,0,.18)); }
.wtx-pro-ui .profile-rating-card { padding:20px !important; }
.wtx-pro-ui .profile-rating-card + .card,
.wtx-pro-ui .profile-hero + .card { scroll-margin-top:96px; }

/* Presence symbols should read almost as large as their status circles. */
.wtx-pro-ui .avatar-presence-stack .avatar-presence-dot,
.wtx-pro-ui .avatar-wrap .avatar-presence-dot {
  width:22px !important;
  height:22px !important;
  min-width:22px !important;
  min-height:22px !important;
  right:-8px !important;
  bottom:-8px !important;
  border-width:2px !important;
}
.wtx-pro-ui .avatar-presence-dot .presence-svg-icon {
  width:16px !important;
  height:16px !important;
  stroke-width:2.8 !important;
}
.wtx-pro-ui .profile-presence i {
  width:26px;
  height:26px;
}
.wtx-pro-ui .profile-presence i .presence-svg-icon {
  width:20px !important;
  height:20px !important;
  stroke-width:2.7 !important;
}

/* True vertical Shorts behavior: one Pulse per swipe/scroll. */
.wtx-pro-ui .pulses-feed {
  overflow-y:auto;
  overflow-x:hidden;
  scroll-snap-type:y mandatory;
  scroll-behavior:smooth;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
}
.wtx-pro-ui .pulse-short {
  scroll-snap-align:center;
  scroll-snap-stop:always;
  isolation:isolate;
  box-shadow:0 20px 70px rgba(0,0,0,.32);
}
.wtx-pro-ui .pulse-short .pulse-engagement { z-index:18; }
.wtx-pro-ui .pulse-short .pulse-eng-btn {
  transition:transform .16s ease, background .16s ease, border-color .16s ease;
}
.wtx-pro-ui .pulse-short .pulse-eng-btn:hover {
  transform:scale(1.06);
  background:rgba(28,28,36,.88);
  border-color:rgba(255,255,255,.28);
}

/* Members discovery toolbar */
.wtx-pro-ui .members-toolbar {
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  gap:12px;
  align-items:center;
  margin-bottom:16px;
}
.wtx-pro-ui .members-search {
  position:relative;
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:0 13px;
  border:1px solid var(--wtx-line);
  border-radius:14px;
  background:var(--wtx-panel);
}
.wtx-pro-ui .members-search svg { flex:0 0 auto; color:var(--wtx-muted); }
.wtx-pro-ui .members-search input {
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--wtx-text);
  font:inherit;
}
.wtx-pro-ui .members-sort-list { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; }
.wtx-pro-ui .members-sort-list::-webkit-scrollbar { display:none; }

/* Group administration actions remain compact on dense member lists. */
.wtx-pro-ui .group-member-actions { display:flex; align-items:center; gap:5px; }
.wtx-pro-ui .group-member-actions form { margin:0; }
.wtx-pro-ui .group-role-pill {
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(124,92,255,.11);
  color:#b9adff;
  font-size:10px;
  font-weight:800;
}
.wtx-pro-ui .group-role-pill.owner { background:rgba(245,158,11,.12); color:#f6c66b; }
.wtx-pro-ui .group-role-pill.admin { background:rgba(59,130,246,.12); color:#8fbcff; }

/* Light theme final consistency */
body.wtx-pro-ui[data-wtx-theme="light"] .members-search { background:#fff; border-color:rgba(52,64,84,.12); }
body.wtx-pro-ui[data-wtx-theme="light"] .pulse-short { box-shadow:0 20px 60px rgba(35,46,70,.18); }
body.wtx-pro-ui[data-wtx-theme="light"] .group-role-pill { color:#5f49c9; background:rgba(109,74,255,.10); }
body.wtx-pro-ui[data-wtx-theme="light"] .group-role-pill.owner { color:#9a6500; background:rgba(245,158,11,.13); }
body.wtx-pro-ui[data-wtx-theme="light"] .group-role-pill.admin { color:#2864ae; background:rgba(59,130,246,.11); }

@media (max-width:980px) {
  .wtx-pro-ui .profile-identity-layout { grid-template-columns:auto minmax(0,1fr); }
  .wtx-pro-ui .profile-actions { grid-column:1 / -1; max-width:none; width:100%; padding-top:0; }
  .wtx-pro-ui .members-toolbar { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .wtx-pro-ui .profile-identity-layout {
    grid-template-columns:1fr;
    justify-items:center;
    text-align:center;
    margin-top:-54px;
    padding-inline:14px;
  }
  .wtx-pro-ui .profile-identity-copy { width:100%; padding-top:0; }
  .wtx-pro-ui .profile-title-row,
  .wtx-pro-ui .profile-stats-strip,
  .wtx-pro-ui .profile-actions { justify-content:center; }
  .wtx-pro-ui .profile-bio { margin-inline:auto !important; }
  .wtx-pro-ui .profile-level-block { margin-inline:auto; }
  .wtx-pro-ui .profile-actions { min-width:0; }
  .wtx-pro-ui .profile-actions .btn,
  .wtx-pro-ui .profile-actions form { flex:1 1 auto; }
  .wtx-pro-ui .profile-actions form .btn { width:100%; }
  .wtx-pro-ui .members-sort-list { margin-inline:-2px; padding-bottom:2px; }
}

/* ==========================================================================\n   SAFE HOTFIX — no PHP/DB dependencies. Presence + Messages + Market UI\n   ========================================================================== */

/* Presence badge: always anchored to the avatar itself. */
.wtx-pro-ui .avatar-wrap,
.wtx-pro-ui .avatar-presence-stack {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  vertical-align: middle !important;
  line-height: 0 !important;
  overflow: visible !important;
}
.wtx-pro-ui .avatar-wrap > img,
.wtx-pro-ui .avatar-presence-stack > img {
  display: block !important;
  margin: 0 !important;
}
.wtx-pro-ui .avatar-wrap .avatar-presence-dot,
.wtx-pro-ui .avatar-presence-stack .avatar-presence-dot {
  position: absolute !important;
  z-index: 20 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  left: auto !important;
  margin: 0 !important;
  transform: translate(18%, 18%) !important;
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  display: grid !important;
  place-items: center !important;
  border-width: 2px !important;
  border-style: solid !important;
  border-color: var(--panel-0, #0b0f18) !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.wtx-pro-ui .avatar-presence-dot .presence-svg-icon {
  width: 11px !important;
  height: 11px !important;
  display: block !important;
  stroke-width: 2.8 !important;
}
.wtx-pro-ui .profile-main-avatar .avatar-presence-dot {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  transform: translate(12%, 12%) !important;
}
.wtx-pro-ui .profile-main-avatar .avatar-presence-dot .presence-svg-icon {
  width: 14px !important;
  height: 14px !important;
}
.wtx-pro-ui .msg-row .avatar-presence-dot {
  width: 11px !important;
  height: 11px !important;
  min-width: 11px !important;
  min-height: 11px !important;
  border-width: 1.5px !important;
  transform: translate(12%, 12%) !important;
}
.wtx-pro-ui .msg-row .avatar-presence-dot .presence-svg-icon {
  width: 7px !important;
  height: 7px !important;
}
body.wtx-pro-ui[data-wtx-theme="light"] .avatar-wrap .avatar-presence-dot,
body.wtx-pro-ui[data-wtx-theme="light"] .avatar-presence-stack .avatar-presence-dot {
  border-color: #fff !important;
}

/* Messages: visual-only refresh, compatible with original server-side markup. */
.wtx-pro-ui.chat-list .content-wrap,
.wtx-pro-ui.chat-open .content-wrap { max-width: 1480px; }
.wtx-pro-ui .messages-shell {
  display: grid;
  grid-template-columns: minmax(275px, 335px) minmax(0, 1fr);
  min-height: min(760px, calc(100dvh - 190px));
  height: min(760px, calc(100dvh - 190px));
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.13) !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, rgba(14,18,29,.97), rgba(8,11,19,.985)) !important;
  box-shadow: 0 28px 78px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.025) !important;
}
.wtx-pro-ui .conv-list {
  min-width: 0;
  overflow-y: auto;
  padding: 10px !important;
  border-right: 1px solid rgba(148,163,184,.10) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,.008)) !important;
}
.wtx-pro-ui .conv-list-label {
  margin: 6px 4px 3px;
  padding: 8px 6px 5px !important;
  font-size: 9px !important;
  letter-spacing: .13em !important;
}
.wtx-pro-ui .conv-list-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  margin: 3px 0 !important;
  padding: 10px 11px !important;
  border: 1px solid transparent !important;
  border-radius: 16px !important;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease !important;
}
.wtx-pro-ui .conv-list-item:hover {
  transform: none !important;
  background: rgba(255,255,255,.045) !important;
  border-color: rgba(148,163,184,.10) !important;
}
.wtx-pro-ui .conv-list-item.active {
  background: linear-gradient(115deg, rgba(124,92,255,.17), rgba(55,118,255,.06)) !important;
  border-color: rgba(139,112,255,.24) !important;
  box-shadow: inset 3px 0 0 #8c73ff, 0 10px 26px rgba(61,46,141,.08) !important;
}
.wtx-pro-ui .conv-chat {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  background: radial-gradient(680px 360px at 75% -10%, rgba(109,76,255,.075), transparent 70%), rgba(7,10,17,.48) !important;
}
.wtx-pro-ui .conv-chat-header {
  min-height: 70px;
  padding: 12px 16px !important;
  border-bottom: 1px solid rgba(148,163,184,.10) !important;
  background: rgba(13,17,27,.84) !important;
  backdrop-filter: blur(18px) saturate(120%);
}
.wtx-pro-ui .conv-chat-body {
  min-height: 0;
  overflow-y: auto;
  padding: 22px clamp(14px,2.5vw,28px) !important;
  background: radial-gradient(circle at 15% 10%, rgba(124,92,255,.035), transparent 25%), radial-gradient(circle at 85% 85%, rgba(56,139,255,.025), transparent 26%) !important;
}
.wtx-pro-ui .msg-bubble {
  border-radius: 17px !important;
  box-shadow: 0 7px 22px rgba(0,0,0,.10) !important;
}
.wtx-pro-ui .msg-row:not(.mine) .msg-bubble { background: rgba(255,255,255,.065) !important; }
.wtx-pro-ui .msg-row.mine .msg-bubble { background: linear-gradient(145deg,#7357df,#4e73dd) !important; }
.wtx-pro-ui .conv-chat-input {
  padding: 12px 14px !important;
  border-top: 1px solid rgba(148,163,184,.10) !important;
  background: rgba(11,15,24,.92) !important;
  backdrop-filter: blur(18px);
}
.wtx-pro-ui .msg-composer-wrap,
.wtx-pro-ui .msg-composer { border-radius: 16px !important; }

/* Market: visual-only storefront refresh; no extra PHP variables/functions. */
.wtx-pro-ui .market-hero {
  min-height: 170px !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 22px;
  align-items: center !important;
  padding: clamp(24px,3.5vw,38px) !important;
  border: 1px solid rgba(139,112,255,.20) !important;
  border-radius: 28px !important;
  background: radial-gradient(520px 240px at 90% 15%, rgba(68,139,255,.17), transparent 68%), radial-gradient(440px 220px at 15% 0%, rgba(145,94,255,.14), transparent 72%), linear-gradient(135deg, rgba(22,27,43,.98), rgba(10,14,24,.98)) !important;
  box-shadow: 0 28px 75px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.035) !important;
}
.wtx-pro-ui .market-hero > div { min-width: 0; position: relative; z-index: 2; }
.wtx-pro-ui .market-hero h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(27px,3vw,38px);
  letter-spacing: -.045em;
}
.wtx-pro-ui .market-hero p { max-width: 650px; margin: 9px 0 0; color: var(--wtx-muted, var(--text-2)); font-size: 13px; }
.wtx-pro-ui .market-balance {
  position: relative;
  z-index: 2;
  min-width: 185px;
  min-height: 66px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 18px !important;
  border: 1px solid rgba(167,139,250,.22) !important;
  border-radius: 20px !important;
  background: linear-gradient(145deg, rgba(124,92,255,.16), rgba(41,91,188,.10)) !important;
}
.wtx-pro-ui .market-tabs {
  margin-top: 16px;
  padding: 6px !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.025) !important;
}
.wtx-pro-ui .market-tab-btn { min-height: 40px; padding-inline: 14px !important; border-radius: 11px !important; }
.wtx-pro-ui .market-product-card,
.wtx-pro-ui .shop-card,
.wtx-pro-ui .package-card {
  border-radius: 20px !important;
  border-color: rgba(148,163,184,.12) !important;
  background: linear-gradient(155deg, rgba(20,25,39,.94), rgba(11,15,24,.98)) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.025) !important;
}
.wtx-pro-ui .market-product-card:hover,
.wtx-pro-ui .shop-card:hover,
.wtx-pro-ui .package-card:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(139,112,255,.34) !important;
  box-shadow: 0 20px 46px rgba(0,0,0,.23), 0 0 0 1px rgba(124,92,255,.06) !important;
}

body.wtx-pro-ui[data-wtx-theme="light"] .messages-shell {
  background: #fff !important;
  border-color: rgba(52,64,84,.10) !important;
  box-shadow: 0 24px 60px rgba(45,55,75,.10) !important;
}
body.wtx-pro-ui[data-wtx-theme="light"] .conv-list { background: #f7f8fb !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-chat { background: #f8f9fc !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-chat-header,
body.wtx-pro-ui[data-wtx-theme="light"] .conv-chat-input { background: rgba(255,255,255,.92) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .conv-chat-body { background: #f6f8fb !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .msg-row:not(.mine) .msg-bubble { color: #2f3644 !important; background: #fff !important; border-color: rgba(71,85,105,.12) !important; }
body.wtx-pro-ui[data-wtx-theme="light"] .market-hero {
  background: radial-gradient(520px 240px at 90% 15%, rgba(68,139,255,.10), transparent 68%), radial-gradient(440px 220px at 15% 0%, rgba(145,94,255,.09), transparent 72%), linear-gradient(135deg,#fff,#f7f8fc) !important;
  border-color: rgba(109,74,255,.16) !important;
  box-shadow: 0 24px 60px rgba(45,55,75,.10) !important;
}
body.wtx-pro-ui[data-wtx-theme="light"] .market-product-card,
body.wtx-pro-ui[data-wtx-theme="light"] .shop-card,
body.wtx-pro-ui[data-wtx-theme="light"] .package-card { background: #fff !important; border-color: rgba(52,64,84,.10) !important; }

@media (max-width: 860px) {
  .wtx-pro-ui .messages-shell { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .wtx-pro-ui.chat-open .messages-shell .conv-list { display: none; }
  .wtx-pro-ui.chat-list .messages-shell .conv-chat { display: none; }
  .wtx-pro-ui .conv-list { max-height: none; border-right: 0 !important; }
  .wtx-pro-ui .conv-chat { min-height: calc(100dvh - 185px); }
  .wtx-pro-ui .market-hero { grid-template-columns: 1fr; }
  .wtx-pro-ui .market-balance { min-width: 0; width: max-content; }
}

/* 2026-09-12 group/profile corrective hotfix */
.wtx-pro-ui .profile-main-avatar {
  position: relative !important;
  z-index: 8 !important;
  transform: translateY(-34px) !important;
  align-self: start !important;
}
.wtx-pro-ui .profile-identity-layout {
  overflow: visible !important;
}
.wtx-pro-ui .profile-main-avatar .avatar-wrap {
  position: relative !important;
  z-index: 9 !important;
}
@media (max-width: 640px) {
  .wtx-pro-ui .profile-main-avatar {
    transform: translateY(-22px) !important;
  }
}

/* --- PROFILE AVATAR + PRESENCE HOTFIX 2026-09-12 --- */
.wtx-pro-ui .profile-main-avatar,
.wtx-pro-ui .profile-main-avatar.has-banner{
  position: relative !important;
  z-index: 4 !important;
  width: 96px !important;
  min-width: 96px !important;
  height: 96px !important;
  overflow: visible !important;
}
.wtx-pro-ui .profile-main-avatar.has-banner{
  margin-top: -16px !important; /* avatar should sit lower, near the body area */
}
.wtx-pro-ui .profile-main-avatar .avatar-wrap,
.wtx-pro-ui .profile-main-avatar .avatar-presence-stack,
.wtx-pro-ui .profile-main-avatar .avatar-frame-wrap{
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 96px !important;
  height: 96px !important;
  min-width: 96px !important;
  min-height: 96px !important;
  overflow: visible !important;
  line-height: 0 !important;
  vertical-align: top !important;
}
.wtx-pro-ui .profile-main-avatar .avatar-wrap > img,
.wtx-pro-ui .profile-main-avatar .avatar-frame-base > img,
.wtx-pro-ui .profile-main-avatar .avatar,
.wtx-pro-ui .profile-main-avatar .avatar-fallback{
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}
.wtx-pro-ui .profile-main-avatar .avatar-presence-dot{
  position: absolute !important;
  right: -4px !important;
  bottom: -4px !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  z-index: 25 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid var(--panel-0, #0b0f18) !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.wtx-pro-ui .profile-main-avatar .avatar-presence-dot .presence-svg-icon{
  width: 12px !important;
  height: 12px !important;
  display: block !important;
}


/* === PROFILE POSITION + PRESENCE FINAL FIX v3 ===
   This block intentionally wins over every older profile/avatar hotfix. */
body.wtx-pro-ui .profile-identity-layout{overflow:visible!important;}
body.wtx-pro-ui .profile-main-avatar,
body.wtx-pro-ui .profile-main-avatar.has-banner{
  position:relative!important;z-index:20!important;transform:none!important;align-self:start!important;
  margin-top:20px!important;padding:0!important;width:84px!important;min-width:84px!important;height:84px!important;
  border-radius:50%!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;
}
body.wtx-pro-ui .profile-main-avatar .avatar-wrap,
body.wtx-pro-ui .profile-main-avatar .avatar-presence-stack,
body.wtx-pro-ui .profile-main-avatar .avatar-frame-wrap{
  --avatar-size:84px!important;width:84px!important;height:84px!important;min-width:84px!important;min-height:84px!important;
  flex:0 0 84px!important;margin:0!important;transform:none!important;overflow:visible!important;
}
body.wtx-pro-ui .profile-main-avatar .avatar-presence-dot{display:none!important;}
body.wtx-pro-ui .profile-main-avatar .profile-avatar-presence-dot{
  position:absolute!important;right:-3px!important;bottom:-3px!important;top:auto!important;left:auto!important;z-index:50!important;
  width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;display:flex!important;
  align-items:center!important;justify-content:center!important;border:3px solid var(--panel-0,#0b0f18)!important;border-radius:999px!important;
  box-sizing:border-box!important;overflow:hidden!important;background:#64748b;color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.28)!important;
}
body.wtx-pro-ui .profile-main-avatar .profile-avatar-presence-dot.avatar-presence-online{background:#22c55e!important;color:#fff!important}
body.wtx-pro-ui .profile-main-avatar .profile-avatar-presence-dot.avatar-presence-busy{background:#f59e0b!important;color:#fff!important}
body.wtx-pro-ui .profile-main-avatar .profile-avatar-presence-dot.avatar-presence-dnd{background:#ef4444!important;color:#fff!important}
body.wtx-pro-ui .profile-main-avatar .profile-avatar-presence-dot.avatar-presence-away{background:#94a3b8!important;color:#fff!important}
body.wtx-pro-ui .profile-main-avatar .profile-avatar-presence-dot.avatar-presence-sleep{background:#8b5cf6!important;color:#fff!important}
body.wtx-pro-ui .profile-main-avatar .profile-avatar-presence-dot.avatar-presence-offline{background:#64748b!important;color:#e2e8f0!important}
body.wtx-pro-ui .profile-main-avatar .profile-avatar-presence-dot .presence-svg-icon{width:11px!important;height:11px!important;display:block!important;}
@media(max-width:640px){
  body.wtx-pro-ui .profile-main-avatar,body.wtx-pro-ui .profile-main-avatar.has-banner{transform:none!important;margin-top:16px!important;width:76px!important;min-width:76px!important;height:76px!important;}
  body.wtx-pro-ui .profile-main-avatar .avatar-wrap,body.wtx-pro-ui .profile-main-avatar .avatar-presence-stack,body.wtx-pro-ui .profile-main-avatar .avatar-frame-wrap{--avatar-size:76px!important;width:76px!important;height:76px!important;min-width:76px!important;min-height:76px!important;flex-basis:76px!important;}
}

/* --- MOBILE PROFILE VERTICAL FLOW 2026-09-12 --- */
.wtx-pro-ui .profile-role-badges{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  min-width:0;
}
.wtx-pro-ui .profile-social-links{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
@media (max-width:640px){
  body.wtx-pro-ui .profile-hero{
    overflow:visible!important;
  }
  body.wtx-pro-ui .profile-identity-layout{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:12px!important;
    margin-top:0!important;
    padding:0 14px 18px!important;
    text-align:center!important;
  }
  body.wtx-pro-ui .profile-main-avatar,
  body.wtx-pro-ui .profile-main-avatar.has-banner{
    order:1!important;
    align-self:center!important;
    margin:14px auto 0!important;
    transform:none!important;
  }
  body.wtx-pro-ui .profile-identity-copy{
    order:2!important;
    width:100%!important;
    min-width:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    text-align:center!important;
  }
  body.wtx-pro-ui .profile-title-row{
    width:100%!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    margin:0!important;
  }
  body.wtx-pro-ui .profile-title-row .profile-username{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    margin:0!important;
    text-align:center!important;
    font-size:22px!important;
    line-height:1.2!important;
  }
  body.wtx-pro-ui .profile-role-badges{
    width:100%!important;
    justify-content:center!important;
    gap:7px!important;
    margin:0!important;
  }
  body.wtx-pro-ui .profile-bio{
    width:100%!important;
    max-width:520px!important;
    margin:10px auto 12px!important;
    text-align:center!important;
  }
  body.wtx-pro-ui .profile-social-links{
    width:100%!important;
    justify-content:center!important;
    gap:8px!important;
    margin:0 0 12px!important;
  }
  body.wtx-pro-ui .profile-social-links .btn{
    flex:0 1 auto!important;
    max-width:100%!important;
  }
  body.wtx-pro-ui .profile-stats-strip{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    justify-content:center!important;
    margin:0!important;
  }
  body.wtx-pro-ui .profile-stats-strip > span,
  body.wtx-pro-ui .profile-stats-strip > a{
    min-width:0!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:normal!important;
  }
  body.wtx-pro-ui .profile-level-block{
    width:100%!important;
    max-width:420px!important;
    margin:14px auto 0!important;
    text-align:left!important;
  }
  body.wtx-pro-ui .profile-actions{
    order:3!important;
    width:100%!important;
    max-width:none!important;
    display:flex!important;
    align-items:stretch!important;
    justify-content:center!important;
    gap:8px!important;
    padding-top:0!important;
    margin-top:2px!important;
  }
  body.wtx-pro-ui .profile-actions > .btn,
  body.wtx-pro-ui .profile-actions > a.btn,
  body.wtx-pro-ui .profile-actions > form{
    flex:1 1 140px!important;
    min-width:0!important;
  }
  body.wtx-pro-ui .profile-actions form .btn{
    width:100%!important;
  }
}
@media (max-width:420px){
  body.wtx-pro-ui .profile-stats-strip{
    grid-template-columns:1fr 1fr!important;
  }
  body.wtx-pro-ui .profile-social-links{
    flex-direction:column!important;
    align-items:stretch!important;
  }
  body.wtx-pro-ui .profile-social-links .btn{
    width:100%!important;
    justify-content:center!important;
  }
  body.wtx-pro-ui .profile-actions{
    flex-direction:column!important;
  }
  body.wtx-pro-ui .profile-actions > .btn,
  body.wtx-pro-ui .profile-actions > a.btn,
  body.wtx-pro-ui .profile-actions > form{
    width:100%!important;
    flex:0 0 auto!important;
  }
}

/* === PROFILE READABILITY / SPACING FIX v5 ===
   More breathing room on desktop and mobile without changing the established order. */
body.wtx-pro-ui .profile-identity-layout{
  column-gap:24px!important;
  row-gap:18px!important;
}
body.wtx-pro-ui .profile-identity-copy{
  line-height:1.55!important;
}
body.wtx-pro-ui .profile-title-row{
  column-gap:12px!important;
  row-gap:10px!important;
}
body.wtx-pro-ui .profile-title-row .profile-username{
  line-height:1.3!important;
  margin:0!important;
}
body.wtx-pro-ui .profile-role-badges{
  column-gap:8px!important;
  row-gap:8px!important;
}
body.wtx-pro-ui .profile-role-badges .badge{
  line-height:1.4!important;
  padding-top:4px!important;
  padding-bottom:4px!important;
}
body.wtx-pro-ui .profile-bio{
  line-height:1.75!important;
  margin:14px 0 16px!important;
}
body.wtx-pro-ui .profile-social-links{
  column-gap:10px!important;
  row-gap:10px!important;
  margin-bottom:16px!important;
}
body.wtx-pro-ui .profile-social-links .btn{
  line-height:1.4!important;
  min-height:34px!important;
}
body.wtx-pro-ui .profile-stats-strip{
  column-gap:20px!important;
  row-gap:10px!important;
  line-height:1.55!important;
}
body.wtx-pro-ui .profile-stats-strip > span,
body.wtx-pro-ui .profile-stats-strip > a{
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  min-height:24px!important;
  line-height:1.5!important;
}
body.wtx-pro-ui .profile-presence{
  line-height:1.5!important;
}
body.wtx-pro-ui .profile-level-block{
  margin-top:18px!important;
}
body.wtx-pro-ui .profile-level-block > div:first-child{
  margin-bottom:7px!important;
  line-height:1.45!important;
}
body.wtx-pro-ui .profile-actions{
  gap:10px!important;
}
body.wtx-pro-ui .profile-actions .btn{
  line-height:1.4!important;
}

@media (max-width:640px){
  body.wtx-pro-ui .profile-identity-layout{
    gap:16px!important;
    padding-bottom:22px!important;
  }
  body.wtx-pro-ui .profile-identity-copy{
    gap:0!important;
    line-height:1.6!important;
  }
  body.wtx-pro-ui .profile-title-row{
    gap:12px!important;
  }
  body.wtx-pro-ui .profile-title-row .profile-username{
    line-height:1.35!important;
    margin-bottom:1px!important;
  }
  body.wtx-pro-ui .profile-role-badges{
    gap:8px 9px!important;
    margin-top:1px!important;
    margin-bottom:1px!important;
  }
  body.wtx-pro-ui .profile-bio{
    line-height:1.75!important;
    margin:14px auto 17px!important;
  }
  body.wtx-pro-ui .profile-social-links{
    gap:10px!important;
    margin:0 0 17px!important;
  }
  body.wtx-pro-ui .profile-stats-strip{
    column-gap:10px!important;
    row-gap:12px!important;
    line-height:1.55!important;
  }
  body.wtx-pro-ui .profile-stats-strip > span,
  body.wtx-pro-ui .profile-stats-strip > a{
    min-height:30px!important;
    padding:3px 5px!important;
    line-height:1.5!important;
  }
  body.wtx-pro-ui .profile-level-block{
    margin-top:19px!important;
  }
  body.wtx-pro-ui .profile-actions{
    gap:10px!important;
    margin-top:8px!important;
  }
}

@media (max-width:420px){
  body.wtx-pro-ui .profile-identity-layout{
    gap:15px!important;
  }
  body.wtx-pro-ui .profile-role-badges{
    row-gap:9px!important;
  }
  body.wtx-pro-ui .profile-social-links{
    gap:9px!important;
  }
  body.wtx-pro-ui .profile-stats-strip{
    row-gap:10px!important;
  }
}

/* Mobile username -> verified badge breathing room */
@media (max-width: 760px){
  body.wtx-pro-ui .profile-title-row .profile-username > .verified-badge,
  body.wtx-pro-ui .profile-username .verified-badge{
    margin-left:4px!important;
    margin-inline-start:4px!important;
  }
}

/* ===== Wiantex custom voice/audio player ===== */
.wtx-pro-ui .msg-media-audio{display:none!important}
.wtx-pro-ui .msg-audio-player{
  --audio-progress:0%;
  width:min(390px,72vw);
  min-width:270px;
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:10px 12px;
  margin:2px 0;
  border:1px solid rgba(255,255,255,.10);
  border-radius:17px;
  background:linear-gradient(135deg,rgba(255,255,255,.075),rgba(255,255,255,.025));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045),0 8px 24px rgba(0,0,0,.10);
  overflow:hidden;
}
.wtx-pro-ui .msg-audio-native{display:none!important}
.wtx-pro-ui .msg-audio-play,
.wtx-pro-ui .msg-audio-mute{
  appearance:none;
  border:0;
  color:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
  padding:0;
  flex:0 0 auto;
}
.wtx-pro-ui .msg-audio-play{
  width:46px;height:46px;border-radius:50%;
  background:linear-gradient(135deg,#7657ff,#467dff);
  box-shadow:0 8px 22px rgba(91,88,255,.30),inset 0 1px 0 rgba(255,255,255,.22);
  transition:transform .16s ease,filter .16s ease;
}
.wtx-pro-ui .msg-audio-play:hover{transform:translateY(-1px);filter:brightness(1.08)}
.wtx-pro-ui .msg-audio-play:active{transform:scale(.96)}
.wtx-pro-ui .msg-audio-play svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.wtx-pro-ui .msg-audio-play svg path[d^="m8"]{fill:currentColor;stroke:none}
.wtx-pro-ui .msg-audio-main{min-width:0;display:grid;gap:7px}
.wtx-pro-ui .msg-audio-topline{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.wtx-pro-ui .msg-audio-title{font-size:12px;font-weight:800;letter-spacing:.01em;color:var(--text-0);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wtx-pro-ui .msg-audio-time{font-size:10.5px;font-variant-numeric:tabular-nums;color:var(--text-2);white-space:nowrap}
.wtx-pro-ui .msg-audio-timeline{height:23px;position:relative;display:flex;align-items:center}
.wtx-pro-ui .msg-audio-wave{position:absolute;inset:0;display:flex;align-items:center;gap:2px;pointer-events:none;overflow:hidden;mask-image:linear-gradient(90deg,#000,#000)}
.wtx-pro-ui .msg-audio-wave i{display:block;width:3px;height:var(--wave-h,55%);min-height:3px;border-radius:99px;background:rgba(167,178,204,.36);transition:background .15s ease}
.wtx-pro-ui .msg-audio-player.is-playing .msg-audio-wave i{background:rgba(162,151,255,.52)}
.wtx-pro-ui .msg-audio-progress{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:2}
.wtx-pro-ui .msg-audio-volume{display:flex;align-items:center;gap:5px}
.wtx-pro-ui .msg-audio-mute{width:30px;height:30px;border-radius:9px;background:rgba(255,255,255,.055);color:var(--text-1);border:1px solid rgba(255,255,255,.07)}
.wtx-pro-ui .msg-audio-mute:hover{background:rgba(255,255,255,.10);color:var(--text-0)}
.wtx-pro-ui .msg-audio-mute svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.wtx-pro-ui .msg-audio-volume-range{appearance:none;width:54px;height:4px;border-radius:99px;background:rgba(255,255,255,.14);outline:none;cursor:pointer}
.wtx-pro-ui .msg-audio-volume-range::-webkit-slider-thumb{appearance:none;width:11px;height:11px;border-radius:50%;background:#a89dff;border:0;box-shadow:0 0 0 2px rgba(168,157,255,.16)}
.wtx-pro-ui .msg-audio-volume-range::-moz-range-thumb{width:11px;height:11px;border-radius:50%;background:#a89dff;border:0}
.wtx-pro-ui .msg-audio-volume-percent{min-width:34px;text-align:right;font-size:10px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--text-2);line-height:1;white-space:nowrap}
.wtx-pro-ui .msg-row.mine .msg-audio-player{background:linear-gradient(135deg,rgba(255,255,255,.10),rgba(255,255,255,.035));border-color:rgba(255,255,255,.13)}
body.wtx-pro-ui[data-wtx-theme="light"] .msg-audio-player{background:linear-gradient(135deg,#fff,#f7f8fc);border-color:rgba(42,54,79,.10);box-shadow:0 8px 22px rgba(27,39,67,.07)}
body.wtx-pro-ui[data-wtx-theme="light"] .msg-audio-wave i{background:rgba(73,86,115,.25)}
body.wtx-pro-ui[data-wtx-theme="light"] .msg-audio-mute{background:rgba(38,49,70,.05);border-color:rgba(38,49,70,.08)}
body.wtx-pro-ui[data-wtx-theme="light"] .msg-audio-volume-range{background:rgba(44,55,80,.15)}
@media(max-width:680px){
  .wtx-pro-ui .msg-audio-player{width:min(320px,76vw);min-width:230px;grid-template-columns:42px minmax(0,1fr) auto;gap:9px;padding:9px 10px;border-radius:15px}
  .wtx-pro-ui .msg-audio-play{width:42px;height:42px}
  .wtx-pro-ui .msg-audio-volume-range{display:none}
  .wtx-pro-ui .msg-audio-volume{gap:4px}
  .wtx-pro-ui .msg-audio-volume-percent{min-width:30px;font-size:9.5px}
  .wtx-pro-ui .msg-audio-title{font-size:11.5px}
  .wtx-pro-ui .msg-audio-time{font-size:10px}
}

/* ============================================================
   2026-09-12 — Profil banner + ayarlar yenileme + arama geçmişi
   ============================================================ */

/* Profil banner: dört köşe de oval. */
body.wtx-pro-ui .profile-hero .profile-banner{
  border-radius:26px!important;
  overflow:hidden!important;
}
body.wtx-pro-ui .profile-preview-banner{
  border-radius:22px 22px 0 0!important;
  overflow:hidden!important;
}

/* Profil ayarları: daha ferah, daha belirgin kart hiyerarşisi. */
body.wtx-pro-ui.settings-profile-page .profile-settings-layout{
  max-width:1120px!important;
  grid-template-columns:minmax(0,1.45fr) minmax(300px,.75fr)!important;
  gap:22px!important;
}
body.wtx-pro-ui.settings-profile-page .profile-settings-hero{
  display:flex;
  align-items:center;
  gap:14px;
  padding:17px 18px;
  margin-bottom:18px;
  border:1px solid var(--border);
  border-radius:20px;
  background:linear-gradient(135deg,rgba(124,92,255,.11),rgba(59,130,246,.045) 52%,rgba(255,255,255,.018));
  box-shadow:0 14px 38px rgba(0,0,0,.11);
}
body.wtx-pro-ui.settings-profile-page .profile-settings-hero-icon{
  width:44px;height:44px;flex:0 0 44px;
  display:grid;place-items:center;
  border-radius:14px;
  color:#d8d0ff;
  background:linear-gradient(135deg,rgba(124,92,255,.28),rgba(59,130,246,.18));
  border:1px solid rgba(124,92,255,.26);
}
body.wtx-pro-ui.settings-profile-page .profile-settings-hero-copy{min-width:0;flex:1}
body.wtx-pro-ui.settings-profile-page .profile-settings-hero h2{margin:0!important;font-size:20px!important;line-height:1.25!important}
body.wtx-pro-ui.settings-profile-page .profile-settings-hero p{margin:4px 0 0!important;color:var(--text-2);font-size:12.5px;line-height:1.55}
body.wtx-pro-ui.settings-profile-page .profile-settings-view{white-space:nowrap}

body.wtx-pro-ui.settings-profile-page .profile-editor-card,
body.wtx-pro-ui.settings-profile-page .profile-settings-layout>.main-col>.card,
body.wtx-pro-ui.settings-profile-page .profile-preview-card{
  border-radius:20px!important;
  border-color:color-mix(in srgb,var(--border) 86%,#7c5cff 14%)!important;
  box-shadow:0 14px 38px rgba(0,0,0,.10)!important;
}
body.wtx-pro-ui.settings-profile-page .profile-primary-card{
  padding:22px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.028),rgba(255,255,255,.012))!important;
}
body.wtx-pro-ui.settings-profile-page .profile-settings-card-head{
  display:flex;align-items:center;gap:11px;
  margin-bottom:18px;
  padding-bottom:15px;
  border-bottom:1px solid var(--border);
}
body.wtx-pro-ui.settings-profile-page .profile-settings-card-icon{
  width:38px;height:38px;flex:0 0 38px;
  display:grid;place-items:center;
  border-radius:12px;
  color:#cfc5ff;
  background:rgba(124,92,255,.11);
  border:1px solid rgba(124,92,255,.20);
}
body.wtx-pro-ui.settings-profile-page .profile-settings-card-head h3{font-size:14.5px!important;line-height:1.3!important;margin:0!important}
body.wtx-pro-ui.settings-profile-page .profile-settings-card-head p{font-size:11.5px;line-height:1.5;color:var(--text-2);margin:3px 0 0}
body.wtx-pro-ui.settings-profile-page .profile-upload-row{gap:12px!important;margin-bottom:20px!important}
body.wtx-pro-ui.settings-profile-page .profile-upload-box{
  min-height:142px!important;
  padding:15px!important;
  border-radius:16px!important;
  border:1px dashed color-mix(in srgb,var(--border) 70%,#7c5cff 30%)!important;
  background:linear-gradient(145deg,rgba(124,92,255,.055),rgba(255,255,255,.015))!important;
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
}
body.wtx-pro-ui.settings-profile-page .profile-upload-box strong{font-size:13px!important;margin:0!important}
body.wtx-pro-ui.settings-profile-page .profile-upload-box .field-hint{line-height:1.55!important;min-height:34px}
body.wtx-pro-ui.settings-profile-page .profile-upload-box .btn{margin-top:auto;align-self:flex-start;border-radius:11px!important}
body.wtx-pro-ui.settings-profile-page .profile-primary-card .field{margin-bottom:14px!important}
body.wtx-pro-ui.settings-profile-page .profile-primary-card .field>label{display:block;margin-bottom:7px;font-size:12.5px;font-weight:700;color:var(--text-1)}
body.wtx-pro-ui.settings-profile-page .profile-primary-card .input{border-radius:12px!important;min-height:42px}
body.wtx-pro-ui.settings-profile-page .profile-primary-card textarea.input{min-height:112px;padding-top:11px!important;line-height:1.6}
body.wtx-pro-ui.settings-profile-page .profile-fields-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 12px;
  margin-top:4px;
}
body.wtx-pro-ui.settings-profile-page .profile-fields-grid>.field:last-child{grid-column:1/-1}
body.wtx-pro-ui.settings-profile-page .profile-settings-save-row{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  margin-top:5px;padding-top:16px;border-top:1px solid var(--border);
}
body.wtx-pro-ui.settings-profile-page .profile-settings-save-row>span{font-size:11.5px;color:var(--text-2);line-height:1.45}
body.wtx-pro-ui.settings-profile-page .profile-settings-save-row .btn{min-width:142px;justify-content:center}
body.wtx-pro-ui.settings-profile-page .profile-preview-card{overflow:hidden!important}
body.wtx-pro-ui.settings-profile-page .profile-preview-banner{height:155px!important}

/* Arama olayları artık duyuru yerine DM içinde kart olarak görünür. */
body.wtx-pro-ui .msg-bubble.is-call-history,
body.wtx-pro-ui .msg-bubble:has(.wtx-call-history-card){
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
body.wtx-pro-ui .wtx-call-history-card{
  min-width:min(330px,74vw);
  display:flex;
  align-items:center;
  gap:11px;
  padding:12px 13px;
  border-radius:16px;
  border:1px solid rgba(124,92,255,.18);
  background:linear-gradient(135deg,rgba(124,92,255,.11),rgba(255,255,255,.035));
  color:var(--text-0);
}
body.wtx-pro-ui .wtx-call-history-card.missed,
body.wtx-pro-ui .wtx-call-history-card.rejected{border-color:rgba(255,104,122,.22);background:linear-gradient(135deg,rgba(255,91,110,.10),rgba(255,255,255,.025))}
body.wtx-pro-ui .wtx-call-history-card.accepted,
body.wtx-pro-ui .wtx-call-history-card.ringing{border-color:rgba(52,211,153,.20);background:linear-gradient(135deg,rgba(52,211,153,.09),rgba(255,255,255,.025))}
body.wtx-pro-ui .wtx-call-history-icon{
  width:38px;height:38px;flex:0 0 38px;
  display:grid;place-items:center;
  border-radius:12px;
  background:rgba(124,92,255,.13);
  font-size:17px;font-weight:900;
}
body.wtx-pro-ui .wtx-call-history-copy{min-width:0;display:grid;gap:2px;flex:1}
body.wtx-pro-ui .wtx-call-history-copy strong{font-size:12.5px;line-height:1.35;color:var(--text-0)}
body.wtx-pro-ui .wtx-call-history-copy small{font-size:10.5px;line-height:1.35;color:var(--text-2)}
body.wtx-pro-ui .wtx-call-history-redial{
  flex:0 0 auto;
  border:1px solid rgba(124,92,255,.25);
  border-radius:10px;
  padding:7px 9px;
  background:rgba(124,92,255,.10);
  color:var(--text-0);
  font:700 10.5px/1 inherit;
  cursor:pointer;
}
body.wtx-pro-ui .wtx-call-history-redial:hover{background:rgba(124,92,255,.18)}

@media(max-width:820px){
  body.wtx-pro-ui.settings-profile-page .profile-settings-layout{grid-template-columns:1fr!important;gap:16px!important}
  body.wtx-pro-ui.settings-profile-page .profile-settings-hero{align-items:flex-start;flex-wrap:wrap}
  body.wtx-pro-ui.settings-profile-page .profile-settings-view{margin-left:58px}
  body.wtx-pro-ui.settings-profile-page .profile-preview-card{order:-1!important;position:relative!important;top:auto!important}
}
@media(max-width:560px){
  body.wtx-pro-ui.settings-profile-page .profile-settings-hero{padding:14px!important;border-radius:17px!important}
  body.wtx-pro-ui.settings-profile-page .profile-settings-hero-icon{width:40px;height:40px;flex-basis:40px}
  body.wtx-pro-ui.settings-profile-page .profile-settings-view{margin-left:0;width:100%;justify-content:center}
  body.wtx-pro-ui.settings-profile-page .profile-primary-card{padding:16px!important}
  body.wtx-pro-ui.settings-profile-page .profile-upload-row,
  body.wtx-pro-ui.settings-profile-page .profile-fields-grid{grid-template-columns:1fr!important}
  body.wtx-pro-ui.settings-profile-page .profile-fields-grid>.field:last-child{grid-column:auto}
  body.wtx-pro-ui.settings-profile-page .profile-settings-save-row{align-items:stretch;flex-direction:column}
  body.wtx-pro-ui.settings-profile-page .profile-settings-save-row .btn{width:100%;justify-content:center}
  body.wtx-pro-ui .wtx-call-history-card{min-width:min(280px,76vw);padding:10px 11px;gap:9px}
  body.wtx-pro-ui .wtx-call-history-icon{width:34px;height:34px;flex-basis:34px;border-radius:10px}
  body.wtx-pro-ui .wtx-call-history-redial{padding:7px 8px}
}

/* ============================================================
   2026-09-12 — Ses kaydı oynatıcı v2: ince ses kontrolü + canlı dalga
   ============================================================ */
.wtx-pro-ui .msg-audio-volume{
  gap:4px!important;
}
.wtx-pro-ui .msg-audio-mute{
  width:27px!important;
  height:27px!important;
  border-radius:8px!important;
  border-width:1px!important;
  box-shadow:none!important;
}
.wtx-pro-ui .msg-audio-mute svg{
  width:14px!important;
  height:14px!important;
  stroke-width:1.8!important;
}
.wtx-pro-ui .msg-audio-volume-range{
  width:52px!important;
  height:2px!important;
  min-height:2px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.16)!important;
  box-shadow:none!important;
}
.wtx-pro-ui .msg-audio-volume-range::-webkit-slider-runnable-track{
  height:2px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.16)!important;
}
.wtx-pro-ui .msg-audio-volume-range::-webkit-slider-thumb{
  appearance:none!important;
  width:8px!important;
  height:8px!important;
  margin-top:-3px!important;
  border-radius:50%!important;
  background:#a89dff!important;
  border:0!important;
  box-shadow:0 0 0 1.5px rgba(168,157,255,.13)!important;
}
.wtx-pro-ui .msg-audio-volume-range::-moz-range-track{
  height:2px!important;
  border:0!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.16)!important;
}
.wtx-pro-ui .msg-audio-volume-range::-moz-range-progress{
  height:2px!important;
  border-radius:999px!important;
  background:#9d91ff!important;
}
.wtx-pro-ui .msg-audio-volume-range::-moz-range-thumb{
  width:8px!important;
  height:8px!important;
  border:0!important;
  border-radius:50%!important;
  background:#a89dff!important;
  box-shadow:none!important;
}
.wtx-pro-ui .msg-audio-volume-percent{
  min-width:31px!important;
  font-size:9.5px!important;
  font-weight:600!important;
  letter-spacing:0!important;
  opacity:.82!important;
}

/* Dalga yalnızca ses gerçekten oynarken hareket eder. */
@keyframes wtxAudioWaveLive{
  0%,100%{transform:scaleY(.42);opacity:.58}
  25%{transform:scaleY(.92);opacity:.95}
  52%{transform:scaleY(.58);opacity:.72}
  76%{transform:scaleY(1.08);opacity:1}
}
.wtx-pro-ui .msg-audio-wave i{
  transform-origin:center center!important;
  will-change:transform,opacity;
}
.wtx-pro-ui .msg-audio-player.is-playing .msg-audio-wave i{
  animation:wtxAudioWaveLive .72s ease-in-out infinite!important;
}
.wtx-pro-ui .msg-audio-player.is-playing .msg-audio-wave i:nth-child(3n+1){animation-delay:-.12s!important;animation-duration:.66s!important}
.wtx-pro-ui .msg-audio-player.is-playing .msg-audio-wave i:nth-child(3n+2){animation-delay:-.31s!important;animation-duration:.82s!important}
.wtx-pro-ui .msg-audio-player.is-playing .msg-audio-wave i:nth-child(5n){animation-delay:-.47s!important;animation-duration:.58s!important}
.wtx-pro-ui .msg-audio-player:not(.is-playing) .msg-audio-wave i{
  animation:none!important;
  transform:scaleY(1)!important;
  opacity:1!important;
}
.wtx-pro-ui .msg-audio-player.is-playing .msg-audio-play{
  box-shadow:0 8px 22px rgba(91,88,255,.24),0 0 0 4px rgba(118,87,255,.07),inset 0 1px 0 rgba(255,255,255,.20)!important;
}
body.wtx-pro-ui[data-wtx-theme="light"] .msg-audio-volume-range,
body.wtx-pro-ui[data-wtx-theme="light"] .msg-audio-volume-range::-webkit-slider-runnable-track{
  background:rgba(44,55,80,.16)!important;
}
@media(max-width:680px){
  .wtx-pro-ui .msg-audio-mute{width:26px!important;height:26px!important}
  .wtx-pro-ui .msg-audio-volume-percent{font-size:9px!important;min-width:29px!important}
}
@media(prefers-reduced-motion:reduce){
  .wtx-pro-ui .msg-audio-player.is-playing .msg-audio-wave i{animation:none!important}
}

/* css/footer-pages.css */
/* Wiantex footer + footer-linked information pages */
.wtx-site-footer{
  width:100%;margin-top:auto!important;padding:28px clamp(16px,2.3vw,34px) 30px!important;
  border-top:1px solid var(--border)!important;background:linear-gradient(180deg,transparent,color-mix(in srgb,var(--panel-0) 42%,transparent));
  display:grid!important;grid-template-columns:minmax(230px,1.1fr) minmax(0,2fr);gap:28px!important;align-items:start!important;
}
.wtx-footer-brand{display:flex;gap:12px;align-items:flex-start;min-width:0}.wtx-footer-mark{width:42px;height:42px;flex:0 0 42px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,var(--purple),var(--blue));color:#fff;box-shadow:0 10px 28px color-mix(in srgb,var(--purple) 22%,transparent)}
.wtx-footer-brand strong{display:block;color:var(--text-0);font:800 14px/1.25 Sora,Inter,sans-serif}.wtx-footer-brand p{margin:5px 0 0;color:var(--text-2);font-size:11.5px;line-height:1.55;max-width:360px}.wtx-footer-copy{margin-top:10px;color:var(--text-2);font-size:10.5px}
.wtx-footer-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.wtx-footer-group{min-width:0}.wtx-footer-group b{display:block;margin-bottom:8px;color:var(--text-0);font-size:10px;text-transform:uppercase;letter-spacing:.09em}.wtx-footer-links{display:grid;gap:4px}.wtx-site-footer a{margin:0!important;padding:6px 0;color:var(--text-2)!important;font-size:11.5px;text-decoration:none;transition:.18s ease}.wtx-site-footer a:hover{color:var(--text-0)!important;transform:translateX(2px)}

.wtx-info-page{max-width:1080px;margin:0 auto;padding:2px 0 12px}.wtx-info-hero{position:relative;overflow:hidden;padding:28px;border:1px solid var(--border);border-radius:24px;background:radial-gradient(circle at 100% 0,color-mix(in srgb,var(--purple) 18%,transparent),transparent 34%),linear-gradient(135deg,color-mix(in srgb,var(--purple) 9%,var(--panel-0)),color-mix(in srgb,var(--blue) 5%,var(--panel-0)));box-shadow:0 16px 48px rgba(0,0,0,.12);margin-bottom:14px}.wtx-info-kicker{display:inline-flex;align-items:center;gap:7px;padding:6px 9px;border:1px solid color-mix(in srgb,var(--purple) 25%,var(--border));border-radius:999px;background:color-mix(in srgb,var(--purple) 10%,transparent);color:var(--text-1);font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.wtx-info-hero h1{margin:13px 0 8px;font:800 clamp(26px,4vw,40px)/1.08 Sora,Inter,sans-serif;letter-spacing:-.035em;color:var(--text-0)}.wtx-info-hero p{margin:0;color:var(--text-1);font-size:13.5px;line-height:1.7;max-width:760px}.wtx-info-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px;color:var(--text-2);font-size:10.5px}.wtx-info-meta span{padding:5px 8px;border:1px solid var(--border);border-radius:999px;background:color-mix(in srgb,var(--panel-1) 72%,transparent)}
.wtx-info-nav{display:flex;gap:7px;overflow:auto;padding:2px 0 14px;scrollbar-width:none}.wtx-info-nav::-webkit-scrollbar{display:none}.wtx-info-nav a{white-space:nowrap;text-decoration:none;color:var(--text-1);font-size:11px;font-weight:700;padding:8px 11px;border:1px solid var(--border);border-radius:11px;background:color-mix(in srgb,var(--panel-1) 70%,transparent)}.wtx-info-nav a:hover,.wtx-info-nav a.active{color:var(--text-0);border-color:color-mix(in srgb,var(--purple) 32%,var(--border));background:color-mix(in srgb,var(--purple) 10%,var(--panel-0))}
.wtx-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wtx-info-card{position:relative;padding:22px;border:1px solid var(--border);border-radius:18px;background:linear-gradient(180deg,color-mix(in srgb,var(--panel-1) 86%,transparent),var(--panel-0));min-width:0}.wtx-info-card.full{grid-column:1/-1}.wtx-info-card h2{margin:0 0 10px;color:var(--text-0);font:800 18px/1.25 Sora,Inter,sans-serif}.wtx-info-card h3{margin:18px 0 7px;color:var(--text-0);font-size:13px}.wtx-info-card p,.wtx-info-card li{color:var(--text-1);font-size:12.8px;line-height:1.72}.wtx-info-card p{margin:0 0 10px}.wtx-info-card p:last-child{margin-bottom:0}.wtx-info-card ul,.wtx-info-card ol{margin:0;padding-left:20px;display:grid;gap:7px}.wtx-info-badge{display:inline-flex;align-items:center;gap:6px;margin-bottom:12px;padding:5px 8px;border-radius:9px;background:color-mix(in srgb,var(--purple) 10%,transparent);color:var(--purple);border:1px solid color-mix(in srgb,var(--purple) 20%,transparent);font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.055em}.wtx-info-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.wtx-info-actions .btn{min-height:38px}.wtx-info-note{margin-top:12px;padding:13px 15px;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--panel-1) 60%,transparent);color:var(--text-2);font-size:11px;line-height:1.65}

.wtx-support-page{max-width:840px;margin:0 auto}.wtx-support-page .support-form-card{padding:20px}.wtx-support-page .support-ticket{padding:16px 18px;margin-bottom:10px}

@media(max-width:760px){
  body.wtx-pro-ui .main{padding-bottom:0!important;min-height:100dvh!important;display:flex!important;flex-direction:column!important}
  body.wtx-pro-ui .content-wrap{flex:1 0 auto!important;padding-bottom:28px!important}
  .wtx-site-footer{order:99;grid-template-columns:1fr!important;gap:20px!important;padding:24px 15px calc(106px + env(safe-area-inset-bottom,0px))!important;margin-top:auto!important;align-items:start!important}
  .wtx-footer-groups{grid-template-columns:1fr 1fr;gap:18px 12px}.wtx-footer-group:last-child{grid-column:1/-1}.wtx-footer-brand p{max-width:none}.wtx-footer-links{gap:1px}
  .wtx-info-page{padding:0 0 8px}.wtx-info-hero{padding:21px 17px;border-radius:18px;margin-bottom:10px}.wtx-info-hero h1{font-size:28px}.wtx-info-grid{grid-template-columns:1fr;gap:10px}.wtx-info-card,.wtx-info-card.full{grid-column:auto;padding:18px 16px;border-radius:16px}.wtx-info-nav{margin-inline:-2px;padding-bottom:11px}.wtx-info-nav a{padding:8px 10px}.wtx-support-page{max-width:none}
}
@media(max-width:420px){.wtx-footer-groups{grid-template-columns:1fr}.wtx-footer-group:last-child{grid-column:auto}.wtx-info-hero{padding:19px 15px}.wtx-info-card{padding:16px 14px}}

/* css/google-auth.css */
.oauth-divider{display:flex;align-items:center;gap:12px;margin:16px 0;color:var(--text-2);font-size:12px}.oauth-divider:before,.oauth-divider:after{content:"";height:1px;flex:1;background:var(--border)}.google-auth-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;background:var(--panel-1);border:1px solid var(--border);color:var(--text-0);font-weight:700}.google-auth-btn:hover{border-color:color-mix(in srgb,var(--purple) 55%,var(--border));transform:translateY(-1px)}.google-auth-g{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#fff;color:#4285f4;font:800 14px/1 Arial,sans-serif;box-shadow:0 0 0 1px rgba(0,0,0,.08)}

/* css/social-auth.css */
.social-auth-stack{display:grid;gap:9px}.social-auth-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;font-weight:750;min-height:44px;transition:transform .14s ease,border-color .14s ease,background .14s ease}.social-auth-btn:hover{transform:translateY(-1px)}.social-auth-mark{display:inline-flex;width:23px;height:23px;align-items:center;justify-content:center;flex:0 0 23px;font:800 15px/1 Arial,sans-serif}.discord-auth-btn{background:#5865F2;color:#fff;border-color:#5865F2}.discord-auth-btn:hover{background:#6571f4;border-color:#7480ff}.facebook-auth-btn{background:#1877F2;color:#fff;border-color:#1877F2}.facebook-auth-btn:hover{background:#2b83f3;border-color:#3b8cf4}.facebook-auth-f{font-family:Arial,sans-serif;font-size:22px;font-weight:900}.google-auth-btn{min-height:44px}.google-auth-btn .google-auth-g{width:23px;height:23px;flex:0 0 23px}@media(max-width:520px){.social-auth-btn{min-height:46px}}
