/* ============================================================
   HR-дэшборд — стили
   Брендовые цвета: меняйте значения в блоке :root ниже.
   Эти же цвета продублированы в data/config.js.
   ============================================================ */

:root {
  /* --- БРЕНД LEDART (из логотипа: магента → фиолетовый → синий) --- */
  --brand-primary: #7c2fb5;
  --brand-primary-dark: #5a2090;
  --brand-primary-soft: #f1e7fb;
  --brand-accent: #c231ae;
  --brand-gradient: linear-gradient(120deg, #c231c0 0%, #6e2bb0 52%, #3f3fd8 100%);

  /* --- Тёмная шапка --- */
  --topbar-bg: #141019;
  --topbar-border: #2b2438;
  --topbar-text: #b9b3c7;

  /* --- Базовая палитра --- */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8ef;
  --text: #1a2233;
  --text-soft: #5b6573;
  --text-mute: #8a93a3;
  --success: #16a34a;
  --success-soft: #e7f6ec;
  --warning: #d97706;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 3px rgba(20, 30, 55, .06), 0 6px 24px rgba(20, 30, 55, .07);
  --shadow-lg: 0 12px 40px rgba(20, 30, 55, .16);
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

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

[hidden] { display: none !important; }

button { font-family: inherit; cursor: pointer; }

/* ===================== Окно выбора сотрудника ===================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: linear-gradient(155deg, #2a1640 0%, #0c0a14 72%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; z-index: 100;
}
.modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 36px;
  width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.modal-logo {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; height: 52px; border-radius: 13px;
  background: var(--brand-primary);
  color: #fff; font-weight: 800; font-size: 22px;
  margin-bottom: 18px;
}
.modal-logo.logo-img { background: #141019; padding: 0 20px; }
.modal-logo img { height: 32px; width: auto; object-fit: contain; display: block; }
.modal-title { font-size: 21px; margin-bottom: 6px; }
.modal-sub { color: var(--text-soft); margin-bottom: 18px; font-size: 14px; }

.input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-soft);
}

.employee-list {
  margin-top: 14px;
  max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.employee-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: none; background: none;
  text-align: left; width: 100%;
  transition: background .12s;
}
.employee-row:hover { background: var(--brand-primary-soft); }
.employee-row .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.employee-row .er-name { font-weight: 600; font-size: 14px; }
.employee-row .er-meta { color: var(--text-mute); font-size: 12.5px; }
.empty-hint { color: var(--text-mute); font-size: 13px; padding: 14px 4px; }

/* ===================== Верхняя панель ===================== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex; align-items: center; gap: 20px;
  padding: 0 22px; height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--brand-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.brand-logo.logo-img { width: auto; height: 40px; background: none; border-radius: 0; }
.brand-logo img { height: 100%; width: auto; object-fit: contain; display: block; }
.brand-name { font-weight: 700; font-size: 16px; white-space: nowrap; color: #fff; }

.navbar {
  position: sticky; top: 62px; z-index: 39;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex; gap: 2px; padding: 6px 14px;
  overflow-x: auto;
}
.navbar button {
  border: none; background: none;
  padding: 8px 14px; border-radius: 8px;
  font-size: 14px; color: var(--topbar-text); font-weight: 500;
  white-space: nowrap; flex-shrink: 0;
  transition: background .12s, color .12s;
}
.navbar button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.navbar button.active { background: rgba(255, 255, 255, .13); color: #fff; font-weight: 600; }

.user-chip {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-name { font-weight: 600; font-size: 13.5px; color: #fff; }
.user-dept { font-size: 11.5px; color: #948da6; }
.icon-btn {
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06);
  width: 32px; height: 32px; border-radius: 8px;
  font-size: 14px; color: #cfc9da;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .14); }

/* ===================== Контент ===================== */
#main { max-width: 1080px; margin: 0 auto; padding: 30px 22px 50px; }
.view { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head { margin-bottom: 22px; }
.page-title { font-size: 24px; font-weight: 700; }
.page-sub { color: var(--text-soft); margin-top: 4px; }

.section-title { font-size: 16px; font-weight: 700; margin: 26px 0 12px; }

/* --- Карточки --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- Главная: приветствие --- */
.hero {
  background: var(--brand-gradient);
  color: #fff; border-radius: var(--radius);
  padding: 28px 30px; margin-bottom: 24px;
}
.hero h2 { font-size: 23px; margin-bottom: 6px; }
.hero p { opacity: .9; font-size: 14.5px; max-width: 620px; }

/* --- Сетка модулей --- */
.module-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.module-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  text-align: left; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .14s, box-shadow .14s;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.module-icon {
  width: 46px; height: 46px; border-radius: 11px;
  background: var(--brand-primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 4px;
}
.module-card h3 { font-size: 16px; }
.module-card p { color: var(--text-soft); font-size: 13.5px; }
.module-card .module-cta {
  margin-top: auto; padding-top: 10px;
  color: var(--brand-primary); font-weight: 600; font-size: 13.5px;
}

/* --- Частые вопросы --- */
.faq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 8px 14px;
  font-size: 13px; color: var(--text); transition: all .12s;
}
.chip:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: var(--brand-primary-soft); }

/* ===================== База знаний ===================== */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  text-align: center; box-shadow: var(--shadow);
  transition: transform .12s, border-color .12s;
}
.cat-card:hover { transform: translateY(-2px); border-color: var(--brand-primary); }
.cat-card .cat-icon { font-size: 26px; }
.cat-card .cat-name { font-weight: 600; font-size: 13.5px; margin-top: 6px; }
.cat-card .cat-count { color: var(--text-mute); font-size: 12px; }

.article-list { display: flex; flex-direction: column; gap: 10px; }
.article-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px;
  text-align: left; box-shadow: var(--shadow);
  transition: border-color .12s, transform .12s;
  display: block; width: 100%;
}
.article-row:hover { border-color: var(--brand-primary); transform: translateX(2px); }
.article-row .ar-title { font-weight: 600; font-size: 15px; }
.article-row .ar-sum { color: var(--text-soft); font-size: 13px; margin-top: 3px; }
.article-row .ar-cat {
  display: inline-block; margin-top: 8px;
  font-size: 11.5px; color: var(--brand-primary-dark);
  background: var(--brand-primary-soft); padding: 2px 9px; border-radius: 999px;
}

/* --- Чтение статьи --- */
.article-body { max-width: 720px; }
.article-body h1 { font-size: 23px; margin-bottom: 6px; }
.article-body .ab-meta { color: var(--text-mute); font-size: 12.5px; margin-bottom: 18px; }
.article-body h4 { font-size: 15.5px; margin: 20px 0 8px; color: var(--brand-primary-dark); }
.article-body p { margin: 9px 0; }
.article-body ul, .article-body ol { margin: 9px 0 9px 22px; }
.article-body li { margin: 4px 0; }
.article-body .callout {
  background: var(--brand-primary-soft);
  border-left: 3px solid var(--brand-primary);
  padding: 11px 14px; border-radius: 8px; margin: 14px 0;
  font-size: 13.5px;
}

.back-link {
  border: none; background: none; color: var(--brand-primary);
  font-weight: 600; font-size: 13.5px; padding: 0; margin-bottom: 16px;
}
.back-link:hover { text-decoration: underline; }

/* ===================== HR-ассистент ===================== */
.assistant-wrap { max-width: 760px; margin: 0 auto; }
.chat {
  display: flex; flex-direction: column; gap: 14px;
  min-height: 240px; margin-bottom: 18px;
}
.msg { display: flex; gap: 10px; max-width: 90%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.msg.bot .msg-avatar { background: var(--brand-primary); color: #fff; }
.msg.user .msg-avatar { background: var(--brand-accent); color: #fff; }
.msg-bubble {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 13px; padding: 11px 14px; font-size: 14px;
  box-shadow: var(--shadow);
}
.msg.user .msg-bubble { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.msg-bubble .answer-card { margin-top: 10px; }

.answer-card {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 13px; background: var(--surface-2);
}
.answer-card .ac-title { font-weight: 600; font-size: 13.5px; }
.answer-card .ac-sum { color: var(--text-soft); font-size: 12.5px; margin: 3px 0 7px; }
.answer-card .ac-open {
  border: none; background: var(--brand-primary); color: #fff;
  padding: 5px 11px; border-radius: 7px; font-size: 12px; font-weight: 600;
}
.answer-more { margin-top: 8px; }
.answer-more .am-label { font-size: 12px; color: var(--text-mute); margin-bottom: 5px; }

.chat-input-row { display: flex; gap: 8px; }
.chat-input-row .input { flex: 1; }
.send-btn {
  border: none; background: var(--brand-primary); color: #fff;
  padding: 0 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
}
.send-btn:hover { background: var(--brand-primary-dark); }
.suggest-row { margin-top: 12px; }

/* ===================== Онбординг — карта-маршрут ===================== */
.roadmap-intro {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  margin-bottom: 24px;
}
.progress-ring {
  --val: 0;
  width: 88px; height: 88px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--success) calc(var(--val) * 1%), var(--border) 0);
  display: flex; align-items: center; justify-content: center;
}
.progress-ring .pr-inner {
  width: 66px; height: 66px; border-radius: 50%; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.progress-ring .pr-num { font-weight: 800; font-size: 19px; }
.progress-ring .pr-lbl { font-size: 10px; color: var(--text-mute); }

.roadmap {
  position: relative;
  padding: 10px 0;
}
.roadmap::before {
  content: ""; position: absolute;
  left: 50%; top: 0; bottom: 0; width: 3px;
  background: var(--border); transform: translateX(-50%);
}
.station {
  position: relative;
  display: flex; align-items: center;
  margin: 6px 0;
  min-height: 96px;
}
.station:nth-child(odd) { justify-content: flex-start; }
.station:nth-child(even) { justify-content: flex-end; }
.station-node {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; z-index: 2;
}
.station.done .station-node { border-color: var(--success); background: var(--success-soft); }
.station.current .station-node { border-color: var(--brand-primary); box-shadow: 0 0 0 5px var(--brand-primary-soft); }
.station-node .node-check {
  position: absolute; right: -4px; bottom: -4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--success); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; border: 2px solid var(--surface);
}
.station-card {
  width: calc(50% - 52px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 17px;
  box-shadow: var(--shadow); text-align: left;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.station-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand-primary); }
.station.done .station-card { border-color: #c7e7d0; }
.station-card .sc-step { font-size: 11.5px; color: var(--text-mute); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.station-card .sc-title { font-weight: 700; font-size: 15.5px; margin: 2px 0; }
.station-card .sc-sub { color: var(--text-soft); font-size: 13px; }
.station-card .sc-foot {
  margin-top: 9px; display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.station-card .sc-status { color: var(--text-mute); }
.station-card .sc-status.done { color: var(--success); font-weight: 600; }

/* ===================== Боковая панель станции / статьи ===================== */
.overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  z-index: 60; animation: fade .15s;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 540px;
  background: var(--bg); z-index: 70;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head {
  position: sticky; top: 0;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 18px 22px; display: flex; align-items: flex-start; gap: 12px;
}
.drawer-head .dh-icon { font-size: 26px; }
.drawer-head .dh-step { font-size: 11.5px; color: var(--text-mute); font-weight: 600; text-transform: uppercase; }
.drawer-head .dh-title { font-size: 18px; font-weight: 700; }
.drawer-close {
  margin-left: auto; border: none; background: var(--surface-2);
  width: 32px; height: 32px; border-radius: 8px; font-size: 16px; color: var(--text-soft);
  flex-shrink: 0;
}
.drawer-close:hover { background: var(--border); }
.drawer-body { padding: 22px; }
.drawer-back {
  border: 1px solid var(--border); background: var(--surface-2);
  width: 32px; height: 32px; border-radius: 8px; font-size: 17px;
  color: var(--text-soft); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.drawer-back:hover { background: var(--border); }
.station-nav { display: flex; gap: 8px; margin-bottom: 16px; }
.station-nav .btn {
  flex: 1; min-width: 0; font-size: 12.5px; padding: 9px 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.station-nav .nav-empty { flex: 1; }

.checklist { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.check-item {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px; cursor: pointer;
}
.check-item input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--success); flex-shrink: 0; }
.check-item.checked { background: var(--success-soft); border-color: #c7e7d0; }
.check-item.checked .ci-text { color: var(--text-soft); text-decoration: line-through; }
.ci-text { font-size: 13.5px; }

.link-list { display: flex; flex-direction: column; gap: 7px; }
.link-row {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 13px;
  text-align: left; width: 100%; font-size: 13.5px;
}
.link-row:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.link-row .lr-arrow { margin-left: auto; color: var(--text-mute); }

.btn {
  border: none; border-radius: var(--radius-sm);
  padding: 11px 18px; font-size: 14px; font-weight: 600;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn:disabled { opacity: .55; cursor: default; }

/* ===================== Оргструктура ===================== */
.org-tree { margin: 8px 0; }
.org-node {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 14px; box-shadow: var(--shadow);
}
.org-node .on-role { font-size: 11.5px; color: var(--brand-primary); font-weight: 600; text-transform: uppercase; }
.org-node .on-person { font-weight: 600; font-size: 14px; }
.org-node .on-unit { font-weight: 700; font-size: 14.5px; }
.org-children {
  margin-left: 22px; padding-left: 18px;
  border-left: 2px solid var(--border);
  display: flex; flex-direction: column; gap: 10px; margin-top: 10px;
}
.org-row { display: flex; flex-direction: column; gap: 10px; }

.hr-person {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.hr-person .hp-head { display: flex; align-items: center; gap: 12px; }
.hr-person .hp-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.hr-person .hp-name { font-weight: 700; font-size: 15px; }
.hr-person .hp-role { color: var(--brand-primary); font-size: 12.5px; font-weight: 600; }
.hr-person .hp-resp { margin: 10px 0 0 18px; }
.hr-person .hp-resp li { font-size: 13px; margin: 3px 0; }
.hr-person .hp-contact { margin-top: 9px; font-size: 13px; color: var(--text-soft); }

/* ===================== Мой прогресс ===================== */
.progress-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.stat-card .st-num { font-size: 28px; font-weight: 800; color: var(--brand-primary); }
.stat-card .st-lbl { color: var(--text-soft); font-size: 13px; }

.progress-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.progress-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 15px;
}
.progress-item .pi-mark {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.progress-item.done .pi-mark { background: var(--success); color: #fff; }
.progress-item.todo .pi-mark { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-mute); }
.progress-item .pi-title { font-weight: 600; font-size: 14px; }
.progress-item .pi-state { margin-left: auto; font-size: 12.5px; color: var(--text-mute); }
.progress-item.done .pi-state { color: var(--success); font-weight: 600; }

.bar { height: 9px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--success); border-radius: 999px; transition: width .4s; }

/* ===================== Панель HR ===================== */
.hr-panel { max-width: 760px; }
.hr-step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.hr-step h3 { font-size: 15.5px; display: flex; align-items: center; gap: 9px; }
.hr-step .step-num {
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--brand-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.hr-step p, .hr-step li { font-size: 13.5px; color: var(--text-soft); }
.hr-step ol, .hr-step ul { margin: 8px 0 8px 20px; }
.hr-step li { margin: 4px 0; }
.hr-step code {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px; font-size: 12.5px;
  font-family: "SF Mono", Consolas, monospace; color: var(--brand-primary-dark);
}
.status-pill {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; margin-left: auto;
}
.status-pill.on { background: var(--success-soft); color: var(--success); }
.status-pill.off { background: #fdeceb; color: #c0392b; }

/* ===================== Подвал ===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 16px 22px; max-width: 1080px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text-mute); font-size: 12.5px;
}
.link-btn {
  border: none; background: none; color: var(--brand-primary);
  font-size: 12.5px; font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }

/* ===================== Развитие и перспективы ===================== */
.dev-intro {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--brand-primary);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 22px;
  box-shadow: var(--shadow); font-size: 13.5px; color: var(--text-soft);
}
.dept-block {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--dept, var(--brand-primary));
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 16px; overflow: hidden;
}
.dept-head { padding: 15px 20px; background: var(--surface-2); }
.dept-head .dh-name { font-size: 17px; font-weight: 700; color: var(--dept, var(--brand-primary)); }
.dept-head .dh-ckp { font-size: 13px; color: var(--text-soft); margin-top: 5px; }
.dept-head .dh-ckp b { color: var(--text); font-weight: 600; }
.unit-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 12px; padding: 16px 20px;
}
.unit-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 15px; background: var(--surface-2);
  display: flex; flex-direction: column;
}
.unit-card .uc-name {
  font-weight: 600; font-size: 14px; margin-bottom: 8px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.unit-card .uc-role {
  font-size: 13px; margin: 3px 0; display: flex; gap: 7px; align-items: baseline;
}
.unit-card .uc-role::before { content: "\1F464"; font-size: 11px; }
.unit-card .uc-ckp {
  margin-top: auto; padding-top: 10px; font-size: 12px;
  color: var(--text-soft); line-height: 1.45;
}
.unit-card .uc-ckp b { color: var(--text-mute); font-weight: 600; }

/* ===================== Вкладки и команда ===================== */
.subtabs {
  display: flex; gap: 4px; margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.subtab {
  border: none; background: none; padding: 9px 16px;
  font-size: 14px; color: var(--text-soft); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.subtab:hover { color: var(--text); }
.subtab.active {
  color: var(--brand-primary); border-bottom-color: var(--brand-primary);
  font-weight: 600;
}

.office-switch { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.office-btn {
  border: 1px solid var(--border); background: var(--surface);
  padding: 7px 15px; border-radius: 999px; font-size: 13px;
  color: var(--text-soft); transition: background .12s, color .12s;
}
.office-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.office-btn.active {
  background: var(--brand-primary); color: #fff; border-color: var(--brand-primary);
}

.team-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px; margin-bottom: 6px;
}
.team-card {
  display: flex; gap: 11px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px; box-shadow: var(--shadow);
}
.team-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13.5px;
  overflow: hidden;
}
img.team-avatar, .team-avatar-img {
  object-fit: cover; object-position: center top;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.team-meta { min-width: 0; }
.team-meta .tm-name { font-weight: 600; font-size: 13.5px; }
.team-meta .tm-pos { font-size: 12.5px; color: var(--text-soft); }
.team-meta .tm-dept { font-size: 11.5px; color: var(--text-mute); }
.team-meta .tm-phone { font-size: 12.5px; margin-top: 3px; }
.team-meta .tm-phone a { color: var(--brand-primary); text-decoration: none; }
.team-meta .tm-phone a:hover { text-decoration: underline; }

.locked-note {
  background: var(--brand-primary-soft);
  border-left: 3px solid var(--brand-primary);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 14px;
  font-size: 14px; color: var(--text);
}

/* ===================== Форма настроек ===================== */
.settings-form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.settings-field { display: flex; flex-direction: column; gap: 5px; }
.sf-label { font-size: 13px; font-weight: 600; color: var(--text); }
.sf-hint { font-size: 12px; color: var(--text-mute); }
.settings-form textarea.input { min-height: 70px; resize: vertical; font-family: inherit; }
.settings-form .btn { align-self: flex-start; }

/* ===================== Редактор команды ===================== */
.te-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 16px;
}
.te-toolbar .btn { font-size: 13px; padding: 9px 14px; }
.te-count { color: var(--text-mute); font-size: 13px; margin-left: auto; }
.te-list { display: flex; flex-direction: column; gap: 10px; }
.te-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; box-shadow: var(--shadow);
}
.te-card-top { display: flex; gap: 8px; margin-bottom: 8px; }
.te-card-top .input { flex: 1; font-weight: 600; }
.te-del {
  border: 1px solid var(--border); background: var(--surface-2);
  width: 40px; border-radius: var(--radius-sm); color: #c0392b;
  font-size: 14px; flex-shrink: 0;
}
.te-del:hover { background: #fdeceb; }
.te-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.te-card-grid .input { font-size: 13px; padding: 8px 10px; }
@media (max-width: 620px) {
  .te-card-grid { grid-template-columns: 1fr; }
}

/* ===================== Адаптив ===================== */
@media (max-width: 760px) {
  .navbar { padding: 6px 10px; }
  .user-meta { display: none; }
  .module-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .progress-stat-grid { grid-template-columns: 1fr; }
  .roadmap::before { left: 26px; }
  .station { justify-content: flex-start !important; }
  .station-node { left: 26px; }
  .station-card { width: calc(100% - 70px); margin-left: 70px; }
  #main { padding: 22px 16px 40px; }
}

/* ============================================================
   Анимации главной (демо-переключатель пока в HR-разработке)
   ============================================================ */
@keyframes hr-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes hr-pulse-soft {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}
@keyframes hr-bar-fill { from { width: 0%; } }
@keyframes hr-grad-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes hr-pixel-in {
  from { clip-path: inset(0 100% 0 0); opacity: 0; }
  to   { clip-path: inset(0 0 0 0);    opacity: 1; }
}
@keyframes hr-twinkle {
  0%, 100% { opacity: 0.18; transform: scale(0.7); }
  50%      { opacity: 0.95; transform: scale(1.15); }
}
@keyframes hr-shimmer {
  0%   { background-position: -180% 0; }
  100% { background-position:  180% 0; }
}

/* --- Деликатная --- */
.anim-delicate .hero        { animation: hr-fade-up .55s ease both; }
.anim-delicate .module-card { animation: hr-fade-up .5s ease both; opacity: 0; }
.anim-delicate .module-card:nth-child(1) { animation-delay: 0.12s; }
.anim-delicate .module-card:nth-child(2) { animation-delay: 0.22s; }
.anim-delicate .module-card:nth-child(3) { animation-delay: 0.32s; }
.anim-delicate .module-card:nth-child(4) { animation-delay: 0.42s; }
.anim-delicate .section-title { animation: hr-fade-up .45s .35s ease both; opacity: 0; }
.anim-delicate .bar > span    { animation: hr-bar-fill 1.4s cubic-bezier(.4,1.2,.55,1) both; }
.anim-delicate .module-card {
  transition: transform .25s ease, box-shadow .25s ease;
}
.anim-delicate .module-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* --- Брендовая LED --- */
.anim-brand .hero {
  position: relative; overflow: hidden;
  background-size: 220% 220%;
  animation: hr-grad-shift 14s ease-in-out infinite;
}
.anim-brand .hero h2 { animation: hr-pixel-in 1s steps(22, end) both; }
.anim-brand .hero p  { animation: hr-fade-up .6s .9s ease both; opacity: 0; }
.anim-brand .hero::before,
.anim-brand .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  pointer-events: none; box-shadow: 0 0 12px rgba(255,255,255,.7);
}
.anim-brand .hero::before {
  width: 10px; height: 10px; background: #fff;
  top: 22%; right: 14%; animation: hr-twinkle 2.8s ease-in-out infinite;
}
.anim-brand .hero::after {
  width: 6px; height: 6px; background: #ffd6f4;
  top: 62%; right: 30%; animation: hr-twinkle 3.6s 1s ease-in-out infinite;
}
.anim-brand .module-card { animation: hr-fade-up .5s ease both; opacity: 0; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.anim-brand .module-card:nth-child(1) { animation-delay: 0.15s; }
.anim-brand .module-card:nth-child(2) { animation-delay: 0.28s; }
.anim-brand .module-card:nth-child(3) { animation-delay: 0.41s; }
.anim-brand .module-card:nth-child(4) { animation-delay: 0.54s; }
.anim-brand .module-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(124,47,181,.22);
  border-color: var(--brand-primary);
}
.anim-brand .bar > span {
  background-image:
    linear-gradient(110deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 70%),
    var(--brand-gradient);
  background-size: 200% 100%, 100% 100%;
  background-repeat: no-repeat, no-repeat;
  animation: hr-bar-fill 1.4s cubic-bezier(.4,1.2,.55,1) both,
             hr-shimmer 2.4s linear infinite;
}
.anim-brand .brand-logo { animation: hr-pulse-soft 3s ease-in-out infinite; transform-origin: center; }

/* --- prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  .anim-delicate *, .anim-brand * { animation: none !important; transition: none !important; }
}

/* --- Switcher (временно, для выбора) --- */
.anim-switcher {
  display: flex; gap: 8px; padding: 10px 14px;
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); margin-bottom: 14px;
  font-size: 13px; align-items: center; flex-wrap: wrap;
}
.anim-switcher .as-label { color: var(--text-soft); font-weight: 600; margin-right: 4px; }
.anim-switcher button {
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  font-family: inherit; color: var(--text);
}
.anim-switcher button.active {
  background: var(--brand-primary); color: #fff; border-color: var(--brand-primary);
}
.anim-switcher button:hover:not(.active) { border-color: var(--brand-primary); color: var(--brand-primary); }

/* ============================================================
   LED Snake — стили мини-игры
   ============================================================ */
.snake-wrap {
  display: flex; flex-direction: column; gap: 14px; align-items: center;
  padding: 18px 0;
}
.snake-head-row {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 10px;
  align-items: center;
}
.snake-title {
  font-size: 22px; font-weight: 800; letter-spacing: 0.5px;
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.snake-hud {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.snake-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px; font-size: 13px;
}
.snake-pill .sp-lbl { color: var(--text-mute); }
.snake-pill .sp-val { font-weight: 700; color: var(--brand-primary); }
.snake-pill.snake-state {
  background: var(--brand-primary-soft); color: var(--brand-primary-dark);
  border-color: transparent; font-weight: 600;
}
.snake-stage {
  background: #0d0820; border-radius: 14px; padding: 10px;
  box-shadow: 0 12px 36px rgba(124,47,181,.28), inset 0 0 0 1px rgba(255,255,255,.06);
  line-height: 0;
}
#snake-canvas {
  display: block; image-rendering: pixelated;
  max-width: 90vw; height: auto; border-radius: 8px;
}
.snake-controls {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.snake-pad-wrap { width: 100%; display: flex; justify-content: center; }
.snake-pad {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(2, 56px);
  gap: 6px;
}
.snake-pad .snake-key {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 12px; font-size: 18px; color: var(--brand-primary);
  cursor: pointer; user-select: none; touch-action: manipulation;
  display: flex; align-items: center; justify-content: center;
}
.snake-pad .snake-key:active { background: var(--brand-primary-soft); }
.snake-pad .snake-key[data-dir="up"]    { grid-column: 2; grid-row: 1; }
.snake-pad .snake-key[data-dir="left"]  { grid-column: 1; grid-row: 2; }
.snake-pad .snake-key[data-dir="down"]  { grid-column: 2; grid-row: 2; }
.snake-pad .snake-key[data-dir="right"] { grid-column: 3; grid-row: 2; }
.snake-hint {
  font-size: 13px; color: var(--text-mute); text-align: center;
  max-width: 460px; line-height: 1.5;
}
.snake-hint b { color: var(--text-soft); }

/* На широких экранах падик не нужен */
@media (min-width: 760px) {
  .snake-pad-wrap { display: none; }
}

/* Ссылка внутри пункта чек-листа */
.checklist .ci-link {
  color: var(--brand-primary); text-decoration: none; font-weight: 500;
}
.checklist .ci-link:hover { text-decoration: underline; }
.checklist .ci-arrow { font-size: 11px; opacity: .7; }
.checklist .check-item.checked .ci-link { color: var(--text-mute); }

/* Телефон в карточке оргсхемы */
.org-node .on-phone {
  font-size: 12px; margin-top: 4px;
}
.org-node .on-phone a {
  color: var(--brand-primary); text-decoration: none;
}
.org-node .on-phone a:hover { text-decoration: underline; }
.hp-contact a { color: var(--brand-primary); text-decoration: none; }
.hp-contact a:hover { text-decoration: underline; }

/* ============================================================
   ФИНАЛЬНЫЙ ЭКРАН ОНБОРДИНГА
   ============================================================ */
.finale-tile.locked .station-card { opacity: .65; }
.finale-tile.ready .station-card {
  background: linear-gradient(135deg, #fff 0%, #fbf6ff 100%);
  border-color: var(--brand-primary);
  box-shadow: 0 8px 30px rgba(124,47,181,.22), 0 0 0 1px rgba(124,47,181,.2) inset;
  position: relative; overflow: hidden;
}
.finale-tile.ready .station-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: finTileShimmer 2.6s linear infinite;
  pointer-events: none;
}
@keyframes finTileShimmer {
  0% { background-position: -200% 0; } 100% { background-position: 200% 0; }
}
.finale-tile.ready .station-node {
  background: var(--brand-gradient); color: #fff;
  box-shadow: 0 0 0 4px rgba(124,47,181,.18), 0 6px 22px rgba(124,47,181,.28);
}
.fin-tile-badge {
  display: inline-block;
  background: var(--brand-primary-soft); color: var(--brand-primary-dark);
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; margin-top: 8px;
}
.fin-tile-bar {
  height: 4px; background: var(--border); border-radius: 4px;
  overflow: hidden; margin-top: 10px;
}
.fin-tile-bar span {
  display: block; height: 100%; background: var(--brand-gradient);
  transition: width .6s ease;
}

/* --- Drawer финала --- */
.finale-body { padding-top: 4px; }
.fin-hero {
  text-align: center; padding: 18px 4px 22px;
  background: linear-gradient(160deg, #fbf6ff 0%, #ffffff 100%);
  border-radius: var(--radius); margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.fin-hero.ready {
  background: linear-gradient(160deg, #f6e7ff 0%, #efe1ff 60%, #e3e8ff 100%);
}
.fin-progress-ring {
  --val: 0;
  width: 96px; height: 96px; border-radius: 50%;
  background: conic-gradient(var(--brand-primary) calc(var(--val) * 1%), #e9deff 0);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  transition: background .8s ease;
}
.fpr-inner {
  width: 76px; height: 76px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.fpr-num { font-size: 20px; font-weight: 800; color: var(--brand-primary-dark); }
.fpr-lbl { font-size: 11px; color: var(--text-mute); }
.fin-title { font-size: 22px; line-height: 1.25; margin-bottom: 8px; }
.fin-sub { color: var(--text-soft); font-size: 14px; max-width: 460px; margin: 0 auto; }

.fin-badge {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(120deg, #fff7e6 0%, #fff 100%);
  border: 1px solid #ffe5a3; border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(255,180,40,.15);
}
.fbg-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #ffd166 0%, #ff9f1c 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.fbg-name { font-weight: 700; font-size: 15px; }
.fbg-sub { color: var(--text-mute); font-size: 12.5px; }

.fin-actions {
  display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px;
}
@media (min-width: 580px) {
  .fin-actions { grid-template-columns: 1fr 1fr; }
}
.fin-action {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  text-align: left; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative; overflow: hidden;
  font-family: inherit;
}
.fin-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(124,47,181,.18);
}
.fa-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 6px;
}
.fin-action-primary .fa-icon-wrap { background: linear-gradient(135deg, #efe1ff, #d6b6ff); }
.fin-action-primary:hover { border-color: #b88aff; }
.fin-action-warn    .fa-icon-wrap { background: linear-gradient(135deg, #fff4cf, #ffd966); }
.fin-action-warn:hover    { border-color: #f1b500; }
.fin-action-accent  .fa-icon-wrap { background: linear-gradient(135deg, #ffe1f0, #ffb6d2); }
.fin-action-accent:hover  { border-color: #ff7eb3; }
.fin-action-success .fa-icon-wrap { background: linear-gradient(135deg, #d8f3dc, #95d5b2); }
.fin-action-success:hover { border-color: #46a36b; }
.fa-title { font-weight: 700; font-size: 15px; }
.fa-sub { color: var(--text-soft); font-size: 13px; line-height: 1.45; }
.fa-cta { color: var(--brand-primary); font-weight: 600; font-size: 13px; margin-top: 8px; }

.fin-meta {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--brand-primary-soft);
  border-radius: var(--radius); padding: 14px 16px;
  font-size: 13.5px; color: var(--text);
}
.fin-meta-icon { font-size: 22px; }

.fin-locked-list .fin-remain {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 8px;
  cursor: pointer; transition: background .12s, border-color .12s;
  font-family: inherit;
}
.fin-locked-list .fin-remain:hover {
  border-color: var(--brand-primary); background: var(--brand-primary-soft);
}
.fr-ic { font-size: 20px; }
.fr-text { flex: 1; font-size: 14px; }
.fr-arrow { color: var(--brand-primary); font-weight: 700; }

/* --- Внутренний flow --- */
.fin-flow { margin-top: 8px; }
.fin-step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.fin-back-step {
  border: none; background: none; color: var(--brand-primary);
  font-weight: 600; padding: 0; cursor: pointer; margin-bottom: 10px;
  font-family: inherit;
}
.fin-back-step:hover { text-decoration: underline; }
.fs-title { font-size: 17px; margin-bottom: 6px; }
.fs-sub { color: var(--text-soft); font-size: 13.5px; margin-bottom: 14px; }
.fs-emoji-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fs-emoji {
  width: 48px; height: 48px; border-radius: 50%; font-size: 24px;
  border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; transition: transform .14s, border-color .14s, box-shadow .14s;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.fs-emoji:hover { transform: scale(1.1); border-color: var(--brand-primary); }
.fs-emoji.selected {
  border-color: var(--brand-primary); background: var(--brand-primary-soft);
  box-shadow: 0 0 0 4px rgba(124,47,181,.12); transform: scale(1.05);
}
.fs-text { font-family: inherit; resize: vertical; min-height: 80px; }
.fs-controls {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap;
}

/* --- Спасибо --- */
.fin-thanks { text-align: center; }
.ft-icon {
  font-size: 56px; margin-bottom: 10px;
  animation: ftPop .6s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes ftPop {
  from { transform: scale(.2); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.ft-buttons { margin-top: 14px; }
.ft-share {
  margin-top: 18px; padding: 16px;
  background: var(--brand-primary-soft); border-radius: var(--radius);
  text-align: left;
}
.fts-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.fts-sub { font-size: 13px; color: var(--text-soft); margin-bottom: 12px; }
.fts-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- Glow на 2ГИС-кнопке --- */
.btn-glow {
  position: relative;
  animation: btnGlow 2s ease-in-out infinite;
}
@keyframes btnGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 47, 181, .45); }
  50%      { box-shadow: 0 0 0 10px rgba(124, 47, 181, 0); }
}

/* --- Конфетти --- */
.confetti-layer {
  position: absolute; inset: 0; pointer-events: none;
  overflow: hidden; z-index: 5;
}
.confetti-piece {
  position: absolute; top: -16px; width: 10px; height: 14px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.4; }
}

/* ============================================================
   Раскрывающиеся карточки офисов в оргсхеме (станция 4)
   ============================================================ */
.org-node-expandable {
  cursor: pointer;
  border: 1px dashed var(--brand-primary);
  background: linear-gradient(135deg, #fff 0%, #faf5ff 100%);
  position: relative;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.org-node-expandable:hover {
  background: linear-gradient(135deg, #fbf6ff 0%, #f3e7ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,47,181,.18);
}
.org-node-expandable.open {
  background: var(--brand-primary-soft);
  border-style: solid;
}
.org-node .on-hint {
  font-size: 12px; color: var(--text-mute); margin-top: 4px; font-style: italic;
}
.org-node .on-chevron {
  position: absolute; top: 8px; right: 10px;
  font-size: 14px; color: var(--brand-primary);
  transition: transform .2s ease;
}
.org-node-expandable.open .on-chevron { transform: rotate(180deg); }

.org-expand-panel {
  margin: 8px 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 4px 16px rgba(20,30,55,.06);
  animation: opExpand .25s ease;
}
@keyframes opExpand {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.office-panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border); padding-bottom: 8px;
}
.oph-title { font-size: 15px; font-weight: 700; color: var(--brand-primary-dark); }
.oph-sub   { font-size: 12.5px; color: var(--text-mute); }
.op-group { margin-bottom: 12px; }
.op-group-title {
  font-size: 12px; font-weight: 700;
  color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.op-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.op-card {
  display: flex; gap: 10px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px;
}
.op-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px; overflow: hidden;
}
.op-avatar-img {
  object-fit: cover; object-position: center top;
  background: #fff; border: 1px solid var(--border);
}
.op-meta { min-width: 0; }
.op-name { font-weight: 600; font-size: 13px; line-height: 1.25; }
.op-pos  { font-size: 12px; color: var(--text-soft); line-height: 1.3; }
.op-dept { font-size: 11px; color: var(--text-mute); }

/* Модалка раскрытия офиса — поверх drawer */
.office-modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.office-modal-bg {
  position: absolute; inset: 0;
  background: rgba(13,8,32,.55);
  backdrop-filter: blur(2px);
}
.office-modal-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%; max-width: 720px;
  max-height: 86vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 22px 22px 24px;
  animation: omIn .25s ease;
}
@keyframes omIn {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.office-modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 16px; color: var(--text-soft);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.office-modal-close:hover {
  background: var(--brand-primary-soft); color: var(--brand-primary-dark);
}
.office-modal-body { padding-top: 6px; }

/* Плитки офисов на станции 4 (вместо дерева оргсхемы) */
.office-picker {
  display: grid; gap: 14px; margin: 14px 0 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 540px) {
  .office-picker { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
.office-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  font-family: inherit;
  position: relative; overflow: hidden;
}
.office-tile.expandable {
  border: 1px dashed var(--brand-primary);
  background: linear-gradient(135deg, #fff 0%, #faf5ff 100%);
}
.office-tile.expandable:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(124,47,181,.22);
  background: linear-gradient(135deg, #fbf6ff 0%, #f3e7ff 100%);
  border-style: solid;
}
.office-tile.static {
  opacity: .82; cursor: default;
  background: var(--surface-2);
}
.ot-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--brand-primary-soft); color: var(--brand-primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 6px;
}
.office-tile.expandable .ot-icon {
  background: var(--brand-gradient); color: #fff;
}
.ot-title { font-size: 17px; font-weight: 700; }
.ot-hint  { font-size: 13px; color: var(--text-soft); }
.ot-cta   { font-size: 13.5px; font-weight: 600; color: var(--brand-primary); margin-top: 6px; }
.ot-cta-mute { color: var(--text-mute); font-weight: 500; }

/* Чекбокс "Новый сотрудник" в редакторе команды */
.te-isnew {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 10px;
  background: var(--brand-primary-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px; color: var(--brand-primary-dark);
}
.te-isnew input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.te-isnew span { line-height: 1.35; }

/* Баннер статуса над змейкой + панель результатов снизу */
.snake-banner {
  width: 100%; max-width: 420px;
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; line-height: 1.45;
}
.snake-banner b { display: block; margin-bottom: 2px; font-size: 14px; }
.snake-banner .sb-ic { font-size: 22px; flex-shrink: 0; }
.snake-banner.sb-scored {
  background: linear-gradient(120deg, #fff7e6 0%, #fff 100%);
  border: 1px solid #ffe5a3;
  color: var(--text);
}
.snake-banner.sb-done {
  background: var(--brand-primary-soft);
  border: 1px solid transparent;
  color: var(--brand-primary-dark);
}
.snake-banner.sb-info {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
}
.snake-banner:empty { display: none; }

.snake-results {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px; margin-top: 6px;
  box-shadow: var(--shadow);
}
.snake-results:empty { display: none; padding: 0; border: none; box-shadow: none; }
.sr-head { margin-bottom: 10px; }
.sr-title { font-size: 14px; font-weight: 700; }
.sr-sub   { font-size: 12px; color: var(--text-mute); }
.sr-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sr-slot {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px; text-align: center;
  position: relative;
  background: var(--surface-2);
}
.sr-slot.filled {
  border-style: solid;
  background: linear-gradient(135deg, #fff 0%, #faf5ff 100%);
  border-color: var(--brand-primary);
}
.sr-slot.best {
  background: linear-gradient(135deg, #fff8e1 0%, #fff 100%);
  border-color: #f1b500;
  box-shadow: 0 0 0 3px rgba(241, 181, 0, .14);
}
.srs-num { font-size: 11.5px; color: var(--text-mute); margin-bottom: 4px; }
.srs-val { font-size: 16px; font-weight: 700; color: var(--brand-primary-dark); }
.srs-tag {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  background: #f1b500; color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; letter-spacing: .4px; text-transform: uppercase;
}
.sr-total {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 13.5px;
}
.srt-lbl { color: var(--text-soft); }
.srt-val { font-weight: 800; color: var(--brand-primary-dark); }
.srt-hint { color: var(--text-mute); font-size: 12px; margin-left: auto; }
.srt-hint-done { color: var(--success); font-weight: 600; }
.sr-personal { font-size: 13.5px; color: var(--text); }

/* Подвкладки станции «Льготы и поддержка» */
.benefits-tabs {
  display: flex; gap: 6px; margin: 14px 0 12px;
  border-bottom: 1px solid var(--border);
}
.bt-tab {
  background: none; border: none;
  padding: 9px 14px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; font-family: inherit;
  transition: color .15s, border-color .15s;
}
.bt-tab:hover { color: var(--brand-primary); }
.bt-tab.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.bt-pane { animation: btFade .25s ease; }
@keyframes btFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Блок «Заработай первый LEDcoin» внутри вкладки LEDcoin */
.led-firstcoin {
  margin-top: 18px;
  background: linear-gradient(135deg, #fff7e6 0%, #fff0fa 100%);
  border: 1px solid #ffd6a3;
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: start;
  box-shadow: 0 6px 20px rgba(255, 180, 40, .12);
}
.lfc-emoji { font-size: 32px; line-height: 1; }
.lfc-text { font-size: 13.5px; line-height: 1.45; }
.lfc-title { font-weight: 700; font-size: 15px; margin-bottom: 3px; }
.lfc-sub b { color: var(--brand-primary-dark); }
.led-firstcoin .btn {
  grid-column: 1 / -1; justify-self: stretch;
}
@media (min-width: 540px) {
  .led-firstcoin .btn { grid-column: 2; justify-self: start; }
}

/* Группировка офиса Алматы по департаментам */
.op-dept-block {
  margin-top: 14px; padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.op-dept-title {
  font-size: 13.5px; font-weight: 800;
  color: var(--brand-primary-dark); text-transform: uppercase; letter-spacing: 0.6px;
  margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.op-group-nested .op-group-title {
  color: var(--text-soft);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12.5px;
  margin-top: 8px;
}
.op-group-nested {
  margin-bottom: 8px;
}
.op-dept-block .op-group-nested:first-child .op-group-title { margin-top: 0; }

/* ============================================================
   Шаблоны документов в Базе знаний
   ============================================================ */
.article-row-tpl {
  position: relative;
  padding-right: 70px;
}
.ar-fmt {
  position: absolute; top: 12px; right: 12px;
  color: #fff; font-size: 10.5px; font-weight: 800;
  padding: 3px 8px; border-radius: 4px; letter-spacing: 0.5px;
}
.ar-tag-mgr {
  display: inline-block; margin-left: 6px;
  background: #ffe5a3; color: #92590a;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  vertical-align: middle;
}

/* Страница шаблона */
.tpl-page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-top: 14px;
}
.tpl-badge { margin-bottom: 12px; }
.tpl-badge .ar-fmt {
  position: static; font-size: 13px; padding: 6px 14px;
}
.tpl-title { font-size: 24px; margin-bottom: 6px; }
.tpl-mgr {
  display: inline-block;
  background: #ffe5a3; color: #92590a;
  font-size: 13px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
  margin-bottom: 12px;
}
.tpl-sum {
  color: var(--text-soft); font-size: 15px; line-height: 1.55;
  margin: 8px 0 22px;
}
.tpl-download {
  font-size: 15px; padding: 12px 24px;
  text-decoration: none; display: inline-block;
}
.tpl-info {
  margin-top: 22px; padding: 14px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.tpl-info-row { margin-bottom: 5px; }
.tpl-info-row code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12.5px; color: var(--text-soft);
}
.tii-lbl { color: var(--text-mute); margin-right: 4px; }
.tpl-hint {
  margin-top: 20px; padding: 12px 14px;
  background: var(--brand-primary-soft);
  border-radius: var(--radius-sm);
  font-size: 13.5px; line-height: 1.5;
  color: var(--text);
}

/* ============================================================
   Стрелки роста в перспективной схеме (Развитие)
   ============================================================ */
.uc-role-wrap {
  display: flex; flex-direction: column;
  margin-bottom: 4px;
}
.uc-role-growth {
  cursor: pointer;
  border-color: var(--brand-primary);
  background: linear-gradient(135deg, #fff 0%, #faf5ff 100%);
  transition: background .15s ease, border-color .15s ease;
  position: relative;
}
.uc-role-growth:hover {
  background: linear-gradient(135deg, #f7eeff 0%, #e9d8ff 100%);
}
.uc-role-growth.open {
  background: var(--brand-primary-soft);
  border-style: solid;
}
.uc-grow-icon {
  display: inline-block; margin-left: 6px;
  color: var(--brand-primary); font-weight: 800; font-size: 14px;
}
.uc-grow-panel {
  margin: 4px 0 8px 18px;
  background: var(--surface);
  border-left: 3px solid var(--brand-primary);
  padding: 10px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex; gap: 10px;
  font-size: 13px;
  animation: ugpIn .2s ease;
}
@keyframes ugpIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.ugp-arrow {
  color: var(--brand-primary); font-size: 22px; font-weight: 800;
  line-height: 1; flex-shrink: 0;
}
.ugp-body { flex: 1; }
.ugp-label { font-size: 11px; color: var(--text-mute); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.ugp-to {
  font-weight: 700; font-size: 14px; color: var(--brand-primary-dark);
  margin-bottom: 6px;
}
.ugp-cross {
  display: inline-block; margin-left: 6px;
  background: #fff7e6; color: #92590a;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  vertical-align: middle;
}
.ugp-crit { color: var(--text-soft); line-height: 1.5; }
.ugp-crit b { color: var(--text); }

/* Внешняя модульная карточка (LEDcoin Bank) */
.module-card-ext {
  text-decoration: none; color: inherit;
  background: linear-gradient(135deg, #fff 0%, #fff7e6 100%);
  border: 1px solid #ffd166;
  display: flex; flex-direction: column; gap: 8px;
}
.module-card-ext:hover {
  border-color: #f5b800;
  transform: translateY(-3px); box-shadow: 0 12px 30px rgba(245, 184, 0, .2);
}
.module-card-ext .module-icon {
  background: linear-gradient(135deg, #ffd166 0%, #ff9f1c 100%);
  color: #fff;
}
.module-card-ext .module-cta { color: #c87600; }
