:root {
    color-scheme: light;
    --ink: #172a3c;
    --muted: #687684;
    --blue: #0868a8;
    --blue-deep: #0b2942;
    --red: #c8394b;
    --line: #dce2e7;
    --paper: #f4f2ed;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(460px, 1.08fr);
    min-height: 100vh;
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    overflow: hidden;
    padding: 46px 58px 34px;
    color: #fff;
    background-color: var(--blue-deep);
    isolation: isolate;
}

.brand-panel::before {
    position: absolute;
    z-index: -1;
    right: -150px;
    bottom: 105px;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    content: "";
    transform: rotate(45deg);
}

.brand-panel::after {
    position: absolute;
    z-index: -1;
    right: -82px;
    bottom: 172px;
    width: 295px;
    height: 295px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    content: "";
    transform: rotate(45deg);
}

.brand-topline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
}

.brand-label,
.brand-overline,
.brand-footer,
.section-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.brand-label {
    color: #c3d1dc;
}

.brand-message {
    position: relative;
    z-index: 1;
    margin-top: auto;
    margin-bottom: auto;
    padding: 70px 0 78px;
}

.brand-overline {
    color: #9fb5c7;
}

.brand-message h1 {
    margin: 20px 0 30px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 58px;
    font-weight: 400;
    line-height: 1.05;
}

.brand-accent {
    display: flex;
    width: 100px;
    height: 5px;
    background: #fff;
}

.brand-accent span {
    width: 32px;
    height: 5px;
    background: var(--red);
}

.brand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    color: #a9bdcc;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-footer-mark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.brand-footer-mark i {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
}

.login-main {
    display: grid;
    min-height: 100vh;
    padding: 64px;
    place-items: center;
    background-color: #fff;
    background-image: linear-gradient(90deg, rgba(23, 42, 60, 0.025) 1px, transparent 1px);
    background-size: 48px 100%;
}

.login-column {
    width: min(100%, 390px);
}

.login-heading-block {
    margin-bottom: 36px;
}

.section-kicker {
    color: var(--red);
}

.login-heading-block h2 {
    margin: 11px 0 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    font-weight: 400;
    line-height: 1.1;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    min-width: 0;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #34485a;
    font-size: 13px;
    font-weight: 700;
}

.form-input {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 15px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cbd4dc;
    border-radius: 4px;
    font: inherit;
    font-size: 15px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-input:hover {
    border-color: #8799a8;
}

.form-input:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(8, 104, 168, 0.14);
}

.password-input-container {
    position: relative;
}

.password-input-container .form-input {
    padding-right: 78px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 13px;
    padding: 6px 2px;
    color: var(--blue);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transform: translateY(-50%);
}

.toggle-password:focus-visible {
    border-radius: 2px;
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.btn-submit {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 5px;
    padding: 0 18px;
    color: #fff;
    background: var(--blue);
    border: 0;
    border-radius: 4px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.btn-submit span {
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

.btn-submit:hover {
    background: #075487;
}

.btn-submit:active {
    transform: translateY(1px);
}

.btn-submit:focus-visible {
    outline: 3px solid rgba(8, 104, 168, 0.3);
    outline-offset: 3px;
}

.form-error {
    margin: 0 0 20px;
    padding: 12px 14px;
    color: #8c2632;
    background: #fff2f2;
    border-left: 3px solid var(--red);
    font-size: 13px;
    line-height: 1.5;
}

.form-error[hidden] {
    display: none;
}

.login-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 34px;
    padding-top: 18px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 12px;
}

.login-footer a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 900px) {
    .login-layout {
        grid-template-columns: minmax(300px, 0.8fr) minmax(390px, 1.2fr);
    }

    .brand-panel {
        padding-right: 38px;
        padding-left: 38px;
    }

    .login-main {
        padding: 42px;
    }
}

@media (max-width: 700px) {
    .login-layout {
        display: block;
        min-height: 100vh;
        background: #fff;
    }

    .brand-panel {
        display: none;
    }

    .login-main {
        min-height: 100vh;
        padding: 34px 25px;
        background-size: 38px 100%;
    }

    .login-column {
        width: min(100%, 390px);
    }

    .login-heading-block {
        margin-bottom: 30px;
    }
}

@media (max-width: 380px) {
    .login-main {
        padding-right: 20px;
        padding-left: 20px;
    }

    .login-heading-block h2 {
        font-size: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
