/* ============================================================
   会员工作自动化系统 · 前端样式（手机优先，PC 自适应）
   文件：assets/css/zdh.css
   ============================================================ */
:root{
  --g:#18a058; --g-dark:#0f8a4a; --g-soft:#e9f7ef; --g-line:#c9ecd8;
  --ink:#15202b; --sub:#64748b; --faint:#94a3b8;
  --line:#e6eaf0; --bg:#f4f6f9; --card:#fff;
  --red:#d9534f; --red-soft:#fdecec;
  --orange:#e08a1e; --orange-soft:#fdf3e3;
  --blue:#2f6fed; --blue-soft:#eaf1ff;
  --radius:14px; --radius-sm:10px;
  --shadow:0 1px 2px rgba(16,24,40,.04), 0 10px 28px rgba(16,24,40,.06);
  --shadow-sm:0 1px 2px rgba(16,24,40,.05);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--bg); color:var(--ink); font-size:14px; line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--g);text-decoration:none}
a:hover{color:var(--g-dark)}
h1,h2,h3,h4,p{margin:0}
img{max-width:100%}
.hide{display:none !important}
.muted{color:var(--sub)}
.small{font-size:12.5px}
.mono{font-family:ui-monospace,SFMono-Regular,Consolas,"Courier New",monospace}
.center{text-align:center}
.right{text-align:right}
.nowrap{white-space:nowrap}
.row{display:flex;align-items:center;gap:10px}
.between{display:flex;align-items:center;justify-content:space-between;gap:12px}
.wrap{flex-wrap:wrap}
.grow{flex:1;min-width:0}
.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt24{margin-top:24px}.mt32{margin-top:32px}
.mb8{margin-bottom:8px}.mb12{margin-bottom:12px}.mb16{margin-bottom:16px}.mb24{margin-bottom:24px}

/* ---------------- 登录 / 开通页 ---------------- */
.auth{
  min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px 16px;
  background:
    radial-gradient(1100px 520px at 12% -12%, #e6f8ed 0, rgba(230,248,237,0) 62%),
    radial-gradient(900px 460px at 102% -6%, #ebf2ff 0, rgba(235,242,255,0) 58%),
    var(--bg);
}
.auth-card{width:100%;max-width:420px;background:var(--card);border-radius:20px;box-shadow:var(--shadow);padding:34px 32px 30px;border:1px solid #eef1f5}
.auth-card.wide{max-width:860px}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}
.auth-brand .logo{width:44px;height:44px;font-size:18px}
.auth-brand b{display:block;font-size:17px;letter-spacing:.2px}
.auth-brand small{display:block;color:var(--sub);font-size:12px;margin-top:1px}
.auth-title{font-size:22px;font-weight:700;letter-spacing:.2px}
.auth-sub{color:var(--sub);font-size:13px;margin-top:6px}
.auth-foot{margin-top:22px;padding-top:18px;border-top:1px dashed var(--line);display:flex;justify-content:space-between;font-size:13px;color:var(--sub)}
.logo{
  width:38px;height:38px;border-radius:11px;flex:0 0 auto;
  background:linear-gradient(135deg,#22b467,#0d8548);color:#fff;
  display:grid;place-items:center;font-weight:800;font-size:15px;
  box-shadow:0 6px 14px rgba(24,160,88,.28);
}
.tip{background:var(--g-soft);border:1px solid var(--g-line);color:#14663f;border-radius:10px;padding:10px 12px;font-size:12.5px;line-height:1.6}
.tip.warn{background:var(--orange-soft);border-color:#f3ddb9;color:#8a5a12}
.tip.gray{background:#f6f8fa;border-color:var(--line);color:var(--sub)}

/* ---------------- 后台应用外壳 ---------------- */
.shell{display:flex;min-height:100vh}
.side{
  width:228px;flex:0 0 228px;background:#0f1720;color:#cfd8e3;
  padding:18px 14px;display:flex;flex-direction:column;gap:6px;position:sticky;top:0;height:100vh;
}
.side .brand{display:flex;align-items:center;gap:10px;padding:6px 8px 16px;color:#fff}
.side .brand b{display:block;font-size:15px;letter-spacing:.3px}
.side .brand small{display:block;color:#8fa0b3;font-size:11.5px;letter-spacing:.5px}
.side .nav{display:flex;flex-direction:column;gap:2px}
.side .nav a{
  display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:9px;
  color:#c3cedb;font-size:13.5px;transition:.15s;
}
.side .nav a svg{width:17px;height:17px;opacity:.85;flex:0 0 auto}
.side .nav a:hover{background:#1b2734;color:#fff}
.side .nav a.active{background:linear-gradient(90deg,rgba(24,160,88,.95),rgba(24,160,88,.72));color:#fff;box-shadow:0 6px 16px rgba(24,160,88,.25)}
.side .nav .nav-title{font-size:11px;color:#6f8095;padding:14px 12px 4px;letter-spacing:1px}
.side-foot{margin-top:auto;padding:12px;border-top:1px solid #1e2b39;font-size:11.5px;color:#6f8095;line-height:1.6}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{
  height:62px;background:rgba(255,255,255,.92);backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;
  padding:0 24px;position:sticky;top:0;z-index:30;
}
.topbar .page-crumb{color:var(--sub);font-size:13px}
.topbar .spacer{flex:1}
.chip{display:inline-flex;align-items:center;gap:6px;background:#f7f9fb;border:1px solid var(--line);border-radius:999px;padding:5px 12px;font-size:12.5px;color:#334155}
.chip b{color:var(--g-dark)}
.avatar{width:32px;height:32px;border-radius:50%;background:var(--g-soft);color:var(--g-dark);display:grid;place-items:center;font-weight:700;font-size:13px}
.content{padding:24px;max-width:1240px;width:100%;margin:0 auto}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:20px;flex-wrap:wrap}
.page-head h1{font-size:21px;letter-spacing:.2px}
.page-head p{color:var(--sub);font-size:13px;margin-top:4px}

/* ---------------- 卡片 / 统计 ---------------- */
.card{background:var(--card);border:1px solid #edf0f4;border-radius:var(--radius);box-shadow:var(--shadow-sm)}
.card-hd{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid #f0f3f7}
.card-hd h3{font-size:15px}
.card-bd{padding:18px}
.card-bd.tight{padding:10px 6px}
.grid{display:grid;gap:16px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-side{grid-template-columns:minmax(0,1.55fr) minmax(280px,.8fr);align-items:start}
.stat{background:var(--card);border:1px solid #edf0f4;border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow-sm)}
.stat .label{color:var(--sub);font-size:12.5px}
.stat .num{font-size:26px;font-weight:750;letter-spacing:.3px;margin-top:6px;font-variant-numeric:tabular-nums}
.stat .num small{font-size:13px;font-weight:600;color:var(--sub);margin-left:3px}
.stat .foot{font-size:12px;color:var(--faint);margin-top:4px}
.num-g{color:var(--g-dark)}
.num-r{color:var(--red)}
.num-o{color:var(--orange)}

/* ---------------- 按钮 ---------------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  height:38px;padding:0 16px;border-radius:9px;border:1px solid var(--line);
  background:#fff;color:#334155;font-size:13.5px;font-weight:600;cursor:pointer;
  transition:.15s;white-space:nowrap;font-family:inherit;
}
.btn:hover{border-color:#cfd8e3;background:#fafbfc;color:#0f1720}
.btn:active{transform:translateY(1px)}
.btn.primary{background:var(--g);border-color:var(--g);color:#fff;box-shadow:0 6px 14px rgba(24,160,88,.22)}
.btn.primary:hover{background:var(--g-dark);border-color:var(--g-dark);color:#fff}
.btn.danger{background:#fff;border-color:#f0c9c7;color:var(--red)}
.btn.danger:hover{background:var(--red-soft)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--sub)}
.btn.ghost:hover{background:#f1f4f8;color:var(--ink)}
.btn.sm{height:31px;padding:0 11px;font-size:12.5px;border-radius:8px}
.btn.block{width:100%;height:44px;font-size:15px;border-radius:10px}
.btn:disabled,.btn.disabled{opacity:.55;cursor:not-allowed;box-shadow:none}
.btn-row{display:flex;gap:10px;flex-wrap:wrap}

/* ---------------- 表单 ---------------- */
.field{margin-bottom:16px}
.field > label{display:block;font-size:13px;font-weight:600;color:#334155;margin-bottom:7px}
.field .hint{color:var(--faint);font-size:12px;margin-top:6px}
.input,.select,.textarea{
  width:100%;border:1px solid #dfe5ec;border-radius:9px;padding:10px 12px;
  font-size:14px;color:var(--ink);background:#fff;outline:none;transition:.15s;font-family:inherit;
}
.input:focus,.select:focus,.textarea:focus{border-color:var(--g);box-shadow:0 0 0 3px rgba(24,160,88,.12)}
.input::placeholder,.textarea::placeholder{color:#a9b3c1}
.textarea{resize:vertical;min-height:92px;line-height:1.7}
.input-group{display:flex;gap:8px}
.input-group .input{flex:1}
.check{display:flex;align-items:flex-start;gap:8px;font-size:13px;color:#475569;cursor:pointer;line-height:1.6}
.check input{margin-top:3px;accent-color:var(--g);width:15px;height:15px;flex:0 0 auto}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.err-text{color:var(--red);font-size:12.5px;margin-top:8px;min-height:18px}

/* ---------------- 表格 ---------------- */
.table-wrap{overflow:auto}
.table{width:100%;border-collapse:collapse;font-size:13px}
.table th{
  text-align:left;font-weight:600;color:var(--sub);background:#f8fafc;
  padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap;font-size:12.5px;
}
.table td{padding:11px 12px;border-bottom:1px solid #f2f5f8;vertical-align:middle}
.table tbody tr:hover{background:#fbfcfd}
.table tr:last-child td{border-bottom:none}
.table .num{font-variant-numeric:tabular-nums}

/* ---------------- 徽标 ---------------- */
.badge{display:inline-flex;align-items:center;gap:4px;padding:2px 9px;border-radius:999px;font-size:11.5px;font-weight:600;line-height:1.7;white-space:nowrap}
.badge.g{background:var(--g-soft);color:#127a42}
.badge.gray{background:#f1f4f8;color:#5b6b7c}
.badge.o{background:var(--orange-soft);color:#9a6212}
.badge.r{background:var(--red-soft);color:#b23c39}
.badge.b{background:var(--blue-soft);color:#2a5fd0}
.dot{width:6px;height:6px;border-radius:50%;background:currentColor;display:inline-block}

/* ---------------- 标签页 / 分段 ---------------- */
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:16px;overflow:auto}
.tab{
  padding:9px 14px;font-size:13.5px;color:var(--sub);cursor:pointer;border-bottom:2px solid transparent;
  white-space:nowrap;background:none;border-top:none;border-left:none;border-right:none;font-family:inherit;
}
.tab.active{color:var(--g-dark);border-bottom-color:var(--g);font-weight:700}
.seg{display:inline-flex;background:#f1f4f8;border-radius:9px;padding:3px;gap:2px}
.seg button{border:none;background:transparent;padding:6px 14px;border-radius:7px;font-size:12.5px;color:var(--sub);cursor:pointer;font-family:inherit}
.seg button.active{background:#fff;color:var(--ink);font-weight:700;box-shadow:var(--shadow-sm)}

/* ---------------- 工作流步骤 ---------------- */
.step-list{display:flex;flex-direction:column;gap:10px}
.step-card{
  display:flex;align-items:flex-start;gap:12px;border:1px solid var(--line);
  background:#fff;border-radius:11px;padding:13px 14px;transition:.15s;
}
.step-card:hover{border-color:#cfd8e3;box-shadow:var(--shadow-sm)}
.step-card.dragging{opacity:.45;border-style:dashed}
.step-card.drop-hint{border-color:var(--g);box-shadow:0 0 0 3px rgba(24,160,88,.12)}
.step-no{
  width:26px;height:26px;flex:0 0 auto;border-radius:8px;background:var(--g-soft);color:var(--g-dark);
  display:grid;place-items:center;font-weight:700;font-size:12.5px;margin-top:1px;
}
.step-main{flex:1;min-width:0}
.step-main b{font-size:13.5px;display:block}
.step-main .desc{color:var(--sub);font-size:12.5px;margin-top:2px}
.step-op{display:flex;gap:4px;align-items:center;color:var(--faint);flex:0 0 auto}
.icon-btn{
  width:28px;height:28px;border-radius:7px;border:1px solid transparent;background:transparent;
  color:var(--sub);cursor:pointer;display:grid;place-items:center;font-size:14px;
}
.icon-btn:hover{background:#f1f4f8;color:var(--ink)}
.drag-handle{cursor:grab;color:#b3bfcd;letter-spacing:2px;font-size:13px;padding:0 2px}
.act-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.act{
  border:1px solid var(--line);border-radius:11px;padding:12px 13px;cursor:pointer;background:#fff;
  transition:.15s;text-align:left;font-family:inherit;
}
.act:hover{border-color:var(--g-line);background:#fbfefc}
.act.on{border-color:var(--g);background:var(--g-soft)}
.act b{display:block;font-size:13px;color:var(--ink)}
.act span{display:block;color:var(--sub);font-size:11.5px;margin-top:2px}

/* ---------------- 弹窗 / 提示 ---------------- */
.mask{position:fixed;inset:0;background:rgba(15,23,32,.45);backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;padding:18px;z-index:100}
.mask.hide{display:none}
.dialog{width:100%;max-width:520px;background:#fff;border-radius:16px;box-shadow:0 24px 60px rgba(15,23,32,.28);overflow:hidden;animation:pop .16s ease-out}
.dialog.wide{max-width:760px}
@keyframes pop{from{transform:translateY(8px) scale(.985);opacity:0}to{transform:none;opacity:1}}
.dlg-hd{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid #f0f3f7}
.dlg-hd h3{font-size:15.5px}
.dlg-bd{padding:18px;max-height:66vh;overflow:auto;font-size:13.5px;line-height:1.75;white-space:pre-line}
.dlg-bd .table-wrap,.dlg-bd table{white-space:normal}
.dlg-ft{display:flex;justify-content:flex-end;gap:10px;padding:14px 18px;border-top:1px solid #f0f3f7;background:#fbfcfd}
.dlg-close{border:none;background:none;font-size:20px;color:var(--faint);cursor:pointer;line-height:1}
.toast-wrap{position:fixed;top:18px;left:50%;transform:translateX(-50%);z-index:200;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.toast{
  background:#15202b;color:#fff;font-size:13px;padding:9px 16px;border-radius:999px;
  box-shadow:0 10px 24px rgba(15,23,32,.22);animation:pop .16s ease-out;max-width:86vw;
}
.toast.ok{background:#14663f}
.toast.err{background:#a63a37}
.toast.warn{background:#8a5a12}

/* ---------------- 空状态 / 公告 ---------------- */
.empty{padding:44px 16px;text-align:center;color:var(--faint)}
.empty .ico{font-size:30px;opacity:.6;display:block;margin-bottom:8px}
.empty b{display:block;color:var(--sub);font-weight:600;font-size:13.5px}
.empty p{font-size:12.5px;margin-top:4px}
.notice-bar{
  display:flex;align-items:flex-start;gap:10px;background:linear-gradient(90deg,#f0faf4,#f7fdf9);
  border:1px solid var(--g-line);border-radius:11px;padding:11px 14px;font-size:12.8px;color:#1d5c3c;
}
.notice-bar b{flex:0 0 auto}
.notice-bar .x{margin-left:auto;color:#7ba890;cursor:pointer}

/* ---------------- 列表 ---------------- */
.list{display:flex;flex-direction:column}
.list-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid #f2f5f8}
.list-item:last-child{border-bottom:none}
.list-item .ic{width:34px;height:34px;border-radius:9px;background:#f3f6fa;display:grid;place-items:center;flex:0 0 auto;color:var(--sub)}
.list-item b{font-size:13.5px;font-weight:600}
.list-item .sub{color:var(--sub);font-size:12px;margin-top:1px}

/* ---------------- 进度 ---------------- */
.progress{height:7px;border-radius:99px;background:#eef2f6;overflow:hidden}
.progress > i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#26b46e,#128a4d);transition:width .3s}
.progress.thin{height:5px}

/* ---------------- 响应式 ---------------- */
@media (max-width:1040px){
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .act-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:900px){
  .shell{flex-direction:column}
  .side{position:static;width:auto;height:auto;flex-direction:column;padding:12px}
  .side .nav{flex-direction:row;overflow:auto;gap:4px;padding-bottom:2px}
  .side .nav a{white-space:nowrap;padding:7px 11px}
  .side .nav .nav-title{display:none}
  .side .brand{padding:2px 6px 10px}
  .side-foot{display:none}
  .topbar{padding:0 14px;height:56px}
  .content{padding:16px}
  .grid-2,.grid-3,.grid-4,.grid-side{grid-template-columns:1fr}
  .form-row{grid-template-columns:1fr}
  .page-head h1{font-size:19px}
}
@media (max-width:560px){
  .auth-card{padding:26px 20px;border-radius:16px}
  .act-grid{grid-template-columns:1fr}
  .stat .num{font-size:22px}
  .dlg-ft{flex-wrap:wrap}
  .dlg-ft .btn{flex:1}
}