* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #1f2329; background: #f2f3f5; }
a { color: #3370ff; cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* 登录 */
.login { width: 360px; margin: 14vh auto 0; background: #fff; padding: 32px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.login h1 { margin: 0 0 24px; font-size: 20px; text-align: center; }
.login .field { margin-bottom: 16px; }
.login button { width: 100%; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.side { width: 200px; background: #1f2d3d; color: #bfcbd9; flex-shrink: 0; }
.side .logo { height: 56px; line-height: 56px; text-align: center; color: #fff; font-weight: 600; font-size: 16px; border-bottom: 1px solid #2d3a4b; }
.side a { display: block; padding: 12px 24px; color: #bfcbd9; }
.side a:hover { background: #2d3a4b; text-decoration: none; }
.side a.active { background: #3370ff; color: #fff; }
.main { flex: 1; min-width: 0; }
.top { height: 56px; background: #fff; display: flex; align-items: center; justify-content: flex-end; padding: 0 24px; gap: 16px; border-bottom: 1px solid #e5e6eb; }
.content { padding: 20px 24px; }
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.card h2 { margin: 0 0 16px; font-size: 16px; }
.card h3 { margin: 16px 0 8px; font-size: 14px; }
.crumb { margin-bottom: 12px; color: #86909c; }

/* 表单 */
input, select, textarea { font: inherit; padding: 6px 10px; border: 1px solid #c9cdd4; border-radius: 4px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #3370ff; }
textarea { width: 100%; min-height: 100px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > input, .field > select { width: 100%; }
.field label { color: #4e5969; font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 120px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: flex; align-items: center; gap: 4px; }
.hint { color: #86909c; font-size: 12px; }

button { font: inherit; padding: 6px 16px; border: 1px solid #c9cdd4; border-radius: 4px; background: #fff; cursor: pointer; }
button:hover { border-color: #3370ff; color: #3370ff; }
button.primary { background: #3370ff; border-color: #3370ff; color: #fff; }
button.primary:hover { background: #4e83fd; color: #fff; }
button.danger { color: #f54a45; border-color: #f54a45; }
button.danger:hover { background: #f54a45; color: #fff; }
button.small { padding: 2px 8px; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* 表格 */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e5e6eb; text-align: left; vertical-align: top; }
th { background: #f7f8fa; color: #4e5969; font-weight: 500; white-space: nowrap; }
tr:hover td { background: #fafbfc; }
td .ops { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; color: #86909c; padding: 24px; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 12px; color: #4e5969; }

.tag { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 12px; line-height: 20px; background: #f2f3f5; color: #4e5969; margin: 1px 2px 1px 0; }
.tag.green { background: #e8ffea; color: #00b42a; }
.tag.red { background: #ffece8; color: #f53f3f; }
.tag.blue { background: #e8f3ff; color: #3370ff; }
.tag.orange { background: #fff7e8; color: #ff7d00; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c9cdd4; margin-right: 4px; }
.dot.on { background: #00b42a; }

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.kv div span { color: #86909c; margin-right: 6px; }

/* 弹窗与提示 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding-top: 8vh; z-index: 10; overflow: auto; }
.modal-box { background: #fff; border-radius: 8px; width: 620px; max-width: 94vw; padding: 24px; margin-bottom: 8vh; }
.modal-box.wide { width: 920px; }
.modal:has(> .modal-box.full) { padding: 16px; }
.modal-box.full { width: 100%; max-width: none; min-height: calc(100vh - 32px); margin: 0; display: flex; flex-direction: column; }
.modal-box.full .modal-foot { position: sticky; bottom: -16px; margin-top: auto; padding: 12px 0 16px; background: #fff; border-top: 1px solid #e5e6eb; }
.modal-box h2 { margin: 0 0 16px; font-size: 16px; }

/* 发放奖励的道具勾选列表 */
.pick { max-height: 360px; overflow: auto; border: 1px solid #e5e6eb; border-radius: 4px; }
.pick-head { position: sticky; top: 0; background: #f7f8fa; padding: 4px 10px; font-weight: 500; border-bottom: 1px solid #e5e6eb; z-index: 1; }
.pick-row { display: flex; align-items: center; gap: 8px; padding: 3px 10px; border-bottom: 1px solid #f2f3f5; cursor: pointer; }
.pick-row:hover { background: #fafbfc; }
.pick-row.on { background: #e8f3ff; }
.pick-id { width: 40px; color: #86909c; font-size: 12px; }
.pick-name { width: 110px; flex-shrink: 0; font-weight: 500; }
.pick-desc { flex: 1; min-width: 0; color: #86909c; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-row .gr-count { width: 90px; padding: 2px 6px; }
.picked { margin-top: 8px; line-height: 26px; }
.picked a { margin-left: 2px; color: #f53f3f; }
.q1 { color: #4e5969; } .q2 { color: #00b42a; } .q3 { color: #3370ff; } .q4 { color: #8d4eda; } .q5 { color: #ff7d00; } .q6 { color: #f53f3f; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
#toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; flex-direction: column; gap: 8px; }
#toast div { padding: 8px 16px; border-radius: 4px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
#toast div.err { color: #f53f3f; }
#toast div.ok { color: #00b42a; }
pre { margin: 0; white-space: pre-wrap; word-break: break-all; font-size: 12px; max-width: 480px; }
