:root {
  --bg: #f5f7fb;
  --card: #fff;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-weak: #e8f0ff;
  --accent: #2563eb;
  --text: #0f172a;
  --text-muted: #64748b;
  --muted: #64748b;
  --border: #e2e8f0;
  --line: #e6ebf3;
  --success: #16a34a;
  --error: #dc2626;
  --danger: #dc2626;
  --danger-weak: #ffe7e7;
  --warn: #f59e0b;
  --warn-weak: #fff7e6;
  --ok: #16a34a;
  --ok-weak: #e9f9ef;
  --radius: 8px;
  --radius-card: 16px;
  --shadow: 0 10px 30px rgba(15,23,42,.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); min-height: 100vh; }
a { color: inherit; text-decoration: none; }

/* Общий блок и шапка в стиле страницы «Рассылки» */
.manager-wrap { max-width: 1320px; margin: 0 auto; padding: 18px; }
.manager-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 18px;
}
.manager-brand { font-weight: 900; letter-spacing: .04em; color: var(--text); font-size: 1.05rem; }
.manager-nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--text-muted); font-weight: 700; }
.manager-nav a { padding: 8px 10px; border-radius: 12px; font-size: 0.95rem; color: var(--text-muted); }
.manager-nav a:hover { background: var(--primary-weak); color: var(--primary); }
.manager-nav a.active { background: var(--primary-weak); color: var(--primary); }
.manager-nav a.nav-logout { color: var(--text-muted); margin-left: 8px; border-left: 1px solid var(--line); padding-left: 16px; }
.manager-page-title { font-size: 28px; font-weight: 950; margin: 18px 0 14px; }

/* Dropdown nav */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-toggle { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; padding: 8px 10px; border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.nav-dropdown-toggle:hover { background: var(--primary-weak); color: var(--primary); }
.nav-dropdown-toggle.active { background: var(--primary-weak); color: var(--primary); }
.nav-arrow { font-size: 0.75rem; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.12); min-width: 180px; z-index: 100; padding: 4px 0; margin-top: 2px; }
.nav-dropdown-menu a { display: block; padding: 8px 16px; color: var(--text); text-decoration: none; font-size: 0.93rem; white-space: nowrap; }
.nav-dropdown-menu a:hover { background: var(--bg); color: var(--primary); }
.nav-dropdown-menu a.active { background: var(--primary-weak); color: var(--primary); }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }

/* Nav badge (unread counter) */
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--error); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; margin-left: 4px; }
.nav-dropdown-toggle .nav-badge { position: relative; top: -1px; }

.manager-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }

/* Стили страницы Рассылки (общие карточки, KPI, сетки) */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.gridMain { display: grid; grid-template-columns: 420px 1fr; gap: 14px; margin-top: 12px; }
.kpi { padding: 14px; display: flex; gap: 12px; align-items: center; }
.kpiIcon { width: 38px; height: 38px; border-radius: 14px; background: #eef2ff; border: 1px solid #dbe7ff; flex-shrink: 0; }
.kpi .meta { flex: 1; min-width: 0; }
.kpi .title { font-size: 12px; color: var(--muted); font-weight: 900; }
.kpi .val { font-size: 22px; font-weight: 950; margin-top: 2px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi .platform-vals { display: flex; flex-direction: column; gap: 1px; font-size: 18px; }
.kpi .platform-val { display: flex; align-items: center; gap: 6px; }
.kpi .platform-label { font-size: 9px; font-weight: 400; color: #fff; background: #2AABEE; border-radius: 4px; padding: 1px 5px; min-width: 28px; text-align: center; }
.kpi .platform-label.max { background: #7B68EE; }
.form { padding: 16px; }
.form h2 { margin: 0 0 10px; font-size: 16px; font-weight: 950; }
.form label { display: block; font-size: 12px; color: var(--muted); font-weight: 900; margin: 10px 0 6px; }
.form input[type="text"], .form textarea, .form select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; font-size: 14px; outline: none; }
.form textarea { min-height: 110px; resize: vertical; }

/* Новый пошаговый блок создания рассылки */
.campaign-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.campaign-form__header { margin-bottom: 4px; }
.campaign-form__title { font-size: 16px; font-weight: 950; }
.campaign-form__subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }

.campaign-form__section {
  position: relative;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 12px 10px 46px;
  margin-top: 14px;
}
.campaign-form__section::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #d1d5db;
}
.campaign-form__section:first-of-type::before {
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
}
.campaign-form__section:last-of-type::before {
  border-bottom-left-radius: 999px;
  border-bottom-right-radius: 999px;
}
.step-badge {
  position: absolute;
  left: 14px;
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  z-index: 1;
}
.campaign-form__section-title {
  font-weight: 950;
  font-size: 16px;
  margin-bottom: 6px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}
.field--inline-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.field__label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
}
.field__required {
  color: var(--danger);
  margin-left: 2px;
}
.field__input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  font-size: 13px;
  outline: none;
}
.field__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37,99,235,.25);
}
.field__textarea {
  min-height: 90px;
  resize: vertical;
}
.field__hint {
  font-size: 11px;
  color: var(--text-muted);
}
.field__hint--muted {
  color: #9ca3af;
}

.segmented {
  display: inline-flex;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.segmented__item {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--muted);
  white-space: nowrap;
}
.segmented__item--active {
  background: var(--primary);
  color: #fff;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-height: 24px;
}

.script-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.script-tag {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #f9fafb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: all .15s ease;
  user-select: none;
  font-family: inherit;
  line-height: 1.4;
  outline: none;
}
.script-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-weak);
}
.script-tag--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.script-tag--active:hover {
  background: var(--primary-hover);
  color: #fff;
  border-color: var(--primary-hover);
}
.script-content-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.script-content-radio input[type="radio"] {
  margin: 0;
  accent-color: var(--primary);
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 900; font-size: 13px; }
.chip input { accent-color: var(--primary); }
.tabs { display: flex; gap: 8px; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 900; font-size: 13px; cursor: pointer; }
.tab.active { background: var(--primary); color: #fff; border-color: transparent; }
.help { font-size: 12px; color: var(--muted); margin-top: 6px; }
.cohorts { padding: 16px; }
.cohortsHeader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cohortsHeader h2 { margin: 0; font-size: 16px; font-weight: 950; }
.cohortsGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cohortCard { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 12px; position: relative; }
.cohortTop { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.cohortTitle { font-weight: 950; }
.cohortDesc { font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 32px; }
.badge.danger { background: var(--danger-weak); border-color: #ffd0d0; color: var(--danger); }
.badge.warn { background: var(--warn-weak); border-color: #ffe2b0; color: var(--warn); }
.badge.ok { background: var(--ok-weak); border-color: #bfe9cc; color: var(--ok); }
.cohortCount { font-size: 28px; font-weight: 980; }
.cohortBottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 10px; }
.cohortActions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini { height: 32px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 950; cursor: pointer; }
.mini[disabled] { opacity: .55; cursor: not-allowed; }
.mini.primary { background: #fff; border: 1px solid var(--primary); color: var(--primary); }
.mini.primary:hover { background: #f0f6ff; }
.tableCard { margin-top: 14px; }
.tableHead { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.tableHead h2 { margin: 0; font-size: 16px; font-weight: 950; }
.tableCard table { width: 100%; border-collapse: collapse; }
.tableCard th, .tableCard td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tableCard th { font-size: 12px; color: var(--muted); font-weight: 950; }
.tableCard td { font-size: 14px; }
.pill.on { background: var(--ok-weak); border-color: #bfe9cc; color: var(--ok); }
.pill.off { background: #f1f5f9; border-color: var(--line); color: #64748b; }
.muted { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { height: 36px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 900; color: var(--text); cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: transparent; color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { background: var(--danger-weak); border-color: #ffd0d0; color: var(--danger); }
.btn.ghost { background: #fff; }
.btn-icon {
  width: 38px;
  padding: 0;
  font-size: 18px;
}
#scripts-table-wrap { padding-bottom: min(180px, 25vh); }
tr.script-row-hiding { opacity: 0; transition: opacity .25s ease-out; }
tr.script-row-showing { opacity: 0; }
tr.script-row-showing.script-row-visible { opacity: 1; transition: opacity .22s ease-out; }
/* Toggle switch for сценарий статус */
.toggle-form {
  display: inline-block;
}
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px 3px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f1f5f9;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.toggle-switch__track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background .15s ease-out;
}
.toggle-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.25);
  transition: transform .16s ease-out;
}
.toggle-switch--on .toggle-switch__track {
  background: #22c55e;
}
.toggle-switch--on .toggle-switch__thumb {
  transform: translateX(12px);
}
.toggle-switch--on .toggle-switch__label {
  color: #16a34a;
}
.toggle-switch--off .toggle-switch__label {
  color: var(--muted);
}
/* Cohort modal */
.cohort-modal-root { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 2000; }
.cohort-modal-root.active { display: flex; }
.cohort-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.45); }
.cohort-modal { position: relative; background: var(--card); border-radius: 16px; box-shadow: 0 20px 60px rgba(15,23,42,.28); max-width: 720px; width: 100%; max-height: 80vh; display: flex; flex-direction: column; }
.cohort-modal-header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cohort-modal-title { font-size: 16px; font-weight: 950; }
.cohort-modal-close { border: none; background: transparent; cursor: pointer; font-size: 20px; color: var(--muted); padding: 4px 8px; }
.cohort-modal-body { padding: 10px 20px 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.cohort-modal-search { width: 100%; border-radius: 10px; border: 1px solid var(--line); padding: 8px 10px; font-size: 14px; }
.cohort-modal-list { margin: 0; padding: 0; list-style: none; max-height: 40vh; overflow: auto; border-radius: 12px; border: 1px solid var(--line); }
.cohort-modal-list li { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.cohort-modal-list li:last-child { border-bottom: none; }
.cohort-modal-list .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cohort-modal-empty { padding: 10px 0; font-size: 13px; color: var(--muted); }
/* Selected cohort card */
.cohortCard--selected { border: 2px dashed var(--primary, #2563eb); background: #f0f6ff; }
.cohortCard--selected .cohortTitle { color: var(--primary, #2563eb); }
.cohortCard--selected .mini.primary { background: var(--primary); color: #fff; border-color: transparent; }
/* Test cohort modal */
.test-cohort-search-wrap { position: relative; }
.test-member-row { display: flex; align-items: center; gap: 10px; }
.test-search-row { display: flex; align-items: center; gap: 10px; }
.test-member-info { flex: 1; min-width: 0; }
.test-member-name { font-weight: 600; font-size: 14px; }
.test-member-pid { font-family: monospace; font-size: 12px; }
.tc-remove-btn { flex-shrink: 0; color: #dc2626; border-color: #fecaca; background: #fff5f5; font-size: 13px; min-width: 32px; }
.tc-remove-btn:hover { background: #fee2e2; }
.tc-add-btn { flex-shrink: 0; font-size: 12px; min-width: 90px; }
.tc-badge { display: inline-block; padding: 1px 7px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.tc-cv { background: #d1fae5; color: #065f46; }
.tc-no-cv { background: #fef3c7; color: #92400e; }
.tc-blocked { background: #fee2e2; color: #dc2626; }
.tc-already { background: #e0e7ff; color: #4338ca; }
#test-cohort-search-results { max-height: 200px; margin-top: 6px; }
@media (max-width: 1100px) { .grid4 { grid-template-columns: repeat(2, 1fr); } .gridMain { grid-template-columns: 1fr; } .cohortsGrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .cohortsGrid { grid-template-columns: 1fr; } .grid4 { grid-template-columns: 1fr; } }
.manager-card h1, .manager-card h2 { margin: 0 0 16px; font-size: 1.25rem; font-weight: 600; color: var(--primary); }
.manager-form label { display: block; margin-top: 12px; margin-bottom: 4px; font-size: 0.9rem; font-weight: 500; }
.manager-form input, .manager-form select, .manager-form textarea { width: 100%; padding: 10px 12px; font-size: 15px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.manager-form textarea { resize: vertical; min-height: 80px; }
.manager-form button[type="submit"] { margin-top: 20px; padding: 12px 24px; font-size: 15px; font-weight: 500; color: #fff; background: var(--primary); border: none; border-radius: 6px; cursor: pointer; }
.manager-form button[type="submit"]:hover { background: var(--primary-hover); }
.manager-msg { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.manager-msg.error { background: #fed7d7; color: var(--error); }
.manager-msg.success { background: #c6f6d5; color: var(--success); }
.manager-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.manager-table th, .manager-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.manager-table th { font-weight: 600; color: var(--text-muted); font-size: 0.85rem; }
.manager-table tbody tr.vacancy-past { opacity: 0.55; }
.manager-table .badge { display: inline-block; padding: 2px 8px; font-size: 0.8rem; font-weight: 500; border-radius: 4px; background: var(--primary); color: #fff; }
.badge-draft { font-size: 0.8rem; color: var(--text-muted); margin-left: 4px; }
.manager-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.manager-login .manager-card { max-width: 400px; width: 100%; }
.manager-login h1 { text-align: center; margin-bottom: 8px; }
.manager-login .hint { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.manager-login .manager-form button { width: 100%; margin-top: 16px; }
.manager-login .back-link { display: block; text-align: center; margin-top: 16px; color: var(--accent); text-decoration: none; font-size: 0.9rem; }
.manager-login-divider { border: none; border-top: 1px solid var(--border, #e0e0e0); margin: 24px 0 16px; }

/* =====================================================================
   WIDE LAYOUT — vacancy pages
   ===================================================================== */
.manager-wrap.manager-wrap--wide { max-width: 1440px; padding: 20px 28px; }

/* -- Shared -------------------------------------------------------------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .92em; }

/* Tabs (bucket/view toggle) */
.vac-tabs { display: flex; gap: 6px; }
.vac-tab {
  padding: 9px 18px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; color: var(--text-muted); font-weight: 700; font-size: 14px;
  text-decoration: none; transition: .15s;
}
.vac-tab:hover { border-color: #b0c4de; }
.vac-tab--active { background: #1e40af; border-color: transparent; color: #fff; }

/* Chips / quick-filters */
.vac-chipbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 18px; }
.vac-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text-muted); font-weight: 700; font-size: 13px;
  cursor: pointer; user-select: none; transition: background .15s, border-color .15s, color .15s;
}
.vac-chip:hover { border-color: #93c5fd; background: #eff6ff; }
.vac-chip--active { background: #1e40af; border-color: transparent; color: #fff; }
.vac-chip--active .badge { background: rgba(255,255,255,.25); border-color: transparent; color: #fff; }

/* Badge system */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800;
  border: 1px solid var(--border); background: #fff; color: var(--text-muted); white-space: nowrap;
}
.badge--danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.badge--warn   { background: #fffbeb; border-color: #fde68a; color: #d97706; }
.badge--ok     { background: #ecfdf5; border-color: #a7f3d0; color: #059669; }
.badge--muted  { background: #f8fafc; border-color: var(--border); color: var(--text-muted); }

/* Small buttons */
.btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; font-weight: 700; color: var(--text); cursor: pointer;
  font-size: 13px; text-decoration: none; white-space: nowrap; transition: .12s;
}
.btn-sm:hover { background: #f8fafc; border-color: #b0c4de; }
.btn-sm--primary { background: #1e40af; border-color: transparent; color: #fff; }
.btn-sm--primary:hover { background: #1d4ed8; }
.btn-sm--ghost { background: #fff; }
.btn-sm--danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

/* Pills (small inline tags) */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  border: 1px solid var(--border); color: var(--text-muted); background: #fff; white-space: nowrap;
}
.pill--danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.pill--score  { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.pill--ok     { background: #ecfdf5; border-color: #a7f3d0; color: #059669; }
.pill--status { background: #faf5ff; border-color: #e9d5ff; color: #7c3aed; }
.pill--sent   { background: #ecfdf5; border-color: #a7f3d0; color: #059669; }

/* =====================================================================
   PAGE 1 — Vacancy list with right panel
   ===================================================================== */
.vac-page-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) { .vac-page-grid { grid-template-columns: 1fr; } }

/* Filter row */
.vac-filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

/* Section heading */
.vac-section-title { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; }
.vac-section-title h3 {
  margin: 0; font-size: 13px; color: var(--text-muted); font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px;
}
.vac-count {
  font-size: 11px; color: var(--text-muted); background: #f1f5f9;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); font-weight: 700;
}

/* Vacancy list */
.vac-list { display: flex; flex-direction: column; gap: 12px; }

/* Vacancy card */
.vac-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.vac-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.09); border-color: #cbd5e1; }
.vac-card--attention { border-color: #93c5fd; background: linear-gradient(180deg,#fff 0%,#eff6ff 100%); }
.vac-card__top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.vac-card__title { font-weight: 800; font-size: 16px; color: var(--text); }
.vac-card__meta { color: var(--text-muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }

/* Metrics row inside card (colored dots) */
.vac-card__metrics {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px;
  padding: 10px 0; border-top: 1px solid #f1f5f9;
}
.vm {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--text);
  background: #f8fafc; border: 1px solid #f1f5f9;
}
.vm b { font-weight: 900; }
.vm .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.vm .dot--blue   { background: #3b82f6; }
.vm .dot--green  { background: #22c55e; }
.vm .dot--indigo { background: #6366f1; }
.vm .dot--gray   { background: #94a3b8; }
.vm .dot--red    { background: #ef4444; }
.vm .dot--amber  { background: #f59e0b; }
.vm a { color: #1d4ed8; font-weight: 800; font-size: 12px; }

/* Unread row in card */
.vac-card__unread-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid #f1f5f9;
  font-size: 12px; color: var(--text-muted);
}

/* Card footer */
.vac-card__footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; flex-wrap: wrap; }
.vac-card__hint { color: var(--text-muted); font-size: 12px; flex: 1; min-width: 0; }

/* -- Right panel --------------------------------------------------------- */
.vac-right-panel {
  background: var(--card); border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06); border: 1px solid var(--border);
  padding: 18px; position: sticky; top: 20px;
}

/* KPI boxes */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.kpi-box {
  border: 1px solid var(--border); border-radius: 14px; padding: 14px;
  background: #fff; transition: box-shadow .15s;
}
.kpi-box:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.kpi-box__label { font-size: 12px; color: var(--text-muted); font-weight: 700; line-height: 1.4; }
.kpi-box__val { font-size: 26px; font-weight: 900; margin-top: 4px; color: var(--text); }

/* Items in right panel */
.right-item {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; background: #fff; margin-top: 10px;
  transition: box-shadow .15s;
}
.right-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.right-item__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.right-item__title { font-weight: 800; font-size: 14px; }
.right-item__meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* =====================================================================
   PAGE 2 — Split view: app list + profile/chat
   ===================================================================== */

/* Vacancy header card */
.apps-vac-header {
  background: var(--card); border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06); border: 1px solid var(--border);
  padding: 18px 22px; margin-bottom: 16px;
}
.apps-vac-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.apps-vac-name { font-size: 18px; font-weight: 800; color: var(--primary); }
.apps-vac-meta { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }

/* Filter chips (page 2) */
.apps-filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.apps-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text-muted); font-weight: 700; font-size: 13px;
  cursor: pointer; text-decoration: none; transition: .12s;
}
.apps-chip:hover { border-color: #93c5fd; }
.apps-chip--active { background: #1e40af; border-color: transparent; color: #fff; }

/* Split grid */
.apps-split-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 16px;
  align-items: start;
  min-height: 640px;
}
@media (max-width: 1000px) { .apps-split-grid { grid-template-columns: 1fr; } }

.apps-split-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.apps-split-box__header {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: #fafbfd;
}
.apps-split-box__body { padding: 10px 12px; max-height: 620px; overflow-y: auto; }

/* Application item (left list) */
.app-item {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; display: flex; gap: 12px; align-items: flex-start;
  background: #fff; cursor: pointer; margin-bottom: 8px;
  transition: .12s; position: relative;
}
.app-item:last-child { margin-bottom: 0; }
.app-item:hover { background: #f8fafc; border-color: #cbd5e1; }
.app-item--active { border-color: #93c5fd; background: #eff6ff; box-shadow: 0 0 0 2px #bfdbfe; }

/* Round colored avatar */
.app-item__avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 16px;
}
.app-item__info { flex: 1; min-width: 0; }
.app-item__name-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.app-item__name { font-weight: 800; font-size: 14px; }
.app-item__pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.app-item__snippet {
  font-size: 12px; color: var(--text-muted); margin-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-item__actions { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.app-item__score {
  position: absolute; bottom: 8px; right: 12px;
  font-size: 22px; font-weight: 900; color: #1d4ed8;
  line-height: 1; cursor: default;
}
.mini-select {
  height: 28px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer;
}

/* Footer stats */
.apps-list-footer {
  padding: 10px 16px; color: var(--text-muted); font-size: 12px;
  display: flex; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border); background: #fafbfd;
}

/* Profile header (right panel) */
.profile-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.profile-name { font-size: 18px; font-weight: 800; color: var(--text); }
.profile-meta { margin-top: 8px; color: var(--text-muted); font-size: 13px; line-height: 1.8; }
.profile-meta b { color: var(--text); }

/* Chat */
.chat-wrap { display: flex; flex-direction: column; height: 480px; }
.chat-body {
  flex: 1; overflow-y: auto; padding: 16px;
  background: #f8fafc; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.chat-msg {
  max-width: 75%; padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  margin: 8px 0; background: #fff;
  border: 1px solid var(--border); font-size: 14px;
  line-height: 1.5;
}
.chat-msg--me {
  margin-left: auto;
  background: #1e40af; border-color: transparent; color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.chat-msg--me .chat-msg__time { color: rgba(255,255,255,.6); }
.chat-msg--me b { color: rgba(255,255,255,.8); }
.chat-msg--system {
  background: #fafafa; border-style: dashed; color: var(--text-muted);
  font-size: 13px; max-width: 90%; border-radius: 12px;
}
.chat-msg__time { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.chat-empty { text-align: center; color: var(--text-muted); padding: 50px 20px; font-size: 14px; }
.chat-input-row { display: flex; gap: 10px; padding: 12px 16px; align-items: flex-end; }
.chat-input-row textarea {
  flex: 1; min-height: 42px; max-height: 160px; border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; font-size: 14px; background: #fff;
  resize: none; overflow-y: auto; font-family: inherit; line-height: 1.4;
}
.chat-input-row textarea:focus { outline: none; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }

/* Detail empty state */
.detail-empty { display: flex; align-items: center; justify-content: center; min-height: 300px; color: var(--text-muted); font-size: 14px; }

/* =====================================================================
   Profile page
   ===================================================================== */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.profile-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}
.profile-save-btn {
  height: 44px;
  padding: 0 32px;
  font-size: 15px;
  border-radius: 12px;
}
@media (max-width: 900px) {
  .profile-layout { grid-template-columns: 1fr; }
}

.profile-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.profile-section__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fafbfd;
}
.profile-section__title {
  margin: 0;
  font-size: 16px;
  font-weight: 950;
  color: var(--text);
}
.profile-section__subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.profile-section__body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-section__body .field {
  margin-bottom: 0;
}

.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.profile-avatar--company {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  font-size: 20px;
}

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

.profile-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2px 0;
}

.profile-type-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-type-pill {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.profile-type-pill input[type="radio"] {
  display: none;
}
.profile-type-pill__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  transition: background .15s, border-color .15s, color .15s;
}
.profile-type-pill input[type="radio"]:checked + .profile-type-pill__label {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
}
.profile-type-pill__label:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.profile-type-pill input[type="radio"]:checked + .profile-type-pill__label:hover {
  background: var(--primary-hover);
  border-color: transparent;
  color: #fff;
}

.profile-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ok-weak);
  border: 1px solid #bfe9cc;
  color: var(--ok);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
  animation: profile-toast-in .3s ease-out;
}
.profile-toast__icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
@keyframes profile-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}