﻿/* ============================================================
   2. ESTILOS DE LOGIN
   ============================================================ */

/* ===== FIX: SCROLL OCULTO + FORM FLEX (marquee pegado al pie) ===== */
html, body.login-page {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    background-color: aliceblue;
}

    body.login-page::-webkit-scrollbar {
        display: none;
    }

    /* El form de ASP.NET debe ser flex para que el marquee se pegue abajo */
    body.login-page,
    body.login-page form#form1 {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        width: 100%;
    }

/* ===== LOGIN — DISEÑO MODERNO ===== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--login-bg-start) 0%, var(--login-bg-end) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.deco-sphere {
    position: fixed;
    bottom: -140px;
    left: -100px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient( circle at 35% 35%, #ffffff 0%, color-mix(in srgb, var(--main-color) 25%, transparent) 45%, color-mix(in srgb, var(--main-color-dark) 8%, transparent) 100% );
    opacity: 0.9;
    z-index: 0;
    animation: floatSphere 10s ease-in-out infinite;
    pointer-events: none;
    will-change: transform;
    /* Borde brillante sutil para definirla */
    box-shadow: inset 0 0 60px rgba(0, 153, 255, 0.15), 0 0 80px rgba(0, 153, 255, 0.12);
}

@keyframes floatSphere {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
    }

    33% {
        transform: translateY(-40px) translateX(20px) scale(1.06);
    }

    66% {
        transform: translateY(-18px) translateX(-12px) scale(0.98);
    }
}

/* Contenedor principal — empuja el marquee hacia abajo */
.login-main {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem 3rem;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
}

/* ===== COLUMNA IZQUIERDA ===== */
.login-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideInLeft 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    padding-bottom: 1rem;
}

/* Badge */
.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #FFF;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--login-text-primary);
    width: fit-content;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

    .login-badge::before {
        content: '';
        width: 7px;
        height: 7px;
        background: var(--main-color);
        border-radius: 50%;
        display: inline-block;
        animation: pulseDot 2s ease-in-out infinite;
    }

@keyframes pulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

/* Título */
.login-title {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 0.95;
    color: var(--login-text-primary);
    margin-bottom: 0;
    letter-spacing: -2px;
}

    .login-title .outline-word {
        display: block;
        font-weight: 900;
        color: transparent;
        -webkit-text-stroke: 2px black;
        margin-top: 0.1rem;
        animation: outlineFadeIn 1.2s ease-out 0.3s both;
    }

@keyframes outlineFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Línea decorativa */
.login-line {
    width: 140px;
    height: 1.5px;
    background: linear-gradient(90deg, var(--login-text-primary), transparent);
    margin: 1.2rem 0;
    border-radius: 2px;
    animation: growLine 0.8s ease-out 0.5s both;
}

@keyframes growLine {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 140px;
        opacity: 1;
    }
}

/* Subtítulo */
.login-subtitle {
    font-size: 0.9rem;
    color: var(--login-text-secondary);
    line-height: 1.6;
    max-width: 420px;
    margin-bottom: 1.4rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Stats */
.login-stats {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 1.8rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

    .stat-box svg {
        width: 22px;
        height: 22px;
        color: var(--main-color);
        flex-shrink: 0;
    }

    .stat-box .stat-num {
        font-size: 1.4rem;
        font-weight: 800;
        color: var(--login-text-primary);
        line-height: 1;
    }

    .stat-box .stat-label {
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 1.8px;
        text-transform: uppercase;
        color: var(--login-text-secondary);
        margin-top: 0.2rem;
    }

/* Logo empresa (IMAGEN) */
.login-brand-img {
    max-width: 140px;
    height: auto;
    animation: fadeInUp 0.8s ease-out 1s both, brandPulse 6s ease-in-out 2s infinite;
    will-change: transform;
}

@keyframes brandPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

/* ===== COLUMNA DERECHA — TARJETA ===== */
.login-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInRight 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.login-card {
    background: #FFF;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--login-card-border);
    border-radius: 24px;
    padding: 1.8rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px var(--login-shadow), inset 0 0 0 1px rgba(255,255,255,0.6);
    position: relative;
    will-change: transform;
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Esquina decorativa */
.card-corner {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 48px;
    height: 48px;
    background: var(--login-corner-bg);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 119, 204, 0.8);
    transform: rotate(12deg);
    animation: cornerBounce 3s ease-in-out infinite;
}

    .card-corner svg {
        transform: rotate(-12deg);
        width: 24px;
        height: 24px;
    }

@keyframes cornerBounce {
    0%, 100% {
        transform: rotate(12deg) translateY(0);
    }

    50% {
        transform: rotate(12deg) translateY(-3px);
    }
}

/* Header tarjeta */
.card-header-login {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;

}

    .card-header-login .card-logo {
        width: 120px;
        height: 70px;
        border-radius: 12px;
        object-fit: contain;
    }

    .card-header-login .card-brand {
        font-size: 1.4rem;
        font-weight: 800;
        color: var(--login-text-primary);
        letter-spacing: 0.5px;
        position: relative;
    }

.card-divider {
    width: 3.5px;
    height: 32px;
    background: linear-gradient( to bottom, transparent 0%, rgba(0, 153, 255, 0.15) 30%, rgba(0, 153, 255, 0.95) 50%, rgba(0, 153, 255, 0.15) 70%, transparent 100% );
    background-size: 100% 250%;
    background-position: center top;
    animation: lineShimmer 2s ease-in-out infinite alternate;
    border-radius: 4px;
    flex-shrink: 0;
    align-self: center;
}

@keyframes lineShimmer {
    0% {
        background-position: center top;
    }

    100% {
        background-position: center bottom;
    }
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--login-text-primary);
    margin-bottom: 0.2rem;
}

.card-desc {
    font-size: 0.82rem;
    color: var(--login-text-muted);
    margin-bottom: 1.6rem;
    line-height: 1.5;
}

/* Formulario */
.login-form-group {
    margin-bottom: 1rem;
    animation: fadeInUp 0.5s ease-out both;
}

    .login-form-group:nth-child(1) {
        animation-delay: 0.3s;
    }

    .login-form-group:nth-child(2) {
        animation-delay: 0.4s;
    }

    .login-form-group:nth-child(3) {
        animation-delay: 0.5s;
    }

.login-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--login-text-primary);
    margin-bottom: 0.4rem;
}

.login-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--login-input-bg);
    border: 1.5px solid var(--login-input-border);
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--login-text-primary);
    transition: all 0.25s ease;
    outline: none;
    font-family: inherit;
}

    .login-input::placeholder {
        color: var(--login-text-muted);
        font-weight: 400;
    }

    .login-input:focus {
        border-color: var(--main-color);
        box-shadow: 0 0 0 4px rgba(0, 153, 255, 0.1);
        background: var(--login-input-focus-bg);
    }

/* Fila PIN */
.pin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.pin-link {
    font-size: 0.7rem;
    color: var(--main-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

    .pin-link:hover {
        color: var(--secondary-color);
        text-decoration: underline;
    }

/* Botón */
.btn-login {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    box-shadow: 0 6px 20px rgba(0, 119, 204, 0.25);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out 0.6s both;
}

    .btn-login::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
    }

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(0, 119, 204, 0.4);
        background: linear-gradient(135deg, var(--main-color-dark) 0%, var(--secondary-color) 100%);
    }

        .btn-login:hover::after {
            left: 100%;
        }

    .btn-login:active {
        transform: translateY(0);
    }

/* Mensaje */
.login-message {
    display: block;
    text-align: center;
    margin-top: 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--main-color);
    animation: fadeIn 0.4s ease;
}

/* Validadores */
.login-form-group .asp-validator {
    font-size: 0.72rem;
    color: #f59e0b;
    margin-top: 0.2rem;
    display: inline-block;
}

/* ===== MARQUEE INFERIOR (PEGADO AL PIE) ===== */
.login-marquee {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.45);
    border-top: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(6px);
    padding: 0.5rem 0;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    width: 100%;
    margin: 0;
}

.marquee-track {
    display: inline-flex;
    animation: marqueeScroll 22s linear infinite;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    padding-right: 2rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--login-text-muted);
    opacity: 0.65;
}

    .marquee-item::after {
        content: '•';
        color: var(--main-color);
        opacity: 0.4;
        margin-left: 2rem;
    }

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ===== ANIMACIONES LOGIN ===== */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== RESPONSIVE LOGIN ===== */
@media (max-width: 991px) {
    .login-main {
        grid-template-columns: 1fr;
        padding: 1rem 1.5rem;
        text-align: center;
        gap: 1rem;
    }

    .login-info {
        align-items: center;
    }

    .login-title {
        font-size: 2.6rem;
    }

    .login-subtitle {
        max-width: 100%;
    }

    .login-stats {
        justify-content: center;
    }

    .login-line {
        margin-left: auto;
        margin-right: auto;
    }

    .login-brand-img {
        max-width: 120px;
    }

    .deco-sphere {
        width: 220px;
        height: 220px;
        bottom: -70px;
        left: -60px;
    }
}

@media (max-width: 576px) {
    .login-main {
        padding: 0.8rem 1rem;
        gap: 0.8rem;
    }

    .login-title {
        font-size: 2rem;
    }

    .login-card {
        padding: 1.4rem;
        border-radius: 20px;
    }

    .card-corner {
        width: 40px;
        height: 40px;
        top: -10px;
        right: -10px;
        border-radius: 12px;
    }

        .card-corner svg {
            width: 20px;
            height: 20px;
        }

    .login-stats {
        gap: 1.2rem;
    }

    .stat-box .stat-num {
        font-size: 1.2rem;
    }

    .login-marquee {
        padding: 0.4rem 0;
    }

    .marquee-item {
        font-size: 0.55rem;
    }
}
