/* ====== ADMIN.CSS – ESTILOS PADRÃO DO PAINEL ====== */

/* Reset e base */
* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    max-width: 1100px;
    margin: 30px auto;
    padding: 20px;
    background: #f0f2f5;
}
.container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* Cabeçalhos e links */
h1 {
    color: #1a2a3a;
    border-bottom: 3px solid #007bff;
    padding-bottom: 10px;
    margin-top: 0;
}
h2 {
    color: #1a2a3a;
    margin-top: 25px;
    margin-bottom: 15px;
}
h3 {
    color: #1a2a3a;
    margin: 20px 0 8px;
}
.voltar {
    display: inline-block;
    margin-bottom: 15px;
    color: #007bff;
    text-decoration: none;
}
.voltar:hover { text-decoration: underline; }

/* Links do menu do painel (cards) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}
.card {
    background: #fafbfc;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 22px 20px;
    transition: transform 0.1s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-color: #b0c4d9;
}
.card .icone {
    font-size: 32px;
    margin-bottom: 10px;
}
.card h3 {
    margin: 0 0 8px 0;
    color: #1a5276;
}
.card p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}
.card .link-externo {
    color: #1a5276;
    font-weight: 600;
}

/* Botões */
.btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}
.btn:hover:not(:disabled) { background: #0056b3; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}
.btn-danger:hover:not(:disabled) { background: #c82333; }
.btn-success {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}
.btn-success:hover:not(:disabled) { background: #218838; }
.btn-secondary {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
.btn-secondary:hover { background: #5a6268; }

/* Campos de formulário */
.fg {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.fg label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}
.fg input, .fg select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}
.fg input:focus, .fg select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}
.hint {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
}

/* Extrator específico */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}
.form-group select, .form-group input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}
.full-width {
    grid-column: 1 / -1;
}
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}
.checkbox-group input {
    width: 20px;
    height: 20px;
}
.botoes {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: monospace;
    min-height: 200px;
    background: #f8f9fa;
}
textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 25px;
}
.result-header h3 { margin: 0; }
.result-box {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 10px;
}
.result-box pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 13px;
}
.btn-loteria {
    display: block;
    background: #007bff;
    color: #fff ;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    text-align: center;
}
.btn-loteria:hover {
    background: #0056b3;
   transform: scale(1.02);
    color: #fff ;
}

/* Cards para escolha de loteria (versão melhorada) */
.loteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.loteria-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    text-decoration: none;
    color: #1a2a3a;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.loteria-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: #007bff;
    background: #fff;
}
.loteria-card .nome {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    margin-top: 8px;
}
.loteria-card .icone {
    font-size: 2.2rem;
}

/* Mensagens */
.erro {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}
.sucesso {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}
.aviso {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}
.msg-exclusao {
    background: #d1ecf1;
    color: #0c5460;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}
.badge {
    background: #007bff;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: inline-block;
}
.badge-fixo {
    background: #28a745;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: inline-block;
}

/* Barra de progresso */
.pbar-wrap {
    margin: 15px 0;
    display: none;
}
.pbar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}
.pfill {
    height: 100%;
    background: #007bff;
    width: 0%;
    transition: width 0.3s;
}
.ptext {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #555;
}

/* Vários */
.vmsg {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 6px;
    display: none;
}
.vmsg.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}
.vmsg.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}
.hidden { display: none !important; }
.app-footer {
    text-align: center;
    margin-top: 30px;
    color: #6c757d;
    font-size: 0.8rem;
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
}
.section-desc {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 10px;
}
@media (max-width: 700px) {
    .grid { grid-template-columns: 1fr; }
    .loteria-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}