/* 企业支付宝批量转账系统 - 样式(对标 SaaS 工作台风格) */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --blue: #2f6bff;
  --blue-dark: #1f54d8;
  --blue-bg: #eef3ff;
  --bg: #f2f4f9;
  --card: #ffffff;
  --line: #e7ebf3;
  --text: #1e2430;
  --text2: #4a5468;
  --muted: #8a93a6;
  --red: #f5483b;
  --red-bg: #fff1f0;
  --green: #16a34a;
  --green-bg: #ecfdf3;
  --orange: #f59e0b;
  --orange-bg: #fff8eb;
  --gray-bg: #f1f3f8;
  --shadow: 0 1px 4px rgba(23, 43, 99, .06);
}
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: var(--blue); text-decoration: none; cursor: pointer; }

/* ---------- 布局 ---------- */
.layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 216px; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; border-bottom: 1px solid var(--line); }
.logo-icon {
  width: 36px; height: 36px; border-radius: 8px; background: var(--blue); color: #fff;
  font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-title { font-size: 15px; font-weight: 700; }
.logo-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.nav-group { font-size: 11px; color: var(--muted); padding: 12px 18px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 2px 10px;
  border-radius: 8px; color: var(--text2); font-size: 14px; cursor: pointer; user-select: none;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--gray-bg); }
.nav-item.active { background: var(--blue-bg); color: var(--blue); font-weight: 600; }
.sidebar-foot { padding: 12px 18px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); line-height: 1.6; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px; flex-shrink: 0;
}
.crumb { font-size: 14px; color: var(--text2); }
.crumb b { color: var(--text); font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text2); }
.top-tag { padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.top-tag.mock { background: var(--orange-bg); color: var(--orange); }
.top-tag.real { background: var(--green-bg); color: var(--green); }
.top-tag.acct { background: var(--blue-bg); color: var(--blue); }
.user-chip { display: flex; align-items: center; gap: 6px; }
.user-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.logout-link { color: var(--muted); }
.logout-link:hover { color: var(--red); }

.content { flex: 1; overflow-y: auto; padding: 20px 24px 40px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-title { font-size: 20px; font-weight: 700; }
.page-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.card-title .sub { font-size: 12px; color: var(--muted); font-weight: 400; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: 18px 20px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 8px; }
.stat-value.red { color: var(--red); }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 500;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid #f0f2f8; font-size: 13px; vertical-align: middle; }
.table tbody tr:hover { background: #f7f9fd; }
.table .num { font-variant-numeric: tabular-nums; }
.table-empty { text-align: center; color: var(--muted); padding: 36px 0 !important; font-size: 13px; }

/* ---------- 状态徽章 ---------- */
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.p-warn { background: var(--orange-bg); color: var(--orange); }
.p-blue { background: var(--blue-bg); color: var(--blue); }
.p-green { background: var(--green-bg); color: var(--green); }
.p-red { background: var(--red-bg); color: var(--red); }
.p-gray { background: var(--gray-bg); color: var(--muted); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 6px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text2); transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); background: var(--red-bg); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; }

/* ---------- 表单 ---------- */
.input, .select, .textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; color: var(--text); background: #fff; outline: none; transition: border .15s, box-shadow .15s;
  font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.textarea { resize: vertical; min-height: 84px; font-family: Consolas, monospace; font-size: 12px; }
.form-row { margin-bottom: 14px; }
.form-label { font-size: 13px; color: var(--text2); margin-bottom: 6px; display: block; }
.form-label .req { color: var(--red); }
.form-tip { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.6; }

/* ---------- 登录 ---------- */
.login-wrap { height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eef3ff 0%, #f7f9ff 60%, #f2f4f9 100%); }
.login-card { width: 380px; background: #fff; border-radius: 14px; box-shadow: 0 8px 40px rgba(23, 43, 99, .12); padding: 38px 36px; }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.login-title { font-size: 20px; font-weight: 700; }
.login-sub { color: var(--muted); font-size: 13px; margin: 6px 0 24px; }
.login-hint { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.8; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 12px; width: 560px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 12px 48px rgba(15, 23, 42, .25); }
.modal.wide { width: 780px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.modal-close:hover { background: var(--gray-bg); color: var(--text); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }

/* ---------- Toast ---------- */
#toast-root { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 20px; border-radius: 8px; font-size: 13px; box-shadow: 0 4px 16px rgba(15, 23, 42, .15); background: #fff; color: var(--text); animation: toastIn .2s ease; max-width: 70vw; }
.toast.success { background: var(--green-bg); color: var(--green); border: 1px solid #b7eb8f; }
.toast.error { background: var(--red-bg); color: var(--red); border: 1px solid #ffa39e; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 会员页主从布局 ---------- */
.member-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.member-list { max-height: calc(100vh - 210px); overflow-y: auto; }
.member-item { padding: 12px 14px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; border: 1px solid transparent; }
.member-item:hover { background: var(--gray-bg); }
.member-item.active { background: var(--blue-bg); border-color: #c9daff; }
.member-item .m-name { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; }
.member-item .m-info { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; justify-content: space-between; }
.member-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.member-title { font-size: 17px; font-weight: 700; }
.member-meta { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.7; }
.mini-stats { display: flex; gap: 22px; margin-bottom: 14px; padding: 12px 16px; background: var(--gray-bg); border-radius: 8px; }
.mini-stat .v { font-size: 18px; font-weight: 700; }
.mini-stat .k { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 登记订单弹窗 ---------- */
.ro-table { width: 100%; border-collapse: collapse; }
.ro-table th { font-size: 12px; color: var(--muted); text-align: left; padding: 6px 8px; font-weight: 500; }
.ro-table td { padding: 4px 4px; }
.ro-fill { display: flex; gap: 8px; align-items: center; margin: 10px 0; padding: 10px 12px; background: var(--gray-bg); border-radius: 8px; }
.ro-fill .input { width: 140px; }

/* ---------- 转账页 ---------- */
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; line-height: 1.7; }
.banner.info { background: var(--blue-bg); color: var(--blue-dark); }
.banner.warn { background: var(--orange-bg); color: #b45309; }
.transfer-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.transfer-bar .sum { font-size: 13px; color: var(--text2); }
.transfer-bar .sum b { color: var(--red); font-size: 16px; }

/* ---------- 对账页 ---------- */
.upload-box { border: 1.5px dashed #c9d4e8; border-radius: 10px; padding: 26px; text-align: center; color: var(--muted); font-size: 13px; line-height: 2; }
.upload-box b { color: var(--text2); }
.sum-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 8px; font-size: 13px; background: var(--gray-bg); color: var(--text2); }
.chip b { font-size: 15px; }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.red { background: var(--red-bg); color: var(--red); }
.chip.orange { background: var(--orange-bg); color: var(--orange); }
.chip.blue { background: var(--blue-bg); color: var(--blue); }
.session-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.session-item .s-name { font-weight: 600; font-size: 13px; }
.session-item .s-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.filter-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.filter-tab { padding: 5px 14px; border-radius: 20px; font-size: 12px; cursor: pointer; background: var(--gray-bg); color: var(--text2); border: 1px solid transparent; }
.filter-tab.active { background: var(--blue-bg); color: var(--blue); border-color: #c9daff; font-weight: 600; }

/* ---------- 账户卡片 ---------- */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.acct-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; position: relative; }
.acct-card.active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 107, 255, .1); }
.acct-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.acct-meta { font-size: 12px; color: var(--muted); margin: 8px 0 12px; line-height: 1.8; word-break: break-all; }
.active-badge { position: absolute; top: 14px; right: 14px; }
.help-block { background: var(--gray-bg); border-radius: 8px; padding: 14px 16px; font-size: 12px; color: var(--text2); line-height: 2; }
.help-block b { color: var(--text); }
.help-block code { background: #e3e9f5; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

/* ---------- 设置页 ---------- */
.switch { position: relative; width: 42px; height: 22px; display: inline-block; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 22px; cursor: pointer; transition: .2s; }
.slider:before { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--blue); }
.switch input:checked + .slider:before { transform: translateX(20px); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #f0f2f8; }
.setting-row:last-child { border-bottom: none; }
.setting-name { font-weight: 600; font-size: 14px; }
.setting-desc { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }

@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-2-1 { grid-template-columns: 1fr; }
  .member-layout { grid-template-columns: 1fr; }
}
