* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif; background: #0f172a; color: #e2e8f0; padding: 20px 24px; font-size: 14px; }

header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
header h1 { font-size: 20px; font-weight: 600; }
header .right { display: flex; gap: 8px; align-items: center; }

button { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; border-radius: 6px; padding: 7px 14px; cursor: pointer; font-size: 13px; }
button:hover { background: #334155; }
button.primary { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }
button.danger { background: #7f1d1d; border-color: #b91c1c; }
button.danger:hover { background: #b91c1c; }

input, textarea, select { background: #1e293b; border: 1px solid #334155; border-radius: 6px; color: #e2e8f0; padding: 7px 10px; font-size: 13px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #0ea5e9; }
select option { background: #1e293b; }
input.sm { width: 200px; } input.xs { width: 90px; padding: 5px 8px; }
textarea { width: 100%; resize: vertical; }
label { display: inline-flex; align-items: center; gap: 6px; color: #94a3b8; }

/* 统计卡片 */
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.card { background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 16px; text-align: center; color: #94a3b8; }
.card .num { font-size: 28px; font-weight: 700; color: #e2e8f0; }
.card.hit .num { color: #22c55e; }
.card.warn .num { color: #f59e0b; }
.card.dev .num { color: #38bdf8; }

/* 筛选区 */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }

/* 表格 */
.table-wrap { background: #1e293b; border: 1px solid #334155; border-radius: 10px; overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 1080px; }
th, td { border-bottom: 1px solid #334155; padding: 8px 10px; text-align: left; white-space: nowrap; }
th { background: #16213a; position: sticky; top: 0; }
tr:hover td { background: #1a2740; }
td.t { max-width: 360px; white-space: normal; }
td a { color: #38bdf8; text-decoration: none; }
.tag { padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag.yes { background: #14532d; color: #4ade80; }
.tag.no { background: #3f3f46; color: #a1a1aa; }
.tag.alert { background: #7f1d1d; color: #fca5a5; }

.pager { display: flex; gap: 10px; align-items: center; padding: 12px 14px; color: #94a3b8; }
.pager button { margin-right: 4px; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal.hidden { display: none; }
.modal-box { background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 22px 26px; width: 560px; max-height: 85vh; overflow: auto; }
.modal-box h2 { font-size: 17px; margin-bottom: 12px; }
.modal-box h3 { font-size: 14px; margin: 16px 0 8px; color: #38bdf8; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.form label:has(> input[type="checkbox"]) { flex-direction: row; }
.hint { color: #64748b; font-size: 12px; margin: 6px 0 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

footer { text-align: center; color: #475569; font-size: 12px; margin-top: 20px; }
#toast { position: fixed; top: 20px; right: 20px; background: #0ea5e9; color: #fff; padding: 10px 18px; border-radius: 8px; opacity: 0; transition: opacity .3s; z-index: 99; }
#toast.show { opacity: 1; }
