:root {
    --background-dark: #02071f;
    --background-blue: #06143a;
    --panel-dark: rgba(4, 15, 49, 0.92);

    --primary: #8b3dff;
    --primary-light: #b44cff;
    --blue: #237aff;
    --blue-light: #38a0ff;
    --cyan: #23d9ff;
    --green: #15edb0;

    --text-white: #ffffff;
    --text-soft: #b9c2dc;
    --text-muted: #7e89aa;

    --border: rgba(128, 150, 221, 0.32);
    --border-soft: rgba(128, 150, 221, 0.16);

    --danger: #ff4d73;
    --success: #14e5af;

    --shadow:
        0 30px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    overflow-x: hidden;

    font-family:
        "Inter",
        sans-serif;

    background: var(--background-dark);
    color: var(--text-white);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.login-page {
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr) minmax(430px, 0.85fr);

    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* ==========================================================
   SECCIÓN DE AURA
========================================================== */

.aura-section {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 100vh;
    padding: 38px 48px 26px;

    overflow: hidden;

    border-right:
        1px solid rgba(98, 128, 211, 0.18);
}

.background-grid {
    position: absolute;
    inset: 0;

    opacity: 0.12;

    background-image:
        linear-gradient(rgba(89, 118, 214, 0.12) 1px,
            transparent 1px),
        linear-gradient(90deg,
            rgba(89, 118, 214, 0.12) 1px,
            transparent 1px);

    background-size: 65px 65px;

    mask-image:
        linear-gradient(to right,
            transparent,
            black 18%,
            black 72%,
            transparent);
}

.background-glow {
    position: absolute;

    border-radius: 50%;

    filter: blur(95px);
    pointer-events: none;
}

.glow-one {
    top: 14%;
    left: 28%;

    width: 420px;
    height: 420px;

    background: rgba(49, 79, 255, 0.22);
}

.glow-two {
    right: -8%;
    bottom: -4%;

    width: 400px;
    height: 400px;

    background: rgba(143, 44, 255, 0.22);
}

.background-particles {
    position: absolute;
    inset: 0;

    pointer-events: none;

    background-image:
        radial-gradient(circle,
            rgba(120, 88, 255, 0.85) 1px,
            transparent 2px);

    background-position:
        12% 14%;

    background-size:
        110px 90px;

    opacity: 0.2;
}


/* ==========================================================
   MARCA
========================================================== */

.aura-brand {
    position: relative;
    z-index: 10;

    display: flex;
    align-items: center;
    gap: 17px;
}

.brand-logo-box {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 68px;
    height: 68px;
}

.brand-logo-box::before {
    content: "";

    position: absolute;

    width: 58px;
    height: 58px;

    border-radius: 50%;

    background:
        rgba(112, 53, 255, 0.3);

    filter: blur(15px);
}

.brand-logo {
    position: relative;
    z-index: 2;

    width: 170px;
    height: 170px;

    object-fit: contain;
    filter:
        drop-shadow(0 0 15px rgba(142, 73, 255, 0.8));
}

.brand-content strong {
    display: block;

    font-size: clamp(25px, 2.1vw, 36px);
    font-weight: 800;
    letter-spacing: 9px;
}

.brand-content span {
    display: block;
    margin-top: 7px;

    color: var(--text-soft);

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.8px;
}


/* ==========================================================
   CONTENIDO DE AURA
========================================================== */

.aura-content {
    position: relative;
    z-index: 5;

    display: grid;
    grid-template-columns:
        minmax(300px, 0.68fr) minmax(360px, 1.32fr);

    flex: 1;
    min-height: 0;
}

.aura-copy {
    position: relative;
    z-index: 8;

    align-self: center;
    padding-bottom: 55px;
}

.online-status {
    display: inline-flex;
    align-items: center;
    gap: 11px;

    padding: 10px 16px;

    border:
        1px solid rgba(22, 239, 177, 0.3);
    border-radius: 30px;

    background:
        rgba(7, 65, 71, 0.4);

    color: var(--green);

    font-size: 11px;
    font-weight: 700;

    box-shadow:
        inset 0 0 25px rgba(15, 220, 171, 0.04);
}

.online-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 14px rgba(21, 237, 176, 0.95);
}

.aura-copy h1 {
    margin: 32px 0 17px;

    font-size:
        clamp(39px, 4.1vw, 70px);

    line-height: 1.06;
    letter-spacing: -2.6px;
}

.aura-copy h1 span {
    display: inline-block;

    background:
        linear-gradient(90deg,
            #28a6ff,
            #9560ff);

    background-clip: text;
    -webkit-background-clip: text;

    color: transparent;
}

.title-line {
    width: 58px;
    height: 3px;
    margin: 24px 0;

    border-radius: 30px;

    background:
        linear-gradient(90deg,
            var(--cyan),
            var(--primary));

    box-shadow:
        0 0 14px rgba(52, 153, 255, 0.52);
}

.aura-copy p {
    max-width: 430px;
    margin: 0;

    color: #d0d6e8;

    font-size: 13px;
    line-height: 1.85;
}


/* ==========================================================
   PERSONAJE
========================================================== */

.aura-character-area {
    position: relative;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    min-width: 0;
    min-height: 0;
}

.aura-character {
    position: absolute;
    right: -1%;
    bottom: -35px;
    z-index: 6;

    width: min(560px, 47vw);
    height: min(82vh, 820px);

    object-fit: contain;
    object-position: center bottom;
}

.halo-ring {
    position: absolute;
    top: 0;
    left: 50%;

    border:
        4px solid rgba(128, 76, 255, 0.85);
    border-radius: 50%;

    transform:
        translateX(-50%) perspective(500px) rotateX(70deg);

    box-shadow:
        0 0 12px #7447ff,
        0 0 25px #713fff,
        inset 0 0 14px #438cff;
}

.halo-one {
    z-index: 4;

    width: 280px;
    height: 110px;

    animation:
        haloPulse 3s ease-in-out infinite;
}

.halo-two {
    z-index: 3;

    width: 315px;
    height: 125px;

    border-width: 1px;

    opacity: 0.45;

    animation:
        haloPulse 3s 0.5s ease-in-out infinite;
}

.aura-energy {
    position: absolute;
    left: -3%;
    top: 46%;
    z-index: 7;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 185px;
    height: 185px;
}

.energy-circle {
    position: absolute;

    border:
        1px solid rgba(33, 137, 255, 0.7);
    border-radius: 50%;

    box-shadow:
        0 0 16px rgba(55, 133, 255, 0.45);
}

.energy-one {
    width: 95px;
    height: 95px;

    animation:
        energySpin 10s linear infinite;
}

.energy-two {
    width: 135px;
    height: 135px;

    border-style: dashed;

    animation:
        energySpinReverse 15s linear infinite;
}

.energy-three {
    width: 170px;
    height: 170px;

    opacity: 0.5;

    animation:
        energyPulse 3s ease-in-out infinite;
}

.energy-logo {
    width: 64px;
    height: 64px;

    object-fit: contain;

    filter:
        drop-shadow(0 0 12px #4c9eff) drop-shadow(0 0 20px #784bff);
}


/* ==========================================================
   TARJETAS
========================================================== */

.feature-cards {
    position: relative;
    z-index: 15;

    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 13px;

    width: min(650px, 73%);
    margin-top: -105px;
    margin-bottom: 28px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 14px;

    min-height: 102px;
    padding: 17px;

    border:
        1px solid rgba(111, 138, 216, 0.32);
    border-radius: 14px;

    background:
        linear-gradient(145deg,
            rgba(5, 18, 54, 0.87),
            rgba(7, 23, 68, 0.72));

    backdrop-filter: blur(16px);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 14px 35px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 47px;
    height: 47px;
    min-width: 47px;

    border-radius: 11px;

    background:
        rgba(79, 51, 197, 0.25);

    font-size: 25px;

    filter:
        drop-shadow(0 0 10px rgba(115, 65, 255, 0.45));
}

.feature-card span {
    display: block;
    margin-bottom: 7px;

    color: #54a0ff;

    font-size: 10px;
    font-weight: 800;
}

.feature-card:nth-child(2) span {
    color: #9864ff;
}

.feature-card:nth-child(3) span {
    color: #3cc1ff;
}

.feature-card strong {
    display: block;

    color: #f3f5fd;

    font-size: 10px;
    line-height: 1.45;
}


/* ==========================================================
   PIE IZQUIERDO
========================================================== */

.aura-footer {
    position: relative;
    z-index: 10;

    display: flex;
    align-items: center;
    gap: 12px;

    padding-top: 19px;

    border-top:
        1px solid rgba(110, 135, 211, 0.2);
}

.security-icon {
    color: #7761ff;

    font-size: 23px;
    text-shadow:
        0 0 12px rgba(119, 97, 255, 0.8);
}

.aura-footer p {
    margin: 0;

    color: var(--text-soft);

    font-size: 10px;
}


/* ==========================================================
   FORMULARIO
========================================================== */

.form-section {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 16px;

    overflow: hidden;

    background:
        radial-gradient(circle at 92% 3%,
            rgba(115, 42, 255, 0.19),
            transparent 27%),
        linear-gradient(155deg,
            #06102f,
            #05112f 58%,
            #061741);
}

.form-section::before {
    content: "";

    position: absolute;
    inset: 0;

    opacity: 0.1;

    background-image:
        linear-gradient(rgba(81, 111, 203, 0.12) 1px,
            transparent 1px),
        linear-gradient(90deg,
            rgba(81, 111, 203, 0.12) 1px,
            transparent 1px);

    background-size: 55px 55px;
}

.form-background-logo {
    position: absolute;
    right: -65px;
    bottom: -50px;

    width: 280px;
    height: 280px;

    opacity: 0.09;

    transform: rotate(-4deg);
}

.form-background-logo img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    filter:
        drop-shadow(0 0 20px rgba(128, 73, 255, 0.8));
}

.login-card {
    position: relative;
    z-index: 5;

    display: flex;
    flex-direction: column;

    width: min(100%, 650px);
    min-height: calc(100vh - 32px);
    padding:
        clamp(45px, 6vh, 82px) clamp(42px, 5vw, 70px) 24px;

    border:
        1px solid rgba(116, 141, 218, 0.4);
    border-radius: 22px;

    background:
        linear-gradient(145deg,
            rgba(4, 16, 51, 0.96),
            rgba(5, 19, 58, 0.91));

    box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    backdrop-filter: blur(22px);
}

.mobile-brand {
    display: none;
}

.form-header {
    margin-bottom: 30px;
}

.corporate-label {
    display: inline-block;

    color: #b84fff;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.label-line {
    width: 45px;
    height: 2px;
    margin: 14px 0 23px;

    border-radius: 30px;

    background:
        linear-gradient(90deg,
            #b346ff,
            #6c52ff);

    box-shadow:
        0 0 12px rgba(172, 65, 255, 0.6);
}

.form-header h2 {
    margin: 0;

    font-size:
        clamp(30px, 3vw, 42px);

    line-height: 1.15;
    letter-spacing: -1.6px;
}

.form-header h2 span {
    background:
        linear-gradient(90deg,
            #4f8dff,
            #bb48ff);

    background-clip: text;
    -webkit-background-clip: text;

    color: transparent;
}

.form-header p {
    margin: 15px 0 0;

    color: #e0e4f0;

    font-size: 12px;
}


/* ==========================================================
   MENSAJES
========================================================== */

.django-messages {
    margin-bottom: 24px;
}

.system-message {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 58px;
    padding: 13px 17px;

    border:
        1px solid rgba(21, 229, 175, 0.35);
    border-radius: 11px;

    background:
        rgba(0, 85, 86, 0.22);

    color: var(--success);
}

.system-message.error {
    border-color:
        rgba(255, 77, 115, 0.38);

    background:
        rgba(111, 21, 50, 0.22);

    color: #ff7898;
}

.message-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 20px;
    height: 20px;
    min-width: 20px;

    border-radius: 50%;

    background: currentColor;
    color: #04243b;

    font-size: 10px;
    font-weight: 900;
}

.system-message.error .message-icon {
    color: #3a0818;
}

.system-message p {
    margin: 0;

    font-size: 11px;
}


/* ==========================================================
   CAMPOS
========================================================== */

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 11px;

    color: #cdd4e6;

    font-size: 10px;
    font-weight: 500;
}

.input-container {
    position: relative;

    display: flex;
    align-items: center;

    height: 63px;

    border:
        1px solid rgba(138, 157, 218, 0.5);
    border-radius: 11px;

    background:
        rgba(5, 16, 50, 0.73);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.input-container:focus-within {
    border-color:
        rgba(98, 116, 255, 0.95);

    background:
        rgba(8, 22, 66, 0.93);

    box-shadow:
        0 0 0 4px rgba(94, 72, 255, 0.1),
        0 0 24px rgba(66, 101, 255, 0.12);
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 100%;

    color: #3e82ff;
}

.input-icon svg {
    width: 20px;
    height: 20px;

    fill: currentColor;
}

.input-container input {
    flex: 1;

    min-width: 0;
    height: 100%;
    padding: 0 13px 0 0;

    border: none;
    outline: none;

    background: transparent;
    color: white;

    font-size: 13px;
    font-weight: 500;
}

.input-container input::placeholder {
    color: #677392;
}

.password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 55px;
    height: 100%;

    border: none;

    background: transparent;
    color: #7c87aa;
}

.password-toggle svg {
    width: 20px;
    height: 20px;

    fill: currentColor;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.password-toggle:hover,
.password-toggle.password-visible {
    color: #a987ff;
}

.password-toggle.password-visible svg {
    transform: scale(1.08);
}


/* ==========================================================
   OPCIONES
========================================================== */

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin: 1px 0 30px;
}

.remember-box {
    display: flex;
    align-items: center;
    gap: 9px;

    cursor: pointer;
}

.remember-box input {
    position: absolute;

    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    position: relative;

    width: 18px;
    height: 18px;

    border:
        1px solid rgba(168, 178, 220, 0.75);
    border-radius: 3px;

    background:
        rgba(6, 16, 47, 0.75);

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.remember-box input:checked+.custom-checkbox {
    border-color: #8c4cff;

    background:
        linear-gradient(135deg,
            #923fff,
            #3c79ff);
}

.remember-box input:checked+.custom-checkbox::after {
    content: "✓";

    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;

    font-size: 11px;
    font-weight: 800;
}

.remember-text {
    color: #aab3cc;

    font-size: 10px;
}

.support-text {
    color: #b556ff;

    font-size: 10px;
}


/* ==========================================================
   BOTÓN
========================================================== */

.login-button {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    width: 100%;
    height: 68px;

    border: none;
    border-radius: 11px;

    overflow: hidden;

    background:
        linear-gradient(100deg,
            #a63cff,
            #7045ff 43%,
            #167cff);

    color: white;

    font-size: 14px;
    font-weight: 800;

    box-shadow:
        0 16px 35px rgba(70, 65, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.login-button::before {
    content: "";

    position: absolute;
    top: 0;
    left: -100%;

    width: 65%;
    height: 100%;

    background:
        linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);

    transform: skewX(-18deg);

    transition:
        left 0.6s ease;
}

.login-button:hover {
    transform: translateY(-2px);

    filter: brightness(1.08);

    box-shadow:
        0 20px 42px rgba(70, 65, 255, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.login-button:hover::before {
    left: 145%;
}

.login-arrow {
    font-size: 22px;
    font-weight: 400;
}


/* ==========================================================
   ACCESO PROTEGIDO
========================================================== */

.protected-access {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 32px;
}

.protected-line {
    flex: 1;
    height: 1px;

    background:
        linear-gradient(90deg,
            transparent,
            rgba(121, 139, 199, 0.4));
}

.protected-line:last-child {
    background:
        linear-gradient(90deg,
            rgba(121, 139, 199, 0.4),
            transparent);
}

.protected-content {
    display: flex;
    align-items: center;
    gap: 9px;

    white-space: nowrap;
}

.protected-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 31px;
    height: 31px;

    border:
        1px solid rgba(110, 74, 255, 0.5);
    border-radius: 50%;

    background:
        rgba(74, 43, 179, 0.16);

    color: #9064ff;

    font-size: 15px;
}

.protected-content p {
    margin: 0;

    color: #aeb6cd;

    font-size: 9px;
}


/* ==========================================================
   PIE DEL FORMULARIO
========================================================== */

.form-footer {
    display: flex;
    justify-content: space-between;

    margin-top: auto;
    padding-top: 36px;

    color: #7d87a6;

    font-size: 9px;
}


/* ==========================================================
   ANIMACIONES
========================================================== */

@keyframes haloPulse {

    0%,
    100% {
        opacity: 0.58;

        filter:
            brightness(0.9);
    }

    50% {
        opacity: 1;

        filter:
            brightness(1.35);
    }
}

@keyframes energySpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes energySpinReverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@keyframes energyPulse {

    0%,
    100% {
        transform: scale(0.95);
        opacity: 0.35;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.8;
    }
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1350px) {

    .login-page {
        grid-template-columns:
            minmax(520px, 1fr) minmax(470px, 0.82fr);
    }

    .aura-section {
        padding-left: 34px;
        padding-right: 34px;
    }

    .aura-content {
        grid-template-columns:
            minmax(280px, 0.8fr) minmax(330px, 1.2fr);
    }

    .aura-character {
        right: -7%;

        width: 590px;
    }

    .feature-cards {
        width: 82%;
    }

}


@media (max-width: 1100px) {

    .login-page {
        grid-template-columns:
            0.95fr 1.05fr;
    }

    .aura-section {
        padding: 28px;
    }

    .brand-content strong {
        font-size: 23px;
        letter-spacing: 6px;
    }

    .brand-content span {
        font-size: 8px;
    }

    .aura-content {
        display: block;
    }

    .aura-copy {
        padding-top: 70px;
    }

    .aura-character {
        right: -31%;
        bottom: -60px;

        width: 570px;
        height: 78vh;

        opacity: 0.68;
    }

    .aura-energy,
    .halo-ring {
        display: none;
    }

    .feature-cards {
        grid-template-columns: 1fr;
        gap: 8px;

        width: 55%;
        margin-top: 0;
    }

    .feature-card {
        min-height: 68px;
        padding: 11px;
    }

    .feature-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;

        font-size: 20px;
    }

    .login-card {
        padding-left: 38px;
        padding-right: 38px;
    }

}


@media (max-width: 820px) {

    body {
        background: #040d2d;
    }

    .login-page {
        display: block;
    }

    .aura-section {
        display: none;
    }

    .form-section {
        min-height: 100vh;
        padding: 0;
    }

    .login-card {
        width: min(100%, 580px);
        min-height: calc(100vh - 32px);
        max-height: calc(100vh - 32px);
        overflow-y: auto;

        .mobile-brand {
            display: flex;
            align-items: center;
            gap: 12px;

            margin-bottom: 58px;
        }

    .mobile-brand img {
        width: 47px;
        height: 47px;

        object-fit: contain;

        filter:
            drop-shadow(0 0 12px rgba(138, 70, 255, 0.7));
    }

    .mobile-brand strong {
        display: block;

        font-size: 19px;
        letter-spacing: 4px;
    }

    .mobile-brand span {
        display: block;
        margin-top: 3px;

        color: #8994b1;

        font-size: 8px;
    }

    .form-header h2 {
        font-size: 31px;
    }

    .input-container {
        height: 58px;
    }

    .login-button {
        height: 61px;
    }

    .protected-content {
        white-space: normal;
        text-align: center;
    }

    .form-footer {
        margin-top: 55px;
    }
}
}


@media (max-width: 450px) {

    .login-card {
        padding-left: 18px;
        padding-right: 18px;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    .protected-line {
        display: none;
    }

    .protected-access {
        justify-content: center;
    }

}

@media (max-width: 1600px) {

    .aura-section {
        padding: 28px 34px 20px;
    }

    .aura-copy h1 {
        font-size: clamp(38px, 3.4vw, 58px);
    }

    .aura-character {
        width: min(520px, 45vw);
        height: min(79vh, 760px);
    }

    .feature-cards {
        width: 70%;
        margin-top: -58px;
    }

    .login-card {
        width: min(100%, 560px);
        padding:
            38px 45px 22px;
    }

    .form-header {
        margin-bottom: 23px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .input-container {
        height: 56px;
    }

    .login-button {
        height: 60px;
    }
}