/* =========================================================
   📋 APPLICANT STYLE v1.1 (🚧)
   [Application System Styles — Applicant Module]
   ========================================================= */

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

/*💡 Секції:
  💡 1. Root Wrapper
  💡 2. Grid Layout
  💡 3. Base Admin Section
  💡 4. Configuration Section
  💡 5. Inputs / Textarea / Select
  💡 6. Message Templates
  💡 7. Section Header
  💡 8. Buttons
  💡 9. Applications List
  💡 10. History List
  💡 11. Statistics
  💡 12. Blacklist
  💡 13. Form Fields Editor
  💡 14. Modal
  💡 15. Empty State
  💡 16. Applicant Icon
  💡 17. Responsive */


/* ╔═══════════════════════════════════════════════════════════╗
   ║  📦 1. ROOT WRAPPER                                        ║
   ║  Кореневий контейнер модуля                                ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-applicant {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.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: 20px;
  box-shadow:
    0 10px 30px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.admin-section h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  ⚙️ 4. CONFIGURATION SECTION                              ║
   ║  Секція налаштувань модуля                                 ║
   ╚═══════════════════════════════════════════════════════════╝ */

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

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

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

/* ╔═══════════════════════════════════════════════════════════╗
   ║  ✏️ 5. INPUTS / TEXTAREA / SELECT                         ║
   ║  Поля вводу                                                ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-input,
.adc-textarea,
.adc-select {
  width: 100%;
  padding: 12px 14px;
  background: #0b0d12;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border .2s ease, box-shadow .2s ease;
}

.adc-input:focus,
.adc-textarea:focus,
.adc-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(88,101,242,.25);
}

.adc-textarea {
  resize: vertical;
}

.adc-select {
  cursor: pointer;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📄 6. MESSAGE TEMPLATES                                   ║
   ║  Шаблони повідомлень                                       ║
   ╚═══════════════════════════════════════════════════════════╝ */

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

.template-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📋 7. SECTION HEADER                                      ║
   ║  Заголовок секції з кнопками                               ║
   ╚═══════════════════════════════════════════════════════════╝ */

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

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🔘 8. BUTTONS                                             ║
   ║  Кнопки дій                                                ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-add-btn,
.adc-refresh-btn,
.adc-save-btn,
.adc-cancel-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Add Button */
.adc-add-btn {
  background: linear-gradient(135deg, #57F287, #3BA55D);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(87, 242, 135, 0.4);
}

.adc-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(87, 242, 135, 0.6);
}

/* Refresh Button */
.adc-refresh-btn {
  background: rgba(88, 101, 242, 0.1);
  color: #5865F2;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.adc-refresh-btn:hover {
  background: rgba(88, 101, 242, 0.2);
}

/* Save Button */
.adc-save-btn {
  background: linear-gradient(135deg, #5865F2, #7289DA);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.4);
}

.adc-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(88, 101, 242, 0.6);
}

/* Cancel Button */
.adc-cancel-btn {
  background: rgba(72, 76, 80, 0.3);
  color: #B9BBBE;
  border: 1px solid var(--border-soft);
}

.adc-cancel-btn:hover {
  background: rgba(72, 76, 80, 0.5);
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📋 9. APPLICATIONS LIST                                   ║
   ║  Список активних заявок                                    ║
   ╚═══════════════════════════════════════════════════════════╝ */

.applications-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.application-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.application-card:hover {
  border-color: #5865F2;
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.3);
}

/* Application Header */
.application-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.application-user {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.application-user strong {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.user-id {
  font-size: 12px;
  color: #72767d;
}

.application-time {
  font-size: 12px;
  color: #72767d;
}

/* Application Fields */
.application-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #72767d;
}

.field-value {
  font-size: 14px;
  color: #B9BBBE;
  line-height: 1.4;
}

/* Application Actions */
.application-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.action-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.accept-btn:hover {
  background: rgba(87, 242, 135, 0.25);
  transform: translateY(-1px);
}

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

.reject-btn:hover {
  background: rgba(237, 66, 69, 0.25);
  transform: translateY(-1px);
}

/* Application Reminders */
.application-reminders {
  font-size: 12px;
  color: #FEE75C;
  margin-top: 8px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📜 10. HISTORY LIST                                       ║
   ║  Історія заявок                                            ║
   ╚═══════════════════════════════════════════════════════════╝ */

.history-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
}

/* History Header */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.history-user {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-user strong {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.history-status {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-accepted {
  background: rgba(87, 242, 135, 0.2);
  color: #57F287;
}

.status-rejected {
  background: rgba(237, 66, 69, 0.2);
  color: #ED4245;
}

/* History Meta */
.history-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #B9BBBE;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.history-reason {
  background: rgba(237, 66, 69, 0.1);
  border: 1px solid rgba(237, 66, 69, 0.3);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #ED4245;
  margin-top: 8px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📊 11. STATISTICS                                         ║
   ║  Статистика модуля                                         ║
   ╚═══════════════════════════════════════════════════════════╝ */

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

.stat-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: #5865F2;
  transform: translateY(-2px);
}

.stat-card.acceptance-rate {
  grid-column: span 2;
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 36px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #72767d;
  letter-spacing: 0.5px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🚫 12. BLACKLIST                                          ║
   ║  Чорний список користувачів                                ║
   ╚═══════════════════════════════════════════════════════════╝ */

.blacklist-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blacklist-item {
  background: rgba(237, 66, 69, 0.1);
  border: 1px solid rgba(237, 66, 69, 0.3);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blacklist-user {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blacklist-userid {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.blacklist-reason {
  font-size: 13px;
  color: #B9BBBE;
}

.blacklist-meta {
  font-size: 11px;
  color: #72767d;
}

.blacklist-remove-btn {
  padding: 8px 16px;
  background: rgba(237, 66, 69, 0.2);
  border: 1px solid rgba(237, 66, 69, 0.4);
  border-radius: 6px;
  color: #ED4245;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blacklist-remove-btn:hover {
  background: rgba(237, 66, 69, 0.3);
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📝 13. FORM FIELDS EDITOR                                 ║
   ║  Конструктор полів форми                                   ║
   ╚═══════════════════════════════════════════════════════════╝ */

.fields-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-field-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-info .field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.required-badge {
  background: rgba(237, 66, 69, 0.2);
  color: #ED4245;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.field-meta {
  font-size: 12px;
  color: #72767d;
}

/* Field Actions */
.field-actions {
  display: flex;
  gap: 8px;
}

.field-edit-btn,
.field-delete-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.field-edit-btn:hover {
  background: rgba(88, 101, 242, 0.2);
}

.field-delete-btn {
  background: rgba(237, 66, 69, 0.1);
  color: #ED4245;
  border: 1px solid rgba(237, 66, 69, 0.3);
}

.field-delete-btn:hover {
  background: rgba(237, 66, 69, 0.2);
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #72767d;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

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

/* Modal Body */
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

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

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

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #B9BBBE;
}

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

/* Modal Footer */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid var(--border-soft);
}

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

.empty-state {
  text-align: center;
  padding: 40px;
  color: #72767d;
  font-size: 14px;
  font-style: italic;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🎯 16. APPLICANT ICON                                     ║
   ║  Іконка модуля (v1.1)                                      ║
   ╚═══════════════════════════════════════════════════════════╝ */

/* v1.1 - Applicant Icon */
.applicant-icon {
  background: radial-gradient(
    circle at center,
    transparent 36%,
    rgba(52,152,219,0.26) 40%,
    rgba(52,152,219,0.16) 70%,
    rgba(0,0,0,0.65) 100%
  );
  box-shadow:
    0 0 48px rgba(52,152,219,0.5),
    inset 0 0 28px rgba(255,255,255,0.08);
}

.hero-icon.applicant-icon::after {
  display: none;
}

.applicant-icon svg {
  fill: #7fbfff;
  filter: drop-shadow(0 0 8px rgba(52,152,219,0.55));
}

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

@media (max-width: 768px) {
  .applicant-config-grid,
  .templates-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card.acceptance-rate {
    grid-column: span 1;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .history-meta {
    flex-direction: column;
    gap: 8px;
  }
}