@font-face {
    font-family: "Rubik Mono One";
    src: url("../fonts/rubik-mono/RubikMonoOne-Regular.ttf")
        format("truetype");
    font-display: swap;
}

:root {
    color-scheme: light;
    --itm-auth-navy: #0b2a52;
    --itm-auth-blue: #245fae;
    --itm-auth-blue-dark: #174f8f;
    --itm-auth-text: #172033;
    --itm-auth-muted: #657187;
    --itm-auth-border: #dce3ec;
    --itm-auth-surface: #ffffff;
}

* {
    box-sizing: border-box;
}

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

.itm-auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    background: #f4f7fb;
    color: var(--itm-auth-text);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.itm-login-shell {
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(480px, 1.08fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.itm-login-brand {
    position: relative;
    display: flex;
    overflow: hidden;
    padding: clamp(36px, 5vw, 76px);
    background:
        radial-gradient(
            circle at 85% 18%,
            rgba(93, 156, 236, 0.28),
            transparent 34%
        ),
        radial-gradient(
            circle at 12% 82%,
            rgba(68, 124, 195, 0.25),
            transparent 30%
        ),
        linear-gradient(145deg, #081f3d 0%, #0b2a52 56%, #123f77 100%);
    color: #ffffff;
}

.itm-login-brand::before,
.itm-login-brand::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px;
    content: "";
    transform: rotate(24deg);
}

.itm-login-brand::before {
    top: -130px;
    right: -170px;
    width: 390px;
    height: 390px;
}

.itm-login-brand::after {
    right: -70px;
    bottom: -170px;
    width: 330px;
    height: 330px;
}

.itm-login-brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    max-width: 590px;
}

.itm-login-logo {
    align-self: flex-start;
    flex-shrink: 0;
    width: clamp(180px, 18vw, 250px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

.itm-login-brand-copy {
    margin: auto 0;
    padding: 32px 0;
}

.itm-login-eyebrow {
    display: block;
    margin-bottom: 14px;
    color: #5e8fc8;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.itm-login-brand .itm-login-eyebrow {
    color: #9fc4f1;
}

.itm-login-brand h1 {
    max-width: 560px;
    margin: 0;
    font-size: clamp(2.15rem, 4.2vw, 4rem);
    font-weight: 650;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.itm-login-brand-copy p {
    max-width: 500px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.02rem;
    line-height: 1.7;
}

.itm-login-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

.itm-login-trust span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.itm-login-trust i {
    color: #9fc4f1;
    font-size: 1rem;
}

.itm-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 80px);
    background:
        linear-gradient(rgba(244, 247, 251, 0.88), rgba(244, 247, 251, 0.96)),
        radial-gradient(circle at 80% 10%, #dbe9fa, transparent 35%);
}

.itm-login-card {
    width: min(100%, 470px);
    padding: clamp(30px, 4vw, 48px);
    border: 1px solid rgba(11, 42, 82, 0.09);
    border-radius: 24px;
    background: var(--itm-auth-surface);
    box-shadow: 0 24px 65px rgba(15, 42, 71, 0.12);
}

.itm-login-mobile-brand {
    display: none;
}

.itm-login-heading h2 {
    margin: 0;
    color: var(--itm-auth-text);
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

.itm-login-heading p {
    margin: 12px 0 0;
    color: var(--itm-auth-muted);
    line-height: 1.55;
}

.itm-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
    padding: 13px 15px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff6f6;
    color: #a61b2b;
    font-size: 0.88rem;
    line-height: 1.45;
}

.itm-login-alert i {
    flex: 0 0 auto;
    margin-top: 1px;
}

.itm-login-form {
    margin-top: 30px;
}

.itm-login-field > label { display: block; margin-bottom: 8px; }

.itm-login-field label {
    color: #2d3a4f;
    font-size: 0.86rem;
    font-weight: 650;
}

.itm-login-input {
    position: relative;
}

.itm-login-input > i {
    position: absolute;
    top: 50%;
    left: 16px;
    color: #8190a5;
    font-size: 1rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.itm-login-input input {
    width: 100%;
    border: 1px solid var(--itm-auth-border);
    background: #fbfcfe;
    color: var(--itm-auth-text);
    font-family: inherit;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.itm-login-input input:hover {
    border-color: #bdc9d9;
    background: #ffffff;
}

.itm-login-input input:focus {
    border-color: var(--itm-auth-blue);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(36, 95, 174, 0.13);
}

.itm-login-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #6c7b91;
    cursor: pointer;
    transform: translateY(-50%);
}

.itm-login-password-toggle:hover {
    background: #edf3fa;
    color: var(--itm-auth-blue-dark);
}

.itm-login-password-toggle:focus-visible {
    outline: 3px solid rgba(36, 95, 174, 0.3);
    outline-offset: 1px;
}

.itm-login-submit {
    margin-top: 4px;
    border: 1px solid var(--itm-auth-blue);
    background: var(--itm-auth-blue);
    box-shadow: 0 10px 24px rgba(36, 95, 174, 0.2);
    color: #ffffff;
    font-family: inherit;
    cursor: pointer;
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.itm-login-submit:hover {
    background: var(--itm-auth-blue-dark);
    box-shadow: 0 12px 28px rgba(36, 95, 174, 0.25);
    transform: translateY(-1px);
}

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

.itm-login-submit:focus-visible {
    outline: 3px solid rgba(36, 95, 174, 0.32);
    outline-offset: 3px;
}

.itm-login-security {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
    color: #7b879a;
    font-size: 0.78rem;
    line-height: 1.5;
}

.itm-login-security i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: #5d7798;
}

.itm-login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #edf0f4;
    color: #9aa5b5;
    font-size: 0.74rem;
    text-align: center;
}

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

    .itm-login-brand {
        display: none;
    }

    .itm-login-panel {
        min-height: 100vh;
        min-height: 100dvh;
        padding:
            max(22px, env(safe-area-inset-top))
            max(18px, env(safe-area-inset-right))
            max(22px, env(safe-area-inset-bottom))
            max(18px, env(safe-area-inset-left));
    }

    .itm-login-mobile-brand {
        display: block;
        margin-bottom: 34px;
    }

    .itm-login-mobile-brand img {
        width: auto;
        max-width: min(100%, 210px);
        height: 44px;
        object-fit: contain;
        object-position: left center;
    }
}

@media (max-width: 575.98px) {
    .itm-login-panel {
        align-items: flex-start;
        background: #ffffff;
    }

    .itm-login-card {
        padding: 24px 4px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .itm-login-mobile-brand {
        margin-bottom: 30px;
    }

    .itm-login-heading p {
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .itm-login-input input,
    .itm-login-submit {
        transition: none;
    }
}
