.page-dashboard {
  background: radial-gradient(
      ellipse 120% 80% at 50% -20%,
      rgba(0, 149, 255, 0.12),
      transparent 55%
    ),
    var(--color-bg);
}

.dashboard-hint--hidden {
  display: none !important;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin: 0;
  border-bottom: 1px solid var(--color-border);
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.dashboard-header__brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.dashboard-header__brand:hover {
  color: var(--color-accent);
}

.dashboard-header__nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.dashboard-header__link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* When the link is actually a <button>, strip the native chrome. */
button.dashboard-header__link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.dashboard-header__link:hover {
  color: var(--color-text);
}

/* Primary action — solid so it reads as the main thing to do here. */
button.dashboard-header__new-bot {
  color: #fff;
  background: var(--color-accent-strong);
  border: 1.5px solid var(--color-accent-strong);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.9rem;
}

button.dashboard-header__new-bot:hover {
  background: #1f7ad6;
  border-color: #1f7ad6;
  color: #fff;
}

/* Secondary action — quiet outline. */
button.dashboard-header__billing {
  color: var(--color-text);
  background: transparent;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.9rem;
}

button.dashboard-header__billing:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.dashboard-header__sign-out {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.dashboard-header__sign-out:hover {
  color: var(--color-danger);
}

.dashboard-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.dashboard-hero {
  margin-bottom: 2rem;
}

.dashboard-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.dashboard-hero__subtitle {
  margin-top: 0.5rem;
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 36rem;
}

.dashboard-hint {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.dashboard-state {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.dashboard-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-border-strong);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: dashboard-spin 0.7s linear infinite;
}

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

.dashboard-error {
  color: var(--color-danger);
  border-color: rgba(255, 92, 92, 0.35);
  background: rgba(255, 92, 92, 0.08);
}

.dashboard-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-border-strong);
  background: rgba(37, 37, 37, 0.5);
  margin-bottom: 2rem;
}

.dashboard-empty__title {
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.dashboard-empty__text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 22rem;
  margin: 0 auto 1.25rem;
}

.dashboard-empty__cta {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-accent-strong);
  color: #fff !important;
  cursor: pointer;
}

.dashboard-empty__cta:hover {
  background: #1f7ad6;
}

.bots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}

.bot {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  animation: bot-card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bot-card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bot:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
}

.bot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bot__open-btn {
  padding: 0.5rem 1rem;
  height: fit-content;
  color: var(--color-text);
  background-color: transparent;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.bot__open-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.bot__macros-btn {
  padding: 0.5rem 1rem;
  height: fit-content;
  color: var(--color-text);
  background-color: transparent;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.bot__macros-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* Feature not on the current plan — struck through, with a hover note. */
.bot__macros-btn--locked {
  position: relative;
  text-decoration: line-through;
  opacity: 0.5;
  cursor: not-allowed;
}

.bot__macros-btn--locked:hover::after,
.bot__macros-btn--locked:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: #000;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 20;
}

.bot__head {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  image-rendering: pixelated;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.bot__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bot__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.bot__username {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: break-word;
}

.bot__type {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

.bot__status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bot__status--online {
  background: rgba(30, 227, 136, 0.12);
  color: var(--color-success);
}

.bot__status--offline {
  background: rgba(255, 92, 92, 0.1);
  color: var(--color-danger);
}

.bot__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.bot__status--online .bot__status-dot {
  box-shadow: 0 0 0 0 rgba(30, 227, 136, 0.5);
  animation: bot-pulse 2s ease-out infinite;
}

@keyframes bot-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(30, 227, 136, 0.45);
  }
  70% {
    box-shadow: 0 0 0 6px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.bot__meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

@media (max-width: 480px) {
  .bot {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bot__row--top {
    flex-direction: column;
    align-items: center;
  }

}

/* ─── Login dialog: Java / Bedrock segmented toggle ───────────────────── */
.edition-toggle {
  border: 0;
  padding: 0;
  margin: 0.15rem 0 0.35rem;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 0.4rem;
}

.edition-toggle > legend {
  flex: 1 0 100%;
  padding: 0;
}

.edition-toggle__opt {
  cursor: pointer;
}

.edition-toggle__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.edition-toggle__opt span {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border-strong);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  user-select: none;
}

.edition-toggle__opt:hover span {
  border-color: var(--color-text);
  color: var(--color-text);
}

.edition-toggle__opt input:checked + span {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  color: #fff;
}

.edition-toggle__opt input:focus-visible + span {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
