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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Menu */
.menu {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.menu h1 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.menu ul {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.menu a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    border-radius: 8px;
    transition: all 0.3s;
}

.menu a:hover, .menu a.active {
    background: #667eea;
    color: white;
}

/* Cards */
.form-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-card h3 {
    color: #667eea;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

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

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

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Botões */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-danger {
    background: #fc8181;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Upload */
.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #667eea;
    background: #f7fafc;
}

.upload-content .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.upload-content p {
    color: #4a5568;
    margin-bottom: 5px;
}

.upload-content small {
    color: #a0aec0;
}

.arquivo-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fff4;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #48bb78;
}

.hidden {
    display: none !important;
}

/* Lista de empresas */
.search-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
}

#totalEmpresas {
    color: #666;
    font-size: 14px;
}

.lista-empresas, .lista-selecao {
    display: grid;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.empresa-card, .empresa-item {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.empresa-card:hover {
    border-color: #667eea;
    transform: translateX(5px);
}

.empresa-info h4 {
    color: #2d3748;
    margin-bottom: 5px;
}

.empresa-info small {
    color: #718096;
}

.empresa-acoes {
    display: flex;
    gap: 10px;
}

/* Seleção de empresas */
.empresa-item {
    cursor: pointer;
}

.empresa-item:hover {
    background: #edf2f7;
}

.empresa-item.selecionada {
    background: #e6fffa;
    border-color: #38b2ac;
}

.checkbox {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
    color: #a0aec0;
}

.empresa-item.selecionada .checkbox {
    color: #38b2ac;
}

.empresa-item .info {
    flex: 1;
}

.empresa-item .info strong {
    display: block;
    color: #2d3748;
    margin-bottom: 3px;
}

.empresa-item .info small {
    color: #718096;
}

.acoes-massa {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

#contadorSelecionadas {
    margin-left: auto;
    font-weight: bold;
    color: #667eea;
}

#contadorSelecionadas.limite {
    color: #e53e3e;
}

.botoes-acao {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Progresso */
.progresso-container {
    margin: 30px 0;
}

.progresso-barra {
    height: 30px;
    background: #e2e8f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progresso-preenchido {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.progresso-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-weight: 600;
    color: #4a5568;
}

.log-envio {
    max-height: 300px;
    overflow-y: auto;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 14px;
}

.log-envio .sucesso {
    color: #38a169;
}

.log-envio .erro {
    color: #e53e3e;
}

#acaoFinal {
    text-align: center;
    margin-top: 20px;
}

/* Responsivo */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .menu ul {
        flex-direction: column;
    }
    
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
}