:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1a202c;
  --muted: #718096;
  --line: #e2e8f0;
  --accent: #2b6cb0;
  --accent-dark: #2c5282;
  --fail: #c53030;
  --pass: #2f855a;
  --manual: #b7791f;
  --shadow: 0 4px 16px rgba(30, 41, 59, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
h1, h2, h3, h4 { margin: 0 0 12px; font-weight: 650; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
button { font: inherit; cursor: pointer; border-radius: 6px; padding: 8px 16px; border: 1px solid transparent; transition: .15s; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary { background: var(--accent); color: #fff; }
button.primary:hover:not(:disabled) { background: var(--accent-dark); }
button.ghost { background: transparent; border-color: var(--line); color: var(--text); }
button.ghost:hover { background: #edf2f7; }
button.danger { background: transparent; border-color: #fed7d7; color: var(--fail); }
button.danger:hover { background: #fff5f5; }
input, select {
  font: inherit; width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: var(--text); outline: none;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43,108,176,.12); }
label { display: block; margin-bottom: 12px; color: #4a5568; font-size: 13px; }
label input, label select { margin-top: 5px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; text-align: center; }
.login-card label, .login-card input { text-align: left; }
.login-card button { width: 100%; margin-top: 4px; }
.logo { font-size: 34px; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.logo.small { font-size: 18px; margin: 0 6px 0 0; }
.error { color: var(--fail); background: #fff5f5; border: 1px solid #fed7d7; border-radius: 6px; padding: 8px 10px; margin-top: 10px; font-size: 13px; text-align: left; }

.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
  position: sticky; top: 0; z-index: 10;
}
.brand { font-size: 16px; font-weight: 650; display: flex; align-items: center; color: var(--accent-dark); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-right .muted { margin-right: 6px; }

.container { max-width: 1180px; margin: 22px auto 60px; padding: 0 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; padding: 9px 10px; color: var(--muted); font-weight: 500; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #edf2f7; vertical-align: top; }
tbody tr:hover { background: #f8fafc; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; white-space: nowrap; }
.badge.queued { background: #edf2f7; color: #4a5568; }
.badge.running { background: #ebf8ff; color: #2b6cb0; }
.badge.done { background: #f0fff4; color: var(--pass); }
.badge.failed { background: #fff5f5; color: var(--fail); }
.fail-text { color: var(--fail); font-weight: 600; }
.pass-text { color: var(--pass); }
.manual-text { color: var(--manual); }

.progress { height: 7px; background: #edf2f7; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }

.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 14px 0 18px; }
.tile { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; text-align: center; }
.tile b { display: block; font-size: 22px; line-height: 1.2; }
.tile span { color: var(--muted); font-size: 12px; }
.tile.fail b { color: var(--fail); }
.tile.pass b { color: var(--pass); }
.tile.manual b { color: var(--manual); }

.point-row.failed { background: #fffafa; }
.point-row { cursor: pointer; }
.point-row.selected { background: #ebf8ff; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.downloads a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--accent); text-decoration: none; background: #fff; font-size: 13px; }
.downloads a:hover { background: #ebf8ff; }
.warnbox { background: #fffaf0; border: 1px solid #fbd38d; color: #975a16; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin: 12px 0; }
.pager { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.pager button { padding: 5px 12px; }

.modal { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal-card { background: #fff; border-radius: 10px; padding: 22px; width: 100%; max-width: 420px; max-height: 88vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal-card.wide { max-width: 900px; }
.modal-card hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: #1a202c; color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 99; font-size: 13px; opacity: .95; }

@media (max-width: 800px) {
  .grid2, .grid4 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .topbar { padding: 0 12px; }
  .topbar-right .muted { display: none; }
  .container { padding: 0 10px; }
}
