/* Archivo: registro.css */

#formulario-registro-empresarial {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
}

.registro-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.registro-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.registro-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 300;
    letter-spacing: -1px;
}

.registro-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    font-weight: 300;
}

#form-registro {
    padding: 40px 30px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.form-control:hover {
    border-color: #2a5298;
}

/* Grupo de teléfono */
.phone-group {
    width: 100%;
}

.phone-input-container {
    display: flex;
    gap: 10px;
}

.prefix-select {
    width: 120px;
    flex-shrink: 0;
}

.phone-input {
    flex: 1;
}

/* Contenedor de contraseña */
.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #2a5298;
}

/* Indicador de fortaleza de contraseña */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak .strength-fill {
    width: 25%;
    background: #e74c3c;
}

.strength-fair .strength-fill {
    width: 50%;
    background: #f39c12;
}

.strength-good .strength-fill {
    width: 75%;
    background: #3498db;
}

.strength-strong .strength-fill {
    width: 100%;
    background: #27ae60;
}

.strength-text {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.password-requirements {
    margin-top: 8px;
}

.password-requirements small {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* Contenedor de archivos - NUEVO ESTILO CON BOTÓN */
.file-upload-container-btn {
    text-align: center;
    margin-top: 10px;
}

.file-preview-box {
    width: 200px;
    height: 150px;
    margin: 0 auto 15px;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfc;
    overflow: hidden;
}

.file-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-placeholder {
    text-align: center;
    color: #999;
    font-size: 14px;
}

.upload-placeholder span {
    font-size: 12px;
}

.upload-file-btn {
    background: #2a5298;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    margin-bottom: 5px;
}

.upload-file-btn:hover {
    background: #1e3c72;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.3);
}

.file-upload-container-btn small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

/* Contenedor de archivos - ESTILO ANTIGUO (por si acaso) */
.file-upload-container {
    margin-top: 5px;
}

.file-upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
    position: relative;
}

.file-upload-area input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
    opacity: 0;
}

.file-upload-area:hover {
    border-color: #2a5298;
    background: #f8f9fa;
}

.file-upload-area.dragover {
    border-color: #2a5298;
    background: #e3f2fd;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.upload-text p {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #2c3e50;
}

.upload-text small {
    color: #666;
    font-size: 12px;
}

.file-preview {
    margin-top: 15px;
    display: none;
}

.file-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-preview .file-info {
    margin-top: 10px;
    padding: 10px;
    background: #e8f5e8;
    border-radius: 6px;
    font-size: 14px;
    color: #27ae60;
}

/* Foto de perfil */
.profile-upload-container {
    text-align: center;
}

.profile-upload-container input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
    opacity: 0;
}

.profile-avatar-container {
    display: inline-block;
    position: relative;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    color: white;
    font-size: 48px;
}

.upload-profile-btn {
    background: #2a5298;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.upload-profile-btn:hover {
    background: #1e3c72;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.3);
}

/* Preferencias */
.preferencias-title {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preferencias-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preferencia-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.preferencia-option:hover {
    border-color: #2a5298;
    background: #f8f9fa;
}

.preferencia-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2a5298;
}

.preferencia-option span {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
}

.preferencia-option input[type="radio"]:checked + span {
    color: #2a5298;
    font-weight: 600;
}

/* Botón de registro - AZUL */
.btn-registro {
    width: 100%;
    min-height: 60px;
    background: #2a5298;
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-registro:hover:not(:disabled) {
    background: #1e3c72;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 82, 152, 0.4);
}

.btn-registro:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-text {
    display: block;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensajes de resultado - MEJORADOS */
.mensaje-resultado {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    display: none;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mensaje-resultado.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
    font-size: 18px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.mensaje-resultado.success::before {
    content: "✓";
    display: block;
    font-size: 48px;
    color: #28a745;
    margin-bottom: 10px;
    animation: checkBounce 0.6s ease;
}

@keyframes checkBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.mensaje-resultado.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tooltip de error en campos */
.field-error-tooltip {
    position: absolute;
    bottom: -30px;
    left: 0;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.field-error-tooltip::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #e74c3c;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    #formulario-registro-empresarial {
        padding: 10px;
    }
    
    .registro-header {
        padding: 30px 20px;
    }
    
    .registro-header h2 {
        font-size: 24px;
    }
    
    #form-registro {
        padding: 30px 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .phone-input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .prefix-select {
        width: 100%;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .avatar-placeholder {
        font-size: 36px;
    }
    
    .file-upload-area {
        padding: 20px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .registro-header h2 {
        font-size: 20px;
    }
    
    .registro-header p {
        font-size: 14px;
    }
    
    .form-control {
        padding: 12px;
        font-size: 16px;
    }
    
    .btn-registro {
        padding: 15px 20px;
        font-size: 16px;
    }
}