/* Account dashboard + shared toast */

[hidden],
.acct__panel[hidden],
.acct__error[hidden],
.acct__note[hidden],
.acct-toast[hidden] {
  display: none !important;
}

.acct-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 100;
  transform: translateX(-50%);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f5f5f5;
  font-size: 0.86rem;
  font-family: var(--font-body, "Inter", sans-serif);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.account-page {
  min-height: 100vh;
}

/* Slim account chrome */
.acct-top {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  background: rgba(7, 7, 7, 0.88);
  backdrop-filter: blur(12px);
}

.acct-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding-block: 0.75rem;
}

.acct-top__crumb {
  margin: 0 0 0.15rem;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted, #8a8a8a);
}

.acct-top__title {
  margin: 0;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.acct-top__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.acct {
  position: relative;
  z-index: 1;
  padding: 2rem 0 4rem;
}

.acct__layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 2rem 2.5rem;
  align-items: start;
  animation: acct-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes acct-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.acct__side {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: var(--radius-md, 12px);
  background: rgba(12, 12, 12, 0.85);
}

.acct__profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
}

.acct__avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text, #f5f5f5);
}

.acct__profile-text {
  min-width: 0;
}

.acct__name {
  margin: 0 0 0.2rem;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct__email {
  margin: 0;
  color: var(--text-muted, #8a8a8a);
  font-size: 0.82rem;
  word-break: break-word;
}

.acct__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.acct__nav-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid transparent;
  color: var(--text-muted, #8a8a8a);
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.acct__nav-btn svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.acct__nav-btn:hover {
  color: var(--text, #f5f5f5);
  background: rgba(255, 255, 255, 0.04);
}

.acct__nav-btn:hover svg {
  opacity: 1;
}

.acct__nav-btn.is-active {
  color: var(--text, #f5f5f5);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

.acct__nav-btn.is-active svg {
  opacity: 1;
}

.acct__help {
  margin-top: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm, 8px);
  background: rgba(255, 255, 255, 0.03);
}

.acct__help-label {
  margin: 0 0 0.35rem;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text, #f5f5f5);
}

.acct__help-copy {
  margin: 0 0 0.85rem;
  color: var(--text-muted, #8a8a8a);
  font-size: 0.84rem;
  line-height: 1.45;
}

.acct__help-btn {
  width: 100%;
  font-size: 0.86rem;
}

.acct__main {
  min-width: 0;
  max-width: 720px;
  animation: acct-panel-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.08s;
}

@keyframes acct-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.acct__panel.is-active {
  display: block;
}

.acct__heading {
  margin: 0 0 0.45rem;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.acct__lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted, #8a8a8a);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 48ch;
}

.acct__lead--tight {
  margin-bottom: 1rem;
  max-width: none;
}

/* Summary / cards */
.acct__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.acct__stat {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: var(--radius-md, 12px);
  background: rgba(12, 12, 12, 0.85);
}

.acct__stat-label {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #8a8a8a);
}

.acct__stat-value {
  margin: 0;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.acct__card {
  margin-bottom: 1.15rem;
  padding: 1.25rem 1.3rem;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: var(--radius-md, 12px);
  background: rgba(12, 12, 12, 0.85);
}

.acct__card--stack {
  display: grid;
  gap: 1.25rem;
}

.acct__card-head {
  margin-bottom: 0.85rem;
}

.acct__card-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.acct__card-head .acct__card-title {
  margin-bottom: 0;
}

.acct__meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
}

.acct__meta-item {
  min-width: 0;
}

.acct__meta-label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #8a8a8a);
}

.acct__meta-value {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #f5f5f5);
}

.acct__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs, 4px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.acct__badge--muted {
  color: var(--text-muted, #8a8a8a);
  border-color: rgba(255, 255, 255, 0.1);
  background: transparent;
}

.acct__keys,
.acct__orders {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.acct__empty {
  margin: 0;
  padding: 1.35rem 1.25rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md, 12px);
  color: var(--text-muted, #8a8a8a);
  font-size: 0.95rem;
  line-height: 1.55;
}

.acct__empty a,
.acct__hint a,
.acct__purchase-note a,
.acct__key-pending a {
  color: var(--text, #f5f5f5);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.acct__key,
.acct__order {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: var(--radius-md, 12px);
  background: rgba(12, 12, 12, 0.85);
}

.acct__key-top,
.acct__order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.acct__key-product,
.acct__order-product {
  margin: 0;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-weight: 650;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.acct__key-meta,
.acct__order-meta {
  margin: 0 0 0.65rem;
  color: var(--text-muted, #8a8a8a);
  font-size: 0.82rem;
}

.acct__purchase-note {
  margin: 0.65rem 0 0;
  color: var(--text-muted, #8a8a8a);
  font-size: 0.82rem;
  line-height: 1.45;
}

.acct__key-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}

.acct__key-code {
  flex: 1 1 12rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm, 8px);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  word-break: break-all;
  user-select: all;
}

.acct__copy {
  flex: 0 0 auto;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #f5f5f5);
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.acct__copy:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.acct__copy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.acct__form {
  display: grid;
  gap: 1rem;
}

.acct__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.acct__pill {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #8a8a8a);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.acct__pill:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text, #f5f5f5);
}

.acct__pill.is-active {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text, #f5f5f5);
}

.acct__order-pick {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 16rem;
  overflow: auto;
  padding: 0.15rem;
}

.acct__order-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: var(--radius-md, 12px);
  background: rgba(12, 12, 12, 0.85);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.acct__order-option:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 20, 0.95);
}

.acct__order-option.is-selected {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.acct__order-option-product {
  margin: 0 0 0.3rem;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text, #f5f5f5);
}

.acct__order-option-meta {
  margin: 0;
  color: var(--text-muted, #8a8a8a);
  font-size: 0.8rem;
}

.acct__field {
  display: grid;
  gap: 0.4rem;
}

.acct__field span {
  font-size: 0.86rem;
  font-weight: 600;
  color: #cfcfcf;
}

.acct__field span em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-muted, #8a8a8a);
}

.acct__field input,
.acct__field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0a0a;
  color: var(--text, #f5f5f5);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease;
  resize: vertical;
}

.acct__field input:focus,
.acct__field textarea:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

.acct__field input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  color: var(--text-muted, #8a8a8a);
}

.acct__field input::placeholder,
.acct__field textarea::placeholder {
  color: #555;
}

.acct__error {
  margin: 0;
  color: #fb7185;
  font-size: 0.88rem;
}

.acct__note {
  margin: 0 0 1.25rem;
  padding: 0.95rem 1.05rem;
  border-radius: var(--radius-md, 12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #8a8a8a);
  font-size: 0.9rem;
  line-height: 1.5;
}

.acct__note p {
  margin: 0;
}

.acct__note strong {
  color: var(--text, #f5f5f5);
  font-weight: 650;
  text-transform: capitalize;
}

.acct__hint {
  margin: 0.35rem 0 0;
  color: var(--text-muted, #8a8a8a);
  font-size: 0.88rem;
  line-height: 1.5;
}

.acct__form .btn {
  justify-self: start;
  margin-top: 0.25rem;
}

.acct__upload {
  display: grid;
  gap: 0.35rem;
}

.acct__upload-btn {
  justify-self: start;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #121212;
  color: #f0f0f0;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.acct__upload-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: #181818;
}

.acct__upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.acct__upload-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0a0a0a;
}

.acct__upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.acct__upload-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.acct__bullets {
  margin: 0 0 1.15rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.acct__bullets li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-muted, #8a8a8a);
  font-size: 0.92rem;
  line-height: 1.45;
}

.acct__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.acct__discord-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.acct__discord-status-text {
  min-width: 0;
}

.acct__discord-status-text p {
  margin: 0.35rem 0 0;
  color: var(--text-muted, #8a8a8a);
  font-size: 0.9rem;
  line-height: 1.45;
}

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

@media (max-width: 900px) {
  .acct__stats {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .acct {
    padding-top: 1.35rem;
  }

  .acct__layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .acct__side {
    position: static;
  }

  .acct__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .acct__nav-btn {
    width: auto;
    padding: 0.5rem 0.7rem;
    font-size: 0.84rem;
  }

  .acct__nav-btn svg {
    width: 15px;
    height: 15px;
  }

  .acct__help {
    display: none;
  }

  .acct__main {
    max-width: none;
  }

  .acct-top__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .acct-top__actions {
    width: 100%;
    justify-content: stretch;
  }

  .acct-top__actions .btn {
    flex: 1 1 auto;
  }
}
