/* ARQUIVO MESTRE DE ESTILOS - AXB LOTERIAS */
:root {
    --cor-fundo: #f0f4f8;
    --cor-painel: #ffffff;
    --cor-sidebar: #0f172a;
    --cor-texto: #1e293b;
    --cor-texto-mutado: #64748b;
    --borda: #e2e8f0;
    --cor-primaria: #f97316; /* Laranja Lotomania */
    --cor-primaria-hover: #ea580c;
}

body { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; background-color: var(--cor-fundo); display: flex; height: 100vh; overflow: hidden; color: var(--cor-texto); }

/* MENU LATERAL E BARRA TOPO (RESTAUROU A ESTRUTURA!) */
.sidebar { width: 260px; background-color: var(--cor-sidebar); color: white; display: flex; flex-direction: column; z-index: 10; flex-shrink: 0; }
.logo { padding: 25px 20px; font-size: 24px; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sidebar .logo span { color: #10b981; } 
.menu { list-style: none; padding: 10px 0; margin: 0; flex: 1; overflow-y: auto; }
.menu-title { font-size: 11px; color: #475569; text-transform: uppercase; letter-spacing: 1px; padding: 0 20px; margin-bottom: 8px; margin-top: 15px; font-weight: bold; }
.menu li a { display: flex; align-items: center; padding: 12px 20px; color: #94a3b8; text-decoration: none; border-left: 3px solid transparent; transition: 0.2s; font-size: 14px; }
.menu li a:hover, .menu li a.ativo { background-color: rgba(255,255,255,0.03); color: white; border-left-color: var(--cor-primaria); }

.main-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; width: 100%; }
.header { background-color: var(--cor-painel); padding: 0 20px; min-height: 60px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--borda); flex-shrink: 0;}
.ticker-wrap { overflow: hidden; background: #0f172a; padding: 8px 15px; border-radius: 6px; width: 60%; }
.ticker { display: flex; white-space: nowrap; animation: ticker 30s linear infinite; }
.ticker__item { padding: 0 30px; font-size: 13px; font-weight: 500; color: #f8fafc; }
@keyframes ticker { 0% { transform: translate3d(100%, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }
.user-info { display: flex; align-items: center; gap: 15px; margin-left: auto;}
.user-text { display: flex; flex-direction: column; text-align: right; }
.user-text .nome { font-weight: bold; font-size: 13px; }
.btn-sair { border: 1px solid #ef4444; color: #ef4444; padding: 6px 12px; text-decoration: none; border-radius: 6px; font-size: 12px; font-weight: bold;}

/* BARRA DE FERRAMENTAS VALIOSAS (A sua sacada do vídeo) */
.header-ferramentas { display: flex; gap: 15px; padding: 12px 20px; background: var(--cor-painel); overflow-x: auto; flex-shrink: 0; align-items: center; border-bottom: 1px solid var(--borda);}
.btn-ferramenta { padding: 8px 16px; border-radius: 6px; font-size: 12px; font-weight: bold; cursor: pointer; border: 1px solid var(--borda); background: #f8fafc; color: var(--cor-texto-mutado); transition: 0.2s; white-space: nowrap; }
.btn-ferramenta:hover, .btn-ferramenta.ativo { background: var(--cor-primaria); border-color: var(--cor-primaria); color: white; }

/* LAYOUT 3 COLUNAS GRID (Ajustado) */
.conteudo-central { padding: 20px; overflow: hidden; flex: 1; display: flex; flex-direction: column; }
.container-loteria { display: grid; grid-template-columns: 3.5fr 3fr 3.5fr; gap: 20px; height: 100%; width: 100%; max-width: 1500px; margin: 0 auto; }

.painel { background: var(--cor-painel); border-radius: 8px; border: 1px solid var(--borda); box-shadow: 0 4px 6px rgba(0,0,0,0.02); display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.painel-header { padding: 12px 18px; border-bottom: 1px solid var(--borda); background: #f8fafc; font-weight: bold; font-size: 14px; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center;}
.painel-body { padding: 18px; flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

/* VOLANTE GRANDE */
.volante-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin-bottom: 15px;}
.bola { aspect-ratio: 1; border-radius: 50%; background: var(--cor-fundo); border: 1px solid var(--borda); display: flex; align-items: center; justify-content: center; font-weight: bold; color: var(--cor-texto-mutado); cursor: pointer; transition: 0.1s; font-size: 13px; user-select: none; }
.bola:hover { border-color: var(--cor-primaria); color: var(--cor-primaria); }
.bola.selecionada { background: var(--cor-primaria); color: white; border-color: var(--cor-primaria); transform: scale(1.05); }

.acoes-volante { display: flex; gap: 10px; margin-top: auto; }
.btn-acao { flex: 1; padding: 10px; border-radius: 6px; font-size: 12px; font-weight: bold; cursor: pointer; border: none; }
.btn-limpar { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.btn-ia { background: #e0e7ff; color: #4338ca; border: 1px solid #a5b4fc; }

/* MOTOR */
.painel-motor .painel-body { padding: 0; }
.abas-matrizes { display: flex; border-bottom: 1px solid var(--borda); background: #f8fafc; }
.aba { flex: 1; padding: 10px 0; font-size: 11px; font-weight: bold; color: var(--cor-texto-mutado); cursor: pointer; border: none; background: transparent; border-bottom: 2px solid transparent; text-transform: uppercase;}
.aba:hover, .aba.ativa { color: var(--cor-primaria); border-bottom-color: var(--cor-primaria); background: white; }
.lista-matrizes { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #f1f5f9; }
.cartao-matriz { background: white; border: 1px solid var(--borda); border-radius: 6px; padding: 12px; cursor: pointer; }
.cartao-matriz.selecionado { border-color: var(--cor-primaria); border-width: 2px; }
.motor-rodape { padding: 15px; border-top: 1px solid var(--borda); background: white; }
.btn-axb { background: var(--cor-primaria); color: white; border: none; padding: 12px; border-radius: 6px; font-weight: bold; font-size: 14px; cursor: pointer; width: 100%; text-transform: uppercase;}

/* RESULTADOS (4 Botões) */
.caixa-jogos { flex: 1; width: 100%; background: #0f172a; color: #f8fafc; padding: 12px; border-radius: 6px; font-family: monospace; font-size: 13px; border: none; outline: none; resize: none; margin-bottom: 15px; min-height: 150px; }
.acoes-resultados { display: flex; flex-direction: column; gap: 8px; }
.btn-resultado { padding: 10px; border: 1px solid var(--borda); background: #f8fafc; color: #1e293b; font-weight: bold; font-size: 12px; border-radius: 6px; cursor: pointer; display: flex; justify-content: center; gap: 8px; }

/* ============================================================
   RESPONSIVO — tablet e celular
   ============================================================ */
@media (max-width: 980px) {
    body { display: block; height: auto; overflow-y: auto; overflow-x: hidden; }
    .sidebar { width: 100%; height: auto; flex-direction: column; }
    .sidebar .logo { padding: 16px 20px; }
    .menu { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px; }
    .menu-title { display: none; }
    .menu li { list-style: none; }
    .menu li a { padding: 8px 13px; border-left: none !important; border-radius: 20px; background: rgba(255,255,255,.05); font-size: 12px; }
    .menu li a.ativo, .menu li a:hover { background: var(--cor-primaria); color: #fff; }
    .menu-destaque { margin: 6px; flex-basis: 100%; }

    .main-wrapper { width: 100%; overflow: visible; }
    .header { flex-wrap: wrap; gap: 8px; padding: 10px 14px; height: auto; }
    .ticker-wrap { width: 100%; order: 2; }
    .user-info { order: 1; margin-left: 0; }
    .header-ferramentas { flex-wrap: nowrap; }

    .conteudo-central { padding: 12px; overflow: visible; height: auto; }
    .container-loteria { grid-template-columns: 1fr; height: auto; gap: 14px; max-width: 100%; }
    .painel { height: auto; }
    .painel-body { overflow: visible; }
    .caixa-jogos { min-height: 220px; }
    .bola { font-size: 12px; }
}
@media (max-width: 520px) {
    .volante-grid { grid-template-columns: repeat(8, 1fr); }
    .bola { font-size: 11px; }
    .header-ferramentas { gap: 8px; padding: 10px 12px; }
    .btn-ferramenta { padding: 7px 11px; font-size: 11px; }
}