:root {
    --bg: #030303;
    --panel: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --green: #22c55e;
    --green-2: #16a34a;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --error: #f87171;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* garante que etapas/botões ocultos nunca ocupem espaço */
html, body { max-width: 100%; overflow-x: hidden; } /* nada pode "cortar" a tela na horizontal */
img, svg, video { max-width: 100%; height: auto; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.bg {
    position: fixed; inset: 0; z-index: -1;
    background: radial-gradient(circle at center, #1a0b2e 0%, #030303 70%);
}
.container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.card {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 0 50px 6px rgba(34, 197, 94, 0.12);
}
.card.wide { max-width: 780px; }
.card.center { text-align: center; }
.brand { text-align: center; margin-bottom: 1.5rem; }
.logo { font-size: 2.5rem; }
h1 { margin: 0.3rem 0; font-size: 1.6rem; }
.muted { color: var(--muted); font-size: 0.9rem; }
.center { text-align: center; }
.form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.row { display: flex; gap: 1rem; }
.row label { flex: 1; min-width: 0; }
label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
/* Campos preenchem a largura do label (senão o input usa a largura "natural"
   ~220px e desalinha as colunas — ex.: Sobrenome no cadastro). Checkbox/radio ficam fora. */
label > input:not([type="checkbox"]):not([type="radio"]),
label > select,
label > textarea { width: 100%; min-width: 0; }
input,
textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    color: var(--text);
    font-size: 1rem;
}
/* Textarea combina com o tema escuro: fonte do app (não monospace), redimensiona só na vertical. */
textarea { font-family: inherit; line-height: 1.4; resize: vertical; }
input:focus,
textarea:focus { outline: 2px solid rgba(34, 197, 94, 0.5); border-color: transparent; }
textarea::placeholder, input::placeholder { color: var(--muted); }

/* Campos de data/hora: clique em qualquer ponto abre o seletor (via showPicker no JS)
   e o ícone nativo do calendário fica visível no tema escuro. */
input[type="datetime-local"], input[type="date"], input[type="time"] { cursor: pointer; }
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.6);   /* ícone claro sobre fundo escuro */
    opacity: 0.85;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.btn {
    display: inline-flex;              /* links <a class="btn"> se comportam como botões reais:
                                          o padding vertical passa a ocupar espaço no layout,
                                          eliminando sobreposição com linhas vizinhas */
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--green-2);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.1s, background 0.2s;
}
.btn:hover { background: var(--green); }
.btn:active { transform: scale(0.98); }
.btn.ghost { background: transparent; border: 1px solid var(--border); }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
.alert { padding: 0.8rem 1rem; border-radius: 10px; font-size: 0.9rem; margin-bottom: 1rem; }
.alert.error { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.3); color: var(--error); }
.alert.success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--green); }
.alert.info { background: rgba(96, 165, 250, 0.08); border: 1px solid rgba(96, 165, 250, 0.25); color: #93c5fd; }
.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0; } /* respiro acima E abaixo (ex.: box do Pix) */
.tile { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; }
.tile.link { text-decoration: none; color: var(--text); transition: border-color 0.2s, transform 0.1s; }
.tile.link:hover { border-color: var(--green); transform: translateY(-2px); }
.tile-num { font-size: 1.8rem; font-weight: 700; color: var(--green); }
.footer { text-align: center; padding: 1rem; color: var(--muted); font-size: 0.8rem; }

/* Navegação — quebra em múltiplas linhas no celular em vez de estourar a largura */
.nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; padding-bottom: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.nav-brand { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--text); white-space: nowrap; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.1rem; }
.nav-links a { color: var(--muted); white-space: nowrap; }
.nav-links a:hover { color: var(--green); text-decoration: none; }
.nav-logout { margin: 0; }
select { background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem; color: var(--text); font-size: 1rem; }
.btn.small { padding: 0.45rem 0.8rem; font-size: 0.85rem; }
.form.inline { flex-direction: row; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }  /* quebra linha em vez de vazar do card */
.form.inline label { flex: 1 1 200px; max-width: 340px; min-width: 0; }
.form.inline .btn { flex: 0 0 auto; }

/* Selo/badges */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: rgba(255,255,255,0.08); border: 1px solid var(--border); }
.badge.ok { background: rgba(34,197,94,0.15); color: var(--green); border-color: rgba(34,197,94,0.3); }
.badge.warning { background: rgba(251,191,36,0.12); color: #fbbf24; border-color: rgba(251,191,36,0.3); }
.badge.info { background: rgba(96,165,250,0.12); color: #93c5fd; border-color: rgba(96,165,250,0.3); }
.badge.success { background: rgba(34,197,94,0.15); color: var(--green); border-color: rgba(34,197,94,0.3); }
.badge.error { background: rgba(248,113,113,0.12); color: var(--error); border-color: rgba(248,113,113,0.3); }
.badge.muted-badge { color: var(--muted); }

/* Lista de bolões */
.pool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.pool-item { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-left: 3px solid var(--lot, var(--border)); border-radius: 14px; padding: 1.2rem; text-decoration: none; color: var(--text); transition: border-color 0.2s, transform 0.1s; display: block; }
.pool-item:hover { border-color: var(--lot, var(--green)); transform: translateY(-2px); text-decoration: none; }
.pool-item .progress-bar { background: var(--lot, var(--green)); }
.pool-head { display: flex; justify-content: space-between; margin-bottom: 0.6rem; }
.pool-item h3 { margin: 0.3rem 0 0.8rem; }
.pool-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.6rem; }
.progress { height: 6px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--green); }

/* Cards com link + área expansível de detalhes */
.pool-link { display: block; text-decoration: none; color: inherit; }
.pool-link:hover { text-decoration: none; }
.pool-prize { font-size: 0.9rem; color: color-mix(in srgb, var(--lot, #22c55e) 60%, white); margin: 0.2rem 0 0.6rem; }
.pool-details { margin-top: 0.8rem; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.pool-details summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; user-select: none; }
.pool-details summary:hover { color: var(--lot, var(--green)); }
.pool-details[open] summary { color: var(--lot, var(--green)); margin-bottom: 0.6rem; }
.pool-info { display: flex; flex-wrap: wrap; gap: 0.25rem 1.2rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.6rem; }
.pool-games { display: flex; flex-direction: column; gap: 0.45rem; }
.pool-game-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; }
.pool-game-row > .muted { min-width: 52px; }
.balls-sm .ball { width: 24px; height: 24px; font-size: 0.68rem; }
.result-box { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 1rem; margin-bottom: 0.7rem; }
.manage-game { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 1rem; margin-bottom: 0.6rem; }

.quadrant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; max-width: 480px; margin-top: 0.5rem; }

/* Estatísticas dos números escolhidos (chips) + favoritos do perfil */
.insight-chips { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin-top: 0.5rem; }
.insight-chip { display: inline-flex; align-items: center; gap: 0.45rem; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.7rem 0.25rem 0.3rem; }
.insight-chip .small { color: var(--muted); }
.fav-row { display: flex; gap: 0.6rem; }
.fav-row input { width: 80px; text-align: center; }

/* Modal de análise das dezenas selecionadas (NumStats) */
.numstats-modal { width: min(94vw, 560px); max-height: 88vh; overflow-y: auto; }
.numstats-row { display: flex; flex-wrap: wrap; gap: 0.6rem 0.8rem; margin: 0.6rem 0; }
.numstats-row .num-btn { width: 44px; height: 44px; }
.numstats-resumo, .numstats-tiers { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.9rem; margin: 0.6rem 0; }
.numstats-label { color: var(--muted); margin-top: 0.6rem; }
.numstats-top { padding: 0.5rem 0.6rem; background: rgba(255,255,255,0.03); border: 1px dashed var(--border); border-radius: 10px; }
.numstats-top .num-btn { width: 38px; height: 38px; font-size: 0.78rem; }
.num-btn.match { box-shadow: 0 0 0 2px #fff, 0 0 10px rgba(255,255,255,0.35); } /* anel branco = coincidência */
.numstats-match { color: var(--green); }

/* Contorno dos 4 quadrantes (só no modo Quadrantes) — mapa das Estatísticas */
.number-grid.quad-outline {
    position: relative;
    padding: 14px 8px 8px;
    border: 1px dashed color-mix(in srgb, var(--lot, #22c55e) 50%, transparent);
    border-radius: 12px;
}
.number-grid.quad-outline::before { /* divisória vertical */
    content: '';
    position: absolute;
    top: 6px; bottom: 6px;
    left: var(--qx, 50%);
    border-left: 1px dashed color-mix(in srgb, var(--lot, #22c55e) 50%, transparent);
}
.number-grid.quad-outline::after { /* divisória horizontal */
    content: '';
    position: absolute;
    left: 6px; right: 6px;
    top: var(--qy, 50%);
    border-top: 1px dashed color-mix(in srgb, var(--lot, #22c55e) 50%, transparent);
}
.quad-label {
    display: none;
    position: absolute;
    font-size: 0.62rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--lot, #22c55e) 70%, white);
    background: rgba(3,3,3,0.85);
    padding: 0 0.35rem;
    border-radius: 6px;
    z-index: 1;
}
.number-grid.quad-outline .quad-label { display: block; }
.quad-label.q1 { top: -2px; left: 10px; }
.quad-label.q2 { top: -2px; left: calc(var(--qx, 50%) + 10px); }
.quad-label.q3 { top: calc(var(--qy, 50%) + 2px); left: 10px; }
.quad-label.q4 { top: calc(var(--qy, 50%) + 2px); left: calc(var(--qx, 50%) + 10px); }

/* Agrupamento por quadrante no modal de análise (modo Quadrantes) */
.quad-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.7rem;
    border: 1px dashed color-mix(in srgb, var(--lot, #22c55e) 50%, transparent);
    border-radius: 10px;
    padding: 0.7rem 0.6rem 0.4rem;
    margin: 0.55rem 0.4rem 0.2rem 0;
}
.qg-label {
    position: absolute;
    top: -0.55rem;
    left: 0.5rem;
    font-size: 0.62rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--lot, #22c55e) 70%, white);
    background: #101014;
    padding: 0 0.3rem;
    border-radius: 6px;
}

/* Mapa de calor das dezenas (visual, não clicável) */
.num-btn.static { cursor: default; display: flex; align-items: center; justify-content: center; width: 100%; }
.num-btn.static:hover { transform: none; border-color: var(--border); }
.heat-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.heat-val { font-size: 0.6rem; color: var(--muted); line-height: 1.1; text-align: center; min-height: 0.7rem; white-space: nowrap; }
@media (max-width: 480px) { .heat-val { font-size: 0.52rem; } }
.num-btn.heat-strong { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); border-color: var(--lot, var(--green)); box-shadow: 0 0 10px color-mix(in srgb, var(--lot, #22c55e) 45%, transparent), inset 0 -3px 5px rgba(0,0,0,0.3); }

/* Banner de ferramenta (link p/ Desdobramentos dentro de Estatísticas) */
.tool-banner { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; padding: 1rem 1.2rem; background: rgba(34,197,94,0.07); border: 1px solid rgba(34,197,94,0.28); border-radius: 12px; color: var(--text); text-decoration: none; transition: border-color 0.2s, transform 0.1s; }
.tool-banner:hover { border-color: var(--green); transform: translateY(-2px); text-decoration: none; }
.tool-icon { font-size: 1.6rem; }
.tool-arrow { margin-left: auto; color: var(--green); font-size: 1.3rem; }

/* Blocos administrativos: separação estrutural entre seções (nada se encosta) */
.admin-block { margin: 2rem 0; padding: 1.2rem; background: rgba(0,0,0,0.22); border: 1px solid var(--border); border-radius: 14px; }
.admin-block h3 { margin-top: 0; }
.admin-block .form { margin-top: 0.8rem; }
.num-picker { display: grid; gap: 0.8rem; }

/* Tabelas */
.table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.5rem; }
.table th, .table td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
h3 { margin-top: 1.6rem; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }  /* botões quebram linha, nunca vazam da tabela */
.actions form { margin: 0; }
.table { display: block; overflow-x: auto; }               /* tabelas largas rolam dentro do card */
.btn.danger { color: var(--error); border-color: rgba(248,113,113,0.4); }
.btn.danger:hover { background: rgba(248,113,113,0.12); }

/* Carteira / saldo */
.nav-balance { color: var(--green) !important; font-weight: 700; white-space: nowrap; }
.balance-card { display: flex; flex-direction: column; gap: 0.3rem; background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.3); border-radius: 14px; padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; }
.balance-value { font-size: 2rem; font-weight: 800; color: var(--green); }
.ledger { display: flex; flex-direction: column; }
.ledger-row { display: flex; align-items: baseline; gap: 1rem; padding: 0.6rem 0.2rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ledger-amount { font-weight: 700; min-width: 110px; }
.ledger-amount.credit { color: var(--green); }
.ledger-amount.debit { color: var(--error); }
.ledger-desc { flex: 1; font-size: 0.9rem; }
.alert.warning-box { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.3); color: #fde68a; }

/* Depósitos (admin) */
.deposit-card { display: flex; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 0.8rem; }
.deposit-info { display: flex; flex-direction: column; gap: 0.5rem; flex: 1 1 320px; }
.deposit-extract { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; background: rgba(255,255,255,0.03); border-radius: 8px; padding: 0.7rem 0.9rem; }
.deposit-extract .rk { color: var(--muted); font-size: 0.85rem; }
.deposit-extract .rv { font-size: 0.9rem; font-weight: 600; }
.deposit-actions { display: flex; flex-direction: column; gap: 0.6rem; justify-content: center; min-width: 200px; }
.deposit-actions .form { gap: 0.5rem; }

/* Modal de confirmação (2ª etapa antes de debitar saldo) */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal {
    width: min(92vw, 440px);
    background: #101014;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(34, 197, 94, 0.08);
    animation: modalIn 0.15s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; } }
.modal h3 { margin: 0 0 0.5rem; }
.modal-summary { display: grid; grid-template-columns: 1fr max-content; gap: 0.5rem 1rem; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem 1rem; margin: 1rem 0 1.2rem; }
.modal-summary .rk { color: var(--muted); font-size: 0.9rem; }
.modal-summary .rv { font-weight: 700; text-align: right; }
.modal-summary .rv.highlight { color: var(--green); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; flex-wrap: wrap; }
@media (max-width: 480px) { .modal-actions { flex-direction: column-reverse; } .modal-actions .btn { width: 100%; } }

/* Sino de notificações */
.nav-notif { position: relative; font-size: 1.1rem; }
.notif-badge { position: absolute; top: -8px; right: -10px; background: var(--error); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: 999px; }
.notif-list { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1rem; }
.notif { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-left-width: 3px; border-radius: 10px; padding: 0.9rem 1rem; }
.notif.unread { background: rgba(255,255,255,0.05); }
.notif.type-success { border-left-color: var(--green); }
.notif.type-error { border-left-color: var(--error); }
.notif.type-warning { border-left-color: #fbbf24; }
.notif.type-info { border-left-color: #60a5fa; }
.notif-title { font-weight: 600; }
.notif-msg { color: var(--muted); font-size: 0.9rem; margin: 0.2rem 0; }
.notif-time { color: var(--muted); font-size: 0.75rem; }
a.notif-link { display: block; text-decoration: none; color: inherit; transition: background 0.15s ease; }
a.notif-link:hover { background: rgba(255,255,255,0.08); }

/* 🎟️ Bilhetes / comprovantes dos jogos */
.ticket-block { margin: 2rem 0; padding: 1.2rem; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,0.02); }
.ticket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin: 0.6rem 0; }
.ticket-card { margin: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.ticket-thumb { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; padding: 0; background: #0b0b10; cursor: zoom-in; aspect-ratio: 3 / 4; }
.ticket-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease; }
.ticket-thumb:hover img { transform: scale(1.03); }
.ticket-card figcaption { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; }
.ticket-games { border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.9rem; display: flex; flex-direction: column; gap: 0.4rem; }
.ticket-game-opt { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.92rem; }
.ticket-modal-box { width: min(94vw, 780px); max-height: 92vh; display: flex; flex-direction: column; gap: 0.6rem; padding: 0.8rem; }
.ticket-modal-box img { width: 100%; max-height: calc(92vh - 4rem); object-fit: contain; border-radius: 10px; background: #000; }
.ticket-modal-close { align-self: flex-end; }
@media (max-width: 560px) { .ticket-grid { grid-template-columns: repeat(2, 1fr); } }

/* Minhas cotas / comprovantes */
.small { font-size: 0.8rem; }
.part-list { display: flex; flex-direction: column; gap: 0.8rem; margin: 0.5rem 0 1.5rem; }
.part-card { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.part-card.link-card { display: block; text-decoration: none; color: var(--text); border-left: 3px solid var(--lot, var(--border)); transition: border-color 0.2s, transform 0.1s; }
.part-card.link-card:hover { border-color: var(--lot, var(--green)); transform: translateY(-2px); text-decoration: none; }
.part-head { display: flex; justify-content: space-between; align-items: center; }
.receipt { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.6rem 0; font-size: 0.85rem; }
.upload-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }
.upload-form input[type=file] { font-size: 0.85rem; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.7rem; margin-right: 0.6rem; cursor: pointer; }

/* Dezenas (bolinhas) */
.balls { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.ball { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid var(--border); font-size: 0.8rem; font-weight: 600; }
.ball.hit { background: var(--lot, var(--green-2)); border-color: var(--lot, var(--green)); color: #fff; box-shadow: 0 0 8px color-mix(in srgb, var(--lot, #22c55e) 55%, transparent); }

/* Detalhe do bolão herda a cor da modalidade nos números-destaque */
.card[data-lot] .tile-num { color: color-mix(in srgb, var(--lot) 70%, white); }
.card[data-lot] .progress-bar { background: var(--lot); }

/* Estatísticas */
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tab { padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 0.85rem; }
.tab:hover { text-decoration: none; border-color: var(--lot, var(--green)); }
.tab.active { background: var(--lot, var(--green-2)); color: #fff; border-color: var(--lot, var(--green)); }
.tab.active .muted { color: rgba(255,255,255,0.75); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 0.5rem; }
.stat-row { display: flex; align-items: center; gap: 0.6rem; margin: 0.35rem 0; }
.stat-bar { flex: 1; height: 10px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.stat-fill { height: 100%; background: var(--green); }
.stat-fill.cold { background: #60a5fa; }
.overdue { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.5rem; }
.overdue-item { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
details summary { cursor: pointer; margin: 0.5rem 0; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

/* Assistente de criação (wizard) */
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0.5rem 0 1.5rem; counter-reset: step; }
.steps li { counter-increment: step; color: var(--muted); font-size: 0.85rem; padding: 0.4rem 0.8rem 0.4rem 2rem; border: 1px solid var(--border); border-radius: 999px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0.5rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; }
.steps li.active { color: var(--text); border-color: var(--green); }
.steps li.active::before { background: var(--green-2); color: #fff; }
.steps li.done { color: var(--green); }
.steps li.done::before { content: '✓'; background: var(--green-2); color: #fff; }
/* Cada etapa é um grid vertical com gap — os campos nunca encostam nem sobrepõem. */
.wizard-step:not([hidden]) { display: grid; gap: 1rem; animation: fade 0.2s ease; }
.wizard-step h3, .wizard-step h4 { margin: 0; }
.wizard-step p { margin: 0; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Barra de ações: fluxo normal do documento, flex com quebra — nada de posição fixa. */
.wizard-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.wizard-nav .spacer { flex: 1 1 auto; }
@media (max-width: 560px) {
    .wizard-nav { flex-direction: column; align-items: stretch; }
    .wizard-nav .spacer { display: none; }
    .wizard-nav .btn { width: 100%; }
}

/* Construtor de jogos */
.game-builder { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.builder-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.8rem; margin-bottom: 1rem; }
.builder-controls label { flex: 1 1 220px; max-width: 300px; }
.sel-count { font-weight: 700; color: var(--green); align-self: center; min-width: 56px; text-align: center; }

/* Grade de dezenas — bolas circulares em layout FIXO por modalidade:
   Mega 6 linhas×10 · Quina 8 linhas×10 · Lotofácil 5 linhas×5 (via data-cols). */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); /* fallback */
    gap: 0.5rem;
}
.number-grid[data-cols="10"] { grid-template-columns: repeat(10, 1fr); }
.number-grid[data-cols="5"]  { grid-template-columns: repeat(5, 1fr); max-width: 420px; }
@media (max-width: 480px) {
    .number-grid[data-cols="10"] { gap: 0.28rem; }
    .number-grid[data-cols="10"] .num-btn { font-size: 0.7rem; }
}
.num-btn {
    aspect-ratio: 1 / 1;
    width: 100%;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    /* esfera neutra com leve profundidade */
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,0.16), rgba(255,255,255,0) 46%),
        rgba(255,255,255,0.05);
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.45), inset 0 2px 3px rgba(255,255,255,0.07);
    transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.num-btn:hover { transform: translateY(-2px) scale(1.05); border-color: var(--lot, var(--green)); }
.num-btn:active { transform: scale(0.92); }
.num-btn.sel {
    /* bola selecionada na cor da modalidade, com brilho e relevo */
    background:
        radial-gradient(circle at 32% 26%, rgba(255,255,255,0.5), rgba(255,255,255,0) 44%),
        var(--lot, var(--green-2));
    border-color: transparent;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.45), 0 0 12px color-mix(in srgb, var(--lot, #22c55e) 55%, transparent), inset 0 -3px 5px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}
/* Cores oficiais aproximadas por modalidade — válidas em QUALQUER elemento
   com data-lot (cards de bolões, detalhe, grade de dezenas, selos etc.). */
[data-lot="megasena"]  { --lot: #1d9b62; }
[data-lot="lotofacil"] { --lot: #b8009a; }
[data-lot="quina"]     { --lot: #4a3bd4; }

/* Selo da modalidade na cor da loteria */
.badge.lot {
    background: color-mix(in srgb, var(--lot, #22c55e) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--lot, #22c55e) 45%, transparent);
    color: color-mix(in srgb, var(--lot, #22c55e) 55%, white);
}

.games-added { display: flex; flex-direction: column; gap: 0.5rem; }
.game-added { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.6rem 1rem; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 1rem; }
.games-cost { padding: 0.7rem 1rem; background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.25); border-radius: 10px; }

/* Resumo financeiro (Etapa 4) */
.fin-summary { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.2rem; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; }
.fin-summary .rk { color: var(--muted); font-size: 0.9rem; }
.fin-summary .rv { font-weight: 600; }
.fin-summary .rv.highlight { color: var(--green); font-size: 1.15rem; }

/* Revisão */
.review-box { display: grid; gap: 1rem; }
.review-grid { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.2rem; }
.review-grid .rk { color: var(--muted); font-size: 0.9rem; }
.review-grid .rv { font-weight: 600; }

@media (max-width: 560px) {
    .number-grid { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
    .builder-controls label { flex: 1 1 100%; max-width: none; }
    .builder-controls .btn { flex: 1 1 auto; }
}

@media (max-width: 520px) { .row { flex-direction: column; } .grid { grid-template-columns: 1fr; } .form.inline { flex-direction: column; align-items: stretch; } }

/* ============================================================
   Mobile (iPhone / Galaxy) — telas até 560px
   ============================================================ */
@media (max-width: 560px) {
    .container { padding: 1rem 0.6rem; }
    .card { padding: 1.25rem 1rem; border-radius: 14px; }
    h1 { font-size: 1.35rem; }
    .nav-links { font-size: 0.9rem; gap: 0.45rem 0.9rem; }
    .topbar { flex-direction: column; align-items: stretch; }
    .topbar .btn { width: 100%; }
    .balance-value { font-size: 1.6rem; }
    /* resumos com rótulo em cima e valor embaixo (evita estouro lateral) */
    .fin-summary, .review-grid, .deposit-extract, .modal-summary { grid-template-columns: 1fr; gap: 0.15rem 0; }
    .fin-summary .rk, .review-grid .rk, .deposit-extract .rk, .modal-summary .rk { margin-top: 0.5rem; }
    .fin-summary .rv, .modal-summary .rv { text-align: left; }
    .deposit-actions { min-width: 0; width: 100%; }
}

/* Valores longos (IDs de transação, e-mails, descrições) sempre quebram linha */
.deposit-extract .rv, .review-grid .rv, .fin-summary .rv, .ledger-desc, .table td { overflow-wrap: anywhere; min-width: 0; }

/* Bloco do Pix geral (Meu saldo): nome/chave/copia-e-cola clicáveis + QR abaixo */
.pix-block { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin: .5rem 0 1rem; background: rgba(255,255,255,0.03); }
.pix-block .pix-link { display: block; color: var(--text); text-decoration: none; }
a.pix-link:hover { background: rgba(255,255,255,0.04); border-radius: 8px; }
.pix-block .pix-qr { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--border); text-align: center; }
.pix-block .pix-qr img { border: 1px solid var(--border); border-radius: 10px; max-width: 100%; height: auto; }

/* Modal genérico (comprovante / detalhes de notificação) */
.modal-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.72); }
.modal-overlay[hidden] { display: none; }
.modal-box { position: relative; width: 100%; max-width: 720px; max-height: 90vh; overflow: auto; background: #14141b; border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem 1.4rem; box-shadow: 0 12px 60px rgba(0,0,0,.6); }
.modal-close { position: absolute; top: .6rem; right: .6rem; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; font-size: 1rem; line-height: 1; }
.modal-close:hover { background: rgba(255,255,255,.12); }
.modal-content h3 { margin: .2rem 0 .6rem; padding-right: 2rem; }
.modal-content img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }
.modal-content iframe { width: 100%; height: 68vh; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.modal-grid { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .35rem .8rem; margin: .6rem 0; font-size: .92rem; }
.modal-grid .mk { color: var(--muted); }
.modal-grid .mv { overflow-wrap: anywhere; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin-top: .6rem; }
.modal-actions .form { margin: 0; }

/* Mensagens prontas p/ WhatsApp (admin) */
.wa-box { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin: 1rem 0; background: rgba(255,255,255,0.03); }
.wa-box h3 { margin: 0 0 .6rem; }
.wa-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.wa-modal-text { width: 100%; font-size: .9rem; line-height: 1.45; }

/* Logs do bolão (modal admin) */
.log-row { display: flex; gap: .6rem; align-items: baseline; padding: .45rem 0; border-bottom: 1px solid rgba(255,255,255,.07); font-size: .88rem; }
.log-time { color: var(--muted); white-space: nowrap; font-size: .78rem; min-width: 105px; }
.log-cat { flex: 0 0 auto; font-size: .68rem; }
.log-text { overflow-wrap: anywhere; }
.log-filter { width: 100%; }

/* @menções no Mural: caixa de sugestões sob o textarea */
.mention-wrap { position: relative; display: block; }
/* A textarea agora vive dentro do .mention-wrap (não é mais filha direta do label),
   então a regra "label > textarea{width:100%}" deixou de valer — garantimos aqui
   a largura total e uma altura confortável para escrever. */
.mention-wrap > textarea { width: 100%; min-width: 0; min-height: 6rem; }
.mention-box { position: absolute; left: 0; right: 0; top: 100%; z-index: 50; display: flex; flex-direction: column; background: #14141b; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 10px 34px rgba(0,0,0,.55); max-height: 260px; overflow-y: auto; }
.mention-box[hidden] { display: none; }
.mention-item { padding: .55rem .8rem; cursor: pointer; font-size: .9rem; border-bottom: 1px solid rgba(255,255,255,.05); }
.mention-item:hover, .mention-item.sel { background: rgba(34,197,94,.15); }

/* Chip visual das @menções nas mensagens do Mural */
.mention-chip { background: rgba(34,197,94,.16); color: #7bd88f; border: 1px solid rgba(34,197,94,.32); border-radius: 6px; padding: 0 .3rem; font-weight: 600; white-space: nowrap; }

/* ---- Tabelas no CELULAR: largura natural + rolagem horizontal ----
   Em telas estreitas as colunas eram espremidas e palavras quebravam no
   meio ("Con-fir-ma-da", e-mails). Agora a tabela mantém a largura do
   conteúdo (nada quebra) e o usuário desliza com o dedo para os lados. */
@media (max-width: 700px) {
    .table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table th,
    .table td {
        white-space: nowrap;
    }
}

/* ---- Menu reorganizado: ☰ lateral + atalhos rápidos no topo ---- */
.nav-menu-btn { background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; font-size: 1.05rem; padding: .28rem .6rem; cursor: pointer; line-height: 1; }
.nav-menu-btn:hover { border-color: var(--green); color: var(--green); }
.nav-quick { display: flex; align-items: center; gap: .5rem 1rem; margin-left: auto; }
.nav-quick > a { color: var(--muted); white-space: nowrap; text-decoration: none; }
.nav-quick > a:hover { color: var(--green); }
.nav-label { margin-left: .3rem; }
@media (max-width: 760px) {
    .nav-label { display: none; }            /* celular: só ícones nos atalhos */
    .nav-quick { gap: .5rem .75rem; }
}
.nav-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 60; }
/* Gaveta em "vidro escuro": fundo translúcido + blur discreto + cantos suaves
   e sombra sutil. Sem suporte a backdrop-filter, cai no fundo sólido. */
.nav-drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(78vw, 300px); background: #12121a; border-right: 1px solid rgba(255,255,255,.08); border-radius: 0 16px 16px 0; box-shadow: 8px 0 32px rgba(0,0,0,.45); z-index: 61; padding: 1rem; display: flex; flex-direction: column; gap: .15rem; overflow-y: auto; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .nav-drawer { background: rgba(16, 17, 25, .74); backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25); }
}
.nav-drawer a { color: var(--text); text-decoration: none; padding: .5rem .6rem; border-radius: 8px; }
.nav-drawer a:hover { background: rgba(34,197,94,.12); color: var(--green); }
.nav-drawer hr { border: 0; border-top: 1px solid var(--border); margin: .45rem 0; width: 100%; }
.nav-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }

/* Botão flutuante do grupo de WhatsApp (área logada) */
.wa-fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 52px; height: 52px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.45); transition: transform .12s ease; }
.wa-fab:hover { transform: scale(1.07); text-decoration: none; }

/* ---- Ícones SVG da interface (traço, cor herdada) ---- */
.icon { vertical-align: -3px; flex-shrink: 0; }
.nav-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
.nav-quick > a { display: inline-flex; align-items: center; gap: .35rem; }
.nav-notif .icon { vertical-align: -4px; }
.nav-drawer a { display: flex; align-items: center; gap: .55rem; }
.nav-drawer .nav-wa .icon { color: #25D366; }
.nav-logout .btn, .nav-drawer .btn { display: inline-flex; align-items: center; gap: .35rem; }
