/* ============================================================
     RESET & BASE
  ============================================================ */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  
  :root {
    --bg-base:       #0d1117;
    --bg-card:       #161b22;
    --bg-card2:      #1c2330;
    --bg-hover:      #21262d;
    --border:        #30363d;
    --border-light:  #21262d;
    --text-primary:  #e6edf3;
    --text-secondary:#8b949e;
    --text-muted:    #484f58;
    --accent:        #2563eb;
    --accent-hover:  #1d4ed8;
    --accent-light:  #1e3a5f;
    --green:         #3fb950;
    --green-bg:      #0d2818;
    --yellow:        #d29922;
    --yellow-bg:     #2d2000;
    --red:           #f85149;
    --red-bg:        #2d0f0f;
    --orange:        #e3702a;
    --orange-bg:     #2d1500;
    --purple:        #a371f7;
    --purple-bg:     #1a0f2e;
    --radius:        8px;
    --radius-lg:     12px;
    --shadow:        0 4px 24px rgba(0,0,0,0.4);
  }

  html { font-size: 14px; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
  }

  /* ============================================================
     LAYOUT
  ============================================================ */
  .app { display: flex; flex-direction: column; min-height: 100vh; }

  /* NAV */
  .navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(13,17,23,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    display: flex; align-items: center; gap: 32px;
  }
  .nav-logo {
    display: flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: 15px; color: var(--text-primary);
    text-decoration: none; white-space: nowrap;
  }
  .nav-logo .logo-icon {
    width: 28px; height: 28px; border-radius: 6px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
  }
  .nav-powered {
    font-size: 10.5px; color: var(--text-muted); white-space: nowrap;
    padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border);
    background: rgba(255,255,255,.02); margin-left: 2px;
  }
  @media (max-width: 1100px) { .nav-powered { display: none; } }
  .nav-links { display: flex; gap: 4px; flex: 1; }
  .nav-link {
    padding: 6px 12px; border-radius: var(--radius);
    color: var(--text-secondary); font-size: 13px;
    cursor: pointer; transition: all .15s;
    border: none; background: none;
  }
  .nav-link:hover, .nav-link.active {
    color: var(--text-primary); background: var(--bg-hover);
  }
  .nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
  .nav-badge {
    position: relative; cursor: pointer;
    width: 32px; height: 32px; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; transition: background .15s;
  }
  .nav-badge:hover { background: var(--bg-hover); }
  .badge-dot {
    position: absolute; top: 4px; right: 4px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--red); border: 2px solid var(--bg-base);
  }
  .wallet-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 12px; cursor: pointer;
    transition: all .15s;
  }
  .wallet-btn:hover { background: var(--bg-hover); border-color: var(--accent); }
  .wallet-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
  .nav-chain {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 12px; cursor: pointer;
    transition: all .15s; white-space: nowrap;
  }
  .nav-chain:hover { border-color: var(--accent); color: var(--text-primary); }
  .nav-chain .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

  /* PAGE CONTAINER */
  .page { display: none; flex: 1; }
  .page.active { display: block; }
  .container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
  .container-sm { max-width: 520px; margin: 0 auto; padding: 32px 24px; }
  .container-md { max-width: 800px; margin: 0 auto; padding: 32px 24px; }

  /* ============================================================
     TYPOGRAPHY
  ============================================================ */
  .page-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
  .page-subtitle { color: var(--text-secondary); font-size: 13px; margin-bottom: 24px; }
  h3 { font-size: 15px; font-weight: 600; }
  h4 { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }

  /* ============================================================
     CARDS
  ============================================================ */
  .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
  }
  .card-sm { padding: 16px; }
  .card + .card { margin-top: 12px; }

  /* STAT CARDS */
  .stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
  .stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .stat-grid-5 { grid-template-columns: repeat(5, 1fr); }
  .stat-grid-2x2 { grid-template-columns: repeat(2, 1fr); }
  .stat-value-oracle { color: #60a5fa; }
  .value-compare { display: flex; flex-direction: column; gap: 2px; }
  .value-compare-sub { font-size: 11px; color: var(--text-secondary); font-weight: 400; }
  .cargo-value-compare {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center;
    margin-top: 10px;
  }
  .cargo-value-side { text-align: center; min-width: 0; }
  .cargo-value-side .cargo-value-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .35px; margin-bottom: 6px; }
  .cargo-value-side .cargo-value-num { font-size: 20px; font-weight: 700; line-height: 1.2; }
  .cargo-value-side.initial .cargo-value-num { color: var(--text-primary); }
  .cargo-value-side.oracle .cargo-value-num { color: #60a5fa; }
  .cargo-value-mid {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 0 4px; color: var(--text-muted); font-size: 11px;
  }
  .cargo-value-delta {
    font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: var(--radius);
    background: var(--bg-card2); margin-top: 10px; text-align: center;
  }
  .cargo-value-compare-card { border-color: rgba(96,165,250,.25); }
  .cargo-value-compare-inline {
    background: var(--bg-card2); border: 1px solid var(--border-light);
    border-radius: var(--radius); padding: 12px; margin-bottom: 12px;
  }
  .cargo-value-compare-inline .cargo-value-side .cargo-value-num { font-size: 16px; }
  .oracle-tag { font-size: 10px; color: #60a5fa; font-weight: 500; }

  /* jNFT isolation & account policy */
  .policy-card { background: var(--bg-card2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px; }
  .policy-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
  .isolation-flow { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 12px 0; }
  .isolation-node {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 10px 14px; text-align: center; min-width: 100px; font-size: 12px;
  }
  .isolation-node.danger { border-color: var(--red); background: var(--red-bg); }
  .isolation-node.safe { border-color: var(--green); }
  .isolation-arrow { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
  .policy-rules { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
  .policy-rule { display: flex; gap: 10px; padding: 10px 12px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border-light); }
  .policy-rule-icon { flex-shrink: 0; }
  .account-policy-banner {
    display: none; padding: 14px 16px; border-radius: var(--radius-lg); margin-bottom: 16px;
    font-size: 13px; border: 1px solid;
  }
  .account-policy-banner.visible { display: flex; align-items: flex-start; gap: 10px; }
  .account-policy-banner.warn { background: var(--yellow-bg); border-color: rgba(210,153,34,.4); color: var(--yellow); }
  .account-policy-banner.danger { background: var(--red-bg); border-color: rgba(248,81,73,.4); color: var(--red); }
  .account-policy-banner.info { background: var(--accent-light); border-color: rgba(37,99,235,.3); color: #60a5fa; }
  .demo-policy-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
  .demo-policy-btn { padding: 4px 10px; font-size: 11px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--bg-base); color: var(--text-secondary); cursor: pointer; }
  .demo-policy-btn.active { border-color: var(--accent); color: #60a5fa; background: var(--accent-light); }

  /* 功能说明文档页 */
  .guide-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
  .guide-index-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 14px; cursor: pointer;
    transition: border-color .15s;
  }
  .guide-index-card:hover { border-color: var(--accent); }
  .guide-index-card .guide-index-icon { font-size: 24px; margin-bottom: 8px; }
  .guide-index-card h4 { font-size: 13px; margin-bottom: 4px; }
  .guide-doc-section {
    scroll-margin-top: 80px; padding-top: 8px; margin-bottom: 28px;
    border-top: 1px solid var(--border); padding-top: 20px;
  }
  .guide-doc-section:first-of-type { border-top: none; padding-top: 0; }
  .guide-doc-section h3 { font-size: 16px; margin-bottom: 12px; }
  .md-hint {
    font-size: 11px; color: var(--text-muted); padding: 8px 12px;
    background: var(--bg-card2); border-radius: var(--radius); margin-bottom: 20px;
  }
  .jnft-grid { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }
  .jnft-unit-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px 20px;
  }
  .jnft-unit-card.isolated { border-left: 3px solid var(--purple); }
  .jnft-unit-card.status-warn { border-left-color: var(--yellow); }
  .jnft-unit-card.status-danger { border-left-color: var(--red); }
  .jnft-project-section {
    margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-light);
  }
  .jnft-project-section-title {
    font-size: 12px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: .4px; margin-bottom: 12px;
  }
  .jnft-project-risk .risk-panel { grid-template-columns: 120px 1fr; gap: 14px; }
  .jnft-project-risk .health-number { font-size: 28px; }
  .jnft-project-formula {
    font-size: 10px; color: var(--text-muted); line-height: 1.6; margin-top: 10px;
  }
  .jnft-unit-badge { font-size: 10px; color: var(--purple); margin-bottom: 8px; }
  .jnft-card-summary {
    display:grid; grid-template-columns: repeat(4, 1fr); gap:10px;
    padding:12px; background: var(--bg-card2);
    border-radius: var(--radius); margin-top: 8px;
  }
  .jnft-card-summary > div { min-width:0; }
  .jnft-card-summary .lbl { font-size:11px; color: var(--text-muted); margin-bottom: 4px; }
  .jnft-card-summary .val { font-size:16px; font-weight:700; line-height:1.2; }
  .jnft-card-summary .sub { font-size:11px; color: var(--text-muted); margin-top:2px; }
  .jnft-card-detail { display:none; margin-top: 14px; }
  .jnft-card-detail.open { display:block; }
  .jnft-card-toggle {
    background: transparent; border:1px solid var(--border);
    color: var(--text-secondary); border-radius: var(--radius);
    padding: 4px 12px; font-size:12px; cursor:pointer;
    display:inline-flex; align-items:center; gap:6px;
  }
  .jnft-card-toggle:hover { background: var(--bg-hover); color: var(--text); }
  .jnft-card-toggle .chev { transition: transform .2s; display:inline-block; }
  .jnft-card-toggle.open .chev { transform: rotate(180deg); }
  /* 提单申请 · 进度时间线 */
  .bill-progress-list { list-style:none; padding:0; margin:0; position: relative; }
  .bill-progress-item {
    position:relative; padding: 0 0 18px 32px; display:flex; flex-direction:column;
  }
  .bill-progress-item:not(:last-child)::before {
    content:''; position:absolute; left:12px; top:24px; bottom:0; width:2px;
    background: var(--border);
  }
  .bill-progress-item.bill-progress-done:not(:last-child)::before { background: #22c55e; }
  .bp-dot {
    position:absolute; left:0; top:0; width:24px; height:24px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-size:13px; font-weight:700;
    background: var(--bg-card2); border:2px solid var(--border); color: var(--text-muted);
  }
  .bill-progress-done .bp-dot { background: rgba(34,197,94,.18); border-color:#22c55e; color:#4ade80; }
  .bill-progress-active .bp-dot { background: var(--accent); border-color: var(--accent); color:#fff; box-shadow: 0 0 0 4px rgba(96,165,250,.18); }
  .bill-progress-rejected .bp-dot { background: rgba(239,68,68,.18); border-color:#ef4444; color:#f87171; }
  .bp-content { padding-top: 2px; }
  .bp-title { font-size:14px; font-weight:600; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .bp-title .bp-time { font-size:11px; color: var(--text-muted); font-weight:400; }
  .bp-desc { font-size:12px; color: var(--text-secondary); margin-top:4px; line-height:1.5; }
  /* 提单原件占位预览 */
  .bill-original-preview { padding: 4px; }
  .bop-page {
    background: #f5f1e6; color:#1a1810; border:1px solid #d6cfb8;
    border-radius: 6px; padding: 18px 20px; box-shadow: 0 4px 14px rgba(0,0,0,.4);
    font-family: 'Georgia', 'Times New Roman', serif; position: relative; overflow:hidden;
  }
  .bop-header {
    display:flex; justify-content:space-between; align-items:flex-end;
    border-bottom: 2px double #8b7e55; padding-bottom: 8px; margin-bottom: 12px;
  }
  .bop-stamp { font-size: 14px; font-weight: 700; letter-spacing: 1.5px; color:#5b4d22; }
  .bop-no { font-family: monospace; font-size: 13px; color:#1a1810; }
  .bop-grid {
    display:grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
  }
  .bop-lbl { font-size: 10px; color:#8b7e55; text-transform: uppercase; letter-spacing:.5px; }
  .bop-val { font-size: 13px; color:#1a1810; }
  .bop-watermark {
    position:absolute; right:-30px; bottom:10px;
    font-size: 48px; color: rgba(139,126,85,.18); transform: rotate(-12deg);
    font-weight:700; letter-spacing: 4px; pointer-events:none;
  }
  /* 信息 Tab 表 */
  .bill-info-table { width:100%; font-size: 13px; }
  .bill-info-table .bit-k { color: var(--text-muted); padding: 8px 12px 8px 0; width: 140px; vertical-align: top; }
  .bill-info-table .bit-v { padding: 8px 0; border-bottom: 1px solid var(--border-light); }
  .nft-token-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; font-weight: 700; color: #60a5fa; letter-spacing: .03em; }
  .nft-token-name { font-size: 13px; font-weight: 600; margin-top: 2px; }
  .jnft-placeholder { border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
  .flow-mini-steps {
    display:flex; flex-direction:column; gap:6px; text-align:left;
    margin: 10px auto 14px; max-width:360px;
    background: var(--bg-card2); border:1px solid var(--border);
    border-radius: var(--radius); padding: 12px 14px;
  }
  .flow-mini-step {
    display:flex; align-items:flex-start; gap:10px;
    font-size:12px; line-height:1.5; padding: 4px 0;
    position: relative;
  }
  .flow-mini-step + .flow-mini-step::before {
    content:''; position:absolute; left:11px; top:-6px; width:1px; height:8px;
    background: var(--border);
  }
  .flow-mini-step .fs-num {
    flex:0 0 22px; height:22px; border-radius:50%;
    background:var(--bg-card); color:var(--text-muted);
    border:1px solid var(--border);
    display:flex; align-items:center; justify-content:center;
    font-size:11px; font-weight:700;
  }
  .flow-mini-step.active .fs-num {
    background: var(--accent); border-color: var(--accent); color: #fff;
    box-shadow: 0 0 0 3px rgba(96,165,250,.18);
  }
  .flow-mini-step.done .fs-num {
    background: rgba(34,197,94,.18); border-color: #22c55e; color: #4ade80;
  }
  .flow-mini-step.done .fs-num::before { content:'✓'; }
  .flow-mini-step.done .fs-num span { display:none; }
  .flow-mini-step .fs-label { color: var(--text-secondary); }
  .flow-mini-step.active .fs-label { color: var(--text); font-weight:600; }
  .flow-mini-step.done .fs-label { color: var(--text-muted); }
  .flow-mini-step .fs-hint {
    display:block; font-size:11px; color:var(--text-muted); margin-top:2px;
    opacity:.85;
  }
  .flow-mini-step.done .fs-hint { opacity:.55; }
  .btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
  .stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px 20px;
  }
  .stat-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
  .stat-value { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
  .stat-sub { font-size: 11px; color: var(--text-secondary); }
  .stat-card-rich { display:flex; flex-direction:column; gap:10px; min-height:172px; padding:16px 18px; }
  .stat-card-rich .stat-label { margin-bottom: 0; }
  .stat-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .stat-card-pill {
    font-size: 10px; padding: 2px 8px; border-radius: 999px;
    font-weight: 600; letter-spacing: .2px;
  }
  .stat-card-rich .stat-value { font-size: 26px; line-height: 1.1; margin-bottom: 0; }
  .stat-card-rich .stat-rows {
    margin-top: auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
    padding-top: 10px; border-top: 1px dashed var(--border);
  }
  .stat-card-rich .stat-row { display:flex; flex-direction:column; gap:2px; min-width:0; }
  .stat-card-rich .stat-row-lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }
  .stat-card-rich .stat-row-val { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
  .stat-card-rich .stat-row-val.muted { color: var(--text-secondary); font-weight: 500; }
  .stat-card-rich .stat-sub { margin-top: 0; }

  /* ============================================================
     BUTTONS
  ============================================================ */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius);
    font-size: 13px; font-weight: 500; cursor: pointer;
    border: none; transition: all .15s; white-space: nowrap;
    position: relative; z-index: 2;
    pointer-events: auto;
  }
  .btn-primary { background: var(--accent); color: #fff; }
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-secondary { background: var(--bg-card2); color: var(--text-primary); border: 1px solid var(--border); }
  .btn-secondary:hover { background: var(--bg-hover); border-color: var(--text-muted); }
  .btn-success { background: var(--green-bg); color: var(--green); border: 1px solid var(--green); }
  .btn-success:hover { background: #0d3520; }
  .btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid var(--red); }
  .btn-danger:hover { background: #3d1515; }
  .btn-warning { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow); }
  .btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
  .btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }
  .btn-lg { padding: 12px 24px; font-size: 14px; width: 100%; border-radius: var(--radius-lg); }
  .btn-sm { padding: 5px 10px; font-size: 12px; }
  .btn:disabled { opacity: .4; cursor: not-allowed; }

  /* ============================================================
     FORMS
  ============================================================ */
  .form-group { margin-bottom: 16px; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .form-label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
  .form-label .req { color: var(--red); }
  .form-input, .form-select, .form-textarea {
    width: 100%; padding: 9px 12px;
    background: var(--bg-base); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-primary);
    font-size: 13px; transition: border-color .15s;
    font-family: inherit;
  }
  .form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
  }
  .form-textarea { resize: vertical; min-height: 80px; }
  .form-select { cursor: pointer; }
  .form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
  .input-group { position: relative; }
  .input-prefix {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-secondary); font-size: 13px; pointer-events: none;
    line-height: 1;
  }
  .input-prefix + .form-input { padding-left: 30px; }
  /* 金额输入框右侧单位（USDT / USD / HSK 等）*/
  .input-unit {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 12px; font-weight: 600;
    pointer-events: none; letter-spacing: .03em;
    background: var(--bg-card2);
    padding: 3px 8px; border-radius: 6px;
    border: 1px solid var(--border);
    min-width: 52px; text-align: center; z-index: 2;
  }
  .input-group.with-unit .form-input,
  .input-group:has(.input-unit) .form-input { padding-right: 86px; }
  /* 兼容旧 .input-suffix-btn（按钮型后缀，可点击）*/
  .input-suffix-btn {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  }
  /* 数字金额输入框：让数字居右更易看 */
  .form-input.amount-input {
    text-align: right; font-variant-numeric: tabular-nums;
    font-size: 18px; font-weight: 600; letter-spacing: .01em;
  }

  /* ============================================================
     BADGES & TAGS
  ============================================================ */
  .badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 20px;
    font-size: 11px; font-weight: 500;
  }
  .badge-green { background: var(--green-bg); color: var(--green); border: 1px solid rgba(63,185,80,.3); }
  .badge-yellow { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(210,153,34,.3); }
  .badge-red { background: var(--red-bg); color: var(--red); border: 1px solid rgba(248,81,73,.3); }
  .badge-orange { background: var(--orange-bg); color: var(--orange); border: 1px solid rgba(227,112,42,.3); }
  .badge-blue { background: var(--accent-light); color: #60a5fa; border: 1px solid rgba(37,99,235,.3); }
  .badge-purple { background: var(--purple-bg); color: var(--purple); border: 1px solid rgba(163,113,247,.3); }
  .badge-gray { background: var(--bg-card2); color: var(--text-secondary); border: 1px solid var(--border); }
  .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
  .dot-green { background: var(--green); }
  .dot-yellow { background: var(--yellow); }
  .dot-red { background: var(--red); }
  .dot-orange { background: var(--orange); }
  .dot-gray { background: var(--text-muted); }

  /* ============================================================
     PROGRESS & HEALTH
  ============================================================ */
  .progress-bar { height: 6px; background: var(--bg-card2); border-radius: 3px; overflow: hidden; }
  .progress-fill { height: 100%; border-radius: 3px; transition: width .3s; }
  .progress-green { background: var(--green); }
  .progress-yellow { background: var(--yellow); }
  .progress-red { background: var(--red); }
  .progress-blue { background: var(--accent); }

  .health-display {
    text-align: center; padding: 20px;
    background: var(--bg-card2); border-radius: var(--radius-lg);
  }
  .health-number { font-size: 40px; font-weight: 800; line-height: 1; }
  .health-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
  .health-safe { color: var(--green); }
  .health-warn { color: var(--yellow); }
  .health-danger { color: var(--red); }

  .risk-panel { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; }
  .risk-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
  .risk-metric {
    background: var(--bg-card2); border-radius: var(--radius); padding: 12px;
    border: 1px solid var(--border-light);
  }
  .risk-metric-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
  .risk-metric-value { font-size: 15px; font-weight: 700; }
  .risk-metric-sub { font-size: 10px; color: var(--text-secondary); margin-top: 4px; }
  .ltv-track {
    position: relative; height: 12px; background: var(--bg-card2);
    border-radius: 6px; overflow: visible; margin: 8px 0 6px;
  }
  .ltv-fill {
    height: 100%; border-radius: 6px; transition: width .3s, background .3s;
    max-width: 100%;
  }
  .ltv-marker {
    position: absolute; top: -4px; bottom: -4px; width: 2px;
    background: var(--red); z-index: 2;
  }
  .ltv-marker-label {
    position: absolute; top: 16px; transform: translateX(-50%);
    font-size: 10px; color: var(--red); white-space: nowrap;
  }
  .risk-legend { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); }
  .risk-formula {
    font-size: 11px; color: var(--text-muted); line-height: 1.7;
    background: var(--bg-card2); border-radius: var(--radius); padding: 12px; margin-top: 12px;
  }
  .risk-formula code { font-family: monospace; color: #60a5fa; font-size: 10px; }

  .jnft-risk-stack { display: flex; flex-direction: column; gap: 16px; }
  .jnft-risk-panel {
    background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px;
    border-left: 3px solid var(--purple);
  }
  .jnft-risk-panel.status-warn { border-left-color: var(--yellow); }
  .jnft-risk-panel.status-danger { border-left-color: var(--red); }
  .jnft-risk-panel-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
  }
  .jnft-risk-panel .risk-panel { grid-template-columns: 140px 1fr; gap: 16px; }
  .jnft-risk-panel .health-number { font-size: 32px; }
  .jnft-card-risk {
    background: var(--bg-card2); border-radius: var(--radius); padding: 12px; margin-bottom: 14px;
    border: 1px solid var(--border-light);
  }
  .jnft-card-risk-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
  .jnft-card-risk .ltv-track { height: 8px; margin: 6px 0 4px; }

  @media (max-width: 768px) {
    .risk-panel { grid-template-columns: 1fr; }
    .risk-metrics { grid-template-columns: 1fr; }
    .jnft-risk-panel .risk-panel { grid-template-columns: 1fr; }
  }

  /* ============================================================
     TABLES
  ============================================================ */
  .table-wrap { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  thead th {
    padding: 10px 12px; text-align: left;
    color: var(--text-secondary); font-size: 11px;
    text-transform: uppercase; letter-spacing: .5px;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
  }
  tbody td { padding: 12px; border-bottom: 1px solid var(--border-light); }
  tbody tr:last-child td { border-bottom: none; }
  tbody tr:hover { background: var(--bg-hover); }

  /* ============================================================
     STEPS
  ============================================================ */
  .steps { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
  .step-item { display: flex; align-items: center; gap: 8px; }
  .step-circle {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; flex-shrink: 0;
  }
  .step-circle.active { background: var(--accent); color: #fff; }
  .step-circle.done { background: var(--green); color: #fff; }
  .step-circle.pending { background: var(--bg-card2); color: var(--text-muted); border: 1px solid var(--border); }
  .step-label { font-size: 12px; white-space: nowrap; }
  .step-label.active { color: var(--text-primary); font-weight: 500; }
  .step-label.done { color: var(--green); }
  .step-label.pending { color: var(--text-muted); }
  .step-line { flex: 1; height: 1px; background: var(--border); min-width: 24px; }
  .step-line.done { background: var(--green); }

  /* ============================================================
     SPLIT LAYOUT
  ============================================================ */
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .split-3-2 { grid-template-columns: 3fr 2fr; }
  .split-2-3 { grid-template-columns: 2fr 3fr; }

  /* ============================================================
     NFT CARDS
  ============================================================ */
  .nft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
  .nft-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: border-color .15s, transform .15s;
    cursor: pointer;
  }
  .nft-card:hover { border-color: var(--accent); transform: translateY(-2px); }
  .nft-card.locked { opacity: .8; }
  .nft-cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #0d2040 0%, #1a1040 50%, #0d2030 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
  }
  .nft-cover-art {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: top center; display: block;
  }
  .nft-cover-shade {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 72%, rgba(0,0,0,.82) 100%);
  }
  .nft-cover-token {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    font-size: 10px; font-family: monospace; font-weight: 700;
    padding: 3px 8px; border-radius: 4px;
    background: rgba(0,0,0,.55); color: #fff; letter-spacing: .04em;
  }
  .nft-cover-bundle-tag {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    font-size: 10px; padding: 3px 8px; border-radius: 4px;
    background: rgba(163,113,247,.85); color: #fff; font-weight: 600;
  }
  .nft-cover-icon { font-size: 48px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); z-index: 1; }
  .nft-cover-route {
    position: absolute; bottom: 8px; left: 0; right: 0; z-index: 2;
    text-align: center; font-size: 11px; color: rgba(255,255,255,.85);
    font-family: monospace; text-shadow: 0 1px 4px rgba(0,0,0,.8);
  }
  .nft-cover-overlay {
    position: absolute; top: 8px; right: 8px; z-index: 2;
  }
  .jnft-project-cover {
    height: 116px; border-radius: var(--radius) var(--radius) 0 0;
    margin: -1px -1px 12px; overflow: hidden; position: relative;
  }
  .nft-art-thumb {
    width: 100%; max-width: 200px; height: 100px; object-fit: cover;
    border-radius: var(--radius); border: 1px solid var(--border);
  }
  .bundle-select-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px; margin-top: 12px;
  }
  .bundle-select-card {
    background: var(--bg-card2); border: 2px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
    position: relative;
  }
  .bundle-select-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
  .bundle-select-card-pick {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 6px; background: rgba(0,0,0,0.55);
    border-radius: 999px; cursor: pointer;
  }
  .bundle-select-card-pick input { width: 14px; height: 14px; accent-color: var(--accent); }
  .bundle-select-card .nft-cover { height: 100px; }
  .bundle-distribute-table { width: 100%; font-size: 12px; margin-top: 12px; border-collapse: collapse; }
  .bundle-distribute-table th, .bundle-distribute-table td {
    padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border);
  }
  .bundle-distribute-table th { color: var(--text-muted); font-weight: 500; }
  .bundle-distribute-table tfoot td { padding-top: 10px; }
  .bundle-comp-line { padding: 3px 0; line-height: 1.45; }
  .bundle-comp-line + .bundle-comp-line { border-top: 1px dashed var(--border); }

  /* NFT 证书风格抽屉 */
  .nft-cert {
    padding: 14px 4px 4px;
    background:
      linear-gradient(180deg, rgba(124,58,237,.06) 0%, transparent 40%),
      repeating-linear-gradient(45deg, rgba(124,58,237,.02) 0 6px, transparent 6px 12px);
    border-radius: var(--radius);
  }
  .nft-cert-head {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border: 1px solid rgba(124,58,237,.4);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(124,58,237,.12) 0%, rgba(56,189,248,.06) 100%);
    position: relative; overflow: hidden;
  }
  .nft-cert-head::before {
    content: 'TRADEGO · NFT CERTIFICATE'; position: absolute; right: -20px; bottom: -22px;
    font-size: 36px; font-weight: 800; color: rgba(124,58,237,.06);
    letter-spacing: 1px; transform: rotate(-8deg);
    white-space: nowrap; pointer-events: none;
  }
  .nft-cert-stamp {
    width: 42px; height: 42px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    background: radial-gradient(circle, rgba(124,58,237,.3), rgba(124,58,237,.05));
    border: 2px solid rgba(196,181,253,.6); border-radius: 50%;
  }
  .nft-cert-titles { flex: 1; min-width: 0; }
  .nft-cert-id {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 18px; font-weight: 700; color: var(--text-primary); letter-spacing: 0.5px;
  }
  .nft-cert-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

  .nft-cert-kpis {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    margin-bottom: 14px;
  }
  .nft-cert-kpis > div {
    padding: 8px 10px; background: var(--bg-card2);
    border: 1px solid var(--border); border-radius: 8px;
  }
  .nft-cert-kpi-lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }
  .nft-cert-kpi-val { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-top: 2px; }

  .nft-cert-section {
    margin: 14px 0; padding: 12px 14px;
    background: var(--bg-card2); border: 1px solid var(--border); border-radius: var(--radius);
  }
  .nft-cert-section-title {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    padding-bottom: 6px; border-bottom: 1px dashed var(--border);
  }
  .nft-cert-trail { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
  .nft-cert-trail-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 6px 0;
  }
  .nft-cert-trail-dot {
    width: 24px; height: 24px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    border-radius: 50%; border: 1.5px solid var(--border);
    background: var(--bg-card);
  }
  .nft-cert-trail-item.ok .nft-cert-trail-dot { border-color: var(--green); color: var(--green); }
  .nft-cert-trail-item.warn .nft-cert-trail-dot { border-color: var(--yellow); color: var(--yellow); }
  .nft-cert-trail-item.pending .nft-cert-trail-dot { color: var(--text-muted); }
  .nft-cert-trail-title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
  .nft-cert-trail-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

  .nft-cert-sig {
    margin-top: 16px; padding: 10px 14px;
    border: 1px dashed rgba(124,58,237,.3); border-radius: var(--radius);
    font-size: 11px; color: var(--text-muted);
    background: rgba(124,58,237,.04);
    text-align: center; line-height: 1.6;
  }
  .demo-chip {
    display: inline-block; font-size: 9px; padding: 1px 5px; margin-left: 4px;
    border-radius: 3px; background: var(--bg-card2); color: var(--text-muted);
    border: 1px dashed var(--border); vertical-align: middle;
  }
  .notif-panel {
    display: none; position: absolute; top: 100%; right: 0; margin-top: 8px;
    width: 380px; max-width: calc(100vw - 32px);
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow); z-index: 150;
    max-height: 540px; display: none; flex-direction: column; overflow: hidden;
  }
  .notif-panel.open { display: flex; }
  .notif-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--border);
    background: var(--bg-card2);
  }
  .notif-panel-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
  .notif-panel-actions { display: flex; gap: 6px; }
  .notif-panel-actions .btn { padding: 4px 8px; font-size: 11px; }
  .notif-panel-chips {
    display: flex; gap: 6px; padding: 8px 12px; flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
  }
  .notif-panel-chip {
    padding: 3px 10px; font-size: 11px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-card2); color: var(--text-secondary);
    cursor: pointer; transition: all .15s;
  }
  .notif-panel-chip:hover { background: var(--bg-hover); color: var(--text-primary); }
  .notif-panel-chip.active {
    background: rgba(0, 122, 255, 0.12); border-color: var(--blue); color: var(--blue); font-weight: 600;
  }
  .notif-panel-list { flex: 1; overflow-y: auto; }
  .notif-panel-item {
    display: flex; gap: 10px;
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    font-size: 12px; cursor: pointer;
    background: rgba(59,130,246,0.04);
    transition: background .15s;
  }
  .notif-panel-item:hover { background: var(--bg-hover); }
  .notif-panel-item:last-child { border-bottom: none; }
  .notif-panel-item.read { background: transparent; opacity: 0.7; }
  .notif-panel-icon { font-size: 18px; flex-shrink: 0; line-height: 1.2; }
  .notif-panel-body { flex: 1; min-width: 0; }
  .notif-panel-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
  .notif-panel-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex-shrink: 0;
  }
  .notif-panel-cat { font-size: 10px; color: var(--text-muted); padding: 1px 6px; border-radius: 3px; background: var(--bg-card2); border: 1px solid var(--border); flex-shrink: 0; }
  .notif-panel-name { font-weight: 600; font-size: 12.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
  .notif-panel-detail { font-size: 11.5px; color: var(--text-secondary); line-height: 1.45; margin-bottom: 2px; max-height: 2.9em; overflow: hidden; }
  .notif-panel-meta { font-size: 10.5px; color: var(--text-muted); opacity: 0.85; }
  .notif-panel-empty { padding: 36px 16px; text-align: center; color: var(--text-muted); }
  .notif-panel-footer { padding: 8px 12px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--text-muted); background: var(--bg-card2); }
  .notif-panel-more { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--accent); font-size: 11px; padding: 2px 4px; }
  .notif-panel-more:hover { text-decoration: underline; }
  .nav-badge-wrap { position: relative; }
  .nft-cover-share-tag {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    font-size: 10px; padding: 3px 8px; border-radius: 4px;
    background: rgba(37,99,235,.88); color: #fff; font-weight: 700;
  }
  .nft-body { padding: 14px; }
  .nft-id { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
  .nft-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; font-family: monospace; }
  .nft-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
  .nft-meta-row { display: flex; justify-content: space-between; font-size: 12px; }
  .nft-meta-label { color: var(--text-secondary); }
  .nft-meta-value { color: var(--text-primary); font-weight: 500; }
  .nft-actions { display: flex; gap: 8px; position: relative; z-index: 3; }

  /* jNFT Special */
  .jnft-cover {
    background: linear-gradient(135deg, #1a0f2e 0%, #0d1a3a 50%, #1a1040 100%);
  }
  .jnft-health-bar {
    margin: 8px 0;
    height: 4px; border-radius: 2px;
    background: var(--bg-card2); overflow: hidden;
  }

  /* ============================================================
     ALERT BANNERS
  ============================================================ */
  .alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius);
    font-size: 13px; margin-bottom: 16px;
  }
  .alert-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
  .alert-warning { background: var(--yellow-bg); border: 1px solid rgba(210,153,34,.3); color: var(--yellow); }
  .alert-danger { background: var(--red-bg); border: 1px solid rgba(248,81,73,.3); color: var(--red); }
  .alert-success { background: var(--green-bg); border: 1px solid rgba(63,185,80,.3); color: var(--green); }
  .alert-info { background: var(--accent-light); border: 1px solid rgba(37,99,235,.3); color: #60a5fa; }

  /* ============================================================
     MODAL
  ============================================================ */
  .modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 20px;
    pointer-events: none;
  }
  .modal-overlay.open { display: flex; pointer-events: auto; }
  .modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); width: 100%; max-width: 480px;
    box-shadow: var(--shadow); animation: slideUp .2s ease;
    max-height: 90vh; display: flex; flex-direction: column;
  }
  .modal-lg { max-width: 760px; }
  .modal-body { overflow-y: auto; }
  /* KYC Detail */
  .kyc-detail-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .kyc-detail-grid .kyc-section { padding: 12px 14px; background: var(--bg-card2); border:1px solid var(--border); border-radius: var(--radius); }
  .kyc-detail-grid .kyc-section.full { grid-column: 1 / -1; }
  .kyc-section-title { font-size: 12px; font-weight: 600; letter-spacing:.2px; color: var(--text-primary); margin-bottom: 8px; display:flex; align-items:center; gap:6px; }
  .kyc-section-title .kst-icon { font-size: 14px; }
  .kyc-field-row { display:flex; justify-content:space-between; gap:12px; padding: 5px 0; font-size: 12.5px; border-bottom: 1px dashed transparent; }
  .kyc-field-row + .kyc-field-row { border-top: 1px dashed var(--border); }
  .kyc-field-key { color: var(--text-muted); flex-shrink: 0; }
  .kyc-field-val { color: var(--text-primary); text-align: right; word-break: break-word; }
  .kyc-doc-item { display:flex; align-items:center; gap:10px; padding: 6px 0; font-size: 12.5px; }
  .kyc-doc-item + .kyc-doc-item { border-top: 1px dashed var(--border); }
  .kyc-doc-icon { width:28px; height:28px; border-radius:6px; background: var(--bg-card); border:1px solid var(--border); display:flex;align-items:center;justify-content:center; font-size:13px; flex-shrink:0; }
  .kyc-risk-row { display:flex; align-items:flex-start; gap:10px; padding: 6px 0; font-size: 12.5px; }
  .kyc-risk-row + .kyc-risk-row { border-top: 1px dashed var(--border); }
  .kyc-risk-status { font-size:11px; padding: 2px 8px; border-radius: 999px; font-weight:600; white-space:nowrap; flex-shrink:0; }
  .kyc-risk-status.ok { background: var(--green-bg); color: var(--green); border:1px solid rgba(63,185,80,.3); }
  .kyc-risk-status.warn { background: rgba(245,158,11,.12); color: var(--yellow); border:1px solid rgba(245,158,11,.3); }
  .kyc-risk-status.pending { background: var(--accent-light); color: #60a5fa; border:1px solid rgba(96,165,250,.3); }
  .kyc-risk-status.fail { background: var(--red-bg); color: var(--red); border:1px solid rgba(248,81,73,.3); }
  .kyc-risk-note { color: var(--text-secondary); }
  @media (max-width: 720px) {
    .kyc-detail-grid { grid-template-columns: 1fr; }
  }
  @keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
  .modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
  }
  .modal-title { font-size: 15px; font-weight: 600; }
  .modal-close {
    width: 28px; height: 28px; border-radius: var(--radius);
    background: none; border: none; color: var(--text-secondary);
    cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
  }
  .modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
  .modal-body { padding: 20px; }
  .modal-footer {
    padding: 16px 20px; border-top: 1px solid var(--border);
    display: flex; gap: 10px; justify-content: flex-end;
  }

  /* ============================================================
     DRAWER
  ============================================================ */
  .drawer-overlay {
    display: none; position: fixed; inset: 0; z-index: 150;
    background: rgba(0,0,0,.5);
    pointer-events: none;
  }
  .drawer-overlay.open { display: block; pointer-events: auto; }
  .drawer {
    position: fixed; top: 0; right: -420px; bottom: 0; z-index: 151;
    width: 400px; background: var(--bg-card);
    border-left: 1px solid var(--border);
    transition: right .25s ease; overflow-y: auto;
    pointer-events: none;
  }
  .drawer.open { right: 0; pointer-events: auto; }
  .drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--bg-card); z-index: 1;
  }
  .drawer-body { padding: 20px; }
  .drawer-section { margin-bottom: 20px; }
  .drawer-section-title {
    font-size: 11px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 10px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
  }
  .drawer-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 6px 0; }
  .drawer-key { font-size: 12px; color: var(--text-secondary); }
  .drawer-val { font-size: 12px; color: var(--text-primary); font-weight: 500; text-align: right; max-width: 60%; word-break: break-all; }

  /* ============================================================
     TABS
  ============================================================ */
  .tabs { display: flex; gap: 2px; background: var(--bg-card2); border-radius: var(--radius); padding: 3px; margin-bottom: 20px; }
  .tab {
    flex: 1; padding: 7px 12px; border-radius: 6px;
    font-size: 13px; cursor: pointer; text-align: center;
    color: var(--text-secondary); border: none; background: none;
    transition: all .15s;
    position: relative; z-index: 1;
    pointer-events: auto;
  }
  .tab.active { background: var(--bg-card); color: var(--text-primary); font-weight: 500; }
  .tab-content { display: none; }
  .tab-content.active { display: block; }

  /* ============================================================
     DIVIDER
  ============================================================ */
  .divider { height: 1px; background: var(--border); margin: 16px 0; }
  .divider-label {
    display: flex; align-items: center; gap: 12px;
    color: var(--text-muted); font-size: 11px; margin: 16px 0;
  }
  .divider-label::before, .divider-label::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
  }

  /* ============================================================
     MISC UTILITIES
  ============================================================ */
  .flex { display: flex; }
  .flex-col { flex-direction: column; }
  .items-center { align-items: center; }
  .items-start { align-items: flex-start; }
  .justify-between { justify-content: space-between; }
  .justify-end { justify-content: flex-end; }
  .gap-4 { gap: 4px; }
  .gap-8 { gap: 8px; }
  .gap-12 { gap: 12px; }
  .gap-16 { gap: 16px; }
  .gap-20 { gap: 20px; }
  .mb-4 { margin-bottom: 4px; }
  .mb-8 { margin-bottom: 8px; }
  .mb-12 { margin-bottom: 12px; }
  .mb-16 { margin-bottom: 16px; }
  .mb-20 { margin-bottom: 20px; }
  .mb-24 { margin-bottom: 24px; }
  .mt-8 { margin-top: 8px; }
  .mt-12 { margin-top: 12px; }
  .mt-16 { margin-top: 16px; }
  .text-sm { font-size: 12px; }
  .text-xs { font-size: 11px; }
  .text-lg { font-size: 16px; }
  .text-xl { font-size: 18px; }
  .text-2xl { font-size: 22px; }
  .text-muted { color: var(--text-secondary); }
  .text-green { color: var(--green); }
  .text-red { color: var(--red); }
  .text-yellow { color: var(--yellow); }
  .text-blue { color: #60a5fa; }
  .text-orange { color: var(--orange); }
  .font-mono { font-family: monospace; }
  .font-bold { font-weight: 700; }
  .font-semibold { font-weight: 600; }
  .text-right { text-align: right; }
  .text-center { text-align: center; }
  .w-full { width: 100%; }
  .rounded { border-radius: var(--radius); }
  .rounded-lg { border-radius: var(--radius-lg); }
  .bg-card2 { background: var(--bg-card2); }
  .border { border: 1px solid var(--border); }
  .p-12 { padding: 12px; }
  .p-16 { padding: 16px; }
  .p-20 { padding: 20px; }

  /* ============================================================
     LEDGER CONNECT SPECIAL
  ============================================================ */
  .ledger-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px;
    text-align: center; max-width: 400px; margin: 0 auto;
  }
  .ledger-icon { font-size: 56px; margin-bottom: 16px; }
  .ledger-steps { text-align: left; margin: 20px 0; }
  .ledger-step {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 8px 0; font-size: 13px; color: var(--text-secondary);
  }
  .ledger-step-num {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--bg-card2); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; flex-shrink: 0; color: var(--text-muted);
  }
  .ledger-step-num.done { background: var(--green-bg); border-color: var(--green); color: var(--green); }

  /* ============================================================
     LOAN DETAIL ROWS
  ============================================================ */
  .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .detail-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid var(--border-light);
    font-size: 13px;
  }
  .detail-row:last-child { border-bottom: none; }
  .detail-key { color: var(--text-secondary); }
  .detail-val { font-weight: 500; }

  /* ============================================================
     UPLOAD ZONE
  ============================================================ */
  .upload-zone {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 24px; text-align: center; cursor: pointer;
    transition: all .15s; color: var(--text-secondary);
    position: relative; z-index: 1;
  }
  .upload-zone:hover { border-color: var(--accent); color: var(--text-primary); background: var(--accent-light); }
  .upload-zone.disabled { cursor: not-allowed; opacity: 0.7; background: var(--bg-secondary); }
  .upload-zone.disabled:hover { border-color: var(--border); color: var(--text-secondary); background: var(--bg-secondary); }
  .upload-icon { font-size: 24px; margin-bottom: 8px; }

  /* 折叠表单组（提单录入扩展字段） */
  .form-collapsible { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
  .form-collapsible[open] { padding-bottom: 14px; }
  .form-collapsible summary { cursor: pointer; padding: 4px 0; user-select: none; font-size: 13px; }
  .form-collapsible summary::marker { color: var(--text-muted); }

  /* 数量 + 单位下拉组合（input-group 内嵌 select） */
  .input-group .input-suffix-select {
    border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important;
    border-left: 1px solid var(--border); flex: 0 0 auto;
  }

  /* ============================================================
     CHECKLIST
  ============================================================ */
  .checklist { display: flex; flex-direction: column; gap: 8px; }
  .check-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
  .check-box {
    width: 16px; height: 16px; border-radius: 4px;
    border: 1.5px solid var(--border); background: var(--bg-base);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; transition: all .15s;
  }
  .check-box.checked { background: var(--green); border-color: var(--green); }
  .check-box.checked::after { content: '✓'; color: #fff; font-size: 10px; font-weight: 700; }

  /* ============================================================
     RADIO GROUP
  ============================================================ */
  .radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
  .radio-btn {
    padding: 6px 14px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--bg-base);
    color: var(--text-secondary); font-size: 13px; cursor: pointer;
    transition: all .15s; user-select: none;
    position: relative; z-index: 1;
  }
  .radio-btn.selected { border-color: var(--accent); background: var(--accent-light); color: #60a5fa; }

  /* ============================================================
     AMOUNT QUICK BTNS
  ============================================================ */
  .quick-btns { display: flex; gap: 6px; margin-top: 8px; }
  .quick-btn {
    padding: 4px 10px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--bg-card2);
    color: var(--text-secondary); font-size: 11px; cursor: pointer;
    transition: all .15s;
    position: relative; z-index: 2;
  }
  .quick-btn:hover { border-color: var(--accent); color: #60a5fa; background: var(--accent-light); }
  .quick-btn.active {
    border-color: var(--accent); color: #fff;
    background: var(--accent); font-weight: 600;
  }
  .quick-btn.active:hover { background: var(--accent); color: #fff; }

  /* ============================================================
     TIMELINE
  ============================================================ */
  .timeline { display: flex; flex-direction: column; gap: 0; }
  .timeline-item { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
  .timeline-item:last-child { padding-bottom: 0; }
  .timeline-dot {
    width: 10px; height: 10px; border-radius: 50%;
    flex-shrink: 0; margin-top: 5px;
  }
  .timeline-line {
    position: absolute; left: 4px; top: 15px; bottom: 0;
    width: 2px; background: var(--border);
  }
  .timeline-item:last-child .timeline-line { display: none; }
  .timeline-content { flex: 1; }
  .timeline-title { font-size: 13px; font-weight: 500; }
  .timeline-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

  /* ============================================================
     SIGN MODAL STAGES
  ============================================================ */
  .sign-stage { display: none; }
  .sign-stage.active { display: block; }
  .sign-center { text-align: center; padding: 20px 0; }
  .sign-icon { font-size: 48px; margin-bottom: 12px; }
  .sign-spinner {
    width: 48px; height: 48px; border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    animation: spin .8s linear infinite;
    margin: 0 auto 12px;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .tx-hash {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-card2); border-radius: var(--radius);
    padding: 8px 12px; font-family: monospace; font-size: 12px;
    color: var(--text-secondary); margin-top: 8px;
  }
  .confirm-progress { margin-top: 12px; }
  .confirm-progress .progress-bar { height: 4px; }

  /* ============================================================
     链上信息卡片 / 地址徽章（Blockscout 跳转）
  ============================================================ */
  .addr-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(59, 130, 246, .12); color: var(--blue, #3b82f6);
    border: 1px solid rgba(59, 130, 246, .35); border-radius: 6px;
    padding: 2px 8px; font-size: 12px; text-decoration: none;
    transition: all .15s;
  }
  .addr-chip:hover { background: rgba(59, 130, 246, .22); border-color: var(--blue, #3b82f6); }
  .addr-chip-pending { background: rgba(156,163,175,.15); color: var(--text-muted); border-color: rgba(156,163,175,.35); }
  .addr-chip-icon { font-size: 10px; opacity: .7; }
  .tx-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(34, 197, 94, .12); color: var(--green, #22c55e);
    border: 1px solid rgba(34, 197, 94, .35); border-radius: 6px;
    padding: 2px 8px; font-size: 12px; text-decoration: none; font-family: monospace;
    transition: all .15s;
  }
  .tx-chip:hover { background: rgba(34, 197, 94, .22); }
  .onchain-card {
    background: linear-gradient(135deg, rgba(59,130,246,.08), rgba(124,58,237,.06));
    border: 1px solid rgba(59,130,246,.25); border-radius: var(--radius);
    padding: 12px 14px; margin: 12px 0;
  }
  .onchain-card-title {
    font-size: 12px; color: var(--blue, #3b82f6); font-weight: 600;
    display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  }
  .onchain-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 0; font-size: 13px;
  }
  .onchain-row + .onchain-row { border-top: 1px dashed rgba(255,255,255,.06); }
  .onchain-row .k { color: var(--text-muted); }
  .gas-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1500;
    background: linear-gradient(90deg, rgba(234,179,8,.95), rgba(245,158,11,.95));
    color: #1f1300; padding: 8px 16px; font-size: 13px; font-weight: 500;
    text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.2);
    display: none;
  }
  .gas-banner.show { display: block; }
  .gas-banner a { color: #1f1300; text-decoration: underline; margin-left: 8px; }
  .chain-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(34, 197, 94, .12); color: var(--green, #22c55e);
    border: 1px solid rgba(34, 197, 94, .35); border-radius: 999px;
    padding: 2px 10px; font-size: 11px;
  }
  .chain-badge.warn { background: rgba(239, 68, 68, .12); color: var(--red, #ef4444); border-color: rgba(239,68,68,.35); }
  .footer-chain {
    position: fixed; right: 16px; bottom: 16px; z-index: 800;
    background: var(--bg-card, #1a1f2e); border: 1px solid var(--border, rgba(255,255,255,.1));
    border-radius: 10px; padding: 8px 12px; font-size: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    display: none; align-items: center; gap: 10px;
  }
  .footer-chain.show { display: flex; }
  /* 弹窗打开时隐藏右下角链状态徽章，避免遮挡 / 穿透 */
  body:has(.modal-overlay.open) .footer-chain.show { display: none; }
  .footer-chain .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green, #22c55e); }
  .footer-chain .hsk { color: var(--yellow, #eab308); font-weight: 600; }
  .footer-chain a { color: var(--text-secondary); text-decoration: none; }
  .footer-chain a:hover { color: var(--blue, #3b82f6); }
  /* 移动端：footer-chain 缩为图标 + 链 id；点击展开 */
  @media (max-width: 720px) {
    .footer-chain { right: 8px; bottom: 8px; padding: 6px 8px; font-size: 11px; gap: 6px; }
    .footer-chain .hide-on-mobile { display: none !important; }
    /* 表格小屏改 card-list */
    .table-wrap.responsive table thead { display: none; }
    .table-wrap.responsive table, .table-wrap.responsive table tbody, .table-wrap.responsive table tr, .table-wrap.responsive table td {
      display: block; width: 100%;
    }
    .table-wrap.responsive table tr {
      background: var(--bg-card, #1a1f2e); border: 1px solid var(--border, rgba(255,255,255,.08));
      border-radius: 8px; margin-bottom: 8px; padding: 8px 10px;
    }
    .table-wrap.responsive table td { border: none; padding: 4px 0; display: flex; justify-content: space-between; gap: 8px; }
    .table-wrap.responsive table td::before {
      content: attr(data-th); color: var(--text-muted, #888); font-size: 11px; font-weight: 600;
    }
    /* 最小字号 / 触控点击区 */
    body { -webkit-text-size-adjust: 100%; }
    .btn { min-height: 36px; }
    .btn-sm { min-height: 32px; }
    .form-input, .form-select, .form-textarea { font-size: 16px; }
    button, a { -webkit-tap-highlight-color: rgba(59,130,246,.18); }
  }
  /* 焦点可见 + 焦点陷阱样式 */
  .modal-overlay.open { outline: none; }
  .modal:focus { outline: 2px solid var(--blue, #3b82f6); outline-offset: 4px; }
  *:focus-visible { outline: 2px solid var(--blue, #3b82f6); outline-offset: 2px; }

  /* ============================================================
     PAGE: LOGIN
  ============================================================ */
  .login-page {
    min-height: 100vh; display: flex; align-items: stretch; justify-content: center;
    background:
      radial-gradient(ellipse 60% 50% at 15% 0%, rgba(37,99,235,.18) 0%, transparent 60%),
      radial-gradient(ellipse 50% 50% at 90% 100%, rgba(124,58,237,.14) 0%, transparent 60%),
      var(--bg);
  }
  .login-wrap { width: 100%; max-width: 400px; padding: 24px; align-self: center; }
  /* Two-column hero layout (login page only) */
  #page-login .login-page {
    align-items: stretch; padding: 0;
    display: flex; flex-direction: column;
  }
  .login-topbar {
    width: 100%; padding: 16px 32px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
    border-bottom: 1px solid rgba(255,255,255,.04);
    backdrop-filter: blur(6px);
    background: rgba(11,16,32,.55);
    position: sticky; top: 0; z-index: 50;
  }
  .login-topbar-brand { display:flex; align-items:center; gap:12px; }
  .login-topbar-brand .login-logo-icon {
    width:38px; height:38px; border-radius: 10px; font-size: 18px; margin: 0;
  }
  .login-topbar-brand .login-topbar-name {
    font-size: 15px; font-weight: 700; line-height: 1.1; color: var(--text-primary);
  }
  .login-topbar-brand .login-topbar-tag {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
  }
  .login-topbar-brand .login-topbar-powered {
    font-size: 10px; color: var(--text-secondary); margin-top: 3px;
    letter-spacing: .2px; opacity: .85;
  }
  .login-hero-powered {
    margin-top: 14px; font-size: 11.5px; color: var(--text-secondary);
    letter-spacing: .2px;
  }
  .login-hero-powered strong { color: var(--text-primary); font-weight: 600; }
  .login-link {
    font-size: 13px; color: var(--accent); cursor: pointer; user-select: none;
  }
  .login-link:hover { text-decoration: underline; }
  .ga-code-input {
    text-align: center; letter-spacing: 8px; font-size: 20px;
    font-family: var(--font-mono, monospace); font-weight: 600;
  }
  .ga-qr-box {
    width: 148px; height: 148px; margin: 4px auto 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 4px;
    border: 1px dashed var(--border); border-radius: 10px;
    background:
      repeating-linear-gradient(45deg, var(--bg-card2) 0 6px, transparent 6px 12px),
      var(--bg-card);
    color: var(--text-secondary); font-size: 13px;
  }
  .ga-secret {
    text-align: center; font-size: 12.5px; color: var(--text-secondary);
    background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 10px; word-break: break-all;
  }
  .ga-secret .font-mono { color: var(--text-primary); letter-spacing: 1px; }
  .bundle-borrower-group {
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--bg-card2); padding: 14px 16px; margin-bottom: 16px;
  }
  .bundle-borrower-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
    padding-bottom: 10px; border-bottom: 1px solid var(--border);
  }
  .bundle-borrower-foot {
    margin-top: 12px; display: flex; justify-content: flex-end;
  }
  .login-topbar-tabs {
    display: inline-grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px;
    background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: 999px;
  }
  .login-topbar-tab {
    padding: 8px 18px; border-radius: 999px; cursor: pointer;
    font-size: 13px; font-weight: 500; text-align: center;
    color: var(--text-secondary); transition: all .2s;
    user-select: none; white-space: nowrap;
  }
  .login-topbar-tab.active { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -10px var(--accent); }
  .login-topbar-tab:not(.active):hover { color: var(--text-primary); }
  .login-shell {
    width: 100%; max-width: 1120px; margin: 0 auto;
    padding: 56px 24px 64px;
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px;
    align-items: center; align-self: center; flex: 1;
  }
  .login-hero { color: var(--text-primary); }
  .login-hero-brand { display:flex; align-items:center; gap:14px; margin-bottom:28px; }
  .login-hero-brand .login-logo-icon { width:48px; height:48px; border-radius: 12px; font-size: 22px; margin: 0; }
  .login-hero-brand h1 { font-size: 22px; font-weight: 700; line-height: 1.2; }
  .login-hero-brand p { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
  .login-hero-tagline {
    font-size: 30px; font-weight: 700; line-height: 1.25; margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 60%, #a78bfa 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .login-hero-sub {
    font-size: 14px; color: var(--text-secondary); line-height: 1.7;
    max-width: 460px; margin-bottom: 28px;
  }
  .login-hero-features { display: grid; gap: 14px; max-width: 520px; }
  .login-feature {
    display: grid; grid-template-columns: 40px 1fr; gap: 14px;
    padding: 14px 16px; background: rgba(20,28,46,.6);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    backdrop-filter: blur(6px);
    transition: border-color .2s, background .2s, transform .2s;
  }
  .login-feature:hover { border-color: rgba(96,165,250,.45); background: rgba(28,38,68,.7); transform: translateY(-1px); }
  .login-feature-icon {
    width:40px; height:40px; border-radius:10px;
    background: linear-gradient(135deg, rgba(37,99,235,.25), rgba(124,58,237,.25));
    display:flex;align-items:center;justify-content:center; font-size:18px;
    border:1px solid rgba(96,165,250,.25);
  }
  .login-feature-title { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
  .login-feature-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.55; }
  .login-hero-foot {
    margin-top: 28px; display:flex; gap: 16px; flex-wrap: wrap;
    font-size: 11px; color: var(--text-muted);
  }
  .login-hero-foot .login-hero-chip {
    display:inline-flex; align-items:center; gap:6px;
    padding: 5px 10px; border-radius: 999px;
    background: rgba(255,255,255,.03); border: 1px solid var(--border);
  }
  .login-form-col { max-width: 460px; width: 100%; justify-self: end; }
  /* 简化登录页：仅保留登录窗口，居中显示 */
  .login-shell.login-shell-simple { grid-template-columns: minmax(0, 460px); justify-content: center; }
  .login-shell.login-shell-simple .login-form-col { justify-self: center; }
  .login-role-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px;
    background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: 999px; margin-bottom: 18px;
  }
  .login-role-tab {
    padding: 9px 14px; border-radius: 999px; cursor: pointer;
    font-size: 13px; font-weight: 500; text-align: center;
    color: var(--text-secondary); transition: all .2s;
    user-select: none;
  }
  .login-role-tab.active { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -10px var(--accent); }
  .login-role-tab:not(.active):hover { color: var(--text-primary); }
  .login-card-clean { padding: 28px 28px 24px; }
  .login-card-clean h3 { font-size: 17px; }
  .login-card-clean .ledger-steps { margin: 16px 0 18px; }
  .login-card-clean .form-label { font-size: 11px; }
  .login-card-clean .form-select { font-size: 13px; }
  .login-demo-toggle {
    margin-top: 10px;
    font-size: 11px; color: var(--text-muted); cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
  }
  .login-demo-toggle:hover { color: var(--accent); }
  .login-demo-toggle .chev { transition: transform .2s; }
  .login-demo-toggle.open .chev { transform: rotate(180deg); }
  .login-admin-card {
    margin-top: 16px;
    border: 1px dashed rgba(96, 165, 250, .4);
    background: linear-gradient(180deg, rgba(37,99,235,.06), var(--bg-card));
  }
  .login-admin-card-head {
    display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px;
  }
  .login-admin-card .login-admin-icon { font-size: 28px; line-height: 1; }
  @media (max-width: 960px) {
    .login-shell { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px 40px; max-width: 520px; }
    .login-form-col { justify-self: stretch; }
    .login-hero-tagline { font-size: 24px; }
    .login-hero-features { max-width: none; }
    .login-topbar { padding: 12px 20px; gap: 12px; }
    .login-topbar-brand .login-topbar-tag { display: none; }
    .login-topbar-tab { padding: 7px 14px; font-size: 12px; }
  }
  .qa-section {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px 18px;
  }
  .help-qa-grid { display: flex; flex-direction: column; gap: 16px; }
  .qa-section-title {
    font-size: 14px; font-weight: 600; margin-bottom: 4px;
    display: flex; align-items: center; gap: 8px;
  }
  .qa-section-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 14px; }
  .qa-item { border-bottom: 1px solid var(--border); }
  .qa-item:last-child { border-bottom: none; }
  .qa-question {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 12px 0; background: none; border: none; cursor: pointer;
    color: var(--text-primary); font-size: 13px; font-weight: 500; text-align: left;
    font-family: inherit;
  }
  .qa-question:hover { color: var(--accent); }
  .qa-chevron {
    flex-shrink: 0; font-size: 10px; color: var(--text-muted);
    transition: transform .2s;
  }
  .qa-item.open .qa-chevron { transform: rotate(180deg); color: var(--accent); }
  .qa-answer {
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
    font-size: 12px; color: var(--text-secondary); line-height: 1.65;
  }
  .qa-item.open .qa-answer { max-height: 280px; padding-bottom: 12px; }
  .qa-answer p { margin: 0 0 8px; }
  .qa-answer p:last-child { margin-bottom: 0; }
  .qa-tag {
    display: inline-block; font-size: 10px; padding: 2px 6px; border-radius: 4px;
    background: var(--bg-card2); color: var(--text-muted); margin-right: 4px;
  }
  .login-logo { text-align: center; margin-bottom: 32px; }
  .login-logo-icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; margin: 0 auto 12px;
  }
  .login-logo h1 { font-size: 20px; font-weight: 700; }
  .login-logo p { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

  /* ============================================================
     REGISTER STEPS
  ============================================================ */
  .reg-progress { display: flex; margin-bottom: 32px; }
  .reg-step {
    flex: 1; text-align: center; position: relative;
    padding-top: 36px;
  }
  .reg-step::before {
    content: ''; position: absolute;
    top: 14px; left: 50%; right: -50%;
    height: 2px; background: var(--border);
    pointer-events: none;
  }
  .reg-step:last-child::before { display: none; }
  .reg-step.done::before { background: var(--green); }
  .reg-step-circle {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600;
    background: var(--bg-card2); border: 2px solid var(--border);
    color: var(--text-muted);
  }
  .reg-step.active .reg-step-circle { background: var(--accent); border-color: var(--accent); color: #fff; }
  .reg-step.done .reg-step-circle { background: var(--green); border-color: var(--green); color: #fff; }
  .reg-step-label { font-size: 11px; color: var(--text-muted); line-height: 1.3; padding: 0 2px; }
  .reg-step.active .reg-step-label { color: var(--text-primary); font-weight: 500; }
  .reg-step.done .reg-step-label { color: var(--green); }
  .reg-progress-wrap { overflow-x: auto; margin-bottom: 32px; padding-bottom: 4px; }
  .reg-progress-4 { min-width: 520px; }
  .reg-progress-4 .reg-step-circle { width: 26px; height: 26px; font-size: 11px; top: 0; }
  .reg-progress-4 .reg-step { padding-top: 34px; }
  .reg-progress-4 .reg-step::before { top: 13px; }
  .login-demo-hints {
    margin-top: 16px; padding: 12px; background: var(--bg-card2);
    border-radius: var(--radius); border: 1px dashed var(--border);
    font-size: 11px; color: var(--text-muted); line-height: 1.7;
  }
  .login-demo-hints strong { color: var(--text-secondary); }
  .status-page { text-align: center; padding: 24px 0; }
  .status-icon { font-size: 56px; margin-bottom: 16px; }
  .state-flow {
    font-size: 11px; color: var(--text-muted); text-align: left;
    background: var(--bg-card2); border-radius: var(--radius);
    padding: 12px 14px; margin-top: 20px; line-height: 1.8;
  }
  .otp-inputs { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
  .otp-input {
    width: 44px; height: 52px; text-align: center; font-size: 22px; font-weight: 700;
    background: var(--bg-base); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text-primary); font-family: monospace;
  }
  .otp-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
  .pwd-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

  /* ============================================================
     ADMIN SPECIFIC
  ============================================================ */
  .review-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px; margin-bottom: 12px;
  }
  .review-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
  .review-card-title { font-size: 14px; font-weight: 600; }
  .review-card-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
  .review-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
  .review-field { font-size: 12px; }
  .review-field-label { color: var(--text-secondary); margin-bottom: 2px; }
  .review-field-value { color: var(--text-primary); font-weight: 500; }
  .review-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
  .review-card-clickable { cursor: pointer; transition: border-color .15s, background .15s; }
  .review-card-clickable:hover { border-color: var(--accent); background: var(--bg-hover); }
  tr.row-clickable { cursor: pointer; transition: background .15s; }
  tr.row-clickable:hover { background: var(--bg-hover); }
  /* Admin Logs */
  .admin-logs-toolbar {
    display: flex; flex-wrap: wrap; gap: 14px 18px;
    align-items: center; padding: 12px 14px;
  }
  .logs-filter-group { display: flex; align-items: center; gap: 8px; }
  .logs-filter-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
  .logs-chip-group { display: inline-flex; gap: 4px; padding: 3px; background: var(--bg-card2); border: 1px solid var(--border); border-radius: 999px; }
  .logs-chip {
    padding: 5px 12px; border-radius: 999px; cursor: pointer;
    font-size: 12px; color: var(--text-secondary); background: none; border: none;
    transition: all .15s;
  }
  .logs-chip:hover { color: var(--text-primary); }
  .logs-chip.active { background: var(--accent); color: #fff; font-weight: 500; }
  #logs-range-filter { font-size: 12px; padding: 6px 10px; width: auto; min-width: 140px; }
  #logs-search-input { font-size: 12px; padding: 6px 10px; }
  .logs-table { width: 100%; }
  .logs-table th { font-size: 11px; color: var(--text-muted); padding: 10px 14px; background: var(--bg-card2); position: sticky; top: 0; }
  .logs-table td { font-size: 12.5px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .logs-table tbody tr { transition: background .15s; }
  .logs-table tbody tr:hover { background: var(--bg-hover); }
  .logs-actor-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500;
  }
  .logs-actor-pill.admin { background: rgba(124,58,237,.15); color: #c4b5fd; border:1px solid rgba(124,58,237,.3); }
  .logs-actor-pill.borrower { background: var(--accent-light); color: #93c5fd; border:1px solid rgba(96,165,250,.3); }
  .logs-actor-pill.system { background: var(--bg-card2); color: var(--text-muted); border:1px solid var(--border); }
  .logs-empty { padding: 48px 16px; text-align: center; color: var(--text-muted); }
  .logs-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; border-top: 1px solid var(--border);
    font-size: 11px; color: var(--text-muted);
    background: var(--bg-card2);
  }
  /* Pool composition bar */
  .pool-bar { height: 16px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 14px; }
  .pool-legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-secondary); }
  .pool-legend > div { display: flex; align-items: center; gap: 8px; }
  .pool-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
  .logs-list { display: flex; flex-direction: column; gap: 0; }
  .logs-list .logs-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px dashed var(--border);
  }
  .logs-list .logs-item:last-child { border-bottom: none; }
  .logs-list .logs-ico { font-size: 18px; flex-shrink: 0; }
  .logs-list .logs-main { flex: 1; min-width: 0; }
  .logs-list .logs-title { font-size: 13px; font-weight: 500; }
  .logs-list .logs-meta { text-align: right; white-space: nowrap; }
  /* Role edit modal */
  .role-edit-head {
    padding: 12px 14px; background: var(--bg-card2); border:1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 14px;
  }
  .role-edit-key {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 15px; font-weight: 700; color: var(--text-primary);
  }
  .role-perm-list {
    display: flex; flex-direction: column; gap: 6px;
    max-height: 280px; overflow-y: auto;
    padding: 4px;
  }
  .role-perm-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; background: var(--bg-card2);
    border: 1px solid var(--border); border-radius: var(--radius);
    cursor: pointer; transition: border-color .15s, background .15s;
  }
  .role-perm-row:hover { border-color: var(--accent); background: var(--bg-hover); }
  .role-perm-row input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; }
  .role-perm-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
  .role-perm-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
  .role-perm-desc { font-size: 11px; color: var(--text-muted); line-height: 1.45; }
  .multisig-status {
    margin-top: 12px; padding: 12px 14px;
    background: var(--bg-card2); border: 1px dashed var(--border);
    border-radius: var(--radius);
  }
  .multisig-step {
    font-size: 12.5px; padding: 4px 0; display: flex; align-items: center; gap: 6px;
    color: var(--text-secondary);
  }
  .multisig-step.done { color: var(--green); font-weight: 500; }
  .multisig-step.pending { color: var(--text-muted); }

  /* ============================================================
     LIQUIDATION LIFECYCLE
  ============================================================ */
  .liq-lifecycle {
    display: flex; align-items: stretch; gap: 0;
    background: var(--bg-card2); border-radius: var(--radius-lg);
    padding: 14px; overflow-x: auto;
  }
  .liq-stage {
    flex: 1; min-width: 130px; padding: 10px 12px;
    border-right: 1px dashed var(--border);
    position: relative; opacity: .45; transition: opacity .2s;
  }
  .liq-stage:last-child { border-right: none; }
  .liq-stage.active { opacity: 1; }
  .liq-stage.done { opacity: .85; }
  .liq-stage-tag {
    display: inline-block; font-size: 10px; font-weight: 600;
    padding: 2px 6px; border-radius: 4px; margin-bottom: 6px;
    background: var(--bg-base); color: var(--text-muted);
    border: 1px solid var(--border);
  }
  .liq-stage.active .liq-stage-tag { background: var(--accent); color: #fff; border-color: var(--accent); }
  .liq-stage.danger.active .liq-stage-tag { background: var(--red); border-color: var(--red); }
  .liq-stage.warn.active .liq-stage-tag { background: var(--yellow); border-color: var(--yellow); color: #000; }
  .liq-stage-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
  .liq-stage-sub { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
  .liq-stage.danger .liq-stage-title { color: var(--red); }
  .liq-stage.warn .liq-stage-title { color: var(--yellow); }

  .liq-trigger-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .liq-trigger-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-left: 3px solid var(--accent); border-radius: var(--radius);
    padding: 14px;
  }
  .liq-trigger-card.danger { border-left-color: var(--red); }
  .liq-trigger-card.warn { border-left-color: var(--yellow); }
  .liq-trigger-tag {
    font-size: 10px; padding: 2px 6px; border-radius: 4px;
    background: var(--bg-card2); color: var(--text-muted); margin-right: 6px;
  }
  .liq-trigger-card.danger .liq-trigger-tag { background: var(--red-bg); color: var(--red); }
  .liq-trigger-card.warn .liq-trigger-tag { background: var(--yellow-bg); color: var(--yellow); }

  .liq-rate-table {
    width: 100%; border-collapse: collapse; font-size: 12px;
    background: var(--bg-card2); border-radius: var(--radius); overflow: hidden;
  }
  .liq-rate-table th, .liq-rate-table td {
    padding: 10px 12px; text-align: left;
    border-bottom: 1px solid var(--border);
  }
  .liq-rate-table th { background: var(--bg-card); color: var(--text-secondary); font-weight: 600; font-size: 11px; }
  .liq-rate-table tr:last-child td { border-bottom: none; }
  .liq-rate-table .rate-cell { font-family: monospace; font-weight: 600; }

  .liq-waterfall { display: flex; flex-direction: column; gap: 6px; }
  .liq-waterfall-row {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card2); border-radius: var(--radius);
    padding: 10px 14px; border-left: 3px solid var(--border);
  }
  .liq-waterfall-row.fulfilled { border-left-color: var(--green); }
  .liq-waterfall-row.partial { border-left-color: var(--yellow); }
  .liq-waterfall-row.unfulfilled { border-left-color: var(--red); }
  .liq-waterfall-rank {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--bg-base); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: var(--text-secondary);
    flex-shrink: 0;
  }
  .liq-waterfall-row.fulfilled .liq-waterfall-rank { background: var(--green); color: #000; border-color: var(--green); }
  .liq-waterfall-name { flex: 1; font-size: 13px; }
  .liq-waterfall-amt { font-family: monospace; font-size: 13px; font-weight: 600; }

  .liq-cargo-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .liq-cargo-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px;
  }
  .liq-cargo-card-head {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
    font-size: 13px; font-weight: 600;
  }
  .liq-cargo-step {
    display: flex; gap: 10px; padding: 8px 0;
    border-top: 1px solid var(--border-light);
    font-size: 11px; color: var(--text-secondary); line-height: 1.5;
  }
  .liq-cargo-step:first-of-type { border-top: none; padding-top: 4px; }
  .liq-cargo-step-num {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--bg-card2); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; flex-shrink: 0;
  }
  @media (max-width: 768px) {
    .liq-trigger-grid, .liq-cargo-options { grid-template-columns: 1fr; }
  }

  /* ============================================================
     ADMIN: USERS / ROLES / PARAMS
  ============================================================ */
  .user-table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .user-table th, .user-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
  .user-table th { background: var(--bg-card2); color: var(--text-secondary); font-weight: 600; font-size: 11px; }
  .user-table tr:hover { background: var(--bg-card2); }
  .user-table .actions-cell { text-align: right; }
  .user-table .actions-cell .btn { padding: 4px 8px; font-size: 11px; }

  .role-matrix { width: 100%; border-collapse: collapse; font-size: 12px; background: var(--bg-card2); border-radius: var(--radius); overflow: hidden; }
  .role-matrix th, .role-matrix td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: center; }
  .role-matrix th { background: var(--bg-card); font-size: 11px; color: var(--text-secondary); }
  .role-matrix td:first-child, .role-matrix th:first-child { text-align: left; font-weight: 500; }
  .role-matrix .perm-yes { color: var(--green); font-weight: 700; }
  .role-matrix .perm-no { color: var(--text-muted); }
  .role-matrix .perm-conditional { color: var(--yellow); font-weight: 600; }

  .param-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px;
  }
  .param-card-title { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
  .param-card-value { font-size: 22px; font-weight: 700; color: var(--text-primary); font-family: monospace; }
  .param-card-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
  .param-edit-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
  .param-edit-row label { flex: 1; font-size: 12px; color: var(--text-secondary); }
  .param-edit-row input { width: 120px; }

  /* ============================================================
     FUNDS: OTC / Tether
  ============================================================ */
  .funds-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: var(--bg-card2); padding: 4px; border-radius: var(--radius); width: max-content; }
  .funds-tab {
    padding: 8px 18px; background: none; border: none; border-radius: var(--radius);
    color: var(--text-muted); cursor: pointer; font-size: 12px; font-weight: 500;
  }
  .funds-tab.active { background: var(--accent); color: #fff; }
  .balance-card {
    background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(124,58,237,.08));
    border: 1px solid rgba(96,165,250,.3); border-radius: var(--radius-lg);
    padding: 18px; margin-bottom: 16px;
  }
  .balance-row { display: flex; align-items: baseline; gap: 8px; }
  .balance-amount { font-size: 28px; font-weight: 700; font-family: monospace; }
  .balance-currency { font-size: 14px; color: var(--text-muted); }
  .channel-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px;
    display: flex; align-items: center; gap: 12px;
  }
  .channel-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--bg-card2); display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
  }
  .channel-info { flex: 1; }
  .channel-info h4 { font-size: 13px; margin-bottom: 2px; }
  .channel-info p { font-size: 11px; color: var(--text-muted); }
  .funds-tx-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-bottom: 1px solid var(--border-light); font-size: 12px;
  }
  .funds-tx-row:last-child { border-bottom: none; }
  .funds-tx-type {
    width: 70px; padding: 2px 6px; border-radius: 4px;
    font-size: 10px; font-weight: 600; text-align: center;
  }
  .funds-tx-type.deposit { background: var(--green-bg, rgba(56,139,72,.15)); color: var(--green); }
  .funds-tx-type.withdraw { background: var(--red-bg, rgba(248,81,73,.15)); color: var(--red); }
  .funds-tx-type.transfer { background: var(--accent-light); color: #60a5fa; }
  .funds-tx-info { flex: 1; }
  .funds-tx-amt { font-family: monospace; font-weight: 600; }

  /* MONITOR */
  .risk-row {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; background: var(--bg-card2);
    border-radius: var(--radius); margin-bottom: 8px;
    border-left: 3px solid transparent;
  }
  .risk-row.danger { border-left-color: var(--red); }
  .risk-row.warning { border-left-color: var(--yellow); }
  .risk-row.normal { border-left-color: var(--green); }
  .risk-info { flex: 1; }
  .risk-title { font-size: 13px; font-weight: 500; }
  .risk-sub { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
  .risk-health { text-align: right; min-width: 60px; }
  .risk-health-num { font-size: 18px; font-weight: 700; }
  .risk-actions { display: flex; gap: 6px; }

  /* ADMIN DASHBOARD: 重要信息 */
  .admin-focus-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  }
  .admin-focus-card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
  }
  .admin-focus-card-head h3 { margin: 0; font-size: 15px; }
  .admin-alert-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: var(--radius);
    background: var(--bg-card2); margin-bottom: 8px;
    border-left: 3px solid var(--border);
    cursor: pointer; transition: background .15s;
  }
  .admin-alert-item:last-child { margin-bottom: 0; }
  .admin-alert-item:hover { background: var(--bg-base); }
  .admin-alert-item.due-soon { border-left-color: var(--yellow); }
  .admin-alert-item.overdue { border-left-color: var(--red); }
  .admin-alert-item.in-grace { border-left-color: var(--orange); }
  .admin-alert-item.risk-warn { border-left-color: var(--yellow); }
  .admin-alert-item.risk-danger { border-left-color: var(--red); }
  .admin-alert-main { flex: 1; min-width: 0; }
  .admin-alert-title { font-size: 13px; font-weight: 600; }
  .admin-alert-sub { font-size: 11px; color: var(--text-secondary); margin-top: 3px; line-height: 1.45; }
  .admin-alert-meta {
    text-align: right; flex-shrink: 0; min-width: 72px;
  }
  .admin-alert-meta-num { font-size: 16px; font-weight: 700; font-family: monospace; }
  .admin-alert-meta-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
  .admin-alert-empty {
    padding: 20px; text-align: center; font-size: 12px; color: var(--text-muted);
    background: var(--bg-card2); border-radius: var(--radius);
  }

  /* PRICE MONITOR */
  .price-monitor-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  }
  .price-bill-card {
    background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 14px 16px;
    border-left: 3px solid var(--border);
  }
  .price-bill-card.warn { border-left-color: var(--yellow); }
  .price-bill-card.danger { border-left-color: var(--red); }
  .price-bill-card.normal { border-left-color: var(--green); }
  .price-bill-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 10px; margin-bottom: 10px;
  }
  .price-bill-title { font-size: 13px; font-weight: 600; }
  .price-bill-meta { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }
  .price-spark-wrap {
    background: var(--bg-base); border-radius: var(--radius);
    padding: 8px 10px 4px; margin-bottom: 10px;
  }
  .price-sparkline { display: block; width: 100%; height: 52px; }
  .price-spark-labels {
    display: flex; justify-content: space-between; font-size: 10px;
    color: var(--text-muted); margin-top: 4px;
  }
  .price-metrics-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    font-size: 11px;
  }
  .price-metric-cell {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 8px; text-align: center;
  }
  .price-metric-cell .lbl { color: var(--text-muted); font-size: 10px; margin-bottom: 4px; }
  .price-metric-cell .val { font-weight: 700; font-family: monospace; font-size: 12px; }
  .price-threshold-bar {
    display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px;
    color: var(--text-secondary); margin-bottom: 16px;
  }
  .price-threshold-bar span { display: inline-flex; align-items: center; gap: 6px; }
  .price-threshold-dot {
    width: 8px; height: 8px; border-radius: 50%;
  }
  .price-threshold-dot.warn { background: var(--yellow); }
  .price-threshold-dot.danger { background: var(--red); }

  .fund-util-bar {
    height: 6px; background: var(--bg-card2); border-radius: 3px;
    margin: 10px 0 8px; overflow: hidden;
  }
  .fund-util-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    transition: width .3s ease;
  }
  .fund-util-fill.high { background: linear-gradient(90deg, var(--yellow), #f0b429); }
  .fund-util-fill.full { background: linear-gradient(90deg, var(--red), #f85149); }

  .fund-pool-overview {
    border: 1px solid rgba(96, 165, 250, .35);
    background: linear-gradient(135deg, rgba(37,99,235,.08), var(--bg-card));
  }
  .fund-pool-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
  }
  .fund-pool-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
  .fund-pool-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; max-width: 520px; }
  .fund-pool-total {
    text-align: right;
  }
  .fund-pool-total-num { font-size: 26px; font-weight: 800; font-family: monospace; color: #60a5fa; }
  .fund-pool-total-lbl { font-size: 11px; color: var(--text-muted); }
  .fund-pool-bar-wrap { margin-bottom: 14px; }
  .fund-pool-bar-labels {
    display: flex; justify-content: space-between; font-size: 11px;
    color: var(--text-secondary); margin-bottom: 6px;
  }
  .fund-pool-segments {
    display: flex; height: 28px; border-radius: var(--radius);
    overflow: hidden; background: var(--bg-card2);
  }
  .fund-pool-seg-deployed {
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 600; color: #fff; min-width: 0;
  }
  .fund-pool-seg-idle {
    flex: 1; background: var(--bg-base);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: var(--text-muted);
  }
  .fund-pool-metrics {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  }
  .fund-pool-metric {
    background: var(--bg-card2); border-radius: var(--radius);
    padding: 12px; text-align: center;
  }
  .fund-pool-metric .lbl { font-size: 10px; color: var(--text-muted); margin-bottom: 6px; }
  .fund-pool-metric .val { font-size: 15px; font-weight: 700; font-family: monospace; }

  .lending-providers-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px;
  }
  .lending-provider-card {
    background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 14px 16px;
    border-left: 3px solid var(--accent);
  }
  .lending-provider-card.planned {
    border-left-color: var(--border); opacity: .72;
    border-style: dashed;
  }
  .platform-flow-ribbon {
    display: flex; align-items: center; gap: 0; flex-wrap: wrap;
    background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 12px 16px; margin-bottom: 16px;
  }
  .platform-flow-step {
    display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted);
    padding: 4px 8px; border-radius: var(--radius);
  }
  .platform-flow-step.done { color: var(--green); }
  .platform-flow-step.active { color: var(--accent); font-weight: 600; background: rgba(99,102,241,.12); }
  .platform-flow-step.clickable { cursor: pointer; }
  .platform-flow-step.clickable:hover { background: var(--bg-hover); }
  .platform-flow-arrow { color: var(--text-muted); font-size: 10px; padding: 0 4px; opacity: .6; }
  .platform-activity-item {
    padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: 12px; line-height: 1.45;
  }
  .platform-activity-item:last-child { border-bottom: none; }
  #app-toast-root {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  }
  .app-toast {
    pointer-events: auto; min-width: 260px; max-width: 360px;
    padding: 12px 16px; border-radius: var(--radius-lg);
    background: var(--bg-card); border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
    font-size: 13px; line-height: 1.45;
    animation: toast-in .25s ease;
  }
  .app-toast.info { border-left: 3px solid var(--accent); }
  .app-toast.ok { border-left: 3px solid var(--green); }
  .app-toast.warn { border-left: 3px solid var(--yellow); }
  @keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .lending-provider-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 8px; margin-bottom: 10px;
  }
  .lending-provider-name { font-size: 14px; font-weight: 600; }
  .lending-provider-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; line-height: 1.45; }
  .lending-provider-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 11px;
  }
  .lending-provider-stat .lbl { color: var(--text-muted); font-size: 10px; }
  .lending-provider-stat .val { font-weight: 700; font-family: monospace; font-size: 12px; margin-top: 2px; }

  /* ADMIN DASHBOARD 大盘 */
  .admin-dash-hero {
    background: linear-gradient(135deg, rgba(37,99,235,.14), rgba(124,58,237,.08));
    border: 1px solid rgba(96,165,250,.28);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 20px;
  }
  .admin-dash-hero-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
  }
  .admin-dash-hero-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
  .admin-dash-kpi-strip {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
  }
  .admin-dash-kpi {
    background: var(--bg-card2); border-radius: var(--radius);
    padding: 12px 10px; text-align: center;
    border: 1px solid var(--border-light);
    cursor: pointer; transition: border-color .15s, transform .15s;
  }
  .admin-dash-kpi:hover { border-color: var(--accent); transform: translateY(-1px); }
  .admin-dash-kpi .kpi-lbl { font-size: 10px; color: var(--text-muted); margin-bottom: 6px; line-height: 1.3; }
  .admin-dash-kpi .kpi-val { font-size: 18px; font-weight: 800; font-family: monospace; line-height: 1.1; }
  .admin-dash-kpi .kpi-sub { font-size: 10px; color: var(--text-secondary); margin-top: 4px; }
  .admin-dash-grid {
    display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px;
  }
  .admin-dash-grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
  }
  .admin-dash-grid-3 {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px;
  }
  .admin-dash-panel {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px 18px; height: 100%;
  }
  .admin-dash-panel-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px; gap: 8px;
  }
  .admin-dash-panel-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
  .admin-risk-bars { display: flex; flex-direction: column; gap: 10px; }
  .admin-risk-bar-row { display: flex; align-items: center; gap: 10px; font-size: 11px; }
  .admin-risk-bar-label { width: 72px; color: var(--text-secondary); flex-shrink: 0; }
  .admin-risk-bar-track {
    flex: 1; height: 8px; background: var(--bg-card2); border-radius: 4px; overflow: hidden;
  }
  .admin-risk-bar-fill { height: 100%; border-radius: 4px; }
  .admin-risk-bar-fill.green { background: var(--green); }
  .admin-risk-bar-fill.yellow { background: var(--yellow); }
  .admin-risk-bar-fill.red { background: var(--red); }
  .admin-risk-bar-fill.orange { background: #f0883e; }
  .admin-risk-bar-pct { width: 36px; text-align: right; font-family: monospace; font-weight: 600; }
  .admin-todo-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; background: var(--bg-card2); border-radius: var(--radius);
    margin-bottom: 8px; cursor: pointer; border-left: 3px solid var(--border);
  }
  .admin-todo-item:hover { background: var(--bg-base); }
  .admin-todo-item.warn { border-left-color: var(--yellow); }
  .admin-todo-item.danger { border-left-color: var(--red); }
  .admin-todo-item.info { border-left-color: var(--accent); }
  .admin-mini-table { width: 100%; border-collapse: collapse; font-size: 11px; }
  .admin-mini-table th, .admin-mini-table td {
    padding: 8px 10px; border-bottom: 1px solid var(--border-light); text-align: left;
  }
  .admin-mini-table th { color: var(--text-muted); font-weight: 600; font-size: 10px; }
  .admin-mini-table tr:last-child td { border-bottom: none; }
  .admin-pool-compact .fund-pool-segments { height: 22px; }
  .admin-metric-tiles {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  }
  .admin-metric-tile {
    background: var(--bg-card2); border-radius: var(--radius); padding: 10px 12px;
  }
  .admin-metric-tile .lbl { font-size: 10px; color: var(--text-muted); }
  .admin-metric-tile .val { font-size: 14px; font-weight: 700; font-family: monospace; margin-top: 4px; }

  /* ============================================================
     RESPONSIVE
  ============================================================ */
  @media (max-width: 768px) {
    .split, .split-3-2, .split-2-3 { grid-template-columns: 1fr; }
    .stat-grid, .stat-grid-2x2 { grid-template-columns: 1fr; }
    /* 借款明细：窄屏隐藏次要列（货值/可用额度/利息收益/时间），保留 NFT/借款人/债务/到期/状态/操作 */
    .loan-detail-table th:nth-child(3), .loan-detail-table td:nth-child(3),
    .loan-detail-table th:nth-child(5), .loan-detail-table td:nth-child(5),
    .loan-detail-table th:nth-child(7), .loan-detail-table td:nth-child(7),
    .loan-detail-table th:nth-child(9), .loan-detail-table td:nth-child(9) { display: none; }
    .cargo-value-compare { grid-template-columns: 1fr; gap: 8px; }
    .cargo-value-mid { flex-direction: row; gap: 8px; }
    .stat-grid-4, .stat-grid-5 { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .nft-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .nav-chain { display: none; }
    .container { padding: 20px 16px; }
    .admin-focus-grid { grid-template-columns: 1fr; }
    .price-monitor-grid { grid-template-columns: 1fr; }
    .price-metrics-row { grid-template-columns: repeat(2, 1fr); }
    .fund-pool-metrics { grid-template-columns: repeat(2, 1fr); }
    .lending-providers-grid { grid-template-columns: 1fr; }
    .lending-provider-stats { grid-template-columns: 1fr 1fr; }
    .admin-dash-kpi-strip { grid-template-columns: repeat(2, 1fr); }
    .admin-dash-grid, .admin-dash-grid-2, .admin-dash-grid-3 { grid-template-columns: 1fr; }
    .jnft-action-tabs-row { flex-wrap: wrap; }
    .jnft-action-meta { flex-basis: 100%; margin-left: 0; margin-top: 6px; }
    .loan-summary-grid { grid-template-columns: 1fr; gap: 8px; }
    .loan-summary-meta { grid-template-columns: repeat(2, 1fr); }
  }

/* ── jNFT 操作 tabs（borrow / repay / unstake 共享） ─────────── */
.jnft-action-tabs { width: 100%; }
.jnft-action-tabs-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px;
}
.jnft-action-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--text-muted);
  border: 1px solid transparent;
  font-size: 14px; font-weight: 500;
  transition: all .15s;
}
.jnft-action-tab:hover { background: rgba(163,113,247,.08); color: var(--text); }
.jnft-action-tab.active {
  background: var(--bg-card);
  color: var(--text);
  border-color: rgba(163,113,247,.4);
  box-shadow: 0 0 0 2px rgba(163,113,247,.08) inset;
}
.jnft-action-tab.is-disabled { opacity: .45; cursor: not-allowed; }
.jnft-action-tab.is-disabled:hover { background: transparent; }
.jnft-action-icon { font-size: 14px; }
.jnft-action-meta {
  margin-left: auto; padding-right: 6px;
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap;
}

/* ── Loan summary card（合并费用预览/风险预估的紧凑卡） ─────── */
.loan-summary-card { display: block; }

/* ── Info collapsible（折叠说明）+ Info tooltip（❓ 悬停展开） ─ */
.info-collapsible {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  margin-bottom: 16px;
}
.info-collapsible > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  user-select: none;
}
.info-collapsible > summary::-webkit-details-marker { display: none; }
.info-collapsible > summary::after {
  content: '▾';
  margin-left: auto;
  color: var(--text-muted);
  transition: transform .15s;
}
.info-collapsible[open] > summary::after { transform: rotate(180deg); }
.info-collapsible[open] > summary { color: var(--text); border-bottom: 1px solid var(--border); }
.info-collapsible > summary:hover { color: var(--text); }
.info-collapsible-body {
  padding: 12px 14px;
  font-size: 13px; line-height: 1.6;
  color: var(--text-muted);
}
.info-collapsible-body strong { color: var(--text); }

/* 内联 ❓ tooltip：使用原生 title 或 .info-q 样式 */
.info-q {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 11px; line-height: 1;
  color: var(--text-muted);
  cursor: help;
  margin-left: 4px;
  background: var(--bg-card);
  vertical-align: middle;
}
.info-q:hover { color: var(--text); border-color: var(--text-muted); }
.loan-summary-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.loan-summary-cell {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; min-width: 0;
}
.loan-summary-value {
  font-size: 22px; font-weight: 700; line-height: 1.2;
  margin-top: 2px;
}
.loan-summary-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  font-size: 12px;
}
.loan-summary-meta > span { display: inline-flex; gap: 4px; align-items: baseline; }

/* ── 页面底部固定操作栏（borrow / stake / repay / unstake 共用） ── */
.page-action-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(22,27,34,0.85), rgba(22,27,34,1) 35%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  /* 右侧多留 220px 给 footer-chain HUD（避免遮挡） */
  padding: 12px 240px 14px 24px;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.35);
}
.page-action-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 820px;
  width: 100%;
}
/* 兜底：浏览器不支持 :has() 时，仍把 footer-chain 上移到 action-bar 之上 */
@supports selector(:has(*)) {
  body:has(.page.active.has-action-bar) .footer-chain { bottom: 88px; right: 16px; }
}
.page-action-bar-summary {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.page-action-bar-summary strong { color: var(--text); }
.page-action-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.page-action-bar-actions .btn {
  white-space: nowrap;
  min-width: 200px;
}
.page-action-bar-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  line-height: 1.4;
}
/* 给带 action-bar 的页面留出底部空间 */
.page.has-action-bar { padding-bottom: 110px; }
@media (max-width: 720px) {
  .page-action-bar { padding: 10px 14px 12px; gap: 10px; }
  .page-action-bar-inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-action-bar-summary { text-align: center; }
  .page-action-bar-actions { justify-content: center; flex-direction: column; align-items: stretch; }
  .page-action-bar-actions .btn { min-width: 0; width: 100%; }
  .page-action-bar-hint { text-align: center; }
  .page.has-action-bar { padding-bottom: 160px; }
  @supports selector(:has(*)) {
    body:has(.page.active.has-action-bar) .footer-chain { bottom: 150px; }
  }
}

/* ── 借款人 dashboard 业务链路折叠 ──────────────────────────────── */
.platform-flow-collapsible {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.platform-flow-collapsible summary {
  cursor: pointer; list-style: none; user-select: none;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  font-size: 13px;
}
.platform-flow-collapsible summary::-webkit-details-marker { display: none; }
.platform-flow-collapsible[open] summary { margin-bottom: 8px; }
.platform-flow-body .platform-flow-ribbon { margin: 0; }

/* ── 运营大盘「更多指标」折叠 ──────────────────────────────────── */
.admin-dash-kpi-more { margin-top: 10px; }
.admin-dash-kpi-more summary {
  cursor: pointer; list-style: none; user-select: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px;
  border: 1px dashed var(--border);
  transition: background 0.15s;
}
.admin-dash-kpi-more summary:hover { background: var(--bg-card2); }
.admin-dash-kpi-more summary::-webkit-details-marker { display: none; }
.admin-dash-kpi-more[open] summary { background: var(--bg-card2); border-style: solid; }

/* ── 操作前二次确认弹窗（actionConfirmModal）─────────────────── */
.action-confirm-detail {
  background: var(--bg-card2);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.action-confirm-detail .acd-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 6px; border-bottom: 1px dashed var(--border);
}
.action-confirm-detail .acd-row:last-child { border-bottom: 0; padding-bottom: 0; }
.action-confirm-detail .acd-key { color: var(--text-muted); font-size: 12px; flex-shrink: 0; }
.action-confirm-detail .acd-val { color: var(--text); font-weight: 600; text-align: right; word-break: break-all; }
.action-confirm-detail .acd-val.font-mono { font-family: var(--font-mono, monospace); font-weight: 500; }
.action-confirm-note {
  margin-top: 10px;
  background: rgba(56, 139, 253, 0.08);
  border: 1px solid rgba(56, 139, 253, 0.25);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.action-confirm-note.warn {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.35);
  color: var(--yellow, #eab308);
}

/* ── 紧凑信息行（费用 / 风险 横向 chip 风格） ── */
.compact-meta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  background: var(--bg-card2);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.compact-meta-row .cm-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.compact-meta-row .cm-lbl {
  font-size: 11px;
  color: var(--text-muted);
}
.compact-meta-row .cm-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compact-meta-row .cm-val.text-red { color: var(--red); }
.compact-meta-row .cm-val.text-green { color: var(--green); }
.compact-meta-row .cm-val.text-yellow { color: var(--yellow); }
.compact-meta-row .cm-val.text-blue { color: var(--blue); }

/* 健康值变化线 */
.health-change-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card2);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  gap: 12px;
}
.health-change-line .hc-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.health-change-line .hc-lbl { font-size: 11px; color: var(--text-muted); }
.health-change-line .hc-val { font-size: 18px; font-weight: 700; }
.health-change-line .hc-arrow {
  font-size: 18px;
  color: var(--text-muted);
}

/* ── 个人中心弹窗 ──────────────────────────────────────────────── */
.btn-xs { padding: 2px 8px; font-size: 11px; line-height: 1.6; border-radius: 6px; }
.profile-section {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 14px; margin: 14px 16px 0;
}
.profile-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.profile-row:last-child { border-bottom: none; }
.profile-k { color: var(--text-muted); flex: none; }
.profile-v { color: var(--text); text-align: right; display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.profile-assets {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 12px 16px 0;
}
.profile-asset {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 8px; text-align: center;
}
.profile-asset .pa-num { font-size: 18px; font-weight: 700; }
.profile-asset .pa-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.profile-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text);
  margin: 18px 16px 8px;
}
.profile-logs { margin: 0 16px 4px; }
.profile-log-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.profile-log-item:last-child { border-bottom: none; }
.profile-log-icon { color: var(--text-muted); font-size: 14px; margin-top: 1px; flex: none; }
.profile-log-main { flex: 1; min-width: 0; }
.profile-log-title { font-size: 13px; color: var(--text); }
.profile-log-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════════
   SVG ICON SYSTEM（替代 emoji · mask-image · 颜色跟随 currentColor）
   ════════════════════════════════════════════════════════════════ */
:root {
  --m-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E");
  --m-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E");
  --m-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v5h5'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3Cpath d='M10 9H8'/%3E%3C/svg%3E");
  --m-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  --m-chart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' x2='12' y1='20' y2='10'/%3E%3Cline x1='18' x2='18' y1='20' y2='4'/%3E%3Cline x1='6' x2='6' y1='20' y2='16'/%3E%3C/svg%3E");
  --m-wallet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E");
  --m-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3C/svg%3E");
  --m-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
  --m-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
  --m-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8.5 12.5 2.5 2.5 4.5-5'/%3E%3C/svg%3E");
  --m-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6'/%3E%3Cpath d='m9 9 6 6'/%3E%3C/svg%3E");
  --m-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  --m-octagon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z'/%3E%3Cpath d='M12 8v4'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E");
  --m-paperclip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E");
  --m-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
  --m-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
  --m-trend-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 17h6v-6'/%3E%3Cpath d='m22 17-8.5-8.5-5 5L2 7'/%3E%3C/svg%3E");
}

.ic {
  display: inline-block; width: 1em; height: 1em;
  vertical-align: -0.14em; flex: none;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.ic-globe { -webkit-mask-image: var(--m-globe); mask-image: var(--m-globe); }
.ic-bell { -webkit-mask-image: var(--m-bell); mask-image: var(--m-bell); }
.ic-file { -webkit-mask-image: var(--m-file); mask-image: var(--m-file); }
.ic-lock { -webkit-mask-image: var(--m-lock); mask-image: var(--m-lock); }
.ic-chart { -webkit-mask-image: var(--m-chart); mask-image: var(--m-chart); }
.ic-wallet { -webkit-mask-image: var(--m-wallet); mask-image: var(--m-wallet); }
.ic-shield { -webkit-mask-image: var(--m-shield); mask-image: var(--m-shield); }
.ic-info { -webkit-mask-image: var(--m-info); mask-image: var(--m-info); }
.ic-warn { -webkit-mask-image: var(--m-warn); mask-image: var(--m-warn); }
.ic-check { -webkit-mask-image: var(--m-check); mask-image: var(--m-check); }
.ic-x { -webkit-mask-image: var(--m-x); mask-image: var(--m-x); }
.ic-clock { -webkit-mask-image: var(--m-clock); mask-image: var(--m-clock); }
.ic-octagon { -webkit-mask-image: var(--m-octagon); mask-image: var(--m-octagon); }
.ic-paperclip { -webkit-mask-image: var(--m-paperclip); mask-image: var(--m-paperclip); }
.ic-link { -webkit-mask-image: var(--m-link); mask-image: var(--m-link); }
.ic-mail { -webkit-mask-image: var(--m-mail); mask-image: var(--m-mail); }
.ic-trend-down { -webkit-mask-image: var(--m-trend-down); mask-image: var(--m-trend-down); }

/* ── alert 图标：隐藏原 emoji 文本，按 alert 类型自动渲染 SVG ── */
.alert-icon {
  font-size: 0 !important; flex: none;
  width: 18px; height: 18px; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
}
.alert-icon::before {
  content: ""; display: block; width: 18px; height: 18px;
  background-color: var(--accent);
  -webkit-mask: var(--m-info) center / contain no-repeat;
  mask: var(--m-info) center / contain no-repeat;
}
.alert-warning .alert-icon::before { background-color: var(--yellow); -webkit-mask-image: var(--m-warn); mask-image: var(--m-warn); }
.alert-danger .alert-icon::before { background-color: var(--red); -webkit-mask-image: var(--m-octagon); mask-image: var(--m-octagon); }
.alert-success .alert-icon::before { background-color: var(--green); -webkit-mask-image: var(--m-check); mask-image: var(--m-check); }

/* ── 上传 / 证件文件图标 ── */
.upload-icon { font-size: 0 !important; }
.upload-icon::before {
  content: ""; display: block; width: 24px; height: 24px; margin: 0 auto;
  background-color: var(--text-secondary);
  -webkit-mask: var(--m-paperclip) center / contain no-repeat;
  mask: var(--m-paperclip) center / contain no-repeat;
}
.kyc-doc-icon { font-size: 0 !important; }
.kyc-doc-icon::before {
  content: ""; display: block; width: 14px; height: 14px;
  background-color: var(--text-secondary);
  -webkit-mask: var(--m-paperclip) center / contain no-repeat;
  mask: var(--m-paperclip) center / contain no-repeat;
}

/* ── logo 地球（白色叠在渐变方块上）── */
.logo-icon, .login-logo-icon { font-size: 0 !important; }
.logo-icon::before, .login-logo-icon::before {
  content: ""; display: block; width: 62%; height: 62%;
  background-color: #fff;
  -webkit-mask: var(--m-globe) center / contain no-repeat;
  mask: var(--m-globe) center / contain no-repeat;
}

/* ── 登录特性卡 / status / sign 大图标尺寸适配（.ic 用 1em，跟随父 font-size）── */
.login-feature-icon .ic { width: 20px; height: 20px; background-color: #93c5fd; }
.nav-badge .ic { width: 17px; height: 17px; }
.status-icon.ic { margin-bottom: 16px; }
.sign-icon.ic { margin-bottom: 12px; }

/* ════════════════════════════════════════════════════════════════
   借款人操作页（质押 / 借款 / 还款 / 解除质押）· 统一视觉系统
   ════════════════════════════════════════════════════════════════ */
.op-page .container-md { max-width: 920px; }

/* 页头：返回 + 标题 + 步骤徽章 */
.op-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.op-head .page-title { font-size: 21px; margin: 0; line-height: 1.3; }
.op-step-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: #a78bfa; background: rgba(163,113,247,.12);
  border: 1px solid rgba(163,113,247,.32); border-radius: 999px;
  padding: 3px 11px;
}

/* 卡片：更舒展的内边距 + 统一标题层级 */
.op-page .card { padding: 18px 20px; border-radius: var(--radius-lg); }
.op-page .card-sm { padding: 12px 14px; }
.op-page .card h4 {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin: 0 0 14px; letter-spacing: .01em;
  display: flex; align-items: center; gap: 8px;
}

/* jNFT 操作 tabs：更像分段控件 */
.op-page .jnft-action-tabs { margin-bottom: 18px; }
.jnft-action-tab { padding: 9px 16px; font-size: 13px; font-weight: 500; }

/* 关键数值横排：放大数值、拉开间距、卡片化 */
.op-page .compact-meta-row {
  gap: 12px; padding: 14px 16px; border-radius: var(--radius);
}
.op-page .compact-meta-row .cm-lbl { font-size: 11px; }
.op-page .compact-meta-row .cm-val { font-size: 15px; }

/* 金额输入：更醒目 */
.op-page .form-input.amount-input { font-size: 22px; padding: 12px 14px; }
.op-page .input-group.with-unit .form-input.amount-input,
.op-page .input-group:has(.input-unit) .form-input.amount-input { padding-right: 96px; }
.op-page .form-label { font-size: 12.5px; margin-bottom: 8px; }

/* 快捷额度按钮：更大更易点 */
.op-page .quick-btns { gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.op-page .quick-btn { padding: 7px 14px; font-size: 12px; border-radius: 8px; }

/* 健康值变化线：放大数值 */
.op-page .health-change-line { padding: 14px 16px; }
.op-page .health-change-line .hc-val { font-size: 19px; }

/* 质押页：NFT 封面 + 提单信息 合并布局 */
.stake-bl-merged { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: stretch; }
.stake-bl-cover { min-height: 180px; }
.stake-bl-info { display: flex; flex-direction: column; justify-content: center; }
.stake-bl-info .detail-row { padding: 7px 0; border-bottom: 1px solid var(--border); }
.stake-bl-info .detail-row:last-child { border-bottom: none; }
@media (max-width: 720px) {
  .stake-bl-merged { grid-template-columns: 1fr; gap: 12px; }
  .stake-bl-cover { min-height: 150px; }
}

/* 打包提单组成列表（质押页 / jNFT 卡）*/
.stake-bl-comp {
  margin-top: 10px; padding: 12px 14px;
  background: rgba(163,113,247,.06); border: 1px solid rgba(163,113,247,.25);
  border-radius: var(--radius);
}
.stake-bl-comp .sbc-title { font-size: 12px; font-weight: 600; color: #c4b5fd; margin-bottom: 8px; }
.stake-bl-comp .sbc-item {
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 10px; align-items: center;
  padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.06); font-size: 12.5px;
}
.stake-bl-comp .sbc-item:last-of-type { border-bottom: none; }
.stake-bl-comp .sbc-cargo { color: var(--text-muted); }
.stake-bl-comp .sbc-val { text-align: right; font-weight: 600; }
.stake-bl-comp .sbc-note { font-size: 11px; color: var(--text-muted); margin-top: 8px; }

/* 确认弹窗内的 jNFT 凭证预览（质押确认后展示）*/
.confirm-jnft-preview {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(124,58,237,.04));
  border: 1px solid rgba(163,113,247,.32); border-radius: var(--radius-lg);
}
.confirm-jnft-preview .cjp-cover { width: 150px; flex: none; }
.confirm-jnft-preview .cjp-info { flex: 1; min-width: 0; }
.confirm-jnft-preview .cjp-tag { font-size: 11px; color: #a78bfa; font-weight: 600; margin-bottom: 3px; }
.confirm-jnft-preview .cjp-id { font-size: 20px; font-weight: 700; }
.confirm-jnft-preview .cjp-sub { margin-top: 4px; }
@media (max-width: 720px) {
  .confirm-jnft-preview { flex-direction: column; align-items: stretch; }
  .confirm-jnft-preview .cjp-cover { width: 100%; }
}

/* 内联确认操作块（替代底部固定操作栏，紧贴被操作内容）*/
.op-confirm {
  margin-top: 14px; padding: 14px 16px;
  background: linear-gradient(180deg, rgba(124,58,237,.06), rgba(124,58,237,.02));
  border: 1px solid rgba(163,113,247,.28);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 10px;
}
.op-confirm-summary { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.op-confirm-summary strong { color: var(--text); }
.op-confirm .btn { width: 100%; }

/* 全额还款大数字卡 */
.repay-amount-hero {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; text-align: center; margin-bottom: 14px;
}
.repay-amount-hero .rah-lbl { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.repay-amount-hero .rah-num { font-size: 30px; font-weight: 700; color: var(--red); letter-spacing: .01em; }
.repay-amount-hero .rah-sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

@media (max-width: 720px) {
  .op-head .page-title { font-size: 18px; }
  .op-page .form-input.amount-input { font-size: 20px; }
}