/* =====================================================================
   多链资产调度底座 — 控制台样式
   聚名系统 (LayuiAdmin 经典企业级后台) 设计语言：
   深黛青导航 #20222A / #2F4056 · 翡翠绿主操作 #009688 · 极简白灰主体 #F2F2F2
   ===================================================================== */

html, body { height: 100%; }
body { background: #f2f2f2; color: #333; font-size: 13px;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; }

/* ------------------------------ 顶部主栏 ------------------------------ */
.tb-header { height: 56px; background: #20222a; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.tb-header .tb-logo { float: left; width: 200px; height: 56px; line-height: 56px; color: #fff;
  font-size: 16px; font-weight: 600; letter-spacing: .5px; padding-left: 18px; box-sizing: border-box;
  background: #1a1c22; }
.tb-header .tb-logo i { color: #009688; margin-right: 8px; font-size: 18px; vertical-align: -1px; }

.tb-nav { float: left; height: 56px; }
.tb-nav a { display: inline-block; height: 56px; line-height: 56px; padding: 0 20px; color: #b8bcc4;
  font-size: 14px; transition: all .2s; position: relative; }
.tb-nav a:hover { color: #fff; background: #2f4056; }
.tb-nav a.active { color: #fff; background: #2f4056; }
.tb-nav a.active:after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #009688; }

.tb-header-right { float: right; height: 56px; }
.tb-header-right > li { float: left; height: 56px; line-height: 56px; padding: 0 13px; color: #b8bcc4; cursor: pointer; transition: all .2s; }
.tb-header-right > li:hover { color: #fff; background: #2f4056; }
.tb-header-right > li i { font-size: 16px; vertical-align: -2px; }
.tb-user { color: #dfe2e6 !important; font-size: 13px; }
.tb-user i { margin-right: 5px; }

/* ------------------------------ 侧边菜单 ------------------------------ */
.tb-side { top: 56px; width: 200px; background: #20222a; }
.tb-side-scroll { width: 200px; }
.tb-side .layui-nav { background: transparent; padding: 0; }
.tb-side .layui-nav-item { position: relative; }
.tb-side .layui-nav-item a { height: 40px; line-height: 40px; color: #a9adb6; font-size: 13px; padding-left: 42px;
  padding-right: 12px; transition: all .2s; }
.tb-side .layui-nav-item a:hover { color: #fff; background: #2f4056; }
.tb-side .layui-nav-itemed > a, .tb-side .layui-nav-item a.active { color: #fff; background: #009688; }
.tb-side .layui-nav-item a.active:before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #01b593; }
.tb-side .layui-nav-item > a > i { position: absolute; left: 16px; top: 0; font-size: 15px; line-height: 40px; }
.tb-side .layui-nav-child { background: #2f4056; }
.tb-side .layui-nav-child dd a { height: 36px; line-height: 36px; padding-left: 52px; color: #c3c8d0; }
.tb-side .layui-nav-child dd a:hover { color: #fff; background: #009688; }
.tb-side .layui-nav-child dd a.active { color: #fff; background: #009688; }
.tb-side .layui-nav-child dd a.active:before { display: none; }
.tb-nav-group { padding: 14px 0 6px 18px; color: #6a6e78; font-size: 11px; letter-spacing: 1px; }

/* ------------------------------ 内容区 ------------------------------ */
.tb-body { left: 200px; top: 56px; background: #f2f2f2; }
.tb-tabs { margin: 0; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); height: 38px; position: relative; }
.tb-tabs .layui-tab-title { border-bottom: none; height: 38px; background: #f2f2f2; padding-right: 120px; }
.tb-tabs .layui-tab-title li { line-height: 38px; min-width: 90px; padding: 0 30px 0 14px; color: #5b6770; font-size: 13px; border-right: 1px solid #e6e6e6; }
.tb-tabs .layui-tab-title li.layui-this { color: #009688; background: #fff; }
.tb-tabs .layui-tab-title li.layui-this:after { display: none; }
.tb-tabs .layui-tab-title li .layui-tab-close { top: 12px; }
.tb-tabs .layui-tab-title li.layui-this .layui-tab-close { color: #009688; }
.tb-tabs .tb-tabs-tool { position: absolute; right: 0; top: 0; height: 38px; line-height: 38px; padding: 0 12px; background: #f2f2f2; border-left: 1px solid #e6e6e6; }
.tb-tabs .tb-tabs-tool i { color: #7a848e; margin-left: 10px; cursor: pointer; font-size: 15px; }
.tb-tabs .tb-tabs-tool i:hover { color: #009688; }
.tb-tab-content { border: none; padding: 0; }
.tb-frame { display: block; width: 100%; border: 0; }

/* ------------------------------ 页面通用 ------------------------------ */
.tb-page { padding: 12px; }
.tb-card { background: #fff; border: 1px solid #e6e6e6; border-radius: 2px; margin-bottom: 12px; }
.tb-card-hd { height: 40px; line-height: 40px; padding: 0 14px; border-bottom: 1px solid #f2f2f2; color: #333; font-size: 14px; font-weight: 600; }
.tb-card-hd .tb-bar { display: inline-block; width: 3px; height: 14px; background: #009688; vertical-align: -2px; margin-right: 8px; }
.tb-card-hd .tb-more { float: right; font-weight: 400; color: #999; font-size: 12px; cursor: pointer; }
.tb-card-hd .tb-more:hover { color: #009688; }
.tb-card-bd { padding: 14px; }

.tb-filter { padding: 12px 14px 0; background: #fff; border: 1px solid #e6e6e6; border-radius: 2px; margin-bottom: 12px; }
.tb-filter .layui-form-item { margin-bottom: 12px; }
.tb-filter .layui-input, .tb-filter .layui-select, .tb-filter .layui-textarea { height: 32px; line-height: 32px; font-size: 13px; }
.tb-filter .layui-form-label { width: 78px; padding: 6px 10px; font-size: 13px; color: #5b6770; }
.tb-filter .layui-input-block { margin-left: 88px; }
.tb-filter .layui-form-select dl { top: 34px; }

.layui-table-view { border-color: #e6e6e6; }
.layui-table th { background: #f2f2f2; color: #4a555f; font-weight: 600; font-size: 12.5px; }
.layui-table td, .layui-table th { font-size: 12.5px; padding: 8px 10px; }
.layui-table tbody tr:hover { background: #f2fbf9; }
.layui-table-cell { height: 28px; line-height: 28px; }
.layui-table-tool { background: #fff; border-bottom: 1px solid #f2f2f2; }

.layui-btn { height: 32px; line-height: 32px; font-size: 13px; padding: 0 14px; border-radius: 2px; }
.layui-btn-sm { height: 28px; line-height: 28px; padding: 0 10px; font-size: 12px; }
.layui-input, .layui-select, .layui-textarea { font-size: 13px; }
.tb-btn-primary { background-color: #009688; }
.tb-btn-primary:hover { background-color: #018073; }

.tb-tab-menu { padding: 4px 0; }
.tb-tab-menu a { display: block; padding: 6px 16px; color: #dfe2e6; font-size: 12.5px; cursor: pointer; }
.tb-tab-menu a:hover { background: #009688; color: #fff; }

.tb-input-sm { width: 130px; }
.tb-input-md { width: 170px; }
.tb-input-lg { width: 220px; }
.tb-input-xl { width: 520px; max-width: 100%; }

.tb-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tb-stat { flex: 1 1 160px; background: #fff; border: 1px solid #e6e6e6; border-radius: 2px; padding: 16px; position: relative; overflow: hidden; }
.tb-stat .tb-stat-label { color: #999; font-size: 12px; margin-bottom: 10px; }
.tb-stat .tb-stat-value { font-size: 24px; font-weight: 600; color: #333; line-height: 1.1; font-family: "DIN Alternate", Menlo, Consolas, monospace; }
.tb-stat .tb-stat-foot { color: #999; font-size: 11px; margin-top: 8px; }
.tb-stat .tb-stat-icon { position: absolute; right: 14px; top: 18px; font-size: 30px; color: #f2f2f2; }
.tb-stat.c-cyan .tb-stat-value { color: #009688; }
.tb-stat.c-green .tb-stat-value { color: #01b593; }
.tb-stat.c-red .tb-stat-value { color: #ed4040; }
.tb-stat.c-orange .tb-stat-value { color: #ffb800; }
.tb-stat.c-blue .tb-stat-value { color: #3ebdff; }

.tb-tag { display: inline-block; padding: 0 7px; height: 20px; line-height: 20px; border-radius: 2px; font-size: 11.5px; }
.tb-tag-cyan { background: #e6f5f3; color: #00796b; }
.tb-tag-green { background: #e6f7f1; color: #018073; }
.tb-tag-red { background: #fdecec; color: #d63a3a; }
.tb-tag-orange { background: #fff7e6; color: #cc9200; }
.tb-tag-blue { background: #e9f6ff; color: #1a8fd1; }
.tb-tag-gray { background: #f2f2f2; color: #6b7680; }
.tb-tag-purple { background: #f2ecfb; color: #7a4bd0; }

.tb-mono { font-family: Menlo, Consolas, monospace; font-size: 12px; }
.tb-muted { color: #999; }
.tb-right { text-align: right; }
.tb-link { color: #009688; cursor: pointer; }
.tb-link:hover { text-decoration: underline; }
.tb-danger { color: #ed4040; }
.tb-empty { padding: 40px; text-align: center; color: #999; font-size: 13px; }

.tb-panel { background: #fff; border: 1px solid #e6e6e6; border-radius: 2px; padding: 16px; }
.tb-form-narrow .layui-form-label { width: 120px; }
.tb-form-narrow .layui-input-block { margin-left: 150px; }
.tb-sep { height: 1px; background: #f2f2f2; margin: 14px 0; }
.tb-kv { line-height: 26px; font-size: 13px; }
.tb-kv b { display: inline-block; min-width: 120px; color: #999; font-weight: 400; }
.tb-code { background: #f7f7f7; border: 1px solid #e6e6e6; padding: 10px; font-family: Menlo, Consolas, monospace;
  font-size: 12px; color: #3c4750; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; }

.layui-layer-title { font-size: 14px; }
.layui-layer-page .layui-layer-content { font-size: 13px; }
.layui-form-label { font-size: 13px; }
.layui-form-item .layui-inline { margin-bottom: 0; }

.tb-progress { height: 6px; background: #f2f2f2; border-radius: 3px; overflow: hidden; display: inline-block; width: 90px; vertical-align: middle; }
.tb-progress span { display: block; height: 100%; background: #009688; }
.tb-progress.green span { background: #01b593; }
.tb-progress.red span { background: #ed4040; }

.tb-heat { display: block; height: 22px; border-radius: 2px; }

/* =====================================================================
   新手易懂层（见 docs/beginner_guide.md 与 docs/ux_rules.md）
   1) 任何"看不懂的字段"旁边跟一个「?」，鼠标移上去出白话解释；
   2) 页面顶部用 .tb-explain 先讲清这一步在干什么；
   3) 创建类操作给明确回执，不用用户自己猜。
   ===================================================================== */

/* 「?」角标 */
.tb-help { display: inline-block; width: 15px; height: 15px; line-height: 15px; text-align: center;
  border-radius: 50%; background: #e8eef7; color: #3a6ea5; font-size: 11px; font-weight: 700;
  cursor: help; margin-left: 4px; vertical-align: 1px; user-select: none; }
.tb-help:hover { background: #3a6ea5; color: #fff; }

/* 悬浮解释气泡：挂在 body 上，避免被表格单元格的 overflow 裁掉 */
#tb-tip { position: absolute; z-index: 99999999; max-width: 330px; background: #2f3b4a; color: #fff;
  padding: 9px 11px; border-radius: 4px; font-size: 12.5px; line-height: 1.75;
  box-shadow: 0 4px 16px rgba(0,0,0,.25); display: none; }
#tb-tip b { color: #7fe3d4; font-weight: 600; }
#tb-tip code { background: #45525f; padding: 1px 5px; border-radius: 2px;
  font-family: Menlo, Consolas, monospace; font-size: 11.5px; }
/* 长解释（错误原因那种"为什么/怎么办/例子"三段式）：加宽加高，能一口气读完 */
#tb-tip.tb-tip-wide { max-width: 560px; max-height: 62vh; overflow: auto; line-height: 1.85; }
/* 可悬浮查看详情的文本（失败原因等）：虚线下划线做提示，鼠标停上去出完整解释 */
.tb-err-hover { cursor: help; border-bottom: 1px dashed currentColor; }

/* 白话说明卡 */
.tb-explain { background: #f5fbfa; border: 1px solid #cfe9e5; border-left: 3px solid #009688;
  border-radius: 2px; padding: 12px 14px; margin-bottom: 12px; color: #44515c;
  font-size: 12.5px; line-height: 1.9; }
.tb-explain h4 { font-size: 13.5px; color: #00796b; margin-bottom: 6px; font-weight: 600; }
.tb-explain ul { margin: 0; padding-left: 18px; }
.tb-explain li { margin-bottom: 3px; }
.tb-explain code { background: #e8f2f0; padding: 1px 5px; border-radius: 2px;
  font-family: Menlo, Consolas, monospace; }
/* 说明卡里的「举例」：单独一行、绿色小字，一眼能看到例子 */
.tb-explain .tb-eg { display: block; color: #00796b; background: #eaf7f4; border-left: 2px solid #009688;
  padding: 2px 6px; margin: 2px 0 5px; border-radius: 2px; }
/* 说明卡可收起（默认展开，选择按页面记在 localStorage）：收起后仍留一行"这一页是干什么的"，
   否则用户会以为说明没了、也不知道该不该点开。内容一个字都不删，只在视觉上让位。 */
.tb-explain > summary { cursor: pointer; list-style: none; outline: none; user-select: none; }
.tb-explain > summary::-webkit-details-marker { display: none; }
.tb-explain > summary::before { content: '▾ '; color: #009688; font-weight: 700; }
.tb-explain[open] > summary { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px dashed #cfe9e5; }
.tb-explain:not([open]) > summary { margin-bottom: 0; }
.tb-explain:not([open]) > summary::before { content: '▸ '; }
.tb-explain > summary:hover { color: #00796b; }
.tb-explain-hint { color: #8a949e; font-weight: 400; font-size: 11.5px; margin-left: 6px; }

/* 多链勾选网格 */
.tb-chainpick { border: 1px solid #e6e6e6; border-radius: 2px; padding: 8px 10px;
  max-height: 240px; overflow: auto; background: #fff; }
.tb-chainpick-title { color: #8a949e; font-size: 11.5px; margin: 4px 0 6px; }
.tb-chainpick-item { display: inline-block; min-width: 158px; margin: 0 10px 6px 0; }
.tb-chainpick-item label { cursor: pointer; }
.tb-chainpick-item em { color: #a8b0b8; font-style: normal; font-size: 11px; }
.tb-chainpick-actions { margin-bottom: 6px; }
.tb-chainpick-actions a { margin-right: 14px; }

/* 创建结果与余额展示 */
.tb-warn { color: #d63a3a; }
.tb-ok { color: #018073; }
.tb-bal-list { line-height: 1.75; }
.tb-bal-list .tb-bal-token { color: #8a949e; }
.tb-chain-tags span { display: inline-block; background: #eef3f8; color: #4a6b8a; border-radius: 2px;
  padding: 0 6px; margin: 0 3px 3px 0; font-size: 11.5px; }
.tb-result-mnemonic { background: #fff8e6; border: 1px solid #ffe1a8; border-radius: 2px;
  padding: 10px; font-family: Menlo, Consolas, monospace; font-size: 14px; line-height: 2;
  letter-spacing: .5px; word-break: break-all; }

/* 钱包勾选：让"勾选钱包 → 自动带出链与分组"这条路径在页面上看得清楚 */
.tb-pick-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.tb-pick-bar .layui-input { height: 30px; line-height: 30px; }
.tb-pick-item { display: block; padding: 3px 6px; border-radius: 2px; cursor: pointer;
  font-size: 12.5px; line-height: 22px; white-space: nowrap; }
.tb-pick-item:hover { background: #f2f7f6; }
.tb-pick-item input { vertical-align: -1px; margin-right: 4px; }

/* 功能性状态提示（例如"已自动填好：公链=…"）：只在有内容时显示，
   属于功能反馈而不是说明文案；用 hidden 属性控制显隐。
   clear:both 是护栏：提示条必须独占整行。若被放进 .layui-inline（收缩宽度的
   inline-block）内部，会被挤成三四个字一行的窄列 —— 曾经「广播模式」的提示
   就是这个表现。结构上也应放在 .layui-inline 外层，这一行只是兜底。 */
.tb-note { background: #f5fbfa; border: 1px solid #cfe9e5; border-left: 3px solid #009688;
  border-radius: 2px; padding: 8px 12px; color: #44515c; font-size: 12.5px; line-height: 1.8;
  clear: both; }
.tb-note ul { margin: 4px 0 0; padding-left: 18px; }
.tb-note[hidden] { display: none; }

/* 分组资金概览（建单页内联，只读）：选中分组后就地说明"这组有多少账户、合计多少余额、
   每账户均值多少"，并把单笔上下限拿去比对。刻意做成内联块而不是弹窗 ——
   弹窗会打断填写，而这份数据是用来**边看边改**金额的。 */
.tb-gov { background: #fbfcfd; border: 1px solid #e6e6e6; border-left: 3px solid #3ebdff; }
.tb-gov + .tb-gov { margin-top: 8px; }
.tb-gov-head { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 4px; }
.tb-gov-head .tb-muted { font-weight: 400; font-size: 11.5px; }
.tb-gov-line { line-height: 1.9; }
.tb-gov-chain { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #e6e6e6; }
.tb-gov-chain-head { color: #00796b; font-weight: 600; }
.tb-gov-kv { line-height: 1.9; }
.tb-gov-kv b { color: #1f2d3d; }
.tb-gov-check { margin-top: 5px; padding: 6px 9px; border-radius: 2px; line-height: 1.8;
  background: #f7f8fa; border-left: 3px solid #c9ced6; }
.tb-gov-check-ok { background: #eefaf6; border-left-color: #01b593; }
.tb-gov-check-warn { background: #fff8e8; border-left-color: #ffb800; }
.tb-gov-check-danger { background: #fdeeee; border-left-color: #ed4040; }
.tb-gov-check-unknown { background: #f5f6f8; border-left-color: #a8b0b8; }
.tb-gov-retry { margin-left: 4px; }

/* 角色显示与"无权访问"遮罩：
   guardPage() 判断无权时会给 body 挂一层不透明遮罩，
   既显示中文原因，也保证底下"看起来能用"的按钮不会被点到。
   注意：这只是前端体验与纵深，后端 onlyRole 守卫仍是最终防线。 */
.tb-role-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 2px;
  background: rgba(255, 255, 255, .14); color: #cfd8e3; font-size: 11.5px; vertical-align: 1px; }
.tb-role-badge.tb-role-super { background: rgba(237, 64, 64, .22); color: #ffb3b3; }
.tb-guard-mask { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 2147483000;
  background: #f2f3f5; display: flex; align-items: center; justify-content: center; }
.tb-guard-box { max-width: 460px; padding: 28px 32px; background: #fff; border: 1px solid #e6e6e6;
  border-radius: 4px; text-align: center; box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
.tb-guard-box .layui-icon { font-size: 42px; color: #ed4040; }
.tb-guard-box h3 { margin: 10px 0 8px; font-size: 16px; color: #333; font-weight: 600; }
.tb-guard-box p { color: #5a6672; font-size: 13px; line-height: 1.9; }
.tb-guard-box .tb-guard-hint { color: #97a1ac; font-size: 12px; margin-top: 6px; }

/* 确认框里的多行文案：保留 \n 换行（危险操作把"会发生什么/能否撤销"一条条写清，
   被压成一整段就没人读得下去）。pre-line 而不是 pre-wrap：合并多余空格，
   不会把 HTML 源码缩进也渲染出来。 */
.tb-pre { white-space: pre-line; line-height: 1.9; }

/* ===================================================================
   顶栏告警铃铛 + 告警面板
   -------------------------------------------------------------------
   服务端早就在算分级告警，但控制台此前没有任何落点（评审 §3）。这些样式只服务
   顶栏铃铛与它的下拉面板；通知中心的整页样式沿用现有 tb-card / tb-tag。
   =================================================================== */
.tb-header-right li#tbBell { position: relative; cursor: pointer; }
.tb-header-right li#tbBell .tb-bell-badge {
  display: none; position: absolute; top: 6px; right: 4px; min-width: 16px; height: 16px;
  padding: 0 4px; line-height: 16px; font-size: 11px; text-align: center; color: #fff;
  background: #ed4040; border-radius: 8px; }
.tb-header-right li#tbBell .tb-bell-badge.tb-on { display: inline-block; }

.tb-bell-panel {
  display: none; position: fixed; top: 56px; right: 12px; width: 380px; max-height: 60vh;
  background: #fff; border: 1px solid #e6e6e6; border-radius: 4px; z-index: 2000;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .16); overflow: hidden; }
.tb-bell-panel.tb-on { display: block; }
.tb-bell-hd { display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid #f0f0f0; font-size: 14px; color: #333; }
.tb-bell-hd .tb-bell-live { font-size: 12px; color: #97a1ac; margin-left: auto; margin-right: 10px; }
.tb-bell-bd { max-height: calc(60vh - 44px); overflow-y: auto; }
.tb-bell-item { display: block; padding: 10px 14px; border-bottom: 1px solid #f7f7f7; cursor: pointer; }
.tb-bell-item:hover { background: #f7fbfc; }
.tb-bell-item .tb-bell-title { font-size: 13px; color: #333; line-height: 1.6; }
.tb-bell-item.tb-unread .tb-bell-title { font-weight: 600; }
.tb-bell-item .tb-bell-meta { font-size: 12px; color: #97a1ac; margin-top: 4px; }
.tb-bell-empty { padding: 22px 14px; text-align: center; color: #97a1ac; font-size: 13px; }

/* ============================================================================
   窄屏适配（手机 / 半屏窗口）
   ----------------------------------------------------------------------------
   【为什么必须做】在做这件事之前，全站 @media 数量是 **0**：
     · 侧边栏固定 200px（layui.css 里 .layui-side 与 .tb-body{left:200px}），正文被挤窄；
     · 表格横向溢出，"操作"列滚不到，只能靠拖横向滚动条；
     · 弹窗用固定像素（TB.open area:['720px','560px']）且没有 max-width，手机上直接溢出屏幕；
     · 表单标签固定 80~110px 左浮动，窄屏下输入框只剩一小条。
   而"紧急熔断 / 一键清仓 / 看持仓"恰恰是**最需要在手机上做**的操作。
   【落地口径】页面跑在 iframe 里（见 admin.js 的 openTab），iframe 的布局视口宽度 = 外壳给它的宽度，
   所以断点以 iframe 自身宽度生效 —— 这才是能真正生效的做法。
   （顺带说明：给 web/pages/*.html 加 <meta name="viewport"> 是**无效**的，
     iframe 的布局视口由父层决定，不是由页面里的 meta 决定。所以这里只改布局。）
   【只动布局，不动任何业务逻辑】不引入新文件、不改页面结构，纯样式覆盖。
   ============================================================================ */
@media (max-width: 900px) {
  /* 外壳在窄屏下必须自己占出两行高度，避免顶部导航浮动换行后覆盖正文。 */
  .tb-header { height: 104px !important; position: relative !important; overflow: hidden; }
  .tb-header .tb-logo { width: 200px; }
  .tb-nav {
    position: absolute; left: 0; right: 0; top: 56px; height: 48px;
    display: flex; overflow-x: auto; overflow-y: hidden; white-space: nowrap;
    background: #20222a; scrollbar-width: none;
  }
  .tb-nav::-webkit-scrollbar { display: none; }
  .tb-nav a { flex: 0 0 auto; height: 48px; line-height: 48px; padding: 0 16px; }
  .tb-header-right {
    position: absolute; top: 0; right: 0; float: none; height: 56px;
    display: flex; align-items: stretch; max-width: calc(100% - 200px);
  }
  .tb-header-right > li { float: none; padding: 0 8px; }
  .tb-user { max-width: 34px; overflow: hidden; white-space: nowrap; font-size: 0; }
  .tb-user i { font-size: 16px; margin-right: 0; }

  /* ① 侧边栏收成图标窄条，把更多宽度让给正文；分组名由 title 提供悬浮提示 */
  .layui-side,
  .layui-layout-admin .layui-side { top: 104px !important; width: 56px !important; }
  .layui-side-scroll { width: 56px !important; }
  .layui-layout-admin .layui-body { left: 56px !important; top: 104px !important; }
  .layui-layout-admin .layui-footer { left: 56px !important; }
  .layui-layout-left { left: 56px !important; }
  .layui-logo { width: 56px !important; font-size: 0 !important; }
  .tb-side .layui-nav-item a { padding-left: 0; padding-right: 0; text-align: center; font-size: 0; }
  .tb-side .layui-nav-item > a > i { position: static; display: inline-block; left: auto; font-size: 18px; }

  /* ② 卡片与统计块改单列，避免被压成豆腐块 */
  .tb-stats { display: block !important; }
  .tb-stat { width: 100% !important; margin: 0 0 10px 0 !important; }

  /* ③ 表单标签改为上标签下输入（窄屏左浮动标签会把输入框挤没） */
  .layui-form-label { float: none !important; width: auto !important; text-align: left !important; padding: 6px 0 2px !important; }
  .layui-input-block,
  .layui-input-inline,
  .layui-form-item .layui-input-inline { margin-left: 0 !important; width: 100% !important; float: none !important; }
  .tb-input-sm, .tb-input-md, .tb-input-lg, .tb-form-narrow { width: 100% !important; }

  /* ④ 表格：允许横向滚动，单元格不折行（否则一列字竖着排） */
  .layui-table-view { overflow-x: auto !important; }
  .layui-table-cell { white-space: nowrap; }

  /* ⑤ 弹窗不得溢出屏幕（TB.open 传的是固定像素，这里兜住） */
  .layui-layer { max-width: 96vw !important; }
  .tb-tabs .layui-tab-title { padding-right: 84px; overflow-x: auto; white-space: nowrap; }
  .tb-tabs .layui-tab-title li { min-width: 76px; padding-left: 10px; padding-right: 24px; }

  .tb-page { padding: 8px !important; }
}

@media (max-width: 600px) {
  .tb-header .tb-logo { width: 170px; padding-left: 14px; font-size: 14px; }
  .tb-header-right { max-width: calc(100% - 170px); }
  .tb-header-right > li { padding: 0 6px; }
  .tb-header-right > li#tbFullscreen { display: none; }
  .tb-role-badge { display: none !important; }

  /* 手机竖屏：按钮改整行，避免一行挤 4 个按钮点不准（急停按钮点错代价很大） */
  .tb-page .layui-btn { width: 100%; margin: 4px 0 !important; }
  .layui-btn + .layui-btn { margin-left: 0 !important; }
  .tb-card-hd { height: auto !important; line-height: 1.6 !important; padding: 8px 12px !important; }
  .tb-stat-value { font-size: 20px !important; }
}

/* 建单前自检失败时高亮的字段：一眼看出是哪一个框没填 */
.tb-input-error, .tb-input-error:focus { border-color: #ed4040 !important;
  box-shadow: 0 0 0 2px rgba(237,64,64,.15) !important; }

/* ==========================================================================
   合约风险确认弹窗（TB.riskGate，见 common.js）
   —— 使用方要求："把合约地址详情、为什么这么判，都提示给用户，让他自己确认买不买"。
   所以这一块的排版目标是**在一屏里读得完、关键数字扫得到**：
   结论横幅 → 合约详情表 → 评判依据 → 逐条风险 → 税费/流动性原值 → 勾选确认。
   ========================================================================== */
.tb-rk { font-size: 13px; line-height: 1.75; }
.tb-rk-banner { padding: 9px 12px; border-radius: 3px; font-weight: 600; margin-bottom: 10px; }
.tb-rk-banner-block { background: #fdeeee; border-left: 4px solid #ed4040; color: #a01818; }
.tb-rk-banner-danger { background: #fdeeee; border-left: 4px solid #ed4040; color: #a01818; }
.tb-rk-banner-warn { background: #fff8e8; border-left: 4px solid #ffb800; color: #8a6100; }
.tb-rk-banner-ok { background: #eefaf6; border-left: 4px solid #01b593; color: #016a5c; }

.tb-rk-sec { font-weight: 600; color: #1f2d3d; margin: 12px 0 6px; padding-left: 8px;
  border-left: 3px solid #009688; }
.tb-rk .layui-table td { padding: 5px 8px !important; vertical-align: top; }
.tb-rk-k { width: 132px; color: #8a949e; background: #fafafa; }
.tb-rk-addr { word-break: break-all; background: #f5f6f8; padding: 1px 4px; border-radius: 2px; }

.tb-rk-basis { margin: 0; padding-left: 20px; }
.tb-rk-basis li { margin: 2px 0; word-break: break-word; }

.tb-rk-f { border: 1px solid #e6e6e6; border-radius: 3px; padding: 8px 10px; margin: 6px 0; background: #fff; }
.tb-rk-f-block { border-left: 4px solid #ed4040; background: #fdf6f6; }
.tb-rk-f-danger { border-left: 4px solid #ed4040; }
.tb-rk-f-warn { border-left: 4px solid #ffb800; }
.tb-rk-f-info { border-left: 4px solid #a8b0b8; }
.tb-rk-f-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tb-rk-code { background: #f5f6f8; color: #5a6570; padding: 0 5px; border-radius: 2px; font-size: 12px; }
.tb-rk-chip { font-size: 11.5px; padding: 1px 6px; border-radius: 9px; color: #fff; }
.tb-rk-chip-block { background: #8a1414; }
.tb-rk-chip-danger { background: #ed4040; }
.tb-rk-chip-warn { background: #ff9a00; }
.tb-rk-chip-info { background: #8a949e; }
.tb-rk-must { font-size: 11.5px; color: #ed4040; border: 1px solid #ed4040;
  border-radius: 9px; padding: 0 6px; }
.tb-rk-f-title { font-weight: 600; margin-top: 4px; word-break: break-word; }
.tb-rk-f-why { color: #5a6570; font-size: 12.5px; white-space: pre-line; margin-top: 3px; }
.tb-rk-f-cons { color: #a01818; margin-top: 4px; }

.tb-rk-ack { display: block; margin: 10px 0 4px; padding: 9px 11px; border-radius: 3px;
  background: #fff8e8; border: 1px solid #ffe0a3; line-height: 1.8; cursor: pointer; }
.tb-rk-ack input { margin-right: 6px; vertical-align: middle; }
.tb-rk-ack-block { background: #fdeeee; border-color: #f5c2c2; cursor: default; }
.tb-rk-ack-notice { background: #f5fbfa; border-color: #cfe9e5; cursor: default; }
