/* ============================================================
   X1 · css/page-gold.css — AI Gold 首页（智能理财中心）
   深色科技风 + 电光蓝主色 + 金色（AI Gold）辅助
   铁约束：无假收益/假余额/假投资；Disabled 投资按钮诚实呈现。
   ============================================================ */
.x1g {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 22px 40px;
  max-width: 1260px;
  margin: 0 auto;
}

/* ---------- 顶部 ---------- */
.x1g-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.x1g-top-brand { display: flex; align-items: center; gap: 12px; }
.x1g-logo {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #0a0e1a;
  background: linear-gradient(135deg, #ffd873, #f5a623);
  box-shadow: 0 0 18px rgba(245,166,35,.35);
}
.x1g-title { font-size: 20px; font-weight: 800; letter-spacing: .5px; color: #e8ecf5; }
.x1g-sub { font-size: 12px; color: #7a8699; margin-top: 2px; }
.x1g-top-right { display: flex; align-items: center; gap: 12px; }
.x1g-system-online {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .6px; color: #3ecf8e;
  padding: 5px 11px; border-radius: 20px;
  background: rgba(62,207,142,.1); border: 1px solid rgba(62,207,142,.25);
}
.x1g-system-online i { width: 7px; height: 7px; border-radius: 50%; background: #3ecf8e; box-shadow: 0 0 8px #3ecf8e; }
.x1g-wallet {
  font-size: 12px; color: #aeb8cc; font-family: ui-monospace, Menlo, Consolas, monospace;
  padding: 5px 12px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}

/* ---------- 区块 ---------- */
.x1g-sec { display: flex; flex-direction: column; gap: 10px; }
.x1g-sec-head { display: flex; align-items: center; justify-content: space-between; }
.x1g-sec-title { font-size: 15px; font-weight: 700; color: #dde3ee; margin: 0; }
.x1g-sec-tag {
  font-size: 11px; letter-spacing: .4px; color: #8a95ab;
  padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,.05);
}
.x1g-sec-tag--warn { color: #f5a623; background: rgba(245,166,35,.1); border: 1px solid rgba(245,166,35,.25); }

/* ---------- KPI ---------- */
.x1g-kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.x1g-kpi-item {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
  padding: 18px 20px;
}
.x1g-kpi-label { font-size: 12px; color: #8a95ab; }
.x1g-kpi-value { font-size: 24px; font-weight: 800; color: #e8ecf5; margin: 8px 0 4px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.x1g-kpi-value--empty { color: #5b6577; }
.x1g-kpi-sub { font-size: 11px; color: #5b6577; }

/* ---------- 产品卡片 ---------- */
.x1g-prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.x1g-prod {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
}
.x1g-prod-head { display: flex; align-items: center; gap: 12px; }
.x1g-prod-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.06); }
.x1g-prod-logo--ph { display: flex; align-items: center; justify-content: center; font-size: 18px; color: #f5a623; }
.x1g-prod-name-box { min-width: 0; }
.x1g-prod-name { font-size: 15px; font-weight: 700; color: #e8ecf5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x1g-prod-sub { font-size: 12px; color: #8a95ab; margin-top: 2px; }
.x1g-prod-rixi {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 0; border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06);
}
.x1g-prod-rixi-val { font-size: 22px; font-weight: 800; color: #f5a623; font-family: ui-monospace, Menlo, Consolas, monospace; }
.x1g-prod-rixi-label { font-size: 11px; color: #8a95ab; }
.x1g-prod-meta { display: flex; justify-content: space-between; font-size: 12px; color: #8a95ab; }
.x1g-prod-meta b { color: #c6cede; font-weight: 600; }
.x1g-prod-actions { display: flex; gap: 10px; }

/* ---------- 按钮 ---------- */
.x1g-btn {
  flex: 1; padding: 10px 0; border-radius: 9px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 700; transition: .15s;
}
.x1g-btn--detail { background: rgba(64,120,255,.15); color: #6ea0ff; border: 1px solid rgba(64,120,255,.3); }
.x1g-btn--detail:hover { background: rgba(64,120,255,.25); }
.x1g-btn--invest {
  background: rgba(245,166,35,.12); color: #f5a623; border: 1px solid rgba(245,166,35,.3);
  opacity: .65; cursor: not-allowed;
}

/* ---------- 卡片 / 空态 ---------- */
.x1g-card { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; }
.x1g-card--flat { padding: 0; }
.x1g-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 40px 20px;
}
.x1g-empty-ic { font-size: 30px; }
.x1g-empty-title { font-size: 15px; font-weight: 700; color: #c6cede; }
.x1g-empty-desc { font-size: 12px; color: #7a8699; max-width: 320px; }
.x1g-retry-btn {
  margin-top: 8px; padding: 9px 26px; border-radius: 9px; border: 1px solid rgba(64,120,255,.4);
  background: rgba(64,120,255,.15); color: #6ea0ff; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ---------- 表格（我的投资） ---------- */
.x1g-table { display: flex; flex-direction: column; }
.x1g-trow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 18px; font-size: 13px;
}
.x1g-trow + .x1g-trow { border-top: 1px solid rgba(255,255,255,.05); }
.x1g-trow > span { color: #c6cede; }
.x1g-tnum { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; }
.x1g-trixi { color: #f5a623 !important; font-weight: 600; }

/* ---------- 须知 ---------- */
.x1g-note {
  background: rgba(245,166,35,.06); border: 1px solid rgba(245,166,35,.2); border-radius: 12px;
  padding: 16px 18px;
}
.x1g-note-title { font-size: 13px; font-weight: 700; color: #f5a623; margin-bottom: 6px; }
.x1g-note-body { font-size: 12px; color: #aeb8cc; line-height: 1.6; }

/* ---------- Loading ---------- */
.x1g-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 80px 0; color: #8a95ab; font-size: 13px;
}
.x1g-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(64,120,255,.15); border-top-color: #4080ff;
  animation: x1g-spin .8s linear infinite;
}
@keyframes x1g-spin { to { transform: rotate(360deg); } }

/* ---------- 详情弹层 ---------- */
.x1g-dialog { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.x1g-dialog-mask { position: absolute; inset: 0; background: rgba(2,6,14,.7); }
.x1g-dialog-box {
  position: relative; width: 400px; max-width: 92vw; max-height: 86vh; overflow: auto;
  background: #141b2e; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.x1g-dialog-x { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 8px; border: none; background: rgba(255,255,255,.06); color: #aeb8cc; cursor: pointer; }
.x1g-dialog-head { font-size: 17px; font-weight: 800; color: #e8ecf5; margin-bottom: 16px; }
.x1g-dt-line { display: flex; justify-content: space-between; padding: 9px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.05); }
.x1g-dt-line span { color: #8a95ab; }
.x1g-dt-line b { color: #c6cede; font-weight: 600; text-align: right; }
.x1g-dt-title { margin: 14px 0 8px; font-size: 12px; font-weight: 700; color: #8a95ab; }
.x1g-dt-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; color: #c6cede; }
.x1g-dt-empty { font-size: 12px; color: #7a8699; padding: 8px 0; }
.x1g-dialog-invest { margin-top: 16px; width: 100%; }

/* ---------- Phase 2: 完整详情视图 ---------- */
.x1g-detail { max-width: 480px; width: 92%; max-height: 86vh; overflow-y: auto; }
.x1g-detail-load { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 0; }
.x1g-detail-hero { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.x1g-detail-hero-logo { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.x1g-detail-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.x1g-detail-hero-info { min-width: 0; }
.x1g-detail-name { font-size: 18px; font-weight: 800; color: #e8ecf5; }
.x1g-detail-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: #41e0a0; background: rgba(65,224,160,.12); border: 1px solid rgba(65,224,160,.3); padding: 2px 10px; border-radius: 999px; }
.x1g-detail-status i { width: 6px; height: 6px; border-radius: 50%; background: #41e0a0; }
.x1g-detail-rixi { text-align: center; padding: 20px 0 6px; }
.x1g-detail-rixi-val { font-size: 30px; font-weight: 800; color: #f5a623; font-family: ui-monospace, Menlo, Consolas, monospace; }
.x1g-detail-rixi-label { margin-top: 4px; font-size: 12px; color: #8a95ab; }
.x1g-dt-line b { max-width: 60%; }
.x1g-dt-row-val { color: #f5a623; font-weight: 700; }

/* Phase 2 详情视图 Mobile 适配 */
@media (max-width: 900px) {
  .x1g-detail { max-width: 100%; width: 100%; height: 100%; max-height: 100vh; border-radius: 0; padding: 22px 18px 40px; }
  .x1g-dialog-box.x1g-detail { display: block; }
  .x1g-detail-name { font-size: 20px; }
  .x1g-detail-rixi-val { font-size: 34px; }
}

/* ---------- Phase 3: 我的投资记录视图 ---------- */
.x1g-inv-list { display: flex; flex-direction: column; gap: 12px; }
.x1g-inv-card { display: flex; flex-direction: column; gap: 12px; width: 100%; text-align: left; background: #1a2237; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px; cursor: pointer; transition: border-color .15s, background .15s; color: inherit; }
.x1g-inv-card:hover { border-color: rgba(77,160,255,.5); background: #1d2640; }
.x1g-inv-card-top { display: flex; align-items: center; gap: 12px; }
.x1g-inv-logo { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.x1g-inv-logo img { width: 100%; height: 100%; object-fit: cover; }
.x1g-inv-logo-ph { font-size: 16px; color: #8a95ab; }
.x1g-inv-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: #e8ecf5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x1g-inv-badge { flex: 0 0 auto; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.x1g-inv-badge--on { color: #41e0a0; background: rgba(65,224,160,.12); border: 1px solid rgba(65,224,160,.3); }
.x1g-inv-badge--off { color: #8a95ab; background: rgba(138,149,171,.12); border: 1px solid rgba(138,149,171,.3); }
.x1g-inv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.x1g-inv-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.x1g-inv-k { font-size: 11px; color: #8a95ab; }
.x1g-inv-cell b { font-size: 14px; color: #e8ecf5; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 投资详情弹层 */
.x1g-inv-detail { max-width: 520px; width: 92%; max-height: 86vh; overflow-y: auto; }
.x1g-inv-load-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 0; }
.x1g-detail-status--on { color: #41e0a0; background: rgba(65,224,160,.12); border-color: rgba(65,224,160,.3); }
.x1g-detail-status--on i { background: #41e0a0; }
.x1g-detail-status--off { color: #8a95ab; background: rgba(138,149,171,.12); border-color: rgba(138,149,171,.3); }
.x1g-detail-status--off i { background: #8a95ab; }
.x1g-inv-log { display: flex; flex-direction: column; }
.x1g-inv-lrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.x1g-inv-lrow:last-child { border-bottom: none; }
.x1g-inv-ltxt { flex: 1; font-size: 13px; color: #c6cede; }
.x1g-inv-lval { color: #41e0a0; font-weight: 700; }
.x1g-inv-ltime { font-size: 12px; color: #8a95ab; }
.x1g-inv-log-empty { padding: 12px 0; color: #8a95ab; font-size: 13px; text-align: center; }

/* Phase 3 投资记录 Mobile 适配 */
@media (max-width: 900px) {
  .x1g-inv-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .x1g-inv-detail { max-width: 100%; width: 100%; height: 100%; max-height: 100vh; border-radius: 0; padding: 22px 18px 40px; }
  .x1g-dialog-box.x1g-inv-detail { display: block; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .x1g { padding: 16px 14px 96px; }
  .x1g-kpi-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .x1g-kpi-value { font-size: 18px; }
  .x1g-prod-grid { grid-template-columns: 1fr; gap: 12px; }
  .x1g-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .x1g-top-right { width: 100%; justify-content: space-between; }
}
@media (max-width: 480px) {
  .x1g-kpi-grid { grid-template-columns: 1fr; }
}
