/* ============================================================
   LOGIN ENTERPRISE SaaS — TuGo+ (Compacto, Proporcional y Elegante)
   Composición Unificada de Ondas Fluidas Vectoriales + Telemetría
   ============================================================ */

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative;
    background-color: #f8fafc;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(37, 99, 235, 0.08) 1.2px, transparent 0);
    background-size: 28px 28px;
    color: #1e293b;
}

/* --- CANVAS DE SEGUNDO PLANO ENTERPRISE --- */
.turnos-bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.enterprise-bg-canvas {
    position: relative;
    width: 100%;
    height: 100%;
}

/* AURAS LUMINOSAS ORGANICAS */
.fluid-orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform, opacity;
}

.orb-primary {
    top: -10%;
    left: -8%;
    width: 55vw;
    height: 55vw;
    max-width: 750px;
    max-height: 750px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.01) 70%, transparent 100%);
    animation: orbMorph1 22s ease-in-out infinite alternate;
}

.orb-cyan {
    bottom: -15%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    max-width: 800px;
    max-height: 800px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.1) 0%, rgba(14, 165, 233, 0.01) 70%, transparent 100%);
    animation: orbMorph2 26s ease-in-out infinite alternate;
}

.orb-indigo {
    top: 40%;
    right: 20%;
    width: 40vw;
    height: 40vw;
    max-width: 550px;
    max-height: 550px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
    animation: orbMorph1 28s ease-in-out infinite alternate-reverse;
}

@keyframes orbMorph1 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(6%, 10%, 0) scale(1.08); }
}

@keyframes orbMorph2 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-8%, -6%, 0) scale(1.05); }
}

/* REJILLA DE INGENIERÍA TECNOLÓGICA */
.mesh-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.75) 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.75) 0%, transparent 80%);
}

/* ONDAS VECTORIALES SVG FLUIDAS */
.fluid-wave-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

.wave-path {
    will-change: transform;
}

.path-1 {
    animation: wavePulse1 18s ease-in-out infinite alternate;
}

.path-2 {
    animation: wavePulse2 24s ease-in-out infinite alternate;
}

@keyframes wavePulse1 {
    0% { transform: translate3d(0, 0, 0) scaleY(1); }
    100% { transform: translate3d(20px, -15px, 0) scaleY(1.05); }
}

@keyframes wavePulse2 {
    0% { transform: translate3d(0, 0, 0) scaleY(1); }
    100% { transform: translate3d(-20px, 15px, 0) scaleY(0.95); }
}

/* --- CARD CONTENEDOR COMPACTO Y ELEGANTE --- */
.container {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 32px 32px 28px;
    border-radius: 20px;
    box-shadow:
        0 20px 45px -12px rgba(15, 23, 42, 0.12),
        0 8px 24px -6px rgba(37, 99, 235, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.95) inset;
    text-align: center;
    width: 100%;
    max-width: 390px;
    z-index: 10;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.9);
    animation: cardFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- LOGO Y SEPARADORES --- */
.login-logo-container {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo-img {
    max-width: 210px;
    max-height: 85px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.08));
    transition: transform 0.25s ease;
}

.login-logo-img:hover {
    transform: scale(1.03);
}

.login-brand-footer {
    margin: 0;
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
    letter-spacing: -0.1px;
}

.login-hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 14px 0 18px;
    width: 100%;
}

/* --- TIPOGRAFÍA Y TÍTULO --- */
h1 {
    color: #0f172a;
    margin: 0 0 18px;
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

h1 .brand {
    color: #2563eb;
}

/* --- FORMULARIO E INPUTS --- */
form {
    display: flex;
    flex-direction: column;
}

label {
    text-align: left;
    color: #475569;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

input {
    padding: 9px 12px;
    margin-bottom: 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
    width: 100%;
}

input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder {
    color: #94a3b8;
    font-size: 12.5px;
}

/* --- BOTÓN PRINCIPAL CORPORATIVO --- */
button {
    background: linear-gradient(135deg, #1a3e70 0%, #2563eb 100%);
    color: white;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(26, 62, 112, 0.18);
    width: 100%;
    margin-top: 2px;
}

button:hover {
    background: linear-gradient(135deg, #162d54 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(26, 62, 112, 0.26);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(26, 62, 112, 0.15);
}

/* --- ENLACE OLVIDÓ CONTRASEÑA --- */
.login-forgot-container {
    margin-top: 10px;
    text-align: right;
}

.login-forgot-link {
    color: #2563eb;
    font-size: 11.5px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.login-forgot-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.login-back-container {
    margin-top: 14px;
    text-align: center;
}

.login-back-link {
    color: #64748b;
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}

.login-back-link:hover {
    color: #1e293b;
}

.login-helper-text {
    color: #475569;
    font-size: 12.5px;
    margin-bottom: 14px;
    line-height: 1.45;
    text-align: left;
}

/* --- ALERTAS COMPACTAS --- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-3px); }
    40%, 80% { transform: translateX(3px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-error-alert {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 12px;
    color: #991b1b;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    font-size: 12px;
    animation: shake 0.35s ease-in-out;
}

.login-error-alert i {
    font-size: 16px;
    color: #dc2626;
    flex-shrink: 0;
}

.login-success-alert {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 12px;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    font-size: 12px;
    animation: fadeIn 0.3s ease-out;
}

.login-success-alert i {
    font-size: 16px;
    color: #16a34a;
    flex-shrink: 0;
}

.login-info-alert {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 12px;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    font-size: 12px;
    animation: fadeIn 0.3s ease-out;
}

.login-info-alert i {
    font-size: 16px;
    color: #2563eb;
    flex-shrink: 0;
}

.maint-login-warning {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    color: #991b1b;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    font-size: 12px;
    animation: fadeIn 0.3s ease-out;
}

.maint-login-warning i {
    font-size: 16px;
    margin-top: 1px;
    color: #dc2626;
}

.maint-login-warning strong {
    display: block;
    font-weight: 700;
    color: #dc2626;
}

/* --- RESPONSIVE --- */
@media (max-width: 480px) {
    .container {
        width: 88%;
        max-width: 320px;
        padding: 20px 20px;
        border-radius: 14px;
    }
    .login-logo-img {
        max-width: 115px;
    }
    h1 {
        font-size: 14px;
    }
    input {
        padding: 8px 10px;
        font-size: 12px;
    }
    button {
        padding: 9px 12px;
        font-size: 12px;
    }
}
