:root {
  --bg: #0f1720; --panel: #15202b; --border: #1e2b3a;
  --text: #e8eef5; --muted: #7a8b9c; --accent: #4ade80; --accent-dim: #17331f;
  --warn: #fbbf24; --danger: #f87171; --info: #7aa2c4;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
.wrap { max-width: 900px; margin: 0 auto; padding: 20px 16px 60px; }

/* 头部 */
header { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
header h1 { font-size: 20px; color: var(--accent); }
header .user { font-size: 13px; color: var(--muted); margin-right: 10px; }
.btn-link { background: none; border: none; color: var(--info); cursor: pointer; font-size: 13px; }
.btn-link:hover { color: var(--accent); }

/* 按钮 */
.btn { display: inline-block; border: none; border-radius: 8px; padding: 10px 22px; font-size: 15px; cursor: pointer; background: var(--accent); color: var(--bg); font-weight: 600; }
.btn:hover { opacity: .9; }
.btn.sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn.red { background: var(--danger); }
.btn.gray { background: #24374a; color: var(--text); font-weight: 400; }

/* 登录 */
#login { max-width: 400px; margin: 10vh auto; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 30px; text-align: center; }
#login h2 { margin-bottom: 6px; color: var(--accent); }
#login .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.tabs { display: flex; margin-bottom: 18px; background: var(--bg); border-radius: 8px; padding: 4px; }
.tabs button { flex: 1; border: none; background: none; color: var(--muted); padding: 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.tabs button.on { background: var(--accent); color: var(--bg); font-weight: 600; }
#login input { width: 100%; padding: 11px 12px; border: 1px solid #24374a; background: var(--bg); color: var(--text); border-radius: 8px; font-size: 15px; margin-bottom: 14px; font-family: Consolas, monospace; }
#login .err { color: var(--danger); font-size: 13px; min-height: 20px; margin-bottom: 6px; }

/* 内容卡片 */
.date-group { margin-bottom: 26px; }
.date-group h3 { font-size: 15px; color: var(--accent); margin-bottom: 12px; padding-left: 10px; border-left: 3px solid var(--accent); }
.match { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.match .meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.match .meta b { color: #93a4b5; font-weight: 600; }
.match .teams { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.match .teams .vs { color: var(--muted); font-weight: 400; margin: 0 8px; }
.match .rec { font-size: 14px; color: var(--warn); background: #1c2a38; border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.match .note { font-size: 13px; color: #93a4b5; margin-top: 6px; }
.empty { text-align: center; color: #5a6b7c; padding: 60px 0; }
.contact { margin-top: 18px; background: #1c2a38; border: 1px dashed #3a5a4a; border-radius: 8px; padding: 14px; text-align: left; }
.contact h4 { color: var(--accent); font-size: 14px; margin-bottom: 10px; }
.contact pre { font-family: inherit; white-space: pre-wrap; word-break: break-all; color: var(--text); font-size: 13px; line-height: 1.8; margin-top: 8px; }
.contact .cline { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 5px 0; }
.contact .cline b { color: var(--accent); word-break: break-all; }
.contact .cline a.btn { text-decoration: none; }
.btn.buy { display: block; width: 100%; margin-top: 16px; padding: 13px 0; font-size: 17px; background: #ff8c00; color: #fff; text-decoration: none; border-radius: 8px; box-shadow: 0 3px 10px rgba(255,140,0,.35); }
.btn.buy:hover { opacity: .9; }

/* 收款码弹窗 */
#qrModal { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; }
.qr-mask { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.qr-box { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 24px; text-align: center; max-width: 340px; width: 90%; }
.qr-box h3 { color: var(--accent); margin-bottom: 14px; }
.qr-box img { width: 100%; max-width: 240px; border-radius: 8px; background: #fff; padding: 6px; }
.qr-tip { color: var(--muted); font-size: 12px; margin: 12px 0 14px; }

/* 管理面板 */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-bottom: 20px; }
.panel h3 { font-size: 15px; margin-bottom: 14px; color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 14px; text-align: center; }
.stat .num { font-size: 24px; font-weight: 700; color: var(--accent); }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.row label { font-size: 13px; color: var(--muted); }
.row input, .row select { padding: 8px 10px; border: 1px solid #24374a; background: var(--bg); color: var(--text); border-radius: 6px; font-size: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.grid label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.grid input, .grid select, .grid textarea { width: 100%; padding: 8px 10px; border: 1px solid #24374a; background: var(--bg); color: var(--text); border-radius: 6px; font-size: 14px; }
.grid .full { grid-column: 1 / -1; }
.grid textarea { resize: vertical; min-height: 60px; }
.actions { margin-top: 14px; display: flex; gap: 10px; align-items: center; }
.actions .hint { font-size: 12px; color: #5a6b7c; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td .ops button { margin-right: 6px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag.g { background: #17331f; color: var(--accent); }
.tag.m { background: #332a17; color: var(--warn); }
.tag.l { background: #332017; color: #fb923c; }
.tag.blue { background: #12293f; color: var(--info); }
.tag.red { background: #3f1212; color: var(--danger); }
.tag.gray { background: #24303c; color: #93a4b5; }
.hide { display: none !important; }
