/* VoltyNode — admin / staff panel (uses dashboard.css variables) */

.pg-ap-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
}

.pg-ap-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

.pg-ap-nav a {
  color: var(--d-accent);
  text-decoration: none;
  opacity: 0.95;
}

.pg-ap-nav a:hover {
  text-decoration: underline;
}

.pg-ap-nav__sep {
  color: var(--d-muted);
  opacity: 0.6;
}

.pg-ap-logout {
  margin-left: auto;
}

.pg-ap-hero {
  position: relative;
  padding: 1.35rem 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.65) 100%);
  border: 1px solid var(--d-border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.pg-ap-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 120% at 0% -20%, rgba(74, 222, 128, 0.22), transparent 55%);
  pointer-events: none;
}

.pg-ap-hero > * {
  position: relative;
}

.pg-ap-hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pg-ap-hero p {
  margin: 0;
  color: var(--d-muted);
  font-size: 0.95rem;
  max-width: 42rem;
}

.pg-ap-hint {
  font-size: 0.82rem;
  color: var(--d-muted);
  line-height: 1.55;
  margin: 0 0 1.25rem;
}

.pg-ap-grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 840px) {
  .pg-ap-grid2 {
    grid-template-columns: 1fr;
  }
}

.pg-ap-card {
  border-radius: 14px;
  border: 1px solid var(--d-border);
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
}

/** Gebruikerskaart: overflow mag niet óf het Opties-menu wordt bij de laatste rij afgekapt. */
.pg-ap-card--menu-safe {
  overflow: visible;
}

.pg-ap-card__head {
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--d-muted);
  border-bottom: 1px solid var(--d-border);
  background: rgba(74, 222, 128, 0.06);
}

.pg-ap-card__body {
  padding: 1rem;
}

.pg-ap-section {
  margin-top: 1.25rem;
}

.pg-ap-section__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.pg-ap-section__title i {
  color: var(--d-accent);
  opacity: 0.9;
}

/* User cards */
.pg-ap-users {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pg-ap-user {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--d-border);
  background: rgba(11, 17, 32, 0.55);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pg-ap-user:hover {
  border-color: rgba(74, 222, 128, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.pg-ap-user--admin {
  border-left: 3px solid #f472b6;
}

.pg-ap-user--moderator {
  border-left: 3px solid var(--d-accent-2);
}

.pg-ap-user--user {
  border-left: 3px solid rgba(148, 163, 184, 0.45);
}

.pg-ap-user__avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--d-text);
  background: linear-gradient(145deg, rgba(74, 222, 128, 0.35), rgba(56, 189, 248, 0.12));
  border: 1px solid var(--d-border);
  flex-shrink: 0;
}

.pg-ap-user__main {
  min-width: 0;
}

.pg-ap-user__email {
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}

.pg-ap-user__meta {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--d-muted);
}

.pg-ap-user__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.pg-ap-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pg-ap-badge--admin {
  background: rgba(244, 114, 182, 0.18);
  color: #f9a8d4;
  border: 1px solid rgba(244, 114, 182, 0.35);
}

.pg-ap-badge--moderator {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.pg-ap-badge--user-role {
  background: rgba(148, 163, 184, 0.12);
  color: var(--d-muted);
  border: 1px solid var(--d-border);
}

.pg-ap-badge--panel-yes {
  background: rgba(74, 222, 128, 0.14);
  color: var(--d-success);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.pg-ap-badge--panel-no {
  background: rgba(148, 163, 184, 0.08);
  color: var(--d-muted);
  border: 1px solid var(--d-border);
}

.pg-ap-badge--panel-team {
  background: rgba(129, 140, 248, 0.14);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.pg-ap-mini-lic__kind {
  display: inline-block;
  margin-right: 0.2rem;
  color: var(--d-muted);
  font-size: 0.85em;
}

.pg-ap-user__actions {
  justify-self: end;
  flex-shrink: 0;
}

.pg-ap-dd {
  position: relative;
}

.pg-ap-dd.is-open {
  z-index: 100;
}

.pg-ap-dd__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--d-border);
  background: rgba(74, 222, 128, 0.12);
  color: var(--d-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.pg-ap-dd__btn:hover {
  background: rgba(74, 222, 128, 0.2);
}

.pg-ap-dd__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 220px;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--d-border);
  background: var(--d-elevated);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 30;
  display: none;
}

.pg-ap-dd.is-open .pg-ap-dd__menu {
  display: block;
}

.pg-ap-dd__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--d-text);
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.pg-ap-dd__item:hover {
  background: rgba(74, 222, 128, 0.12);
}

.pg-ap-dd__item i {
  width: 1.1rem;
  color: var(--d-accent);
  opacity: 0.85;
}

.pg-ap-dd__item--danger {
  color: #fda4af;
}

.pg-ap-dd__item--danger:hover {
  background: rgba(248, 113, 113, 0.12);
}

.pg-ap-dd__item--danger i {
  color: #f87171;
}

@media (max-width: 640px) {
  .pg-ap-user {
    grid-template-columns: 1fr;
  }

  .pg-ap-user__actions {
    justify-self: stretch;
  }

  .pg-ap-dd__btn {
    width: 100%;
    justify-content: center;
  }

  .pg-ap-dd__menu {
    left: 0;
    right: 0;
  }
}

/* License cards */
.pg-ap-lic-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pg-ap-lic {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--d-border);
  background: rgba(11, 17, 32, 0.45);
  font-size: 0.86rem;
}

.pg-ap-lic strong {
  color: var(--d-text);
  font-size: 0.92rem;
}

.pg-ap-lic small {
  display: block;
  margin-top: 0.35rem;
  color: var(--d-muted);
  line-height: 1.45;
}

.pg-ap-lic-actions {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pg-ap-lic-actions__offline {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(148, 163, 184, 0.12);
}

.pg-ap-lic-actions__online {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.1);
}

.pg-ap-lic-actions__delete {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

/* IP rows */
.pg-ap-ip-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--d-border);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-start;
  font-size: 0.88rem;
}

.pg-ap-ip-row:last-child {
  border-bottom: none;
}

/* Modal / sheet */
.pg-ap-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(5, 7, 10, 0.78);
  backdrop-filter: blur(10px);
}

.pg-ap-overlay[hidden] {
  display: none !important;
}

.pg-ap-sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(88vh, 700px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--d-border);
  background: var(--d-surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.pg-ap-sheet--wide {
  max-width: 640px;
}

.pg-ap-sheet__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--d-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.pg-ap-sheet__close:hover {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

.pg-ap-sheet__head {
  padding: 1.15rem 3rem 0.75rem 1.25rem;
  font-weight: 800;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--d-border);
}

.pg-ap-sheet__body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}

.pg-ap-sheet__foot {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--d-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.pg-ap-sheet__foot select {
  flex: 1;
  min-width: 140px;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--d-border);
  background: var(--d-elevated);
  color: var(--d-text);
  font-family: inherit;
}

.pg-ap-mini-lic {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid var(--d-border);
}

.pg-ap-mini-lic:last-child {
  margin-bottom: 0;
}

.pg-ap-empty {
  color: var(--d-muted);
  font-size: 0.9rem;
  margin: 0;
}
