.setup-page {
  min-height: 100%;
  background: #0c0c0c;
}

.setup-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  height: var(--header-height);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(20px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 11, 0.94);
  backdrop-filter: blur(16px);
}

.setup-header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #777771;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.setup-account {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 10px;
}

.setup-account[hidden] {
  display: none;
}

.setup-account-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #3a3a38;
  border-radius: 50%;
  background: #20201f;
}

.setup-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.setup-account-avatar svg {
  width: 15px;
}

.setup-account > div:last-child {
  display: flex;
  flex-direction: column;
}

.setup-account strong {
  max-width: 160px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-account span {
  color: var(--green);
  font-size: 8px;
}

.setup-layout {
  display: grid;
  min-height: 100svh;
  padding-top: var(--header-height);
  grid-template-columns: minmax(270px, 25vw) 1fr;
}

.setup-sidebar {
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  display: flex;
  width: minmax(270px, 25vw);
  width: 25vw;
  min-width: 270px;
  max-width: 390px;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(40px, 5vw, 72px) clamp(24px, 3vw, 44px) 32px;
  border-right: 1px solid var(--line);
  background-image: linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
}

.setup-sidebar .section-index {
  margin-bottom: 17px;
}

.setup-sidebar h1 {
  max-width: 280px;
  margin: 0;
  font-size: clamp(31px, 3.2vw, 48px);
  line-height: 1.08;
}

.setup-progress {
  display: grid;
  gap: 0;
  margin: 38px 0 auto;
  padding: 0;
  list-style: none;
}

.setup-progress li {
  position: relative;
  display: grid;
  min-height: 72px;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 13px;
  color: #666660;
}

.setup-progress li::after {
  position: absolute;
  top: 30px;
  bottom: -2px;
  left: 15px;
  width: 1px;
  background: #31312f;
  content: "";
}

.setup-progress li:last-child::after {
  display: none;
}

.setup-progress li > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid #393937;
  border-radius: 50%;
  background: #111110;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.setup-progress li > span svg {
  width: 13px;
}

.setup-progress li div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 3px;
}

.setup-progress strong {
  color: inherit;
  font-size: 11px;
}

.setup-progress small {
  color: #5f5f5a;
  font-size: 9px;
}

.setup-progress li.is-current {
  color: var(--paper);
}

.setup-progress li.is-current > span {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
}

.setup-progress li.is-complete {
  color: #a6a69f;
}

.setup-progress li.is-complete > span {
  border-color: rgba(100, 217, 139, 0.45);
  color: var(--green);
}

.setup-progress li.is-complete::after {
  background: rgba(100, 217, 139, 0.35);
}

.sidebar-security {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sidebar-security > svg {
  width: 17px;
  color: var(--green);
}

.sidebar-security p {
  display: flex;
  margin: 0;
  flex-direction: column;
  gap: 5px;
}

.sidebar-security strong {
  font-size: 9px;
}

.sidebar-security span {
  color: #696963;
  font-size: 8px;
  line-height: 1.5;
}

.setup-workspace {
  position: relative;
  grid-column: 2;
  min-width: 0;
  padding: clamp(54px, 7vw, 104px) clamp(28px, 7vw, 110px);
}

.setup-loading {
  position: absolute;
  inset: 0;
  display: flex;
  min-height: calc(100svh - var(--header-height));
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.setup-loading[hidden] {
  display: none;
}

.setup-loading > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setup-loading strong {
  font-size: 12px;
}

.setup-loading span:not(.setup-spinner) {
  color: #767670;
  font-size: 10px;
}

.setup-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #333331;
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: setup-spin 700ms linear infinite;
}

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

.step-panel {
  width: min(1040px, 100%);
  margin: 0 auto;
  animation: setup-panel-in 460ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.step-panel[hidden] {
  display: none;
}

@keyframes setup-panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-heading {
  max-width: 780px;
}

.panel-heading h2,
.complete-panel h2 {
  margin: 0;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.06;
  letter-spacing: 0;
}

.panel-heading > p:last-child,
.complete-panel > p:not(.section-index) {
  max-width: 670px;
  margin: 22px 0 0;
  color: #9d9d97;
  font-size: 15px;
  line-height: 1.75;
}

.community-server {
  display: grid;
  max-width: 760px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-top: 52px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.community-server > img {
  width: 76px;
  height: 76px;
  border-radius: 6px;
  object-fit: cover;
}

.community-server > div > p,
.results-heading p,
.complete-summary span,
.verifier-heading p {
  margin: 0 0 5px;
  color: #6f6f69;
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

.community-server h3 {
  margin: 0 0 7px;
  font-size: 24px;
}

.community-server > div > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #85857f;
  font-size: 9px;
}

.community-server > div > span .status-pulse {
  width: 6px;
  height: 6px;
}

.community-server > svg {
  width: 26px;
  color: var(--yellow);
}

.membership-points {
  display: grid;
  max-width: 760px;
  margin-top: 34px;
  grid-template-columns: repeat(3, 1fr);
}

.membership-points > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  padding: 0 22px;
  border-right: 1px solid var(--line);
}

.membership-points > div:first-child {
  padding-left: 0;
}

.membership-points > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.membership-points svg {
  width: 18px;
  color: var(--green);
}

.membership-points span {
  color: #74746e;
  font-size: 9px;
  line-height: 1.55;
}

.membership-points strong {
  display: block;
  margin-bottom: 4px;
  color: #c3c3bd;
  font-size: 10px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
}

.setup-notice {
  display: flex;
  max-width: 760px;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding: 13px 15px;
  border: 1px solid #403f35;
  border-radius: 4px;
  color: #b8b7a9;
  font-size: 10px;
  line-height: 1.5;
}

.setup-notice[hidden] {
  display: none;
}

.setup-notice svg {
  width: 16px;
  flex: 0 0 auto;
}

.setup-notice-warning {
  border-color: rgba(255, 229, 0, 0.3);
  background: rgba(255, 229, 0, 0.05);
}

.setup-notice-warning svg {
  color: var(--yellow);
}

.setup-notice-error {
  border-color: rgba(255, 113, 104, 0.35);
  background: rgba(255, 113, 104, 0.06);
}

.setup-notice-error svg {
  color: var(--coral);
}

.bot-setup-grid {
  display: grid;
  align-items: start;
  gap: clamp(32px, 5vw, 72px);
  margin-top: 52px;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 0.8fr);
}

.developer-checklist {
  border-top: 1px solid var(--line);
}

.checklist-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: #6d6d67;
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

.checklist-heading a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--yellow);
}

.checklist-heading svg {
  width: 11px;
}

.developer-checklist ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.developer-checklist li {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 13px;
  padding: 21px 0;
  border-bottom: 1px solid var(--line);
}

.developer-checklist li > span {
  color: #6d6d67;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.developer-checklist strong {
  font-size: 12px;
}

.developer-checklist p {
  margin: 6px 0 0;
  color: #777771;
  font-size: 10px;
  line-height: 1.55;
}

.developer-checklist b {
  color: #bdbdb6;
  font-weight: 600;
}

.bot-verifier {
  padding: 23px;
  border: 1px solid #393937;
  border-radius: 6px;
  background: #151514;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.verifier-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.verifier-heading h3 {
  margin: 0;
  font-size: 18px;
}

.verifier-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--ink);
}

.verifier-icon svg {
  width: 22px;
}

.bot-verifier > label {
  display: block;
  margin-bottom: 8px;
  color: #979791;
  font-size: 10px;
  font-weight: 700;
}

.token-input {
  display: grid;
  height: 49px;
  grid-template-columns: 1fr 46px;
  border: 1px solid #3c3c39;
  border-radius: 4px;
  background: #0f0f0f;
}

.token-input:focus-within {
  border-color: var(--yellow);
}

.token-input input {
  min-width: 0;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.token-input button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1px solid #3c3c39;
  background: transparent;
  color: #777771;
  cursor: pointer;
}

.token-input button svg {
  width: 16px;
}

.token-privacy {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 18px;
  color: #6e6e68;
  font-size: 8px;
}

.token-privacy svg {
  width: 13px;
  color: var(--green);
}

.verify-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.verify-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.verify-button svg {
  width: 16px;
}

.verify-button.is-loading svg {
  animation: setup-spin 700ms linear infinite;
}

.bot-verifier .setup-notice {
  margin-top: 14px;
}

.verification-results {
  margin-top: 52px;
  border-top: 1px solid var(--line);
}

.verification-results[hidden] {
  display: none;
}

.results-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.verified-bot-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #3a3a38;
  border-radius: 50%;
  background: #1c1c1b;
}

.verified-bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.verified-bot-avatar svg {
  width: 20px;
}

.results-heading h3 {
  margin: 0;
  font-size: 18px;
}

.diagnostic-grid {
  display: grid;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr 1fr;
}

.diagnostic-group {
  padding: 25px 28px 25px 0;
}

.diagnostic-group + .diagnostic-group {
  padding-right: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.diagnostic-group > p {
  margin: 0 0 13px;
  color: #686862;
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

.diagnostic-row {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #aaa9a3;
  font-size: 10px;
}

.diagnostic-row strong {
  color: #767670;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  font-weight: 500;
}

.diagnostic-row.is-pass strong {
  color: var(--green);
}

.diagnostic-row.is-fail strong {
  color: var(--coral);
}

.guild-results {
  display: grid;
}

.guild-row {
  display: grid;
  grid-template-columns: 31px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.guild-row-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  overflow: hidden;
  place-items: center;
  border-radius: 4px;
  background: #242422;
  color: #aaa9a3;
  font-size: 10px;
  font-weight: 800;
}

.guild-row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guild-row strong {
  font-size: 10px;
}

.guild-row > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 8px;
}

.guild-row > span.is-missing {
  color: var(--coral);
}

.guild-row svg {
  width: 12px;
}

.empty-guilds {
  margin: 0;
  padding: 20px 0;
  color: #777771;
  font-size: 10px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
}

.result-actions[hidden] {
  display: none;
}

.result-actions p {
  width: 100%;
  margin: 0 0 4px;
  color: #85857f;
  font-size: 10px;
}

.complete-panel {
  max-width: 900px;
  padding-top: clamp(18px, 5vw, 68px);
}

.complete-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #08130c;
}

.complete-mark svg {
  width: 28px;
}

.complete-summary {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) minmax(140px, 0.6fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.complete-summary > div:not(.verified-bot-avatar) {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.complete-summary strong {
  font-size: 13px;
}

.ready-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green) !important;
  font-size: 9px !important;
}

.ready-badge .status-pulse {
  width: 7px;
  height: 7px;
}

.bot-fleet {
  width: min(760px, 100%);
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.bot-fleet-heading {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
}

.bot-fleet-heading > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bot-fleet-heading span,
.bot-fleet-row small,
.bot-fleet-status {
  font-family: "DM Mono", monospace;
}

.bot-fleet-heading span {
  color: #676761;
  font-size: 7px;
}

.bot-fleet-heading strong {
  font-size: 11px;
}

.bot-fleet-heading .icon-button {
  width: 36px;
  height: 36px;
  color: var(--yellow);
}

.bot-fleet-list {
  border-top: 1px solid var(--line);
}

.bot-fleet-row {
  display: grid;
  width: 100%;
  min-height: 62px;
  grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--paper);
  text-align: left;
  cursor: pointer;
}

.bot-fleet-row:last-child {
  border-bottom: 0;
}

.bot-fleet-row:hover,
.bot-fleet-row.is-active {
  background: rgba(255, 255, 255, 0.035);
}

.bot-fleet-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #3a3a38;
  border-radius: 4px;
  background: #20201f;
}

.bot-fleet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bot-fleet-row > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.bot-fleet-row strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-fleet-row small {
  color: #666660;
  font-size: 7px;
}

.bot-fleet-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--coral);
  font-size: 7px;
}

.bot-fleet-status.is-ready {
  color: var(--green);
}

.bot-fleet-status svg,
.bot-fleet-row > svg {
  width: 13px;
}

@media (max-width: 1050px) {
  .setup-layout {
    grid-template-columns: 230px 1fr;
  }

  .setup-sidebar {
    width: 230px;
    min-width: 230px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .setup-workspace {
    padding-right: 38px;
    padding-left: 38px;
  }

  .bot-setup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .setup-header {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .setup-header-status {
    display: none;
  }

  .setup-account > div:last-child {
    display: none;
  }

  .setup-layout {
    display: block;
  }

  .setup-sidebar {
    position: static;
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 36px 20px 0;
    border-right: 0;
    background-size: 40px 40px;
  }

  .setup-sidebar h1 {
    font-size: 34px;
  }

  .setup-progress {
    grid-template-columns: repeat(4, 1fr);
    margin: 30px 0 0;
  }

  .setup-progress li {
    min-width: 0;
    min-height: 54px;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .setup-progress li::after {
    top: 15px;
    right: 0;
    bottom: auto;
    left: 31px;
    width: calc(100% - 31px);
    height: 1px;
  }

  .setup-progress li > span {
    width: 31px;
  }

  .setup-progress li div {
    padding-right: 5px;
  }

  .setup-progress strong {
    font-size: 8px;
  }

  .setup-progress small,
  .sidebar-security {
    display: none;
  }

  .setup-workspace {
    padding: 56px 20px 80px;
  }

  .panel-heading h2,
  .complete-panel h2 {
    font-size: 40px;
  }

  .community-server {
    grid-template-columns: auto 1fr;
  }

  .community-server > svg {
    display: none;
  }

  .membership-points {
    grid-template-columns: 1fr;
  }

  .membership-points > div,
  .membership-points > div:first-child,
  .membership-points > div:last-child {
    padding: 15px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .panel-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions .button {
    width: 100%;
  }

  .bot-setup-grid {
    grid-template-columns: 1fr;
  }

  .diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .diagnostic-group,
  .diagnostic-group + .diagnostic-group {
    padding: 22px 0;
    border-left: 0;
  }

  .diagnostic-group + .diagnostic-group {
    border-top: 1px solid var(--line);
  }

  .complete-summary {
    grid-template-columns: auto 1fr;
  }

  .complete-summary > div:nth-child(3),
  .complete-summary .ready-badge {
    grid-column: 2;
  }
}
