/* 华粮仓储 v2 · 在原设计系统（base.css）之上的增量样式
   设计口径与网页端一致：深海军蓝侧栏 + 白卡片 + 蓝色主按钮 + 橙色强调。 */

/* ---------------- 登录页补充 ---------------- */
.auth-visual .v2-tag{
  display:inline-flex;align-items:center;gap:6px;margin-bottom:18px;padding:4px 10px;
  border:1px solid rgba(255,255,255,.22);border-radius:20px;font-size:11.5px;color:#cfe3f6;
  letter-spacing:.5px;
}
.auth-visual .v2-tag i{width:6px;height:6px;border-radius:50%;background:#39d98a;display:block}
.reg-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.reg-grid .full{grid-column:1/-1}
/* 注册/入驻：先选主体类型 */
.reg-role{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}
.reg-role-item{
  display:flex;flex-direction:column;gap:3px;padding:11px 12px;text-align:left;cursor:pointer;
  border:1px solid var(--line);border-radius:10px;background:#fff;transition:.15s;
}
.reg-role-item b{font-size:13px;color:var(--text);font-weight:600}
.reg-role-item span{font-size:11px;color:var(--muted);line-height:1.5}
.reg-role-item:hover{border-color:var(--brand)}
.reg-role-item.on{border-color:var(--brand);box-shadow:0 0 0 3px rgba(18,101,176,.10);background:rgba(18,101,176,.05)}
.reg-role-item.on b{color:var(--brand)}
.pwd-hint{font-size:11.5px;color:var(--muted);line-height:1.6}
.pwd-hint b{color:var(--brand)}

/* ---------------- 框架补充 ---------------- */
.role-chip{
  font-size:11px;padding:2px 8px;border-radius:20px;border:1px solid rgba(255,255,255,.18);
  color:#cfe0f0;letter-spacing:.3px;margin-left:6px;
}
.nav-item .ni{width:16px;text-align:center;font-size:13px;opacity:.9;flex:none}
.topbar .t-right{display:flex;align-items:center;gap:10px}
.env-pill{
  font-size:11px;color:#0f6e56;background:#e6f6f0;border:1px solid #bfe6d8;
  padding:4px 9px;border-radius:20px;letter-spacing:.3px;
}

/* ---------------- 页面通用 ---------------- */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.section-title{font-size:14px;font-weight:600;color:var(--navy);display:flex;align-items:center;gap:8px;margin-bottom:12px}
.section-title::before{content:"";width:3px;height:14px;background:var(--brand);border-radius:2px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.stack{display:grid;gap:16px}

/* 余额卡 */
.balance-card{
  border-radius:14px;padding:20px 22px;color:#fff;position:relative;overflow:hidden;
  background:radial-gradient(600px 240px at 88% -10%,rgba(27,127,209,.55),transparent 62%),
             linear-gradient(135deg,#0d2c4d,#123f6c 60%,#0e3054);
  box-shadow:0 12px 30px rgba(13,44,77,.18);
}
.balance-card::after{
  content:"";position:absolute;right:-30px;bottom:-60px;width:200px;height:200px;
  border-radius:50%;border:1px solid rgba(255,255,255,.09);
}
.balance-card .bc-label{font-size:12.5px;color:#a9c6e2;letter-spacing:.5px}
.balance-card .bc-value{font-size:34px;font-weight:700;letter-spacing:.5px;line-height:1.2;margin:6px 0 2px}
.balance-card .bc-value small{font-size:13px;font-weight:500;color:#a9c6e2;margin-left:6px}
.balance-card .bc-meta{font-size:11.5px;color:#8fb0cd;margin-top:6px}
.balance-card.neg{background:radial-gradient(600px 240px at 88% -10%,rgba(214,69,69,.5),transparent 62%),
             linear-gradient(135deg,#4a1414,#7a2323 60%,#3d1010)}
.balance-card .bc-actions{margin-top:14px;display:flex;gap:8px;position:relative;z-index:1}
.balance-card .btn-ghost{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.22);color:#fff}
.balance-card .btn-ghost:hover{background:rgba(255,255,255,.18)}

/* 状态标签补充 */
.tag{display:inline-block;font-size:11px;padding:1px 7px;border-radius:5px;background:#f1f5f9;color:#63768a;border:1px solid #e2e8f0}
.tag.code{font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:.5px;background:#eef4fb;color:#1464a8;border-color:#d5e6f7}

/* 金额 */
.money{font-variant-numeric:tabular-nums;font-weight:600}
.money.neg{color:var(--red)}
.money.pos{color:var(--green)}
.amount-lg{font-size:20px;font-weight:700;color:var(--navy)}

/* 表格操作列 */
.t-actions{display:flex;gap:6px;flex-wrap:wrap}
.btn-link{font-size:12.5px;color:var(--brand);padding:2px 0;white-space:nowrap}
.btn-link:hover{text-decoration:underline}
.btn-link.danger{color:var(--red)}
.btn-link.muted{color:var(--muted);cursor:not-allowed;text-decoration:none}

/* 分段控件 */
.seg{display:inline-flex;background:#eef3f9;border-radius:9px;padding:3px;gap:2px}
.seg button{font-size:12.5px;padding:6px 14px;border-radius:7px;color:var(--muted)}
.seg button.on{background:#fff;color:var(--navy);font-weight:600;box-shadow:0 1px 3px rgba(16,38,64,.12)}

/* 详情键值 */
.kv-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 18px}
.kv-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 18px}

/* 提示条 */
.notice{display:flex;gap:9px;align-items:flex-start;font-size:12.5px;line-height:1.7;
  border-radius:9px;padding:11px 13px;border:1px solid #d5e6f7;background:#f0f7fe;color:#185b96}
.notice.warn{border-color:#f4e3c2;background:#fdf8ec;color:#8a6109}
.notice.danger{border-color:#f3cccc;background:#fdecec;color:#a32d2d}
.notice b{font-weight:600}

/* 流程条 */
.flow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin:4px 0 14px}
.flow .st{display:flex;align-items:center;gap:6px}
.flow .st i{width:18px;height:18px;border-radius:50%;border:1px solid #cfdcea;display:grid;place-items:center;
  font-size:10px;font-style:normal;color:#8fa1b3;background:#fff}
.flow .st.done i{border-color:var(--green);background:var(--green);color:#fff}
.flow .st.now i{border-color:var(--brand);background:var(--brand);color:#fff}
.flow .arw{color:#c2cfdd}

/* 权限说明 */
.perm-hint{font-size:11.5px;color:#8fa1b3;margin-top:8px;line-height:1.6}

/* 上传/签名 */
.sig-wrap{border:1px dashed #c7d3e0;border-radius:9px;background:#fff;position:relative}
.sig-wrap canvas{display:block;width:100%;height:150px;touch-action:none;cursor:crosshair}
.sig-wrap .sig-hint{position:absolute;inset:0;display:grid;place-items:center;color:#dbe3ec;
  font-size:13px;letter-spacing:3px;pointer-events:none}

/* 删除确认 */
.danger-zone{border:1px solid #f3cccc;background:#fdf6f6;border-radius:9px;padding:12px 14px;font-size:12.5px;color:#8a3b3b}

/* 仓单样式（沿用合同字体口径） */
.receipt-doc{border:1px solid #e8edf4;border-radius:10px;background:#fff;padding:18px 20px;
  font-size:12.5px;line-height:1.9}
.receipt-doc h3{font-size:16px;letter-spacing:2px;color:var(--navy);text-align:center;margin-bottom:4px}
.receipt-doc .rd-sub{text-align:center;color:#93a2b3;font-size:11px;letter-spacing:2px;margin-bottom:12px}
.receipt-doc .rd-row{display:flex;justify-content:space-between;gap:12px;border-bottom:1px dashed #e6ecf4;padding:5px 0}
.receipt-doc .rd-row .k{color:#7d8fa3}
.receipt-doc .rd-row .v{color:#1c2f45;font-weight:500;text-align:right;word-break:break-all}
.receipt-doc .fp{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:10.5px;color:#5b7288;
  background:#f4f8fc;border:1px solid #e3ebf4;border-radius:6px;padding:6px 8px;margin-top:10px;word-break:break-all}

/* 空状态沿用 .empty，仅补充图标字号 */
.empty .ei{font-size:26px;opacity:.45;margin-bottom:6px}

/* 待办列表 */
.todo{display:grid;gap:10px}
.todo-item{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:9px;
  padding:11px 14px;background:#fff}
.todo-item .ti-main{flex:1;min-width:0}
.todo-item .ti-title{font-size:13px;color:var(--navy);font-weight:500}
.todo-item .ti-sub{font-size:11.5px;color:var(--muted);margin-top:1px}
.todo-item .ti-n{font-size:18px;font-weight:700;color:var(--accent)}

/* 移动端 */
@media (max-width:900px){
  .grid-2,.grid-3{grid-template-columns:1fr}
  .kv-3,.kv-4{grid-template-columns:1fr 1fr}
  .reg-grid{grid-template-columns:1fr}
}
@media (max-width:760px){
  .balance-card{padding:16px 16px}
  .balance-card .bc-value{font-size:27px}
  .kv-3,.kv-4{grid-template-columns:1fr}
  .seg{width:100%;overflow-x:auto}
  .seg button{flex:1 0 auto;white-space:nowrap}
  .page-actions{width:100%}
  .page-actions .btn{flex:1 1 auto}
  .t-actions{gap:8px}
}

/* 打印（仓单/合同） */
@media print{
  .sidebar,.topbar,.page-actions,.nav-mask,.toast{display:none!important}
  .view{padding:0;overflow:visible}
  .card{box-shadow:none;border:none}
  body{background:#fff}
}

/* ============ 移动端：表格转卡片 + 底部标签栏 ============ */
@media (max-width:760px){
  table.resp{display:block;width:100%;min-width:0}
  table.resp thead{display:none}
  table.resp tbody{display:block}
  table.resp tr{display:block;border:1px solid var(--line);border-radius:10px;margin:0 0 10px;
    padding:8px 12px;background:#fff}
  table.resp tr:hover{background:#fff}
  table.resp td{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;
    border:0;padding:5px 0;text-align:right;font-size:12.5px}
  table.resp td::before{content:attr(data-label);color:var(--muted);font-size:11.5px;
    text-align:left;flex:none;padding-top:1px}
  table.resp td:first-child{border-bottom:1px dashed var(--line);padding-bottom:8px;
    margin-bottom:5px;font-weight:600;color:var(--navy);text-align:left}
  table.resp td:first-child::before{display:none}
  table.resp td[data-label=""]::before{display:none}
  table.resp td.t-actions-cell{display:block;text-align:left;padding-top:8px}
  table.resp td.t-actions-cell::before{display:none}
  table.resp .t-actions{justify-content:flex-end}
}
.mb-tabbar{display:none}
@media (max-width:760px){
  .mb-tabbar{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:70;background:#fff;
    border-top:1px solid var(--line);height:58px;padding-bottom:env(safe-area-inset-bottom);
    box-shadow:0 -2px 12px rgba(16,38,64,.06);
  }
  .mb-tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;
    justify-content:center;gap:2px;font-size:10.5px;color:var(--muted);position:relative}
  .mb-tabbar button.on{color:var(--brand);font-weight:600}
  .mb-tabbar .mi{font-size:17px;line-height:1.1}
  .mb-tabbar .mb-dot{position:absolute;top:6px;right:calc(50% - 18px);min-width:15px;height:15px;
    border-radius:8px;background:var(--accent);color:#3a2600;font-size:9.5px;font-weight:700;
    line-height:15px;text-align:center;padding:0 3px}
  .view{padding-bottom:96px}
  .app-screen{height:100dvh}
}

@media (max-width:760px){
  /* 覆盖 base.css 里 .card-body.tight table{min-width:520px}：
     响应式表格必须按容器宽度排，否则会横向溢出、值被挤出屏幕 */
  .card-body.tight{overflow-x:visible}
  .card-body.tight table.resp{min-width:0!important;width:100%!important;table-layout:auto}
  table.resp td{word-break:break-word}
  table.resp td>.t-actions{margin-left:auto}
}

@media (max-width:760px){
  /* 三张统计卡在 2 列布局下，最后一张独占一行，避免右侧留空洞 */
  .stat-grid > .stat:nth-child(odd):last-child{grid-column:1 / -1}
}

@media (max-width:760px){
  /* 三张统计卡在 2 列布局下，最后一张独占一行，避免右侧留空洞 */
  .stat-grid > .stat:nth-child(odd):last-child{grid-column:1 / -1}
}

/* ---------------- 补充协议小卡 ---------------- */
.mini-card{border:1px solid var(--line);border-radius:9px;padding:9px 12px;background:#fafbfd;margin-bottom:8px}
.mini-card:last-child{margin-bottom:0}
.kv-grid .kv b{color:var(--navy)}
@media (max-width:760px){
  .mini-card{padding:8px 10px}
}

/* ---------------- 登录页「体验账号」快捷入口 ---------------- */
.demo-login{margin-top:14px;border-top:1px dashed var(--line);padding-top:12px}
.demo-login-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:8px}
.demo-login-head span{font-size:12.5px;font-weight:600;color:var(--navy)}
.demo-login-head em{font-size:11px;color:var(--muted);font-style:normal}
.demo-chips{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.demo-chip{
  display:flex;flex-direction:column;gap:2px;align-items:flex-start;width:100%;
  padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#fafbfd;
  cursor:pointer;text-align:left;font:inherit;
  transition:border-color .15s ease,background .15s ease;
}
.demo-chip:hover{border-color:var(--brand);background:#fff}
.demo-chip.on{border-color:var(--brand);background:#eef5fd}
.demo-chip .dc-role{
  font-size:10.5px;color:#0f6e56;background:#e6f6f0;border:1px solid #bfe6d8;
  border-radius:20px;padding:1px 6px;line-height:1.5;
}
.demo-chip .dc-label{font-size:12.5px;color:var(--navy);font-weight:600;line-height:1.35}
.demo-chip .dc-acct{font-size:11.5px;color:var(--muted);font-family:ui-monospace,Menlo,Consolas,monospace}
@media (max-width:520px){
  .demo-chips{grid-template-columns:1fr}
}

/* 5 个体验账号在 2 列下最后一行会空半格，让它独占一行更整齐 */
.demo-chips > .demo-chip:last-child:nth-child(odd){grid-column:1 / -1}

/* ---------------- 待办红点 ---------------- */
.nav-item{position:relative}
.nav-badge{
  display:none;position:absolute;top:6px;right:8px;min-width:17px;height:17px;padding:0 4px;
  border-radius:9px;background:#e5484d;color:#fff;font-size:10.5px;line-height:17px;
  text-align:center;font-weight:700;letter-spacing:0;box-shadow:0 1px 3px rgba(229,72,77,.4);
}
.nav-badge.on{display:block}
.todo-pill{
  display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:20px;
  border:1px solid #f3c9c9;background:#fdf2f2;color:#c02a2a;font-size:12px;font-weight:600;
  transition:background .15s ease;
}
.todo-pill:hover{background:#fbe7e7}
.todo-pill[hidden]{display:none}
.todo-pill .tp-dot{
  width:7px;height:7px;border-radius:50%;background:#e5484d;
  box-shadow:0 0 0 3px rgba(229,72,77,.15);
}
@media (max-width:760px){
  .todo-pill{padding:4px 9px;font-size:11.5px}
  .todo-pill .tp-dot{display:none}
}

/* 备案信息（法规要求：ICP 备案号 + 公网安备号需在页面底部展示） */
.site-icp{position:fixed;left:0;right:0;bottom:6px;z-index:4;text-align:center;
  font-size:11px;line-height:1.5;color:#8a93a0;pointer-events:none}
.site-icp a{color:#8a93a0;text-decoration:none;pointer-events:auto}
.site-icp a:hover{color:#1265b0;text-decoration:underline}
.site-icp span{margin:0 6px}
@media (max-width:760px){.site-icp{bottom:70px;font-size:10px}}
body.app-on .site-icp{display:none}

/* ---------------- 保证金 / 在线支付 ---------------- */
.dep-head{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#40536b;margin-bottom:8px}
.dep-num{font-variant-numeric:tabular-nums;color:#16212e;font-weight:600}
.dep-bar{height:8px;border-radius:6px;background:#eef2f7;overflow:hidden}
.dep-fill{height:100%;border-radius:6px;background:linear-gradient(90deg,#1c74c4,#15805a);transition:width .3s}
.dep-fill.warn{background:linear-gradient(90deg,#e2a33c,#cf8b16)}
.notice.ok{border-color:#cfeade;background:#eef9f4;color:#15805a}
.sep-title,.sec-title{font-size:14px;font-weight:600;color:#16212e;margin:0 0 10px}

.pay-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.pay-row .input{flex:1 1 180px;min-width:140px}
.pay-box{display:flex;justify-content:center;align-items:center;padding:6px}
.pay-box svg{width:216px;height:216px;display:block;border-radius:8px}
.pay-amt{text-align:center;font-size:24px;font-weight:700;color:#16212e;margin-top:4px;
  font-variant-numeric:tabular-nums}
.pay-hint{text-align:center;font-size:12.5px;color:#5b6b7d;margin-top:8px}
.pay-state{display:block;color:#a9740b;margin-top:4px}
@media (max-width:760px){
  .pay-box svg{width:180px;height:180px}
  .pay-row .btn{flex:1 1 46%}
}
