.badges-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 12px 0 18px;
}

.badge-notice {
  background: #fff7ed;
  border: 1px solid rgba(191, 151, 69, 0.35);
  color: #7c2d12;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.badge-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-cell img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  object-fit: contain;
}

.badge-use-input {
  width: 100%;
  min-width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.14);
}

.badge-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-count-btn {
  border: none;
  background: transparent;
  color: var(--hc-navy, #002e6b);
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
}

.badge-count-btn:hover {
  background: rgba(0,0,0,0.05);
}

.badge-recipients-content {
  width: 760px;
  max-width: 92vw;
  max-height: 82vh;
  overflow: auto;
}

.badge-recipients-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.badge-recipients-table {
  width: 100%;
  border-collapse: collapse;
}

.badge-recipients-table th,
.badge-recipients-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  vertical-align: top;
}

.badge-recipients-table th {
  color: var(--hc-navy, #002e6b);
}

.badge-recipients-muted {
  color: #64748b;
  font-size: 0.9rem;
}

.badge-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid rgba(0,0,0,0.10);
  background: #ffffff;
}

.badge-status-active {
  color: #065f46;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
}

.badge-status-inactive {
  color: #334155;
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.35);
}

.badge-status-expired {
  color: #7c2d12;
  background: rgba(251, 146, 60, 0.18);
  border-color: rgba(251, 146, 60, 0.35);
}

/* Dim inactive/expired rows for easier scanning */
.badge-row-dim {
  opacity: 0.68;
}

.badge-row-dim .badge-use-input,
.badge-row-dim .mod-btn,
.badge-row-dim .badge-count-btn {
  opacity: 1;
}

.badge-row-expired {
  background: rgba(251, 146, 60, 0.06);
}

/* Badge Manager modal: center + scrollable content so it always fits viewport */
#badgeModal.badge-modal {
  align-items: center;
  justify-content: center;
}

#badgeModal .badge-modal-content {
  width: min(760px, 92vw);
  max-height: 86vh;
  overflow: auto;
}

#badgeModal .badge-modal-actions {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  padding-top: 12px;
  margin-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

#createBadgeModal.badge-modal {
  align-items: center;
  justify-content: center;
}

#createBadgeModal .badge-modal-content {
  width: min(560px, 92vw);
  max-height: 86vh;
  overflow: auto;
}

#createBadgeModal .badge-modal-actions {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  padding-top: 12px;
  margin-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
