:root {
  --bg: #070b14;
  --bg-soft: #0d1324;
  --panel: rgba(15, 21, 39, 0.92);
  --panel-strong: rgba(20, 28, 52, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef2ff;
  --muted: rgba(222, 229, 255, 0.68);
  --gold: #f2c879;
  --gold-strong: #dfad4f;
  --gold-soft: rgba(242, 200, 121, 0.16);
  --violet: #9d8bff;
  --blue: #66a8ff;
  --green: #2fd08e;
  --red: #ef6a63;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(102, 168, 255, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(157, 139, 255, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(242, 200, 121, 0.08), transparent 26%),
    linear-gradient(180deg, #070b14 0%, #0a1120 100%);
}

a,
button,
input {
  font: inherit;
}

.member-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 20px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(157, 139, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(10, 15, 28, 0.96), rgba(6, 9, 18, 0.98));
  backdrop-filter: blur(24px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 12px 28px rgba(102, 168, 255, 0.34);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-user-card {
  margin-top: 26px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-user-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-user-name {
  margin-top: 10px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.sidebar-user-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.sidebar-secondary-link {
  color: rgba(242, 200, 121, 0.9);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.content {
  padding: 28px 28px 44px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(242, 200, 121, 0.12), transparent 24%),
    radial-gradient(circle at bottom left, rgba(157, 139, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(12, 17, 31, 0.96), rgba(15, 21, 39, 0.94));
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.gold {
  color: var(--gold);
}

.topbar h1 {
  margin: 10px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.05em;
  line-height: 0.98;
  color: var(--gold);
}

.topbar p {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.gold-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gold-button {
  border: 0;
  color: #241504;
  background: linear-gradient(135deg, #f5d08c, #dca84b);
  box-shadow: 0 16px 34px rgba(242, 200, 121, 0.18);
}

.ghost-button {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.gold-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 0.62fr));
  gap: 16px;
  margin-top: 18px;
}

.hero-card,
.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(157, 139, 255, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(13, 19, 36, 0.96), rgba(9, 14, 28, 0.96));
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 24px;
}

.hero-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hero-card h2 {
  margin: 10px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.badge.dark {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.badge.gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.hero-copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.metric-card {
  padding: 20px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-value {
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.metric-value.compact {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.3;
}

.metric-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.dashboard-grid,
.billing-grid,
.content-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
}

.billing-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
}

.content-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-head h3 {
  margin: 8px 0 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.panel-note {
  max-width: 320px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.chart-shell {
  margin-top: 18px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#fortuneChart {
  width: 100%;
  display: block;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chart-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.mini-stat,
.security-card,
.report-card,
.benefit-card {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-stat {
  padding: 16px;
}

.mini-stat span,
.security-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-stat strong,
.security-card strong {
  display: block;
  margin-top: 12px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.profile-form {
  margin-top: 18px;
}

.field-grid {
  display: grid;
  gap: 12px;
}

.field-grid.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

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

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.field input:disabled {
  opacity: 0.68;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.inline-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.inline-status.ok {
  color: var(--green);
}

.inline-status.error {
  color: var(--red);
}

.reports-list,
.benefits-grid,
.security-grid,
.plans-grid,
.orders-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.report-card,
.benefit-card,
.security-card {
  padding: 16px;
}

.report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.report-card strong {
  display: block;
  font-size: 16px;
}

.report-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.report-summary,
.benefit-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.subscription-strip,
.payment-bridge,
.plan-card,
.order-card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.subscription-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
}

.subscription-strip-label,
.plan-meta,
.payment-bridge-note,
.order-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.subscription-copy strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.subscription-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.plans-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.plan-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.plan-card.is-current {
  border-color: rgba(242, 200, 121, 0.28);
  box-shadow: inset 0 0 0 1px rgba(242, 200, 121, 0.12);
}

.plan-card-head,
.payment-bridge-head,
.order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-card strong,
.payment-bridge strong,
.order-card strong {
  font-size: 17px;
}

.plan-price {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--gold);
}

.plan-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 13px;
}

.plan-action {
  width: 100%;
}

.payment-bridge {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
}

.payment-qr-shell {
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: 18px;
  background: rgba(7, 11, 20, 0.7);
  border: 1px dashed rgba(242, 200, 121, 0.16);
}

.payment-qr-canvas {
  display: grid;
  place-items: center;
}

.payment-qr-canvas canvas {
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.payment-qr-empty,
.payment-qr-fallback {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.7;
  padding: 16px;
}

.payment-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.payment-link-row input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.order-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.order-grid div {
  display: grid;
  gap: 6px;
}

.order-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-grid strong {
  font-size: 16px;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.order-note.success {
  color: var(--green);
}

.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

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

.benefits-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.benefit-card strong {
  display: block;
  font-size: 16px;
}

.security-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
  text-align: center;
  padding: 18px;
  line-height: 1.7;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.chart-axis-line {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1.4;
}

.chart-line {
  fill: none;
  stroke: url(#fortuneGradient);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#areaGradient);
}

.chart-dot {
  fill: #0b1020;
  stroke: var(--gold);
  stroke-width: 3;
}

.chart-label {
  fill: rgba(222, 229, 255, 0.66);
  font-size: 12px;
}

.chart-value-label {
  fill: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

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

  .dashboard-grid,
  .billing-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .member-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content {
    padding: 18px 16px 32px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .field-grid.two-column,
  .security-grid,
  .stats-grid,
  .order-grid,
  .payment-link-row {
    grid-template-columns: 1fr;
  }

  .topbar,
  .hero-card,
  .metric-card,
  .panel {
    padding: 18px;
    border-radius: 24px;
  }
}
