/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body.guest-body {
    font-family: 'Poppins', sans-serif;
    background: #eef2ff;
    min-height: 100vh;
}

/* ── LOGIN WRAPPER ── */
.login-wrapper {
    display: flex;
    min-height: calc(100vh - 88px);
    margin: 0 2rem 1.5rem 2rem;
    width: calc(100% - 4rem);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

/* ── PANEL IZQUIERDO ── */
.login-left {
    flex: 1.8;
    background: #dbeafe;
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
}
.login-left-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.login-brand { font-size: 1rem; font-weight: 800; color: #2563eb; margin-bottom: 1.5rem; }
.login-hero {
    font-size: 2.8rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    margin-bottom: 2rem;
}
.login-footer-text { font-size: 0.78rem; color: #94a3b8; margin-top: auto; padding-top: 1rem; }
.login-footer-text a { color: #64748b; text-decoration: none; margin: 0 0.5rem; }
.login-footer-text a:hover { text-decoration: underline; }

/* ── ZONA GRÁFICA ── */
.deco-zone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1rem 1.5rem 1rem;
}
.deco-chart { width: 100%; max-width: 1000px; }
.container-card-charts {
    position: relative;
    width: 100%;
    max-width: 750px;
    height: 500px;
    background: linear-gradient(to bottom, #e0eaff, #c7d9ff);
    border-radius: 28px;
    padding: 2px;
    box-shadow: 0 8px 40px rgba(37,99,235,0.15);
}
.container-card-charts::before {
    position: absolute;
    content: "";
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 60px;
    background-color: #93c5fd;
    z-index: -10;
    filter: blur(50px);
}
.card-charts {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.tags-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid #f1f5f9;
}
.tags-card .radio {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    border-radius: 12px;
    color: #94a3b8;
    font-family: 'Poppins', sans-serif;
    font-size: 8px;
    font-weight: 600;
    cursor: pointer;
}
.tags-card .radio:hover { color: #2563eb; }
.tags-card .radio input { display: none; }
.tags-card .radio .name {
    width: 100%;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}
.tags-card .radio input:checked + .name {
    color: #2563eb;
    background: #dbeafe;
    font-weight: 700;
}
.main-texts { display: flex; flex-direction: column; padding: 10px 24px 6px; }
.main-texts .title { font-size: 0.9rem; font-weight: 600; color: #475569; margin-bottom: 2px; }
.main-texts .change { font-size: 1.1rem; font-weight: 800; color: #16a34a; }
.charts-lines { position: relative; width: 100%; flex: 1; min-height: 180px; }
.charts-lines i { position: absolute; inset: 0; display: flex; width: 100%; height: 100%; }
.charts-lines i svg { width: 100%; height: 100%; }
.lines { position: absolute; inset: 0; display: flex; justify-content: space-between; }
.lines span {
    width: 1px;
    height: 100%;
    margin: 0 18px;
    background: linear-gradient(to top, rgba(37,99,235,0) 0%, rgba(37,99,235,0.06) 50%, rgba(37,99,235,0) 100%);
}
.charts-lines path { opacity: 0; }
.card-charts svg { transition: transform 0.5s ease; }
.card-charts:hover svg { transform: scale(1.05); }
.icon-week path { animation: draw 8s ease infinite; }
.icon-month path { animation: draw 8s 3s ease infinite; }
@keyframes draw {
    0%   { stroke-dashoffset: 1500; opacity: 0.9; }
    50%  { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: -1500; opacity: 0.9; }
}

/* ── PANEL DERECHO ── */
.login-right {
    flex: 0.6;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 3rem;
}
.login-form-wrap { width: 100%; max-width: 400px; }
.login-title { font-size: 1.6rem; font-weight: 800; color: #0f172a; margin-bottom: 0.3rem; }
.login-subtitle { font-size: 0.95rem; color: #64748b; margin-bottom: 2rem; }
.login-label { font-size: 0.85rem; font-weight: 600; color: #0f172a; display: block; margin-bottom: 0.5rem; }
.login-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.login-input:focus { border-color: #2563eb; }
.login-input::placeholder { color: #94a3b8; }
.login-input-wrap { position: relative; }
.login-input-wrap .login-input { padding-right: 3rem; }
.login-eye {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.1rem;
    padding: 0;
}
.login-eye:hover { color: #64748b; }
.login-forgot { font-size: 0.82rem; font-weight: 600; color: #2563eb; text-decoration: none; }
.login-forgot:hover { text-decoration: underline; }
.login-submit-btn {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 0.95rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}
.login-submit-btn:hover { background: #1d4ed8; }
.login-register-link {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 1.75rem;
    margin-bottom: 0;
}
.login-register-link a { color: #2563eb; font-weight: 700; text-decoration: none; }
.login-register-link a:hover { text-decoration: underline; }

.login-forgot {
    display: block;
    margin-top: 0.5rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 767px) {
    .login-wrapper { flex-direction: column; margin: 0.5rem; border-radius: 16px; }
    .login-left { display: none; }
    .login-right { padding: 2rem 1.5rem; }
    .login-title { font-size: 1.6rem; }

    
}


/* ── RESPONSIVE ── */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .login-wrapper {
        margin: 0 1rem 1rem 1rem;
        width: calc(100% - 2rem);
    }
    .login-left {
        flex: 1.2;
        padding: 2rem 2rem;
    }
    .login-hero {
        font-size: 2rem;
    }
    .login-right {
        flex: 0.8;
        padding: 2rem 2rem;
    }
    .container-card-charts {
        height: 220px;
    }
}

/* Móvil (hasta 767px) */
@media (max-width: 767px) {
    .login-wrapper {
        flex-direction: column;
        margin: 0.5rem;
        width: calc(100% - 1rem);
        border-radius: 16px;
        min-height: calc(100vh - 80px);
    }
    .login-left {
        display: none;
    }
    .login-right {
        flex: 1;
        padding: 2.5rem 1.5rem;
        min-height: calc(100vh - 80px);
    }
    .login-form-wrap {
        max-width: 100%;
    }
    .login-title {
        font-size: 1.8rem;
    }
    .login-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    .login-input {
        padding: 0.85rem 1rem;
        font-size: 1rem;
    }
    .login-submit-btn {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* ── MÓVIL FIX ESPACIADO ── */
@media (max-width: 767px) {
    .login-wrapper {
        margin-top: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .login-right {
        align-items: flex-start;
        padding-top: 3rem;
    }
}

/* ── MÓVIL FIX v2 ── */
@media (max-width: 767px) {
    .login-wrapper {
        min-height: auto !important;
    }
    .login-right {
        min-height: auto !important;
        padding: 2rem 1.5rem !important;
        align-items: center !important;
    }
}

/* ── MÓVIL FIX v3 ── */
@media (max-width: 767px) {
    body.guest-body {
        min-height: auto;
        background: #fff;
    }
}

/* ── FIX: ícono nativo de "mostrar contraseña" duplicado por navegador ── */
#passwordInput::-ms-reveal,
#passwordInput::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

/* Chrome agrega su propio botón cuando detecta que es un campo de password
   guardado (autofill / strong-password suggestion) */
#passwordInput::-webkit-credentials-auto-fill-button,
#passwordInput::-webkit-strong-password-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
}

#passwordInput::-moz-reveal {
    display: none;
}

.login-input-wrap {
    position: relative;
}
.login-eye {
    z-index: 2;
}
#passwordInput {
    position: relative;
    z-index: 1;
}

/* Contenedor de la ilustración animada (Storyset) en el panel izquierdo - recuperacion de contraseña*/
/* Contenedor compartido de ilustración animada (layout general) */
.ilustracion-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0.5rem 0 0;
    height: 320px;
}

/* Ilustración específica: recuperación de contraseña */
.ilustracion-forgot svg {
    max-width: 45%;
    height: auto;
    transform: translateY(-70px);
}

/* Ilustración específica: login */
.ilustracion-login svg {
    max-width: 70%;
    height: auto;
}

/* Ilustración animada (Storyset) - recuperacion de contraseña */
svg#freepik_stories-forgot-password:not(.animated) .animable {
    opacity: 0;
}
svg#freepik_stories-forgot-password.animated #freepik--background-complete--inject-175 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) lightSpeedLeft;
    animation-delay: 0s;
}
svg#freepik_stories-forgot-password.animated #freepik--Floor--inject-175 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) slideRight;
    animation-delay: 0s;
}
svg#freepik_stories-forgot-password.animated #freepik--Character--inject-175 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) zoomOut;
    animation-delay: 0s;
}
svg#freepik_stories-forgot-password.animated #freepik--speech-bubble--inject-175 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) zoomOut;
    animation-delay: 0s;
}
svg#freepik_stories-forgot-password.animated #freepik--Sreen--inject-175 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) slideRight;
    animation-delay: 0s;
}
svg#freepik_stories-forgot-password.animated #freepik--Plant--inject-175 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) slideDown;
    animation-delay: 0s;
}

/* Ilustración animada (Storyset) - login */
svg#freepik_stories-ecommerce-web-page:not(.animated) .animable {
    opacity: 0;
}
svg#freepik_stories-ecommerce-web-page.animated #freepik--background-complete--inject-2 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) zoomOut;
    animation-delay: 0s;
}
svg#freepik_stories-ecommerce-web-page.animated #freepik--Floor--inject-2 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) lightSpeedLeft;
    animation-delay: 0s;
}
svg#freepik_stories-ecommerce-web-page.animated #freepik--Bag--inject-2 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) zoomOut;
    animation-delay: 0s;
}
svg#freepik_stories-ecommerce-web-page.animated #freepik--Gifts--inject-2 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) zoomOut;
    animation-delay: 0s;
}
svg#freepik_stories-ecommerce-web-page.animated #freepik--Device--inject-2 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) lightSpeedLeft;
    animation-delay: 0s;
}
svg#freepik_stories-ecommerce-web-page.animated #freepik--Label--inject-2 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) lightSpeedLeft;
    animation-delay: 0s;
}
svg#freepik_stories-ecommerce-web-page.animated #freepik--credit-card--inject-2 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) lightSpeedRight;
    animation-delay: 0s;
}
svg#freepik_stories-ecommerce-web-page.animated #freepik--Character--inject-2 {
    animation: 1s 1 forwards cubic-bezier(.36, -0.01, .5, 1.38) slideDown;
    animation-delay: 0s;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes lightSpeedRight {
    from {
        transform: translate3d(50%, 0, 0) skewX(-20deg);
        opacity: 0;
    }
    60% {
        transform: skewX(10deg);
        opacity: 1;
    }
    80% {
        transform: skewX(-2deg);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
@keyframes slideRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes lightSpeedLeft {
    from {
        transform: translate3d(-50%, 0, 0) skewX(20deg);
        opacity: 0;
    }
    60% {
        transform: skewX(-10deg);
        opacity: 1;
    }
    80% {
        transform: skewX(2deg);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}