/* ============================================================================
   Hunting Team — style.css v35
   Полная замена style.css v34. Все прежние имена классов сохранены, поэтому
   app.js / targets.js / owner.js / company.js / leaderboard.js менять не нужно.
   Новое: классы оболочки .app-shell / .app-nav / .app-main / .app-header.
   ============================================================================ */

/* ---------- Шрифты (файлы остаются там же, где были) ---------- */
@font-face { font-family: "VK Sans Display"; src: url("assets/fonts/vk-sans-regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "VK Sans Display"; src: url("assets/fonts/vk-sans-medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "VK Sans Display"; src: url("assets/fonts/vk-sans-demibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "VK Sans Display"; src: url("assets/fonts/vk-sans-bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "VK Sans Display"; src: url("assets/fonts/vk-sans-extrabold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "StreetSoulCyrillic"; src: url("assets/fonts/street-soul-cyrillic.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #FAF7F9;
  --card-bg: #FFFFFF;
  --card-alt: #FDFBFC;
  --panel: #FBF8FA;
  --text: #241820;
  --text-2: #5B4650;
  --muted: #8A6B73;
  --faint: #B49AA3;

  --accent: #D6336C;
  --accent-dark: #B02455;
  --accent-light: #FDEDF3;
  --border: rgba(43, 22, 32, 0.07);
  --border-2: rgba(43, 22, 32, 0.12);
  --focus: rgba(214, 51, 108, 0.18);

  --hot: #C0392B;      --hot-bg: #FDE7E7;
  --warm: #B5710E;     --warm-bg: #FDF1DC;
  --cold: #2E6FBF;     --cold-bg: #E6EFF9;
  --ok: #1F8A4C;       --ok-bg: #E4F6EA;

  --radius: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;

  --shadow-sm: 0 1px 2px rgba(43, 22, 32, 0.03);
  --shadow: 0 1px 2px rgba(43, 22, 32, 0.03), 0 10px 28px rgba(140, 30, 70, 0.05);

  --font: "VK Sans Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "VK Sans Display Expanded", "VK Sans Display", -apple-system, sans-serif;

  --nav-w: 244px;
}

* { box-sizing: border-box; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
::selection { background: #FBDCE7; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }

/* ============================================================================
   ОБОЛОЧКА: боковое меню + шапка
   ============================================================================ */

.app-shell { display: flex; align-items: flex-start; min-height: 100vh; }

.app-nav {
  position: sticky;
  top: 0;
  align-self: stretch;
  flex: 0 0 auto;
  width: var(--nav-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 14px;
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.app-nav__brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px; }
.app-nav__toggle {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--text-2);
  background: none; border: none;
}
.app-nav__toggle:hover { background: var(--accent-light); color: var(--accent); }
.app-nav__toggle svg { flex: 0 0 auto; }
.app-nav__mark {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #E8447C, var(--accent-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.app-nav__name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }

.app-nav__list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--accent-light); color: var(--accent); }
.nav-item.is-active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.nav-item svg { flex: 0 0 auto; }
.nav-item__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item__count {
  margin-left: auto;
  font-size: 12px; font-weight: 600;
  color: var(--muted); background: #F1EDEF;
  padding: 1px 8px; border-radius: 999px;
}
.nav-item.is-active .nav-item__count { color: #fff; background: var(--accent); }

.app-nav__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.app-nav__user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--border);
  min-width: 0;
}
.app-nav__avatar {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 999px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.app-nav__user-text { min-width: 0; flex: 1; }
.app-nav__user-text .who { display: block; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-nav__user-text .role { font-size: 11px; color: var(--muted); }
.app-nav__switch { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.app-nav__switch:hover { color: var(--accent); }

@media (min-width: 901px) {
  .app-nav.collapsed { width: 76px; }
  .app-nav.collapsed .app-nav__brand { justify-content: center; gap: 6px; }
  .app-nav.collapsed .app-nav__name,
  .app-nav.collapsed .nav-item__label,
  .app-nav.collapsed .nav-item__count,
  .app-nav.collapsed .app-nav__user-text,
  .app-nav.collapsed .app-nav__switch { display: none; }
  .app-nav.collapsed .nav-item { justify-content: center; gap: 0; }
  .app-nav.collapsed .app-nav__user { justify-content: center; padding: 10px; }
}

.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 28px;
  background: rgba(250, 247, 249, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.app-header__titles { min-width: 0; flex: 1 1 220px; }
.app-header__titles h1 { margin: 0; font-size: 22px; font-weight: 600; }
.app-header__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.app-header__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.app-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-2);
  color: var(--muted);
  flex: 0 1 300px; min-width: 200px;
}
.app-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font: inherit; font-size: 14px; color: var(--text); margin: 0; padding: 0; }
.app-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }

.app-body { padding: 24px 28px 48px; }

@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .app-nav {
    position: static; width: 100%; height: auto; flex-direction: row; align-items: center;
    gap: 12px; padding: 12px 14px; overflow-x: auto;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .app-nav__list { flex-direction: row; gap: 4px; }
  .app-nav__toggle { display: none; }
  .app-nav__foot { margin: 0 0 0 auto; }
  .app-nav__user { padding: 6px 10px; }
  .app-nav__user-text .role { display: none; }
  .app-header { padding: 14px 16px; }
  .app-body { padding: 16px 16px 40px; }
}

/* Старая шапка — на случай страниц, которые ещё не переведены на оболочку */
header.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
header.topbar .title { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
header.topbar .who { color: var(--muted); font-size: 14px; }
header.topbar a { font-size: 14px; }

.section-banner {
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ---------- Контейнеры ---------- */
.wrap { max-width: 1040px; margin: 0; padding: 0; }
.wrap.wide { max-width: none; width: 100%; }
.wrap.company-wrap { max-width: 1040px; }

/* ============================================================================
   Базовые элементы управления
   ============================================================================ */

select, input[type=text], input[type=password], input[type=number], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
  transition: border-color .12s, box-shadow .12s;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
input::placeholder, textarea::placeholder { color: var(--faint); }

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  padding: 10px 16px;
  transition: background .12s, border-color .12s, color .12s;
}
button:disabled { opacity: 0.45; cursor: default; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  box-shadow: 0 8px 18px rgba(214, 51, 108, 0.24);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: #fff;
  border: 1px solid var(--border-2);
  color: var(--text-2);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Вход ---------- */
.center-screen { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-card h1 { font-size: 20px; margin: 0 0 18px; }
.owner-login-card { max-width: 340px; }

/* ---------- Прогресс ---------- */
.progress-bar-outer { height: 6px; background: #F1E4E9; border-radius: 999px; overflow: hidden; margin: 4px 0 12px; }
.progress-bar-inner { height: 100%; background: var(--accent); border-radius: 999px; transition: width .25s ease; }

/* ============================================================================
   Карточка компании и блоки критериев
   ============================================================================ */

.company-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.company-card h2 { margin: 0 0 10px; font-size: 21px; font-weight: 600; }

.card-watermark {
  text-align: center;
  white-space: nowrap;
  font-family: "StreetSoulCyrillic", cursive, sans-serif;
  font-size: clamp(18px, 3vw, 32px);
  line-height: 1;
  color: var(--accent);
  opacity: 0.2;
  pointer-events: none;
  user-select: none;
  margin: 8px 0;
}

.company-meta { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 14px; }
.company-meta b { color: var(--text); }
.company-meta-line { color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.company-meta-line b { color: var(--text); }
.company-address-line { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

.site-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600; font-size: 14px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.site-btn:hover { background: #FBDCE7; color: var(--accent-dark); }
.no-site { color: #B91C1C; font-size: 14px; }

.criteria-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.criteria-block .label { font-weight: 600; margin-bottom: 12px; font-size: 15px; }
.criteria-block .label .pts-hint { color: var(--faint); font-weight: 400; font-size: 12.5px; margin-left: 6px; }

.options-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.opt-btn {
  background: #fff;
  border: 1px solid var(--border-2);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  display: inline-flex; align-items: center; gap: 7px;
}
.opt-btn:hover { border-color: var(--accent); color: var(--accent); }
.opt-btn.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt-btn .score-tag { font-size: 11.5px; font-weight: 600; opacity: 0.72; font-variant-numeric: tabular-nums; }

.editable-field input[type=text] { margin-bottom: 0; }
.editable-field .label { font-weight: 600; margin-bottom: 8px; font-size: 15px; }

.readonly-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px 10px;
  background: var(--panel);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.readonly-fields .ro-item .ro-label { font-size: 11.5px; color: var(--muted); }
.readonly-fields .ro-item .ro-value { font-size: 14px; font-weight: 600; }

.profile-field { margin-bottom: 22px; }
.profile-field .ro-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.profile-field .opt-btn { margin-top: 8px; }

/* ---------- Итоговая панель (Forecast) ---------- */
.score-panel {
  position: sticky; bottom: 0; z-index: 15;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-2);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 16px 22px;
  margin: 20px -28px 0;
}
.forecast-label { font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: 0.06em; margin-right: 8px; }
.score-total { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.category-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12.5px; font-weight: 700;
  margin-left: 10px;
  vertical-align: 4px;
}
.actions { display: flex; gap: 10px; }
.actions .btn-primary, .actions .btn-secondary { width: auto; }

.done-screen { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- Визард ---------- */
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.wizard-nav a { font-size: 14px; font-weight: 600; }
.wizard-step-title { font-size: 14px; color: var(--muted); margin-bottom: 12px; }

.top-gate-block, .gutfeel-block {
  text-align: center;
  padding: 26px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.top-gate-block .gate-title, .gutfeel-block .gutfeel-title { font-size: 17px; font-weight: 600; margin-bottom: 22px; }

.gutfeel-buttons { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.gutfeel-btn {
  width: 124px; height: 124px;
  border-radius: 50%;
  border: 4px solid transparent;
  color: #fff;
  font-size: 17px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(43, 22, 32, 0.16);
  transition: transform .15s ease, box-shadow .15s ease;
}
.gutfeel-btn:hover { transform: translateY(-3px); }
.gutfeel-btn.red { background: radial-gradient(circle at 35% 30%, #FF8B8B, #C0392B); }
.gutfeel-btn.blue { background: radial-gradient(circle at 35% 30%, #6FA8FF, #1D4ED8); }
.gutfeel-btn.purple { background: radial-gradient(circle at 35% 30%, #C99BFF, #7C3AED); }
.gutfeel-btn.selected { border-color: var(--text); }
.gutfeel-buttons-secondary { margin-top: 20px; width: 100%; }
.gutfeel-btn.small { width: 100px; height: 100px; font-size: 14px; }

/* ============================================================================
   Таблицы
   ============================================================================ */

.table-scroll { overflow-x: auto; border-radius: var(--radius); }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13.5px;
  table-layout: fixed;
}
table.data-table th, table.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(43, 22, 32, 0.05);
  text-align: left;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}
table.data-table.compact { table-layout: auto; font-size: 12.5px; }
table.data-table.compact th, table.data-table.compact td { padding: 6px 12px; }
table.data-table th {
  background: var(--panel);
  border-bottom: 1px solid var(--border-2);
  position: sticky; top: 0; z-index: 2;
  font-size: 12px; font-weight: 600; color: var(--muted);
  white-space: nowrap;
}
table.data-table tbody tr:nth-child(even) { background: var(--card-alt); }
table.data-table tbody tr:hover { background: #FFF7FA; }
table.data-table td.col-compact, table.data-table th.col-compact { white-space: nowrap; }
table.data-table td b, table.data-table td a { font-weight: 600; }
table.data-table td a { color: var(--text); }
table.data-table td a:hover { color: var(--accent); }

table.data-table th.sortable { cursor: pointer; user-select: none; position: relative; }
table.data-table th.sortable:hover { color: var(--accent); }
table.data-table th .th-row { display: flex; align-items: center; gap: 4px; justify-content: space-between; }
table.data-table th .sort-arrow { font-size: 11px; color: var(--accent); min-width: 10px; }
table.data-table th .col-filter-btn { background: none; border: none; padding: 2px 4px; font-size: 12px; color: var(--faint); }
table.data-table th .col-filter-btn.active { color: var(--accent); }

.col-filter-popup {
  position: absolute; top: 100%; left: 0; z-index: 50;
  background: #fff;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 34px rgba(43, 22, 32, 0.16);
  padding: 12px;
  min-width: 210px; max-height: 300px; overflow-y: auto;
  font-weight: 400; white-space: normal;
}
.col-filter-popup label { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 4px 0; cursor: pointer; }
.col-filter-popup .cf-actions { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
.col-filter-popup .cf-actions span { color: var(--accent); cursor: pointer; font-weight: 600; }

table.simple-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
table.simple-table th, table.simple-table td { padding: 9px 12px; border-bottom: 1px solid rgba(43, 22, 32, 0.05); text-align: left; }
table.simple-table th { color: var(--muted); font-weight: 600; font-size: 12px; }

/* ---------- KPI-карточки ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.stat-card .num { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.05; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat-card .lbl { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ---------- Панель фильтров ---------- */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.filters select, .filters input { width: auto; margin-bottom: 0; min-width: 150px; }
.filters button { white-space: nowrap; }

/* Постраничная разбивка списка Таргет-листов (2026-09-10) — добавлено
   после сборки этого дизайна, стили в оригинальном style.css отсутствовали. */
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted);
}
.pagination-bar select { width: auto; min-width: 60px; margin-bottom: 0; }
.pagination-info { font-weight: 600; color: var(--text); }

/* ============================================================================
   Плашки и бейджи
   ============================================================================ */

.pill-hot, .pill-warm, .pill-cold {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
}
.pill-hot { color: var(--hot); background: var(--hot-bg); }
.pill-warm { color: var(--warm); background: var(--warm-bg); }
.pill-cold { color: var(--cold); background: var(--cold-bg); }

.category-chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.category-chip-hot { background: var(--hot-bg); color: var(--hot); }
.category-chip-warm { background: var(--warm-bg); color: var(--warm); }
.category-chip-cold { background: var(--cold-bg); color: var(--cold); }

.segment-chip { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.02em; }
.segment-chip-sme { background: #E0E7FF; color: #4338CA; }
.segment-chip-le { background: #FAE8FF; color: #A21CAF; }
.segment-override-select { width: auto; display: inline-block; font-size: 12px; padding: 4px 10px; margin: 0; border-radius: 999px; }

.status-dot-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600;
  padding: 4px 12px 4px 9px;
  border-radius: 999px;
  border: 1px solid;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }

.status-pill-top { display: inline-block; background: var(--accent-dark); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.status-pill-legacy { display: inline-block; background: #F1F2F5; color: #4B5563; font-size: 10.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; margin-left: 6px; }
.status-pill-whitespace { display: inline-block; background: var(--ok-bg); color: var(--ok); font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.status-pill-bitrix { display: inline-block; background: #E0E7FF; color: #4338CA; font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.subindustry-badge { display: inline-block; background: #F1EDEF; color: var(--text-2); font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.badge-gtm { display: inline-block; background: var(--ok-bg); color: var(--ok); font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.hunting-team-tag { display: inline-block; background: var(--accent-light); color: var(--accent); font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; letter-spacing: 0.02em; }
.tireless-badge { display: inline-block; background: linear-gradient(135deg, #FF7A18, #FF3D68); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.spartak-crown { font-size: 14px; margin-left: 2px; }

.manager-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; color: #fff; line-height: 1.4; }
.manager-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; flex: 0 0 auto; }

.combo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #FF7A18, #FF3D68);
  color: #fff; font-weight: 600; font-size: 13px;
  padding: 6px 14px; border-radius: 999px;
  white-space: nowrap;
}

.tag-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.tag-pill { background: var(--panel); border: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; padding: 5px 12px; border-radius: 999px; }

/* ============================================================================
   Таргет-листы
   ============================================================================ */

.target-tabs { display: flex; gap: 2px; padding: 3px; background: var(--panel); border-radius: var(--radius-sm); }
.target-tab {
  background: none; border: none;
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 400;
  white-space: nowrap;
}
.target-tab:hover { color: var(--accent); }
.target-tab.active { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 1px 3px rgba(43, 22, 32, 0.10); }

.reminder-card {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 14px;
}
.reminder-title { font-weight: 600; margin-bottom: 6px; }
.reminder-text { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.reminder-list { margin: 0; padding-left: 20px; font-size: 14px; }
.reminder-list li { margin-bottom: 4px; }

.target-row {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .12s;
}
.target-row:hover { box-shadow: 0 4px 16px rgba(140, 30, 70, 0.08); }
.target-row-main { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; }
.target-row-name { flex: 2 1 260px; min-width: 0; font-weight: 600; font-size: 14.5px; }
.target-row-name a { color: var(--text); }
.target-row-name a:hover { color: var(--accent); }
.target-row-work { flex: 1 1 200px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.target-row-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.target-btn { width: auto; padding: 8px 14px; font-size: 13px; }

.work-pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.work-pill-free { background: var(--accent-light); color: var(--accent); }
.work-pill-mine { background: var(--ok-bg); color: var(--ok); }
.work-pill-other { background: #F1F2F5; color: #4B5563; }
.work-pill-soon { background: #FEF3C7; color: #B45309; margin-left: 4px; }
.work-pill-unlucky { background: var(--hot-bg); color: #B91C1C; margin-left: 4px; }

.target-detail { border-top: 1px solid var(--border); padding: 16px 18px; background: var(--card-alt); }
.target-detail-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.target-detail-title { font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.target-contacts-list, .target-comments-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 260px; overflow-y: auto; }
.target-contact-row, .target-comment-row { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; }
.target-contact-meta, .target-comment-meta { color: var(--muted); font-size: 12px; }
.target-comment-meta { margin-bottom: 4px; }
.target-contact-del { color: #B91C1C; font-size: 11px; }
.target-comment-row.target-comment-system { background: var(--panel); border-style: dashed; }
.target-comment-status { color: var(--accent); font-weight: 600; }
.target-comment-text { white-space: pre-wrap; }

.target-mini-form { display: flex; flex-direction: column; gap: 8px; }
.target-mini-form input, .target-mini-form select, .target-mini-form textarea { margin-bottom: 0; font-size: 13px; padding: 9px 11px; }
.target-mini-form textarea { resize: vertical; }

@media (max-width: 720px) {
  .target-detail-inner { grid-template-columns: 1fr; }
}

.analytics-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.analytics-period-label { font-weight: 600; font-size: 14px; min-width: 220px; text-align: center; }

/* ---------- Дашборд "Аналитика" (2026-09-10) ---------- */
.analytics-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 16px; margin-bottom: 16px; }
.analytics-charts .criteria-block { margin-bottom: 0; }
.analytics-chart-canvas-wrap { position: relative; height: 260px; }
.analytics-chart-canvas-wrap.tall { height: 300px; }
.analytics-chart-note { color: var(--muted); font-size: 12px; margin-top: 10px; }
.analytics-drilldown-hint { color: var(--muted); font-size: 13px; padding: 22px 0; text-align: center; }
.analytics-clickable-hint { color: var(--faint); font-size: 11px; margin-top: -6px; margin-bottom: 8px; }

/* ---------- Модалка ---------- */
.target-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(43, 22, 32, 0.4);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.target-modal {
  background: var(--card-bg);
  border-radius: 22px;
  max-width: 920px; width: 100%;
  padding: 28px;
  position: relative;
  box-shadow: 0 24px 60px rgba(43, 22, 32, 0.28);
}
.target-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--panel); border: none;
  width: 34px; height: 34px; border-radius: 999px;
  font-size: 15px; color: var(--muted); padding: 0;
}
.target-modal-close:hover { background: var(--accent-light); color: var(--accent); }
.target-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-right: 34px; }

/* ---------- Канбан ---------- */
.kanban-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kanban-col {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex: 0 0 264px;
  max-height: 76vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.kanban-col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  font-weight: 600; font-size: 13px;
  border-top: 3px solid;
}
.kanban-col-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.kanban-col-count { margin-left: auto; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.kanban-col-body { padding: 10px 10px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.kanban-empty { color: var(--faint); font-size: 12px; text-align: center; padding: 14px 0; }
.kanban-card {
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-left: 3px solid;
  border-radius: 11px;
  padding: 11px 12px;
  cursor: pointer;
  transition: box-shadow .12s;
}
.kanban-card:hover { box-shadow: 0 4px 14px rgba(140, 30, 70, 0.10); }
.kanban-card-name { font-weight: 600; font-size: 13px; margin-bottom: 7px; }
.kanban-card-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 11px; }

/* ============================================================================
   Рейтинг
   ============================================================================ */

.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
.leader-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-sm);
}
.leader-row.me { background: #FFFBFC; border-color: rgba(214, 51, 108, 0.22); }
.leader-rank { font-family: var(--font-display); font-size: 18px; font-weight: 700; width: 44px; text-align: center; color: var(--faint); }
.leader-name { flex: 1 1 180px; min-width: 0; font-weight: 600; font-size: 14.5px; }
.leader-metric { flex: 0 0 auto; min-width: 100px; text-align: right; }
.leader-metric .big { font-family: var(--font-display); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.leader-metric .small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ============================================================================
   Обогащение (ИНН Мастер), финансы
   ============================================================================ */

.gtm-box { background: #F3FBF5; border: 1px solid #CDE9D4; border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 14px; }
.gtm-box .gtm-title { font-weight: 600; color: var(--ok); margin-bottom: 12px; font-size: 14px; }
.gtm-box .gtm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.gtm-box .gtm-item .gtm-label { font-size: 11.5px; color: var(--muted); }
.gtm-box .gtm-item .gtm-value { font-size: 14px; font-weight: 600; margin-top: 2px; }

.finance-box { background: #F4F8FD; border: 1px solid #DCE8F6; border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 14px; }
.finance-box .finance-title { font-weight: 600; color: #245A94; margin-bottom: 14px; font-size: 14px; }
.finance-layout { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.finance-chart { display: flex; align-items: flex-end; gap: 12px; height: 140px; flex: 1 1 220px; min-width: 200px; }
.finance-chart .fc-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; flex: 1; }
.finance-chart .fc-bar-val { font-size: 11px; color: var(--muted); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.finance-chart .fc-bar { width: 26px; background: linear-gradient(180deg, #6FA8FF, #245A94); border-radius: 6px 6px 2px 2px; }
.finance-chart .fc-bar-year { font-size: 11px; color: var(--faint); margin-top: 6px; }

.enrich-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.enrich-toolbar .enrich-updated { font-size: 12px; color: var(--muted); }
.enrich-empty { color: var(--muted); font-size: 14px; padding: 16px 0; }

.raw-fields-toggle { margin-top: 10px; }
.raw-fields-toggle summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; }
.raw-fields-toggle .raw-fields-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; margin-top: 10px; font-size: 12px; }
.raw-fields-toggle .rf-row { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--border); padding: 4px 0; }
.raw-fields-toggle .rf-key { color: var(--muted); }
.raw-fields-toggle .rf-val { text-align: right; font-weight: 500; }

/* ============================================================================
   Зал славы
   ============================================================================ */

.hall-board-photo { width: 100%; border-radius: var(--radius-md); box-shadow: var(--shadow); }
.hall-decoder-row { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border-2); font-size: 13.5px; }
.hd-term { font-weight: 700; min-width: 180px; flex: 0 0 auto; }
.hd-arrow { color: var(--accent); }
.hd-desc { color: var(--muted); }

/* ============================================================================
   Геймификация: салют, баннеры, тосты, маскот
   ============================================================================ */

#fireworks-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.fw-emoji { position: absolute; bottom: -40px; font-size: 28px; animation: fw-fly 1.8s ease-in forwards; opacity: 0; }
@keyframes fw-fly {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; }
  15% { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(var(--drift, 0px)) rotate(360deg); opacity: 0; }
}

.milestone-banner {
  position: fixed; top: 30%; left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  background: linear-gradient(135deg, #FF7A18, #FF3D68);
  color: #fff;
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700;
  padding: 20px 40px;
  border-radius: 22px;
  z-index: 10000;
  box-shadow: 0 18px 50px rgba(43, 22, 32, 0.3);
  animation: banner-pop 1.8s ease forwards;
  text-align: center; pointer-events: none;
}
@keyframes banner-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
.milestone-banner-big { font-size: 42px; padding: 28px 52px; animation: banner-pop-big 2.6s ease forwards; }
@keyframes banner-pop-big {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-4deg); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(2deg); }
  30% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05); }
}

.fullscreen-salute {
  position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  background: radial-gradient(circle at 50% 45%, rgba(255,122,24,0.32), rgba(255,61,104,0.16) 40%, transparent 70%);
  animation: salute-flash 1.4s ease-out forwards;
}
@keyframes salute-flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

.streak-broken-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--text); color: #fff;
  padding: 11px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  z-index: 9998;
  box-shadow: 0 10px 28px rgba(43, 22, 32, 0.26);
  animation: toast-pop-center 2.6s ease forwards;
}
.pandora-toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #fff; border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 16px 16px 4px 16px;
  font-size: 14px; font-weight: 600;
  z-index: 9998; max-width: 280px;
  box-shadow: 0 12px 30px rgba(43, 22, 32, 0.16);
  animation: toast-pop 2.8s ease forwards;
}
@keyframes toast-pop {
  0% { opacity: 0; transform: translateY(10px); }
  10% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-4px); }
}
@keyframes toast-pop-center {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  10% { opacity: 1; transform: translateX(-50%) translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-4px); }
}

.pandora-widget { position: fixed; right: 22px; bottom: 100px; z-index: 9500; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pandora-widget-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #FFB199, var(--accent));
  font-size: 24px;
  border: 2px solid #fff;
  box-shadow: 0 8px 22px rgba(140, 30, 70, 0.28);
  animation: pandora-idle-bob 3s ease-in-out infinite;
}
.pandora-widget-btn:hover { filter: brightness(1.06); }
@keyframes pandora-idle-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.pandora-bubble {
  background: #fff; border: 1px solid var(--border); color: var(--text);
  padding: 10px 16px; border-radius: 14px 14px 4px 14px;
  font-size: 13px; font-weight: 600; max-width: 220px;
  box-shadow: 0 10px 26px rgba(43, 22, 32, 0.16);
}
.pandora-bubble-pop { animation: toast-pop 4s ease forwards; }

/* ---------- Пасхалка «Белое на белом» (чинится кликом по Pandora) ---------- */
#card-area.white-on-white-bug,
#card-area.white-on-white-bug * {
  background-color: #f5f5f5 !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: #f5f5f5 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* ============================================================================
   v36 (2026-09-16): счётчик просроченного в меню, переключатели, чек-лист
   drop-in дизайн из "Модернизация существующего чеклист" — базовые классы
   .nav-item__count/.btn-ghost/.switch-label и весь раздел "Чек-лист" ниже
   заменяют более ранние версии этих же классов (см. историю в CLAUDE.md).
   Остальной файл (Таргет-листы/Аналитика/Сводная/Битрикс/пагинация и т.д.)
   этот дроп не трогал и не заменяет — обновлён только раздел Чек-листа.
   ============================================================================ */

/* Красный счётчик просроченного в пункте меню "Чек-лист" (#nav-overdue-count) —
   заполняется только checklist.js, на остальных страницах span пустой и
   скрыт через :empty. Переопределяет более раннее (серое) определение
   .nav-item__count выше по каскаду — это осознанно, старое определение
   нигде фактически не использовалось. */
.nav-item__count {
  margin-left: auto;
  font-size: 12px; font-weight: 700;
  color: #fff; background: var(--hot);
  padding: 1px 8px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.nav-item__count:empty { display: none; }
.app-nav.collapsed .nav-item__count { display: none; }

.btn-ghost { background: none; border: none; color: var(--muted); }
.btn-ghost:hover { color: var(--accent); }

/* Счётчик внутри таба фильтра (#due-tabs .tab-count) */
.tab-count {
  font-size: 11.5px; font-weight: 700;
  color: var(--muted); background: #F1EDEF;
  border-radius: 999px; padding: 1px 7px;
  font-variant-numeric: tabular-nums;
}
.target-tab.active .tab-count { color: var(--accent); background: var(--accent-light); }
.target-tab[data-bucket="overdue"] .tab-count.has-items { color: #fff; background: var(--hot); }
.tab-count:empty { display: none; }

/* Переключатель-тумблер общего вида (показывать выполненные / вкл-выкл чек-листа) */
.switch-label { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.switch-label input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  position: relative; flex: 0 0 auto;
  width: 38px; height: 22px; border-radius: 999px;
  background: #E7DCE1; transition: background .15s;
}
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 3px rgba(43, 22, 32, 0.3);
  transition: left .15s;
}
.switch-label input:checked + .switch-track { background: var(--accent); }
.switch-label input:checked + .switch-track::after { left: 19px; }
.switch-label input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--focus); }
.switch-label input:disabled + .switch-track { opacity: 0.5; }

/* ---------- Печать ---------- */
@media print {
  .app-nav, .app-header, .pandora-widget, #fireworks-layer, .score-panel,
  .app-header__actions, .due-cards, .filters, .checklist-row-actions,
  .checklist-toggle-bar { display: none !important; }
  .app-body { padding: 0; }
  body { background: #fff; }
}

/* ============================================================================
   Чек-лист (2026-09-15, редизайн 2026-09-16)
   ============================================================================ */

/* ---------- Переключатель "Чек-лист включён/выключен" (личная настройка) ---------- */
.checklist-toggle-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.ctb-text { flex: 1 1 260px; min-width: 0; }
.ctb-title { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.ctb-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.checklist-status-pill { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; letter-spacing: 0.02em; }
.checklist-status-pill.is-on { background: var(--ok-bg); color: var(--ok); }
.checklist-status-pill.is-off { background: #F1EDEF; color: var(--muted); }
.checklist-toggle-bar .switch-label { flex: 0 0 auto; margin-left: auto; }

/* ---------- Блок добавления задачи ---------- */
.add-task-card {
  background: var(--card-bg);
  border: 1px solid rgba(214, 51, 108, 0.22);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.add-task-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.add-task-head .at-title { font-size: 15px; font-weight: 600; }
.add-task-head .at-note { margin-left: auto; font-size: 12px; color: var(--faint); }

.field { display: block; }
.field .field-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field input { margin-bottom: 0; }

.checklist-add-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.checklist-add-form .field-title { flex: 1 1 300px; min-width: 240px; }
.checklist-add-form .field-due { flex: 0 0 auto; }
.checklist-add-form .field-due input { width: auto; }
.checklist-add-form .at-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.quick-due { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.quick-due .qd-label { font-size: 12px; color: var(--muted); }
.qd-chip {
  font-size: 12.5px; font-weight: 600;
  color: var(--text-2); background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 12px;
}
.qd-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- KPI-карточки по срокам (кликабельные фильтры) ---------- */
.due-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.due-card {
  display: flex; align-items: center; gap: 13px;
  padding: 15px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-weight: 400;
}
.due-card:hover { border-color: rgba(214, 51, 108, 0.35); }
.due-card.is-active { border-color: rgba(214, 51, 108, 0.35); box-shadow: var(--shadow); }
.due-card__chip {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}
.due-card__num { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.due-card__lbl { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.due-card--overdue .due-card__chip { background: var(--hot-bg); color: var(--hot); }
.due-card--overdue.has-items .due-card__num { color: var(--hot); }
.due-card--today .due-card__chip { background: var(--warm-bg); color: var(--warm); }
.due-card--today.has-items .due-card__num { color: var(--warm); }
.due-card--week .due-card__chip { background: var(--cold-bg); color: var(--cold); }
.due-card--none .due-card__chip { background: #F1EDEF; color: var(--muted); }

/* ---------- Группы и строки задач ---------- */
.checklist-groups { display: flex; flex-direction: column; gap: 18px; }
.checklist-group { display: flex; flex-direction: column; gap: 8px; }
.checklist-group-head { display: flex; align-items: center; gap: 9px; padding: 0 4px; }
.checklist-group-dot { width: 9px; height: 9px; border-radius: 999px; flex: 0 0 auto; }
.checklist-group-title { font-size: 13px; font-weight: 600; }
.checklist-group-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.checklist-group-rule { flex: 1; height: 1px; background: var(--border); }
.checklist-group-overdue .checklist-group-dot { background: var(--hot); }
.checklist-group-overdue .checklist-group-title { color: var(--hot); }
.checklist-group-today .checklist-group-dot { background: var(--warm); }
.checklist-group-today .checklist-group-title { color: var(--warm); }
.checklist-group-week .checklist-group-dot,
.checklist-group-month .checklist-group-dot,
.checklist-group-later .checklist-group-dot { background: var(--cold); }
.checklist-group-week .checklist-group-title,
.checklist-group-month .checklist-group-title,
.checklist-group-later .checklist-group-title { color: var(--cold); }
.checklist-group-none .checklist-group-dot { background: var(--faint); }
.checklist-group-none .checklist-group-title { color: var(--muted); }
.checklist-group-done .checklist-group-dot { background: var(--ok); }
.checklist-group-done .checklist-group-title { color: var(--ok); }

.checklist-row {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px 14px 15px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  transition: box-shadow .12s, border-color .12s;
}
.checklist-row:hover { box-shadow: 0 4px 16px rgba(140, 30, 70, 0.08); }
/* акцентная полоса по сроку — берётся из плашки внутри строки */
.checklist-row:has(.checklist-due-overdue) { border-left-color: var(--hot); }
.checklist-row:has(.checklist-due-today) { border-left-color: var(--warm); }
.checklist-row:has(.checklist-due-later) { border-left-color: var(--cold); }
.checklist-row:has(.checklist-due-none) { border-left-color: var(--faint); }
.checklist-row.checklist-row-done { opacity: 0.62; border-left-color: #CFE9D8; }

.checklist-checkbox {
  flex: 0 0 auto;
  appearance: none; -webkit-appearance: none;
  width: 21px; height: 21px; margin: 1px 0 0;
  border: 2px solid rgba(43, 22, 32, 0.22);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background .12s, border-color .12s;
}
.checklist-checkbox:hover { border-color: var(--accent); }
.checklist-checkbox:checked { background: var(--ok); border-color: var(--ok); }
.checklist-checkbox:checked::after {
  content: ""; position: absolute; left: 5px; top: 1px;
  width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checklist-checkbox:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }

.checklist-row-body { flex: 1 1 auto; min-width: 0; }
.checklist-row-title { font-weight: 600; font-size: 14.5px; text-wrap: pretty; }
.checklist-row-title.checklist-title-done { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.checklist-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 7px; }

.checklist-row-actions { display: flex; gap: 6px; flex: 0 0 auto; align-items: flex-start; }
.icon-btn {
  width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-2); border-radius: 10px;
  background: #fff; color: var(--muted);
  font-size: 13px;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn--danger { color: var(--faint); }
.icon-btn--danger:hover { border-color: var(--hot); color: var(--hot); }

.checklist-due-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 999px; }
.checklist-due-none { background: #F1EDEF; color: var(--muted); }
.checklist-due-later { background: var(--cold-bg); color: var(--cold); }
.checklist-due-today { background: var(--warm-bg); color: var(--warm); }
.checklist-due-overdue { background: var(--hot-bg); color: var(--hot); }
.checklist-due-done { background: var(--ok-bg); color: var(--ok); }

.checklist-closed-tag { font-size: 11.5px; color: var(--muted); font-style: italic; }
.checklist-company-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.checklist-company-tag a { color: var(--text-2); }
.checklist-company-tag a:hover { color: var(--accent); }

.checklist-reschedule-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 12px; padding: 10px; background: var(--panel); border-radius: var(--radius-sm);
}
.checklist-reschedule-form input[type="datetime-local"] { width: auto; margin: 0; padding: 8px 11px; font-size: 13px; }
.checklist-reschedule-form .rs-quick { flex: 1 1 100%; display: flex; gap: 6px; flex-wrap: wrap; }
.checklist-reschedule-form .qd-chip { background: #fff; }

.checklist-history-list { margin-top: 10px; padding: 10px 12px; background: var(--panel); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--text-2); }
.checklist-history-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.checklist-history-row + .checklist-history-row { border-top: 1px dashed var(--border); }
.checklist-history-row .hr-arrow { color: var(--accent); }
.checklist-history-row .hr-new { font-weight: 600; }
.checklist-history-row .hr-when { margin-left: auto; color: var(--faint); }

/* ---------- Пустое состояние ---------- */
.checklist-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 56px 20px; text-align: center;
  background: var(--card-bg);
  border: 1px dashed rgba(43, 22, 32, 0.14);
  border-radius: var(--radius);
}
.checklist-empty__icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.checklist-empty__title { font-size: 15px; font-weight: 600; }
.checklist-empty__text { font-size: 13px; color: var(--muted); max-width: 320px; }
.checklist-empty--disabled .checklist-empty__icon { background: #F1EDEF; color: var(--muted); }

/* ---------- Календарь (2026-09-15) ---------- */

.calendar-settings-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.calendar-settings-card h2 { font-size: 15px; margin: 0 0 6px; }
.calendar-settings-card p { font-size: 13px; color: var(--muted); margin: 0 0 14px; max-width: 560px; }
.calendar-settings-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.calendar-settings-form input[type="password"] { flex: 1 1 260px; }
.calendar-settings-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.calendar-settings-status .checklist-status-pill { flex: 0 0 auto; }
.calendar-settings-error { color: var(--hot); font-size: 13px; margin-top: 8px; }
.calendar-settings-link { font-size: 12.5px; color: var(--muted); cursor: pointer; }
.calendar-settings-link:hover { color: var(--accent); }

.calendar-section-title { font-size: 15px; font-weight: 600; margin: 22px 0 10px; }
.calendar-section-title:first-child { margin-top: 0; }

.calendar-meeting-row {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.calendar-meeting-row.confidence-high { border-left-color: var(--ok); }
.calendar-meeting-row.confidence-medium { border-left-color: var(--warm); }
.calendar-meeting-row.confidence-none { border-left-color: var(--faint); }
.calendar-meeting-row.status-resolved { opacity: 0.68; }

.calendar-meeting-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; }
.calendar-meeting-time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.calendar-meeting-summary { font-weight: 600; font-size: 14.5px; }

.calendar-confidence-chip { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; letter-spacing: 0.02em; }
.calendar-confidence-chip.is-high { background: var(--ok-bg); color: var(--ok); }
.calendar-confidence-chip.is-medium { background: var(--warm-bg); color: var(--warm); }
.calendar-confidence-chip.is-none { background: #F1EDEF; color: var(--muted); }

.calendar-meeting-match { margin-top: 8px; font-size: 13.5px; }
.calendar-meeting-match .company-name { font-weight: 600; }
.calendar-meeting-match .other-owner { color: var(--warm); font-size: 12.5px; margin-left: 6px; }

.calendar-meeting-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.calendar-meeting-actions .target-btn { width: auto; padding: 7px 14px; font-size: 13px; }

.calendar-meeting-picker { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.calendar-meeting-picker input[type="text"] { flex: 1 1 220px; }
.calendar-meeting-picker-results { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.calendar-meeting-picker-result {
  text-align: left; padding: 7px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-2); background: #fff; font-size: 13px; cursor: pointer;
}
.calendar-meeting-picker-result:hover { border-color: var(--accent); color: var(--accent); }

.calendar-meeting-candidates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.calendar-candidate-chip {
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border-2); background: #fff; cursor: pointer;
}
.calendar-candidate-chip:hover { border-color: var(--accent); color: var(--accent); }

.calendar-internal-toggle {
  display: block; width: 100%; text-align: left;
  background: var(--card-alt); border: 1px dashed var(--border-2); border-radius: var(--radius-md);
  padding: 12px 16px; font-size: 13.5px; color: var(--text-2); cursor: pointer; margin: 8px 0;
}
.calendar-internal-toggle:hover { border-color: var(--accent); color: var(--accent); }

.calendar-meeting-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
