body.auth-pending {
  visibility: visible !important;
}

body.auth-pending > *:not(.dashboard-auth-state) {
  opacity: .28;
  pointer-events: none;
}

.dashboard-auth-state {
  position: fixed;
  inset: 1rem 1rem auto;
  z-index: 1000;
  max-width: 34rem;
  margin: auto;
  padding: .8rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: .65rem;
  background: #fff;
  color: #334155;
  box-shadow: 0 12px 30px rgb(15 23 42 / .12);
}

.dashboard-auth-state--error {
  border-color: #fecaca;
  color: #991b1b;
}

.dashboard-navigation {
  display: flex;
  width: min(100% - 2rem, 80rem);
  margin: auto;
  gap: 1.5rem;
  overflow-x: auto;
  padding: .65rem 0;
}

.dashboard-navigation__group {
  display: flex;
  align-items: center;
  gap: .25rem;
  white-space: nowrap;
}

.dashboard-navigation__label {
  margin-right: .25rem;
  color: #64748b;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-navigation__link {
  border-radius: .45rem;
  padding: .45rem .65rem;
  color: #334155;
  font-size: .875rem;
  font-weight: 600;
}

.dashboard-navigation__link:hover,
.dashboard-navigation__link:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.dashboard-navigation__link[aria-current="page"] {
  background: #fff1eb;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

.dashboard-freshness {
  margin: 0 0 .75rem;
  color: #64748b;
  font-size: .78rem;
}

#dashboardFeedbackLayer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

.dashboard-toast {
  width: min(28rem, calc(100vw - 2rem));
  margin: 1rem 1rem 0 auto;
  padding: .8rem 1rem;
  transform: translateY(-.5rem);
  border: 1px solid #cbd5e1;
  border-radius: .65rem;
  background: #fff;
  color: #334155;
  box-shadow: 0 12px 30px rgb(15 23 42 / .18);
  opacity: 0;
  pointer-events: auto;
  transition: opacity .18s ease, transform .18s ease;
}

.dashboard-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.dashboard-toast--error {
  border-color: #fecaca;
  color: #991b1b;
}

.dashboard-toast--success {
  border-color: #bbf7d0;
  color: #166534;
}

.dashboard-dialog-backdrop {
  display: grid;
  position: absolute;
  inset: 0;
  place-items: center;
  padding: 1rem;
  background: rgb(15 23 42 / .55);
  pointer-events: auto;
}

.dashboard-dialog {
  width: min(100%, 30rem);
  padding: 1.25rem;
  border-radius: .8rem;
  background: #fff;
  box-shadow: 0 24px 60px rgb(15 23 42 / .35);
}

.dashboard-dialog h2 {
  margin: 0 0 .5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.dashboard-dialog p {
  margin: 0 0 1rem;
  color: #475569;
}

.dashboard-dialog__input {
  width: 100%;
  margin-bottom: 1rem;
  padding: .65rem .75rem;
  border: 1px solid #94a3b8;
  border-radius: .45rem;
}

.dashboard-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}

.dashboard-dialog__button {
  min-height: 2.75rem;
  padding: .55rem .85rem;
  border: 1px solid #cbd5e1;
  border-radius: .45rem;
  background: #fff;
  font-weight: 650;
}

.dashboard-dialog__button--primary {
  border-color: #c2410c;
  background: #c2410c;
  color: #fff;
}

.dashboard-dialog__button--danger {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}

.data-state {
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: .6rem;
  color: #64748b;
  text-align: center;
}

@media (max-width: 640px) {
  html {
    font-size: 100%;
  }

  body {
    overflow-x: hidden;
  }

  header > div,
  .dashboard-navigation {
    width: min(100% - 1rem, 80rem);
  }

  header > div {
    flex-wrap: wrap;
    gap: .6rem;
  }

  .dashboard-navigation {
    gap: 1rem;
  }

  .dashboard-navigation__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  main {
    padding-inline: .75rem !important;
  }

  table {
    min-width: 42rem;
  }

  button,
  input,
  select {
    min-height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
