.nextlist-list-units {
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.nextlist-list-units .page-header {
  border: 1px solid var(--border-light-mode);
  margin: -20px -20px 0.5rem -20px;
  background-color: var(--card-light-header);
  padding: 40px 20px;
  text-align: center;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  position: relative;
  margin-bottom: 0.5rem !important;
}

.nextlist-list-units .header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

html.dark-theme .nextlist-list-units .header-content {
  background-color: var(--background-main-dark-mode-menu-lateral);
}

.nextlist-list-units .header-left {
  display: flex;
  align-items: center;
  position: absolute;
  left: 0;
}

.nextlist-list-units .btn-voltar {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0;
}

.nextlist-list-units .btn-voltar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 0.85rem;
  transition:
    background-color 0.2s,
    color 0.2s;
  flex-shrink: 0;
}

.nextlist-list-units .btn-voltar:hover .btn-voltar-circle {
  background-color: var(--primary-color);
  color: var(--text-thowine-light);
}

.nextlist-list-units .btn-voltar-label {
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 500;
}

.nextlist-list-units .page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.nextlist-list-units .list-units-main-container {
  background-color: var(--backgroud-container-child);
  border: 1px solid var(--border-light-mode);
  border-radius: 0 0 12px 12px;
  margin: 0 -20px;
  margin-bottom: 1.5rem;
}

.nextlist-list-units .tabs-navigation {
  display: flex;
  justify-content: center;
  gap: 0;
  border-bottom: 2px solid var(--border-light-mode);
  background: var(--background-color-main-light);
}

.nextlist-list-units .tab-button {
  background: none;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-thowine-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition:
    color 0.2s,
    border-color 0.2s;
  white-space: nowrap;
}

.nextlist-list-units .tab-button:hover {
  color: var(--primary-color);
}

.nextlist-list-units .tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

.nextlist-list-units .tab-content {
  display: none;
}

.nextlist-list-units .tab-content.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  animation: lu-fadeIn 0.25s ease-out;
}

@keyframes lu-fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nextlist-list-units .list-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

html.dark-theme .nextlist-list-units .list-container {
  background-color: var(--background-dark-mode-menu-lateral);
}

.nextlist-list-units .list-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-thowine-light);
  font-size: 0.95rem;
}

.nextlist-list-units .list-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-thowine-light);
  font-size: 0.95rem;
}

.nextlist-list-units .list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid var(--border-light-mode);
  border-radius: 10px;
  background-color: var(--background-main);
  transition: box-shadow 0.4s ease;
  position: relative;
  gap: 1rem;
}

.nextlist-list-units .list-card.focused {
  background-color: var(--focus-light-mode);
  border: 2px solid var(--primary-color);
}

.nextlist-list-units .card-fields {
  display: flex;
  align-items: center;
  flex: 1;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 1rem;
}

.nextlist-list-units .card-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nextlist-list-units .card-field-label {
  font-size: 0.7rem;
  color: var(--text-thowine-light);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.nextlist-list-units .card-field-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nextlist-list-units .btn-menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-thowine-light);
  font-size: 1.1rem;
  transition:
    background-color 0.15s,
    color 0.15s;
  flex-shrink: 0;
  border: none;
}

.nextlist-list-units .list-card:hover {
  outline: none;
}

.nextlist-list-units .btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition:
    opacity 0.2s,
    transform 0.15s;
}

.nextlist-list-units .btn-secondary {
  background-color: var(--background-color-main-light);
  color: var(--text-primary);
  border: 1px solid var(--border-light-mode);
}

.nextlist-list-units .btn-secondary:hover {
  opacity: 0.8;
}

.nextlist-list-units .btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

.nextlist-list-units .btn-danger:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.nextlist-list-units .action-dropdown {
  display: none;
  position: fixed;
  background-color: var(--background-color-main-light);
  border: 1px solid var(--border-light-mode);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  min-width: 130px;
  overflow: hidden;
}

.nextlist-list-units .action-dropdown.open {
  display: block;
  animation: lu-fadeIn 0.15s ease-out;
}

.nextlist-list-units .action-dropdown-item {
  width: 100%;
  background: none;
  border: none;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s;
  font-family: inherit;
}

.nextlist-list-units .action-dropdown-item:hover {
  background-color: var(--primary-color);
}

.nextlist-list-units .action-dropdown-item--danger {
  color: #ef4444;
}

.nextlist-list-units .action-dropdown-item--danger:hover {
  background-color: var(--hover-light-mode);
}

.nextlist-list-units .modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.nextlist-list-units .modal-overlay.open {
  display: flex;
  animation: lu-fadeIn 0.2s ease-out;
}

.nextlist-list-units .modal {
  background-color: var(--background-color-main-light);
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.nextlist-list-units .modal-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

.nextlist-list-units .modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

html.dark-theme .nextlist-list-units .page-header {
  background-color: var(--background-dark-mode-menu-lateral);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-list-units .page-title {
  color: var(--text-thowine-dark);
}

html.dark-theme .nextlist-list-units .list-units-main-container {
  background-color: var(--background-main-dark-mode-menu-lateral);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-list-units .list-card {
  background-color: var(--background-main-dark-mode);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-list-units .list-card:hover {
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-list-units .card-field-value {
  color: var(--text-thowine-dark);
}

html.dark-theme .nextlist-list-units .action-dropdown {
  background-color: var(--background-main-dark-mode-menu-lateral);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-list-units .action-dropdown-item {
  color: var(--text-thowine-dark);
  background-color: var(--background-main-dark-mode);
}

html.dark-theme .nextlist-list-units .action-dropdown-item:hover {
  background-color: var(--primary-color);
  color: var(--primary-color-contrast);
}

html.dark-theme .nextlist-list-units .action-dropdown-item:first-child {
  background-color: var(--primary-color);
  color: var(--primary-color-contrast);
}

html.dark-theme .nextlist-list-units .modal {
  background-color: var(--background-main-dark-mode);
}

html.dark-theme .nextlist-list-units .modal-header {
  color: var(--primary-color-contrast);
}

html.dark-theme .nextlist-list-units .modal-text {
  color: var(--text-thowine-dark);
}

html.dark-theme .nextlist-list-units .btn-secondary {
  background-color: var(--background-main-dark-mode);
  color: var(--text-thowine-dark);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-list-units .tabs-navigation {
  border-bottom-color: var(--border-dark-mode);
  background: var(--background-main-dark-mode);
}

/* ─── RESPONSIVIDADE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nextlist-list-units {
    padding: 16px;
  }

  .nextlist-list-units .card-fields {
    gap: 1rem;
  }

  .nextlist-list-units .tab-button {
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
  }

  .nextlist-list-units .page-title {
    font-size: 1.2rem;
  }
}

.nextlist-list-units .page-header-wrapper {
  border: 1px solid var(--border-light-mode);
  margin: -20px -20px 0.5rem -20px;
  background-color: var(--background-color-main-light);
  padding: 40px 20px;
  text-align: center;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  position: relative;
}

html.dark-theme .nextlist-list-units .page-header-wrapper {
  background-color: var(--background-main-dark-mode);
  border-color: var(--border-dark-mode);
}
