.project-manager-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(4px);
}

.project-manager {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1400px;
  height: 90vh;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.project-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.project-manager-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #212529;
}

.project-manager-content {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 0;
  flex: 1;
  overflow: hidden;
}

.projects-list {
  border-right: 1px solid #dee2e6;
  overflow-y: auto;
  background: #f8f9fa;
}

.projects-list.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.projects-list.empty p {
  margin: 0.5rem 0;
  color: #6c757d;
}

.list-group {
  display: flex;
  flex-direction: column;
}

.list-group-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
}

.list-group-item:hover {
  background: #e9ecef;
}

.list-group-item.active {
  background: #0d6efd;
  color: white;
  border-left: 4px solid #0a58ca;
}

.list-group-item.active .text-muted {
  color: rgba(255, 255, 255, 0.8) !important;
}

.project-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.project-info {
  flex: 1;
  min-width: 0;
}

.project-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-info p {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: #6c757d;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.project-info small {
  font-size: 0.75rem;
  color: #adb5bd;
}

.project-actions {
  display: flex;
  gap: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.list-group-item:hover .project-actions {
  opacity: 1;
}

.project-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.project-details.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
}

.empty-state i {
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.empty-state h3 {
  margin: 1rem 0 0.5rem 0;
  color: #212529;
  font-weight: 600;
}

.empty-state p {
  margin: 0;
  color: #6c757d;
}

.project-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
}

.project-details-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #212529;
}

.datasets-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;
}

.datasets-list.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.datasets-list.empty p {
  margin: 0.5rem 0;
  color: #6c757d;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.table thead {
  background: #f1f3f5;
}

.table thead th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #dee2e6;
}

.table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background 0.2s;
}

.table tbody tr:hover {
  background: #f8f9fa;
}

.table tbody tr:last-child {
  border-bottom: none;
}

.table tbody td {
  padding: 1rem;
  color: #212529;
  font-size: 0.875rem;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.2s ease;
}

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

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

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

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-modal:hover {
  background: #e9ecef;
  color: #212529;
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
}

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

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #212529;
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: #ffffff;
  color: #212529;
  font-size: 0.875rem;
  transition: all 0.2s;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.form-control::placeholder {
  color: #6c757d;
}

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

.form-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #6c757d;
  line-height: 1.4;
}

.form-text.text-muted {
  color: #6c757d;
}

.upload-progress {
  margin: 1.5rem 0;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d6efd, #0a58ca);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0;
}

.progress-text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #212529;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dee2e6;
}

.btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: #0d6efd;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0b5ed7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-secondary {
  background: #f8f9fa;
  color: #212529;
  border: 1px solid #ced4da;
}

.btn-secondary:hover:not(:disabled) {
  background: #e9ecef;
  border-color: #0d6efd;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-info {
  background: #3b82f6;
  color: white;
}

.btn-info:hover:not(:disabled) {
  background: #2563eb;
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  min-width: 36px;
}

.btn i {
  font-size: 1em;
}

.table tbody td button {
  margin-right: 0.5rem;
}

.table tbody td button:last-child {
  margin-right: 0;
}

.text-muted {
  color: #6c757d !important;
}

.text-secondary {
  color: #6c757d !important;
}

@media (max-width: 1024px) {
  .project-manager-content {
    grid-template-columns: 300px 1fr;
  }
}

@media (max-width: 768px) {
  .project-manager-content {
    grid-template-columns: 1fr;
  }

  .projects-list {
    border-right: none;
    border-bottom: 1px solid #dee2e6;
    max-height: 40vh;
  }

  .project-manager-header {
    padding: 1rem 1.5rem;
  }

  .project-details-header {
    padding: 1rem 1.5rem;
  }

  .datasets-list {
    padding: 1rem 1.5rem;
  }

  .table {
    font-size: 0.8125rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.75rem 0.5rem;
  }

  .modal-content {
    max-width: 100%;
    margin: 1rem;
  }
}
