/* H5 压测控制台 —— 移动端优先，桌面可用。单色蓝强调，无渐变无 emoji 图标 */
:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --line: #e3e7ee;
  --txt: #1f2937;
  --muted: #6b7280;
  --blue: #1d6ef0;
  --blue-dark: #1257c8;
  --green: #15803d;
  --red: #dc2626;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--txt);
  font: 14px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 22px; width: 100%; max-width: 360px; text-align: center; }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card .sub { color: var(--muted); margin: 0 0 18px; }
.login-card input { margin-bottom: 12px; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line);
  padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.topbar .title { font-weight: 600; font-size: 16px; flex: 1; }
.container { padding: 12px; max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.card-head { font-weight: 600; margin-bottom: 10px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; flex: 1; min-width: 0; }
.field > span { font-size: 12px; color: var(--muted); }
input, select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--txt); outline: none; }
input:focus, select:focus { border-color: var(--blue); }
.row2 { display: flex; gap: 10px; }
.check { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 13px; }
.check.inline { display: inline-flex; margin: 0; }
.biz-row { margin: 8px 0; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.rate-row { display: flex; gap: 10px; align-items: center; }
.rate-row input[type=range] { flex: 1; }
.rate-row input[type=number] { width: 96px; }
.adv { margin: 8px 0; border-top: 1px dashed var(--line); padding-top: 8px; }
.adv summary { color: var(--muted); cursor: pointer; font-size: 13px; }

/* 按钮 */
button { border: none; border-radius: 8px; padding: 9px 14px; font-size: 14px; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { background: var(--blue); color: #fff; }
.primary:active { background: var(--blue-dark); }
.danger { background: #fff; color: var(--red); border: 1px solid var(--red); }
.ghost { background: #fff; color: var(--muted); border: 1px solid var(--line); }
.big { width: 100%; padding: 12px; font-size: 16px; }
.small-btn { padding: 5px 10px; font-size: 12px; }
.btn-row { display: flex; gap: 10px; margin-top: 10px; }

/* 状态区 */
.status-text { font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar { height: 100%; background: var(--blue); transition: width .3s; }
#prog_text { margin: 6px 0 8px; }
.log { background: #0f172a; color: #d6e2f0; border-radius: 8px; padding: 10px;
  height: 180px; overflow-y: auto; font: 12px/1.6 Consolas, Menlo, monospace; white-space: pre-wrap; margin: 0; }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.table-wrap.max200 { max-height: 220px; overflow-y: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: #f8fafc; position: sticky; top: 0; color: var(--muted); font-weight: 500; }
tbody tr.ok td { }
td.res-ok { color: var(--green); font-weight: 600; }
td.res-fail { color: var(--red); font-weight: 600; }
td.payurl a { color: var(--blue); }
.err-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex;
  align-items: center; justify-content: center; padding: 16px; z-index: 100; }
.modal-card { background: var(--card); border-radius: var(--radius); width: 100%; max-width: 640px;
  max-height: 86vh; overflow-y: auto; padding: 14px; }
.detail, .summary { background: #f8fafc; border-radius: 8px; padding: 10px;
  font: 12px/1.6 Consolas, Menlo, monospace; white-space: pre-wrap; word-break: break-all; margin: 0 0 10px; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 9px 16px; border-radius: 8px; z-index: 200; font-size: 13px; }

/* 宽屏三列布局：参数 / 状态 / 列表 */
@media (min-width: 1000px) {
  .container { display: grid; grid-template-columns: 340px 320px 1fr; align-items: start; }
  .log { height: 320px; }
}
