/* 资金流水 · LZW 红金主题 */

.ml-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  background: var(--app-bg);
}

/* ── 顶部红金 Hero ── */
.ml-hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 28px;
  color: #fff;
  background:
    radial-gradient(ellipse 55% 70% at 92% 8%, rgba(212, 160, 23, 0.32), transparent 55%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(200, 16, 46, 0.35), transparent 50%),
    linear-gradient(155deg, #7a1020 0%, #8b1a2a 52%, #8b1528 100%);
}
.ml-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  pointer-events: none;
}

.ml-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
}
.ml-nav .back {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.ml-nav .back:active { opacity: 0.85; }
.ml-nav .meta { flex: 1; min-width: 0; }
.ml-nav .meta .k {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(232, 176, 106, 0.9);
  font-weight: 600;
}
.ml-nav .meta .t {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--app-display, serif);
  line-height: 1.2;
  color: #fff;
}

.ml-summary {
  position: relative;
  z-index: 1;
  margin: 4px 16px 0;
  padding: 18px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ml-summary-balance {
  min-width: 0;
}
.ml-summary-hint {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px 0;
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 0.02em;
}
.ml-summary-hint .hint-item {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.ml-summary-hint .hint-k {
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
}
.ml-summary-hint .hint-v {
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.68);
}
.ml-summary-hint .hint-count .hint-v {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.52);
}
.ml-summary-hint .hint-dot {
  margin: 0 5px;
  font-size: 7px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.22);
  user-select: none;
}
.ml-summary-cell {
  flex: 1;
  min-width: 0;
}
.ml-summary-cell.align-right { text-align: right; }
.ml-summary-sep {
  width: 1px;
  margin: 4px 14px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}
.ml-summary .lab {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
}
.ml-summary .amt {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 800;
  font-family: var(--app-display, serif);
  line-height: 1;
  color: #f5d76e;
}
.ml-summary .amt.in { color: #f5d76e; }
.ml-summary .amt.out { color: #fff; font-size: 22px; }
.ml-summary .amt small {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  margin-left: 2px;
}

/* ── 主体内容区 ── */
.ml-body {
  position: relative;
  z-index: 2;
  margin-top: -14px;
  padding: 0 0 16px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #f8f2f3 0%, var(--app-bg) 120px);
  box-shadow: 0 -10px 30px rgba(122, 16, 32, 0.1);
}
.ml-body::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  margin: 10px auto 6px;
  border-radius: 2px;
  background: rgba(122, 16, 32, 0.12);
}

/* ── 分类 Tab ── */
.ml-tabs-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 4px;
}
.ml-tabs-wrap::-webkit-scrollbar { display: none; }
.ml-tabs {
  display: inline-flex;
  gap: 8px;
  min-width: 100%;
}
.ml-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--app-line, #eadfe1);
  background: #fff;
  color: var(--app-sub, #5c4a4e);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.ml-tab.active {
  background: linear-gradient(135deg, var(--app-primary, #c8102e) 0%, var(--app-primary-2, #e33845) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.28);
}
.ml-tab:active { opacity: 0.88; }

/* ── 分组标题 ── */
.ml-sec {
  margin: 12px 16px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.ml-sec .t {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--app-display, serif);
  color: var(--app-ink, #7a1020);
}
.ml-sec .s {
  font-size: 11px;
  color: var(--app-muted, #9a8a8e);
}

/* ── 流水卡片列表 ── */
.ml-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ml-card {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--app-line, #eadfe1);
  box-shadow: var(--app-shadow-sm, 0 1px 6px rgba(0, 0, 0, 0.05));
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ml-card:active {
  transform: scale(0.99);
  box-shadow: 0 2px 8px rgba(122, 16, 32, 0.08);
}
.ml-card.plus { border-left: 3px solid #2e7d4a; }
.ml-card.minus { border-left: 3px solid var(--app-primary, #c8102e); }
.ml-card.neutral { border-left: 3px solid var(--app-muted, #9a8a8e); }

.ml-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ml-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}
.ml-card.plus .ml-card-icon {
  background: rgba(46, 125, 74, 0.1);
  color: #2e7d4a;
}
.ml-card.minus .ml-card-icon {
  background: rgba(200, 16, 46, 0.08);
  color: var(--app-primary, #c8102e);
}
.ml-card.neutral .ml-card-icon {
  background: rgba(154, 138, 142, 0.1);
  color: var(--app-muted, #9a8a8e);
  font-size: 18px;
}

.ml-card-main { flex: 1; min-width: 0; }
.ml-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.ml-card-top .title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--app-display, serif);
  color: var(--app-ink, #7a1020);
  line-height: 1.35;
}
.ml-card-top .amt {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--app-display, serif);
  white-space: nowrap;
}
.ml-card.plus .amt { color: #2e7d4a; }
.ml-card.minus .amt { color: var(--app-primary, #c8102e); }
.ml-card.neutral .amt {
  color: var(--app-muted, #9a8a8e);
  font-size: 13px;
}
.ml-card.pending .amt-val { color: #c47a00; }
.ml-card.timeout .amt-val { color: var(--app-muted, #9a8a8e); }
.ml-card-top .amt.amt-recharge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.ml-card-top .amt.amt-recharge .amt-val {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--app-display, serif);
  white-space: nowrap;
}
.ml-card.plus .amt-recharge .amt-val { color: #2e7d4a; }
.ml-card.minus .amt-recharge .amt-val { color: var(--app-primary, #c8102e); }
.ml-card-top .amt-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.ml-card-top .amt-badge.ok {
  color: #2e7d4a;
  background: rgba(46, 125, 74, 0.1);
}
.ml-card-top .amt-badge.pending {
  color: #c47a00;
  background: rgba(196, 122, 0, 0.12);
}
.ml-card-top .amt-badge.fail {
  color: var(--app-primary, #c8102e);
  background: rgba(200, 16, 46, 0.1);
}
.ml-card-top .amt-badge.timeout {
  color: var(--app-muted, #9a8a8e);
  background: rgba(154, 138, 142, 0.12);
}
.ml-card-top .amt small {
  font-size: 11px;
  font-weight: 600;
  margin-left: 1px;
}

.ml-card-desc {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--app-sub, #5c4a4e);
  word-break: break-all;
}

.ml-card-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--app-line, #eadfe1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ml-card-foot .foot-item {
  font-size: 11px;
  color: var(--app-muted, #9a8a8e);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.ml-card-foot .foot-dot {
  font-size: 10px;
  line-height: 1;
  color: rgba(154, 138, 142, 0.45);
  user-select: none;
}

/* ── 空状态 ── */
.ml-empty {
  margin: 0 16px;
  padding: 48px 20px;
  text-align: center;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--app-line, #eadfe1);
}
.ml-empty .ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(200, 16, 46, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ml-empty .ico svg {
  width: 26px;
  height: 26px;
  stroke: var(--app-primary, #c8102e);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ml-empty p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--app-ink, #7a1020);
}
.ml-empty span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--app-muted, #9a8a8e);
}

/* ── 详情弹层 ── */
.ml-detail-sheet {
  padding: 16px 16px 28px;
  max-height: 70vh;
  overflow-y: auto;
}
.ml-detail-sheet .hd {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--app-display, serif);
  margin-bottom: 14px;
  text-align: center;
  color: var(--app-ink, #7a1020);
}
.ml-detail-sheet .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--app-line, #eadfe1);
  font-size: 14px;
}
.ml-detail-sheet .lab {
  color: var(--app-muted, #9a8a8e);
  flex-shrink: 0;
}
.ml-detail-sheet .val {
  text-align: right;
  word-break: break-all;
  color: var(--app-text, #1a1214);
  font-weight: 500;
}
