/* ================================================= */
/*          FICHEIRO DE ESTILOS FINAL              */
/* ================================================= */

/* --- Estilos Gerais --- */
body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-family: 'Inter', sans-serif;
    color: #374151; /* Cor de texto base */
}
.container {
    max-width: 1100px;
    margin: auto;
    padding: 1rem;
}
@media (min-width: 768px) { .container { padding: 2rem; } }

/* --- Estrutura de Cartão --- */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* --- Cabeçalho (Card 1) --- */
.header-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    margin-bottom: 1.5rem; 
}
.header-title h1 { 
    font-size: 2rem; 
    font-weight: 700; 
    color: #1f2937; 
}
.header-title p { 
    font-size: 1rem; 
    color: #6b7280; 
}

/* --- SELETOR DE IDIOMA COM BANDEIRAS --- */
.lang-selector { 
    display: flex; 
    gap: 8px; 
    align-items: center;
    flex-wrap: wrap; /* Para mobile */
}

.lang-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    padding: 6px 12px; 
    border: 2px solid #e0e0e0;
    border-radius: 8px; 
    background: white;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.lang-btn:hover {
    border-color: #CC3399;
    background: #fef5fb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(204, 51, 153, 0.15);
}

.lang-btn.active {
    border-color: #CC3399;
    background: linear-gradient(135deg, #CC3399 0%, #9933CC 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(204, 51, 153, 0.3);
}

.flag-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 15px;
    flex-shrink: 0; /* Evita que a bandeira encolha */
}

.flag-container svg {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: block; /* Remove espaçamento extra */
}

.lang-code {
    font-size: 12px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Responsive para mobile */
@media (max-width: 640px) {
    .lang-selector {
        gap: 6px;
    }
    
    .lang-btn {
        padding: 5px 10px;
        gap: 4px;
    }
    
    .lang-code {
        font-size: 11px;
    }
}

/* --- FIM DO SELETOR DE IDIOMA --- */

.progress-bar { 
    height: 6px; 
    background: #e2e8f0;
    border-radius: 3px; 
    overflow: hidden; 
    margin-bottom: 1.5rem; 
}
.progress-fill { 
    height: 100%; 
    background: #CC3399; 
    width: 0%; 
    border-radius: 3px; 
    transition: width 0.4s ease; 
}

.btn-secondary { 
    display: inline-flex; 
    align-items: center; 
    gap: 0.5rem; 
    padding: 0.6rem 1.2rem; 
    background: transparent; 
    border: 1.5px solid #CC3399; 
    color: #CC3399; 
    font-weight: 600; 
    border-radius: 12px; 
    cursor: pointer;
}
.btn-secondary:hover { 
    background-color: #fdf2f8;
}

/* --- Títulos de Secção dos Formulários --- */
.section-title { 
    font-size: 1.125rem; 
    font-weight: 600; 
    color: #1f2937; 
    padding-bottom: 0.75rem; 
    border-bottom: 2px solid #CC3399;
    margin-bottom: 1.5rem; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
}

/* --- Formulários (Geral) --- */
.form-group { 
    margin-bottom: 1rem; 
}
.form-label { 
    display: block; 
    font-weight: 500; 
    margin-bottom: 0.5rem; 
}
.form-input, .form-select { 
    width: 100%; 
    padding: 0.75rem; 
    border: 1px solid #d1d5db; 
    border-radius: 8px; 
    background-color: #f9fafb; 
}
.form-input:focus, .form-select:focus { 
    outline: none; 
    border-color: #CC3399; 
    background-color: white; 
}
.hidden { 
    display: none; 
}
.error-text { 
    color: #e53e3e; 
    font-size: 0.8rem; 
    margin-top: 0.25rem; 
    min-height: 1rem; 
}

/* Estrutura de Grelha para Cliente e Colunas para Detalhes */
.form-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 1.5rem; 
}
.form-columns { 
    display: flex; 
    flex-direction: column; 
}
@media (min-width: 768px) {
    .form-columns { 
        flex-direction: row; gap: 2rem; }
    .form-col { flex: 1; }
}

/* --- Upload de Logo (Card 4) --- */
.upload-zone { 
    border: 2px dashed #d1d5db; 
    border-radius: 12px; 
    padding: 2rem; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    background-color: #f9fafb;
}
.upload-zone:hover { 
    border-color: #CC3399; 
    background-color: #fef9fc; 
}
.upload-zone svg { 
    margin: 0 auto 0.75rem; 
    color: #CC3399; 
}
.upload-text-primary { 
    font-weight: 600; 
    color: #374151;
}
.upload-text-secondary { 
    font-size: 0.875rem; 
    color: #6b7280; 
    margin-top: 0.25rem; 
}
.file-name-display { 
    font-weight: 500; 
    color: #CC3399; 
    margin-top: 1rem; 
}

/* --- Botão Primário (Download) --- */
.btn-primary { 
    display: inline-flex; 
    align-items: center;
    justify-content: center; 
    gap: 0.5rem; 
    padding: 0.75rem 2rem; 
    background-color: #CC3399; 
    color: white; 
    font-weight: 600; 
    border: none; 
    border-radius: 12px; 
    cursor: pointer; 
}
.btn-primary:hover { 
    background-color: #b32d85; 
}

/* --- Notificações de Alerta --- */
.notification { 
    padding: 1rem; 
    margin-bottom: 1.5rem; 
    border-radius: 10px; 
    border-left-width: 4px; 
    font-weight: 500; 
}
.notification.success { 
    background-color: #f0fdf4; 
    border-color: #22c55e; 
    color: #15803d; 
}
.notification.error {
     background-color: #fef2f2; 
     border-color: #ef4444; 
     color: #b91c1c; 
}