/* Вход / восстановление пароля — корень .auth-modal--login (без конфликтов с .email/.heading страниц) */
.auth-modal--login .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
    box-sizing: border-box;
}

.auth-modal--login .hidden {
    display: none;
}

.auth-modal--login .modal-input {
    background: transparent;
    border: 0;
    outline: none;
    color: #d1d5dc;
    width: 100%;
    min-width: 0;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

.auth-modal--login .modal-input::placeholder {
    color: #6a7282;
}

.auth-modal--login .popap-login {
    width: 100%;
    max-width: 402px;
    position: relative;
    box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 21px;
    background: linear-gradient(180deg, #101828, #000);
    border: 1px solid rgba(191, 21, 160, 0.3);
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1px;
    isolation: isolate;
    gap: 10px;
    text-align: center;
    font-size: 26.25px;
    color: #99a1af;
    font-family: Arial, sans-serif;
}

.auth-modal--login .popap-login .am-panel {
    min-height: 0;
    width: 400px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px;
    box-sizing: border-box;
    gap: 28px;
    z-index: 0;
}

.auth-modal--login .popap-login .auth-modal-login__header {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.auth-modal--login .plmh-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
    flex-shrink: 0;
}

.auth-modal--login .plmh-glow {
    position: absolute;
    left: 0;
    top: 0;
    width: 70px;
    height: 70px;
    border-radius: 14px;
    background: linear-gradient(180deg, #bf15a0, #5c0087);
    opacity: 0.5;
    filter: blur(24px);
    pointer-events: none;
}

.auth-modal--login .plmh-icon-box {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(180deg, #bf15a0, #5c0087);
    box-shadow:
        0px 10px 15px 0px rgba(0, 0, 0, 0.1),
        0px 4px 6px 0px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-sizing: border-box;
}

.auth-modal--login .plmh-lightning {
    display: block;
    width: 28px;
    height: 28px;
}

.auth-modal--login .am-headline-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px 79px;
}

.auth-modal--login .am-title-gradient {
    position: relative;
    line-height: 31.5px;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)), linear-gradient(90deg, #fff, #e9d4ff 50%, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-modal--login .popap-login .auth-modal-login__subtitle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.auth-modal--login .popap-login .auth-modal-login__subtitle {
    margin: 0;
    color: #99a1af;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    text-align: center;
    max-width: 100%;
}

.auth-modal--login .am-form {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: left;
    font-size: 12.25px;
    color: #d1d5dc;
    width: 100%;
}

.auth-modal--login .am-input-fields {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 17px;
    width: 100%;
    max-width: 334px;
}

.auth-modal--login .am-field {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-sizing: border-box;
}

.auth-modal--login .am-field--pass {
    align-items: flex-end;
    gap: 9px;
}

.auth-modal--login .am-label-row {
    width: 100%;
    max-width: 334px;
    min-height: 17px;
    height: auto;
    display: flex;
    align-items: flex-start;
}

.auth-modal--login .am-label {
    flex: 1;
    position: relative;
    line-height: 17.5px;
    font-size: 12.25px;
    text-align: left;
    color: #d1d5dc;
}

.auth-modal--login .am-input-box {
    width: 100%;
    max-width: 334px;
    height: 47px;
    border-radius: 12px;
    background-color: rgba(30, 41, 57, 0.5);
    border: 1px solid #364153;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 14px;
    color: #6a7282;
}

.auth-modal--login .field-icon {
    height: 18px;
    width: 18px;
    flex-shrink: 0;
    object-fit: contain;
}

.auth-modal--login .popap-login .am-pass-box {
    width: 100%;
    max-width: 334px;
    height: 47px;
    border-radius: 12px;
    background-color: rgba(30, 41, 57, 0.5);
    border: 1px solid #364153;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    gap: 20px;
    font-size: 14px;
    color: #6a7282;
}

.auth-modal--login .popap-login .am-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.auth-modal--login .iconeye-btn {
    margin: 0;
    padding: 3px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    color: #99a1af;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.auth-modal--login .iconeye-btn:hover {
    color: #e9d4ff;
    background-color: rgba(191, 21, 160, 0.15);
}

.auth-modal--login .iconeye-btn:active {
    transform: scale(0.95);
}

.auth-modal--login .iconeye {
    height: 20px;
    width: 20px;
    display: block;
}

.auth-modal--login .button-and-icon {
    width: 100%;
    max-width: 334px;
    height: 42px;
    box-shadow: 0px 10px 15px -3px rgba(173, 70, 255, 0.5), 0px 4px 6px -4px rgba(173, 70, 255, 0.5);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(180deg, #bf15a0, #a70088 50%, #5c0087);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    box-sizing: border-box;
    font-size: 14px;
    color: #fff;
    transition:
        filter 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.auth-modal--login .button-and-icon:hover {
    filter: brightness(1.08);
    box-shadow:
        0px 12px 22px -3px rgba(173, 70, 255, 0.55),
        0px 6px 10px -4px rgba(173, 70, 255, 0.45);
}

.auth-modal--login .button-and-icon:active {
    transform: translateY(1px);
    filter: brightness(0.96);
}

.auth-modal--login .am-btn-label {
    position: relative;
    line-height: 21px;
    color: #fff;
    font-weight: 700;
}

.auth-modal--login .am-down-fields {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 17px;
    text-align: center;
    color: #99a1af;
    width: 100%;
}

.auth-modal--login .link-forgot {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 12.25px;
    line-height: 17.5px;
    color: #99a1af;
    text-decoration: underline;
    text-align: center;
    transition:
        color 0.2s ease,
        text-shadow 0.2s ease,
        transform 0.15s ease;
}

.auth-modal--login .link-forgot:hover {
    color: #fff;
    text-shadow: 0 0 14px rgba(191, 21, 160, 0.5);
}

.auth-modal--login .link-forgot:active {
    transform: scale(0.98);
}

.auth-modal--login .am-down-fields-sep {
    width: 100%;
    max-width: 335px;
    height: 1px;
    position: relative;
    border-top: 1px solid rgba(153, 161, 175, 0.5);
    box-sizing: border-box;
}

.auth-modal--login .am-down-hint-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px 8px;
    text-align: left;
    color: #fff;
}

.auth-modal--login .am-down-hint-text {
    position: relative;
    line-height: 17.5px;
    font-size: 12.25px;
}

.auth-modal--login .link-register {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 12.25px;
    line-height: 17.5px;
    color: #99a1af;
    text-decoration: underline;
    text-align: center;
    transition:
        color 0.2s ease,
        text-shadow 0.2s ease,
        transform 0.15s ease;
}

.auth-modal--login .link-register:hover {
    color: #fff;
    text-shadow: 0 0 14px rgba(191, 21, 160, 0.5);
}

.auth-modal--login .link-register:active {
    transform: scale(0.98);
}

.auth-modal--login .button-close {
    height: 35px;
    width: 35px;
    margin: 0 !important;
    position: absolute;
    top: 14px;
    right: 14px;
    left: auto;
    border-radius: 12.75px;
    background-color: rgba(30, 41, 57, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #99a1af;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-modal--login .button-close:hover {
    color: #f87171;
    background-color: rgba(220, 38, 38, 0.28);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.45);
}

.auth-modal--login .button-close:active {
    color: #ef4444;
    background-color: rgba(185, 28, 28, 0.4);
}

.auth-modal--login .button-close:focus-visible {
    outline: 2px solid #f87171;
    outline-offset: 2px;
}

.auth-modal--login .iconbase {
    height: 17.5px;
    width: 17.5px;
    position: relative;
    display: block;
    flex-shrink: 0;
}

.auth-modal--login .auth-forgot-feedback {
    width: 100%;
    max-width: 334px;
    margin: 0 auto;
    padding: 12px 14px;
    border-radius: 12px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 19px;
    text-align: center;
    box-sizing: border-box;
}

.auth-modal--login .auth-forgot-feedback--error {
    color: #fecaca;
    background: rgba(220, 38, 38, 0.16);
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.auth-modal--login .auth-forgot-feedback--success {
    color: #bbf7d0;
    background: rgba(22, 163, 74, 0.14);
    border: 1px solid rgba(74, 222, 128, 0.35);
}

.auth-modal--login .modal-input:focus,
.auth-modal--login .modal-input:focus-visible {
    outline: none;
    box-shadow: none;
}

.auth-modal--login .modal-input::selection {
    background: rgba(191, 21, 160, 0.45);
    color: #fff;
}

.auth-modal--login .am-input-box:focus-within,
.auth-modal--login .am-pass-box:focus-within {
    border-color: rgba(191, 21, 160, 0.65);
    box-shadow: 0 0 0 1px rgba(191, 21, 160, 0.4);
}
