/* ============================================================
   ҮҮРЭГ — нэвтрэх/бүртгүүлэх хуудас: бүтэн дэлгэцийн хоёр хэсэгтэй
   загвар (мокапын дагуу). Зүүн — танилцуулга, баруун — форм.
   ============================================================ */

/* Layout-ийн auth_shell (enhance.css) нэвтрэх хуудсыг 440px-ээр
   хязгаарлаж, гар утасны өргөнтэй харагдуулж байсныг тайлна. */
.auth_shell {
    display: block !important;
    padding: 0 !important;
    background: none !important;
    min-height: 0 !important;
}
.auth_shell_inner {
    max-width: none !important;
    width: 100% !important;
    animation: none !important;
}

.av_page {
    min-height: 100vh;
    background: #e7e8f6;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 860px) {
    .av_page { grid-template-columns: 1fr; }
    .av_left { display: none !important; }
}

/* ---------------- Зүүн танилцуулгын панель ---------------- */
.av_left {
    position: relative;
    background: linear-gradient(165deg, #f0f1fc 0%, #e9eafa 55%, #e0e3f8 100%);
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
}
.av_left_top { position: relative; z-index: 2; padding: 44px 52px 0; }

.av_dots {
    position: absolute; top: 84px; right: 120px;
    width: 96px; height: 68px;
    background-image: radial-gradient(#c9ccf0 2.6px, transparent 2.6px);
    background-size: 16px 16px;
    z-index: 1;
}
.av_ball { position: absolute; border-radius: 50%; z-index: 1; }
.av_ball1 { width: 40px; height: 40px; top: 200px; right: 220px; background: #b6bbf1; }
.av_ball2 { width: 22px; height: 22px; top: 500px; right: 90px; background: #c4c8f3; }
.av_ball3 { width: 28px; height: 28px; top: 560px; left: 46%; background: #cdd0f4; }

.av_left_logo {
    width: 76px; height: 76px; border-radius: 19px;
    box-shadow: 0 14px 30px rgba(80, 90, 220, .28);
    margin-bottom: 36px;
}
.av_left_title {
    margin: 0 0 18px;
    font-size: 34px; line-height: 1.22; font-weight: 800; color: #1b1e33;
    letter-spacing: -.3px;
}
.av_left_title em { font-style: normal; color: #6d5ef0; }
.av_left_sub {
    margin: 0 0 30px; max-width: 420px;
    font-size: 15px; line-height: 1.6; color: #6d7390;
}

.av_left_features { display: flex; flex-direction: column; gap: 18px; }
.av_lf { display: flex; align-items: center; gap: 15px; }
.av_lf_icon {
    flex: none; width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.av_lf_icon svg { width: 22px; height: 22px; }
/* Онцлог бүр өөрийн өнгөтэй — илүү өнгөлөг, амьд. */
.av_lf:nth-child(1) .av_lf_icon {
    background: linear-gradient(135deg, #34d399, #16a34a); color: #fff;
    box-shadow: 0 6px 16px rgba(22, 163, 74, .35);
}
.av_lf:nth-child(2) .av_lf_icon {
    background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
}
.av_lf:nth-child(3) .av_lf_icon {
    background: linear-gradient(135deg, #fbbf24, #f0930f); color: #fff;
    box-shadow: 0 6px 16px rgba(240, 147, 15, .35);
}
.av_lf b { display: block; font-size: 14.5px; color: #1b1e33; margin-bottom: 2px; }
.av_lf span { font-size: 12.5px; color: #7a8095; }

.av_left_art { position: relative; z-index: 1; margin-top: 20px; }
.av_left_art svg { display: block; width: min(560px, 92%); margin: 0 auto; }

/* ---------------- Баруун формын хэсэг ---------------- */
.av_right {
    background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 44px 30px;
}
.av_form_col { width: min(440px, 100%); }

.av_title { margin: 0 0 6px; font-size: 30px; font-weight: 800; color: #171a2b; }
.av_sub { margin: 0 0 24px; font-size: 13.5px; color: #7a8095; line-height: 1.5; }

.av_alert {
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    border-radius: 10px; padding: 10px 13px; font-size: 12.5px; margin-bottom: 14px;
}
.av_alert span { display: block; }

/* Дээд том сонголтын товчнууд */
.av_choice {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 13px 14px; margin-bottom: 10px;
    border: 1px solid #e6e8f2; border-radius: 13px; background: #fff;
    font-size: 14px; font-weight: 600; color: #2c3145;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 2px 6px rgba(23, 26, 43, .04);
    transition: border-color .15s, box-shadow .15s;
}
.av_choice:hover { border-color: #c9c6f4; box-shadow: 0 4px 12px rgba(109, 94, 240, .12); }

.av_divider {
    display: flex; align-items: center; gap: 12px;
    margin: 16px 0; color: #a6abbd; font-size: 12px;
}
.av_divider::before, .av_divider::after { content: ''; flex: 1; height: 1px; background: #e8eaf2; }

/* Талбарууд */
.av_field { position: relative; margin-bottom: 12px; }
.av_field_icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: #9aa0b5; display: flex;
}
.av_field input {
    width: 100%; padding: 14px 42px 14px 44px;
    border: 1px solid #e6e8f2; border-radius: 13px;
    font-size: 14px; color: #171a2b; background: #fff;
}
.av_field input::placeholder { color: #a6abbd; }
.av_field input:focus { outline: none; border-color: #6d5ef0; box-shadow: 0 0 0 3px rgba(109, 94, 240, .13); }
.av_field select {
    width: 100%; padding: 14px 42px 14px 44px;
    border: 1px solid #e6e8f2; border-radius: 13px;
    font-size: 14px; color: #171a2b; background-color: #fff;
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa0b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.av_field select:focus { outline: none; border-color: #6d5ef0; box-shadow: 0 0 0 3px rgba(109, 94, 240, .13); }
/* Сонголт хийгээгүй үед placeholder шиг бүдэг харагдана. */
.av_field select:invalid, .av_field select option[value=""] { color: #a6abbd; }
.av_eye {
    position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
    border: 0; background: none; color: #9aa0b5; cursor: pointer; display: flex; padding: 4px;
}
.av_eye svg { width: 18px; height: 18px; }

.av_row { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 20px; }
.av_check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4b5065; cursor: pointer; }
.av_check input { width: 17px; height: 17px; accent-color: #6d5ef0; }
.av_link { font-size: 13px; color: #6d5ef0; font-weight: 600; text-decoration: none; }
.av_link:hover { text-decoration: underline; }

/* ---------------- Бүртгүүлэх — алхамчилсан wizard ---------------- */
.av_headrow { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.av_back {
    flex: none; width: 46px; height: 46px; border-radius: 14px;
    background: #f3f4fb; border: 1px solid #e9eaf5; color: #3c4155;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; text-decoration: none; font-size: 19px;
    transition: background .15s;
}
.av_back:hover { background: #eaebf8; }
.av_headrow .av_title { margin-bottom: 4px; }
.av_headrow .av_sub { margin-bottom: 0; }

/* Алхам заагч */
.av_steps { display: flex; align-items: flex-start; margin: 4px 0 26px; }
.av_step_item { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 64px; }
.av_step_num {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    background: #eef0f9; color: #9aa0b5;
    border: 2px solid #e6e8f2;
    transition: all .2s;
}
.av_step_item.active .av_step_num {
    background: linear-gradient(135deg, #7b61ff, #5a49ec); color: #fff; border-color: transparent;
    box-shadow: 0 6px 14px rgba(109, 94, 240, .35);
}
.av_step_item.done .av_step_num { background: #e7e4fd; color: #6d5ef0; border-color: #cfc9f9; }
.av_step_label { font-size: 11.5px; font-weight: 600; color: #9aa0b5; white-space: nowrap; }
.av_step_item.active .av_step_label { color: #2c3145; }
.av_step_line { flex: 1; height: 2px; background: #e6e8f2; margin-top: 18px; }
.av_step_line.done { background: #b9aefb; }
@media (max-width: 560px) { .av_step_label { display: none; } .av_step_item { min-width: 40px; } }

/* Алхамын агуулга */
.av_step_pane[hidden] { display: none; }
.av_req { color: #ef4444; }

/* Утас — улсын кодтой */
.av_phone { display: flex; gap: 8px; }
.av_phone_cc {
    flex: none; display: flex; align-items: center; gap: 7px;
    padding: 0 14px; border: 1px solid #e6e8f2; border-radius: 13px;
    background: #f8f9fd; font-size: 14px; font-weight: 600; color: #2c3145;
}
.av_phone .av_field { flex: 1; margin-bottom: 0; }
.av_ok {
    position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
    color: #16a34a; display: none;
}
.av_field.is_valid .av_ok { display: flex; }
.av_field.is_valid input { border-color: #86efac; }

/* Нууц үгийн хүч */
.av_strength { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; }
.av_strength_bars { display: flex; gap: 6px; flex: none; width: 190px; }
.av_strength_bars i { flex: 1; height: 4px; border-radius: 999px; background: #e6e8f2; transition: background .2s; }
.av_strength[data-level="1"] i:nth-child(1) { background: #ef4444; }
.av_strength[data-level="2"] i:nth-child(-n+2) { background: #f59e0b; }
.av_strength[data-level="3"] i { background: #22c55e; }
.av_strength span { font-size: 11.5px; color: #9aa0b5; }

/* Буцах (хоёрдогч) товч */
.av_btnrow { display: flex; gap: 10px; }
.av_btn2 {
    flex: none; padding: 15px 22px;
    border: 1px solid #e6e8f2; border-radius: 13px; background: #fff;
    font-size: 14px; font-weight: 700; color: #4b5065; cursor: pointer;
}
.av_btn2:hover { background: #f7f8fc; }
.av_btnrow .av_submit { flex: 1; }

/* ---------------- Бүртгүүлэх форм — бүлэглэсэн загвар ---------------- */
.av_sec {
    display: flex; align-items: center; gap: 8px;
    margin: 20px 0 10px;
    font-size: 11.5px; font-weight: 800; letter-spacing: .8px;
    text-transform: uppercase; color: #9aa0b5;
}
.av_sec:first-child { margin-top: 0; }
.av_sec::after { content: ''; flex: 1; height: 1px; background: #edeef6; }
.av_sec_dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.av_sec.c1 .av_sec_dot { background: #6d5ef0; }
.av_sec.c2 .av_sec_dot { background: #2563eb; }
.av_sec.c3 .av_sec_dot { background: #16a34a; }

.av_grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 520px) { .av_grid2 { grid-template-columns: 1fr; } }

.av_label { display: block; font-size: 12.5px; font-weight: 700; color: #3c4155; margin: 0 0 5px 2px; }
.av_opt { font-weight: 500; color: #a6abbd; }
.av_hint { display: block; font-size: 11.5px; color: #9aa0b5; margin: -6px 0 12px 2px; }

.av_terms { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: #4b5065; margin: 4px 0 18px; line-height: 1.5; cursor: pointer; }
.av_terms input { width: 16px; height: 16px; accent-color: #6d5ef0; margin-top: 1px; flex: none; }
.av_terms a { color: #6d5ef0; text-decoration: none; font-weight: 600; }

/* Илгээх товч — баруун талдаа сумтай */
.av_submit {
    position: relative;
    width: 100%; padding: 15px 46px 15px 20px;
    border: 0; border-radius: 13px;
    background: linear-gradient(90deg, #6d5ef0, #5a49ec);
    color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 24px rgba(109, 94, 240, .35);
    transition: transform .12s, box-shadow .12s;
    text-align: center;
}
.av_submit::after {
    content: '→';
    position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    font-size: 18px; font-weight: 700;
}
.av_submit:hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(109, 94, 240, .42); }
.av_submit:disabled, .av_submit.is_loading { opacity: .7; cursor: progress; transform: none; }

.av_switch { text-align: center; margin-top: 18px; font-size: 13px; color: #7a8095; }
.av_switch a { color: #6d5ef0; font-weight: 700; text-decoration: none; }

/* ---------------- Формын доорх жижиг давуу талын хайрцаг ---------------- */
.av_mini {
    display: flex; margin-top: 30px;
    background: #f5f6fc; border-radius: 16px;
    padding: 16px 6px;
}
.av_mini_item {
    flex: 1; display: flex; align-items: center; gap: 10px;
    padding: 0 14px; min-width: 0;
}
.av_mini_item + .av_mini_item { border-left: 1px solid #e3e5f2; }
.av_mini_icon {
    flex: none; width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.av_mini_icon svg { width: 17px; height: 17px; }
/* Жижиг давуу талууд — тус бүр өөр өнгөтэй. */
.av_mini_item:nth-child(1) .av_mini_icon {
    background: linear-gradient(135deg, #818cf8, #6d5ef0); color: #fff;
    box-shadow: 0 4px 10px rgba(109, 94, 240, .30);
}
.av_mini_item:nth-child(2) .av_mini_icon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff;
    box-shadow: 0 4px 10px rgba(245, 158, 11, .30);
}
.av_mini_item:nth-child(3) .av_mini_icon {
    background: linear-gradient(135deg, #34d399, #10b981); color: #fff;
    box-shadow: 0 4px 10px rgba(16, 185, 129, .30);
}
.av_mini_item span { font-size: 12px; font-weight: 700; color: #2c3145; line-height: 1.35; }
@media (max-width: 460px) {
    .av_mini { flex-direction: column; gap: 12px; }
    .av_mini_item + .av_mini_item { border-left: 0; }
}
