/* =========================================================
   🧭 HEADER
========================================================= */

body.dashboard{

  padding-top:150px;

}

.dashboard .header{
  text-align:center;
  padding:22px;
  background:rgba(255,255,255,.75);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border-soft);
}

.header h1{
  margin:0;
  font-size:24px;
  font-weight:800;
}

.header span{
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
}

.br-clock{
  font-size:12px;
  font-weight:900;
  color:#4f46e5;
  background:rgba(99,102,241,.08);
  border:1px solid rgba(99,102,241,.22);
  padding:6px 10px;
  border-radius:999px;
  white-space:nowrap;
}

.lock-badge-inline{
  margin-left:8px;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  color:#fff;
  background:rgba(17,24,39,.78);
  border:1px solid rgba(255,255,255,.12);
  white-space:nowrap;
}

.pvp-btn[disabled],
#btnBattle[disabled],
#btnPvp[disabled]{
  opacity:.55;
  cursor:not-allowed;
  filter:grayscale(.15);
}

/* =========================================================
   👤 PROFILE
========================================================= */

.profile{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:start;
  gap:12px 28px;
  margin-top:4px;
  padding-bottom:4px;
}

.profile-identity{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  min-width:0;
}

.profile-identity-text{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  width:100%;
}

.profile-nickname{
  margin:0;
  font-size:1.35rem;
  font-weight:800;
  letter-spacing:-0.03em;
  color:#0f172a;
  line-height:1.2;
  max-width:100%;
  word-break:break-word;
}

.titulo-row--compact{
  margin-top:0;
  gap:6px;
}

.titulo-pill--compact{
  font-size:11px;
  font-weight:600;
  padding:4px 10px;
  letter-spacing:0.02em;
  box-shadow:0 2px 6px rgba(99,102,241,.18);
}

.skill-chip{
  display:inline-flex;
  align-items:center;
  font-size:11px;
  font-weight:700;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(99,102,241,.1);
  border:1px solid rgba(99,102,241,.22);
  color:#4338ca;
  white-space:nowrap;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}

.profile .player-main{
  justify-self:end;
  align-self:start;
  min-width:0;
}

.profile .account-badge-row{
  margin-left:0;
  margin-top:0;
  justify-content:flex-end;
}

.avatar-wrap{
  position:relative;
  display:inline-flex;
}

.avatar-frame-wrap{
  border-radius:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  transition:box-shadow .2s ease, padding .2s ease;
}

.avatar-frame-wrap[data-frame="none"]{
  padding:0;
}

.avatar-frame-wrap[data-frame="aurora"]{
  padding:5px;
  background:linear-gradient(135deg,#f472b6,#6366f1,#22d3ee);
  box-shadow:0 0 0 2px rgba(255,255,255,.45) inset,0 8px 24px rgba(99,102,241,.35);
}

.avatar-frame-wrap[data-frame="ouro"]{
  padding:5px;
  background:linear-gradient(135deg,#fde047,#f59e0b,#b45309);
  box-shadow:0 0 0 2px rgba(255,250,220,.5) inset,0 8px 22px rgba(245,158,11,.4);
}

.avatar-frame-wrap[data-frame="elite"]{
  padding:5px;
  background:linear-gradient(135deg,#34d399,#059669,#0f766e);
  box-shadow:0 0 0 2px rgba(255,255,255,.4) inset,0 8px 22px rgba(16,185,129,.35);
}

.avatar-frame-wrap[data-frame="noturno"]{
  padding:5px;
  background:linear-gradient(135deg,#312e81,#1e1b4b,#0f172a);
  box-shadow:0 0 0 2px rgba(129,140,248,.35) inset,0 8px 26px rgba(15,23,42,.55);
}


.dashboard .avatar{

  width:74px;
  height:74px;

  border-radius:20px;

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

  font-size:34px;

  color:white;

  background:
  radial-gradient(circle at 30% 25%, #a78bfa, transparent 60%),
  linear-gradient(135deg,#6366f1,#7c3aed);

  box-shadow:
  0 12px 28px rgba(99,102,241,.35),
  inset 0 2px 6px rgba(255,255,255,.25);

  position:relative;
}


.avatar::after{

  content:"";

  position:absolute;

  inset:-3px;

  border-radius:22px;

  background:linear-gradient(135deg,#a78bfa,#6366f1);

  z-index:-1;

  filter:blur(8px);
  opacity:.45;

}

.avatar-edit-btn{
  position:absolute;
  right:-8px;
  bottom:-8px;
  border:1px solid rgba(99,102,241,.35);
  background:#ffffff;
  color:#4f46e5;
  border-radius:999px;
  width:30px;
  height:30px;
  font-size:14px;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(15,23,42,.18);
}

.avatar-edit-btn:hover{
  transform:translateY(-1px);
}

.avatar-picker-head{
  margin-bottom: 10px;
  font-size: 13px;
  color: #475569;
}

.avatar-opt{
  border: 1px solid #e2e8f0;
}

.avatar-opt-btn{
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.avatar-opt-btn:hover{
  transform: translateY(-1px);
  border-color: #a5b4fc;
  box-shadow: 0 8px 18px rgba(99, 102, 241, .16);
}

.avatar-opt-emoji{
  font-size: 28px;
  line-height: 1;
}

.avatar-opt-badge{
  display: none;
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 999px;
  padding: 2px 6px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, .35);
  white-space: nowrap;
}

.avatar-opt-active{
  border: 2px solid #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}

.avatar-opt-active .avatar-opt-badge{
  display: inline-flex;
}

.info{ margin-left:15px; }

.player-info h2{
  margin:0;
  font-size:22px;
  font-weight:900;
}

/* =========================================================
   🏷️ TITULOS / BADGES
========================================================= */

.titulo{
  display:inline-block;
  margin-top:2px;
  padding:2px 8px;
  border-radius:999px;
  background:linear-gradient(90deg,#6366f1,#8b5cf6);
  color:white;
  font-size:11px;
  font-weight:700;
}

.titulo-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.titulo-reset-btn{
  font-size:11px;
  font-weight:700;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#475569;
  cursor:pointer;
  transition:background .15s ease, border-color .15s ease;
}

.titulo-reset-btn:hover{
  border-color:#94a3b8;
  background:#f8fafc;
}

.titulo-pill{

  background:linear-gradient(135deg,#6366f1,#8b5cf6);

  font-size:12px;
  font-weight:700;

  padding:5px 12px;

  border-radius:999px;

  box-shadow:0 4px 10px rgba(99,102,241,.25);

}

/* Ticket de título personalizado (cupom) — visual diferente para não confundir */
.ticket-custom{
  background:linear-gradient(135deg,#f59e0b,#f97316) !important;
  box-shadow:0 4px 10px rgba(249,115,22,.25) !important;
}

.player-name-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.player-name-row h2{
  margin:0;
}


/* =========================================================
   💰 SABEDORIA
========================================================= */

.sabedoria-box{
  margin-top:6px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  font-weight:700;
  color:#6d28d9;
  background:rgba(124,58,237,.08);
  border:1px solid rgba(124,58,237,.18);
  border-radius:12px;
  padding:4px 10px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5);
}

/* =========================================================
   📊 XP META
========================================================= */

.xp-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:10px;
  gap:12px;
}

.xp-left{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
}

.xp-label{
  font-size:10px;
  font-weight:800;
  letter-spacing:.8px;
  color:#94a3b8;
}

.xp-text{
  font-size:15px;
  font-weight:900;
  color:#4f46e5;
  line-height:1.1;
}

.xp-box{
  margin-top:4px;
}

/* =========================================================
   ⏱️ TEMPO
========================================================= */

.tempo-pill{
  font-size:12px;
  font-weight:800;
  padding:6px 12px;
  border-radius:999px;
  background:linear-gradient(90deg,#6366f1,#8b5cf6);
  color:white;
  box-shadow:
    0 10px 22px rgba(99,102,241,.45),
    0 2px 6px rgba(15,23,42,.12),
    inset 0 0 8px rgba(255,255,255,.18);
  white-space:nowrap;
}

/* =========================================================
   ⚔️ COMBAT CARD (UNIFICADO)
========================================================= */

.combat-card{
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  border-radius:18px;
  padding:18px;
  margin-top:14px;
  margin-bottom:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.combat-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
  font-weight:800;
  font-size:20px;
  color:#4f46e5;
}

.combat-switch{
  display:flex;
  background:#e2e8f0;
  border-radius:999px;
  padding:3px;
  gap:4px;
}

.combat-tab{
  border:none;
  background:transparent;
  padding:6px 14px;
  border-radius:999px;
  font-weight:700;
  font-size:16px;
  cursor:pointer;
  color:#475569;
  position:relative;
  overflow:hidden;
}

.combat-tab.active{
  background:linear-gradient(90deg,#6366f1,#8b5cf6);
  color:white;
}

.combat-pane{
  animation:fadeIn .25s ease;
}

@keyframes fadeIn{
  from{opacity:0; transform:translateY(4px);}
  to{opacity:1; transform:translateY(0);}
}

/* =========================================================
   🔥 MODO PVP GLOBAL
========================================================= */

body.modo-pvp .progress-fill{
  background:linear-gradient(90deg,#ef4444,#f59e0b);
}

.combat-tab.active::after{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:999px;
  background:linear-gradient(120deg,#ef4444,#f59e0b,#ef4444);
  opacity:.0;
  transition:.35s;
}

body.modo-pvp .combat-tab.active{
  background:linear-gradient(135deg,#ef4444,#f59e0b);
  color:white;
  box-shadow:
    0 0 0 1px rgba(239,68,68,.25),
    0 8px 22px rgba(239,68,68,.35);
}

@keyframes pvpFire{
  0%{filter:hue-rotate(0deg)}
  100%{filter:hue-rotate(25deg)}
}

body.modo-pvp .combat-tab.active{
  animation:pvpPulse 1.6s ease-in-out infinite;
}

@keyframes pvpPulse{
  0%,100%{
    box-shadow:
      0 0 0 1px rgba(239,68,68,.25),
      0 8px 22px rgba(239,68,68,.35);
  }
  50%{
    box-shadow:
      0 0 0 2px rgba(239,68,68,.45),
      0 12px 32px rgba(239,68,68,.55);
  }
}

body.modo-pvp .combat-tab.active::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:999px;
  background:linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,.18),
    transparent
  );
  animation:pvpShimmer 2s linear infinite;
  pointer-events:none;
}

@keyframes pvpShimmer{
  0%{ transform:translateX(-120%); }
  100%{ transform:translateX(120%); }
}

/* =========================================================
   ⚡ PVP ENERGY SHINE
========================================================= */

.pvp-progress-bar::after{
  content:"";
  position:absolute;
  top:0;
  left:-40%;
  width:40%;
  height:100%;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.35),
    transparent
  );
  animation:pvpShine 2.8s infinite;
  pointer-events:none;
}

@keyframes pvpShine{
  0%{ left:-40%; }
  100%{ left:120%; }
}

/* =========================================================
   🎯 ACTIONS GRID
========================================================= */

.actions-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin-top:14px;
}

/* =========================================================
   🌐 SOCIAL CARD
========================================================= */

.dashboard .social-card{
  background:
    radial-gradient(circle at 20% 0%, rgba(99,102,241,.08), transparent 60%),
    linear-gradient(180deg,#ffffff,#f8fafc);
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:18px;
  margin-top:22px;
  box-shadow:0 14px 32px rgba(15,23,42,.08);
  position:relative;
  overflow:hidden;
}

.social-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 85% 15%, rgba(99,102,241,.06), transparent 40%);
}

.social-header{
  font-weight:800;
  font-size:16px;
  color:#4f46e5;
  margin-bottom:12px;
  text-align:center;
  letter-spacing:.2px;
}

/* chat */

.chat-preview{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:12px;
  min-height:80px;
  font-size:13px;
  color:#475569;
  line-height:1.45;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}

/* friends */

.friend-preview{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:13px;
  color:#334155;
  margin-top:10px;
}

.friends-title{
  font-size:13px;
  font-weight:700;
  margin-bottom:6px;
}

.friends-mini-list{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:13px;
  max-height:min(280px, 55vh);
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:4px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  scrollbar-color:rgba(99,102,241,.35) transparent;
}

.friends-mini-list::-webkit-scrollbar{
  width:6px;
}

.friends-mini-list::-webkit-scrollbar-thumb{
  background:rgba(99,102,241,.35);
  border-radius:999px;
}

.friends-mini-list::-webkit-scrollbar-track{
  background:transparent;
}

/* =========================================================
   ✨ DASHBOARD POLISH (VISUAL TOP)
========================================================= */
body.dashboard{
  background:
    radial-gradient(1200px 500px at -10% -5%, rgba(99,102,241,.07), transparent),
    radial-gradient(900px 450px at 110% 15%, rgba(139,92,246,.06), transparent),
    #f5f7fb;
  color:#0f172a;
}

.pv-header{
  background:rgba(255,255,255,.88);
  border-bottom:1px solid rgba(148,163,184,.22);
  box-shadow:0 10px 28px rgba(15,23,42,.06);
}

.pv-header-title h1{
  letter-spacing:.2px;
}

.pv-subtitle{
  opacity:.72;
}

body.dashboard > .card.dashboard-main-card.dashboard-hero,
body.dashboard > .smart-notebook,
body.dashboard > .social-card,
body.dashboard > .top-global-card,
body.dashboard > .dashboard-card.tournament-card{
  width:min(980px, calc(100% - 22px));
  margin-left:auto;
  margin-right:auto;
}

body.dashboard > .smart-notebook,
body.dashboard > .social-card,
body.dashboard > .top-global-card,
body.dashboard > .dashboard-card.tournament-card{
  margin-top:16px;
}

.card,
.smart-notebook,
.social-card,
.top-global-card,
.dashboard-card.tournament-card{
  border-radius:20px;
  border:1px solid rgba(148,163,184,.22);
  box-shadow:0 16px 34px rgba(15,23,42,.08);
}

.player-card-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:6px;
  flex-wrap:wrap;
}

.xp-box,
.combat-card{
  border-color:rgba(148,163,184,.2);
  box-shadow:0 10px 22px rgba(15,23,42,.06);
}

.smart-notebook .social-header h3,
.social-card .social-header h3{
  font-size:17px;
  letter-spacing:.2px;
}

.notebook-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.notebook-grid > button,
.notebook-grid > .dash-btn{
  min-height:48px;
  border-radius:14px;
}

.notebook-ai-hint{
  grid-column:1 / -1;
  border-radius:12px;
  background:rgba(99,102,241,.07);
  border:1px solid rgba(99,102,241,.16);
  padding:10px 12px;
}

.global-chat-panel{
  border-radius:14px;
  border:1px solid rgba(148,163,184,.2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}

.social-actions{
  margin-top:12px;
}

.social-actions button{
  min-height:44px;
  border-radius:12px;
}

.friend-preview{
  border-top:1px dashed rgba(148,163,184,.35);
  padding-top:10px;
}

@media (max-width: 760px){
  .pv-header-actions{
    gap:8px;
    padding-right:10px;
  }

  .br-clock{
    font-size:11px;
    padding:5px 8px;
  }

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

  body.dashboard > .card.dashboard-main-card.dashboard-hero,
  body.dashboard > .smart-notebook,
  body.dashboard > .social-card,
  body.dashboard > .top-global-card,
  body.dashboard > .dashboard-card.tournament-card{
    width:calc(100% - 14px);
  }
}

/* actions */

.social-actions{
  display:flex;
  gap:8px;
  margin-top:10px;
}

.social-add-btn,
.social-view-btn{
  flex:1;
  padding:6px 8px;
  font-size:12px;
  border-radius:8px;
  border:none;
  cursor:pointer;
}

.social-add-btn{
  background:#6366f1;
  color:white;
  font-weight:700;
}

.social-view-btn{
  background:#1e293b;
  color:#cbd5e1;
  position: relative;
}

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

.footer{
  text-align:center;
  color:#64748b;
  margin:28px 0 24px 0;
  font-size:13px;
  font-weight:600;
}

/* ===============================
   PLAYER HEADER — PREMIUM
=============================== */

.player-main{

  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;

}

#playerLevel{
  margin-top:4px;
  font-size:14px;
  font-weight:700;
  color:#6366f1;
}

.player-top{

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

}

.player-top h2{

  margin:0;
  font-size:22px;
  font-weight:900;

}

/* sabedoria versão chip (🔥 melhor) */

.sabedoria-chip{
  font-size:12px;
  font-weight:700;
  padding:5px 11px;
  border-radius:999px;
  background:rgba(237,233,254,.85);
  border:1px solid rgba(124,58,237,.2);
  color:#5b21b6;
  white-space:nowrap;
  max-width:min(100%, 260px);
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ===============================
   FRIEND ROW PREMIUM
=============================== */

.friend-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 6px;
  border-radius:10px;
  transition:.15s;
  cursor: default; /* remove sensação de botão */
}

.friend-row:hover{
  background:rgba(99,102,241,.06);
}

/* left */

.friend-left{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.friend-avatar{
  font-size:16px;
}

/* status dot */

.friend-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  display:inline-block;
}

.friend-dot.online{
  background:#22c55e;
  box-shadow:0 0 6px rgba(34,197,94,.7);
}

.friend-dot.offline{
  background:#64748b;
}

/* meta */

.friend-meta{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.friend-name{
  font-weight:700;
  font-size:13px;
  color:#0f172a;
}

.friend-level{
  font-size:11px;
  color:#64748b;
}

/* actions */

.friend-actions{
  display:flex;
  pointer-events: auto;
  gap:4px;
}

.friend-search{
  width:100%;
  margin:6px 0 8px 0;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid #e2e8f0;
  font-size:13px;
  outline:none;
}

.friend-search:focus{
  border-color:#6366f1;
  box-shadow:0 0 0 2px rgba(99,102,241,.15);
}
.friend-row *{
  pointer-events: auto;
}

.dm-row{
  display:flex;
  margin-bottom:8px;
}

.dm-row.me{
  justify-content:flex-end;
}

.dm-row.other{
  justify-content:flex-start;
}

.dm-bubble{
  max-width:75%;
  padding:10px 12px;
  border-radius:14px;
  font-size:13px;
  line-height:1.35;
  background:#1e293b;
  color:white;
}

.dm-row.me .dm-bubble{
  background:linear-gradient(135deg,#6366f1,#8b5cf6);
}

.dm-typing{
  font-size:12px;
  opacity:.7;
  padding:6px 14px;
  color:#94a3b8;
  animation: fadeTyping .25s ease;
}

@keyframes fadeTyping{
  from{opacity:0; transform:translateY(4px);}
  to{opacity:.7; transform:translateY(0);}
}

.dm-header-actions{
  display:flex;
  gap:6px;
  align-items:center;
}

/* ========================================
   🔔 FRIENDS BADGE — FIX HARD
======================================== */

.social-view-btn .friends-badge {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;

  min-width: 18px !important;
  height: 18px !important;
  padding: 0 6px !important;

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

  font-size: 11px !important;
  font-weight: 800 !important;
  color: #ffffff !important;

  background: linear-gradient(135deg, #ef4444, #f97316) !important;
  border-radius: 999px !important;
  border: 2px solid rgba(2,6,23,.9) !important;

  box-shadow:
    0 0 0 1px rgba(0,0,0,.35),
    0 4px 12px rgba(239,68,68,.35) !important;

  z-index: 50 !important;
  pointer-events: none;
}

.social-view-btn .friends-badge:not(:empty) {
  animation: badgePulse 1.6s ease-in-out infinite;
}

@keyframes badgePulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}


.
/* =========================
   🏆 TOP GLOBAL PREMIUM
========================= */

.top-global-card{
  background: linear-gradient(135deg,#ffffff,#f7f8ff);
  border-radius:20px;
  padding:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  margin-top:18px;
}

.top-global-placeholder{
  padding:14px 12px;
  border-radius:14px;
  background:#f8fafc;
  border:1px dashed #cbd5e1;
}
.top-global-placeholder-title{
  margin:0 0 8px;
  font-weight:800;
  font-size:0.95rem;
  color:#0f172a;
}
.top-global-placeholder-text{
  margin:0;
  font-size:0.88rem;
  line-height:1.55;
  color:#64748b;
}

.top-global-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}

.my-rank-badge{
  background:linear-gradient(135deg,#6c5ce7,#8e7dff);
  color:#fff;
  padding:6px 12px;
  border-radius:999px;
  font-weight:700;
  font-size:13px;
}
.top-player *{
  min-width:0;
}

.top-player{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-radius:14px;
  margin-bottom:8px;
  transition:.25s;

  width:100%;
  min-width:0;            /* já sugerido */
  overflow:hidden;        /* ⭐⭐⭐ ESSENCIAL */
}

.top-player:hover{
  background:#f3f5ff;
  transform:translateY(-1px);
}

.top-player.first{
  background:linear-gradient(135deg,#fff7cc,#fff1a6);
  box-shadow:0 6px 18px rgba(255,200,0,.25);
}

.top-rank{
  font-weight:900;
  width:32px;
}

.top-avatar{
  font-size:28px;
}

.top-name{
  font-weight:700;
  min-width:0;
  flex:1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.top-score{
  font-weight:900;
  color:#6c5ce7;
}

.rank-on{
  background:linear-gradient(135deg,#00b894,#00cec9);
}

.rank-off{
  background:#a29bfe;
}

.top-name-wrap{
  display:flex;
  flex-direction:column;
  gap:2px;

  flex: 1 1 auto;     /* ⭐⭐⭐ IMPORTANTE */
  min-width: 0;       /* ⭐⭐⭐ CRÍTICO */
  overflow:hidden;    /* ⭐⭐⭐ ADICIONE */
}

.top-tier{
  font-size:12px;
  font-weight:700;
  opacity:.7;
}

.top-score{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
}

.score-value{
  font-weight:900;
  font-size:18px;
}

.score-label{
  font-size:11px;
  opacity:.6;
}

.rank-badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  white-space:nowrap;
  gap: 6px;
}

/* 👑 elite */
.rank-badge.elite {
  background: linear-gradient(135deg, #f6d365, #fda085);
  color: #5a3b00;
  box-shadow: 0 4px 14px rgba(255, 190, 60, 0.35);
}

/* 📍 normal */
.rank-badge.normal {
  background: #ecebff;
  color: #5b5bd6;
}

/* 📊 amostra insuficiente (alinhado ao analytics) */
.rank-badge.muted {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
}

.skill-meta{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;

  min-width: 90px;     /* ⭐ menor base */
  flex-shrink:0;
  text-align:right;
}

.skill-score-big {
  font-size: 22px;
  font-weight: 900;
  color: #6c63ff;
  line-height: 1;
  min-width:28px;
}

.skill-label {
  font-size: 11px;
  font-weight: 600;
  color: #9aa3b2;
  letter-spacing: .2px;
}

.skill-trend {
  font-size: 12px;
  font-weight: 700;
}

.skill-trend.up {
  color: #22c55e;
}

.skill-trend.down {
  color: #ef4444;
}

.skill-trend.stable {
  color: #94a3b8;
}

@media (max-width: 480px){
	
	
  .skill-meta{
    min-width: 64px;      /* ⭐⭐⭐ chave do mobile */
  }

  .top-player{
    gap:10px;
  }

  .top-name{
    font-size:14px;
  }

  .skill-score-big{
    font-size:18px;
  }

  .skill-label{
    font-size:10px;
  }

  .skill-label::before{
    content:"Score";
  }

  .skill-label{
    color:transparent;
    position:relative;
  }

  .skill-label::before{
    position:absolute;
    left:0;
    color:#9aa3b2;
  }

}

  .skill-trend{
    font-size:11px;
  }
}

@media (max-width:480px){
  .top-player{
    gap:8px;
  }

  .top-avatar{
    font-size:24px;
  }

  .skill-score-big{
    font-size:17px;
  }
}

@media (max-width: 480px){

  .skill-meta{
    min-width:auto;      /* ⭐⭐⭐ MUDANÇA REAL */
    flex:0 0 auto;
  }

  .top-score{
    min-width:auto;
  }

}

/* =========================================
   🧠 TRAINING FILTER — PLAYNAVAGA
========================================= */

.training-filter{
  margin-bottom:10px;
  display:flex;
  justify-content:center;
}

.training-toggle{
  display:flex;
  gap:6px;
  background:#eef2ff;
  padding:4px;
  border-radius:999px;
  width:fit-content;
}

.train-opt{
  border:none;
  background:transparent;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  color:#64748b;
  cursor:pointer;
  transition:all .18s ease;
}

.train-opt.active{
  background:linear-gradient(135deg,#6366f1,#8b5cf6);
  color:#fff;
  box-shadow:0 6px 14px rgba(99,102,241,.28);
}

.train-opt:hover:not(.active){
  color:#4f46e5;
}

.training-refine{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  max-width:420px;
  margin-left:auto;
  margin-right:auto;
  transition:opacity .18s ease;
}

.training-refine-label{
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#64748b;
  width:100%;
  text-align:center;
}

.training-select{
  flex:1 1 140px;
  min-width:140px;
  font-size:12px;
  font-weight:600;
  color:#334155;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(99,102,241,.22);
  background:#fff;
  cursor:pointer;
}

.training-select:focus{
  outline:none;
  border-color:#6366f1;
  box-shadow:0 0 0 3px rgba(99,102,241,.15);
}

/* =========================================================
   🧠 IA HINT — missão foco
========================================================= */

.mission-focus-hint{
  margin-top:10px;
  font-size:12px;
  font-weight:600;
  color:#6366f1;
  text-align:center;
  opacity:.9;

  background:rgba(99,102,241,.08);
  border:1px solid rgba(99,102,241,.18);
  border-radius:10px;
  padding:6px 10px;

  animation:missionHintFade .25s ease;
}

@keyframes missionHintFade{
  from{ opacity:0; transform:translateY(-4px); }
  to{ opacity:.9; transform:translateY(0); }
}

/* =========================================================
   ✨ HELPER TEXT — PREMIUM SPACING
========================================================= */

.helper-text{
  display:block;
  margin-top:14px;
  padding:10px 12px;

  font-size:12.5px;
  font-weight:600;
  line-height:1.4;
  text-align:center;

  color:#64748b;

  background:rgba(255,255,255,.55);
  border:1px solid rgba(99,102,241,.12);
  border-radius:12px;

  box-shadow:0 4px 12px rgba(15,23,42,.06);
}

/* versão mais suave em telas grandes */
@media (min-width: 768px){
  .helper-text{
    margin-top:16px;
    font-size:13.5px;
  }
}

/* =========================================================
   🔥 PvP CTA — HOT STATE (PREMIUM)
========================================================= */

.pvp-btn.pvp-hot{
  position:relative;
  overflow:hidden;

  background:linear-gradient(135deg,#ff7a18,#ff3d00);
  box-shadow:
    0 10px 28px rgba(255,61,0,.35),
    0 0 0 1px rgba(255,255,255,.12) inset;

  animation:pvpHotPulse 2.4s ease-in-out infinite;
}

/* aura suave */
.pvp-btn.pvp-hot::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:inherit;
  background:linear-gradient(120deg,
    rgba(255,140,0,.0) 20%,
    rgba(255,140,0,.35),
    rgba(255,61,0,.0) 80%);
  opacity:.6;
  pointer-events:none;
  animation:pvpHotSweep 3s linear infinite;
}

/* pulsação elegante */
@keyframes pvpHotPulse{
  0%,100%{
    transform:translateY(0);
    box-shadow:
      0 10px 28px rgba(255,61,0,.30),
      0 0 18px rgba(255,122,24,.25);
  }
  50%{
    transform:translateY(-1px);
    box-shadow:
      0 16px 36px rgba(255,61,0,.45),
      0 0 26px rgba(255,122,24,.45);
  }
}

/* sweep de energia */
@keyframes pvpHotSweep{
  from{ transform:translateX(-120%); }
  to{ transform:translateX(120%); }
}

/* =========================
   🏆 TOP GLOBAL — HEADER FIX MOBILE
========================= */

@media (max-width: 480px){

  .top-global-header{
    align-items:flex-start;
    gap:10px;
  }

  .top-global-header h3{
    font-size:16px;
    line-height:1.2;
    max-width:65%;
  }

  .rank-badge,
  .my-rank-badge,
  #rankBadge{
    font-size:11px;
    padding:6px 10px;
    white-space:nowrap;
    flex-shrink:0;
  }

}

/* ========================================
   🔔 PUSH TOGGLE MINIMAL
======================================== */

.card{
  padding:14px 22px 18px 22px;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff,#f8fafc);
}

.push-cta {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
}

.push-btn.minimal {
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.35);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}

.push-btn.minimal.active {
  background: linear-gradient(135deg,#6366f1,#4f46e5);
  color: white;
  border: none;
  box-shadow: 0 6px 18px rgba(79,70,229,.35);
}

.push-btn.minimal:hover {
  transform: scale(1.05);
}

/* ========================================
   📱 MOBILE PROFILE CLEAN
======================================== */

@media (max-width: 768px) {

  .profile {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .profile .player-main {
    justify-self: stretch;
    width: 100%;
  }

  .profile .account-badge-row {
    justify-content: flex-start;
  }

  .profile-nickname {
    font-size: 1.15rem;
  }


  .player-sub {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 6px;
  }

}


/* ========================================
   🔥 GLOBAL TOAST
======================================== */

#globalToastContainer {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.global-toast {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

.global-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.global-toast.info {
  background: linear-gradient(135deg,#6366f1,#4f46e5);
}

.global-toast.success {
  background: linear-gradient(135deg,#10b981,#059669);
}

.global-toast.error {
  background: linear-gradient(135deg,#ef4444,#dc2626);
}



.biometric-toggle{
  display:flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
}

.biometric-toggle input{
  width:36px;
  height:18px;
}


.icon-btn{
  font-size:18px;
  border:none;
  background:none;
  cursor:pointer;
  opacity:0.4;
  transition:0.2s;
}

.icon-btn.active{
  opacity:1;
  transform:scale(1.1);
}

.icon-btn:hover{
  opacity:0.8;
}

.logout-btn{
  display:flex;
  align-items:center;
  gap:6px;

  border:none;
  background:transparent;
  cursor:pointer;

  font-weight:600;
  font-size:14px;
  color:#334155;
}

.logout-btn:hover{
  background:#334155;
}

/* mobile */
.logout-text{
  display:none;
}

/* desktop */
@media (min-width:900px){

  .logout-btn{
    background:#f1f5f9;
    padding:6px 12px;
    border-radius:10px;
  }

  .logout-text{
    display:inline;
  }

}



.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 20px;
  background:#f5f6fb;
}

.topbar-left{
  display:flex;
  flex-direction:column;
}

.topbar-left h1{
  margin:0;
  font-size:20px;
}

.subtitle{
  font-size:12px;
  color:#777;
}

.topbar-right{
  display:flex;
  align-items:center;
  gap:12px;
}

/* Antes: só `color:#f59e0b` com ID — ganhava à classe .pv-icon-btn.active e o sino não ficava como a biometria (fundo roxo + ícone claro). */

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

/* =========================================
   HEADER
========================================= */

.pv-header{

  position:fixed;

  top:0;
  left:0;
  right:0;

  z-index:1000;

  background:#f3f4f6;

  backdrop-filter:blur(8px);

  padding-top:18px;
  padding-bottom:12px;

}

.pv-header.scrolled{

  box-shadow:0 6px 18px rgba(0,0,0,0.08);

}

.pv-header-title{

  text-align:center;
}

.pv-subtitle{

  display:block;
  margin-top:4px;
  opacity:0.7;
}

.pv-header-actions{

  width:100%;

  display:flex;

  justify-content:flex-end;

  gap:10px;

  padding-right:16px;

  margin-top:4px;
}

/* =========================================
   HEADER BUTTONS
========================================= */

.pv-icon-btn{

  width:38px;
  height:38px;

  border-radius:10px;

  border:none;

  -webkit-appearance:none;
  appearance:none;

  background:rgba(99,102,241,0.08);

  font-size:18px;

  cursor:pointer;

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

  transition:all .18s ease;
}

.pv-icon-btn:hover{

  background:rgba(99,102,241,0.18);

  transform:translateY(-1px);
}

/* =========================================
   ICON ACTIVE STATE
========================================= */

.pv-icon-btn.active{

  background:#6366f1;

  color:white;

  box-shadow:0 0 8px rgba(99,102,241,.45);
}

/* Garante o mesmo contraste do #biometricToggle em WebView/TWA (alguns temas sobrepõem button). */
#enablePushBtn.pv-icon-btn.active,
#enablePushBtn[data-push-active="1"]{
  background:#6366f1 !important;
  color:#fff !important;
  box-shadow:0 0 8px rgba(99,102,241,.45) !important;
}


.pv-icon-btn.logout{

  background:rgba(239,68,68,0.08);
}

.pv-icon-btn.logout:hover{

  background:rgba(239,68,68,0.2);
}

.dashboard-title{

  margin-top:12px;
}


.hero-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:18px;
}

.hero-train{
  width:100%;
  padding:18px;

  border-radius:16px;
  border:none;

  font-size:18px;
  font-weight:900;

  color:white;

  background:linear-gradient(135deg,#6366f1,#8b5cf6);

  box-shadow:0 12px 30px rgba(99,102,241,.45);
}

.hero-pvp{
  width:100%;
  padding:14px;

  border-radius:14px;
  border:1px solid #6366f1;

  font-weight:800;

  background:white;
  color:#6366f1;
}


.player-hud{

  position:absolute;

  top:-12px;
  left:0;
  right:0;

  display:flex;
  justify-content:space-between;

  padding:0 16px;

  pointer-events:none;

}


.account-badge-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-left:8px;
  margin-top:4px;
}

.account-cta-btn{
  border:none;
  cursor:pointer;
  font-size:12px;
  font-weight:800;
  padding:8px 14px;
  border-radius:999px;
  white-space:nowrap;
  min-height:44px;
  -webkit-tap-highlight-color:transparent;
}

.account-cta--manage{
  background:linear-gradient(135deg,#0f172a,#334155);
  color:#e2e8f0;
  border:1px solid rgba(148,163,184,.35);
}

.account-cta--subscribe{
  background:linear-gradient(135deg,#f59e0b,#ea580c);
  color:#1f2937;
  border:1px solid rgba(251,191,36,.55);
  box-shadow:0 4px 18px rgba(234,88,12,.35);
  animation:accountCtaPulse 2.8s ease-in-out infinite;
}

@keyframes accountCtaPulse{
  0%,100%{ transform:scale(1); }
  50%{ transform:scale(1.03); }
}

@media (max-width:480px){
  .account-badge-row{
    width:100%;
    margin-left:0;
  }
}

.dashboard .account-badge.free{
  background:#334155;
  color:#cbd5e1;
  border:1px solid rgba(148,163,184,.25);
}

.dashboard .account-badge.premium,
.dashboard .account-badge.premium-ending{
  font-size:12px;
  font-weight:900;
  padding:6px 14px;
  border-radius:999px;
  color:#78350f;
  background:linear-gradient(135deg,#fbbf24,#f59e0b);
  border:1px solid rgba(251,191,36,.55);
  box-shadow:0 0 12px rgba(251,191,36,.35);
}


#nivel{

  font-size:14px;
  font-weight:800;

  color:#6366f1;

}

#nivel::before{


  opacity:.7;

}
.performance-alert{
  display:flex;
  justify-content:center;
  align-items:center;
}

.perf-badge{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;

  width:118px;
  min-height:96px;

  border-radius:18px;
  background:rgba(255,255,255,0.72);
  backdrop-filter:blur(8px);

  cursor:pointer;
  transition:transform .28s ease, box-shadow .28s ease, border-color .28s ease, background .28s ease;
  transform:scale(.94);
  padding:10px 12px 8px;
  box-shadow:0 4px 18px rgba(15,23,42,.08);
}

.perf-badge:hover{
  transform:translateY(-3px) scale(0.97);
  box-shadow:0 10px 28px rgba(15,23,42,.12);
}

/* cérebro — emoji acima do preenchimento */
.perf-brain{
  position:relative;
  width:52px;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

.perf-brain-icon{
  position:relative;
  z-index:2;
  font-size:30px;
  line-height:1;
  pointer-events:none;
  filter:drop-shadow(0 2px 3px rgba(15,23,42,.2));
  transition:transform .35s ease, filter .35s ease;
}

/* progress fill — atrás do emoji */
.perf-brain-fill{
  position:absolute;
  left:2px;
  right:2px;
  bottom:2px;
  width:auto;
  height:0%;
  background:linear-gradient(
    to top,
    #ef4444,
    #fb923c,
    #4ade80,
    #38bdf8,
    #818cf8
  );
  border-radius:10px;
  opacity:.5;
  z-index:1;
  transition:height .65s cubic-bezier(.4,.14,.3,1), opacity .35s ease;
}

/* texto */
.perf-text{
  font-size:11px;
  font-weight:700;
  margin-top:8px;
  opacity:.92;
  text-align:center;
  line-height:1.25;
  max-width:104px;
}

.perf-badge.bad{
  border:1px solid rgba(248,113,113,.45);
  background:rgba(254,226,226,.35);
}

.perf-badge.good{
  border:1px solid rgba(52,211,153,.55);
  background:linear-gradient(165deg, rgba(236,253,245,.95), rgba(224,231,255,.88));
}

.perf-badge.neutral{
  border:1px solid rgba(129,140,248,.4);
  background:rgba(248,250,252,.85);
}

/* --- Desempenho baixo: apagado, pequeno, pulso de alerta --- */
.perf-badge.bad{
  transform:scale(0.86);
  box-shadow:0 2px 12px rgba(185,28,28,.12);
}

.perf-badge.bad:hover{
  transform:translateY(-2px) scale(0.88);
}

.perf-badge.bad .perf-brain-icon{
  font-size:26px;
  filter:grayscale(.92) brightness(.72) drop-shadow(0 1px 1px rgba(0,0,0,.15));
}

.perf-badge.bad .perf-brain-fill{
  opacity:.22;
  border-radius:8px;
}

.perf-badge.bad .perf-text{
  color:#dc2626;
  font-weight:700;
  opacity:.95;
}

.perf-badge.bad.pulse{
  animation:brainPulseBad 2s ease-in-out infinite;
}

@keyframes brainPulseBad{
  0%, 100%{ transform:scale(0.86); box-shadow:0 2px 12px rgba(185,28,28,.12); }
  50%{ transform:scale(0.9); box-shadow:0 4px 16px rgba(220,38,38,.22); }
}

/* --- Média: respiração leve, presença moderada --- */
.perf-badge.neutral.perf-breathe{
  animation:brainBreathe 3.2s ease-in-out infinite;
}

@keyframes brainBreathe{
  0%, 100%{ transform:scale(0.94); }
  50%{ transform:scale(0.98); }
}

.perf-badge.neutral .perf-brain-icon{
  font-size:30px;
}

.perf-badge.neutral .perf-brain-fill{
  opacity:.42;
}

.perf-badge.neutral .perf-text{
  color:#475569;
}

.perf-badge.neutral:hover{
  transform:translateY(-3px) scale(0.98);
}

/* --- Alto: grande, brilhante, pulsante e “vivo” --- */
.perf-badge.good{
  width:132px;
  min-height:108px;
  transform:scale(1.02);
  border-width:2px;
  box-shadow:
    0 8px 32px rgba(16,185,129,.22),
    0 0 0 1px rgba(255,255,255,.5) inset;
}

.perf-badge.good.perf-alive{
  animation:brainAlive 2.4s ease-in-out infinite;
}

@keyframes brainAlive{
  0%, 100%{
    transform:scale(1.02) translateY(0);
    box-shadow:
      0 8px 32px rgba(16,185,129,.24),
      0 0 28px rgba(52,211,153,.35),
      0 0 0 1px rgba(255,255,255,.55) inset;
  }
  50%{
    transform:scale(1.07) translateY(-2px);
    box-shadow:
      0 14px 40px rgba(16,185,129,.32),
      0 0 36px rgba(56,189,248,.4),
      0 0 0 1px rgba(255,255,255,.65) inset;
  }
}

.perf-badge.good:hover{
  transform:translateY(-4px) scale(1.08) !important;
  animation:none;
  box-shadow:
    0 16px 44px rgba(16,185,129,.35),
    0 0 40px rgba(56,189,248,.45);
}

.perf-badge.good .perf-brain{
  width:58px;
  height:58px;
}

.perf-badge.good .perf-brain-icon{
  font-size:38px;
  filter:drop-shadow(0 3px 6px rgba(16,185,129,.45)) saturate(1.15);
}

.perf-badge.good .perf-brain-fill{
  opacity:.78;
  left:0;
  right:0;
  bottom:0;
  border-radius:12px;
}

.perf-badge.good .perf-text{
  color:#047857;
  font-weight:800;
  letter-spacing:.02em;
}

@media (prefers-reduced-motion: reduce){
  .perf-badge.bad.pulse,
  .perf-badge.neutral.perf-breathe,
  .perf-badge.good.perf-alive{
    animation:none !important;
  }
}

.adminOverlay {

position: fixed;
top: 0;
left: 0;

width: 100%;
height: 100%;

background: #020617;

z-index: 9999;

display: flex;
flex-direction: column;

}

.adminOverlay.hidden {
display:none;
}

.adminTopBar {

height:60px;
background:#0f172a;

display:flex;
align-items:center;
padding:0 20px;

border-bottom:1px solid #334155;

}

.adminTopBar button {

background:#1e293b;
color:white;
border:none;

padding:8px 16px;
border-radius:8px;
cursor:pointer;

}

.adminOverlay iframe {

flex:1;
border:none;
width:100%;

}

.set-password-banner{
  margin:10px;
  padding:12px;
  border-radius:12px;
  background:linear-gradient(90deg,#f59e0b,#f97316);
  color:#fff;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:600;
}

.ranking-footer{
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.7;
  text-align: center;
}

/* =========================================================
   🌐 Chat global + hero / footer (UX)
========================================================= */

.dashboard-main-card.dashboard-hero{
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(99, 102, 241, 0.12), transparent 55%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.global-chat-panel{
  margin-bottom: 16px;
  padding: 14px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.global-chat-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 800;
  font-size: 15px;
  color: #1e293b;
}

.global-chat-quota{
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-align: right;
  line-height: 1.3;
}

.global-chat-quota-pill{
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #4338ca;
  font-weight: 800;
  font-size: 10px;
  margin-right: 4px;
}

.global-chat-feed{
  max-height: 180px;
  overflow-y: auto;
  padding: 8px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 13px;
  margin-bottom: 10px;
}

.global-chat-line{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  line-height: 1.35;
}

.global-chat-line-main{
  flex: 1;
  min-width: 0;
}

.global-chat-report{
  flex-shrink: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  opacity: 0.65;
  transition: opacity 0.15s, background 0.15s;
}

.global-chat-report:hover{
  opacity: 1;
  background: rgba(239, 68, 68, 0.12);
}

.global-chat-emojis{
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0 0 8px;
  padding: 6px 4px;
}

.global-chat-emoji-btn{
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.global-chat-emoji-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.global-chat-who{
  font-weight: 800;
  color: #6366f1;
  margin-right: 6px;
}

.global-chat-text{
  color: #334155;
  word-break: break-word;
}

.global-chat-empty{
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  padding: 12px 4px;
}

.global-chat-compose{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.global-chat-compose input{
  flex: 1 1 140px;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.global-chat-send{
  flex: 0 0 auto;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  min-height: 44px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

@media (max-width: 520px){
  .global-chat-compose{
    flex-direction: column;
    align-items: stretch;
  }
  .global-chat-send{
    width: 100%;
  }
}

.global-chat-send:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}

.global-chat-hint{
  margin: 8px 0 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}

.dashboard-footer{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 12px 28px;
  font-size: 12px;
  color: #64748b;
}

.dashboard-footer .footer-meta{
  text-align: center;
  width: 100%;
}

.dashboard-footer .footer-beta-link{
  display: block;
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
}

.dashboard-footer .footer-beta-link:hover{
  color: #6366f1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-logout{
  background: transparent;
  border: none;
  color: #6366f1;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
  padding: 4px 8px;
}

.footer-logout:hover{
  color: #4338ca;
}

.footer-meta{
  opacity: 0.85;
}

/* =========================================================
   📂 DASHBOARD — SEÇÕES RECOLHÍVEIS (menos denso)
========================================================= */

.visually-hidden{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.dash-details{
  margin:12px 0;
  border-radius:16px;
  border:1px solid var(--border-soft, #e2e8f0);
  background:rgba(255,255,255,.72);
  overflow:hidden;
}

.dash-details > summary.dash-details-summary{
  list-style:none;
  cursor:pointer;
  padding:14px 16px;
  font-weight:800;
  font-size:15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  user-select:none;
}

.dash-details > summary::-webkit-details-marker{
  display:none;
}

.dash-details > summary.dash-details-summary::after{
  content:"▸";
  margin-left:auto;
  color:#475569;
  font-size:14px;
  line-height:1;
  transition:transform .2s ease, color .2s ease;
}

.dash-details[open] > summary.dash-details-summary::after{
  transform:rotate(90deg);
  color:#4338ca;
}

.dash-details > summary.dash-details-summary:hover::after{
  color:#4f46e5;
}

.dash-details-hint{
  font-size:12px;
  font-weight:600;
  color:#64748b;
}

.dash-details-inner{
  padding:0 14px 14px;
}

.guild-panel{
  font-size:14px;
}

.guild-panel-load,
.guild-err,
.guild-empty{
  color:#64748b;
  font-weight:600;
  margin:0;
}

.guild-actions{
  margin-bottom:10px;
}

.guild-box .guild-meta{
  font-size:12px;
  color:#64748b;
  margin:6px 0 12px;
}

.guild-tag{
  font-weight:800;
  color:#6366f1;
}

.guild-row{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  padding:8px 0;
  border-bottom:1px solid #e2e8f0;
}

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

.guild-join-btn{
  min-height:36px;
  padding:6px 12px;
  border-radius:10px;
  border:none;
  font-weight:800;
  cursor:pointer;
  background:linear-gradient(135deg,#6366f1,#8b5cf6);
  color:#fff;
}

.guild-mission-head{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.guild-mission-progress{
  width:100%;
  height:10px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
  margin-top:8px;
}

.guild-mission-progress-fill{
  height:100%;
  background:linear-gradient(90deg,#22c55e,#4f46e5);
}

.guild-reward-list{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.guild-reward-chip{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  background:rgba(79,70,229,.1);
  color:#312e81;
  border:1px solid rgba(79,70,229,.22);
}

.guild-mission-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  padding:6px 0;
  border-bottom:1px solid #e2e8f0;
}

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

.rankBadge--inline{
  font-size:11px;
  margin-left:8px;
  vertical-align:middle;
}

.dash-details-summary-main{
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 520px){
  .dash-details > summary.dash-details-summary{
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .rankBadge--inline{
    margin-left: 0;
    margin-top: 6px;
    width: 100%;
    display: inline-block;
  }
}

.social-header--in-details{
  height:0;
  margin:0;
  padding:0;
  overflow:hidden;
}

/* =========================================================
   💬 DM — alerta flutuante (mensagens não lidas)
========================================================= */

.dm-floating-alert{
  position:fixed;
  right:max(12px, env(safe-area-inset-right, 0px));
  bottom:max(12px, env(safe-area-inset-bottom, 0px));
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-width:56px;
  height:56px;
  padding:0 14px;
  border:none;
  border-radius:999px;
  cursor:pointer;
  background:linear-gradient(135deg,#6366f1,#8b5cf6);
  color:#fff;
  box-shadow:0 12px 32px rgba(99,102,241,.42);
  font:inherit;
  transition:transform .15s ease, box-shadow .15s ease;
}

.dm-floating-alert:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 36px rgba(99,102,241,.5);
}

.dm-floating-alert__icon{
  font-size:1.35rem;
  line-height:1;
}

.dm-floating-alert__n{
  position:absolute;
  top:-5px;
  right:-2px;
  min-width:22px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  background:linear-gradient(135deg,#ef4444,#f97316);
  color:#fff;
  font-size:11px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid #fff;
  box-shadow:0 2px 8px rgba(239,68,68,.35);
}

/* =========================================================
   🎯 Dica de concurso alvo — Arena de Treino (PvM)
========================================================= */

.pvm-concurso-hint{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 12px;
  margin:0 0 12px;
  border-radius:12px;
  background:linear-gradient(135deg, rgba(99,102,241,.1), rgba(139,92,246,.06));
  border:1px solid rgba(99,102,241,.18);
}

.pvm-concurso-hint-icon{
  flex-shrink:0;
  font-size:1.15rem;
  line-height:1.35;
}

.pvm-concurso-hint-text{
  flex:1;
  margin:0;
  font-size:12px;
  font-weight:600;
  color:#475569;
  line-height:1.45;
}