/* ============================================================
   css/pages.css — Adivinha Quem É? (páginas internas: legais, perfil, prêmios)
   ============================================================ */
:root {
  --bg: #070a12; --card: rgba(18,24,40,0.72);
  --card-border: rgba(255,255,255,0.08);
  --gold: #c8aa6e; --gold-soft: #e0c489;
  --blue: #0ac8b9; --glow: rgba(200,170,110,0.10);
  --text: #e8e6e3; --muted: #8b93a7;
  --danger: #ff5c5c; --success: #3ddc84;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(900px 500px at 15% -10%, rgba(200,170,110,0.18), transparent 60%), radial-gradient(800px 500px at 100% 20%, rgba(10,200,185,0.12), transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text); min-height: 100vh; line-height: 1.7;
}
.hidden { display: none !important; }
.container { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: rgba(11,14,23,0.85);
  border: 1px solid var(--card-border); border-radius: 14px;
  margin-bottom: 20px; position: sticky; top: 8px; z-index: 30;
  backdrop-filter: blur(6px);
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-logo {
  width: 36px; height: 36px; display: grid; place-items: center;
  font-size: 19px; font-weight: 900; color: #0b0e17; border-radius: 11px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--blue));
}
.topbar-title { font-weight: 900; font-size: 17px; color: var(--text); }
.back-link { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.back-link:hover { color: var(--gold-soft); }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 18px; padding: 28px; margin-bottom: 16px; box-shadow: 0 18px 40px rgba(0,0,0,0.35); backdrop-filter: blur(10px); }
h1 { font-size: 26px; color: var(--gold-soft); margin-bottom: 6px; }
.updated { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
h2 { font-size: 17px; color: var(--gold); margin: 22px 0 8px; }
p, li { font-size: 14px; color: var(--text); margin-bottom: 8px; }
ul { padding-left: 20px; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
th, td { text-align: left; padding: 10px; border: 1px solid var(--card-border); }
th { background: var(--glow); color: var(--gold-soft); }
.table-wrap { overflow-x: auto; }
.highlight {
  background: var(--glow); border-left: 3px solid var(--gold);
  padding: 10px 14px; border-radius: 8px; font-size: 13px; color: var(--muted); margin: 12px 0;
}
.todo { color: var(--danger); font-weight: 700; }
a { color: var(--blue); }

/* Formulários (perfil) */
.field-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .5px; }
.input {
  width: 100%; padding: 11px 14px; font-size: 15px; font-family: inherit;
  color: var(--text); background: rgba(0,0,0,0.3);
  border: 1px solid var(--card-border); border-radius: 10px; outline: none;
}
.input:focus { border-color: var(--gold); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row .input { flex: 1; min-width: 180px; }
.btn {
  padding: 11px 18px; font-size: 14px; font-weight: 800; font-family: inherit;
  border: none; border-radius: 10px; cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold { background: linear-gradient(145deg, var(--gold-soft), var(--gold)); color: #1a1408; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--card-border); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.consent-label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 10px; }
.msg { font-size: 13px; margin-top: 8px; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--success); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 8px; }
.stat { background: rgba(0,0,0,0.25); border: 1px solid var(--card-border); border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 20px; color: var(--gold-soft); }
.stat small { font-size: 11px; color: var(--muted); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ach { border: 1px solid var(--card-border); border-radius: 12px; padding: 12px; text-align: center; opacity: .45; }
.ach.on { opacity: 1; border-color: var(--gold); background: var(--glow); }
.ach .icon { font-size: 26px; display: block; }
.ach .name { font-weight: 800; font-size: 13px; display: block; }
.ach .desc { font-size: 12px; color: var(--muted); }

.page-footer { margin-top: 24px; text-align: center; font-size: 12px; color: var(--muted); }
.page-footer a { color: var(--muted); margin: 0 6px; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: #141b2e; border: 1px solid var(--gold); border-radius: 12px;
  padding: 12px 20px; font-size: 14px; max-width: 90vw; text-align: center;
}
@media (max-width: 520px) {
  .card { padding: 18px; }
  .topbar-title { font-size: 14px; }
}
.footer-version { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }

/* ===== v1.3: ranking, loja, admin ===== */
.container.wide { max-width: 920px; }
.beta-badge { font-size: 10px; font-weight: 900; letter-spacing: .08em; color: #0b0e17; background: linear-gradient(135deg, #ffe08a, #ffb547); padding: 2px 8px; border-radius: 99px; }
.wallet { margin-left: auto; font-size: 13px; font-weight: 800; white-space: pre; color: var(--gold-soft); }
.soon { display: inline-block; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #0b0e17; background: linear-gradient(135deg, #ffe08a, #ffb547); padding: 3px 9px; border-radius: 99px; vertical-align: middle; }
.card > .soon { float: right; }
.muted { color: var(--muted); }

.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; background: rgba(0,0,0,.25); border-radius: 12px; margin-bottom: 16px; }
.seg-btn { padding: 8px 14px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font: 800 13px inherit; font-family: inherit; cursor: pointer; }
.seg-btn.active { background: var(--glow); color: var(--text); box-shadow: inset 0 0 0 1px var(--gold); }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; margin-bottom: 16px; }
.podium-spot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 16px; background: rgba(0,0,0,.25); border: 1px solid var(--card-border); text-align: center; }
.podium-spot.p1 { order: 2; border-color: #f2c94c; box-shadow: 0 0 30px rgba(242, 201, 76, .2); padding-top: 22px; }
.podium-spot.p2 { order: 1; }
.podium-spot.p3 { order: 3; }
.podium-spot.me { outline: 2px solid var(--success); }
.podium-spot .medal { font-size: 28px; }
.podium-spot .avatar { width: 56px; height: 56px; border-radius: 50%; }
.podium-spot b { font-size: 14px; word-break: break-all; }
.podium-spot .pts { font-weight: 900; color: var(--gold-soft); }
.tier-emblem { width: 96px; height: 54px; object-fit: cover; }
.rank-table { list-style: none; padding: 0; display: grid; gap: 4px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.03); font-size: 14px; }
.rank-row.me { outline: 1px solid var(--success); }
.rank-row .pos { width: 28px; text-align: center; font-weight: 900; color: var(--muted); }
.rank-row .avatar { width: 28px; height: 28px; border-radius: 50%; }
.rank-row .nick { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .tier { font-size: 12px; color: var(--muted); width: 90px; }
.rank-row .pts { font-weight: 900; color: var(--gold-soft); width: 60px; text-align: right; }
.tier-crest { width: 22px; height: 22px; }

.prize-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 12px 0; }
.prize { padding: 14px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--card-border); display: flex; flex-direction: column; gap: 4px; }
.prize.gold { border-color: #f2c94c; }
.prize.silver { border-color: #c0c8d4; }
.prize span { font-size: 13px; color: var(--muted); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.shop-item { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--card-border); }
.shop-item .price { font-weight: 900; color: var(--gold-soft); }
.tag { position: absolute; top: -9px; right: 10px; font-size: 10px; font-weight: 900; color: #0b0e17; background: var(--success); padding: 2px 8px; border-radius: 99px; }
.shop-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.shop-icon { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--card-border); cursor: pointer; color: var(--text); font-family: inherit; }
.shop-icon img { width: 60px; height: 60px; border-radius: 50%; }
.shop-icon small { font-size: 11px; font-weight: 800; color: var(--muted); }
.shop-icon.owned { border-color: var(--success); }

.vip-card { background: linear-gradient(160deg, rgba(242, 201, 76, .14), var(--card)); border-color: rgba(242, 201, 76, .5); }
.vip-price { font-size: 22px; font-weight: 900; color: #f2c94c; margin-bottom: 8px; }
.vip-list { list-style: none; padding: 0; display: grid; gap: 6px; margin-bottom: 14px; }
.vip-list li { font-size: 14px; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; align-items: end; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px; border-radius: 16px; background: rgba(0,0,0,.25); border: 1px solid var(--card-border); text-align: center; opacity: .9; }
.pack.best { border-color: var(--success); transform: scale(1.04); box-shadow: 0 0 30px rgba(62, 224, 143, .15); opacity: 1; }
.pack .dia { font-size: 18px; font-weight: 900; }
.pack .price { font-size: 16px; font-weight: 900; color: var(--gold-soft); }
.pack small { color: var(--success); font-weight: 800; }
.goal { margin: 12px 0; }
.goal-bar { height: 12px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 8px 0 4px; }
.goal-bar > div { height: 100%; background: linear-gradient(90deg, #a78bfa, #f472b6); border-radius: 99px; }
.goal small { color: var(--muted); }

.grant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.grant-grid label { font-size: 12px; font-weight: 800; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 620px) {
  .podium { grid-template-columns: 1fr; }
  .podium-spot.p1, .podium-spot.p2, .podium-spot.p3 { order: 0; }
  .packs { grid-template-columns: 1fr; }
  .pack.best { transform: none; }
  .rank-row .tier { display: none; }
  .wallet { display: none; }
}
.login-card { max-width: 440px; margin: 40px auto; }
.admin-form { display: grid; gap: 10px; margin: 12px 0; }
img.topbar-logo { background: none; padding: 0; width: 36px; height: 36px; border-radius: 11px; }
.vip-ico { width: 16px; height: 16px; vertical-align: -3px; margin-left: 4px; filter: drop-shadow(0 0 4px rgba(224, 92, 255, 0.6)); }
.vip-ico.big { width: 30px; height: 30px; vertical-align: -5px; margin: 0 4px 0 0; }

/* ===== Lista de espera (pop-up do WhatsApp) e botões ===== */
.btn-wait { font-size: 15px; padding: 14px 20px; box-shadow: 0 6px 22px rgba(200, 170, 110, .35); }
.btn-wait.joined { background: rgba(62, 224, 143, .15); color: var(--success); border: 1px solid var(--success); box-shadow: none; }
.btn-block { width: 100%; }
.link-btn { background: none; border: none; color: var(--muted); font: 700 13px inherit; font-family: inherit; cursor: pointer; padding: 8px; display: block; margin: 8px auto 0; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(3,5,10,.78); backdrop-filter: blur(6px); }
.modal-box { width: 100%; max-width: 440px; background: linear-gradient(170deg, #121a30, #0b1020); border: 1px solid var(--card-border); border-radius: 20px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal-title { font-size: 20px; text-align: center; margin-bottom: 8px; color: var(--text); }
.auth-sub { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-error { font-size: 13px; color: var(--danger); background: rgba(255,92,108,.1); border: 1px solid rgba(255,92,108,.3); padding: 8px 12px; border-radius: 10px; }

/* ===== Painel admin v1.4 ===== */
.admin-wrap { max-width: 1100px; }
.admin-wrap .card { padding: 22px; }
.admin-wrap h2 { margin-top: 0; }
.adm-tabs { display: flex; flex-wrap: wrap; width: 100%; }
.adm-tabs .seg-btn { flex: 1 1 140px; }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-danger:not(.btn-ghost) { background: var(--danger); color: #fff; border: none; }
.hint { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
select.input { cursor: pointer; }
select.input option { background: #0e1424; }

/* Lista de jogadores */
.pl-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.pl-toolbar h2 { margin: 0 auto 0 0; }
.pl-toolbar h2 small { color: var(--muted); font-size: 13px; }
.pl-toolbar .input { width: auto; flex: 1 1 200px; padding: 8px 12px; font-size: 14px; }
.pl-toolbar select.input { flex: 0 1 220px; }
.pl-table { display: flex; flex-direction: column; gap: 4px; max-height: 560px; overflow-y: auto; }
.pl-row {
  display: grid; grid-template-columns: 36px minmax(0, 2fr) minmax(0, 1.4fr) 80px 80px 110px;
  gap: 10px; align-items: center; width: 100%; padding: 6px 10px; text-align: left;
  background: rgba(255,255,255,.03); border: 1px solid transparent; border-radius: 10px;
  color: var(--text); font: 600 13px inherit; font-family: inherit; cursor: pointer;
}
.pl-row:hover { border-color: var(--gold); background: var(--glow); }
.pl-row.selected { border-color: var(--gold); background: rgba(200,170,110,.18); }
.pl-row.banned { opacity: .6; }
.pl-head { background: none; cursor: default; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; position: sticky; top: 0; background: #0d1222; z-index: 1; }
.pl-head:hover { border-color: transparent; background: #0d1222; }
.pl-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-icon { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--card-border); }
.pl-nick { font-weight: 800; }
.pl-num { font-variant-numeric: tabular-nums; }
.pl-date { color: var(--muted); font-size: 12px; }
.pl-empty { padding: 18px; text-align: center; color: var(--muted); }
.tag-ban { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 900; }

/* Ficha do jogador */
#player-card { border-color: rgba(200,170,110,.45); }
.pc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.pc-icon { width: 64px; height: 64px; border-radius: 14px; border: 2px solid var(--gold); }
.pc-title { flex: 1 1 200px; min-width: 0; }
.pc-title h2 { margin: 0; font-size: 22px; color: var(--gold-soft); overflow-wrap: anywhere; }
.pc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.08); }
.badge.vip { background: rgba(224,92,255,.15); color: #f0b6ff; border: 1px solid rgba(224,92,255,.4); }
.badge.ban { background: rgba(255,92,92,.15); color: var(--danger); border: 1px solid var(--danger); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 0 0 16px; }
.kv-item { min-width: 0; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid var(--card-border); }
.kv-item dt { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.kv-item dd { font-size: 15px; font-weight: 800; color: var(--text); overflow-wrap: anywhere; line-height: 1.35; }
.kv-item dd a { color: var(--blue); }
.pc-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.pc-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid var(--card-border); min-width: 0; }
.pc-box h3 { font-size: 15px; color: var(--gold-soft); }
.pc-box.danger { border-color: rgba(255,92,92,.4); }
#form-grant { grid-column: 1 / -1; }

/* Seletor de ícones */
.icon-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.icon-pick-row .field-label { margin: 0; }
.picked { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.picked img { width: 28px; height: 28px; border-radius: 6px; }
.icon-picker { max-height: 300px; overflow-y: auto; padding: 10px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid var(--card-border); }
.ip-label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; margin: 8px 0 4px; }
.ip-label:first-child { margin-top: 0; }
.ip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ip-cell { position: relative; width: 48px; height: 48px; padding: 0; border: 2px solid var(--card-border); border-radius: 10px; background: none; cursor: pointer; overflow: hidden; }
.ip-cell img { width: 100%; height: 100%; display: block; }
.ip-cell.owned { opacity: .4; }
.ip-cell.owned::after { content: "✔"; position: absolute; right: 2px; bottom: 0; font-size: 12px; color: var(--success); }
.ip-cell.picked { outline: 3px solid var(--gold-soft); outline-offset: 1px; opacity: 1; }

/* Preços */
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 8px 0 18px; }
.price-item { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(0,0,0,.25); border: 2px solid var(--card-border); }
.price-top { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.price-top img { width: 32px; height: 32px; border-radius: 8px; }

/* Monitoramento */
.wl-table { display: flex; flex-direction: column; gap: 4px; max-height: 480px; overflow-y: auto; }
.wl-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 90px 110px minmax(0, 1.3fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.03); font-size: 13px; }
.wl-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-row a { color: var(--success); font-weight: 800; }
.wl-head { background: none; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.link-nick { background: none; border: none; padding: 0; color: var(--gold-soft); font: 800 13px inherit; font-family: inherit; cursor: pointer; text-align: left; }
.link-nick:hover { text-decoration: underline; }
.flag-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 2fr) 70px; gap: 10px; align-items: center; width: 100%; margin-bottom: 4px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: rgba(255,92,92,.06); color: var(--text); font: 13px inherit; font-family: inherit; text-align: left; cursor: pointer; }
.flag-row:hover { border-color: var(--danger); }
.flag-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 700px) {
  .pl-row { grid-template-columns: 32px minmax(0, 1fr) 90px; }
  .pl-row > :nth-child(n+4) { display: none; }
  .wl-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wl-head { display: none; }
  .flag-row { grid-template-columns: 1fr 1fr; }
}
