/* ============================================================
   绅诺仕 · 动态合伙人平台  —  全局样式
   定位：高级小程序工作台质感 · 轻奢 / 高端 / 整洁 / 卡片化 / 模块化
   自适应 H5：手机 + PC 响应式
   ============================================================ */
:root {
  --bg: #0d1117;                 /* 墨蓝黑基底，系统管理后台深色 */
  --bg-soft: #151b23;
  --card: #161d26;
  --ink: #e8edf3;                /* 浅色主文字 */
  --ink-2: #9aa8b8;              /* 次级文字 */
  --ink-3: #6d7a89;              /* 弱化文字 */
  --line: #2a3444;               /* 分隔线 */
  --gold: #d4b87e;               /* 主金（香槟金） */
  --gold-2: #e6d3a8;
  --gold-soft: #2c2618;          /* 金底（深色底） */
  --accent: #57c894;             /* 绿（信任色） */
  --accent-2: #6fd3a5;
  --red: #e57864;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .45);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .35);
  --sidebar-w: 240px;
  --tabbar-h: 58px;
  --gold-grad: linear-gradient(135deg, #e6d3a8 0%, #d4b87e 55%, #b49a63 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ---------- 通用工具 ---------- */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.spread { justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--ink-2); }
.tiny { color: var(--ink-3); font-size: 12px; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  border: 1px solid var(--line);
}
.card + .card { margin-top: 14px; }

/* ---------- 徽章 / 状态 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
}
.badge.base { background: #212c3a; color: #9aa8b8; }
.badge.business { background: var(--gold-soft); color: var(--gold); }
.badge.enabled { background: #1c3328; color: #57c894; }
.badge.disabled { background: #33211f; color: #d88a7a; }
.badge.blocked { background: #332a1d; color: #e0a45a; }

/* ---------- 骨架屏 ---------- */
.skel { position: relative; overflow: hidden; background: #212c3a; border-radius: 8px; min-height: 14px; }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  transform: translateX(-100%); animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- 空态 ---------- */
.empty { text-align: center; color: var(--ink-3); padding: 34px 16px; font-size: 13px; }
.empty .ic { font-size: 34px; display: block; margin-bottom: 8px; opacity: .5; }

/* ============================================================
   登录页
   ============================================================ */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  padding: 24px; position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 50% -10%, #1c2430 0%, var(--bg) 60%);
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 300px at 80% 100%, rgba(176,138,74,.12), transparent);
}
.login-card {
  width: 100%; max-width: 400px; position: relative;
  background: var(--card); border-radius: 24px; padding: 38px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); border: 1px solid var(--line);
}
.brand { text-align: center; margin-bottom: 28px; }
.brand .logo {
  width: 58px; height: 58px; border-radius: 16px; margin: 0 auto 14px;
  background: var(--gold-grad); display: grid; place-items: center;
  color: #fff; font-size: 26px; font-weight: 700; box-shadow: 0 8px 20px rgba(176,138,74,.35);
}
.brand h1 { font-size: 20px; letter-spacing: 1px; }
.brand p { color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 7px; font-weight: 600; }
.field input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-soft); font-size: 15px; color: var(--ink);
  transition: border .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(176,138,74,.13); }
.btn-primary {
  width: 100%; height: 48px; border-radius: 12px; font-size: 15px; font-weight: 700;
  color: #fff; background: var(--gold-grad); letter-spacing: 2px;
  box-shadow: 0 10px 24px rgba(176,138,74,.35); transition: transform .08s, opacity .2s;
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.login-err { color: var(--red); font-size: 12px; text-align: center; min-height: 18px; margin-top: 12px; }
.login-note { text-align: center; color: var(--ink-3); font-size: 11px; margin-top: 16px; }

/* ============================================================
   PC 中台管理后台（货架页）
   ============================================================ */
.pc-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: #151b23; color: #e9e2d6;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .s-brand {
  display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .s-logo {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--gold-grad); display: grid; place-items: center; color: #fff; font-weight: 700;
}
.sidebar .s-brand b { font-size: 15px; letter-spacing: .5px; }
.sidebar .s-brand span { display: block; font-size: 11px; color: #9b9286; }
.s-nav { padding: 14px 10px; flex: 1; }
.s-nav .nav-group-title {
  font-size: 11px; color: #8b8174; text-transform: uppercase; letter-spacing: 1px;
  padding: 12px 10px 6px;
}
.s-nav .nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: #cfc6b8; font-size: 13.5px; cursor: pointer; transition: background .15s;
  margin-bottom: 2px;
}
.s-nav .nav-item:hover { background: rgba(255,255,255,.06); }
.s-nav .nav-item.active { background: var(--gold-grad); color: #fff; font-weight: 600; }
.s-nav .nav-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); flex-shrink: 0; }
.s-nav .nav-item.active .dot { background: #fff; }
.s-nav .nav-sub { padding-left: 22px; }
.s-nav .nav-sub .nav-item { padding: 7px 12px; font-size: 12.5px; }

/* 六大体系手风琴菜单 */
.nav-acc { padding: 2px 0; }
.nav-acc-item { margin-bottom: 2px; }
.nav-acc-head {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 10px;
  color: #e0d8cb; font-size: 13px; cursor: pointer; transition: background .15s;
}
.nav-acc-head:hover { background: rgba(255,255,255,.06); }
.nav-acc-head .acc-ic { font-size: 14px; flex-shrink: 0; }
.nav-acc-head .acc-title { flex: 1; font-weight: 600; }
.nav-acc-head .acc-arrow {
  font-size: 11px; color: var(--gold-2); transition: transform .18s; flex-shrink: 0;
}
.nav-acc-item.open > .nav-acc-head { color: #fff; background: rgba(176,138,74,.16); }
.nav-acc-item.open > .nav-acc-head .acc-arrow { transform: rotate(90deg); }
.nav-acc-body { display: none; padding: 2px 0 6px; }
.nav-acc-item.open > .nav-acc-body { display: block; }
/* 十三大体系菜单：模块 + 权限点两级展示 */
.nav-mod-row { padding: 5px 14px 8px 26px; }
.nav-mod-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.nav-mod-name { font-size: 12.5px; font-weight: 600; color: #d9d2c6; }
.nav-mod-code { font-size: 10.5px; color: #8b8174; }
.nav-mod-keys { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-key-chip { font-size: 10px; color: #a99f92; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 1px 6px; }
.nav-mod-desc { font-size: 10.5px; color: #8b8174; }
/* 授权管理：作业工具勾选树 */
.grant-tools { display: flex; flex-direction: column; gap: 6px; }
.grant-tool-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.grant-tool-label { font-size: 13px; font-weight: 600; flex: 0 0 auto; }
.grant-tool-row .tiny { font-size: 10.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grant-tool-row select { height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #151b23; color: var(--ink); padding: 0 8px; font-size: 12px; flex-shrink: 0; }
.s-user {
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.s-user .avatar {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(176,138,74,.25);
  display: grid; place-items: center; color: var(--gold-2); font-weight: 700; flex-shrink: 0;
}
.s-user .u-name { font-size: 13px; font-weight: 600; }
.s-user .u-role { font-size: 11px; color: #8b8174; }
.s-user .logout { margin-left: auto; color: #a99f92; font-size: 12px; }
.s-user .logout:hover { color: #fff; }

.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-topbar {
  height: 60px; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 26px; position: sticky; top: 0; z-index: 5;
}
.pc-topbar h2 { font-size: 17px; font-weight: 700; }
.pc-topbar .crumb { color: var(--ink-3); font-size: 12px; }
.pc-content { padding: 24px 26px; max-width: 1200px; width: 100%; }

.shelf-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.module-card {
  background: var(--card); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); position: relative; transition: transform .14s, box-shadow .14s;
}
.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.module-card .mc-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.module-card .mc-icon {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 21px;
}
.mc-icon.base { background: #212c3a; }
.mc-icon.business { background: var(--gold-soft); }
.module-card .mc-title { font-size: 16px; font-weight: 700; }
.module-card .mc-code { font-size: 11px; color: var(--ink-3); font-family: ui-monospace, monospace; margin-top: 2px; }
.module-card .mc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.module-card .mc-section { margin-top: 14px; }
.module-card .mc-section h4 {
  font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}
.chip {
  font-size: 11px; padding: 3px 8px; border-radius: 7px; background: var(--bg-soft);
  border: 1px solid var(--line); color: var(--ink-2);
}
.chip.event-pub { background: #1c3328; border-color: #2a4a3a; color: #57c894; }
.chip.event-sub { background: #2c2618; border-color: #4a3d24; color: #e6d3a8; }
.chip.dep-missing { background: #33211f; border-color: #4a2c28; color: #e57864; }
.module-card .mc-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }

/* 模块卡片操作按钮 */
.mc-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn-mini {
  flex: 1; height: 32px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-2); transition: transform .08s;
}
.btn-mini:active { transform: scale(.97); }
.btn-mini.btn-config { border-color: var(--gold-2); color: var(--gold); background: var(--gold-soft); }
.btn-mini.btn-off { border-color: #4a2c28; color: #e57864; background: #33211f; }
.btn-mini.btn-on { border-color: #2a4a3a; color: #57c894; background: #1c3328; }

/* ============================================================
   配置抽屉 / 动态表单
   ============================================================ */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(30, 24, 18, .4); z-index: 80;
  display: flex; justify-content: flex-end;
}
.drawer {
  width: 100%; max-width: 440px; height: 100%; background: var(--bg-soft);
  box-shadow: -8px 0 30px rgba(40, 30, 16, .18); overflow-y: auto;
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-body { padding: 22px; }
.drawer-head { position: relative; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 16px; font-weight: 700; padding-right: 26px; }
.drawer-head .mc-code { margin-top: 4px; }
.drawer-close {
  position: absolute; top: 0; right: 0; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; color: var(--ink-3); font-size: 14px; background: var(--bg);
}
.drawer-actions { margin-top: 20px; }

/* 动态表单 */
.schema-form { display: flex; flex-direction: column; gap: 14px; }
.cfg-tip {
  margin: 12px 0 4px; padding: 12px 14px; border-radius: 10px;
  background: rgba(212, 184, 126, 0.10); border: 1px solid rgba(212, 184, 126, 0.28);
  font-size: 13px; line-height: 1.7; color: var(--gold-2);
}
.sf-head { padding: 2px 0 8px; }
.sf-group { margin-top: 8px; padding: 9px 13px; border-radius: 9px; background: rgba(212,184,126,.08); border-left: 3px solid var(--gold-2); font-size: 12.5px; font-weight: 700; color: var(--gold-2); letter-spacing: .3px; }
.sf-group:first-child { margin-top: 0; }
.sf-head b { font-size: 14px; }
.sf-head p { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.sf-row label { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.sf-row .sf-hint { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.sf-row input, .sf-row select {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 11px; font-size: 14px;
  border: 1px solid var(--line); background: #151b23; color: var(--ink);
}
.sf-row input:focus, .sf-row select:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(176,138,74,.13); }
.sf-mtree { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sf-mtree h4 { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.sf-mtree .chip { margin: 0 4px 4px 0; display: inline-block; }

/* 分润比例专用表单 */
.ratio-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ratio-field { position: relative; }
.ratio-field label { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.ratio-field input {
  width: 100%; height: 42px; padding: 0 34px 0 12px; border-radius: 11px; font-size: 15px;
  border: 1px solid var(--line); background: #151b23; color: var(--ink);
}
.ratio-field input:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(176,138,74,.13); }
.ratio-field .rf-unit { position: absolute; right: 12px; bottom: 12px; font-size: 12px; color: var(--ink-3); }
.ratio-sum { margin-top: 6px; font-size: 12.5px; font-weight: 600; }
.ratio-sum.ok { color: #57c894; }
.ratio-sum.bad { color: var(--red); }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
/* 修正：.sf-row label 的 display:block 会破坏 switch 的 flex 布局，导致文字截断 */
.sf-row label.switch { display: inline-flex; margin-bottom: 0; font-weight: 400; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i {
  width: 46px; height: 26px; border-radius: 999px; background: #4a5566; position: relative;
  transition: background .18s; flex-shrink: 0; border: 1px solid #5b687a;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #e8edf3; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .18s;
}
.switch input:checked + i {
  background: #2ecc71; border-color: #27ae60;
}
.switch input:checked + i::after { left: 23px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:disabled + i { background: #2a3444; opacity: .45; cursor: not-allowed; }
.switch input:disabled + i::after { background: #8a93a0; }
.switch input:disabled ~ span { color: var(--ink-3); }
.switch span { font-size: 12.5px; color: var(--ink-2); transition: color .18s, font-weight .18s; }
/* 开启时文字变绿色加粗，状态一目了然 */
.switch input:checked ~ span { color: #2ecc71; font-weight: 700; }

/* ============================================================
   结构蓝图（模块结构树）
   ============================================================ */
.blueprint { display: flex; flex-direction: column; gap: 12px; }
.bp-group { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); overflow: hidden; }
.bp-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer;
  background: var(--bg-soft); transition: background .15s;
}
.bp-head:hover { background: var(--gold-soft); }
.bp-head .bp-ic { font-size: 18px; }
.bp-head .bp-title { flex: 1; font-weight: 700; font-size: 14px; }
.bp-head .bp-arrow { font-size: 12px; color: var(--gold-2); transition: transform .18s; }
.bp-group.open > .bp-head .bp-arrow { transform: rotate(90deg); }
.bp-body { display: none; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.bp-group.open > .bp-body { display: block; }
.bp-module { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.bp-module:last-child { border-bottom: none; padding-bottom: 0; }
.bp-mhead { display: flex; align-items: center; gap: 10px; }
.bp-mhead .bp-mic {
  width: 36px; height: 36px; border-radius: 10px; background: var(--gold-soft);
  display: grid; place-items: center; font-size: 17px; flex-shrink: 0;
}
.bp-mhead b { font-size: 14px; }
.bp-mhead .badge { margin-left: auto; }
.bp-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.bp-chips .bp-label { font-size: 11px; color: var(--ink-3); margin-right: 4px; flex-shrink: 0; }

/* ============================================================
   组织架构树
   ============================================================ */
.org-panel { padding: 18px; }
.org-node { position: relative; }
.org-node .org-head {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); margin-bottom: 4px;
}
.org-node .org-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--gold-soft); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.org-node .col b { font-size: 13.5px; }
.org-node .col .tiny { font-size: 11px; }
.org-node .badge { margin-left: auto; }
.org-kids { margin-left: 20px; padding-left: 14px; border-left: 2px solid #2a3444; }

/* 规则类型空态 */
.rule-type-empty {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px dashed var(--line); background: var(--card); margin-bottom: 10px;
}
.rule-type-empty .rte-ic { font-size: 22px; width: 40px; height: 40px; border-radius: 11px; background: var(--bg-soft); display: grid; place-items: center; }
.rule-type-empty b { font-size: 13.5px; }
.rule-type-empty .badge { margin-left: auto; }

/* 规则引擎 / 财务分润 通用列表 */
.panel { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 22px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.rule-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px;
}
.rule-card.highlight { border-color: var(--gold-2); background: linear-gradient(180deg, #1c2430, #161d26); }
.rule-card .r-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.rule-card .r-desc { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.rate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 14px; }
.rate-cell { text-align: center; padding: 14px 8px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); }
.rate-cell .r-num { font-size: 24px; font-weight: 800; }
.rate-cell .r-name { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.rate-cell.partner .r-num { color: var(--gold); }
.rate-cell.platform .r-num { color: var(--accent); }
.rate-bar { height: 6px; border-radius: 3px; background: #2a3444; margin-top: 8px; overflow: hidden; }
.rate-bar > i { display: block; height: 100%; background: var(--gold-grad); border-radius: 3px; }

/* ============================================================
   合伙人 H5 工作台（底部 4 Tab）
   ============================================================ */
.h5-shell { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: calc(var(--tabbar-h) + 12px); }
.h5-shell::before { content: ""; position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 560px; height: 100%; background: var(--bg); z-index: -1; box-shadow: 0 0 0 0 rgba(0,0,0,0); }
.h5-head {
  padding: 20px 18px 0; display: flex; align-items: center; justify-content: space-between;
}
.h5-head .hello { font-size: 18px; font-weight: 800; }
.h5-head .hello span { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; margin-top: 3px; }
.h5-head .mini-avatar {
  width: 42px; height: 42px; border-radius: 14px; background: var(--gold-grad);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px;
}
.h5-body { padding: 16px 16px 0; }

/* 首页 */
.hero {
  border-radius: 20px; padding: 26px 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #26201a 0%, #3a2f20 55%, #5a4526 100%);
  box-shadow: 0 14px 34px rgba(40,30,16,.3);
}
.hero::after { content: ""; position: absolute; right: -30px; top: -30px; width: 160px; height: 160px; border-radius: 50%; background: rgba(176,138,74,.28); }
.hero h2 { font-size: 22px; letter-spacing: 1px; font-weight: 800; }
.hero p { font-size: 13px; opacity: .82; margin-top: 8px; max-width: 320px; }
.hero .hero-tag { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .hero-tag span { font-size: 11px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.15); }
.section-title { font-size: 15px; font-weight: 700; margin: 22px 2px 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--gold-grad); }
.sys-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sys-card {
  background: var(--card); border-radius: var(--radius); padding: 16px; border: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm);
}
.sys-card .sys-ic {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 20px; background: var(--gold-soft);
}
.sys-card b { font-size: 13.5px; display: block; }
.sys-card span { font-size: 11px; color: var(--ink-3); }
.trust-card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 18px; }
.trust-card .tc-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.trust-card .tc-item:last-child { border-bottom: none; padding-bottom: 0; }
.trust-card .tc-ic { font-size: 20px; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-soft); display: grid; place-items: center; flex-shrink: 0; }
.trust-card b { font-size: 13.5px; }
.trust-card p { font-size: 12px; color: var(--ink-2); margin-top: 3px; }

/* 滚动大厅 ticker */
.ticker {
  background: #1c1814; border-radius: 14px; padding: 12px 14px; overflow: hidden;
  display: flex; align-items: center; gap: 0; margin-top: 14px; position: relative;
}
.ticker .tk-label {
  flex-shrink: 0; color: #d8be86; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  padding-right: 12px; border-right: 1px solid rgba(255,255,255,.12);
}
.ticker .tk-track { overflow: hidden; flex: 1; white-space: nowrap; }
.ticker .tk-inner { display: inline-block; animation: ticker 22s linear infinite; padding-left: 20px; }
.ticker .tk-inner span { color: #efe8dc; font-size: 12.5px; margin-right: 34px; }
.ticker .tk-inner b { color: #d8be86; font-weight: 700; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* 工作台卡片 */
.entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.entry-card {
  background: var(--card); border-radius: var(--radius); padding: 16px 10px; text-align: center;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .1s;
}
.entry-card:active { transform: scale(.96); }
.entry-card .en-ic {
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 14px;
  display: grid; place-items: center; font-size: 22px; background: var(--gold-soft);
}
.entry-card b { font-size: 13px; display: block; }
.entry-card span { font-size: 10.5px; color: var(--ink-3); }

/* 业务大厅 */
.hall-filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.hall-filter .pill {
  flex-shrink: 0; padding: 7px 15px; border-radius: 999px; font-size: 13px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
}
.hall-filter .pill.active { background: var(--gold-grad); color: #fff; border-color: transparent; font-weight: 600; }
.hall-pool-item {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--line);
  padding: 16px; margin-bottom: 12px;
}
.hall-pool-item .hp-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hall-pool-item .hp-no { font-weight: 700; font-size: 14px; }
.hall-pool-item .hp-tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--gold-soft); color: var(--gold); }
.hall-pool-item .hp-meta { font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 10px; }
.btn-grab {
  margin-top: 12px; width: 100%; height: 38px; border-radius: 10px; font-size: 13px; font-weight: 700;
  color: #fff; background: var(--gold-grad); letter-spacing: 1px;
}

/* 我的 —— 分润中心 */
.profile-head {
  background: linear-gradient(135deg, #26201a, #4a3b26); border-radius: 20px;
  padding: 26px 20px; color: #fff; display: flex; align-items: center; gap: 16px;
  position: relative; overflow: hidden;
}
.profile-head .ph-av {
  width: 62px; height: 62px; border-radius: 20px; background: var(--gold-grad);
  display: grid; place-items: center; font-size: 26px; color: #fff; flex-shrink: 0;
}
.profile-head b { font-size: 18px; }
.profile-head span { font-size: 12px; opacity: .7; }
.stat-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat-box { background: var(--card); border-radius: var(--radius-sm); border: 1px solid var(--line); padding: 14px 8px; text-align: center; }
.stat-box .n { font-size: 19px; font-weight: 800; }
.stat-box .l { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.opt-list { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.opt-list .opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.opt-list .opt:last-child { border-bottom: none; }
.opt-list .opt .oi { font-size: 18px; }
.opt-list .opt .arr { margin-left: auto; color: var(--ink-3); }

/* H5 管理子页面：返回条 + 列表容器 */
.h5-back { padding: 4px 0 12px; }
.h5-back a {
  display: inline-block; font-size: 13px; color: var(--gold); font-weight: 600;
  cursor: pointer; padding: 4px 0;
}
.h5-listbox { display: flex; flex-direction: column; gap: 12px; }

/* H5 复用 PC 视图（loadXxxView 渲染到 #pc-content）时的手机适配 */
.h5-shell #pc-content { display: block; overflow-x: auto; padding-bottom: 70px; }
.h5-shell #pc-content .data-table { min-width: 620px; }
.h5-shell #pc-content .panel-head { flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.h5-shell #pc-content .panel-head .section-title { flex: 1 1 100%; }

/* 底部 TabBar */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px; height: var(--tabbar-h);
  background: rgba(21,27,35,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); display: flex; z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-3); font-size: 10.5px; font-weight: 600;
}
.tabbar .tab .ti { font-size: 20px; line-height: 1; }
.tabbar .tab.active { color: var(--gold); }
.tabbar .tab.active .ti { transform: translateY(-1px); }

/* 加载态 */
.loading { display: grid; place-items: center; padding: 40px; color: var(--ink-3); font-size: 13px; }
.loading .spin { font-size: 22px; margin-bottom: 8px; color: var(--gold-2); }

/* 提示 */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: #26201a; color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 10px;
  z-index: 99; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }

/* ---------- 响应式 : PC 中台 / 手机 ---------- */
@media (max-width: 640px) {
  .pc-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; padding: 8px 12px; }
  .sidebar .s-brand { padding: 0; border: none; }
  .sidebar .s-brand span { display: none; }
  .s-nav { display: flex; padding: 0; overflow-x: auto; }
  .s-nav .nav-group-title { display: none; }
  .s-nav .nav-item { white-space: nowrap; padding: 8px 12px; margin: 0 2px; }
  .s-nav .nav-sub { display: none; }
  .s-user { border: none; padding: 0 12px; }
  .s-user .u-role { display: none; }
  .pc-topbar { padding: 0 16px; }
  .pc-content { padding: 16px; }
  .shelf-grid { grid-template-columns: 1fr; }
  .drawer { max-width: 100%; }
}

/* ============ 系统基座（账号/岗位/授权/标签/审计）新增样式 ============ */

/* 通用数据表 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th {
  text-align: left; padding: 10px 12px; color: var(--ink-3); font-size: 11.5px;
  font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table tbody td {
  padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--ink);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--bg-soft); }
.data-table .cell-actions { white-space: nowrap; }
.data-table .cell-actions .btn-mini { margin-right: 6px; }

/* 面板头部（标题 + 操作按钮） */
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head .btn-primary { margin-left: 12px; flex-shrink: 0; }

/* 组织树节点内联操作 */
.org-node .org-ops { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.org-node .org-ops .op {
  font-size: 12px; color: var(--ink-3); cursor: pointer; padding: 2px 5px; border-radius: 6px;
  transition: color .15s, background .15s;
}
.org-node .org-ops .op:hover { color: var(--gold); background: var(--gold-soft); }
.org-node .org-ops .op[data-op=del]:hover { color: #e57864; background: #33211f; }
.org-node .badge { margin-left: 0; }

