/* 「我的」页资金入口：今日盈亏、我的返水。材质和游戏大厅、玩家管理一致：
   玻璃顶栏、钴蓝胶囊页签、细描边加紧凑阴影、真实文字。
   站内全局样式会清掉 p、dd 的外边距，这些元素的间距用内边距。
   本文件在暗夜引擎的忽略列表里（frontend/src/utils/displayMode.js），不会被改写，所以深浅两套颜色都写在这里的变量里。 */
.jg-mf-row, .jg-mf-sheet {
  --mf-bg: #eef2f7;
  --mf-card: #ffffff;
  --mf-soft: #f4f7fb;
  --mf-line: #e1e7f0;
  --mf-ink: #0b1a38;
  --mf-ink-2: #36435e;
  --mf-vice: #66738d;
  --mf-brand: #1560d4;
  --mf-tint: #1560d414;
  --mf-glass: #ffffffb8;
  --mf-glass-line: #0f23501a;
  --mf-shadow: 0 0 0 1px #0f23500d, 0 1px 2px #0f23500a, 0 .21rem .53rem -.26rem #0f23502e;
  --mf-seg-bg: linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
  --mf-seg-shadow: 0 0 0 1px #0f235014, 0 1px 2px #0f23500f, 0 .05333rem .16rem -.08rem #0f235024, inset 0 1px 0 #fff;
  --mf-seg-active: linear-gradient(180deg, #f1f4f9 0%, #e9eef6 100%);
  --mf-ind: linear-gradient(180deg, #3a8bff 0%, #1f68e8 52%, #1757d2 100%);
  --mf-ind-shadow: 0 0 0 1px #1556cc, inset 0 1px 0 #ffffff5c, inset 0 -1px 0 #0a3a9c40, 0 .08rem .21333rem -.08rem #1459ccad;
  --mf-hero: linear-gradient(160deg, #2b7ff2 0%, #1459cc 62%, #0f46a8 100%);
  --mf-hero-shadow: 0 0 0 1px #0f46a8, inset 0 1px 0 #ffffff47, 0 .21rem .53rem -.26rem #1459cc99;
}
:root[data-jg-mode="dark"] :is(.jg-mf-row, .jg-mf-sheet) {
  --mf-bg: #101a2d;
  --mf-card: #1b2a44;
  --mf-soft: #223452;
  --mf-line: #ffffff14;
  --mf-ink: #e6efff;
  --mf-ink-2: #c1d0e6;
  --mf-vice: #93a5c0;
  --mf-brand: #85baff;
  --mf-tint: #85baff1f;
  --mf-glass: #16233ab8;
  --mf-glass-line: #ffffff14;
  --mf-shadow: 0 0 0 1px #ffffff12, 0 1px 2px #00000040;
  --mf-seg-bg: linear-gradient(180deg, #1b2a44 0%, #17243b 100%);
  --mf-seg-shadow: 0 0 0 1px #ffffff12, 0 1px 2px #00000040, inset 0 1px 0 #ffffff0d;
  --mf-seg-active: #1f2f4c;
  --mf-ind: linear-gradient(180deg, #3a88f7 0%, #1f63dc 52%, #1a55c4 100%);
  --mf-ind-shadow: 0 0 0 1px #2c6fe0, inset 0 1px 0 #ffffff47, inset 0 -1px 0 #0a2f7a59, 0 .08rem .21333rem -.08rem #000000b3;
  --mf-hero: linear-gradient(160deg, #1f4c94 0%, #173a78 62%, #122d60 100%);
  --mf-hero-shadow: 0 0 0 1px #ffffff1f, inset 0 1px 0 #ffffff24, 0 .21rem .53rem -.26rem #000000b3;
}

/* ---------- 入口：图标和箭头尺寸沿用原菜单行；新版「我的」页的 .jg-me-tile / .jg-me-chevron 优先 ---------- */
.jg-mf-row { cursor: pointer; }
:where(.jg-mf-row__icon) { display: inline-flex; flex: none; width: .53333rem; height: .53333rem; color: var(--mf-brand); }
:where(.jg-mf-row__chevron) { display: inline-flex; flex: none; width: .4rem; height: .4rem; color: var(--mf-vice); }
:where(.jg-mf-row) svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* 今日盈亏图标：现在的页面是整张图标，新版是蓝底白线。本文件加载得比新版样式早，选择器要更具体才能覆盖它。 */
:root .personPage .personcontent .mianMenuList .menu_item[data-jg-mf="profit"] .main_img {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%234a9bff'/%3E%3Cstop offset='1' stop-color='%231459cc'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='6' y='5' width='36' height='36' rx='10' fill='url(%23g)'/%3E%3Cpath d='M8 15a8 8 0 0 1 8-8h16a8 8 0 0 1 8 8' fill='none' stroke='%23fff' stroke-opacity='.45' stroke-width='1.5'/%3E%3Cpath d='M15 32V16M15 32h18M19 27l5-6 4 3 5-7' fill='none' stroke='%23fff' stroke-width='2.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
:root .personPage .personcontent .mianMenuList.jg-mf-new .menu_item[data-jg-mf="profit"] .main_img {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4v16h16'/%3E%3Cpath d='m8 15 4-4.500 3 3 5-6.500'/%3E%3C/svg%3E");
}

/* ---------- 页面外壳：复用选择页，顶栏改成玻璃 ---------- */
:root .jg-mf-sheet { background: var(--mf-bg); color: var(--mf-ink); touch-action: pan-y; }
:root .jg-mf-sheet .jg-sheet__head {
  z-index: 3; background: var(--mf-glass); box-shadow: 0 1px 0 var(--mf-glass-line);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
}
:root .jg-mf-sheet .jg-sheet__title { color: var(--mf-ink); font-weight: 600; }
:root .jg-mf-sheet .jg-sheet__back { color: var(--mf-ink); }
:root .jg-mf { display: flex; flex-direction: column; gap: .28rem; overflow-x: hidden; padding: .28rem .32rem calc(.5rem + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.jg-mf.is-loading .jg-mf-pane, .jg-mf-pane.is-loading { opacity: .6; }
.jg-mf-pane { display: flex; flex-direction: column; gap: .24rem; transition: opacity .16s ease; }
.jg-mf-pane.is-error { display: none; }

/* ---------- 胶囊页签：和游戏大厅同一套，钴蓝胶囊滑到选中项，可按住拖动 ---------- */
.jg-mf-seg {
  --gap: .12rem;
  position: relative; isolation: isolate; flex: none; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: var(--gap);
  touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.jg-mf-seg button {
  position: relative; height: .92rem; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--mf-seg-bg); box-shadow: var(--mf-seg-shadow);
  font: inherit; font-size: .33rem; font-weight: 500; line-height: 1; letter-spacing: .01em;
}
.jg-mf-seg button:not(.is-on):active { background: var(--mf-seg-active); }
.jg-mf-seg__ind {
  position: absolute; z-index: 1; top: 0; left: 0; height: 100%; width: calc((100% - (var(--n, 4) - 1) * var(--gap)) / var(--n, 4));
  border-radius: 999px; pointer-events: none; overflow: hidden; background: var(--mf-ind); box-shadow: var(--mf-ind-shadow);
  transform: translateX(calc(var(--i, 0) * (100% + var(--gap))));
  transition: transform .46s cubic-bezier(.3, 1.28, .45, 1);
}
.jg-mf-seg__ind::after { content: ''; position: absolute; inset: 1px 1px auto; height: 48%; border-radius: 999px 999px 0 0; background: linear-gradient(180deg, #ffffff2e, #ffffff00); }
.jg-mf-seg.is-dragging .jg-mf-seg__ind { transition: transform .1s cubic-bezier(.2, .8, .2, 1); }
.jg-mf-seg__label {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--mf-ink-2); transition: color .25s, transform .22s cubic-bezier(.3, 1.3, .45, 1);
}
.jg-mf-seg button:active .jg-mf-seg__label { transform: scale(.94); }
.jg-mf-seg.is-dragging button:active .jg-mf-seg__label { transform: none; }
.jg-mf-seg button.is-on { font-weight: 600; }
.jg-mf-seg button.is-on .jg-mf-seg__label, .jg-mf-seg.is-dragging button.is-target .jg-mf-seg__label { color: #fff; }
.jg-mf-seg.is-dragging button.is-on:not(.is-target) .jg-mf-seg__label { color: var(--mf-ink-2); }

/* ---------- 主数字卡 ---------- */
.jg-mf-hero { position: relative; overflow: hidden; padding: .38rem .4rem .34rem; border-radius: .36rem; color: #fff; background: var(--mf-hero); box-shadow: var(--mf-hero-shadow); }
.jg-mf-hero::after { content: ''; position: absolute; inset: 0 0 auto; height: 45%; background: linear-gradient(180deg, #ffffff1f, #ffffff00); pointer-events: none; }
.jg-mf-hero__label { position: relative; font-size: .34667rem; color: #ffffffd9; }
.jg-mf-hero__value { position: relative; padding-top: .08rem; font-size: .8rem; font-weight: 700; line-height: 1.2; letter-spacing: .005em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.jg-mf-hero__hint { position: relative; padding-top: .1rem; font-size: .30667rem; line-height: 1.45; color: #ffffffc2; }
.jg-mf-hero__hint:empty { display: none; }

/* ---------- 数据卡 ---------- */
.jg-mf-card { padding: .28rem .3rem .3rem; border-radius: .32rem; background: var(--mf-card); box-shadow: var(--mf-shadow); }
.jg-mf-card__title { margin: 0; padding: 0 0 .18rem .04rem; font-size: .34667rem; font-weight: 600; color: var(--mf-ink); }
.jg-mf-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 !important; overflow: hidden; border-radius: .22rem; background: var(--mf-line); box-shadow: 0 0 0 1px var(--mf-line); }
.jg-mf-stats > div { min-width: 0; padding: .2rem .24rem; background: var(--mf-card); }
.jg-mf-stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.jg-mf-stats dt { font-size: .29333rem; color: var(--mf-vice); }
.jg-mf-stats dd { margin: 0; overflow: hidden; padding-top: .05rem; font-size: .38rem; font-weight: 600; color: var(--mf-ink); text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jg-mf-note { padding: 0 .08rem; font-size: .30667rem; line-height: 1.5; color: var(--mf-vice); }
.jg-mf-chip { align-self: flex-start; padding: .12rem .28rem; border-radius: 999px; font-size: .32rem; font-weight: 600; color: var(--mf-brand); background: var(--mf-tint); }

/* ---------- 表格：胶囊下面的记录和比例 ---------- */
.jg-mf-table { padding-top: .22rem; }
.jg-mf-card > .jg-mf-table:first-child { padding-top: 0; }
.jg-mf-table__head, .jg-mf-table__row { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, .85fr); align-items: center; gap: .12rem; padding: .2rem .08rem; }
.jg-mf-table--two .jg-mf-table__head, .jg-mf-table--two .jg-mf-table__row { grid-template-columns: minmax(0, 1fr) auto; }
.jg-mf-table__head { padding-top: .04rem; font-size: .29333rem; color: var(--mf-vice); border-bottom: 1px solid var(--mf-line); }
.jg-mf-table__row { font-size: .33rem; color: var(--mf-ink-2); font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--mf-line); }
.jg-mf-table__row:last-child { border-bottom: 0; padding-bottom: .04rem; }
.jg-mf-table__row span { min-width: 0; overflow-wrap: anywhere; }
.jg-mf-table__head span:not(:first-child), .jg-mf-table__row > :not(:first-child) { text-align: right; }
.jg-mf-table__row strong { font-weight: 600; color: var(--mf-brand); }
.jg-mf-table__row.is-total { font-weight: 600; color: var(--mf-ink); }

/* ---------- 空状态和错误 ---------- */
.jg-mf-notice { display: flex; flex-direction: column; align-items: center; padding: .7rem .4rem; text-align: center; }
.jg-mf-notice__icon { display: inline-flex; align-items: center; justify-content: center; width: 1.12rem; height: 1.12rem; border-radius: 50%; color: var(--mf-brand); background: var(--mf-tint); }
.jg-mf-notice__icon svg { width: .6rem; height: .6rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.jg-mf-notice__title { padding-top: .24rem; font-size: .37333rem; font-weight: 600; color: var(--mf-ink); }
.jg-mf-notice__hint { padding-top: .1rem; font-size: .32rem; line-height: 1.5; color: var(--mf-vice); }
.jg-mf-retry { height: .88rem; margin-top: .32rem !important; padding: 0 .56rem; border: 0; border-radius: .44rem; background: var(--mf-ind); box-shadow: var(--mf-ind-shadow); color: #fff; font: inherit; font-size: .34667rem; font-weight: 600; cursor: pointer; }
.jg-mf :is(button):focus-visible { outline: 2px solid var(--mf-brand); outline-offset: 2px; }

/* ---------- 宽屏：responsive.css 已把选择页让开侧栏；内容限宽，数字卡并排 ---------- */
@media (min-width: 640px) {
  :root .jg-mf { padding: 24px; gap: 16px; }
  .jg-mf-seg, .jg-mf-pane, .jg-mf-note { width: 100%; max-width: 720px; margin-inline: auto; }
  .jg-mf-seg button { height: 42px; font-size: 14px; }
  .jg-mf-hero__value { font-size: 34px; }
  .jg-mf-pane { gap: 16px; }
  .jg-mf-card { padding: 16px; border-radius: 14px; }
  .jg-mf-stats dd { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .jg-mf-seg__ind { transition: none; }
}
