/* ============================================
   LOGIN DEL ERP
   Mismo lenguaje que las feature cards del dashboard:
   fondo oscuro, borde degradado de 8px y glow difuso.
   Todo bajo .cronos-login*; solo se carga en admin_login.html.
   ============================================ */

body.cronos-login-body {
    padding-top: 0;
    background: #0A0A0B;
}

body.cronos-login-body .main-app-shell {
    background: #0A0A0B;
}

body.cronos-login-body .background-grid {
    display: none;
}

.cronos-login {
    --cronos-login-gradient: linear-gradient(137deg, #4361EE 0%, #E0AEFF 45%, #F72585 100%);
    --cronos-login-radius: 40px;

    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 56px 16px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 18% 12%, rgba(67, 97, 238, 0.10), transparent 38%),
        radial-gradient(circle at 85% 90%, rgba(247, 37, 133, 0.07), transparent 40%),
        #0A0A0B;
}

.cronos-login__frame {
    position: relative;
    width: 100%;
    max-width: 440px;
    animation: cronos-login-enter 0.8s ease-out 0.1s both;
}

.cronos-login__glow {
    position: absolute;
    inset: 6% 4%;
    z-index: 0;
    border-radius: var(--cronos-login-radius);
    background: var(--cronos-login-gradient);
    opacity: 0.45;
    filter: blur(45px);
    pointer-events: none;
}

.cronos-login__card {
    position: relative;
    z-index: 1;
    padding: clamp(26px, 6vw, 40px);
    border: 8px solid transparent;
    border-radius: var(--cronos-login-radius);
    background:
        linear-gradient(#1A1A1C, #1A1A1C) padding-box,
        var(--cronos-login-gradient) border-box;
}

.cronos-login__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.cronos-login__brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
}

.cronos-login__brand strong,
.cronos-login__brand small {
    display: block;
    line-height: 1.25;
}

.cronos-login__brand strong {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.cronos-login__brand small {
    color: #9CA3AF;
    font-size: 12px;
}

.cronos-login__title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.cronos-login__lead {
    margin: 0 0 26px;
    color: #9CA3AF;
    font-size: 14px;
    line-height: 1.6;
}

.cronos-login__messages {
    margin-bottom: 18px;
}

.cronos-login__messages .alert {
    margin-bottom: 8px;
    border-radius: 14px;
    font-size: 14px;
}

.cronos-login__form {
    display: grid;
    gap: 18px;
}

.cronos-login__field label {
    display: block;
    margin-bottom: 8px;
    color: #D1D5DB;
    font-size: 13px;
    font-weight: 500;
}

.cronos-login__input {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    background: #111113;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cronos-login__input::placeholder {
    color: #6B7280;
}

.cronos-login__input:focus {
    outline: none;
    border-color: #E0AEFF;
    box-shadow: 0 0 0 3px rgba(224, 174, 255, 0.18);
}

.cronos-login__password {
    position: relative;
}

.cronos-login__password .cronos-login__input {
    padding-right: 52px;
}

.cronos-login__toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #9CA3AF;
    font-size: 17px;
    background: transparent;
    transform: translateY(-50%);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.cronos-login__toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.cronos-login__toggle:focus-visible,
.cronos-login__submit:focus-visible,
.cronos-login__foot a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.cronos-login__turnstile {
    display: flex;
    justify-content: center;
}

.cronos-login__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    margin-top: 6px;
    border: 0;
    border-radius: 14px;
    color: #0A0A0B;
    font-size: 15px;
    font-weight: 600;
    background: #fff;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

@media (hover: hover) and (pointer: fine) {
    .cronos-login__submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 28px rgba(224, 174, 255, 0.22);
    }
}

.cronos-login__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #6B7280;
    font-size: 12px;
}

.cronos-login__foot a {
    color: #D1D5DB;
    text-decoration: none;
}

.cronos-login__foot a:hover {
    color: #fff;
    text-decoration: underline;
}

/* La entrada espera a que base.html retire el preloader */
body.site-loading .cronos-login__frame {
    animation-play-state: paused;
}

@keyframes cronos-login-enter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cronos-login__frame {
        animation: none;
    }

    .cronos-login__input,
    .cronos-login__toggle,
    .cronos-login__submit {
        transition: none;
    }

    .cronos-login__submit:hover {
        transform: none;
    }
}
