/* =====================================================================
   GBX Casino — tema premium dark
   Paleta: fundo grafite, superfícies cinza-azuladas, acentos royal/ouro
   ===================================================================== */
:root {
  --bg: #0b0e14;
  --bg-2: #0f131b;
  --surface: #141922;
  --surface-2: #1a2130;
  --surface-3: #212a3b;
  --border: #253043;
  --border-2: #31405a;
  --text: #e8ecf3;
  --muted: #8d98ad;
  --muted-2: #5f6b82;
  --royal: #2f5bea;
  --royal-2: #4c74ff;
  --royal-deep: #1c3cae;
  --gold: #d4af37;
  --gold-2: #f0cf62;
  --green: #22a65b;
  --green-2: #2fd072;
  --red: #d8344a;
  --red-2: #f15a6e;
  --amber: #e8a93b;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --shadow-sm: 0 4px 14px rgba(0,0,0,.35);
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

* { box-sizing: border-box; }
/* Variáveis do Bootstrap 5.3 (texto, bordas, tabelas) alinhadas ao tema dark */
body {
  --bs-body-color: var(--text); --bs-body-bg: var(--bg); --bs-border-color: var(--border);
  --bs-heading-color: var(--text); --bs-secondary-color: var(--muted); --bs-tertiary-color: var(--muted-2);
  --bs-link-color: var(--royal-2); --bs-link-hover-color: #7c98ff; --bs-emphasis-color: #fff;
}
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(1200px 600px at 20% -10%, rgba(47,91,234,.12), transparent 60%),
              radial-gradient(900px 500px at 100% 0%, rgba(212,175,55,.07), transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--royal-2); text-decoration: none; }
a:hover { color: #7c98ff; }
h1,h2,h3,h4,h5 { font-weight: 700; letter-spacing: -.01em; }
.font-display { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; }
.text-muted { color: var(--muted) !important; }
.text-gold { color: var(--gold) !important; }
.text-royal { color: var(--royal-2) !important; }
.text-green { color: var(--green-2) !important; }
.text-red { color: var(--red-2) !important; }
.small-caps { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- Navbar ---------- */
.navbar-gbx {
  background: rgba(13,17,25,.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.navbar-gbx .navbar-brand { font-family: var(--font-display); font-size: 1.35rem; color: var(--text); }
.navbar-gbx .navbar-brand .logo-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--royal), var(--royal-deep)); color: #fff; margin-right: 9px;
  box-shadow: 0 6px 16px rgba(47,91,234,.35); font-size: 1rem;
}
.navbar-gbx .nav-link { color: var(--muted); font-weight: 500; padding: .55rem .85rem; border-radius: 8px; }
.navbar-gbx .nav-link:hover, .navbar-gbx .nav-link.active { color: var(--text); background: var(--surface-2); }
.navbar-gbx .nav-link i { margin-right: 6px; opacity: .85; }
.balance-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); font-weight: 600;
}
.balance-pill .chip-ico { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .65rem; }
.balance-pill .chip-ico.real { background: radial-gradient(circle, var(--gold-2), var(--gold)); color: #3a2c00; }
.balance-pill .chip-ico.play { background: radial-gradient(circle, #5fa0ff, var(--royal)); color: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-3); border: 2px solid var(--border-2); }
.avatar-sm { width: 28px; height: 28px; }
.avatar-lg { width: 96px; height: 96px; }
.frame-silver { border-color: #c0c0c0 !important; box-shadow: 0 0 0 2px rgba(192,192,192,.35); }
.frame-gold { border-color: var(--gold) !important; box-shadow: 0 0 0 2px rgba(212,175,55,.4); }
.frame-diamond { border-color: #7fd7ff !important; box-shadow: 0 0 0 2px rgba(127,215,255,.45), 0 0 14px rgba(127,215,255,.5); }

.dropdown-menu { background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: var(--shadow); border-radius: 12px; padding: 6px; }
.dropdown-item { color: var(--text); border-radius: 8px; padding: 8px 12px; }
.dropdown-item:hover { background: var(--surface-3); color: #fff; }
.dropdown-divider { border-color: var(--border); }

/* ---------- Cards / Panels ---------- */
.panel {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.panel-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-body { padding: 20px; }
.panel-title { margin: 0; font-size: 1rem; font-weight: 700; }
.card-gbx { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .2s, border-color .2s; }
.card-gbx:hover { border-color: var(--border-2); transform: translateY(-2px); }
.stat-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat-tile .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat-tile .value { font-size: 1.4rem; font-weight: 700; margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn { border-radius: 10px; font-weight: 600; padding: .55rem 1.1rem; border: 1px solid transparent; transition: all .18s; }
.btn-royal { background: linear-gradient(180deg, var(--royal-2), var(--royal)); color: #fff; box-shadow: 0 6px 18px rgba(47,91,234,.35); }
.btn-royal:hover { background: linear-gradient(180deg, #5d82ff, var(--royal-2)); color: #fff; transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2d2200; box-shadow: 0 6px 18px rgba(212,175,55,.3); }
.btn-gold:hover { background: linear-gradient(180deg, #ffe07a, var(--gold-2)); color: #2d2200; transform: translateY(-1px); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-3); color: #fff; border-color: #44557a; }
.btn-outline-light { border-color: var(--border-2); color: var(--text); }
.btn-success { background: linear-gradient(180deg, var(--green-2), var(--green)); border: 0; }
.btn-danger { background: linear-gradient(180deg, var(--red-2), var(--red)); border: 0; }
.btn-sm { padding: .35rem .75rem; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1.05rem; border-radius: 12px; }

/* ---------- Forms ---------- */
.form-control, .form-select {
  background-color: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); border-radius: 10px; padding: .65rem .9rem;
}
.form-control:focus, .form-select:focus { background-color: var(--bg-2); color: var(--text); border-color: var(--royal-2); box-shadow: 0 0 0 .2rem rgba(47,91,234,.2); }
.form-control::placeholder { color: var(--muted-2); }
.form-select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238d98ad' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 14px 10px;
}
.form-select option { background: var(--surface-2); color: var(--text); }
.form-control[type=file]::file-selector-button { background: var(--surface-3); color: var(--text); border: 0; margin-right: .75rem; }
.form-control[type=date], .form-control[type=datetime-local] { color-scheme: dark; }
.form-control:disabled, .form-select:disabled { background-color: var(--surface); opacity: .6; }
.form-label { color: var(--muted); font-size: .82rem; font-weight: 600; margin-bottom: .35rem; }
.form-check-input { background-color: var(--bg-2); border-color: var(--border-2); }
.form-check-input:checked { background-color: var(--royal); border-color: var(--royal); }
.input-group-text { background: var(--surface-2); border-color: var(--border-2); color: var(--muted); }
.invalid-feedback { color: var(--red-2); }
.is-invalid { border-color: var(--red) !important; }
.form-range::-webkit-slider-thumb { background: var(--gold); }
.form-range::-moz-range-thumb { background: var(--gold); }
.form-range::-webkit-slider-runnable-track { background: var(--surface-3); }

/* ---------- Tables ---------- */
.table-gbx, .table {
  margin: 0; --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--border);
  --bs-table-striped-bg: rgba(255,255,255,.02); --bs-table-striped-color: var(--text);
  --bs-table-hover-bg: rgba(255,255,255,.03); --bs-table-hover-color: #fff;
  --bs-table-active-bg: rgba(212,175,55,.08); --bs-table-active-color: var(--text);
  color: var(--text);
}
.table-gbx > :not(caption) > * > * { color: var(--text); background: transparent; }
.table-gbx th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; border-color: var(--border); padding: 12px 16px; }
.table-gbx td { border-color: var(--border); padding: 12px 16px; vertical-align: middle; }
.table-gbx tbody tr:hover { background: rgba(255,255,255,.025); }
.badge-soft { padding: 5px 10px; border-radius: 999px; font-weight: 600; font-size: .72rem; border: 1px solid transparent; }
.badge-real { background: rgba(212,175,55,.14); color: var(--gold-2); border-color: rgba(212,175,55,.3); }
.badge-play { background: rgba(47,91,234,.14); color: #9fb4ff; border-color: rgba(47,91,234,.3); }
.badge-live { background: rgba(34,166,91,.14); color: var(--green-2); border-color: rgba(34,166,91,.3); }
.badge-open { background: rgba(141,152,173,.14); color: var(--muted); border-color: rgba(141,152,173,.3); }
.badge-vip { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #2d2200; }
.badge-private { background: rgba(216,52,74,.14); color: var(--red-2); border-color: rgba(216,52,74,.3); }

/* ---------- Alerts ---------- */
.alert { border-radius: 12px; border: 1px solid transparent; }
.alert-success { background: rgba(34,166,91,.12); border-color: rgba(34,166,91,.35); color: #a9f0c4; }
.alert-danger { background: rgba(216,52,74,.12); border-color: rgba(216,52,74,.35); color: #ffb5be; }
.alert-warning { background: rgba(232,169,59,.12); border-color: rgba(232,169,59,.35); color: #ffe0a6; }
.alert-info { background: rgba(47,91,234,.12); border-color: rgba(47,91,234,.35); color: #c0ceff; }

/* ---------- Tabs / Nav pills ---------- */
.nav-pills-gbx .nav-link { color: var(--muted); border-radius: 10px; font-weight: 600; padding: .5rem 1rem; }
.nav-pills-gbx .nav-link.active { background: var(--surface-3); color: #fff; }
.nav-tabs-gbx { border-bottom: 1px solid var(--border); }
.nav-tabs-gbx .nav-link { color: var(--muted); border: 0; border-bottom: 2px solid transparent; font-weight: 600; padding: .7rem 1rem; }
.nav-tabs-gbx .nav-link.active { color: #fff; background: transparent; border-bottom-color: var(--gold); }

/* ---------- Modal ---------- */
.modal-content { background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px; color: var(--text); }
.modal-header, .modal-footer { border-color: var(--border); }
.btn-close { filter: invert(1) grayscale(1) opacity(.7); }

/* ---------- Pagination ---------- */
.pagination .page-link { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.pagination .page-item.active .page-link { background: var(--royal); border-color: var(--royal); }
.pagination .page-item.disabled .page-link { background: var(--surface); color: var(--muted-2); }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side {
  position: relative; overflow: hidden; padding: 56px;
  background: radial-gradient(900px 500px at 0% 0%, rgba(47,91,234,.35), transparent 60%),
              radial-gradient(700px 500px at 100% 100%, rgba(212,175,55,.18), transparent 60%),
              linear-gradient(160deg, #0f1522, #0b0e14);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-side .big-suit { position: absolute; right: -40px; bottom: -60px; font-size: 420px; opacity: .05; line-height: 1; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form > div { width: 100%; max-width: 420px; }
@media (max-width: 991px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Landing ---------- */
.hero { padding: 110px 0 80px; position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.05; }
.hero .lead { color: var(--muted); font-size: 1.15rem; max-width: 560px; }
.hero-cards { position: relative; height: 380px; }
.hero-cards .pcard { position: absolute; left: 50%; top: 50%; transform-origin: 50% 120%; animation: fan 1.2s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fan { from { opacity: 0; transform: translate(-50%,-50%) rotate(0) translateY(40px); } to { opacity: 1; } }
.feature-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--gold); font-size: 1.2rem; }
.game-tile { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); padding: 26px; min-height: 180px; }
.game-tile .ico { font-size: 2.6rem; color: var(--gold); }
.game-tile.soon { opacity: .55; }
.section-title { font-size: 1.9rem; }
.footer { border-top: 1px solid var(--border); color: var(--muted); padding: 30px 0; font-size: .9rem; }

/* ---------- Lobby ---------- */
.lobby-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.room-row td { font-weight: 500; }
.seat-dots span { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); margin-right: 3px; border: 1px solid var(--border-2); }
.seat-dots span.on { background: var(--green-2); border-color: var(--green-2); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.status-dot.on { background: var(--green-2); box-shadow: 0 0 8px var(--green-2); }

/* ---------- Shop ---------- */
.pkg { position: relative; text-align: center; padding: 26px 18px; }
.pkg .chips { font-size: 1.8rem; font-weight: 800; }
.pkg .bonus { color: var(--green-2); font-weight: 600; font-size: .85rem; }
.pkg .ribbon { position: absolute; top: 12px; right: -30px; transform: rotate(35deg); background: var(--gold); color: #2d2200; font-size: .65rem; font-weight: 800; padding: 3px 36px; letter-spacing: .08em; }
.chip-stack { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--gold-2), var(--gold) 55%, #7a5e12); box-shadow: inset 0 0 0 6px rgba(255,255,255,.18), 0 8px 20px rgba(0,0,0,.4); position: relative; }
.chip-stack::after { content: ''; position: absolute; inset: 14px; border-radius: 50%; border: 2px dashed rgba(60,40,0,.5); }
.cos-preview { width: 100%; aspect-ratio: 3/4; border-radius: 10px; border: 1px solid var(--border-2); display: grid; place-items: center; }
.cos-preview.theme { aspect-ratio: 16/9; border-radius: 999px; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.code-box { background: var(--bg-2); border: 1px dashed var(--border-2); border-radius: 10px; padding: 10px 14px; font-family: ui-monospace, Menlo, monospace; letter-spacing: .08em; }
.recovery-codes { columns: 2; font-family: ui-monospace, Menlo, monospace; }
.recovery-codes div { padding: 4px 0; }
.rank-1 { color: var(--gold-2); } .rank-2 { color: #c0c0c0; } .rank-3 { color: #cd7f32; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
.fade-in { animation: fadeIn .4s ease; }
.modal { z-index: 1065; } .modal-backdrop { z-index: 1060; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }
