/* 游收 · 小游戏广告收益后台 */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-muted: #f7faf8;
  --line: #e3eae6;
  --line-strong: #cfd9d3;
  --ink: #13241f;
  --ink-2: #465a51;
  --ink-3: #667a71;
  --brand: #1d6a56;
  --brand-strong: #17594a;
  --brand-soft: #dcefe6;
  --brand-softer: #f0f6f3;
  --success: #1b7a59;
  --success-soft: #e2f3ea;
  --warn: #946015;
  --warn-soft: #fcf1dc;
  --danger: #b4402f;
  --danger-soft: #fbe9e5;
  --nav-ink: #d6e3dc;
  --nav-muted: #93a8a0;
  --nav-active: #1e3d34;
  --nav-line: rgba(255, 255, 255, .08);
  --radius-lg: 16px;
  --radius: 12px;
  --shadow-card: 0 1px 2px rgba(15, 35, 31, .05), 0 1px 0 rgba(15, 35, 31, .02);
  --shadow-pop: 0 14px 36px rgba(15, 35, 31, .16), 0 2px 8px rgba(15, 35, 31, .06);
  --font: "Inter", "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Code", "SF Mono", Consolas, monospace;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 650; line-height: 1.4; }
h3 { font-size: 15px; font-weight: 600; line-height: 1.5; }
p { color: var(--ink-2); }
[hidden] { display: none !important; }
button svg, span svg { vertical-align: middle; }
svg.icon { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.boot { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--bg); }
.boot p { font-size: 14px; color: var(--ink-3); }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 22px; font-weight: 650; letter-spacing: .06em; line-height: 1.2; }
.brand:hover { text-decoration: none; }
.brand small { display: block; margin-top: 4px; font-size: 10px; font-weight: 500; letter-spacing: .2em; color: #8caaa0; }
.brand-mark { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #c9f0d7, #9adcb7); color: #173b2f; font-size: 23px; font-weight: 750; letter-spacing: 0; }

/* ---------- 侧边栏 ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; width: 240px; padding: 0 14px 14px; overflow-y: auto; scrollbar-width: thin; color: var(--nav-ink); background: radial-gradient(520px 240px at 100% 0, rgba(130, 212, 189, .13), transparent 70%), linear-gradient(180deg, #122a23, #0b1c18); }
.sidebar :focus-visible { outline-color: #9fe0c6; }
.sidebar .brand { padding: 24px 10px 0; }
.workspace-label { display: flex; align-items: center; justify-content: space-between; margin: 34px 10px 10px; font-size: 12px; letter-spacing: .06em; color: var(--nav-muted); }
.tiny-tag { padding: 1px 6px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; font-size: 11px; letter-spacing: .08em; color: #a9bdb3; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: #a9bdb3; font-size: 14px; line-height: 24px; text-align: left; transition: background .15s, color .15s; }
.nav-item .icon { width: 19px; height: 19px; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-item.active { color: #fff; background: var(--nav-active); }
.nav-item.active .icon { color: #9fe0c6; }
.nav-count { min-width: 22px; height: 20px; margin-left: auto; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #e3f4ea; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.private-note { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--nav-line); border-radius: 12px; background: rgba(255, 255, 255, .04); color: #bdcec5; font-size: 13px; line-height: 1.55; }
.private-note .icon { width: 16px; height: 16px; margin-top: 2px; color: #8fc5ad; }
.private-note small { display: block; margin-top: 3px; font-size: 12px; color: var(--nav-muted); }
.account { display: flex; align-items: center; gap: 2px; margin-top: 10px; padding: 6px; border-radius: 12px; }
.account-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 6px; border: 0; border-radius: 10px; background: none; color: inherit; text-align: left; transition: background .15s; }
.account-info:hover { background: rgba(255, 255, 255, .06); }
.avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #3a7a63, #245546); color: #eaf7ef; font-size: 13px; font-weight: 600; }
.account-text { min-width: 0; }
.account-text strong { display: block; max-width: 100%; overflow: hidden; color: #eaf2ed; font-size: 13px; font-weight: 600; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.account-text small { display: inline-flex; align-items: center; gap: 1px; margin-top: 1px; color: #8fb3a3; font-size: 12px; line-height: 1.4; }
.account-text small .icon { width: 13px; height: 13px; }
.account-info:hover .account-text small { color: #b9e0cd; }
.account > .icon-button { color: #93a8a0; }
.account > .icon-button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink-3); transition: background .15s, color .15s; }
.icon-button:hover { color: var(--brand); background: var(--brand-softer); }

/* ---------- 主区域框架 ---------- */
.main-shell { display: flex; flex-direction: column; width: calc(100% - 240px); min-height: 100vh; margin-left: 240px; }
.topbar { position: sticky; top: 0; z-index: 5; flex: none; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: 12px; font-size: 13px; color: var(--ink-3); }
.breadcrumb span { color: var(--line-strong); }
.breadcrumb strong { color: var(--ink-2); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.topbar-right .icon { width: 15px; height: 15px; color: var(--ink-3); }
.platform-dot { width: 7px; height: 7px; border-radius: 50%; background: #1b1f23; }
.vertical-line { width: 1px; height: 16px; margin: 0 10px; background: var(--line-strong); }
.content { width: 100%; max-width: 1560px; margin: 0 auto; padding: 28px 32px 24px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.eyebrow { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .14em; color: #a3c5b4; }
.eyebrow.dark { margin-bottom: 4px; color: var(--brand); }
.page-heading p { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.heading-actions { display: flex; flex: none; gap: 10px; }
.app-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding: 16px 32px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.footer-divider { margin: 0 8px; color: var(--line-strong); }

/* ---------- 按钮 ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 500; line-height: 1.4; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, color .15s; }
.button .icon { width: 17px; height: 17px; }
.primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(21, 84, 69, .28); }
.primary:hover { background: var(--brand-strong); }
.secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.secondary:hover { background: var(--surface-muted); border-color: #b9c8c0; }
.text-button { min-height: 36px; padding: 0 12px; background: none; color: var(--ink-2); font-size: 13px; }
.text-button:hover { background: var(--brand-softer); color: var(--brand); }
.danger-button { background: var(--danger); color: #fff; }
.danger-button:hover { background: #9a3527; }
.wide { width: 100%; }
.spinning .icon { animation: spin 1s linear infinite; }

/* ---------- 提示条 ---------- */
.banner { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding: 14px 18px; border: 1px solid #d5e9dd; border-radius: var(--radius); background: #edf6f0; color: var(--success); }
.banner > span { margin-top: 2px; }
.banner strong { font-size: 14px; font-weight: 600; }
.banner p { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.error-banner { border-color: #f0dfbd; background: #fdf6e8; color: var(--warn); }
.password-setup { align-items: center; }
.password-setup > .button { flex: none; margin-left: auto; }

/* ---------- 筛选 ---------- */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.date-presets { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: #f1f5f2; }
.date-presets button { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 13px; transition: background .15s, color .15s, box-shadow .15s; }
.date-presets button:hover { color: var(--ink); }
.date-presets button.selected { background: var(--surface); color: var(--brand); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 35, 31, .1); }
.date-range { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink-3); font-size: 13px; }
.date-range .icon { width: 16px; height: 16px; }
.date-range input { position: relative; width: 116px; height: 100%; padding: 0; border: 0; background: none; color: var(--ink); font-size: 13px; }
.date-range input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.date-range:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.date-range:has(input:focus-visible) input { outline: none; }
.select { position: relative; display: inline-flex; flex: none; }
.filterbar .select:first-of-type { margin-left: auto; }
#ocean-authorize { margin-left: auto; }
.select select { height: 42px; max-width: 220px; padding: 0 36px 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; appearance: none; -webkit-appearance: none; }
.select .icon { position: absolute; top: 50%; right: 11px; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; color: var(--ink-3); }
.data-status { display: flex; align-items: center; gap: 8px; padding: 14px 4px 12px; font-size: 13px; color: var(--ink-2); }
.status-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.status-dot.muted { background: #b9c5be; }
.status-dot.warning { background: #d39a3a; }
.status-right { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--ink-3); }
.status-right .icon { width: 14px; height: 14px; }

/* ---------- 指标卡 ---------- */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.metric-card { position: relative; display: flex; flex-direction: column; min-height: 156px; padding: 20px 22px 18px; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.metric-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.metric-symbol { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: auto; border-radius: 10px; background: var(--brand-softer); color: var(--brand); }
.metric-symbol .icon { width: 18px; height: 18px; }
.metric-value { position: relative; z-index: 1; margin-top: 22px; font-size: 38px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric-value.is-empty { color: var(--ink-3); font-weight: 400; }
.money-symbol { margin-right: 4px; font-size: 22px; font-weight: 500; color: var(--ink-3); }
.metric-caption { position: relative; z-index: 1; margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--ink-3); }
.small-label { margin-left: 2px; font-size: 12px; color: var(--ink-3); }
.metric-card.featured { color: #fff; background: linear-gradient(135deg, #22745e, #174f41); border-color: #1a5b4b; }
.featured .metric-top, .featured .metric-caption { color: #c2e2d2; }
.featured .metric-symbol { background: rgba(255, 255, 255, .12); color: #d9f2e5; }
.featured .money-symbol { color: #a9d8c3; }
.featured .metric-value.is-empty { color: #a9d8c3; }
.card-decoration { position: absolute; right: -56px; bottom: -88px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(150, 230, 200, .38), rgba(150, 230, 200, 0) 68%); pointer-events: none; }

/* ---------- 面板 ---------- */
.analytics-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr); gap: 16px; margin-bottom: 16px; }
.panel { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 10px; }
.panel-header p { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.currency-note { margin-left: 8px; color: var(--ink-3); }
.panel-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-softer); color: var(--brand); }
.panel-icon .icon { width: 18px; height: 18px; }
.panel-bottom-note { display: flex; align-items: center; gap: 6px; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.panel-bottom-note .icon { width: 14px; height: 14px; }

/* ---------- 收益趋势 ---------- */
.chart-switch { display: flex; flex: none; padding: 3px; border-radius: 9px; background: #f1f5f2; }
.chart-switch button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font-size: 13px; transition: background .15s, color .15s, box-shadow .15s; }
.chart-switch button.selected { background: var(--surface); color: var(--brand); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 35, 31, .1); }
.chart { position: relative; height: 264px; margin: 0 6px; }
.chart > svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.chart .grid-line { stroke: #e9efeb; stroke-dasharray: 3 5; }
.chart .axis-text { fill: var(--ink-3); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.chart .area-line { fill: none; stroke: var(--brand); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: #fff; stroke: var(--brand); stroke-width: 2; cursor: pointer; transition: r .12s, stroke-width .12s; }
.chart-point:hover, .chart-point.is-active { stroke: var(--brand-strong); stroke-width: 2.5; r: 5px; }
.chart-point:focus { outline: none; stroke: var(--brand-strong); stroke-width: 3; }
.chart-cursor { stroke: #b9c9c0; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-cursor-dot { fill: var(--brand); stroke: #fff; stroke-width: 2.5; pointer-events: none; }
.chart-overlay { fill: transparent; }
.chart-tip { position: absolute; z-index: 2; min-width: 148px; padding: 10px 12px; border-radius: 12px; background: #13241f; color: #fff; font-size: 12px; line-height: 1.7; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-pop); transform: translate(-50%, calc(-100% - 14px)); }
.chart-tip.is-below { transform: translate(-50%, 14px); }
.chart-tip-date { display: block; margin-bottom: 2px; font-weight: 600; color: #c9e6d8; }
.chart-tip-row { display: flex; justify-content: space-between; gap: 16px; }
.chart-tip-row span { color: #a9c4b7; }
.chart-tip-row b { font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.chart-tip-row.is-muted b { color: #8fa89c; }
.chart-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 16px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-softer); color: var(--brand); }
.empty-icon .icon { width: 22px; height: 22px; }
.chart-empty > .empty-icon { margin-bottom: 12px; }
.chart-empty strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.chart-empty p { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.chart-empty .button { min-height: 36px; margin-top: 14px; padding: 0 14px; font-size: 13px; }
.chart-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 22px 18px; font-size: 12px; color: var(--ink-3); }
.chart-footer > span:first-child { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ---------- 收益来源 ---------- */
.source-panel { display: flex; flex-direction: column; }
.source-content { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 230px; padding: 8px 22px 20px; }
.donut { display: grid; place-items: center; flex: none; margin-bottom: 18px; }
.donut svg { width: 156px; height: 156px; }
.donut-track { fill: none; stroke: #eef3f0; stroke-width: 14; }
.donut-seg { fill: none; stroke: var(--seg); stroke-width: 14; stroke-linecap: round; }
.source-legend { min-width: 0; }
.source-row + .source-row { margin-top: 12px; }
.source-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); }
.source-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.source-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--seg); }
.source-amount { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.source-share { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.seg-0 { --seg: #1d6a56; }
.seg-1 { --seg: #7db9a0; }
.seg-2 { --seg: #e0b85a; }
.seg-3 { --seg: #6f96bb; }
.seg-4 { --seg: #b78fab; }
.source-empty { padding: 12px 0; text-align: center; color: var(--ink-3); }
.source-empty > svg { width: 64px; height: 64px; margin-bottom: 12px; color: #d5e2da; stroke-width: 1; }
.source-empty strong { display: block; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.source-empty p { margin-top: 4px; font-size: 13px; color: var(--ink-3); }

/* ---------- 搜索与表格 ---------- */
.title-with-count { display: flex; align-items: center; gap: 10px; }
.count-tag { padding: 2px 9px; border-radius: 999px; background: var(--brand-softer); color: var(--brand); font-size: 12px; font-weight: 600; }
.table-tools { display: flex; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink-3); font-size: 13px; transition: border-color .15s, box-shadow .15s; }
.search .icon { width: 15px; height: 15px; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search input { width: 150px; height: 100%; padding: 0; border: 0; background: none; color: var(--ink); font-size: 13px; outline: none; }
.search input::placeholder { color: var(--ink-3); }
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; white-space: nowrap; }
.table th { padding: 10px 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-muted); color: var(--ink-3); font-weight: 500; }
.table td { padding: 14px 22px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f8fbf9; }
.table th.num, .table td.num { text-align: right; }
.table td strong { color: var(--ink); font-weight: 600; }
.table td.money { color: var(--ink); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.table-name { display: flex; align-items: center; gap: 12px; }
.game-avatar { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 15px; font-weight: 600; }
.game-avatar.alt1 { background: #f7eeda; color: #946015; }
.game-avatar.alt2 { background: #e3edf4; color: #3d6a86; }
.table-name strong { display: block; max-width: 220px; overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; }
.appid { display: flex; align-items: center; gap: 2px; margin-top: 2px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.appid .icon-button { width: 22px; height: 22px; }
.appid .icon { width: 12px; height: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.error { background: var(--warn-soft); color: var(--warn); }
.badge.pending { background: #eef2ef; color: var(--ink-2); }
.cell-small { display: block; max-width: 280px; margin-top: 3px; font-size: 12px; color: var(--ink-3); white-space: normal; }
.row-actions { display: flex; align-items: center; gap: 2px; }
.row-link { padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--brand); font-size: 13px; }
.row-link:hover { background: var(--brand-softer); }
.log-message { min-width: 240px; max-width: 420px; white-space: normal; }
.table-empty { min-height: 220px; padding: 48px 24px; text-align: center; }
.table-empty > .empty-icon { margin: 0 auto 14px; }
.table-empty strong { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.table-empty p { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.table-empty .button { margin-top: 16px; }
.no-matches { padding: 40px; font-size: 13px; color: var(--ink-3); text-align: center; }
[data-panel="ocean"] .game-panel { margin-bottom: 16px; }
.footnote { display: flex; align-items: flex-start; gap: 6px; margin: 14px 2px 0; font-size: 12px; color: var(--ink-3); }
.footnote .icon { width: 14px; height: 14px; margin-top: 3px; }

/* ---------- 接入指南 ---------- */
.guide-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; }
.guide-main { padding: 32px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--brand-softer); color: var(--brand); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.guide-main > h2 { margin: 14px 0 28px; font-size: 24px; letter-spacing: -.01em; }
.guide-step { display: flex; gap: 18px; margin-bottom: 30px; }
.guide-step:last-child { margin-bottom: 0; }
.guide-step > span { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 14px; font-weight: 600; }
.guide-step h3 { margin-bottom: 6px; }
.guide-step p { font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.guide-step a { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 500; }
.guide-step .button { margin-top: 16px; }
.guide-aside { margin-bottom: 20px; padding: 26px; }
.guide-aside > span { display: flex; margin-bottom: 14px; color: var(--brand); }
.guide-aside > span .icon { width: 22px; height: 22px; }
.guide-aside h3 { margin-bottom: 8px; }
.guide-aside p { margin-bottom: 10px; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.guide-aside a { font-size: 13px; font-weight: 500; }

/* ---------- 登录 ---------- */
.login-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; background: var(--surface); }
.login-story { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 40px 56px; background: radial-gradient(700px 360px at 100% 0, rgba(130, 212, 189, .14), transparent 70%), #0f2a23; }
.story-copy { margin: auto 0; padding: 64px 0; }
.story-copy h1 { color: #e8f5ea; font-size: 46px; line-height: 1.35; letter-spacing: .02em; }
.story-copy p { margin-top: 22px; font-size: 15px; line-height: 1.9; color: #93b5a5; }
.story-copy > svg { width: 100%; max-height: 150px; margin: 20px 0 -65px; }
.login-foot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #86a898; }
.login-foot .icon { width: 14px; height: 14px; }
.login-form-panel { display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.login-form { width: 340px; max-width: 100%; }
.login-form h2 { margin-top: 18px; font-size: 30px; letter-spacing: -.01em; }
.login-form > p { margin: 8px 0 32px; font-size: 14px; }
.login-form label { margin-bottom: 18px; }
.login-form .login-note { margin: 16px 0 0; font-size: 13px; line-height: 1.7; text-align: center; color: var(--ink-3); }

/* ---------- 表单与弹窗 ---------- */
label { display: block; font-size: 13px; color: var(--ink-2); }
label > input, .password-field { margin-top: 8px; }
label > input, .password-field > input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px; }
input::placeholder { color: #93a49b; }
input:focus { border-color: var(--brand); outline: 2px solid var(--brand-soft); }
dialog { width: 480px; max-width: calc(100% - 32px); padding: 28px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); box-shadow: 0 30px 90px rgba(15, 35, 31, .28); }
dialog::backdrop { background: rgba(12, 28, 23, .55); backdrop-filter: blur(3px); }
dialog h2 { margin: 16px 0 6px; font-size: 22px; letter-spacing: -.01em; }
dialog h2 + p { margin-bottom: 24px; font-size: 14px; color: var(--ink-3); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-softer); color: var(--brand); }
.dialog-icon .icon { width: 22px; height: 22px; }
.dialog-icon.danger { background: var(--danger-soft); color: var(--danger); }
dialog label { margin-bottom: 18px; }
.required { margin-left: 4px; color: var(--brand); font-size: 12px; }
.optional { margin-left: 6px; color: var(--ink-3); font-size: 12px; }
.password-field { position: relative; }
.password-field .icon-button { position: absolute; top: 6px; right: 6px; }
.password-field input { margin: 0; padding-right: 44px; }
.field-note { display: block; margin-top: 7px; font-size: 12px; line-height: 1.7; color: var(--ink-3); }
.consent-note { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--surface-muted); color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.consent-note .icon { width: 16px; height: 16px; margin-top: 3px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-error { margin: 12px 0; padding: 9px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13px; line-height: 1.7; }
.progress-note { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.spinner { flex: none; width: 16px; height: 16px; border: 2px solid #d5e5da; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.small-dialog { width: 420px; }
.small-dialog h2 + p { margin-bottom: 12px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }

/* ---------- 轻提示 ---------- */
.toast { position: fixed; bottom: 28px; left: calc(50% + 120px); z-index: 100; max-width: 520px; padding: 12px 20px; border-radius: 12px; background: #13241f; color: #eef7f1; font-size: 14px; box-shadow: var(--shadow-pop); transform: translateX(-50%); }
.toast.warning { background: #7a5210; }

/* ---------- 响应式 ---------- */
@media (min-width: 1560px) {
  .metric-card { min-height: 168px; padding: 22px 24px 20px; }
  .metric-value { font-size: 42px; }
  .chart { height: 290px; }
  .metric-grid, .analytics-grid { gap: 20px; }
  .metric-grid, .analytics-grid { margin-bottom: 20px; }
}
@media (max-width: 1240px) {
  .sidebar { width: 208px; padding: 0 12px 12px; }
  .main-shell { width: calc(100% - 208px); margin-left: 208px; }
  .topbar { padding: 0 24px; }
  .content { padding: 24px 24px 20px; }
  .app-footer { padding: 14px 24px; }
  .metric-card { padding: 18px 18px 16px; }
  .metric-value { font-size: 30px; }
  .metric-top { font-size: 13px; }
  .metric-symbol { width: 32px; height: 32px; }
  .select select { max-width: 170px; }
  .analytics-grid { grid-template-columns: minmax(0, 1.9fr) minmax(240px, 1fr); }
  .panel-header { padding: 18px 18px 10px; }
  .search input { width: 120px; }
  .toast { left: calc(50% + 104px); }
}
@media (max-width: 1040px) {
  .filterbar .select:first-of-type { margin-left: 0; }
  .analytics-grid { grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); }
  .metric-symbol { display: none; }
  .table th, .table td { padding-left: 16px; padding-right: 16px; }
  .page-heading h1 { font-size: 24px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-grid > div { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .guide-aside { margin-bottom: 0; }
  .toast { left: 50%; }
}
@media (max-width: 960px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { width: 72px; padding: 0 10px 12px; }
  .sidebar .brand { justify-content: center; padding: 18px 0 0; }
  .sidebar .brand > span:last-child { display: none; }
  .sidebar .brand-mark { width: 40px; height: 40px; font-size: 22px; }
  .workspace-label { display: none; }
  .sidebar nav { margin-top: 30px; }
  .nav-item { justify-content: center; gap: 0; height: 46px; padding: 0; font-size: 0; }
  .nav-item .icon { width: 20px; height: 20px; }
  .nav-count { display: none; }
  .private-note { justify-content: center; padding: 12px 0; }
  .private-note > div { display: none; }
  .account { flex-direction: column; gap: 4px; padding: 6px 0 0; }
  .account-info { flex: none; padding: 0; }
  .account-text { display: none; }
  .main-shell { width: calc(100% - 72px); margin-left: 72px; }
  .topbar { height: 58px; padding: 0 20px; }
  .content { padding: 22px 20px 20px; }
  .app-footer { padding: 14px 20px; }
  .metric-symbol { display: flex; }
  .metric-card { min-height: 140px; }
  .metric-value { margin-top: 14px; font-size: 32px; }
  .analytics-grid { grid-template-columns: 1fr; }
  .source-content { flex-direction: row; align-items: center; justify-content: center; gap: 8px 32px; min-height: 0; padding-top: 12px; }
  .donut { margin-bottom: 0; }
  .source-legend { flex: 1; }
  .table-tools .search { display: none; }
  .guide-grid > div { display: block; }
  .guide-aside { margin-bottom: 20px; }
  .guide-aside:last-child { margin-bottom: 0; }
}
@media (max-width: 600px) {
  .content { padding: 20px 14px 16px; }
  .topbar { padding: 0 14px; }
  .topbar-right { font-size: 12px; }
  .topbar-right .vertical-line, .topbar-right > span:last-child, .topbar-right > span:nth-last-child(2) { display: none; }
  .breadcrumb { gap: 8px; font-size: 12px; }
  .page-heading { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .page-heading h1 { font-size: 23px; }
  .heading-actions { width: 100%; }
  .heading-actions .primary { flex: 1; }
  .filterbar { padding: 8px; gap: 8px; }
  .date-presets { width: 100%; justify-content: space-between; }
  .date-presets button { flex: 1; padding: 0 4px; font-size: 12px; }
  .date-range { justify-content: space-between; width: 100%; padding: 0 10px; }
  .filterbar .select { flex: 1; min-width: 0; }
  .filterbar .select select { width: 100%; max-width: 100%; font-size: 12px; }
  .data-status { flex-wrap: wrap; row-gap: 4px; padding: 10px 2px; font-size: 12px; }
  .status-right { width: 100%; margin-left: 0; padding-left: 15px; }
  .metric-grid { gap: 10px; margin-bottom: 12px; }
  .metric-card { min-height: 128px; padding: 14px 12px; }
  .metric-value { margin-top: 12px; font-size: 24px; }
  .metric-top { font-size: 12px; }
  .metric-caption { font-size: 11px; }
  .small-label, .metric-symbol { display: none; }
  .money-symbol { margin-right: 2px; font-size: 15px; }
  .analytics-grid { gap: 12px; margin-bottom: 12px; }
  .panel-header { gap: 8px; padding: 16px 14px 8px; }
  .chart-switch button { padding: 0 9px; font-size: 12px; }
  .currency-note { display: none; }
  .chart { height: 220px; }
  .chart-footer { padding: 8px 14px 14px; font-size: 11px; }
  .source-content { flex-direction: column; gap: 12px; padding: 14px; }
  .panel-bottom-note { padding-left: 14px; }
  .table-tools .text-button { padding: 0 8px; font-size: 12px; }
  .count-tag { font-size: 11px; }
  .title-with-count { gap: 7px; }
  .banner { padding: 14px; }
  .password-setup { flex-wrap: wrap; }
  .password-setup > div { flex: 1; min-width: 160px; }
  .password-setup > .button { margin-left: 26px; }
  .guide-main { padding: 22px 18px; }
  .guide-main > h2 { font-size: 20px; }
  .guide-step { gap: 12px; }
  .guide-step > span { width: 28px; height: 28px; font-size: 11px; }
  .guide-aside { padding: 20px 18px; }
  .app-footer { padding: 14px; }
  .app-footer > span:last-child { display: none; }
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: 220px; padding: 25px; }
  .story-copy { padding: 28px 0 0; }
  .story-copy h1 { font-size: 26px; line-height: 1.4; }
  .story-copy h1 br { display: none; }
  .story-copy p { margin-top: 10px; font-size: 13px; }
  .story-copy p br { display: none; }
  .story-copy > svg, .login-foot { display: none; }
  .login-form-panel { padding: 33px 25px 45px; }
  .login-form h2 { font-size: 24px; }
  .login-form > p { margin-bottom: 25px; }
  dialog { max-height: calc(100dvh - 24px); padding: 22px; }
  dialog h2 { font-size: 20px; }
  .toast { bottom: 15px; width: calc(100% - 35px); font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
