/* ==========================================================================
   Медосмотры — design system (handoff: design_handoff_medosmotry)
   ========================================================================== */
:root {
  --ink: #16233f;
  --blue-900: #1b3a73;
  --blue-600: #2f6fed;
  --logo-bg: #020955;  /* фирменный синий «Градус» — подложка логотипа */
  --orange-500: #f5811f;
  --orange-700: #c65c00;
  --text-2: #3d4d68;
  --text-3: #5c6b85;
  --text-4: #8b98af;
  --text-5: #a3aec2;
  --border: #e6eaf2;
  --border-strong: #d6dde8;
  --input-border: #dde3ec;
  --divider: #eef1f7;
  --divider-soft: #f2f4f9;
  --bg-app: #f6f8fb;
  --bg-soft: #fbfcfe;
  --bg-header: #f7f9fc;

  --green-bg: #e6f6ec;
  --green-text: #127a3c;
  --green-border: #cfe9d8;
  --red: #e04f4f;
  --red-text: #c93a3a;
  --red-bg: #fff6f6;
  --red-border: #f6cccc;
  --amber-bg: #fff3e6;
  --amber-text: #c65c00;
  --amber-border: #f7dcbc;

  --radius-input: 7px;
  --radius-card: 10px;
  --radius-modal: 12px;
  --radius-badge: 6px;

  --shadow-card: 0 2px 10px rgba(20, 35, 65, .06);
  --shadow-dropdown: 0 10px 28px rgba(20, 35, 65, .16);
  --shadow-modal: 0 24px 60px rgba(20, 35, 65, .28);
  --shadow-primary: 0 2px 6px rgba(245, 129, 31, .3);

  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover { color: #1b4fc0; }

.mono { font-family: var(--mono); }
.muted { color: var(--text-4); }
.dash { color: var(--text-5); }

h1, h2, h3 { margin: 0; }

:focus-visible { outline: 2px solid rgba(47, 111, 237, .35); outline-offset: 1px; }

/* --- app header ---------------------------------------------------------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.app-header__brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--logo-bg);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  flex: none;
}
.logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; display: block; }
.logo--sm { width: 28px; height: 28px; border-radius: 7px; font-size: 13px; }
.logo--sm img { padding: 4px; }
.brand-name { font-weight: 700; font-size: 19px; color: var(--blue-900); }
.brand-name--sm { font-size: 16px; }

.app-header__right { display: flex; align-items: center; gap: 20px; }
.bell {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #f1f4f9;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
}
.bell__dot {
  position: absolute; top: 3px; right: 3px;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px;
  background: var(--orange-500);
  color: #fff;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.user-chip { display: flex; align-items: center; gap: 11px; }
.user-chip__meta { text-align: right; line-height: 1.3; }
.user-chip__name { font-weight: 500; font-size: 13px; }
.user-chip__role { font-size: 11px; color: var(--text-4); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue-900);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
  flex: none;
}
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--orange { background: var(--orange-500); }
.avatar--link:hover { color: #fff; }

/* --- layout ------------------------------------------------------------- */
.page { max-width: 1180px; margin: 0 auto; padding: 20px 24px 60px; }
.page--narrow { max-width: 760px; }
.page--wide { max-width: 1400px; }
.stack { display: flex; flex-direction: column; }
.stack-16 > * + * { margin-top: 16px; }
.row-between { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.page-title { font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--blue-900); }
.page-subtitle { font-size: 12.5px; color: var(--text-4); margin-top: 4px; }

.h1 { font-weight: 700; font-size: 30px; line-height: 1.2; }
.section-title { font-weight: 700; font-size: 17px; color: var(--blue-900); }
.card-title { font-weight: 700; font-size: 15px; color: var(--blue-900); }

/* --- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px;
  border-radius: var(--radius-input);
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text-2);
  font-family: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.btn:hover { background: #f7f9fc; }
.btn--lg { height: 38px; padding: 0 16px; font-size: 13px; }
.btn--primary {
  border: 0; background: var(--orange-500); color: #fff; font-weight: 600;
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover { background: #e2740f; }
.btn--outline-blue { border: 1px solid var(--blue-600); color: var(--blue-600); background: #fff; }
.btn--outline-blue:hover { background: #f3f7ff; }
.btn--outline-navy { border: 1.5px solid var(--blue-900); color: var(--blue-900); background: #fff; }
.btn--outline-navy:hover { background: #f3f6fc; }
.btn--action { border: 1px solid var(--orange-500); background: #fff7ef; color: var(--orange-700); }
.btn--action:hover { background: #ffefdd; }
.btn:disabled, .btn[disabled] {
  background: #f5f7fa; border-color: var(--border); color: #bcc5d4;
  cursor: not-allowed; box-shadow: none;
}
.btn-icon {
  width: 30px; height: 30px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; border: 1px solid var(--input-border); background: #fff;
  color: var(--text-4); cursor: pointer;
}
.btn-icon:hover { background: #f7f9fc; color: var(--text-2); }

/* --- cards ------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card--flush { box-shadow: none; }
.card__pad { padding: 18px 20px; }

/* --- KPI strip ------------------------------------------------------- */
.kpi { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kpi__card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--kpi-accent, var(--blue-900));
  border-radius: 8px;
  padding: 12px 14px;
  transition: box-shadow 140ms ease, border-color 140ms ease;
}
a.kpi__card:hover { box-shadow: var(--shadow-card); }
.kpi__card--active { border-color: var(--kpi-accent, var(--blue-900)); box-shadow: 0 0 0 1px var(--kpi-accent, var(--blue-900)) inset; }
.kpi__value { font-weight: 700; font-size: 22px; line-height: 1; color: var(--blue-900); }
.kpi__label { font-size: 11.5px; color: var(--text-4); margin-top: 6px; }

/* --- toolbar --------------------------------------------------------- */
.toolbar {
  background: #fff; border: 1px solid var(--border); border-radius: 9px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.toolbar__spacer { margin-left: auto; }
.toolbar__hint { font-size: 12px; color: var(--text-5); }
/* Форма-обёртка фильтра не должна ломать flex-раскладку тулбара. */
.toolbar__filters { display: contents; }

.search {
  display: flex; align-items: center; gap: 8px;
  height: 34px; width: 290px; max-width: 100%;
  padding: 0 11px;
  border: 1px solid var(--input-border); border-radius: var(--radius-input);
  color: var(--text-3);
}
.search input {
  border: 0; outline: 0; background: transparent; width: 100%;
  font-size: 12.5px; color: var(--ink);
}
.search input::placeholder { color: var(--text-5); }
.search__clear {
  border: 0; background: transparent; cursor: pointer; color: var(--text-4);
  display: inline-flex; padding: 2px; flex: none;
}
.search__clear:hover { color: var(--ink); }

/* --- dropdown ------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 232px;
  background: #fff; border: 1px solid #e0e6f0; border-radius: 9px;
  box-shadow: var(--shadow-dropdown);
  padding: 6px; z-index: 30;
  display: none;
}
.dropdown__menu--right { left: auto; right: 0; }
.dropdown.is-open .dropdown__menu { display: block; }
.dropdown__item {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; background: transparent;
  border-radius: 6px;
  font-family: inherit; font-size: 12.5px; color: #2c3a54; cursor: pointer;
}
.dropdown__item:hover { background: #f4f7fd; }
.dropdown__item:disabled { color: var(--text-5); cursor: not-allowed; background: transparent; }
.dropdown__sep { height: 1px; background: var(--divider); margin: 5px 2px; }
.dropdown__note { padding: 6px 10px 4px; font-size: 11px; color: var(--text-5); }
.dropdown__menu form { margin: 0; }

/* --- badges --------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px; font-weight: 500;
  white-space: nowrap;
}
.badge--lg { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.badge--amber  { background: #fff3e6; color: #c65c00; }
.badge--gold   { background: #fdf2d9; color: #8a6100; }
.badge--blue   { background: #eef4ff; color: #2f6fed; }
.badge--green  { background: #e6f6ec; color: #127a3c; }
.badge--violet { background: #f2ecfd; color: #6c3fd1; }
.badge--grey   { background: #f1f3f7; color: #6b7789; }
.badge--info   { background: #f4f7fd; color: #2f6fed; }

/* --- table --------------------------------------------------------- */
.table-card { background: #fff; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid thead th {
  background: var(--bg-header);
  text-align: left;
  padding: 11px 8px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-4);
  white-space: nowrap;
}
table.grid thead th:first-child { padding-left: 16px; }
table.grid thead th:last-child { padding-right: 16px; }
table.grid tbody td {
  padding: 9px 8px;
  border-top: 1px solid var(--divider);
  font-size: 12.5px; color: var(--text-3);
  vertical-align: middle;
}
table.grid tbody td:first-child { padding-left: 16px; }
table.grid tbody td:last-child { padding-right: 16px; }
table.grid tbody tr:hover { background: var(--bg-soft); }
table.grid tbody tr.is-selected { background: #fff8f0; }
.cell-num { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--blue-900); white-space: nowrap; }
.cell-fio { font-weight: 500; color: var(--ink); max-width: 160px; white-space: normal; overflow-wrap: break-word; }
.cell-org { max-width: 140px; white-space: normal; overflow-wrap: break-word; }
.cell-right { text-align: right; }
.cell-sum { text-align: right; font-weight: 600; color: var(--ink); white-space: nowrap; }

/* sortable column headers */
table.grid th.th-sort { padding: 0; }
table.grid th.th-sort a {
  display: block; padding: 11px 8px; color: inherit; white-space: nowrap;
}
table.grid th.th-sort:first-child a { padding-left: 16px; }
table.grid th.th-sort a:hover { color: var(--blue-600); background: #eef2f8; }
table.grid th.th-sort.is-sorted a { color: var(--blue-900); }
.th-arrow { font-size: 11px; }
.th-arrow--dim { opacity: .35; }

/* registry: tighter so more columns fit before horizontal scroll */
table.grid--registry thead th,
table.grid--registry thead th.th-sort a { padding-top: 9px; padding-bottom: 9px; padding-left: 6px; padding-right: 6px; }
table.grid--registry tbody td { padding: 8px 6px; font-size: 12px; }
table.grid--registry tbody td:first-child,
table.grid--registry thead th:first-child { padding-left: 14px; }
table.grid--registry tbody td:last-child,
table.grid--registry thead th:last-child { padding-right: 14px; }
.table-scroll { scrollbar-width: thin; }

/* inline assignee editor (registry) */
.assignee-edit { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.assignee-edit[hidden] { display: none; }
.assignee-edit select { height: 28px; font-size: 11px; padding: 0 4px; min-width: 130px; }

.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-top: 1px solid var(--divider);
  background: var(--bg-soft);
  font-size: 12px; color: var(--text-5);
}

/* --- checkbox ----------------------------------------------------- */
.check {
  width: 15px; height: 15px;
  border: 1.5px solid #c3ccdb; border-radius: 4px;
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none;
  appearance: none; -webkit-appearance: none;
  margin: 0;
}
.check:checked { background: var(--orange-500); border-color: var(--orange-500); }
.check:checked::after { content: ''; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }

/* --- pagination -------------------------------------------------- */
.pager { display: flex; gap: 6px; align-items: center; }
.pager a, .pager span.page {
  min-width: 28px; height: 28px; padding: 0 6px;
  border: 1px solid var(--input-border); border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; color: var(--text-2);
}
.pager a:hover { background: #f4f7fd; }
.pager .is-current { background: var(--orange-500); border-color: var(--orange-500); color: #fff; font-weight: 600; }
.pager .is-disabled { color: var(--text-5); pointer-events: none; }
.pager .gap { border: 0; }

/* --- inline date editor ---------------------------------------- */
.dates-cell { display: flex; flex-direction: column; gap: 3px; }
.date-add { display: inline-flex; align-items: center; gap: 4px; }
.date-add[hidden] { display: none; }
.date-add input[type=date] {
  height: 26px; border: 1px solid var(--input-border); border-radius: 5px;
  font-family: inherit; font-size: 11px; padding: 0 4px;
}
.edit-toggle {
  border: 0; background: transparent; color: var(--orange-500);
  cursor: pointer; padding: 2px; display: inline-flex;
}

/* --- forms ---------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field__label {
  font-size: 11.5px; font-weight: 500; color: var(--text-3);
}
.req { color: var(--orange-500); }
.field input:not([type=checkbox]):not([type=radio]),
.field select,
.field textarea,
.input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--input-border); border-radius: var(--radius-input);
  padding: 8px 12px;
  font-family: inherit; font-size: 13px; color: var(--ink);
  background: #fff;
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-600); outline: none; }
.field .helptext, .field__hint { font-size: 11px; color: var(--text-5); }
.field.has-error input, .field.has-error select { border: 1.5px solid var(--red); background: var(--red-bg); }
.field .errorlist { margin: 0; padding: 0; list-style: none; color: var(--red); font-size: 11px; }
.field--wide { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }

.dropzone {
  border: 1.5px dashed #c9d6ef; background: #f8fbff; border-radius: 9px;
  padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; color: var(--text-3);
  transition: border-color 140ms ease, background 140ms ease;
}
.dropzone.is-drag { border-color: var(--blue-600); background: #f3f8ff; }
.dropzone__icon { color: var(--blue-600); }
.dropzone__hint { font-size: 11px; color: var(--text-5); }
.dropzone input[type=file] { font-size: 12px; }

/* --- modal card (create form etc.) ------------------------------ */
.overlay {
  background: rgba(20, 35, 65, .42);
  min-height: calc(100vh - 58px);
  padding: 40px 20px;
  display: flex; justify-content: center; align-items: flex-start;
}
/* Всплывающее модальное окно (массовые действия в реестре). */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 35, 65, .38);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-overlay .modal-card { width: 440px; }
.modal-card {
  width: 720px; max-width: 100%;
  background: #fff; border-radius: var(--radius-modal);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}
.modal-card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--divider);
}
.modal-card__title { font-weight: 700; font-size: 18px; color: var(--blue-900); }
.modal-card__sub { font-size: 12px; color: var(--text-4); margin-top: 3px; }
.modal-card__body { padding: 20px 24px; }
.modal-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 24px; border-top: 1px solid var(--divider); background: var(--bg-soft);
}

/* --- messages ------------------------------------------------- */
.flash { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.flash li {
  padding: 10px 14px; border-radius: 8px;
  background: #eef4ff; border: 1px solid #d9e4fb; color: #23508c;
  font-size: 12.5px;
}
.flash li.error { background: var(--red-bg); border-color: var(--red-border); color: var(--red-text); }
.flash li.success { background: var(--green-bg); border-color: var(--green-border); color: var(--green-text); }

/* --- drawer (filters) --------------------------------------- */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(20, 35, 65, .42);
  display: none; z-index: 40;
}
.drawer-backdrop.is-open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 340px; max-width: 90vw;
  background: #fff; z-index: 41;
  transform: translateX(100%); transition: transform 180ms ease;
  padding: 18px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.drawer-backdrop.is-open .drawer { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__title { font-weight: 700; font-size: 15px; color: var(--blue-900); }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group__label { font-size: 11.5px; font-weight: 500; color: var(--text-4); text-transform: uppercase; letter-spacing: .03em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 10px; border-radius: 14px;
  border: 1px solid var(--input-border);
  color: var(--text-3);
  font-size: 11.5px; font-weight: 500;
  cursor: pointer; user-select: none;
  background: #fff;
}
.chip input { display: none; }
.chip.is-on { background: var(--blue-900); border-color: var(--blue-900); color: #fff; }
.drawer__foot { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }

/* --- application page --------------------------------------- */
.breadcrumb { font-size: 12px; color: var(--text-5); margin-bottom: 5px; }
.req-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.req-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.req-number { font-family: var(--mono); font-weight: 700; font-size: 24px; line-height: 1; color: var(--blue-900); }
.req-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.copied-hint { font-size: 12px; font-weight: 500; color: var(--green-text); }
.copied-hint[hidden] { display: none; }

.req-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; margin-top: 16px; }
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.data-item__label { font-size: 11px; color: var(--text-5); }
.data-item__value { font-size: 13px; font-weight: 500; margin-top: 3px; display: flex; align-items: center; gap: 6px; }

.timeline { display: flex; flex-direction: column; gap: 13px; }
.tl-step { display: flex; gap: 10px; align-items: flex-start; }
.tl-dot {
  width: 17px; height: 17px; border-radius: 50%; flex: none; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border-strong); background: #fff; color: #fff;
}
.tl-step--done .tl-dot { border-color: var(--blue-900); background: var(--blue-900); }
.tl-step--current .tl-dot { border-color: var(--orange-500); }
.tl-title { font-size: 12.5px; font-weight: 500; color: var(--text-5); }
.tl-step--done .tl-title { color: var(--ink); }
.tl-step--current .tl-title { color: var(--orange-700); }
.tl-meta { font-size: 11px; color: var(--text-5); margin-top: 2px; }

/* --- documents ------------------------------------------------ */
.docs-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; flex-wrap: wrap; gap: 8px; }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.doc-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.doc-card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--divider);
}
.doc-card__name { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13.5px; color: var(--blue-900); }
.doc-card__name .icon { color: var(--blue-600); }
.doc-card__count { font-size: 11.5px; font-weight: 500; color: var(--orange-500); }
.doc-card table { width: 100%; border-collapse: collapse; }
.doc-card thead th {
  text-align: left; padding: 8px 16px;
  font-size: 10.5px; font-weight: 600; color: var(--text-5); text-transform: uppercase; letter-spacing: .03em;
  background: var(--bg-soft);
}
.doc-card thead th:last-child { text-align: right; }
.doc-card tbody td { padding: 9px 16px; border-top: 1px solid var(--divider-soft); vertical-align: top; }
.doc-row__name { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.doc-file { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.doc-file .icon { color: var(--blue-600); }
.doc-file__size { font-family: var(--mono); font-size: 11px; color: var(--text-5); }
.doc-file__none { font-size: 12px; color: var(--text-5); margin-top: 4px; }
.doc-res { text-align: right; white-space: nowrap; }
.res-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 6px;
  border: 1px solid var(--input-border); background: var(--bg-soft);
  font-size: 11.5px; font-weight: 500; color: var(--text-4);
}
.res-chip__box {
  width: 13px; height: 13px; border-radius: 3px;
  border: 1.5px solid #c3ccdb; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.res-chip--ok { border-color: var(--green-border); background: #f4fbf6; color: var(--green-text); }
.res-chip--ok .res-chip__box { background: #16a34a; border-color: #16a34a; }
.res-chip--no { border-color: var(--red-border); background: var(--red-bg); color: var(--red-text); }
.res-chip--no .res-chip__box { background: var(--red); border-color: var(--red); }
.res-chip--recheck { border-color: var(--amber-border); background: #fff8ef; color: var(--amber-text); }
.doc-comments { font-size: 11.5px; font-weight: 500; color: var(--text-4); display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }

/* resolution column: keep it visually attached to the row's files */
.doc-res__inner { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.res-form {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end;
  padding: 8px; border: 1px solid var(--divider); border-radius: 7px; background: var(--bg-soft);
}
.res-form .input { min-height: 30px; height: 30px; padding: 4px 8px; font-size: 12px; width: 150px; }
.res-form .btn { height: 30px; padding: 0 10px; font-size: 12px; }
.doc-row--recheck > td:first-child { box-shadow: inset 3px 0 0 var(--orange-500); }

.doc-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.doc-actions .input { min-height: 30px; height: 30px; padding: 4px 8px; font-size: 12px; width: auto; flex: 1; min-width: 140px; }
.doc-actions .btn { height: 30px; padding: 0 10px; font-size: 12px; }

/* candidate upload */
.cand-block-title {
  font: 600 12px 'Golos Text', sans-serif; color: var(--text-4);
  text-transform: uppercase; letter-spacing: .03em; margin-top: 18px;
}
.cand-file-input { margin-top: 8px; font-size: 12px; width: 100%; }

/* link-log <details> on the application page */
.link-log { padding: 10px 14px; }
.link-log summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--blue-900); }
.link-log table.grid tbody td { font-size: 12px; }

.comment-thread { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 100%; border-radius: 10px 10px 10px 3px; border: 1px solid var(--border); background: #fff; padding: 8px 10px; }
.bubble--candidate { align-self: flex-end; background: #eef4ff; border-color: #d9e4fb; border-radius: 10px 10px 3px 10px; }
.bubble__author { font-size: 11px; font-weight: 600; color: var(--blue-900); }
.bubble--candidate .bubble__author { color: var(--blue-600); }
.bubble__text { font-size: 12px; line-height: 1.45; color: var(--text-2); margin-top: 3px; }
.bubble__time { font-family: var(--mono); font-size: 10px; color: var(--text-5); margin-top: 5px; }

/* --- payout bar --------------------------------------------- */
.payout-bar {
  margin-top: 24px;
  background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--orange-500);
  border-radius: 10px; padding: 16px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.payout-bar.is-sticky { position: sticky; bottom: 12px; box-shadow: var(--shadow-card); }
.payout-bar__field { display: flex; flex-direction: column; gap: 6px; }
.payout-bar__field input {
  width: 190px; height: 40px;
  border: 1.5px solid var(--orange-500); border-radius: 7px;
  padding: 0 12px;
  font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--ink);
}
.payout-bar__note { font-size: 12px; line-height: 1.5; color: var(--text-4); max-width: 280px; }
.payout-bar__actions { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.payout-bar__actions .btn { height: 40px; }

/* --- candidate (mobile) ------------------------------------- */
.candidate-page { min-height: 100vh; background: var(--bg-app); padding: 20px 12px 40px; display: flex; justify-content: center; }
.candidate-card { width: 400px; max-width: 100%; background: #fff; border: 1px solid var(--input-border); border-radius: 10px; padding: 18px 20px 22px; box-shadow: var(--shadow-card); }
.candidate-brand { display: flex; align-items: center; justify-content: center; gap: 9px; padding-bottom: 14px; border-bottom: 1px solid var(--divider); }
.candidate-h1 { text-align: center; font-weight: 700; font-size: 18px; color: var(--blue-900); margin: 16px 0 14px; }
.candidate-meta { border: 1.5px solid var(--blue-900); border-radius: 9px; padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.candidate-meta__row { display: flex; gap: 8px; font-size: 12px; }
.candidate-meta__row span:first-child { width: 82px; flex: none; color: var(--text-4); font-size: 11.5px; }
.cand-doc { margin-top: 16px; }
.cand-doc__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.cand-doc__title { font-weight: 600; font-size: 12.5px; }
.cand-file { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; background: var(--bg-soft); }
.cand-file__name { font-weight: 500; font-size: 12px; color: var(--blue-600); }
.cand-note { border: 1px solid var(--red-border); background: var(--red-bg); border-radius: 8px; padding: 10px 12px; font-size: 11.5px; line-height: 1.5; color: #a63232; margin-bottom: 8px; }
.cand-warn { background: #fff8ef; border: 1px solid var(--amber-border); border-radius: 9px; padding: 11px 13px; font-size: 11.5px; line-height: 1.5; color: #a5620f; }
.cand-cta { width: 100%; height: 46px; border: 0; border-radius: 9px; background: var(--orange-500); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.cand-foot { text-align: center; font-size: 11px; color: var(--text-5); margin-top: 8px; }

/* --- admin tabs --------------------------------------------- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 11px 0; border-bottom: 2px solid transparent; font-weight: 500; font-size: 13px; color: var(--text-4); }
.tabs a.is-active { border-bottom-color: var(--orange-500); color: var(--blue-900); font-weight: 600; }

/* --- руководство пользователя (/docs/) --------------------- */
.guide { max-width: 820px; }
.guide__toc { margin: 18px 0 28px; padding: 14px 18px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-card); }
.guide__toc-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-4); margin-bottom: 8px; }
.guide__toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.guide__toc li { margin: 3px 0; font-size: 13px; }
.guide section { margin-top: 34px; scroll-margin-top: 20px; }
.guide h2 { font-weight: 700; font-size: 18px; color: var(--blue-900); padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.guide h3 { font-weight: 600; font-size: 14.5px; color: var(--blue-900); margin: 20px 0 6px; }
.guide p { margin: 9px 0; font-size: 13.5px; line-height: 1.62; color: var(--text-2); }
.guide ul, .guide ol.steps { margin: 9px 0; padding-left: 22px; }
.guide li { margin: 5px 0; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.guide ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
.guide ol.steps > li { position: relative; padding: 2px 0 2px 38px; margin: 12px 0; }
.guide ol.steps > li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-900); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.guide table.grid { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.guide table.grid th, .guide table.grid td { text-align: left; padding: 8px 12px; border: 1px solid var(--border); vertical-align: top; }
.guide table.grid th { background: var(--bg-header); font-weight: 600; color: var(--blue-900); }
.guide table.grid td code { font-size: 12px; background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; color: var(--text-3); }
.guide .note { margin: 12px 0; padding: 11px 14px; border-left: 3px solid var(--orange-500); background: var(--amber-bg); border-radius: 0 6px 6px 0; font-size: 13px; color: var(--amber-text); }
.guide .back-top { font-size: 12px; color: var(--blue-600); }

@media (max-width: 640px) {
  .guide__toc ol { columns: 1; }
}

/* --- utilities --------------------------------------------- */
.icon { display: inline-block; vertical-align: -0.15em; flex: none; }
.hstack { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hstack--tight { gap: 4px; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
hr.soft { border: 0; border-top: 1px solid var(--divider); margin: 20px 0; }

@media (max-width: 1000px) {
  .kpi { grid-template-columns: repeat(3, 1fr); }
  .req-grid { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kpi { grid-template-columns: repeat(2, 1fr); }
  .page { padding: 16px 14px 48px; }
  .payout-bar.is-sticky { position: static; }
  .app-header { height: auto; padding: 10px 14px; }
  .user-chip__meta { display: none; }
}
