@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600;700&family=Baloo+2:wght@600;700;800&display=swap');

:root {
  /* Base — near-black com fundo quente (couro/ficha de aposta), não o azul-frio genérico de fintech */
  --bg: #0D0B08;
  --surface: #17130D;
  --surface-2: #201A11;
  --border: #33291A;
  --border-soft: #241D12;

  /* Texto — branco quente, como papel de ticket envelhecido */
  --text: #F6EFE0;
  --text-dim: #A69B84;
  --text-faint: #91866F;

  /* Dourado — a cor de assinatura do app, mais rica que um âmbar comum */
  --gold: #E3B54A;
  --gold-strong: #F5CB63;
  --gold-dim: #3D2F10;

  /* Resultados — calibrados, nunca neon */
  --green: #3CC17A;
  --green-dim: #12301F;
  --red: #F5525A;
  --red-dim: #3A1517;
  --amber: #F0AE45;
  --amber-dim: #3A2A10;
  --accent: #5B9CFF;
  --accent-dim: #17233D;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  /* Sombras — profundidade consistente pra cards que hoje são "chapados" */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.22);
  --shadow: 0 8px 22px rgba(0,0,0,0.32);
  --shadow-gold: 0 6px 18px rgba(227,181,74,0.16);

  --font-display: 'Space Grotesk', var(--font-ui);
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-num: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  height: 100%;
  /* Sem o "elástico" do celular ao chegar no topo, no fim ou nas laterais */
  overscroll-behavior: none;
}
/* A página nunca rola pros lados (quem precisa rolar de lado, como as abas
   de período, tem a própria rolagem). E o iPhone não aumenta o texto sozinho
   ao girar a tela. */
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* No celular, campo com letra menor que 16px faz o iPhone dar zoom ao tocar,
   e a tela fica "solta" pros lados depois. No computador nada muda. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}

body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  background-image: radial-gradient(ellipse 900px 480px at 50% -8%, rgba(227,161,74,0.08), transparent 62%);
  background-attachment: fixed;
}

button, input, select { font-family: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }

button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
/* Campos de texto: borda dourada no foco em vez do contorno */
.search-input:focus, .account-value-input:focus, .sheet-body input:focus, .sheet-body select:focus, .onboarding-input:focus {
  outline: none;
  border-color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.positive { color: var(--green); }
.negative { color: var(--red); }

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

/* TOPBAR */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 8px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}
.topbar-title {
  position: relative;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-bottom: 9px;
}
/* Tracinho dourado — pequena assinatura visual da marca, sem gritar */
.topbar-title::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 0;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.icon-btn:active { border-color: var(--gold); color: var(--gold); }

/* A tela nunca rola nem "balança" pros lados. O que for mais largo que a tela é contido onde está
   (rolagem lateral de propósito, como nas abas de período, tem rolagem própria). No iPhone, campo de
   data/hora e texto sem espaço eram os suspeitos de alargar a página. */
main, .sheet, .flyer-overlay, .onboarding { overflow-x: hidden; }
#app { overflow-x: clip; }
input, select, textarea { max-width: 100%; min-width: 0; }
input[type="date"], input[type="time"] { width: 100%; -webkit-min-logical-width: 0; }

/* MAIN */
main {
  flex: 1;
  padding: 4px 20px 120px;
  overflow-y: auto;
}
/* Transição de view — some o corte seco ao trocar de aba */
.view {
  animation: viewIn 0.26s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* HERO BALANCE — o número é o protagonista, sem moldura, como uma tela de saldo, não mais um card */
.hero-balance {
  position: relative;
  padding: 26px 2px 20px;
  margin: 2px 0 22px;
}
.hero-balance::before {
  content: "";
  position: absolute;
  top: -34%;
  left: 50%;
  width: 340px;
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(227,181,74,0.17) 0%, transparent 70%);
  pointer-events: none;
}
.hero-label {
  position: relative;
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 15px;
  font-weight: 600;
}
.hero-value {
  position: relative;
  font-family: var(--font-num);
  font-size: clamp(38px, 11vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 8px;
  line-height: 1;
}
.hero-sub {
  position: relative;
  color: var(--text-dim);
  font-size: 14.5px;
  margin-top: 13px;
  font-family: var(--font-num);
}

/* Período do Início: um botão que abre os atalhos e o calendário */
.period-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  padding: 10px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.period-btn svg:first-child { color: var(--gold); }
.period-btn svg:last-child { color: var(--text-dim); }
.period-btn:active { transform: scale(0.97); }
.period-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.preset {
  padding: 11px 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.preset.ativo { background: var(--gold); border-color: var(--gold); color: #1D1608; }
.cal { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.cal-nav { width: 38px; height: 38px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 50%; color: var(--text-dim); font-size: 20px; line-height: 1; cursor: pointer; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-week span { padding: 4px 0 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-faint); }
.cal-dia, .cal-vazio { height: 40px; }
.cal-dia { background: none; border: none; border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.cal-dia.hoje { color: var(--gold-strong); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.cal-dia.no { background: var(--gold-dim); border-radius: 0; color: var(--gold-strong); }
.cal-dia.ponta { background: var(--gold); color: #1D1608; box-shadow: none; }
.cal-dia.ini { border-radius: 10px 0 0 10px; }
.cal-dia.fim { border-radius: 0 10px 10px 0; }
.cal-dia.ini.fim { border-radius: 10px; }
.cal-resumo { margin: 12px 2px 0; min-height: 2.6em; font-size: 13px; line-height: 1.4; color: var(--text-dim); }
.cal .btn-primary { margin-top: 12px; width: 100%; }
.cal .btn-primary:disabled { opacity: 0.45; cursor: default; }

/* PERIOD TABS */
.period-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
}
.period-tabs::-webkit-scrollbar { display: none; }
.period-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 9px 17px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.period-tab:active { transform: scale(0.96); }
.period-tab.active, .chart-range-tab.active {
  background: var(--gold);
  color: #1D1608;
  border-color: var(--gold);
}
.period-tab.active { box-shadow: var(--shadow-gold); }

/* STAT GRID — quieto de propósito: todo o "grito" visual já foi gasto no hero */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
/* Só em telas com hover real (mouse) — no touch isso vira ruído */
@media (hover: hover) {
  .stat-card:hover, .group-card:hover, .account-row:hover, .monthly-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--border);
  }
}
.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 6px;
}
.stat-value {
  font-family: var(--font-num);
  font-size: 19px;
  font-weight: 700;
}

/* SECTION ROW */
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 26px 0 12px;
}
.count-pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--amber-dim); color: var(--amber); font-family: var(--font-num); font-size: 12px; font-weight: 700; vertical-align: 1px; }
.section-row h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}
.link-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

/* BET LIST — ticket de aposta: identidade do app, refinada */
.bet-list { display: flex; flex-direction: column; gap: 14px; }
.bet-card {
  background:
    repeating-linear-gradient(90deg, rgba(227,181,74,0.5) 0 2px, transparent 2px 5px, rgba(227,181,74,0.26) 5px 6px, transparent 6px 9px) bottom center / calc(100% - 32px) 3px no-repeat,
    var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-faint);
  border-radius: var(--radius);
  padding: 16px 18px 17px;
  cursor: pointer;
  position: relative;
  transition: transform .1s ease;
}
.bet-card:active { transform: scale(0.99); }
.bet-card::before, .bet-card::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
}
.bet-card::before { left: 10px; }
.bet-card::after { right: 10px; }
.bet-card.result-green { border-left-color: var(--green); }
.bet-card.result-red { border-left-color: var(--red); }
.bet-card.result-pending { border-left-color: var(--amber); }
.bet-card.result-push { border-left-color: var(--text-faint); }
.bet-card.result-cashout { border-left-color: var(--accent); }

.bet-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.bet-card-top > :first-child { min-width: 0; overflow-wrap: anywhere; } /* palavra enorme sem espaço não alarga o cartão */
.bet-card-game {
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.ticket-market { color: var(--text-dim); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.ticket-casa { font-size: 11.5px; font-weight: 600; color: var(--text-dim); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
.ticket-slip { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px; margin: 12px 0 0; padding-top: 11px; border-top: 1px dashed var(--border); }
.ticket-slip div { min-width: 0; }
.ticket-slip dt { font-size: 11.5px; font-weight: 600; color: var(--text-faint); }
.ticket-slip dd { margin: 3px 0 0; font-family: var(--font-num); font-size: 14px; font-weight: 700; white-space: nowrap; }
.bet-card-profit {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}
.bet-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  gap: 10px;
}
.ticket-when { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-variant-numeric: tabular-nums; }
.ticket-group { color: var(--text-faint); overflow-wrap: anywhere; }
.ticket-badges { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ticket-badges .badge.bonus-tag { margin-left: 0; }
.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-dim); color: var(--green); }
.badge.red { background: var(--red-dim); color: var(--red); }
.badge.pending { background: var(--amber-dim); color: var(--amber); }
.badge.push { background: var(--surface-2); color: var(--text-dim); }
.badge.cashout { background: var(--accent-dim); color: var(--accent); }
.badge.bonus-tag { background: var(--gold-dim); color: var(--gold); margin-left: 6px; }

/* QUICK ACTIONS */
.quick-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.quick-btn {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-dim);
  transition: all .12s ease;
}
.quick-btn .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.quick-btn.green { color: var(--green); border-color: rgba(60,193,122,0.32); }
.quick-btn.red { color: var(--red); border-color: rgba(245,82,90,0.32); }
.quick-btn.cashout { color: var(--accent); border-color: rgba(91,156,255,0.32); }
.quick-btn.green:active, .quick-btn.green:hover { border-color: var(--green); background: var(--green-dim); }
.quick-btn.red:active, .quick-btn.red:hover { border-color: var(--red); background: var(--red-dim); }
.quick-btn.cashout:active, .quick-btn.cashout:hover { border-color: var(--accent); background: var(--accent-dim); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 44px 20px; color: var(--text-dim); }
.empty-state p { margin: 4px 0; }
.empty-sub { font-size: 13px; color: var(--text-dim); }

/* BUSCA */
.search-input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 14.5px;
}
.search-input::placeholder { color: var(--text-faint); }

/* APOSTAS: busca + filtros recolhidos */
.history-toolbar { display: flex; gap: 10px; margin-top: 4px; }
.filters-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.filters-toggle.ativo { border-color: var(--gold); color: var(--gold-strong); }
.filters-count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--gold); color: #1D1608; font-family: var(--font-num); font-size: 11.5px; font-weight: 700; text-align: center; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 12px;
  background: var(--gold-dim);
  border: none;
  border-radius: 999px;
  color: var(--gold-strong);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.filter-chip span { font-size: 10px; opacity: 0.8; }
.filters-panel { margin-top: 12px; padding: 4px 14px 12px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; }
.filter-row + .filter-row { border-top: 1px solid var(--border-soft); }
.filter-row label { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.filters-panel .select-chip { flex: 0 0 58%; min-width: 0; border-radius: var(--radius-sm); padding: 10px 32px 10px 12px; font-size: 14px; }
.filter-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.filter-dates .date-filter-field { min-width: 0; }
.filters-clear { display: block; margin: 10px 0 0 auto; padding: 4px 0; font-size: 13px; }
.history-count { margin: 14px 2px 12px; font-size: 12.5px; color: var(--text-dim); }

/* FILTROS */
.select-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 30px 9px 13px;
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23A69B84' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
.date-filter-field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.date-filter-field label { font-size: 11px; color: var(--text-dim); font-weight: 600; }
.date-filter-field input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 13px;
}

/* Abas pequenas (resumo por mês/ano) */
.chart-range-tabs { display: flex; gap: 6px; scroll-snap-type: x proximity; }
.chart-range-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
/* Três números lado a lado (resumo dos Relatórios) */
.curva-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.curva-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.curva-stat-rotulo { font-size: 11.5px; font-weight: 600; color: var(--text-faint); }
.curva-stat-valor { font-family: var(--font-num); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.curva-stat-sub { font-size: 11px; color: var(--text-dim); }

/* CONTAS (planilha de saldo por casa) */
.account-list { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.account-row, .monthly-row {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.account-name {
  flex: 1;
  font-weight: 600;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* CASH: uma conta por cartão, com a barra de quanto ela pesa no total */
.cash-row {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  padding: 13px 15px 12px;
  box-shadow: var(--shadow-sm);
}
.cash-row-top { display: flex; align-items: center; gap: 10px; }
.cash-value { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-num); font-size: 13px; font-weight: 700; color: var(--text-dim); }
/* O saldo é um número com sublinhado tracejado: toque e ele vira campo */
.account-value-input {
  width: 118px;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--border);
  border-radius: 0;
  padding: 4px 0;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 17px;
  text-align: right;
  color: var(--text);
}
.account-value-input:focus { background: var(--surface-2); border-bottom: 1px solid var(--gold); outline: none; }
.share-bar { height: 4px; margin-top: 11px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.share-bar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.cash-row-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 12px; color: var(--text-faint); }
.cash-age.velho { color: var(--amber); }
.edit-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
}
.group-card .edit-btn { width: 36px; height: 36px; }
.monthly-row { flex-direction: column; align-items: stretch; gap: 0; }
.monthly-row-head { display: flex; justify-content: space-between; align-items: center; }
.monthly-row-name { font-weight: 600; font-size: 14.5px; text-transform: capitalize; }
.monthly-row-value { font-family: var(--font-num); font-weight: 700; font-size: 15.5px; white-space: nowrap; }
.monthly-breakdown {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.monthly-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-dim);
  font-family: var(--font-num);
}
.monthly-breakdown-item span:first-child { font-family: inherit; text-transform: none; }
.monthly-breakdown-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  margin-top: 4px;
}

/* GRUPOS */
.group-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 17px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.group-card:active { border-top-color: var(--gold); }
.group-card-top { display: flex; justify-content: space-between; align-items: center; }
.group-name { font-weight: 700; font-size: 16.5px; }
.group-profit { font-family: var(--font-num); font-weight: 700; font-size: 16.5px; }
.group-card-top-right { display: flex; align-items: center; gap: 10px; }
.split-bar { display: flex; height: 5px; margin-top: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.split-bar .g { background: var(--green); }
.split-bar .r { flex: 1; background: var(--red); }
.group-card .stats4 { margin-top: 12px; }

/* MENU DE ESCOPO DO INÍCIO (Visão geral / Apostas / Cassino / grupos) */
.switcher-menu {
  position: absolute;
  top: 60px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  z-index: 40;
  min-width: 160px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.switcher-option, .switcher-link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}
.switcher-option { color: var(--text); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.switcher-link { color: var(--text-faint); padding: 8px 12px; font-size: 12px; font-weight: 600; }
.switcher-back { color: var(--text-dim); font-size: 12.5px; }
.switcher-empty { padding: 8px 12px; font-size: 12.5px; color: var(--text-faint); }
.switcher-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* FAB */
.fab-wrap {
  position: fixed;
  right: 20px;
  bottom: 88px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  width: 58px;
  height: 58px;
  z-index: 20;
}
@media (min-width: 560px) {
  .fab-wrap { right: calc(50% - 280px + 20px); }
}
/* Glow pulsante sutil atrás do FAB — chama atenção sem gritar */
.fab-wrap::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227,181,74,0.35) 0%, transparent 70%);
  animation: fabPulse 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes fabPulse {
  0%, 100% { transform: scale(0.88); opacity: 0.55; }
  50% { transform: scale(1.12); opacity: 1; }
}
.fab {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--gold);
  color: #1D1608;
  font-size: 28px;
  font-weight: 700;
  border: none;
  box-shadow: 0 10px 28px rgba(227,181,74,0.36), 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 21;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s ease;
}
.fab:active { transform: scale(0.94); }
@media (hover: hover) {
  .fab:hover { transform: scale(1.05); }
}

/* BOTTOM NAV */
.bottom-nav {
  position: sticky;
  bottom: 0;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 6px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 15;
}
.nav-btn {
  position: relative;
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 600;
  padding: 6px 0;
  cursor: pointer;
  transition: color .15s ease;
}
.nav-btn svg { width: 22px; height: 22px; transition: transform .15s cubic-bezier(.2,.8,.3,1); }
.nav-btn.active { color: var(--gold); }
.nav-btn.active svg { transform: translateY(-1px); }
/* Indicador dourado no item ativo da bottom nav */
.nav-btn::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 0;
  height: 2.5px;
  border-radius: 999px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width .2s cubic-bezier(.2,.8,.3,1);
}
.nav-btn.active::before { width: 18px; }

/* SHEET / MODAL */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 30;
  animation: fadeIn 0.18s ease;
  backdrop-filter: blur(2px);
}
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  border-top: 1px solid var(--border);
  z-index: 31;
  max-height: 88vh;
  overflow-y: auto;
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  animation: slideUp 0.24s cubic-bezier(.2,.8,.3,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin: 10px auto 0;
}
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 10px;
}
.sheet-header h2 { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.sheet-body { padding: 6px 20px 20px; display: flex; flex-direction: column; }

.sheet-body label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin: 16px 0 7px;
}
.sheet-body label .label-note {
  font-weight: 400;
  color: var(--text-faint);
}
.sheet-body input, .sheet-body select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 15px;
  width: 100%;
}
.row-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.row-2 > * { min-width: 0; }

.profit-preview {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 15.5px;
  text-align: center;
}

.result-chips {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}
.result-chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex: 0 0 auto;
}
.chip.active.pending { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }
.chip.active.green { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.chip.active.red { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.chip.active.push { background: var(--surface-2); border-color: var(--text-dim); color: var(--text); }
.chip.active.cashout { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  margin-top: 18px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}
.checkbox-row-text { display: flex; flex-direction: column; gap: 2px; }
.checkbox-row-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.checkbox-row-sub { font-size: 11.5px; font-weight: 400; color: var(--text-dim); }
.checkbox-row input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--gold);
}

.btn-primary {
  margin-top: 24px;
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  color: #1D1608;
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(227,181,74,0.22);
  transition: transform .1s ease;
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  margin-top: 12px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary.small { padding: 9px 14px; font-size: 12.5px; }
.btn-block { display: block; width: 100%; margin-top: 18px; }

.ai-scan-row { margin-top: 10px; }
.ai-scan-btn {
  margin-top: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-color: var(--gold-dim);
  color: var(--gold);
}
.ai-scan-btn:disabled { opacity: 0.6; cursor: default; }
.ai-scan-btn.is-loading svg { animation: aiScanSpin 1.1s linear infinite; }
@keyframes aiScanSpin {
  to { transform: rotate(360deg); }
}
.ai-scan-hint {
  margin: 8px 2px 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-faint);
}
.btn-danger {
  margin-top: 10px;
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-danger.ghost { background: transparent; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn-secondary { flex: 1; }

/* CONFIG */
.config-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 10px;
}
.config-card label {
  font-size: 12.5px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
.config-gap { margin-top: 16px; }
.security-form { margin-top: 12px; }
.security-form input { margin-top: 8px; }
.security-form .btn-row { margin-top: 10px; }
.security-form .link-btn { display: block; margin: 10px auto 0; padding: 4px; font-size: 12.5px; }
.config-card .code-input { text-align: center; letter-spacing: 3px; font-family: var(--font-num); font-weight: 700; }
.config-card .code-input::placeholder { letter-spacing: 0; font-weight: 400; font-family: var(--font-ui); }
/* Linha de ajuste: nome à esquerda, campo à direita (em vez de um cartão por campo) */
.config-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.config-row + .config-row { border-top: 1px solid var(--border-soft); }
.config-row label { flex: 1; min-width: 0; margin: 0; line-height: 1.3; }
.config-row .input-with-icon { flex: 0 0 140px; }
.config-row .input-with-icon.wide { flex-basis: 185px; }
.config-help { margin: 4px 0 0 !important; line-height: 1.4; }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.danger-row label { margin: 0; }
.danger-row .btn-danger { margin-top: 0 !important; flex-shrink: 0; }
.config-footer { text-align: center; margin: 16px 0 0; padding: 0 8px; line-height: 1.45; }
.config-footer-link { text-align: center; margin: 4px 0 0; }
.config-card input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 14px;
  width: 100%;
}
.config-card .empty-sub { font-size: 12px; margin-top: 2px; }
/* Botões dentro de Ajustes são de ação secundária/pontual — mais
   compactos que os CTAs principais (salvar aposta, criar grupo etc.). */
.config-card .btn-primary,
.config-card .btn-secondary,
.config-card .btn-danger {
  padding: 9px 10px;
  font-size: 12.5px;
  margin-top: 10px;
}
.config-card .btn-row { gap: 8px; }
.config-card .btn-row .btn-primary,
.config-card .btn-row .btn-danger { flex: 1; margin-top: 0; }
.config-card.danger { border-color: var(--red); }

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.profile-info .link-btn { padding: 4px 0 0; font-size: 12.5px; }
.profile-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
  overflow: hidden;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.profile-info { min-width: 0; }
.input-with-icon {
  position: relative;
}
.input-with-icon input {
  padding-right: 42px !important;
}
.input-with-icon input[readonly] {
  color: var(--text-dim);
  cursor: default;
}
.input-with-icon .icon-btn-sm {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}
.profile-name {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-btn-sm {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn-sm:active { background: var(--accent); color: #fff; }
.profile-email {
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.profile-meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 3px;
}
.version-tag {
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  margin-top: 12px;
}

.sync-card .btn-row { margin-top: 14px; }
.sync-card .btn-row .btn-secondary { margin-top: 0; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 104px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  z-index: 50;
  max-width: 90%;
  text-align: center;
  animation: fadeIn 0.15s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

::-webkit-scrollbar { width: 0; height: 0; }

/* SPLASH SCREEN */
.splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227,181,74,0.22) 0%, rgba(227,181,74,0) 65%);
  animation: splashPulse 2.2s ease-in-out infinite;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}
.splash-content {
  position: relative;
  text-align: center;
  padding: 0 32px;
}
.splash-badge {
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 36px rgba(227,181,74,0.24);
  animation: splashBadgeIn 0.7s cubic-bezier(.2,.8,.3,1) both;
}
.splash-badge img { display: block; width: 100%; height: 100%; border-radius: var(--radius); }
@keyframes splashBadgeIn {
  0% { transform: scale(0.4) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.brand-wordmark {
  font-family: 'Baloo 2', var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.01em;
  color: var(--gold-strong);
  margin: 0 0 14px;
  animation: splashTextIn 0.6s ease 0.15s both;
}
.mascot-wiggle {
  animation: mascotWiggle 2.6s ease-in-out infinite;
  transform-origin: 50% 60%;
}
@keyframes mascotWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.04); }
  75% { transform: rotate(8deg) scale(1.04); }
}
.splash-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0 0 9px;
  animation: splashTextIn 0.6s ease 0.25s both;
}
.splash-sub {
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
  margin: 0;
  animation: splashTextIn 0.6s ease 0.4s both;
}
@keyframes splashTextIn {
  0% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ONBOARDING */
.onboarding {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 32px 0;
}
.onboarding-content {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 0 28px;
  text-align: center;
}
.onboarding-title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.onboarding-sub {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 18px;
}
.onboarding-input {
  display: block;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 10px;
}
.onboarding-actions { display: flex; flex-direction: column; margin-top: 6px; }
.onboarding-skip { margin-top: 16px; }
.onboarding-note {
  min-height: 16px;
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 14px 0 0;
}

/* LOGIN SOCIAL (Google, Facebook, Apple) */
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin-top: 0;
}
.btn-social + .btn-social {
  margin-top: 10px;
}

/* =========================================================
   PLANOS, LEITURAS POR IA E RELATÓRIOS
========================================================= */

/* Contador de leituras abaixo do botão de foto */
.ai-scan-quota {
  margin: 9px 2px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}
.ai-scan-quota.empty { color: var(--text-dim); }

/* Selo do plano (Grátis / Pro / Pro Max) */
.plan-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.plan-chip.pro { background: var(--accent-dim); color: var(--accent); border-color: transparent; }
.plan-chip.pro_max { background: var(--gold-dim); color: var(--gold-strong); border-color: transparent; }

/* Card "Seu plano" em Ajustes */
.config-card.plan-card { border-color: var(--gold-dim); }
.plan-card-head { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.plan-card-quota { font-size: 13px; color: var(--text-dim); }
.config-card.plan-card .btn-primary,
.config-card.plan-card .btn-secondary { width: 100%; padding: 11px 10px; }

/* Atalho dos relatórios no Início */
.report-entry {
  width: 100%;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .1s ease;
}
.report-entry:active { transform: scale(0.99); }
.report-entry-icon { font-size: 20px; }
.report-entry-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.report-entry-title { font-weight: 700; font-size: 14.5px; color: var(--text); }
.report-entry-sub { font-size: 12px; color: var(--text-dim); }
.report-entry-arrow { color: var(--text-faint); font-size: 18px; }

/* Limite de perda do mês (Início) */
.limite-card {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
}
.limite-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.limite-titulo { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.limite-valores { font-family: var(--font-num); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.limite-barra { height: 7px; background: var(--surface-2); border-radius: 999px; margin-top: 9px; overflow: hidden; }
.limite-preenchido { height: 100%; width: 0; background: var(--gold); border-radius: 999px; transition: width .3s ease; }
.limite-card.atencao .limite-preenchido { background: var(--amber); }
.limite-card.estourado .limite-preenchido { background: var(--red); }
.limite-msg { font-size: 12px; color: var(--text-dim); margin: 8px 0 0; }
.limite-card.atencao .limite-msg { color: var(--amber); }
.limite-card.estourado { border-color: var(--red); }
.limite-card.estourado .limite-msg { color: var(--red); font-weight: 600; }

/* Selo "Pro Max" ao lado de um título ou botão */
.label-com-selo { display: flex !important; align-items: center; gap: 8px; }
.btn-com-selo { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Relatórios: cada coisa num bloco com título, de cima pra baixo
   (introdução, filtros, resumo, detalhamento, exportar) */
.report-intro { font-size: 13px; line-height: 1.5; color: var(--text-dim); margin: 2px 0 0; }
.report-label,
.sheet-body label.report-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  margin: 0;
}

/* Filtros: o que entra na conta (período e grupo) */
.report-filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.report-field { display: flex; flex-direction: column; gap: 8px; }
.report-period { margin: 0; gap: 8px; }
.report-period .period-tab { flex: 1; padding: 9px 8px; font-size: 12.5px; text-align: center; }
.report-period .period-tab.active { box-shadow: none; } /* o brilho seria cortado pela rolagem da linha */
.report-filters select { background: var(--surface); padding: 11px 13px; font-size: 14px; }

.report-wrap { position: relative; min-height: 260px; }
.report-body.locked { filter: blur(6px); pointer-events: none; user-select: none; }
.report-block { margin-top: 24px; }

/* Resumo do período */
.report-summary {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
}
.report-summary-label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.report-summary-value { font-family: var(--font-num); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; margin-top: 4px; line-height: 1.1; }
.report-summary-sub { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

/* Escolha do detalhamento: 4 botões grandes, com ícone */
.report-dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.report-dim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 11px 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.report-dim:active { transform: scale(0.97); }
.report-dim-icon { font-size: 19px; line-height: 1; }
.report-dim.active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold-strong); }

.report-detail-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 22px 0 0; }
.report-detail-help { font-size: 12.5px; line-height: 1.5; color: var(--text-dim); margin: 5px 0 0; }

.report-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.report-highlight {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  min-width: 0;
}
.report-highlight-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
}
.report-highlight-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  margin-top: 7px;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* nome comprido quebra em até 2 linhas em vez de cortar na 1ª */
  -webkit-box-orient: vertical;
}
.report-highlight-value { font-family: var(--font-num); font-weight: 700; font-size: 13px; margin-top: 4px; }

/* Uma linha por casa/esporte/mercado/faixa: nome e lucro, barra, e os números com rótulo */
.report-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.report-row {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 15px 13px;
  box-shadow: var(--shadow-sm);
}
.report-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.report-row-name { min-width: 0; font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-row-profit { font-family: var(--font-num); font-weight: 700; font-size: 15px; white-space: nowrap; }
.report-bar { height: 5px; margin-top: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.report-bar span { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.report-bar span.negative { background: var(--red); }
.report-row-stats, .stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.report-row-stats div, .stats4 div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.report-row-stats span, .stats4 span { font-size: 11px; font-weight: 600; color: var(--text-faint); white-space: nowrap; }
.report-row-stats b, .stats4 b { font-family: var(--font-num); font-size: 12.5px; font-weight: 700; white-space: nowrap; }

/* Exportar */
.report-export { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border-soft); }
.report-export-text { font-size: 12.5px; line-height: 1.5; color: var(--text-dim); margin: 8px 0 0; }
.report-export-btn { width: 100%; margin-top: 12px; border-color: var(--gold-dim); color: var(--gold-strong); }
.report-note { font-size: 11.5px; color: var(--text-faint); margin: 10px 2px 0; line-height: 1.45; }

.report-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 64px 20px 20px;
}
.report-lock-icon { font-size: 30px; }
.report-lock-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin: 8px 0 4px; }
.report-lock .btn-primary { margin-top: 16px; padding: 13px 22px; }

/* Modais: ficam por cima das sheets, então abrir um não fecha o
   formulário de aposta que está embaixo. */
.modal-overlay, .flyer-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.18s ease;
}
.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 28px 22px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  animation: modalIn 0.26s cubic-bezier(.2,.8,.3,1);
}
@keyframes modalIn {
  from { transform: translateY(14px) scale(0.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-icon { font-size: 30px; }
.modal-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 8px 0 8px; }
.modal-text { font-size: 14.5px; line-height: 1.55; color: var(--text-dim); margin: 0; }
.modal-text strong { color: var(--text); }
.modal-card .btn-primary { margin-top: 20px; }
.conversao-lista { list-style: none; margin: 14px 0 0; padding: 0; max-height: 220px; overflow-y: auto; text-align: left; font-size: 13px; color: var(--text-dim); }
.conversao-lista li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; gap: 10px; }
.conversao-lista b { color: var(--text); white-space: nowrap; }
/* Campo com setinha: digita pra buscar ou abre a lista (Esporte e Casa de aposta) */
.combo { position: relative; }
.sheet-body .combo input { padding-right: 46px; }
.combo-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--text-dim);
  cursor: pointer;
}
.combo-btn svg { transition: transform .15s ease; }
.combo:has(.combo-list:not([hidden])) .combo-btn svg { transform: rotate(180deg); }
.combo-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.combo-item { padding: 11px 12px; border-radius: 8px; font-size: 14.5px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.combo-item.ativo { background: var(--surface); }
.combo-item.sel { color: var(--gold-strong); font-weight: 700; }
.combo-item.sel::after { content: "✓"; font-size: 13px; }
.combo-vazio { padding: 12px; font-size: 13px; color: var(--text-faint); }

/* Atalho "instalar no celular": barra fina no estilo dos "baixe o app" dos sites de aposta */
.install-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 12px;
  padding: 8px 10px 8px 2px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.install-bar-card { margin: 12px 0 0; padding-left: 12px; }
.install-bar-close { background: none; border: none; color: var(--text-faint); font-size: 12px; line-height: 1; padding: 10px 8px; cursor: pointer; }
.install-bar-icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.install-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.install-bar-text strong { font-size: 13.5px; color: var(--text); }
.install-bar-text span { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.install-bar-btn {
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  color: #1D1608;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.install-bar-btn:active { transform: scale(0.96); }
.instalar-icone { display: block; margin: 0 auto; width: 56px; height: 56px; border-radius: 14px; }
.share-glyph { vertical-align: -3px; margin: 0 1px; color: var(--accent); }
.instalar-passos { margin: 16px 0 0; padding-left: 22px; text-align: left; font-size: 14px; line-height: 1.55; color: var(--text-dim); }
.instalar-passos li { padding: 4px 0 4px 4px; }
.instalar-passos strong { color: var(--text); }
.modal-foot { font-size: 12px; color: var(--text-faint); margin: 14px 0 0; }

/* Flyer dos planos */
.flyer-overlay { overflow-y: auto; display: flex; padding: 20px 14px; }
.flyer {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;
  background:
    radial-gradient(ellipse 420px 220px at 50% -10%, rgba(227,181,74,0.16), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 18px 18px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  animation: modalIn 0.3s cubic-bezier(.2,.8,.3,1);
}
.flyer-context {
  display: inline-block;
  background: var(--amber-dim);
  color: var(--amber);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 12px;
  padding: 7px 12px;
  margin: 4px 30px 14px;
}
.flyer .splash-badge { width: 60px; height: 60px; margin-bottom: 14px; animation: none; }
.flyer-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.flyer-sub { font-size: 13.5px; color: var(--text-dim); margin: 0 0 16px; }
.flyer-cycle {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}
.flyer-cycle-btn {
  background: none;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.flyer-cycle-btn.active { background: var(--gold); color: #1D1608; }
.flyer-save {
  font-size: 10.5px;
  font-weight: 700;
  background: var(--green-dim);
  color: var(--green);
  padding: 2px 7px;
  border-radius: 999px;
}
.flyer-cycle-btn.active .flyer-save { background: rgba(29,22,8,0.16); color: #1D1608; }
.flyer-plans { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.plan-offer {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.plan-offer.featured {
  border: 1.5px solid var(--gold);
  box-shadow: var(--shadow-gold);
  background: linear-gradient(180deg, rgba(227,181,74,0.09), transparent 55%), var(--surface-2);
}
.plan-offer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-offer-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.plan-offer-tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gold);
  color: #1D1608;
  padding: 4px 9px;
  border-radius: 999px;
}
.plan-offer-price { margin-top: 8px; display: flex; align-items: baseline; gap: 3px; }
.plan-offer-price strong { font-family: var(--font-num); font-size: 26px; font-weight: 700; }
.plan-offer-price span { color: var(--text-dim); font-size: 13px; }
.plan-offer-equiv { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 2px; }
.plan-offer-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 7px; }
.plan-offer-list li { font-size: 13.5px; line-height: 1.4; display: flex; gap: 8px; }
.plan-offer-list li::before { content: "✓"; color: var(--green); font-weight: 700; }
.plan-offer .btn-primary, .plan-offer .btn-secondary { margin-top: 14px; padding: 13px; }
.plan-offer .btn-secondary:disabled { opacity: 0.7; cursor: default; }
.flyer-later { margin-top: 16px; color: var(--text-dim); padding: 6px; }
.flyer-fine { font-size: 11.5px; color: var(--text-faint); margin: 6px 0 0; }

/* Pagamento: fica por cima do flyer (fechar volta pros planos) */
.pagamento-overlay { z-index: 46; }
.pagamento-teste {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 12px;
  padding: 7px 12px;
  margin: 4px 30px 14px;
}
.pagamento-troca { font-size: 12.5px; color: var(--amber); margin: -6px 0 12px; }
.pagamento-carregando { font-size: 13px; color: var(--text-dim); margin: 12px 0; }
.pagamento-carregando:empty { display: none; }
.pagamento-brick { text-align: left; }
.plan-cancel { display: block; margin: 12px auto 0; color: var(--red); font-size: 12.5px; }

/* Anúncio em tela cheia (por enquanto, apresentação dos próprios planos) */
.ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 46;
  background:
    radial-gradient(ellipse 700px 420px at 50% 30%, rgba(227,181,74,0.12), transparent 65%),
    var(--bg);
  display: flex;
  flex-direction: column;
  padding: calc(16px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
  animation: fadeIn 0.2s ease;
}
.ad-top { display: flex; align-items: center; gap: 10px; max-width: 560px; width: 100%; margin: 0 auto; }
.ad-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}
.ad-timer { margin-left: auto; font-family: var(--font-num); font-weight: 700; font-size: 14px; color: var(--gold); min-width: 30px; text-align: right; }
.ad-top .modal-close { position: static; }
.ad-progress { height: 3px; background: var(--surface-2); border-radius: 999px; margin: 12px auto 0; overflow: hidden; max-width: 560px; width: 100%; }
.ad-progress-bar { height: 100%; width: 0; background: var(--gold); transition: width 1s linear; }
.ad-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}
.ad-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.ad-slide.active { opacity: 1; transform: none; }
.ad-emoji { font-size: 54px; }
.ad-slide .plan-chip { font-size: 13px; padding: 7px 15px; }
.ad-slide h2, .ad-done h2 { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 16px 0 10px; }
.ad-slide p { color: var(--text-dim); font-size: 15px; line-height: 1.5; margin: 0; }
.ad-done { display: flex; flex-direction: column; align-items: center; width: 100%; animation: modalIn 0.3s cubic-bezier(.2,.8,.3,1); }
.ad-done .btn-primary { width: 100%; max-width: 320px; }
.ad-done .link-btn { margin-top: 14px; padding: 6px; }
