@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&display=swap');

/* ── Обёртка формы ── */
.bx-system-auth-form {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

/* ── Кнопка закрытия ── */
.am-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border: 0.5px solid #e0e0e0;
    background: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #888;
    line-height: 1;
    text-decoration: none;
    transition: 0.3s;
}

.am-close:hover {
    background: #eee;
    color: #444;
    transition: 0.3s;
}

/* ── Верхний блок ── */
.am-top {
    padding: 36px 36px 24px;
}

.am-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.am-logo img {
    width: 100%;
}

.am-text-block {
    display: flex;
    align-items: start;
    flex-direction: column;
}

.am-logo-dot {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.am-logo-dot span {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.am-logo-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.am-title {
    font-size: 24px;
    font-weight: 500;
    color: #1a1a1a;
    letter-spacing: -0.03em;
    margin: 0 0 4px;
}

.am-sub {
    font-size: 14px;
    color: #888;
    margin: 0;
    font-weight: 300;
}

/* ── Тело формы ── */
.am-body {
    padding: 0 36px 28px;
}

/* ── Поля ── */
.am-field {
    margin-bottom: 14px;
}

.am-label {
    font-size: 11px;
    font-weight: 500;
    color: #616161;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.am-input {
    width: 100% !important;
    box-sizing: border-box;
    height: 44px;
    border: 1px solid #ccc !important;
    border-radius: 10px !important;
    background: #ffffff;
    padding: 0 14px;
    font-size: 14px !important;
    font-family: 'DM Sans', sans-serif;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.am-input:focus {
    border-color: #000;
}

.am-input::placeholder {
    color: #bbb;
}

/* ── Строка «Запомнить / Забыли пароль» ── */
.am-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    margin-top: 6px;
}

.am-check-label {
    display: flex;
    align-items: center;
    font-weight: 400 !important;
    gap: 7px;
    font-size: 13px;
    color: #888;
    cursor: pointer;
}

.am-check {
    width: 15px;
    height: 15px;
    accent-color: #1a1a1a;
    cursor: pointer;
}

.am-forgot {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    border-bottom: 0.5px solid #ccc;
    padding-bottom: 1px;
    transition: color 0.12s;
}

.am-forgot:hover {
    color: #444;
}

/* ── Кнопка входа ── */
.am-btn {
    width: 100%;
    height: 44px;
    background: #C42362;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    letter-spacing: -0.01em;
    transition: opacity 0.15s, transform 0.1s;
}

.am-btn:hover {
    opacity: 0.82;
}

.am-btn:active {
    transform: scale(0.99);
}

/* ── Футер ── */
.modal-footer {
    padding: 16px 36px 24px;
    border-top: 0.5px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.modal-footer a {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 0.5px solid #ccc;
    padding-bottom: 1px;
    font-family: 'DM Sans', sans-serif;
}

.modal-footer a:hover {
    border-bottom-color: #888;
}

/* ── Сообщения об ошибках ── */
.bx-system-auth-form .errortext {
    font-size: 13px;
    color: #c0392b;
    background: #fdf0ef;
    border: 0.5px solid #f5c6c2;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 0 36px 16px;
}