@font-face {
    font-family: 'AM Segoe';
    font-weight: 400;
    src: local('Segoe UI'), local('SegoeUI');
    ascent-override: 91%;
    descent-override: 29%;
    line-gap-override: 0%;
}
@font-face {
    font-family: 'AM Segoe';
    font-weight: 700;
    src: local('Segoe UI Bold'), local('SegoeUI-Bold'), local('Segoe UI Semibold');
    ascent-override: 91%;
    descent-override: 29%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'AM Montserrat ExtraBold';
    src: url('../../../media/fonts/Montserrat-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --am-bg: #23224a;
    --am-input: #13132b;
    --am-text: #fff;
    --am-muted: #a6a6c0;
    --am-placeholder: #acabbc;
    --am-border: #656585;
    --am-green: #4aa51a;
    --am-green-hover: #57b926;
    --am-check: #50952a;
    --am-link: #5fa14c;
    --am-accent: #f2b72b;
    --am-error: #ff6b6b;
}

.h-btn-auth {
    display: inline-flex;
    text-decoration: none;
    cursor: pointer;
    align-items: center;
    gap: 6px;
    background-color: #4aa31f;
    color: #fff;
    border: 0;
    border-radius: 5px;
    padding: 9px 12px;
    font-weight: 700;
    text-wrap: nowrap;
}
@media (hover:hover) and (pointer:fine) {
    .h-btn-auth:hover { background-color: #57b926; color: #fff; }
}

.am-slot { display: flex; align-items: center; flex: 0 0 auto; padding: 0 8px; }
.am-slot[data-am-place]:not(.am-placed) { visibility: hidden; }

.am-modal, .am-modal *, .am-modal *::before, .am-modal *::after { box-sizing: border-box; }
.am-modal { font-family: 'AM Segoe', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif; }
.am-modal button, .am-modal input { font-family: inherit; }
.am-modal .modal-dialog { max-width: 956px; }
.am-modal .modal-content.am-dialog {
    flex-direction: row;
    width: 100%;
    height: 684px;
    color: var(--am-text);
    background-color: var(--am-bg) !important;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
    overflow: hidden;
}

.am-dialog { position: relative; display: flex; color: var(--am-text); border-radius: 8px; overflow: hidden; }
@keyframes am-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.am-aside {
    position: relative;
    flex: 0 0 432px;
    width: 432px;
    height: 684px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #474d79;
    background-image:
        radial-gradient(395px 420px at 94% 86%, rgba(89, 134, 179, .9) 0%, rgba(89, 134, 179, 0) 100%),
        radial-gradient(406px 415px at 14% 71%, rgba(246, 199, 47, .35) 0%, rgba(246, 199, 47, 0) 100%),
        linear-gradient(215deg,
            #424778 0%, #454a7a 15%, #494f79 30%, #4f5075 40%, #565369 52%,
            #615a69 63%, #6a615f 72%, #706562 80%, #7d705c 100%);
}
.am-aside-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
}
.am-aside-title {
    position: relative;
    z-index: 2;
    padding: 30.5px 20px 0;
    font-family: 'AM Montserrat ExtraBold', Montserrat, Arial, sans-serif;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}
.am-aside-line { display: block; font-size: 31.75px; color: #fff; -webkit-text-stroke: 1.1px currentColor; paint-order: stroke fill; }
.am-aside-line.am-accent { font-size: 42.5px; color: var(--am-accent); }

.am-main { position: relative; flex: 1 1 auto; min-width: 0; padding: 0 24.5px; border-radius: 0 8px 8px 0; }   /* поля и кнопка симметричны: слева и справа по 24.5px */

.am-close {
    position: absolute;
    top: 12px;
    right: 17px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #fff;
    background: var(--am-input);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    z-index: 3;
}
.am-close:hover { background: #0d0d22; }

.am-title { margin: 0; padding-top: 21.9px; font-size: 32.4px; line-height: 38px; font-weight: 700; color: #fff; }
.am-line { width: 268px; max-width: 100%; height: 1px; margin-top: 23.1px; background: rgba(255, 255, 255, .55); }
.am-line-sm { margin: 17px 0 12.6px; }

.am-form { margin-top: 26px; }
.am-field { position: relative; margin-bottom: 20px; }   /* 13px по макету + 7px под строку ошибки */
.am-field-pass { margin-bottom: 18.6px; }

.am-input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 16px 0 12px;
    color: #e4e3f0;
    font-size: 20px;
    background: var(--am-input);
    line-height: 1.2;
    padding-top: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    outline: 0;
    transition: border-color .15s;
}
.am-input::placeholder { color: var(--am-placeholder); opacity: 1; }
.am-input:focus { border-color: var(--am-green); }
.am-input.am-invalid { border-color: var(--am-error); }

.am-field-msg {
    position: absolute;
    left: 4px;
    right: 0;
    top: calc(100% + 3px);
    font-size: 13px;
    line-height: 15px;
    color: var(--am-error);
    pointer-events: none;
}
.am-field-msg[hidden] { display: none; }

.am-field-pass .am-input { padding-right: 56px; }
.am-eye {
    position: absolute;
    top: 0;
    right: 18px;
    width: 26px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #828493;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.am-eye:hover { color: #b3b5c4; }
.am-eye.am-on { color: var(--am-green-hover); }

.am-social-label { position: relative; top: 2px; margin: 0 0 0 4px; font-size: 20px; line-height: 24px; font-weight: 400; color: #fff; }
.am-field + .am-social-label { margin-top: 0; }
.am-google {
    width: 34px;
    height: 33px;
    display: grid;
    place-items: center;
    margin: 15.4px 0 0 8px;
    padding: 0;
    background: rgba(10, 8, 40, .25);
    border: 1.5px solid #a5a5c0;
    border-radius: 6px;
    cursor: pointer;
}
.am-google:hover { border-color: #fff; }

.am-line-sm + .am-social-label { top: 4.5px; margin-bottom: 16.4px; }

.am-check { position: relative; display: flex; align-items: center; gap: 12px; margin: 21.5px 0 0 8px; cursor: pointer; color: var(--am-muted); font-size: 16.8px; line-height: 18px; }
.am-field + .am-check { margin-top: 32.5px; }
.am-check input { position: absolute; opacity: 0; pointer-events: none; }
.am-box {
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    margin-top: 0;
    border: 1.5px solid #9a9ab6;
    border-radius: 8px;
    background: rgba(10, 8, 40, .25);
    position: relative;
}
.am-check input:checked + .am-box::after {
    content: "";
    position: absolute;
    inset: -1.5px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 27'%3E%3Cpath d='M7.8 14l3.6 3.7L18.8 8.6' fill='none' stroke='%234fa427' stroke-width='3.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 27px 27px no-repeat;
}
.am-check input:focus-visible + .am-box { outline: 2px solid var(--am-green); outline-offset: 2px; }
.am-check input.am-invalid + .am-box { border-color: var(--am-error); }
.am-check-text { display: flex; align-items: center; min-height: 27px; min-width: 0; }
.am-check-in { display: block; }
.am-br { display: none; }
@media (min-width: 768px) {
    .am-check-in { white-space: nowrap; }
    .am-br { display: inline; }
}
.am-check-text a { color: #f2f0ff; font-weight: 700; text-decoration: none; }
.am-check-text a:hover { text-decoration: underline; }

.am-submit {
    display: block;
    width: calc(100% - 21px);
    height: 40px;
    margin: 33px 0 0 10.5px;
    padding: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(90deg, #589a35 0%, #4aa51a 100%);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}
.am-submit:hover { background: linear-gradient(90deg, #62a83e 0%, #54b422 100%); }
.am-submit:disabled { opacity: .6; cursor: default; }

.am-switch { margin-top: 10.8px; text-align: center; color: #ababc3; font-size: 19.2px; line-height: 22px; }
.am-switch a { margin-left: 8px; color: var(--am-link); font-size: 20px; font-weight: 700; text-decoration: none; }
.am-switch a:hover { text-decoration: underline; }

.am-verify {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(0, 0, 0, .33);
}
.am-verify[hidden] { display: none; }
.am-dialog-verify {
    position: absolute;
    left: 133px;
    top: 137px;
    width: 706px;
    height: 380px;
    display: block;
    padding: 68px 37.5px 0;
    background-color: #24234b;
    background-image: linear-gradient(213deg,
        #23224b 0%, #24244b 20%, #28264a 40%, #2b2949 50%, #312d48 60%,
        #3a3346 70%, #453b44 80%, #534642 90%, #5f503f 100%);
    border-radius: 10px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, .4);
    animation: am-pop .18s ease-out;
}
.am-dialog-verify .am-close { top: 18px; right: 19px; }
.am-title-verify { margin: 0; padding: 0; text-align: center; font-size: 33px; line-height: 40px; }
.am-dialog-verify .am-form { margin-top: 26px; }

@media (min-width: 768px) {
    .am-title-verify { height: 40px; margin: 0 -38px 0 -37px; padding: 0 12px; white-space: nowrap; }
}
.am-dialog-verify .am-field { margin-bottom: 0; }
.am-dialog-verify .am-input { height: 60px; padding: 0 18px; background: var(--am-input); font-size: 20px; }
.am-dialog-verify .am-input::placeholder { color: #b0afc1; }
.am-hint { margin: 8px 0 0 14.6px; color: #bcbacf; font-size: 20px; line-height: 24px; }
.am-dialog-verify .am-error {
    position: absolute;
    left: 51.6px;
    right: 38px;
    top: 232px;
    margin: 0;
    font-size: 16px;
    line-height: 20px;
}
.am-dialog-verify .am-submit { width: calc(100% - 25px); height: 57px; margin: 34px 0 0 12.5px; padding-right: 0; font-size: 20px; }
.am-dialog-verify .am-submit { background: #4ea41f; }
.am-dialog-verify .am-submit:hover { background: #57b926; }
.am-resend {
    display: block;
    width: 100%;
    margin: 14.8px 0 0;
    padding: 0 28px 0 0;
    color: #c1bdcc;
    font-size: 20px;
    line-height: 24px;
    text-align: center;
    background: none;
    border: 0;
    cursor: pointer;
}
.am-resend:hover:not(.am-wait) { color: #fff; text-decoration: underline; }
.am-resend.am-wait { cursor: default; }
.am-resend:focus { outline: 0; }
.am-resend:focus-visible { outline: 2px solid rgba(255, 255, 255, .45); outline-offset: -2px; border-radius: 6px; }
.am-resend:disabled { opacity: .55; cursor: default; text-decoration: none; }

@media (max-width: 767.98px) {
    .am-modal .modal-dialog { margin: 10px auto; max-width: calc(100% - 20px); }
    .am-modal .modal-content.am-dialog { height: auto; min-height: 0; }
    .am-aside { display: none; }
    .am-main { padding: 0 18px 24px; }
    .am-title { font-size: 26px; padding-right: 36px; }
    .am-line { width: 100%; }
    .am-form { margin-top: 20px; }
    .am-check { margin-left: 0; }
    .am-submit { width: 100%; margin-left: 0; }
    .am-google { margin-left: 4px; }
    .am-verify { display: flex; align-items: center; justify-content: center; padding: 16px; }
    .am-verify[hidden] { display: none; }
    .am-dialog-verify { position: relative; left: auto; top: auto; width: 100%; height: auto; padding: 56px 18px 22px; }
    .am-title-verify { font-size: 22px; line-height: 28px; }
    .am-dialog-verify .am-submit { width: 100%; margin-left: 0; padding-right: 0; }
    .am-resend { padding-right: 0; }
    .am-dialog-verify .am-error { position: static; margin: 10px 0 0 14px; }
}

.am-error { margin: 10px 0 0 14px; color: var(--am-error); font-size: 15px; line-height: 1.3; }
.am-error[hidden] { display: none; }
.am-error.am-ok { color: #6fd24a; }
.am-error-general { position: relative; top: 9px; height: 0; margin: 0 0 0 9px; overflow: visible; font-size: 14px; line-height: 16px; }
.am-submit[disabled], .am-resend[disabled] { opacity: .6; cursor: default; }
