/* ── Toast ─────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: min(90vw, 380px);
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--panel-3);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: none;
}

.toast.success {
  border-color: rgba(61, 220, 151, 0.45);
}

.toast.error {
  border-color: rgba(255, 93, 115, 0.5);
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    padding: 10px 16px;
  }

  .topbar-brand {
    min-width: 0;
  }

  .topbar-scope {
    order: 3;
    flex-basis: 100%;
  }

  .panel-body {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
  }

  .nav-item {
    width: auto;
    white-space: nowrap;
  }

  .sidebar-foot {
    display: none;
  }

  .content {
    padding: 24px 16px 48px;
  }

  .campaign-form-grid,
  .modal-form .campaign-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .login-card {
    padding: 28px 22px;
  }

  /* The email is the first thing to go when the top bar gets tight. */
  .user-email {
    display: none;
  }

  .flag-row {
    flex-direction: column;
    align-items: stretch;
  }

  .flag-controls {
    justify-content: flex-start;
    gap: 12px;
  }

  .staff-form .field {
    flex-basis: 100%;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .campaign-form-grid,
  .modal-form .campaign-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .campaign-span-2 {
    grid-column: 1 / -1;
  }

  .campaign-form-actions .btn {
    flex: 1 1 0;
  }
}
