/* FAQ Desk — стили интерфейса.
   Дизайн-система «обновлённая палитра» (рестайл по макету Claude Design, 2026-06):
   чистый прохладный нейтрал на oklch, изумруд как основной акцент, гармонизированные
   янтарь/фиолетовый/синий, мягкие многослойные тени, крупные радиусы.

   Шрифты — системные (по решению владельца: без внешних веб-шрифтов, CSP остаётся строгим).
   Inline-style в шаблонах запрещён CSP (style-src 'self', ADR-012) — всё оформление здесь. */

:root {
  /* ——— нейтральная база ——— */
  --bg:         oklch(0.976 0.005 250);
  --surface:    oklch(1 0 0);
  --surface-2:  oklch(0.966 0.006 255);
  --ink:        oklch(0.30 0.018 265);
  --ink-soft:   oklch(0.52 0.018 265);
  --ink-faint:  oklch(0.66 0.015 265);
  --line:       oklch(0.915 0.007 265);
  --line-soft:  oklch(0.95 0.005 265);

  /* ——— акценты: единые L/C, варьируется только тон ——— */
  --teal:oklch(0.64 0.12 168);   --teal-d:oklch(0.50 0.10 168);  --teal-bg:oklch(0.965 0.03 168);  --teal-line:oklch(0.88 0.055 168);
  --amber:oklch(0.72 0.115 75);  --amber-d:oklch(0.55 0.10 70);  --amber-bg:oklch(0.97 0.03 80);   --amber-line:oklch(0.88 0.06 80);
  --purple:oklch(0.60 0.12 295); --purple-d:oklch(0.47 0.11 295);--purple-bg:oklch(0.965 0.025 295);--purple-line:oklch(0.88 0.05 295);
  --blue:oklch(0.62 0.12 248);   --blue-d:oklch(0.48 0.11 248);  --blue-bg:oklch(0.965 0.028 248); --blue-line:oklch(0.88 0.055 248);
  --red:oklch(0.58 0.16 25);     --red-d:oklch(0.47 0.15 25);    --red-bg:oklch(0.965 0.03 25);    --red-line:oklch(0.88 0.06 25);

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:      0 1px 2px rgba(22,28,45,.04), 0 10px 26px -12px rgba(22,28,45,.14);
  --shadow-lift: 0 2px 6px rgba(22,28,45,.06), 0 22px 44px -16px rgba(22,28,45,.20);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* ——— семантические алиасы (для совместимости со старыми именами) ——— */
  --text:      var(--ink);
  --muted:     var(--ink-faint);
  --border:    var(--line);
  --primary:   var(--teal);
  --primary-d: var(--teal-d);
  --danger-fg: var(--red-d);
  --danger-bg: var(--red-bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 100% -12%, oklch(0.95 0.04 168 / .55), transparent 62%),
    radial-gradient(800px 480px at -5% 4%, oklch(0.95 0.03 295 / .35), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.no-chrome {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

a { color: var(--teal-d); }
code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 1px 6px;
}

/* ---------- каркас ---------- */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px 64px;
}
.site-main { width: 100%; }

.site-footer {
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
  margin-top: 54px;
}

/* ---------- топбар ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 26px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.3px;
}
.crest {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff; letter-spacing: .4px;
  background: linear-gradient(150deg, oklch(0.70 0.13 168), oklch(0.50 0.11 170));
  box-shadow: 0 6px 16px -4px oklch(0.55 0.12 168 / .5), inset 0 1px 0 rgba(255,255,255,.4);
}
.brand__name { line-height: 1; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 10px;
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--ink); color: #fff; }

.nav__logout { margin: 0; }

/* ---------- кнопки ---------- */
.btn {
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn--primary {
  color: #fff;
  border: none;
  background: linear-gradient(150deg, oklch(0.68 0.13 168), oklch(0.52 0.11 170));
  box-shadow: 0 6px 16px -5px oklch(0.55 0.12 168 / .55), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -6px oklch(0.55 0.12 168 / .6), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-soft);
  box-shadow: var(--shadow);
}
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-faint); }
.btn--block { width: 100%; padding: 13px 18px; }
.btn--sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn--danger { color: var(--red-d); border-color: var(--line); background: var(--surface); box-shadow: var(--shadow); }
.btn--danger:hover { border-color: var(--red); background: var(--red-bg); color: var(--red-d); }

.logout {
  font-family: var(--font);
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: color .15s ease, border-color .15s ease;
}
.logout:hover { color: var(--ink); border-color: var(--ink-faint); }

/* ---------- заголовки страниц ---------- */
.dashboard__head { margin: 18px 0 5px; }
.page-h,
.dashboard__title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.6px;
  margin: 18px 0 5px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.page-h .sigil,
.dashboard__title .sigil {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal-bg); color: var(--teal-d);
  font-size: 18px;
  box-shadow: inset 0 0 0 1px var(--teal-line);
}
.page-sub { color: var(--ink-faint); font-size: 14.5px; margin: 0 0 24px; }

.admin__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0 22px;
}
.admin__title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.admin__empty { color: var(--ink-faint); }

/* ---------- панели / карточки ---------- */
.panel,
.ask-form,
.admin-form,
.admin-card,
.placeholder-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px;
}
.ask-form { display: flex; flex-direction: column; gap: 16px; }
.admin-form { display: flex; flex-direction: column; gap: 16px; }
.admin-card { margin-top: 22px; }
.admin-card__title { margin: 0 0 12px; font-size: 16px; font-weight: 800; letter-spacing: -.2px; }

.placeholder-card__title { margin: 0 0 8px; font-size: 24px; font-weight: 800; }
.placeholder-card__lead { margin: 0 0 16px; font-size: 16px; }
.placeholder-card__text { margin: 0 0 16px; color: var(--ink-soft); }
.placeholder-card__note {
  margin: 0; padding: 12px 14px;
  background: var(--surface-2); border-radius: var(--radius-sm);
  color: var(--ink-faint); font-size: 14px;
}

/* ---------- поля ввода ---------- */
.field { display: flex; flex-direction: column; gap: 9px; }
.label,
.field__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.field__input,
textarea, input[type=text], input[type=password], input[type=search], input[type=number], select {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea::placeholder, input::placeholder { color: var(--ink-faint); }
.field__input:focus,
textarea:focus, input:focus, select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3.5px var(--teal-bg);
}
textarea, .field__textarea { resize: vertical; min-height: 88px; }
.field__textarea--tall { min-height: 220px; }
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%2393909c' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
input[type=file] { padding: 9px 12px; font-size: 14px; }
.field__hint { font-size: 12.5px; color: var(--ink-faint); line-height: 1.5; }
.field--narrow { max-width: 360px; }
.field--check { flex-direction: row; align-items: center; gap: 9px; }
.field--check input { width: 17px; height: 17px; flex: 0 0 auto; }

/* ---------- алерты ---------- */
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  margin-bottom: 18px;
  font-size: 14px;
  border: 1px solid transparent;
}
.alert--error { background: var(--red-bg); color: var(--red-d); border-color: var(--red-line); }
.alert--ok { background: var(--teal-bg); color: var(--teal-d); border-color: var(--teal-line); }

/* ---------- бейджи ---------- */
.muted { color: var(--ink-faint); font-size: 13px; }
.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
}
.badge i { font-style: normal; opacity: .85; }
.badge--muted { background: var(--surface-2); border-color: var(--line); color: var(--ink-faint); }
.badge--ok { background: var(--teal-bg); border-color: var(--teal-line); color: var(--teal-d); }
.badge--info { background: var(--purple-bg); border-color: var(--purple-line); color: var(--purple-d); }
.badge--warn { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-d); }
.badge--search { background: var(--blue-bg); border-color: var(--blue-line); color: var(--blue-d); }
.badge--flag { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-d); }
.badge--conf-high { background: var(--teal-bg); border-color: var(--teal-line); color: var(--teal-d); }
.badge--conf-medium { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-d); }
.badge--conf-low { background: var(--red-bg); border-color: var(--red-line); color: var(--red-d); }
.badge--status-ok { background: var(--teal-bg); border-color: var(--teal-line); color: var(--teal-d); }
.badge--status-cannot_answer { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-d); }
.badge--status-clarify { background: var(--purple-bg); border-color: var(--purple-line); color: var(--purple-d); }
.badge--status-error { background: var(--red-bg); border-color: var(--red-line); color: var(--red-d); }

/* ---------- форма вопроса (дашборд) ---------- */
.ask-form__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ask-form__note { color: var(--ink-faint); font-size: 13px; }
.product-picker__filter { margin-bottom: 0; }

/* ---------- степпер (трекер этапов) ---------- */
.tracker {
  display: flex;
  align-items: flex-start;
  margin: 30px 0 34px;
  padding: 0 6px;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  position: relative;
}
.step::before {
  content: "";
  position: absolute;
  top: 23px; right: 50%;
  width: 100%; height: 2px;
  background: var(--line);
  z-index: 0;
}
.step:first-child::before { display: none; }
.step.is-done::before,
.step.is-active::before { background: linear-gradient(90deg, var(--teal-line), var(--teal)); }
.step .orb {
  position: relative;
  z-index: 1;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-faint);
  transition: .2s;
}
.step .nm { font-weight: 700; font-size: 13px; color: var(--ink-soft); }
.step .stt { font-size: 11px; color: var(--ink-faint); margin-top: -4px; }
.step.is-done .orb { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 5px 14px -5px oklch(0.55 0.12 168 / .6); }
.step.is-done .nm { color: var(--ink); }
.step.is-done .stt { color: var(--teal-d); }
.step.is-active .orb { background: var(--surface); border: 1.5px solid var(--amber); color: var(--amber-d); box-shadow: 0 0 0 0 oklch(0.72 0.115 75 / .5); animation: pulse 1.5s ease-out infinite; }
.step.is-active .nm { color: var(--ink); }
.step.is-active .stt { color: var(--amber-d); font-weight: 600; }
.step.is-skipped { opacity: .5; }
.step.is-skipped .orb { border-style: dashed; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 oklch(0.72 0.115 75 / .45); }
  70% { box-shadow: 0 0 0 11px oklch(0.72 0.115 75 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(0.72 0.115 75 / 0); }
}

/* ---------- карточки команды (партия экспертов) ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 8px 0 30px;
}
.team__experts { display: contents; }
.team__node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 22px 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  font: inherit;
  cursor: default;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}
.team__expert { cursor: pointer; }
.team__expert:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.team__avatar {
  width: 58px; height: 58px;
  border-radius: 17px;
  margin: 4px auto 14px;
  object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
  background: var(--teal-bg); color: var(--teal-d);
  box-shadow: inset 0 0 0 1px var(--teal-line);
}
.team__avatar--role { font-size: 20px; }
.team__avatar--empty { text-transform: uppercase; }
.team__node[data-role="classifier"] .team__avatar { background: var(--purple-bg); color: var(--purple-d); box-shadow: inset 0 0 0 1px var(--purple-line); }
.team__node[data-role="search"] .team__avatar { background: var(--blue-bg); color: var(--blue-d); box-shadow: inset 0 0 0 1px var(--blue-line); }

.team__role { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 2px; }
.team__name { font-weight: 800; font-size: 16px; letter-spacing: -.3px; color: var(--ink); }
.team__sub { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }

.team__status {
  position: absolute;
  top: 13px; right: 13px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--surface-2);
  color: var(--ink-faint);
  box-shadow: inset 0 0 0 1px var(--line);
}
.team__status::after { content: "резерв"; }
.team__node[data-role="search"] .team__status::after { content: "поиск"; }
.team__node.is-active .team__status { background: var(--amber); color: #fff; box-shadow: none; }
.team__node.is-active .team__status::after { content: "в работе"; }
.team__node.is-done .team__status { background: var(--teal); color: #fff; box-shadow: none; }
.team__node.is-done .team__status::after { content: "готово"; }

.team__node.is-active { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg), var(--shadow-lift); }
.team__node.is-done { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-bg), var(--shadow); }
.team__node.is-skipped { opacity: .45; border-style: dashed; }
/* «компьютер» поиска по умолчанию приглушён — загорается только при реальном поиске */
.team__node[data-role="search"]:not(.is-active):not(.is-done) { opacity: .6; }

/* ---------- карточка результата (рендерит app.js) ---------- */
.result {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}
.result--ok { border-left-color: var(--teal); }
.result--warn { border-left-color: var(--amber); }
.result--info { border-left-color: var(--purple); }
.result--error { border-left-color: var(--red); }
.result__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.result__status { font-weight: 700; margin-right: 4px; }
.result__badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.result__answer { margin-bottom: 20px; }
.result__subtitle {
  font-size: 11.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}
.result__text { margin: 0; font-size: 15px; line-height: 1.78; white-space: pre-wrap; color: var(--ink); }
.result__flags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.result__flags-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.result__note {
  background: var(--purple-bg);
  border: 1px solid var(--purple-line);
  border-left: 4px solid var(--purple);
  border-radius: var(--radius-sm);
  padding: 15px 17px;
  margin-bottom: 8px;
}
.result__note-label {
  display: block;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--purple-d);
  margin-bottom: 7px;
}
.result__note .result__text { font-size: 14px; line-height: 1.65; color: var(--ink-soft); }
.result__meta {
  display: flex; flex-wrap: wrap; gap: 20px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}

/* ---------- логин ---------- */
.auth { width: 100%; display: flex; justify-content: center; }
.auth__card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 34px 30px;
}
.auth__brand { text-align: center; margin-bottom: 24px; }
.auth__brand .crest,
.auth__brand .brand__logo--lg { margin: 0 auto 14px; }
.brand__logo--lg {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px;
  border-radius: 16px;
  font-weight: 800; font-size: 19px; color: #fff; letter-spacing: .4px;
  background: linear-gradient(150deg, oklch(0.70 0.13 168), oklch(0.50 0.11 170));
  box-shadow: 0 6px 16px -4px oklch(0.55 0.12 168 / .5), inset 0 1px 0 rgba(255,255,255,.4);
}
.auth__title { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.3px; }
.auth__subtitle { margin: 5px 0 0; color: var(--ink-faint); font-size: 14px; }
.auth__form { display: flex; flex-direction: column; gap: 17px; margin-top: 4px; }

/* ---------- админ-таблицы ---------- */
.admin-form--inline {
  flex-direction: row;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-form__row { display: flex; gap: 16px; flex-wrap: wrap; }
.admin-form__row .field { flex: 1 1 220px; }
.admin-form__actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  vertical-align: middle;
}
.admin-table th {
  background: var(--surface-2);
  color: var(--ink-faint);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: oklch(0.98 0.006 250); }
.admin-table tr.is-inactive td { opacity: .5; }
.admin-table__actions { white-space: nowrap; display: flex; gap: 6px; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }

/* ---------- аватарки (админка / кабинет) ---------- */
.avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--teal-bg);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--teal-d);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--teal-line);
}
.avatar--lg { width: 72px; height: 72px; font-size: 26px; border-radius: 18px; }
.avatar--empty { text-transform: uppercase; }

/* ---------- запись журнала ---------- */
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--ink-faint); font-size: 13px; }
.kv dd { margin: 0; }
.raw {
  margin: 0;
  padding: 14px 16px;
  background: oklch(0.26 0.02 265);
  color: oklch(0.93 0.01 255);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- модалка кабинета (§10.2) ---------- */
.modal { position: fixed; inset: 0; z-index: 50; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: oklch(0.30 0.02 265 / .5); backdrop-filter: blur(2px); }
.modal__dialog {
  position: relative;
  max-width: 720px;
  margin: 5vh auto;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 26px 30px;
}
.modal__close {
  position: absolute; top: 12px; right: 16px;
  border: none; background: transparent;
  font-size: 26px; line-height: 1;
  color: var(--ink-faint); cursor: pointer;
}
.modal__close:hover { color: var(--ink); }
.cabinet__head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.cabinet__head h2 { margin: 0 0 4px; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.cabinet__sub { margin: 16px 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- адаптив ---------- */
@media (max-width: 640px) {
  .topbar { gap: 12px; }
  .nav { order: 3; width: 100%; justify-content: flex-start; }
  .page-h, .dashboard__title { font-size: 24px; }
  .ask-form, .admin-form, .admin-card, .result, .panel { padding: 20px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
}
