/* =========================================================
   📋 EXECUTOR STYLE v1.2 (🚀)
   [Task System Styles — Executor Module Enhanced]
   ========================================================= */

/*🧠 Архітектура:
  🧠 CSS для Executor модуля ADC
  🧠 Живе ВСЕРЕДИНІ .adc-workspace
  🧠 Layout, colors, fonts — з main-style-adc.css */

/*💡 Секції:
  💡 1. Root Wrapper
  💡 2. Grid Layout
  💡 3. Base Admin Section
  💡 4. Analytics Grid [v1.2]
  💡 5. Config Tabs [v1.2]
  💡 6. Cards Controls [v1.2]
  💡 7. Filters & Sort [v1.2]
  💡 8. Configuration Section
  💡 9. Task Cards
  💡 10. Active Sessions
  💡 11. Statistics
  💡 12. History
  💡 13. Modal
  💡 14. Confirm Modal [v1.2]
  💡 15. Empty State
  💡 16. Toast Notifications
  💡 17. Responsive */


/* ╔═══════════════════════════════════════════════════════════╗
   ║  📦 1. ROOT WRAPPER                                        ║
   ║  Кореневий контейнер Executor                              ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-executor {
  padding: 0;
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  🧩 2. GRID LAYOUT                                         ║
   ║  Основна сітка модуля                                      ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.adc-full-width {
  grid-column: 1 / -1;
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  🧱 3. BASE ADMIN SECTION                                  ║
   ║  Базовий контейнер блоків                                  ║
   ╚═══════════════════════════════════════════════════════════╝ */

.admin-section {
  background: var(--bg-soft);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;

  box-shadow:
    0 10px 30px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.04);
  
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-section:hover {
  border-color: rgba(88, 101, 242, 0.3);
  box-shadow:
    0 12px 40px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.06);
}

.adc-section-title {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.section-header .adc-section-title {
  margin: 0;
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  📈 4. ANALYTICS GRID [v1.2]                               ║
   ║  Сітка карток аналітики                                    ║
   ╚═══════════════════════════════════════════════════════════╝ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.stat-card {
  background: linear-gradient(135deg, 
    rgba(88, 101, 242, 0.08), 
    rgba(88, 101, 242, 0.02)
  );
  border: 1px solid rgba(88, 101, 242, 0.2);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    #5865f2, 
    #7289da
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(88, 101, 242, 0.4);
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.2);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  📑 5. CONFIG TABS [v1.2]                                  ║
   ║  Система вкладок конфігурації                              ║
   ╚═══════════════════════════════════════════════════════════╝ */

.config-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-soft);
  padding-bottom: 0;
}

.config-tab {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px 8px 0 0;
  font-family: 'JetBrains Mono', monospace;
}

.config-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #5865f2, #7289da);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.config-tab:hover {
  color: var(--text-bright);
  background: rgba(88, 101, 242, 0.05);
}

.config-tab.active {
  color: #5865f2;
  background: rgba(88, 101, 242, 0.1);
}

.config-tab.active::after {
  transform: scaleX(1);
}

.config-tab-content {
  position: relative;
  min-height: 200px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  🎯 6. CARDS CONTROLS [v1.2]                               ║
   ║  Контроли фільтрації та сортування                         ║
   ╚═══════════════════════════════════════════════════════════╝ */

.cards-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(88, 101, 242, 0.03);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.cards-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
  min-width: 300px;
}

.cards-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.cards-sort label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  🔍 7. FILTERS & SORT [v1.2]                               ║
   ║  Стилі для фільтрів та пошуку                              ║
   ╚═══════════════════════════════════════════════════════════╝ */

.filter-select {
  background: rgba(0, 0, 0, 0.2); /* Темний фон замість білого */
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-bright); /* Світлий текст */
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
}

.filter-select:hover {
  border-color: rgba(88, 101, 242, 0.4);
  background: rgba(88, 101, 242, 0.05);
}

.filter-select:focus {
  outline: none;
  border-color: #5865f2;
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

/* Стилі для option елементів */
.filter-select option {
  background: #2f3136;
  color: var(--text-bright);
  padding: 8px;
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  ⚙️ 8. CONFIGURATION SECTION                               ║
   ║  Форма налаштувань модуля                                  ║
   ╚═══════════════════════════════════════════════════════════╝ */

.executor-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

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

.config-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.config-group small {
  font-size: 11px;
  color: #72767d;
  margin-top: 4px;
  line-height: 1.4;
}

.adc-input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-bright);
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s ease;
  width: 100%;
}

.adc-input:hover {
  border-color: rgba(88, 101, 242, 0.3);
}

.adc-input:focus {
  outline: none;
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.05);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.adc-input::placeholder {
  color: #72767d;
}

.adc-textarea {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-bright);
  font-family: 'JetBrains Mono', monospace;
  resize: vertical;
  min-height: 80px;
  transition: all 0.2s ease;
  width: 100%;
}

.adc-textarea:hover {
  border-color: rgba(88, 101, 242, 0.3);
}

.adc-textarea:focus {
  outline: none;
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.05);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  🎯 9. TASK CARDS                                          ║
   ║  Картки завдань                                            ║
   ╚═══════════════════════════════════════════════════════════╝ */

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card-item {
  background: linear-gradient(135deg, 
    rgba(47, 49, 54, 0.9), 
    rgba(32, 34, 37, 0.9)
  );
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #5865f2, #7289da);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-item:hover {
  transform: translateY(-4px);
  border-color: rgba(88, 101, 242, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.card-item:hover::before {
  opacity: 1;
}

.card-header {
  margin-bottom: 12px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-level {
  font-size: 11px;
  font-weight: 600;
  color: #5865f2;
  background: rgba(88, 101, 242, 0.15);
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-category {
  display: inline-block;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 12px 0;
}

.card-objective {
  font-size: 13px;
  color: var(--text-bright);
  background: rgba(88, 101, 242, 0.08);
  border-left: 3px solid #5865f2;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 12px 0;
}

.card-objective strong {
  color: #5865f2;
  margin-right: 4px;
}

.card-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.reward-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
}

.reward-icon {
  font-size: 16px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.reward-value {
  font-family: 'JetBrains Mono', monospace;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.card-edit-btn,
.card-delete-btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'JetBrains Mono', monospace;
}

.card-edit-btn {
  background: rgba(88, 101, 242, 0.15);
  color: #5865f2;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.card-edit-btn:hover {
  background: rgba(88, 101, 242, 0.25);
  border-color: #5865f2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.card-delete-btn {
  background: rgba(237, 66, 69, 0.15);
  color: #ed4245;
  border: 1px solid rgba(237, 66, 69, 0.3);
}

.card-delete-btn:hover {
  background: rgba(237, 66, 69, 0.25);
  border-color: #ed4245;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(237, 66, 69, 0.3);
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  🎮 10. ACTIVE SESSIONS                                    ║
   ║  Активні сесії завдань                                     ║
   ╚═══════════════════════════════════════════════════════════╝ */

.sessions-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.session-item,
.history-item {
  background: linear-gradient(135deg, 
    rgba(47, 49, 54, 0.9), 
    rgba(32, 34, 37, 0.9)
  );
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.session-item:hover,
.history-item:hover {
  border-color: rgba(88, 101, 242, 0.4);
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.session-header,
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.session-title,
.history-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0;
}

.session-status {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-status.searching {
  background: rgba(250, 166, 26, 0.15);
  color: #faa61a;
  border: 1px solid rgba(250, 166, 26, 0.3);
}

.session-status.waiting_start {
  background: rgba(254, 231, 92, 0.15);
  color: #fee75c;
  border: 1px solid rgba(254, 231, 92, 0.3);
}

.session-status.active {
  background: rgba(87, 242, 135, 0.15);
  color: #57f287;
  border: 1px solid rgba(87, 242, 135, 0.3);
}

.session-status.completing {
  background: rgba(88, 101, 242, 0.15);
  color: #5865f2;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.session-status.completed {
  background: rgba(87, 242, 135, 0.15);
  color: #57f287;
  border: 1px solid rgba(87, 242, 135, 0.3);
}

.session-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.session-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-info-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
  font-family: 'JetBrains Mono', monospace;
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  📊 11. STATISTICS                                         ║
   ║  Топ учасників                                             ║
   ╚═══════════════════════════════════════════════════════════╝ */

.stats-container {
  margin-top: 20px;
}

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

.stats-item {
  background: linear-gradient(135deg, 
    rgba(47, 49, 54, 0.9), 
    rgba(32, 34, 37, 0.9)
  );
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-item:hover {
  border-color: rgba(88, 101, 242, 0.4);
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.stats-item-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stats-rank {
  font-size: 24px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

.stats-rank.gold {
  color: #faa61a;
  text-shadow: 0 0 10px rgba(250, 166, 26, 0.5);
}

.stats-rank.silver {
  color: #b9bbbe;
  text-shadow: 0 0 10px rgba(185, 187, 190, 0.5);
}

.stats-rank.bronze {
  color: #cd7f32;
  text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.stats-user {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
}

.stats-item-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stats-points {
  font-size: 18px;
  font-weight: 700;
  color: #5865f2;
  font-family: 'JetBrains Mono', monospace;
}

.stats-tasks {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  📜 12. HISTORY — КОМПАКТНА ВЕРСІЯ [v1.2]                  ║
   ║  Історія виконаних завдань                                 ║
   ╚═══════════════════════════════════════════════════════════╝ */

.history-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.history-item {
  background: linear-gradient(135deg, 
    rgba(47, 49, 54, 0.9), 
    rgba(32, 34, 37, 0.9)
  );
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-item:hover {
  border-color: rgba(88, 101, 242, 0.4);
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.history-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.history-item .session-status {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 8px;
}

.history-item .session-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}

.history-item .session-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-item .session-info-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-item .session-info-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-bright);
  font-family: 'JetBrains Mono', monospace;
}

/* Учасники займають весь рядок */
.history-item .session-info-full-width {
  grid-column: 1 / -1;
}

.history-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.history-participants .participant-badge {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 10px;
}

/* Responsive для історії */
@media (max-width: 1200px) {
  .history-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .history-item .session-info {
    grid-template-columns: 1fr;
  }
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  🪟 13. MODAL                                              ║
   ║  Модальне вікно                                            ║
   ╚═══════════════════════════════════════════════════════════╝ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(47, 49, 54, 0.98), 
    rgba(32, 34, 37, 0.98)
  );
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 
    0 24px 48px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(88, 101, 242, 0.05);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(237, 66, 69, 0.15);
  color: #ed4245;
}

.modal-body {
  padding: 24px;
  max-height: calc(85vh - 160px);
  overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(88, 101, 242, 0.3);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(88, 101, 242, 0.5);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #5865f2;
}

.checkbox-label span {
  font-size: 14px;
  color: var(--text-bright);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.2);
}

.adc-save-btn,
.adc-cancel-btn,
.adc-add-btn,
.adc-refresh-btn,
.adc-delete-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'JetBrains Mono', monospace;
}

.adc-save-btn {
  background: linear-gradient(135deg, #5865f2, #4752c4);
  color: white;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.adc-save-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #4752c4, #3c45a5);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(88, 101, 242, 0.4);
}

.adc-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.adc-cancel-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
}

.adc-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-bright);
}

.adc-add-btn {
  background: rgba(87, 242, 135, 0.15);
  color: #57f287;
  border: 1px solid rgba(87, 242, 135, 0.3);
}

.adc-add-btn:hover {
  background: rgba(87, 242, 135, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(87, 242, 135, 0.3);
}

.adc-refresh-btn {
  background: rgba(88, 101, 242, 0.15);
  color: #5865f2;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.adc-refresh-btn:hover {
  background: rgba(88, 101, 242, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.adc-delete-btn {
  background: linear-gradient(135deg, #ed4245, #c03537);
  color: white;
  box-shadow: 0 4px 12px rgba(237, 66, 69, 0.3);
}

.adc-delete-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #c03537, #a02d2f);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(237, 66, 69, 0.4);
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  ⚠️ 14. CONFIRM MODAL [v1.2]                               ║
   ║  Модалка підтвердження дії                                 ║
   ╚═══════════════════════════════════════════════════════════╝ */

.confirm-modal .modal-content {
  max-width: 480px;
}

.confirm-content .modal-body {
  padding: 32px 24px;
  text-align: center;
}

.confirm-content .modal-body p {
  font-size: 14px;
  color: var(--text-bright);
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.highlight-text {
  font-weight: 700;
  color: #5865f2;
  font-size: 16px;
  margin: 16px 0 !important;
  padding: 12px;
  background: rgba(88, 101, 242, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.warning-text {
  font-size: 13px !important;
  color: #faa61a !important;
  margin-top: 20px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  🔳 15. EMPTY STATE                                        ║
   ║  Порожній стан секцій                                      ║
   ╚═══════════════════════════════════════════════════════════╝ */

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

.empty-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.5;
  filter: grayscale(0.5);
}

.empty-state p {
  font-size: 14px;
  margin: 0;
  color: var(--text-muted);
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  🔔 16. TOAST NOTIFICATIONS                                ║
   ║  Сповіщення                                                ║
   ╚═══════════════════════════════════════════════════════════╝ */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: linear-gradient(135deg, 
    rgba(47, 49, 54, 0.98), 
    rgba(32, 34, 37, 0.98)
  );
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  min-width: 300px;
  max-width: 400px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.toast-message {
  font-size: 14px;
  color: var(--text-bright);
  line-height: 1.4;
}

.toast-success {
  border-left: 4px solid #57f287;
}

.toast-error {
  border-left: 4px solid #ed4245;
}

.toast-info {
  border-left: 4px solid #5865f2;
}

.toast-warning {
  border-left: 4px solid #faa61a;
}


/* ╔═══════════════════════════════════════════════════════════╗
   ║  📱 17. RESPONSIVE                                         ║
   ║  Адаптивність                                              ║
   ╚═══════════════════════════════════════════════════════════╝ */

@media (max-width: 1200px) {
  .executor-config-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  
  .cards-container {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-section {
    padding: 16px;
  }
  
  .config-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .config-tab {
    white-space: nowrap;
  }
  
  .cards-controls {
    flex-direction: column;
  }
  
  .cards-filters {
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }
  
  .filter-select,
  .cards-filters .adc-input {
    width: 100%;
    min-width: 0;
  }
  
  .cards-sort {
    width: 100%;
    justify-content: space-between;
  }
  
  .cards-container {
    grid-template-columns: 1fr;
  }
  
  .executor-config-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .session-info {
    grid-template-columns: 1fr;
  }
  
  .stats-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .stats-item-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .modal-body {
    max-height: calc(90vh - 160px);
  }
  
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: 0;
    width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-value {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .card-actions {
    flex-direction: column;
  }
  
  .card-edit-btn,
  .card-delete-btn {
    width: 100%;
  }
  
  .modal-header {
    padding: 16px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .modal-footer {
    padding: 16px;
    flex-direction: column;
  }
  
  .adc-save-btn,
  .adc-cancel-btn {
    width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}



/* ++++++++++++++++++++++++++++++++++++++++++ */
/*  індикатор статусу бота (online/offline) в меню */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.status-dot.offline {
  background: #666;
  box-shadow: 0 0 8px rgba(102, 102, 102, 0.5);
}

.status-dot.online {
  background: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
  animation: pulse-online 2s ease-in-out infinite;
}

@keyframes pulse-online {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ++++++++++++++++++++++++++++++++++++++++++ */

   /* v1.1 - Підпис під назвою сторінки */
.hero-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

   /* v1.1 - executor Icon */
.executor-icon {
  background: radial-gradient(
    circle at center,
    transparent 36%,
    rgba(241, 15, 15, 0.28) 40%,
    rgba(241, 15, 15, 0.18) 70%,
    rgba(0,0,0,0.65) 100%
  );
  box-shadow:
    0 0 50px rgba(241, 15, 15, 0.55),
    inset 0 0 28px rgba(255,255,255,0.08);
}

/* executor — квадратне внутрішнє вікно */
.hero-icon.executor-icon::after {
  display: none;
}

.executor-icon svg {
  fill: #ff4f4f;
  filter: drop-shadow(0 0 8px rgba(241, 15, 15, 0.6));
}

/* ++++++++++++++++++++++++++++++++++++++++++ */

.user-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-avatar,
.stats-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(88, 101, 242, 0.3);
}

.stats-avatar {
  width: 32px;
  height: 32px;
}

.user-name {
  font-weight: 600;
  color: var(--text-bright);
}

.session-info-full-width {
  grid-column: 1 / -1;
}

.session-participants,
.history-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.participant-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-bright);
}

.participant-badge:hover {
  background: rgba(88, 101, 242, 0.25);
  transform: translateY(-1px);
}