/* ============================================================
   X1 · page-asset.css — 资产 / 钱包（Phase 1）
   深色科技风 · Design System 变量复用
   PC 1440 三 KPI + 操作占位 + 资产表
   Mobile ≤760 独立布局 · 零横向滚动
   前缀 .x1a-* 与其它页面隔离
   ============================================================ */

.x1a {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 32px 40px;
  max-width: var(--x1-content-max, 1440px);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ---------- 顶部 ---------- */
.x1a-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.x1a-top-brand { display: flex; align-items: center; gap: 12px; }
.x1a-logo {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #6ea0ff;
  background: linear-gradient(135deg, rgba(64,120,255,.25), rgba(64,120,255,.05));
  border: 1px solid rgba(64,120,255,.35);
  box-shadow: 0 0 18px rgba(59,130,246,.25);
}
.x1a-title { font-size: 20px; font-weight: 800; letter-spacing: .5px; color: #e8ecf5; }
.x1a-sub { font-size: 12px; color: #7a8699; margin-top: 2px; }
.x1a-top-right { display: flex; align-items: center; gap: 12px; }
.x1a-system-online {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .6px; color: #4fd08a;
  background: rgba(63,207,142,.1); border: 1px solid rgba(63,207,142,.25);
  padding: 4px 10px; border-radius: 999px;
}
.x1a-system-online i { width: 7px; height: 7px; border-radius: 50%; background: #3ecf8e; box-shadow: 0 0 8px #3ecf8e; }
.x1a-wallet {
  font-size: 12px; color: #9fb0d0; font-family: ui-monospace, Menlo, Consolas, monospace;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  padding: 6px 12px; border-radius: 999px;
}

/* ---------- 区块 ---------- */
.x1a-sec { display: flex; flex-direction: column; gap: 12px; }
.x1a-sec-head { display: flex; align-items: center; justify-content: space-between; }
.x1a-sec-title { font-size: 15px; font-weight: 700; color: #dde3ee; margin: 0; }
.x1a-sec-tag {
  font-size: 11px; color: #8a95ab;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  padding: 3px 9px; border-radius: 999px;
}
.x1a-sec-tag--live { color: #4fd08a; background: rgba(63,207,142,.08); border-color: rgba(63,207,142,.2); }

/* ---------- 卡片 ---------- */
.x1a-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 18px 20px;
}

/* ---------- KPI 总览 ---------- */
.x1a-kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.x1a-kpi { display: flex; flex-direction: column; }
.x1a-kpi-label { font-size: 12px; color: #8a95ab; }
.x1a-kpi-value {
  font-size: 26px; font-weight: 800; color: #e8ecf5;
  margin: 8px 0 4px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.x1a-kpi-value--empty { color: #5b6577; }
.x1a-kpi-sub { font-size: 11px; color: #5b6577; }

/* ---------- 资产操作（Disabled） ---------- */
.x1a-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.x1a-act {
  padding: 14px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  color: #5b6577; cursor: not-allowed;
  text-align: center;
}
.x1a-act:disabled { opacity: .7; }

/* ---------- 资产列表 ---------- */
.x1a-list-head,
.x1a-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}
.x1a-list-head {
  font-size: 11px; letter-spacing: .4px; color: #6b7a95;
  text-transform: uppercase;
  padding: 0 20px 12px;
}
.x1a-list-head span { text-align: right; }
.x1a-list-head span:first-child { text-align: left; }
.x1a-row {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.x1a-row--last { border-bottom: none; }
.x1a-row:hover { background: rgba(255,255,255,.02); }
.x1a-cell { text-align: right; }
.x1a-cell:first-child { text-align: left; }
.x1a-cell--coin { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* Mobile 2x2 数值卡：PC 隐藏 */
.x1a-m-metrics { display: none; }
.x1a-coin-logo { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; }
.x1a-coin-logo img { width: 100%; height: 100%; object-fit: cover; }
.x1a-coin-logo--ph { font-size: 15px; font-weight: 700; color: #6ea0ff; }
.x1a-coin-name-box { min-width: 0; }
.x1a-coin-name { font-size: 14px; font-weight: 600; color: #e8ecf5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x1a-coin-sub { font-size: 11px; color: #7a8699; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x1a-num { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: #c6cede; }
.x1a-num--strong { color: #e8ecf5; font-weight: 600; }
.x1a-num--price { color: #9fb0d0; }

/* ---------- Empty ---------- */
.x1a-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 44px 20px;
  background: rgba(255,255,255,.02); border: 1px dashed rgba(255,255,255,.12);
  border-radius: 14px;
}
.x1a-empty-ic { font-size: 32px; }
.x1a-empty-title { font-size: 15px; font-weight: 700; color: #c6cede; }
.x1a-empty-desc { font-size: 12px; color: #7a8699; max-width: 340px; line-height: 1.6; }

/* ---------- Loading ---------- */
.x1a-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 60px 20px; color: #7a8699; font-size: 13px;
}
.x1a-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(110,160,255,.18);
  border-top-color: #6ea0ff;
  animation: x1a-spin .8s linear infinite;
}
@keyframes x1a-spin { to { transform: rotate(360deg); } }

/* ---------- Retry ---------- */
.x1a-retry-btn {
  margin-top: 6px; padding: 9px 26px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #6ea0ff;
  background: rgba(64,120,255,.15); border: 1px solid rgba(64,120,255,.35);
  cursor: pointer;
}
.x1a-retry-btn:hover { background: rgba(64,120,255,.25); }

/* ============================================================
   Mobile ≤760 —— 独立布局，零横向滚动
   ============================================================ */
@media (max-width: 760px) {
  .x1a { padding: 18px 16px 96px; gap: 18px; }
  .x1a-top { align-items: flex-start; }
  .x1a-top-right { width: 100%; justify-content: space-between; }
  .x1a-title { font-size: 18px; }
  .x1a-sub { font-size: 11px; }

  .x1a-kpi-grid { grid-template-columns: 1fr; gap: 10px; }
  .x1a-kpi-value { font-size: 22px; }
  .x1a-kpi { padding: 14px 16px; }

  .x1a-actions { grid-template-columns: 1fr; gap: 10px; }
  .x1a-act { padding: 12px; font-size: 12px; }

  /* 资产列表：卡片化，每币一行 2 列字段，零横向滚动 */
  .x1a-list-head { display: none; }
  .x1a-row {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    border: none;
    margin-bottom: 10px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    overflow: hidden;
  }
  .x1a-row:hover { background: rgba(255,255,255,.03); }
  .x1a-cell { text-align: left; }
  .x1a-cell--coin { padding: 12px 14px 8px; }
  /* 数值列（除 coin 外的 4 个 cell）PC 用，Mobile 隐藏 */
  .x1a-cell:not(.x1a-cell--coin) { display: none; }
  /* Mobile 2x2 数值卡 */
  .x1a-m-metrics {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 14px 14px;
  }
  .x1a-m-metric {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px; padding: 9px 12px;
  }
  .x1a-m-metric-label { font-size: 10px; color: #7a8699; }
  .x1a-m-metric-value { font-size: 14px; font-weight: 600; color: #e8ecf5; margin-top: 4px; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ============================================================
   Phase 2 · 资产详情 / 资金记录（只读）
   记录 tab、记录卡片行、资产详情头、记录详情字段表
   ============================================================ */

/* —— 资金记录入口卡（总览页底部） —— */
.x1a-rec-entry {
  margin-top: 14px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(0,123,255,.10), rgba(0,255,184,.05));
  border: 1px solid rgba(0,175,255,.25);
  border-radius: 14px; padding: 14px 16px;
}
.x1a-rec-entry-title { font-size: 15px; font-weight: 700; color: #e8ecf5; }
.x1a-rec-entry-sub { font-size: 12px; color: #7a8699; margin-top: 3px; }
.x1a-rec-entry-btn {
  background: #00a8ff; color: #04121f; border: none; border-radius: 10px;
  padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.x1a-rec-entry-btn:hover { filter: brightness(1.12); }

/* —— 记录视图壳 —— */
.x1a-records { min-height: 320px; }
.x1a-rec-head { display: flex; justify-content: flex-start; margin-bottom: 14px; }
.x1a-back {
  background: transparent; color: #8fa3bf; border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px; padding: 7px 13px; font-size: 13px; cursor: pointer;
}
.x1a-back:hover { color: #e8ecf5; border-color: rgba(0,175,255,.4); }
.x1a-rec-titlebox { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.x1a-rec-titlebox .x1a-sec-title { margin: 0; }

/* —— 记录分段时间（资金明细/充值/提现/划转） —— */
.x1a-rectabs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px;
}
.x1a-rectab {
  background: rgba(255,255,255,.04); color: #8fa3bf; border: 1px solid rgba(255,255,255,.08);
  border-radius: 99px; padding: 8px 18px; font-size: 13px; cursor: pointer;
  font-weight: 600;
}
.x1a-rectab--on {
  background: #00a8ff; color: #04121f; border-color: #00a8ff; box-shadow: 0 4px 16px rgba(0,168,255,.35);
}
.x1a-rectab:hover:not(.x1a-rectab--on) { color: #e8ecf5; }

/* —— 记录卡片列表 —— */
.x1a-rcard { overflow: hidden; }
.x1a-rrow {
  display: block; padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.x1a-rrow:last-child { border-bottom: none; }
.x1a-rrow--click { cursor: pointer; }
.x1a-rrow--click:hover { background: rgba(0,175,255,.05); }
.x1a-rhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.x1a-rname { font-size: 14px; font-weight: 600; color: #e8ecf5; }
.x1a-rtime { font-size: 12px; color: #7a8699; font-family: ui-monospace, Menlo, Consolas, monospace; }
.x1a-rbody { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.x1a-rdesc { font-size: 12px; color: #8fa3bf; flex: 1; min-width: 0; word-break: break-all; }
.x1a-ramt { font-size: 14px; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.x1a-ramt--in { color: #2fe6a0; }
.x1a-ramt--out { color: #ff5c7a; }
.x1a-rcoin { font-size: 11px; color: #7a8699; font-weight: 400; }
.x1a-rstatus {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
}
.x1a-rstatus--ok { color: #2fe6a0; background: rgba(47,230,160,.12); }
.x1a-rstatus--wa { color: #f0b429; background: rgba(240,180,41,.12); }

/* —— 资产详情头（某币种） —— */
.x1a-coinhead {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.x1a-coinhead-main { display: flex; align-items: center; gap: 12px; }
.x1a-coinhead-metrics { display: flex; gap: 22px; }
.x1a-coinhead-metrics > div { display: flex; flex-direction: column; gap: 3px; }
.x1a-coinhead-metrics span { font-size: 11px; color: #7a8699; }
.x1a-coinhead-metrics b { font-size: 14px; color: #e8ecf5; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* —— 记录详情字段表 —— */
.x1a-rec-detail { padding: 4px 0; }
.x1a-rd-row {
  display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.x1a-rd-row:last-child { border-bottom: none; }
.x1a-rd-k { font-size: 13px; color: #7a8699; flex-shrink: 0; }
.x1a-rd-v { font-size: 13px; color: #e8ecf5; text-align: right; word-break: break-all; min-width: 0; }

/* —— Loading（小尺寸，用于记录区） —— */
.x1a-loading--sm { padding: 40px 16px; }

/* —— Phase 2 移动端（≤760px）：记录视图 —— */
@media (max-width: 760px) {
  .x1a-coinhead { flex-direction: column; align-items: flex-start; }
  .x1a-coinhead-metrics { width: 100%; justify-content: space-between; gap: 8px; }
  .x1a-rbody { flex-direction: column; align-items: flex-start; gap: 6px; }
  .x1a-rdesc { width: 100%; }
  .x1a-rec-entry { padding: 13px 14px; }
  .x1a-rec-entry-btn { padding: 9px 14px; font-size: 12px; }
  .x1a-rectab { padding: 7px 14px; font-size: 12px; }
}
