/* QA 허브 전용 스타일 */
.qa-page {
  max-width: 1200px;
}

.qa-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.qa-header h1 {
  margin: 0;
  flex: 1;
}

.qa-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0;
}

.qa-tab {
  padding: 10px 16px;
  background: transparent;
  color: #475569;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 4px 4px 0 0;
  margin-bottom: -2px;
}

.qa-tab.active {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
  font-weight: 700;
  background: #eff6ff;
}

.qa-panel {
  display: none;
}

.qa-panel.active {
  display: block;
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.qa-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.qa-stat .num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.qa-stat .lbl {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.qa-stat.pass .num { color: #15803d; }
.qa-stat.fail .num { color: #dc2626; }
.qa-stat.pending .num { color: #ca8a04; }

.qa-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.qa-alert {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 12px;
}

.qa-accordion {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #fff;
}

.qa-accordion summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
  background: #f8fafc;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qa-accordion summary::-webkit-details-marker { display: none; }

.qa-accordion .section-progress {
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
}

.qa-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  align-items: start;
}

.qa-item:nth-child(even) { background: #fafafa; }

.qa-item-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.qa-item-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.qa-item-controls select,
.qa-item-controls input {
  font-size: 12px;
  padding: 4px 6px;
}

.qa-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-right: 4px;
}

.qa-badge-auto { background: #dbeafe; color: #1d4ed8; }
.qa-badge-e2e { background: #fce7f3; color: #be185d; }
.qa-badge-manual { background: #f3e8ff; color: #7c3aed; }
.qa-badge-backend { background: #ffedd5; color: #c2410c; }
.qa-badge-delivery { background: #ccfbf1; color: #0f766e; }
.qa-badge-na { background: #f1f5f9; color: #64748b; }

.qa-audit-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.qa-audit-row.fail { color: #dc2626; }
.qa-audit-row.pass { color: #15803d; }
.qa-audit-row.warn { color: #ca8a04; }

.qa-scenario {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}

.qa-scenario h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.qa-scenario ol {
  margin: 8px 0;
  padding-left: 20px;
  font-size: 13px;
}

.qa-scenario .links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.qa-console {
  background: #0f172a;
  color: #e2e8f0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  border-radius: 8px;
  padding: 12px;
  max-height: 320px;
  overflow-y: auto;
  margin-top: 8px;
}

.qa-console .line {
  margin: 2px 0;
  word-break: break-all;
}

.qa-console .line.out { color: #86efac; }
.qa-console .line.in { color: #93c5fd; }
.qa-console .line.sys { color: #94a3b8; }

.qa-bridge-sim {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

.qa-topic-input {
  flex: 1;
  min-width: 180px;
}

/* ?qa=1 경량 로그 패널 */
#qa-bridge-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: min(420px, 100vw);
  max-height: 40vh;
  background: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
  font-family: Consolas, monospace;
  font-size: 11px;
  z-index: 99999;
  border-top-left-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

#qa-bridge-panel.collapsed .qa-bridge-body { display: none; }
#qa-bridge-panel.collapsed { max-height: none; }

.qa-bridge-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #1e293b;
  cursor: pointer;
  user-select: none;
}

.qa-bridge-head span { font-weight: 700; color: #38bdf8; }

.qa-bridge-body {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  max-height: calc(40vh - 32px);
}

.qa-bridge-line { margin: 2px 0; word-break: break-all; }
.qa-bridge-line.out { color: #86efac; }
.qa-bridge-line.in { color: #fcd34d; }

.badge-cohost { background: #fef3c7; color: #b45309; }
