/* Wrapper */
.dnd-wrap {
  max-width: 1100px;
  margin: 40px auto;
  padding: 24px 24px 16px;
  background: #0b0b10;
  color: #f9fafb;
  border-radius: 16px;
  border: 1px solid #27272f;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header */
.dnd-header {
  margin-bottom: 16px;
}

.dnd-title {
  font-size: 1.8rem;
  margin: 0 0 6px;
}

.dnd-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #9ca3af;
}

/* Toolbar */
.dnd-toolbar {
  border-top: 1px solid #27272f;
  border-bottom: 1px solid #27272f;
  padding: 12px 0 10px;
  margin-bottom: 16px;
}

.dnd-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.dnd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dnd-field--grow {
  flex: 1;
}

.dnd-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
}

.dnd-label--small {
  font-size: 0.75rem;
  color: #9ca3af;
}

.dnd-select,
.dnd-input {
  background: #111827;
  border-radius: 8px;
  border: 1px solid #374151;
  color: #f9fafb;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.dnd-input::placeholder {
  color: #6b7280;
}

.dnd-search-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Buttons */
.dnd-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.dnd-btn--primary {
  background: #ef4444;
  color: #f9fafb;
  border-color: #b91c1c;
}

.dnd-btn--primary:hover {
  background: #f97373;
}

.dnd-btn--ghost {
  background: transparent;
  color: #e5e7eb;
  border-color: #374151;
}

.dnd-btn--ghost:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Filters */
.dnd-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  flex: 1;
}

.dnd-filter {
  min-width: 150px;
}

.dnd-layout-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dnd-radio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

/* Results */
.dnd-results {
  min-height: 120px;
}

.dnd-helper {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* Cards layout */
.dnd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dnd-card {
  background: #111827;
  border-radius: 12px;
  border: 1px solid #1f2937;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dnd-card__title {
  font-weight: 600;
  font-size: 0.98rem;
}

.dnd-card__meta {
  font-size: 0.8rem;
  color: #9ca3af;
}

.dnd-card__summary {
  font-size: 0.85rem;
  color: #e5e7eb;
}

.dnd-card__actions {
  margin-top: auto;
  text-align: right;
}

.dnd-card__btn {
  font-size: 0.8rem;
  padding: 4px 10px;
}

/* List layout */
.dnd-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dnd-list-item {
  background: #111827;
  border-radius: 8px;
  border: 1px solid #1f2937;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.dnd-list-item__meta {
  color: #9ca3af;
  font-size: 0.8rem;
}

/* Table layout */
.dnd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dnd-table th,
.dnd-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #1f2937;
}

.dnd-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
}

/* Pagination */
.dnd-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.dnd-page-info {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Loading skeleton */
.dnd-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dnd-skeleton-card {
  border-radius: 12px;
  background: #111827;
  border: 1px solid #1f2937;
  padding: 10px;
  position: relative;
  overflow: hidden;
}

.dnd-skeleton-line {
  height: 10px;
  border-radius: 999px;
  background: #111827;
  margin-bottom: 6px;
}

.dnd-skeleton-line--wide {
  width: 90%;
}

.dnd-skeleton-line--medium {
  width: 60%;
}

.dnd-skeleton-line--short {
  width: 40%;
}

/* shimmer */
.dnd-skeleton-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(249, 250, 251, 0.08), transparent);
  transform: translateX(-100%);
  animation: dnd-shimmer 1.2s infinite;
}

@keyframes dnd-shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Modal */
.dnd-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.dnd-modal--hidden {
  display: none;
}

.dnd-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.dnd-modal__dialog {
  position: relative;
  max-width: 700px;
  max-height: 80vh;
  width: 100%;
  background: #020617;
  border-radius: 16px;
  border: 1px solid #1f2937;
  padding: 18px 18px 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.dnd-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 1.4rem;
  cursor: pointer;
}

.dnd-modal__content {
  margin-top: 10px;
  max-height: calc(80vh - 40px);
  overflow-y: auto;
  padding-right: 4px;
}

.dnd-modal__title {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.dnd-modal__meta {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 10px;
}

.dnd-modal__section-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 10px;
  margin-bottom: 4px;
  color: #9ca3af;
}

.dnd-modal__body p {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.dnd-link {
  border: none;
  background: none;
  padding: 0;
  margin: 0 4px 2px 0;
  font-size: 0.85rem;
  color: #60a5fa;
  cursor: pointer;
  text-decoration: underline;
}

.dnd-link:hover {
  color: #93c5fd;
}


/* Responsive */
@media (max-width: 900px) {
  .dnd-grid,
  .dnd-skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dnd-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dnd-grid,
  .dnd-skeleton-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dnd-list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .dnd-wrap {
    padding: 16px 14px 10px;
  }
}
