* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; background: #F3F5F8; color: #1A2433; font-size: 14px; }

.shell { display: flex; min-height: 100vh; }
.side { width: 240px; background: #0B2E4F; color: #fff; padding: 22px 0; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 22px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-dot { width: 12px; height: 12px; background: #C9A227; border-radius: 50%; flex-shrink: 0; }
.brand strong { font-size: 15px; display: block; }
.brand small { font-size: 11px; color: #9FB8CE; letter-spacing: 1px; }
.menu { padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.menu a { color: #C7D6E4; text-decoration: none; padding: 9px 12px; border-radius: 6px; font-size: 13.5px; }
.menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.menu a.on { background: #C9A227; color: #0B2E4F; font-weight: 700; }
.menu a.muted { color: #7E98AD; margin-top: auto; }
.side-foot { padding: 14px 22px; border-top: 1px solid rgba(255,255,255,.12); }
.side-foot a { color: #9FB8CE; font-size: 12px; text-decoration: none; }

.main { margin-left: 240px; flex: 1; padding: 28px 34px 60px; max-width: 1200px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; color: #0B2E4F; }
.muted { color: #74869A; }
.small { font-size: 12px; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.flash-ok { background: #E4F3EA; color: #1E6B43; border: 1px solid #BCE3CD; }
.flash-err { background: #FBE9E9; color: #A53B3B; border: 1px solid #F2C4C4; }
.flash-warn { background: #FBF3DF; color: #8A6A1E; border: 1px solid #EFDFB4; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: #fff; border-radius: 10px; padding: 16px 18px; border: 1px solid #E3E9F0; border-top: 3px solid #C9A227; }
.stat span { display: block; color: #74869A; font-size: 12px; margin-bottom: 6px; }
.stat b { font-size: 21px; color: #0B2E4F; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.panel { background: #fff; border: 1px solid #E3E9F0; border-radius: 10px; padding: 20px 22px; margin-bottom: 24px; }
.panel h2 { font-size: 16px; color: #0B2E4F; margin-bottom: 10px; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid #E7ECF2; text-align: left; vertical-align: top; }
.table th { color: #74869A; font-weight: 600; font-size: 12px; background: #F7F9FB; }
.table tr:hover td { background: #FBFCFE; }
.table td b { color: #0B2E4F; }

.tag { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; white-space: nowrap; }
.tag-pending { background: #FBF3DF; color: #8A6A1E; }
.tag-confirmed { background: #E2F0FB; color: #1F5E8F; }
.tag-paid { background: #E4F3EA; color: #1E6B43; }
.tag-redeemed { background: #E2F0FB; color: #1F5E8F; }
.tag-report { background: #EDE7F8; color: #5B3FA8; }
.tag-cancelled { background: #EEEFF1; color: #8B96A3; }
.tag-active { background: #E4F3EA; color: #1E6B43; }
.tag-suspended { background: #EEEFF1; color: #8B96A3; }

.btn { background: #0B2E4F; color: #fff; border: 0; border-radius: 6px; padding: 9px 18px; font-size: 13.5px; cursor: pointer; }
.btn:hover { background: #12466f; }
.btn-link { background: none; border: 0; color: #1F5E8F; cursor: pointer; font-size: 12.5px; padding: 2px 4px; text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: #A53B3B; }
.btn-link.success { color: #1E6B43; }
.nowrap { white-space: nowrap; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #37465B; font-weight: 600; }
.stack input, .stack select, .stack textarea, .row-3 input {
  border: 1px solid #CCD6E0; border-radius: 6px; padding: 9px 11px; font-size: 13.5px; font-family: inherit;
}
.stack input:focus, .stack select:focus, .stack textarea:focus { outline: 2px solid #C9A227; border-color: #C9A227; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.row-3 input { width: 100%; }
.row-3 .btn { grid-column: 3; }

.code { background: #F0F4F8; border: 1px dashed #C9A227; color: #0B2E4F; padding: 3px 9px; border-radius: 5px; font-family: Consolas, monospace; font-size: 13px; letter-spacing: 1px; }
.code-chip { background: #FBF3DF; border: 1px solid #EFDFB4; border-radius: 8px; padding: 10px 16px; text-align: right; font-size: 12px; color: #8A6A1E; }
.code-chip b { display: block; font-size: 18px; letter-spacing: 2px; color: #0B2E4F; }

.inline-edit { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #E7ECF2; flex-wrap: wrap; }
.inline-edit span { min-width: 180px; font-size: 13px; }
.inline-edit input { border: 1px solid #CCD6E0; border-radius: 5px; padding: 6px 8px; font-size: 13px; width: 110px; }

details { margin-top: 10px; }
details summary { cursor: pointer; color: #1F5E8F; font-size: 12.5px; }

body.auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #0B2E4F, #17486F); }
.auth-card { background: #fff; border-radius: 12px; padding: 34px 38px; width: 380px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.auth-brand strong { font-size: 16px; color: #0B2E4F; display: block; }
.auth-brand small { font-size: 11px; color: #74869A; letter-spacing: 1px; display: block; }
.auth-card .btn { width: 100%; padding: 11px; font-size: 14.5px; }
.auth-card p { text-align: center; margin-top: 14px; }
.auth-card a { color: #1F5E8F; }
