/* Source of truth: Avorex.Portal. Temporary Admin V2 copy. Candidate for future Avorex.Web.UI extraction. */
/* =========================================================
   AVOREX PORTAL · LOGIN
   Standalone page (Layout = null). No portal shell styles.
   ========================================================= */

:root {
    color-scheme: light;

    --lgn-navy-900: #060e2e;
    --lgn-navy-800: #0a1640;
    --lgn-navy-700: #0e2160;
    --lgn-blue: #2563eb;
    --lgn-sky: #7cc4ff;
    --lgn-violet: #5b45e8;

    --lgn-ink: #14213d;
    --lgn-text: #334058;
    --lgn-muted: #64708a;
    --lgn-subtle: #98a2b6;
    --lgn-field-bg: #f4f7fb;
    --lgn-field-border: #dde4ee;
    --lgn-focus: #3b5bdb;
    --lgn-danger: #b42318;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--lgn-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}


/* =========================================================
   LAYOUT  (~68 / 32)
   ========================================================= */

.lgn {
    display: grid;
    grid-template-columns: minmax(0, 68fr) minmax(460px, 32fr);
    min-height: 100vh;
}


/* =========================================================
   BRAND PANEL
   ========================================================= */

.lgn-brand {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background:
        radial-gradient(60% 55% at 74% 38%, rgba(37, 99, 235, 0.42), transparent 70%),
        radial-gradient(45% 40% at 8% 96%, rgba(14, 165, 233, 0.16), transparent 70%),
        linear-gradient(140deg, var(--lgn-navy-900) 0%, var(--lgn-navy-800) 42%, var(--lgn-navy-700) 100%);
}

    /* faint grid */
    .lgn-brand::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background-image:
            linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
        background-size: 56px 56px;
        -webkit-mask-image: radial-gradient(70% 70% at 70% 45%, #000 20%, transparent 75%);
        mask-image: radial-gradient(70% 70% at 70% 45%, #000 20%, transparent 75%);
        pointer-events: none;
    }

    /* horizon glow */
    .lgn-brand::after {
        content: "";
        position: absolute;
        left: 20%;
        right: -10%;
        bottom: -18vh;
        z-index: -1;
        height: 36vh;
        border-radius: 50%;
        background: radial-gradient(closest-side, rgba(59, 130, 246, 0.45), rgba(59, 130, 246, 0.08) 60%, transparent);
        filter: blur(8px);
        pointer-events: none;
    }

.lgn-brand-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100vh;
    padding: clamp(28px, 5.5vh, 64px) clamp(40px, 5.2vw, 104px);
}

.lgn-brand-logo {
    display: block;
    flex: none;
    width: clamp(180px, 15vw, 280px);
    height: auto;
    /* Real logo asset on a dark surface: light rim keeps the navy wordmark legible. */
    filter:
        drop-shadow(0 0 1px rgba(255, 255, 255, 0.9))
        drop-shadow(0 0 1px rgba(255, 255, 255, 0.6))
        drop-shadow(0 6px 20px rgba(56, 139, 253, 0.35));
}

.lgn-brand-body {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: clamp(16px, 2.5vw, 48px);
    min-height: 0;
}

.lgn-brand-copy {
    align-self: center;
    max-width: 600px;
    padding: clamp(20px, 4vh, 48px) 0;
}


/* BADGE */

.lgn-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: clamp(14px, 2.6vh, 24px);
    padding: 7px 14px;
    border: 1px solid rgba(147, 197, 253, 0.22);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.07);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* HEADLINE */

.lgn-headline {
    margin: 0;
    color: #fff;
    font-size: clamp(32px, 2.9vw, 54px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

    .lgn-headline span {
        display: block;
        color: var(--lgn-sky);
        background: linear-gradient(95deg, #93d2ff 0%, #6fb6ff 55%, #8aa8ff 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.lgn-lead {
    max-width: 520px;
    margin: clamp(14px, 2.4vh, 22px) 0 0;
    color: rgba(226, 234, 255, 0.78);
    font-size: clamp(14.5px, 1.05vw, 17px);
    line-height: 1.65;
}


/* FEATURES */

.lgn-features {
    display: grid;
    gap: clamp(14px, 2.6vh, 24px);
    margin: clamp(22px, 4.4vh, 44px) 0 0;
    padding: 0;
    list-style: none;
}

.lgn-feature {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.lgn-feature-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: clamp(46px, 3.5vw, 60px);
    height: clamp(46px, 3.5vw, 60px);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: clamp(22px, 1.7vw, 28px);
}

.lgn-feature-icon i,
.lgn-node i {
    font-size: inherit;
}

.lgn-feature-icon--blue {
    color: #7cc4ff;
    border-color: rgba(96, 165, 250, 0.35);
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.55), rgba(29, 78, 216, 0.3));
}

.lgn-feature-icon--amber {
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.35);
    background: linear-gradient(145deg, rgba(194, 65, 12, 0.5), rgba(124, 45, 18, 0.35));
}

.lgn-feature-icon--violet {
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.35);
    background: linear-gradient(145deg, rgba(109, 40, 217, 0.55), rgba(76, 29, 149, 0.35));
}

.lgn-feature strong {
    display: block;
    margin: 2px 0 4px;
    color: #fff;
    font-size: clamp(15px, 1.1vw, 18px);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.lgn-feature div > span {
    display: block;
    max-width: 380px;
    color: rgba(214, 224, 247, 0.72);
    font-size: clamp(13px, 0.95vw, 15px);
    line-height: 1.55;
}


/* VISUAL: process flow + AVO */

.lgn-visual {
    position: relative;
    min-height: 0;
}

.lgn-flow {
    position: absolute;
    top: 4%;
    left: 2%;
    right: 0;
    aspect-ratio: 1.45;
    max-height: 52%;
    border: 1px solid rgba(125, 175, 255, 0.16);
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(59, 130, 246, 0.1), rgba(15, 23, 72, 0.05));
    box-shadow: inset 0 0 60px rgba(59, 130, 246, 0.08);
    transform: perspective(1400px) rotateY(-10deg);
}

.lgn-flow-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

    .lgn-flow-lines path {
        fill: none;
        stroke: rgba(125, 190, 255, 0.55);
        stroke-width: 1.5;
        vector-effect: non-scaling-stroke;
    }

.lgn-node {
    --c: 96, 165, 250;
    position: absolute;
    left: var(--x);
    top: var(--y);
    display: grid;
    place-items: center;
    width: clamp(40px, 4.3vw, 72px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 1.5px solid rgba(var(--c), 0.85);
    border-radius: 14px;
    color: rgb(var(--c));
    background: rgba(8, 20, 64, 0.82);
    box-shadow: 0 0 22px rgba(var(--c), 0.35), inset 0 0 14px rgba(var(--c), 0.18);
    font-size: clamp(20px, 2.1vw, 34px);
}

.lgn-node--sm {
    width: clamp(34px, 3.5vw, 58px);
    font-size: clamp(17px, 1.7vw, 28px);
}

.lgn-node--blue  { --c: 96, 165, 250; }
.lgn-node--teal  { --c: 45, 212, 191; }
.lgn-node--green { --c: 74, 222, 128; }
.lgn-node--amber { --c: 251, 146, 60; }
.lgn-node--red   { --c: 248, 113, 113; }

.lgn-avo {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 50%;
    width: auto;
    height: min(88%, 680px);
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    transform: translateX(-46%);
    filter: drop-shadow(0 24px 40px rgba(2, 8, 30, 0.55)) drop-shadow(0 0 40px rgba(59, 130, 246, 0.25));
}


/* =========================================================
   LOGIN PANEL
   ========================================================= */

.lgn-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vh, 64px) clamp(28px, 3.6vw, 72px);
    background: #fff;
}

.lgn-card {
    width: 100%;
    max-width: 440px;
}

.lgn-card-logo {
    display: block;
    width: clamp(190px, 14vw, 260px);
    height: auto;
    margin-bottom: clamp(24px, 6vh, 60px);
}

.lgn-heading {
    margin-bottom: clamp(22px, 4vh, 36px);
}

    .lgn-heading h2 {
        margin: 0 0 8px;
        color: var(--lgn-ink);
        font-size: clamp(24px, 1.9vw, 30px);
        font-weight: 700;
        letter-spacing: -0.02em;
        line-height: 1.2;
    }

    .lgn-heading p {
        margin: 0;
        color: var(--lgn-muted);
        font-size: 14px;
        line-height: 1.6;
    }


/* ALERTS */

.lgn-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.5;
}

    .lgn-alert > i {
        flex: none;
        margin-top: 1px;
        font-size: 18px;
    }

.lgn-alert--error {
    color: var(--lgn-danger);
    border-color: #fbd5d1;
    background: #fef5f4;
}

.lgn-alert--success {
    color: #067647;
    border-color: #c6ecd8;
    background: #f0fbf5;
}

.lgn-alert-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lgn-alert-body li + li {
    margin-top: 4px;
}


/* FIELDS */

.lgn-field {
    margin-bottom: clamp(16px, 2.6vh, 22px);
}

.lgn-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.lgn-label {
    display: block;
    margin: 0 0 8px;
    color: var(--lgn-text);
    font-size: 13.5px;
    font-weight: 500;
}

.lgn-link {
    border-radius: 4px;
    color: var(--lgn-blue);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}

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

    .lgn-link:focus-visible {
        outline: 2px solid var(--lgn-focus);
        outline-offset: 2px;
    }

.lgn-input-wrap {
    position: relative;
}

    .lgn-input-wrap > i {
        position: absolute;
        z-index: 1;
        top: 50%;
        left: 16px;
        transform: translateY(-50%);
        color: #7b879e;
        font-size: 19px;
        pointer-events: none;
    }

.lgn-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    border: 1px solid var(--lgn-field-border);
    border-radius: 12px;
    outline: none;
    color: var(--lgn-ink);
    background: var(--lgn-field-bg);
    font: inherit;
    font-size: 14.5px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.lgn-input--password {
    padding-right: 52px;
}

    .lgn-input::placeholder {
        color: #a3acbd;
    }

    .lgn-input:hover {
        border-color: #c9d3e2;
    }

    .lgn-input:focus {
        border-color: var(--lgn-focus);
        background: #fff;
        box-shadow: 0 0 0 4px rgba(59, 91, 219, 0.14);
    }

    .lgn-input[aria-invalid="true"],
    .lgn-input.input-validation-error {
        border-color: #e5746b;
    }

        .lgn-input[aria-invalid="true"]:focus,
        .lgn-input.input-validation-error:focus {
            box-shadow: 0 0 0 4px rgba(229, 116, 107, 0.16);
        }

    /* Browser autofill: keep the soft field look and readable text */
    .lgn-input:-webkit-autofill,
    .lgn-input:-webkit-autofill:hover,
    .lgn-input:-webkit-autofill:focus {
        -webkit-text-fill-color: var(--lgn-ink);
        -webkit-box-shadow: 0 0 0 1000px #eef3fb inset;
        caret-color: var(--lgn-ink);
        transition: background-color 9999s ease-out 0s;
    }

.lgn-password-toggle {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 6px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 38px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    color: #6b7690;
    background: transparent;
    font-size: 19px;
    cursor: pointer;
}

    .lgn-password-toggle:hover {
        color: var(--lgn-focus);
        background: #e9eefb;
    }

    .lgn-password-toggle:focus-visible {
        outline: 2px solid var(--lgn-focus);
        outline-offset: 0;
    }

.lgn-validation {
    display: block;
    margin-top: 6px;
    color: var(--lgn-danger);
    font-size: 12.5px;
}

    .lgn-validation:empty {
        display: none;
    }


/* REMEMBER */

.lgn-remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 clamp(20px, 3.4vh, 28px);
    color: var(--lgn-text);
    font-size: 13.5px;
    cursor: pointer;
    user-select: none;
}

    .lgn-remember input {
        width: 17px;
        height: 17px;
        margin: 0;
        accent-color: var(--lgn-blue);
        cursor: pointer;
    }

        .lgn-remember input:focus-visible {
            outline: 2px solid var(--lgn-focus);
            outline-offset: 2px;
        }


/* SUBMIT */

.lgn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 54px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(95deg, #1463d8 0%, #2f5ff0 52%, var(--lgn-violet) 100%);
    box-shadow: 0 12px 26px rgba(47, 95, 240, 0.28);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

    .lgn-submit i {
        font-size: 20px;
    }

    .lgn-submit:hover {
        filter: brightness(1.06);
        box-shadow: 0 14px 30px rgba(47, 95, 240, 0.34);
    }

        .lgn-submit:hover .lgn-submit-arrow {
            transform: translateX(3px);
        }

    .lgn-submit:active {
        transform: translateY(1px);
    }

    .lgn-submit:focus-visible {
        outline: 3px solid rgba(59, 91, 219, 0.45);
        outline-offset: 3px;
    }

    .lgn-submit:disabled {
        cursor: progress;
        filter: saturate(0.8);
        opacity: 0.85;
        transform: none;
    }

.lgn-submit-arrow {
    transition: transform 0.15s ease;
}

.lgn-submit-spinner {
    display: none;
    animation: lgn-spin 0.8s linear infinite;
}

.lgn-submit.is-loading .lgn-submit-arrow {
    display: none;
}

.lgn-submit.is-loading .lgn-submit-spinner {
    display: inline-block;
}

@keyframes lgn-spin {
    to {
        transform: rotate(360deg);
    }
}


/* FOOTER */

.lgn-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: clamp(28px, 6vh, 64px);
    color: var(--lgn-subtle);
    font-size: 12px;
}

    .lgn-footer::before,
    .lgn-footer::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #e7ebf2;
    }


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

/* Short desktop screens (e.g. 1366x768) */
@media (min-width: 1101px) and (max-height: 820px) {

    .lgn-brand-inner {
        padding-top: 26px;
        padding-bottom: 26px;
    }

    .lgn-brand-logo {
        width: clamp(170px, 13vw, 230px);
    }

    .lgn-headline {
        font-size: clamp(30px, 2.8vw, 44px);
    }

    .lgn-lead {
        font-size: 14.5px;
        line-height: 1.6;
    }

    .lgn-features {
        gap: 14px;
        margin-top: 24px;
    }

    .lgn-feature-icon {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .lgn-feature strong {
        font-size: 15px;
    }

    .lgn-feature div > span {
        font-size: 13px;
    }
}

/* Small laptops / tablet landscape */
@media (max-width: 1280px) {

    .lgn {
        grid-template-columns: minmax(0, 62fr) minmax(430px, 38fr);
    }

    .lgn-flow {
        display: none;
    }
}

/* Tablet: brand narrows to copy only */
@media (max-width: 1100px) {

    .lgn {
        grid-template-columns: minmax(0, 1fr) minmax(400px, 0.85fr);
    }

    .lgn-brand-inner {
        padding: 36px 40px;
    }

    .lgn-brand-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .lgn-visual {
        display: none;
    }

    .lgn-headline {
        font-size: clamp(28px, 3.4vw, 38px);
    }

    .lgn-feature div > span {
        font-size: 13px;
    }
}

@media (max-width: 1100px) and (max-height: 820px) {

    .lgn-feature div > span {
        display: none;
    }

    .lgn-feature {
        align-items: center;
    }
}

/* Mobile: login first, brand hero hidden */
@media (max-width: 860px) {

    .lgn {
        display: block;
    }

    .lgn-brand {
        display: none;
    }

    .lgn-panel {
        min-height: 100vh;
        padding: 48px 24px;
    }
}

@media (max-width: 520px) {

    .lgn-panel {
        align-items: flex-start;
        padding: 40px 20px 32px;
    }

    .lgn-card-logo {
        width: 170px;
        margin-bottom: 32px;
    }

    .lgn-heading h2 {
        font-size: 24px;
    }

    /* Avoid iOS zoom on focus */
    .lgn-input {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .lgn-submit,
    .lgn-submit-arrow,
    .lgn-input {
        transition: none;
    }

    .lgn-submit-spinner {
        animation-duration: 2s;
    }
}
