/* ── Shared modal primitives used across all modal components ── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
}

.modal {
  background: #1e2130;
  border: 1px solid #2e3348;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.25rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #e2e8f0;
}

.modal-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  transition:
    color 0.12s,
    background 0.12s;
}
.modal-close:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

/* ── Shared button styles ── */

.btn-primary {
  background: #6366f1;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  transition: background 0.12s;
  white-space: nowrap;
}
.btn-primary:hover {
  background: #4f46e5;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-secondary {
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 6px;
  color: #d1d5db;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  transition: background 0.12s;
  white-space: nowrap;
}
.btn-secondary:hover {
  background: #4b5563;
}

/* ── Shared header button ── */
.header-btn {
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 6px;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0.3rem 0.65rem;
  line-height: 1.4;
  white-space: nowrap;
  transition: background 0.12s;
}
.header-btn:hover {
  background: #4b5563;
}

/* Admin variant — subtle purple accent */
.header-btn-admin {
  border-color: rgba(139, 92, 246, 0.45);
  color: #c4b5fd;
}
.header-btn-admin:hover {
  background: #4b5563;
  border-color: #7c3aed;
  color: #ddd6fe;
}
