/* Member portal (uses the main site's colors and form styles from style.css) */
.portal-body {
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(0, 245, 160, 0.10), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(5, 150, 105, 0.10), transparent 60%),
    var(--bg-primary);
  min-height: 100vh;
}

.portal-header-btn {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}

.portal-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.portal-main section[hidden] { display: none; }
#view-dashboard { display: flex; flex-direction: column; gap: 20px; }
#view-dashboard[hidden] { display: none; }

.portal-card {
  background: #111217;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.portal-center { text-align: center; }

.portal-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.portal-subtitle {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.portal-muted {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14.5px;
  margin-bottom: 20px;
}

.portal-small { font-size: 12.5px; margin: 14px 0 0; }
.portal-hello { margin-bottom: 4px; font-size: 13px; }

.portal-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.portal-wide { width: 100%; margin-top: 6px; }

.portal-error {
  color: #f87171;
  font-size: 13.5px;
  margin: 4px 0 10px;
}

.portal-note {
  font-size: 13.5px;
  margin-top: 10px;
  color: var(--brand-mint);
}
.portal-note.is-error { color: #f87171; }

.portal-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.portal-foot a,
.portal-steps a { color: var(--brand-mint); text-decoration: none; }
.portal-foot a:hover,
.portal-steps a:hover { text-decoration: underline; }

.portal-badge-ok {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-mint);
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

.portal-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
  font-size: 14px;
}
.portal-summary > div { display: flex; flex-direction: column; gap: 2px; word-break: break-all; }

.portal-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.portal-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
}
.portal-stat strong { font-size: 16px; }

.state-ok { color: var(--brand-mint); }
.state-wait { color: var(--amber); }
.state-bad { color: #f87171; }

.portal-banner {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--border-subtle);
}
.portal-banner.is-ok { background: rgba(0, 245, 160, 0.08); border-color: rgba(0, 245, 160, 0.3); }
.portal-banner.is-wait { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.3); }
.portal-banner.is-bad { background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.3); }

.portal-inline { display: flex; gap: 10px; }
.portal-inline .form-input { flex: 1; }

.portal-steps {
  margin: 8px 0 0 20px;
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
}

.portal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.portal-actions .btn-aurora,
.portal-actions .secondary-button { min-height: 44px; padding: 10px 18px; font-size: 14px; cursor: pointer; }

.portal-pw { margin-top: 20px; max-width: 360px; }

.portal-spinner {
  width: 34px;
  height: 34px;
  margin: 10px auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--brand-mint);
  animation: portal-spin 0.9s linear infinite;
}
@keyframes portal-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .portal-card { padding: 22px; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-inline { flex-direction: column; }
  .portal-header-btn:first-child { display: none; }
}

/* Respect the hidden attribute even on styled buttons/links */
.portal-body [hidden] { display: none !important; }
.portal-body .primary-button { min-width: unset; cursor: pointer; border: none; }
.portal-wide.primary-button { width: 100%; }
.portal-inline .primary-button { min-height: 46px; padding: 10px 22px; }
.portal-actions .primary-button { min-height: 44px; padding: 10px 18px; font-size: 14px; }
@media (max-width: 640px) {
  .portal-inline .form-input { flex: none; min-height: 46px; }
}

/* Discord card */
.portal-discord-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 22px; font-size: 14.5px; font-weight: 600; text-decoration: none; }
#discord-state { margin: 0 0 16px; }
