:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #667085;
    --line: #858fa1;
    --surface: #f7f9fc;
    --white: #ffffff;
    --accent: #1859cf;
    --accent-hover: #124bb4;
    --danger: #b42318;
    --danger-surface: #fff2f0;
    --danger-line: #ffc8c2;
    --radius: 12px;
    font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--surface);
}

body {
    min-height: 100dvh;
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

.page-shell {
    display: grid;
    grid-template-columns: minmax(420px, 1.08fr) minmax(440px, 0.92fr);
    min-height: 100dvh;
}

.brand-panel {
    position: relative;
    isolation: isolate;
    min-height: 100dvh;
    overflow: hidden;
    color: #f8fafc;
    background: #111827;
}

.brand-panel__image,
.brand-panel__shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.brand-panel__image {
    z-index: -2;
    object-fit: cover;
    object-position: 48% 50%;
}

.brand-panel__shade {
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(8, 13, 25, 0.08) 28%, rgba(8, 13, 25, 0.82) 100%),
        linear-gradient(90deg, rgba(8, 13, 25, 0.3), transparent 65%);
}

.brand-panel__content {
    position: absolute;
    left: clamp(32px, 5vw, 80px);
    bottom: clamp(78px, 10vh, 124px);
    max-width: 540px;
    padding-right: 32px;
}

.brand-panel h1 {
    max-width: 12ch;
    margin: 18px 0 20px;
    font-size: clamp(40px, 4.2vw, 66px);
    font-weight: 650;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.brand-panel__copy {
    max-width: 34ch;
    margin: 0;
    color: rgba(248, 250, 252, 0.8);
    font-size: 17px;
    line-height: 1.55;
}

.brand-panel__footer {
    position: absolute;
    right: clamp(28px, 4vw, 60px);
    bottom: 28px;
    margin: 0;
    color: rgba(248, 250, 252, 0.58);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.login-panel {
    display: grid;
    align-items: center;
    min-height: 100dvh;
    padding: clamp(32px, 5.5vw, 88px);
    background: var(--surface);
}

.login-panel__inner {
    width: min(100%, 460px);
    margin: 0 auto;
}

.logo {
    display: block;
    width: 236px;
    height: auto;
    margin-bottom: clamp(56px, 9vh, 104px);
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.14em;
    line-height: 1.3;
    text-transform: uppercase;
}

.eyebrow--light {
    color: #8fb6ff;
}

.login-copy h2 {
    margin: 12px 0 14px;
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 650;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.login-copy > p:last-child {
    max-width: 38ch;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding: 13px 15px;
    color: var(--danger);
    border: 1px solid var(--danger-line);
    border-radius: var(--radius);
    background: var(--danger-surface);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
}

.alert__mark {
    display: grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: var(--danger);
    font-size: 13px;
    font-weight: 800;
}

form {
    display: grid;
    gap: 22px;
    margin-top: 34px;
}

.alert + form {
    margin-top: 24px;
}

.field {
    display: grid;
    gap: 9px;
}

label {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
}

input {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: 3px solid transparent;
    background: var(--white);
    box-shadow: 0 1px 2px rgba(25, 39, 68, 0.04);
    transition: border-color 160ms ease, box-shadow 160ms ease, outline-color 160ms ease;
}

input::placeholder {
    color: var(--muted);
    opacity: 1;
}

input:hover {
    border-color: #717d91;
}

input:focus {
    border-color: var(--accent);
    outline-color: rgba(24, 89, 207, 0.14);
    box-shadow: 0 0 0 1px var(--accent);
}

input:-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    box-shadow: 0 0 0 1000px var(--white) inset;
}

button {
    width: 100%;
    min-height: 54px;
    margin-top: 4px;
    padding: 14px 22px;
    color: #ffffff;
    border: 0;
    border-radius: var(--radius);
    outline: 3px solid transparent;
    background: var(--accent);
    box-shadow: 0 8px 20px rgba(24, 89, 207, 0.18);
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

button:hover {
    background: var(--accent-hover);
    box-shadow: 0 10px 24px rgba(24, 89, 207, 0.24);
}

button:focus-visible {
    outline-color: rgba(24, 89, 207, 0.28);
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 4px var(--accent);
}

button:active {
    transform: translateY(1px);
}

.support-copy {
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

@media (max-width: 980px) {
    .page-shell {
        grid-template-columns: minmax(340px, 0.8fr) minmax(420px, 1fr);
    }

    .brand-panel__content {
        left: 36px;
        bottom: 88px;
    }

    .brand-panel h1 {
        font-size: 46px;
    }

    .login-panel {
        padding: 48px;
    }
}

@media (max-width: 760px) {
    .page-shell {
        display: block;
    }

    .brand-panel {
        min-height: 250px;
    }

    .brand-panel__image {
        object-position: 52% 60%;
    }

    .brand-panel__shade {
        background: linear-gradient(180deg, rgba(8, 13, 25, 0.1), rgba(8, 13, 25, 0.76));
    }

    .brand-panel__content {
        left: 24px;
        right: 24px;
        bottom: 24px;
        padding: 0;
    }

    .brand-panel h1 {
        max-width: 18ch;
        margin: 10px 0 0;
        font-size: clamp(30px, 8vw, 42px);
        line-height: 1;
    }

    .brand-panel__copy,
    .brand-panel__footer {
        display: none;
    }

    .login-panel {
        min-height: auto;
        padding: 48px 24px max(48px, env(safe-area-inset-bottom));
    }

    .logo {
        width: 210px;
        margin-bottom: 48px;
    }
}

@media (max-width: 420px) {
    .brand-panel {
        min-height: 212px;
    }

    .brand-panel h1 {
        font-size: 29px;
    }

    .login-panel {
        padding-top: 38px;
    }

    .logo {
        width: 190px;
        margin-bottom: 40px;
    }

    .login-copy h2 {
        font-size: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
