:root {
  --staff-bg: #07040f;
  --staff-bg-2: #11081f;
  --staff-panel: rgba(18, 12, 34, 0.9);
  --staff-panel-2: rgba(27, 18, 49, 0.96);
  --staff-border: rgba(255, 214, 122, 0.16);
  --staff-text: #f8f5ff;
  --staff-muted: #b7aacd;
  --staff-gold: #efc36d;
  --staff-gold-2: #ffd88d;
  --staff-pink: #ff86d8;
  --staff-violet: #8f5cff;
  --staff-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.staff-body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: var(--staff-text);
  background:
    radial-gradient(circle at top left, rgba(143, 92, 255, 0.22), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 134, 216, 0.18), transparent 28%),
    linear-gradient(180deg, #0a0614 0%, #050309 100%);
}

a { color: inherit; }

.staff-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.staff-login-card,
.staff-panel,
.staff-stat-card {
  background: linear-gradient(180deg, rgba(23, 16, 43, 0.96), rgba(12, 9, 24, 0.96));
  border: 1px solid var(--staff-border);
  border-radius: 28px;
  box-shadow: var(--staff-shadow);
}

.staff-login-card {
  width: min(100%, 680px);
  padding: 32px;
}

.staff-login-brand {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  align-items: center;
}

.staff-login-brand img,
.staff-sidebar__brand img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(143, 92, 255, 0.2));
}

.staff-login-brand h1,
.staff-topbar h1,
.staff-panel h2,
.staff-card h3 {
  margin: 0;
}

.staff-login-meta,
.staff-topbar__actions,
.staff-form-actions,
.staff-panel__head,
.staff-sidebar__foot,
.staff-card-meta,
.staff-item-actions,
.staff-grid-2,
.staff-shortcuts,
.staff-role-grid,
.staff-summary-list,
.staff-dashboard-grid {
  display: flex;
  gap: 12px;
}

.staff-login-meta,
.staff-card-meta,
.staff-panel__head,
.staff-form-actions,
.staff-item-actions,
.staff-topbar__actions,
.staff-shortcuts,
.staff-role-grid,
.staff-summary-list { flex-wrap: wrap; }

.staff-login-meta span,
.staff-pill,
.staff-badge,
.eyebrow,
.staff-card-meta span,
.staff-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--staff-muted);
  font-size: 12px;
  letter-spacing: .02em;
}

.eyebrow {
  text-transform: uppercase;
  color: var(--staff-gold);
  padding: 0;
  background: transparent;
  font-weight: 700;
}

.staff-role-badge {
  font-weight: 700;
  color: #130817;
  background: linear-gradient(135deg, var(--staff-gold), var(--staff-pink));
  border: 1px solid rgba(255,255,255,0.12);
}

.role-resp-donation { background: linear-gradient(135deg, #efc36d, #ffb86a); }
.role-co-founder { background: linear-gradient(135deg, #d39aff, #ff9be3); }
.role-founder { background: linear-gradient(135deg, #ff86d8, #ffd88d); }
.role-devsite { background: linear-gradient(135deg, #8f5cff, #ff86d8); color: #fff; }

.staff-alert {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(143, 92, 255, 0.24);
  background: rgba(143, 92, 255, 0.12);
  color: var(--staff-text);
}
.staff-alert.error {
  border-color: rgba(255, 109, 166, 0.35);
  background: rgba(255, 109, 166, 0.12);
}
.staff-alert.success {
  border-color: rgba(239, 195, 109, 0.35);
  background: rgba(239, 195, 109, 0.1);
}

.staff-form label {
  display: grid;
  gap: 8px;
}

.staff-form span { color: #f3eafd; font-size: 14px; font-weight: 600; }

.staff-form input,
.staff-form textarea,
.staff-form select,
.staff-search {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--staff-text);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

.staff-form textarea { resize: vertical; min-height: 96px; }
.staff-form input:focus,
.staff-form textarea:focus,
.staff-form select:focus,
.staff-search:focus {
  border-color: rgba(255, 134, 216, 0.35);
  box-shadow: 0 0 0 4px rgba(143, 92, 255, 0.14);
}

.staff-switch {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.staff-switch input { width: 18px; height: 18px; }

.stack-gap-md > * + * { margin-top: 14px; }
.stack-gap-lg > * + * { margin-top: 18px; }

.staff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--staff-text);
  text-decoration: none;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.staff-btn--primary {
  background: linear-gradient(135deg, var(--staff-gold), var(--staff-pink));
  color: #150817;
  border-color: transparent;
}

.staff-btn--ghost:hover,
.staff-btn--primary:hover { transform: translateY(-1px); }

.staff-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
}

.staff-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(255,255,255,0.06);
  background: rgba(7, 4, 15, 0.84);
  backdrop-filter: blur(16px);
}

.staff-sidebar__brand {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
}

.staff-sidebar__brand img { width: 70px; height: 70px; }
.staff-sidebar__brand strong { display: block; font-size: 20px; }
.staff-sidebar__brand span { color: var(--staff-muted); }

.staff-sidebar__nav {
  display: grid;
  gap: 10px;
}

.staff-sidebar__nav a {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--staff-muted);
  text-decoration: none;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
}

.staff-sidebar__nav a:hover,
.staff-sidebar__nav a.is-active {
  color: var(--staff-text);
  border-color: rgba(255, 134, 216, 0.18);
  background: linear-gradient(135deg, rgba(143, 92, 255, 0.18), rgba(255, 134, 216, 0.12));
}

.staff-sidebar__foot {
  margin-top: auto;
  flex-direction: column;
  align-items: flex-start;
}

.staff-main {
  padding: 28px;
}

.staff-topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.staff-topbar p,
.staff-help-box,
.staff-login-card p,
.staff-card p,
.staff-item-subtitle,
.staff-login-footnote { color: var(--staff-muted); line-height: 1.6; }

.staff-stats,
.staff-grid,
.staff-grid-single,
.staff-dashboard-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.staff-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.staff-stats--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.staff-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
.staff-grid-single { grid-template-columns: minmax(0, 1fr); }
.staff-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-gap { margin-bottom: 18px; }

.staff-stat-card {
  padding: 22px;
}
.staff-stat-card span { color: var(--staff-muted); font-size: 14px; }
.staff-stat-card strong { display: block; margin-top: 14px; font-size: clamp(28px, 4vw, 42px); }
.staff-stat-card small { color: var(--staff-gold); }
.small-card strong { font-size: clamp(24px, 3vw, 32px); }

.staff-panel {
  padding: 22px;
}
.staff-panel__head {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.staff-panel__tools { display: flex; gap: 10px; }
.staff-search { max-width: 280px; }

.staff-card-list {
  display: grid;
  gap: 14px;
  max-height: 920px;
  overflow: auto;
  padding-right: 4px;
}

.staff-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.staff-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.staff-item-subtitle {
  font-size: 14px;
  margin-top: 4px;
}

.staff-badge.off {
  background: rgba(255,255,255,0.05);
  color: var(--staff-muted);
}

.staff-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-shortcut {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.staff-shortcut strong { font-size: 18px; }
.staff-shortcut span { color: var(--staff-muted); font-size: 14px; }

.staff-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-role-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  display: grid;
  gap: 12px;
}

.staff-role-card strong {
  font-size: 30px;
}

.staff-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-summary-list > div {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.04);
}

.staff-summary-list span {
  color: var(--staff-muted);
  display: block;
  font-size: 14px;
}

.staff-summary-list strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.staff-help-box {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.staff-help-box p { margin: 0 0 10px; }
.staff-help-box p:last-child { margin-bottom: 0; }

.staff-login-links { margin-top: 18px; }
.staff-login-links a {
  color: var(--staff-gold-2);
  text-decoration: none;
}
.staff-login-footnote {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .staff-shell { grid-template-columns: 1fr; }
  .staff-sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .staff-stats,
  .staff-stats--four,
  .staff-grid,
  .staff-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .login-shell,
  .staff-main { padding: 18px; }
  .staff-login-card,
  .staff-panel,
  .staff-stat-card { border-radius: 22px; }
  .staff-login-brand { grid-template-columns: 1fr; }
  .staff-topbar { flex-direction: column; align-items: flex-start; }
  .staff-grid-2,
  .staff-shortcuts,
  .staff-role-grid,
  .staff-summary-list { grid-template-columns: 1fr; display: grid; }
  .staff-card__top,
  .staff-item-actions,
  .staff-panel__head { flex-direction: column; align-items: flex-start; }
  .staff-search { max-width: none; }
}


.staff-group-block { display: grid; gap: 14px; }
.staff-group-block + .staff-group-block { margin-top: 18px; }
.staff-group-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.staff-card-list--nested { display:grid; gap:16px; }
.categories-layout { align-items: start; }
