/* ==========================================================================
   Модуль «Преемственность» — Светлая Дизайн-система (Light Premium Theme)
   Стиль: Light Glassmorphism, KFC Red (#E4002B), Шрифты Inter и Outfit
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* Цветовая палитра KFC Red & Light Premium */
  --color-primary: #E4002B;
  --color-primary-hover: #c90025;
  --color-primary-glow: rgba(228, 0, 43, 0.25);
  --color-primary-light: rgba(228, 0, 43, 0.08);

  --bg-light: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass-input: rgba(241, 245, 249, 0.8);

  --border-glass: 1px solid rgba(226, 232, 240, 0.9);
  --border-glass-glow: 1px solid rgba(228, 0, 43, 0.4);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --color-success: #059669;
  --color-warning: #d97706;
  --color-info: #2563eb;
  --color-danger: #dc2626;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-glass: 0 10px 30px 0 rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 4px 14px rgba(228, 0, 43, 0.25);
  --backdrop-blur: blur(20px);
}

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

body {
  font-family: var(--font-primary);
  background: var(--bg-light);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(228, 0, 43, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(37, 99, 235, 0.05) 0%, transparent 40%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 50px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Контейнер и Шапка
   -------------------------------------------------------------------------- */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px;
}

header.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-glass);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.b24-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.b24-badge.offline {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.3);
}

.b24-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* --------------------------------------------------------------------------
   1. Департаменты и Навигация (Идеальные Капсулы Без Налезаний)
   -------------------------------------------------------------------------- */
.departments-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.dept-btn {
  flex: 1 1 auto;
  background: #ffffff;
  backdrop-filter: var(--backdrop-blur);
  border: var(--border-glass);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  text-align: center;
}

.dept-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.dept-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   2. Баннер Руководителя Департамента
   -------------------------------------------------------------------------- */
.manager-banner-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 24px;
  margin-bottom: 20px;
  border-left: 5px solid var(--color-primary);
  background: #ffffff;
}

.manager-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.manager-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.manager-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.manager-name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.manager-position {
  font-size: 13px;
  color: var(--text-muted);
}

.manager-banner-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.successor-count-box {
  text-align: right;
  padding-right: 16px;
  border-right: 1px solid rgba(226, 232, 240, 0.9);
}

.count-number {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
}

.count-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   3. Выбор Преемника (Табы преемников)
   -------------------------------------------------------------------------- */
.successors-tab-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  backdrop-filter: var(--backdrop-blur);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-glass);
}

.tab-bar-label {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.successors-tabs-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.successor-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
}

.successor-tab-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.successor-tab-btn.active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.tab-succ-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.tab-succ-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

/* --------------------------------------------------------------------------
   Увеличенная Фотокарточка и Редактирование
   -------------------------------------------------------------------------- */
.avatar-wrapper {
  position: relative;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--color-primary), #3b82f6);
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 25px rgba(228, 0, 43, 0.22);
}

.avatar-wrapper:hover {
  transform: scale(1.04);
  box-shadow: 0 14px 32px rgba(228, 0, 43, 0.38);
}

.avatar-wrapper::after {
  content: '\f030';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.avatar-wrapper:hover::after {
  opacity: 1;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f5f9;
}

/* --------------------------------------------------------------------------
   Инрактивные редактируемые поля карточки преемника
   -------------------------------------------------------------------------- */
.name-input-inline {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  background: rgba(241, 245, 249, 0.6);
  border: 1px dashed transparent;
  border-radius: 6px;
  padding: 4px 8px;
  width: 100%;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.name-input-inline:hover, .name-input-inline:focus {
  background: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(228, 0, 43, 0.15);
}

.role-input-inline {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(241, 245, 249, 0.6);
  border: 1px dashed transparent;
  border-radius: 6px;
  padding: 3px 8px;
  width: 100%;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.role-input-inline:hover, .role-input-inline:focus {
  background: #ffffff;
  border-color: var(--color-primary);
}

.target-role-input {
  color: var(--color-primary);
  font-weight: 700;
  margin-top: 4px;
}

.info-input-inline {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  background: rgba(241, 245, 249, 0.6);
  border: 1px dashed transparent;
  border-radius: 6px;
  padding: 3px 6px;
  width: auto;
  min-width: 175px;
  max-width: 220px;
  text-align: right;
  outline: none;
  transition: all 0.2s ease;
}

.info-input-inline:hover, .info-input-inline:focus {
  background: #ffffff;
  border-color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Интерактивные Теги Языков (Список с кнопками удаления/добавления)
   -------------------------------------------------------------------------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.lang-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: var(--radius-md);
  font-size: 11px;
  transition: all 0.2s ease;
}

.lang-tag:hover {
  border-color: var(--color-primary);
  background: #ffffff;
}

.lang-input-inline {
  background: transparent;
  border: none;
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  width: auto;
  min-width: 130px;
  max-width: 180px;
}

.remove-lang-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  line-height: 1;
}

.remove-lang-btn:hover {
  color: var(--color-danger);
}

/* --------------------------------------------------------------------------
   Кнопки и Элементы управления
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  font-family: var(--font-primary);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-glass {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  backdrop-filter: var(--backdrop-blur);
}

.btn-glass:hover {
  background: #f1f5f9;
  color: #000;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Карточки & Сетка Блоков (Grid Layout)
   -------------------------------------------------------------------------- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-glass);
  transition: border-color 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(228, 0, 43, 0.25);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--color-primary);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --------------------------------------------------------------------------
   Блок 1: Основная информация
   -------------------------------------------------------------------------- */
.profile-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.info-label {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Блок 2: Профессиональный опыт
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #cbd5e1;
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--color-primary);
}

.timeline-period-input {
  font-size: 11px;
  color: var(--color-primary);
  font-weight: 700;
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
}

.timeline-title-input {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
}

.timeline-company-input {
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Блок 3: Качественная оценка
   -------------------------------------------------------------------------- */
.qualitative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.qualitative-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
}

.qualitative-header {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qualitative-header.strengths { color: var(--color-success); }
.qualitative-header.development { color: var(--color-warning); }
.qualitative-header.next-steps { color: var(--color-info); }

.bullet-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #0f172a;
  font-family: var(--font-primary);
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  overflow: hidden;
  min-height: 80px;
  outline: none;
  box-sizing: border-box;
}

.bullet-textarea:focus {
  background: rgba(241, 245, 249, 0.5);
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Блок 4: Готовность к более сложной роли
   -------------------------------------------------------------------------- */
.readiness-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.readiness-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.readiness-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.readiness-card.selected {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.readiness-radio {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.readiness-text {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

/* --------------------------------------------------------------------------
   Блок 5: Матрица Потенциала и Результативности (9-Box Grid)
   -------------------------------------------------------------------------- */
.grid-container-9box {
  display: flex;
  gap: 14px;
}

.y-axis-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.grid-main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid-9box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 110px);
  gap: 8px;
}

.x-axis-label {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.box-cell {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.box-cell:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: scale(1.02);
}

.box-cell.active-zone {
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-glow);
}

/* Цветовое зонирование 9-Box */
.box-cell[data-zone="star"] { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); }
.box-cell[data-zone="high"] { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.25); }
.box-cell[data-zone="core"] { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.25); }
.box-cell[data-zone="risk"] { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.25); }

.box-title {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
}

.marker-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.user-marker {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-glow);
  background-size: cover;
  background-position: center;
  animation: pulseMarker 2s infinite;
}

@keyframes pulseMarker {
  0% { box-shadow: 0 0 0 0 rgba(228, 0, 43, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(228, 0, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(228, 0, 43, 0); }
}

.matrix-comments-area {
  margin-top: 14px;
}

.matrix-textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 12px;
  color: #0f172a;
  font-family: var(--font-primary);
  font-size: 13px;
  resize: none;
  overflow: hidden;
  min-height: 70px;
  outline: none;
  box-sizing: border-box;
}

.matrix-textarea:focus {
  border-color: var(--color-primary);
}

.readiness-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.readiness-badge.emergency { background: rgba(239, 68, 68, 0.15); color: #b91c1c; border: 1px solid rgba(239, 68, 68, 0.3); }
.readiness-badge.short { background: rgba(245, 158, 11, 0.15); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.3); }
.readiness-badge.long { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; border: 1px solid rgba(59, 130, 246, 0.3); }

/* --------------------------------------------------------------------------
   Всплывающие подсказки (Tooltips on Hover)
   -------------------------------------------------------------------------- */
.info-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  margin-left: 6px;
  transition: color 0.2s ease;
}

.info-tooltip-icon:hover {
  color: var(--color-primary);
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0f172a;
  border: 1px solid rgba(228, 0, 43, 0.5);
  color: #f8fafc;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
  width: max-content;
  max-width: 280px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(228, 0, 43, 0.2);
  backdrop-filter: blur(12px);
  text-transform: none;
  font-family: var(--font-primary);
  letter-spacing: 0;
}

[data-tooltip]::before {
  content: '';
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  margin-bottom: -6px;
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

/* --------------------------------------------------------------------------
   ДОРАБОТКА 1: Action Plan Progress Indicator
   -------------------------------------------------------------------------- */
.ap-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ap-percentage {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--color-primary);
}

.progress-bar-track {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid #cbd5e1;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #ff4d6d);
  border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-glow);
}

.action-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.action-checkbox {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.action-title {
  flex: 1;
  font-size: 13px;
  color: #0f172a;
  font-weight: 500;
}

.action-item.completed .action-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.add-ap-form {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.input-glass {
  flex: 1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  color: #0f172a;
  font-family: var(--font-primary);
  font-size: 13px;
  outline: none;
}

.input-glass:focus {
  border-color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   ДОРАБОТКА 2: Загрузка Файлов
   -------------------------------------------------------------------------- */
.files-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  border: 2px dashed rgba(228, 0, 43, 0.35);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(228, 0, 43, 0.03);
  transition: all 0.25s ease;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.files-upload-zone:hover {
  border-color: var(--color-primary);
  background: rgba(228, 0, 43, 0.08);
  box-shadow: 0 0 20px rgba(228, 0, 43, 0.15);
}

.upload-icon {
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-icon {
  color: var(--color-primary);
  font-size: 18px;
}

.file-name {
  font-weight: 600;
  color: #0f172a;
}

.file-size {
  font-size: 11px;
  color: var(--text-dim);
}

.file-actions {
  display: flex;
  gap: 8px;
}

.remove-successor-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.remove-successor-btn:hover {
  color: var(--color-danger);
}

/* --------------------------------------------------------------------------
   ДОРАБОТКА 3: Квартальное Напоминание о Встрече
   -------------------------------------------------------------------------- */
.meeting-status-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.meeting-info-text {
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
}

.meeting-date-highlight {
  font-weight: 700;
  color: #1d4ed8;
}

.meetings-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meeting-history-item {
  background: #ffffff;
  border-left: 4px solid var(--color-success);
  border-top: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 12px;
}

.meeting-history-date {
  font-weight: 700;
  color: var(--color-success);
  margin-bottom: 4px;
}

.meeting-history-notes {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Модальные Окна (Modals)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  border: var(--border-glass-glow);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 540px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15), var(--shadow-glow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Стили печати / Экспорт PDF
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .departments-bar, .header-actions, .add-ap-form, .files-upload-zone, .btn, .modal-overlay, .successors-tab-bar {
    display: none !important;
  }

  .glass-card {
    background: #fff !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .card-title, .user-name, .info-value, .readiness-text, .manager-name {
    color: #000 !important;
  }

  .box-cell {
    border: 1px solid #999 !important;
    color: #000 !important;
  }
}
