:root {
    --primary-color: #3b28cc;
    --primary-hover: #2e1ca1;
    --text-main: #2d3748;
    --text-muted: #718096;
    --input-bg: #f7fafc;
    --input-border: #e2e8f0;
    --input-focus-border: #a3bffa;
    --input-focus-shadow: rgba(66, 153, 225, 0.2);
    --bg-right: #ffffff;
}
html.dark-mode {
    --primary-color: #3b28cc;
    --primary-hover: #4c3ce0;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --input-bg: #1e1e24;
    --input-border: #2d2d38;
    --input-focus-border: #3b28cc;
    --input-focus-shadow: rgba(59, 40, 204, 0.25);
    --bg-right: #121214;
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-right);
    color: var(--text-main);
}
h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Poppins', sans-serif;
}
.split-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}
.split-left {
    flex: 1.3;
    position: relative;
    background: linear-gradient(135deg, rgba(59, 40, 204, 0.77) 0%, rgba(17, 10, 73, 0.95) 100%), url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=2071&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    color: #ffffff;
    overflow: hidden;
}
html.dark-mode .split-left {
    background: linear-gradient(135deg, rgba(18, 18, 20, 0.88) 0%, rgba(10, 10, 12, 0.98) 100%), url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=2071&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
}
.shape-blob {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}
.shape-1 { width: 400px; height: 400px; top: -100px; left: -100px; animation: floatBlob 14s infinite alternate ease-in-out; }
.shape-2 { width: 300px; height: 300px; bottom: -50px; right: -50px; animation: floatBlob 10s infinite alternate-reverse ease-in-out; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #10b981;
    backdrop-filter: blur(8px);
}
.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse-green 2s infinite;
}

.features-grid {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.feature-card {
    flex: 1;
    min-width: 130px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}
.feature-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #ffffff;
    flex-shrink: 0;
}
.feature-info {
    display: flex;
    flex-direction: column;
}
.feature-title {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
}
.feature-desc {
    font-size: 0.7rem;
    opacity: 0.75;
}

.split-left .content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 600px;
    animation: fadeSlideUp 0.8s ease-out;
}
.brand-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(5px);
}
.split-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-right);
    padding: 2rem;
    position: relative;
    z-index: 5;
}
.form-container {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.6s ease-out 0.2s both;
}
.form-control {
    border-radius: 12px;
    padding: 1rem 1.2rem;
    font-size: 0.95rem;
    border: 2px solid var(--input-border);
    background-color: var(--input-bg) !important;
    color: var(--text-main) !important;
    transition: all 0.3s ease;
    box-shadow: none !important;
}
.form-control:focus {
    background-color: var(--bg-right) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-main) !important;
    box-shadow: 0 0 0 4px var(--input-focus-shadow) !important;
}

/* Reglas de autocompletado en Modo Claro */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-text-fill-color: #2d3748 !important;
    -webkit-box-shadow: 0 0 0px 1000px #f7fafc inset !important;
    transition: background-color 5000s ease-in-out 0s;
}
.input-icon-group {
    position: relative;
}
.input-icon-group .input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    color: var(--text-muted);
    font-size: 1.05rem;
    transition: color 0.3s ease;
    pointer-events: none;
}
.input-icon-group .form-control {
    padding-left: 3.1rem !important;
}
.input-icon-group .form-floating > label,
.input-icon-group > label {
    padding-left: 3.1rem !important;
}
.input-icon-group:focus-within .input-icon {
    color: var(--primary-color);
}
.form-floating > label {
    padding: 1rem 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    font-weight: 600;
    transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
}
.btn-login {
    position: relative;
    padding: 0.9rem;
    border-radius: 12px;
    background-color: var(--primary-color);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 15px rgba(59, 40, 204, 0.3);
    margin-top: 1rem;
    overflow: hidden;
}
.btn-login::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: rotate(30deg) translateX(-100%);
    transition: transform 0.8s ease;
}
.btn-login:hover::after {
    transform: rotate(30deg) translateX(100%);
}
.btn-login:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 25px rgba(59, 40, 204, 0.45);
}
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.text-muted {
    color: var(--text-muted) !important;
}
a.text-decoration-none {
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.2s ease;
}
a.text-decoration-none:hover {
    color: var(--primary-hover);
    text-decoration: underline !important;
}
.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a0aec0;
    z-index: 10;
    transition: color 0.2s ease;
}
.password-toggle-icon:hover { color: var(--primary-color); }

#theme-toggle {
    transition: transform 0.3s ease;
}
#theme-toggle:hover {
    transform: scale(1.18);
}
.rotate-spin {
    display: inline-block;
    animation: spin 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html.dark-mode .modal-content { background-color: #1e1e24 !important; color: var(--text-main); }
html.dark-mode .modal-header, html.dark-mode .modal-footer { border-color: #2d2d38 !important; }
html.dark-mode .btn-light { background-color: #2d2d38; color: #e2e8f0; border-color: #2d2d38; }
html.dark-mode .btn-light:hover { background-color: #121214; color: #fff; }
html.dark-mode .bg-light { background-color: #1e1e24 !important; }
html.dark-mode .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

html.dark-mode .form-control {
    background-color: var(--input-bg) !important;
    color: #f1f5f9 !important;
    border-color: var(--input-border) !important;
}

html.dark-mode .form-control:focus {
    background-color: var(--bg-right) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
}

/* Reglas de autocompletado en Modo Oscuro */
html.dark-mode input:-webkit-autofill,
html.dark-mode input:-webkit-autofill:hover, 
html.dark-mode input:-webkit-autofill:focus, 
html.dark-mode input:-webkit-autofill:active {
    -webkit-text-fill-color: #f1f5f9 !important;
    -webkit-box-shadow: 0 0 0px 1000px #1e1e24 inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}
@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes floatBlob {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(10px) rotate(-5deg); }
}
@media (max-width: 991.98px) {
    .split-layout { 
        flex-direction: column-reverse; 
        min-height: 100vh; 
    }
    .split-right { 
        flex: none; 
        align-items: center; 
        padding: 3rem 1.5rem 2.5rem 1.5rem; 
        width: 100%;
    }
    .split-left { 
        flex: none; 
        padding: 2.5rem 1.5rem; 
        text-align: center; 
        border-top-left-radius: 1.5rem; 
        border-top-right-radius: 1.5rem; 
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.2); 
    }
    .shape-1, .shape-2 { display: none; }
    .split-left .content-wrapper { margin: 0 auto; }
    .split-left h1 { font-size: 1.8rem !important; }
    .split-left .lead { font-size: 0.95rem; }
    .features-grid { justify-content: center; }
}

/* ==========================================================================
   ESTILOS ELEGANTES - MODAL DE RESTABLECER CONTRASEÑA
   ========================================================================== */

#resetPasswordModal {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.custom-modal-content {
    background: #ffffff;
    border-radius: 24px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 0 40px rgba(59, 40, 204, 0.1) !important;
    overflow: hidden;
    transition: all 0.3s ease;
}

html.dark-mode .custom-modal-content {
    background: #18181f !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 45px rgba(99, 102, 241, 0.15) !important;
    color: #f1f5f9;
}

.modal-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 8px 20px rgba(59, 40, 204, 0.35);
    flex-shrink: 0;
}

.custom-btn-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05);
    opacity: 0.7;
    transition: all 0.25s ease;
    padding: 0;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-btn-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg) scale(1.08);
}

html.dark-mode .custom-btn-close {
    background-color: rgba(255, 255, 255, 0.1);
    filter: invert(1) grayscale(100%) brightness(200%);
}

html.dark-mode .custom-btn-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.recovery-info-card {
    background: rgba(59, 40, 204, 0.06);
    border: 1px solid rgba(59, 40, 204, 0.15);
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.45;
}

html.dark-mode .recovery-info-card {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.22);
    color: #cbd5e1;
}

.recovery-info-card .info-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}

html.dark-mode .recovery-info-card .info-icon {
    color: #818cf8;
}

.custom-modal-content .form-control {
    border-radius: 14px;
    border: 1.5px solid var(--input-border);
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.custom-modal-content .form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px var(--input-focus-shadow) !important;
}

.captcha-box {
    height: 58px;
    min-width: 135px;
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid var(--input-border);
    cursor: pointer;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.captcha-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.captcha-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.captcha-refresh-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    backdrop-filter: blur(2px);
    transition: opacity 0.2s ease;
}

.captcha-box:hover .captcha-refresh-overlay {
    opacity: 1;
}

html.dark-mode .captcha-box {
    background: #1e1e24;
    border-color: var(--input-border);
}

.btn-cancel-custom {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-main);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-cancel-custom:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

html.dark-mode .btn-cancel-custom {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

html.dark-mode .btn-cancel-custom:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.btn-email-custom {
    background: linear-gradient(135deg, #3b28cc 0%, #4f46e5 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    padding: 0.7rem 1.25rem;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 4px 14px rgba(59, 40, 204, 0.3);
    transition: all 0.25s ease;
}

.btn-email-custom:hover {
    background: linear-gradient(135deg, #2e1ca1 0%, #4338ca 100%);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 40, 204, 0.45);
}

.btn-wsp-custom {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.25s ease;
}

.btn-wsp-custom:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.45);
}

/* WhatsApp PIN Step */
.wsp-badge-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.25) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #10b981;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}

.custom-pin-input {
    letter-spacing: 0.6rem;
    font-size: 1.6rem !important;
    font-weight: 700;
    max-width: 260px;
    border-radius: 16px !important;
    color: var(--primary-color) !important;
    background: var(--input-bg) !important;
    border: 2px solid var(--input-border) !important;
}

.custom-pin-input:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25) !important;
}

.timer-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 20px;
    color: #ef4444;
    font-size: 0.82rem;
    font-weight: 600;
}

html.dark-mode .timer-badge {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4f46e5 100%);
    color: #fff !important;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(59, 40, 204, 0.3);
    transition: all 0.25s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #4338ca 100%);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(59, 40, 204, 0.45);
}

.btn-outline-wsp {
    border: 1.5px solid #10b981;
    color: #10b981 !important;
    background: transparent;
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-outline-wsp:hover {
    background: #10b981;
    color: #ffffff !important;
}

