/*
 * LOGIN_V2_SECURE_MOTION_20260719
 * LOGIN_V2_FINAL_POLISH_20260719
 */

:root {
    --brand: #0f5bd8;
    --ink: #0b1729;
    --muted: #65758b;
    --line: rgba(148, 163, 184, .28);
    --surface: rgba(255, 255, 255, .92);
    --danger: #b42318;
    --danger-bg: #fff4f2;
}

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

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

html {
    background: var(--t-blue-07, #07111f);
}

body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--ink);
    background: var(--t-blue-07, #07111f);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-shell {
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 58%) minmax(420px, 42%);
    overflow: hidden;
}


/* ======================================================
   VISUAL STAGE
   ====================================================== */

.login-visual {
    --pointer-x: 50%;
    --pointer-y: 50%;

    position: relative;
    isolation: isolate;
    min-height: 100svh;
    overflow: hidden;
    color: var(--t-surface, #ffffff);
    padding: 42px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.visual-background,
.visual-image,
.visual-gradient,
.visual-grid,
.visual-network {
    position: absolute;
    inset: 0;
}

.visual-background {
    z-index: -3;
    background:
        radial-gradient(
            circle at 24% 18%,
            rgba(32, 111, 220, .38),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            var(--t-blue-07, #07111f) 0%,
            var(--t-blue-15, #0a2143) 48%,
            var(--t-ink-cool, #0f172a) 100%
        );
}

.visual-image {
    z-index: -4;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: .64;
    filter:
        saturate(.92)
        contrast(1.04)
        brightness(.72);
    transform: scale(1.02);
    animation: loginHeroDrift 22s ease-in-out infinite alternate;
}

.visual-gradient {
    z-index: -2;
    background:
        radial-gradient(
            circle at var(--pointer-x) var(--pointer-y),
            rgba(64, 151, 255, .20),
            transparent 30%
        ),
        radial-gradient(
            ellipse at 48% 82%,
            rgba(42, 121, 208, .18),
            transparent 39%
        ),
        linear-gradient(
            90deg,
            rgba(5, 15, 31, .34),
            rgba(5, 15, 31, .62)
        ),
        linear-gradient(
            0deg,
            rgba(5, 15, 31, .90) 0%,
            transparent 58%
        );
}

.visual-grid {
    z-index: -1;
    opacity: .16;
    background-image:
        linear-gradient(
            rgba(255,255,255,.18) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.18) 1px,
            transparent 1px
        );

    background-size: 54px 54px;
    mask-image:
        linear-gradient(
            to bottom,
            rgba(0,0,0,.72),
            transparent 82%
        );
}

.visual-network {
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.visual-brand {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 13px;
    animation: loginSlideDown .7s cubic-bezier(.2,.8,.2,1) both;
}

.brand-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius:var(--t-radius-lg, 16px);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--t-surface, #ffffff);
    font-size:var(--t-fs-lg, 14px);
    font-weight: 800;
    letter-spacing: .04em;
    background: rgba(255,255,255,.11);
    border: 1px solid rgba(255,255,255,.24);
    box-shadow:
        inset 0 1px rgba(255,255,255,.17),
        0 12px 40px rgba(0,0,0,.20);
    backdrop-filter: blur(16px);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    padding: 3px;
    object-fit: contain;
    background: rgba(255,255,255,.94);
}

.brand-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    color: inherit;
    font-size:var(--t-fs-lg, 14px);
    line-height: 1.2;
    font-weight: 700;
}

.brand-copy span {
    color: rgba(255,255,255,.62);
    font-size:var(--t-fs-sm, 11px);
    line-height: 1.2;
}

.visual-content {
    position: relative;
    z-index: 3;
    max-width: 680px;
    padding-bottom: 24px;
}

.visual-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    margin-bottom: 19px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.82);
    font-size:var(--t-fs-xs, 10px);
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
    animation: loginContentReveal .65s .10s both;
}

.visual-content h1 {
    margin: 0;
    color: var(--t-surface, #ffffff);
    font-size: clamp(38px, 4.05vw, 62px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 700;
    text-wrap: balance;
    text-shadow: 0 12px 42px rgba(0,0,0,.28);
    animation: loginContentReveal .75s .18s both;
}

.visual-content p {
    max-width: 560px;
    margin: 22px 0 0;
    color: rgba(255,255,255,.68);
    font-size: var(--t-fs-xl, 15px);
    line-height: 1.65;
    animation: loginContentReveal .75s .27s both;
}

.module-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 30px;
    color: rgba(255,255,255,.70);
    font-size:var(--t-fs-sm, 11px);
    font-weight: 600;
    animation: loginContentReveal .75s .34s both;
}

.module-line span {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.module-line span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--t-blue-78, #93c5fd);
    box-shadow: 0 0 15px rgba(120,182,255,.8);
}

.motion-node {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 39px;
    padding: 8px 12px 8px 8px;
    border-radius:var(--t-radius-md, 13px);
    color: rgba(255,255,255,.83);
    background: rgba(8, 24, 49, .36);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 18px 50px rgba(0,0,0,.20);
    backdrop-filter: blur(16px);
    font-size:var(--t-fs-xs, 10px);
    font-weight: 700;
    letter-spacing: .02em;
    pointer-events: none;
}

.motion-node-icon {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius:var(--t-radius-sm, 9px);
    background: rgba(255,255,255,.11);
}

.motion-node-icon svg {
    width: 14px;
    height: 14px;
}

.motion-node-one {
    top: 28%;
    left: 9%;
    animation:
        loginNodeReveal .7s .36s both,
        loginNodeFloat 6s 1.1s ease-in-out infinite;
}

.motion-node-two {
    top: 11%;
    right: 6%;
    animation:
        loginNodeReveal .7s .48s both,
        loginNodeFloat 7s 1.4s ease-in-out infinite reverse;
}

.motion-node-three {
    top: auto;
    right: 7%;
    bottom: 25%;
    animation:
        loginNodeReveal .7s .58s both,
        loginNodeFloat 6.5s 1.7s ease-in-out infinite;
}


/* ======================================================
   AUTH STAGE
   ====================================================== */

.login-access {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    padding: 38px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(
            circle at 82% 4%,
            rgba(66, 133, 244, .10),
            transparent 35%
        ),
        var(--t-page-cool, #f4f7fb);
}

.login-access::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            rgba(15, 91, 216, .025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(15, 91, 216, .025) 1px,
            transparent 1px
        );
    background-size: 34px 34px;
}

.mobile-brand {
    display: none;
}

.auth-card {
    position: relative;
    width: min(100%, 464px);
    margin-top: -18px;
    padding: 39px 40px 36px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.95);
    box-shadow:
        0 34px 80px rgba(18, 38, 66, .12),
        0 8px 24px rgba(18, 38, 66, .06),
        inset 0 0 0 1px rgba(148,163,184,.08);
    backdrop-filter: blur(24px);
    animation: loginCardReveal .78s cubic-bezier(.16,.8,.25,1) both;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 95% 0,
            rgba(15, 91, 216, .08),
            transparent 32%
        );
}

.auth-scan {
    position: absolute;
    z-index: 5;
    left: -10%;
    right: -10%;
    top: -60px;
    height: 54px;
    opacity: 0;
    pointer-events: none;
    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(61, 137, 255, .18),
            transparent
        );
    filter: blur(5px);
}

.auth-header,
.auth-error,
form,
.auth-footer {
    position: relative;
    z-index: 2;
}

.auth-header {
    margin-bottom: 27px;
}

.auth-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 27px;
    padding: 5px 9px;
    margin-bottom: 19px;
    color: var(--t-indigo-40, #1e40af);
    background: var(--t-surface-soft, #f8fbff);
    border: 1px solid var(--t-blue-92, #dbeafe);
    border-radius: 999px;
    font-size:var(--t-fs-xs, 10px);
    font-weight: 700;
    letter-spacing: .035em;
}

.auth-status-icon {
    width: 15px;
    height: 15px;
    display: grid;
    place-items: center;
}

.auth-status-icon svg {
    width: 14px;
    height: 14px;
}

.auth-header h2 {
    margin: 0;
    color: var(--ink);
    font-size:var(--t-fs-6xl, 31px);
    line-height: 1.1;
    letter-spacing: -.038em;
    font-weight: 700;
}

.auth-header p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size:var(--t-fs-base, 13px);
    line-height: 1.55;
}

.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: -6px 0 20px;
    padding: 11px 12px;
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid var(--t-red-89, #fecaca);
    border-radius:var(--t-radius-md, 13px);
    font-size:var(--t-fs-sm, 11px);
    line-height: 1.45;
}

.auth-error-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin-top: 1px;
}

.auth-error-icon svg {
    width: 17px;
    height: 17px;
}

.auth-field + .auth-field {
    margin-top: 18px;
}

.auth-field label {
    display: block;
    margin: 0 0 7px;
    color: var(--t-blue-26, #334155);
    font-size:var(--t-fs-sm, 11px);
    line-height: 1.3;
    font-weight: 700;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.forgot-link {
    margin-bottom: 7px;
    color: var(--brand);
    font-size:var(--t-fs-xs, 10px);
    font-weight: 700;
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine){.forgot-link:hover{
    text-decoration: underline;
}}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid var(--t-line-cool, #e2e8f0);
    border-radius:var(--t-radius-md, 13px);
    background: rgba(255,255,255,.92);
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease,
        transform .18s ease;
}

@media (hover: hover) and (pointer: fine){.auth-input-wrap:hover{
    border-color: var(--t-line-cool-strong, #cbd5e1);
}}

.auth-input-wrap:focus-within {
    border-color: var(--brand);
    background: var(--t-surface, #ffffff);
    box-shadow:
        0 0 0 4px rgba(15, 91, 216, .10),
        0 9px 25px rgba(15, 91, 216, .07);
    transform: translateY(-1px);
}

.auth-input-wrap.is-invalid {
    border-color: var(--t-red-67, #e97c71);
    background: var(--t-bad-bg, #fff1f2);
}

.auth-input-icon {
    width: 45px;
    flex: 0 0 45px;
    display: grid;
    place-items: center;
    color: #789;
}

.auth-input-icon svg {
    width: 17px;
    height: 17px;
}

.auth-input-wrap input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 44px 0 0;
    border: 0;
    outline: 0;
    color: var(--t-ink-cool, #0f172a);
    background: transparent;
    font-size:var(--t-fs-base, 13px);
}

.auth-input-wrap input::placeholder {
    color: var(--t-faint-cool, #94a3b8);
}

.password-toggle {
    position: absolute;
    right: 9px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius:var(--t-radius-sm, 9px);
    background: transparent;
    color: var(--t-blue-51, #718198);
    cursor: pointer;
}

.password-toggle:focus-visible{
    color: var(--brand);
    background: var(--t-surface-soft, #f8fbff);
    outline: none;
}@media (hover: hover) and (pointer: fine){.password-toggle:hover{
    color: var(--brand);
    background: var(--t-surface-soft, #f8fbff);
    outline: none;
}}

.password-toggle svg {
    width: 17px;
    height: 17px;
}

.password-eye-closed {
    display: none;
}

.password-toggle[aria-pressed="true"]
.password-eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"]
.password-eye-closed {
    display: block;
}

.auth-field-error {
    display: block;
    margin: 6px 3px 0;
    color: var(--danger);
    font-size:var(--t-fs-xs, 10px);
    line-height: 1.4;
}

.auth-assurance {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 18px 2px 19px;
    color: var(--t-blue-51, #718198);
    font-size:var(--t-fs-sm, 11px);
    line-height: 1.4;
}

.auth-assurance-icon {
    width: 15px;
    height: 15px;
    display: grid;
    place-items: center;
}

.auth-assurance-icon svg {
    width: 14px;
    height: 14px;
}

.auth-submit {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border: 0;
    border-radius:var(--t-radius-md, 13px);
    color: var(--t-surface, #ffffff);
    background:
        linear-gradient(
            135deg,
            var(--brand),
            var(--t-indigo-40, #1e40af)
        );
    box-shadow:
        0 12px 28px rgba(15, 91, 216, .25),
        inset 0 1px rgba(255,255,255,.18);
    cursor: pointer;
    font-size:var(--t-fs-md, 12px);
    font-weight: 700;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

@media (hover: hover) and (pointer: fine){.auth-submit:hover{
    transform: translateY(-1px);
    box-shadow:
        0 16px 32px rgba(15, 91, 216, .29),
        inset 0 1px rgba(255,255,255,.18);
    filter: brightness(1.03);
}}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:focus-visible {
    outline: 3px solid rgba(15, 91, 216, .22);
    outline-offset: 3px;
}

.auth-submit:disabled {
    cursor: wait;
}

.submit-default,
.submit-loading {
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.submit-default {
    display: flex;
}

.submit-default svg {
    width: 16px;
    height: 16px;
    transition: transform .18s ease;
}

@media (hover: hover) and (pointer: fine){.auth-submit:hover
.submit-default svg{
    transform: translateX(2px);
}}

.submit-loading {
    display: none;
}

.submit-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.34);
    border-top-color: var(--t-surface, #ffffff);
    animation: loginSpin .7s linear infinite;
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--t-muted-cool, #64748b);
    font-size:var(--t-fs-xs, 10px);
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .075em;
    font-weight: 700;
}

.auth-footer > span:nth-child(2) {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--t-blue-75, #aab8d6);
}


/* ======================================================
   AUTHENTICATING STATE
   ====================================================== */

body.is-authenticating
.auth-card {
    transform: scale(.992);
    transition: transform .25s ease;
}

body.is-authenticating
.auth-scan {
    opacity: 1;
    animation: loginSecurityScan 1.05s ease-in-out infinite;
}

body.is-authenticating
.submit-default {
    display: none;
}

body.is-authenticating
.submit-loading {
    display: flex;
}

body.is-authenticating
.auth-input-wrap {
    opacity: .72;
}

body.has-auth-errors
.auth-card {
    animation:
        loginCardReveal .65s both,
        loginErrorShake .36s .52s both;
}


/* ======================================================
   ANIMATIONS
   ====================================================== */

@keyframes loginHeroDrift {
    from {
        transform: scale(1.02) translate3d(0,0,0);
    }

    to {
        transform: scale(1.07) translate3d(-.6%, -.4%, 0);
    }
}

@keyframes loginSlideDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
        filter: blur(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes loginContentReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
        filter: blur(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes loginCardReveal {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.975);
        filter: blur(9px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes loginNodeReveal {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.95);
        filter: blur(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes loginNodeFloat {
    0%,
    100% {
        transform: translate3d(0,0,0);
    }

    50% {
        transform: translate3d(0,-9px,0);
    }
}

@keyframes loginSecurityScan {
    from {
        transform: translateY(-40px);
    }

    to {
        transform: translateY(610px);
    }
}

@keyframes loginSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loginErrorShake {
    0%,
    100% {
        transform: translateX(0);
    }

    28% {
        transform: translateX(-5px);
    }

    56% {
        transform: translateX(4px);
    }

    78% {
        transform: translateX(-2px);
    }
}


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

@media (max-width: 1180px) {
    .login-shell {
        grid-template-columns: minmax(0, 54%) minmax(400px, 46%);
    }

    .login-visual {
        padding: 36px;
    }

    .visual-content h1 {
        font-size: clamp(36px, 4.45vw, 54px);
    }

    .motion-node-one {
        left: 7%;
    }

    .motion-node-two {
        right: 6%;
    }

    .motion-node-three {
        right: 9%;
    }
}

@media (max-width: 900px) {
    .login-shell {
        position: relative;
        display: block;
    }

    .login-visual {
        position: fixed;
        inset: 0;
        min-height: 100svh;
        padding: 24px;
    }

    .visual-brand,
    .visual-content,
    .motion-node {
        display: none;
    }

    .visual-gradient {
        background:
            linear-gradient(
                rgba(4, 13, 27, .58),
                rgba(4, 13, 27, .76)
            );
    }

    .login-access {
        min-height: 100svh;
        padding: 24px;
        background: transparent;
        place-items: center;
    }

    .login-access::before {
        background: transparent;
    }

    .mobile-brand {
        position: absolute;
        top: 23px;
        left: 24px;
        right: 24px;
        z-index: 4;
        display: flex;
        align-items: center;
        gap: 11px;
        color: var(--t-surface, #ffffff);
    }

    .mobile-brand .brand-mark {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius:var(--t-radius-md, 13px);
    }

    .auth-card {
        margin-top: 58px;
        background: rgba(255,255,255,.93);
    }
}

@media (max-width: 520px) {
    .login-access {
        align-items: start;
        padding:
            max(96px, env(safe-area-inset-top))
            16px
            max(22px, env(safe-area-inset-bottom));
    }

    .mobile-brand {
        top: max(19px, env(safe-area-inset-top));
        left: 17px;
        right: 17px;
    }

    .auth-card {
        width: 100%;
        margin-top: 0;
        padding: 28px 22px 24px;
        border-radius: 23px;
    }

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

    .auth-header h2 {
        font-size:var(--t-fs-5xl, 28px);
    }

    .auth-footer {
        flex-wrap: wrap;
    }
}


/* ======================================================
   REDUCED MOTION
   ====================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .visual-image {
        transform: none !important;
    }

    .motion-node {
        display: none;
    }
}

/* SOFTWARE_OWNERSHIP_AHMAD_AL_SAMSAM */
.auth-footer-ownership{flex-wrap:wrap}.auth-footer-ownership small{flex:0 0 100%;text-align:center;margin-top:4px;color:rgba(100,116,139,.8);font-size:11px;font-weight:650;letter-spacing:.01em}
