:root {
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: #414141;
}

button,
input {
    font: inherit;
}

.account-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.account-shape {
    position: absolute;
    top: 18px;
    left: calc(50% + 210px);
    width: auto;
    max-width: none;
    height: auto;
    pointer-events: none;
    opacity: 0.82;
}

.account-main {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 48px));
    min-height: 810px;
    margin: 0 auto;
    padding: 190px 0 100px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
    gap: 112px;
    align-items: center;
}

.auth-intro {
    max-width: 510px;
}

.auth-eyebrow,
.auth-kicker {
    margin: 0;
    color: #3598fe;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.auth-intro h1 {
    margin: 18px 0 24px;
    color: #414141;
    font-size: clamp(42px, 4vw, 58px);
    font-weight: 500;
    line-height: 1.14;
}

.auth-intro > p:not(.auth-eyebrow) {
    margin: 0;
    max-width: 460px;
    color: #89898f;
    font-size: 18px;
    line-height: 1.6;
}

.auth-intro-accent {
    width: 160px;
    height: 4px;
    margin-top: 34px;
    border-radius: 100px;
    background: #3598fe;
}

.auth-card {
    width: 100%;
    padding: 44px;
    border: 1px solid rgba(56, 93, 112, 0.08);
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 48px rgba(56, 93, 112, 0.12);
    backdrop-filter: blur(8px);
}

.auth-panel[hidden] {
    display: none !important;
}

.auth-heading {
    margin-bottom: 30px;
}

.auth-heading h2 {
    margin: 10px 0 8px;
    color: #414141;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.25;
    outline: none;
}

.auth-heading > p:last-child {
    margin: 0;
    color: #89898f;
    font-size: 15px;
    line-height: 1.55;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.auth-field label {
    color: #385d70;
    font-size: 14px;
    font-weight: 600;
}

.auth-field input {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid rgba(56, 93, 112, 0.22);
    border-radius: 14px;
    outline: none;
    background: #fff;
    color: #414141;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input::placeholder {
    color: #a6a6ad;
}

.auth-field input:focus {
    border-color: #3598fe;
    box-shadow: 0 0 0 4px rgba(53, 152, 254, 0.13);
}

.auth-field input[aria-invalid='true'] {
    border-color: #c54444;
    box-shadow: 0 0 0 4px rgba(197, 68, 68, 0.12);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    padding: 6px;
    border: 0;
    background: transparent;
    color: #3598fe;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.field-error {
    margin: 2px 2px 0;
    color: #a43131;
    font-size: 13px;
    line-height: 1.4;
}

.auth-submit {
    width: 100%;
    min-height: 54px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-submit {
    margin-top: 4px;
    border: 1px solid #3598fe;
    background: #3598fe;
    color: #fff;
}

.auth-submit:hover {
    opacity: 0.9;
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:focus-visible,
.auth-link:focus-visible,
.password-toggle:focus-visible {
    outline: 3px solid rgba(53, 152, 254, 0.25);
    outline-offset: 3px;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 16px;
}

.auth-link {
    display: block;
    margin: 0 auto;
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: #385d70;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.auth-link:hover {
    color: #3598fe;
}

.auth-back {
    margin-top: 24px;
}

.form-message {
    padding: 13px 15px;
    border: 1px solid rgba(32, 139, 94, 0.2);
    border-radius: 12px;
    background: #f0faf6;
    color: #176f4b;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
}

.form-message--error {
    border-color: rgba(197, 68, 68, 0.2);
    background: #fff4f4;
    color: #a43131;
}

.account-footer {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: 40px 0;
    border-top: 1px solid rgba(56, 93, 112, 0.1);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    color: #89898f;
    font-size: 14px;
    line-height: 1.6;
}

.account-footer p {
    margin: 0 0 5px;
}

.account-footer .account-footer-title {
    color: #73737a;
    font-weight: 600;
}

.account-footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.account-footer a {
    color: #89898f;
    text-decoration: none;
}

.account-footer a:hover {
    color: #3598fe;
}

@media (max-width: 1024px) {
    .account-shape {
        display: block !important;
        left: 60%;
        opacity: 0.32;
    }

    .account-main {
        grid-template-columns: minmax(0, 0.9fr) minmax(400px, 1.1fr);
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .account-page {
        min-height: 100vh !important;
    }

    .account-shape {
        display: none !important;
    }

    .account-main {
        width: min(100% - 32px, 520px);
        min-height: 0;
        padding: 52px 0 64px;
        display: flex;
        flex-direction: column;
        gap: 34px;
        align-items: stretch;
    }

    .auth-intro {
        max-width: none;
        text-align: center;
    }

    .auth-intro h1 {
        margin: 12px 0 14px;
        font-size: 32px;
    }

    .auth-intro > p:not(.auth-eyebrow) {
        font-size: 16px;
    }

    .auth-intro-accent {
        width: 110px;
        margin: 22px auto 0;
    }

    .auth-card {
        padding: 30px 22px;
        border-radius: 28px;
    }

    .auth-heading h2 {
        font-size: 27px;
    }

    .account-footer {
        width: min(100% - 44px, 500px);
        padding: 32px 0 44px;
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .account-footer-links {
        align-items: flex-start;
    }
}

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