/* =========================================
   REGISTRO DE USUARIO - LIBREMENTE
   Diseño Profesional y Moderno
   ========================================= */

/* Body */
.registro-body {
    background: linear-gradient(135deg, #6b4c7f 0%, #5a9e7f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.registro-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

/* =========================================
   BOTÓN FLOTANTE "VOLVER AL INICIO"
   ========================================= */
.btn-volver-inicio {
    position: fixed;
    top: 25px;
    left: 25px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #6b4c7f;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.btn-volver-inicio i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn-volver-inicio .btn-volver-text {
    transition: all 0.3s ease;
}

/* HOVER PROFESIONAL */
.btn-volver-inicio:hover {
    background: white;
    color: #5a3f6f;
    transform: translateX(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(107, 76, 127, 0.2);
}

.btn-volver-inicio:hover i {
    transform: translateX(-4px);
}

/* FOCUS VISIBLE (accesibilidad) */
.btn-volver-inicio:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(107, 76, 127, 0.3), 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ACTIVE (al hacer click) */
.btn-volver-inicio:active {
    transform: translateX(-2px) scale(0.97);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Contenedor Principal - CENTRADO */
.registro-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Card de Registro */
.registro-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px;
    width: 100%;
    max-width: 600px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.registro-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-wrapper {
    margin-bottom: 25px;
}

.registro-logo {
    max-width: 180px;
    height: auto;
}

.registro-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 15px 0;
    letter-spacing: -0.5px;
}

.registro-subtitle {
    font-size: 1.05rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

/* Formulario */
.registro-form {
    margin-top: 30px;
}

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

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-label i {
    color: #6b4c7f;
}

/* =========================================
   FORM CONTROL - SIN ÍCONOS AUTOMÁTICOS DE BOOTSTRAP
   ========================================= */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    /* Desactivar íconos automáticos de Bootstrap */
    background-image: none !important;
    background-repeat: no-repeat;
}

.form-control:focus {
    outline: none;
    border-color: #6b4c7f;
    background: white;
    box-shadow: 0 0 0 4px rgba(107, 76, 127, 0.1);
}

/* Validación visual SOLO con borde (sin íconos de Bootstrap) */
.form-control.is-valid {
    border-color: #198754;
    background-color: white;
    background-image: none !important;
    padding-right: 16px;
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-color: white;
    background-image: none !important;
    padding-right: 16px;
}

.invalid-feedback {
    display: none;
    font-size: 0.85rem;
    color: #dc3545;
    margin-top: 5px;
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Email Status */
.email-status {
    margin-top: 8px;
    font-size: 0.85rem;
}

/* =========================================
   PASSWORD WRAPPER - HOVER MEJORADO
   ========================================= */
.password-wrapper {
    position: relative;
}

/* El input dentro del password wrapper mantiene padding para el botón */
.password-wrapper .form-control {
    padding-right: 60px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 2px solid transparent;
    color: #adb5bd;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
}

.password-toggle i {
    font-size: 1rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* HOVER MEJORADO */
.password-toggle:hover {
    color: #6b4c7f;
    background: rgba(107, 76, 127, 0.08);
    border-color: rgba(107, 76, 127, 0.2);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 2px 8px rgba(107, 76, 127, 0.15);
}

.password-toggle:hover i {
    transform: scale(1.1);
    color: #5a3f6f;
}

/* FOCUS VISIBLE (accesibilidad con teclado) */
.password-toggle:focus-visible {
    outline: none;
    color: #6b4c7f;
    background: rgba(107, 76, 127, 0.1);
    border-color: #6b4c7f;
    box-shadow: 0 0 0 3px rgba(107, 76, 127, 0.2);
}

/* ACTIVE (al hacer click) */
.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
    background: rgba(107, 76, 127, 0.15);
}

/* Password Strength */
.password-strength {
    margin-top: 12px;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
}

/* Password Requirements */
.password-requirements {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement i {
    font-size: 0.7rem;
    color: #adb5bd;
    transition: all 0.3s ease;
}

.requirement.met {
    color: #198754;
}

.requirement.met i {
    color: #198754;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-check-input {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-check-label {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.5;
    cursor: pointer;
}

.terms-link {
    color: #6b4c7f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.terms-link:hover {
    color: #5a3f6f;
    text-decoration: underline;
}

/* =========================================
   INFORMACIÓN DE SEGURIDAD (DENTRO DEL FORM)
   ========================================= */
.registro-info-inline {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(107, 76, 127, 0.05) 0%, rgba(90, 158, 127, 0.05) 100%);
    border: 1px solid rgba(107, 76, 127, 0.15);
    border-left: 4px solid #6b4c7f;
    border-radius: 10px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.registro-info-inline:hover {
    background: linear-gradient(135deg, rgba(107, 76, 127, 0.08) 0%, rgba(90, 158, 127, 0.08) 100%);
    border-left-color: #5a9e7f;
    transform: translateX(3px);
}

.registro-info-inline .info-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6b4c7f 0%, #5a9e7f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(107, 76, 127, 0.25);
}

.registro-info-inline .info-icon i {
    font-size: 1.4rem;
    color: white;
}

.registro-info-inline .info-content {
    flex: 1;
}

.registro-info-inline .info-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 4px 0;
}

.registro-info-inline .info-text {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

/* =========================================
   BOTÓN DE REGISTRO - CON ESTADO DESHABILITADO
   ========================================= */
.btn-registro {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #6b4c7f 0%, #5a9e7f 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 76, 127, 0.3);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.btn-registro:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(107, 76, 127, 0.4);
}

.btn-registro:active:not(:disabled) {
    transform: translateY(0);
}

/* ESTADO DESHABILITADO */
.btn-registro:disabled,
.btn-registro.btn-disabled {
    background: linear-gradient(135deg, #c4b5cf 0%, #b5d4c7 100%);
    color: rgba(255, 255, 255, 0.75);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
    transform: none;
}

.btn-registro:disabled:hover,
.btn-registro.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Tooltip visual cuando está deshabilitado */
.btn-registro.btn-disabled::after {
    content: 'Acepta los términos para continuar';
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.btn-registro.btn-disabled:hover::after {
    opacity: 1;
}

/* Footer */
.registro-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.registro-text {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
}

.registro-link {
    color: #6b4c7f;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

.registro-link:hover {
    color: #5a3f6f;
    text-decoration: underline;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .registro-card {
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .registro-body {
        padding: 15px;
        padding-top: 80px; /* Espacio para el botón flotante */
    }
    
    /* Botón volver: compacto en móvil */
    .btn-volver-inicio {
        top: 15px;
        left: 15px;
        padding: 10px 16px;
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .btn-volver-inicio:hover {
        transform: translateX(-3px);
    }
    
    .registro-card {
        padding: 35px 25px;
    }
    
    .registro-title {
        font-size: 1.8rem;
    }
    
    .registro-subtitle {
        font-size: 0.95rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* Info inline en móvil: apilar */
    .registro-info-inline {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px;
    }
    
    .registro-info-inline:hover {
        transform: none;
    }
    
    /* Tooltip deshabilitado en móvil */
    .btn-registro.btn-disabled::after {
        display: none;
    }
}

@media (max-width: 576px) {
    .registro-card {
        padding: 30px 20px;
    }
    
    .registro-title {
        font-size: 1.6rem;
    }
    
    .registro-logo {
        max-width: 150px;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    
    .password-wrapper .form-control {
        padding-right: 50px;
    }
    
    .password-toggle {
        padding: 6px 8px;
        min-width: 34px;
        min-height: 34px;
    }
    
    .password-toggle i {
        font-size: 0.9rem;
    }
    
    .btn-registro {
        padding: 13px;
        font-size: 1rem;
    }
    
    .registro-info-inline .info-icon {
        width: 45px;
        height: 45px;
    }
    
    .registro-info-inline .info-icon i {
        font-size: 1.2rem;
    }
    
    .registro-info-inline .info-title {
        font-size: 0.95rem;
    }
    
    .registro-info-inline .info-text {
        font-size: 0.85rem;
    }
    
    /* Botón volver: solo icono en pantallas muy pequeñas */
    .btn-volver-inicio {
        padding: 12px;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        justify-content: center;
    }
    
    .btn-volver-inicio .btn-volver-text {
        display: none;
    }
    
    .btn-volver-inicio i {
        font-size: 1.1rem;
    }
}