/**
 * Web Agenda - Login Page Styles
 * Version: 3.0
 * Ultima actualizacion: 2026-07-12
 *
 * Rediseno visual: tema oscuro con acento rojo LUTAS.
 * Mantiene los IDs de los controles ASP.NET y el overlay de exito.
 */

/* ========================================
   VARIABLES LOCALES DEL LOGIN
   ======================================== */

.login-wrapper,
.success-overlay {
    --red: #B31217;
    --red-dark: #8B0E11;
    --red-deep: #C8102E;
    --black: #111111;
    --black-2: #1A1A1A;
    --black-3: #222222;
    --white: #FFFFFF;
    --gray: #888888;
    --gray-light: #CCCCCC;
}

/* ========================================
   BODY Y LAYOUT PRINCIPAL
   ======================================== */

html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #111111 !important;
    min-height: 100vh;
    font-family: 'Inter', sans-serif !important;
    position: relative;
    overflow: hidden;
}

body {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body > form {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* ========================================
   FONDO DECORATIVO
   ======================================== */

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(179,18,23,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   WRAPPER Y CARD PRINCIPAL
   ======================================== */

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 0 16px;
}

.login-container {
    background: #1A1A1A !important;
    border: 1px solid rgba(255,255,255,0.07) !important;
    border-radius: 12px !important;
    padding: 48px 44px !important;
    width: 100%;
    position: relative;
    box-shadow: none !important;
    text-align: left !important;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8B0E11, #C8102E);
    border-radius: 12px 12px 0 0;
}

/* ========================================
   HEADER: LUTAS + LOGO CLIENTE
   ======================================== */

.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.lutas-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lutas-icon {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 38% 38%, #C8102E, #7A0A0F);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lutas-icon svg {
    display: block;
}

.lutas-name {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.lutas-product {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 3px;
    color: #FFFFFF;
    line-height: 1;
}

.lutas-module {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #B31217;
}

.header-separator {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.1);
}

.client-block {
    display: flex;
    align-items: center;
}

.client-logo {
    height: 36px !important;
    width: auto !important;
    max-width: 140px !important;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    /* Efecto respiracion: zoom in/out suave y continuo */
    animation: client-logo-breath 3.2s ease-in-out infinite;
    transform-origin: center;
    will-change: transform;
}

@keyframes client-logo-breath {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    }
    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.15));
    }
}

/* Respetar preferencia del usuario de reducir animaciones */
@media (prefers-reduced-motion: reduce) {
    .client-logo {
        animation: none;
    }
}

/* ========================================
   DIVIDER Y SECTION TITLE
   ======================================== */

.divider {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin-bottom: 24px;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 28px;
    margin-top: 4px;
    text-align: left;
}

/* ========================================
   FORMULARIO
   ======================================== */

.form-group {
    margin-bottom: 16px;
}

.login-container label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888888;
    margin-bottom: 8px;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100% !important;
    background: #222222 !important;
    background-color: #222222 !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 6px !important;
    color: #FFFFFF !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    padding: 13px 16px !important;
    margin-bottom: 0 !important;
    outline: none;
    box-shadow: none !important;
    transition: border-color 0.2s;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    border-color: rgba(179,18,23,0.5);
}

/* ========================================
   BOTON DE LOGIN
   ======================================== */

.btn-login,
input.btn-login[type="submit"] {
    width: 100% !important;
    background: #B31217 !important;
    background-image: none !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    padding: 15px !important;
    cursor: pointer;
    margin-top: 24px;
    box-shadow: none !important;
    transition: background 0.2s, transform 0.1s;
}

.btn-login:hover,
input.btn-login[type="submit"]:hover {
    background: #8B0E11 !important;
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    background: #555555;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   FOOTER
   ======================================== */

.card-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-by {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-kendata {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 15px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.35);
}

.footer-url {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    letter-spacing: 1px;
}

/* ========================================
   MENSAJES
   ======================================== */

.mensaje-error,
.mensaje-exito {
    font-size: 12px;
    text-align: center;
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 500;
    display: block;
    width: 100%;
    letter-spacing: 0.5px;
    animation: slideInDown 0.3s ease-out;
}

.mensaje-error {
    color: #ff6b70;
    background-color: rgba(179, 18, 23, 0.12);
    border: 1px solid rgba(179, 18, 23, 0.3);
}

.mensaje-error::before {
    content: "\26A0 ";
    margin-right: 4px;
}

.mensaje-exito {
    color: #7ee08e;
    background-color: rgba(40, 167, 69, 0.12);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.mensaje-exito::before {
    content: "\2713 ";
    margin-right: 4px;
}

/* ========================================
   CAMPO ANTI-BOT (OCULTO)
   ======================================== */

.no-bot {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 576px) {
    .login-container {
        padding: 32px 24px;
    }

    .login-header {
        margin-bottom: 24px;
    }

    .lutas-product {
        font-size: 20px;
    }

    .client-logo {
        height: 30px;
    }

    .header-separator {
        height: 32px;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.login-container {
    animation: fadeInUp 0.5s ease-out;
}

.login-container.shake {
    animation: shake 0.5s ease-in-out;
}

/* ========================================
   OVERLAY DE EXITO
   ======================================== */

.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.97) 0%, rgba(30, 10, 12, 0.97) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.success-overlay.show {
    opacity: 1;
    visibility: visible;
}

.success-overlay.hide {
    opacity: 0;
    visibility: hidden;
}

.success-content {
    text-align: center;
    color: #FFFFFF;
    z-index: 100000 !important;
    position: relative;
}

.success-content.animate {
    animation: successSlideUp 0.6s ease-out;
}

.success-spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(179, 18, 23, 0.25);
    border-top: 5px solid #C8102E;
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 0.8s linear infinite;
}

.success-checkmark {
    font-size: 100px;
    line-height: 1;
    margin-bottom: 20px;
    display: none;
    color: #C8102E;
    text-shadow: 0 4px 12px rgba(200, 16, 46, 0.4);
}

.success-checkmark.show {
    display: block;
    animation: checkmarkPop 0.6s ease-out;
}

/* Logo del overlay de exito: reemplaza al checkmark en el flujo de login.
   Aparece con el mismo pop del check original y despues respira suavemente
   con un zoom in/out continuo. Filtra drop-shadow rojo Motion. */
.success-logo {
    display: none;
    width: 240px;
    max-width: 60vw;
    height: auto;
    margin: 0 auto 20px;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(200, 16, 46, 0.35));
    transform-origin: center;
    will-change: transform, filter;
}

.success-logo.show {
    display: block;
    /* Primero el pop de entrada; luego el ciclo de respiracion infinito */
    animation:
        checkmarkPop 0.6s ease-out,
        success-logo-breath 3s ease-in-out 0.6s infinite;
}

@keyframes success-logo-breath {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 6px 18px rgba(200, 16, 46, 0.35));
    }
    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 10px 26px rgba(200, 16, 46, 0.5));
    }
}

@media (prefers-reduced-motion: reduce) {
    .success-logo.show {
        animation: checkmarkPop 0.6s ease-out;
    }
}

.success-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 42px;
    font-weight: 400;
    margin: 0 0 16px 0;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.success-message {
    font-size: 14px;
    margin: 0;
    opacity: 0.7;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes successSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes checkmarkPop {
    0% { opacity: 0; transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */

.btn-login:focus-visible,
.login-container input:focus-visible {
    outline: 2px solid #C8102E;
    outline-offset: 2px;
}
