.more {
  margin: 40px 0 40px calc(50% - 64px);
}

/* Тетрадные листы для задач */
.task-box {
  margin: 0;
  position: relative;
}

.task-item {
  position: relative;
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
      font-family: system-ui;
  font-size: 14px;
  border-radius: 10px;
  background: #fff;
  background-image: linear-gradient(#f5f5f0 1.1rem, #ccc 1.2rem);
  background-size: 100% 1.2rem;
  line-height: 1.2rem;
  padding: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: all 0.3s ease;
}

.task-item::before,
.task-item::after {
  position: absolute;
  content: "";
  bottom: 10px;
  width: 40%;
  height: 10px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.7);
  z-index: -1;
  transition: all 0.3s ease;
}

.task-item::before {
  left: 15px;
  transform: skew(-5deg) rotate(-5deg);
}

.task-item::after {
  right: 15px;
  transform: skew(5deg) rotate(5deg);
}

.task-item:hover::before,
.task-item:hover::after {
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.task-item .margin {
  position: absolute;
  border-left: 2px solid #d88;
  height: 100%;
  left: 0.4rem;
  top: 0;
}

/* Стили для содержимого задачи */
.task-item p.title,
.task-item .title {
  margin: 0;
  padding-bottom: 0.5rem;
  color: black;
  line-height: 20px;
  font-weight: bold;
  font-size: 16px;
  display: block;
  font-family: math;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.task-item.completed p.title,
.task-item.completed .title {
  text-decoration: line-through;
  color: #999;
}

.task-item .info,
.task-item div.info {
  margin: 0;
  padding-bottom: 0.5rem;
  color: black;
  line-height: 20px;
  font-size: 12px;
  display: block;
  font-family: math;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Стили для чекбоксов в описаниях задач */
.task-item .info .task-item-checkbox {
  margin-right: 6px;
  margin-left: 0;
  vertical-align: middle;
  cursor: pointer;

  width: 14px;
  
  height: 14px;
}

.task-item p.task-meta,
.task-item .task-meta {
  margin: 0;
  padding-bottom: 0.5rem;
  color: #666;
  line-height: 20px;
  font-family: math;
  font-size: 11px;
  margin-top: 0.5rem;
}

/* Шапка задачи с чекбоксом и кнопкой Delete */
.task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
}

/* Чекбокс в стиле тетради */
.task-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4A90E2;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.task-item.completed .task-checkbox {
  accent-color: #E24A4A;
}

/* Кнопки действий с задачами */
.task-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Кнопка удаления */
.delete-task {
  background: #E24A4A !important;
  color: white !important;
  border: 2px solid #C03939 !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.75em;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(226, 74, 74, 0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-task svg {
  width: 16px;
  height: 16px;
  display: block;
}

.delete-task:hover {
  background: #C03939 !important;
  box-shadow: 0 4px 8px rgba(226, 74, 74, 0.4);
  transform: translateY(-1px);
}

/* Кнопка напоминания */
.reminder-btn {
  background: #4A90E2 !important;
  color: white !important;
  border: 2px solid #357ABD !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.75em;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reminder-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.reminder-btn:hover {
  background: #357ABD !important;
  box-shadow: 0 4px 8px rgba(74, 144, 226, 0.4);
  transform: translateY(-1px);
}

/* Модалка напоминания */
.reminder-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.reminder-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.reminder-modal-content {
  background: #fff;
  border: 3px solid #000;
  border-radius: 10px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  position: relative;
}

.reminder-modal-header {
  background: #fdcf0b;
  padding: 15px 20px;
  border-bottom: 2px solid #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reminder-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: #000;
}

.reminder-modal-close {
  background: transparent;
  border: 2px solid #000;
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: #000;
  padding: 0;
  line-height: 1;
}

.reminder-modal-close:hover {
  background: #000;
  color: #fff;
}

.reminder-modal-body {
  padding: 20px;
}

.reminder-time-group {
  margin-bottom: 20px;
}

.reminder-time-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #000;
  font-size: 14px;
}

.reminder-time-group input[type="datetime-local"] {
  width: 100%;
  padding: 10px;
  border: 2px solid #000;
  border-radius: 4px;
  font-size: 14px;
  font-family: system-ui;
  box-sizing: border-box;
}

.reminder-quick-options {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.reminder-quick-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
  transition: all 0.2s ease;
  color: #000;
}

.reminder-quick-btn:hover {
  background: #fdcf0b;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.reminder-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 15px;
  border-top: 2px solid #f0f0f0;
}

.reminder-cancel-btn {
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #000 !important;
}

.reminder-cancel-btn:hover {
  background: #f0f0f0 !important;
}

.reminder-save-btn {
  background: #E24A4A !important;
  color: white !important;
  border: 2px solid #C03939 !important;
}

.reminder-save-btn:hover {
  background: #C03939 !important;
}

/* Telegram auth modal styles */
.telegram-auth-instructions {
  padding: 10px 0;
}

.telegram-auth-text {
  font-size: 16px;
  margin-bottom: 20px;
  color: #000;
  text-align: center;
  font-weight: 500;
}

.telegram-auth-steps {
  margin-bottom: 20px;
}

.telegram-step {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f9f9f9;
  border: 2px solid #000;
  border-radius: 8px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #fdcf0b;
  border: 2px solid #000;
  border-radius: 50%;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.telegram-step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #000;
  flex: 1;
}

.telegram-step code {
  background: #fff;
  padding: 4px 8px;
  border: 2px solid #000;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #000;
}

.telegram-auth-footer {
  text-align: center;
  padding-top: 15px;
  border-top: 2px solid #f0f0f0;
}

/* Контент задачи - занимает всю ширину */
.task-content {
  width: 100%;
}

/* Контейнер для статистики и формы */
/* Общий контейнер для всех трех блоков */
.main-blocks-container {
  border: 2px solid #000;
  border-radius: 0;
  padding: 20px;
  margin-bottom: 30px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
}

.stats-container {
  display: flex;
  gap: 20px;
  margin-bottom: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .stats-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .stats-chart {
    width: 100%;
  }
}

/* Левая колонка: График успеваемости */
.stats-chart {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 700px;
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
}

.stats-chart.minimized {
  display: none;
}

.stats-chart-toggle {
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #000 !important;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 0 10px 0 !important;
  position: relative;
  z-index: 1000;
  flex-shrink: 0;
  visibility: visible !important;
  opacity: 1 !important;
}

.stats-chart-toggle:hover {
  background: #f9b6ba !important;
}

.stats-box {
  background: #fff;
  border: none;
  border-radius: 0;
  padding: 15px;
  box-shadow: none;
  margin-bottom: 15px;
  flex-shrink: 0;
  overflow: visible;
  max-width: 100%;
}

/* Топ-5 пользователей */
.top-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
}

.top-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #f9f9f9;
  border-radius: 6px;
  transition: background 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
}

.top-user-item:hover {
  background: #f0f0f0;
}

.top-user-rank {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  min-width: 35px;
  text-align: center;
}

.top-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 0;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid #000;
}

.top-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.top-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.top-user-username {
  font-size: 13px;
  font-weight: 600;
  color: #000;
  font-family: system-ui;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-user-username:hover {
  color: #4A90E2;
  text-decoration: underline;
}

.top-user-count {
  font-size: 14px;
  color: #666;
  font-family: system-ui;
}

.top-users-loading,
.top-users-empty,
.top-users-error {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-family: system-ui;
}

/* Верхний блок (пока пустой) */
.top-placeholder-box {
  margin-top: 20px;
  flex-shrink: 0;
  min-height: 50px;
}

/* Календарь продуктивности */
.tamagotchi-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  margin-top: auto;
  flex-shrink: 0;
}

.productivity-calendar {
  background: #fff;

  border-radius: 10px;
  padding: 9px;
  max-width: 81%;
  width: 71%;
  
  position: relative;
  box-sizing: border-box;
}

.calendar-header {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #000;
}

.calendar-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: bold;
  color: #000;
  text-align: center;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-nav-btn {
  background: #fff;
  border: 2px solid #000;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #000;
  padding: 0;
}

.calendar-nav-btn:hover {
  background: #fdcf0b;
  transform: translateY(-1px);
}

.calendar-month-year {
  flex: 1;
  text-align: center;
  font-weight: bold;
  font-size: 13px;
  color: #000;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1.5px;
  margin-bottom: 5px;
}

.calendar-weekday {
  text-align: center;
  font-weight: bold;
  font-size: 9.5px;
  color: #666;
  padding: 2px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1.5px;
  margin-bottom: 10px;
}

.calendar-day {
  aspect-ratio: 1;
  border: 1px solid #000;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  position: relative;
  padding: 2px;
  min-height: 26px;
}

.calendar-day.empty {
  border-color: #e0e0e0;
  background: #f9f9f9;
  cursor: default;
}

.calendar-day.today {
  border-color: #fdcf0b;
  border-width: 2px;
  background: #fffef0;
}

.calendar-day-number {
  font-size: 10px;
  font-weight: bold;
  color: #000;
  margin-bottom: 1px;
  line-height: 1;
}

.calendar-day.empty .calendar-day-number {
  color: #ccc;
}

.calendar-day-indicator {
  width: 100%;
  height: 2px;
  border-radius: 1px;
  margin-top: 1px;
}

.calendar-day.legend-none .calendar-day-indicator {
  background: #e0e0e0;
}

.calendar-day.legend-low .calendar-day-indicator {
  background: #ffd700;
}

.calendar-day.legend-medium .calendar-day-indicator {
  background: #ff8c00;
}

.calendar-day.legend-high .calendar-day-indicator {
  background: #ff4500;
}

.calendar-day:hover:not(.empty) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background: #f9f9f9;
}

.calendar-legend {
  display: flex;
  justify-content: space-around;
  gap: 6px;
  padding-top: 10px;
  border-top: 2px solid #f0f0f0;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: #333;
}

.legend-color {
  width: 12px;
  height: 3px;
  border-radius: 1px;
  border: 1px solid #000;
}

.legend-none {
  background: #e0e0e0;
}

.legend-low {
  background: #ffd700;
}

.legend-medium {
  background: #ff8c00;
}

.legend-high {
  background: #ff4500;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .stats-chart {
    min-height: auto;
    height: auto;
    overflow: visible;
  }
  
  .tamagotchi-container {
    position: relative !important;
    padding: 10px 0;
    margin-top: 15px;
    width: 100%;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
  }
  
  .productivity-calendar {
    max-width: 100%;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .calendar-days {
    gap: 1px;
  }
  
  .calendar-day {
    min-height: 22px;
    padding: 1px;
    font-size: 8px;
  }
  
  .calendar-day-number {
    font-size: 8px;
  }
  
  .calendar-weekday {
    font-size: 8px;
    padding: 2px 0;
  }
  
  .calendar-title {
    font-size: 12px;
  }
  
  .calendar-month-year {
    font-size: 11px;
  }
  
  .top-users-list {
    max-height: 220px;
    gap: 6px;
  }
  
  .stats-box {
    padding: 12px;
  }
  
  .top-user-item {
    padding: 6px;
    gap: 8px;
  }
  
  .top-user-avatar {
    width: 32px;
    height: 32px;
  }
  
  .top-user-rank {
    font-size: 12px;
    min-width: 24px;
  }
  
  .top-user-username {
    font-size: 12px;
  }
  
  .top-user-count {
    font-size: 10px;
  }
  
  .stats-box h2 {
    font-size: 1em;
    margin-bottom: 10px;
  }
}

.audio-player {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0);
  padding: 24px;
}



.audio-player-shadow {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 10px;
  box-shadow: 
    0 0 6px rgba(0,0,0,0.03),
    0 2px 6px rgba(0,0,0,0.08),
    inset 3px 3px 0.5px -3px rgba(0,0,0,0.9),
    inset -3px -3px 0.5px -3px rgba(0,0,0,0.85),
    inset 1px 1px 1px -0.5px rgba(0,0,0,0.6),
    inset -1px -1px 1px -0.5px rgba(0,0,0,0.6),
    inset 0 0 6px 6px rgba(0,0,0,0.12),
    inset 0 0 2px 2px rgba(0,0,0,0.06),
    0 0 12px rgba(255,255,255,0.15);
  pointer-events: none;
  transition: all 0.3s ease;
}

.audio-player-glass {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(2px);
}

.audio-player-content {
  position: relative;
  z-index: 10;
}

.audio-player-header {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-bottom: 24px;
}

.audio-player-icon {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e4e4e7;
  margin-top: -6px;
}

.audio-player-icon svg {
  width: 32px;
  height: 32px;
  color: #71717a;
}

.audio-player-icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.audio-player-info {
  flex: 1;
}

.audio-player-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: #000;
  margin: 0 0 6px 0;
      font-family: system-ui;
}

.audio-player-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0;
      font-family: system-ui;
}

.audio-player-controls {
  color: #000;
}

.audio-progress-container {
  margin-bottom: 24px;
}

.audio-progress-track {
  position: relative;
  height: 6px;
  width: 100%;
  overflow: hidden;
  border-radius: 9999px;
  background: rgba(228, 228, 231, 0.5);
  margin-bottom: 8px;
}

.audio-progress-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(228, 228, 231, 0.2), rgba(228, 228, 231, 0.3), rgba(228, 228, 231, 0.2));
}

.audio-progress-bar {
  position: absolute;
  inset-y: 0;
  left: 0;
  display: flex;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  transition: all 0.2s ease-out;
  width: 40%;
}

.audio-progress-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.05));
}

.audio-time {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
      font-family: system-ui;
  color: #52525b;
}

.audio-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.audio-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  color: #52525b;
  padding: 0;
}

.audio-btn:hover {
  transform: scale(1.05);
  color: #09090b;
}

.audio-btn-shadow {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  box-shadow: 
    0 0 6px rgba(0,0,0,0.03),
    0 2px 6px rgba(0,0,0,0.08),
    inset 3px 3px 0.5px -3px rgba(0,0,0,0.9),
    inset -3px -3px 0.5px -3px rgba(0,0,0,0.85),
    inset 1px 1px 1px -0.5px rgba(0,0,0,0.6),
    inset -1px -1px 1px -0.5px rgba(0,0,0,0.6),
    inset 0 0 6px 6px rgba(0,0,0,0.12),
    inset 0 0 2px 2px rgba(0,0,0,0.06),
    0 0 12px rgba(255,255,255,0.15);
  transition: all 0.3s ease;
  pointer-events: none;
}

.audio-btn-glass {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(2px);
}

.audio-btn svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 10;
  position: relative;
}

.audio-player-hover {
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: 10px;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.audio-player:hover .audio-player-hover {
  opacity: 1;
}

.stats-box h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.1em;
  color: #333;
  font-family: system-ui;
}

#statsChart {
  max-height: 300px;
  margin-bottom: 20px;
}

.stats-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
      font-family: system-ui;
}

.stat-label {
  color: #666;
  font-size: 0.9em;
}

.stat-value {
  font-weight: bold;
  color: #333;
  font-size: 1.1em;
}

/* Правая колонка: AI и форма */
.ai-task-form {
  flex: 0 0 45%;
  min-width: 0;
  transition: all 0.3s ease;
}

.ai-task-form.minimized {
  display: none;
}

/* Форма создания задачи */
.task-form {
  background: #fff;
  border: 2px solid #000;
  border-radius: 0;
  margin-bottom: 0;
  padding-left: 30px;
  padding-right: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.task-form-content {
  padding: 25px 0;
}

.task-form-content h3 {
  margin-top: 0;
  color: #4A90E2;
  font-size: 1.3em;
  margin-bottom: 15px;
}

.task-form-content input,
.task-form-content textarea,
.task-form-content select {
  border: 2px solid #000 !important;
  border-radius: 0 !important;
  background-color: #fff;
      font-family: system-ui;
}

.task-form-content textarea {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
  font-size: 14px;
}

/* Contenteditable div для описания задачи */
#task-description {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
  font-size: 14px;
  min-height: 150px;
  max-height: 400px;
  overflow-y: auto;
}

#task-description:empty:before {
  content: attr(placeholder);
  color: #999;
  pointer-events: none;
}

#task-description:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

#task-description p {
  margin: 8px 0;
}

#task-description strong {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
}

.task-form-content input:focus,
.task-form-content textarea:focus,
.task-form-content select:focus {
  border-color: #000 !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Адаптивность */
@media (max-width: 1200px) {
  .stats-container {
    flex-direction: column;
  }
  
  .ai-task-form {
    flex: 1;
  }
}

@media (max-width: 900px) {
  .wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-box {
    padding: 15px;
  }
  
  #statsChart {
    max-height: 250px;
  }
}

@media (max-width: 600px) {
  .wrapper {
    grid-template-columns: 1fr;
  }
  
  .task-item {
    padding: 1.4rem 0.5rem 0.3rem 4.5rem !important;
    font-size: 14px;
  }
  
  .task-item .title {
    font-size: 16px;
  }
  
  .task-item .margin {
    left: 3.3rem;
  }
}