/* ══════════════════════════════════════════════
   GÊNESIS PRO – Style Premium
   Inspirado na referência visual
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #0b0b10;
  --panel: rgba(16,16,20,.95);
  --panel2: rgba(12,12,16,.90);
  --line: rgba(255,255,255,.07);
  --gold: #f0c14b;
  --gold2: #d7a625;
  --gold-glow: rgba(240,193,75,.15);
  --txt: #e9e9ef;
  --muted: rgba(233,233,239,.55);
  --green: #2dd4bf;
  --red: #ff4d4d;
  --blue: #4aa3ff;
  --shadow: 0 20px 60px rgba(0,0,0,.5);
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 400px at 50% 0%, rgba(240,193,75,.08), transparent 60%),
    radial-gradient(900px 600px at 20% 30%, rgba(74,163,255,.06), transparent 60%),
    radial-gradient(900px 600px at 80% 30%, rgba(45,212,191,.04), transparent 60%),
    linear-gradient(180deg, #07070b, #0b0b10 55%, #07070b);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
}

/* ═══════ LAYOUT ═══════ */
.wrap {
  width: min(1900px, 98vw);
  margin: 16px auto 30px;
}

/* ═══════ HEADER ═══════ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border: 1px solid rgba(240,193,75,.15);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18,18,22,.95), rgba(10,10,14,.90));
  box-shadow: var(--shadow);
  gap: 14px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240,193,75,.12);
  border: 1px solid rgba(240,193,75,.25);
  border-radius: 8px;
  color: var(--gold);
  font-size: 16px;
}

.brand-title {
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--txt);
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-title span {
  color: var(--gold);
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  background: rgba(0,0,0,.3);
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666;
}

.pill.ok { border-color: rgba(45,212,191,.3); color: var(--green); }
.pill.ok .dot { background: var(--green); box-shadow: 0 0 12px rgba(45,212,191,.4); }
.pill.bad { border-color: rgba(255,77,77,.2); color: var(--red); }
.pill.bad .dot { background: var(--red); box-shadow: 0 0 12px rgba(255,77,77,.3); }

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
}

.tabs::-webkit-scrollbar { height: 4px; }
.tabs::-webkit-scrollbar-thumb { background: rgba(240,193,75,.2); border-radius: 999px; }

.tab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.25);
  color: rgba(233,233,239,.7);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: all .2s;
}

.tab:hover { border-color: rgba(240,193,75,.3); }

.tab.active {
  border-color: rgba(240,193,75,.5);
  background: rgba(240,193,75,.08);
  color: var(--gold);
}

.tab.entry-glow {
  color: transparent;
  background-image: linear-gradient(90deg, #00ff88, #00cc66, #66ffd2, #00ff88);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: greenGlow 1.2s linear infinite;
}

@keyframes greenGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 250% 50%; }
}

/* ═══════ PANELS ═══════ */
.panel {
  border: 1px solid rgba(240,193,75,.1);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16,16,20,.95), rgba(10,10,14,.88));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .8px;
  color: var(--gold);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title i {
  font-size: 11px;
  opacity: .7;
}

.panel-body {
  padding: 14px 16px;
}

.btn-icon {
  background: transparent;
  border: 1px solid rgba(240,193,75,.25);
  color: var(--gold);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all .2s;
}

.btn-icon:hover {
  background: rgba(240,193,75,.1);
}

/* ═══════ 3 COLUMNS LAYOUT ═══════ */
.mesa-layout {
  display: grid;
  grid-template-columns: 300px 1fr 380px;
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.mesa-left, .mesa-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mesa-center {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 1300px) {
  .mesa-layout { grid-template-columns: 280px 1fr; }
  .mesa-right { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .mesa-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .header-actions { width: 100%; justify-content: flex-start; }
}

/* ═══════ HISTÓRICO DE BOLINHAS ═══════ */
.history-ball-grid {
  min-height: 100px;
}

.history-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100px;
  color: var(--muted);
  font-size: 12px;
}

.ball-grid-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.ball-grid-container::-webkit-scrollbar { height: 4px; }
.ball-grid-container::-webkit-scrollbar-thumb { background: rgba(240,193,75,.2); border-radius: 999px; }

.ball-row {
  display: flex;
  gap: 4px;
}

.ball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
  transition: transform .2s;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

.ball:hover { transform: scale(1.15); }

.ball-red {
  background: radial-gradient(circle at 35% 35%, #ff6b6b, #cc0000);
  color: #fff;
  border: 2px solid rgba(255,100,100,.4);
  box-shadow: 0 2px 8px rgba(255,0,0,.25);
}

.ball-blue {
  background: radial-gradient(circle at 35% 35%, #6bb5ff, #0066cc);
  color: #fff;
  border: 2px solid rgba(100,160,255,.4);
  box-shadow: 0 2px 8px rgba(0,100,255,.25);
}

.ball-gold {
  background: radial-gradient(circle at 35% 35%, #ffd700, #b8860b);
  color: #1a1000;
  border: 2px solid rgba(255,215,0,.4);
  box-shadow: 0 2px 8px rgba(240,193,75,.25);
}

.ball-empty {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}

/* ═══════ DISTRIBUIÇÃO ═══════ */
.dist-item {
  margin-bottom: 14px;
}

.dist-item:last-child { margin-bottom: 0; }

.dist-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.dist-pct {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  min-width: 70px;
}

.dist-pct--red { color: var(--red); }
.dist-pct--blue { color: var(--blue); }
.dist-pct--gold { color: var(--gold); }

.dist-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  flex: 1;
}

.dist-count {
  font-size: 18px;
  font-weight: 900;
  color: var(--txt);
}

.dist-bar {
  height: 4px;
  background: rgba(255,255,255,.06);
  border-radius: 2px;
  overflow: hidden;
}

.dist-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .6s ease;
}

.dist-bar--red { background: linear-gradient(90deg, var(--red), #ff7777); }
.dist-bar--blue { background: linear-gradient(90deg, var(--blue), #77bbff); }
.dist-bar--gold { background: linear-gradient(90deg, var(--gold), #ffd566); }

/* ═══════ DAY STATS ═══════ */
.day-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.day-stat {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.2);
  text-align: center;
}

.day-stat.green { border-color: rgba(45,212,191,.15); }
.day-stat.red { border-color: rgba(255,77,77,.15); }

.day-stat-value {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.day-stat.green .day-stat-value { color: var(--green); }
.day-stat.red .day-stat-value { color: var(--red); }

.day-stat-value small {
  font-size: 14px;
  font-weight: 600;
  opacity: .7;
}

.day-stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 4px;
}

/* ═══════ LIVE FRAME ═══════ */
.live-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: #000;
}

.live-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ═══════ SIGNAL / BOARD ═══════ */
.signal-box--board {
  padding: 16px;
}

.signal-status-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.status-banner {
  width: 100%;
  max-width: 420px;
  padding: 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 900;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 2px solid rgba(255,255,255,.08);
  transition: all .3s;
}

.status-banner.waiting {
  background: linear-gradient(90deg, rgba(60,60,70,.8), rgba(80,80,90,.8));
  color: rgba(255,255,255,.5);
}

.status-banner.entrada {
  background: linear-gradient(90deg, #f0c14b, #d7a625);
  color: #1b1302;
  border-color: rgba(240,193,75,.5);
  box-shadow: 0 4px 20px rgba(240,193,75,.3);
}

.status-banner.green {
  background: linear-gradient(90deg, #2dd4bf, #059669);
  color: #fff;
  border-color: rgba(45,212,191,.5);
  box-shadow: 0 4px 20px rgba(45,212,191,.3);
}

.status-banner.red {
  background: linear-gradient(90deg, #ff4d4d, #b91c1c);
  color: #fff;
  border-color: rgba(255,77,77,.5);
  box-shadow: 0 4px 20px rgba(255,77,77,.3);
}

.status-banner.tie {
  background: linear-gradient(90deg, #f0c14b, #b8860b);
  color: #1b1302;
  border-color: rgba(240,193,75,.6);
  box-shadow: 0 4px 20px rgba(240,193,75,.25);
}

/* Board */
.bacbo-board-css {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  height: 160px;
  gap: 4px;
  position: relative;
  margin: 14px auto;
  max-width: 580px;
}

.board-side {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blue-side {
  background: linear-gradient(135deg, #002b7a, #001a4d);
  border-radius: 30px 0 0 30px;
}

.red-side {
  background: linear-gradient(135deg, #7a0000, #4d0000);
  border-radius: 0 30px 30px 0;
}

.board-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.tie-gold-oval {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #b8860b, #8b6508);
  border: 8px solid #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}

.board-label {
  position: absolute;
  font-weight: 900;
  color: rgba(255,255,255,.7);
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.blue-side .board-label { bottom: 12px; left: 20px; }
.red-side .board-label { bottom: 12px; right: 20px; }
.board-label-tie { color: #fff; font-weight: 800; font-size: 12px; margin-top: 4px; }

/* Chips */
.css-chip {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  background: repeating-conic-gradient(var(--chip-color) 0deg 22.5deg, #ffffff 22.5deg 45deg);
  box-shadow: 0 5px 15px rgba(0,0,0,.6);
  animation: chipAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.css-chip span {
  width: 76%;
  height: 76%;
  background: var(--chip-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  box-shadow: inset 0 0 10px rgba(0,0,0,.4);
}

.chip-e1 { --chip-color: #28a745; }
.chip-g1 { --chip-color: #6f42c1; }
.chip-g2 { --chip-color: #e83e8c; }
.chip-tie-black { --chip-color: #212121; }
.chip-tie-black span { font-size: 13px; }

@keyframes chipAppear {
  from { transform: translate(-50%, -50%) scale(0) rotate(-45deg); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
}

.hidden { display: none !important; }

/* ═══════ MONITOR DE PADRÕES ═══════ */
.panel-patterns {
  border-color: rgba(240,193,75,.18);
}

/* Sugestão */
.suggestion-box {
  background: linear-gradient(180deg, rgba(240,193,75,.06), rgba(0,0,0,.15));
  border: 1px solid rgba(240,193,75,.18);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}

.suggestion-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.suggestion-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.suggestion-ball {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
  border: 2px solid rgba(255,255,255,.1);
  color: var(--muted);
  transition: all .3s;
}

.sugg-ball-red {
  background: radial-gradient(circle at 35% 35%, #ff6b6b, #cc0000) !important;
  color: #fff !important;
  border-color: rgba(255,100,100,.4) !important;
  box-shadow: 0 4px 16px rgba(255,0,0,.3);
}

.sugg-ball-blue {
  background: radial-gradient(circle at 35% 35%, #6bb5ff, #0066cc) !important;
  color: #fff !important;
  border-color: rgba(100,160,255,.4) !important;
  box-shadow: 0 4px 16px rgba(0,100,255,.3);
}

.suggestion-info {
  flex: 1;
}

.suggestion-side {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 3px;
}

.suggestion-conf {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}

.suggestion-base {
  font-size: 11px;
  color: rgba(233,233,239,.4);
}

.conf-high { color: var(--green); font-weight: 800; }
.conf-mid { color: var(--gold); font-weight: 800; }
.conf-low { color: var(--red); font-weight: 800; }

/* Padrões */
.patterns-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pattern-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  font-size: 12px;
}

.pattern-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.2);
}

.pat-complete {
  border-color: rgba(45,212,191,.2);
}

.pat-forming {
  border-color: rgba(240,193,75,.15);
}

.pat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pat-status-icon {
  font-size: 14px;
}

.pat-status-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  flex: 1;
}

.pat-complete .pat-status-label { color: var(--green); }
.pat-forming .pat-status-label { color: var(--gold); }

.pat-multiplier {
  font-size: 12px;
  font-weight: 900;
  color: var(--red);
  background: rgba(255,77,77,.1);
  border: 1px solid rgba(255,77,77,.2);
  padding: 3px 8px;
  border-radius: 999px;
}

/* Pattern dots */
.pat-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.pat-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red {
  background: radial-gradient(circle at 35% 35%, #ff6b6b, #cc0000);
  border: 2px solid rgba(255,100,100,.3);
  box-shadow: 0 2px 6px rgba(255,0,0,.2);
}

.dot-blue {
  background: radial-gradient(circle at 35% 35%, #6bb5ff, #0066cc);
  border: 2px solid rgba(100,160,255,.3);
  box-shadow: 0 2px 6px rgba(0,100,255,.2);
}

.dot-gold {
  background: radial-gradient(circle at 35% 35%, #ffd700, #b8860b);
  border: 2px solid rgba(255,215,0,.3);
  box-shadow: 0 2px 6px rgba(240,193,75,.2);
}

/* Progress bar */
.pat-progress-bar {
  height: 3px;
  background: rgba(255,255,255,.06);
  border-radius: 2px;
  overflow: hidden;
}

.pat-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .4s ease;
}

.bar-green {
  background: linear-gradient(90deg, var(--green), #059669);
}

.bar-yellow {
  background: linear-gradient(90deg, var(--gold), #d7a625);
}

/* ═══════ MENSAGENS ═══════ */
.debugline {
  font-size: 11px;
  color: rgba(233,233,239,.4);
}

.msgs {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

.msgs::-webkit-scrollbar { width: 6px; }
.msgs::-webkit-scrollbar-thumb { background: rgba(240,193,75,.2); border-radius: 999px; }
.msgs::-webkit-scrollbar-track { background: rgba(255,255,255,.03); }

.msg-item {
  position: relative;
  padding: 10px 44px 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(240,193,75,.12);
  background: rgba(0,0,0,.2);
  font-size: 13px;
  line-height: 1.4;
}

/* Destaque por resultado (chat do dia) */
.msg-item.msg-green { border-color: rgba(45,212,191,.55); box-shadow: 0 0 0 1px rgba(45,212,191,.15), 0 10px 30px rgba(45,212,191,.08); }
.msg-item.msg-red   { border-color: rgba(255,77,77,.55);  box-shadow: 0 0 0 1px rgba(255,77,77,.15),  0 10px 30px rgba(255,77,77,.08); }
.msg-item.msg-tie   { border-color: rgba(240,193,75,.65); box-shadow: 0 0 0 1px rgba(240,193,75,.18), 0 10px 30px rgba(240,193,75,.08); }

/* Ticket de contagem (por tipo) */
.msg-ticket{
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.92);
}
.msg-item.msg-green .msg-ticket{ border-color: rgba(45,212,191,.45); background: rgba(45,212,191,.12); color: var(--green); }
.msg-item.msg-red   .msg-ticket{ border-color: rgba(255,77,77,.45);  background: rgba(255,77,77,.10);  color: var(--red); }
.msg-item.msg-tie   .msg-ticket{ border-color: rgba(240,193,75,.55); background: rgba(240,193,75,.10); color: var(--gold); width: 44px; }


.msg-time {
  margin-top: 5px;
  font-size: 10px;
  color: rgba(233,233,239,.4);
}

.msg-title {
  font-size: 10px;
  color: rgba(233,233,239,.4);
  margin-bottom: 4px;
  font-weight: 600;
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 600px) {
  .day-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bacbo-board-css { height: 130px; }
  .tie-gold-oval { width: 90px; height: 90px; border-width: 5px; }
  .css-chip { width: 48px; height: 48px; }
  .css-chip span { font-size: 14px; }
  .ball { width: 24px; height: 24px; font-size: 9px; }
  .dist-pct { font-size: 22px; min-width: 50px; }
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-overlay.hidden { display: none; }

.login-card {
  background: #1a1a1a;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid #d4af37;
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.btn-login {
  background: linear-gradient(to bottom, #d4af37, #b8860b);
  color: #000;
  font-weight: bold;
  border: none;
  padding: 12px;
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 20px;
}

.login-modal {
  width: min(1100px, 92vw);
  height: min(720px, 88vh);
  background: #0b0b0e;
  border: 1px solid rgba(255, 215, 120, 0.35);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.login-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.login-title {
  font-weight: 700;
  letter-spacing: .5px;
  color: #f4d27a;
}

.login-close {
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
}

.login-modal-body {
  flex: 1;
  background: #000;
}

#iframeLoginCasa {
  width: 100%;
  height: 100%;
  border: 0;
}

.login-modal-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-gold {
  background: linear-gradient(180deg, #f2d27a, #caa045);
  border: 0;
  color: #1a1306;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.stats-container-scroll {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 5px;
}

.stats-group {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-group-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
}

.total-highlight {
  border: 1px solid rgba(240, 193, 75, 0.3);
  background: linear-gradient(180deg, rgba(240, 193, 75, 0.05), transparent);
}

.day-stat.gold .day-stat-value { color: var(--gold); }

/* ═══════ CALCULADORA CENTRAL ═══════ */
#calcWrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 18px 0 28px;
}

#calcCard {
  width: 100%;
  max-width: 980px;
  background: rgba(15,15,20,0.95);
  border: 1px solid rgba(255,215,120,0.35);
  border-radius: 16px;
  padding: 16px 18px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}

.calc-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}

.calc-title {
  flex:1;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 0;
  color: #f5d37a;
}

.calc-mode-btn{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(240,193,75,.35);
  background: rgba(0,0,0,.25);
  color: var(--gold);
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.calc-mode-btn:hover{ background: rgba(240,193,75,.08); }
.calc-mode-btn:disabled{ opacity:.45; cursor:not-allowed; }
.calc-mode-btn.on {
  border-color: var(--green) !important;
  color: var(--green) !important;
  background: rgba(45, 212, 191, 0.1) !important;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.2);
}

.calc-inputs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  align-items: end;
}

.calc-inputs label span {
  display: block;
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 4px;
}

.calc-inputs input,
.calc-inputs select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.35);
  color: #fff;
}

.calc-inputs button {
  padding: 10px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg,#f2c94c,#d4a82f);
  font-weight: 800;
  cursor: pointer;
  color: #111;
}

.calc-inputs button:hover {
  filter: brightness(1.05);
}

/* Resultado */
#calcOut {
  margin-top: 14px;
  font-size: 13px;
}

/* ===========================
   CALCULADORA – Cards por entrada
=========================== */
.calc-result-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calc-total-risk {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,77,77,.08), rgba(255,77,77,.03));
  border: 1px solid rgba(255,77,77,.18);
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
}

.calc-total-risk i {
  font-size: 16px;
  opacity: .8;
}

.calc-total-risk strong {
  color: #fff;
  font-weight: 900;
}

.calc-entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.calc-entry-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.25);
  transition: transform .2s, box-shadow .2s;
}

.calc-entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.calc-entry-e1 { border-color: rgba(45,212,191,.25); }
.calc-entry-g1 { border-color: rgba(111,66,193,.25); }
.calc-entry-g2 { border-color: rgba(232,62,140,.25); }

.calc-entry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.calc-entry-e1 .calc-entry-header { background: rgba(45,212,191,.08); }
.calc-entry-g1 .calc-entry-header { background: rgba(111,66,193,.08); }
.calc-entry-g2 .calc-entry-header { background: rgba(232,62,140,.08); }

.calc-entry-icon {
  font-size: 18px;
}

.calc-entry-name {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .5px;
  text-transform: uppercase;
  flex: 1;
}

.calc-entry-e1 .calc-entry-name { color: var(--green); }
.calc-entry-g1 .calc-entry-name { color: #a78bfa; }
.calc-entry-g2 .calc-entry-name { color: #f472b6; }

.calc-entry-check { font-size: 16px; }
.calc-entry-warn { font-size: 16px; }

.calc-entry-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 12px 14px;
}

.calc-entry-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

.calc-entry-field:last-child {
  border-bottom: none;
}

.calc-entry-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.calc-entry-value {
  font-size: 18px;
  font-weight: 900;
}

.calc-val-cor { color: var(--blue); }
.calc-val-empate { color: var(--gold); }
.calc-val-total { color: var(--txt); }

.calc-entry-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.15);
}

.calc-lucro-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
}

.calc-lucro-row span {
  color: var(--muted);
}

.calc-lucro-green {
  color: var(--green) !important;
  font-size: 15px;
}

.calc-lucro-gold {
  color: var(--gold) !important;
  font-size: 15px;
}

.calc-prejuizo {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 11px;
  color: rgba(255,77,77,.7);
  font-weight: 600;
}

.calc-error-box {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,77,77,.08);
  border: 1px solid rgba(255,77,77,.2);
  color: var(--red);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-error-box i {
  font-size: 18px;
}

@media (max-width: 600px) {
  .calc-entries-grid {
    grid-template-columns: 1fr;
  }
  .calc-inputs {
    grid-template-columns: 1fr 1fr !important;
  }
}


/* =========================
   FILTRO DE PERÍODO (STATS)
   ========================= */
.stats-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.stats-range{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: inherit;
  padding: 6px 10px;
  border-radius: 10px;
  outline: none;
  font-size: 12px;
}
.stats-range option{
  color: #111;
}


/* ═══════ MODO B — HISTÓRICO COMPLETO (Tabela + Máximas + Padrões) ═══════ */

.mesa-history-cards{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}

.mesa-card{
  border-radius:14px;
  padding:12px 12px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.mesa-card-title{
  font-size:12px;
  color: var(--muted);
  margin-bottom:6px;
  display:flex;
  align-items:center;
  gap:6px;
}

.mesa-card-value{
  font-size:30px;
  font-weight:900;
  line-height:1;
  letter-spacing:.5px;
}

.mesa-card-banker{ border-color: rgba(255,60,60,.25); }
.mesa-card-player{ border-color: rgba(60,140,255,.25); }
.mesa-card-tie{ border-color: rgba(240,193,75,.25); }
.mesa-card-notie{ border-color: rgba(255,255,255,.12); }

.mesa-results-wrap{ margin-bottom:12px; }
.mesa-results-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.mesa-results-title{
  font-weight:800;
  letter-spacing:.6px;
  color: rgba(240,193,75,.9);
  font-size:12px;
  text-transform:uppercase;
}

.btn-outline.btn-small{
  padding:7px 10px;
  border-radius:999px;
  font-size:11px;
}

.mesa-results-table{
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.06);
  border-radius:14px;
  padding:10px;
  overflow-x:auto;
}

.mesa-results-grid{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width: 760px;
}

.mesa-results-row{
  display:flex;
  gap:8px;
}

.mesa-result{
  width: 44px;
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}

.mesa-result-time{
  font-size:10px;
  color: rgba(255,255,255,.55);
  line-height:1;
  white-space:nowrap;
}

.mesa-result .ball{
  width: 34px;
  height: 34px;
  font-size: 12px;
  border-width: 2px;
}

.mesa-pattern-wrap{ margin-top:12px; }
.mesa-pattern-title{
  font-weight:800;
  letter-spacing:.6px;
  color: rgba(240,193,75,.9);
  font-size:12px;
  text-transform:uppercase;
  margin-bottom:8px;
}

@media (max-width: 1200px){
  .mesa-results-grid{ min-width: 620px; }
}

@media (max-width: 900px){
  .mesa-history-cards{ grid-template-columns: 1fr; }
  .mesa-results-grid{ min-width: 520px; }
}
