/* Admin extension of the shared SupEmail Neo-Brutalism theme. */
.neo-admin { --blue-dark: var(--neo-ink); }
.neo-admin .admin-topbar {
  min-height: 82px;
  padding: 16px clamp(18px, 3vw, 46px);
  gap: 18px;
  border-bottom: 3px solid var(--neo-ink);
  background: var(--neo-paper);
}
.neo-admin .admin-brand { gap: 14px; color: var(--neo-ink); font-size: 22px; font-weight: 900; letter-spacing: -.055em; }
.neo-admin .admin-brand b { color: inherit; font-weight: 500; }
.neo-admin .admin-brand-mark {
  width: 42px;
  height: 38px;
  flex: 0 0 auto;
  border: 2px solid var(--neo-ink);
  border-radius: 2px;
  background: var(--neo-yellow);
  box-shadow: 3px 3px 0 var(--neo-ink);
}
.neo-admin .admin-brand-mark span { border-color: var(--neo-ink); border-radius: 0; }
.neo-admin .admin-brand-mark::before, .neo-admin .admin-brand-mark::after { top: 11px; width: 17px; background: var(--neo-ink); }
.neo-admin .admin-brand-mark::before { left: 3px; }
.neo-admin .admin-brand-mark::after { right: 3px; }
.neo-admin .secure-status { color: var(--neo-ink); font: 11px var(--neo-mono); }
.neo-admin .secure-status i { border: 1.5px solid var(--neo-ink); background: #7ba66a; box-shadow: none; }
.neo-admin .admin-shell { width: min(1320px, calc(100% - 64px)); min-height: calc(100vh - 82px); padding: 38px 0 56px; }
.neo-admin :is(.auth-card, .dashboard-header, .user-panel, .activity-panel, .metric-grid > :where(article), .admin-dialog) {
  border: 3px solid var(--neo-ink);
  border-radius: 3px;
  background: #fffef9;
  box-shadow: 6px 6px 0 var(--neo-ink);
}
.neo-admin .auth-card { width: min(490px, 100%); margin: 30px auto; padding: 34px; box-shadow: 9px 9px 0 var(--neo-ink); }
.neo-admin .auth-heading { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 2px solid var(--neo-ink); }
.neo-admin .auth-heading h1 { max-width: 350px; margin-top: 24px; font-size: 40px; line-height: 1.05; }
.neo-admin .step-badge { min-height: 30px; padding: 6px 10px; border: 2px solid var(--neo-ink); border-radius: 1px; background: var(--neo-sky); color: var(--neo-ink); font: 700 10px var(--neo-mono); letter-spacing: .075em; }
.neo-admin .auth-heading .step-badge { box-shadow: 3px 3px 0 var(--neo-ink); transform: rotate(-2deg); }
.neo-admin :is(.admin-form label, .permission-fieldset legend) { color: var(--neo-ink); font-family: var(--neo-mono); font-size: 11px; letter-spacing: .035em; }
.neo-admin .admin-form :is(input:not([type="checkbox"]):not([type="hidden"]), select) { min-width: 0; min-height: 48px; padding: 0 13px; border: 2px solid var(--neo-ink); border-radius: 2px; color: var(--neo-ink); background: #fffef9; box-shadow: none; }
.neo-admin .admin-form .password-field input { padding-right: 76px; }
.neo-admin :is(.primary-action, .secondary-action, .user-action, .dialog-close) {
  min-height: 42px;
  padding: 10px 16px;
  border: 2px solid var(--neo-ink);
  border-radius: 2px;
  background: var(--neo-yellow);
  color: var(--neo-ink);
  box-shadow: 3px 3px 0 var(--neo-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.neo-admin :is(.secondary-action, .user-action) { background: var(--neo-sky); }
.neo-admin .user-action.danger { border-color: var(--neo-ink); background: var(--neo-pink); color: #63152a; }
.neo-admin :is(.primary-action, .secondary-action, .user-action, .dialog-close):hover:not(:disabled) { border-color: var(--neo-ink); color: var(--neo-ink); background: var(--neo-yellow); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--neo-ink); }
.neo-admin :is(.primary-action, .secondary-action, .user-action, .dialog-close):active:not(:disabled) { transform: translate(3px, 3px); box-shadow: none; }
.neo-admin button:disabled { opacity: .55; transform: none; box-shadow: 1px 1px 0 var(--neo-ink); }
.neo-admin .admin-form > .primary-action { min-height: 48px; margin-top: 16px; }
.neo-admin .password-field button { min-height: 30px; padding: 4px 7px; border: 1.5px solid var(--neo-ink); border-radius: 1px; color: var(--neo-ink); background: var(--neo-sky); box-shadow: none; font: 700 10px var(--neo-mono); }
.neo-admin .password-field button:hover { background: var(--neo-yellow); }
.neo-admin .session-policy { gap: 10px; flex-direction: column; margin-top: 28px; border-top: 2px solid var(--neo-ink); color: #55534e; font: 10px/1.6 var(--neo-mono); }
.neo-admin .form-message { padding: 12px; border: 2px solid var(--neo-ink); border-radius: 2px; }
.neo-admin .error-message { color: #63152a; background: var(--neo-pink); }
.neo-admin .loading-ring { border-color: var(--neo-sky); border-top-color: var(--neo-ink); }
.neo-admin .status-card h1 { font-size: 25px; }
.neo-admin .dashboard { gap: 28px; }
.neo-admin .dashboard-header { padding: 28px; background: var(--neo-sky); }
.neo-admin .dashboard-header .step-badge { background: #fffef9; }
.neo-admin .dashboard-header h1 { margin-top: 18px; font-size: clamp(32px, 4vw, 48px); }
.neo-admin .dashboard-header p { color: #3f4549; font: 12px/1.6 var(--neo-mono); overflow-wrap: anywhere; }
.neo-admin .metric-grid { gap: 20px; }
.neo-admin .metric-grid article { min-width: 0; min-height: 155px; padding: 24px; background: var(--neo-yellow); }
.neo-admin .metric-grid article:nth-child(2) { background: var(--neo-pink); }
.neo-admin .metric-grid article:nth-child(3) { background: var(--neo-sky); }
.neo-admin .metric-grid article:nth-child(4) { background: var(--neo-mint); }
.neo-admin .metric-grid span { color: var(--neo-ink); font: 700 11px/1.5 var(--neo-mono); letter-spacing: .035em; }
.neo-admin .metric-grid strong { margin-top: 20px; color: var(--neo-ink); font-size: clamp(36px, 4vw, 54px); font-weight: 900; line-height: 1; letter-spacing: -.055em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.neo-admin :is(.user-panel, .activity-panel) { min-width: 0; padding: 26px; }
.neo-admin .panel-title { gap: 20px; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 2px solid var(--neo-ink); }
.neo-admin .panel-title h2 { font-size: 29px; }
.neo-admin .panel-title p { margin-top: 8px; color: #55534e; line-height: 1.6; }
.neo-admin .user-list { gap: 20px; }
.neo-admin .user-row { min-width: 0; gap: 18px; padding: 22px; border: 2px solid var(--neo-ink); border-radius: 2px; background: #fff8e8; }
.neo-admin .user-row header strong { font-size: 22px; font-weight: 900; letter-spacing: -.035em; }
.neo-admin .user-row header > div:first-child > span { color: #55534e; font-family: var(--neo-mono); font-size: 11px; }
.neo-admin .user-badges { align-items: flex-start; }
.neo-admin :is(.user-badges span, .user-permissions span) { min-height: 27px; padding: 4px 8px; border: 1.5px solid var(--neo-ink); border-radius: 1px; font: 700 10px/1.5 var(--neo-mono); }
.neo-admin .user-badges span { background: var(--neo-mint); color: #244323 !important; white-space: normal; }
.neo-admin .user-badges .is-locked { border-color: var(--neo-ink); background: var(--neo-pink); color: #63152a !important; }
.neo-admin .user-badges .is-pending { border-color: var(--neo-ink); background: var(--neo-yellow); color: var(--neo-ink) !important; }
.neo-admin .user-permissions span { color: var(--neo-ink); background: var(--neo-sky); overflow-wrap: anywhere; }
.neo-admin .user-row dl { gap: 10px; }
.neo-admin .user-row dl > div { padding: 12px; border: 1.5px solid var(--neo-ink); border-radius: 1px; background: #fffef9; }
.neo-admin .user-row dt { color: #55534e; font-family: var(--neo-mono); font-size: 9px; line-height: 1.5; }
.neo-admin .user-row dd { color: var(--neo-ink); font-weight: 700; line-height: 1.6; }
.neo-admin .user-actions { gap: 12px; }
.neo-admin .user-action { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.neo-admin .activity-list { border: 2px solid var(--neo-ink); border-radius: 2px; }
.neo-admin .activity-row { gap: 16px; padding: 16px; background: #fffef9; }
.neo-admin .activity-row + .activity-row { border-top: 1.5px solid var(--neo-ink); }
.neo-admin .activity-row:nth-child(even) { background: #fff5d0; }
.neo-admin .activity-row time { color: #55534e; font: 10px/1.6 var(--neo-mono); }
.neo-admin .empty-activity { padding: 28px; font: 12px/1.6 var(--neo-mono); }
.neo-admin .admin-dialog { max-height: calc(100dvh - 40px); }
.neo-admin .admin-dialog::backdrop { background: rgb(24 24 24 / .6); backdrop-filter: none; }
.neo-admin .admin-dialog .admin-form { max-height: calc(100dvh - 50px); padding: 26px; }
.neo-admin .dialog-header { margin-bottom: 10px; padding-bottom: 20px; border-bottom: 2px solid var(--neo-ink); }
.neo-admin .dialog-header h2 { margin-top: 12px; font-size: 30px; }
.neo-admin .dialog-close { min-width: 38px; min-height: 38px; width: 38px; height: 38px; flex: 0 0 auto; padding: 0; font-size: 25px; background: var(--neo-pink); }
.neo-admin .permission-fieldset { min-width: 0; border: 2px solid var(--neo-ink); border-radius: 2px; background: #fff5d0; }
.neo-admin .permission-fieldset label { font-family: inherit; font-size: 12px; letter-spacing: 0; }
.neo-admin .permission-fieldset input[type="checkbox"] { flex: 0 0 auto; padding: 0; border-radius: 0; }
.neo-admin .form-columns > div { min-width: 0; }
.neo-admin .api-limit-fieldset .password-rule strong { color: var(--neo-ink); }
.neo-admin :is(.password-rule, .input-hint, .dialog-note) { color: #55534e; line-height: 1.6; }
.neo-admin .dialog-actions { gap: 12px; padding-top: 12px; }

@media (max-width: 820px) {
  .neo-admin .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .neo-admin .admin-topbar { min-height: 74px; padding: 16px 18px; }
  .neo-admin .admin-brand { gap: 10px; font-size: 19px; }
  .neo-admin .secure-status { font-size: 0; }
  .neo-admin .admin-shell { width: calc(100% - 36px); min-height: calc(100vh - 74px); padding: 24px 0 38px; }
  .neo-admin .auth-card { margin: 12px auto; padding: 24px; box-shadow: 6px 6px 0 var(--neo-ink); }
  .neo-admin .auth-heading h1 { font-size: 34px; }
  .neo-admin .dashboard-header { padding: 22px; }
  .neo-admin .dashboard-header h1 { font-size: 36px; }
  .neo-admin .metric-grid { gap: 16px; }
  .neo-admin .metric-grid article { min-height: 130px; padding: 18px; }
  .neo-admin .metric-grid span { font-size: 10px; }
  .neo-admin .metric-grid strong { margin-top: 15px; font-size: 36px; }
  .neo-admin :is(.user-panel, .activity-panel) { padding: 18px; }
  .neo-admin .panel-title h2 { font-size: 27px; }
  .neo-admin .user-row { padding: 16px; }
  .neo-admin .user-row dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .neo-admin .user-badges { justify-content: flex-start; }
  .neo-admin .user-actions { display: grid; grid-template-columns: 1fr; }
  .neo-admin .admin-dialog .admin-form { padding: 20px; }
  .neo-admin .dialog-header h2 { font-size: 27px; }
  .neo-admin .dialog-actions { padding-bottom: 5px; }
  .neo-admin .dialog-actions button { min-height: 44px; }
  .neo-admin .activity-row time { white-space: normal; }
}
@media (max-width: 360px) {
  .neo-admin .metric-grid, .neo-admin .user-row dl { grid-template-columns: minmax(0, 1fr); }
  .neo-admin .auth-card { padding: 20px; }
  .neo-admin .auth-heading h1 { font-size: 31px; }
}
