/* ===================================================================
   Shopify ERP — 设计系统（现代浅色 · 蓝青主色）
   =================================================================== */
:root {
  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --surface-2: #FAFCFE;
  --border: #E7ECF3;
  --border-strong: #D8E1EC;

  --text: #0F172A;
  --text-2: #475569;
  --muted: #8496AC;

  --primary: #0891B2;
  --primary-dark: #0E7490;
  --primary-soft: rgba(8, 145, 178, 0.09);
  --primary-softer: rgba(8, 145, 178, 0.05);
  --grad: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);

  --success: #10B981;
  --warn: #F59E0B;
  --danger: #EF4444;
  --success-soft: rgba(16, 185, 129, 0.12);
  --warn-soft: rgba(245, 158, 11, 0.14);
  --danger-soft: rgba(239, 68, 68, 0.12);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
  --shadow: 0 4px 14px rgba(15, 23, 42, .06), 0 12px 32px rgba(15, 23, 42, .05);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .16);
  --sidebar-w: 236px;
  --content-w: 1320px;
  --gutter: clamp(16px, 2.4vw, 28px);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 100% -10%, rgba(6, 182, 212, .10), transparent 60%),
    radial-gradient(900px 480px at -10% 0%, rgba(14, 165, 233, .10), transparent 55%);
  background-attachment: fixed;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 8px 20px rgba(14, 165, 233, .35);
}
img.brand-logo { background: transparent; display: block; object-fit: contain; }
.brand-text b { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand-text span { font-size: 11px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.nav-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .08em; padding: 10px 10px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px;
  color: var(--text-2); font-weight: 600; font-size: 13.5px;
  border: 1px solid transparent;
  transition: all .16s ease;
}
.nav-item .ico { width: 20px; text-align: center; font-size: 15px; }
.nav-item:hover { background: var(--primary-softer); color: var(--primary-dark); }
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: rgba(8, 145, 178, .18);
  box-shadow: inset 3px 0 0 var(--primary);
}
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.user-chip .uname { font-weight: 700; font-size: 13px; }
.user-chip .urole { font-size: 11px; color: var(--muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  width: 100%;
  /* 左右内边距随居中列的位置动态增大，保证顶栏内容与下方卡片左边缘严格对齐 */
  padding: 16px max(var(--gutter), calc((100% - var(--content-w)) / 2 + var(--gutter)));
  background: rgba(244, 247, 251, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { width: 100%; display: flex; align-items: center; gap: 16px; }
.topbar h2 { font-size: 19px; }
.topbar .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.content {
  padding: 24px var(--gutter) 48px;
  max-width: var(--content-w);
  width: 100%;
  margin: 0 auto;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; }
.card-head .hint { margin-left: auto; font-size: 12px; color: var(--muted); }

.section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin: 6px 2px 12px; }
.section-title .dot { width: 6px; height: 18px; border-radius: 4px; background: var(--grad); }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); opacity: .9; }
.kpi .k-label { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-size: 27px; font-weight: 800; margin-top: 10px; letter-spacing: -.02em; }
.kpi .k-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi .k-icon {
  position: absolute; right: 16px; top: 16px;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary-softer); color: var(--primary);
  display: grid; place-items: center; font-size: 16px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2);
  font-weight: 600; font-size: 13px;
  transition: all .16s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(8,145,178,.15); }
.btn:active { transform: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 8px 20px rgba(14,165,233,.30); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(14,165,233,.40); }
.btn-danger { color: var(--danger); border-color: rgba(239,68,68,.35); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--primary-softer); border-color: transparent; }

/* ---------- chips / segmented ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group > label { font-size: 12px; font-weight: 700; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); font-size: 12.5px; font-weight: 600;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.seg { display: inline-flex; background: #EEF3F9; border-radius: 11px; padding: 3px; gap: 2px; }
.seg button {
  border: none; background: transparent; color: var(--text-2);
  padding: 7px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  transition: all .15s ease;
}
.seg button.on { background: var(--surface); color: var(--primary-dark); box-shadow: var(--shadow-sm); }

/* ---------- 输入 ---------- */
.input, .select {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text);
  transition: all .15s ease;
}
.input:focus, .select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.search { position: relative; flex: 1; min-width: 200px; }
.search .input { padding-left: 34px; }
.search .s-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--text-2); }
textarea.input { resize: vertical; min-height: 74px; line-height: 1.55; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700;
}
.badge .b-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending { background: var(--danger-soft); color: #B91C1C; }
.badge.ready   { background: var(--warn-soft); color: #B45309; }
.badge.shipped { background: var(--success-soft); color: #047857; }
.badge.onhold  { background: #EEF0F4; color: #5B6472; }
.badge.info    { background: var(--primary-soft); color: var(--primary-dark); }
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 8px;
  background: var(--primary-softer); color: var(--primary-dark);
  font-size: 11.5px; font-weight: 600;
}

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted);
  letter-spacing: .04em; text-transform: uppercase;
  padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-2); }
.table .num { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }

/* ---------- 订单卡片 ---------- */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: all .16s ease;
}
.order-card:hover { border-color: rgba(8,145,178,.35); box-shadow: var(--shadow); transform: translateY(-1px); }
.thumb {
  width: 74px; height: 74px; border-radius: 11px;
  background: #EEF3F9; overflow: hidden;
  display: grid; place-items: center; color: var(--muted); font-size: 20px;
  border: 1px solid var(--border);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.order-no { font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.order-meta {
  display: grid;
  grid-template-columns: 148px minmax(120px, 1fr) 86px minmax(140px, 1.1fr) 128px;
  gap: 6px 16px; margin-top: 9px;
}
.meta-item { font-size: 12.5px; color: var(--text-2); display: flex; gap: 6px; min-width: 0; }
.meta-item .m-ico { color: var(--muted); width: 14px; text-align: center; }
.meta-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.amount { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.order-note { margin-top: 8px; font-size: 12.5px; color: #B91C1C; font-weight: 600; display: flex; gap: 6px; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; }
.pager .p-info { font-size: 12.5px; color: var(--muted); }
.pager button {
  min-width: 34px; height: 34px; padding: 0 10px;
  border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13px;
  transition: all .15s ease;
}
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager button.on { background: var(--grad); border: none; color: #fff; box-shadow: 0 6px 16px rgba(14,165,233,.3); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 抽屉 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(2px); z-index: 60;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 94vw);
  background: var(--surface); z-index: 61;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slide-in .22s cubic-bezier(.22,.61,.36,1);
}
@keyframes slide-in { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { font-size: 17px; }
.drawer-body { padding: 20px 22px; overflow-y: auto; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; margin-top: auto; }
.close-x { margin-left: auto; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 16px; }
.close-x:hover { color: var(--danger); border-color: var(--danger); }

.kv { display: grid; grid-template-columns: 84px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--text); word-break: break-word; }
.items { display: flex; flex-direction: column; gap: 10px; }
.item-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 9px; border: 1px solid var(--border); border-radius: 11px; }
.item-row .thumb { width: 52px; height: 52px; border-radius: 9px; font-size: 15px; }
.item-title { font-size: 13px; font-weight: 600; }
.item-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.item-props { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 5px; }
.order-props { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.prop-chip { font-size: 11px; color: #b45309; background: #fef3c7; border: 1px solid #fde68a; border-radius: 6px; padding: 1px 7px; font-weight: 600; }
.item-price { font-weight: 700; font-size: 13px; }

/* ---------- 可点击文本（复制订单号 / 跳转商品页） ---------- */
.copyable { cursor: pointer; transition: color .15s; }
.copyable:hover { color: var(--primary); }
.copyable.is-empty { cursor: default; }
.copyable.is-empty:hover { color: inherit; }
.item-title a {
  color: inherit; text-decoration: none; border-bottom: 1px dashed transparent;
  transition: .15s;
}
.item-title a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- toast / 空态 ---------- */
/* 提示固定在上方居中，避免遮挡抽屉底部等处的按钮 */
.toasts { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.toast {
  min-width: 240px; max-width: 380px; padding: 12px 15px;
  border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 13px; font-weight: 600; display: flex; gap: 9px; align-items: flex-start;
  animation: fade-in-down .2s ease; pointer-events: auto;
}
@keyframes fade-in-down { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.ok { border-left: 3px solid var(--success); }
.toast.err { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--primary); }

.empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.empty .e-ico { font-size: 34px; margin-bottom: 10px; opacity: .7; }
.skeleton { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }
.spinner {
  width: 22px; height: 22px; margin: 0 auto 10px;
  border: 2.5px solid var(--border-strong); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(14,165,233,.18), transparent 58%),
    radial-gradient(800px 480px at 88% 92%, rgba(6,182,212,.20), transparent 58%),
    var(--bg);
}
.login-card {
  width: min(410px, 94vw);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; box-shadow: var(--shadow-lg);
  padding: 34px 32px 28px;
}
.login-logo {
  width: 54px; height: 54px; border-radius: 16px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: 24px; font-weight: 800;
  box-shadow: 0 14px 32px rgba(14,165,233,.38); margin-bottom: 18px;
}
img.login-logo { background: transparent; display: block; object-fit: contain; }
.login-card h1 { font-size: 22px; }
.login-card .l-sub { color: var(--muted); font-size: 13px; margin: 7px 0 22px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; padding: 11px; margin-top: 6px; }
.login-err {
  margin-top: 14px; padding: 10px 13px; border-radius: 10px;
  background: var(--danger-soft); color: #B91C1C; font-size: 12.5px; font-weight: 600;
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; z-index: 61; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(540px, 94vw); max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 22px 24px;
  animation: fade-up .18s ease;
}
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.modal-head h3 { font-size: 17px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---------- 账号 / 店铺状态徽章 ---------- */
.badge.active { background: var(--success-soft); color: #047857; }
.badge.inactive { background: var(--danger-soft); color: #B91C1C; }
.badge.disabled { background: var(--danger-soft); color: #B91C1C; }

/* ---------- 管理页 ---------- */
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.table td .actions { justify-content: flex-end; }

/* ---------- 退款徽章 ---------- */
.badge.refund { background: #FEE2E2; color: #B91C1C; }
/* 拒付（Chargeback）警示徽章 */
.badge.warn { background: var(--warn-soft); color: #B45309; border: 1px solid rgba(245, 158, 11, 0.45); }

/* ---------- 订单操作日志时间线 ---------- */
.timeline { display: flex; flex-direction: column; gap: 10px; padding-left: 6px; }
.tl-item { position: relative; display: flex; gap: 10px; padding-left: 14px; }
.tl-item::before {
  content: ""; position: absolute; left: 3px; top: 6px; bottom: -10px;
  width: 2px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  position: absolute; left: 0; top: 5px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary, #0891B2); box-shadow: 0 0 0 3px var(--surface-2, #F4F7FB);
}
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tl-action { font-weight: 700; font-size: 13px; }
.tl-detail { font-size: 13px; color: var(--text); margin-top: 2px; word-break: break-word; }

/* ---------- 报关信息（申报明细） ---------- */
.decl-table {
  overflow-x: auto; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); padding: 6px;
}
.decl-row {
  display: grid; gap: 6px; align-items: center; min-width: 640px;
  grid-template-columns: 1.3fr 1.3fr 74px 58px 74px 96px 40px;
  padding: 4px 2px;
}
.decl-row + .decl-row { border-top: 1px dashed var(--border); }
.decl-head {
  font-size: 12px; font-weight: 700; color: var(--muted);
  border-bottom: 1px solid var(--border); padding-bottom: 6px;
}
.decl-row .input { padding: 6px 8px; font-size: 13px; }
.decl-row .btn { padding: 6px 8px; }

/* ---------- 重复申请提示 ---------- */
.warn-box {
  margin: 8px 0; padding: 10px 13px; border-radius: 10px;
  background: var(--warn-soft); color: #B45309; font-size: 12.5px;
  font-weight: 600; border-left: 3px solid var(--warn);
}

/* ---------- 物流单号（可点击查看轨迹） ---------- */
.track-link {
  color: var(--primary); font-weight: 600; cursor: pointer; text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.track-link:hover { color: var(--primary-dark); border-bottom-style: solid; }

/* ---------- 列表内联图标按钮（打印面单等） ---------- */
.icon-btn {
  margin-left: 6px; padding: 0; width: 26px; height: 26px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer; transition: .15s;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text-2); vertical-align: middle;
}
.icon-btn:hover:not(:disabled) {
  border-color: var(--primary); color: var(--primary); background: var(--primary-soft);
}
.icon-btn:disabled { opacity: .38; cursor: not-allowed; }

/* ---------- 操作指引提示框 ---------- */
.help-box {
  margin: 4px 0 16px; padding: 14px 16px; border-radius: 12px;
  background: var(--primary-softer); border: 1px dashed var(--primary);
}
.help-title { font-weight: 700; color: var(--primary-dark); font-size: 13.5px; margin-bottom: 8px; }
.help-list { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 12.5px; line-height: 1.9; }
.help-list a { color: var(--primary); font-weight: 600; }
.help-scopes {
  margin-top: 4px; padding: 8px 10px; border-radius: 8px; word-break: break-all;
  background: var(--surface); border: 1px solid var(--border);
  font-family: ui-monospace, "Consolas", "Courier New", monospace; color: var(--text);
  list-style-position: inside;
}

/* ---------- 放款明细 ---------- */
.notice-bar {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 0 16px; padding: 12px 16px; border-radius: 12px;
  background: var(--warn-soft); border: 1px solid rgba(245, 158, 11, 0.45);
  color: #92400E; font-size: 13px; line-height: 1.6;
}
.p-row { cursor: pointer; }
.p-detail td { background: var(--surface-2); padding: 10px 16px 14px; }
.p-sum {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 20px;
  font-size: 12.5px;
}
.p-sum span { display: block; color: var(--muted); margin-bottom: 2px; }
.p-sum b { font-variant-numeric: tabular-nums; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .order-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .sidebar { position: fixed; z-index: 70; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .order-card { grid-template-columns: 62px 1fr; }
  .order-side { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .order-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: 1fr; }
}
