:root {
  --bg: #f4f5fa;
  --glass-bg: rgba(255,255,255,0.55);
  --glass-border: rgba(255,255,255,0.7);
  --glass-blur: 18px;
  --text: #1c1d26;
  --text-muted: #6b6d80;
  --accent: #6a5cff;
  --accent-soft: #8f7bff;
  --accent-warn: #b06000;
  --accent-good: #2c7a2c;
  --accent-bad: #c0392b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(60, 50, 120, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
}

/* Цветные свечения фона — статичный градиент, не мешает читать */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 150, 200, 0.35), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(120, 170, 255, 0.35), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(160, 255, 210, 0.30), transparent 45%);
  filter: blur(40px);
}

/* Эффект «жидкого стекла»: полупрозрачность + размытие фона за элементом */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 20px;
  padding: 14px 20px;
}

.topbar img { height: 36px; width: auto; display: block; }

.topbar nav a {
  margin-right: 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.topbar nav a:hover { background: rgba(106,92,255,0.08); color: var(--text); }
.topbar nav a.active { color: var(--accent); background: rgba(106,92,255,0.12); }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px 60px;
}
.page-wide {
  max-width: 1500px;
}

/* Действия в строке очереди — раздельные компактные кнопки, без тяжёлой тени (иначе она "наезжает" на соседнюю кнопку) */
.row-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 4px 0; }
.row-actions .btn { padding: 5px 12px; font-size: 12px; box-shadow: none; }
.row-actions .btn:active { box-shadow: none; }
.flags-list { margin: 0; padding: 0; list-style: none; font-size: 12px; }
.flags-list li { margin-bottom: 3px; padding-left: 14px; position: relative; }
.flags-list li::before { content: '⚑'; position: absolute; left: 0; color: var(--accent-warn); }
.flags-empty { color: var(--text-muted); font-size: 12px; }

h1, h2, h3 { color: var(--text); }
h2 { font-size: 22px; margin-top: 4px; }

/* Карточки-панели — везде, где раньше были голые div/table-обёртки */
.panel {
  padding: 18px 22px;
  margin: 16px 0;
}

/* Кнопки: мягкое стекло + фирменная анимация нажатия ("проседает" и светится) */
.btn {
  display: inline-block;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 4px 14px rgba(106,92,255,0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active {
  transform: scale(0.96) translateY(1px);
  box-shadow: 0 1px 6px rgba(106,92,255,0.45);
}
.btn:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; }

.btn-danger {
  background: linear-gradient(135deg, #d64545, #b83232);
  box-shadow: 0 4px 14px rgba(214,69,69,0.35);
}
.btn-danger:disabled { background: #ccc; box-shadow: none; }

.btn-ghost {
  background: rgba(0,0,0,0.05);
  color: var(--text-muted);
  box-shadow: none;
}
.btn-ghost:active { transform: scale(0.96); box-shadow: none; }

.btn-approve { background: linear-gradient(135deg, #2c9a4a, #48c46a); box-shadow: 0 4px 14px rgba(44,154,74,0.35); }
.btn-run { background: linear-gradient(135deg, #d98324, #f0a94e); box-shadow: 0 4px 14px rgba(217,131,36,0.35); }

.inline-form { display: inline; }

/* Формы */
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=password], input[type=file], select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.7);
  font-size: 14px;
  box-sizing: border-box;
}
input:focus, select:focus { outline: 2px solid var(--accent-soft); outline-offset: 1px; }

.checkbox-row { font-weight: normal; display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

/* Таблицы */
table { border-collapse: collapse; width: 100%; margin: 10px 0; }
th, td { padding: 8px 12px; text-align: left; font-size: 14px; border-bottom: 1px solid rgba(0,0,0,0.08); }
th { color: var(--text-muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: rgba(106,92,255,0.04); }

.status-needs_review { color: var(--accent-warn); font-weight: bold; }
.status-approved { color: var(--accent-good); font-weight: bold; }

/* Уведомления */
.notice { border-radius: var(--radius-sm); padding: 12px 16px; margin: 14px 0; font-size: 14px; }
.notice-warn { background: rgba(240,169,78,0.15); border: 1px solid rgba(217,131,36,0.35); color: #8a5a10; }
.notice-error { background: rgba(192,57,43,0.10); border: 1px solid rgba(192,57,43,0.3); color: var(--accent-bad); font-weight: 600; }
.notice-good { background: rgba(44,154,74,0.12); border: 1px solid rgba(44,154,74,0.3); color: var(--accent-good); font-weight: 600; }

pre { background: rgba(0,0,0,0.04); padding: 12px; border-radius: var(--radius-sm); overflow-x: auto; white-space: pre-wrap; font-size: 13px; }
details { margin: 10px 0; border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius-sm); padding: 8px 12px; background: rgba(255,255,255,0.4); }
summary { cursor: pointer; font-weight: 600; }

.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(217,131,36,0.3);
  border-top-color: var(--accent-warn);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.back-link { display: inline-block; margin-bottom: 12px; color: var(--accent); text-decoration: none; font-size: 14px; }
.back-link:hover { text-decoration: underline; }

/* Шаг Г (таблица позиций закупки, сессия 31) + перенесено из
   podbor_style_patch.css (сессия 26 — файл существовал на диске, но нигде
   не был подключён через <link>, поэтому статусы podbor не были окрашены
   на живом сайте; переносим сюда, единственный подключённый файл стилей) */
.status-found, .status-full_match { color: var(--accent-good); font-weight: bold; }
.status-mismatch_named_model { color: var(--accent-warn); font-weight: bold; }
.status-not_equipment { color: var(--text-muted); font-weight: normal; }
.status-category_not_covered, .status-not_found { color: var(--accent-bad); font-weight: bold; }
/* Сессия 34: заказчик не указал характеристик — кандидат не проверен,
   намеренно НЕ зелёный (как full_match), чтобы не выглядеть как "подходит" */
.status-no_criteria { color: var(--accent-warn); font-weight: bold; }

/* Сравнительная таблица характеристик в аккордеоне позиции */
.match-match { color: var(--accent-good); font-weight: bold; }
.match-mismatch { color: var(--accent-bad); font-weight: bold; }
.match-unknown { color: var(--accent-warn); }
.match-unmapped { color: var(--text-muted); }
