/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Scan line animation for active states */
@keyframes scanline {
  0% { background-position: 0 0; }
  100% { background-position: 0 40px; }
}

/* Terminal output styling */
.terminal-output {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #00ff88;
  background: #040608;
  border: 1px solid #1e2d3d;
  padding: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  border-radius: 4px;
}

/* Severity badge left borders */
.sev-critical { border-left: 3px solid #ff2d55; }
.sev-high     { border-left: 3px solid #ff3b30; }
.sev-medium   { border-left: 3px solid #ff9500; }
.sev-low      { border-left: 3px solid #ffcc00; }
.sev-info     { border-left: 3px solid #5ac8fa; }

/* Animated accent underline for headings */
.section-heading::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: #00d4ff;
  margin-top: 6px;
}

/* Glowing input focus */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #00d4ff !important;
  box-shadow: 0 0 0 1px rgba(0,212,255,0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #080b10;
}
::-webkit-scrollbar-thumb {
  background: #1e2d3d;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #243446;
}

/* Sidebar overlay for mobile */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 25;
}
#sidebar-overlay.active {
  display: block;
}

/* Stat card glow */
.stat-card {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  border-color: #243446;
  box-shadow: 0 0 20px rgba(0,212,255,0.05);
}

/* Risk gauge */
.risk-gauge-bg {
  fill: none;
  stroke: #1e2d3d;
  stroke-width: 8;
}
.risk-gauge-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-in-out, stroke 0.5s;
}

/* Checklist item styling */
.checklist-item {
  transition: background-color 0.15s;
}
.checklist-item:hover {
  background-color: #131920;
}
.checklist-item.status-completed {
  border-left-color: #00ff88;
}
.checklist-item.status-in_progress {
  border-left-color: #00d4ff;
}
.checklist-item.status-not_started {
  border-left-color: #4a5568;
}
.checklist-item.status-na {
  border-left-color: #8899aa;
  opacity: 0.6;
}

/* Accordion animation */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.accordion-content.open {
  max-height: 50000px;
  transition: max-height 0.5s ease-in;
}

/* Pulse animation for critical items */
@keyframes pulse-critical {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.pulse-critical {
  animation: pulse-critical 2s infinite;
}

/* Step indicator */
.step-indicator .step {
  transition: all 0.3s;
}
.step-indicator .step.active {
  background-color: #00d4ff;
  color: #080b10;
}
.step-indicator .step.completed {
  background-color: #00ff88;
  color: #080b10;
}

/* Toast animation */
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}
.toast-enter {
  animation: slideIn 0.3s ease-out forwards;
}
.toast-exit {
  animation: slideOut 0.3s ease-in forwards;
}

/* Modal backdrop */
.modal-backdrop {
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

/* Table row hover */
.data-table tbody tr {
  transition: background-color 0.15s;
}
.data-table tbody tr:hover {
  background-color: #131920;
}

/* Print styles for reports */
@media print {
  body::before { display: none; }
  aside, #sidebar-toggle, #toast-container { display: none !important; }
  main { margin: 0 !important; }
  .no-print { display: none !important; }
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  border-radius: 0.25rem;
  font-weight: 500;
}

/* CVSS gauge */
.cvss-gauge {
  width: 120px;
  height: 120px;
}

/* Tab underline */
.tab-active {
  border-bottom: 2px solid #00d4ff;
  color: #00d4ff;
}
.tab-inactive {
  border-bottom: 2px solid transparent;
  color: #8899aa;
}
.tab-inactive:hover {
  color: #e8edf2;
  border-bottom-color: #243446;
}

/* Progress bar */
.progress-bar {
  height: 4px;
  background: #1e2d3d;
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #00ff88);
  border-radius: 2px;
  transition: width 0.5s ease;
}
