/* =========================================================
   HELIX LOGIN
   ========================================================= */

:root {

    --helix-login-primary: #4f46e5;
    --helix-login-primary-dark: #3730a3;

    --helix-login-text: #0f172a;
    --helix-login-muted: #64748b;

    --helix-login-background: #f8fafc;
    --helix-login-border: #e2e8f0;

    --helix-login-danger: #dc2626;

}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}


html {
    min-height: 100%;
}


body {

    margin: 0;

    min-height: 100vh;
    min-height: 100dvh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--helix-login-text);
    background: var(--helix-login-background);

    -webkit-font-smoothing: antialiased;
}


/* =========================================================
   PAGE
   ========================================================= */

.helix-login-page {

    min-height: 100vh;
    min-height: 100dvh;

    display: grid;

    grid-template-columns:
        minmax(390px, 0.9fr)
        minmax(500px, 1.1fr);

}


/* =========================================================
   BRAND SIDE
   ========================================================= */

.helix-login-brand {

    position: relative;

    display: flex;

    padding:
        max(34px, env(safe-area-inset-top))
        54px
        max(34px, env(safe-area-inset-bottom));

    overflow: hidden;

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(255,255,255,0.18),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(255,255,255,0.10),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #312e81 0%,
            #4f46e5 52%,
            #6366f1 100%
        );

    color: #ffffff;
}


/*
 * Decorative shapes
 */

.helix-login-brand::before {

    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    right: -220px;
    top: -160px;

    border-radius: 50%;

    border:
        1px solid
        rgba(255,255,255,0.14);
}


.helix-login-brand::after {

    content: "";

    position: absolute;

    width: 280px;
    height: 280px;

    left: -150px;
    bottom: -140px;

    border-radius: 50%;

    border:
        1px solid
        rgba(255,255,255,0.12);
}


.helix-login-brand-inner {

    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 590px;

    display: flex;
    flex-direction: column;

    margin: 0 auto;

}


/* =========================================================
   LOGO
   ========================================================= */

.helix-login-brand-logo {

    display: inline-flex;

    align-self: flex-start;

    padding: 13px 18px;

    background: #ffffff;

    border-radius: 14px;

    box-shadow:
        0 10px 30px
        rgba(15, 23, 42, 0.12);
}


.helix-login-brand-logo img {

    display: block;

    width: auto;
    height: auto;

    max-width: 190px;
    max-height: 58px;

    object-fit: contain;
}


/* =========================================================
   BRAND COPY
   ========================================================= */

.helix-login-brand-content {

    margin-top: auto;
    margin-bottom: 50px;

    max-width: 540px;
}


.helix-login-eyebrow {

    display: inline-block;

    margin-bottom: 18px;

    padding: 7px 12px;

    border:
        1px solid
        rgba(255,255,255,0.2);

    border-radius: 999px;

    background:
        rgba(255,255,255,0.10);

    font-size: 0.82rem;
    font-weight: 700;

    letter-spacing: 0.07em;

    text-transform: uppercase;
}


.helix-login-brand-content h1 {

    margin:
        0
        0
        20px;

    max-width: 560px;

    font-size:
        clamp(
            2.25rem,
            4.6vw,
            4.3rem
        );

    line-height: 1.02;

    letter-spacing: -0.045em;

    font-weight: 720;
}


.helix-login-brand-content p {

    margin: 0;

    max-width: 500px;

    font-size: 1.1rem;

    line-height: 1.65;

    color:
        rgba(255,255,255,0.78);
}


/* =========================================================
   FEATURES
   ========================================================= */

.helix-login-brand-features {

    display: flex;
    flex-wrap: wrap;

    gap:
        12px
        24px;
}


.helix-login-feature {

    display: flex;
    align-items: center;

    gap: 9px;

    font-size: 0.9rem;

    color:
        rgba(255,255,255,0.86);
}


.helix-login-feature-icon {

    width: 30px;
    height: 30px;

    display: inline-flex;

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

    border-radius: 9px;

    background:
        rgba(255,255,255,0.10);
}


.helix-login-feature-icon svg {

    width: 16px;
    height: 16px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   LOGIN SIDE
   ========================================================= */

.helix-login-main {

    position: relative;

    min-width: 0;

    display: flex;
    flex-direction: column;

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

    padding:
        max(30px, env(safe-area-inset-top))
        clamp(28px, 7vw, 90px)
        max(24px, env(safe-area-inset-bottom));

    background:
        radial-gradient(
            circle at 80% 10%,
            rgba(99,102,241,0.06),
            transparent 27%
        ),
        #f8fafc;
}


/* =========================================================
   CARD
   ========================================================= */

.helix-login-card {

    width: 100%;
    max-width: 470px;

    padding:
        40px
        42px;

    background: #ffffff;

    border:
        1px solid
        rgba(226,232,240,0.85);

    border-radius: 22px;

    box-shadow:
        0 20px 50px
        rgba(15, 23, 42, 0.07);
}


.helix-login-card-header {

    margin-bottom: 30px;
}


.helix-login-welcome-icon {

    width: 48px;
    height: 48px;

    display: flex;

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

    margin-bottom: 20px;

    border-radius: 14px;

    color: var(--helix-login-primary);

    background:
        rgba(79,70,229,0.09);
}


.helix-login-welcome-icon svg {

    width: 24px;
    height: 24px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


.helix-login-card-header h2 {

    margin:
        0
        0
        8px;

    font-size: 1.75rem;

    line-height: 1.2;

    letter-spacing: -0.025em;
}


.helix-login-card-header p {

    margin: 0;

    color: var(--helix-login-muted);

    line-height: 1.5;
}


/* =========================================================
   EXISTING HELIX_LOGIN OUTPUT
   ========================================================= */

/*
 * This deliberately targets the form generically
 * because Helix_Login remains unchanged.
 */

.helix-login-form-area form {

    display: flex;
    flex-direction: column;

    gap: 20px;

    margin: 0;
}


.helix-login-form-area label {

    display: block;

    margin-bottom: 7px;

    color: #334155;

    font-size: 0.9rem;
    font-weight: 600;
}


.helix-login-form-area input[type="text"],
.helix-login-form-area input[type="email"],
.helix-login-form-area input[type="password"] {

    width: 100%;
    min-height: 50px;

    padding:
        11px
        14px;

    border:
        1px solid
        #cbd5e1;

    border-radius: 11px;

    outline: none;

    background: #ffffff;

    color: #0f172a;

    font: inherit;
    font-size: 16px;

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


.helix-login-form-area input:focus {

    border-color:
        var(--helix-login-primary);

    box-shadow:
        0 0 0 4px
        rgba(79,70,229,0.10);
}


/* =========================================================
   PASSWORD WRAPPER CREATED BY JS
   ========================================================= */

.helix-password-wrapper {

    position: relative;

    width: 100%;
}


.helix-password-wrapper
input[type="password"],
.helix-password-wrapper
input[type="text"] {

    padding-right: 52px;
}


.helix-password-toggle {

    position: absolute;

    right: 7px;
    top: 50%;

    transform: translateY(-50%);

    width: 38px;
    height: 38px;

    display: flex;

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

    padding: 0;

    border: 0;

    border-radius: 9px;

    background: transparent;

    color: #64748b;

    cursor: pointer;
}


.helix-password-toggle:hover {

    color: #334155;

    background: #f1f5f9;
}


.helix-password-toggle svg {

    width: 19px;
    height: 19px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   LOGIN BUTTON
   ========================================================= */

.helix-login-form-area
button[type="submit"],
.helix-login-form-area
input[type="submit"] {

    width: 100%;
    min-height: 50px;

    padding: 12px 18px;

    border: 0;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            var(--helix-login-primary),
            #6366f1
        );

    color: #ffffff;

    font: inherit;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 7px 18px
        rgba(79,70,229,0.20);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.helix-login-form-area
button[type="submit"]:hover,
.helix-login-form-area
input[type="submit"]:hover {

    transform: translateY(-1px);

    box-shadow:
        0 10px 24px
        rgba(79,70,229,0.26);
}


.helix-login-form-area
button[type="submit"]:active,
.helix-login-form-area
input[type="submit"]:active {

    transform: translateY(0);
}


/* =========================================================
   ERROR MESSAGES
   ========================================================= */

.helix-login-form-area
.alert,
.helix-login-form-area
.error,
.helix-login-form-area
.errors,
.helix-login-form-area
.helix-alert-error {

    margin-bottom: 18px;

    padding: 12px 14px;

    border:
        1px solid
        #fecaca;

    border-radius: 10px;

    background: #fef2f2;

    color: #991b1b;

    font-size: 0.9rem;

    line-height: 1.45;
}


/* =========================================================
   MOBILE LOGO
   ========================================================= */

.helix-login-mobile-logo {

    display: none;

    width: 100%;

    margin-bottom: 24px;

    text-align: center;
}


.helix-login-mobile-logo img {

    max-width: 180px;
    max-height: 60px;

    width: auto;
    height: auto;

    object-fit: contain;
}


/* =========================================================
   FOOTER
   ========================================================= */

.helix-login-footer {

    display: flex;

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

    gap: 8px;

    margin-top: 24px;

    color: #94a3b8;

    font-size: 0.78rem;
}


.helix-login-footer-dot {

    opacity: 0.55;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .helix-login-page {

        grid-template-columns:
            minmax(340px, 0.8fr)
            1.2fr;
    }


    .helix-login-brand {

        padding:
            32px
            34px;
    }


    .helix-login-brand-content h1 {

        font-size: 2.7rem;
    }


    .helix-login-brand-features {

        flex-direction: column;

        gap: 10px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .helix-login-page {

        display: block;

        min-height: 100vh;
        min-height: 100dvh;
    }


    /*
     * Hide desktop branding area entirely.
     */

    .helix-login-brand {

        display: none;
    }


    .helix-login-main {

        min-height: 100vh;
        min-height: 100dvh;

        justify-content: center;

        padding:
            max(26px, env(safe-area-inset-top))
            18px
            max(20px, env(safe-area-inset-bottom));
    }


    .helix-login-mobile-logo {

        display: block;
    }


    .helix-login-card {

        max-width: 470px;

        padding:
            30px
            24px;

        border-radius: 18px;
    }


    .helix-login-card-header {

        margin-bottom: 25px;
    }


    .helix-login-card-header h2 {

        font-size: 1.55rem;
    }

}


/* =========================================================
   SMALL PHONE
   ========================================================= */

@media (max-width: 420px) {

    .helix-login-main {

        justify-content: flex-start;

        padding:
            max(24px, env(safe-area-inset-top))
            13px
            max(18px, env(safe-area-inset-bottom));
    }


    .helix-login-mobile-logo {

        margin-top: 20px;
        margin-bottom: 22px;
    }


    .helix-login-mobile-logo img {

        max-width: 155px;
        max-height: 52px;
    }


    .helix-login-card {

        padding:
            25px
            19px;

        border-radius: 16px;
    }


    .helix-login-welcome-icon {

        width: 44px;
        height: 44px;

        margin-bottom: 17px;
    }


    .helix-login-footer {

        flex-wrap: wrap;

        margin-top: 18px;
    }

}

.helix-login-field {
    width: 100%;
}


.helix-login-field label {
    display: block;

    margin-bottom: 7px;

    color: #334155;

    font-size: 0.9rem;
    font-weight: 600;
}


.helix-login-form-area .helix-alert-error {
    padding: 12px 14px;

    border: 1px solid #fecaca;
    border-radius: 10px;

    background: #fef2f2;

    color: #991b1b;

    font-size: 0.9rem;
    line-height: 1.45;
}