/* ============================================
   ESTILOS GERAIS
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 5px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

/* ============================================
   BOTOES
   ============================================ */

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-small {
    background: #3498db;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.3s;
}

.btn-small:hover {
    background: #2980b9;
}

/* ============================================
   BARRA DE PROGRESSO
   ============================================ */

.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.progress-bar-small {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    width: 100px;
    margin-right: 10px;
}

.progress-bar-small .progress-fill {
    height: 100%;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #7f8c8d;
}

/* ============================================
   ESTATISTICAS
   ============================================ */

.stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

/* ============================================
   TABELA
   ============================================ */

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #34495e;
}

tr:hover {
    background: #f8f9fa;
}

/* ============================================
   STATUS
   ============================================ */

.status {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status.pendente {
    background: #ffeaa7;
    color: #d35400;
}

.status.em_andamento {
    background: #74b9ff;
    color: #0984e3;
}

.status.concluida {
    background: #55efc4;
    color: #00b894;
}

.status.erro {
    background: #fab1a0;
    color: #d63031;
}

/* ============================================
   MENSAGENS
   ============================================ */

.empty {
    text-align: center;
    color: #7f8c8d;
    padding: 30px;
    font-style: italic;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   RESULTADOS
   ============================================ */

.export-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-export {
    background: #27ae60;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.btn-export:hover {
    background: #219a52;
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
}
