/* Экраны F2 (`27` §2–4): вход, активация, второй фактор, «Раздел только для администратора», профиль, чипы шапки,
   «Пользователи», «Запросы», «Журнал», «Генерации», «Обращения». Владелец — F2 (файл создан патч-запросом F2-4).
   Вид — по CSS эталона `visualization.html` (строки 670–684, 786–827): карточка входа 420 px по центру на `--bg`,
   ошибки на `--err-tint`, живой список проверок пароля, поле кода моноширинное 52 px, сводка `.kpis`, метки `.badge`.
   Только классы и переменные: CSP `style-src 'self'` (`37` §3.1). */

.faint { color: var(--ink-3); }
.muted { color: var(--ink-2); }
.sm { font-size: 12.5px; }

/* ---------- вход ---------- */
main.auth-main { min-height: 100vh; min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center;
  padding: min(12vh, 96px) 16px 32px; background: var(--bg); }
#auth { width: 100%; display: flex; justify-content: center; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet);
  box-shadow: var(--shadow-2); padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.auth-card[hidden] { display: none; }
.auth-card .field { margin: 0; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; margin: 0 0 4px; color: var(--ink); }
.auth-brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.auth-brand .logo svg { width: 18px; height: 18px; fill: none; stroke: var(--on-accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.auth-card h1 { font-size: 19px; margin: 0; }
.auth-card p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.auth-card .btn.primary { height: 44px; font-size: 15px; }
.auth-card .btn { width: 100%; }
.auth-card .row-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.auth-card .row-links[hidden] { display: none; }
.linkbtn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 4px 0; font: inherit; font-weight: 500; text-decoration: none; min-height: 24px; }
.linkbtn:hover { text-decoration: underline; }
.auth-err { font-size: 13px; background: var(--err-tint); color: var(--err); border-radius: 8px; padding: 8px 10px; margin: 0; }
.auth-ok { font-size: 13px; background: var(--ok-tint); color: var(--ok); border-radius: 8px; padding: 8px 10px; margin: 0; }
.auth-err[hidden], .auth-ok[hidden], .pk[hidden], [hidden].hint { display: none; }
.auth-wait { padding: 48px 16px; text-align: center; color: var(--ink-2); }
.pk { display: flex; flex-direction: column; gap: 10px; }
.pwchecks { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.pwchecks .ci { display: grid; grid-template-columns: 18px 1fr; gap: 6px; color: var(--ink-3); }
.pwchecks .ci.ok { color: var(--ok); }
.pwchecks .ci.bad { color: var(--err); }
input.otp { font: 600 22px/1 var(--mono); letter-spacing: .3em; text-align: center; height: 52px !important; }
.auth-page { width: 100%; display: flex; justify-content: center; }
.auth-page .auth-card { width: min(520px, 100%); }
.steps { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
code.secret { display: block; font-size: 17px; letter-spacing: .08em; padding: 10px 12px; border: 1px dashed var(--rule-2); border-radius: var(--r-ctl);
  background: var(--surface-2); user-select: all; word-break: break-all; }
ul.codes { list-style: none; margin: 0; padding: 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px;
  border: 1px dashed var(--rule-2); border-radius: var(--r-ctl); background: var(--surface-2); font-size: 15px; }

/* ---------- «Раздел только для администратора» ---------- */
#scr-forbidden { width: 100%; }
.forbid { margin: auto; max-width: 460px; text-align: center; padding: 40px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.forbid svg { width: 40px; height: 40px; fill: none; stroke: var(--g5); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.forbid h2 { font-size: 19px; margin: 0; }
.forbid p { margin: 0; }
.forbid .btn { text-decoration: none; }

/* ---------- шапка: чипы и профиль справа ---------- */
.top-end { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.top-end .chip { text-decoration: none; }
.chip.full { background: var(--err-tint); border-color: transparent; color: var(--err); font-weight: 600; }
.chip .txt { font-weight: 500; }
@media (max-width: 1023.98px) { .top-end .chip .txt { display: none; } }
@media (max-width: 599.98px) { .top-end #storeChip { display: none; } }

/* ---------- экраны админ-панели и профиля ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.toolbar h1 { margin: 0; }
.toolbar .field.inline, .filters .field.inline { margin: 0; flex-direction: row; align-items: center; gap: 8px; }
.toolbar .field.inline input, .toolbar .field.inline select { width: 240px; max-width: 100%; }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-wrap { display: flex; flex-direction: column; gap: 14px; max-width: 1400px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpis > div { padding: 12px 16px; border-left: 1px solid var(--rule-soft); }
.kpis > div:first-child { border-left: 0; }
.kpis .k { font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }
.kpis .v { font: 600 17px/1.3 var(--mono); margin-top: 2px; }
.tbl-scroll.tall { max-height: 70vh; }
table.t td strong { font-weight: 600; }
table.t td.acts { overflow: visible; }
table.t th.acts.two, table.t td.acts.two { width: 210px; }
table.t td.acts .btn + .btn { margin-left: 6px; }
/* «Модели» (V3-F-1): самая широкая пара — «Проверить бесплатно» + «Удалить» ≈ 256 px + поля 24 px; 210 px срезали
   «Удалить» краем таблицы. Столбцы с коротким текстом сужены, чтобы «Состояние» не потеряло метку при 1024–1440. */
@media (min-width: 600px) {
  #mdTable th.acts.two, #mdTable td.acts.two, #mdGone th.acts.two, #mdGone td.acts.two { width: 300px; }
  #mdTable th:nth-child(2), #mdGone th:nth-child(2) { width: 130px; }
  #mdTable th.p2, #mdGone th.p2 { width: 140px; }
  #mdTable th.p3, #mdGone th.p3 { width: 110px; }
}
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.ga { background: var(--ok-tint); color: var(--ok); }
.badge.pv { background: var(--warn-tint); color: var(--warn); }
.badge.dep { background: var(--err-tint); color: var(--err); }
.badge.live { background: var(--accent-tint); color: var(--accent); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface-2); }
.seg button { border: 0; background: transparent; min-height: calc(var(--ctl) - 8px); padding: 0 12px; border-radius: 7px; cursor: pointer;
  color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-1); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 .field { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.banner { padding: 10px 14px; border-radius: var(--r-card); background: var(--accent-tint); color: var(--accent); font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.grid:empty { display: none; }
.hint.empty { padding: 16px; margin: 0; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100vw); background: var(--surface); border-left: 1px solid var(--rule);
  box-shadow: var(--shadow-3); z-index: 20; overflow: auto; padding: 16px; }
.drawer[hidden] { display: none; }
ul.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
ul.plist li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
ul.plist li:last-child { border-bottom: 0; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
dl.kv dt { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
dl.kv dd { margin: 0; }
pre.code { margin: 0; padding: 12px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--r-ctl); font: 13px/1.5 var(--mono);
  white-space: pre-wrap; word-break: break-all; user-select: all; }
details.more summary { cursor: pointer; color: var(--accent); font-weight: 500; min-height: 24px; }
details.more ul { margin-top: 6px; }

@media (max-width: 599.98px) {
  main.auth-main { padding: 24px 12px; }
  .auth-card { padding: 18px 16px 16px; }
  .row2 { grid-template-columns: 1fr; }
  .toolbar .field.inline input, .toolbar .field.inline select { width: 100%; }
  .toolbar .field.inline { flex: 1 1 100%; }
  .kpis > div { border-left: 0; border-top: 1px solid var(--rule-soft); }
  .kpis > div:first-child { border-top: 0; }
  ul.codes { grid-template-columns: 1fr; }
  .drawer { width: 100vw; top: 8vh; border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
}
