/* ===== DESIGN SYSTEM ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #050816;
  --bg-secondary: #0a0e27;
  --bg-card: rgba(15, 23, 42, 0.7);
  --bg-card-hover: rgba(20, 30, 55, 0.85);
  --bg-input: rgba(15, 23, 42, 0.9);
  --border-default: rgba(59, 130, 246, 0.15);
  --border-hover: rgba(59, 130, 246, 0.4);
  --border-focus: rgba(59, 130, 246, 0.7);

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-heading: #f1f5f9;

  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.3);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.3);
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;

  --sev-critical: #dc2626;
  --sev-high: #ea580c;
  --sev-medium: #d97706;
  --sev-low: #2563eb;
  --sev-info: #6b7280;

  --status-pass: #10b981;
  --status-fail: #ef4444;
  --status-review: #f59e0b;

  --glass-bg: rgba(15, 23, 42, 0.5);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
  animation: bgPulse 15s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #60a5fa; }

/* ===== LAYOUT ===== */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo .logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 20px var(--accent-blue-glow);
}

.header-logo h1 {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e2e8f0, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.target-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 4px 12px;
  margin-top: 8px;
  transition: all 0.3s ease;
  max-width: 500px;
}

.target-input-group:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
  background: var(--bg-card);
}

.url-protocol {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  user-select: none;
}

.target-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-heading);
  font-family: var(--font-mono);
  font-size: 1rem;
  padding: 8px 12px;
  width: 100%;
}

.target-refresh-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.target-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-blue);
  transform: rotate(30deg);
}

.target-refresh-btn:active {
  transform: scale(0.9);
}

.header-logo .version {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== VIEW TOGGLE ===== */
.view-toggle {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-toggle button {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-toggle button.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #ffffff;
  box-shadow: 0 0 15px var(--accent-blue-glow);
}

.view-toggle button:hover:not(.active) {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

/* ===== TARGET PANEL ===== */
.target-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--glass-shadow);
}

.target-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.target-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald-glow);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.9); }
}

.target-url {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.target-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ===== SECTION TITLES ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
}

.section-title .icon { font-size: 1.3rem; }

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: -12px;
  margin-bottom: 20px;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: var(--glass-shadow);
}

.glass-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ===== OWASP TEST SELECTOR ===== */
.test-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 480px) {
  .test-categories {
    grid-template-columns: 1fr;
  }
}

.category-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.category-card:hover {
  border-color: var(--border-hover);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  background: rgba(59, 130, 246, 0.03);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s ease;
}

.category-header:hover {
  background: rgba(59, 130, 246, 0.08);
}

.category-header .cat-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.category-header .cat-badge {
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.category-header .cat-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-heading);
}

.category-header .cat-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 12px;
}

.category-header .toggle-icon {
  transition: transform 0.3s ease;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.category-card.open .toggle-icon {
  transform: rotate(180deg);
}

.category-tests {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.category-card.open .category-tests {
  max-height: 2000px;
}

.select-all-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(59, 130, 246, 0.05);
  border-bottom: 1px solid var(--glass-border);
}

.select-all-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.test-item {
  padding: 12px 20px;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.2s ease;
}

.test-item:hover {
  background: rgba(59, 130, 246, 0.05);
}

.test-item:last-child {
  border-bottom: none;
}

.test-item-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.test-item-header label {
  cursor: pointer;
  flex: 1;
}

.test-item-header .test-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
}

.test-item-header .test-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

.test-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  margin-left: 28px;
}

.severity-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.severity-badge.critical { background: rgba(220, 38, 38, 0.15); color: var(--sev-critical); border: 1px solid rgba(220, 38, 38, 0.3); }
.severity-badge.high { background: rgba(234, 88, 12, 0.15); color: var(--sev-high); border: 1px solid rgba(234, 88, 12, 0.3); }
.severity-badge.medium { background: rgba(217, 119, 6, 0.15); color: var(--sev-medium); border: 1px solid rgba(217, 119, 6, 0.3); }
.severity-badge.low { background: rgba(37, 99, 235, 0.15); color: var(--sev-low); border: 1px solid rgba(37, 99, 235, 0.3); }
.severity-badge.informational { background: rgba(107, 114, 128, 0.15); color: var(--sev-info); border: 1px solid rgba(107, 114, 128, 0.3); }

.cvss-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.auth-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ===== CUSTOM CHECKBOXES ===== */
input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-default);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
  margin-top: 2px;
}

input[type="checkbox"]:checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* ===== INPUT CONFIGURATION ===== */
.input-config-section {
  margin-bottom: 32px;
  display: none;
}

.input-config-section.visible {
  display: block;
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group .input-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

.input-group input[type="text"],
.input-group input[type="number"],
.input-group textarea,
.input-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: all 0.3s ease;
  outline: none;
}

.input-group textarea {
  min-height: 80px;
  resize: vertical;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.input-group select {
  cursor: pointer;
}

.input-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.custom-input-wrapper {
  margin-top: 8px;
  display: none;
}

.custom-input-wrapper.visible {
  display: block;
}

.input-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

.input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
}

.input-card .card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== EXECUTION PANEL ===== */
.execution-panel {
  margin-bottom: 32px;
}

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

.btn {
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-blue-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--accent-blue-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-red), #b91c1c);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.2);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* ===== AUTH MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-content h3 {
  font-size: 1.2rem;
  color: var(--accent-amber);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ===== PROGRESS ===== */
.progress-bar-wrapper {
  width: 100%;
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
  display: none;
}

.progress-bar-wrapper.active {
  display: block;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-cyan));
  background-size: 200% 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s ease;
  animation: progressShimmer 2s linear infinite;
}

@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== CONSOLE ===== */
.console-wrapper {
  background: #0c0c0c;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.console-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.console-dot.red { background: #ff5f57; }
.console-dot.yellow { background: #febc2e; }
.console-dot.green { background: #28c840; }

.console-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
  font-family: var(--font-mono);
}

.console-output {
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: #a0aec0;
}

.console-output .log-line { padding: 1px 0; }
.console-output .log-line.error { color: var(--accent-red); }
.console-output .log-line.info { color: var(--accent-cyan); }
.console-output .log-line.success { color: var(--accent-emerald); }
.console-output .log-line.warning { color: var(--accent-amber); }

/* ===== RESULTS DASHBOARD ===== */
.results-section {
  margin-bottom: 32px;
  display: none;
}

.results-section.visible {
  display: block;
}

.results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.summary-card.active-filter {
  border-color: var(--accent-blue);
  background: var(--bg-card-hover);
  box-shadow: 0 0 15px var(--accent-blue-glow);
  transform: translateY(-2px);
}

.summary-card .count {
  font-size: 2rem;
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

.summary-card .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.summary-card.critical .count { color: var(--sev-critical); }
.summary-card.high .count { color: var(--sev-high); }
.summary-card.medium .count { color: var(--sev-medium); }
.summary-card.low .count { color: var(--sev-low); }
.summary-card.info .count { color: var(--sev-info); }
.summary-card.total .count { color: var(--accent-blue); }

/* ===== FINDINGS LIST ===== */
.findings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.finding-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
}

.finding-card:hover {
  border-color: var(--border-hover);
}

.finding-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.finding-card-header:hover {
  background: rgba(59, 130, 246, 0.05);
}

.finding-sev-indicator {
  width: 4px;
  height: 40px;
  border-radius: 2px;
  flex-shrink: 0;
}

.finding-sev-indicator.critical { background: var(--sev-critical); }
.finding-sev-indicator.high { background: var(--sev-high); }
.finding-sev-indicator.medium { background: var(--sev-medium); }
.finding-sev-indicator.low { background: var(--sev-low); }
.finding-sev-indicator.informational { background: var(--sev-info); }

.finding-info {
  flex: 1;
}

.finding-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-heading);
}

.finding-asset {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.finding-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.finding-expand-icon {
  color: var(--text-muted);
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

.finding-card.open .finding-expand-icon {
  transform: rotate(180deg);
}

.finding-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.finding-card.open .finding-details {
  max-height: 2000px;
}

.finding-details-content {
  padding: 0 20px 20px;
}

.finding-field {
  margin-bottom: 12px;
}

.finding-field-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 4px;
}

.finding-field-value {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.finding-field-value pre {
  background: #0c0c0c;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow-x: auto;
  color: #a0aec0;
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-all;
}

.status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.status-badge.pass { background: rgba(16, 185, 129, 0.15); color: var(--status-pass); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-badge.vulnerable { background: rgba(239, 68, 68, 0.15); color: var(--status-fail); border: 1px solid rgba(239, 68, 68, 0.3); }
.status-badge.needs_review { background: rgba(245, 158, 11, 0.15); color: var(--status-review); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-badge.informational { background: rgba(107, 114, 128, 0.15); color: var(--sev-info); border: 1px solid rgba(107, 114, 128, 0.3); }

/* ===== REPORT DOWNLOAD ===== */
.report-section {
  margin-bottom: 48px;
  display: none;
}

.report-section.visible {
  display: block;
}

.report-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.report-btn {
  flex: 1;
  min-width: 200px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-family: var(--font-body);
}

.report-btn:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.report-btn .report-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.report-btn .report-format {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  display: block;
  margin-bottom: 4px;
}

.report-btn .report-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.report-btn.pdf { border-color: rgba(239, 68, 68, 0.3); }
.report-btn.pdf:hover { border-color: var(--accent-red); box-shadow: 0 8px 30px rgba(239, 68, 68, 0.15); }
.report-btn.json { border-color: rgba(245, 158, 11, 0.3); }
.report-btn.json:hover { border-color: var(--accent-amber); box-shadow: 0 8px 30px rgba(245, 158, 11, 0.15); }
.report-btn.csv { border-color: rgba(16, 185, 129, 0.3); }
.report-btn.csv:hover { border-color: var(--accent-emerald); box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15); }

/* ===== LOADING SPINNER ===== */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  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); }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  animation: toastSlideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes toastSlideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-color: rgba(16, 185, 129, 0.5); }
.toast.error { border-color: rgba(239, 68, 68, 0.5); }
.toast.info { border-color: rgba(59, 130, 246, 0.5); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .app-container { padding: 0 16px; }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .target-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .test-categories {
    grid-template-columns: 1fr;
  }

  .input-cards-grid {
    grid-template-columns: 1fr;
  }

  .results-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .report-buttons {
    flex-direction: column;
  }

  .report-btn {
    min-width: auto;
  }

  .execution-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .results-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-logo h1 {
    font-size: 1.1rem;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.stagger-1 { animation-delay: 0.1s; opacity: 0; }
.stagger-2 { animation-delay: 0.2s; opacity: 0; }
.stagger-3 { animation-delay: 0.3s; opacity: 0; }
.stagger-4 { animation-delay: 0.4s; opacity: 0; }

/* ===== HANDBOOK SECTION ===== */
.handbook-section {
  margin-top: 64px;
  margin-bottom: 64px;
}

.handbook-content h3 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.handbook-content p {
  margin-bottom: 20px;
}

/* ===== FOOTER ===== */
.app-footer {
  margin-top: 80px;
  padding: 60px 0 40px;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 300px;
}

.footer-brand span {
  font-weight: 700;
  color: var(--text-heading);
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-group h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-group a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.footer-group a:hover {
  color: var(--accent-blue);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-bottom strong {
  color: var(--accent-blue);
}

@media (max-width: 768px) {
  .footer-links { gap: 32px; flex-direction: column; }
  .footer-content { flex-direction: column; gap: 32px; }
}
