:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #e2e6ec;
  --text: #1f2733;
  --muted: #6b7685;
  --primary: #2a6df4;
  --primary-dark: #1c53c4;
  --success: #1b9e5a;
  --success-bg: #e6f7ee;
  --warning: #b7791f;
  --warning-bg: #fdf3dd;
  --danger: #d13438;
  --danger-bg: #fdeaea;
  --brand: #d13438; /* фирменный красный HSE Company — логотип, акценты меню */
  --brand-dark: #ad2a2d;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 246px;
  flex-shrink: 0;
  background: #16233e;
  color: #cfd8ea;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  transition: width .15s ease;
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 16px; }
.brand-row { display: flex; align-items: center; gap: 10px; color: #fff; overflow: hidden; min-width: 0; }
.brand-row:hover { text-decoration: none; }
.brand-logo {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; background: var(--brand);
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  display: flex; align-items: center; justify-content: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; overflow: hidden; }
.brand-name { font-weight: 700; font-size: 14px; color: #fff; }
.brand-sub { font-size: 11.5px; color: #8ea0c4; }
.sidebar-toggle {
  flex-shrink: 0; background: transparent; border: none; color: #8ea0c4; cursor: pointer;
  padding: 6px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.sidebar-toggle:hover { background: #223154; color: #fff; }
.sidebar-toggle svg { transition: transform .15s ease; }

.nav-cta {
  display: flex; align-items: center; gap: 10px; background: var(--brand); color: #fff;
  padding: 10px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600; margin-bottom: 14px;
  white-space: nowrap; overflow: hidden;
}
.nav-cta:hover { background: var(--brand-dark); text-decoration: none; }

.sidebar nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 4px; }
.nav-group-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #5f7099;
  padding: 0 12px 6px; font-weight: 600; white-space: nowrap;
}

.nav-item {
  display: flex; align-items: center; gap: 11px; color: #cfd8ea; padding: 9px 12px;
  border-radius: 8px; margin-bottom: 2px; font-size: 14px; white-space: nowrap; overflow: hidden;
}
.nav-item svg { flex-shrink: 0; color: var(--brand); opacity: .9; }
.nav-item:hover { background: #223154; text-decoration: none; }
.nav-item:hover svg { opacity: 1; }
.nav-item.active { background: var(--brand); color: #fff; font-weight: 600; }
.nav-item.active svg { color: #fff; opacity: 1; }
.nav-item.disabled { color: #5f7099; cursor: default; pointer-events: none; opacity: .6; }
.nav-item.disabled svg { color: var(--brand); opacity: .5; }

.sidebar-bottom { margin-top: 8px; padding-top: 10px; border-top: 1px solid #223154; }

/* Свёрнутое состояние бокового меню — п.7 ТЗ: остаются только иконки,
   подсказки — через нативный title у ссылок. */
html.sidebar-collapsed .sidebar { width: 68px; padding-left: 10px; padding-right: 10px; }
html.sidebar-collapsed .label,
html.sidebar-collapsed .brand-text,
html.sidebar-collapsed .nav-group-title { display: none; }
html.sidebar-collapsed .nav-cta,
html.sidebar-collapsed .nav-item { justify-content: center; }
html.sidebar-collapsed .sidebar-top { flex-direction: column; gap: 8px; }
html.sidebar-collapsed .brand-row { justify-content: center; }
html.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }

.main { flex: 1; padding: 28px 36px; max-width: 1180px; min-width: 0; }

h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 19px; margin: 28px 0 12px; }
h3 { font-size: 16px; margin: 20px 0 10px; }
.page-sub { color: var(--muted); margin-bottom: 22px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.flash-success { background: var(--success-bg); color: var(--success); }
.flash-warning { background: var(--warning-bg); color: var(--warning); }
.flash-error { background: var(--danger-bg); color: var(--danger); }
.flash-info { background: #eaf1fe; color: var(--primary-dark); }

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn.secondary { background: #eef1f6; color: var(--text); }
.btn.secondary:hover { background: #dfe4ec; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 5px 12px; font-size: 12.5px; }
.btn[disabled] { background: #c7cedb; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .02em; }
tr:hover td { background: #fafbfd; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-muted { background: #eef1f6; color: var(--muted); }
.badge-info { background: #e8f0fe; color: #2a56c6; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.stat .num { font-size: 26px; font-weight: 700; }
.stat .label { color: var(--muted); font-size: 13px; }

form.inline { display: inline; }
form.inline + form.inline { margin-left: 6px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=date], input[type=number], input[type=file], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px;
  background: #fff; color: var(--text);
}
.field { margin-bottom: 14px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 180px; }

.issue-list { list-style: none; padding: 0; margin: 0; }
.issue-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.issue-list li:last-child { border-bottom: none; }

.warning-group { border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; }
.warning-group + .warning-group { margin-top: 6px; }
.warning-group summary { padding: 9px 0; font-size: 13.5px; font-weight: 600; list-style: revert; }
.warning-group summary:hover { color: var(--warning); }
.warning-group[open] summary { border-bottom: 1px solid var(--border); }
.warning-group .issue-list { padding: 2px 0 6px; }
.warning-group .issue-list li { padding: 6px 0; font-size: 13px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs a { padding: 9px 16px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }

.photo-thumb { width: 34px; height: 45px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }

/* ---------------------------------------------------------------------- */
/* Главная (дашборд)                                                      */
/* ---------------------------------------------------------------------- */

.home-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.home-header h1 { margin: 0; }
.period-select { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.period-select select { width: auto; padding: 7px 10px; }

.quick-search-form { position: relative; max-width: 520px; margin: 16px 0 22px; }
.quick-search-form .qs-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.quick-search-form input { padding-left: 38px; }

.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.quick-actions .btn { display: inline-flex; align-items: center; gap: 8px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: block; color: var(--text); }
.stat-card:hover { text-decoration: none; border-color: #c7d0dd; }
.stat-card .num { font-size: 28px; font-weight: 700; line-height: 1.1; }
.stat-card .label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat-card.attention { border-color: #f3c9ca; background: var(--danger-bg); }
.stat-card.attention .num { color: var(--danger); }
.stat-card.attention .label { color: #b64d4f; }

.dash-columns { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; margin-bottom: 6px; }

.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.panel-head h3 { margin: 0; }
.panel-head a { font-size: 13px; }

.attention-list { list-style: none; margin: 0; padding: 0; }
.attention-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.attention-item:last-child { border-bottom: none; }
.attention-item .ai-icon { flex-shrink: 0; color: var(--warning); margin-top: 1px; }
.attention-item.critical .ai-icon { color: var(--danger); }
.attention-item .ai-body { flex: 1; min-width: 0; }
.attention-item .ai-req { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.attention-item .ai-msg { font-size: 13.5px; }
.attention-item .ai-action { margin-top: 8px; }
.attention-empty { color: var(--muted); font-size: 13.5px; padding: 4px 0 8px; }

.recent-actions-cell { text-align: right; white-space: nowrap; }

.docs-stats { display: flex; flex-wrap: wrap; gap: 30px; }
.docs-stats .doc-stat .num { font-size: 21px; font-weight: 700; }
.docs-stats .doc-stat .label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.docs-stats a.doc-stat:hover { text-decoration: none; }
.docs-stats a.doc-stat { color: var(--text); }

@media (max-width: 980px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .dash-columns { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------- */
/* Единая шапка внутренних страниц (Организации/Квалификации/Все заявки —  */
/* см. ТЗ на редизайн интерфейса, разд. 5 «Единые правила оформления»)     */
/* ---------------------------------------------------------------------- */

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.page-head-text h1 { margin-bottom: 4px; }
.page-head-text .page-sub { margin-bottom: 0; }
.page-head-actions { display: flex; gap: 10px; flex-shrink: 0; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-search { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.toolbar-search .ts-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.toolbar-search input { padding-left: 34px; }
.toolbar-filters { display: flex; gap: 4px; }
.toolbar-filters a {
  padding: 7px 13px; border-radius: 7px; font-size: 13.5px; color: var(--muted); background: transparent;
}
.toolbar-filters a:hover { background: #eef1f6; text-decoration: none; }
.toolbar-filters a.active { background: var(--primary); color: #fff; font-weight: 600; }
.toolbar-spacer { flex: 1; }

/* Чипы допустимых разрядов — вместо строки "разряды: 3, 4, 5" (см. ТЗ 7.1) */
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; background: #eef1f6; color: var(--text); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; }
.chip-muted { background: transparent; color: var(--muted); font-weight: 400; }

/* ---------------------------------------------------------------------- */
/* Drawer (боковая панель добавления/редактирования — см. ТЗ 6.1/7.1:      */
/* форма добавления не должна постоянно занимать первый экран)             */
/* ---------------------------------------------------------------------- */

.drawer-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .35); opacity: 0; pointer-events: none;
  transition: opacity .15s ease; z-index: 40;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 400px; max-width: 92vw; background: #fff;
  box-shadow: -8px 0 28px rgba(15, 23, 42, .14); transform: translateX(100%); transition: transform .18s ease;
  z-index: 41; display: flex; flex-direction: column; padding: 22px 24px; overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer-head h3 { margin: 0; }
.drawer-close {
  background: transparent; border: none; font-size: 22px; line-height: 1; color: var(--muted);
  cursor: pointer; padding: 2px 8px; border-radius: 6px;
}
.drawer-close:hover { background: #eef1f6; color: var(--text); }
.drawer-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---------------------------------------------------------------------- */
/* Меню действий в строке таблицы «⋯» — вместо постоянной красной кнопки   */
/* (см. ТЗ разд. 5: «красный только для подтверждённого destructive»)      */
/* ---------------------------------------------------------------------- */

.row-menu { position: relative; display: inline-block; }
.row-menu-btn {
  background: transparent; border: 1px solid var(--border); width: 30px; height: 30px; border-radius: 7px;
  cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1;
}
.row-menu-btn:hover { background: #eef1f6; color: var(--text); }
.row-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--border);
  border-radius: 9px; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); min-width: 170px; padding: 6px;
  display: none; z-index: 30;
}
.row-menu-dropdown.open { display: block; }
.row-menu-dropdown button {
  display: block; width: 100%; text-align: left; background: transparent; border: none; padding: 8px 10px;
  border-radius: 6px; font-size: 13.5px; cursor: pointer; color: var(--text);
}
.row-menu-dropdown button:hover { background: #f4f6f9; }
.row-menu-dropdown button.danger { color: var(--danger); }
.row-menu-dropdown button.danger:hover { background: var(--danger-bg); }

/* Быстрый поиск сотрудника на Главной — подсказки при вводе (см. ТЗ 4.7) */
.qs-suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 23, 42, .14); max-height: 320px; overflow-y: auto;
  display: none; z-index: 30;
}
.qs-suggestions.open { display: block; }
.qs-suggestions a {
  display: block; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.qs-suggestions a:last-child { border-bottom: none; }
.qs-suggestions a:hover { background: #f4f6f9; text-decoration: none; }
.qs-suggestions .qs-name { font-weight: 600; }
.qs-suggestions .qs-meta { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.qs-suggestions .qs-empty { padding: 12px 14px; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------------- */
/* Аналитика и отчёты                                                     */
/* ---------------------------------------------------------------------- */

.an-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.an-filters .field { margin-bottom: 0; min-width: 170px; }
.an-field-range { display: flex; gap: 10px; }
.an-field-range .field { min-width: 130px; }
.an-field-apply { min-width: 0; }

.an-stat-cards { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1180px) { .an-stat-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .an-stat-cards { grid-template-columns: repeat(2, 1fr); } }

.an-cat-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.an-cat-label { width: 70px; flex-shrink: 0; font-size: 13.5px; font-weight: 600; }
.an-cat-bar { flex: 1; height: 10px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.an-cat-fill { height: 100%; background: var(--primary); border-radius: 999px; }
.an-cat-fill.worker { background: var(--brand); }
.an-cat-num { width: 100px; flex-shrink: 0; text-align: right; font-size: 13px; color: var(--muted); }

.an-chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; overflow-x: auto; }
.an-chart-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1; min-width: 34px; height: 100%; }
.an-chart-num { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.an-chart-bar-wrap { flex: 1; display: flex; align-items: flex-end; width: 100%; }
.an-chart-bar { width: 100%; min-height: 2px; background: var(--primary); border-radius: 4px 4px 0 0; }
.an-chart-label { font-size: 11px; color: var(--muted); margin-top: 6px; white-space: nowrap; }

.an-top-list { list-style: decimal; margin: 0; padding: 0 0 0 20px; }
.an-top-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.an-top-list li:last-child { border-bottom: none; }
.an-top-list .an-top-num { font-weight: 700; flex-shrink: 0; }

.an-reports { display: flex; flex-wrap: wrap; gap: 20px; }
.an-report { flex: 1; min-width: 240px; }
.an-report-title { font-weight: 600; margin-bottom: 4px; }

/* Экран выбора типа заказчика («+ Новая заявка», см. ТЗ «Разделение заявок
   на Бизнес-партнеры и Внешние заказчики», п.2) — две крупные равнозначные
   карточки-кнопки, не выпадающий список. */
.customer-type-choice { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.ct-card {
  flex: 1; min-width: 260px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px; text-align: center; color: var(--text);
  display: flex; flex-direction: column; align-items: center; transition: border-color .15s, box-shadow .15s;
}
.ct-card:hover { text-decoration: none; border-color: var(--primary); box-shadow: 0 2px 10px rgba(42,109,244,.08); }
.ct-card-icon {
  width: 56px; height: 56px; border-radius: 50%; background: #eef3fe; color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.ct-card-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.ct-card-desc { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; flex: 1; }

/* Сравнительный блок «Бизнес-партнёры / Внешние заказчики» в Аналитике
   (см. ТЗ, п.11). */
.an-compare-table td, .an-compare-table th { text-align: right; }
.an-compare-table td:first-child, .an-compare-table th:first-child { text-align: left; }
.an-compare-bar-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; }
.an-compare-bar { flex: 1; height: 22px; border-radius: 999px; overflow: hidden; display: flex; background: #eef1f6; }
.an-compare-bar-bp { background: var(--primary); height: 100%; }
.an-compare-bar-ec { background: var(--brand); height: 100%; }
.an-compare-legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.an-compare-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.an-compare-legend .dot.bp { background: var(--primary); }
.an-compare-legend .dot.ec { background: var(--brand); }
.an-report .btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }

/* Пагинация списков (фидбек 28.09.2026 — «Все заявки»/«Организации»
   разрастаются по мере роста числа заявок/компаний, список нужно резать по
   страницам вместо одного длинного вывода). */
.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.pagination-info { color: var(--muted); font-size: 13px; }
.pagination-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pagination-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13.5px; font-weight: 600;
  color: var(--text); background: #eef1f6; border: 1px solid transparent;
}
.pagination-btn:hover { background: #dfe4ec; text-decoration: none; }
.pagination-btn.active { background: var(--primary); color: #fff; }
.pagination-btn.active:hover { background: var(--primary); }
.pagination-btn.disabled { color: var(--muted); background: #f5f6f9; pointer-events: none; opacity: .6; }
.pagination-ellipsis { color: var(--muted); padding: 0 4px; font-size: 13.5px; }

/* --- Вход (MVP «Вход + Администратор», 01.10.2026) ----------------------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-wrap { width: 100%; max-width: 360px; padding: 20px; }
.login-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: 0 4px 18px rgba(20, 30, 50, .06);
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.login-brand-name { font-weight: 700; font-size: 14px; color: var(--text); }
.login-brand-sub { font-size: 11.5px; color: var(--muted); }
.login-title { font-size: 17px; font-weight: 700; margin: 0 0 16px; color: var(--text); }
.login-submit { width: 100%; justify-content: center; margin-top: 4px; }

/* --- Пользователи (управление доступом, MVP) ------------------------------ */
.user-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.user-nav-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted);
}
.role-badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.role-badge-admin { background: var(--danger-bg); color: var(--brand-dark); }
.role-badge-coordinator { background: #eef1f6; color: var(--text); }
.role-badge-engineer { background: #eaf4ff; color: #1b5fa8; }
/* role-badge-user — старое имя роли ('user'), оставлено на случай, если
   где-то в кэше/старых данных встретится необновлённое значение. */
.role-badge-user { background: #eef1f6; color: var(--text); }

/* Кнопка «Назад» в верху страницы (запрос 06.10.2026) */
.back-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  margin: 0 0 12px; border-radius: 50%; border: 1px solid var(--border); background: var(--card);
  color: var(--muted); text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.back-btn:hover { background: #f3f1f4; color: var(--text); border-color: #cfccd4; }
@media print { .back-btn { display: none; } }
