/* Estilos Gerais Modernizados */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(135deg, #ff7e29 0%, #ff5f29 100%);
    padding: 30px 20px;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Container Principal Moderno */
.form-container {
    background-color: white;
    border: none;
    border-radius: 12px;
    padding: 30px;
    margin: 0 auto;
    max-width: 1200px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    width: 95%;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff7b00, #ffaa00, #ff7b00);
}

/* Cabeçalho do Formulário Moderno */
.form-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 18px;
    font-weight: 600;
    color: #ff5500;
    position: relative;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #ff7b00, #ffaa00);
    border-radius: 3px;
}

/* Títulos das Seções Modernos */
.section-title {
    background: linear-gradient(to right, #fff4e6, white);
    padding: 12px 15px;
    margin: 20px 0 15px;
    font-weight: 600;
    border-left: 5px solid #ff7b00;
    border-radius: 0 8px 8px 0;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '▶';
    margin-right: 10px;
    color: #ff7b00;
    font-size: 12px;
}

/* Linhas do Formulário Modernas */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.form-row:hover {
    background-color: rgba(255, 165, 0, 0.03);
    border-radius: 6px;
}

/* Grupos de Campos Modernos */
.form-group {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    margin-bottom: 8px;
    position: relative;
}

/* Labels Modernos */
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: #555;
}

.form-group:focus-within label {
    color: #ff7b00;
}

/* Campos de Entrada Modernos */
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #ffaa00;
    box-shadow: 0 0 0 3px rgba(255, 170, 0, 0.2);
}

/* Campos Obrigatórios Modernos */
.required-field input {
    border: 2px solid #ffaa00;
    background-color: #fffaf0;
}

.required-field label::after {
    content: " *";
    color: #ff5500;
}

/* Texto Informativo Moderno */
.info-text {
    font-style: italic;
    color: #777;
    font-size: 12px;
    margin-top: 5px;
    padding-left: 5px;
    border-left: 2px solid #ffd699;
}

/* Botão de Envio Moderno */
.submit-button {
    background: linear-gradient(to right, #ff7b00, #ff5500);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-top: 30px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 15px rgba(255, 123, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    box-shadow: 0 7px 20px rgba(255, 123, 0, 0.6);
}

.submit-button:active {
    box-shadow: 0 4px 10px rgba(255, 123, 0, 0.4);
}

/* Campos de seleção específicos modernos */
.select-field {
    background-color: #f9f9f9;
    border: 2px solid #e8e8e8;
}

.select-field:focus {
    background-color: white;
}

/* Área de instruções moderna */
.instructions {
    background: linear-gradient(to right, #f0f8ff, #e6f2ff);
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 5px solid #4d9fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Campos com fundo moderno */
.gray-bg {
    background-color: #f8f8f8;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* Campos de coordenadas UTM modernos */
.coordinate-field {
    background-color: #f0f8ff;
    border: 2px dashed #99ccff;
    border-radius: 8px;
}

/* Mensagens de alerta/erro modernas */
.alert-message {
    color: #ff3300;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #fff0f0;
    border-radius: 4px;
    display: inline-block;
}

/* Estilos para as tabelas de Unidades Geradoras modernas */
.ug-section {
    margin: 25px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.ug-section h3 {
    margin-top: 0;
    color: #ff7b00;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
    font-size: 18px;
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ug-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 15px 0;
    font-size: 13px;
    border-radius: 8px;
    overflow: hidden;
}

.ug-table th, .ug-table td {
    border: 1px solid #e0e0e0;
    padding: 12px 10px;
    text-align: center;
}

.ug-table th {
    background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
    font-weight: 600;
    color: #555;
}

.ug-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.ug-table tr:hover {
    background-color: #fff4e6;
}

.ug-table input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.ug-table input:focus {
    border-color: #ffaa00;
    box-shadow: 0 0 0 2px rgba(255, 170, 0, 0.2);
    outline: none;
}

.ug-table tfoot {
    background: linear-gradient(to bottom, #f5f5f5, #e8e8e8);
    font-weight: 600;
}

.ug-table tfoot input {
    background-color: #f0f0f0;
    font-weight: 600;
}

.table-note {
    font-style: italic;
    color: #666;
    font-size: 12px;
    margin: 8px 0;
    padding-left: 10px;
    border-left: 3px solid #ffaa00;
}

/* Container que agrupa os campos compactados modernos */
.compact-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Cada form-group dentro do container moderno */
.compact-fields .form-group {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
}

/* Inputs menores e uniformes modernos */
.compact-fields .form-group input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Header da seção com seta moderno */
.section-header {
    background: linear-gradient(to right, #fff4e6, #ffedd1);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
    user-select: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #ffe0b3;
}

.section-header:hover {
    background: linear-gradient(to right, #ffeccc, #ffe0b3);
}

/* Seta da seção moderna */
#toggleTecnico #setaTecnico {
    font-size: 18px;
    color: #ff7b00;
}

/* Conteúdo da seção moderno */
#conteudoTecnico {
    overflow: hidden;
}

.btn-add-row {
    margin-top: 15px;
    padding: 10px 16px;
    background: linear-gradient(to bottom, #4CAF50, #45a049);
    color: white;
    font-size: 20px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.btn-add-row:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsividade para tabelas */
@media (max-width: 768px) {
    .ug-table {
        font-size: 12px;
    }
    
    .ug-table th, .ug-table td {
        padding: 8px 6px;
    }
    
    .ug-table input {
        padding: 6px;
        font-size: 12px;
    }
    
    .compact-fields {
        gap: 10px;
    }
    
    .compact-fields .form-group {
        flex: 1 1 100%;
    }
}

/* Layout responsivo moderno */
@media (max-width: 768px) {
    body {
        padding: 15px 10px;
    }
    
    .form-container {
        padding: 20px 15px;
        border-radius: 10px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .submit-button {
        width: 100%;
        padding: 12px;
    }
}