/* ============================================================
   XXE RIOT — Member dashboard (clean shell)
   ============================================================ */

:root {
  --dash-side: 232px;
  --dash-top: 56px;
  --dash-pad: clamp(24px, 4vw, 48px);
  --dash-max: 720px;
  --dash-r: 10px;
}

body.page-dash {
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.dash {
  display: grid;
  grid-template-columns: var(--dash-side) 1fr;
  height: 100dvh;
}

/* ── Sidebar ─────────────────────────────────────────── */
.dash__side {
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  border-right: 1px solid rgba(122, 240, 60, .1);
  background: var(--bg-2);
}

.dash__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  margin-bottom: 4px;
}

.dash__brand-mark {
  width: 32px;
  height: 26px;
  object-fit: contain;
}

.dash__brand-txt {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--txt);
}

.dash__brand-txt b {
  color: var(--acid);
}

.dash__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.dash__link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--txt-dim);
  font: 400 13px/1.2 'JetBrains Mono', monospace;
  text-align: left;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}

.dash__link svg {
  width: 17px;
  height: 17px;
  opacity: .65;
}

.dash__link:hover {
  color: var(--txt);
  background: rgba(255, 255, 255, .03);
}

.dash__link:hover svg {
  opacity: 1;
}

.dash__link.is-active {
  color: var(--acid);
  background: rgba(107, 240, 49, .08);
}

.dash__link.is-active svg {
  opacity: 1;
  color: var(--acid);
}

.dash__link.is-soon {
  opacity: .45;
  cursor: default;
}

.dash__link.is-soon:hover {
  background: transparent;
  color: var(--txt-dim);
}

.dash__badge {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--txt-dim);
}

.dash__side-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(122, 240, 60, .1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
}

.dash__user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(107, 240, 49, .35);
  background: var(--bg-3);
}

.dash__user-name {
  display: block;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash__user-id {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--txt-dim);
}

.dash__logout,
.dash__ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(122, 240, 60, .16);
  background: transparent;
  color: var(--txt-dim);
  font-size: 12px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.dash__logout:hover,
.dash__ghost:hover {
  color: var(--txt);
  background: rgba(255, 255, 255, .03);
  border-color: rgba(107, 240, 49, .35);
}

.dash__logout svg {
  width: 14px;
  height: 14px;
}

.dash__menu-btn {
  display: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(122, 240, 60, .18);
  background: transparent;
  color: var(--txt);
  cursor: pointer;
}

/* ── Main ────────────────────────────────────────────── */
.dash__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.dash__top {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--dash-top);
  padding: 0 var(--dash-pad);
  border-bottom: 1px solid rgba(122, 240, 60, .08);
}

.dash__crumb-title {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--txt);
}

.dash__build {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--txt-dim);
}

.dash__build b {
  color: var(--acid);
  font-weight: 400;
}

.dash__content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--dash-pad);
}

.dash__panel {
  display: none;
  max-width: var(--dash-max);
}

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

.dash__panel[hidden] {
  display: none !important;
}

.dash__panel h1 {
  margin: 0 0 8px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: .02em;
  color: var(--txt);
}

.dash__lede {
  margin: 0 0 28px;
  color: var(--txt-2);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 48ch;
}

/* Overview actions */
.dash__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.dash__action {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(122, 240, 60, .12);
  border-radius: var(--dash-r);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.dash__action:hover {
  border-color: rgba(107, 240, 49, .35);
  background: rgba(107, 240, 49, .04);
}

.dash__action svg {
  width: 18px;
  height: 18px;
  color: var(--acid);
  flex: none;
}

.dash__action-text {
  flex: 1;
  min-width: 0;
}

.dash__action-text strong {
  display: block;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 14px;
  color: var(--txt);
  margin-bottom: 2px;
}

.dash__action-text small {
  display: block;
  font-size: 12px;
  color: var(--txt-dim);
}

.dash__action em {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--acid);
}

.dash__hint {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(122, 240, 60, .1);
  color: var(--txt-dim);
  font-size: 12.5px;
  line-height: 1.55;
}

/* Setup */
.dash__block {
  margin-bottom: 32px;
}

.dash__block:last-child {
  margin-bottom: 0;
}

.dash__block h2 {
  margin: 0 0 14px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--txt-dim);
}

.dash__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.dash__steps > li {
  position: relative;
  padding: 12px 0 12px 40px;
  border-bottom: 1px solid rgba(122, 240, 60, .08);
  counter-increment: step;
  color: var(--txt-2);
  font-size: 13px;
  line-height: 1.5;
}

.dash__steps > li:last-child {
  border-bottom: 0;
}

.dash__steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(107, 240, 49, .08);
  color: var(--acid);
  font-size: 11px;
  font-weight: 700;
}

.dash__steps > li strong {
  display: block;
  color: var(--txt);
  font-weight: 400;
  margin-bottom: 2px;
}

.dash__steps > li p {
  margin: 0;
}

.dash__steps a {
  color: var(--acid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dash__flow {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--txt-2);
  font-size: 13.5px;
  line-height: 1.7;
}

.dash__flow code {
  color: var(--acid);
  font-size: 12px;
  margin-right: 6px;
}

.dash__rules {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--txt-2);
  font-size: 13px;
  line-height: 1.6;
}

.dash__rules li + li {
  margin-top: 8px;
}

.dash__rules li::before {
  content: '— ';
  color: var(--acid-dim);
}

/* Release */
.dash__release {
  padding: 8px 0;
}

.dash__release-status {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--txt-dim);
}

.dash__release-status.is-bad {
  color: #FF8A6B;
}

.dash__release h2 {
  margin: 0 0 8px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--txt);
  word-break: break-all;
}

.dash__release-meta {
  margin: 0 0 22px;
  color: var(--txt-dim);
  font-size: 12.5px;
}

.dash__dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--acid);
  color: var(--on-acid);
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dash__dl:hover {
  background: var(--acid-hot);
}

.dash__dl[hidden] {
  display: none !important;
}

.dash__keys-status {
  padding-bottom: 8px;
}

.dash__keys-msg {
  margin: 0 0 14px;
  color: var(--txt-2);
  font-size: 13.5px;
  line-height: 1.5;
}

.dash__keys-msg.is-ok {
  color: var(--acid);
}

.dash__keys-msg.is-bad {
  color: #FFB39A;
}

.dash__keys-meta {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--txt-dim);
  font-size: 12px;
}

.dash__keys-meta li b {
  color: var(--txt-2);
  font-weight: 400;
}

.dash__keys-result {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(107, 240, 49, .3);
  background: rgba(107, 240, 49, .06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--acid);
  word-break: break-all;
}

.dash__keys-history {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dash__keys-history li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(122, 240, 60, .08);
}

.dash__keys-history li:last-child {
  border-bottom: 0;
}

.dash__keys-code {
  flex: 1;
  min-width: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--txt);
  word-break: break-all;
}

.dash__keys-when {
  flex: none;
  font-size: 11px;
  color: var(--txt-dim);
}

.dash__keys-copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(122, 240, 60, .18);
  border-radius: 8px;
  background: transparent;
  color: var(--txt-dim);
  cursor: pointer;
}

.dash__keys-copy:hover {
  color: var(--acid);
  border-color: rgba(107, 240, 49, .4);
}

.dash__keys-copy svg {
  width: 14px;
  height: 14px;
}

.dash__keys-empty {
  color: var(--txt-dim);
  font-size: 13px;
  border-bottom: 0 !important;
}

.dash__empty {
  padding: 48px 0;
  color: var(--txt-dim);
  font-size: 13.5px;
}

.dash__empty h1 {
  margin-bottom: 8px;
}

.dash__gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--txt-dim);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.dash__gate[hidden] {
  display: none !important;
}

body.page-dash:not(.is-authed) .dash {
  visibility: hidden;
}

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

  .dash__side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 260px);
    z-index: 30;
    transform: translateX(-105%);
    transition: transform .28s ease;
  }

  body.page-dash.is-side-open .dash__side {
    transform: none;
  }

  body.page-dash.is-side-open::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(0, 0, 0, .5);
  }

  .dash__menu-btn {
    display: grid;
  }
}

/* Tester A&B feedback form */
.fb-form {
  margin-top: 8px;
}

.fb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.fb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--txt-dim);
}

.fb-field em {
  color: var(--acid);
  font-style: normal;
}

.fb-field small {
  opacity: .75;
  letter-spacing: 0;
  text-transform: none;
}

.fb-field--full {
  grid-column: 1 / -1;
}

.fb-input,
.fb-textarea,
.fb-file {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid rgba(122, 240, 60, .18);
  background: var(--bg-2);
  color: var(--txt);
  font: inherit;
}

.fb-textarea {
  resize: vertical;
  min-height: 96px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.45;
}

.fb-file {
  padding: 10px;
  cursor: pointer;
}

.fb-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.fb-previews img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(122, 240, 60, .16);
  background: #0c100e;
}

.fb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.fb-msg {
  margin: 0;
  font-size: 13px;
  color: var(--txt-dim);
}

.fb-msg.is-ok {
  color: var(--acid);
}

.fb-msg.is-bad {
  color: #ff8a8a;
}

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