﻿/* ==========================================
           VARIABLES GLOBALES BITSPARK
           ========================================== */
:root {
    --bs-navy: #183059;
    --bs-cyan: #22A699;
    --bs-orange: #F2A900;
    --bs-dark-bg: #0b1120;
}

/* ==========================================
           1. FONDO DARK AURORA
           ========================================== */
.identity-wrapper {
    background-color: var(--bs-dark-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'Open Sans', sans-serif;
    z-index: 1;
}

.tech-grid-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 100%);
}

.identity-wrapper::before {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(34, 166, 153, 0.15) 0%, transparent 60%);
    top: -20%;
    left: -10%;
    z-index: -2;
    animation: floatOrb 20s infinite alternate ease-in-out;
}

.identity-wrapper::after {
    content: '';
    position: absolute;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(242, 169, 0, 0.1) 0%, transparent 60%);
    bottom: -20%;
    right: -10%;
    z-index: -2;
    animation: floatOrb 25s infinite alternate-reverse ease-in-out;
}

@keyframes floatOrb {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(5%, 5%);
    }
}

/* ==========================================
           2. MEGA SPARKS
           ========================================== */
.mega-sparks-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.m-spark {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: floatMegaSpark linear infinite;
}

    .m-spark.huge {
        width: 30px;
        height: 30px;
        filter: blur(6px);
    }

    .m-spark.med {
        width: 10px;
        height: 10px;
        filter: blur(2px);
    }

    .m-spark.small {
        width: 4px;
        height: 4px;
    }

    .m-spark.cyan {
        background: var(--bs-cyan);
        box-shadow: 0 0 25px var(--bs-cyan);
    }

    .m-spark.orange {
        background: var(--bs-orange);
        box-shadow: 0 0 25px var(--bs-orange);
    }

@keyframes floatMegaSpark {
    0% {
        transform: translateY(110vh) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-10vh) scale(1.5);
        opacity: 0;
    }
}

/* ==========================================
           3. TARJETA PLATINUM (SHADOW MULTICAPA "PRO")
           ========================================== */
.login-card {
    background: rgba(255, 255, 255, 0.98); /* Blanco casi sólido */
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 450px;
    z-index: 10;
    /* LA MAGIA: Múltiples capas de sombra para profundidad real */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), /* Sombra base de anclaje */
    0 40px 80px -20px rgba(0, 0, 0, 0.7), /* Sombra ambiental profunda */
    0 0 0 8px rgba(255, 255, 255, 0.08), /* Anillo translúcido externo */
    0 0 40px rgba(34, 166, 153, 0.15); /* Resplandor Cyan de fondo */

    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

    .login-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.4), 0 50px 100px -20px rgba(0, 0, 0, 0.9), 0 0 0 8px rgba(34, 166, 153, 0.15), /* El anillo se vuelve Cyan */
        0 0 60px rgba(34, 166, 153, 0.3); /* El resplandor crece */
    }

/* ==========================================
           4. LOGO Y TEXTOS "IDENTITY"
           ========================================== */
.brand-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-animada {
    width: 140px;
    filter: drop-shadow(0 10px 15px rgba(34, 166, 153, 0.2));
    animation: breatheLogo 4s infinite ease-in-out;
    margin-bottom: 15px;
}

@keyframes breatheLogo {
    0%, 100% {
        transform: scale(1) translateY(0);
        filter: drop-shadow(0 10px 15px rgba(34, 166, 153, 0.2));
    }

    50% {
        transform: scale(1.05) translateY(-5px);
        filter: drop-shadow(0 15px 25px rgba(34, 166, 153, 0.4));
    }
}

/* Título de Marca */
.h4-title {
    font-family: 'Manrope', sans-serif;
    font-size: 2.1rem;
    font-weight: 900;
    margin: 0;
    color: var(--bs-navy);
    letter-spacing: -0.5px;
}

.text-gradient-cyan {
    background: linear-gradient(to right, var(--bs-cyan), #115e56);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-content {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ==========================================
           5. FORMULARIO E INPUTS
           ========================================== */
.form-group {
    margin-bottom: 20px;
}

.bs-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bs-input-modern {
    width: 100%;
    padding: 14px 15px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: var(--bs-navy);
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s;
}

    .bs-input-modern::placeholder {
        color: #cbd5e1;
        font-weight: 600;
    }

    .bs-input-modern:focus {
        background: #ffffff;
        border-color: var(--bs-cyan);
        outline: none;
        box-shadow: 0 0 0 4px rgba(34, 166, 153, 0.15);
    }

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #f8fafc inset !important;
    -webkit-text-fill-color: var(--bs-navy) !important;
}

/* ==========================================
           6. BOTONES Y DIVISOR
           ========================================== */
.btn-submit-pro {
    width: 100%;
    padding: 16px;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--bs-cyan) 0%, #178075 100%);
    color: white;
    font-weight: 800;
    font-family: 'Manrope', sans-serif;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 1.5px;
}

    .btn-submit-pro:hover {
        box-shadow: 0 10px 25px rgba(34, 166, 153, 0.4);
        transform: translateY(-2px);
    }

.btn-google-pro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    background: #ffffff;
    color: #334155;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

    .btn-google-pro:hover {
        border-color: var(--bs-cyan);
        background: #f8fafc;
        transform: translateY(-1px);
    }

.tech-divider {
    position: relative;
    text-align: center;
    margin: 30px 0;
}

    .tech-divider::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 100%;
        height: 1px;
        background: #e2e8f0;
        z-index: 1;
    }

    .tech-divider span {
        background: #ffffff;
        color: #94a3b8;
        padding: 0 15px;
        font-size: 0.75rem;
        font-weight: 800;
        letter-spacing: 1.5px;
        position: relative;
        z-index: 2;
        border-radius: 50px;
    }

/* ==========================================
           7. FOOTER, CORTINA Y RESPONSIVE
           ========================================== */
.login-footer-zone {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.dev-link {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
    margin-bottom: 15px;
}

    .dev-link:hover {
        color: #ffffff;
        text-shadow: 0 0 10px rgba(255,255,255,0.5);
    }

.system-version-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 25px;
    border-radius: 50px;
    font-family: 'Consolas', monospace;
    color: #ffffff; /* ✨ NUEVO: Todo el texto base ahora es blanco */
}

    /* ✨ NUEVO: Aseguramos que cualquier span interno (excepto el botón BETA) sea blanco */
    .system-version-badge span:not(.beta-pill) {
        color: #ffffff !important;
    }

.pulse-indicator {
    width: 8px;
    height: 8px;
    background: var(--bs-cyan);
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 0 10px var(--bs-cyan);
    animation: version-pulse 2s infinite;
}

@keyframes version-pulse {
    0%, 100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 15px var(--bs-cyan);
    }
}

.beta-pill {
    background: rgba(242, 169, 0, 0.2);
    color: var(--bs-orange);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 6px;
    margin-left: 10px;
    border: 1px solid rgba(242, 169, 0, 0.4);
}

#core-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-content-pro {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.electric-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
}

.ring-1 {
    border-top: 4px solid var(--bs-cyan);
    box-shadow: 0 0 20px var(--bs-cyan);
    animation: spinRay 1.5s linear infinite;
}

.ring-2 {
    width: 160px;
    height: 160px;
    top: 20px;
    left: 20px;
    border-right: 4px solid #a855f7;
    box-shadow: 0 0 20px #a855f7;
    animation: spinRay 2s linear infinite reverse;
}

.ring-3 {
    width: 100%;
    height: 100%;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    animation: spinRay 3s linear infinite;
}

@keyframes spinRay {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-text-status {
    color: var(--bs-cyan);
    font-family: 'Consolas', monospace;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
}

/* =========================================
   📱 MODO MÓVIL (SPARK RESPONSIVE CORREGIDO)
   ========================================= */
@media (max-width: 768px) {
    .identity-wrapper {
        flex-direction: column;
        padding: 15px;
        padding-bottom: 90px; /* ✨ NUEVO: Damos espacio para que la tarjeta no pise el footer */
        justify-content: center;
    }

    .login-card {
        padding: 40px 25px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .h4-title {
        font-size: 1.8rem;
    }

    .logo-animada {
        width: 110px;
    }

    .login-footer-zone {
        /* ✨ NUEVO: Anclado al fondo absoluto */
        position: absolute;
        bottom: 15px;
        margin-top: 0;
        width: 100%;
    }
}
