.nextlist-catalog-page {
  width: 100%;
  padding: 20px;
}

/* ─── Header ─────────────────────────────────────────────────── */
.nextlist-catalog-page .page-header {
  margin-bottom: 2rem;
}

.nextlist-catalog-page .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.nextlist-catalog-page .header-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.nextlist-catalog-page .page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nextlist-catalog-page .page-title i {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.nextlist-catalog-page .page-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
}

.nextlist-catalog-page .catalog-toolbar {
  display: flex;
  margin-bottom: 2rem;
}

.nextlist-catalog-page .search-group {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.nextlist-catalog-page .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary, #9ca3af);
  font-size: 0.875rem;
}

.nextlist-catalog-page .search-input {
  width: 100%;
  max-width: 900px;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  font-size: 14px;
  background-color: var(--background-inputs-light-mode);
  color: var(--text-primary, #1f2937);
  transition: all 0.2s;
  text-transform: uppercase;
}

.nextlist-catalog-page .search-input:focus {
  outline: none;
  border: 2px solid var(--primary-color);
  padding: 9px 11px 9px 35px;
}

.nextlist-catalog-page .data-list-container {
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.nextlist-catalog-page .data-list-header,
.nextlist-catalog-page .data-list-item {
  display: grid;
  grid-template-columns: 80px 1fr 120px 200px 50px;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.5rem;
}

.nextlist-catalog-page .data-list-header {
  border-bottom: 1px solid var(--border, #e5e7eb);
  background-color: var(--surface-hover, #f9fafb);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #6b7280);
  letter-spacing: 0.5px;
}

.nextlist-catalog-page .data-list-item {
  border-bottom: 1px solid var(--border, #e5e7eb);
  transition: background-color 0.15s;
}

.nextlist-catalog-page .data-list-item:last-child {
  border-bottom: none;
}

.nextlist-catalog-page .data-list-item:hover {
  background-color: var(--surface-hover, #f9fafb);
}

.nextlist-catalog-page .col-code {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
}

.nextlist-catalog-page .col-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary, #1f2937);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nextlist-catalog-page .col-date {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
}

.nextlist-catalog-page .col-author {
  font-size: 0.875rem;
  color: var(--text-primary, #1f2937);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nextlist-catalog-page .col-actions {
  display: flex;
  justify-content: flex-end;
}

.nextlist-catalog-page .btn-icon {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nextlist-catalog-page .btn-icon:hover {
  background-color: var(--border, #e5e7eb);
  color: var(--text-primary, #1f2937);
}

.nextlist-catalog-page .catalog-loading {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-secondary, #6b7280);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.nextlist-catalog-page .catalog-loading i {
  font-size: 2rem;
  color: var(--primary-color);
}

.context-menu {
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  z-index: 9999;
  min-width: 180px;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 12px 16px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary, #1f2937);
  transition: background-color 0.15s;
  text-align: left;
}

.context-menu-item i {
  color: var(--primary-color);
  font-size: 1rem;
}

.context-menu-item:hover {
  background-color: var(--surface-hover, #f9fafb);
}

.nextlist-catalog-page .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background-color: var(--card-bg, #ffffff);
  border: 2px dashed var(--border, #e5e7eb);
  border-radius: 12px;
  text-align: center;
}

.nextlist-catalog-page .empty-icon {
  font-size: 4rem;
  color: var(--text-secondary, #9ca3af);
  margin-bottom: 1rem;
}

.nextlist-catalog-page .empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0 0 0.5rem 0;
}

.nextlist-catalog-page .empty-message {
  font-size: 0.95rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
}

.nextlist-catalog-page .modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.nextlist-catalog-page .modal-container {
  background-color: var(--card-bg, #ffffff);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.nextlist-catalog-page .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
  flex-shrink: 0;
}

.nextlist-catalog-page .modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nextlist-catalog-page .modal-title i { color: var(--primary-color); }

.nextlist-catalog-page .modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
  font-size: 1.125rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.nextlist-catalog-page .modal-close:hover {
  background-color: var(--surface-hover, #f3f4f6);
  color: var(--text-primary, #1f2937);
}

.nextlist-catalog-page .modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.nextlist-catalog-page .step-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0 0 0.5rem 0;
}

.nextlist-catalog-page .step-description {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin: 0 0 1.25rem 0;
}

.nextlist-catalog-page .user-selection-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  max-height: 250px;
  overflow-y: auto;
}

.nextlist-catalog-page .user-radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.nextlist-catalog-page .user-radio-item:hover {
  background-color: var(--surface-hover, #f8f9fa);
}

.nextlist-catalog-page .user-radio-item input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.nextlist-catalog-page .user-radio-item label {
  cursor: pointer;
  flex: 1;
  font-weight: 500;
  margin: 0;
  color: var(--text-primary, #1f2937);
}

.nextlist-catalog-page .logged-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 15px;
  background-color: var(--surface-hover, #f8f9fa);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
}

.nextlist-catalog-page .logged-user-icon {
  font-size: 24px;
  color: var(--primary-color);
}

.nextlist-catalog-page .logged-user-name {
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-primary, #1f2937);
}

.nextlist-catalog-page .modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border, #e5e7eb);
  flex-shrink: 0;
}

.nextlist-catalog-page .btn {
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.nextlist-catalog-page .btn-primary {
  background-color: var(--primary-color);
  color: var(--btn-secundary-text-color, #ffffff);
}

.nextlist-catalog-page .btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.nextlist-catalog-page .btn-secondary {
  background-color: var(--btn-secundary-color, #f3f4f6);
  color: var(--text-primary, #1f2937);
  border: 1px solid var(--border, #e5e7eb);
}

.nextlist-catalog-page .btn-secondary:hover {
  background-color: var(--border, #e5e7eb);
}

html.dark-theme .nextlist-catalog-page .page-title,
html.dark-theme .nextlist-catalog-page .col-code,
html.dark-theme .nextlist-catalog-page .col-name,
html.dark-theme .nextlist-catalog-page .col-author,
html.dark-theme .nextlist-catalog-page .empty-title,
html.dark-theme .nextlist-catalog-page .modal-title,
html.dark-theme .nextlist-catalog-page .step-title,
html.dark-theme .nextlist-catalog-page .user-radio-item label,
html.dark-theme .nextlist-catalog-page .logged-user-name {
  color: #f0f0f0;
}

html.dark-theme .nextlist-catalog-page .page-subtitle,
html.dark-theme .nextlist-catalog-page .col-date,
html.dark-theme .nextlist-catalog-page .empty-message,
html.dark-theme .nextlist-catalog-page .step-description {
  color: #b0b0b0;
}

html.dark-theme .nextlist-catalog-page .search-input {
  background-color: var(--background-dark-mode);
  color: #f0f0f0;
  border-color: #555555;
}

html.dark-theme .nextlist-catalog-page .data-list-container,
html.dark-theme .nextlist-catalog-page .empty-state,
html.dark-theme .nextlist-catalog-page .modal-container {
  background-color: #2c2c2c;
  border-color: #555555;
}

html.dark-theme .nextlist-catalog-page .data-list-header {
  background-color: #1e1e1e;
  border-color: #555555;
  color: #b0b0b0;
}

html.dark-theme .nextlist-catalog-page .data-list-item,
html.dark-theme .nextlist-catalog-page .modal-header,
html.dark-theme .nextlist-catalog-page .modal-footer {
  border-color: #555555;
}

html.dark-theme .nextlist-catalog-page .data-list-item:hover {
  background-color: #3a3a3a;
}

html.dark-theme .nextlist-catalog-page .btn-icon:hover {
  background-color: #3a3a3a;
  color: #f0f0f0;
}

html.dark-theme .nextlist-catalog-page .user-selection-list,
html.dark-theme .nextlist-catalog-page .user-radio-item,
html.dark-theme .nextlist-catalog-page .logged-user-info {
  border-color: #555555;
}

html.dark-theme .nextlist-catalog-page .user-radio-item:hover,
html.dark-theme .nextlist-catalog-page .logged-user-info {
  background-color: #3a3a3a;
}

html.dark-theme .context-menu {
  background-color: #2c2c2c;
  border-color: #555555;
}

html.dark-theme .context-menu-item {
  color: #f0f0f0;
}

html.dark-theme .context-menu-item:hover {
  background-color: #3a3a3a;
}

@media (max-width: 768px) {
  .nextlist-catalog-page { padding: 15px; }
  .nextlist-catalog-page .header-content { flex-direction: column; align-items: flex-start; }
  .nextlist-catalog-page .search-group { max-width: 100%; }
  .nextlist-catalog-page .data-list-header,
  .nextlist-catalog-page .data-list-item {
    grid-template-columns: 80px 1fr 50px;
  }
  .nextlist-catalog-page .col-date,
  .nextlist-catalog-page .col-author {
    display: none;
  }
  
  .nextlist-catalog-page .modal-container { max-height: 100vh; border-radius: 0; }
}