* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  background: #0a0d12;
  color: #e0e0e0;
  min-height: 100vh;
}
.header {
  background: rgba(10,13,18,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header h1 { font-size: 18px; color: #f87171; }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-right a { color: #888; text-decoration: none; font-size: 13px; }
.header-right a:hover { color: #fff; }
.btn-logout { background: none; border: 1px solid rgba(255,255,255,0.1); color: #888; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.container { max-width: 1200px; margin: 0 auto; padding: 32px; }
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.06); flex-wrap: wrap; }
.tabs button {
  background: none; border: none; color: #888; padding: 12px 20px; font-size: 14px;
  cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s;
}
.tabs button.active { color: #f87171; border-bottom-color: #f87171; }
.panel { display: none; }
.panel.active { display: block; }
.panel-desc { color: #888; font-size: 13px; margin-bottom: 20px; line-height: 1.6; }
.section-head { margin-bottom: 12px; font-size: 15px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-box { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 20px; }
.stat-box .label { font-size: 12px; color: #888; margin-bottom: 4px; }
.stat-box .val { font-size: 24px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; color: #888; border-bottom: 1px solid rgba(255,255,255,0.06); font-weight: 500; }
td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.badge.admin { background: rgba(248,113,113,0.15); color: #f87171; }
.badge.user { background: rgba(96,165,250,0.15); color: #60a5fa; }
.badge.unused { background: rgba(52,211,153,0.15); color: #34d399; }
.badge.used { background: rgba(255,255,255,0.05); color: #666; }
.badge.ok { background: rgba(52,211,153,0.15); color: #34d399; }
.badge.fail { background: rgba(248,113,113,0.15); color: #f87171; }
.badge.untested { background: rgba(255,255,255,0.05); color: #888; }
.form-row { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-end; flex-wrap: wrap; }
.form-group label { display: block; font-size: 12px; color: #888; margin-bottom: 4px; }
.form-group input, .form-group select {
  padding: 8px 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; color: #fff; font-size: 13px; outline: none; min-width: 180px;
}
.form-group input:focus, .form-group select:focus { border-color: #f87171; }
.btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #f87171; color: #fff; }
.btn-primary:hover { background: #ef4444; }
.btn-secondary { background: rgba(255,255,255,0.05); color: #ccc; border: 1px solid rgba(255,255,255,0.1); }
.btn-secondary:hover { border-color: #f87171; color: #f87171; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.msg { padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; display: none; }
.msg.success { display: block; background: rgba(52,211,153,0.1); color: #34d399; }
.msg.error { display: block; background: rgba(248,113,113,0.1); color: #f87171; }
.msg.info { display: block; background: rgba(96,165,250,0.1); color: #60a5fa; }

/* 供应商卡片 */
.provider-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.provider-card .card-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.provider-card .card-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.provider-card .card-fields { display: grid; gap: 12px; }
.field-line { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.field-line label { font-size: 13px; color: #888; }
.field-line input, .field-line textarea {
  padding: 8px 12px; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; color: #fff; font-size: 13px; outline: none; width: 100%; font-family: inherit;
}
.field-line textarea { min-height: 60px; resize: vertical; }
.field-line input:focus, .field-line textarea:focus { border-color: #60a5fa; }
.card-actions { display: flex; gap: 8px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.test-result-inline { font-size: 12px; color: #888; margin-left: auto; }
.toggle {
  position: relative; width: 40px; height: 22px; background: rgba(255,255,255,0.1);
  border-radius: 11px; cursor: pointer; transition: background 0.2s;
}
.toggle.on { background: #34d399; }
.toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform 0.2s;
}
.toggle.on::after { transform: translateX(18px); }

/* Agent 卡片 */
.agent-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: auto 1fr 1fr auto auto;
  gap: 16px;
  align-items: center;
}
.agent-card .agent-name { font-weight: 600; font-size: 15px; }
.agent-card .agent-role { font-size: 12px; color: #888; margin-top: 2px; }
.agent-card select { width: 100%; }

/* 测试结果 */
.test-result-group { margin-bottom: 24px; }
.test-result-group h4 { font-size: 14px; margin-bottom: 10px; color: #ccc; }
.test-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px; margin-bottom: 8px; font-size: 13px;
}
.test-item .status-dot { width: 8px; height: 8px; border-radius: 50%; }
.test-item .status-dot.ok { background: #34d399; }
.test-item .status-dot.fail { background: #f87171; }
.test-item .status-dot.pending { background: #f59e0b; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.test-item .name { font-weight: 500; min-width: 140px; }
.test-item .detail { color: #888; flex: 1; }
.test-item .elapsed { color: #60a5fa; font-size: 12px; }
.spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
