/* ===========================================================================
   ARMK · Анкета кандидата — общий дизайн
   =========================================================================== */
:root {
  --bg: #eef2f9;
  --bg-grad-1: #e9eefc;
  --bg-grad-2: #eef4ff;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --text: #0f1a2e;
  --muted: #6b7890;
  --muted-2: #93a0b5;
  --border: #e3e9f2;
  --border-strong: #d3dbe8;

  --primary: #2f6bff;
  --primary-600: #2559e6;
  --primary-700: #1f49c2;
  --primary-soft: #eaf1ff;
  --accent: #11b3a3;
  --success: #16a34a;
  --success-soft: #e7f7ee;
  --warning: #d98a04;
  --warning-soft: #fdf3e2;
  --danger: #e23b3b;
  --danger-soft: #fdeced;

  --ring: rgba(47, 107, 255, .18);
  --shadow-sm: 0 1px 2px rgba(16, 28, 56, .06), 0 1px 3px rgba(16, 28, 56, .05);
  --shadow-md: 0 6px 18px rgba(20, 35, 75, .08), 0 2px 6px rgba(20, 35, 75, .05);
  --shadow-lg: 0 24px 60px rgba(18, 33, 71, .16);

  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 700px at 85% -10%, var(--bg-grad-2), transparent 60%),
              radial-gradient(1000px 600px at -10% 0%, var(--bg-grad-1), transparent 55%),
              var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
a { color: var(--primary-600); text-decoration: none; }
::selection { background: var(--primary-soft); }

/* ── layout ─────────────────────────────────────────────────────────────── */
.page { max-width: 760px; margin: 0 auto; padding: 28px 18px 64px; }
.page--wide { max-width: 1200px; }

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brand__logo {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--primary), #5b8bff);
  display: grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: .5px;
  box-shadow: var(--shadow-sm);
}
.brand__name { font-weight: 800; font-size: 18px; letter-spacing: .2px; }
.brand__sub { color: var(--muted); font-size: 13px; margin-top: -2px; }

/* ── card ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.card__head { padding: 26px 28px 4px; }
.card__body { padding: 14px 28px 26px; }
.eyebrow { color: var(--primary-600); font-weight: 700; font-size: 12.5px; letter-spacing: .8px; text-transform: uppercase; }
.title { font-size: 26px; font-weight: 800; margin: 8px 0 6px; letter-spacing: -.4px; }
.subtitle { color: var(--muted); font-size: 15px; margin: 0; }

/* ── progress ───────────────────────────────────────────────────────────── */
.progress { padding: 18px 28px 0; }
.progress__bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress__fill { height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .45s cubic-bezier(.4,.0,.2,1); }
.progress__meta { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }

.steps { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 28px 0; }
.step-chip {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 6px 11px; border-radius: 99px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; transition: .2s;
}
.step-chip.is-active { color: var(--primary-700); background: var(--primary-soft); border-color: #cfe0ff; }
.step-chip.is-done { color: var(--success); background: var(--success-soft); border-color: #c8ecd5; }
.step-chip .dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; opacity: .55; }

/* ── form fields ────────────────────────────────────────────────────────── */
.q { margin: 26px 0; }
.q:first-child { margin-top: 12px; }
.q__label { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.q__req { color: var(--danger); margin-left: 3px; }
.q__hint { color: var(--muted); font-size: 13.5px; margin: 2px 0 12px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px){ .field-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-weight: 600; font-size: 14px; color: var(--text); }
.field__label .q__req { font-size: 14px; }
input.input, textarea.input, select.input {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
input.input::placeholder, textarea.input::placeholder { color: var(--muted-2); }
input.input:focus, textarea.input:focus, select.input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring);
}
.field--invalid input.input, .field--invalid textarea.input { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.field__err { color: var(--danger); font-size: 12.5px; font-weight: 600; min-height: 0; }

/* ── option cards (single/multi) ────────────────────────────────────────── */
.options { display: grid; gap: 10px; }
.options--2 { grid-template-columns: 1fr 1fr; }
.options--yn { grid-template-columns: 1fr 1fr; max-width: 320px; }
@media (max-width: 560px){ .options--2 { grid-template-columns: 1fr; } }

.option {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface);
  cursor: pointer; user-select: none; transition: border-color .15s, background .15s, box-shadow .15s, transform .05s;
}
.option:hover { border-color: #b9c6dd; background: #fafcff; }
.option:active { transform: scale(.995); }
.option__mark {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px;
  border: 2px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; transition: .15s;
}
.option--radio .option__mark { border-radius: 99px; }
.option__mark svg { width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(.5); transition: .15s; }
.option__text { font-size: 15px; font-weight: 500; }
.option__suffix { margin-left: auto; color: var(--muted); font-size: 13px; }
.option.is-selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--ring); }
.option.is-selected .option__mark { background: var(--primary); border-color: var(--primary); }
.option.is-selected .option__mark svg { opacity: 1; transform: scale(1); }
.option.is-selected .option__text { color: var(--primary-700); }

.option-extra { margin: -2px 0 4px; padding-left: 2px; }
.option-extra input.input { max-width: 100%; }
.inline-suffix { display: flex; align-items: center; gap: 10px; }
.inline-suffix .input { max-width: 220px; }
.inline-suffix span { color: var(--muted); font-size: 13px; font-weight: 600; }

/* ── consent (согласия на 1 шаге) ───────────────────────────────────────── */
.consent { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.consent__row { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; user-select: none; }
.consent__box {
  width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; border-radius: 7px;
  border: 2px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; transition: .15s;
}
.consent__box svg { width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(.5); transition: .15s; }
.consent__row.is-on .consent__box { background: var(--primary); border-color: var(--primary); }
.consent__row.is-on .consent__box svg { opacity: 1; transform: scale(1); }
.consent__text { font-size: 13.5px; line-height: 1.45; color: var(--text); }
.consent__text a { font-weight: 600; text-decoration: underline; }
.consent__row:hover .consent__box { border-color: #b9c6dd; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  border-radius: var(--radius-sm); padding: 13px 22px; transition: .15s; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover:not(:disabled){ background: var(--primary-600); }
.btn--primary:active:not(:disabled){ background: var(--primary-700); }
.btn--ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--soft { background: var(--primary-soft); color: var(--primary-700); }
.btn--soft:hover { background: #ddebff; }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--danger:hover { background: #fadbdd; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 28px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.actions .spacer { flex: 1; }

/* ── success ────────────────────────────────────────────────────────────── */
.done { text-align: center; padding: 40px 28px 44px; }
.done__badge { width: 86px; height: 86px; margin: 0 auto 18px; border-radius: 99px;
  background: var(--success-soft); display: grid; place-items: center; }
.done__badge svg { width: 44px; height: 44px; color: var(--success); }
.done__code { display: inline-block; margin-top: 14px; font-weight: 800; font-size: 22px;
  letter-spacing: 1px; color: var(--primary-700); background: var(--primary-soft);
  padding: 10px 18px; border-radius: 12px; }

/* ── misc ───────────────────────────────────────────────────────────────── */
.note { color: var(--muted); font-size: 13px; text-align: center; margin-top: 18px; }
.skeleton { color: var(--muted); text-align: center; padding: 60px 20px; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: #11203b; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .25s; z-index: 90; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--err { background: #4a1620; }

/* fade between steps */
.fade-enter { animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===========================================================================
   ADMIN
   =========================================================================== */
.admin-top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-top .spacer { flex: 1; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 640px){ .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat__n { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.stat__l { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 2px; }
.stat--accent .stat__n { color: var(--primary-600); }
.stat--ok .stat__n { color: var(--success); }

.toolbar { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.search { flex: 1; min-width: 220px; position: relative; }
.search input { padding-left: 40px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted-2); }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  font-weight: 700; padding: 13px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 14.5px; vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: var(--primary-soft); }
tbody tr:last-child td { border-bottom: 0; }
.cell-code { font-weight: 700; color: var(--primary-700); }
.cell-name { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.badge--ok { color: var(--success); background: var(--success-soft); }
.badge--wait { color: var(--warning); background: var(--warning-soft); }

/* drawer / modal */
.overlay { position: fixed; inset: 0; background: rgba(13, 24, 46, .5); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: .2s; z-index: 80; }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: 560px; max-width: 94vw;
  background: var(--surface); box-shadow: var(--shadow-lg); z-index: 81; transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.drawer.show { transform: none; }
.drawer__head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 12px; }
.drawer__head .spacer { flex: 1; }
.drawer__body { padding: 6px 24px 28px; overflow-y: auto; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 14px 0; }
.kv dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.kv dd { margin: 0; font-size: 14.5px; }

.ans-section { margin-top: 18px; }
.ans-section__t { font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--primary-600);
  font-weight: 800; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--border); }
.ans-q { margin: 10px 0; }
.ans-q__l { color: var(--muted); font-size: 13px; font-weight: 600; }
.ans-q__v { font-size: 14.5px; margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 500; }
.muted { color: var(--muted-2); }

/* login */
.login-wrap { min-height: 80vh; display: grid; place-items: center; }
.login { width: 380px; max-width: 92vw; }
