/* LOGIN PAGE STYLES - Estilos específicos para la página de login */

/* ===== LOGIN PAGE LAYOUT ===== */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== SECURITY WARNING ===== */
.security-warning {
    position: fixed;
    top: -60px;
    left: 20px;
    right: 20px;
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #fca5a5;
    z-index: 9999;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: top 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.security-warning.show {
    top: 20px;
}

.security-warning i {
    margin-right: 8px;
}

.with-warning {
    padding-top: 80px;
}

/* ===== LOGIN NAVBAR ===== */
.login-navbar {
    position: relative;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.login-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.brand-minimal {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.brand-minimal .brand-icon {
    font-size: 24px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: white;
}

.back-link i {
    font-size: 12px;
}

/* ===== LOGIN MAIN ===== */
.login-main {
    position: relative;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url("img/Fondo.jpeg");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.3;
}

.login-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}

.login-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    max-width: 1000px;
    width: 100%;
    align-items: start;
}

/* ===== LOGIN CARD ===== */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card.loaded {
    opacity: 1;
    transform: translateY(0);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.login-subtitle {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* ===== LOGIN FORM ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-label i {
    color: #667eea;
    width: 16px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #1f2937;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -8px 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.forgot-link {
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #5a67d8;
}

/* ===== LOGIN BUTTON ===== */
.login-btn {
    position: relative;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.login-btn:hover:not(:disabled)::before {
    left: 100%;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
}

.login-btn:disabled::before {
    display: none;
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loader {
    opacity: 1;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mini-wave {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: wave 1.2s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.mini-wave:nth-child(1) { animation-delay: 0s; }
.mini-wave:nth-child(2) { animation-delay: 0.15s; }
.mini-wave:nth-child(3) { animation-delay: 0.3s; }

@keyframes wave {
    0%, 60%, 100% {
        transform: scale(0.7);
        opacity: 0.4;
    }
    30% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* ===== LOGIN MESSAGES ===== */
.login-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.login-message.show {
    opacity: 1;
    transform: translateY(0);
}

.login-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.login-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.login-message.info {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ===== LOGIN FOOTER ===== */
.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.register-prompt {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.register-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: #5a67d8;
}

/* ===== LOGIN BENEFITS ===== */
.login-benefits {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-benefits h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    text-align: center;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.benefit-item i {
    color: #fbbf24;
    font-size: 16px;
    width: 20px;
    flex-shrink: 0;
}

/* ===== REGISTER MODAL ===== */
.register-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.register-modal.show {
    display: flex;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: min(500px, 90%);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.register-modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    color: #1f2937;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h2 i {
    color: #667eea;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

.register-form {
    padding: 24px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.register-btn,
#forgotPasswordBtn {
    position: relative;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2);
}

.register-btn::before,
#forgotPasswordBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.register-btn:hover:not(:disabled)::before,
#forgotPasswordBtn:hover:not(:disabled)::before {
    left: 100%;
}

.register-btn:hover:not(:disabled),
#forgotPasswordBtn:hover:not(:disabled) {
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.5);
    transform: translateY(-3px);
}

.register-btn:active:not(:disabled),
#forgotPasswordBtn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(14, 165, 233, 0.4);
}

.register-btn:disabled,
#forgotPasswordBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2) !important;
}

.register-btn:disabled::before,
#forgotPasswordBtn:disabled::before {
    display: none;
}

.register-btn::after,
#forgotPasswordBtn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

.register-btn:active:not(:disabled)::after,
#forgotPasswordBtn:active:not(:disabled)::after {
    animation: ripple 0.6s ease-out;
}

.register-btn.loading .btn-text,
#forgotPasswordBtn.loading .btn-text {
    opacity: 0;
}

.register-btn.loading .btn-loader,
#forgotPasswordBtn.loading .btn-loader {
    opacity: 1;
}

.register-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease;
}

.register-message i {
    font-size: 16px;
    flex-shrink: 0;
}

.register-message.show {
    display: flex;
}

.register-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.register-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #86efac;
}

.register-message.warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fcd34d;
}

/* Modal body y footer adicionales */
.modal-body {
    padding: 24px 32px;
}

.modal-description {
    background: #f0f9ff;
    color: #0369a1;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-left: 3px solid #0ea5e9;
}

.modal-description i {
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.modal-footer {
    padding: 16px 32px 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.back-to-login {
    margin: 0;
}

.back-to-login a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.back-to-login a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.back-to-login i {
    font-size: 12px;
}
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.register-message.show {
    opacity: 1;
    transform: translateY(0);
}

.register-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.register-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ===== EFECTO RIPPLE PARA BOTONES ===== */
@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.login-btn::after,
.register-btn::after,
#forgotPasswordBtn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

.login-btn:active:not(:disabled)::after,
.register-btn:active:not(:disabled)::after,
#forgotPasswordBtn:active:not(:disabled)::after {
    animation: ripple 0.6s ease-out;
}

/* ===== FOCUS VISIBLE ===== */
.login-btn:focus-visible,
.register-btn:focus-visible,
#forgotPasswordBtn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.3), 0 12px 40px rgba(14, 165, 233, 0.5);
}

/* ===== BOTÓN CON EFECTO DE BRILLO CONTINUO ===== */
#forgotPasswordBtn {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #0ea5e9 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

#forgotPasswordBtn:hover:not(:disabled) {
    animation: shimmer 1.5s ease-in-out infinite;
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

.login-btn:focus-visible {
    outline: none;
    animation: pulse 2s infinite;
}

.register-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }
    
    .login-card {
        padding: 24px;
    }
    
    .login-benefits {
        order: -1;
    }
    
    .login-navbar .container {
        padding: 12px 16px;
    }
    
    .brand-minimal {
        font-size: 16px;
    }
    
    .back-link {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .login-main {
        padding: 16px;
    }
    
    .login-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .modal-content {
        border-radius: 12px;
        margin: 20px;
    }
    
    .modal-header,
    .register-form {
        padding: 20px;
    }
}

/* ===== ANIMATION DELAYS ===== */
.login-card {
    animation: fadeInUp 0.6s ease-out;
}

.login-benefits {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

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