.ui-autocomplete {
  position: absolute;
  z-index: 1051;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dee2e6;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}
.ui-menu-item-wrapper {
  padding: 8px 10px;
}
.ui-menu-item-wrapper:hover {
  background-color: #f8f9fa;
  cursor: pointer;
}

/* DataTables styles */
table.dataTable.table-striped tbody tr:nth-of-type(odd) {
  background-color: #f8f9fa;
}
table.dataTable.table-striped tbody tr:nth-of-type(even) {
  background-color: #ffffff;
}
table.dataTable tbody tr:hover {
  background-color: #dbeafe !important;
}
table.dataTable thead {
  background-color: #343a40;
  color: white;
}

/* Checkboxes */
.form-check-input.serial-checkbox {
  transform: scale(1.3);
  margin-top: 0.25rem;
  background-color: #fff;
  border: 1px solid #6c757d;
}
.form-check-input.serial-checkbox:checked {
  background-color: #198754;
  border-color: #198754;
}

/* Search input */
.dataTables_wrapper .dataTables_filter input {
  border-radius: 0.25rem;
  border: 1px solid #ced4da;
}

/* Body */
body {
  padding-top: 50px;
  background-color: #f3f4f6;
  color: #212529;
  font-family: 'Segoe UI', Roboto, sans-serif;
}

/* Glass container */
.glass-container {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 1.5rem 2.5rem rgba(0, 0, 0, 0.08);
}

/* Cards */
.card {
  background-color: #ffffff;
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
  border-radius: 0.75rem;
}

/* Navbar */
.navbar-dark.bg-dark {
  background-color: #1d1d1d !important;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.2);
}

/* Dropdown menu */
.dropdown-menu {
  background-color: #2c2c2c;
  border: none;
}
.dropdown-item {
  color: #f8f9fa;
}
.dropdown-item:hover {
  background-color: #3a3a3a;
}

/* Form controls */
.form-control,
.dataTables_wrapper input[type="search"] {
  background-color: #ffffff;
  border-radius: 0.4rem;
  border: 1px solid #ced4da;
}

/* Task styles */
.task-item {
  margin-bottom: 0.25rem;
}

.task-card {
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.task-card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.task-header {
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.task-main-info {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.task-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.task-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.3;
  word-wrap: break-word;
  flex: 1;
  min-width: 200px;
}

.task-badges {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.priority-badge,
.status-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.subtasks-count {
  font-size: 0.8rem;
  color: #6c757d;
  background-color: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
  white-space: nowrap;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: flex-start;
  flex-shrink: 0;
}

.task-actions .btn {
  padding: 0.25rem 0.375rem;
  font-size: 0.8rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  min-width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.task-actions .btn i {
  font-size: 0.875rem;
}

.task-body {
  padding: 1rem;
  border-top: 1px solid #dee2e6;
  background-color: #f8f9fa;
}

.task-description {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: white;
  border-radius: 0.5rem;
  border-left: 4px solid #007bff;
}

.task-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-item {
  padding: 0.5rem 0.75rem;
  background-color: white;
  border-radius: 0.375rem;
  border: 1px solid #e9ecef;
}

/* Responsive design for tasks */
@media (max-width: 768px) {
  .task-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .task-content {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .task-title {
    min-width: auto;
    text-align: center;
  }
  
  .task-badges {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .task-actions {
    justify-content: center;
  }
}

/* Subtasks styles */
.subtasks-section {
  margin-top: 0.75rem;
}

.subtasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background-color: white;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
}

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

.progress-container {
  flex: 1;
  margin-left: 1rem;
}

.progress-text {
  margin-top: 0.25rem;
  color: #6c757d;
  font-size: 0.8rem;
}

.subtasks-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.subtask-item {
  background-color: white;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  overflow: hidden;
}

.subtask-header {
  padding: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.subtask-main-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.subtask-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  flex-wrap: wrap;
}

.subtask-title {
  font-weight: 500;
  color: #495057;
}

.subtask-status-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.3rem;
}

.subtask-actions {
  display: flex;
  gap: 0.125rem;
}

.subtask-actions .btn {
  padding: 0.2rem 0.3rem;
  font-size: 0.75rem;
  min-width: 1.5rem;
  height: 1.5rem;
}

/* Стили для бейджей с визуальными эффектами */
.priority-badge,
.status-badge {
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.priority-badge:hover,
.status-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Стили для бейджей в меню задач */
.nav-tabs .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

.nav-tabs .nav-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .nav-tabs .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .nav-tabs .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Стили для выпадающих списков в бейджах */
.status-badge .form-select,
.priority-badge .form-select {
  border: none;
  background-color: transparent;
  box-shadow: none;
  font-weight: 500;
}

.status-badge .form-select:focus,
.priority-badge .form-select:focus {
  border: none;
  box-shadow: none;
  background-color: rgba(255, 255, 255, 0.9);
}

.status-badge .form-select option,
.priority-badge .form-select option {
  background-color: white;
  color: #333;
}
