/* Стили входа (auth.js) для курсов site.minimal без hud.css. Копия блока «Вход и Мои работы» из hud.css (строки 570–704): цвета берутся из переменных --h-*, значения по умолчанию в самих правилах. Курс переопределяет переменные под свою тему. */
   Вход и «Мои работы» (auth.js)
   ============================================================ */
/* кнопка-профиль */
#auth-toggle { flex: none; height: 34px; min-width: 34px; max-width: 190px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 0 12px 0 0; border-radius: 999px; border: 1px solid var(--h-edge, #8e9ab3); background: var(--h-panel-solid, #fff); color: var(--h-gold, #5b6a8a); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); font: 600 14px/1 "Segoe UI", Arial, sans-serif; }
#auth-toggle:not(.in) { padding: 0; width: 34px; border-radius: 50%; }
#auth-toggle:hover { filter: brightness(1.08); }
#auth-toggle .ic { width: 18px; height: 18px; }
#auth-toggle .auth-av { margin: 2px 0 2px 2px; }
#auth-toggle .auth-av.sm { width: 30px; height: 30px; }
.auth-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--h-text, #2f3347); }
@media (max-width: 1023px) {
    #auth-toggle { height: 40px; min-width: 40px; }
    #auth-toggle:not(.in), #auth-toggle.in { padding: 0; width: 40px; border-radius: 50%; }
    #auth-toggle .auth-name { display: none; }
    #auth-toggle .ic { width: 20px; height: 20px; }
    #auth-toggle .auth-av, #auth-toggle.in .auth-av { margin: 0; }
    #auth-toggle .auth-av.sm { width: 38px; height: 38px; }
}
.auth-av { display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%; color: #fff; font: 700 12px/1 "Segoe UI", Arial, sans-serif; background: #8e9ab3; }
.auth-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-av.sm { width: 34px; height: 34px; }
.auth-av.md { width: 54px; height: 54px; font-size: 18px; }
.auth-av.lg { width: 60px; height: 60px; font-size: 20px; }
.code-save { white-space: nowrap; }

/* окно */
.auth-ov { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(15, 20, 35, .55); backdrop-filter: blur(3px); }
.auth-box { width: min(480px, 100%); max-height: min(90vh, 780px); display: flex; flex-direction: column; border-radius: 20px; border: 1px solid var(--h-edge, #8e9ab3); background: var(--h-panel-solid, #fff); color: var(--h-text, #2f3347); box-shadow: 0 18px 60px rgba(0, 0, 0, .45); font: 14px/1.45 "Segoe UI", Arial, sans-serif; overflow: hidden; }
.auth-box.wide { width: min(540px, 100%); }
.auth-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--h-line, rgba(0, 0, 0, .11)); }
.auth-title { font-weight: 700; font-size: 16px; color: var(--h-gold, #5b6a8a); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-x { border: 0; background: var(--h-btn, rgba(0, 0, 0, .07)); color: inherit; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.auth-x:hover { background: var(--h-btn-h, rgba(0, 0, 0, .13)); }
.auth-x .ic { width: 16px; height: 16px; }
.auth-body { padding: 18px 20px 20px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-grow { flex: 1; min-width: 0; }
.auth-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--h-soft, #646b84); }
.auth-f input { font: inherit; font-size: 15px; color: var(--h-text, #2f3347); background: var(--h-field, #fff); border: 1px solid var(--h-line, rgba(0, 0, 0, .2)); border-radius: 10px; padding: 9px 11px; outline: none; }
.auth-f input:focus { border-color: var(--h-gold, #5b6a8a); }
.auth-f input:disabled { opacity: .55; }
/* кнопки: главная — светлая тема: тёмная заливка с белым текстом, тёмная тема: золотая заливка с тёмным текстом */
.auth-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-align: center; border: 0; border-radius: 12px; padding: 11px 16px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; background: #3f4f78; color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .18), 0 6px 16px rgba(30, 40, 80, .22); transition: filter .12s, transform .12s; }
html[data-theme="dark"] .auth-btn { background: #e3c78a; color: #2a2412; box-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 6px 16px rgba(0, 0, 0, .35); }
.auth-btn:hover:not(:disabled) { filter: brightness(1.1); }
.auth-btn:active:not(:disabled) { transform: translateY(1px); }
.auth-btn.ghost { background: rgba(0, 0, 0, .07); color: #2f3347; box-shadow: inset 0 0 0 1px var(--h-line, rgba(0, 0, 0, .14)); }
html[data-theme="dark"] .auth-btn.ghost { background: rgba(255, 255, 255, .1); color: #e8ecf6; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.auth-btn.danger { background: transparent; color: #b3402f; box-shadow: inset 0 0 0 1.5px currentColor; }
html[data-theme="dark"] .auth-btn.danger { background: transparent; color: #f0907f; box-shadow: inset 0 0 0 1.5px currentColor; }
.auth-btn.danger.solid { background: #b3402f; color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
html[data-theme="dark"] .auth-btn.danger.solid { background: #d65a47; color: #fff; }
.auth-btn.busy { opacity: .65; cursor: progress; }
.auth-btn:disabled:not(.busy) { opacity: .42; cursor: not-allowed; box-shadow: none; }
.auth-btn .ic { width: 18px; height: 18px; }
.auth-logo { display: inline-grid; place-items: center; }
.auth-upload { cursor: pointer; }
.auth-social { display: grid; gap: 8px; }
.auth-or { text-align: center; color: var(--h-soft, #646b84); font-size: 12px; }
.auth-links { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; }
.auth-link { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--h-link, #2f5fb3); cursor: pointer; text-decoration: underline; text-align: left; }
.auth-link.danger { color: #b3402f; }
.auth-note { margin: 0; color: var(--h-soft, #646b84); font-size: 13px; }
.auth-note.strong { color: var(--h-text, #2f3347); font-size: 14px; }
.auth-note.small { font-size: 12px; }
.auth-msg { display: none; border-radius: 8px; padding: 8px 10px; font-size: 13px; background: var(--h-btn, rgba(0, 0, 0, .07)); }
.auth-msg.on { display: block; }
.auth-msg.bad { background: rgba(200, 70, 50, .15); color: #b3402f; }
.auth-mini { border: 0; border-radius: 9px; padding: 6px 11px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; background: var(--h-btn, rgba(0, 0, 0, .07)); color: var(--h-text, #2f3347); }
.auth-mini:hover { background: var(--h-btn-h, rgba(0, 0, 0, .13)); }
.auth-mini.danger { color: #b3402f; }
html[data-theme="dark"] .auth-mini.danger { color: #f0907f; }
.auth-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 13px; color: var(--h-link, #2f5fb3); cursor: pointer; }
.auth-back:hover { text-decoration: underline; }

/* «дом пользователя»: шапка, разделы, карточки */
.acc-hero { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 18px; border: 1px solid var(--h-edge, #8e9ab3); background: linear-gradient(135deg, rgba(227, 199, 138, .22), rgba(227, 199, 138, 0) 70%), var(--h-card, rgba(255, 255, 255, .6)); }
.acc-ava { flex: none; padding: 4px; border-radius: 50%; border: 2px solid var(--h-gold, #5b6a8a); line-height: 0; box-shadow: 0 0 20px rgba(227, 199, 138, .35); }
.acc-ava .auth-av { width: 64px; height: 64px; font-size: 22px; }
.acc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.acc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.acc-name { font-size: 20px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-mail { color: var(--h-soft, #646b84); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-via { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 5px; padding: 3px 11px 3px 8px; border-radius: 999px; font-size: 12px; background: var(--h-btn, rgba(0, 0, 0, .07)); }
.acc-via svg { width: 14px; height: 14px; flex: none; }
.acc-sec { display: flex; flex-direction: column; gap: 8px; }
.acc-h { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--h-gold, #5b6a8a); }
.acc-card { padding: 14px; border-radius: 14px; border: 1px solid var(--h-line, rgba(0, 0, 0, .11)); background: var(--h-card, rgba(255, 255, 255, .6)); display: flex; flex-direction: column; gap: 10px; }
.acc-hint { margin: 0; font-size: 12.5px; color: var(--h-soft, #646b84); }
.acc-hint.warn { color: #a8602a; }
html[data-theme="dark"] .acc-hint.warn { color: #e8b27a; }
.acc-save .auth-btn { width: 100%; }
.acc-find, .acc-rename { width: 100%; box-sizing: border-box; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--h-line, rgba(0, 0, 0, .2)); background: var(--h-field, rgba(255, 255, 255, .6)); color: inherit; font: inherit; font-size: 14px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap; padding: 11px 13px; border-radius: 13px; border: 1px solid var(--h-line, rgba(0, 0, 0, .11)); background: var(--h-card, rgba(255, 255, 255, .6)); }
.acc-info { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-info strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-sub { display: block; font-size: 12px; color: var(--h-soft, #646b84); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-acts { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
.acc-empty { margin: 0; padding: 14px; border-radius: 13px; border: 1px dashed var(--h-line, rgba(0, 0, 0, .2)); color: var(--h-soft, #646b84); font-size: 13px; text-align: center; }
.acc-store { display: flex; flex-direction: column; gap: 6px; }
.acc-store span { font-size: 13px; }
.acc-bar { height: 6px; border-radius: 99px; background: var(--h-btn, rgba(0, 0, 0, .09)); overflow: hidden; }
.acc-bar i { display: block; height: 100%; min-width: 3px; border-radius: 99px; background: var(--h-gold, #5b6a8a); }
.acc-sync { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 13px; background: var(--h-btn, rgba(0, 0, 0, .06)); font-size: 13px; color: var(--h-soft, #646b84); }
.acc-sync .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--h-gold, #5b6a8a); }
.acc-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 14px; border-top: 1px solid var(--h-line, rgba(0, 0, 0, .11)); }
.acc-warn { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 10px 4px 2px; }
.acc-warn-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(200, 70, 50, .14); color: #b3402f; }
html[data-theme="dark"] .acc-warn-ic { color: #f0907f; }
.acc-warn-ic .ic { width: 26px; height: 26px; }
.acc-warn p { margin: 0; font-size: 15px; line-height: 1.5; }
.acc-ask { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 4px; }

/* профиль: выбор аватарки */
.auth-avgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.auth-avtile { box-sizing: border-box; width: 64px; height: 64px; padding: 3px; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; line-height: 0; justify-self: center; }
.auth-avtile .auth-av { width: 100%; height: 100%; }
.auth-avtile:hover { border-color: var(--h-edge, #8e9ab3); }
.auth-avtile.on { border-color: var(--h-gold, #5b6a8a); }
.acc-card.acc-prof { flex-direction: row; align-items: flex-start; gap: 16px; }
.acc-prof .acc-ava { margin-top: 18px; }

/* прочее */
#auth-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; z-index: 2100; max-width: min(92vw, 520px); padding: 10px 16px; border-radius: 12px; font: 14px/1.4 "Segoe UI", Arial, sans-serif; color: #fff; background: #3c4a66; box-shadow: 0 8px 28px rgba(0, 0, 0, .35); transition: opacity .2s, transform .2s; }
#auth-toast.on { opacity: 1; transform: translateX(-50%); }
#auth-toast.bad { background: #a8402f; }
@media (max-width: 520px) {
    .auth-body { padding: 14px 14px 16px; }
    .acc-hero { padding: 12px; gap: 12px; }
    .acc-ava .auth-av { width: 54px; height: 54px; font-size: 19px; }
    .acc-row { flex-direction: column; align-items: stretch; }
    .acc-info { flex: 0 0 auto; }
    .acc-acts { justify-content: flex-start; }
    .acc-card.acc-prof { flex-direction: column; align-items: stretch; }
    .acc-prof .acc-ava { margin: 0; align-self: center; }
