﻿/* ============================================================
   HomeNew.aspx  -  co-branded login screen
   All classes are prefixed with "itq-" so they never collide
   with Bootstrap (bootstrap.min.css is loaded for the modals).
   ============================================================ */

:root {
    color-scheme: dark;
    --itq-bg: #0b1117;
    --itq-surface: #111820;
    --itq-line: #27313b;
    --itq-line-focus: #6aafcf;
    --itq-text: #f5f7f9;
    --itq-muted: #98a5b2;
    --itq-accent: #70b7d5;
    --itq-accent-deep: #287fa6;
    --itq-accent-bright: #06aad0;
    --itq-shadow: 0 22px 60px rgba(0, 0, 0, .3), 0 0 64px rgba(52, 141, 183, .34);
}

html, body {
    min-height: 100%;
}

body.itq-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--itq-text);
    background: linear-gradient(145deg, #0d141b, var(--itq-bg));
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    text-align: left;
}

    body.itq-body[dir="rtl"] {
        text-align: right;
    }

    /* the server form wraps the page + footer, so it carries the column layout */
    body.itq-body > form {
        flex: 1;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

.itq-body * {
    box-sizing: border-box;
}

.itq-data-map {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    color: #348db7;
    opacity: .085;
}

    .itq-data-map path {
        fill: none;
        stroke: currentColor;
        stroke-width: 1;
        vector-effect: non-scaling-stroke;
    }

    .itq-data-map circle {
        fill: var(--itq-bg);
        stroke: currentColor;
        stroke-width: 1;
        vector-effect: non-scaling-stroke;
    }

/* ---------- fixed brand header (top-left) ---------- */
.itq-brand {
    position: fixed;
    top: clamp(28px, 4vw, 48px);
    left: clamp(24px, 4vw, 56px);
    z-index: 3;
}

[dir="rtl"] .itq-brand {
    left: auto;
    right: clamp(24px, 4vw, 56px);
}

.itq-logos {
    width: min(100%, 390px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
}

.itq-logo-client {
    display: block;
    width: 128px;
    height: auto;
    filter: grayscale(1) brightness(0) invert(1);
    opacity: .94;
}

.itq-logo-brand {
    display: block;
    width: 80px;
    height: auto;
}

/* ---------- language picker (fixed corner) ---------- */
.itq-lang {
    position: fixed;
    top: clamp(28px, 4vw, 48px);
    right: clamp(24px, 4vw, 56px);
    z-index: 3;
    display: flex;
    align-items: center;
}

    .itq-lang select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background: var(--itq-surface);
        border: 1px solid var(--itq-line);
        border-radius: 10px;
        padding: 8px 30px 8px 12px;
        color: var(--itq-muted);
        font-size: 13px;
        font-weight: 500;
        font-family: inherit;
        cursor: pointer;
        outline: none;
        transition: .2s;
    }

        .itq-lang select:hover, .itq-lang select:focus {
            border-color: var(--itq-line-focus);
            color: var(--itq-text);
        }

        .itq-lang select option {
            background: var(--itq-surface);
            color: var(--itq-text);
        }

    .itq-lang svg {
        position: absolute;
        right: 11px;
        width: 13px;
        height: 13px;
        opacity: .7;
        pointer-events: none;
        color: var(--itq-muted);
    }

[dir="rtl"] .itq-lang {
    right: auto;
    left: clamp(24px, 4vw, 56px);
}

    [dir="rtl"] .itq-lang select {
        padding: 8px 12px 8px 30px;
    }

    [dir="rtl"] .itq-lang svg {
        right: auto;
        left: 11px;
    }

/* ---------- page layout ---------- */
.itq-page {
    position: relative;
    z-index: 1;
    flex: 1;
    width: min(100%, 980px);
    display: grid;
    grid-template-columns: 390px 470px;
    gap: 90px;
    align-items: center;
    justify-content: center;
}

/* NOTE: no RTL column swap here on purpose. With dir="rtl" the grid already
   lays its tracks out right-to-left, so the identity panel lands on the right
   and the card on the left. Swapping again with `order` would cancel that out
   and leave the layout looking identical to LTR. */

/* ---------- identity panel ---------- */
.itq-identity {
    position: static;
    z-index: 2;
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

/* NOTE: no align-items override for RTL. In a column flex container the cross
   axis is the inline axis, so `flex-start` (set above) already resolves to the
   RIGHT edge under dir="rtl". Forcing `flex-end` here flipped the blocks to the
   opposite edge, so the welcome copy and the context block stopped sharing an
   edge and the top section drifted right. */
[dir="rtl"] .itq-identity {
    text-align: right;
}

.itq-welcome-copy {
    /* the copy carries its own <br /> per sentence, so no 33ch clamp here -
       that would re-wrap a sentence that is longer than the clamp */
    max-width: none;
    margin: 0;
    color: #aab6c1;
    font-size: 15px;
    line-height: 1.65;
    letter-spacing: -.005em;
}

.itq-context {
    width: min(100%, 370px);
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid rgba(112, 183, 213, .18);
}

    .itq-context h2 {
        max-width: 28ch;
        margin: 0 0 8px;
        color: #d2dae1;
        font-size: 19px;
        line-height: 1.35;
        font-weight: 580;
        letter-spacing: -.018em;
    }

        .itq-context h2 em {
            color: var(--itq-accent-bright);
            font-style: normal;
        }

    .itq-context > p {
        margin: 0;
        color: #8d9ba7;
        font-size: 13.5px;
        line-height: 1.6;
    }

.itq-check-list {
    display: grid;
    gap: 8px;
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
    color: #9ba8b3;
    font-size: 13px;
    line-height: 1.4;
}

    .itq-check-list li {
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }

[dir="rtl"] .itq-check-list li {
    text-align: right;
}

.itq-check-icon {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    border: 1px solid rgba(6, 170, 208, .48);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--itq-accent-bright);
}

    .itq-check-icon svg {
        width: 9px;
        height: 9px;
    }

/* ---------- auth column ---------- */
.itq-auth {
    width: min(100%, 470px);
}

.itq-card {
    position: relative;
    padding: 42px;
    border: 1px solid var(--itq-line);
    border-radius: 24px;
    background: var(--itq-surface);
    box-shadow: var(--itq-shadow);
}

    .itq-card h1 {
        margin: 0 0 7px;
        font-size: 26px;
        line-height: 1.25;
        letter-spacing: -.025em;
        font-weight: 650;
        color: var(--itq-text);
    }

.itq-intro {
    margin: 0 0 27px;
    color: var(--itq-muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.itq-field {
    margin-bottom: 17px;
}

    .itq-field label {
        display: block;
        margin-bottom: 7px;
        color: #b3c2d0;
        font-size: 12.5px;
        font-weight: 560;
    }

.itq-input-wrap {
    position: relative;
}

.itq-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 17px;
    height: 17px;
    color: #62788b;
    transform: translateY(-50%);
    pointer-events: none;
    transition: color .18s ease;
}

[dir="rtl"] .itq-input-icon {
    left: auto;
    right: 14px;
}

.itq-input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 44px 0 42px;
    border: 1px solid var(--itq-line);
    border-radius: 11px;
    outline: none;
    background: #0c1319;
    color: var(--itq-text);
    font: inherit;
    font-size: 14px;
    text-transform: none;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

[dir="rtl"] .itq-input-wrap input {
    padding: 0 42px 0 44px;
    text-align: right;
}

.itq-input-wrap input::placeholder {
    color: #53687a;
}

.itq-input-wrap input:focus {
    border-color: var(--itq-line-focus);
    background: #0c1319;
    box-shadow: 0 0 0 2px rgba(112, 183, 213, .12);
}

.itq-input-wrap:focus-within .itq-input-icon {
    color: var(--itq-accent);
}

/* Chrome / Edge paint autofilled inputs light blue with black text.
   Repaint them with the dark field colours instead. */
.itq-input-wrap input:-webkit-autofill,
.itq-input-wrap input:-webkit-autofill:hover,
.itq-input-wrap input:-webkit-autofill:focus,
.itq-input-wrap input:-webkit-autofill:active,
.itq-captcha input:-webkit-autofill,
.itq-captcha input:-webkit-autofill:hover,
.itq-captcha input:-webkit-autofill:focus,
.itq-captcha input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--itq-text) !important;
    -webkit-box-shadow: 0 0 0 1000px #0c1319 inset !important;
    box-shadow: 0 0 0 1000px #0c1319 inset !important;
    caret-color: var(--itq-text);
    border-color: var(--itq-line);
    transition: background-color 5000s ease-in-out 0s;
}

.itq-input-wrap input:-webkit-autofill:focus {
    border-color: var(--itq-line-focus);
}

.itq-input-wrap.itq-has-toggle input {
    padding-right: 44px;
}

[dir="rtl"] .itq-input-wrap.itq-has-toggle input {
    padding-right: 42px;
    padding-left: 44px;
}

.itq-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6f8496;
    transform: translateY(-50%);
    cursor: pointer;
}

[dir="rtl"] .itq-toggle {
    right: auto;
    left: 8px;
}

.itq-toggle:hover {
    color: #a9ddef;
    background: rgba(255,255,255,.04);
}

.itq-toggle svg {
    width: 18px;
    height: 18px;
}

/* ---------- error ---------- */
.itq-error {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(220,53,69,.10);
    border: 1px solid rgba(220,53,69,.35);
    border-radius: 11px;
    padding: 11px 14px;
    margin-bottom: 18px;
    color: #ff9aa4;
    font-size: 13px;
    line-height: 1.4;
}

    .itq-error i {
        font-size: 16px;
        flex-shrink: 0;
        margin-right: 8px;
    }

[dir="rtl"] .itq-error i {
    margin-right: 0;
    margin-left: 8px;
}

/* ---------- captcha ---------- */
.itq-captcha {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    margin-bottom: 20px;
}

    .itq-captcha > div {
        flex: 1;
    }

    .itq-captcha label {
        display: block;
        font-size: 12.5px;
        font-weight: 560;
        color: #b3c2d0;
        margin-bottom: 7px;
    }

    .itq-captcha img {
        display: block;
        border: 1px solid var(--itq-line);
        border-radius: 10px;
        background: #fff;
        max-width: 100%;
    }

    .itq-captcha input {
        width: 100%;
        height: 50px;
        background: #0c1319;
        border: 1px solid var(--itq-line);
        border-radius: 11px;
        padding: 0 14px;
        color: var(--itq-text);
        font-size: 14px;
        font-family: inherit;
        outline: none;
        transition: .18s;
    }

        .itq-captcha input:focus {
            border-color: var(--itq-line-focus);
            box-shadow: 0 0 0 2px rgba(112, 183, 213, .12);
        }

/* ---------- submit ---------- */
.itq-submit {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 11px;
    background: var(--itq-accent-deep);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease;
}

    .itq-submit:hover {
        transform: translateY(-1px);
        filter: brightness(1.08);
        color: #fff;
    }

    .itq-submit:active {
        transform: translateY(0);
    }

    .itq-submit:focus-visible {
        outline: 2px solid #79d8f8;
        outline-offset: 3px;
    }

/* version stamp under the Sign in button */
.itq-meta {
    margin: 20px 0 0;
    text-align: center;
    color: #6f8496;
    font-size: 12px;
}

/* ---------- footer bar ---------- */
.itq-footer {
    position: relative;
    z-index: 2;
    width: calc(100% + 40px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    margin-top: 30px;
    padding: 21px clamp(22px, 4vw, 56px);
    border-top: 1px solid rgba(155, 196, 226, .1);
    color: #657685;
    font-size: 12px;
}

    .itq-footer .itq-links {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        flex-wrap: wrap;
    }

        .itq-footer .itq-links:first-child {
            justify-self: start;
        }

        .itq-footer .itq-links a {
            color: #8b9ba9;
            text-decoration: none;
            cursor: pointer;
            transition: color .18s ease;
        }

            .itq-footer .itq-links a:hover {
                color: var(--itq-accent-bright);
            }

        .itq-footer .itq-links span {
            opacity: .58;
        }

.itq-follow {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 9px;
}

    .itq-follow > span {
        margin-right: 2px;
        color: #718391;
        font-size: 10px;
        letter-spacing: .16em;
        text-transform: uppercase;
    }

    .itq-follow a {
        width: 30px;
        height: 30px;
        border: 1px solid rgba(155, 196, 226, .14);
        border-radius: 9px;
        display: grid;
        place-items: center;
        color: #8798a6;
        transition: color .18s ease, border-color .18s ease, background .18s ease;
    }

        .itq-follow a:hover {
            color: var(--itq-accent-bright);
            border-color: rgba(6,170,208,.38);
            background: rgba(6,170,208,.05);
        }

    .itq-follow svg {
        width: 15px;
        height: 15px;
    }

/* NOTE: no justify-self overrides for RTL. `start` / `end` are logical values
   that already mirror under dir="rtl", so overriding them here flipped both
   edges a second time and pulled the copyright and the follow block toward
   the centre. Only the physical margin below needs mirroring. */
[dir="rtl"] .itq-follow > span {
    margin-right: 0;
    margin-left: 2px;
}

/* ---------- two factor modal ---------- */
.itq-modal .modal-content {
    background: var(--itq-surface);
    border: 1px solid var(--itq-line);
    border-radius: 18px;
    color: var(--itq-text);
}

.itq-modal .modal-header {
    border-bottom: 1px solid var(--itq-line);
}

.itq-modal .modal-footer {
    border-top: 1px solid var(--itq-line);
}

.itq-modal .itq-card-title {
    font-size: 18px;
    font-weight: 650;
}

.itq-modal .itq-error {
    margin: 0 16px 12px;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .itq-page {
        width: min(100%, 440px);
        display: block;
    }

    .itq-brand {
        position: static;
        align-self: flex-start;
        margin-bottom: 28px;
    }

    [dir="rtl"] .itq-brand {
        align-self: flex-end;
    }

    .itq-lang {
        top: 14px;
        right: 14px;
    }

    [dir="rtl"] .itq-lang {
        right: auto;
        left: 14px;
    }

    .itq-identity {
        position: static;
        width: 100%;
        align-items: center;
        text-align: center;
        margin-bottom: 30px;
    }

    [dir="rtl"] .itq-identity {
        align-items: center;
        text-align: center;
    }

    .itq-logos {
        width: auto;
        align-items: center;
        gap: 18px;
    }

    .itq-logo-client {
        width: 112px;
    }

    .itq-logo-brand {
        width: 124px;
    }

    .itq-welcome-copy {
        max-width: none;
    }

    .itq-context {
        margin: 30px auto 0;
        text-align: left;
    }

    [dir="rtl"] .itq-context {
        text-align: right;
    }

    .itq-footer {
        grid-template-columns: 1fr;
        justify-items: center;
        width: calc(100% + 40px);
    }

        .itq-footer .itq-links:first-child,
        .itq-follow {
            justify-self: center;
        }

    [dir="rtl"] .itq-footer .itq-links:first-child,
    [dir="rtl"] .itq-follow {
        justify-self: center;
    }
}

@media (max-width: 480px) {
    body.itq-body {
        padding: 22px 16px 0;
    }

    .itq-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .itq-footer {
        width: calc(100% + 32px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
    }
}
