/* ===== TEST COMPACT CARD ===== */
.test-compact {
  background: var(--bg-elevated);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  cursor: pointer;
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.test-compact:hover {
  border-color: var(--border-mid);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.tc-status {
  width: 4px;
  border-radius: 2px;
  flex-shrink: 0;
  align-self: stretch;
}
.tc-status.tc-blocked { background: var(--accent-green); }
.tc-status.tc-exposed { background: var(--accent-red); }
.tc-status.tc-warning { background: var(--accent-yellow); }
.tc-status.tc-info { background: var(--accent-blue); }
.tc-status.tc-pending { background: var(--border-mid); }
.tc-body {
  flex: 1;
  min-width: 0;
}
.tc-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.tc-title {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.tc-hash {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  user-select: all;
}
.tc-detail-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  background: transparent;
  border: 1px solid var(--border-dim);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
  font-family: var(--font-ui);
  white-space: nowrap;
}
.tc-detail-btn:hover {
  background: var(--accent-blue-bg);
  border-color: var(--accent-blue);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.3;
}
.badge-green { background: var(--accent-green-bg); color: var(--accent-green); }
.badge-red { background: var(--accent-red-bg); color: var(--accent-red); }
.badge-yellow { background: var(--accent-yellow-bg); color: var(--accent-yellow); }
.badge-blue { background: var(--accent-blue-bg); color: var(--accent-blue); }

/* ===== DRAWER ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: var(--bg-drawer);
  border-top: 1px solid var(--border-mid);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 201;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.drawer.open { transform: translateY(0); }
.drawer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-dim);
  position: sticky;
  top: 0;
  background: var(--bg-drawer);
  z-index: 1;
}
.drawer-close {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-dim);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--ease), border-color var(--ease);
  flex-shrink: 0;
}
.drawer-close:hover { color: var(--text-primary); border-color: var(--border-mid); }
.drawer-close svg { width: 13px; height: 13px; }
.drawer-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.drawer-title { font-size: 14px; font-weight: 700; }
.drawer-body { padding: 14px 18px 22px; }
.drawer-section { margin-bottom: 16px; }
.drawer-section:last-child { margin-bottom: 0; }
.drawer-section-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.drawer-section-title svg { width: 14px; height: 14px; flex-shrink: 0; }
.drawer-data-content { font-size: 13px; line-height: 1.6; }
.drawer-text { font-size: 13px; line-height: 1.6; color: var(--text-secondary); }

.drawer-data-content .kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  gap: 10px;
}
.drawer-data-content .kv-row:last-child { border-bottom: none; }
.drawer-data-content .kv-key {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.drawer-data-content .kv-value {
  font-size: 12px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  text-align: right;
  word-break: break-all;
}
.drawer-data-content .list-display {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.drawer-data-content .list-item {
  font-size: 11px;
  padding: 2px 7px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.drawer-data-content .hash-display {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(0,0,0,0.3);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  word-break: break-all;
  letter-spacing: 0.5px;
  user-select: all;
  margin-top: 4px;
}
.drawer-section.explanation {
  padding: 12px 14px;
  background: var(--accent-blue-bg);
  border-left: 3px solid var(--accent-blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.drawer-section.remediation-box {
  padding: 12px 14px;
  background: var(--accent-purple-bg);
  border-left: 3px solid var(--accent-purple);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.drawer-section.remediation-box .drawer-section-title { color: var(--accent-purple); }

/* ===== LOADING ===== */
@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}
.dot.pending { animation: pulse 1.5s ease-in-out infinite; }

/* ===== STAGGER ANIMATION ===== */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.test-compact {
  animation: cardIn 0.3s ease forwards;
  opacity: 0;
}
.test-compact:nth-child(1) { animation-delay: 0.02s; }
.test-compact:nth-child(2) { animation-delay: 0.04s; }
.test-compact:nth-child(3) { animation-delay: 0.06s; }
.test-compact:nth-child(4) { animation-delay: 0.08s; }
.test-compact:nth-child(5) { animation-delay: 0.10s; }

.drawer-section {
  animation: cardIn 0.3s ease forwards;
  opacity: 0;
}
.drawer-section:nth-child(1) { animation-delay: 0.05s; }
.drawer-section:nth-child(2) { animation-delay: 0.10s; }
.drawer-section:nth-child(3) { animation-delay: 0.15s; }
