/* DOUBLE 斌 互动 · 婚礼现场互动平台 全局样式(中式红金主题) */
:root {
  --red: #b8232f;
  --red-deep: #8e1a24;
  --red-dark: #5c0e15;
  --gold: #e8c47a;
  --gold-deep: #c9973f;
  --cream: #fff8ef;
  --ink: #3b2a26;
  --ink-2: #8a6f66;
  --ok: #1e9e63;
  --warn: #e8a13c;
  --danger: #d9534f;
  --line: #ecdcd2;
  --shadow: 0 6px 24px rgba(92, 14, 21, 0.12);
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; outline: none; }
a { color: var(--red); text-decoration: none; }

/* ===== 通用组件 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 999px; padding: 10px 22px; font-size: 15px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #ffe9c9; transition: transform .12s, opacity .15s; user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn.gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #5c3004; }
.btn.ghost { background: #fff; color: var(--red); border: 1px solid var(--red); }
.btn.gray { background: #eee3da; color: var(--ink-2); }
.btn.green { background: linear-gradient(135deg, #2ab273, #1e9e63); color: #fff; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.big { padding: 14px 34px; font-size: 18px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; border: 1px solid #f3e6dc;
}
.card h3 { font-size: 16px; margin-bottom: 14px; color: var(--red-deep); display: flex; align-items: center; gap: 8px; }
.card h3::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(var(--red), var(--gold)); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  background: #fffdf9; transition: border .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.field .tip { font-size: 12px; color: var(--ink-2); margin-top: 5px; line-height: 1.5; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: #f6e8dd; color: var(--red-deep); }
.tag.ok { background: #e3f6ec; color: var(--ok); }
.tag.warn { background: #fdf1dc; color: #b0731a; }
.tag.gray { background: #f0ebe7; color: #98857d; }
.tag.danger { background: #fde5e4; color: var(--danger); }

.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.money.plus { color: var(--ok); }
.money.minus { color: var(--danger); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; color: var(--ink-2); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 9px 10px; border-bottom: 1px solid #f6ece4; }
table.tbl tr:hover td { background: #fdf7f0; }

/* 头像 */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: hsl(var(--h, 0), 65%, 88%); color: hsl(var(--h, 0), 55%, 35%);
  font-size: 15px; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.lg { width: 54px; height: 54px; font-size: 22px; }

/* Toast */
#toast-box { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: rgba(40, 12, 14, .92); color: #ffe6c2; padding: 10px 22px; border-radius: 999px;
  font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: toastIn .25s;
  max-width: 86vw; text-align: center;
}
.toast.err { background: rgba(146, 34, 38, .95); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; } }

/* Modal */
.modal-mask { position: fixed; inset: 0; background: rgba(30, 8, 10, .55); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.modal { background: #fff; border-radius: 18px; padding: 26px; width: 100%; max-width: 420px; animation: pop .22s; max-height: 86vh; overflow: auto; }
.modal h3 { text-align: center; color: var(--red-deep); font-size: 18px; margin-bottom: 16px; }
.modal .modal-foot { display: flex; gap: 10px; margin-top: 18px; }
.modal .modal-foot .btn { flex: 1; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 空状态 */
.empty { text-align: center; color: var(--ink-2); padding: 34px 0; font-size: 14px; }
.empty::before { content: "🧧"; display: block; font-size: 34px; margin-bottom: 8px; opacity: .5; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat-card { background: linear-gradient(150deg, #fff, #fdf3ea); border: 1px solid #f3e2d3; border-radius: var(--radius); padding: 16px 18px; }
.stat-card .label { font-size: 13px; color: var(--ink-2); }
.stat-card .value { font-size: 24px; font-weight: 800; color: var(--red-deep); margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-card .value small { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.stat-card.gold { background: linear-gradient(150deg, #fffaf0, #fdeed4); }
.stat-card.gold .value { color: var(--gold-deep); }

/* 装饰背景 */
.festive-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(1200px 600px at 50% -10%, #a91d29, #7c1420 55%, #56090f);
}
.festive-bg::before, .festive-bg::after {
  content: "囍"; position: absolute; font-size: 320px; color: rgba(255, 214, 140, .06);
  font-weight: 900; top: 8%;
}
.festive-bg::before { left: -60px; transform: rotate(-12deg); }
.festive-bg::after { right: -60px; transform: rotate(12deg); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #dcc4b4; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
