/* ========================================
   LOGIN PAGE
   ======================================== */

.login-container {
    min-height: 100vh;
    display: flex;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5f7f 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

/* Burbujas decorativas animadas */
.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    bottom: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.bubble:nth-child(2) {
    width: 120px;
    height: 120px;
    right: 15%;
    top: 20%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.bubble:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 20%;
    top: 15%;
    animation-delay: 4s;
    animation-duration: 15s;
}

.bubble:nth-child(4) {
    width: 100px;
    height: 100px;
    right: 10%;
    bottom: 15%;
    animation-delay: 1s;
    animation-duration: 20s;
}

.bubble:nth-child(5) {
    width: 70px;
    height: 70px;
    left: 50%;
    bottom: 30%;
    animation-delay: 3s;
    animation-duration: 16s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-30px) translateX(20px) scale(1.1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-60px) translateX(-15px) scale(0.9);
        opacity: 0.5;
    }
    75% {
        transform: translateY(-30px) translateX(15px) scale(1.05);
        opacity: 0.7;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.login-branding {
    position: relative;
    z-index: 1;
    text-align: center;
}

.login-branding i {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.login-branding h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.login-branding p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 400px;
}

.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: var(--light-bg);
}

.login-form-container {
    width: 100%;
    max-width: 450px;
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.login-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-form-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.login-form-header p {
    color: #666;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.password-toggle-container {
    position: relative;
}

.password-toggle-container input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.login-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1rem;
    position: relative;
}

.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.login-btn.loading .spinner {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    color: #666;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Responsive Login */
@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        min-height: 40vh;
        padding: 2rem;
    }
    
    .login-branding i {
        font-size: 3rem;
    }
    
    .login-branding h1 {
        font-size: 2rem;
    }
    
    .login-form-container {
        padding: 2rem;
    }
}

/* ========================================
   RECUPERACIÓN DE CONTRASEÑA
   ======================================== */

/* Ocultar elementos */
.hidden {
    display: none !important;
}

/* Icono del header */
.header-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: block;
}

.header-icon.warning-icon {
    color: #f39c12;
}

/* Mensaje de éxito */
.success-message {
    display: none;
    padding: 1rem;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
    margin-top: 1rem;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.5;
}

.success-message:not(.hidden) {
    display: flex;
}

.success-message i {
    flex-shrink: 0;
}

/* Indicador de fortaleza de contraseña */
.password-strength {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.strength-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}

/* Coincidencia de contraseñas */
.password-match {
    color: #27ae60;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-match i {
    font-size: 0.9rem;
}

/* Requisitos de contraseña */
.password-requirements {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.password-requirements p {
    margin: 0 0 0.75rem 0;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.password-requirements li {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.password-requirements li i {
    font-size: 0.6rem;
    color: #ccc;
    transition: color 0.3s ease;
}

.password-requirements li.met {
    color: #27ae60;
}

.password-requirements li.met i {
    color: #27ae60;
    font-size: 0.85rem;
}

/* Transición suave entre formularios */
.login-form-container {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.login-form-container.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    position: absolute;
}

/* Botón secundario */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
}

/* Responsive para requisitos */
@media (max-width: 500px) {
    .password-requirements ul {
        grid-template-columns: 1fr;
    }
}
