/* ================================================================
   АИС «Медвежонок» — Auth (login / register / forgot_password)
   Дизайн v3 · Manrope · accent #5b3df5 · paper/ink palette
   Шрифт подключается <link> в каждой странице.
   ================================================================ */
:root {
    /* --- Чернила и бумага --- */
    --ink: #0b0a1a; --ink-2: #16123a; --ink-3: #221a52;
    --paper: #fbfaff; --paper-2: #f4f2fd;

    /* --- Бренд --- */
    --accent: #5b3df5; --accent-2: #7c3aed; --accent-3: #4f46e5;
    --accent-grad: linear-gradient(135deg, #7c3aed 0%, #5b3df5 52%, #4f46e5 100%);
    --accent-soft: #f1eeff; --accent-lighter: #cec6fc;
    --accent-light: #8d7cf8;

    --mint: #5eead4; --mint-deep: #0d9488; --mint-soft: #d6f6f0;
    --mint-grad: linear-gradient(135deg, #5eead4 0%, #0d9488 100%);

    --green: #059669; --green-soft: #d1fae5; --green-grad: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --success: #22c55e; --success-bg: #f0fdf4;

    --rose: #e11d48; --rose-soft: #ffe4e6;
    --amber: #d97706; --amber-soft: #fef3c7;

    --error: #ef4444; --error-bg: rgba(239,68,68,0.06);

    --line: #e8e5f5; --line-2: #d9d5ec;
    --t1: #131129; --t2: #5b5878; --t3: #9691ab;

    --glass: rgba(255,255,255,.72);
    --glass-brd: rgba(255,255,255,.85);
    --sh-2: 0 6px 18px rgba(19,17,41,.06);
    --sh-3: 0 18px 44px rgba(19,17,41,.09);
    --sh-4: 0 30px 70px rgba(19,17,41,.13);
    --sh-glow: 0 22px 60px rgba(91,61,245,.24);

    --r-s: 14px; --r-m: 20px; --r-l: 28px; --r-xl: 36px; --r-pill: 100px;
    --ease: cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--paper);
    color: var(--t1);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
img { max-width: 100%; }
button { font-family: inherit; }

/* ====== ФОН: аврора-орбы + сетка ====== */
.bg-orb {
    position: fixed; border-radius: 50%; filter: blur(90px); opacity: .45;
    pointer-events: none; animation: orbFloat 22s ease-in-out infinite;
}
.bg-orb-1 { width: 520px; height: 520px; background: #ddd6fe; top: -160px; left: -140px; }
.bg-orb-2 { width: 440px; height: 440px; background: #c7d2fe; bottom: -160px; right: -120px; animation-delay: -11s; }
.bg-orb-3 { width: 340px; height: 340px; background: #f5d0fe; top: 40%; left: 55%; opacity: .3; animation-delay: -5s; }
@keyframes orbFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    33%     { transform: translate(30px,-30px) scale(1.06); }
    66%     { transform: translate(-24px,24px) scale(.96); }
}
.bg-grid {
    position: fixed; inset: 0; pointer-events: none; opacity: .45;
    background-image:
        linear-gradient(rgba(91,61,245,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91,61,245,.06) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
}

/* ====== ОБЁРТКА: двухколоночная (login) / одноколоночная (register, forgot) ====== */
.shell {
    width: 100%; max-width: 1020px; position: relative; z-index: 1;
    display: grid; grid-template-columns: 1.02fr 1fr;
    background: #fff;
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    box-shadow: var(--sh-4);
    overflow: hidden;
    animation: slideUp .7s var(--ease);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }

/* --- Одиночная карточка (восстановление пароля) --- */
.shell--single {
    display: block; max-width: 470px;
    padding: 40px 40px 34px;
}

/* ====== ЛЕВАЯ ПАНЕЛЬ: ПРОМО ====== */
.promo {
    position: relative; overflow: hidden;
    background:
        radial-gradient(ellipse 90% 60% at 15% 5%, #ede9fe 0%, transparent 60%),
        radial-gradient(ellipse 80% 60% at 90% 95%, #e0e7ff 0%, transparent 60%),
        linear-gradient(160deg, #f7f5ff 0%, #eef2ff 100%);
    padding: 46px 44px;
    display: flex; flex-direction: column;
    animation: fadeIn .9s ease both .1s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.promo::before {
    content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%;
    border: 1px solid rgba(91,61,245,.12); top: -90px; right: -80px;
}
.promo::after {
    content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%;
    border: 1px solid rgba(91,61,245,.10); bottom: -70px; left: -50px;
}

.promo-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 34px; }
.promo-logo {
    width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0;
    background: var(--accent-grad);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 28px rgba(91,61,245,.35);
    animation: logoPulse 4s ease-in-out infinite;
}
@keyframes logoPulse {
    0%,100% { box-shadow: 0 12px 28px rgba(91,61,245,.35); }
    50%     { box-shadow: 0 16px 38px rgba(91,61,245,.5); }
}
.promo-logo img { width: 32px; height: 32px; border-radius: 9px; object-fit: contain; }
.promo-brand-text .pb-main { display: block; font-size: 18px; font-weight: 800; color: var(--t1); letter-spacing: -.04em; }
.promo-brand-text .pb-sub { display: block; font-size: 11px; font-weight: 600; color: var(--t3); text-transform: uppercase; letter-spacing: .09em; }

.promo h2 {
    font-size: 27px; font-weight: 800; color: var(--t1); letter-spacing: -.06em;
    line-height: 1.25; margin-bottom: 12px;
}
.promo h2 .grad {
    background: var(--accent-grad);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.promo-desc { font-size: 14px; color: var(--t2); line-height: 1.6; margin-bottom: 28px; }

.promo-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.promo-feature {
    display: flex; align-items: center; gap: 13px;
    animation: featureIn .6s ease both;
}
.promo-feature:nth-child(1) { animation-delay: .25s; }
.promo-feature:nth-child(2) { animation-delay: .35s; }
.promo-feature:nth-child(3) { animation-delay: .45s; }
.promo-feature:nth-child(4) { animation-delay: .55s; }
@keyframes featureIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
.pf-icon {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    background: #fff; border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); box-shadow: var(--sh-2);
}
.pf-icon svg { width: 20px; height: 20px; }
.pf-text { font-size: 14px; font-weight: 600; color: var(--t1); }
.pf-text small { display: block; font-size: 12px; font-weight: 500; color: var(--t3); margin-top: 1px; }

.promo-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 7px; }
.promo-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px; border-radius: var(--r-s);
    background: rgba(255,255,255,.8); border: 1px solid var(--line);
    font-size: 12px; font-weight: 600; color: var(--t2);
}
.promo-chip svg { width: 14px; height: 14px; color: var(--accent); }

/* ====== ПРАВАЯ ПАНЕЛЬ: ФОРМА ====== */
.auth {
    padding: 46px 44px; display: flex; flex-direction: column; justify-content: center;
    animation: fadeIn .9s ease both .2s;
}

/* ====== МОБИЛЬНЫЙ БРЕНД (показывается вместо промо) ====== */
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 26px; }
.mobile-brand .promo-logo { width: 48px; height: 48px; }
.mobile-brand .promo-logo img { width: 30px; height: 30px; }
.mobile-brand .pb-main { font-size: 17px; font-weight: 800; color: var(--t1); display: block; letter-spacing: -.04em; }
.mobile-brand .pb-sub { font-size: 10.5px; font-weight: 600; color: var(--t3); text-transform: uppercase; letter-spacing: .09em; }

/* ====== ЗАГОЛОВОК КАРТОЧКИ ====== */
.card-header { margin-bottom: 26px; }
.card-header h2 { font-size: 24px; font-weight: 800; color: var(--t1); letter-spacing: -.05em; margin-bottom: 7px; }
.card-header p { font-size: 14px; color: var(--t2); line-height: 1.55; }
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--r-pill);
    background: var(--accent-soft); color: var(--accent);
    font-size: 12px; font-weight: 600; margin-top: 12px;
}
.badge svg { width: 13px; height: 13px; }

/* ====== ФОРМА ====== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; color: var(--t1); margin-bottom: 7px; }
.input-wrap { position: relative; }
.input-wrap .input-icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: var(--t3); pointer-events: none; z-index: 1; display: flex;
    transition: color .2s;
}
.input-wrap .input-icon svg { width: 18px; height: 18px; }
.input-wrap:focus-within .input-icon { color: var(--accent); }
.form-group input {
    width: 100%; padding: 14px 15px 14px 45px;
    border: 1.5px solid var(--line); border-radius: var(--r-s);
    font-size: 15px; font-family: inherit;
    background: var(--paper-2); color: var(--t1);
    transition: border-color .22s, box-shadow .22s, background .22s;
}
.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(91,61,245,.11);
    background: #fff;
}
.form-group input::placeholder { color: var(--t3); }
.form-group .hint { font-size: 12px; color: var(--t2); margin-top: 6px; line-height: 1.5; }
.input-wrap.has-toggle input { padding-right: 48px; }

/* ====== КНОПКА «ГЛАЗ» ====== */
.eye-btn, .pwd-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border: none; background: none; cursor: pointer;
    color: var(--t3); border-radius: 9px; display: flex; align-items: center; justify-content: center;
    transition: color .18s, background .18s; z-index: 2;
}
.eye-btn:hover, .pwd-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.eye-btn svg, .pwd-toggle svg { width: 18px; height: 18px; }

/* ====== КОД-ПОЛЕ ====== */
.code-input {
    text-align: center; font-size: 26px; font-weight: 800;
    letter-spacing: 8px; padding: 17px 14px !important;
    font-variant-numeric: tabular-nums;
}
/* Поле без иконки слева (код регистрации, 2FA) — убираем отступ под иконку */
.input-wrap > input:first-child { padding-left: 15px; }
/* Код регистрации (XXXX-XXXX) чуть крупный, но не шире поля */
.card .code-input { font-size: 22px; letter-spacing: 6px; }

/* ====== EMAIL-ПОДСКАЗКА ====== */
.email-hint { text-align: center; font-size: 13px; color: var(--t2); margin-bottom: 18px; }
.email-hint strong { color: var(--t1); }

/* ====== КНОПКИ ====== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 15px 24px; border-radius: var(--r-s);
    font-weight: 700; font-size: 15px; cursor: pointer; border: none;
    transition: all .22s; font-family: inherit; text-decoration: none;
    position: relative; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
    background: var(--accent-grad); color: #fff;
    box-shadow: 0 8px 22px rgba(91,61,245,.32);
}
.btn-primary::after {
    content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transition: left .6s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(91,61,245,.42); }
.btn-primary:hover::after { left: 130%; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-success {
    background: var(--green-grad); color: #fff;
    box-shadow: 0 8px 22px rgba(5,150,105,.3);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(5,150,105,.4); }

.btn-ghost {
    background: transparent; color: var(--t2); font-size: 13.5px; font-weight: 600;
    padding: 11px; box-shadow: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: var(--r-s); transition: all .2s;
}
.btn-ghost:hover { color: var(--accent); background: var(--accent-soft); }

.btn-outline {
    background: transparent; color: var(--t2); font-weight: 600; font-size: 13.5px;
    border: 1.5px solid var(--line); padding: 12px; border-radius: var(--r-s);
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; cursor: pointer; text-decoration: none; transition: all .2s;
    font-family: inherit;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.forgot-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--t2); text-decoration: none; font-size: 13px; font-weight: 600;
    transition: color .2s;
}
.forgot-link:hover { color: var(--accent); }

/* ====== АЛЕРТЫ ====== */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 13px 16px; border-radius: var(--r-s); margin-bottom: 18px;
    font-size: 14px; font-weight: 500; line-height: 1.5;
}
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid rgba(239,68,68,.15); }
.alert-success { background: var(--success-bg); color: #16a34a; border: 1px solid #bbf7d0; }
.alert-icon {
    width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
    background: rgba(239,68,68,.15);
    display: flex; align-items: center; justify-content: center;
}
.alert-icon svg { width: 14px; height: 14px; }
.alert-success .alert-icon { background: rgba(34,197,94,.15); }

/* --- Алерт-блок (school blocked) --- */
.alert-block { align-items: flex-start; }
.alert-block .alert-icon { margin-top: 1px; }
.alert-block .alert-body { flex: 1; min-width: 0; }
.alert-block .alert-title { font-weight: 700; }
.alert-block .alert-text { font-size: 13px; font-weight: 500; opacity: .9; margin-top: 3px; line-height: 1.5; }
.alert-block .alert-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.alert-block .alert-actions a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
    text-decoration: none; transition: all .2s;
}
.alert-block .act-primary { background: var(--error); color: #fff; }
.alert-block .act-primary:hover { filter: brightness(1.1); }
.alert-block .act-ghost { background: rgba(239,68,68,.1); color: var(--error); }
.alert-block .act-ghost:hover { background: rgba(239,68,68,.18); }

/* ====== БЛОКИРОВКА ШКОЛЫ ====== */
.block-card { animation: slideUp .45s ease-out; }
.block-icon {
    width: 62px; height: 62px; border-radius: 20px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626; box-shadow: 0 10px 26px rgba(220,38,38,.22);
}
.block-icon svg { width: 30px; height: 30px; }
.block-card h2 { font-size: 23px; font-weight: 800; color: var(--t1); margin-bottom: 10px; letter-spacing: -.04em; }
.block-card > p { font-size: 14.5px; color: var(--t2); line-height: 1.6; margin-bottom: 18px; }
.block-reason {
    background: var(--error-bg); border: 1px solid rgba(239,68,68,.18);
    border-radius: var(--r-s); padding: 14px 16px; margin-bottom: 12px;
}
.block-reason-label { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--error); opacity: .8; margin-bottom: 5px; }
.block-reason-text { font-size: 14px; font-weight: 600; color: var(--error); line-height: 1.5; }
.block-date { font-size: 12.5px; color: var(--t3); margin-bottom: 22px; font-weight: 500; }
.block-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.block-actions .btn { width: 100%; }
.block-retry {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 600; color: var(--t3);
    text-decoration: none; transition: color .2s;
}
.block-retry:hover { color: var(--accent); }

/* ====== ОВЕРЭЙ ====== */
.email-chip {
    display: flex; align-items: center; gap: 10px;
    background: var(--accent-soft); border: 1px solid var(--accent-lighter);
    border-radius: var(--r-s); padding: 12px 14px; margin-bottom: 18px;
    font-size: 13.5px; color: var(--t1);
}
.email-chip svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.email-chip strong { font-weight: 700; }

/* ====== ГОТОВО ====== */
.done-wrap { text-align: center; padding: 8px 0 4px; }
.done-icon {
    width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 20px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 30px rgba(34,197,94,.25);
    animation: popIn .5s cubic-bezier(.68,-.55,.265,1.55);
}
@keyframes popIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done-icon svg { width: 36px; height: 36px; color: var(--success); }

/* ====== СЕРВИСЫ (после входа) ====== */
.services { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.services-label { font-size: 12px; color: var(--t3); text-align: center; margin-bottom: 12px; font-weight: 500; }
.services-grid { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.service-link {
    display: flex; align-items: center; gap: 6px; padding: 9px 14px;
    border-radius: 11px; background: var(--paper-2); color: var(--t2);
    font-size: 12px; font-weight: 600; text-decoration: none;
    transition: all .2s; border: 1px solid var(--line);
}
.service-link:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-lighter); transform: translateY(-1px); }
.service-link svg { width: 14px; height: 14px; }

/* ====== БЕЗОПАСНОСТЬ ====== */
.security-note {
    text-align: center; margin-top: 22px; font-size: 12px; color: var(--t3);
    display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.security-note svg { width: 13px; height: 13px; }

/* ====== СПИННЕР ====== */
.spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
    border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== ОВЕРЭЙ: ОВЕРЭЙ ====== */
.oauth-divider { display: flex; align-items: center; text-align: center; margin: 18px 0 14px; color: var(--t3); font-size: 12px; font-weight: 500; }
.oauth-divider::before, .oauth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.oauth-divider span { padding: 0 14px; }
.oauth-buttons { display: flex; gap: 10px; }
.oauth-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 14px; border-radius: var(--r-s); font-size: 14px; font-weight: 600;
    text-decoration: none; transition: all .2s; border: 1.5px solid var(--line);
    background: #fff;
}
.oauth-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.oauth-yandex { color: #fc3f1d; border-color: #fce0d8; }
.oauth-yandex:hover { border-color: #fc3f1d; }
.oauth-vk { color: #0077ff; border-color: #d6ebff; }
.oauth-vk:hover { border-color: #0077ff; }

/* ====== АИС «Школа» ====== */
.ais-school-block { margin-top: 22px; }
.ais-school-label {
    display: flex; align-items: center; text-align: center; margin: 0 0 12px;
    color: var(--t3); font-size: 12px; font-weight: 500;
}
.ais-school-label::before, .ais-school-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ais-school-label span { padding: 0 14px; }
.ais-school-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 50px; padding: 0 18px;
    border: 1px solid var(--line); border-radius: var(--r-s);
    background: var(--paper-2); color: var(--t1);
    font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px; font-weight: 600; text-decoration: none; transition: .15s ease;
}
.ais-school-btn i, .ais-school-btn svg { flex-shrink: 0; }
.ais-school-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(91,61,245,.10); }
.ais-school-btn:active { transform: translateY(1px); }
.ais-school-btn .ais-logo-img {
    width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0;
    object-fit: contain; background: #fff;
}
.ais-school-btn .ais-arrow { margin-left: auto; color: var(--t3); transition: .15s ease; }
.ais-school-btn:hover .ais-arrow { color: var(--accent); transform: translateX(2px); }
.ais-school-hint { margin-top: 8px; text-align: center; font-size: 11.5px; color: var(--t3); }

/* ====== РЕГИСТРАЦИЯ: КАРТОЧКА ====== */
.login-container {
    width: 100%; max-width: 470px; position: relative; z-index: 1;
    animation: slideUp .7s var(--ease);
}
.brand { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.brand .logo, .brand-logo {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
    background: var(--accent-grad);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(91,61,245,.32);
}
.brand .logo img, .brand-logo img { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; }
.brand-text { min-width: 0; }
.brand-text h1, .brand-text .b-main { font-size: 17px; font-weight: 800; color: var(--t1); letter-spacing: -.04em; }
.brand p, .brand-text .b-sub { font-size: 11px; font-weight: 600; color: var(--t3); text-transform: uppercase; letter-spacing: .09em; }

.card {
    background: #fff; border-radius: var(--r-m); padding: 36px 36px 30px;
    border: 1px solid var(--line); box-shadow: var(--sh-3);
    position: relative; overflow: hidden;
}

/* ====== РЕГИСТРАЦИЯ: ШАГИ ====== */
.steps { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t3); font-weight: 600; }
.step.active { color: var(--accent); }
.step-dot {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    background: var(--line); color: var(--t3);
}
.step.active .step-dot {
    background: var(--accent-grad); color: #fff;
    box-shadow: 0 2px 10px rgba(91,61,245,.35);
}
.step-dot svg { width: 16px; height: 16px; }
.step-line { width: 30px; height: 2px; background: var(--line); border-radius: 2px; }

/* ====== РЕГИСТРАЦИЯ: ИНФО-КАРТОЧКИ ====== */
.info-card {
    background: var(--accent-soft); border: 1px solid var(--accent-lighter);
    border-radius: var(--r-s); padding: 16px; margin-bottom: 20px;
}
.info-card h4 { font-size: 13px; color: var(--accent); margin-bottom: 10px; font-weight: 700; }
.info-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 7px; }
.info-row:last-child { margin-bottom: 0; }
.info-row span:first-child { color: var(--t2); flex-shrink: 0; }
.info-row span:last-child { color: var(--t1); font-weight: 600; text-align: right; }

.user-type-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 15px; border-radius: var(--r-pill);
    font-size: 12.5px; font-weight: 700;
    background: var(--accent-soft); color: var(--accent);
    margin-bottom: 16px; border: 1px solid var(--accent-lighter);
}
.user-type-badge svg { width: 14px; height: 14px; }

.info-steps { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin: 20px 0; }
.step-item { text-align: center; padding: 10px; }
.step-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; margin: 0 auto 6px;
}
.step-text { font-size: 12px; color: var(--t2); line-height: 1.35; }

/* ====== ИНДИКАТОР СИЛЫ ПАРОЛЯ ====== */
.pwd-strength { margin-top: 9px; }
.pwd-strength-track { width: 100%; height: 5px; background: var(--line); border-radius: 5px; overflow: hidden; }
.pwd-strength-fill { height: 100%; width: 0%; border-radius: 5px; transition: width .3s, background .3s; }
.pwd-strength-label { font-size: 11.5px; font-weight: 600; margin-top: 5px; color: var(--t3); }

/* ====== ПОДСКАЗКА СОВПАДЕНИЯ ПАРОЛЕЙ ====== */
.match-hint { font-size: 12px; font-weight: 600; margin-top: 6px; display: none; }
.match-hint.ok { display: block; color: var(--success); }
.match-hint.bad { display: block; color: var(--error); }
.form-group input.is-invalid { border-color: var(--error); background: #fff; }
.form-group input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(239,68,68,.12); }
.form-group input.is-valid { border-color: var(--success); }
.form-group input.is-valid:focus { box-shadow: 0 0 0 4px rgba(34,197,94,.12); }

/* ====== ВОССТАНОВЛЕНИЕ: СТЕППЕР (полоски, не круги) ====== */
.stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; }
.stepper .step-dot {
    flex: 1; width: auto; height: 5px; border-radius: 5px;
    background: var(--line); color: transparent;
    font-size: 0; box-shadow: none;
    transition: background .4s ease;
}
.stepper .step-dot.on { background: var(--accent-grad); }
.step-caption { font-size: 11.5px; font-weight: 600; color: var(--t3); margin-bottom: 22px; letter-spacing: .02em; }

/* ====== ЗАГОЛОВОК (forgot) ====== */
.head { margin-bottom: 22px; }
.head h1 { font-size: 24px; font-weight: 800; color: var(--t1); letter-spacing: -.06em; margin-bottom: 8px; }
.head p { font-size: 13.5px; color: var(--t2); line-height: 1.55; }

/* ====== АДАПТИВ ====== */
@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; max-width: 480px; }
    .promo { display: none; }
    .auth { padding: 40px 34px; }
    .mobile-brand { display: flex; }
}
@media (max-width: 480px) {
    body { padding: 0; align-items: flex-start; padding-top: 28px; }
    body.page-narrow { padding: 16px; padding-top: 28px; }
    .shell { border-radius: 0; min-height: 100vh; box-shadow: none; }
    .auth { padding: 34px 22px; }
    .card-header h2 { font-size: 22px; }
    .card { padding: 26px 20px 22px; border-radius: 22px; }
    .info-steps { grid-template-columns: 1fr; gap: 8px; }
    .brand { margin-bottom: 18px; }
    .code-input { font-size: 19px !important; letter-spacing: 4px; }
}
/* --- Одиночная карточка на мобильных остаётся карточкой --- */
@media (max-width: 620px) {
    .shell--single {
        border-radius: var(--r-l); min-height: 0;
        box-shadow: var(--sh-3); border: 1px solid var(--line);
        padding: 28px 22px 26px;
    }
    .shell--single .head h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}