/* ==================== GLOBAL RESET & CSS VARIABLES ==================== */
:root {
  /* Primary colors */
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-lighter: #60a5fa;

  /* Semantic colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-danger-light: #f87171;
  --color-info: #6366f1;

  /* Text colors */
  --color-text: #1f2937;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --color-text-light: #9ca3af;

  /* Background colors */
  --color-bg: #f3f4f6;
  --color-bg-card: #ffffff;
  --color-bg-card-alt: #f8fafc;
  --color-border: #e2e8f0;
  --color-border-light: #f3f4f6;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.25);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;

  /* Z-index layers */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-notification: 500;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==================== SCROLLBAR ==================== */
html { overflow: hidden; height: 100%; }
body { overflow: auto; height: 100%; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #6366f1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #60a5fa, #818cf8);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--color-bg);
  margin: 0;
  padding: 24px;
  color: var(--color-text);
  line-height: 1.5;
  font-size: 16px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* ==================== UTILITY CLASSES (replacing inline styles) ==================== */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.logout-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  box-shadow: none;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.graduates-header-section {
  text-align: center;
  margin-bottom: 30px;
}

.graduates-header-section h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
}

.graduates-header-section p {
  color: var(--color-text-muted);
  font-size: 16px;
}

.graduates-header-section .checklist-btn {
  margin-top: 15px;
}

.graduates-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

/* ==================== FOCUS & ACCESSIBILITY ==================== */
:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 2px;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Smooth scroll for modal bodies */
.modal-body,
.homework-modal-body,
.side-panel-body {
  scroll-behavior: smooth;
}

/* ==================== MODAL ANIMATIONS ==================== */
@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalOverlayOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.9) translateY(30px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalScaleOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.9) translateY(30px); }
}

@keyframes modalFadeScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes modalFadeScaleOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}

/* Открытие — оверлей */
.homework-modal,
.my-responses-modal,
.vacation-modal,
#lessonDescriptionModal {
  animation: modalOverlayIn 0.45s ease;
}

/* Открытие — контент (мягкий подъём) */
.homework-modal .homework-modal-content,
.my-responses-modal-content,
.vacation-modal-content {
  animation: modalScaleIn 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Описание работы — fade + scale */
#lessonDescriptionModal .modal-content {
  animation: modalFadeScaleIn 0.55s ease;
}

/* Закрытие — оверлей */
.homework-modal.modal-closing,
.my-responses-modal.modal-closing,
.vacation-modal.modal-closing,
#lessonDescriptionModal.modal-closing {
  animation: modalOverlayOut 0.35s ease forwards;
}

/* Закрытие — контент */
.modal-closing .homework-modal-content,
.modal-closing .my-responses-modal-content,
.modal-closing .vacation-modal-content {
  animation: modalScaleOut 0.35s ease forwards;
}

/* Описание работы — fade + scale закрытие */
#lessonDescriptionModal.modal-closing .modal-content {
  animation: modalFadeScaleOut 0.35s ease forwards;
}

/* ==================== HOMEWORK MODAL STYLES ==================== */
/* Homework Modal - Large modal for homework review */
.homework-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.homework-modal .homework-modal-content {
  width: 85vw !important;
  max-width: 1200px !important;
  max-height: 94vh !important;
  background: rgba(210, 220, 255, 0.35) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-radius: 12px !important;
  display: flex !important;
  flex-direction: row !important;
  overflow: hidden !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255,255,255,0.3) !important;
  padding: 0 !important;
  transition: max-width 0.3s ease;
}

/* При открытой боковой панели - расширяем модалку */
.homework-modal .homework-modal-content.with-side-panel {
  max-width: 1700px !important;
  width: 95vw !important;
}

/* Основная панель (слева) */
.homework-main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: 94vh;
}

/* Боковая панель с ответами (справа) - пропорция 50/50 */
.responses-side-panel {
  flex: 1;
  min-width: 500px;
  background: rgba(210, 220, 255, 0.2);
  border-left: 1px solid rgba(200, 210, 255, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.side-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  flex-shrink: 0;
}

.side-panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.side-panel-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.side-panel-title .modal-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  opacity: 0.8;
}

.side-panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.open-in-new-tab-btn {
  background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(59,130,246,0.25));
  border: 1px solid rgba(139,92,246,0.5);
  color: white;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.open-in-new-tab-btn:hover {
  background: linear-gradient(135deg, rgba(139,92,246,0.45), rgba(59,130,246,0.45));
  border-color: rgba(139,92,246,0.7);
  transform: scale(1.03);
  box-shadow: 0 0 16px rgba(139,92,246,0.3);
}

.open-in-new-tab-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.side-panel-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.side-panel-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.side-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 0;
}

/* Стили для списка ответов в боковой панели */
.responses-side-panel .my-responses-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.responses-side-panel .response-card {
  background: white;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.responses-side-panel .response-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.responses-side-panel .responses-filter-section {
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.responses-side-panel .filter-row {
  flex-direction: column;
  gap: 10px;
}

.responses-side-panel .curator-filter {
  width: 100%;
}

.responses-side-panel .curator-select {
  width: 100%;
}

/* Modal Header */
.homework-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 24px;
  background: linear-gradient(135deg, #7b8eeb 0%, #8a5db3 100%);
  color: white;
  flex-shrink: 0;
}

.homework-info h2 {
  margin: 0 0 12px 0;
  font-size: 22px;
  font-weight: 600;
}

.homework-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.homework-meta .student-badge,
.homework-meta .course-badge,
.homework-meta .status-badge {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 13px;
  backdrop-filter: blur(4px);
}

.homework-meta .status-badge {
  background: rgba(255, 193, 7, 0.3);
}

.modal-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Кнопка "Описание работы" — базовые стили */
#openConstructorBtn {
  display: none;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(139, 92, 246, 0.5);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.25));
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  align-items: center;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
  letter-spacing: 0.3px;
}

#openConstructorBtn svg {
  flex-shrink: 0;
}

/* Кнопка "Описание работы" — hover */
#openConstructorBtn:hover {
  background: linear-gradient(135deg, rgba(139,92,246,0.45), rgba(59,130,246,0.45)) !important;
  border-color: rgba(139,92,246,0.7) !important;
  transform: scale(1.03);
  box-shadow: 0 0 16px rgba(139,92,246,0.3);
}

/* Кнопка "Передать Ивану" (выпускники) */
.btn-send-graduate {
  display: none;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(34, 197, 94, 0.5);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(16, 185, 129, 0.25));
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  align-items: center;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
  letter-spacing: 0.3px;
}

.btn-send-graduate:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.45), rgba(16, 185, 129, 0.45));
  border-color: rgba(34, 197, 94, 0.7);
  transform: scale(1.03);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.3);
}

.btn-send-graduate.done {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  cursor: default;
  opacity: 0.7;
}

.btn-secondary {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

.homework-modal .modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.homework-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Chat History */
.homework-modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background: rgba(215, 225, 255, 0.12);
}

.chat-history {
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid #e5e7eb;
}

.chat-history.collapsed {
  display: none;
}

/* Последний ответ - всегда виден */
.last-answer-section {
  padding: 16px 32px;
  border-bottom: 1px solid #e5e7eb;
}

.last-answer-header {
  margin-bottom: 12px;
}

.last-answer-title {
  font-weight: 700;
  font-size: 14px;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Упрощённый стиль для последнего ответа - как на платформе */
.last-answer-content .chat-message + .chat-message {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.last-answer-content .chat-message {
  max-width: 100%;
  align-items: flex-start;
}

.last-answer-content .chat-bubble {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  max-width: 100%;
}

.last-answer-content .chat-content {
  font-size: 15px;
  line-height: 1.7;
}

/* Кнопка показать/скрыть историю - внизу как на платформе */
.toggle-history-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 64px);
  margin: 16px 32px;
  padding: 16px 20px;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.toggle-history-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

.toggle-icon {
  font-size: 12px;
}

/* Ряд кнопок истории */
.history-buttons-row {
  display: flex;
  gap: 12px;
  width: calc(100% - 64px);
  margin: 16px 32px;
}

.history-buttons-row .toggle-history-btn,
.history-buttons-row .toggle-my-responses-btn {
  width: auto;
  flex: 1;
  margin: 0;
}

/* Кнопка "Мои ответы на это задание" */
.toggle-my-responses-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.toggle-my-responses-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.toggle-my-responses-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6b21a8 100%);
  box-shadow: 0 2px 12px rgba(79, 70, 229, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.toggle-my-responses-btn .toggle-icon {
  font-size: 16px;
}

.responses-count {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* ==================== МОДАЛЬНОЕ ОКНО "МОИ ОТВЕТЫ" ==================== */
.my-responses-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}

.my-responses-modal-content {
  background: rgba(210, 220, 255, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255,255,255,0.3);
  overflow: hidden;
}

.my-responses-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.my-responses-modal-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-title-icon {
  font-size: 28px;
}

.my-responses-modal-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.my-responses-modal-title .modal-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.85;
}

.my-responses-modal-header .modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.my-responses-modal-header .modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Секция фильтров */
.responses-filter-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.responses-filter-section .filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
  flex-wrap: wrap;
}

.curator-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.curator-filter label {
  font-size: 14px;
  color: #6b7280;
  white-space: nowrap;
}

.curator-select {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  min-width: 200px;
  cursor: pointer;
}

.curator-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
}

.view-toggle-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.view-toggle-btn:hover {
  color: #1f2937;
}

.view-toggle-btn.active {
  background: white;
  color: #6366f1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Поиск по ответам */
.responses-search-row {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.responses-search-input {
  width: 100%;
  padding: 8px 12px;
  padding-right: 140px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  color: #1f2937;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.responses-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.responses-search-input::placeholder {
  color: #9ca3af;
}

.responses-search-controls {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  gap: 2px;
}

.responses-search-row.has-value .responses-search-controls {
  display: flex;
}

.responses-search-count {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  margin-right: 4px;
  min-width: 48px;
  text-align: right;
}

.responses-search-nav {
  width: 22px;
  height: 22px;
  border: none;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}

.responses-search-nav:hover {
  background: #d1d5db;
  color: #1f2937;
}

.responses-search-clear {
  width: 22px;
  height: 22px;
  border: none;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 2px;
  transition: background 0.15s, color 0.15s;
}

.responses-search-clear:hover {
  background: #d1d5db;
  color: #1f2937;
}

/* При активном поиске — убираем внутренние скроллы карточек */
.my-responses-list.search-active .my-response-content {
  max-height: none;
  overflow: visible;
}

/* Подсветка совпадений поиска */
mark.search-highlight {
  background: #fef08a;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

mark.search-highlight-current {
  background: #f97316;
  color: white;
  outline: 2px solid #f97316;
}

/* Бейдж "полезный" в карточке */
.useful-badge {
  font-size: 16px;
  margin-left: 4px;
}

/* Кнопки в карточке ответа */
.btn-add-to-useful,
.btn-remove-from-useful {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-to-useful {
  background: #fef3c7;
  color: #92400e;
}

.btn-add-to-useful:hover {
  background: #fde68a;
}

.btn-remove-from-useful {
  background: #fef3c7;
  color: #d97706;
}

.btn-remove-from-useful:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Индикатор загрузки */
.responses-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
  color: #6b7280;
}

.responses-loading .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.my-responses-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: rgba(215, 225, 255, 0.08);
}

/* Загрузка и пустое состояние */
.my-responses-modal .my-responses-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: #6b7280;
}

.my-responses-modal .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.my-responses-modal .my-responses-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: #9ca3af;
}

.my-responses-modal .empty-icon {
  font-size: 48px;
}

/* Карточка ответа */
.my-response-card {
  background: white;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.2s;
}

.my-response-card:last-child {
  margin-bottom: 0;
}

.my-response-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.my-response-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f1f5f9;
  cursor: pointer;
  flex-wrap: wrap;
  gap: 10px;
  transition: background 0.2s;
}

.my-response-card-header:hover {
  background: #e2e8f0;
}

.my-response-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.expand-icon {
  font-size: 12px;
  color: #64748b;
  transition: transform 0.2s;
  width: 16px;
}

.my-response-student-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.my-response-student-info .student-icon {
  font-size: 16px;
}

.my-response-student-info .student-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
}

.my-response-student-info .student-email {
  color: #64748b;
  font-size: 13px;
}

.my-response-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.curator-badge {
  font-size: 12px;
  color: #6366f1;
  background: #eef2ff;
  padding: 3px 8px;
  border-radius: 10px;
}

.my-response-card .my-response-date {
  color: #64748b;
  font-size: 13px;
}

.my-response-card .my-response-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.my-response-status.status-good {
  background: #d1fae5;
  color: #059669;
}

.my-response-status.status-revision {
  background: #fef3c7;
  color: #d97706;
}

.my-response-status.status-useful {
  background: #fef3c7;
  color: #d97706;
}

/* Превью (свёрнутое состояние) */
.my-response-preview {
  padding: 12px 18px;
  font-size: 14px;
  color: #475569;
  border-top: 1px solid #e2e8f0;
  background: #fafbfc;
  line-height: 1.5;
}

.my-response-card:not(.collapsed) .my-response-preview {
  display: none;
}

/* Тело карточки (развёрнутое состояние) */
.my-response-body {
  display: none;
  border-top: 1px solid #e2e8f0;
}

.my-response-card:not(.collapsed) .my-response-body {
  display: block;
}

/* Контент ответа - полный просмотр */
.my-response-content {
  padding: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  user-select: text;
  max-height: 500px;
  overflow-y: auto;
}

.my-response-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
}

/* Кнопки действий карточки */
.my-response-card-actions {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  background: #fafbfc;
  border-top: 1px solid #e2e8f0;
}

.my-response-card-actions .btn-insert-response {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.my-response-card-actions .btn-insert-response:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Кнопка скрыть */
.btn-hide-response {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-hide-response:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Кнопка восстановить */
.btn-unhide-response {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #d1fae5;
  color: #059669;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-unhide-response:hover {
  background: #a7f3d0;
}

/* Карточка в режиме скрытых */
.my-response-card.hidden-mode {
  opacity: 0.7;
  border: 1px dashed #94a3b8;
}

/* Секция переключения скрытых */
.toggle-hidden-section {
  padding: 16px;
  text-align: center;
}

.btn-toggle-hidden {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toggle-hidden:hover {
  background: #e2e8f0;
  color: #475569;
}

.btn-toggle-hidden.back-mode {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-toggle-hidden.back-mode:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ==================== КАРТОЧКИ ПОЛЕЗНЫХ ОТВЕТОВ ==================== */
.useful-response-card {
  background: white;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.2s;
}

.useful-response-card:last-child {
  margin-bottom: 0;
}

.useful-response-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.useful-response-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #f8fafc;
  cursor: pointer;
  transition: background 0.2s;
}

.useful-response-header:hover {
  background: #f1f5f9;
}

.useful-response-header .expand-icon {
  font-size: 12px;
  color: #64748b;
  transition: transform 0.2s;
  width: 16px;
  flex-shrink: 0;
}

.useful-response-preview {
  flex: 1;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.useful-response-body {
  display: none;
  border-top: 1px solid #e2e8f0;
}

.useful-response-card:not(.collapsed) .useful-response-body {
  display: block;
}

.useful-response-card.collapsed .useful-response-preview {
  display: block;
}

.useful-response-card:not(.collapsed) .useful-response-preview {
  display: none;
}

.useful-response-content {
  padding: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  user-select: text;
  max-height: 350px;
  overflow-y: auto;
}

.useful-response-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 8px 0;
}

.useful-response-actions {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  background: #fafbfc;
  border-top: 1px solid #e2e8f0;
}

.useful-response-actions .btn-insert-response {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.useful-response-actions .btn-insert-response:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.useful-response-actions .btn-remove-useful {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.useful-response-actions .btn-remove-useful:hover {
  background: #fee2e2;
  color: #dc2626;
}

.chat-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6b7280;
  font-size: 16px;
}

/* Chat Message */
.chat-message {
  display: flex;
  gap: 14px;
  max-width: 75%;
}

.chat-message.student {
  align-self: flex-start;
  margin-right: auto;
}

.chat-message.teacher {
  align-self: flex-end;
  flex-direction: row-reverse;
  margin-left: auto;
}

.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #374151;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-bubble {
  background: white;
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  max-width: 100%;
}

.chat-message.student .chat-bubble {
  border-top-left-radius: 4px;
  background: white;
}

.chat-message.teacher .chat-bubble {
  border-top-right-radius: 4px;
  background: #e0e7ff;
}

.chat-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}

.chat-author {
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}

.chat-time {
  font-size: 12px;
  color: #9ca3af;
}

.chat-content {
  font-size: 16px;
  line-height: 1.75;
  color: #374151;
  word-wrap: break-word;
}

.chat-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.chat-content img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Файлы в чате */
.chat-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.chat-file {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f5f7f9;
  border: 1px solid #e2e5e9;
  border-radius: 10px;
  text-decoration: none;
  color: #4b5563;
  font-size: 15px;
  transition: all 0.2s;
  max-width: fit-content;
}

.chat-file:hover {
  background: #eef0f3;
  border-color: #d5d8dc;
  transform: translateY(-1px);
}

.chat-file-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.chat-file-name {
  font-weight: 500;
}

/* Цвета файлов по типу */
.file-type-1c .chat-file-badge {
  background: #fee2e2;
  color: #dc2626;
}

.file-type-word .chat-file-badge {
  background: #dbeafe;
  color: #2563eb;
}

.file-type-excel .chat-file-badge {
  background: #dcfce7;
  color: #16a34a;
}

.file-type-pdf .chat-file-badge {
  background: #fee2e2;
  color: #dc2626;
}

.file-type-archive .chat-file-badge {
  background: #fef3c7;
  color: #d97706;
}

.file-type-image .chat-file-badge {
  background: #ede9fe;
  color: #7c3aed;
}

.file-type-data .chat-file-badge {
  background: #e5e7eb;
  color: #4b5563;
}

.file-type-default .chat-file-badge {
  background: #f3f4f6;
  color: #6b7280;
}

/* Image Lightbox */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  cursor: zoom-out;
  animation: lightboxFadeIn 0.2s ease;
  transition: opacity 0.2s ease;
}

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.image-lightbox img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  background: none;
  border: none;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

/* Yellow highlight in chat and editor */
.chat-content mark,
.chat-content .highlight,
.chat-content [style*="background-color: rgb(254, 240, 138)"],
.chat-content [style*="background-color:#fef08a"],
.editor-content mark,
.editor-content [style*="background-color: rgb(254, 240, 138)"],
.editor-content [style*="background-color:#fef08a"] {
  background: #fef08a !important;
  padding: 2px 4px;
  border-radius: 2px;
  color: #1f2937 !important;
}

.chat-content pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
}

.chat-content blockquote {
  border-left: 3px solid #6366f1;
  padding-left: 12px;
  margin: 8px 0;
  color: #6b7280;
  font-style: italic;
}

.chat-file-icon {
  font-size: 14px;
}

/* Status Badge in Chat */
.chat-status-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.chat-status-badge.closed_good {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.chat-status-badge.teacher_sent {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

/* Reply Form */
.homework-reply-form {
  background: transparent;
  padding: 20px 32px;
}

.reply-form-title {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

/* Editor Container */
.editor-container {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  gap: 2px;
  padding: 8px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.editor-toolbar button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.editor-toolbar button:hover {
  background: #e5e7eb;
  color: #1f2937;
}

.editor-toolbar button:active,
.editor-toolbar button.active {
  background: #6366f1;
  color: white;
}

.editor-toolbar button.highlight-btn {
  background: #fef08a;
  color: #1f2937;
}

.editor-toolbar button.highlight-btn:hover {
  background: #fde047;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background: #d1d5db;
  margin: 4px 6px;
  align-self: center;
}

/* ==================== TINYMCE EDITOR STYLES ==================== */
/* Контейнер TinyMCE */
.tox-tinymce {
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  margin-bottom: 12px;
}

/* Убираем внутренний скролл - редактор растёт неограниченно */
.tox-tinymce .tox-edit-area__iframe {
  overflow: visible !important;
}

.tox .tox-edit-area {
  overflow: visible !important;
}

/* Тулбар TinyMCE */
.tox .tox-toolbar-overlord,
.tox .tox-toolbar__primary,
.tox .tox-toolbar__overflow {
  background: #f9fafb !important;
  border-bottom: 1px solid #e5e7eb !important;
}

/* Кнопки тулбара */
.tox .tox-tbtn {
  color: #374151 !important;
}

.tox .tox-tbtn svg {
  fill: #374151 !important;
}

.tox .tox-tbtn:hover {
  background: #e5e7eb !important;
}

.tox .tox-tbtn--enabled,
.tox .tox-tbtn--enabled:hover {
  background: #ddd6fe !important;
}

/* Быстрый тулбар при выделении */
.tox .tox-pop {
  border-radius: 8px !important;
}

.tox .tox-pop__dialog {
  background: white !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Placeholder в редакторе */
.tox .tox-edit-area__iframe {
  background: transparent !important;
}

/* ==================== END TINYMCE STYLES ==================== */
/* Editor Content Area (legacy - keeping for compatibility) */
.editor-content {
  min-height: 120px;
  /* Без max-height - редактор растягивается под контент, скроллится модалка */
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.6;
  outline: none;
  color: #1f2937;
}

.editor-content:empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
}

.editor-content h1 { font-size: 24px; font-weight: 700; margin: 8px 0; }

.editor-content h2 { font-size: 20px; font-weight: 600; margin: 8px 0; }

.editor-content h3 { font-size: 16px; font-weight: 600; margin: 8px 0; }

.editor-content pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 6px;
  font-family: monospace;
  overflow-x: auto;
}

.editor-content blockquote {
  border-left: 3px solid #6366f1;
  padding-left: 12px;
  margin: 8px 0;
  color: #6b7280;
}

.editor-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}

.editor-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
}

.editor-content table td,
.editor-content table th {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
}

.editor-content table th {
  background: #f3f4f6;
  font-weight: 600;
}

/* Reply Controls */
.reply-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.reply-controls-left {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Кнопка прикрепления файла */
.btn-attach-file {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-attach-file:hover {
  border-color: #8b5cf6;
  color: #8b5cf6;
  background: #f5f3ff;
}

/* Секция прикреплённых файлов */
.attached-files-section {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.attached-files-header {
  margin-bottom: 8px;
}

.attached-files-title {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.attached-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attached-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
}

.attached-file-item .file-icon {
  font-size: 16px;
}

.attached-file-item .file-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attached-file-item .file-size {
  color: #9ca3af;
  font-size: 11px;
}

.attached-file-item .btn-remove-file {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-left: 4px;
  transition: all 0.2s;
}

.attached-file-item .btn-remove-file:hover {
  background: #fecaca;
}

.rating-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-control label {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
  white-space: nowrap;
}

/* Star Rating */
.star-rating {
  display: flex;
  gap: 2px;
  align-items: center;
}

.star-rating .rating-star {
  font-size: 20px;
  cursor: pointer;
  color: #d1d5db;
  transition: color 0.15s ease, transform 0.15s ease;
  line-height: 1;
  user-select: none;
  position: relative;
}

.star-rating .rating-star:hover {
  transform: scale(1.2);
}

.star-rating .rating-star.active {
  color: #f59e0b;
}

.star-rating-value {
  font-size: 13px;
  color: #4b5563;
  font-weight: 500;
  min-width: 32px;
  text-align: center;
}

/* Кастомный dropdown для статуса */
.status-dropdown {
  position: relative;
  min-width: 160px;
}

.status-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.status-dropdown-toggle:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.status-dropdown-toggle .dropdown-arrow {
  margin-left: auto;
  font-size: 10px;
  color: #9ca3af;
  transition: transform 0.2s;
}

.status-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.status-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 100;
  overflow: hidden;
}

.status-dropdown.open .status-dropdown-menu {
  display: block;
  animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.status-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
}

.status-dropdown-item:hover {
  background: #f3f4f6;
}

.status-dropdown-item.selected {
  background: #f0f9ff;
}

/* Иконки статусов */
.status-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.status-icon-good {
  background: #d1fae5;
  color: #059669;
}

.status-icon-revision {
  background: #fef3c7;
  color: #d97706;
}

.send-reply-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.send-reply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.send-reply-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Чекбокс "В полезные" */
.save-useful-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  user-select: none;
  font-size: 14px;
  position: relative;
}

.save-useful-checkbox:hover {
  background: rgba(99, 102, 241, 0.1);
}

.save-useful-checkbox input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.save-useful-checkbox .checkmark {
  font-size: 16px;
  opacity: 0.5;
  transition: all 0.2s;
}

.save-useful-checkbox input[type="checkbox"]:checked + .checkmark {
  opacity: 1;
  transform: scale(1.2);
}

.save-useful-checkbox .checkbox-label {
  color: #374151;
  font-weight: 500;
  transition: color 0.2s;
}

.save-useful-checkbox input[type="checkbox"]:checked ~ .checkbox-label {
  color: #111827;
  font-weight: 500;
}

/* Блоки кода в чате */
.chat-content pre,
.chat-bubble pre,
.last-answer-content pre {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 8px 0;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
}

.chat-content pre code,
.chat-bubble pre code,
.last-answer-content pre code {
  background: transparent;
  padding: 0;
  color: #e2e8f0;
}

.chat-content code,
.chat-bubble code,
.last-answer-content code {
  background: rgba(99, 102, 241, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
}

/* Override inline styles from pasted content (Obsidian, etc.) */
.chat-content * {
  background-color: transparent !important;
  background: transparent !important;
}

/* Preserve intentional highlights */
.chat-content mark,
.chat-content [style*="background-color: rgb(254, 240, 138)"],
.chat-content [style*="background:#fef08a"],
.chat-content [style*="background-color:#fef08a"] {
  background: #fef08a !important;
  background-color: #fef08a !important;
}

/* Preserve code blocks */
.chat-content pre,
.chat-content code {
  background: #1f2937 !important;
}

/* Override inline styles in editor from pasted content (Obsidian dark theme, etc.) */
.editor-content * {
  background-color: transparent !important;
  background: transparent !important;
  color: inherit !important;
}

/* Preserve intentional highlights in editor */
.editor-content mark,
.editor-content [style*="background-color: rgb(254, 240, 138)"],
.editor-content [style*="background:#fef08a"],
.editor-content [style*="background-color:#fef08a"] {
  background: #fef08a !important;
  background-color: #fef08a !important;
}

/* Preserve code blocks in editor */
.editor-content pre,
.editor-content code {
  background: #1f2937 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .homework-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .homework-modal-header {
    padding: 16px;
    flex-direction: column;
    gap: 12px;
  }

  .modal-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .chat-message {
    max-width: 95%;
  }

  .reply-controls {
    flex-direction: column;
    gap: 12px;
  }

  .reply-controls-left {
    width: 100%;
    justify-content: space-between;
  }

  .send-reply-btn {
    width: 100%;
  }

  .editor-toolbar {
    gap: 1px;
    padding: 6px;
  }

  .editor-toolbar button {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  /* Боковая панель на мобильных - на весь экран поверх основной */
  .homework-modal .homework-modal-content {
    flex-direction: column !important;
  }

  .homework-modal .homework-modal-content.with-side-panel {
    max-width: 100% !important;
  }

  .homework-main-panel {
    flex: none;
    height: 100%;
  }

  .responses-side-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    z-index: 10;
    border-left: none;
  }
}

/* ==================== END HOMEWORK MODAL STYLES ==================== */
/* Styles for tabs navigation */
.tabs-navigation {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  justify-content: center;
}

.tab-button {
  padding: 12px 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.tab-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateY(-2px);
}

.tab-button.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Tab content styles */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Statistics page title */
.statistics-detailed-title {
  text-align: center;
  margin-bottom: 20px;
  color: #1f2937;
  font-size: 20px;
  font-weight: 600;
}

/* Period selector label */
.period-selector-label {
  color: #1f2937;
  font-weight: 500;
}

/* Темный цвет для заголовка в светлой теме */
.month-selector-group label {
  color: #1f2937 !important;
}

.statistics-controls {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.month-selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  min-width: 250px;
  max-width: 300px;
}

.month-selector-group label {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  text-align: center;
}

.month-selector {
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 16px;
  background: white;
  color: #1f2937;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
}

.month-selector:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

/* Стили для кнопок статистики */
.statistics-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
}

.statistics-action-button {
  padding: 10px 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.statistics-action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.reset-button:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.today-button:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #3b82f6;
}

.statistics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 30px;
}

.summary-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.summary-card h3 {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.summary-card .value {
  font-size: 32px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 5px;
}

.summary-card .change {
  font-size: 14px;
  font-weight: 500;
}

.change.positive {
  color: #10b981;
}

.change.negative {
  color: #ef4444;
}

.change.neutral {
  color: #6b7280;
}

/* Statistics cards with same colors as main page */
.statistics-summary .summary-card:nth-child(2) .value {
  color: rgba(
    23,
    177,
    152,
    1
  ) !important; /* Принято - зеленый как на основной */
  -webkit-text-fill-color: rgba(23, 177, 152, 1) !important;
  text-shadow: 0 0 10px rgba(23, 177, 152, 0.5);
}

.statistics-summary .summary-card:nth-child(3) .value {
  color: rgba(
    245,
    158,
    11,
    1
  ) !important; /* На доработке - оранжевый как на основной */
  -webkit-text-fill-color: rgba(245, 158, 11, 1) !important;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Dynamic chart container */
.dynamic-chart-container {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-top: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Увеличенный шрифт для tooltip'ов графиков */
.chart-tooltip {
  font-size: 16px !important;
  font-weight: 500 !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.dynamic-chart-container h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #1f2937;
  font-size: 20px;
  font-weight: 600;
}

.dynamic-chart {
  height: 400px !important;
  width: 100% !important;
  position: relative;
  display: block;
}

/* Контейнер для canvas элемента */
.dynamic-chart-wrapper {
  position: relative;
  height: 400px;
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Responsive adjustments for statistics */
@media (max-width: 768px) {
  .statistics-controls {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .statistics-buttons {
    margin-top: 10px;
    justify-content: center;
  }

  .statistics-summary {
    grid-template-columns: 1fr;
  }

  .tabs-navigation {
    flex-direction: column;
    gap: 8px;
  }
}

/* Header */
.header {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  padding: 32px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.1);
  color: white;
}

.header h1 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 24px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex: 1;
  margin-left: auto;
  margin-right: auto;
}

/* ✅ СТИЛИ ДЛЯ КНОПКИ ВЫЙТИ */
.auth-button {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.auth-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
  cursor: pointer;
}

.auth-button:active {
  transform: translateY(0);
}

/* Filters */
.filters {
  padding: 12px 16px;
  border-radius: 14px;
  backdrop-filter: blur(12px);
}

.controls-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filters-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.filters-left .filter-select {
  flex: 1;
  min-width: 120px;
}

.filters-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Селекты фильтров */
.filter-select {
  padding: 9px 36px 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.95);
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 160px;
}

.filter-select:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.filter-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

#assignmentFilter {
  min-width: 200px;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Кнопка сброса фильтров */
.reset-filters-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.reset-filters-btn.visible {
  display: flex;
  animation: filterBtnAppear 0.3s ease;
}

@keyframes filterBtnAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.reset-filters-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Сегментированные кнопки для статуса */
.status-segment {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.segment-btn {
  padding: 7px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.segment-btn:hover {
  color: #334155;
  background: rgba(99, 102, 241, 0.1);
}

.segment-btn.active {
  background: #6366f1;
  color: white;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

/* Кастомный select с поиском */
.search-select {
  position: relative;
  min-width: 180px;
}

.search-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.search-select-trigger:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.search-select.open .search-select-trigger {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-select-value {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.search-select-value.placeholder {
  color: #9ca3af;
}

.search-select-arrow {
  color: #6366f1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.search-select.open .search-select-arrow {
  transform: rotate(180deg);
}

.search-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.search-select.open .search-select-dropdown {
  display: block;
  animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-select-input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  outline: none;
  background: #f8fafc;
}

.search-select-input::placeholder {
  color: #9ca3af;
}

.search-select-options {
  max-height: 240px;
  overflow-y: auto;
}

.search-select-option {
  padding: 10px 14px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-select-option:hover {
  background: #f1f5f9;
}

.search-select-option.selected {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  font-weight: 500;
}

.search-select-option-count {
  font-size: 12px;
  color: #9ca3af;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 10px;
}

.search-select-option.selected .search-select-option-count {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.search-select-empty {
  padding: 20px 14px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.stat-card:nth-child(1)::before {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.stat-card:nth-child(2)::before {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.stat-card:nth-child(3)::before {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.stat-card:nth-child(4)::before {
  background: linear-gradient(90deg, #3b82f6, #818cf8);
}

.stat-card:nth-child(5)::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.stat-card:nth-child(6)::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-title {
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.stat-value {
  font-size: 48px;
  font-weight: 600;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.stat-value.warning {
  color: #ef4444 !important;
  /* Красный цвет */
  -webkit-text-fill-color: #ef4444 !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  font-size: 48px;
  font-weight: 600;
}

.stat-value.success {
  color: rgba(23, 177, 152, 1) !important;
  -webkit-text-fill-color: rgba(23, 177, 152, 1) !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(23, 177, 152, 0.5);
}

/* Students Stats */
.students-stat {
  padding: 12px 0;
}

.numbers-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.active-students {
  font-size: 48px;
  font-weight: 700;
  color: #2563eb;
  line-height: 1;
}

.separator {
  font-size: 28px;
  color: #94a3b8;
  line-height: 1;
  font-weight: 300;
  margin: 0 4px;
  opacity: 0.8;
}

.total-students {
  font-size: 28px;
  color: #64748b;
  font-weight: 600;
  line-height: 1;
  opacity: 0.8;
}

.stat-labels {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
}

.stat-label.active {
  color: #1e40af;
  background: #dbeafe;
}

.stat-label .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.stat-label.active .dot {
  background-color: #2563eb;
}

.stat-label.total .dot {
  background-color: #64748b;
}

/* Charts */
.charts-container {
  margin-bottom: 32px;
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  margin-bottom: 20px;
}

.chart-card {
  margin: 0 15px 0 0;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  height: 400px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.chart-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* Wait time distribution bars */
.wait-distribution-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px;
  height: auto;
}

.wait-distribution-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 24px;
  text-align: center;
}

.wait-distribution {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wait-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wait-bar-label {
  width: 60px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-align: right;
  flex-shrink: 0;
}

.wait-bar-track {
  flex: 1;
  height: 28px;
  background: #f1f5f9;
  border-radius: 14px;
  overflow: hidden;
}

.wait-bar-fill {
  height: 100%;
  border-radius: 14px;
  transition: width 0.6s ease;
  min-width: 4px;
}

.wait-bar-value {
  width: 32px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  text-align: right;
  flex-shrink: 0;
}

.wait-bar-percent {
  width: 48px;
  font-size: 13px;
  color: #94a3b8;
  text-align: right;
  flex-shrink: 0;
}

#teachersChart {
  width: 100%;
  min-width: 0;
}

/* Table Styles */
.teacher-stats {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.section-title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: #1f2937;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  cursor: pointer;
  position: relative;
  border-bottom: 2px solid #e2e8f0;
}

th:hover {
  color: #334155;
}

th::after {
  content: "↕";
  position: absolute;
  right: 8px;
  opacity: 0.3;
}

th[data-direction="asc"]::after {
  content: "↑";
  opacity: 1;
}

th[data-direction="desc"]::after {
  content: "↓";
  opacity: 1;
}

/* Table Column Widths */
th:nth-child(1),
td:nth-child(1) {
  width: 25%;
  min-width: 200px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 20%;
  min-width: 180px;
}

th:nth-child(3),
td:nth-child(3) {
  width: 15%;
  min-width: 150px;
}

th:nth-child(4),
td:nth-child(4) {
  width: 12%;
  min-width: 120px;
}

th:nth-child(5),
td:nth-child(5) {
  width: 12%;
  min-width: 100px;
}

th:nth-child(6),
td:nth-child(6) {
  width: 16%;
  min-width: 140px;
}

/* Table Row Styles */
tbody tr {
  transition: all 0.3s ease;
  cursor: pointer;
  border-left: 4px solid transparent;
}

tbody tr:hover {
  transform: translateX(8px);
  background: linear-gradient(90deg, #f0f9ff 0%, #ffffff 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-left-color: #176cf5;
}

tr.hiding {
  opacity: 0;
  transform: translateX(100%);
}

/* Student Info */
.student-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.student-name {
  font-weight: 500;
  color: #1f2937;
  font-size: 16px;
}

.student-email {
  color: #6b7280;
  font-size: 14px;
}

/* Wait Time Styles */
.wait-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.wait-time.warning {
  background: #fee2e2;
  color: #991b1b;
}

.wait-time.normal {
  background: #dbeafe;
  color: #1e40af;
}

/* Удалены стили фиолетовой подсветки для td:has(.wait-time.warning) */
/* Revision Styles */
tr[data-revision="true"] {
  border-left: 4px solid #f59e0b;
}

tr[data-revision="true"]:hover {
  border-left-color: #d97706;
}

.revision-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 16px;
  margin-left: 8px;
}

.reviewer-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 6px;
}

.delegation-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border-radius: 4px;
  font-size: 12px;
  margin-top: 4px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Кнопка На месте / Отсутствую */
.vacation-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.vacation-button:hover {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.5);
}

/* Когда куратор отсутствует */
.vacation-button.on-vacation {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.vacation-button.on-vacation:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Кнопка полной синхронизации - светлая тема */
#fullSyncButton {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  backdrop-filter: blur(8px) !important;
  transition: all 0.3s ease !important;
}

#fullSyncButton:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: white !important;
  transform: translateY(-2px) !important;
}

/* Модальное окно отсутствия */
.vacation-modal-content {
  max-width: 450px;
  border-radius: 16px;
  overflow: hidden;
}

.vacation-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px 24px;
}

.vacation-modal-header h2 {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.vacation-modal-header .modal-close {
  color: white;
  opacity: 0.8;
}

.vacation-modal-header .modal-close:hover {
  opacity: 1;
}

.vacation-modal-body {
  padding: 24px;
}

.vacation-toggle-section {
  margin-bottom: 20px;
}

.vacation-toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.vacation-checkbox {
  display: none;
}

.vacation-toggle-slider {
  width: 48px;
  height: 26px;
  background: #e5e7eb;
  border-radius: 13px;
  position: relative;
  transition: background 0.3s ease;
}

.vacation-toggle-slider::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.vacation-checkbox:checked + .vacation-toggle-slider {
  background: #ef4444;
}

.vacation-checkbox:checked + .vacation-toggle-slider::after {
  transform: translateX(22px);
}

.vacation-toggle-text {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
}

.vacation-hint {
  margin: 8px 0 0 60px;
  font-size: 13px;
  color: #9ca3af;
}

.delegates-section {
  background: #f9fafb;
  border-radius: 12px;
  padding: 16px;
}

.delegates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.delegates-header label {
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.select-all-btn {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-all-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #374151;
}

.delegates-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.delegates-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.delegates-list label:hover {
  border-color: #d1d5db;
}

.delegates-list input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

.delegates-list input[type="checkbox"]:checked + span {
  color: #667eea;
  font-weight: 500;
}

.vacation-status {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.vacation-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.vacation-cancel-btn {
  padding: 10px 20px;
  border: 1px solid #d1d5db;
  background: white;
  color: #6b7280;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vacation-cancel-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.vacation-save-btn {
  padding: 10px 24px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vacation-save-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #1f2937;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #ef4444;
}

.modal-body {
  color: #374151;
}

/* Кнопка "Открыть на SkillSpace" в модалке описания */
.btn-open-skillspace {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #3b82f6;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-open-skillspace:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #2563eb;
}

/* Модалка описания урока */
#lessonDescriptionModal .modal-content {
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#lessonDescriptionModal .modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 100px);
  padding-right: 10px;
}

.lesson-description-content {
  line-height: 1.7;
  font-size: 15px;
}

.lesson-description-content h1,
.lesson-description-content h2,
.lesson-description-content h3,
.lesson-description-content h4 {
  color: #1f2937;
  margin-top: 20px;
  margin-bottom: 10px;
}

.lesson-description-content p {
  margin-bottom: 12px;
}

.lesson-description-content ul,
.lesson-description-content ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

.lesson-description-content li {
  margin-bottom: 6px;
}

.lesson-description-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 12px 0;
}

.lesson-description-content a {
  color: #60a5fa;
  text-decoration: none;
}

.lesson-description-content a:hover {
  text-decoration: underline;
}

.lesson-description-content code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.lesson-description-content pre {
  background: #f3f4f6;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
}

.lesson-file-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #60a5fa;
  text-decoration: none;
  transition: all 0.2s;
}

.lesson-file-link:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
}

.lesson-file-link .file-icon {
  font-size: 18px;
}

.lesson-file-link .file-name {
  flex: 1;
}

.lesson-file-link .file-size {
  color: #94a3b8;
  font-size: 13px;
}

#lessonFilesSection h4 {
  color: #94a3b8;
  font-weight: 500;
  font-size: 14px;
}

/* Стили для Editor.js контента */
.lesson-description-content .video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
}

.lesson-description-content .video-container iframe,
.lesson-description-content .video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.lesson-description-content video {
  max-width: 100%;
  border-radius: 8px;
  margin: 12px 0;
}

.lesson-description-content .video-notice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  padding: 12px 16px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 14px;
}

.lesson-description-content .video-notice svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.lesson-description-content .file-block {
  margin: 8px 0;
}

.lesson-description-content .file-block a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #60a5fa;
  text-decoration: none;
  transition: all 0.2s;
}

.lesson-description-content .file-block a:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
}

.lesson-description-content figure {
  margin: 16px 0;
  text-align: center;
}

.lesson-description-content figure img {
  max-width: 100%;
  border-radius: 8px;
}

.lesson-description-content figcaption {
  color: #94a3b8;
  font-size: 13px;
  margin-top: 8px;
}

.lesson-description-content blockquote {
  margin: 16px 0;
  padding: 12px 20px;
  border-left: 4px solid #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 0 8px 8px 0;
}

.lesson-description-content blockquote cite {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 13px;
  font-style: normal;
}

.lesson-description-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.lesson-description-content table td,
.lesson-description-content table th {
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  text-align: left;
}

.lesson-description-content table th {
  background: #f3f4f6;
}

.lesson-description-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 24px 0;
}

.lesson-description-content .alert {
  padding: 12px 16px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 8px;
  margin: 16px 0;
  color: #fcd34d;
}

.lesson-description-content .alert strong {
  display: block;
  margin-bottom: 4px;
}

.delegate-item {
  transition: background 0.2s;
}

.delegate-item:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.refresh-button {
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.refresh-button:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.refresh-button svg {
  flex-shrink: 0;
}

.refresh-button.loading svg {
  animation: spin 1s linear infinite;
}

.refresh-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  margin-right: 4px;
  position: relative;
}

.refresh-button.loading .refresh-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: white;
  animation: spin 1s linear infinite;
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  z-index: 1000;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background: #86efac;
  color: #166534;
}

.notification.error {
  background: #fecaca;
  color: #991b1b;
}

.notification.warning {
  background: #fef3c7;
  color: #92400e;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px;
  background: white;
  border-radius: 16px;
}

.empty-state h2 {
  font-size: 24px;
  color: #1f2937;
  margin-bottom: 8px;
}

.empty-state p {
  color: #6b7280;
}

/* Responsive */
@media (max-width: 1024px) {
  .chart-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
  }
}

/*-------------------------------------------*/
/* Современный тумблер переключения темы */
.theme-switch {
  cursor: pointer;
}

.theme-switch-inline {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.toggle-container {
  width: 70px;
  height: 36px;
  background: linear-gradient(135deg, #2c2c3e 0%, #1f2233 100%);
  border-radius: 24px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.toggle-circle {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #4a4e69;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.toggle-icons {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 10px;
  pointer-events: none;
}

.light-icon,
.dark-icon {
  font-size: 16px;
  transition: opacity 0.3s ease;
}

.light-icon {
  margin-right: auto;
  opacity: 0.8;
}

.dark-icon {
  margin-left: auto;
  opacity: 0.8;
}

/* Адаптивность и hover-эффекты */
.toggle-container:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
    background: rgba(220, 38, 38, 0.2);
  }

  50% {
    transform: scale(1.05);
    opacity: 0.8;
    background: rgba(239, 68, 68, 0.25);
  }

  100% {
    transform: scale(1);
    opacity: 1;
    background: rgba(220, 38, 38, 0.2);
  }
}

/* Моргание строки — подсветка старой работы, которую нужно проверить первой */
.highlight-blink {
  animation: rowBlink 0.5s ease-in-out 4;
}

@keyframes rowBlink {
  0%, 100% { background-color: inherit; }
  50% { background-color: rgba(251, 191, 36, 0.35); }
}

.stat-value {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-percentage {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  color: #6b7280;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-percentage.success {
  color: #10b981;
  /* Зеленый для успешных показателей */
}

.stat-percentage.warning {
  color: #f59e0b;
  /* Оранжевый для предупреждений */
}

.stat-icon {
  width: 16px;
  height: 16px;
}

/* Стили для значения "На доработке" и его процентов */
.stat-card:nth-child(6) .stat-value,
.stat-card:nth-child(6) .stat-percentage {
  color: rgba(245, 158, 11, 1) !important;
  -webkit-text-fill-color: rgba(245, 158, 11, 1) !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Общие стили для контейнера */
.detailed-stats-container {
  margin: 30px 0;
  text-align: center;
  padding: 20px;
  border-radius: 16px;
  transition: all 0.3s ease;
}

/* Общие стили для кнопки */
.toggle-details-button {
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 500;
}

/* Общие стили для таблицы */
.detailed-stats-table {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-20px);
}

.detailed-stats-table.show {
  max-height: 9000px;
  opacity: 1;
  transform: translateY(0);
}

.detailed-stats-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 16px;
}

.detailed-stats-table th,
.detailed-stats-table td {
  padding: 16px;
  text-align: center;
  font-size: 18px;
}


.detailed-stats-table td:not(:first-child) {
  font-size: 20px;
  font-weight: 500;
}

/* Светлая тема */
.detailed-stats-container {
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.toggle-details-button {
  background: #3b82f6;
  border: none;
  color: white;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.toggle-details-button:hover {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.detailed-stats-table th,
.detailed-stats-table td {
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
}

.detailed-stats-table th {
  background: #f8fafc;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: default;
}

.detailed-stats-table th:hover {
  color: inherit;
}

.detailed-stats-table th::after {
  display: none;
}

.check-count {
  font-weight: 600;
}

.diploma-count {
  display: block;
  color: #f59e0b;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

/* Установим оптимальную ширину для колонок */
.detailed-stats-table th:nth-child(1),
.detailed-stats-table td:nth-child(1) {
  width: 25%;
  text-align: left;
}

.detailed-stats-table th:nth-child(2),
.detailed-stats-table th:nth-child(3),
.detailed-stats-table th:nth-child(4),
.detailed-stats-table th:nth-child(5),
.detailed-stats-table th:nth-child(6),
.detailed-stats-table td:nth-child(2),
.detailed-stats-table td:nth-child(3),
.detailed-stats-table td:nth-child(4),
.detailed-stats-table td:nth-child(5),
.detailed-stats-table td:nth-child(6) {
  width: 15%;
  text-align: center;
}

/* Стили для кнопки предыдущего месяца */
.prev-month-button {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
}

.prev-month-button:hover {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.previous-month {
  margin-top: 0;
  margin-bottom: 32px;
}

/* Стили для значка месяца в кнопке */
.month-label {
  display: inline-block;
  background: #dbeafe;

  border: 1px solid #3b82f6;
  border-radius: 4px;
  padding: 4px 8px;
  margin-left: 10px;
  font-size: 14px;
  color: #1e40af;
  font-weight: 600;

  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.previous-month .month-label {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #8b5cf6;
}

/* ===================== CUSTOM PERIOD SELECTOR STYLES ===================== */
/* Основные стили для селектора пользовательского периода */
.custom-period-selector {
  margin-bottom: 20px;
  animation: slideDown 0.3s ease-out;
}

.custom-period-inputs {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
}

/* Стили для анализа работ */
.analysis-controls {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

/* Центрирование заголовков анализа */
.analysis-summary h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #1f2937;
  font-size: 24px;
  font-weight: 600;
}

.problematic-assignments-container h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #1f2937;
  font-size: 24px;
  font-weight: 600;
}

/* Стили для поиска по заданию */
.search-input {
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 16px;
  background: white;
  color: #1f2937;
  width: 100%;
  cursor: text;
  transition: all 0.2s;
}

.search-input:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Кнопки анализа */
.analysis-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Отключенное состояние кнопки */
.statistics-action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Анимация загрузки для кнопки обновления */
.refresh-icon.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

.refresh-icon.loading::before {
  content: "";
  display: none;
}

/* ===== СТИЛИ ДЛЯ ТАБЛИЦ АНАЛИЗА (ПЕРЕПИСАНО ПОЛНОСТЬЮ) ===== */
/* Контейнеры для таблиц анализа */
.speed-analysis-container,
.problematic-assignments-table {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

/* Основная таблица анализа */
.analysis-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.analysis-table th,
.analysis-table td {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  font-size: 18px;
}

.analysis-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #4b5563;
}

.analysis-table td {
  color: #1f2937;
}

/* ✅ ИСПРАВЛЕНО: Единый стиль чисел для таблицы скорости проверки (как в детальной статистике) */
/* Жирный шрифт и цвет для колонки проверок в таблице скорости (по номеру колонки) */
.speed-analysis-container .analysis-table td:nth-child(2) {
  font-size: 20px;
  font-weight: 500;
  color: #3b82f6 !important; /* Синий цвет для количества проверок */
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Monospace шрифт для времени ответа в таблице скорости (по номеру колонки) */
.speed-analysis-container .analysis-table td:nth-child(3) {
  font-size: 20px;
  font-family: "SF Mono", Monaco, Inconsolata, "Roboto Mono", Consolas,
    "Courier New", monospace;
  font-weight: 500;
  color: #6366f1 !important; /* Индиго цвет для времени */
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* ✅ НОВОЕ: Стили для колонки "На доработке" при фильтре по заданию (по классу) */
.speed-analysis-container .analysis-table .revision-count {
  font-size: 20px;
  font-weight: 500;
  color: rgba(
    245,
    158,
    11,
    1
  ) !important; /* Желтый цвет как в детальной статистике */
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* ✅ НОВОЕ: Стили для колонки "% на доработку" при фильтре по заданию (по классу) */
.speed-analysis-container .analysis-table .revision-percent {
  font-size: 20px;
  font-weight: 500;
  color: rgba(
    245,
    158,
    11,
    1
  ) !important; /* Желтый цвет как в детальной статистике */
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* ✅ НОВОЕ: Стили для количества проверок при фильтре по заданию (по классу) */
.speed-analysis-container .analysis-table .checks-count {
  font-size: 20px;
  font-weight: 500;
  color: #3b82f6 !important; /* Синий цвет для количества проверок */
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* ✅ ИСПРАВЛЕНО: Красивое оформление для таблицы "Проблемные задания" (как в детальной статистике) */
/* Стили для колонки "Всего работ" в таблице проблемных заданий (по номеру и классу) */
.problematic-assignments-table .analysis-table td:nth-child(3),
.problematic-assignments-table .analysis-table .total-count {
  font-size: 20px;
  font-weight: 500;
  color: #3b82f6 !important; /* Синий цвет как "всего проверок" */
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* ✅ ИСПРАВЛЕНО: Стили для колонки "Доработки" - индиго цвет (как "на доработке") */
.problematic-assignments-table .analysis-table td:nth-child(4),
.problematic-assignments-table .analysis-table .revision-count {
  font-size: 20px;
  font-weight: 500;
  color: #6366f1 !important; /* Индиго цвет как "на доработке" */
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Стили для колонки "% доработки" в таблице проблемных заданий - остается желтым */
.problematic-assignments-table .analysis-table td:nth-child(5),
.problematic-assignments-table .analysis-table .revision-percent {
  font-size: 20px;
  font-weight: 500;
  color: rgba(
    245,
    158,
    11,
    1
  ) !important; /* Желтый цвет как "% на доработку" */
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Первая колонка выравнена влево */
.analysis-table th:first-child,
.analysis-table td:first-child {
  text-align: left;
}

/* Ширины колонок для таблицы анализа скорости (4 колонки) */
.speed-analysis-container .analysis-table th:nth-child(1),
.speed-analysis-container .analysis-table td:nth-child(1) {
  width: 35%;
  min-width: 200px;
}

/* Остальные колонки автоматически распределятся */
.speed-analysis-container .analysis-table th:nth-child(2),
.speed-analysis-container .analysis-table td:nth-child(2),
.speed-analysis-container .analysis-table th:nth-child(3),
.speed-analysis-container .analysis-table td:nth-child(3),
.speed-analysis-container .analysis-table th:nth-child(4),
.speed-analysis-container .analysis-table td:nth-child(4) {
  width: auto;
}

/* ИСПРАВЛЕНИЕ: элементы в последней колонке на 100% ширины */
.speed-analysis-container .analysis-table td:nth-child(4) .speed-level {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  margin: 0 !important;
}

/* ИСПРАВЛЕНИЕ: элементы в последней колонке таблицы заданий тоже на 100% */
.problematic-assignments-table
  .analysis-table
  td:nth-child(6)
  .difficulty-level {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  margin: 0 !important;
}

/* Ширины колонок для таблицы проблемных заданий (6 колонок) */
.problematic-assignments-table .analysis-table th:nth-child(1),
.problematic-assignments-table .analysis-table td:nth-child(1) {
  width: 40%;
  min-width: 250px;
}

/* Остальные колонки автоматически распределятся */
.problematic-assignments-table .analysis-table th:nth-child(2),
.problematic-assignments-table .analysis-table td:nth-child(2),
.problematic-assignments-table .analysis-table th:nth-child(3),
.problematic-assignments-table .analysis-table td:nth-child(3),
.problematic-assignments-table .analysis-table th:nth-child(4),
.problematic-assignments-table .analysis-table td:nth-child(4),
.problematic-assignments-table .analysis-table th:nth-child(5),
.problematic-assignments-table .analysis-table td:nth-child(5),
.problematic-assignments-table .analysis-table th:nth-child(6),
.problematic-assignments-table .analysis-table td:nth-child(6) {
  width: auto;
}

/* Стили для уровней сложности */
.difficulty-level {
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  min-height: 40px;
  box-sizing: border-box;
}

.difficulty-level.very-hard {
  background: #fee2e2;
  color: #991b1b;
}

.difficulty-level.hard {
  background: #fed7aa;
  color: #9a3412;
}

.difficulty-level.medium {
  background: #fef3c7;
  color: #92400e;
}

.difficulty-level.easy {
  background: #d1fae5;
  color: #065f46;
}

.difficulty-level.very-easy {
  background: #dbeafe;
  color: #1e40af;
}

/* Стили для процентов доработки */
.revision-percent {
  font-weight: 600;
}

.revision-percent.very-high {
  color: #dc2626;
}

.revision-percent.high {
  color: #ea580c;
}

.revision-percent.medium {
  color: #d97706;
}

.revision-percent.low {
  color: #65a30d;
}

.revision-percent.very-low {
  color: #059669;
}

/* Стили для скорости проверки */
.speed-level {
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  min-height: 40px;
  box-sizing: border-box;
}

.speed-level.normal {
  background: #d1fae5;
  color: #065f46;
}

.speed-level.slow {
  background: #fef3c7;
  color: #92400e;
}

.speed-level.very-slow {
  background: #fee2e2;
  color: #991b1b;
}

/* Контейнеры для сообщений */
.no-data-message {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-size: 18px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-size: 18px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

/* Сворачиваемая таблица скорости проверки */
.speed-analysis-container {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.speed-analysis-collapsible {
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.speed-analysis-collapsible.collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-20px);
}

.speed-analysis-collapsible.expanded {
  max-height: 2000px;
  opacity: 1;
  transform: translateY(0);
}

/* Кнопка переключения таблицы скорости */
.toggle-speed-button {
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 500;
  background: #3b82f6;
  border: none;
  color: white;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.toggle-speed-button:hover {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.date-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  min-width: 150px;
}

.date-input-group label {
  font-weight: 500;
  color: #1f2937;
  font-size: 14px;
  text-align: center;
}

.date-input {
  padding: 12px 16px;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  font-size: 16px;
  background: white;
  color: #1f2937;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.date-input:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.date-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.apply-period-button {
  padding: 12px 24px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.apply-period-button:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.apply-period-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Анимация появления */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .custom-period-inputs {
    flex-direction: column;
    gap: 12px;
  }

  .date-input-group {
    width: 100%;
    min-width: auto;
  }

  .apply-period-button {
    width: 100%;
    margin-top: 8px;
  }
}

/* Стили для состояния загрузки кнопки */
.apply-period-button.loading {
  cursor: not-allowed;
  opacity: 0.7;
}

.apply-period-button.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

/* Стили для уведомления о выбранном периоде */
.custom-period-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: #1e40af;
  font-weight: 500;
}

/* ✅ Исправление ширины на вкладке статистики */
#statistics-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

#statistics-content .statistics-summary {
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

#statistics-content .dynamic-chart-container {
  max-width: 100%;
  margin: 0 auto 30px auto;
}

#statistics-content .detailed-stats-container {
  max-width: 100%;
  margin: 0 auto;
}

/* Чтобы ширина была как на основной странице */
.tab-content {
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== СТИЛИ ДЛЯ АНАЛИЗА РАБОТ ===== */
/* Контролы анализа */
.analysis-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 0;
}

.analysis-controls .filter-group {
  flex: 1;
  min-width: 200px;
}

.analysis-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

/* Контейнеры анализа */
.analysis-summary {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.speed-analysis-container {
  margin-top: 20px;
}

.problematic-assignments-container {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Таблицы анализа */
.analysis-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

.analysis-table th {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.analysis-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.analysis-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.analysis-table tr:last-child td {
  border-bottom: none;
}

/* Специальные стили для колонок */
.assignment-name {
  font-weight: 500;
  max-width: 300px;
  word-wrap: break-word;
}

.course-name {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 200px;
}

.total-count,
.revision-count,
.checks-count {
  text-align: center;
  font-weight: 600;
}

.revision-percent {
  text-align: center;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
}

/* Цвета для процентов доработки */
.revision-percent.very-high {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.revision-percent.high {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.revision-percent.medium {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.revision-percent.low {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.revision-percent.very-low {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Уровни сложности */
.difficulty-level {
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}

.difficulty-level.very-hard {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.difficulty-level.hard {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.difficulty-level.medium {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.difficulty-level.easy {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.difficulty-level.very-easy {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Уровни скорости */
.speed-level {
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}

.speed-level.very-fast {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.speed-level.fast {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.speed-level.normal {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.speed-level.slow {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.speed-level.very-slow {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.curator-name {
  font-weight: 500;
}

.avg-time {
  text-align: center;
  font-family: "Courier New", monospace;
  font-weight: 600;
}

/* Сообщения о состоянии */
.loading-message,
.no-data-message {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  font-style: italic;
}

.no-data-message {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  color: #fcd34d;
}

/* ===== АДАПТИВНЫЕ СТИЛИ ДЛЯ ТАБЛИЦ АНАЛИЗА ===== */
/* Планшеты */
@media (max-width: 1200px) {
  .speed-analysis-container,
  .problematic-assignments-table {
    padding: 20px;
    overflow-x: auto;
  }

  .analysis-table th,
  .analysis-table td {
    padding: 14px;
    font-size: 16px;
  }

  /* Стили для таблицы скорости */
  .speed-analysis-container .analysis-table td:nth-child(2) {
    font-size: 18px;
    font-weight: 500;
  }

  .speed-analysis-container .analysis-table td:nth-child(3) {
    font-size: 16px;
    font-family: "SF Mono", Monaco, Inconsolata, "Roboto Mono", Consolas,
      "Courier New", monospace;
    font-weight: 500;
  }

  /* ✅ ОБНОВЛЕНО: Стили для таблицы заданий на планшетах (включая новую колонку % доработки) */
  .problematic-assignments-table .analysis-table td:nth-child(3),
  .problematic-assignments-table .analysis-table td:nth-child(4),
  .problematic-assignments-table .analysis-table td:nth-child(5) {
    font-size: 18px;
    font-weight: 500;
  }
}

/* Мобильные */
@media (max-width: 768px) {
  .analysis-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .analysis-controls .filter-group {
    min-width: auto;
    margin-bottom: 12px;
  }

  .analysis-buttons {
    justify-content: center;
    margin-top: 12px;
  }

  .speed-analysis-container,
  .problematic-assignments-table {
    padding: 16px;
    overflow-x: auto;
  }

  .analysis-table {
    min-width: 600px;
  }

  .analysis-table th {
    padding: 12px 8px;
    font-size: 14px;
  }

  .analysis-table td {
    padding: 12px 8px;
    font-size: 14px;
  }

  /* Стили для таблицы скорости */
  .speed-analysis-container .analysis-table td:nth-child(2) {
    font-size: 16px;
    font-weight: 500;
  }

  .speed-analysis-container .analysis-table td:nth-child(3) {
    font-size: 14px;
    font-family: "SF Mono", Monaco, Inconsolata, "Roboto Mono", Consolas,
      "Courier New", monospace;
    font-weight: 500;
  }

  /* ✅ ОБНОВЛЕНО: Стили для таблицы заданий на мобильных (включая новую колонку % доработки) */
  .problematic-assignments-table .analysis-table td:nth-child(3),
  .problematic-assignments-table .analysis-table td:nth-child(4),
  .problematic-assignments-table .analysis-table td:nth-child(5) {
    font-size: 16px;
    font-weight: 500;
  }

  .analysis-table th:first-child,
  .analysis-table td:first-child {
    min-width: 180px;
  }
}

@media (max-width: 768px) {
  .analysis-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .analysis-controls .filter-group {
    min-width: auto;
  }

  .analysis-buttons {
    justify-content: center;
    margin-top: 12px;
  }

  .analysis-table {
    font-size: 12px;
  }

  .analysis-table th,
  .analysis-table td {
    padding: 10px 8px;
  }

  .assignment-name {
    max-width: 200px;
  }

  .course-name {
    max-width: 150px;
  }

  /* Дополнительные мобильные стили для таблиц анализа */
  .analysis-table th:nth-child(1),
  .analysis-table td:nth-child(1) {
    width: 28% !important;
    min-width: 120px !important;
    padding-left: 8px !important;
  }

  .analysis-table th:nth-child(2),
  .analysis-table th:nth-child(3),
  .analysis-table th:nth-child(4),
  .analysis-table th:nth-child(5),
  .analysis-table th:nth-child(6),
  .analysis-table td:nth-child(2),
  .analysis-table td:nth-child(3),
  .analysis-table td:nth-child(4),
  .analysis-table td:nth-child(5),
  .analysis-table td:nth-child(6) {
    width: 14.4% !important;
    min-width: 50px !important;
    padding: 8px 3px !important;
    font-size: 11px !important;
  }

  .analysis-table th {
    font-size: 10px !important;
    padding: 8px 3px !important;
  }

  .difficulty-level,
  .speed-level {
    font-size: 10px !important;
    padding: 4px 6px !important;
  }
}

/* �⨫� ��� activity-summary */
.activity-summary {
  margin-top: 15px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.stat-percentage-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8px;
}

/* Стиль для новой текстовой метки */
.stat-percentage-label {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Цвет для предупреждения (используется для % доработки) */
.stat-percentage.warning {
  color: #f59e0b;
}

/* ==================== БЛОКИРОВКА ДИПЛОМНЫХ РАБОТ ==================== */
/* Badge блокировки в колонке куратора - оранжевый/янтарный цвет */
.lock-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #b45309;
  white-space: nowrap;
}

.lock-badge.my-lock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.1) 100%);
  border-color: rgba(34, 197, 94, 0.3);
  color: #16a34a;
}

/* Ячейка с кнопками действий */
.action-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

/* Кнопка снятия блокировки */
.unlock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  cursor: pointer;
  transition: all 0.2s ease;
}

.unlock-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
}

.unlock-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Строка с заблокированной работой - оранжевая полоска */
tr[data-locked="1"] {
  position: relative;
  cursor: not-allowed;
}

tr[data-locked="1"]:hover {
  transform: none !important;
  border-left-color: transparent !important;
}

tr[data-locked="1"]:hover td:first-child::before {
  content: "🔒";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: rgba(15, 23, 42, 0.45);
  z-index: 2;
  pointer-events: none;
  border-radius: 4px;
}

tr[data-locked="1"] .unlock-btn {
  cursor: pointer;
  position: relative;
  z-index: 3;
}

tr[data-locked="1"]::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border-radius: 4px 0 0 4px;
}

/* Красивое уведомление о блокировке */
.lock-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  transform: translateX(120%);
  transition: transform 0.3s ease;
}

.lock-notification.show {
  transform: translateX(0);
}

.lock-notification-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border-left: 4px solid #f59e0b;
}

.lock-notification-icon {
  font-size: 32px;
}

.lock-notification-text {
  flex: 1;
}

.lock-notification-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2px;
}

.lock-notification-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.lock-notification-subtitle strong {
  color: #f59e0b;
}

.lock-notification-close {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(107, 114, 128, 0.1);
  border-radius: 6px;
  font-size: 18px;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lock-notification-close:hover {
  background: rgba(107, 114, 128, 0.2);
  color: #374151;
}

/* ========== Absent curators list (vacation modal) ========== */
.vacation-absent-list {
  padding: 10px 14px;
  margin-bottom: 16px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  font-size: 13px;
  color: #9ca3b8;
}

.vacation-absent-list .absent-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8b5cf6;
  margin-bottom: 6px;
  font-weight: 600;
  text-align: center;
}

.vacation-absent-list .absent-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 0;
}

.vacation-absent-list .absent-name {
  font-weight: 500;
  color: #cbd5e1;
}

/* ==================== INSIGHTS ANALYTICS STYLES ==================== */
/* Extracted from insights.js */

.insights-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.insights-header h2 {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  text-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@keyframes titleGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.1); }
}

.insights-header p,
.insights-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
  letter-spacing: 0.5px;
}

.insight-number-warning {
  color: #f87171 !important;
}

.insights-grid {
  margin-top: 30px;
}

.insight-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.insight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  border-radius: 20px 20px 0 0;
}

.insight-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.insight-card h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.insight-content {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  line-height: 1.6;
}

.insight-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.insight-item:last-child {
  border-bottom: none;
}

.insight-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 16px 8px;
  margin: 0 -8px;
}

.insight-number {
  font-weight: 700;
  font-size: 18px;
  color: #22d3ee;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
  transition: all 0.3s ease;
}

.insight-number.animate {
  animation: numberPulse 0.6s ease-out;
}

@keyframes numberPulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.insight-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.period-selector-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.period-label {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.period-selector {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
}

.weekly-activity-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  padding-top: 10px;
}

.weekly-day-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(20px);
  animation: cardFadeIn 0.5s ease-out forwards;
}

.weekly-day-card:hover {
  transform: translateY(-5px) scale(1.03);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.weekly-day-card.today {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.15);
}

.day-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.today .day-name {
  color: #22d3ee;
}

.activity-visualization {
  margin: 12px 0;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.activity-bar {
  width: 12px;
  background: var(--day-color, #3b82f6);
  border-radius: 6px;
  position: relative;
  transition: height 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 2px 10px var(--day-shadow, rgba(59, 130, 246, 0.3));
  animation: barGrow 1s ease-out forwards;
}

@keyframes barGrow {
  0% { height: 0; opacity: 0; }
  100% { opacity: 1; }
}

.activity-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--day-color, #e2e8f0);
}

.activity-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.weekly-day-card.high { --day-color: #10b981; --day-shadow: rgba(16, 185, 129, 0.3); }
.weekly-day-card.medium { --day-color: #f59e0b; --day-shadow: rgba(245, 158, 11, 0.3); }
.weekly-day-card.low { --day-color: #ef4444; --day-shadow: rgba(239, 68, 68, 0.3); }

@media (max-width: 768px) {
  .weekly-activity-grid {
    gap: 8px;
  }
  .weekly-day-card {
    padding: 12px 6px;
  }
  .activity-bar {
    width: 10px;
  }
  .activity-value {
    font-size: 16px;
  }
}

/* Procrastinator list */
#procrastinatorStudents .insight-item.procrastinator-item:nth-child(n + 16) {
  display: none;
}

#procrastinatorStudents.expanded .insight-item.procrastinator-item {
  display: flex !important;
}

.procrastinator-controls {
  margin-top: 20px;
  text-align: center;
}

.show-more-button {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.show-more-button:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.1);
}

.show-more-button.collapse-mode {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.show-more-button.collapse-mode:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.show-more-count {
  font-weight: 700;
  opacity: 0.9;
  font-size: 13px;
}

.pending-count {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
}

.work-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.no-data {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}

.error-message {
  color: #ef4444;
  text-align: center;
  padding: 20px;
  font-weight: 500;
}

/* Funnel */
.funnel-card {
  margin-bottom: 20px;
}

.funnel-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  text-align: center;
}

#funnelChart {
  display: none;
}

/* ==================== МОДАЛКА ОБНОВЛЕНИЯ КУРАТОРОВ ==================== */
.curators-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.curators-modal.hidden { display: none; }

.curators-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.curators-modal-content {
  position: relative;
  background: #141b2d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 1100px;
  max-height: 85vh;
  overflow-y: auto;
  animation: curatorsSlideIn 0.3s ease-out;
}
.curators-modal-content::-webkit-scrollbar { width: 6px; }
.curators-modal-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

@keyframes curatorsSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.curators-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}
.curators-modal-close:hover { color: white; }

.curators-modal-title {
  font-size: 22px;
  font-weight: 600;
  color: white;
  text-align: center;
  margin-bottom: 24px;
}

.curators-upload {
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 36px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 24px;
  color: rgba(255,255,255,0.5);
  font-size: 15px;
}
.curators-upload:hover, .curators-upload.drag {
  border-color: var(--color-primary);
  background: rgba(79,70,229,0.06);
}
.curators-upload input { display: none; }

.curators-file-name {
  color: #60a5fa;
  font-weight: 500;
  margin-top: 10px;
}

.curators-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.curators-stat {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 14px 20px;
  flex: 1;
  text-align: center;
}
.curators-stat-num { font-size: 28px; font-weight: 700; }
.curators-stat-label { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 2px; }
.curators-stat.changes .curators-stat-num { color: #facc15; }
.curators-stat.same .curators-stat-num { color: #4ade80; }
.curators-stat.notfound .curators-stat-num { color: #f87171; }

.curators-table-wrap {
  max-height: 360px;
  overflow-y: auto;
  border-radius: 10px;
  margin-bottom: 20px;
}
.curators-table-wrap::-webkit-scrollbar { width: 6px; }
.curators-table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.curators-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}
.curators-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: center;
  padding: 10px 12px;
  background: #1a2236;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(99,132,255,0.3);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.curators-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.85);
  text-align: center;
}
.curators-table tr.change td { background: rgba(250,204,21,0.04); }
.curators-table tr.not_found td { opacity: 0.35; }
.curators-table .col-email { width: 28%; }
.curators-table .col-name { width: 22%; }
.curators-table .col-current { width: 16%; }
.curators-table .col-arrow { width: 40px; text-align: center; padding: 10px 2px; }
.curators-table .col-curator { width: 16%; }
.curators-table .col-status { width: 75px; text-align: center; }
.curators-table .arrow { color: #facc15; font-weight: 600; }
.curators-table .badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.curators-table .badge.change { background: rgba(250,204,21,0.15); color: #facc15; }
.curators-table .badge.same { background: rgba(74,222,128,0.15); color: #4ade80; }
.curators-table .badge.not_found { background: rgba(248,113,113,0.15); color: #f87171; }

.curators-actions {
  text-align: center;
  margin-bottom: 8px;
}
.curators-apply-btn {
  padding: 12px 32px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: white;
}
.curators-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79,70,229,0.3);
}
.curators-apply-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.curators-result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
}
.curators-result.success {
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.2);
  color: #4ade80;
}
.curators-result.error {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.2);
  color: #f87171;
}

.curators-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

