/* ========== User portal — professional SaaS skin ========== */
/* Fonts loaded once via index.html <link> (avoid duplicate @import) */

body.user-portal {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
  color: #e8eefc;
  background: #070b14;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

body.user-portal :root,
body.user-portal {
  --bg: #070b14;
  --text: #e8eefc;
  --muted: #8b97b0;
  --accent: #6ea8ff;
  --accent2: #3ddc97;
  --bad: #ff6b7a;
  --warn: #ffc857;
  --line: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(14, 20, 36, 0.72);
  --card-border: rgba(255, 255, 255, 0.07);
  --card-border-active: rgba(110, 168, 255, 0.35);
  --surface: rgba(255, 255, 255, 0.03);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --mono: ui-monospace, "SF Mono", Consolas, "Cascadia Mono", "Courier New", monospace;
}

@media (prefers-reduced-motion: reduce) {
  body.user-portal #particles,
  body.user-portal .orb {
    display: none !important;
  }
  body.user-portal .splash,
  body.user-portal .app,
  body.user-portal .auth-card,
  body.user-portal .dash-hero,
  body.user-portal .dash-section {
    animation: none !important;
  }
}

/* background polish */
body.user-portal .user-bg {
  background:
    radial-gradient(1000px 520px at 50% -8%, rgba(40, 70, 140, 0.22), transparent 58%),
    radial-gradient(700px 400px at 15% 100%, rgba(30, 50, 100, 0.14), transparent 55%),
    radial-gradient(640px 360px at 90% 80%, rgba(50, 40, 110, 0.12), transparent 52%),
    radial-gradient(1200px 800px at 50% 50%, #0a1020 0%, #05080f 70%, #03050a 100%);
}
body.user-portal #particles {
  opacity: 0.95;
  z-index: 0;
}

body.user-portal .orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}
body.user-portal .orb-a {
  width: 420px; height: 420px;
  top: -80px; left: 10%;
  background: rgba(80, 120, 255, 0.22);
}
body.user-portal .orb-b {
  width: 360px; height: 360px;
  bottom: 5%; right: 5%;
  background: rgba(53, 208, 161, 0.12);
}

/* ---- Top nav ---- */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.92) 0%, rgba(7, 11, 20, 0.55) 70%, transparent 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.top-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.top-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
  background: linear-gradient(135deg, #5b8cff, #35d0a1);
  color: #041018;
  box-shadow: 0 8px 24px rgba(70, 130, 255, 0.25);
}
.brand-logo {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 8px 24px rgba(70, 130, 255, 0.22);
  object-fit: contain;
}
.brand-text { color: var(--text); }
.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.nav-status.is-down { color: var(--warn); }
.nav-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-cta {
  border: 0;
  border-radius: 11px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #4d86ff, #35d0a1);
  color: #041018;
  box-shadow: 0 6px 20px rgba(61, 220, 151, 0.18);
  transition: transform 0.15s, box-shadow 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(61, 220, 151, 0.28);
}

/* ---- Splash / landing ---- */
body.user-portal .splash {
  padding-top: 88px;
  align-items: flex-start;
}
body.user-portal .splash-inner {
  width: min(1080px, 100%);
  text-align: center;
  padding-bottom: 64px;
}

.hero-block {
  max-width: 760px;
  margin: 0 auto 56px;
  padding: 24px 8px 8px;
}

body.user-portal .splash-badge {
  background: rgba(110, 168, 255, 0.08);
  border: 1px solid rgba(110, 168, 255, 0.16);
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

body.user-portal .splash-title {
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #f0f4ff 0%, #8cb4ff 42%, #5ce0b4 78%, #c9f0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.user-portal .splash-desc {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 28px;
}
body.user-portal .splash-desc-sub {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.85;
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

body.user-portal .btn-glow {
  border: 0;
  border-radius: 14px;
  padding: 14px 32px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  background: linear-gradient(135deg, #4d86ff 0%, #3bb8e8 50%, #35d0a1 100%);
  color: #041018;
  box-shadow:
    0 4px 24px rgba(61, 220, 151, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}
body.user-portal .btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(61, 220, 151, 0.32);
}
body.user-portal .btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
body.user-portal .btn-outline:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
body.user-portal .btn-full { width: 100%; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}
.trust-icon { font-size: 13px; opacity: 0.9; }

/* sections */
.section-block {
  margin: 0 auto 48px;
  max-width: 1000px;
  text-align: center;
}
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title {
  margin: 0 0 24px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* packages — equal cards, center-aligned rows */
body.user-portal .pkg-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  align-items: stretch;
  text-align: center;
}
@media (max-width: 1100px) {
  body.user-portal .pkg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  body.user-portal .pkg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  body.user-portal .pkg-grid {
    grid-template-columns: 1fr;
  }
}
/* 套餐卡：统一圆角矩形，禁止任何外发光/径向光（避免看成「大圆圈」） */
body.user-portal .pkg-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  height: 100%;
  min-height: 168px;
  background: #0e1524;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 22px 14px 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  font: inherit;
  width: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none !important;
  outline: none !important;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  box-sizing: border-box;
}
body.user-portal .pkg-card::before,
body.user-portal .pkg-card::after {
  /* 清掉 style.css 里旧的 ::before 遮罩，避免叠出奇怪光圈 */
  content: none !important;
  display: none !important;
}
body.user-portal .pkg-card-shine {
  display: none !important;
}
body.user-portal .pkg-card:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 168, 255, 0.45);
  background: #121a2c;
  box-shadow: none !important;
}
body.user-portal .pkg-card:active {
  transform: translateY(-1px);
}
body.user-portal .pkg-card.selected {
  border-color: #6ea8ff;
  background: #152038;
  box-shadow: none !important;
  transform: translateY(-3px);
}
body.user-portal .pkg-card.selected .pkg-card-price {
  color: #9ec8ff;
}
body.user-portal .pkg-card.selected .pkg-card-cta {
  background: linear-gradient(135deg, #4d86ff, #35d0a1);
  color: #041018;
  border-color: transparent;
}
body.user-portal .pkg-card.pkg-pop {
  animation: none;
}
body.user-portal .pkg-card-cta {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 8px; /* 小圆角矩形，不要 999px 胶囊 */
  border: 1px solid rgba(110, 168, 255, 0.25);
  background: rgba(110, 168, 255, 0.1);
  color: #b8d4ff;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
body.user-portal .pkg-card:hover .pkg-card-cta {
  border-color: rgba(110, 168, 255, 0.4);
  background: rgba(110, 168, 255, 0.16);
  color: #eaf2ff;
}
body.user-portal .pkg-select-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 80;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
  color: #eafff5;
  background: rgba(12, 28, 24, 0.94);
  border: 1px solid rgba(61, 220, 151, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  text-align: center;
}
body.user-portal .pkg-select-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* 推荐：仅右上角小标签，形状与其它卡完全一致 */
body.user-portal .pkg-card.featured {
  border-color: rgba(110, 168, 255, 0.4);
  background: #101828;
  box-shadow: none !important;
}
body.user-portal .pkg-card.featured.selected {
  border-color: #6ea8ff;
  background: #152038;
  box-shadow: none !important;
}
body.user-portal .pkg-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(110, 168, 255, 0.16);
  color: #b8d6ff;
  border: 1px solid rgba(110, 168, 255, 0.28);
  z-index: 2;
  pointer-events: none;
  line-height: 1.2;
}
/* fixed vertical slots so 体验/常用/标准... line up across cards */
body.user-portal .pkg-card-price {
  width: 100%;
  min-height: 2.75em;
  margin: 0 0 10px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 15px;
  font-weight: 750;
  color: #7ec8ff;
  letter-spacing: -0.02em;
  line-height: 1.35;
  word-break: break-word;
}
body.user-portal .pkg-card-tokens {
  width: 100%;
  min-height: 1.5em;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #c5d0e8;
  line-height: 1.35;
  word-break: break-all;
}
body.user-portal .pkg-card-note {
  width: 100%;
  margin: auto 0 0;
  min-height: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

body.user-portal .splash-metering {
  max-width: 640px;
  margin: 8px auto 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  opacity: 0.9;
}

/* eye-catching notice banners */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 720px;
  margin: 18px auto 0;
  padding: 14px 16px;
  border-radius: 14px;
  text-align: left;
  border: 1px solid rgba(255, 200, 87, 0.45);
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.18), rgba(255, 140, 66, 0.08)),
    rgba(20, 16, 8, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 200, 87, 0.12) inset,
    0 10px 36px rgba(255, 160, 40, 0.12);
}
.alert-banner.hidden { display: none !important; }
.alert-banner--warn {
  border-color: rgba(255, 200, 87, 0.5);
}
.alert-banner--compact {
  margin: 10px 0 0;
  max-width: none;
  padding: 11px 12px;
  gap: 10px;
}
.alert-banner-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #1a1200;
  background: linear-gradient(135deg, #ffd36a, #ff9f43);
  box-shadow: 0 0 12px rgba(255, 180, 60, 0.45);
  line-height: 1;
}
.alert-banner-text {
  margin: 0;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.55;
  color: #ffe7b0;
  letter-spacing: 0.01em;
}
.alert-banner--compact .alert-banner-text {
  font-size: 12.5px;
  font-weight: 600;
}
body.user-portal .alert-banner-text {
  color: #ffe7b0;
}

/* steps */
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
  text-align: left;
}
.step-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(12, 18, 32, 0.65);
  backdrop-filter: blur(10px);
}
.step-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.9;
  min-width: 28px;
}
.step-body h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.step-body p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* docs */
body.user-portal .docs-box {
  margin: 0 auto;
  max-width: 820px;
  text-align: left;
  background: rgba(8, 12, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
}
body.user-portal .docs-box.hidden { display: none; }
.docs-head { margin-bottom: 12px; }
body.user-portal .docs-title {
  font-size: 14px;
  font-weight: 650;
  color: #dce7ff;
  margin-bottom: 6px;
}
body.user-portal .docs-line {
  font-size: 12.5px;
  color: var(--muted);
  word-break: break-all;
}
body.user-portal .docs-line code {
  font-family: var(--mono);
  color: #9ec2ff;
  font-size: 12px;
}
body.user-portal .docs-pre {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: #c5d4f5;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 10px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.docs-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}
.docs-tab {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.docs-tab.active {
  color: #eaf1ff;
  border-color: rgba(110, 168, 255, 0.35);
  background: rgba(110, 168, 255, 0.12);
}
.docs-proxy-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--warn);
  line-height: 1.45;
}
.docs-proxy-note:empty { display: none; }

.landing-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: var(--muted);
}

/* hide old splash pool placement (moved to nav) */
body.user-portal .splash-inner > .splash-pool { display: none !important; }

/* ---- App shell ---- */
body.user-portal .app.mode-auth {
  padding-top: 40px;
}
body.user-portal .app.mode-dash .app-wrap {
  width: min(1120px, calc(100% - 40px));
}
body.user-portal .app.mode-auth .app-wrap {
  width: min(440px, calc(100% - 32px));
}

body.user-portal .app.mode-dash .app-head {
  background: rgba(7, 11, 20, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  margin-bottom: 24px;
  padding: 14px 0;
}

body.user-portal .app-logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 8px 24px rgba(70, 130, 255, 0.22);
  display: grid;
  place-items: center;
}
body.user-portal .app-logo-img {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 12px;
  object-fit: contain;
}
body.user-portal .app-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
body.user-portal .app-tagline {
  font-size: 12px;
  color: var(--muted);
}
body.user-portal .app-pool {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  max-width: min(420px, 42vw);
}
body.user-portal .app-logout {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 7px 12px;
}
body.user-portal .app-logout:hover {
  color: var(--bad);
  border-color: rgba(255, 107, 122, 0.25);
  background: rgba(255, 107, 122, 0.08);
}

/* auth card */
body.user-portal .auth-card {
  background: linear-gradient(180deg, rgba(16, 22, 38, 0.92), rgba(10, 14, 26, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 32px 28px 28px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
body.user-portal .auth-kicker {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
body.user-portal .auth-title {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
body.user-portal .auth-sub {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}
body.user-portal .auth-tabs {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  margin: 22px 0 18px;
}
body.user-portal .auth-tab {
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 9px;
  padding: 11px;
}
body.user-portal .auth-tab.active {
  background: rgba(110, 168, 255, 0.14);
  color: #eaf1ff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
body.user-portal .auth-input {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.32);
  padding: 14px 16px 14px 42px;
  font-size: 14px;
  font-family: var(--mono);
  letter-spacing: -0.01em;
}
body.user-portal .auth-input:focus {
  border-color: rgba(110, 168, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.12);
  background: rgba(0, 0, 0, 0.4);
}
body.user-portal .btn-primary {
  border-radius: 12px;
  padding: 14px;
  font-size: 14.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #4d86ff, #35d0a1);
  color: #041018;
  box-shadow: 0 8px 24px rgba(61, 220, 151, 0.15);
  margin-top: 4px;
}
body.user-portal .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(61, 220, 151, 0.22);
}

/* dashboard */
body.user-portal .dash-hero {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(16, 24, 42, 0.92), rgba(10, 16, 30, 0.9));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  padding: 28px 30px;
}
body.user-portal .dash-hero::before {
  background:
    radial-gradient(480px 160px at 0% 0%, rgba(90, 140, 255, 0.16), transparent 60%),
    radial-gradient(400px 140px at 100% 100%, rgba(53, 208, 161, 0.1), transparent 55%);
}
body.user-portal .dash-hero-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
body.user-portal .dash-hero-value {
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #dce8ff, #7ec8ff 45%, #5ce0b4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.user-portal .dash-hero-badge {
  font-size: 11.5px;
  font-weight: 650;
  padding: 5px 12px;
}
body.user-portal .meta-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12.5px;
}
body.user-portal .dash-bar {
  height: 7px;
  background: rgba(255, 255, 255, 0.06);
  max-width: 480px;
}
body.user-portal .issue-quota {
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
}
body.user-portal .issue-quota-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

body.user-portal .dash-section {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(14, 20, 36, 0.88), rgba(10, 14, 26, 0.9));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}
body.user-portal .dash-section-head h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
body.user-portal .chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
}

body.user-portal .dash-empty {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.12);
  min-height: 200px;
}
.empty-icon { font-size: 28px; opacity: 0.5; margin-bottom: 4px; }
.empty-hint { font-size: 12px; color: var(--muted); opacity: 0.8; }

body.user-portal .no-key-guide {
  border-radius: 14px;
  border: 1px solid rgba(255, 200, 87, 0.22);
  background: linear-gradient(135deg, rgba(255, 200, 87, 0.1), rgba(255, 160, 80, 0.05));
  padding: 14px 16px;
  font-size: 13px;
  color: #f3e2b0;
}

body.user-portal .key-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.22);
  padding: 16px 16px 14px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
body.user-portal .key-card:hover {
  border-color: rgba(110, 168, 255, 0.22);
  box-shadow: 0 8px 28px rgba(40, 80, 180, 0.1);
}
body.user-portal .key-card-remain {
  font-size: 18px !important;
  font-weight: 750;
  letter-spacing: -0.03em;
}
body.user-portal .key-card-secret {
  font-family: var(--mono);
  font-size: 11.5px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #b6c8f0;
}
body.user-portal .key-card-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
body.user-portal .btn-mini {
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
body.user-portal .btn-mini:hover {
  background: rgba(110, 168, 255, 0.12);
  border-color: rgba(110, 168, 255, 0.22);
}

body.user-portal .copy-row {
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 12px;
}
body.user-portal .copy-row code {
  font-family: var(--mono);
  font-size: 12px;
  color: #c2d4ff;
}

.help-list {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}
.help-list code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #9ec2ff;
}
.help-card {
  background: linear-gradient(180deg, rgba(110, 168, 255, 0.05), transparent) !important;
}

body.user-portal .app-foot {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
body.user-portal .terms-note {
  margin-top: 6px;
  opacity: 0.8;
  font-size: 11.5px;
}

body.user-portal .dash-tip code {
  font-family: var(--mono);
  font-size: 11px;
  color: #9ec2ff;
}

/* splash pool used inside nav */
body.user-portal .nav-status .pool-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 8px rgba(61, 220, 151, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}
body.user-portal .nav-status.is-down .pool-dot {
  background: var(--warn);
  box-shadow: none;
  animation: none;
}

/* responsive */
@media (max-width: 900px) {
  .steps-row { grid-template-columns: 1fr; }
  .top-nav-actions .nav-status { display: none; }
}
@media (max-width: 640px) {
  .top-nav { padding: 12px 14px; }
  body.user-portal .splash { padding-top: 76px; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  body.user-portal .btn-glow,
  body.user-portal .btn-outline { width: 100%; }
  body.user-portal .pkg-grid { grid-template-columns: 1fr 1fr; }
  .trust-row { gap: 8px; }
  .trust-item { font-size: 11.5px; padding: 6px 10px; }
  body.user-portal .auth-card { padding: 24px 18px 20px; }
  body.user-portal .app.mode-dash .app-wrap { width: calc(100% - 24px); }
}
@media (max-width: 420px) {
  body.user-portal .pkg-grid { grid-template-columns: 1fr; }
  .brand-text { display: none; }
}
