* { box-sizing: border-box; }
body { margin: 0; font: 13px/1.5 "Microsoft YaHei", "Segoe UI", sans-serif; color: #1f2328; background: #f3f4f6; }
a { color: #0b62c4; text-decoration: none; }
a:hover { text-decoration: underline; }
header { background: #16232f; color: #fff; padding: 8px 14px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
header .brand { font-size: 15px; font-weight: 700; letter-spacing: .5px; }
header .sep { opacity: .35; }
header nav a { color: #cfe3ff; }
header .right { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 12px; opacity: .95; }
main { padding: 12px 14px 40px; max-width: 1500px; }
h2 { font-size: 15px; margin: 4px 0 10px; }
h3 { font-size: 13px; margin: 14px 0 6px; color: #334; }
.bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.bar .grow { flex: 1; }
button, .btn { font: inherit; padding: 5px 11px; border: 1px solid #b8c0cc; background: #fff; border-radius: 4px; cursor: pointer; color: #16232f; }
button:hover { background: #eef3fb; border-color: #8fa8c9; }
button.primary { background: #0b62c4; border-color: #0b62c4; color: #fff; }
button.primary:hover { background: #0952a6; }
button.ghost { border-color: transparent; background: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { font: inherit; padding: 4px 6px; border: 1px solid #c3cad4; border-radius: 4px; background: #fff; }
input.sm { width: 64px; }
input.tech { width: 96px; }
input.why { width: 100%; min-width: 220px; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border: 1px solid #dde1e7; padding: 3px 6px; text-align: left; vertical-align: middle; }
th { background: #eef1f5; font-weight: 600; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
td.n, th.n { text-align: right; }
tbody tr:nth-child(even) td { background: #fbfcfd; }
tbody tr.sel td { background: #fff8e6; }
.wrap { overflow: auto; max-height: 62vh; border: 1px solid #e2e6ec; }
.cards { display: flex; gap: 10px; flex-wrap: wrap; }
.card { background: #fff; border: 1px solid #e2e6ec; border-radius: 6px; padding: 10px 12px; min-width: 190px; flex: 1; }
.card .k { font-size: 12px; color: #6b7480; }
.card .v { font-size: 20px; font-weight: 700; margin-top: 2px; }
.card .s { font-size: 12px; color: #6b7480; margin-top: 2px; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.month { background: #fff; border: 1px solid #e2e6ec; border-radius: 6px; padding: 10px 12px; }
.month .top { display: flex; align-items: baseline; gap: 8px; }
.month .ym { font-size: 17px; font-weight: 700; }
.month .meta { font-size: 12px; color: #5b6470; margin-top: 4px; line-height: 1.7; }
.month .acts { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 3px; border: 1px solid; }
.b-empty { color: #6b7480; border-color: #c9ced6; background: #f1f2f4; }
.b-generated { color: #0b5cad; border-color: #a9c8ea; background: #eaf3fd; }
.b-final { color: #14703a; border-color: #9fd3b1; background: #e8f7ee; }
.b-error { color: #a3231b; border-color: #e5b4b0; background: #fdecea; }
.b-preview { color: #8a5a00; border-color: #e3c584; background: #fdf5e3; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid #cfd5dd; margin: 10px 0 0; }
.tabs button { border: 1px solid transparent; border-bottom: none; border-radius: 4px 4px 0 0; background: transparent; padding: 6px 14px; color: #48515c; }
.tabs button.on { background: #fff; border-color: #cfd5dd; color: #0b62c4; font-weight: 700; margin-bottom: -1px; }
.pane { display: none; padding-top: 10px; }
.pane.on { display: block; }
.note { font-size: 12px; color: #5b6470; }
.warn { font-size: 12px; color: #a3231b; }
.ok { color: #14703a; }
pre.report { background: #fff; border: 1px solid #e2e6ec; padding: 10px; max-height: 60vh; overflow: auto; font: 12px/1.6 Consolas, monospace; white-space: pre-wrap; }
.toast { position: fixed; right: 14px; bottom: 14px; background: #16232f; color: #fff; padding: 8px 12px; border-radius: 5px; font-size: 12px; max-width: 520px; z-index: 99; opacity: 0; transition: opacity .2s; }
.toast.on { opacity: .96; }
.toast.err { background: #a3231b; }
.login { width: 330px; margin: 12vh auto; background: #fff; border: 1px solid #e2e6ec; border-radius: 8px; padding: 22px; }
.login h1 { font-size: 17px; margin: 0 0 4px; }
.login p { font-size: 12px; color: #6b7480; margin: 0 0 14px; }
.login label { display: block; font-size: 12px; color: #48515c; margin: 10px 0 3px; }
.login input { width: 100%; padding: 7px 8px; }
.login button { width: 100%; margin-top: 16px; padding: 8px; }
.err { color: #a3231b; font-size: 12px; margin-top: 8px; }
.drag { cursor: move; color: #9aa3ae; }
tr.dragging td { opacity: .4; }
tr.dropmark td { border-top: 2px solid #0b62c4; }

/* ---- 生成前置检查弹窗 ---- */
#pf { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
      background: rgba(15,23,42,.45); z-index: 60; max-height: none; overflow: auto; border: 0; }
#pf .card { flex: none; min-width: 0; box-shadow: 0 12px 32px rgba(0,0,0,.25); }
/* ---- 查询表 ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { border-bottom: 1px solid #e6ebf1; padding: 6px 8px; text-align: right; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { background: #f5f7fa; font-weight: 600; }
.tbl td.z { color: #b7bfc8; }
.tbl tbody tr:hover td { background: #f7fbff; }
.rk { display: inline-block; min-width: 17px; padding: 0 4px; border-radius: 3px;
      background: #eef3f8; color: #4a6b8a; font-size: 11px; text-align: center; }
.rk1 { background: #fff2d6; color: #a5741a; }

.badge.b-partial{background:#fff4e5;color:#b26a00}
