/**
 * ░░░░░██╗░█████╗░░█████╗░░█████╗░  ░░██╗  ██████╗░███████╗██╗░░░██╗  ██╗░░
 * ░░░░░██║██╔══██╗██╔══██╗██╔══██╗  ░██╔╝  ██╔══██╗██╔════╝██║░░░██║  ╚██╗░
 * ░░░░░██║██║░░██║███████║██║░░██║  ██╔╝░  ██║░░██║█████╗░░╚██╗░██╔╝  ░╚██╗
 * ██╗░░██║██║░░██║██╔══██║██║░░██║  ╚██╗░  ██║░░██║██╔══╝░░░╚████╔╝░  ░██╔╝
 * ╚█████╔╝╚█████╔╝██║░░██║╚█████╔╝  ░╚██╗  ██████╔╝███████╗░░╚██╔╝░░  ██╔╝░
 * ░╚════╝░░╚════╝░╚═╝░░╚═╝░╚════╝░  ░░╚═╝  ╚═════╝░╚══════╝░░░╚═╝░░░  ╚═╝░░
 *
 * Central iGaming — desenvolvido por João
 *
 * Canal      https://t.me/central_igaming_channel
 * Network    https://t.me/central_igaming
 * Contato    https://t.me/Joao_igaming
 */

/* ============================================================================
   JogPIX — jp-core.css  (REESCRITO LIMPO • mobile-first • responsivo)
   ----------------------------------------------------------------------------
   Arquitetura:
   - O SITE PÚBLICO é sempre uma "moldura de app" (phone frame) centralizada.
   - No celular a moldura ocupa 100% da largura; no PC fica centralizada com
     largura máxima de --jp-frame-w. NÃO usamos JS para mover DOM, nem
     transform em ancestral (por isso position:fixed dos modais funciona).
   - Tudo escala por variáveis. Nada de !important espalhado.
   Ordem dos arquivos (ver layout.php):
     1) jp-core.css        (este: base, moldura, componentes globais)
     2) jp-gamif.css       (roleta / chuva / compartilhe)
     3) components/pwa-install.css
     4) pages/<pagina>.css (específicos)
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1) VARIÁVEIS
   ---------------------------------------------------------------------------- */
:root {
  /* Paleta (também alimentada pelo banco via #jp-theme-vars no layout) */
  --jp-bg: #070019;            --jp-bg-rgb: 7, 0, 25;
  --jp-bg2: #120342;           --jp-bg2-rgb: 18, 3, 66;
  --jp-panel: #210760;         --jp-panel-rgb: 33, 7, 96;
  --jp-panel2: #321184;        --jp-panel2-rgb: 50, 17, 132;
  --jp-card: #1a0d4f;          --jp-card-rgb: 26, 13, 79;
  --jp-gold: #ffe07a;          --jp-gold-rgb: 255, 224, 122;
  --jp-green: #37e87d;         --jp-green-rgb: 55, 232, 125;
  --jp-red: #ff526c;           --jp-red-rgb: 255, 82, 108;
  --jp-text: #fff;
  --jp-muted: #cabbf4;         --jp-muted-rgb: 202, 187, 244;
  --jp-orange: #ff8d24;        --jp-orange-rgb: 255, 141, 36;
  --jp-pink: #e83a9a;          --jp-pink-rgb: 232, 58, 154;
  --jp-yellow: #ffd739;        --jp-yellow-rgb: 255, 215, 57;
  --jp-purple: #822fff;        --jp-purple-rgb: 130, 47, 255;

  --jp-line: rgba(var(--jp-purple-rgb), .28);
  --jp-line2: rgba(var(--jp-pink-rgb), .55);
  --jp-shadow: 0 20px 55px rgba(0, 0, 0, .45);

  /* Moldura do app */
  --jp-frame-w: 480px;                 /* largura máxima no PC */
  --jp-frame-pad: clamp(8px, 3vw, 14px);
  --jp-header-h: 60px;
  --jp-bottom-h: 74px;
  --jp-radius: 16px;

  /* Gradientes reaproveitados */
  --jp-grad-action: linear-gradient(100deg, var(--jp-orange), var(--jp-pink));
  --jp-grad-card: linear-gradient(180deg, rgba(var(--jp-panel-rgb), .88), rgba(var(--jp-card-rgb), .92));
  --jp-phone-bg: url('/assets/remote/bg/main_bg.png');

  /* Largura efetiva da moldura e deslocamento à esquerda (centraliza fixed) */
  --jp-frame-real: min(100vw, var(--jp-frame-w));
  --jp-frame-left: max(0px, calc((100vw - var(--jp-frame-real)) / 2));
}

/* ----------------------------------------------------------------------------
   2) RESET / BASE
   ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: #100a26;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--jp-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  background: #100a26;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; -webkit-user-drag: none; user-drag: none; }
h1, h2, h3, h4, p { margin: 0; }

/* Tamanho-base dos títulos: o preflight do Tailwind zera font-size e font-weight
   de h1..h6, e sem esta base o <h1> sai igual ao texto corrido. Contido de
   propósito; componente com regra própria vence por especificidade. */
h1 { font-size: 22px; font-weight: 900; line-height: 1.15; }
h2 { font-size: 18px; font-weight: 800; line-height: 1.2; }
h3 { font-size: 15px; font-weight: 800; line-height: 1.25; }
::-webkit-scrollbar { width: 0; height: 0; }

/* ----------------------------------------------------------------------------
   3) A MOLDURA DO APP  (.jp-app-frame)
   O layout envolve header + drawer + página + footer numa única moldura.
   Ela tem largura máxima --jp-frame-w e fica centralizada (margin auto).
   Os elementos position:fixed (header, drawer, bottom-nav, botões flutuantes)
   ancoram à moldura via --jp-frame-left (deslocamento esquerdo até a moldura).
   No celular real (≤480px) a moldura ocupa 100% da largura.
   ---------------------------------------------------------------------------- */

/* fundo atrás da moldura (laterais no PC) usa cor do tema */
body.jp-app-body {
  display: block;
  background: var(--jp-bg2);
}
@media (min-width: 481px) {
  body.jp-app-body {
    background:
      radial-gradient(circle at 50% 0, rgba(var(--jp-purple-rgb), .22), transparent 46%),
      radial-gradient(circle at 50% 100%, rgba(var(--jp-pink-rgb), .12), transparent 50%),
      var(--jp-bg2);
    background-attachment: fixed;
  }
}

/* a moldura em si: container central, determinístico */
.jp-app-frame {
  position: relative;
  width: var(--jp-frame-real);
  max-width: var(--jp-frame-w);
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--jp-card);
  background-image: linear-gradient(180deg, rgba(7, 0, 25, .20), rgba(7, 0, 25, .10)), var(--jp-phone-bg);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 80px rgba(0, 0, 0, .5);
  overflow-x: hidden;
}

/* A página: ocupa a moldura e rola; o padding reserva espaço p/ header e bottom-nav */
.jp-page {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: calc(var(--jp-header-h) + env(safe-area-inset-top, 0px) + 8px)
           var(--jp-frame-pad)
           14px;
  background: transparent;
  overflow-x: hidden;
}

/* compat: classe antiga md:pl-[225px] não deve empurrar nada agora */
.md\:pl-\[225px\] { padding-left: var(--jp-frame-pad); }

/* shells internos ocupam 100% da moldura */
.jp-shell,
.jp-lobby-shell,
.jp-real-games-shell, .jp-games-polished-shell,
.jp-profile-shell-v4, .jp-profile-shell,
.jp-promo-shell, .jp-promo-polished-shell,
.jp-ref-shell, .jp-trans-shell {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* A sidebar de desktop antiga não é usada nesta moldura */
.jp-desktop-sidebar, .sider { display: none !important; }


/* ----------------------------------------------------------------------------
   4) HEADER MOBILE (topo da moldura)
   ---------------------------------------------------------------------------- */
.jp-mobile-top {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--jp-frame-real);
  max-width: var(--jp-frame-w);
  height: calc(var(--jp-header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 12px 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--jp-card);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .22);
}
.jp-mobile-menu-btn {
  position: relative;
  flex: 0 0 38px;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  display: grid; place-items: center;
  cursor: pointer;
}
.jp-mobile-menu-btn img { width: 24px; height: 24px; object-fit: contain; }
.jp-mobile-menu-btn b {
  position: absolute; top: -5px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 999px;
  background: var(--jp-red);
  color: #fff; font-size: 9px; font-weight: 800;
  display: grid; place-items: center;
}
.jp-top-brand-logo {
  flex: 0 1 auto;
  height: 32px; max-width: 124px;
  object-fit: contain;
  margin: 0 auto;
  cursor: pointer;
}
.jp-mobile-auth-actions { flex: 0 0 auto; display: flex; gap: 7px; align-items: center; }
.jp-mobile-auth-actions a {
  height: 34px; padding: 0 13px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.jp-mobile-auth-actions a:last-child { background: var(--jp-grad-action); border: 0; }

.jp-mobile-wallet-clean {
  flex: 0 0 auto;
  height: 36px; min-width: 96px; max-width: 116px;
  padding: 0 8px;
  display: flex; align-items: center; gap: 7px;
  border-radius: 999px;
  border: 1px solid rgba(var(--jp-yellow-rgb), .38);
  background: linear-gradient(180deg, var(--jp-panel2), var(--jp-card));
  color: #fff; font-weight: 800; cursor: pointer;
}
.jp-mobile-wallet-clean > i {
  width: 20px; height: 20px; flex: 0 0 20px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: var(--jp-grad-action); font-size: 10px;
}
.jp-mobile-wallet-clean span {
  font-size: 12px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jp-mobile-wallet-clean b {
  width: 17px; height: 17px; flex: 0 0 17px;
  border-radius: 999px;
  background: var(--jp-yellow); color: var(--jp-panel2);
  display: grid; place-items: center; font-size: 13px;
}

/* ----------------------------------------------------------------------------
   5) DRAWER LATERAL (menu mobile) — preso à moldura
   ---------------------------------------------------------------------------- */
.jp-drawer-overlay {
  position: fixed;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--jp-frame-real);
  max-width: var(--jp-frame-w);
  height: 100dvh;
  z-index: 1190;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.jp-drawer-overlay.open { opacity: 1; pointer-events: auto; }

/* largura do drawer dentro da moldura */
:root { --jp-drawer-w: min(calc(var(--jp-frame-real) * .84), 330px); }

.jp-side-drawer {
  position: fixed;
  top: 0; bottom: 0;
  /* fechado: totalmente fora da tela à esquerda */
  left: -360px;
  width: var(--jp-drawer-w);
  height: 100dvh;
  z-index: 1200;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  /* Fechado, o drawer sai também do alcance do teclado e do leitor de tela: só
     empurrar para fora da vista mantém os links focáveis. A transição de
     visibility é atrasada ao fechar e imediata ao abrir, então o deslize não muda. */
  visibility: hidden;
  transition: left .26s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .26s;
  border-right: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 22px 0 52px rgba(0, 0, 0, .45);
  background-color: var(--jp-card);
  background-image:
    linear-gradient(180deg, rgba(var(--jp-panel-rgb), .6), rgba(var(--jp-card-rgb), .85)),
    url('/assets/remote/bg/homev2_menu_bg.png');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}
/* aberto: encostado na borda esquerda da moldura */
.jp-side-drawer.open {
  left: calc(50% - var(--jp-frame-real) / 2);
  visibility: visible;
  /* ao ABRIR o menu aparece na hora; o atraso só existe no fechamento */
  transition: left .26s cubic-bezier(.22, 1, .36, 1), visibility 0s;
}
body.jp-drawer-open { overflow: hidden; }

.jp-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.jp-drawer-logo-clean { height: 34px; max-width: 130px; object-fit: contain; }

/* ----------------------------------------------------------------------------
   6) BOTTOM NAV (rodapé fixo da moldura)
   ---------------------------------------------------------------------------- */
.jp-mobile-bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--jp-frame-real);
  max-width: var(--jp-frame-w);
  height: calc(var(--jp-bottom-h) + env(safe-area-inset-bottom, 0px));
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex; align-items: center; justify-content: space-around;
  background: linear-gradient(180deg, var(--jp-purple), var(--jp-purple) 62%, var(--jp-panel));
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 34px rgba(var(--jp-purple-rgb), .35);
}
.jp-mobile-bottom a {
  position: relative;
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--jp-muted); font-size: 10px; font-weight: 800;
}
.jp-mobile-bottom a i { font-size: 20px; }
.jp-mobile-bottom a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-mobile-bottom a.active { color: var(--jp-yellow); }
.jp-mobile-bottom a.active i { filter: drop-shadow(0 0 10px rgba(var(--jp-yellow-rgb), .55)); }
.jp-mobile-bottom b {
  position: absolute; top: -4px; right: 22%;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px;
  background: var(--jp-red); color: #fff; font-size: 9px;
  display: grid; place-items: center;
}

/* ----------------------------------------------------------------------------
   7) BOTÕES FLUTUANTES (suporte / avatar)
   ---------------------------------------------------------------------------- */
.jp-floating-service,
.jp-floating-avatar {
  position: fixed;
  /* À direita: na borda esquerda o botão cobre onde o texto começa. À direita
     cai sobre a margem, e é o lado convencional de botão flutuante no mobile. */
  right: calc(50% - var(--jp-frame-real) / 2 + 14px);
  z-index: 85;
}
.jp-floating-service { bottom: calc(var(--jp-bottom-h) + 80px + env(safe-area-inset-bottom, 0px)); }
.jp-floating-avatar  { bottom: calc(var(--jp-bottom-h) + 28px + env(safe-area-inset-bottom, 0px)); }
.jp-floating-service img,
.jp-floating-avatar img {
  width: 42px; height: 42px;
  border-radius: 999px; object-fit: cover;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .35);
}
.jp-floating-avatar b {
  position: absolute; right: -4px; top: -4px;
  width: 17px; height: 17px;
  border-radius: 999px;
  background: var(--jp-red); color: #fff; font-size: 9px;
  display: grid; place-items: center;
}

/* ----------------------------------------------------------------------------
   8) SIDEBAR CONTENT (reaproveitado dentro do drawer)
   As classes jp-side-* aparecem tanto na sidebar antiga quanto no drawer.
   ---------------------------------------------------------------------------- */
.jp-side-brand { display: none; } /* marca do topo só no header agora */

.jp-side-auth, .jp-side-auth-v2 { display: grid; gap: 9px; }
.jp-side-auth a, .jp-side-auth-v2 a {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .15);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}
.jp-side-auth a:last-child, .jp-side-auth-v2 a:last-child { background: var(--jp-grad-action); border: 0; }

.jp-side-balance-card {
  border-radius: 14px;
  padding: 12px;
  border: 1px solid var(--jp-line);
  background:
    radial-gradient(circle at 90% 0, rgba(var(--jp-orange-rgb), .24), transparent 42%),
    linear-gradient(180deg, rgba(var(--jp-purple-rgb), .72), rgba(var(--jp-panel-rgb), .92));
}
.jp-side-balance-card small { display: block; color: var(--jp-muted); font-size: 10px; font-weight: 800; margin-bottom: 5px; }
.jp-side-balance-card strong { font-size: 18px; }
.jp-side-money-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.jp-side-money-actions button,
.jp-side-money-actions a {
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(255, 255, 255, .05);
  color: #fff; font-weight: 800; font-size: 11px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
}
.jp-side-deposit-btn { background: var(--jp-grad-action) !important; border: 0 !important; }

.jp-nav-list, .jp-nav-list-v2 { display: grid; gap: 6px; }
.jp-nav-item {
  height: 40px;
  border-radius: 10px;
  padding: 0 12px;
  display: flex; align-items: center; gap: 12px;
  color: var(--jp-muted); font-size: 13px; font-weight: 800;
}
.jp-nav-item i { width: 16px; text-align: center; font-size: 14px; }
.jp-nav-item.active, .jp-nav-item:hover {
  background: rgba(var(--jp-purple-rgb), .38);
  color: #fff;
}
.jp-nav-item.active i { color: var(--jp-yellow); }

.jp-side-promo, .jp-side-promo-v2 {
  margin-top: auto;
  min-height: 96px;
  border-radius: 15px;
  padding: 12px;
  display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid var(--jp-line);
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 85%, rgba(var(--jp-orange-rgb), .45), transparent 40%),
    linear-gradient(160deg, var(--jp-purple), var(--jp-panel2));
}
.jp-side-promo span, .jp-side-promo strong { font-size: 12px; line-height: 1.1; }
.jp-side-promo em {
  margin-top: 9px; width: max-content;
  background: var(--jp-grad-action);
  padding: 6px 9px; border-radius: 8px;
  font-style: normal; font-weight: 800; font-size: 11px;
}
.jp-lang, .jp-lang-v2 {
  height: 33px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  padding: 0 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--jp-muted); font-weight: 800;
}

/* ----------------------------------------------------------------------------
   9) COMPONENTES GLOBAIS (botões, inputs, cards, status, tabelas)
   ---------------------------------------------------------------------------- */
.jp-card {
  background: var(--jp-grad-card);
  border: 1px solid var(--jp-line);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .03) inset;
}
.jp-card-pad { padding: 16px; }

.jp-btn, .jp-btn-sm {
  border: 0; border-radius: 14px;
  background: var(--jp-grad-action);
  color: #fff; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 24px rgba(var(--jp-pink-rgb), .22);
  transition: opacity .2s, transform .08s;
  text-decoration: none;
}
.jp-btn { height: 46px; padding: 0 22px; }
.jp-btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.jp-btn:hover, .jp-btn-sm:hover { opacity: .93; }
.jp-btn:active, .jp-btn-sm:active { transform: scale(.98); }
.jp-btn-outline {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: none;
}

.jp-back {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--jp-line);
  color: #fff; cursor: pointer;
}

.jp-input {
  width: 100%; height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(var(--jp-card-rgb), .78);
  color: #fff; outline: none;
  padding: 0 14px;
}
.jp-input:focus { border-color: var(--jp-line2); }
textarea.jp-input { height: auto; padding: 12px 14px; resize: vertical; }
.jp-label { display: block; color: var(--jp-muted); font-size: 12px; font-weight: 800; margin: 0 0 8px; }

/* ----------------------------------------------------------------------------
   Componente: select customizado (.jp-select) — usado nos filtros dos
   históricos (prêmios, depósitos, saques). Abre SEMPRE para baixo; o card do
   histórico ganha a classe .menu-down (via JS) para reservar altura e conter o
   menu, e a página rola suavemente para mantê-lo visível acima do menu inferior.
   As cores seguem os tokens de tema.
   ---------------------------------------------------------------------------- */
.jp-select { position: relative; }
.jp-select-btn {
  width: 100%; height: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px; border-radius: 12px; cursor: pointer;
  background: rgba(var(--jp-card-rgb), .78);
  border: 1px solid rgba(255, 255, 255, .13);
  color: var(--jp-text); font-size: 14px; font-weight: 600; text-align: left;
  transition: border-color .18s ease;
}
.jp-select-btn:hover { border-color: rgba(var(--jp-purple-rgb), .5); }
.jp-select.open .jp-select-btn { border-color: rgba(var(--jp-purple-rgb), .65); }
.jp-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-select-caret { color: var(--jp-muted); font-size: 12px; transition: transform .2s ease; }
.jp-select.open .jp-select-caret { transform: rotate(180deg); }
.jp-select-menu {
  position: absolute; top: calc(100% + 7px); right: 0; z-index: 60;
  margin: 0; padding: 5px; list-style: none;
  max-height: min(260px, 48vh); overflow-y: auto;
  background: linear-gradient(180deg, rgba(var(--jp-panel2-rgb), .98), rgba(var(--jp-card-rgb), .99));
  border: 1px solid rgba(var(--jp-purple-rgb), .45);
  border-radius: 13px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.jp-select.open .jp-select-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.jp-select-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 12px; border-radius: 9px; cursor: pointer;
  color: var(--jp-text); font-size: 14px; font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.jp-select-opt i { opacity: 0; font-size: 12px; color: var(--jp-muted); transition: opacity .15s ease; }
.jp-select-opt:hover { background: rgba(var(--jp-purple-rgb), .14); }
.jp-select-opt.is-selected {
  background: rgba(var(--jp-purple-rgb), .20);
  color: var(--jp-muted);
  color: color-mix(in srgb, var(--jp-purple) 45%, #fff);
}
.jp-select-opt.is-selected i {
  opacity: 1;
  color: var(--jp-muted);
  color: color-mix(in srgb, var(--jp-purple) 45%, #fff);
}

.jp-status {
  display: inline-flex; align-items: center;
  border-radius: 9px; padding: 4px 9px;
  font-size: 11px; font-weight: 800;
  border: 1px solid currentColor;
}
.jp-status.is-ok { color: var(--jp-green); background: rgba(var(--jp-green-rgb), .1); }
.jp-status.is-pending { color: var(--jp-yellow); background: rgba(var(--jp-yellow-rgb), .1); }
.jp-status.is-danger { color: var(--jp-red); background: rgba(var(--jp-red-rgb), .1); }
.jp-status.is-muted { color: var(--jp-muted); background: rgba(255, 255, 255, .06); }

/* títulos / utilidades de página */
.jp-header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.jp-title { font-size: 22px; font-weight: 900; letter-spacing: -.03em; }
.jp-subtitle { font-size: 13px; color: var(--jp-muted); margin-top: 3px; }
.jp-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.jp-section-head h2 { font-size: 18px; }
.jp-mini-section-title { font-size: 17px; font-weight: 900; margin: 0 0 10px; }
.jp-page-mini-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.jp-badge {
  display: inline-flex; align-items: center;
  border-radius: 999px;
  background: rgba(var(--jp-purple-rgb), .28);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--jp-muted); font-size: 12px; font-weight: 800;
  padding: 4px 10px;
}

.jp-grid { display: grid; gap: 12px; }
.jp-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jp-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.jp-stat {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(var(--jp-panel-rgb), .86), rgba(var(--jp-card-rgb), .88));
  border: 1px solid rgba(255, 255, 255, .07);
}
.jp-stat-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; background: linear-gradient(135deg, var(--jp-purple), var(--jp-panel2)); display: grid; place-items: center; }
.jp-stat small { display: block; color: var(--jp-muted); font-size: 11px; }
.jp-stat strong { display: block; font-size: 16px; }

.jp-empty { padding: 24px; text-align: center; color: var(--jp-muted); }
.jp-empty i { font-size: 28px; color: var(--jp-yellow); display: block; margin-bottom: 8px; }
.jp-empty strong { display: block; }
.jp-empty span { display: block; color: var(--jp-muted); font-size: 12px; margin-top: 4px; }
.jp-empty-compact { padding: 16px; }

/* tabelas: viram cartões empilhados (mobile-first) */
.jp-table { width: 100%; border-collapse: separate; border-spacing: 0 7px; }
.jp-table th { font-size: 11px; color: var(--jp-muted); text-align: left; background: rgba(var(--jp-purple-rgb), .18); padding: 8px 11px; }
.jp-table td { background: rgba(var(--jp-card-rgb), .7); padding: 10px 11px; border-top: 1px solid rgba(255, 255, 255, .05); border-bottom: 1px solid rgba(255, 255, 255, .05); }
.jp-table th:first-child, .jp-table td:first-child { border-radius: 10px 0 0 10px; }
.jp-table th:last-child, .jp-table td:last-child { border-radius: 0 10px 10px 0; text-align: right; }

.jp-mobile-card-table .jp-table thead { display: none; }
.jp-mobile-card-table .jp-table,
.jp-mobile-card-table .jp-table tbody,
.jp-mobile-card-table .jp-table tr,
.jp-mobile-card-table .jp-table td { display: block; width: 100%; }
.jp-mobile-card-table .jp-table tr { background: rgba(var(--jp-card-rgb), .7); border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; margin-bottom: 8px; padding: 8px; }
.jp-mobile-card-table .jp-table td { background: transparent; border: 0; border-radius: 0; text-align: right; display: flex; justify-content: space-between; gap: 12px; padding: 6px 3px; }
.jp-mobile-card-table .jp-table td::before { content: attr(data-label); color: var(--jp-muted); font-weight: 800; text-align: left; }

/* copiar link / compartilhar (perfil/indicação) */
.jp-copy-box-v2 { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.jp-copy-box-v2 input { flex: 1; height: 42px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(var(--jp-card-rgb), .78); color: #fff; padding: 0 12px; min-width: 0; }
.jp-share-v2 { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.jp-share-v2 a { height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); padding: 0 10px; display: flex; align-items: center; gap: 6px; font-size: 11px; }

/* ícone de provedor (cards/categorias) */
.jp-provider-icon-img { width: 34px; height: 34px; object-fit: contain; }
.jp-provider-icon-text { font-size: 16px; color: var(--jp-yellow); }

/* ----------------------------------------------------------------------------
   10) CARD DE JOGO (usado em lobby e games)
   ---------------------------------------------------------------------------- */
.jp-game-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: var(--jp-card);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}
.jp-game-card img { width: 100%; height: 100%; object-fit: cover; }
/* Sem véu escuro no pé da carta: ele existia só para o rótulo de nome ficar
   legível, e o rótulo saiu — a arte do provedor já traz o nome do jogo. Mantê-lo
   agora seria escurecer metade da capa por nada. */
.jp-fav {
  position: absolute; z-index: 2; right: 5px; top: 5px;
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .65);
  background: rgba(0, 0, 0, .35);
  color: #fff; display: grid; place-items: center; font-size: 11px;
  cursor: pointer;
}

/* ----------------------------------------------------------------------------
   11) MODAIS (depósito / saque / chave PIX)
   Regra única e clara: escondidos por padrão; aparecem com .open (saque/pix)
   ou .opacity-100 (depósito, via JS/Tailwind). Sem transform em ancestral,
   então position:fixed centraliza na MOLDURA corretamente.
   ---------------------------------------------------------------------------- */

/* Backdrops — cobrem a moldura (centralizada) */
#depositBackdrop, #pixKeyBackdrop, #withdrawBackdrop,
.jp-modal-backdrop, .jp-deposit-modal-backdrop {
  position: fixed;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--jp-frame-real);
  max-width: var(--jp-frame-w);
  height: 100dvh;
  z-index: 99990;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
#depositBackdrop.opacity-100,
.jp-modal-backdrop.opacity-100,
#pixKeyBackdrop.open, #withdrawBackdrop.open,
.jp-deposit-modal-backdrop.open {
  opacity: 1; pointer-events: auto; visibility: visible;
}

/* Janelas dos modais — centralizadas na moldura, com rolagem interna */
#depositModal, #pixKeyModal, #withdrawModal,
.jp-deposit-modal, .jp-saque-modal, .jp-saque-modal-v3 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.96);
  width: calc(var(--jp-frame-real) - 28px);
  max-width: 420px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
#depositModal.opacity-100,
.jp-deposit-modal.opacity-100,
#pixKeyModal.open, #withdrawModal.open,
.jp-saque-modal.open, .jp-saque-modal-v3.open {
  opacity: 1; pointer-events: auto; visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
/* esconde Tailwind .hidden de verdade dentro do modal */
#depositModal .hidden { display: none !important; }

/* ----------------------------------------------------------------------------
   O modal de DEPÓSITO traz classes Tailwind inline (w-[94%], max-w-[720px],
   left-1/2, top-1/2, -translate-x/y-1/2, scale-95/100). Aqui forçamos a
   posição/tamanho corretos da MOLDURA, sem depender da ordem do Tailwind.
   O JS continua alternando .opacity-100 / .scale-100 normalmente.
   ---------------------------------------------------------------------------- */
#depositModal.jp-deposit-modal {
  top: 50% !important;
  left: 50% !important;
  width: calc(var(--jp-frame-real) - 28px) !important;
  max-width: 420px !important;
  transform: translate(-50%, -50%) scale(.96) !important;
}
#depositModal.jp-deposit-modal.opacity-100,
#depositModal.jp-deposit-modal.scale-100 {
  transform: translate(-50%, -50%) scale(1) !important;
}
/* backdrop do depósito acompanha a moldura mesmo com classes Tailwind */
#depositBackdrop.jp-modal-backdrop {
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: var(--jp-frame-real) !important;
  max-width: var(--jp-frame-w) !important;
}

/* Painel do modal (coluna única na moldura) */
.jp-deposit-panel {
  display: block;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(var(--jp-panel-rgb), .98), rgba(var(--jp-card-rgb), .98));
  border: 1px solid rgba(var(--jp-pink-rgb), .35);
  box-shadow: var(--jp-shadow);
}
.jp-deposit-side { display: none; } /* lado decorativo só faz sentido em telas largas; ocultado na moldura */
.jp-deposit-body { position: relative; padding: 20px; }
.jp-deposit-body h2 { font-size: 24px; font-weight: 900; margin: 0 0 16px; padding-right: 44px; }
.jp-deposit-close { position: absolute; right: 14px; top: 14px; z-index: 5; }
.jp-deposit-hint { color: var(--jp-muted); font-size: 13px; margin: 12px 0 8px; }
.jp-money-input { position: relative; }
.jp-money-input span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-weight: 900; }
.jp-money-input input { padding-left: 54px; font-size: 18px; font-weight: 800; }
.jp-deposit-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 16px; }
.jp-deposit-presets .jp-btn-sm { padding: 0; font-size: 11px; }
.jp-deposit-submit { width: 100%; }
.jp-deposit-loading { text-align: center; padding: 34px 0; }
.jp-deposit-loading img { width: 74px; margin: 0 auto 12px; }
.jp-deposit-qr { text-align: center; }
.jp-deposit-qr img { max-width: 220px; margin: 0 auto 12px; border: 2px solid #fff; border-radius: 12px; }
.jp-deposit-qr textarea { height: 88px; padding: 12px; font-size: 12px; resize: none; margin-bottom: 10px; }

/* checkbox salvar CPF */
.jp-deposit-savecpf { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--jp-muted); margin: 8px 0 4px; cursor: pointer; }
.jp-deposit-savecpf input { width: 16px; height: 16px; }
.jp-deposit-cpfsaved { font-size: 12.5px; color: var(--jp-green); margin: 8px 0 4px; display: flex; align-items: center; gap: 6px; }
.jp-deposit-cpfsaved a { color: var(--jp-yellow); font-weight: 700; }

/* lista de chaves PIX (saque) */
.jp-pixkey-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.jp-pixkey-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(var(--jp-card-rgb), .7); border: 1px solid var(--jp-line); }
.jp-pixkey-info { display: flex; align-items: center; gap: 12px; }
.jp-pixkey-info i { font-size: 22px; color: var(--jp-pink); }
.jp-pixkey-info strong { display: block; font-size: 14px; }
.jp-pixkey-info small { color: var(--jp-muted); font-size: 12px; }
.jp-pixkey-actions { display: flex; gap: 6px; }
.jp-icon-btn { width: 34px; height: 34px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.jp-icon-btn:hover { background: rgba(255, 255, 255, .18); }
.jp-icon-btn-danger:hover { background: rgba(var(--jp-red-rgb), .6); }

body.jp-modal-open .jp-mobile-bottom { display: none; }

/* ----------------------------------------------------------------------------
   12) FOOTER  (dentro da moldura, rola junto com a página)
   ---------------------------------------------------------------------------- */
.jp-footer {
  width: 100%;
  max-width: 100%;
  /* o espaço de baixo reserva a altura da bottom-nav fixa para nada ficar escondido */
  margin: 4px 0 0;
  padding: 0 var(--jp-frame-pad)
           calc(var(--jp-bottom-h) + env(safe-area-inset-bottom, 0px) + 16px);
}
.jp-footer-inner {
  background: linear-gradient(180deg, rgba(var(--jp-panel-rgb), .78), rgba(var(--jp-card-rgb), .92));
  border: 1px solid var(--jp-line);
  border-radius: var(--jp-radius);
  padding: 16px;
}
.jp-footer-apps { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.jp-app-icons { display: flex; gap: 12px; }
.jp-app-icons img { height: 34px; }
.jp-footer-77 { height: 70px; object-fit: contain; grid-row: 1 / 3; grid-column: 2; }
.jp-transfer-link { display: inline-flex; gap: 8px; align-items: center; color: var(--jp-yellow); font-size: 20px; font-weight: 900; }
.jp-footer-socials { display: flex; gap: 12px; margin: 14px 0; overflow: auto; }
.jp-footer-socials img { width: 30px; height: 30px; }
.jp-footer-legal, .jp-footer-copy { color: var(--jp-muted); line-height: 1.55; font-size: 10.5px; }

/* ----------------------------------------------------------------------------
   13) RESPONSIVO — telas estreitas (≤480 = moldura ocupa tudo) e larguras menores
   A moldura já é fluida via --jp-frame-real. Aqui só afinamos sub-breakpoints.
   ---------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root { --jp-frame-real: 100vw; --jp-frame-left: 0px; }
  .jp-page { box-shadow: none; }
}

@media (max-width: 360px) {
  body { font-size: 13px; }
  .jp-mobile-auth-actions a { padding: 0 10px; font-size: 11px; }
  .jp-top-brand-logo { max-width: 100px; }
  .jp-mobile-bottom a { font-size: 9px; }
  .jp-mobile-bottom a span { font-size: 9px; }
  .jp-title { font-size: 20px; }
}

/* grids genéricos colapsam em coluna única no estreito */
@media (max-width: 420px) {
  .jp-grid-2, .jp-grid-3, .jp-grid-4 { grid-template-columns: 1fr; }
}
/* ===== Diálogo de confirmação do sistema =================================
   Substitui confirm()/alert() do navegador: aquele não aceita estilo, aparece
   com "meusite.local diz" no meio de um painel com identidade própria, trava a
   aba inteira e joga título, motivo e consequência num bloco de texto só. */
.jp-dlg{position:fixed;inset:0;z-index:200;display:none;align-items:center;justify-content:center;padding:20px}
.jp-dlg.is-aberto{display:flex}
.jp-dlg[hidden]{display:none}
.jp-dlg-fundo{position:absolute;inset:0;background:rgba(3,0,10,.74);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.jp-dlg-caixa{
  position:relative;z-index:1;width:min(440px,100%);
  padding:24px 22px 18px;border-radius:18px;text-align:center;
  border:1px solid rgba(255,255,255,.16);
  background:linear-gradient(180deg,#1c1040,#150b31);
  box-shadow:0 30px 80px rgba(0,0,0,.62);
  animation:jpDlgEntra .16s ease-out both;
}
@keyframes jpDlgEntra{from{transform:translateY(10px) scale(.97);opacity:0}to{transform:none;opacity:1}}
.jp-dlg-icone{
  width:52px;height:52px;margin:0 auto 14px;border-radius:999px;
  display:grid;place-items:center;font-size:26px;font-weight:900;
  background:rgba(124,60,255,.2);color:#c9b4ff;border:1px solid rgba(124,60,255,.45);
}
.jp-dlg.is-perigo .jp-dlg-icone{background:rgba(255,65,105,.16);color:#ff6b8a;border-color:rgba(255,65,105,.45)}
.jp-dlg-titulo{margin:0 0 8px;font-size:19px;font-weight:900;color:#fff;line-height:1.3}
.jp-dlg-msg{margin:0 0 8px;font-size:14px;line-height:1.5;color:#cfc1ff}
.jp-dlg-detalhe{margin:0;font-size:12.5px;line-height:1.5;color:#9d8fc4}
.jp-dlg-msg[hidden],.jp-dlg-detalhe[hidden]{display:none}
.jp-dlg-acoes{display:flex;gap:10px;margin-top:20px}
.jp-dlg-btn{
  flex:1 1 0;min-width:0;height:44px;padding:0 14px;border-radius:12px;
  font-size:14px;font-weight:800;cursor:pointer;border:1px solid transparent;
  transition:filter .15s,box-shadow .15s;
}
.jp-dlg-btn:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(19,220,255,.45)}
.jp-dlg-cancelar{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.2)}
.jp-dlg-cancelar:hover{background:rgba(255,255,255,.14)}
.jp-dlg-ok{background:linear-gradient(100deg,#7c3cff,#c13cff);color:#fff}
.jp-dlg.is-perigo .jp-dlg-ok{background:linear-gradient(100deg,#ff4169,#ff8d24)}
.jp-dlg-ok:hover{filter:brightness(1.08)}
/* Empilha com CANCELAR em cima: column-reverse jogava o botão destrutivo
   logo abaixo do texto, que é onde o polegar cai depois de ler. */
@media (max-width:420px){.jp-dlg-acoes{flex-direction:column}}
