body.auth-page {
    --auth-red: #dc143c;
    --auth-red-hover: #b8112e;
    --auth-ink: #252d3a;
    --auth-muted: #687181;
    --auth-border: #d8dce2;
    --auth-surface: #fff;
    --auth-background: #fff;
    min-height: 100dvh;
    color: var(--auth-ink);
    background: var(--auth-background);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body.auth-page .login-container {
    min-height: 100dvh;
    padding: 32px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-background);
}

body.auth-page .auth-layout {
    width: min(100%, 400px);
    margin: 0 auto;
    transform: translateY(-20px);
}

body.auth-page .auth-brand {
    text-align: center;
    margin: 0 auto 24px;
}

body.auth-page .auth-brand img {
    display: block;
    width: min(160px, 48vw);
    height: auto;
    margin: 0 auto 16px;
}

body.auth-page .auth-brand p {
    margin: 0;
    color: #78808d;
    font-size: 16px;
    line-height: 1.45;
}

body.auth-page .login-box.auth-card {
    width: 100%;
    max-width: none;
    padding: 24px;
    background: var(--auth-surface);
    border: 1px solid #eaecf0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(36, 45, 57, .055);
}

body.auth-page .auth-card-title {
    margin: 0 0 28px;
    color: var(--auth-ink);
    font-size: 21px;
    font-weight: 650;
    line-height: 1.35;
}

body.auth-page .auth-form .form-group {
    margin: 0 0 20px;
}

body.auth-page .auth-form label {
    display: block;
    margin: 0 0 7px;
    color: #424b59;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

body.auth-page .required-mark {
    color: var(--auth-red);
    padding-left: 2px;
}

body.auth-page .auth-form input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1.5px solid var(--auth-border);
    border-radius: 8px;
    outline: none;
    color: #303846;
    background: #fff;
    font: inherit;
    font-size: 15px;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

body.auth-page .auth-form input::placeholder {
    color: #a1a7b1;
}

body.auth-page .auth-form input:focus {
    border-color: var(--auth-red);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, .11);
}

body.auth-page .password-field {
    position: relative;
}

body.auth-page .password-field input {
    padding-right: 58px;
}

body.auth-page .password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #89919d;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .16s ease, background-color .16s ease;
}

body.auth-page .password-toggle:hover {
    color: #424b59;
    background: #f1f2f4;
}

body.auth-page .password-toggle:focus-visible,
body.auth-page .password-generator button:focus-visible,
body.auth-page .btn-login:focus-visible {
    outline: 3px solid rgba(220, 20, 60, .26);
    outline-offset: 3px;
}

body.auth-page .password-toggle svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.auth-page .password-toggle .icon-eye-off,
body.auth-page .password-toggle[aria-pressed="true"] .icon-eye {
    display: none;
}

body.auth-page .password-toggle[aria-pressed="true"] .icon-eye-off {
    display: block;
}

body.auth-page .btn-login {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--auth-red);
    font: inherit;
    font-size: 16px;
    font-weight: 650;
    cursor: pointer;
    transition: background-color .16s ease, transform .16s ease;
}

body.auth-page .btn-login:hover {
    background: var(--auth-red-hover);
}

body.auth-page .btn-login:active {
    transform: translateY(1px);
}

body.auth-page .btn-login svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.auth-page .auth-help {
    max-width: 650px;
    margin: 22px auto 0;
    color: #7b8390;
    font-size: 14px;
    line-height: 1.65;
    text-align: center;
}

body.auth-page .auth-help strong {
    color: #545d6a;
    font-weight: 650;
}

body.auth-page .auth-info {
    margin: 0 0 26px;
    border-left: 3px solid #c8d4e2;
    border-radius: 5px;
    color: #536071;
    background: #f4f7fa;
    line-height: 1.65;
}

body.auth-page .auth-info strong {
    color: #303b4a;
}

body.auth-page .auth-submit-secondary {
    margin-top: 4px;
}

body.auth-page .error-message,
body.auth-page .success-message {
    padding: 13px 15px;
    border-radius: 9px;
    margin: 0 0 22px;
    line-height: 1.5;
    text-align: left;
}

body.auth-page .error-message {
    border: 1px solid #f3c7cf;
    color: #8e2034;
    background: #fff3f5;
}

body.auth-page .success-message {
    border: 1px solid #cbe5d2;
    color: #245c36;
    background: #f1faf3;
}

body.auth-page .blocked-message {
    padding: 26px 20px;
    border: 1px solid #f0dfb5;
    border-radius: 10px;
    color: #735e2b;
    background: #fff9e9;
}

body.auth-page .blocked-message i {
    color: var(--auth-red);
}

body.auth-page .password-generator {
    margin: 4px 0 22px;
    padding: 18px;
    border: 1px solid #e5e8ed;
    border-radius: 11px;
    color: #424b59;
    background: #f7f8fa;
    line-height: 1.6;
}

body.auth-page .password-generator button {
    margin: 12px 8px 0 0;
    padding: 9px 14px;
    border: 1px solid #d6dbe2;
    border-radius: 7px;
    color: #424b59;
    background: #fff;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease;
}

body.auth-page .password-generator button:hover {
    border-color: #b9c0ca;
    background: #f1f3f5;
}

body.auth-page .generated-password {
    color: #384353;
}

@media (max-width: 600px) {
    body.auth-page .auth-layout {
        transform: translateY(-12px);
    }

    body.auth-page .login-container {
        align-items: flex-start;
        padding: 36px 16px 26px;
    }

    body.auth-page .auth-brand {
        margin-bottom: 28px;
    }

    body.auth-page .auth-brand img {
        width: 150px;
        margin-bottom: 17px;
    }

    body.auth-page .login-box.auth-card {
        padding: 24px 22px;
        border-radius: 12px;
    }

    body.auth-page .auth-card-title {
        margin-bottom: 22px;
        font-size: 19px;
    }

    body.auth-page .auth-form .form-group {
        margin-bottom: 20px;
    }

    body.auth-page .auth-form label {
        font-size: 14px;
        margin-bottom: 7px;
    }

    body.auth-page .auth-form input {
        height: 44px;
        padding-left: 12px;
        font-size: 16px;
        border-radius: 8px;
    }

    body.auth-page .btn-login {
        min-height: 44px;
        font-size: 16px;
    }

    body.auth-page .password-generator {
        padding: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.auth-page *,
    body.auth-page *::before,
    body.auth-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
