/* =====================================================================
   Plataforma · shell "NOKO" (sidebar + topbar + play-grid) com acento VERMELHO.
   Tokens no :root; aliases legados (--fundo, --painel, --borda…) mantêm admin/carteira/fair funcionando.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300..800&family=Barlow+Condensed:wght@500;600;700&display=swap');

:root {
  --bg: #0e1016;
  --panel: #15181f;
  --panel-raised: #1b1f28;
  --line: #292d36;
  --line-soft: #1f232c;
  --text: #f2f3f7;
  --muted: #9296a3;
  --muted-2: #666b79;
  --sidebar: #101218;
  --sidebar-line: #252832;

  --accent: #ff3d4f;            /* era lima (#c8f36b) no layout original → vermelho */
  --accent-hover: #ff6371;
  --accent-dim: #ff3d4f10;
  --accent-soft: #ff3d4f26;
  --on-accent: #2a0c10;
  --coral: #ff766c;
  --blue: #7ba5ff;
  --green: #3ddc84;
  --gold: #ffc857;

  --arena: #1a1316;             /* painel da arena: neutro quente (era verde-acinzentado) */
  --arena-line: #33262a;
  --arena-toolbar: #1e1619;
  --arena-stage: #130e10;
  --arena-bottom: #1d1518;

  --double-vermelho: #f7374f;
  --double-vermelho-2: #d92642;
  --double-preto: #272d40;
  --double-preto-2: #1d2231;
  --double-branco: #ffffff;
  --chama: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><defs><linearGradient id='f' x1='0' y1='1' x2='0' y2='0'><stop offset='0' stop-color='%23ff3d4f'/><stop offset='1' stop-color='%23c8102e'/></linearGradient><linearGradient id='n' x1='0' y1='1' x2='0' y2='0'><stop offset='0' stop-color='%23ffd166'/><stop offset='1' stop-color='%23ff8a2b'/></linearGradient></defs><path fill='url(%23f)' d='M12 1.4c5 4.3 7.6 8.2 7.6 11.9 0 4.3-3.4 7.4-7.6 7.4s-7.6-3.1-7.6-7.4c0-2 .7-3.9 2.2-5.8.2 1.6.9 2.7 2 3.3C7.9 7.3 9.2 4.1 12 1.4z'/><path fill='url(%23n)' d='M12 10.6c2.3 2.2 3.4 4 3.4 5.4 0 2-1.5 3.4-3.4 3.4s-3.4-1.4-3.4-3.4c0-1.5 1.1-3.2 3.4-5.4z'/></svg>");

  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "DM Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 12px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --sidebar-w: 220px;
  --topbar-h: 82px;
  --card: 94px;
  --gap: 10px;

  /* aliases legados */
  --fundo: var(--bg); --painel: var(--panel); --painel-2: var(--panel-raised); --borda: var(--line);
  --texto: var(--text); --texto-2: var(--muted); --vermelho: var(--accent); --vermelho-2: var(--accent-hover);
  --verde: var(--green); --amarelo: var(--gold); --raio: var(--radius); --sombra: var(--shadow); --primaria: var(--accent);
  --preto-card: var(--double-preto); --preto-card-2: var(--double-preto-2); --branco-card: var(--double-branco);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; }
body { min-height: 100dvh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* =========================== sidebar =========================== */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column; gap: 24px;
  padding: 31px 17px 18px; background: var(--sidebar); border-right: 1px solid var(--sidebar-line);
  overflow-y: auto; transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-size: 27px; font-weight: 800; letter-spacing: -1.2px; line-height: 1; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); position: relative; flex: 0 0 auto; box-shadow: 0 6px 18px var(--accent-soft); }
.brand-mark::after { content: ""; position: absolute; inset: 8px; background: var(--on-accent); transform: rotate(45deg); border-radius: 2px; }
.brand-mark.logo { background-size: cover; background-position: center; } .brand-mark.logo::after { display: none; }
.brand small { font-size: 10px; font-weight: 700; letter-spacing: 1.6px; color: var(--muted-2); text-transform: uppercase; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 9px; font-weight: 700; letter-spacing: 1.9px; text-transform: uppercase; color: var(--muted-2); padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 10px; border-radius: 9px;
  font-size: 12.5px; font-weight: 600; color: #959aa6; position: relative; transition: background .15s, color .15s;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .85; }
.nav-item:hover { background: #ffffff08; color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--text); }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav-item .nav-badge { margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: .8px; padding: 2px 6px; border-radius: 6px; background: var(--accent); color: var(--on-accent); }
.nav-item .nav-live { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px #3ddc8422; }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.creator-promo { background: linear-gradient(160deg, #1d1518, #15181f); border: 1px solid var(--arena-line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.creator-promo .promo-label { font-size: 8.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.creator-promo strong { font-size: 14px; letter-spacing: -.3px; line-height: 1.25; }
.creator-promo p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.45; }
.creator-promo .primary-button { height: 36px; font-size: 12px; }
.help-nav { display: flex; flex-direction: column; gap: 2px; }
.help-nav a, .help-nav button { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; font-size: 11.5px; color: var(--muted); text-align: left; }
.help-nav a:hover, .help-nav button:hover { color: var(--text); background: #ffffff06; }
.help-nav svg { width: 14px; height: 14px; }
.help-nav .volume-row { display: flex; align-items: center; padding: 4px 10px 6px 33px; }
.help-nav input[type=range] { width: 100%; height: 3px; accent-color: var(--accent); cursor: pointer; }
.help-nav select { width: 100%; background: var(--bg-2, #111); color: var(--text, #eee); border: 1px solid var(--border, #2a2a2a); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.help-nav select:focus { outline: none; border-color: var(--accent); }
.sidebar-footer { font-size: 10px; color: var(--muted-2); padding: 0 10px; display: flex; justify-content: space-between; align-items: center; }
.sidebar-footer b { color: var(--muted); }

.menu-button { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); place-items: center; }
.menu-button svg { width: 18px; height: 18px; }
.mobile-scrim { display: none; position: fixed; inset: 0; background: #0009; z-index: 35; backdrop-filter: blur(2px); }
.mobile-scrim.is-open { display: block; }

/* =========================== topbar / main =========================== */
.main-shell { margin-left: var(--sidebar-w); min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px; padding: 0 36px;
  background: #101218aa; backdrop-filter: blur(14px); border-bottom: 1px solid var(--sidebar-line);
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.breadcrumb b { color: var(--text); }
.breadcrumb .sep { opacity: .5; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.online-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 0 10px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); }
.online-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px #3ddc8422; animation: pulsar 2s infinite; }
.online-badge b { color: var(--text); font-variant-numeric: tabular-nums; }
@keyframes pulsar { 50% { box-shadow: 0 0 0 5px #3ddc8411; } }
.icon-button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); display: inline-grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .6px; transition: border-color .15s, color .15s; }
.icon-button:hover { color: var(--text); border-color: #3a3f4b; }
.icon-button svg { width: 16px; height: 16px; }
.lang-menu, .profile { position: relative; }
#conta-topo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.lang-menu .icon-button { width: auto; padding: 0 10px; gap: 6px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; background: var(--panel-raised); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); display: none; z-index: 60; }
.dropdown.is-open { display: grid; gap: 2px; animation: cair .15s ease; }
@keyframes cair { from { transform: translateY(-4px); opacity: 0; } }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: left; width: 100%; }
.dropdown a:hover, .dropdown button:hover { background: #ffffff08; color: var(--text); }
.dropdown .is-current { color: var(--text); background: var(--accent-dim); }
.dropdown .is-current::after { content: "✓"; margin-left: auto; color: var(--accent); }
.dropdown .dropdown-head { padding: 8px 10px 6px; font-size: 11px; color: var(--muted-2); border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.dropdown .dropdown-head b { display: block; color: var(--text); font-size: 13px; }
.dropdown svg { width: 15px; height: 15px; opacity: .8; }
.wallet-pill { display: flex; align-items: center; gap: 12px; min-width: 169px; height: 40px; padding: 0 5px 0 13px; border-radius: 11px; background: #221a1d; border: 1px solid var(--arena-line); transition: border-color .15s; }
.wallet-pill:hover { border-color: #4a3338; }
.wallet-pill .wallet-text { display: flex; flex-direction: column; line-height: 1.1; }
.wallet-pill small { font-size: 7px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.wallet-pill b { font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.wallet-pill.pulso b { animation: pulso .7s ease; }
@keyframes pulso { 0% { color: var(--green); transform: scale(1.12); } 100% { transform: scale(1); } }
.wallet-plus { margin-left: auto; width: 25px; height: 25px; border-radius: 7px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 900; font-size: 16px; line-height: 1; }
.profile-button { position: relative; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(140deg, var(--accent), #7a1e29); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; border: 2px solid #ffffff14; }
/* Anel e selo do nível: o tier do jogador vira a cor da borda do avatar. */
.profile-button[data-tier] { border-color: var(--tier, #ffffff14); }
.profile-button[data-tier="ferro"] { --tier: #8b93a5; } .profile-button[data-tier="bronze"] { --tier: #c9813f; }
.profile-button[data-tier="prata"] { --tier: #cfd6e4; } .profile-button[data-tier="ouro"] { --tier: var(--gold); }
.profile-button[data-tier="esmeralda"] { --tier: #4fd1c5; } .profile-button[data-tier="diamante"] { --tier: #a78bfa; }
.profile-nivel { position: absolute; right: -3px; bottom: -3px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; font-style: normal; font-size: 9px; font-weight: 900; line-height: 15px; text-align: center; background: var(--panel); color: var(--tier, #fff); box-shadow: 0 0 0 1.5px var(--tier, #ffffff22); }

/* Progresso dentro do menu do perfil. */
.dropdown-prog { padding: 8px 10px 10px; display: grid; gap: 5px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.dropdown-prog .prog-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dropdown-prog .prog-topo b { font-size: 12px; color: var(--text); }
.dropdown-prog .prog-topo span { font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--tier-cor, var(--muted-2)); }
.dropdown-prog .prog-barra { height: 5px; border-radius: 999px; background: var(--panel-raised); overflow: hidden; }
.dropdown-prog .prog-barra i { display: block; height: 100%; border-radius: 999px; background: var(--tier-cor, var(--accent)); transition: width .4s ease; }
.dropdown-prog small { font-size: 10px; color: var(--muted-2); }
[data-progresso][data-tier="ferro"] { --tier-cor: #8b93a5; } [data-progresso][data-tier="bronze"] { --tier-cor: #c9813f; }
[data-progresso][data-tier="prata"] { --tier-cor: #cfd6e4; } [data-progresso][data-tier="ouro"] { --tier-cor: var(--gold); }
[data-progresso][data-tier="esmeralda"] { --tier-cor: #4fd1c5; } [data-progresso][data-tier="diamante"] { --tier-cor: #a78bfa; }
.topbar .guest-actions { display: flex; gap: 8px; }
.topbar .guest-actions .primary-button, .topbar .guest-actions .secondary-button { height: 38px; padding: 0 16px; font-size: 12.5px; width: auto; }

main.conteudo { width: 100%; max-width: 1600px; margin: 0 auto; padding: 34px 36px 40px; flex: 1; display: grid; gap: 22px; align-content: start; }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.intro-label { font-size: 8.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.intro-label::before { content: ""; width: 18px; height: 2px; background: var(--accent); border-radius: 2px; }
.page-intro h1 { margin: 0; font-size: clamp(28px, 2.7vw, 44px); letter-spacing: -1.8px; font-weight: 750; line-height: 1; }
.page-intro h1 em { font-style: normal; color: var(--accent); }
.page-intro p { margin: 8px 0 0; color: #8b919e; font-size: 12.5px; max-width: 560px; line-height: 1.5; }
.season-chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.season-chip b { color: var(--text); font-family: var(--font-display); font-size: 18px; letter-spacing: .3px; }
.season-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }

/* =========================== play-grid =========================== */
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 326px; gap: 20px; align-items: start; }
.arena-panel { background: var(--arena); border: 1px solid var(--arena-line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.arena-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--arena-toolbar); border-bottom: 1px solid var(--arena-line); min-height: 58px; }
.arena-toolbar .tool-label { font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); font-weight: 800; white-space: nowrap; }
.arena-toolbar .tool-right { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.arena-stage { position: relative; background: var(--arena-stage); min-height: 390px; display: grid; }
.arena-stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 100%, var(--accent-dim), transparent 70%); pointer-events: none; }
.arena-bottom { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--arena-bottom); border-top: 1px solid var(--arena-line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.arena-bottom .mono { font-family: var(--mono); font-size: 11px; }
.arena-bottom a:hover { color: var(--text); text-decoration: underline; }
.arena-bottom .bottom-right { margin-left: auto; display: flex; gap: 14px; align-items: center; }

.control-panel { background: linear-gradient(180deg, #1a1e26, #15181f); border: 1px solid #30343e; border-radius: var(--radius); padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; box-shadow: var(--shadow); position: sticky; top: calc(var(--topbar-h) + 16px); min-width: 0; }
.control-panel > * { min-width: 0; }
.control-panel code { overflow-wrap: anywhere; }
.panel-heading { display: flex; align-items: center; gap: 10px; font-size: 8.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.section-number { color: var(--accent); font-family: var(--font-display); font-size: 16px; letter-spacing: 0; }
.control-panel h2 { margin: 0; font-size: 24px; letter-spacing: -.8px; font-weight: 650; line-height: 1.05; }
.control-panel h2 + p, .control-panel .hint { margin: -8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.field-label { display: flex; justify-content: space-between; align-items: center; font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-bottom: 8px; }
.field-label a, .field-label button { color: var(--accent); font-size: 10px; letter-spacing: 1px; font-weight: 800; }
.amount-field { display: flex; align-items: center; gap: 4px; background: #10131a; border: 1px solid var(--line); border-radius: 11px; padding: 6px 6px 6px 12px; transition: border-color .15s, box-shadow .15s; }
.amount-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.amount-field .prefix { color: var(--muted); font-weight: 700; font-size: 12px; }
.amount-field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.3px; padding: 6px 4px; }
.amount-field .chip { height: 30px; padding: 0 10px; }
.chip { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px; border-radius: 8px; background: #ffffff0c; border: 1px solid transparent; font-size: 12px; font-weight: 700; color: #c9cdd6; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.chip:hover { background: #ffffff16; color: #fff; }
.chip.is-on { background: var(--accent-dim); border-color: var(--accent); color: var(--text); }
.stake-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stake-grid .chip { width: 100%; font-variant-numeric: tabular-nums; }
.mode-tabs { display: flex; gap: 4px; background: #10131a; padding: 4px; border-radius: 10px; }
.mode-tabs button { flex: 1; height: 34px; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--muted); transition: background .15s, color .15s; }
.mode-tabs button.selected { background: var(--accent); color: var(--on-accent); }
.prize-box { display: grid; gap: 4px; padding: 14px 16px; border-radius: 11px; background: #10131a; border: 1px solid var(--line-soft); }
.prize-box small { font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.prize-box b { font-family: var(--font-display); font-size: 30px; line-height: 1; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.prize-box b.accent { color: var(--accent); }
.prize-box span { font-size: 11px; color: var(--muted); }

.primary-button { width: 100%; height: 44px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 13.5px; letter-spacing: .2px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, transform .06s, box-shadow .15s; box-shadow: 0 8px 22px var(--accent-soft); }
.primary-button:hover:not(:disabled) { background: var(--accent-hover); }
.primary-button:active:not(:disabled) { transform: translateY(1px); }
.primary-button:disabled { background: #2a2e38; color: #6f7482; box-shadow: none; cursor: not-allowed; }
.primary-button.is-cashout { background: var(--green); color: #052a16; box-shadow: 0 8px 26px #3ddc8444; animation: respirar 1s ease-in-out infinite; font-size: 15px; height: 52px; }
.primary-button.is-cashout:hover:not(:disabled) { background: #5ff59d; }
@keyframes respirar { 50% { box-shadow: 0 8px 34px #3ddc8477; } }
.secondary-button { width: 100%; height: 40px; border-radius: 10px; background: #ffffff0a; border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s; }
.secondary-button:hover:not(:disabled) { background: #ffffff14; }
.secondary-button:disabled { opacity: .5; cursor: not-allowed; }
.under-button { text-align: center; font-size: 11px; color: var(--muted); line-height: 1.5; }
.under-button b { color: var(--text); }
.quick-tip { display: flex; gap: 10px; padding: 12px; border-radius: 10px; background: var(--accent-dim); border: 1px dashed #ff3d4f40; font-size: 11.5px; color: #d8c4c8; line-height: 1.45; }
.quick-tip svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--accent); margin-top: 1px; }

.value-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.value-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 6px; }
.value-card small { font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.value-card b { font-family: var(--font-display); font-size: 26px; line-height: 1; letter-spacing: .3px; }
.value-card p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

.main-footer { border-top: 1px solid var(--sidebar-line); padding: 22px 36px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--muted-2); }
.main-footer b { color: var(--muted); }
.main-footer .footer-right { margin-left: auto; display: flex; gap: 14px; }
.main-footer a:hover { color: var(--text); }

/* =========================== seções genéricas =========================== */
.section-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.section-card > h2, .section-title { margin: 0 0 12px; font-size: 9.5px; letter-spacing: 1.9px; text-transform: uppercase; color: var(--muted); font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-card table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.section-card th { text-align: left; color: var(--muted-2); font-weight: 700; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.section-card td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; vertical-align: middle; }
.section-card tr:last-child td { border-bottom: 0; }
.section-card .dir { text-align: right; }
.section-card a.mono { font-family: var(--mono); color: var(--muted); font-size: 11.5px; }
.section-card a.mono:hover { color: var(--text); }
.ganho { color: var(--green); font-weight: 700; }
.perda { color: var(--muted); }
.mono { font-family: var(--mono); }

/* =========================== DOUBLE ===========================
   Mesa chapada: painel de aposta à esquerda, roleta à direita, colunas de cada cor embaixo. */
.dbl-topo, .dbl-abas, .bet-columns {
  --dbl-card: #171a24; --dbl-stage: #0f1421; --dbl-campo: #1b1f2b; --dbl-linha: #262a38; --dbl-muted: #868b9c;
}
.dbl-topo { display: grid; grid-template-columns: 325px minmax(0, 1fr); gap: 14px; align-items: start; }

/* --- painel de aposta --- */
.dbl-painel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; padding: 14px; background: var(--dbl-card); border: 1px solid var(--dbl-linha); border-radius: var(--radius); }
.dbl-modos { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--dbl-stage); border: 1px solid var(--dbl-linha); border-radius: 9px; }
.dbl-modos button { height: 36px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--dbl-muted); }
.dbl-modos button.is-on { background: var(--dbl-campo); border: 1px solid var(--dbl-linha); color: var(--text); }
.dbl-quantia { display: grid; grid-template-columns: minmax(0, 1fr) 52px 52px; gap: 8px; }
.dbl-painel .amount-field { display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 12px; background: var(--dbl-stage); border: 1px solid var(--dbl-linha); border-radius: 8px; min-width: 0; }
.dbl-painel .amount-field:focus-within { border-color: var(--double-vermelho); }
.dbl-painel .campo-rotulo { font-size: 12px; color: var(--dbl-muted); white-space: nowrap; }
.dbl-painel .amount-field input { flex: 1; width: 0; min-width: 0; background: none; border: 0; outline: 0; text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dbl-painel .amount-field .prefix { font-size: 12.5px; color: var(--dbl-muted); font-weight: 700; }
.dbl-painel .chip { height: 46px; padding: 0 6px; background: var(--dbl-stage); border: 1px solid var(--dbl-linha); border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.dbl-painel .chip:hover { background: var(--dbl-campo); }
.dbl-painel .chip.is-on { border-color: var(--double-vermelho); color: #fff; }
.dbl-auto { display: grid; gap: 6px; padding: 10px 12px; background: var(--dbl-stage); border: 1px solid var(--dbl-linha); border-radius: 8px; }
.dbl-auto-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--dbl-muted); }
.dbl-auto-linha input { width: 74px; height: 32px; padding: 0 8px; background: var(--dbl-campo); border: 1px solid var(--dbl-linha); border-radius: 7px; outline: 0; font-weight: 700; text-align: right; }
.dbl-auto-dica { margin: 0; font-size: 11px; line-height: 1.45; color: var(--muted-2); }
.dbl-label { font-size: 12px; color: var(--dbl-muted); }
.dbl-cores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dbl-cor { height: 58px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 2px solid transparent; transition: border-color .15s, filter .15s; }
.dbl-cor:hover { filter: brightness(1.08); }
.dbl-cor.is-on { border-color: #fff; }
.dbl-cor.vermelho { background: var(--double-vermelho); color: #fff; }
.dbl-cor.preto { background: var(--double-preto); color: #fff; }
.dbl-cor.branco { background: var(--double-branco); color: var(--double-vermelho); }
.dbl-apostar { height: 52px; border-radius: 8px; background: var(--double-vermelho); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; transition: background .15s, filter .15s; }
.dbl-apostar:hover:not(:disabled) { filter: brightness(1.1); }
.dbl-apostar:disabled { background: #3d1620; color: #9d6270; cursor: not-allowed; }
.dbl-apostar.is-auto { background: var(--gold); color: #2a1e00; }
.dbl-retorno { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dbl-retorno small { font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--dbl-muted); font-weight: 800; }
.dbl-retorno b { font-family: var(--font-display); font-size: 22px; line-height: 1; color: var(--green); font-variant-numeric: tabular-nums; }
.dbl-retorno span { font-size: 10.5px; color: var(--dbl-muted); margin-left: auto; }
.dbl-acoes { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.dbl-acoes-grupo { display: flex; gap: 8px; margin-left: auto; }
.dbl-acoes button, .dbl-acoes a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--dbl-stage); border: 1px solid var(--dbl-linha); color: var(--dbl-muted); }
.dbl-acoes button:hover, .dbl-acoes a:hover { color: var(--text); }
.dbl-acoes svg { width: 16px; height: 16px; }

/* --- arena / roleta --- */
.dbl-arena { display: grid; gap: 10px; padding: 14px; background: var(--dbl-card); border: 1px solid var(--dbl-linha); border-radius: var(--radius); min-width: 0; }
.dbl-giros { display: grid; gap: 8px; min-width: 0; }
.fichas { display: flex; gap: 6px; overflow: hidden; mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
.ficha { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; animation: entrar-ficha .35s ease; }
@keyframes entrar-ficha { from { transform: scale(.4); opacity: 0; } }
.ficha span { width: 20px; height: 20px; border: 1.5px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-size: 10px; }
.ficha.vermelho { background: var(--double-vermelho); }
.ficha.preto { background: var(--double-preto); }
.ficha.branco { background: var(--double-branco); color: var(--double-vermelho); }
.ficha.branco::before, .card.branco::before { content: ""; width: 58%; height: 58%; background: var(--chama) center / contain no-repeat; }
.ficha.mini { width: 24px; height: 24px; font-size: 11px; border-radius: 6px; display: inline-grid; vertical-align: middle; }

.dbl-stage { display: grid; gap: 14px; align-content: center; padding: 20px 0 14px; background: var(--dbl-stage); border-radius: 10px; min-height: 330px; }
.dbl-estado { font-size: 16px; font-weight: 600; text-align: center; min-height: 20px; font-variant-numeric: tabular-nums; }
.dbl-estado .cor-vermelho { color: var(--double-vermelho); } .dbl-estado .cor-preto { color: #c4cad8; } .dbl-estado .cor-branco { color: #fff; }
.dbl-estado .cor-branco::before { content: ""; display: inline-block; width: .85em; height: .85em; margin-right: .3em; vertical-align: -.08em; background: var(--chama) center / contain no-repeat; }
.viewport { position: relative; height: calc(var(--card) + 16px); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.faixa { position: absolute; top: 8px; left: 0; display: flex; gap: var(--gap); will-change: transform; }
.card { flex: 0 0 var(--card); width: var(--card); height: var(--card); border-radius: 12px; display: grid; place-items: center; color: #fff; user-select: none; }
.card span { width: 56%; height: 56%; border: 2.5px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1; }
.card.vermelho { background: var(--double-vermelho); }
.card.preto { background: var(--double-preto); }
.card.branco { background: var(--double-branco); color: var(--double-vermelho); }
.card.vencedor { box-shadow: 0 0 0 3px #fff; animation: brilho 1.2s ease infinite alternate; }
@keyframes brilho { to { box-shadow: 0 0 0 3px #fff, 0 0 30px rgba(255, 255, 255, .7); } }
.marcador { position: absolute; top: -4px; bottom: -4px; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; border-radius: 2px; pointer-events: none; }
.barra { width: min(420px, 70%); height: 4px; border-radius: 3px; background: #ffffff10; overflow: hidden; margin: 0 auto; }
.barra i { display: block; height: 100%; width: 100%; background: var(--double-vermelho); transform-origin: left; }
.dbl-rodape { display: flex; align-items: center; gap: 12px; padding: 0 18px; font-size: 11px; color: var(--dbl-muted); }
.dbl-sub { text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }
.dbl-online { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; }
.dbl-online i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* --- abas + colunas de aposta --- */
.dbl-abas { display: flex; gap: 8px; border-bottom: 1px solid var(--dbl-linha); }
.dbl-abas button { padding: 12px 6px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dbl-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dbl-abas button.is-on { color: var(--text); border-bottom-color: var(--double-vermelho); }
.dbl-regras { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13px; line-height: 1.55; color: var(--muted); }

.bet-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.coluna { background: var(--dbl-card); border: 1px solid var(--dbl-linha); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-height: 260px; transition: border-color .2s; }
.coluna.vencedora { border-color: #ffffff66; }
.coluna-topo { display: flex; align-items: center; gap: 10px; padding: 15px 16px; }
.coluna-topo b { font-size: 15px; font-weight: 650; }
.coluna-badge { position: relative; width: 30px; height: 30px; border-radius: 9px; margin-left: auto; display: grid; place-items: center; }
/* Quantos jogadores estão nesta cor agora. */
.coluna-badge[data-n]:not([data-n=""])::before { content: attr(data-n); position: absolute; right: 100%; margin-right: 8px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--dbl-muted); font-variant-numeric: tabular-nums; }
.coluna-badge::after { content: ""; width: 15px; height: 15px; border: 2px solid #fff; border-radius: 50%; }
.coluna-vermelho .coluna-badge { background: var(--double-vermelho); }
.coluna-preto .coluna-badge { background: var(--double-preto); }
.coluna-branco .coluna-badge { background: var(--double-branco); }
.coluna-branco .coluna-badge::after { width: 18px; height: 18px; border: 0; background: var(--chama) center / contain no-repeat; }
.coluna-total { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--dbl-linha); font-size: 12.5px; color: var(--dbl-muted); }
.coluna-total b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.coluna-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; background: var(--dbl-stage); font-size: 9px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 800; color: var(--dbl-muted); }
.lista { list-style: none; margin: 0; padding: 8px; display: grid; gap: 6px; max-height: 348px; overflow: auto; align-content: start; scrollbar-width: thin; }
.lista li { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 8px; background: var(--dbl-campo); font-size: 12.5px; }
.lista li.eu { background: #f7374f24; outline: 1px solid #f7374f55; }
.lista li.ganhou { background: #3ddc8418; } .lista li.ganhou .val { color: var(--green); }
.lista li.perdeu { opacity: .45; }
/* Troféu do nível: a cor vem do tier (ver lib/progresso.mjs) e o número é o nível do jogador. */
.lista-icone { display: flex; align-items: center; gap: 3px; color: var(--tier, #6f7686); flex: 0 0 auto; }
.lista-icone svg { width: 15px; height: 15px; flex: 0 0 auto; }
.lista-icone b { min-width: 15px; font-size: 9px; font-weight: 900; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.tier-ferro { --tier: #8b93a5; } .tier-bronze { --tier: #c9813f; } .tier-prata { --tier: #cfd6e4; }
.tier-ouro { --tier: var(--gold); } .tier-esmeralda { --tier: #4fd1c5; } .tier-diamante { --tier: #a78bfa; }
.lista .nome { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.lista .val { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.lista .vazio { background: none; color: var(--muted-2); font-size: 12px; justify-content: center; padding: 22px 0; }
/* Agregado do que não cabe na coluna: "+36 jogadores · R$ 91,36". Fica fixo no pé, fora da área que rola. */
.coluna-mais { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 8px 8px; padding: 9px 12px; border-radius: 8px; border: 1px dashed var(--dbl-linha); font-size: 11.5px; }
.coluna-mais span { color: var(--dbl-muted); font-weight: 700; }
.coluna-mais b { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .4px; }
.pill.vermelho { background: var(--double-vermelho); } .pill.preto { background: var(--double-preto); } .pill.branco { background: var(--double-branco); color: #15171d; }

/* =========================== CRASH =========================== */
.avatar { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--panel-raised); color: #fff; flex: 0 0 auto; }
.crash-chips { display: flex; gap: 6px; overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.crash-chip { flex: 0 0 auto; height: 28px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .3px; font-variant-numeric: tabular-nums; animation: entrar-ficha .35s ease; background: #ffffff0c; color: var(--muted); }
.crash-chip.baixo { background: #ff3d4f1c; color: #ff8a95; }
.crash-chip.medio { background: #ffffff12; color: var(--text); }
.crash-chip.alto { background: #7ba5ff22; color: var(--blue); }
.crash-chip.epico { background: linear-gradient(120deg, #ffc85733, #ff3d4f33); color: var(--gold); box-shadow: 0 0 0 1px #ffc85744; }
.crash-stage { position: relative; min-height: 420px; }
.crash-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.crash-overlay { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; pointer-events: none; z-index: 1; }
.crash-mult { font-family: var(--font-display); font-weight: 700; font-size: clamp(64px, 9vw, 120px); line-height: .9; letter-spacing: -1px; font-variant-numeric: tabular-nums; color: var(--text); text-shadow: 0 10px 40px #0008; transition: color .2s; }
.crash-mult.flying { color: #fff; }
.crash-mult.crashed { color: var(--accent); animation: tremer .4s ease; }
.crash-mult.waiting { color: var(--muted); font-size: clamp(40px, 5vw, 64px); }
@keyframes tremer { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.crash-status { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.crash-status.crashed { color: var(--accent); }
.crash-status.flying { color: var(--green); }
.crash-overlay .barra { pointer-events: none; }
.crash-my svg { width: 16px; height: 16px; flex: 0 0 auto; }
.crash-my { position: absolute; left: 16px; top: 14px; z-index: 2; display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: #0009; border: 1px solid #ffffff14; font-size: 12px; backdrop-filter: blur(6px); }
.crash-my b { font-family: var(--font-display); font-size: 18px; letter-spacing: .3px; }
.crash-my.won { border-color: #3ddc8455; color: var(--green); }
.crash-bets { display: grid; gap: 0; width: 100%; }
.crash-bets-head, .crash-bet { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 10px; align-items: center; padding: 8px 4px; font-size: 12px; }
.crash-bets-head { font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted-2); font-weight: 800; border-bottom: 1px solid var(--arena-line); }
.crash-bet { border-bottom: 1px solid #ffffff08; color: var(--muted); }
.crash-bet .nome { color: var(--text); display: flex; align-items: center; gap: 8px; font-weight: 600; overflow: hidden; }
.crash-bet .nome span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crash-bet .val { font-variant-numeric: tabular-nums; }
.crash-bet.sacou { color: var(--green); } .crash-bet.sacou .val { font-weight: 700; }
.crash-bet.perdeu { opacity: .45; }
.crash-bet.eu .nome { color: var(--accent); }
.crash-bets .vazio { padding: 16px; text-align: center; color: var(--muted-2); font-size: 12px; }
.auto-field { display: flex; align-items: center; gap: 6px; background: #10131a; border: 1px solid var(--line); border-radius: 11px; padding: 6px 6px 6px 12px; }
.auto-field:focus-within { border-color: var(--accent); }
.auto-field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 4px; }
.auto-field .suffix { color: var(--muted); font-weight: 800; font-size: 14px; padding-right: 6px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.switch input { appearance: none; width: 32px; height: 18px; border-radius: 9px; background: #2a2e38; position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked { background: var(--accent); } .switch input:checked::after { left: 16px; }

/* =========================== modal / toast =========================== */
.modal-backdrop { position: fixed; inset: 0; background: #000a; backdrop-filter: blur(4px); z-index: 70; display: none; place-items: center; padding: 16px; }
.modal-backdrop.is-open { display: grid; }
.modal { width: min(100%, 560px); max-height: calc(100dvh - 32px); overflow: auto; background: #171c24; border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); animation: subir .18s ease; display: grid; gap: 14px; }
.modal.narrow { width: min(100%, 400px); }
@keyframes subir { from { transform: translateY(10px); opacity: 0; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 22px; letter-spacing: -.6px; font-weight: 700; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.modal-close { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); flex: 0 0 auto; }
.modal-close:hover { color: var(--text); }
.modal-close svg { width: 14px; height: 14px; }
.modal .rules { display: grid; gap: 10px; }
.modal .rule { display: flex; gap: 12px; padding: 12px; border-radius: 11px; background: #10131a; border: 1px solid var(--line-soft); font-size: 13px; line-height: 1.5; color: #d5d8e0; }
.modal .rule b.num { font-family: var(--font-display); color: var(--accent); font-size: 18px; line-height: 1; flex: 0 0 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions .primary-button, .modal-actions .secondary-button { width: auto; padding: 0 18px; }
.abas { display: flex; gap: 4px; background: #10131a; padding: 4px; border-radius: 10px; }
.aba { flex: 1; height: 36px; border-radius: 7px; font-weight: 700; color: var(--muted); font-size: 12.5px; }
.aba.ativa { background: var(--accent); color: var(--on-accent); }
.campo-modal label { display: block; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-bottom: 6px; }
.campo-modal input, .campo-modal select { width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #10131a; outline: 0; font-size: 14px; color: var(--text); }
.campo-modal input:focus, .campo-modal select:focus { border-color: var(--accent); }
.aviso { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 0; }
.erro { min-height: 18px; margin: 0; color: var(--accent); font-size: 12.5px; font-weight: 600; }

.toasts { position: fixed; left: calc(50% + var(--sidebar-w) / 2); bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 90; pointer-events: none; }
.toast { padding: 11px 16px; border-radius: 11px; background: #1b1f28ee; border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; animation: toast-in .25s ease; max-width: min(90vw, 380px); text-align: center; backdrop-filter: blur(8px); }
.toast.ok { border-color: #3ddc8466; color: #c8ffe0; }
.toast.erro { border-color: var(--accent); color: #ffd3d7; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* =========================== legado (admin) =========================== */
.topo { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: #101218dd; backdrop-filter: blur(10px); border-bottom: 1px solid var(--sidebar-line); }
.marca { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -.4px; }
.marca-icone { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); position: relative; }
.marca-icone::after { content: ""; position: absolute; inset: 5px; background: var(--on-accent); transform: rotate(45deg); border-radius: 2px; }
.nav { display: flex; align-items: center; gap: 14px; margin-left: 8px; color: var(--muted); font-size: 13px; }
.nav-link:hover { color: var(--text); }
.conta { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.saldo { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; padding: 4px 12px; background: var(--panel-raised); border: 1px solid var(--line); border-radius: 8px; }
.saldo small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; } .saldo b { font-size: 15px; font-variant-numeric: tabular-nums; }
.usuario-nome { color: var(--muted); font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 10px; font-weight: 700; font-size: 13px; transition: filter .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: #ffffff0a; border: 1px solid var(--line); }
.btn-ghost:hover { background: #ffffff14; }
.btn-primario { background: var(--accent); color: var(--on-accent); }
.btn-primario:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* =========================== responsivo =========================== */
@media (min-width: 1650px) { .play-grid { grid-template-columns: minmax(0, 1fr) 360px; } main.conteudo { padding: 40px 48px; } }
@media (max-width: 1240px) {
  :root { --sidebar-w: 190px; }
  .breadcrumb { display: none; }
  main.conteudo { padding: 26px 24px; }
  .topbar { padding: 0 24px; }
}
@media (max-width: 1050px) {
  :root { --sidebar-w: 76px; }
  .sidebar { padding: 26px 12px 16px; gap: 18px; }
  .brand { justify-content: center; padding: 0; } .brand .brand-text { display: none; }
  .nav-label { text-align: center; padding: 10px 0 4px; font-size: 8px; }
  .nav-item { justify-content: center; padding: 11px 0; } .nav-item span, .nav-item .nav-badge { display: none; }
  .sidebar-bottom .creator-promo, .help-nav span, .help-nav .volume-row, .sidebar-footer { display: none; }
  .help-nav a, .help-nav button { justify-content: center; }
  .play-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .dbl-topo { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (max-width: 850px) {
  .play-grid { grid-template-columns: 1fr; }
  .dbl-topo { grid-template-columns: minmax(0, 1fr); }
  .control-panel { position: static; }
  .value-strip { grid-template-columns: 1fr; }
  .online-badge { display: none; }
}
@media (max-width: 700px) {
  :root { --sidebar-w: 0px; --topbar-h: 66px; --card: 66px; --gap: 6px; }
  .sidebar { width: 250px; transform: translateX(-100%); padding: 26px 16px 18px; }
  .sidebar.is-open { transform: none; }
  .sidebar .brand-text, .sidebar .nav-item span, .sidebar .help-nav span, .sidebar .sidebar-footer, .sidebar .creator-promo { display: initial; }
  .sidebar .brand { justify-content: flex-start; } .sidebar .nav-item { justify-content: flex-start; padding: 10px; } .sidebar .nav-label { text-align: left; padding: 14px 10px 6px; }
  .sidebar .help-nav a, .sidebar .help-nav button { justify-content: flex-start; }
  .sidebar .sidebar-footer { display: flex; } .sidebar .creator-promo { display: grid; } .sidebar .help-nav .volume-row { display: flex; }
  .main-shell { margin-left: 0; }
  .menu-button { display: grid; }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar-right, #conta-topo { gap: 6px; }
  .wallet-pill { min-width: 0; height: 36px; padding-left: 10px; gap: 8px; } .wallet-pill small { display: none; } .wallet-pill b { font-size: 12px; }
  .lang-menu .icon-button { padding: 0 7px; } .lang-menu .icon-button svg { display: none; }
  .profile-button { width: 32px; height: 32px; font-size: 12px; }
  .topbar .guest-actions .primary-button, .topbar .guest-actions .secondary-button { padding: 0 11px; font-size: 12px; height: 34px; }
  main.conteudo { padding: 18px 16px 28px; gap: 16px; }
  .page-intro h1 { letter-spacing: -1.2px; }
  .arena-stage { min-height: 300px; } .crash-stage { min-height: 320px; } .dbl-stage { min-height: 250px; padding: 14px 0 10px; gap: 10px; }
  .estado-texto { font-size: 24px; }
  .dbl-painel, .dbl-arena { padding: 10px; } .dbl-quantia { grid-template-columns: minmax(0, 1fr) 46px 46px; }
  .dbl-cor { height: 50px; } .dbl-painel .chip { height: 40px; font-size: 11.5px; }
  .dbl-rodape { padding: 0 10px; }
  .bet-columns { grid-template-columns: minmax(0, 1fr); gap: 8px; } .coluna { min-height: 0; } .lista { max-height: 210px; }
  .control-panel { padding: 18px; }
  .stake-grid { grid-template-columns: repeat(3, 1fr); }
  .toasts { left: 50%; bottom: 16px; }
  .main-footer { padding: 18px 16px; }
  .section-card { padding: 14px; } .section-card th:first-child, .section-card td:first-child { display: none; }
  .crash-bets-head, .crash-bet { grid-template-columns: 1.4fr 1fr 1fr; } .crash-bets-head span:last-child, .crash-bet span:last-child { display: none; }
  .modal { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =========================== chat ao vivo =========================== */
:root { --chat-w: 300px; }
.chat-dock {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--chat-w); z-index: 45;
  display: flex; flex-direction: column; background: #0f1218; border-left: 1px solid var(--sidebar-line);
  transform: translateX(100%); transition: transform .22s ease; box-shadow: none;
}
.chat-dock.is-open { transform: none; }
.chat-dock.is-shake { animation: chat-shake .35s ease; }
@keyframes chat-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
body.chat-aberto .main-shell { margin-right: var(--chat-w); }
body.chat-aberto .toasts { left: calc(50% + var(--sidebar-w) / 2 - var(--chat-w) / 2); }
.chat-head { height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--sidebar-line); background: #101218; flex: 0 0 auto; }
.chat-head-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; flex: 1; min-width: 0; }
.chat-head-title svg { width: 16px; height: 16px; color: var(--accent); }
.chat-online { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; margin-left: 4px; font-variant-numeric: tabular-nums; }
.chat-online i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px #3ddc8422; animation: pulsar 2s infinite; }
.chat-fechar { width: 30px; height: 30px; border-radius: 8px; }
.chat-lista { flex: 1; overflow-y: auto; padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; scrollbar-color: #2a2f3a transparent; overscroll-behavior: contain; }
.chat-vazio { margin: auto; text-align: center; color: var(--muted-2); font-size: 12px; padding: 20px; line-height: 1.5; }
.chat-msg { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; animation: chat-in .18s ease; }
@keyframes chat-in { from { opacity: 0; transform: translateY(4px); } }
.chat-avatar { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: hsl(var(--h) 55% 42%); border: 1px solid #ffffff10; margin-top: 1px; }
.chat-corpo { min-width: 0; }
.chat-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1; margin-bottom: 3px; }
.chat-nome { font-weight: 800; color: #d7dbe4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.chat-msg.is-mine .chat-nome { color: var(--accent); }
.chat-msg.is-admin .chat-nome { color: var(--gold); }
.chat-badge { font-style: normal; font-size: 8px; font-weight: 900; letter-spacing: .8px; padding: 2px 5px; border-radius: 4px; background: #ffc85722; color: var(--gold); }
.chat-hora { color: var(--muted-2); font-size: 10px; font-variant-numeric: tabular-nums; }
.chat-texto { margin: 0; font-size: 13px; line-height: 1.4; color: #e6e8ee; word-break: break-word; overflow-wrap: anywhere; }
.chat-msg.is-apagada .chat-texto { color: var(--muted-2); font-style: italic; font-size: 12px; }
.chat-acoes { margin-left: auto; display: none; gap: 2px; }
.chat-msg:hover .chat-acoes { display: inline-flex; }
.chat-acoes button { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; color: var(--muted); background: #ffffff08; }
.chat-acoes button:hover { color: var(--text); background: #ffffff14; }
.chat-acoes svg { width: 12px; height: 12px; }
.chat-sys { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: 12px; line-height: 1.35; color: #d7dbe4; border: 1px solid; animation: chat-in .18s ease; }
.chat-sys.is-double { background: linear-gradient(90deg, #ff3d4f1a, #ff3d4f08); border-color: #ff3d4f33; }
.chat-sys.is-crash { background: linear-gradient(90deg, #3ddc841a, #3ddc8408); border-color: #3ddc8433; }
.chat-sys b { color: var(--text); }
.chat-sys-icone { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #ffffff0c; }
.chat-sys-icone svg { width: 16px; height: 16px; }
.chat-sys.is-crash .chat-sys-icone svg { color: var(--green); }
.chat-novas { position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; box-shadow: var(--shadow); z-index: 2; }
.chat-rodape { flex: 0 0 auto; padding: 10px 12px 12px; border-top: 1px solid var(--sidebar-line); background: #101218; display: grid; gap: 8px; }
.chat-emojis { display: flex; gap: 2px; }
.chat-emojis button { width: 30px; height: 26px; border-radius: 7px; font-size: 15px; line-height: 1; display: grid; place-items: center; transition: transform .1s, background .15s; }
.chat-emojis button:hover { background: #ffffff0c; transform: scale(1.2); }
.chat-form { display: flex; gap: 6px; }
.chat-form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #0b0e14; color: var(--text); font-size: 13px; }
.chat-form input:focus { border-color: var(--accent); outline: none; }
.chat-enviar { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transition: filter .15s, transform .1s; }
.chat-enviar:hover { filter: brightness(1.08); } .chat-enviar:active { transform: scale(.94); } .chat-enviar:disabled { opacity: .5; }
.chat-enviar svg { width: 16px; height: 16px; }
.chat-sub { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat-regras { font-size: 10px; color: var(--muted-2); line-height: 1.35; }
.chat-contador { font-size: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.chat-contador.is-cheio { color: var(--accent); }
.chat-entrar { height: 40px; font-size: 12.5px; }
.chat-fab { position: fixed; right: 18px; bottom: 18px; width: 50px; height: 50px; border-radius: 16px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; box-shadow: 0 12px 30px #ff3d4f55; z-index: 44; transition: transform .15s; }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab svg { width: 22px; height: 22px; }
.chat-fab[hidden] { display: none; }
.chat-nao-lidas { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #fff; color: var(--accent); font-size: 10px; font-weight: 900; font-style: normal; display: grid; place-items: center; border: 2px solid #0e1016; }
.chat-nao-lidas[hidden] { display: none; }
#btn-chat { position: relative; }
@media (max-width: 1239px) {
  body.chat-aberto .main-shell { margin-right: 0; }
  body.chat-aberto .toasts { left: calc(50% + var(--sidebar-w) / 2); }
  .chat-dock { width: min(360px, 100vw); box-shadow: -20px 0 50px rgba(0, 0, 0, .5); }
}
@media (max-width: 700px) {
  .chat-dock { width: 100vw; }
  .chat-head { height: 56px; }
  .chat-fab { right: 14px; bottom: 14px; width: 46px; height: 46px; }
}
