:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #151821;
  --muted: #5f6675;
  --faint: #8b91a0;
  --line: #e2e5eb;
  --line-strong: #cfd4dd;
  --accent: #2f5bea;
  --accent-ink: #ffffff;
  --accent-soft: #e8eefe;
  --ok: #178a4c;
  --ok-soft: #e3f5ea;
  --warn: #a86c00;
  --warn-soft: #fdf1d8;
  --bad: #c93636;
  --bad-soft: #fde7e7;
  --info: #5b4bd6;
  --info-soft: #ece9fd;
  --shadow: 0 1px 2px rgba(20, 24, 33, .05), 0 4px 16px rgba(20, 24, 33, .05);
  --radius: 14px;
  --radius-sm: 9px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1116;
    --surface: #171a21;
    --surface-2: #1d2029;
    --ink: #e9ebf0;
    --muted: #a3a9b6;
    --faint: #767d8c;
    --line: #2a2e38;
    --line-strong: #3a3f4b;
    --accent: #6b8cff;
    --accent-ink: #0f1116;
    --accent-soft: #1f2a4d;
    --ok: #4cc782;
    --ok-soft: #173325;
    --warn: #e5b04a;
    --warn-soft: #3a2e14;
    --bad: #f07272;
    --bad-soft: #3d1c1c;
    --info: #a69bff;
    --info-soft: #28234d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-weight: 550;
  transition: background .15s, border-color .15s, transform .05s;
  text-decoration: none; color: var(--ink);
  white-space: nowrap;
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.lg { min-height: 48px; padding: 0 24px; font-size: 16px; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- поля ---------- */
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--faint); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.s-new { background: var(--info-soft); color: var(--info); }
.pill.s-eval { background: var(--accent-soft); color: var(--accent); }
.pill.s-go { background: var(--ok-soft); color: var(--ok); }
.pill.s-clarify { background: var(--warn-soft); color: var(--warn); }
.pill.s-reject { background: var(--bad-soft); color: var(--bad); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; border-radius: 10px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--bad); color: #fff; }

/* ======================================================
   АНКЕТА
   ====================================================== */
.page-head {
  max-width: 1180px; margin: 0 auto; padding: 36px 20px 8px;
}
.page-head .eyebrow {
  color: var(--accent); font-weight: 650; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
}
.page-head h1 { font-size: clamp(24px, 3.2vw, 34px); margin-top: 6px; }
.page-head p { color: var(--muted); max-width: 720px; margin: 10px 0 0; }

.layout {
  max-width: 1180px; margin: 0 auto; padding: 20px 20px 80px;
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start;
}

/* сайдбар */
.aside { position: sticky; top: 20px; display: grid; gap: 14px; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.status-card { padding: 18px; }
.ring-wrap { display: flex; align-items: center; gap: 14px; }
.ring { width: 64px; height: 64px; flex: none; }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--line); }
.ring .bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .4s ease, stroke .3s; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring text { font-size: 15px; font-weight: 700; fill: var(--ink); }
.status-card .count { font-size: 13px; color: var(--muted); }
.status-card .state { font-weight: 650; margin-top: 2px; }
.state.red { color: var(--bad); }
.state.yellow { color: var(--warn); }
.state.green { color: var(--ok); }
.missing { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.missing .label { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.missing ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.missing button {
  border: 1px dashed var(--line-strong); background: transparent; border-radius: 999px;
  padding: 3px 10px; font-size: 12.5px; color: var(--muted);
}
.missing button:hover { border-color: var(--bad); color: var(--bad); }
.missing .done { color: var(--ok); font-size: 13.5px; font-weight: 550; margin-top: 6px; }

.score-mini { padding: 14px 18px; display: flex; justify-content: space-between; align-items: baseline; }
.score-mini b { font-size: 22px; }
.score-mini span { color: var(--muted); font-size: 13px; }

.toc { padding: 8px; }
.toc a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 14px;
}
.toc a:hover { background: var(--surface-2); color: var(--ink); }
.toc a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.toc .dot {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  border: 1.5px solid var(--line-strong); color: var(--faint);
}
.toc a.complete .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.draft-note { font-size: 12.5px; color: var(--faint); text-align: center; }
.draft-note button { border: 0; background: none; color: var(--faint); text-decoration: underline; padding: 0; font-size: inherit; }
.draft-note button:hover { color: var(--bad); }

/* мобильная полоса прогресса */
.mobile-bar { display: none; }

/* секции */
.form { display: grid; gap: 22px; }
.section { padding: 26px 28px 28px; scroll-margin-top: 20px; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-num {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--accent-soft); color: var(--accent);
}
.section-head h2 { font-size: 19px; }
.section-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

.fields { display: grid; gap: 22px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .field > .label {
  font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.req { color: var(--bad); font-weight: 700; }
.hint { color: var(--muted); font-size: 13px; margin-top: -3px; }
.field.invalid .input, .field.invalid .textarea { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.field.invalid .chips, .field.invalid .segments, .field.invalid .scores { outline: 2px solid var(--bad); outline-offset: 5px; border-radius: 10px; }
.field.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 100% { background: transparent; } 20% { background: var(--warn-soft); } }
.field.flash { border-radius: 10px; }
.ok-mark { color: var(--ok); font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .2s; }
.field.filled .ok-mark { opacity: 1; }

.opt { font-size: 12px; font-weight: 500; color: var(--faint); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.need-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.need-head .segments { justify-self: auto; }
.need-field { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.need-field:has(+ .row-2, + .field:not(.need-field)) { border-bottom: 0; padding-bottom: 0; }
.need-detail { display: grid; gap: 7px; }
.field > label.hint { font-weight: 400; font-size: 13px; display: block; }

/* чипы (мультивыбор) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 999px; padding: 7px 14px 7px 10px; font-size: 14px;
  transition: all .12s; user-select: none;
}
.chip .box {
  width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; transition: all .12s; flex: none;
}
.chip .box svg { width: 11px; height: 11px; opacity: 0; transform: scale(.5); transition: all .12s; }
.chip:hover { border-color: var(--accent); }
.chip[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 550; }
.chip[aria-checked="true"] .box { background: var(--accent); border-color: var(--accent); }
.chip[aria-checked="true"] .box svg { opacity: 1; transform: scale(1); }
.chip-actions { display: flex; gap: 12px; font-size: 13px; }
.chip-actions button { border: 0; background: none; color: var(--accent); padding: 0; }
.chip-actions button:hover { text-decoration: underline; }
.selected-note { font-size: 13px; color: var(--muted); }
.selected-note b { color: var(--ink); font-weight: 600; }

/* сегменты (одиночный выбор) */
.segments { justify-self: start; display: inline-flex; flex-wrap: wrap; gap: 6px; background: var(--surface-2); padding: 5px; border-radius: 12px; border: 1px solid var(--line); }
.segment {
  border: 0; background: transparent; border-radius: 8px; padding: 8px 16px; font-size: 14px; color: var(--muted);
  transition: all .12s;
}
.segment:hover { color: var(--ink); }
.segment[aria-checked="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* карточки баллов */
.scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.score {
  text-align: left; border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 11px; padding: 10px 12px; display: grid; gap: 2px; transition: all .12s;
}
.score b { font-size: 20px; line-height: 1.1; }
.score span { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.score:hover { border-color: var(--accent); }
.score[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.score[aria-checked="true"] b, .score[aria-checked="true"] span { color: var(--accent); }

.value-total {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center;
  padding: 18px 20px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
}
.value-total .big { font-size: 34px; font-weight: 750; line-height: 1; grid-row: span 2; }
.value-total .big small { font-size: 15px; color: var(--muted); font-weight: 500; }
.meter { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--info)); border-radius: 99px; transition: width .4s ease; }
.value-total .formula { font-size: 13px; color: var(--muted); }

/* требования */
.reqs { display: grid; gap: 8px; }
.req-row { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: start; }
.req-row .n { color: var(--faint); font-weight: 600; padding-top: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.req-row .textarea { min-height: 42px; padding: 9px 12px; }
.imp { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; height: 42px; }
.imp button { border: 0; background: var(--surface); padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--faint); }
.imp button + button { border-left: 1px solid var(--line-strong); }
.imp button[aria-pressed="true"].must { background: var(--bad-soft); color: var(--bad); }
.imp button[aria-pressed="true"].nice { background: var(--ok-soft); color: var(--ok); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 9px; border: 1px solid transparent; background: transparent;
  color: var(--faint); display: grid; place-items: center;
}
.icon-btn:hover { background: var(--bad-soft); color: var(--bad); }

.reveal { animation: reveal .25s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* отправка */
.submit-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 28px;
}
.submit-bar p { margin: 0; color: var(--muted); font-size: 14px; }

.banner { padding: 16px 20px; border-radius: 12px; display: grid; gap: 6px; border: 1px solid var(--line); background: var(--surface); }
.banner.warn { background: var(--warn-soft); border-color: transparent; }
.banner.info { background: var(--accent-soft); border-color: transparent; }
.banner h3 { font-size: 15.5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner p { margin: 0; white-space: pre-wrap; }

/* экран успеха */
.success { max-width: 640px; margin: 60px auto; padding: 40px 36px; text-align: center; }
.success .check {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; background: var(--ok-soft); color: var(--ok);
  animation: pop .4s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success h2 { font-size: 26px; }
.success p { color: var(--muted); }
.linkbox { display: flex; gap: 8px; margin: 22px 0 10px; }
.linkbox .input { font-size: 13.5px; }

/* вход по почте */
.auth { width: min(440px, calc(100% - 32px)); margin: 12vh auto 40px; padding: 32px 28px; }
.auth form { display: grid; gap: 12px; }
.auth .eyebrow { color: var(--accent); font-weight: 650; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.auth h1 { font-size: 26px; }
.auth p { color: var(--muted); margin: 0 0 4px; }
.auth .err { color: var(--bad); font-size: 13.5px; min-height: 0; }
.auth .err:empty { display: none; }
.page-head { position: relative; }
.userbar { position: absolute; top: 28px; right: 20px; display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13.5px; }
.userbar[hidden] { display: none; }

/* мои заявки */
.mine { width: min(1140px, calc(100% - 40px)); margin: 16px auto 0; padding: 16px 18px; }
.success + .mine { width: min(640px, calc(100% - 40px)); margin: -36px auto 60px; }
.mine-head { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.mine-head h2 { font-size: 17px; }
.mine-head .count { color: var(--faint); font-weight: 500; }
.mine-head .hint { margin: 0; }
.mine-head .btn { margin-left: auto; align-self: center; }
.mine-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.mine-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.mine-list li:first-child { border-top: 0; }
.mine-list .num { color: var(--faint); font-variant-numeric: tabular-nums; min-width: 42px; }
.mine-list a.title { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-list a.title:hover { color: var(--accent); }
.mine-list li.current a.title { color: var(--accent); }
.mine-list .date { color: var(--faint); font-size: 13px; white-space: nowrap; }
.mine-more { margin-top: 6px; border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; font-size: 13.5px; padding: 4px 0; }
@media (max-width: 640px) {
  .mine-list li { gap: 8px; }
  .mine-list .num { min-width: 0; }
  .mine-list .date { display: none; }
  .userbar { position: static; justify-content: flex-end; margin: -8px -8px 6px 0; }
  .auth { margin-top: 6vh; padding: 26px 20px; }
}

/* ======================================================
   АДМИНКА
   ====================================================== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1400px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.brand { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 14px; }
.topbar .spacer { flex: 1; }

.admin-wrap { max-width: 1400px; margin: 0 auto; padding: 22px 20px 60px; display: grid; gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat { padding: 14px 16px; }
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { position: relative; flex: 1 1 260px; max-width: 380px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search .input { padding-left: 36px; }
.toolbar .select { width: auto; min-width: 170px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font-size: 13.5px; color: var(--muted); display: inline-flex; gap: 6px;
}
.filter b { font-weight: 650; color: var(--faint); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter[aria-pressed="true"] b { color: var(--bg); opacity: .7; }

.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th .arrow { opacity: .35; margin-left: 3px; }
th.sorted .arrow { opacity: 1; color: var(--accent); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr { cursor: pointer; transition: background .1s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.selected { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td .title { font-weight: 600; }
td .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.score-bar { display: flex; align-items: center; gap: 8px; }
.score-bar .meter { width: 56px; height: 6px; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* выезжающая панель */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10, 12, 18, .35); z-index: 40; opacity: 0; transition: opacity .2s; }
.drawer-backdrop.open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw);
  background: var(--bg); z-index: 50; box-shadow: -10px 0 40px rgba(0, 0, 0, .15);
  transform: translateX(100%); transition: transform .25s ease, visibility 0s .25s;
  visibility: hidden;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; visibility: visible; transition: transform .25s ease; }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--surface); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head .t { flex: 1; min-width: 0; }
.drawer-head h2 { font-size: 19px; overflow-wrap: anywhere; }
.drawer-head .meta { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 40px; display: grid; gap: 16px; align-content: start; }
.dsec { padding: 18px 20px; }
.dsec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.kv dd.none { color: var(--faint); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-size: 13px; }
.req-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.req-list li { display: flex; gap: 8px; align-items: baseline; }
.req-list .imp-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; flex: none; }
.imp-tag.Must { background: var(--bad-soft); color: var(--bad); }
.imp-tag.Nice { background: var(--ok-soft); color: var(--ok); }
.it-form { display: grid; gap: 14px; }
.it-form .field > label { font-size: 13.5px; }
.it-form .textarea { min-height: 70px; }
.wsjf-box { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface-2); border-radius: 10px; font-size: 14px; }
.wsjf-box b { font-size: 18px; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.history li { display: flex; gap: 12px; }
.history time { color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.status-select { display: flex; flex-wrap: wrap; gap: 6px; }
.status-select button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.status-select button[aria-pressed="true"] { border-color: transparent; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(380px, 100%); padding: 32px 28px; display: grid; gap: 16px; }
.login h1 { font-size: 22px; }
.login p { margin: 0; color: var(--muted); font-size: 14px; }
.login .err { color: var(--bad); font-size: 14px; min-height: 20px; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .aside { display: none; }
  .mobile-bar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 30; padding: 10px 16px;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line); font-size: 13.5px;
  }
  .mobile-bar .meter { flex: 1; height: 8px; }
  .mobile-bar b { white-space: nowrap; }
  html { scroll-padding-top: 64px; }
  .section { scroll-margin-top: 64px; }
}
@media (max-width: 640px) {
  .page-head { padding: 24px 16px 4px; }
  .layout { padding: 14px 16px 60px; }
  .section { padding: 20px 16px 22px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .req-row { grid-template-columns: 1fr auto auto; }
  .req-row .n { display: none; }
  .submit-bar { padding: 18px 16px; }
  .submit-bar .btn { width: 100%; }
  .success { margin: 24px 16px; padding: 28px 20px; }
  .linkbox { flex-direction: column; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .admin-wrap { padding: 16px 16px 40px; }
  .topbar-inner { padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
  .topbar .brand { flex-basis: 100%; }
  .topbar .spacer { display: none; }
  .mine { width: calc(100% - 32px); }
  .success + .mine { width: calc(100% - 32px); margin: -8px auto 40px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .drawer-body { padding: 14px 14px 40px; }
  .search { max-width: none; }
  .toolbar .select { flex: 1; }
}
