/* Compiled CSS from SCSS - Main Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8fafc;
  background-image: url('../public/419.jpg');
  background-size: cover;      /* 🔑 растягивает изображение с сохранением пропорций, заполняя весь блок */
  background-position: center; /* 🔑 центрирует изображение */
  background-repeat: no-repeat; /* 🔑 отключает повторение */
  background-attachment: fixed;
  color: #1e293b;
  line-height: 1.6;
  font-size: 14px;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: #221831db;
  border-bottom: 1px solid #000;
  padding: 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

@media (max-width: 768px) {
  .app-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
}

.app-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

@media (max-width: 768px) {
  .app-title {
    font-size: 1.25rem;
  }
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .header-actions {
    width: 100%;
    justify-content: center;
  }
}

/* Метка задачи */
.task-label {
    display: inline-block;
    padding: 0.2em 0.6em;
    font-size: 0.85em;
    font-weight: 500;
    color: #fff;
    background: #6366f1; /* Индиго */
    border-radius: 12px;
    margin-left: 0.5em;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.task-label:empty {
    display: none;
}

.kanban-container {
  flex: 1;
  padding: 3rem 1rem;
  overflow-x: auto;
}

@media (max-width: 768px) {
  .kanban-container {
    padding: 1.5rem 0.5rem;
  }
}

.columns-wrapper {
  zoom: 90%;
  display: flex;
  gap: 1.5rem;
  min-width: fit-content;
  justify-content: center;
}

@media (max-width: 768px) {
  .columns-wrapper {
    flex-direction: column;
    gap: 1rem;
    min-width: auto;
    padding-bottom: 3rem;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .columns-wrapper {
    justify-content: flex-start;
  }
}

.kanban-column {
  background: #465779;
  border-radius: 12px;
  border: 1px solid #221831;
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: box-shadow 0.2s ease;
  animation: fadeIn 0.5s ease;
}

.kanban-column:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

@media (max-width: 768px) {
  .kanban-column {
    width: 100%;
  }
}

.column-header {
  padding: 1.5rem;
  border-bottom: 1px solid #221831;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #465779 0%, #221831 100%);
  border-radius: 12px 12px 0 0;
}

.column-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.column-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.task-count {
  background: #221831;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
}

.column-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.kanban-column:hover .column-actions {
  opacity: 1;
}

.column-content {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 200px;
  transition: background-color 0.2s ease;
}

.column-content.drag-over {
  background-color: #d3d7e7;
  border: 2px dashed #221831;
  border-radius: 8px;
}

.task-card {
  background: #99b3c6;
  border: 1px solid #221831;
  border-radius: 8px;
  padding: 1rem;
  cursor: grab;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  animation: slideInUp 0.3s ease;
}

.task-card:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transform: translateY(-1px);
}

.task-card.dragging {
  opacity: 0.5;
  transform: rotate(5deg);
  cursor: grabbing;
}

.task-card.priority-high {
  border-left: 4px solid #ef4444;
}

.task-card.priority-medium {
  border-left: 4px solid #f59e0b;
}

.task-card.priority-low {
  border-left: 4px solid #10b981;
}

@media (max-width: 768px) {
  .task-card:active {
    transform: scale(1.02);
  }
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.task-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  line-height: 1.4;
  flex: 1;
  margin-right: 0.5rem;
}

.task-actions {
  position: relative;
}

.task-description {
  font-size: 0.8rem;
  color: #546377;
  margin: 0 0 0.5rem 0;
  line-height: 1.5;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.task-priority {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-priority.priority-high {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.task-priority.priority-medium {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.task-priority.priority-low {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  gap: 0.25rem;
}

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

.btn.btn-primary {
  background: #404b62;
  color: white;
}

.btn.btn-primary:hover:not(:disabled) {
  background: #161515;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.btn.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid #e2e8f0;
}

.btn.btn-outline:hover:not(:disabled) {
  background: #161515;
  border-color: #221831;
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #94a3b8;
}

.btn-icon:hover {
  background: rgba(91, 71, 124, 0.1);
  color: #221832;
}

.btn-icon i {
  width: 16px;
  height: 16px;
}

.dropdown {
  position: relative;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #404b62;
  border: 1px solid #404b62;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  color: #ffffff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(59, 130, 246, 0.05);
  color: #3b82f6;
}

.dropdown-item.delete {
  color: #ef4444;
}

.dropdown-item.delete:hover {
  background: rgba(239, 68, 68, 0.05);
  color: #ef4444;
}

.dropdown-item i {
  width: 14px;
  height: 14px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #465779;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

@media (max-width: 768px) {
  .modal-content {
    max-width: 100%;
    margin: 1rem;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #221831;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 0.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.modal-close i {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    flex: 1;
  }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid #221831;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #ffffff;
  background: #465779;
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #99b3c6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

select {
  cursor: pointer;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media print {
  .header-actions,
  .column-actions,
  .task-actions,
  .modal {
    display: none !important;
  }

  .app {
    background: white;
  }

  .kanban-column {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #221831;
  }
}

@media (prefers-contrast: high) {
  .task-card {
    border-width: 2px;
  }

  .btn-outline {
    border-width: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
