/* State cards are explicit read/reset/navigation affordances, never inferred
   from message text or response wording. */
:is(.account-page, .admin-page) .dashboard-state {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-column: 1 / -1;
  align-items: start;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  padding: 24px;
  border: 1px solid var(--dashboard-border, #3b2d37);
  border-radius: 8px;
  background: var(--dashboard-surface, #141116);
  color: var(--dashboard-ink, #f2eaf0);
  text-align: left;
  overflow-wrap: anywhere;
}

:is(.account-page, .admin-page) .dashboard-state,
:is(.account-page, .admin-page) .dashboard-state * {
  cursor: auto;
}

:is(.account-page, .admin-page) .dashboard-state[data-state-kind="error"] {
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 16px;
  border-color: #71404b;
  background: #26171d;
}

:is(.account-page, .admin-page) .dashboard-state-icon {
  width: 32px;
  height: 32px;
  color: var(--dashboard-accent, #ff737e);
}

:is(.account-page, .admin-page) .dashboard-state[data-state-kind="error"] .dashboard-state-icon {
  width: 28px;
  height: 28px;
  color: #ffb0b7;
}

:is(.account-page, .admin-page) .dashboard-state-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

:is(.account-page, .admin-page) .dashboard-state-title {
  margin: 0;
  color: var(--dashboard-ink, #f2eaf0);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

:is(.account-page, .admin-page) .dashboard-state-description {
  margin: 0;
  color: var(--dashboard-muted, #bdaeb9);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

:is(.account-page, .admin-page) .dashboard-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

:is(.account-page, .admin-page) .dashboard-state .dashboard-state-action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  height: auto;
  padding: 10px 14px;
  border: 1px solid var(--dashboard-border, #3b2d37);
  border-radius: 6px;
  outline: none;
  box-shadow: none;
  background: var(--dashboard-header, #1c151d);
  color: var(--dashboard-ink, #f2eaf0);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}

:is(.account-page, .admin-page) .dashboard-state-action:first-child {
  border-color: #d9343e;
  background: #d9343e;
  color: #fff;
}

:is(.account-page, .admin-page) .dashboard-state .dashboard-state-action:not(:disabled):not([aria-disabled="true"]):not(:focus-visible):hover {
  border-color: #8a4c60;
  background: #30202b;
}

:is(.account-page, .admin-page) .dashboard-state .dashboard-state-action:first-child:not(:disabled):not([aria-disabled="true"]):not(:focus-visible):hover {
  border-color: #ed7b87;
  background: #c92b36;
}

:is(.account-page, .admin-page) .dashboard-state .dashboard-state-action:not(:disabled):not([aria-disabled="true"]):active {
  filter: brightness(.92);
}

:is(.account-page, .admin-page) .dashboard-state .dashboard-state-action:focus-visible {
  border-color: #ffb0b7;
  outline: none;
  box-shadow: none;
}

:is(.account-page, .admin-page) .dashboard-state .dashboard-state-action:is(:disabled, [aria-disabled="true"]) {
  opacity: .45;
  cursor: not-allowed;
}

.admin-page .empty:has(> .dashboard-state),
.admin-page .dashboard-table-wrap .empty:has(> .dashboard-state) {
  padding: 0;
  border: 0;
  background: transparent;
}

.account-page .account-main .console-table-wrap:empty {
  display: none;
}

.admin-page .admin-state-slot:not([hidden]):has(+ table:not([hidden])) {
  margin-bottom: 16px;
}

:is(.account-page, .admin-page) .dashboard-state[data-state-kind="loading"] .dashboard-state-icon {
  animation: dashboard-state-loading 1.1s linear infinite;
}

@keyframes dashboard-state-loading {
  to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
  :is(.account-page, .admin-page) .dashboard-state {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 16px;
    gap: 12px;
  }

  :is(.account-page, .admin-page) .dashboard-state-icon {
    width: 28px;
    height: 28px;
  }

  :is(.account-page, .admin-page) .dashboard-state-actions .dashboard-state-action {
    flex: 1 1 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.account-page, .admin-page) .dashboard-state[data-state-kind="loading"] .dashboard-state-icon {
    animation: none;
  }

  :is(.account-page, .admin-page) .dashboard-state .dashboard-state-action {
    transition: none;
  }
}
