.staff-page {
  min-height: 100vh;
  background: #080909;
}

.staff-admin-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 92px);
  border-top: 1px solid var(--line);
}

.staff-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: calc(100vh - 92px);
  padding: 28px 18px;
  background: linear-gradient(180deg, #111313, #090909);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.staff-sidebar-brand h1,

.staff-panel-header h2,

.staff-detail-head h2,

.empty-staff h2 {
  margin: 0;
  font-family: var(--condensed);
  text-transform: uppercase;
}

.staff-sidebar-brand h1 {
  font-size: 34px;
  line-height: 0.95;
}

.staff-nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.staff-nav button,

.staff-menu-toggle {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.staff-nav button {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px;
  font: 700 15px var(--sans);
  text-align: left;
}

.staff-profile-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  text-decoration: none;
}

.staff-profile-link:hover {
  border-color: rgba(220, 32, 39, 0.8);
  background: rgba(220, 32, 39, 0.16);
}

.staff-nav button.is-active,

.staff-nav button:hover {
  border-color: rgba(220, 32, 39, 0.8);
  background: rgba(220, 32, 39, 0.16);
}

.staff-nav span {
  width: 24px;
  color: var(--red);
  text-align: center;
}

.staff-preview-nav::after {
  content: "Staff";
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.staff-preview-banner {
  max-width: 1120px;
  margin: 24px auto 0;
  padding: 14px 16px;
  border: 1px solid rgba(220, 32, 39, 0.35);
  background: rgba(220, 32, 39, 0.08);
  display: flex;
  gap: 10px;
  align-items: center;
}

.site-pages-table-wrap {
  overflow-x: auto;
}

.site-pages-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.site-pages-table th,

.site-pages-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(18, 18, 18, 0.08);
  text-align: left;
  vertical-align: middle;
}

.site-pages-table th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-pages-table td small {
  display: block;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
}

.site-pages-table code {
  background: rgba(18, 18, 18, 0.06);
  padding: 3px 6px;
}

.staff-switch {
  display: inline-flex;
  align-items: center;
}

.staff-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.staff-switch span {
  width: 42px;
  height: 23px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.2);
  position: relative;
  transition: 0.2s ease;
}

.staff-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
  transition: 0.2s ease;
}

.staff-switch input:checked + span {
  background: var(--green);
}

.staff-switch input:checked + span::after {
  transform: translateX(17px);
}

.staff-switch input:disabled + span,

.site-page-order:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.site-page-order {
  width: 90px;
}

.staff-detail-wide {
  grid-column: 1 / -1;
}

.site-page-status,

.profile-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  padding: 4px 9px;
  color: var(--white);
  font: 700 12px var(--condensed);
  text-transform: uppercase;
}

.site-page-status-public { border-color: rgba(115, 214, 154, 0.7); color: #73d69a; }

.site-page-status-public_hidden { border-color: rgba(88, 167, 255, 0.7); color: #79b8ff; }

.site-page-status-staff_only { border-color: rgba(255, 190, 92, 0.7); color: #ffcb76; }

.site-page-status-disabled { border-color: rgba(255, 119, 123, 0.7); color: #ff777b; }

.site-pages-table .is-warning { color: #ffcb76; }

.site-page-detail { margin-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.13); padding-top: 18px; }

.btn.mini { min-height: 30px; margin-top: 7px; padding: 5px 9px; font-size: 12px; }

.profile-badges,

.permission-list,

.staff-role-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.profile-badges { margin-top: 10px; }

.permission-list span { color: #73d69a; }

.staff-role-grid { margin: 14px 0; border: 1px solid rgba(255, 255, 255, 0.13); padding: 14px; }

.staff-role-grid legend { padding: 0 6px; color: var(--white); font-family: var(--condensed); text-transform: uppercase; }

.staff-check { display: inline-flex; gap: 8px; align-items: center; color: var(--text); }

.staff-alert { border-left: 3px solid #ffcb76; padding: 12px 14px; background: rgba(255, 203, 118, 0.08); color: #ffcb76; }

.staff-list-wide { min-height: 0; max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.staff-main {
  min-width: 0;
  padding: clamp(22px, 4vw, 48px);
}

.staff-panel-header,

.staff-toolbar,

.staff-grid,

.staff-detail-head,

.staff-save-bar {
  display: grid;
  gap: 16px;
}

.staff-panel-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 22px;
}

.staff-panel-header h2 {
  font-size: clamp(32px, 4vw, 54px);
}

[data-staff-feedback] {
  margin: 0;
  color: var(--muted);
}

[data-staff-feedback].is-ok {
  color: #73d69a;
}

[data-staff-feedback].is-error {
  color: #ff777b;
}

.staff-view {
  display: none;
}

.staff-view.is-active {
  display: block;
}

.staff-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.staff-kpi-card {
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 3px solid rgba(220, 32, 39, 0.72);
  border-radius: 4px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.staff-kpi-card span,

.staff-count,

.staff-row small,

.staff-row span,

.staff-detail-head p,

.empty-staff p,

.staff-card p {
  color: var(--muted);
}

.staff-kpi-card strong {
  display: block;
  margin-top: 18px;
  color: var(--white);
  font-family: var(--condensed);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
}

.staff-toolbar {
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(160px, 220px)) auto;
  align-items: end;
  margin-bottom: 16px;
}

.staff-toolbar label,

.staff-detail-head label,

.staff-field {
  display: grid;
  gap: 8px;
  color: var(--white);
  font-family: var(--condensed);
  text-transform: uppercase;
}

.staff-toolbar input,

.staff-toolbar select,

.staff-detail-head select,

.staff-field input,

.staff-field select,

.staff-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 4px;
  padding: 12px 13px;
  background: #090909;
  color: var(--text);
  font: 16px var(--sans);
  text-transform: none;
}

.staff-field textarea { min-height: 96px; resize: vertical; }

.staff-count {
  margin: 0 0 12px;
}

.staff-grid {
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  align-items: start;
}

.staff-list,

.staff-detail {
  min-height: 560px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(7, 8, 8, 0.74);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

.staff-list {
  display: grid;
  gap: 10px;
  align-content: start;
  max-height: 72vh;
  overflow: auto;
  padding: 16px;
}

.staff-row {
  display: grid;
  gap: 7px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 3px solid rgba(220, 32, 39, 0.66);
  border-radius: 4px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.staff-row.is-selected {
  border-color: rgba(220, 32, 39, 0.85);
  box-shadow: 0 0 0 1px rgba(220, 32, 39, 0.38);
}

.staff-row strong {
  color: var(--white);
  font-family: var(--condensed);
  font-size: 22px;
  text-transform: uppercase;
}

.staff-detail {
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
}

.staff-detail-head {
  grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
  align-items: start;
  margin-bottom: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.staff-save-bar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.staff-save-bar span {
  color: #73d69a;
}

.staff-save-bar span:not(:only-child) {
  font-weight: 700;
}

.staff-save-bar.is-dirty span {
  color: #ffcb76;
}

.staff-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.staff-card,

.empty-staff {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 3px solid rgba(220, 32, 39, 0.65);
  border-radius: 4px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.28);
}

.staff-card h3 {
  margin: 0 0 12px;
  font-family: var(--condensed);
  font-size: 24px;
  text-transform: uppercase;
}

.staff-card p {
  margin: 0 0 9px;
  line-height: 1.48;
}

.staff-card p span {
  color: var(--white);
}

.staff-card-wide {
  grid-column: 1 / -1;
}

.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btn.danger,

.staff-actions .danger {
  border-color: rgba(220, 32, 39, 0.72);
  color: #ff9b9e;
}

.event-management-section code,

.staff-detail code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.alc-card-preview {
  position: relative;
  width: min(100%, 640px);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: #080808;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.alc-card-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.alc-card-qr {
  position: absolute;
  left: 21.4%;
  top: 30.7%;
  width: 9.8%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #fff;
}

.alc-card-qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

.alc-card-name,

.alc-card-number {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-family: var(--condensed);
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alc-card-name {
  left: 41%;
  top: 32.8%;
  width: 29%;
  font-size: clamp(13px, 3vw, 30px);
}

.alc-card-number {
  left: 21.3%;
  top: 45%;
  width: 14%;
  font-size: clamp(8px, 1.4vw, 15px);
}

.alc-card-preview-junior .alc-card-name {
  color: #09a5dc;
}

.alc-card-preview-veloce .alc-card-name {
  color: #f07530;
}

.alc-card-preview-quadrifoglio .alc-card-name {
  color: #f2d36c;
}

.staff-card-data {
  margin-top: 14px;
}

.verification-section {
  max-width: 780px;
  margin-inline: auto;
}

.verification-card {
  text-align: center;
}

.verification-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(220, 32, 39, 0.18);
  color: #ff777b;
  font: 700 34px var(--condensed);
}

.verification-card.is-valid .verification-mark {
  background: rgba(115, 214, 154, 0.16);
  color: #73d69a;
}

.verification-data {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  text-align: left;
}

.staff-field {
  margin-top: 12px;
}

.staff-menu-toggle {
  display: none;
}
