:root {
    --primary: #635bff;
    --primary-hover: #5149df;
    --primary-soft: #eeecff;
    --text: #172033;
    --muted: #667085;
    --subtle: #98a2b3;
    --border: #dfe4ec;
    --surface: #ffffff;
    --background: #f7f8fb;
    --danger: #b42318;
    --danger-soft: #fff3f1;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, .88fr) minmax(500px, 1.12fr); }

.auth-brand {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 42px 54px 34px;
    background: #f1f3f8;
    border-right: 1px solid #e1e5ec;
}

.brand { display: inline-flex; align-items: center; align-self: flex-start; gap: 12px; }
.brand-mark {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    overflow: hidden;
    border-radius: 9px;
    background: var(--primary);
}
.brand-mark i {
    position: absolute;
    width: 15px;
    height: 5px;
    border-radius: 4px;
    background: #fff;
    transform: rotate(-34deg);
}
.brand-mark i:first-child { top: 10px; left: 7px; }
.brand-mark i:last-child { top: 19px; left: 12px; opacity: .7; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .09em; }
.brand-content { width: min(470px, 100%); margin: auto 0; padding: 70px 0; }
.brand-label {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.brand-content h1 { margin: 0; max-width: 450px; font-size: clamp(31px, 3vw, 46px); line-height: 1.09; letter-spacing: -.045em; }
.brand-content > p { max-width: 460px; margin: 23px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.brand-features { display: grid; gap: 14px; margin: 34px 0 0; padding: 0; list-style: none; }
.brand-features li { display: flex; align-items: center; gap: 11px; color: #4d596d; font-size: 12px; font-weight: 500; }
.brand-features span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #e2e0ff; color: var(--primary); font-size: 11px; font-weight: 700; }
.brand-footer { margin: 0; color: var(--subtle); font-size: 10px; }

.auth-content { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 50px 7vw; background: var(--surface); }
.auth-card { width: min(420px, 100%); }
.auth-eyebrow { display: block; margin-bottom: 10px; color: var(--primary); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.auth-heading h2 { margin: 0; font-size: 28px; line-height: 1.25; letter-spacing: -.035em; }
.auth-heading p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.alert { display: flex; align-items: flex-start; gap: 10px; margin-top: 24px; padding: 12px 13px; border: 1px solid #ffd6d2; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 11px; line-height: 1.45; }
.alert svg { width: 17px; height: 17px; flex: 0 0 auto; }
form { margin-top: 29px; }
.field { margin-bottom: 19px; }
.field label { display: block; margin-bottom: 8px; color: #344054; font-size: 11px; font-weight: 600; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.field-label-row a { margin-bottom: 8px; color: var(--primary); font-size: 10px; font-weight: 600; }
.field input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid var(--border); border-radius: 7px; outline: 0; background: #fff; color: var(--text); font-size: 12px; transition: border-color .18s ease, box-shadow .18s ease; }
.field input::placeholder { color: #a4acb9; }
.field input:focus { border-color: #8e88ff; box-shadow: 0 0 0 3px rgba(99, 91, 255, .11); }
.password-field { position: relative; }
.password-field input { padding-right: 47px; }
.password-field button { position: absolute; top: 50%; right: 9px; width: 31px; height: 31px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #8993a4; cursor: pointer; }
.password-field button:hover { background: #f5f6f8; color: #596579; }
.password-field svg { width: 17px; height: 17px; }
.eye-closed, .password-field button.visible .eye-open { display: none; }
.password-field button.visible .eye-closed { display: block; }
.remember { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; color: #596579; font-size: 10px; cursor: pointer; }
.remember input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.submit-button { width: 100%; height: 45px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 7px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; box-shadow: 0 3px 7px rgba(99,91,255,.18); transition: background .18s ease, transform .18s ease; }
.submit-button:hover { background: var(--primary-hover); transform: translateY(-1px); }
.submit-button:active { transform: translateY(0); }
.submit-button svg { width: 16px; height: 16px; }
.auth-support { margin-top: 29px; padding-top: 22px; border-top: 1px solid #edf0f4; text-align: center; }
.auth-support p { display: inline; margin: 0; color: var(--subtle); font-size: 10px; }
.auth-support a { margin-left: 4px; color: var(--primary); font-size: 10px; font-weight: 600; }
.mobile-brand { display: none; }

@media (max-width: 900px) {
    .auth-page { display: block; }
    .auth-brand { display: none; }
    .auth-content { min-height: 100vh; align-items: flex-start; padding: 34px 24px 50px; }
    .mobile-brand { width: 100%; display: flex; align-items: center; gap: 11px; margin-bottom: 68px; }
    .auth-content { flex-direction: column; justify-content: flex-start; }
    .auth-card { margin: 0 auto; }
}

@media (max-width: 480px) {
    .auth-content { padding: 25px 19px 38px; }
    .mobile-brand { margin-bottom: 52px; }
    .auth-heading h2 { font-size: 25px; }
    .field input, .submit-button { height: 47px; }
}