/* 看板 v2（2026-11-05）：A 的布局 + 热力图 + 环形资产结构 + 风控中心 + 可切换的动态封面。
   放在所有海洋主题样式之后加载；涉及顶部大卡的规则一律带 body 前缀压过 ocean/*.css。 */
:root{--dv2-c1:#1d3b60;--dv2-c2:#b39455;--dv2-c3:#c3c7c3;
  --rc-high:#b42332;--rc-mid:#b8740f;--rc-low:#4f6d8a;--rc-ok:#2f7d5b}
@media (prefers-color-scheme:dark){:root:not([data-oc-theme="light"]){--dv2-c1:#6f9fd4;--dv2-c3:#5d6872;--rc-mid:#e0a347;--rc-low:#8fb0cf;--rc-ok:#5cc49a}}
:root[data-oc-theme="dark"]{--dv2-c1:#6f9fd4;--dv2-c3:#5d6872;--rc-mid:#e0a347;--rc-low:#8fb0cf;--rc-ok:#5cc49a}

/* ───────── 顶部大卡 ───────── */
body .pnl.total-pnl.dv2-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,560px);gap:28px;
  align-items:end;min-height:270px;padding:56px 28px 26px;margin-bottom:20px}
/* 文字一律落在深色玻璃底上：封面换成日出、晴天这种亮图时也看得清 */
.dv2-hero .dv2-hero-l{position:relative;padding:18px 22px 18px;border-radius:16px;width:max-content;max-width:100%;
  background:linear-gradient(135deg,rgba(5,14,27,.58),rgba(5,14,27,.34));border:1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
body .dv2-hero .total-value{font-size:58px;line-height:1.05;margin:6px 0 10px;letter-spacing:-.01em}
.dv2-today{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.dv2-today b{font-size:26px;font-weight:700}
.dv2-today .x{font-size:15px}
.dv2-kpis{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dv2-k{display:flex;flex-direction:column;gap:4px;text-align:left;padding:14px 16px;border-radius:14px;min-width:0;
  background:rgba(5,14,27,.55);border:1px solid rgba(255,255,255,.13);color:inherit;font:inherit;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.dv2-k b{font-size:22px;font-weight:700;white-space:nowrap}
.dv2-k .x{font-size:12px}
button.dv2-k{cursor:pointer;min-height:0;transition:background .2s,border-color .2s}
button.dv2-k:hover{background:rgba(5,14,27,.7);border-color:rgba(216,187,128,.5)}
body .pnl.total-pnl .dv2-k .rc-good{color:#6fe0b6!important}
body .pnl.total-pnl .dv2-k .rc-warn{color:#ffc46b!important}
/* 没开动态海面时（或 WebGL 不可用）大卡还是原来的深海渐变，玻璃块照样成立 */
body .pnl.total-pnl.dv2-hero:not(.lo-weather) .cap,body .pnl.total-pnl.dv2-hero:not(.lo-weather) .x:not(.up):not(.down){color:rgba(236,242,250,.82)}
body .pnl.total-pnl.dv2-hero:not(.lo-weather) .total-value,body .pnl.total-pnl.dv2-hero:not(.lo-weather) b.num:not(.up):not(.down){color:#fff}

body .dv2-hero .struct,body .dv2-hero .struct[hidden]{display:none!important}
.dv2-scene{position:absolute;top:14px;right:14px;z-index:3}
.dv2-scene-btn{display:inline-flex;align-items:center;gap:6px;min-height:0;padding:5px 12px;border-radius:999px;font-size:12px;
  color:rgba(236,242,250,.92);background:rgba(5,14,27,.45);border:1px solid rgba(255,255,255,.2);cursor:pointer;
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.dv2-scene-btn:hover{background:rgba(5,14,27,.65);color:#fff}
.dv2-scene-menu{position:fixed;z-index:1200;width:430px;max-height:440px;overflow:auto;padding:8px;border-radius:14px;
  display:grid;grid-template-columns:repeat(3,1fr);gap:6px;
  background:var(--card,#fff);color:var(--text);border:1px solid var(--line);box-shadow:0 18px 40px rgba(5,14,27,.28)}
.dv2-scene-menu[hidden]{display:none}
.dv2-scene-menu button{display:flex;flex-direction:column;gap:4px;width:100%;min-height:0;padding:5px;border:1px solid transparent;border-radius:10px;
  background:none;text-align:left;cursor:pointer;color:var(--text)}
.dv2-scene-menu button:hover{background:rgba(var(--ink-rgb),.05)}
.dv2-scene-menu button.on{background:rgba(179,148,85,.14);border-color:rgba(179,148,85,.6)}
.dv2-scene-menu i{display:block;width:100%;aspect-ratio:16/9;border-radius:7px;background-size:cover;background-position:center}
.dv2-scene-menu b{display:block;font-size:12px;line-height:1.3}
.dv2-scene-menu small{display:block;font-size:10.5px;color:var(--dim);line-height:1.3}
.dv2-scene-foot{grid-column:1 / -1;font-size:11px;color:var(--dim);padding:6px 6px 2px;border-top:1px solid var(--line);margin-top:2px}

/* ───────── 下方网格 ───────── */
.dv2-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px;align-items:start}
.dv2-grid > .pnl,.dv2-side > .pnl{margin-bottom:0}
.dv2-curve{grid-column:span 8}
.dv2-alloc{grid-column:span 4}
.dv2-movers{grid-column:span 7}
.dv2-heat-card{grid-column:span 5}
.dv2-risk{grid-column:span 8}
.dv2-side{grid-column:span 4;display:flex;flex-direction:column;gap:20px}
.dv2-curve,.dv2-alloc{align-self:stretch}
.dv2-movers,.dv2-heat-card{align-self:stretch}

/* 资产结构 */
.dv2-donut{display:flex;justify-content:center;padding:8px 0 2px}
.dv2-donut svg{width:190px;height:190px}
.dv2-dn-t{font-size:14px;fill:var(--text);font-weight:600}
.dv2-dn-s{font-size:10px;fill:var(--dim)}
.dv2-alloc-rows{padding:4px 18px 14px}
.dv2-ar{padding:11px 0;border-top:1px solid var(--line)}
.dv2-ar .t{display:flex;align-items:center;gap:8px;font-size:13px}
.dv2-ar .t i{width:9px;height:9px;border-radius:50%;flex:none}
.dv2-ar .t .num{margin-left:auto;font-size:15px;font-weight:600}
.dv2-ar .b{display:flex;align-items:baseline;justify-content:space-between;margin-top:4px}
.dv2-ar .b b{font-size:20px;font-weight:600}
.dv2-ar .b span{font-size:12px}
.dv2-tag{display:inline-block;font-size:10px;line-height:1.6;padding:0 6px;border-radius:6px;margin-left:4px;
  color:#8e5a14;background:#fbf1dc;border:1px solid #ecd9ad}

/* 热力图 */
.dv2-heat{position:relative;height:286px;margin:10px 16px 0}
.dv2-cell{position:absolute;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;
  min-height:0;padding:7px 9px;border:0;border-radius:7px;color:#fff;text-align:left;overflow:hidden;cursor:pointer;
  transition:filter .15s,transform .15s}
.dv2-cell:hover{filter:brightness(1.08);transform:translateY(-1px)}
.dv2-cell b{font-size:13px;font-weight:600;line-height:1.25;max-width:100%;overflow:hidden;text-overflow:ellipsis;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-shadow:0 1px 3px rgba(0,0,0,.35)}
.dv2-cell span{font-size:16px;font-weight:700;font-variant-numeric:tabular-nums;text-shadow:0 1px 3px rgba(0,0,0,.35)}
.dv2-cell.sm{padding:4px 6px}.dv2-cell.sm b{font-size:11px;-webkit-line-clamp:1}.dv2-cell.sm span{font-size:12px}
.dv2-heat-cap{display:flex;justify-content:space-between;font-size:11px;color:var(--dim);padding:10px 18px 14px}
.dv2-heat-scale{display:inline-block;width:64px;height:6px;border-radius:3px;vertical-align:middle;
  background:linear-gradient(90deg,rgba(8,116,91,.95),rgba(120,132,142,.45),rgba(180,35,50,.95))}

/* ───────── 风控中心 ───────── */
.dv2-risk{border-top:3px solid var(--rc-high)}
.rc-top{display:flex;gap:20px;align-items:center;padding:14px 18px 6px}
.rc-score{position:relative;width:84px;height:84px;flex:none}
.rc-score svg{width:84px;height:84px}
.rc-score .bg{fill:none;stroke:rgba(var(--ink-rgb),.08);stroke-width:8}
.rc-score .fg{fill:none;stroke-width:8;stroke-linecap:round;transition:stroke-dasharray .6s}
.rc-score .fg.ok{stroke:var(--rc-ok)}.rc-score .fg.mid{stroke:var(--rc-mid)}.rc-score .fg.high{stroke:var(--rc-high)}
.rc-score > div{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.rc-score b{font-size:24px;line-height:1}
.rc-score span{font-size:10px;color:var(--dim);margin-top:3px}
.rc-sum{flex:1;min-width:0}
.rc-counts{display:flex;flex-wrap:wrap;gap:8px}
.rc-chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;padding:3px 10px;border-radius:999px;
  background:rgba(var(--ink-rgb),.04);border:1px solid var(--line);color:var(--dim)}
.rc-chip i{width:8px;height:8px;border-radius:50%}
.rc-chip b{color:var(--text)}
.rc-chip.high i{background:var(--rc-high)}.rc-chip.mid i{background:var(--rc-mid)}
.rc-chip.low i{background:var(--rc-low)}.rc-chip.ok i{background:var(--rc-ok)}
.rc-tabs{display:flex;flex-wrap:wrap;gap:4px;margin-top:10px}
.rc-tabs button{min-height:0;padding:4px 11px;border-radius:8px;font-size:12px;border:1px solid transparent;background:none;color:var(--dim);cursor:pointer}
.rc-tabs button:hover{background:rgba(var(--ink-rgb),.05);color:var(--text)}
.rc-tabs button.on{background:var(--text);color:var(--card,#fff)}
.rc-tabs button b{font-weight:700;margin-left:2px}
.rc-fired:empty{display:none}
.rc-fired{padding:4px 18px 0}
.rc-fired .alert-card{margin:6px 0}
.rc-list{padding:6px 18px 4px}
.rc-item{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:12px;align-items:start;padding:12px 12px;margin:8px 0;
  border-radius:12px;border:1px solid var(--line);border-left:4px solid var(--rc-low);background:rgba(var(--ink-rgb),.015)}
.rc-item.high{border-left-color:var(--rc-high);background:rgba(180,35,50,.045)}
.rc-item.mid{border-left-color:var(--rc-mid);background:rgba(184,116,15,.045)}
.rc-lv{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;font-size:12px;font-weight:700;color:#fff;background:var(--rc-low)}
.rc-item.high .rc-lv{background:var(--rc-high)}.rc-item.mid .rc-lv{background:var(--rc-mid)}
.rc-t{font-size:14px;font-weight:600;line-height:1.45}
.rc-cat{font-size:11px;font-weight:400;color:var(--dim);margin-left:8px;padding:0 6px;border:1px solid var(--line);border-radius:6px}
.rc-d{font-size:13px;color:var(--text);opacity:.85;line-height:1.6;margin-top:3px}
.rc-tip{font-size:12px;color:var(--dim);line-height:1.6;margin-top:5px}
.rc-tip b{font-weight:600;color:var(--accent-700,#806328);margin-right:6px}
.rc-acts{display:flex;flex-direction:column;gap:6px;align-items:stretch}
.rc-acts button{min-height:0;padding:4px 10px;font-size:12px;white-space:nowrap}
.rc-snz{background:none;border:0;color:var(--dim);cursor:pointer}
.rc-snz:hover{color:var(--text);text-decoration:underline}
.rc-clear{padding:18px 4px;color:var(--rc-ok);font-size:14px;display:flex;gap:12px;align-items:center}
.rc-passed{margin:4px 18px 14px;font-size:12px;color:var(--dim)}
.rc-passed summary{cursor:pointer;padding:6px 0}
.rc-ok{padding:3px 0 3px 4px;color:var(--rc-ok)}

/* ───────── 窄屏 ───────── */
@media (max-width:1180px){
  body .pnl.total-pnl.dv2-hero{grid-template-columns:1fr}
  .dv2-curve,.dv2-alloc,.dv2-movers,.dv2-heat-card,.dv2-risk,.dv2-side{grid-column:span 12}
  .dv2-alloc{display:grid;grid-template-columns:220px minmax(0,1fr);align-items:center}
  .dv2-alloc > .card-head{grid-column:1 / -1}
}
@media (max-width:899px){
  body .pnl.total-pnl.dv2-hero{padding:50px 14px 16px;gap:12px;min-height:0}
  .dv2-hero .dv2-hero-l{width:auto;padding:14px 16px}
  body .dv2-hero .total-value{font-size:40px}
  .dv2-today b{font-size:21px}
  .dv2-k{padding:11px 12px}.dv2-k b{font-size:18px}
  .dv2-grid{gap:14px}
  .dv2-alloc{display:block}
  .dv2-heat{height:230px;margin:8px 12px 0}
  .rc-top{flex-direction:column;align-items:flex-start}
  .rc-item{grid-template-columns:26px minmax(0,1fr);gap:10px}
  .rc-acts{grid-column:2;flex-direction:row;flex-wrap:wrap}
  .dv2-scene-menu{width:min(330px,calc(100vw - 40px));grid-template-columns:repeat(2,1fr)}
}
