/* ============================================================
   XinTrader Official Website — Design System
   Color palette matched to XinTrader V5 GUI
   ============================================================ */

:root {
  /* Surface */
  --bg-base: #0d1117;
  --bg-surface: #161b22;
  --bg-elevated: #1c2333;
  --bg-hover: #21262d;

  /* Border */
  --border-default: #30363d;
  --border-muted: #21262d;

  /* Text */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-tertiary: #6e7681;

  /* Accent */
  --accent-blue: #58a6ff;
  --accent-blue-dim: #1f6feb;
  --accent-blue-glow: rgba(88, 166, 255, 0.15);
  --accent-green: #3fb950;
  --accent-red: #f85149;
  --accent-yellow: #d29922;
  --accent-purple: #bc8cff;

  /* Layout */
  --nav-height: 56px;
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-elevated: 0 8px 24px rgba(0,0,0,0.4);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-blue); }

img { max-width: 100%; display: block; }

::selection { background: var(--accent-blue-dim); color: #fff; }

/* ---- Mono font for data ---- */
.mono, code, .data-value {
  font-family: "SF Mono", "Fira Code", "JetBrains Mono", "Cascadia Code",
               Consolas, "Liberation Mono", Menlo, monospace;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(13, 17, 23, 0.85);
 backdrop-filter: blur(12px);
 -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-muted);
}

.navbar-inner {
  max-width: var(--max-width); height: 100%;
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
}

.navbar-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; letter-spacing: -0.5px;
  color: var(--text-primary); flex-shrink: 0;
}
.navbar-logo svg { width: 24px; height: 24px; }

.navbar-links { display: flex; align-items: center; gap: 4px; flex: 1; }

.navbar-links a {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-secondary);
  transition: all .15s;
}
.navbar-links a:hover { color: var(--text-primary); background: var(--bg-hover); }
.navbar-links a.active { color: var(--accent-blue); }

.navbar-actions { display: flex; align-items: center; gap: 12px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--accent-blue-dim); color: #fff;
}
.btn-primary:hover {
  background: var(--accent-blue); color: #fff;
  box-shadow: 0 0 20px var(--accent-blue-glow);
}

.btn-secondary {
  background: var(--bg-surface); color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover {
  background: var(--bg-hover); color: #fff; border-color: #484f58;
}

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  padding: 6px 14px;
}
.btn-ghost:hover { color: var(--text-primary); }

.btn-lg { padding: 12px 28px; font-size: 15px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-height) + 80px) 24px 100px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}

/* subtle grid background */
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(48,54,61,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48,54,61,0.3) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 70%);
}

.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 30%, var(--accent-blue-glow), transparent);
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 100px;
  background: rgba(88,166,255,0.1); border: 1px solid rgba(88,166,255,0.2);
  color: var(--accent-blue); font-size: 13px; font-weight: 500;
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-green);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: 42px; font-weight: 800; letter-spacing: -1px;
  line-height: 1.15; margin-bottom: 20px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.subtitle {
  font-size: 17px; color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 36px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* animated chart line in hero */
.hero-chart {
  position: relative; z-index: 1;
  width: 100%; max-width: 920px; margin-top: 56px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-elevated);
}

.hero-chart-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--border-muted);
  font-size: 12px; color: var(--text-secondary);
}
.hero-chart-bar .ticker {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--text-primary);
}
.hero-chart-bar .price { font-family: "SF Mono", monospace; }
.hero-chart-bar .up { color: var(--accent-green); }
.hero-chart-bar .down { color: var(--accent-red); }

.hero-chart-canvas { width: 100%; height: 200px; display: block; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  max-width: var(--max-width); margin: 0 auto;
  padding: 80px 24px;
}

.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 12px;
}
.section-header p {
  font-size: 16px; color: var(--text-secondary); max-width: 560px; margin: 0 auto;
}

/* ---- Product Cards ---- */
.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all .2s;
  position: relative;
}
.product-card:hover {
  border-color: var(--accent-blue-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.product-card .icon-wrap {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
 margin-bottom: 20px;
}
.product-card .icon-wrap.blue { background: rgba(88,166,255,0.12); }
.product-card .icon-wrap.green { background: rgba(63,185,80,0.12); }
.product-card .icon-wrap.purple { background: rgba(188,140,255,0.12); }
.product-card .icon-wrap svg { width: 24px; height: 24px; }

.product-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.product-card .tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 100px; margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.product-card .tag.free { background: rgba(63,185,80,0.15); color: var(--accent-green); }
.product-card .tag.pro { background: rgba(188,140,255,0.15); color: var(--accent-purple); }

.product-card p.desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

.product-card ul.features {
  list-style: none; margin-bottom: 24px;
}
.product-card ul.features li {
  font-size: 13px; color: var(--text-secondary); padding: 4px 0;
  display: flex; align-items: center; gap: 8px;
}
.product-card ul.features li svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ---- Feature Grid ---- */
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}

.feature-item {
  padding: 24px; background: var(--bg-surface);
  border: 1px solid var(--border-muted); border-radius: var(--radius-md);
}
.feature-item .icon-sm {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--bg-elevated); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-item .icon-sm svg { width: 20px; height: 20px; }
.feature-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.feature-item p { font-size: 13px; color: var(--text-secondary); }

/* ---- Pricing / Comparison ---- */
.pricing-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 760px; margin: 0 auto;
}

.pricing-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 36px 32px; position: relative;
}
.pricing-card.featured {
  border-color: var(--accent-blue-dim);
  box-shadow: 0 0 40px rgba(88,166,255,0.08);
}
.pricing-card .badge-pro {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent-blue-dim); color: #fff;
  font-size: 12px; font-weight: 600; padding: 4px 16px;
  border-radius: 100px; white-space: nowrap;
}

.pricing-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.pricing-card .plan-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }

.price-amount { font-size: 36px; font-weight: 800; }
.price-amount .unit { font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.price-period { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }

.pricing-card ul {
  list-style: none; margin-bottom: 28px;
}
.pricing-card ul li {
  font-size: 14px; padding: 8px 0;
  border-bottom: 1px solid var(--border-muted);
  display: flex; align-items: center; gap: 8px;
}
.pricing-card ul li svg { width: 16px; height: 16px; flex-shrink: 0; }
.pricing-card ul li .check { color: var(--accent-green); }
.pricing-card ul li .x { color: var(--text-tertiary); }

/* ---- Comparison Table ---- */
.comparison-section { overflow-x: auto; }
.comparison-table {
  width: 100%; border-collapse: collapse; min-width: 600px;
}
.comparison-table th, .comparison-table td {
  padding: 14px 20px; text-align: left;
  border-bottom: 1px solid var(--border-muted);
}
.comparison-table th {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  background: var(--bg-surface);
}
.comparison-table td { font-size: 14px; }
.comparison-table td.feature-name { color: var(--text-secondary); }
.comparison-table td .check { color: var(--accent-green); }
.comparison-table td .x { color: var(--text-tertiary); }
.comparison-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ---- Architecture Diagram ---- */
.arch-diagram {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 600px; margin: 0 auto;
}
.arch-layer {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 20px 28px;
  display: flex; align-items: center; gap: 20px;
  transition: all .2s;
}
.arch-layer:hover { border-color: var(--accent-blue-dim); transform: scale(1.01); }
.arch-layer .layer-num {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.arch-layer h4 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.arch-layer p { font-size: 12px; color: var(--text-secondary); }

.arch-arrow {
  text-align: center; color: var(--text-tertiary); font-size: 18px;
}

/* ---- Strategy Cards ---- */
.strategy-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

.strategy-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); overflow: hidden; transition: all .2s;
}
.strategy-card:hover { border-color: var(--accent-blue-dim); transform: translateY(-2px); }

.strategy-card .card-header { padding: 20px 24px; border-bottom: 1px solid var(--border-muted); }
.strategy-card .card-header .name { font-size: 16px; font-weight: 700; }
.strategy-card .card-header .type-row {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
}

.strategy-card .card-body { padding: 20px 24px; }
.strategy-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
.stat-item .stat-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .5px; }
.stat-item .stat-value { font-size: 18px; font-weight: 700; }
.stat-item .stat-value.pos { color: var(--accent-green); }
.stat-item .stat-value.neg { color: var(--accent-red); }

/* ---- Tags ---- */
.tag-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 100px; text-transform: uppercase; letter-spacing: 0.5px;
}
.tag-pill.free { background: rgba(63,185,80,0.15); color: var(--accent-green); }
.tag-pill.pro { background: rgba(188,140,255,0.15); color: var(--accent-purple); }
.tag-pill.trend { background: rgba(88,166,255,0.12); color: var(--accent-blue); }
.tag-pill.reversal { background: rgba(210,153,34,0.15); color: var(--accent-yellow); }

/* ---- CTA Section ---- */
.cta-section {
  max-width: var(--max-width); margin: 0 auto;
  padding: 60px 24px 80px;
}
.cta-box {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-elevated));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 48px 40px;
  text-align: center; position: relative; overflow: hidden;
}
.cta-box::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 0%, var(--accent-blue-glow), transparent);
}
.cta-box > * { position: relative; }
.cta-box h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.cta-box p { color: var(--text-secondary); margin-bottom: 28px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border-muted);
  padding: 48px 24px 32px;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 40px;
}
.footer-brand h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; color: var(--text-secondary); max-width: 300px; }
.footer-col h5 { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: var(--text-secondary); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border-muted);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-tertiary);
}

/* ============================================================
   DOWNLOAD PAGE
   ============================================================ */
.download-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

.download-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 32px 28px; text-align: center;
  transition: all .2s;
}
.download-card:hover { border-color: var(--accent-blue-dim); }
.download-card .dl-icon {
  width: 56px; height: 56px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); border-radius: var(--radius-md);
}
.download-card .dl-icon svg { width: 32px; height: 32px; }
.download-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.download-card .version { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.download-card .size { font-size: 12px; color: var(--text-tertiary); margin-bottom: 20px; }

.download-card .dl-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 12px; border-radius: 100px; margin-bottom: 16px;
}
.download-card .dl-badge.free { background: rgba(63,185,80,0.15); color: var(--accent-green); }
.download-card .dl-badge.pro { background: rgba(88,166,255,0.15); color: var(--accent-blue); }
.download-card .dl-badge.tester { background: rgba(188,140,255,0.15); color: var(--accent-purple); }
.download-card .dl-features {
  list-style: none; padding: 0; margin: 0 0 24px; text-align: left;
}
.download-card .dl-features li {
  font-size: 12px; color: var(--text-secondary); padding: 4px 0;
  display: flex; align-items: center; gap: 8px;
}
.download-card .dl-features li::before {
  content: '\2713'; color: var(--accent-green); font-weight: 700; font-size: 13px;
}
.download-card .dl-features li.disabled { color: var(--text-tertiary); }
.download-card .dl-features li.disabled::before { content: '\2717'; color: var(--accent-red); }

.btn-locked {
  background: var(--bg-elevated) !important; color: var(--text-tertiary) !important;
  cursor: not-allowed; border: 1px solid var(--border-muted) !important;
}
.btn-locked:hover { opacity: 0.85; }

/* ---- Changelog ---- */
.changelog { max-width: 720px; margin: 0 auto; }
.changelog-entry {
  padding: 24px 0; border-bottom: 1px solid var(--border-muted);
}
.changelog-entry:last-child { border-bottom: none; }
.changelog-entry .version-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.changelog-entry .ver-tag {
  font-size: 13px; font-weight: 700; color: var(--accent-blue);
  background: rgba(88,166,255,0.1); padding: 2px 10px; border-radius: var(--radius-sm);
}
.changelog-entry .date { font-size: 12px; color: var(--text-tertiary); }
.changelog-entry ul { list-style: none; padding-left: 4px; }
.changelog-entry ul li {
  font-size: 13px; color: var(--text-secondary); padding: 3px 0;
  display: flex; align-items: baseline; gap: 8px;
}
.changelog-entry ul li::before { content: '\2014'; color: var(--text-tertiary); }

/* ============================================================
   PAGE HEADER (sub-pages)
   ============================================================ */
.page-header {
  padding: calc(var(--nav-height) + 60px) 24px 48px;
  text-align: center;
  border-bottom: 1px solid var(--border-muted);
}
.page-header h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 12px; }
.page-header p { font-size: 16px; color: var(--text-secondary); max-width: 560px; margin: 0 auto; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp .5s ease-out; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .product-grid, .feature-grid, .strategy-grid, .download-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 30px; }
  .navbar-links { display: none; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .section { padding: 56px 16px; }
  .section-header h2 { font-size: 24px; }
}

/* ============================================================
   AUTH PAGES (login / register / forgot password)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--nav-height) + 40px) 24px 40px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 40px 36px;
  box-shadow: var(--shadow-elevated);
}
.auth-card .auth-logo { text-align: center; margin-bottom: 28px; }
.auth-card .auth-logo a { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; }
.auth-card .auth-logo svg { width: 28px; height: 28px; }
.auth-card h2 { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-card .auth-subtitle { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.input-wrap { position: relative; }
.input-wrap svg.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-tertiary); pointer-events: none; }
.form-input {
  width: 100%; padding: 10px 14px 10px 38px;
  background: var(--bg-base); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 14px; font-family: inherit; transition: border-color .15s, box-shadow .15s; outline: none;
}
.form-input:focus { border-color: var(--accent-blue-dim); box-shadow: 0 0 0 3px rgba(88,166,255,0.12); }
.form-input::placeholder { color: var(--text-tertiary); }
.form-input.no-icon { padding-left: 14px; }
.input-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-tertiary); padding: 4px; }
.input-toggle svg { width: 16px; height: 16px; }
.input-toggle:hover { color: var(--text-secondary); }
.form-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.form-error { font-size: 13px; color: var(--accent-red); margin-bottom: 16px; padding: 8px 12px; background: rgba(248,81,73,0.08); border-radius: var(--radius-sm); border: 1px solid rgba(248,81,73,0.2); display: none; }
.form-error.show { display: block; }
.auth-card .btn-primary { width: 100%; margin-top: 8px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-secondary); }
.auth-footer a { color: var(--accent-blue); font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--text-tertiary); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-default); }
.checkbox-wrap { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.checkbox-wrap input[type="checkbox"] { margin-top: 2px; accent-color: var(--accent-blue-dim); width: 16px; height: 16px; }

/* ============================================================
   USER CENTER
   ============================================================ */
.uc-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; max-width: var(--max-width); margin: 0 auto; padding: calc(var(--nav-height) + 32px) 24px 60px; }
.uc-sidebar { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 20px 0; height: fit-content; }
.uc-sidebar .uc-user-block { padding: 0 20px 20px; border-bottom: 1px solid var(--border-muted); text-align: center; }
.uc-user-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-blue-dim); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; margin: 0 auto 10px; }
.uc-user-name { font-size: 15px; font-weight: 600; }
.uc-user-email { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.uc-nav { list-style: none; padding: 12px 8px; }
.uc-nav li a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-secondary); transition: all .15s; }
.uc-nav li a:hover { background: var(--bg-hover); color: var(--text-primary); }
.uc-nav li a.active { background: rgba(88,166,255,0.1); color: var(--accent-blue); font-weight: 600; }
.uc-nav li a svg { width: 18px; height: 18px; flex-shrink: 0; }
.uc-content { min-width: 0; }
.uc-section-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.status-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 32px; }
.status-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 20px 24px; }
.status-card .label { font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.status-card .value { font-size: 20px; font-weight: 700; }
.status-card .badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 100px; margin-left: 8px; vertical-align: middle; }
.status-card .badge.active { background: rgba(63,185,80,0.15); color: var(--accent-green); }
.status-card .badge.expired { background: rgba(248,81,73,0.15); color: var(--accent-red); }
.status-card .badge.free { background: rgba(110,118,129,0.2); color: var(--text-secondary); }
.license-block { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 20px 24px; margin-bottom: 20px; }
.license-key-display { display: flex; align-items: center; gap: 12px; background: var(--bg-base); border: 1px dashed var(--border-default); border-radius: var(--radius-sm); padding: 12px 16px; margin-top: 8px; }
.license-key-display .key { font-family: "SF Mono", monospace; font-size: 15px; letter-spacing: 1px; color: var(--accent-blue); flex: 1; }
.license-key-display .copy-btn { background: none; border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: 4px 10px; font-size: 12px; color: var(--text-secondary); cursor: pointer; transition: all .15s; }
.license-key-display .copy-btn:hover { border-color: var(--accent-blue-dim); color: var(--accent-blue); }
.uc-strategy-item { display: flex; align-items: center; gap: 16px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 16px 20px; margin-bottom: 12px; }
.uc-strategy-item .strat-info { flex: 1; }
.uc-strategy-item .strat-name { font-size: 15px; font-weight: 600; }
.uc-strategy-item .strat-author { font-size: 12px; color: var(--text-tertiary); }
.uc-strategy-item .strat-renew { font-size: 12px; color: var(--text-secondary); text-align: right; }
.uc-order-table { width: 100%; border-collapse: collapse; }
.uc-order-table th, .uc-order-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-muted); font-size: 13px; }
.uc-order-table th { color: var(--text-tertiary); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.uc-order-table .pay-status { font-weight: 600; }
.uc-order-table .pay-status.paid { color: var(--accent-green); }
.uc-order-table .pay-status.pending { color: var(--accent-yellow); }
.uc-order-table .pay-status.expired { color: var(--text-tertiary); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-tertiary); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; }
.plan-info-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 24px; margin-bottom: 20px; }
.plan-info-card .plan-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-muted); }
.plan-info-card .plan-row:last-child { border-bottom: none; }
.plan-info-card .plan-row .pr-label { font-size: 13px; color: var(--text-secondary); }
.plan-info-card .plan-row .pr-value { font-size: 14px; font-weight: 600; }

@media (max-width: 760px) {
  .uc-layout { grid-template-columns: 1fr; }
  .uc-sidebar { display: none; }
  .status-row { grid-template-columns: 1fr; }
}
 
/* ============================================================
   SUBSCRIBE / CHECKOUT / PAYMENT PAGES
   ============================================================ */

/* ---- Checkout Layout ---- */
.checkout-layout {
  display: grid; grid-template-columns: 1fr 380px; gap: 32px;
  max-width: var(--max-width); margin: 0 auto;
  padding: calc(var(--nav-height) + 32px) 24px 60px;
}
.checkout-main { min-width: 0; }
.checkout-sidebar { position: sticky; top: calc(var(--nav-height) + 32px); height: fit-content; }
.checkout-section {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 28px; margin-bottom: 24px;
}
.checkout-section h3.section-title {
  font-size: 16px; font-weight: 700; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.checkout-section .section-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-blue-dim); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.checkout-section .section-desc {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 20px;
}

/* ---- Plan Selection Cards ---- */
.plan-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan-option {
  background: var(--bg-base); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 24px 20px; cursor: pointer;
  transition: all .15s; position: relative;
}
.plan-option:hover { border-color: var(--accent-blue-dim); }
.plan-option.selected {
  border-color: var(--accent-blue-dim);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.12);
}
.plan-option .radio-dot {
  position: absolute; top: 20px; right: 20px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border-default); transition: all .15s;
}
.plan-option.selected .radio-dot {
  border-color: var(--accent-blue-dim);
  background: var(--accent-blue-dim);
  box-shadow: inset 0 0 0 3px var(--bg-base);
}
.plan-option .plan-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.plan-option .plan-price { font-size: 28px; font-weight: 800; }
.plan-option .plan-price .currency { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.plan-option .plan-period { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.plan-option .plan-save {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 100px; margin-top: 12px;
  background: rgba(63,185,80,0.15); color: var(--accent-green);
}

/* ---- Strategy Add-on List ---- */
.addon-list { display: flex; flex-direction: column; gap: 12px; }
.addon-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-base); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 14px 18px;
  cursor: pointer; transition: all .15s;
}
.addon-item:hover { border-color: var(--accent-blue-dim); }
.addon-item.selected {
  border-color: var(--accent-blue-dim);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.12);
}
.addon-item .addon-check {
  width: 18px; height: 18px; border-radius: var(--radius-sm);
  border: 2px solid var(--border-default); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.addon-item.selected .addon-check {
  background: var(--accent-blue-dim); border-color: var(--accent-blue-dim);
}
.addon-item.selected .addon-check::after {
  content: ''; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); margin-top: -2px;
}
.addon-item .addon-info { flex: 1; }
.addon-item .addon-name { font-size: 14px; font-weight: 600; }
.addon-item .addon-desc { font-size: 12px; color: var(--text-tertiary); }
.addon-item .addon-price { font-size: 14px; font-weight: 600; color: var(--accent-blue); white-space: nowrap; }

/* ---- Network Toggle ---- */
.network-toggle {
  display: inline-flex; border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border-default);
}
.network-toggle button {
  padding: 8px 18px; font-size: 13px; font-weight: 600;
  background: var(--bg-base); color: var(--text-secondary);
  border: none; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.network-toggle button.active {
  background: var(--accent-blue-dim); color: #fff;
}
.network-toggle button:hover:not(.active) {
  background: var(--bg-hover); color: var(--text-primary);
}

/* ---- Order Summary Card ---- */
.order-summary {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 28px;
}
.order-summary h3 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.summary-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 14px;
}
.summary-line .sm-label { color: var(--text-secondary); }
.summary-line .sm-value { font-weight: 600; }
.summary-line .sm-value.discount { color: var(--accent-green); }
.summary-divider { height: 1px; background: var(--border-muted); margin: 12px 0; }
.summary-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 12px;
}
.summary-total .total-label { font-size: 14px; font-weight: 600; }
.summary-total .total-amount { font-size: 24px; font-weight: 800; }
.summary-total .total-amount .cur { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.summary-cta { width: 100%; margin-top: 20px; }
.summary-note { font-size: 12px; color: var(--text-tertiary); margin-top: 14px; text-align: center; }

/* ---- Payment Page ---- */
.payment-layout {
  max-width: 640px; margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 24px 60px;
}
.payment-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 36px 32px;
}
.payment-header { text-align: center; margin-bottom: 32px; }
.payment-header .pay-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  background: rgba(88,166,255,0.1); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.payment-header .pay-icon svg { width: 28px; height: 28px; }
.payment-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.payment-header p { font-size: 14px; color: var(--text-secondary); }

/* QR Code */
.qr-block { text-align: center; margin-bottom: 28px; }
.qr-frame {
  display: inline-block; padding: 16px; background: #fff;
  border-radius: var(--radius-md); margin-bottom: 16px;
}
.qr-frame canvas, .qr-frame img { width: 180px; height: 180px; display: block; }

/* Address display */
.address-block { margin-bottom: 28px; }
.address-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.address-display {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-base); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 12px 16px;
}
.address-display .addr {
  font-family: "SF Mono", "Fira Code", monospace; font-size: 13px;
  color: var(--text-primary); flex: 1; word-break: break-all; line-height: 1.5;
}
.address-display .copy-btn {
  background: none; border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); padding: 5px 12px;
  font-size: 12px; color: var(--text-secondary); cursor: pointer;
  transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
.address-display .copy-btn:hover { border-color: var(--accent-blue-dim); color: var(--accent-blue); }

/* Countdown */
.countdown-block {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 24px;
}
.countdown-label { font-size: 13px; color: var(--text-secondary); }
.countdown-timer {
  font-family: "SF Mono", monospace; font-size: 18px; font-weight: 700;
  color: var(--accent-yellow);
}
.countdown-timer.urgent { color: var(--accent-red); }

/* Status indicator */
.status-indicator {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; border-radius: var(--radius-md);
  background: rgba(210,153,34,0.08); border: 1px solid rgba(210,153,34,0.2);
  margin-bottom: 24px;
}
.status-indicator.confirmed {
  background: rgba(63,185,80,0.08); border-color: rgba(63,185,80,0.2);
}
.status-indicator .spinner {
  width: 18px; height: 18px; border: 2px solid var(--border-default);
  border-top-color: var(--accent-yellow); border-radius: 50%;
  animation: spin .8s linear infinite;
}
.status-indicator.confirmed .spinner {
  border-top-color: var(--accent-green);
}
.status-indicator .status-text { font-size: 14px; font-weight: 600; }
.status-indicator .status-text.waiting { color: var(--accent-yellow); }
.status-indicator .status-text.ok { color: var(--accent-green); }

@keyframes spin { to { transform: rotate(360deg); } }

/* Payment steps */
.payment-steps {
  border-top: 1px solid var(--border-muted); padding-top: 24px;
}
.payment-steps h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text-secondary); }
.payment-steps ol { list-style: none; counter-reset: step; }
.payment-steps ol li {
  counter-increment: step; font-size: 13px; color: var(--text-secondary);
  padding: 5px 0; display: flex; align-items: baseline; gap: 10px;
}
.payment-steps ol li::before {
  content: counter(step); flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-elevated); color: var(--text-secondary);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---- Success Page ---- */
.success-layout {
  max-width: 560px; margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 24px 60px;
}
.success-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 40px 36px; text-align: center;
}
.success-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  background: rgba(63,185,80,0.1); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.success-icon svg { width: 32px; height: 32px; }
.success-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.success-card .success-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.success-detail { text-align: left; }
.success-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; }

/* ---- Responsive for checkout ---- */
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-sidebar { position: static; order: -1; }
  .plan-options { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .payment-layout, .success-layout { padding-left: 16px; padding-right: 16px; }
  .payment-card, .success-card { padding: 28px 20px; }
  .payment-header h2 { font-size: 18px; }
}

/* ============================================================
   STRATEGY DETAIL PAGE
   ============================================================ */
.detail-layout {
  display: grid; grid-template-columns: 1fr 320px; gap: 32px;
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 24px 80px;
}
.detail-main { min-width: 0; }
.detail-sidebar { position: sticky; top: calc(var(--nav-height) + 24px); height: fit-content; }

/* Strategy header card */
.strategy-detail-header {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 28px 32px; margin-bottom: 24px;
}
.sdh-top { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.sdh-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(88,166,255,0.12);
}
.sdh-icon svg { width: 26px; height: 26px; }
.sdh-title { flex: 1; }
.sdh-title h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.sdh-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sdh-meta .author { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.sdh-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* Chart card */
.chart-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px;
}
.chart-card-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; border-bottom: 1px solid var(--border-muted);
}
.chart-card-bar .chart-title { font-size: 14px; font-weight: 600; }
.chart-card-bar .chart-pnl { font-family: "SF Mono", monospace; font-size: 16px; font-weight: 700; }
.chart-card-bar .chart-pnl.pos { color: var(--accent-green); }
.chart-card-bar .chart-pnl.neg { color: var(--accent-red); }
.chart-tabs {
  display: flex; gap: 2px; margin-left: auto;
  background: var(--bg-base); border-radius: var(--radius-sm); padding: 2px;
}
.chart-tabs button {
  padding: 5px 12px; font-size: 12px; font-weight: 600;
  background: none; border: none; color: var(--text-secondary);
  border-radius: var(--radius-sm); cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.chart-tabs button.active { background: var(--bg-elevated); color: var(--text-primary); }
.chart-tabs button:hover:not(.active) { color: var(--text-primary); }
.chart-canvas-wrap { padding: 16px; }
.chart-canvas-wrap canvas { width: 100%; display: block; }

/* Risk metrics grid */
.risk-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.metric-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 18px 20px;
}
.metric-card .mc-label {
  font-size: 11px; color: var(--text-tertiary); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 8px;
}
.metric-card .mc-value { font-size: 22px; font-weight: 700; }
.metric-card .mc-value.pos { color: var(--accent-green); }
.metric-card .mc-value.neg { color: var(--accent-red); }
.metric-card .mc-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Trade history table */
.trade-history-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px;
}
.trade-history-card .th-header {
  padding: 18px 24px; border-bottom: 1px solid var(--border-muted);
  display: flex; align-items: center; justify-content: space-between;
}
.trade-history-card .th-header h3 { font-size: 15px; font-weight: 700; }
.trade-history-card .th-header .th-count {
  font-size: 12px; color: var(--text-tertiary);
  background: var(--bg-elevated); padding: 2px 10px; border-radius: 100px;
}
.trade-table { width: 100%; border-collapse: collapse; }
.trade-table th {
  padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 600;
  color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .5px;
  background: var(--bg-elevated); border-bottom: 1px solid var(--border-muted);
}
.trade-table td {
  padding: 10px 16px; font-size: 13px;
  border-bottom: 1px solid var(--border-muted);
}
.trade-table td.mono { font-family: "SF Mono", monospace; }
.trade-table td.pos { color: var(--accent-green); font-weight: 600; }
.trade-table td.neg { color: var(--accent-red); font-weight: 600; }
.trade-table tr:hover td { background: rgba(255,255,255,0.02); }
.trade-table .side-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-sm);
}
.trade-table .side-badge.long { background: rgba(63,185,80,0.12); color: var(--accent-green); }
.trade-table .side-badge.short { background: rgba(248,81,73,0.12); color: var(--accent-red); }

/* Strategy logic / params card */
.logic-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 24px 28px;
}
.logic-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.logic-block { margin-bottom: 20px; }
.logic-block:last-child { margin-bottom: 0; }
.logic-block .lb-title {
  font-size: 12px; font-weight: 600; color: var(--accent-blue);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}
.logic-block .lb-content { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.logic-block .lb-content code {
  font-family: "SF Mono", monospace; font-size: 13px;
  background: var(--bg-base); padding: 2px 6px; border-radius: 4px;
  color: var(--accent-purple);
}
.param-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.param-item {
  display: flex; justify-content: space-between;
  padding: 8px 14px; background: var(--bg-base);
  border-radius: var(--radius-sm); border: 1px solid var(--border-muted);
}
.param-item .pi-key { font-size: 13px; color: var(--text-secondary); }
.param-item .pi-val { font-size: 13px; font-weight: 600; font-family: "SF Mono", monospace; }

/* Detail sidebar cards */
.dsb-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px;
}
.dsb-card .dsb-title { font-size: 13px; font-weight: 700; margin-bottom: 16px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }
.dsb-subscribe .dsb-price { font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.dsb-subscribe .dsb-price .cur { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.dsb-subscribe .dsb-period { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.dsb-subscribe .btn { width: 100%; }
.dsb-subscribe .dsb-note { font-size: 12px; color: var(--text-tertiary); margin-top: 12px; text-align: center; }
.dsb-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border-muted);
}
.dsb-info-row:last-child { border-bottom: none; }
.dsb-info-row .ir-label { font-size: 13px; color: var(--text-secondary); }
.dsb-info-row .ir-value { font-size: 13px; font-weight: 600; }

/* Monthly returns mini chart */
.monthly-returns {
  display: flex; align-items: flex-end; gap: 3px; height: 80px; margin-top: 12px;
}
.mr-bar {
  flex: 1; border-radius: 2px 2px 0 0; min-height: 2px;
  transition: opacity .15s;
}
.mr-bar.pos { background: var(--accent-green); opacity: 0.7; }
.mr-bar.neg { background: var(--accent-red); opacity: 0.7; }
.mr-bar:hover { opacity: 1; }
.mr-labels { display: flex; gap: 3px; margin-top: 6px; }
.mr-labels span { flex: 1; text-align: center; font-size: 9px; color: var(--text-tertiary); }

/* ============================================================
   CREATOR DASHBOARD
   ============================================================ */
.creator-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 100px; margin-top: 6px;
  background: rgba(210,153,34,0.15); color: var(--accent-yellow);
  text-transform: uppercase; letter-spacing: .5px;
}
.creator-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.cs-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 20px 24px;
}
.cs-card .cs-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.cs-card .cs-icon.blue { background: rgba(88,166,255,0.12); }
.cs-card .cs-icon.green { background: rgba(63,185,80,0.12); }
.cs-card .cs-icon.yellow { background: rgba(210,153,34,0.12); }
.cs-card .cs-icon.purple { background: rgba(188,140,255,0.12); }
.cs-card .cs-icon svg { width: 20px; height: 20px; }
.cs-card .cs-label { font-size: 12px; color: var(--text-tertiary); margin-bottom: 4px; }
.cs-card .cs-value { font-size: 24px; font-weight: 800; }
.cs-card .cs-value.pos { color: var(--accent-green); }
.cs-card .cs-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Commission chart */
.commission-chart-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 24px; margin-bottom: 24px;
}
.commission-chart-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.commission-chart-card .cc-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.cc-bars { display: flex; align-items: flex-end; gap: 12px; height: 160px; }
.cc-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cc-bar {
  width: 100%; max-width: 48px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-blue-dim));
  transition: all .2s; position: relative; cursor: pointer;
  min-height: 4px;
}
.cc-bar:hover { background: linear-gradient(180deg, var(--accent-blue), var(--accent-blue)); }
.cc-bar .cc-tooltip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); padding: 4px 10px;
  font-size: 11px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
.cc-bar:hover .cc-tooltip { opacity: 1; }
.cc-bar-label { font-size: 11px; color: var(--text-tertiary); }

/* Strategy management table */
.mgmt-table { width: 100%; border-collapse: collapse; }
.mgmt-table th {
  padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 600;
  color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .5px;
  background: var(--bg-elevated); border-bottom: 1px solid var(--border-muted);
}
.mgmt-table td {
  padding: 12px 16px; font-size: 13px;
  border-bottom: 1px solid var(--border-muted);
}
.mgmt-table tr:hover td { background: rgba(255,255,255,0.02); }
.mgmt-table .strat-cell { font-weight: 600; }
.mgmt-table .income-cell { font-weight: 600; color: var(--accent-green); font-family: "SF Mono", monospace; }
.status-pill {
  display: inline-flex; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 100px;
}
.status-pill.live { background: rgba(63,185,80,0.15); color: var(--accent-green); }
.status-pill.review { background: rgba(210,153,34,0.15); color: var(--accent-yellow); }
.status-pill.draft { background: rgba(110,118,129,0.2); color: var(--text-secondary); }

/* Submit strategy form */
.submit-form { max-width: 600px; }
.submit-form .form-group { margin-bottom: 20px; }
.submit-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.submit-form input, .submit-form select, .submit-form textarea {
  width: 100%; padding: 10px 14px;
  background: var(--bg-base); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 14px; font-family: inherit; outline: none; transition: border-color .15s;
}
.submit-form input:focus, .submit-form select:focus, .submit-form textarea:focus {
  border-color: var(--accent-blue-dim); box-shadow: 0 0 0 3px rgba(88,166,255,0.12);
}
.submit-form textarea { resize: vertical; min-height: 100px; }
.submit-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.submit-form .file-upload {
  border: 2px dashed var(--border-default); border-radius: var(--radius-md);
  padding: 24px; text-align: center; cursor: pointer; transition: all .15s;
}
.submit-form .file-upload:hover { border-color: var(--accent-blue-dim); background: rgba(88,166,255,0.03); }
.submit-form .file-upload svg { width: 28px; height: 28px; color: var(--text-tertiary); margin: 0 auto 8px; display: block; }
.submit-form .file-upload p { font-size: 13px; color: var(--text-secondary); }
.submit-form .file-upload .fu-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

/* Recent activity list */
.activity-list { display: flex; flex-direction: column; gap: 2px; }
.activity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border-muted);
}
.activity-item:last-child { border-bottom: none; }
.activity-item .ai-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.activity-item .ai-icon svg { width: 16px; height: 16px; }
.activity-item .ai-icon.green { background: rgba(63,185,80,0.12); }
.activity-item .ai-icon.blue { background: rgba(88,166,255,0.12); }
.activity-item .ai-icon.yellow { background: rgba(210,153,34,0.12); }
.activity-item .ai-content { flex: 1; }
.activity-item .ai-title { font-size: 13px; }
.activity-item .ai-time { font-size: 11px; color: var(--text-tertiary); }
.activity-item .ai-amount { font-size: 14px; font-weight: 700; color: var(--accent-green); font-family: "SF Mono", monospace; }

/* Responsive for detail + creator */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; order: -1; }
  .risk-metrics { grid-template-columns: 1fr 1fr; }
  .creator-stats { grid-template-columns: 1fr 1fr; }
  .submit-form .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .risk-metrics { grid-template-columns: 1fr; }
  .creator-stats { grid-template-columns: 1fr; }
  .detail-layout { padding: 0 16px 60px; }
}

/* ---- Product Showcase (App Preview) ---- */
.app-preview-section { padding: 0 24px 60px; }
.app-preview-wrap { max-width: 1100px; margin: 0 auto; }
.app-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}
.app-titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
}
.app-titlebar .dot-r { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.app-titlebar .dot-y { width: 12px; height: 12px; border-radius: 50%; background: #febc2e; }
.app-titlebar .dot-g { width: 12px; height: 12px; border-radius: 50%; background: #28c840; }
.app-titlebar .app-title { margin-left: auto; margin-right: auto; font-size: 12px; color: var(--text-tertiary); font-weight: 500; }
.app-body { display: grid; grid-template-columns: 180px 1fr 200px; min-height: 360px; }

/* Sidebar */
.app-sidebar {
  background: var(--bg-base); border-right: 1px solid var(--border-muted);
  padding: 12px 10px;
}
.app-sidebar-title { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-tertiary); margin-bottom: 8px; padding: 0 6px; }
.app-strat-item {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 8px; border-radius: var(--radius-sm); margin-bottom: 3px;
  font-size: 12px; cursor: default;
}
.app-strat-item:hover { background: var(--bg-hover); }
.app-strat-item.active { background: var(--bg-elevated); color: var(--accent-blue); }
.app-strat-item .si-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.app-strat-item .si-dot.green { background: var(--accent-green); }
.app-strat-item .si-dot.gray { background: var(--text-tertiary); }
.app-conn-block { margin-top: 16px; padding: 0 6px; }
.app-conn-item { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.app-conn-item .ci-led { width: 5px; height: 5px; border-radius: 50%; }
.app-conn-item .ci-led.on { background: var(--accent-green); box-shadow: 0 0 4px var(--accent-green); }
.app-conn-item .ci-led.off { background: var(--text-tertiary); }

/* Main area */
.app-main { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.app-stats-row { display: flex; gap: 12px; }
.app-stat { flex: 1; background: var(--bg-base); border-radius: var(--radius-md); padding: 10px 12px; }
.app-stat .as-label { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .3px; }
.app-stat .as-value { font-size: 18px; font-weight: 700; font-family: "SF Mono", monospace; }
.app-stat .as-value.green { color: var(--accent-green); }
.app-stat .as-value.red { color: var(--accent-red); }
.app-stat .as-value.blue { color: var(--accent-blue); }
.app-stat .as-change { font-size: 11px; }

.app-table { flex: 1; overflow: hidden; }
.app-table-head {
  display: grid; grid-template-columns: 1.2fr .8fr .7fr .8fr .8fr .6fr;
  gap: 6px; padding: 6px 8px; font-size: 10px; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: .3px; border-bottom: 1px solid var(--border-muted);
}
.app-table-row {
  display: grid; grid-template-columns: 1.2fr .8fr .7fr .8fr .8fr .6fr;
  gap: 6px; padding: 7px 8px; font-size: 12px;
  border-bottom: 1px solid var(--border-muted); align-items: center;
}
.app-table-row:last-child { border-bottom: none; }
.app-table-row .atr-sym { font-weight: 600; }
.app-table-row .atr-pnl.green { color: var(--accent-green); font-family: "SF Mono", monospace; font-size: 11px; }
.app-table-row .atr-pnl.red { color: var(--accent-red); font-family: "SF Mono", monospace; font-size: 11px; }
.app-table-row .atr-side long { color: var(--accent-green); }
.app-table-row .atr-side short { color: var(--accent-red); }
.app-pill { font-size: 9px; padding: 1px 6px; border-radius: 3px; font-weight: 600; }
.app-pill.long { background: rgba(63,185,80,0.15); color: var(--accent-green); }
.app-pill.short { background: rgba(248,81,73,0.15); color: var(--accent-red); }
.app-pill.live { background: rgba(88,166,255,0.15); color: var(--accent-blue); }

/* Right panel - condition monitor */
.app-right {
  background: var(--bg-base); border-left: 1px solid var(--border-muted);
  padding: 12px 10px;
}
.app-right-title { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-tertiary); margin-bottom: 8px; padding: 0 4px; }
.cond-item { padding: 6px 4px; border-bottom: 1px solid var(--border-muted); font-size: 11px; }
.cond-item:last-child { border-bottom: none; }
.cond-item .ci-row { display: flex; justify-content: space-between; align-items: center; }
.cond-item .ci-name { color: var(--text-secondary); }
.cond-item .ci-val { font-family: "SF Mono", monospace; font-weight: 600; }
.cond-item .ci-bar { height: 3px; border-radius: 2px; margin-top: 4px; background: var(--bg-elevated); }
.cond-item .ci-fill { height: 100%; border-radius: 2px; }
.cond-item .ci-fill.met { background: var(--accent-green); }
.cond-item .ci-fill.unmet { background: var(--text-tertiary); }

@media (max-width: 768px) {
  .app-body { grid-template-columns: 1fr; }
  .app-sidebar, .app-right { display: none; }
}
