:root {
  --navy: #15192b; --navy2: #232842; --orange: #e8663d; --orange-dk: #b8461f;
  --bg: #f4f2ed; --card: #ffffff; --line: #e2ddd3; --ink: #15192b; --muted: #5d6475;
  --pass: #1e7b3a; --pass-bg: #ddf3e3; --fail: #b3261e; --fail-bg: #fbe1dd; --warn: #8a5a00; --warn-bg: #fff2cc;
  --run: #1f4e78; --run-bg: #dcebf7;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
a { color: var(--run); }
header.top { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 54px; }
header.top .brand { font-weight: 700; font-size: 20px; letter-spacing: .2px; color: #fff; text-decoration: none; }
header.top .brand b { color: var(--orange); }
header.top nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
header.top nav a { color: #c9cedb; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
header.top nav a.on, header.top nav a:hover { background: var(--navy2); color: #fff; }
header.top .me { color: #c9cedb; font-size: 13px; display: flex; gap: 10px; align-items: center; }
header.top .me form { margin: 0; }
header.top .me button { background: transparent; color: #c9cedb; border: 1px solid #3a4060; padding: 4px 10px; }
main { max-width: 1240px; margin: 0 auto; padding: 20px; }
h1 { font-size: 24px; margin: 4px 0 16px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.kpi { font-size: 34px; font-weight: 700; line-height: 1.1; }
.kpi small { font-size: 14px; color: var(--muted); font-weight: 400; display: block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; background: #faf8f4; }
tr.click:hover td { background: #faf8f4; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.s-online, .s-done, .s-PASS { background: var(--pass-bg); color: var(--pass); }
.s-failed, .s-FAIL, .s-disabled, .s-expired { background: var(--fail-bg); color: var(--fail); }
.s-running, .s-sent, .s-queued { background: var(--run-bg); color: var(--run); }
.s-paused, .s-waiting, .s-cancelled, .s-offline, .s-skipped, .s-SKIPPED { background: #ecebe7; color: var(--muted); }
.s-warn, .s-NOT { background: var(--warn-bg); color: var(--warn); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.flash.ok { background: var(--pass-bg); color: var(--pass); }
.flash.err { background: var(--fail-bg); color: var(--fail); }
form.inline { display: inline; margin: 0; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=number], input[type=time], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #cfc8bb; border-radius: 7px; font: inherit; background: #fff; }
textarea { min-height: 90px; font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }
button, .btn { display: inline-block; background: #fff; color: var(--ink); border: 1px solid #cfc8bb; border-radius: 7px; padding: 7px 14px; font: inherit; cursor: pointer; text-decoration: none; }
button.primary, .btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }
button.danger { background: #fff; border-color: var(--fail); color: var(--fail); }
button:hover, .btn:hover { filter: brightness(.96); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; margin: 4px 14px 4px 0; color: var(--ink); font-size: 14px; }
code, .mono { font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.log { background: #111318; color: #d7dbe0; border-radius: 8px; padding: 10px 12px; height: 420px; overflow: auto; font: 12.5px/1.5 Consolas, "Courier New", monospace; white-space: pre-wrap; }
.log .k-out { color: #8ab4f8; }
.log .k-in { color: #e8eaed; }
.log .k-pass { color: #81c995; font-weight: 600; }
.log .k-fail { color: #f28b82; font-weight: 600; }
.log .k-test { color: #fdd663; font-weight: 600; }
.log .k-call, .log .k-sms { color: #c58af9; }
.log .t { color: #7f8592; }
.tree { font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.tree .node { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.tree .lv1 { margin-left: 18px; } .tree .lv2 { margin-left: 36px; } .tree .lv3 { margin-left: 54px; }
.tree .lv4 { margin-left: 72px; } .tree .lv5 { margin-left: 90px; } .tree .lv6 { margin-left: 108px; }
.tree .lv7 { margin-left: 126px; } .tree .lv8 { margin-left: 144px; }
.tree .txt { color: var(--muted); white-space: pre-wrap; }
.code-big { font-size: 34px; font-weight: 700; letter-spacing: 4px; font-family: Consolas, monospace; }
.login { max-width: 380px; margin: 60px auto; }
.qr svg { width: 200px; height: 200px; background: #fff; }
.chart svg { width: 100%; height: 160px; }
.chart .bar-p { fill: var(--pass); } .chart .bar-f { fill: var(--fail); }
.chart text { font-size: 11px; fill: var(--muted); }
.hidden { display: none; }
@media (max-width: 760px) { header.top { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; } main { padding: 12px; } }
