.auth-page {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 70px 16px 24px;
}

.auth-modal {
    box-sizing: content-box;
    width: 300px;
    max-width: calc(100vw - 90px);
    padding: 28px;
    background: #282828;
    border: 1px solid #3a3a3a;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.auth-modal-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.auth-modal-logo img {
    max-width: 180px;
    max-height: 90px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.auth-modal-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-field {
    margin-bottom: 12px;
}

.auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 13px;
    background: #282828;
    border: 1px solid #4a4a4a;
    border-radius: 10px;
    color: #f2f2f2;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}

.auth-input::placeholder {
    color: #9a9a9a;
}

.auth-input:focus {
    border-color: #f2f2f2;
}

.auth-hint {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #9a9a9a;
}

.auth-captcha {
    margin: 4px 0 14px;
    width: 300px;
    max-width: 100%;
    min-height: 65px;
    display: flex;
    justify-content: center;
}

.auth-submit {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 10px;
    background: #f5f5f5;
    color: #111;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.auth-submit:hover {
    background: #ffffff;
}

.auth-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.auth-submit:disabled:hover {
    background: #f5f5f5;
}

.auth-legal {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: #c4c4c4;
}

.auth-legal a {
    color: #3b9cff;
    text-decoration: none;
}

.auth-legal a:hover,
.auth-switch a:hover {
    text-decoration: underline;
}

.auth-switch {
    margin: 16px 0 0;
    text-align: center;
    font-size: 14px;
    color: #c4c4c4;
}

.auth-switch a {
    margin-left: 6px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.auth-social-label {
    margin: 20px 0 12px;
    text-align: center;
    font-size: 13px;
    color: #9a9a9a;
}

.auth-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.auth-social-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #4a4a4a;
    border-radius: 12px;
    background: transparent;
    color: #e6e6e6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.auth-social-btn:hover {
    background: #333;
    border-color: #6a6a6a;
    transform: translateY(-1px);
}

.auth-social-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.auth-social-btn:disabled:hover {
    background: transparent;
    border-color: #4a4a4a;
    transform: none;
}

body.light-theme .auth-modal {
    background: #ffffff;
    border-color: #d9d9d9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

body.light-theme .auth-input {
    background: #ffffff;
    border-color: #cfcfcf;
    color: #1a1a1a;
}

body.light-theme .auth-input::placeholder,
body.light-theme .auth-hint,
body.light-theme .auth-social-label {
    color: #7a7a7a;
}

body.light-theme .auth-input:focus {
    border-color: #1a1a1a;
}

body.light-theme .auth-submit {
    background: #262626;
    color: #fff;
}

body.light-theme .auth-submit:hover {
    background: #000;
}

body.light-theme .auth-submit:disabled:hover {
    background: #262626;
}

body.light-theme .auth-legal,
body.light-theme .auth-switch {
    color: #555;
}

body.light-theme .auth-legal a {
    color: #0a66d6;
}

body.light-theme .auth-switch a {
    color: #111;
}

body.light-theme .auth-social-btn {
    border-color: #cfcfcf;
    color: #262626;
}

body.light-theme .auth-social-btn:hover {
    background: #f0f0f0;
    border-color: #a8a8a8;
}

body.light-theme .auth-social-btn:disabled:hover {
    background: transparent;
    border-color: #cfcfcf;
}

@media (max-width: 420px) {
    .auth-modal {
        width: auto;
        max-width: none;
        padding: 20px;
    }

    .auth-captcha {
        width: auto;
    }
}
