﻿/* =====================================================
   IHITS HRMS – LOGIN PAGE
   One clean file: replaces the whole login CSS.
   Layout: navy background, text left, white login card right.
   Responsive: 4K → laptops → tablets → phones → 320px,
   short screens and phones in landscape.
   ===================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    --navy-900: #04102b;
    --navy-700: #0a2358;
    --blue-500: #2f6bff;
    --blue-600: #1747c9;
    --blue-300: #7db4ff;
    --ink: #0a2358; /* headings on white */
    --ink-2: #1b2a4a; /* body text on white */
    --muted: #5b6f93; /* secondary text on white */
    --line: #d7e0ef; /* input borders */
    --input-bg: #f3f6fc;
    --icon: #8a9ab8;
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --input-h: 50px; /* every text box + captcha tile */
    --radius-input: 10px;
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: #e8f0ff;
    background: var(--navy-900);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

.hide {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--blue-300);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- 3. Animated background ---------- */
.ambient {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(120% 90% at 8% 0%, #1a4bb0 0%, rgba(26,75,176,0) 55%), radial-gradient(90% 80% at 95% 100%, #103070 0%, rgba(16,48,112,0) 60%), linear-gradient(160deg, var(--navy-700) 0%, var(--navy-900) 100%);
}

    .ambient::before,
    .ambient::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        border: 1px solid rgba(255,255,255,.07);
    }

    .ambient::before {
        width: 900px;
        height: 900px;
        right: -280px;
        top: -260px;
    }

    .ambient::after {
        width: 1300px;
        height: 1300px;
        right: -520px;
        top: -420px;
        border-color: rgba(255,255,255,.04);
    }

.lane {
    position: absolute;
    bottom: -90px;
    width: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: .6;
}

    .lane i {
        display: block;
        height: 12px;
        border-radius: 4px;
        background: linear-gradient(90deg, rgba(125,180,255,.9), rgba(47,107,255,.2));
        box-shadow: 0 0 18px rgba(125,180,255,.45);
        animation: rise 9s linear infinite;
        opacity: 0;
    }

.lane--a {
    left: 9%;
}

.lane--b {
    left: 26%;
    transform: scale(.8);
}

.lane--c {
    left: 63%;
}

.lane--d {
    left: 88%;
    transform: scale(.7);
}

.lane i:nth-child(2) {
    animation-delay: 1.6s;
}

.lane i:nth-child(3) {
    animation-delay: 3.2s;
}

.lane i:nth-child(4) {
    animation-delay: 4.8s;
}

.lane--b i {
    animation-duration: 11s;
}

.lane--c i {
    animation-duration: 13s;
    animation-delay: 2.4s;
}

.lane--d i {
    animation-duration: 15s;
    animation-delay: 1s;
}

@keyframes rise {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    80% {
        opacity: .5;
    }

    100% {
        transform: translateY(-115vh);
        opacity: 0;
    }
}

/* ---------- 4. Page layout ---------- */
.stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 450px);
    align-items: center;
    gap: clamp(32px, 6vw, 96px);
    padding: clamp(32px, 5vh, 64px) clamp(24px, 8vw, 130px);
}

/* ---------- 5. Left side ---------- */
.intro {
    max-width: 620px;
    min-width: 0;
}

.logo {
    display: block;
    height: clamp(48px, 6vw, 72px);
    width: auto;
    margin-bottom: clamp(18px, 3vh, 30px);
    filter: drop-shadow(0 6px 22px rgba(0,0,0,.45));
    transition: transform .4s cubic-bezier(.34,1.56,.64,1), filter .4s;
}

    .logo:hover {
        transform: translateY(-3px) scale(1.02);
        filter: drop-shadow(0 10px 28px rgba(125,180,255,.4));
    }

.badge-secure {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    font-size: .82rem;
    color: #cfe0ff;
    backdrop-filter: blur(6px);
    transition: background .3s, border-color .3s, transform .3s;
}

    .badge-secure:hover {
        background: rgba(255,255,255,.12);
        border-color: rgba(255,255,255,.3);
        transform: translateY(-2px);
    }

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ddc97;
    box-shadow: 0 0 0 0 rgba(61,220,151,.6);
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    70% {
        box-shadow: 0 0 0 10px rgba(61,220,151,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(61,220,151,0);
    }
}

.intro h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 4.6vw, 4rem);
    line-height: 1.05;
    letter-spacing: -.03em;
    margin: clamp(18px, 3vh, 28px) 0 clamp(12px, 2vh, 20px);
    color: #fff;
    overflow-wrap: anywhere;
}

    .intro h1 span {
        display: block;
        background: linear-gradient(90deg, var(--blue-300), var(--blue-500));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

.intro p {
    color: #a9c0e6;
    font-size: clamp(.94rem, 1.1vw, 1.08rem);
    line-height: 1.65;
    max-width: 46ch;
    margin: 0;
}

.assurances {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: clamp(20px, 4vh, 38px);
    font-family: var(--font-mono);
    font-size: .74rem;
    color: #8fa9d6;
}

    .assurances span {
        padding: 7px 20px;
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,.1);
        transition: .25s;
    }

        .assurances span:hover {
            color: #dce9ff;
            border-color: rgba(125,180,255,.45);
            background: rgba(47,107,255,.14);
        }

/* ---------- 6. Right side: white card ---------- */
.glass {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    justify-self: end;
    padding: clamp(28px, 4vh, 44px) clamp(22px, 3vw, 40px) clamp(22px, 3vh, 32px);
    border-radius: 24px;
    background: linear-gradient(160deg, #ffffff 0%, #f4f7fd 100%);
    border: 1px solid rgba(255,255,255,.9);
    color: var(--ink-2);
    box-shadow: 0 30px 70px rgba(2,10,32,.45), 0 0 0 1px rgba(47,107,255,.06);
    transition: transform .4s cubic-bezier(.2,.7,.3,1), box-shadow .4s;
}

    .glass::after {
        content: "";
        position: absolute;
        top: -60%;
        left: -70%;
        width: 60%;
        height: 220%;
        background: linear-gradient(100deg, transparent, rgba(47,107,255,.06), transparent);
        transform: rotate(12deg);
        animation: sweep 7s ease-in-out infinite;
        pointer-events: none;
    }

@keyframes sweep {
    0%, 65% {
        left: -70%;
    }

    100% {
        left: 130%;
    }
}

@media (hover: hover) {
    .glass:hover {
        transform: translateY(-4px);
        box-shadow: 0 40px 90px rgba(2,10,32,.5), 0 0 0 1px rgba(47,107,255,.1);
    }
}

/* company logo (dynamic) + name */
.wordmark {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.n-logo {
    width: clamp(120px, 40%, 170px);
    height: clamp(56px, 9vh, 84px);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .n-logo img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain; /* any logo shape fits, never stretched */
    }

.wordmark h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: .06em;
    color: var(--ink);
    margin: 0;
}

.wordmark small {
    display: block;
    color: var(--muted);
    font-size: .78rem;
}

.title {
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
    letter-spacing: -.02em;
    margin: clamp(18px, 3vh, 30px) 0 6px;
    padding-left: 0 !important;
    color: var(--ink);
}

.subtitle {
    position: relative;
    z-index: 2;
    color: var(--muted);
    font-size: .9rem;
    margin: 0 0 clamp(18px, 3vh, 26px);
}

form,
#loginControls {
    position: relative;
    z-index: 2;
}

/* ---------- 7. Text boxes ---------- */
.field {
    position: relative;
    margin-bottom: clamp(14px, 2.2vh, 20px);
}

    .field input {
        display: block;
        width: 100%;
        height: var(--input-h);
        margin: 0;
        padding: 0 44px;
        border-radius: var(--radius-input);
        border: 1px solid var(--line);
        background: var(--input-bg);
        color: var(--ink);
        font-family: var(--font-body);
        font-size: .96rem;
        outline: none;
        transition: border-color .25s, background .25s, box-shadow .25s;
    }

        .field input::placeholder {
            color: transparent;
        }

        .field input:hover {
            background: #eef3fb;
        }

        .field input:focus {
            background: #fff;
            border-color: var(--blue-500);
            box-shadow: 0 0 0 4px rgba(47,107,255,.12);
        }

        /* autofill: keep it on-theme */
        .field input:-webkit-autofill,
        .field input:-webkit-autofill:hover,
        .field input:-webkit-autofill:focus {
            -webkit-text-fill-color: var(--ink);
            -webkit-box-shadow: 0 0 0 1000px #eef4ff inset;
            caret-color: var(--ink);
            transition: background-color 9999s ease-out;
        }

        /* error state (if validate() adds one of these) */
        .field input.is-invalid,
        .field input.error,
        .field input.input-error {
            border-color: #f08a80;
            box-shadow: 0 0 0 4px rgba(240,80,70,.1);
        }

    /* floating label – centred in the box, floats onto the border */
    .field label {
        position: absolute;
        left: 44px;
        top: calc(var(--input-h) / 2);
        transform: translateY(-50%);
        max-width: calc(100% - 88px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #7a8bab;
        font-size: .96rem;
        line-height: 1.2;
        pointer-events: none;
        transition: all .22s cubic-bezier(.4,0,.2,1);
    }

    .field input:focus + label,
    .field input:not(:placeholder-shown) + label {
        top: 0;
        left: 14px;
        font-size: .72rem;
        letter-spacing: .04em;
        color: var(--blue-500);
        background: #fff;
        padding: 2px 8px;
        border-radius: 6px;
        max-width: calc(100% - 28px);
    }

    /* icons inside the boxes */
    .field .lead-icon {
        position: absolute;
        left: 15px;
        top: calc((var(--input-h) - 18px) / 2);
        width: 18px;
        height: 18px;
        font-size: 1rem;
        line-height: 18px;
        color: var(--icon);
        pointer-events: none;
        z-index: 1;
        transition: color .25s;
    }

    .field:focus-within .lead-icon {
        color: var(--blue-500);
    }

.toggle-pass {
    position: absolute;
    right: 6px;
    top: calc((var(--input-h) - 38px) / 2);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--icon);
    font-size: 1rem;
    cursor: pointer;
    transition: .2s;
}

    .toggle-pass:hover {
        color: var(--ink);
        background: #e8eef9;
    }

    .toggle-pass i {
        line-height: 1;
    }

/* validation text under each box */
.lc-msg {
    display: block;
    margin: 6px 4px 0;
    font-size: .78rem;
    line-height: 1.35;
    color: #d0453a;
}

    .lc-msg:empty {
        display: none;
    }

    .lc-msg i,
    .lc-msg img {
        margin-right: 4px;
        vertical-align: -1px;
    }

/* ---------- 8. Captcha row ---------- */
/* captcha box | captcha image | Proceed – one line */
.lc-captcha {
    display: grid;
    /*    grid-template-columns: minmax(0, 1fr) auto auto;*/
    grid-template-columns: 107px minmax(0, 1fr) 90px;
    gap: 10px;
    align-items: start;
    margin-bottom: clamp(18px, 2.6vh, 24px);
}

    /* Proceed button sized like the text boxes */
    .lc-captcha .lc-proceed {
        width: auto;
        min-height: 0;
        height: var(--input-h);
        padding: 0 22px;
        border-radius: var(--radius-input);
        font-size: .95rem;
        white-space: nowrap;
        box-shadow: 0 8px 20px rgba(47,107,255,.3);
    }

    /* shorter label so it fits the narrower captcha box */
    .lc-captcha .field input {
        padding-left: 40px;
        padding-right: 10px;
    }

    .lc-captcha .field label {
        left: 40px;
        max-width: calc(100% - 50px);
    }

    .lc-captcha .field .lead-icon {
        left: 13px;
    }

    .lc-captcha .field {
        margin-bottom: 0;
    }

.lc-captcha__img {
    height: var(--input-h);
    /*    min-width: 116px;*/
    min-width: 109px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8f8ff;
    border: 1px solid var(--line);
    border-radius: var(--radius-input);
}

    .lc-captcha__img img {
        display: block;
        max-height: calc(var(--input-h) - 14px);
        width: auto;
    }

    .lc-captcha__img a,
    .lc-captcha__img button {
        flex: 0 0 auto;
        display: inline-grid;
        place-items: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--blue-500);
        cursor: pointer;
        text-decoration: none;
        transition: background .2s, transform .3s;
    }

        .lc-captcha__img a:hover,
        .lc-captcha__img button:hover {
            background: rgba(47,107,255,.1);
            transform: rotate(-90deg);
        }

    .lc-captcha__img i {
        color: var(--blue-500);
        font-size: 1rem;
    }

/* ---------- 9. Buttons ---------- */
.btn-login {
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 14px;
    border: 0;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, #3d78ff, var(--blue-600));
    box-shadow: 0 12px 28px rgba(47,107,255,.35);
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, filter .25s;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 38px rgba(47,107,255,.5);
        filter: saturate(1.12);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login::before {
        content: "";
        position: absolute;
        top: 0;
        left: -60%;
        width: 45%;
        height: 100%;
        background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent);
        transform: skewX(-18deg);
        transition: left .6s ease;
    }

    .btn-login:hover::before {
        left: 120%;
    }

    .btn-login[disabled] {
        opacity: .75;
        cursor: progress;
        transform: none;
    }

.lc-login {
    margin-top: 16px;
}

/* ---------- 10. Group company dropdown ---------- */
.lc-group:empty {
    display: none;
}

.lc-group {
    margin-top: 16px;
}

    .lc-group select {
        width: 100%;
        height: var(--input-h);
        padding: 0 40px 0 16px;
        border-radius: var(--radius-input);
        border: 1px solid var(--line);
        background-color: var(--input-bg);
        color: var(--ink);
        font-size: .96rem;
        outline: none;
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%238a9ab8'%3E%3Cpath d='M1.6 4.6a.75.75 0 0 1 1.06 0L8 9.94l5.34-5.34a.75.75 0 1 1 1.06 1.06l-5.87 5.87a.75.75 0 0 1-1.06 0L1.6 5.66a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
    }

        .lc-group select:focus {
            background-color: #fff;
            border-color: var(--blue-500);
            box-shadow: 0 0 0 4px rgba(47,107,255,.12);
        }

/* ---------- 11. Footer ---------- */
.lc-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: clamp(16px, 2.6vh, 22px);
}

.link-forgot {
    position: relative;
    font-size: .88rem;
    font-weight: 500;
    color: var(--blue-500);
    text-decoration: none;
}

    .link-forgot::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -2px;
        height: 1.5px;
        width: 100%;
        background: currentColor;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform .3s cubic-bezier(.4,0,.2,1);
    }

    .link-forgot:hover {
        color: var(--blue-600);
    }

        .link-forgot:hover::after {
            transform: scaleX(1);
            transform-origin: left;
        }

.version {
    position: relative;
    z-index: 2;
    text-align: center;
    margin: clamp(12px, 2vh, 20px) 0 0;
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--icon);
    letter-spacing: .06em;
}

.lc-server-msg {
    position: relative;
    z-index: 2;
    text-align: center;
}

    .lc-server-msg span {
        display: inline-block;
        margin-top: 14px;
        padding: 9px 14px;
        border-radius: 12px;
        background: #fff1f0;
        border: 1px solid #f5c2bd;
        color: #c0392b;
        font-size: .84rem;
    }

        .lc-server-msg span:empty {
            display: none;
        }

.alert-soft {
    display: none;
    align-items: center;
    gap: 9px;
    position: relative;
    z-index: 2;
    background: #fff1f0;
    color: #c0392b;
    border: 1px solid #f5c2bd;
    border-radius: 12px;
    padding: 10px 13px;
    font-size: .84rem;
    margin-bottom: 18px;
}

    .alert-soft.show {
        display: flex;
        animation: shake .4s;
    }

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ---------- 12. Entrance animation ---------- */
.rise-in {
    opacity: 0;
    transform: translateY(14px);
    animation: riseIn .7s cubic-bezier(.2,.7,.3,1) forwards;
}

.d1 {
    animation-delay: .05s;
}

.d2 {
    animation-delay: .14s;
}

.d3 {
    animation-delay: .23s;
}

.d4 {
    animation-delay: .32s;
}

.d5 {
    animation-delay: .41s;
}

.d6 {
    animation-delay: .5s;
}

@keyframes riseIn {
    to {
        opacity: 1;
        transform: none;
    }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Big screens (1600px+) */
@media (min-width: 1600px) {
    .stage {
        max-width: 1640px;
        grid-template-columns: minmax(0, 1fr) 490px;
    }

    .glass {
        max-width: 440px;
    }

    .intro {
        max-width: 700px;
    }
}

/* Small laptops / landscape tablets (≤ 1199px) */
@media (max-width: 1199.98px) {
    .stage {
        grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
        gap: 36px;
        padding-left: 32px;
        padding-right: 32px;
    }

    .assurances {
        font-size: .7rem;
    }
}

/* Short screens on desktop (e.g. 1366×650, browser zoom) */
@media (min-width: 992px) and (max-height: 720px) {
    :root {
        --input-h: 46px;
    }

    .stage {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .logo {
        height: 44px;
        margin-bottom: 14px;
    }

    .intro h1 {
        font-size: clamp(1.8rem, 3.4vw, 2.7rem);
        margin: 14px 0 10px;
    }

    .assurances {
        margin-top: 18px;
    }

    .glass {
        padding: 22px 28px 18px;
    }

    .n-logo {
        height: 50px;
    }

    .title {
        margin-top: 14px;
        font-size: 1.2rem;
    }

    .subtitle {
        margin-bottom: 16px;
    }

    .field {
        margin-bottom: 12px;
    }

    .lc-captcha {
        margin-bottom: 14px;
    }

    .btn-login {
        min-height: 46px;
        padding: 12px;
    }
}

/* Tablets portrait & below: stack text over card (≤ 991px) */
@media (max-width: 991.98px) {
    .stage {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        align-content: center;
        gap: 32px;
        padding: 40px 24px;
    }

    .intro {
        width: 100%;
        max-width: 560px;
        text-align: center;
    }

        .intro p {
            margin: 0 auto;
        }

    .logo {
        margin-left: auto;
        margin-right: auto;
    }

    .assurances {
        justify-content: center;
    }

    .glass {
        justify-self: center;
        max-width: 480px;
    }

    .ambient::before,
    .ambient::after {
        opacity: .6;
    }

    .lane--b,
    .lane--d {
        display: none;
    }
}

/* Large phones (≤ 767px) */
@media (max-width: 767.98px) {
    .stage {
        padding: 28px 18px;
        gap: 24px;
    }

    .intro h1 {
        font-size: clamp(1.7rem, 7vw, 2.3rem);
        line-height: 1.1;
    }
}

/* Phones (≤ 575px) */
@media (max-width: 575.98px) {
    :root {
        --input-h: 48px;
    }

    .stage {
        padding: 20px 14px 24px;
        gap: 18px;
        align-content: start;
    }

    .logo {
        height: 40px;
        margin-bottom: 14px;
    }

    .badge-secure {
        font-size: .74rem;
        padding: 6px 12px 6px 10px;
    }

    .intro h1 {
        margin: 14px 0 0;
    }

    .intro p,
    .assurances {
        display: none; /* form shows without scrolling */
    }

    .glass {
        padding: 24px 18px 20px;
        border-radius: 20px;
    }

        .glass::after {
            display: none;
        }

    .n-logo {
        height: 56px;
    }

    .title {
        font-size: 1.2rem;
        margin-top: 16px;
    }

    .subtitle {
        font-size: .84rem;
        margin-bottom: 18px;
    }

    .field input,
    .lc-group select {
        font-size: 16px; /* stops iOS zooming in */
    }

    .field {
        margin-bottom: 14px;
    }

    .lc-captcha {
        gap: 8px;
    }

    .lc-captcha__img {
        min-width: 96px;
        padding: 4px 6px;
        gap: 4px;
    }

        .lc-captcha__img a,
        .lc-captcha__img button {
            width: 28px;
            height: 28px;
        }

    .lc-captcha .lc-proceed {
        padding: 0 14px;
        font-size: .9rem;
    }
}

/* Small phones (≤ 359px) */
@media (max-width: 359.98px) {
    .stage {
        padding: 16px 10px 20px;
    }

    .intro h1 {
        font-size: 1.5rem;
    }

    .glass {
        padding: 20px 14px 18px;
        border-radius: 16px;
    }

    .field input {
        padding: 0 40px;
    }

    .field label {
        left: 40px;
        max-width: calc(100% - 80px);
    }

    .field .lead-icon {
        left: 12px;
    }

    /* very narrow: captcha box on top, image + Proceed below */
    .lc-captcha {
        grid-template-columns: auto minmax(0, 1fr);
    }

        .lc-captcha .field {
            grid-column: 1 / -1;
        }

        .lc-captcha .lc-proceed {
            width: 100%;
        }
}

/* Phones held sideways (wide but very short) */
@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 520px) {
    :root {
        --input-h: 44px;
    }

    .stage {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
        justify-items: stretch;
        align-items: start;
        align-content: start;
        gap: 20px;
        padding: 16px 20px;
    }

    .intro {
        text-align: left;
    }

    .logo {
        height: 36px;
        margin: 0 0 10px;
    }

    .intro h1 {
        font-size: 1.5rem;
        margin: 10px 0 0;
    }

    .intro p,
    .assurances {
        display: none;
    }

    .glass {
        justify-self: end;
        padding: 16px 18px 14px;
    }

    .n-logo {
        height: 40px;
    }

    .title {
        margin-top: 10px;
        font-size: 1.1rem;
    }

    .subtitle {
        margin-bottom: 12px;
    }

    .field {
        margin-bottom: 10px;
    }

    .lc-captcha {
        margin-bottom: 12px;
    }

    .btn-login {
        min-height: 44px;
        padding: 10px;
    }
}

/* =====================================================
   FIT TO SCREEN HEIGHT – no page scroll
   Every vertical size scales with the viewport height,
   so the card (even with dropdown + Log in shown) fits.
   ===================================================== */
:root {
    --input-h: clamp(38px, 6vh, 45px); /* text boxes, captcha, buttons */
    --gap-y: clamp(7px, 1.5vh, 18px); /* space between rows */
    --pad-y: clamp(10px, 3vh, 48px); /* page top/bottom padding */
}

html,
body {
    height: 100%;
}

.stage {
    height: 100vh;
    height: 100svh;
    min-height: 0;
    padding-top: var(--pad-y);
    padding-bottom: var(--pad-y);
}

/* left side scales with height too */
.logo {
    height: clamp(34px, 7vh, 72px);
    margin-bottom: clamp(10px, 2.4vh, 30px);
}

.intro h1 {
    font-size: clamp(1.5rem, min(4.6vw, 7.5vh), 4rem);
    margin: clamp(10px, 2.4vh, 28px) 0 clamp(8px, 1.8vh, 20px);
}

.assurances {
    margin-top: clamp(12px, 3vh, 38px);
}

/* card: never taller than the screen */
.glass {
    padding-top: clamp(14px, 3vh, 40px);
    padding-bottom: clamp(12px, 2.4vh, 30px);
}

    .glass::-webkit-scrollbar {
        width: 6px;
    }

    .glass::-webkit-scrollbar-thumb {
        background: #c9d5ea;
        border-radius: 6px;
    }

.wordmark {
    gap: clamp(4px, 1vh, 10px);
}

.n-logo {
    height: clamp(34px, 8vh, 84px);
}

.wordmark h2 {
    font-size: clamp(.95rem, 2vh, 1.1rem);
}

.title {
    font-size: clamp(1.05rem, 2.6vh, 1.5rem);
    margin: clamp(8px, 2.2vh, 30px) 0 clamp(2px, .6vh, 6px);
}

.subtitle {
    font-size: clamp(.8rem, 1.7vh, .9rem);
    margin-bottom: clamp(12px, 2.4vh, 26px);
}

.field,
.lc-captcha {
    margin-bottom: var(--gap-y);
}

    .field input,
    .lc-group select {
        font-size: clamp(.88rem, 1.9vh, .96rem);
    }

.lc-group {
    margin: 0 0 var(--gap-y);
}

.btn-login {
    min-height: 0;
    height: var(--input-h);
    padding: 0 14px;
    font-size: clamp(.9rem, 2vh, 1rem);
}

.lc-login {
    margin-top: 0;
}

.lc-footer {
    margin-top: var(--gap-y);
}

    /* "Forgot password?" was turning black from old site styles */
    .lc-footer #kt_login_forgot,
    .lc-footer a.link-forgot {
        color: var(--blue-500);
        font-family: var(--font-body) !important;
        font-size: .88rem;
    }

        .lc-footer #kt_login_forgot:hover {
            color: var(--blue-600);
        }

.version {
    margin-top: clamp(4px, 1.2vh, 20px);
}

.lc-server-msg span {
    margin-top: clamp(6px, 1.2vh, 14px);
}

/* desktop & laptop: page itself never scrolls */
@media (min-width: 992px) {
    html,
    body {
        overflow: hidden;
    }
}

/* tablets & phones (stacked): text on top, card fills the rest */
@media (max-width: 991.98px) {
    .stage {
        grid-template-rows: auto minmax(0, 1fr);
        align-content: stretch;
        gap: clamp(12px, 2.6vh, 32px);
    }

    .intro {
        align-self: end;
    }

    .glass {
        align-self: center;
        max-height: 100%;
    }
}

/* short phones / small tablets: slimmer heading area */
@media (max-width: 991.98px) and (max-height: 760px) {
    .badge-secure {
        display: none;
    }

    .intro h1 {
        font-size: clamp(1.3rem, 4.2vh, 2rem);
        margin: 0;
    }

    .intro p,
    .assurances {
        display: none;
    }
}

/* phones sideways: two columns again */
@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 520px) {
    .stage {
        grid-template-rows: minmax(0, 1fr);
        align-content: stretch;
    }

    .intro {
        align-self: center;
    }

    .glass {
        max-height: 100%;
    }
}

/* iOS: keep 16px so it doesn't zoom into inputs */
@media (max-width: 575.98px) {
    .field input,
    .lc-group select {
        font-size: 16px;
    }
}

/* =====================================================
   COPYRIGHT – bottom of the left side
   Desktop: left column is exactly as tall as the card,
   text block is centred, copyright sits level with the
   card's bottom edge.
   ===================================================== */
.copyright {
    position: relative;
    z-index: 2;
    margin: 0;
    font-family: var(--font-body);
    font-size: .78rem;
    letter-spacing: .02em;
    color: #8fa9d6;
}

@media (min-width: 992px) {
    .stage {
        align-content: center; /* row = card height */
    }

    .intro {
        align-self: stretch; /* left column = card height */
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        margin-top: auto; /* centres the text block … */
    }

    .copyright {
        margin-top: auto; /* … and pins this to the card's bottom line */
        padding-top: clamp(16px, 3vh, 32px);
        white-space: nowrap;
    }
}

/* tablets & phones: centred at the bottom of the screen */
@media (max-width: 991.98px) {
    .copyright {
        position: absolute;
    }
}

@media (max-width: 991.98px) {
    .stage {
        padding-bottom: calc(var(--pad-y) + 26px); /* room for the line */
    }

    .copyright {
        left: 0;
        right: 0;
        bottom: 8px;
        text-align: center;
        white-space: normal;
        padding: 0 14px;
        font-size: .7rem;
    }
}

/* phones sideways: back to bottom-left */
@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 520px) {
    .copyright {
        left: 20px;
        right: auto;
        text-align: left;
        bottom: 6px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .rise-in {
        opacity: 1;
        transform: none;
    }
}
