/* ============================================================
     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-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); }

  /* 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);
  }
  .input-group:has(.input-unit) .form-input { padding-right: 64px; }
  /* 兼容旧 .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 {
    height: 160px;
    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; 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: 120px; 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; cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
  }
  .bundle-select-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
  .bundle-select-card input { display: none; }
  .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: 320px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow); z-index: 150;
    padding: 8px 0; max-height: 360px; overflow-y: auto;
  }
  .notif-panel.open { display: block; }
  .notif-panel-item {
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    font-size: 12px; cursor: pointer;
  }
  .notif-panel-item:hover { background: var(--bg-hover); }
  .notif-panel-item:last-child { border-bottom: none; }
  .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: 200;
    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-icon { font-size: 24px; margin-bottom: 8px; }

  /* ============================================================
     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; }
  .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-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-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(8, 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-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; }
    .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; }
    .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-3 { grid-template-columns: 1fr; }
  }