/* ============ 黑金卡管理系统 · 全局样式 ============ */
:root {
  --gold: #c8a86b;
  --gold-light: #e3c690;
  --gold-deep: #a7823c;
  --sidebar: #17191f;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1f2329;
  --text-2: #4e5560;
  --muted: #9298a3;
  --line: #e8eaef;
  --line-soft: #f0f2f5;
  --blue: #3f6fa8;
  --orange: #c07a1a;
  --green: #2b8a5e;
  --red: #b13b4c;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(23, 25, 31, .05);
  --shadow-lg: 0 18px 50px rgba(23, 25, 31, .18);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-size: 14px;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: 14px; color: inherit; }
.hidden { display: none !important; }

/* ---------- 控件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
  background: #fff; color: var(--text-2); cursor: pointer; white-space: nowrap;
  transition: all .18s ease; font-weight: 500;
}
.btn:hover { border-color: #d9dde4; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 15px; height: 15px; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: #241d10; border-color: transparent; font-weight: 600;
  box-shadow: 0 2px 8px rgba(200, 168, 107, .35);
}
.btn-gold:hover { color: #1a1409; filter: brightness(1.04); border-color: transparent; }
.btn-dark { background: var(--sidebar); color: #f2e4c6; border-color: transparent; }
.btn-dark:hover { color: #fff; background: #262932; }
.btn-green { background: var(--green); color: #fff; border-color: transparent; }
.btn-green:hover { background: #23744f; color: #fff; border-color: transparent; }
.btn-danger { background: #fff; color: var(--red); border-color: #f0c9cf; }
.btn-danger:hover { background: #fdf2f3; border-color: var(--red); color: var(--red); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-link {
  background: none; border: none; padding: 0 6px; height: 26px; border-radius: 5px;
  color: var(--gold-deep); cursor: pointer; font-size: 13px;
}
.btn-link:hover { background: #faf5e9; }
.btn-link.blue { color: var(--blue); }
.btn-link.blue:hover { background: #eff4fa; }
.btn-link.green { color: var(--green); }
.btn-link.green:hover { background: #ebf7f1; }
.btn-link.gray { color: var(--muted); }
.btn-link.gray:hover { background: var(--line-soft); }
.btn-link.red { color: var(--red); }
.btn-link.red:hover { background: #fdf0f2; }

input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="search"], select, textarea {
  height: 36px; padding: 0 12px; border: 1px solid #dcdfe6; border-radius: 8px;
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
textarea { padding: 9px 12px; height: auto; min-height: 76px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 168, 107, .16); }
input::placeholder, textarea::placeholder { color: #b6bbc4; }
select {
  appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239298a3' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
input[readonly] { background: #f7f8fa; color: var(--text-2); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field .req { color: var(--red); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.form-grid .col-span-2 { grid-column: span 2; }

/* ---------- 登录 ---------- */
.login-screen {
  position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 700px at 12% 8%, #2c303c 0%, #17191f 45%, #101116 100%);
}
.login-panel {
  width: 420px; max-width: calc(100% - 32px); background: #fff; border-radius: 18px;
  padding: 32px 34px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); border-top: 3px solid var(--gold);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.login-brand h1 { font-size: 21px; margin: 0 0 4px; letter-spacing: .5px; }
.login-brand p { margin: 0; color: var(--muted); font-size: 12.5px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #e6c98f, #b28d44); color: #1b1608;
  font-weight: 700; font-size: 15px; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}
.brand-mark.lg { width: 50px; height: 50px; border-radius: 13px; font-size: 18px; }
.login-submit { width: 100%; height: 42px; font-size: 15px; letter-spacing: 4px; margin-top: 14px; }
.login-error { color: var(--red); font-size: 12.5px; min-height: 18px; line-height: 18px; padding: 2px 2px 0; }
.login-foot { margin-top: 18px; font-size: 11.5px; color: #a9aeb8; text-align: center; line-height: 1.8; }

/* ---------- 框架 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 218px; flex: none; background: var(--sidebar); color: #cfd3db;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid #0e1015;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand-title { font-size: 16px; font-weight: 700; color: #f2e5c9; letter-spacing: 1px; }
.brand-sub { font-size: 10.5px; color: #7d8494; margin-top: 3px; letter-spacing: .3px; }
.nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 13px; border-radius: 9px;
  color: #aab0bd; cursor: pointer; font-size: 13.5px; position: relative; transition: all .15s;
}
.nav-item svg { width: 17px; height: 17px; opacity: .85; flex: none; }
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #e8ebf1; }
.nav-item.active { background: linear-gradient(90deg, rgba(200, 168, 107, .18), rgba(200, 168, 107, .04)); color: #ecd9b3; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 3px; background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
}
.sidebar-user { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 12px; color: #8e95a4; display: flex; align-items: center; gap: 10px; }
.sidebar-user .avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(200, 168, 107, .16); color: var(--gold-light); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; }
.sidebar-user .su-name { color: #e7eaf0; font-size: 13px; font-weight: 600; }
.sidebar-user .su-role { color: #7d8494; font-size: 11px; margin-top: 2px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; flex: none; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 26px;
  position: sticky; top: 0; z-index: 30;
}
.page-title { font-size: 18px; font-weight: 700; letter-spacing: .3px; }
.page-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 30px; }
.user-chip .avatar { width: 28px; height: 28px; border-radius: 50%; background: #f3eee2; color: var(--gold-deep); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.user-chip .uc-name { font-size: 13px; font-weight: 600; }
.user-chip .uc-role { font-size: 11px; color: var(--muted); }
.view { padding: 20px 26px 34px; }

/* ---------- 容器 ---------- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #edf0f4; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; gap: 12px; }
.panel-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, var(--gold-light), var(--gold-deep)); }
.panel-sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.panel-body { padding: 0 18px 18px; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 16px 18px; border: 1px solid #edf0f4; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card .stat-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.stat-card .stat-icon { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.stat-card .stat-icon svg { width: 14px; height: 14px; }
.stat-card .stat-val { font-size: 27px; font-weight: 700; margin-top: 8px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-card .stat-val small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-card .stat-note { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.stat-card.gold { background: linear-gradient(135deg, #1d2028, #2a2e39); color: #fff; border-color: #2a2e39; }
.stat-card.gold .stat-top, .stat-card.gold .stat-note { color: rgba(255, 255, 255, .62); }
.stat-card.gold .stat-val { color: #f0d9a8; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line-soft); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
table.data-table th { background: #f8f9fb; color: var(--text-2); font-weight: 600; font-size: 12.5px; text-align: left; padding: 11px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--text); }
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover td { background: #fbfaf6; }
table.data-table th.sortable { cursor: pointer; user-select: none; }
table.data-table th.sortable:hover { color: var(--gold-deep); }
table.data-table th .sort-mark { margin-left: 4px; color: var(--gold-deep); font-size: 11px; }
table.data-table td.num { font-variant-numeric: tabular-nums; }
table.data-table td.mono { font-family: Consolas, "Courier New", monospace; font-weight: 600; letter-spacing: .3px; }
table.data-table .empty-row td { text-align: center; color: var(--muted); padding: 46px 0; background: #fff; }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.amount.gold { color: var(--gold-deep); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.UNUSED { color: var(--blue); background: #eff3f9; }
.badge.SOLD { color: var(--orange); background: #fff5e6; }
.badge.REDEEMED { color: var(--green); background: #eaf7f1; }
.badge.VOID { color: var(--red); background: #fdeef0; }
.badge.GIFT { color: var(--gold-deep); background: #fbf5e6; }
.badge.SALE { color: #5d6472; background: #f2f3f6; }
.badge.ADMIN { color: var(--gold-deep); background: #faf3e3; }
.badge.SELLER { color: #4d6690; background: #eff3fa; }
.badge.REDEEMER { color: var(--green); background: #eaf7f1; }

/* ---------- 筛选 / Tab ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 18px; }
.toolbar .tb-field { display: flex; flex-direction: column; gap: 5px; }
.toolbar .tb-field label { font-size: 12px; color: var(--muted); }
.toolbar .tb-field input, .toolbar .tb-field select { width: 168px; height: 34px; }
.toolbar .tb-actions { display: flex; gap: 8px; margin-left: auto; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px 0; }
.tab { height: 32px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: all .15s; }
.tab:hover { border-color: var(--gold); color: var(--gold-deep); }
.tab.active { background: var(--sidebar); color: #f2e5c9; border-color: var(--sidebar); }
.tab .tab-count { font-size: 11.5px; padding: 0 6px; height: 17px; line-height: 17px; border-radius: 10px; background: #f2f3f6; color: var(--text-2); }
.tab.active .tab-count { background: rgba(255, 255, 255, .14); color: #f4e5c5; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 4px 2px; font-size: 12.5px; color: var(--text-2); }
.pager .pg-total { margin-right: auto; color: var(--muted); }
.page-btn { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 12.5px; }
.page-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-deep); }
.page-btn.active { background: var(--sidebar); color: #f0d9a8; border-color: var(--sidebar); }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-size { height: 30px; width: 92px; padding: 0 8px; font-size: 12.5px; border-radius: 7px; }

/* ---------- 弹窗 / 提示 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 17, 22, .45); z-index: 200;
  display: flex; align-items: flex-start; justify-content: center; padding: 60px 20px 30px;
  overflow-y: auto; animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal { width: 560px; max-width: 100%; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); animation: popIn .2s ease; margin: auto 0; border-top: 3px solid var(--gold); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 12px; }
.modal-title { font-size: 16.5px; font-weight: 700; }
.modal-close { width: 30px; height: 30px; border-radius: 7px; border: none; background: transparent; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
.modal-close:hover { background: var(--line-soft); color: var(--text); }
.modal-body { padding: 4px 22px 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--line-soft); }
.modal-note { font-size: 12.5px; color: var(--text-2); background: #faf7ef; border: 1px solid #f1e8d4; border-radius: 8px; padding: 9px 12px; line-height: 1.6; margin-bottom: 16px; }
.modal-note.warn { background: #fff8ec; border-color: #f3dfbd; color: #97601a; }
.modal-note.danger { background: #fdf1f2; border-color: #f2cfd4; color: var(--red); }
.modal-note.success { background: #eef9f3; border-color: #cdeadd; color: var(--green); }

.toast-root { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast { min-width: 220px; max-width: 520px; padding: 11px 18px; border-radius: 9px; background: #1f2329; color: #fff; font-size: 13.5px; box-shadow: 0 10px 28px rgba(0, 0, 0, .2); display: flex; align-items: center; gap: 9px; animation: toastIn .22s ease; border-left: 3px solid var(--gold); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.toast.success { border-left-color: #3ecf8e; }
.toast.error { border-left-color: #ef6b7c; }
.toast.info { border-left-color: var(--gold); }
.toast .t-icon { font-weight: 700; }
.toast.success .t-icon { color: #6ee2aa; }
.toast.error .t-icon { color: #ff96a2; }
.toast.info .t-icon { color: var(--gold-light); }

/* ---------- 看板 ---------- */
.dash-grid { display: grid; grid-template-columns: 1fr 1.55fr; gap: 14px; margin-bottom: 16px; }
.chart-box { padding: 8px 18px 18px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-canvas { flex: none; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.legend-item .lg-dot { width: 9px; height: 9px; border-radius: 3px; }
.legend-item .lg-name { flex: 1; }
.legend-item .lg-val { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.legend-item .lg-pct { width: 44px; text-align: right; color: var(--muted); font-size: 12px; }

.rank-list { display: flex; flex-direction: column; gap: 13px; padding: 2px 0 4px; }
.rank-item { display: flex; align-items: center; gap: 10px; }
.rank-no { width: 20px; height: 20px; border-radius: 6px; background: #f2f3f6; color: var(--text-2); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rank-item:nth-child(1) .rank-no { background: linear-gradient(135deg, #f0d9a8, #c8a86b); color: #3a2f13; }
.rank-item:nth-child(2) .rank-no { background: #e8ebf0; }
.rank-item:nth-child(3) .rank-no { background: #f3e3d3; color: #8a5b2b; }
.rank-name { width: 76px; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { flex: 1; height: 8px; border-radius: 5px; background: #f1f2f5; overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--gold-light), var(--gold-deep)); }
.rank-val { width: 96px; text-align: right; font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }

.activity-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.activity-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--blue); }

/* ---------- 售卡 / 核销 ---------- */
.two-col { display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px; align-items: start; }
.sell-tabs { display: inline-flex; padding: 3px; background: #f2f3f6; border-radius: 9px; margin-bottom: 18px; }
.sell-tabs button { height: 32px; padding: 0 20px; border: none; background: transparent; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.sell-tabs button.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.card-locate { display: flex; gap: 10px; }
.card-locate input { font-family: Consolas, monospace; font-weight: 600; letter-spacing: .6px; height: 42px; font-size: 15px; text-transform: uppercase; }
.card-locate .btn { height: 42px; flex: none; }
.located-card { margin-top: 16px; border: 1px dashed #e3d6ba; background: #fdfbf6; border-radius: 10px; padding: 14px 16px; }
.located-card.ok { border-style: solid; border-color: #cfe9dc; background: #f3fbf7; }
.located-card.err { border-style: solid; border-color: #f2cfd4; background: #fdf3f4; }
.located-card .lc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 600; font-size: 13.5px; }
.lc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px 16px; font-size: 12.5px; }
.lc-grid .k { color: var(--muted); font-size: 11.5px; margin-bottom: 2px; }
.lc-grid .v { color: var(--text); font-weight: 600; }
.lc-grid .v.gold { color: var(--gold-deep); }

.redeem-hero { background: linear-gradient(135deg, #1c1f27, #2a2e39); border-radius: 12px; padding: 14px 16px; color: #fff; position: relative; overflow: hidden; }
.redeem-hero::after { content: ""; position: absolute; right: -46px; top: -50px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(200, 168, 107, .26), transparent 65%); }
.redeem-hero .rh-title { font-size: 13px; font-weight: 700; color: #f1dfba; margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.redeem-hero .rh-title svg { width: 15px; height: 15px; }
.redeem-hero input { height: 38px; font-size: 15px; font-family: Consolas, monospace; letter-spacing: 1px; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .18); color: #fff; }
.redeem-hero input:focus { border-color: var(--gold); background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 3px rgba(200, 168, 107, .22); }
.redeem-hero input::placeholder { color: #7f8799; letter-spacing: .5px; font-family: "Microsoft YaHei"; font-size: 12.5px; }
.redeem-hero .btn-gold { height: 38px; padding: 0 18px; }
.redeem-hero .card-locate { gap: 8px; }
.redeem-hero .card-locate input { height: 38px; font-size: 15px; }
.redeem-hero .card-locate .btn { height: 38px; }
.redeem-form { background: #fff; border-radius: 12px; border: 1px solid #edf0f4; padding: 14px 16px; margin-top: 12px; }
.redeem-form .rf-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13.5px; margin-bottom: 10px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; margin-bottom: 12px; }
.info-item .k { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.info-item .v { font-size: 13px; font-weight: 600; }
.info-item .v.gold { color: var(--gold-deep); }
.redeem-actions { display: flex; align-items: center; gap: 14px; padding-top: 10px; border-top: 1px dashed var(--line); }
.redeem-actions .btn { height: 36px; padding: 0 24px; }
.redeem-actions .ra-tip { font-size: 12px; color: var(--muted); }

.rules-box { background: #fff; border: 1px solid #edf0f4; border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.rules-box h3 { margin: 0 0 8px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.rules-box ul { margin: 0; padding-left: 16px; color: var(--text-2); font-size: 12px; line-height: 1.8; }
.rules-box li b { color: var(--text); font-weight: 600; }

/* ---------- 详情 ---------- */
.detail-head { display: flex; align-items: center; gap: 14px; padding: 6px 0 16px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; }
.detail-cardno { font-size: 24px; font-weight: 700; font-family: Consolas, monospace; letter-spacing: 1px; }
.detail-meta { display: flex; gap: 8px; align-items: center; margin-top: 5px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px 20px; margin-bottom: 20px; }
.detail-grid .k { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.detail-grid .v { font-size: 13.5px; font-weight: 600; }
.detail-grid .v.gold { color: var(--gold-deep); }
.detail-grid .full { grid-column: 1 / -1; }
.timeline { position: relative; padding-left: 20px; margin: 4px 0 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 16px 6px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -20px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #c7ccd5; }
.tl-item.done .tl-dot { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 3px rgba(200, 168, 107, .18); }
.tl-item.redeem .tl-dot { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 3px rgba(43, 138, 94, .14); }
.tl-item.void .tl-dot { border-color: var(--red); background: var(--red); }
.tl-title { font-size: 13px; font-weight: 600; }
.tl-time { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.tl-desc { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.6; }
.detail-section-title { font-size: 13px; font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.detail-section-title span { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mini-table th { text-align: left; background: #f8f9fb; color: var(--text-2); font-weight: 600; padding: 8px 10px; font-size: 12px; }
.mini-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); }
.mini-table tr:last-child td { border-bottom: none; }

/* ---------- 报表 ---------- */
.report-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.rs-card { background: #fff; border: 1px solid #edf0f4; border-radius: 12px; padding: 15px 17px; box-shadow: var(--shadow); }
.rs-card .rs-label { font-size: 12px; color: var(--muted); }
.rs-card .rs-val { font-size: 23px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.rs-card .rs-val.gold { color: var(--gold-deep); }
.rs-card .rs-note { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------- 设置 ---------- */
.settings-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 18px; overflow-x: auto; }
.settings-tabs button { height: 46px; padding: 0 16px; border: none; background: transparent; cursor: pointer; font-size: 13.5px; color: var(--text-2); position: relative; white-space: nowrap; }
.settings-tabs button:hover { color: var(--gold-deep); }
.settings-tabs button.active { color: var(--text); font-weight: 600; }
.settings-tabs button.active::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; background: var(--gold); border-radius: 2px; }
.settings-body { padding: 18px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; }
.set-card { border: 1px solid var(--line); border-radius: 10px; padding: 15px 17px; }
.set-card h4 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.set-card .sc-sub { font-size: 12px; color: var(--muted); line-height: 1.6; min-height: 38px; }
.set-card .sc-price { font-size: 18px; font-weight: 700; color: var(--gold-deep); margin-top: 8px; font-variant-numeric: tabular-nums; }
.set-card .sc-actions { display: flex; gap: 4px; justify-content: flex-end; margin-top: 10px; border-top: 1px dashed var(--line-soft); padding-top: 9px; }
.backup-box { border: 1px dashed #ded3ba; background: #fdfbf6; border-radius: 10px; padding: 16px 18px; }
.backup-box h4 { margin: 0 0 6px; font-size: 14px; }
.backup-box p { margin: 0 0 12px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.backup-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.batch-form { max-width: 680px; }
.batch-preview { margin-top: 14px; font-size: 12.5px; color: var(--text-2); background: #f8f9fb; border: 1px solid var(--line); border-radius: 8px; padding: 10px 13px; line-height: 1.8; }
.batch-preview b { color: var(--gold-deep); }
.settings-hint { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 10px; }

/* ---------- 日志 ---------- */
.log-detail { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.log-detail .ld-before { color: var(--muted); text-decoration: line-through; }
.log-detail .ld-after { color: var(--gold-deep); font-weight: 600; }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-state .es-icon { font-size: 30px; opacity: .35; margin-bottom: 10px; font-weight: 700; }
.empty-state .es-text { font-size: 13px; }
.empty-state .es-tip { font-size: 12px; color: #b3b8c1; margin-top: 10px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1440px) {
  .lc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1180px) {
  .two-col { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .report-summary { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 190px; }
}
