:root {
  --bg: #0f1420;
  --panel: #161d2e;
  --panel2: #1d2536;
  --border: #2a3448;
  --text: #e7ecf5;
  --muted: #8b96ab;
  --accent: #4f8cff;
  --pass: #2ecc71;
  --fail: #ff5d5d;
  --dummy: #f5a623;
  --skip: #6b7688;
  --run: #4f8cff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
#app { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }

.login-wrap {
  max-width: 420px; margin: 80px auto; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; padding: 28px;
}
.login-wrap h1 { font-size: 18px; margin: 0 0 4px; }
.login-wrap p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-size: 14px;
}
.btn {
  border: none; border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: white; }
.btn-secondary { background: var(--panel2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: #4a1f1f; color: #ffb3b3; border: 1px solid #6b2b2b; }
.btn-small { padding: 6px 10px; font-size: 12px; }
.error-box { background: #3a1a1a; border: 1px solid #6b2b2b; color: #ffb3b3; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-top: 12px; }

header.topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
header.topbar h1 { font-size: 17px; margin: 0; }
header.topbar .sub { color: var(--muted); font-size: 12px; }

.ctx-bar {
  display: flex; gap: 10px; flex-wrap: wrap; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
}
.ctx-field { display: flex; flex-direction: column; gap: 4px; min-width: 220px; flex: 1; }
.ctx-field label { font-size: 11px; color: var(--muted); }
.ctx-field input {
  padding: 7px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-size: 12px; font-family: monospace;
}

.control-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 12px;
}
.control-bar .spacer { flex: 1; }
.summary { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.summary b { color: var(--text); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.dot.pass { background: var(--pass); } .dot.fail { background: var(--fail); }
.dot.dummy { background: var(--dummy); } .dot.pending { background: var(--skip); }
.dot.running { background: var(--run); } .dot.skipped { background: var(--skip); }

.progress-outer { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress-inner { height: 100%; background: var(--accent); transition: width .3s; }

.filter-bar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.filter-bar input, .filter-bar select {
  padding: 7px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-size: 12px;
}

table.endpoints { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;}
table.endpoints th, table.endpoints td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.endpoints th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; background: var(--panel2); }
table.endpoints tr:hover td { background: #1a2233; }
.method-badge { font-family: monospace; font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.method-GET { background: #17324a; color: #7ec8ff; }
.method-POST { background: #1a3a25; color: #7be0a0; }
.method-PUT { background: #3a331a; color: #ffd27e; }
.method-PATCH { background: #33253a; color: #d79bff; }
.method-DELETE { background: #3a1a1a; color: #ff8f8f; }

.path-cell { font-family: monospace; font-size: 11.5px; color: var(--muted); max-width: 340px; word-break: break-all; }
.status-badge { padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.status-pending { background: #23293a; color: var(--muted); }
.status-running { background: #1c2c4a; color: var(--run); }
.status-pass { background: #133a24; color: var(--pass); }
.status-fail { background: #3a1c1c; color: var(--fail); }
.status-dummy { background: #3a2f14; color: var(--dummy); }
.status-skipped { background: #23293a; color: var(--skip); }

.mode-toggle {
  font-size: 11px; padding: 2px 8px; border-radius: 20px; cursor: pointer; border: 1px solid var(--border);
  background: var(--panel2); color: var(--muted);
}
.mode-toggle.real { color: var(--pass); border-color: #235a3a; }
.mode-toggle.dummy { color: var(--dummy); border-color: #5a4a1a; }

.row-actions { display: flex; gap: 6px; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex;
  align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  width: 100%; max-width: 720px; max-height: 85vh; overflow: auto; padding: 20px;
}
.modal h3 { margin: 0 0 4px; font-size: 15px; }
.modal .modal-sub { color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.modal pre {
  background: #0b0f18; border: 1px solid var(--border); border-radius: 8px; padding: 12px;
  font-size: 11.5px; overflow: auto; max-height: 260px; white-space: pre-wrap; word-break: break-all;
}
.modal-section { margin-bottom: 14px; }
.modal-section h4 { font-size: 12px; color: var(--muted); margin: 0 0 6px; text-transform: uppercase; }
.modal-close { text-align: right; margin-top: 10px; }

.bootstrap-tag { font-size: 10px; color: var(--accent); border: 1px solid var(--accent); padding: 1px 5px; border-radius: 4px; margin-left: 6px; }
