/* ============================================================
   Авторизация / регистрация (публичные)
   ============================================================ */
body.auth-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 10%, rgba(117,108,255,.25), transparent 30%),
        radial-gradient(circle at 10% 90%, rgba(255,107,53,.15), transparent 28%),
        linear-gradient(135deg, #f5f7fb, #eef0fb);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: Inter, -apple-system, "Segoe UI", Arial, sans-serif;
    color: #172033;
}

.auth-card {
    width: min(480px, 100%);
    background: #fff;
    border: 1px solid #e3e7ef;
    border-radius: 20px;
    padding: 34px;
    box-shadow: 0 25px 60px rgba(25,35,55,.12);
}
.auth-card__brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; letter-spacing: -.3px; color: #101828; margin-bottom: 6px; }
.auth-card__brand .mark { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg,#635bff,#857cff); color:#fff; display:inline-flex; align-items:center; justify-content:center; box-shadow: 0 8px 20px rgba(99,91,255,.25); }
.auth-card h1 { margin: 6px 0 4px; font-size: 26px; letter-spacing: -.5px; }
.auth-card .sub { color: #687386; font-size: 14px; margin: 0 0 24px; }

.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 13px; color: #635bff; font-weight: 600; text-decoration: none; }
.auth-back:hover { text-decoration: underline; }

.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.role-card { position: relative; cursor: pointer; }
.role-card input { position: absolute; opacity: 0; }
.role-card__box {
    display: flex; align-items: flex-start; gap: 12px;
    border: 2px solid #e3e7ef; border-radius: 14px; padding: 14px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    min-height: 84px;
}
.role-card__box .ico {
    width: 42px; height: 42px; flex: 0 0 auto;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    color: #635bff; background: #eeecff;
}
.role-card__box .ico svg { width: 23px; height: 23px; }
.role-card:nth-child(1) .role-card__box .ico { color: #635bff; background: #eeecff; }
.role-card:nth-child(2) .role-card__box .ico { color: #0ea5a4; background: #e7f9f8; }
.role-card__box .txt { min-width: 0; }
.role-card__box .txt b { display: block; font-size: 15px; color: #172033; line-height: 1.2; margin-bottom: 3px; }
.role-card__box .txt span { font-size: 12px; color: #8a93a3; line-height: 1.4; display: block; }
.role-card input:hover + .role-card__box { border-color: #cfd5e4; }
.role-card input:checked + .role-card__box { border-color: #635bff; background: #f0efff; box-shadow: 0 0 0 3px rgba(99,91,255,.12); }

.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 13.5px; font-weight: 700; color: #172033; margin-bottom: 7px; }
.auth-field label em { font-style: normal; color: #ff6b35; font-weight: 800; }
.auth-field input {
    width: 100%; box-sizing: border-box;
    border: 1.5px solid #e3e7ef; border-radius: 12px;
    padding: 13px 15px; font-size: 15px; font-family: inherit; color: #172033; background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-field select {
    width: 100%; box-sizing: border-box;
    border: 1.5px solid #e3e7ef; border-radius: 12px;
    padding: 13px 15px; font-size: 15px; font-family: inherit; color: #172033; background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    appearance: auto;
}
.auth-field input:focus, .auth-field select:focus { outline: none; border-color: #635bff; box-shadow: 0 0 0 4px rgba(99,91,255,.14); }
.auth-field .help { font-size: 12px; color: #8a93a3; margin-top: 5px; }

.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-grid .full { grid-column: 1 / -1; }

.auth-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 18px; }
.auth-check input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: #635bff; }
.auth-check span { font-size: 13px; color: #687386; line-height: 1.45; }
.auth-check a { color: #635bff; }

.auth-btn { width: 100%; min-height: 50px; font-size: 15px; border-radius: 12px; justify-content: center; }

.auth-alt { margin-top: 18px; text-align: center; font-size: 14px; color: #687386; }
.auth-alt a { color: #635bff; font-weight: 600; }

.alert { border-radius: 12px; padding: 12px 15px; margin-bottom: 20px; font-size: 14px; }
.alert--err { background: #fcebf4; color: #b92a6f; border: 1px solid #f0c6d8; }
.alert--ok { background: #e9f8f1; color: #0d7d4f; border: 1px solid #bfe6d0; }
.alert div { margin: 2px 0; }

@media (max-width: 480px) {
    .auth-grid { grid-template-columns: 1fr; }
    .roles { grid-template-columns: 1fr; }
}