/* CSS Custom Properties (Variables) */
:root {
  /* Background Colors */
  --bg-primary: #1e1e1e;
  --bg-secondary: #262629;
  --bg-tertiary: #2d2d30;
  --bg-quaternary: #3c3c3c;
  --bg-input: #2d2d30;
  --bg-hover: #3c3c3c;
  --bg-weak-finding: #4a3a1a;
  --bg-weak-finding-hover: #5a4a2a;
  --bg-file-content: #1f2937;
  
  /* Text Colors */
  --text-primary: #d4d4d4;
  --text-secondary: #cccccc;
  --text-muted: #8c8c8c;
  --text-light: #e0e0e0;
  --text-file-content: #f9fafb;
  --text-meta: #a0a0a0;
  
  /* Brand/Accent Colors */
  --accent-primary: #0D72BA;
  --accent-primary-hover: #106ebe;
  --accent-primary-active: #005a9e;
  --accent-primary-light: #40a9ff;
  --accent-primary-rgb: 13, 114, 186;
  
  /* Status Colors */
  --success-primary: #16a34a;
  --success-primary-rgb: 22, 163, 74;
  --warning-primary: #fbbf24;
  --warning-primary-rgb: 251, 191, 36;
  --warning-secondary: #f59e0b;
  --status-running: #ffd700;
  --status-running-light: #ffed4e;
  
  /* Border Colors */
  --border-primary: #3c3c3c;
  --border-secondary: #4a4a4a;
  --border-muted: #6b7280;
  --border-hover: #8c8c8c;
  --border-focus: #0078d4;
  
  /* Box Shadow */
  --shadow-focus: 0 0 0 2px rgba(0, 120, 212, 0.2);
  --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 25px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
  --shadow-contact: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-accent: 0 4px 12px rgba(13, 114, 186, 0.2);
  --shadow-accent-light: 0 4px 12px rgba(64, 169, 255, 0.3);
  --shadow-standard: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-modal: 0 4px 8px rgba(0, 0, 0, 0.2);
  --shadow-text: 1px 1px 2px rgba(0, 0, 0, 0.5);
  --overlay-dark: rgba(0, 0, 0, 0.7);

  /* Common Colors */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-transparent: transparent;
  
  /* Button Colors */
  --btn-danger: #ef4444;
  --btn-danger-hover: #dc2626;
  --btn-danger-transparent: #dc262683;
  --btn-secondary: #6b7280;
  --btn-secondary-hover: #4b5563;
  --btn-success-hover: #15803d;
  
  /* Footer Colors */
  --footer-bg-overlay: rgba(255, 255, 255, 0.1);
  --footer-border-overlay: rgba(255, 255, 255, 0.2);
  --footer-bg-overlay-hover: rgba(255, 255, 255, 0.15);
  --footer-gradient: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  
  /* File Content Colors */
  --file-content-overlay: rgba(0, 0, 0, 0.1);

    /* Risk Level Colors */
  --risk-critical: #7e1fd6;
  --risk-critical-hover: #6d1cb98c;
  --risk-critical-bg: rgba(109, 28, 185, 0.035);
  --risk-critical-bg-hover: rgba(109, 28, 185, 0.2);
  --risk-critical-bg-header: rgba(109, 28, 185, 0.15);

  --risk-high: #dc2626;
  --risk-high-hover: #b91c1c;
  --risk-high-bg: rgba(220, 38, 38, 0.025);
  --risk-high-bg-hover: rgba(220, 38, 38, 0.15);
  --risk-high-bg-header: rgba(220, 38, 38, 0.1);
  
  --risk-medium: #ea580c;
  --risk-medium-hover: #c2410c;
  --risk-medium-bg: rgba(234, 88, 12, 0.025);
  --risk-medium-bg-hover: rgba(234, 88, 12, 0.15);
  --risk-medium-bg-header: rgba(234, 88, 12, 0.1);
  
  --risk-low: #FFDC61;
  --risk-low-hover: #FFD23F;
  --risk-low-bg: rgba(255, 220, 97, 0.025);
  --risk-low-bg-hover: rgba(255, 220, 97, 0.15);
  --risk-low-bg-header: rgba(255, 220, 97, 0.1);

  /* Enhanced Scan Results Colors */
  --scan-card-bg: #262629;
  --scan-card-border: #404040;
  --scan-card-hover: #2f2f32;
  --scan-accent-glow: rgba(13, 114, 186, 0.3);
  --scan-gradient-start: rgba(13, 114, 186, 0.05);
  --scan-gradient-end: rgba(13, 114, 186, 0.02);
  --scan-hover-gradient: linear-gradient(135deg, rgba(13, 114, 186, 0.08) 0%, rgba(13, 114, 186, 0.03) 100%);
  --scan-divider: rgba(13, 114, 186, 0.2);
}

/* General Page Styling */
html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

header {
  background: var(--accent-primary);
  color: var(--text-primary);
  padding: 0.75rem 2.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-primary);
  box-shadow: 0 2px 12px rgba(13, 114, 186, 0.08); /* subtle shadow */
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.25rem;
  gap: 2rem;
  min-height: 60px;
  overflow: visible;
}

/* Reserve space on the right edge so right-aligned items don't get clipped */
/* Reserve space on the right edge so right-aligned items don't get clipped */
.header-top::after {
  content: '';
  flex: 0 0 2rem; /* matches header right padding (approx) */
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a.main-nav {
  color: var(--text-primary);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: color 0.2s;
  position: relative;
  background: none;
  min-width: 120px;
  white-space: nowrap;
}

nav a.main-nav::after {
  content: '';
  display: block;
  height: 2px;
  width: 0;
  background: var(--accent-primary-light);
  transition: width 0.3s;
  position: absolute;
  left: 0;
  bottom: -4px;
}

nav a.main-nav:hover {
  color: var(--text-muted);
  background: var(--accent-primary-hover);
}


nav a.main-nav:hover {
  background: var(--accent-primary-hover);
  color: #fff;
}

nav a.main-nav:hover::after {
  width: 100%;
}

#logo {
  height: 40px;
  width: auto;
  transition: opacity 0.2s, transform 0.2s;
}

#logo:hover {
  opacity: 0.7;
}

header h1 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

header h1 a::after {
  content: '';
  display: block;
  height: 2px;
  width: 0;
  background: var(--accent-primary-light);
  transition: width 0.3s;
  position: absolute;
  left: 0;
  bottom: -4px;
}

header h1 a:hover {
  color: var(--text-muted);
}

header h1 a:hover::after {
  width: 100%;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav ul li {
  display: flex;
  align-items: center;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--text-muted);
}

/* User Info Section */
.user-info {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  font-size: 0.95rem;
  flex-shrink: 0;
  white-space: nowrap;
  z-index: 200; /* ensure buttons appear above other header elements */
  margin-left: auto; /* Push user info to the far right */
}

.user-info span {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  background: var(--bg-tertiary);
  border-radius: 6px;
  border: 1px solid var(--border-secondary);
}

.login-btn, .logout-btn {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: 1px solid var(--border-secondary);
  background: var(--bg-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  min-width: fit-content;
  white-space: nowrap;
}

.login-btn:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.logout-btn:hover {
  background: var(--accent-primary-hover);
  color: white;
  border-color: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.login-btn:active, .logout-btn:active {
  transform: translateY(0);
}

/* Script Status Banner */
.script-status-banner {
  background-color: var(--bg-quaternary);
  color: var(--status-running);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  margin: 0.25rem 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-secondary);
}

.status-indicator-running {
  font-size: 1rem;
  animation: spin 2s linear infinite;
}

.status-indicator-completed {
  font-size: 1rem;
  color: var(--success-primary);
  animation: none;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.current-script {
  font-weight: 500;
  font-family: monospace;
}

.view-status-link {
  color: var(--status-running) !important;
  text-decoration: underline;
  font-weight: 600;
  margin-left: auto;
}

.view-status-link:hover {
  color: var(--status-running-light) !important;
}

/* Container for two-column layout */
.content-container {
  display: flex;
  gap: 2rem;
  max-width: 98%;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: flex-start;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-height: 100%;
}

/* Inputs and Textareas */
input[type="text"],
textarea,
select {
  width: 100%;
  font-family: monospace;
  font-size: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  box-sizing: border-box;
  background-color: var(--bg-input);
  color: var(--text-primary);
  padding-bottom: 0.5rem;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4d4d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 3rem;
}

select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

select option {
  background-color: var(--bg-input);
  color: var(--text-primary);
  padding: 0.5rem;
}

textarea {
  resize: vertical;
  min-height: 2.5rem;
}

/* Button */
button {
  padding: 0.75rem;
  background-color: var(--accent-primary);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

button:hover {
  background-color: var(--accent-primary-hover);
}

/* Stop Button */
#stop-scan-btn {
  background-color: var(--btn-danger);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  width: auto;
}

#stop-scan-btn:hover {
  background-color: var(--btn-danger-transparent);
}

/* Refresh Button */
#refresh-btn {
  background-color: var(--btn-secondary);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  width: auto;
}

#refresh-btn:hover {
  background-color: var(--btn-secondary-hover);
}

/* Script Output */
#script-output {
  background-color: var(--bg-file-content);
  color: var(--text-file-content);
  padding: 1rem;
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9rem;
}

footer {
  background: var(--accent-primary);
  color: var(--text-primary);
  padding: 2rem 1rem;
  margin-top: auto;
  font-size: 1rem;
  width: 100%;
  box-shadow: 0 -2px 12px rgba(13, 114, 186, 0.08);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-right: 1rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-right a {
  color: var(--text-primary);
  background: transparent;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--text-primary);
  transition: background 0.2s, color 0.2s;
}

.footer-right a:hover {
  background: var(--accent-primary-light);
  color: #fff;
}

.footer-left p {
  margin: 0;
  line-height: 1.4;
}

.footer-logo {
  height: 40px;
  width: auto;
  margin: 0;
  vertical-align: middle;
}

footer a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background-color: var(--footer-bg-overlay);
  border: 1px solid var(--footer-border-overlay);
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

footer a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--footer-gradient);
  transition: left 0.5s ease;
}

footer a:hover {
  color: var(--accent-primary-light);
  background-color: var(--footer-bg-overlay-hover);
  border-color: var(--accent-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent-light);
}

footer a:hover::before {
  left: 100%;
}

footer a:active {
  transform: translateY(0);
}

@media (max-width: 700px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
  .footer-left {
    align-items: center;
  }
  .footer-logo {
    margin: 0 0 1rem 0;
  }
}


/* Section Headers */
.content h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-primary);
  padding-bottom: 0.25rem;
}

.content h2:first-child {
  margin-top: 0;
}

/* Preformatted Text Display (for scope/exclude) */
pre {
  background-color: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 0.75rem;
  font-family: monospace;
  font-size: 1rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  box-sizing: border-box;
  min-height: 2.5rem;
  color: var(--text-primary);
}

/* Improve input spacing */
.content input[type="text"] {
  margin-bottom: 1rem;
}

label {
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
  color: var(--text-light);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  padding-left: 0.25rem;
}

label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--accent-primary);
  border-radius: 2px;
}

/* Checklist Page Styling */
.checklist-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 100px);
}

/* Run Scripts Status Page - Centered Layout */
.run-scripts-status .checklist-container {
  max-width: 80%;
  justify-content: center;
}

.run-scripts-status .scripts-form {
  width: 100%;
  max-width: 1000px;
}

/* Unified Form Styling */
.form-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  background-color: var(--bg-input);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-focus);
}

.form-group input[type="file"] {
  padding: 0.5rem;
  background-color: var(--bg-hover);
  border: 2px dashed var(--border-primary);
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.script-list-header {
  margin-bottom: 1rem;
}

.script-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .checklist-container {
    padding: 1rem;
  }
  
  .form-section {
    padding: 1rem;
  }
  
  .script-list {
    grid-template-columns: 1fr;
  }
}

/* Status Display Styling */
.run-scripts-status #status-display {
  margin-bottom: 2rem;
}

.run-scripts-status #output-container {
  margin-top: 2rem;
}

/* Status Controls Styling */
.run-scripts-status .status-controls {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.client-selection-flex {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.client-selection-flex select {
  flex: 1;
}

.new-client-btn {
  background-color: var(--success-primary);
  padding: 0.5rem;
}

.new-client-btn:hover {
  background-color: var(--btn-success-hover);
}

.new-client-input {
  display: none;
}

.category-select {
  margin-bottom: 1rem;
}

.scan-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.scan-actions form {
  display: inline;
}

.launch-btn {
  padding: 0.5rem;
  font-size: 0.8rem;
  background-color: var(--success-primary);
}

.launch-btn:hover {
  background-color: var(--btn-success-hover);
}

.view-results-btn {
  padding: 0.5rem;
  font-size: 0.8rem;
  background-color: var(--border-focus);
}

.view-results-btn:hover {
  background-color: var(--accent-primary-hover);
}

.parse-results-btn {
  padding: 0.5rem;
  font-size: 0.8rem;
  background-color: var(--risk-high);
}

.parse-results-btn:hover {
  background-color: var(--risk-high-hover);
}

.parsed-results-list {
  margin-left: 1rem;
  font-size: 0.9rem;
}

.browse-results-link {
  background-color: var(--border-focus);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 1rem;
  display: inline-block;
}

.browse-results-link:hover {
  background-color: var(--accent-primary-hover);
}

/* Legacy Scripts Form Styling - for other pages */
.scripts-form {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 2rem;
}

.scripts-form h1 {
  margin-top: 0;
  margin-bottom: 2rem;
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 600;
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 0.75rem;
}

.scripts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.scripts-form button {
  margin-top: 0;
  width: 100%;
  padding: 1rem;
  background-color: var(--accent-primary);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.scripts-form button:hover {
  background-color: var(--accent-primary-hover);
}

.script-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  background-color: var(--bg-input);
  transition: all 0.2s ease;
}

.script-item:hover {
  background-color: var(--bg-hover);
  border-color: var(--accent-primary);
}

.script-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  appearance: none;
  border: 2px solid var(--border-muted);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  background-color: var(--bg-input);
  transition: all 0.2s ease;
}

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

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

.script-item label {
  margin: 0;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Button Styling */
.select-all-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: var(--bg-hover);
  border: 1px solid var(--border-muted);
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-all-btn:hover {
  background-color: var(--bg-quaternary);
  border-color: var(--border-hover);
  color: var(--text-light);
}

.run-button {
  width: 100%;
  padding: 1rem 2rem;
  background-color: var(--success-primary);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0.5rem;
  transition: background-color 0.2s ease;
}

.run-button:hover {
  background-color: #137e3a;
}

.help-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.scripts-form button {
  margin-top: 0;
  width: 100%;
  padding: 1rem;
  background-color: var(--accent-primary);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.scripts-form button:hover {
  background-color: var(--accent-primary-hover);
}

/* Scan Results Page Styling */
.scans-container {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 200px);
}

.scans-left {
  flex: 1;
  max-width: 800px;
}

.scans-right {
  flex: 1;
  max-width: 400px;
}

.scans-form {
  background: linear-gradient(135deg, var(--scan-gradient-start) 0%, var(--scan-gradient-end) 100%);
  background-color: var(--scan-card-bg);
  border: 1px solid var(--scan-card-border);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 80%;
  margin: 2rem auto;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.scans-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.scans-form h1 {
  margin-top: 0;
  margin-bottom: 2.5rem;
  color: var(--text-light);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.scans-form h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  border-radius: 2px;
}

.scan-section {
  margin-bottom: 3rem;
  position: relative;
}

.scan-section h2 {
  color: var(--accent-primary-light);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--scan-card-bg) 0%, var(--bg-quaternary) 100%);
  border-radius: 12px;
  border: 1px solid var(--scan-card-border);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.1rem;
}

.scan-section h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-primary-light));
}

.scan-section h2::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(13, 114, 186, 0.02) 100%);
  pointer-events: none;
}

/* Navigation list styling - Enhanced */
.navigation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.nav-item {
  background: linear-gradient(135deg, var(--scan-card-bg) 0%, var(--bg-quaternary) 100%);
  border: 1px solid var(--scan-card-border);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-item:hover {
  background: var(--scan-hover-gradient);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.15),
    0 0 20px var(--scan-accent-glow);
}

.nav-item:hover::before {
  transform: scaleX(1);
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::before {
  content: '▶';
  margin-right: 0.75rem;
  color: var(--accent-primary);
  font-size: 0.8rem;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.nav-item:hover .nav-link::before {
  transform: translateX(4px);
  color: var(--accent-primary-light);
  opacity: 1;
}

.nav-link:hover {
  color: var(--accent-primary-light);
}

/* Breadcrumb styling - Enhanced */
.breadcrumb {
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--scan-card-bg) 0%, var(--bg-quaternary) 100%);
  border-radius: 12px;
  border: 1px solid var(--scan-card-border);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.breadcrumb::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-primary-light));
}

.breadcrumb a {
  color: var(--accent-primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.breadcrumb a:hover {
  color: var(--color-white);
  background-color: rgba(13, 114, 186, 0.2);
  text-decoration: none;
}

/* Configuration section styling - Enhanced */
.config-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--scan-card-bg) 0%, var(--bg-quaternary) 100%);
  border-radius: 12px;
  border: 1px solid var(--scan-card-border);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.config-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--success-primary), #22c55e);
}

.config-section h3 {
  color: var(--success-primary);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--scan-divider);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.config-section h3::before {
  content: '⚙️';
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

.scan-dates-section {
  margin-top: 2rem;
}

.scan-dates-section h3 {
  color: var(--accent-primary-light);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--scan-divider);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.scan-dates-section h3::before {
  content: '📅';
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

/* Enhanced File List Styling */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.file-item {
  padding: 1rem 1.25rem;
  border: 1px solid var(--scan-card-border);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--scan-card-bg) 0%, var(--bg-quaternary) 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.file-item:hover {
  background: var(--scan-hover-gradient);
  border-color: var(--accent-primary);
  transform: translateX(4px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 20px var(--scan-accent-glow);
}

.file-item:hover::before {
  transform: scaleY(1);
}

.file-item.weak-finding {
  border-color: var(--warning-primary);
  background: linear-gradient(135deg, var(--bg-weak-finding) 0%, #5a4a2a 100%);
}

.file-item.weak-finding::before {
  background: var(--warning-primary);
}

.file-item.weak-finding:hover {
  background: linear-gradient(135deg, var(--bg-weak-finding-hover) 0%, #6a5a3a 100%);
  border-color: var(--warning-secondary);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(251, 191, 36, 0.3);
}

.file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.file-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  transition: all 0.3s ease;
  position: relative;
  flex: 1;
}

.file-link::before {
  content: '📄';
  margin-right: 0.5rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.file-item:hover .file-link {
  color: var(--accent-primary-light);
}

.file-item:hover .file-link::before {
  opacity: 1;
  transform: scale(1.1);
}

.file-size {
  color: var(--text-meta);
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--scan-card-bg) 0%, var(--bg-quaternary) 100%);
  border-radius: 16px;
  border: 1px solid var(--scan-card-border);
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.no-results::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--text-muted), var(--border-muted), var(--text-muted));
}

.no-results h3 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.no-results h3::before {
  content: '🔍';
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results p {
  margin: 0 0 1.5rem 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.no-results a {
  color: var(--accent-primary-light);
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-hover) 100%);
  border-radius: 8px;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(13, 114, 186, 0.3);
}

.no-results a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(13, 114, 186, 0.4);
  color: var(--color-white);
}

/* File Viewer Styling */
.file-viewer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.file-viewer {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
}

.file-viewer:hover {
  box-shadow: var(--shadow-card-hover);
}

.file-header {
  padding: 2rem 2.5rem 1.5rem 2.5rem;
  border-bottom: 1px solid var(--border-primary);
  position: relative;
}

.file-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.file-header h1 {
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  letter-spacing: -0.025em;
  word-break: break-all;
}

.header-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.file-meta {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid var(--border-secondary);
  margin-top: 1rem;
  background-color: var(--file-content-overlay);
  border-radius: 6px;
  padding: 1rem 1.5rem;
}

.file-meta span {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  background-color: var(--bg-quaternary);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 1px solid var(--border-secondary);
}

.file-meta span strong {
  color: var(--accent-primary-light);
  margin-right: 0.5rem;
}

.back-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent-primary);
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link:hover {
  background-color: var(--accent-primary);
  color: var(--color-white);
  transform: translateY(-1px);
  text-decoration: none;
}

.file-content {
  overflow-y: auto;
  position: relative;
  margin-bottom: 0;
}

.file-content::-webkit-scrollbar {
  width: 12px;
}

.file-content::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

.file-content::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 6px;
  border: 2px solid var(--bg-tertiary);
}

.file-content::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

#file-content {
  background-color: var(--bg-file-content);
  color: var(--text-file-content);
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  padding: 2rem 2.5rem;
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-weight: 400;
  letter-spacing: 0.025em;
  border-radius: 0 0 12px 12px;
}

/* Scope Manager Styling */
.scope-manager {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.scope-manager h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="file"],
.form-group textarea {
  width: 100%;
  font-family: monospace;
  font-size: 0.9rem;
  padding: 0.75rem;
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  box-sizing: border-box;
  background-color: var(--bg-input);
  color: var(--text-primary);
}

.form-group select:focus,
.form-group input[type="text"]:focus,
.form-group input[type="file"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

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

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-meta);
  font-size: 0.8rem;
}

.save-scope-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  background-color: var(--accent-primary);
  color: var(--color-white);
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 1rem;
}

.save-scope-btn:hover {
  background-color: var(--accent-primary-hover);
}

.save-scope-btn:active {
  background-color: var(--accent-primary-active);
}

/* Enhanced Risk Level Styling for Security Findings */
.findings-subsection {
  margin-bottom: 2rem;
  position: relative;
}

.findings-subsection h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border-left: 6px solid;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.findings-subsection h3::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.03) 100%);
  pointer-events: none;
}

/* Enhanced Finding Groups */
.findings-groups {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.finding-group {
  border: 1px solid var(--scan-card-border);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--scan-card-bg) 0%, var(--bg-quaternary) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.finding-group:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.finding-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--scan-card-bg) 0%, var(--bg-input) 100%);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.finding-group-header::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
}

.finding-group-header:hover {
  background: linear-gradient(135deg, var(--bg-input) 0%, var(--bg-hover) 100%);
}

/* Enhanced Risk level specific dropdown headers */
.finding-group-header.risk-critical-header {
  background: linear-gradient(135deg, var(--risk-critical-bg-header) 0%, rgba(126, 31, 214, 0.08) 100%);
  border-left: 6px solid var(--risk-critical);
  box-shadow: inset 0 1px 0 rgba(126, 31, 214, 0.1);
}

.finding-group-header.risk-critical-header:hover {
  background: linear-gradient(135deg, var(--risk-critical-bg-hover) 0%, rgba(126, 31, 214, 0.12) 100%);
  border-left-color: var(--risk-critical-hover);
}

.finding-group-header.risk-high-header {
  background: linear-gradient(135deg, var(--risk-high-bg-header) 0%, rgba(220, 38, 38, 0.08) 100%);
  border-left: 6px solid var(--risk-high);
  box-shadow: inset 0 1px 0 rgba(220, 38, 38, 0.1);
}

.finding-group-header.risk-high-header:hover {
  background: linear-gradient(135deg, var(--risk-high-bg-hover) 0%, rgba(220, 38, 38, 0.12) 100%);
  border-left-color: var(--risk-high-hover);
}

.finding-group-header.risk-medium-header {
  background: linear-gradient(135deg, var(--risk-medium-bg-header) 0%, rgba(234, 88, 12, 0.08) 100%);
  border-left: 6px solid var(--risk-medium);
  box-shadow: inset 0 1px 0 rgba(234, 88, 12, 0.1);
}

.finding-group-header.risk-medium-header:hover {
  background: linear-gradient(135deg, var(--risk-medium-bg-hover) 0%, rgba(234, 88, 12, 0.12) 100%);
  border-left-color: var(--risk-medium-hover);
}

.finding-group-header.risk-low-header {
  background: linear-gradient(135deg, var(--risk-low-bg-header) 0%, rgba(202, 138, 4, 0.08) 100%);
  border-left: 6px solid var(--risk-low);
  box-shadow: inset 0 1px 0 rgba(202, 138, 4, 0.1);
}

.finding-group-header.risk-low-header:hover {
  background: linear-gradient(135deg, var(--risk-low-bg-hover) 0%, rgba(202, 138, 4, 0.12) 100%);
  border-left-color: var(--risk-low-hover);
}

/* Enhanced Risk level header text colors */
.finding-group-header.risk-critical-header .group-name,
.finding-group-header.risk-critical-header h3 {
  color: var(--risk-critical);
  font-weight: 700;
}

.finding-group-header.risk-high-header .group-name,
.finding-group-header.risk-high-header h3 {
  color: var(--risk-high);
  font-weight: 700;
}

.finding-group-header.risk-medium-header .group-name,
.finding-group-header.risk-medium-header h3 {
  color: var(--risk-medium);
  font-weight: 700;
}

.finding-group-header.risk-low-header .group-name,
.finding-group-header.risk-low-header h3 {
  color: var(--risk-low);
  font-weight: 700;
}

.group-toggle {
  font-size: 1rem;
  color: var(--accent-primary-light);
  font-weight: bold;
  width: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.finding-group-header:hover .group-toggle {
  color: var(--color-white);
  transform: scale(1.1);
}

.group-name {
  font-weight: 700;
  color: var(--text-light);
  text-transform: capitalize;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.file-count {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--text-meta);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.finding-group-content {
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--scan-card-bg) 100%);
  position: relative;
}

.finding-group-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--scan-divider), transparent);
}

.finding-group-content .file-list {
  margin: 0;
  gap: 1px;
}

.finding-group-content .file-item {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border-secondary);
  margin-bottom: 0;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--scan-card-bg) 100%);
}

.finding-group-content .file-item:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}

.finding-group-content .file-item:first-child {
  border-radius: 0;
}

/* Enhanced Critical Risk - Dark Purple (for exploitable vulnerabilities) */
.risk-critical {
  color: var(--risk-critical) !important;
  background: linear-gradient(135deg, var(--risk-critical-bg-header) 0%, rgba(126, 31, 214, 0.08) 100%) !important;
  border-left-color: var(--risk-critical) !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(126, 31, 214, 0.2);
}

.file-item.exploitable-vuln {
  border-color: var(--risk-critical);
  background: linear-gradient(135deg, var(--risk-critical-bg) 0%, rgba(126, 31, 214, 0.05) 100%);
  border-left: 6px solid var(--risk-critical);
  position: relative;
  overflow: hidden;
}

.file-item.exploitable-vuln::before {
  background: var(--risk-critical);
}

.file-item.exploitable-vuln:hover {
  background: linear-gradient(135deg, var(--risk-critical-bg-hover) 0%, rgba(126, 31, 214, 0.1) 100%);
  border-color: var(--risk-critical-hover);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(126, 31, 214, 0.3);
}

/* Enhanced High Risk - Red */
.risk-high {
  color: var(--risk-high) !important;
  background: linear-gradient(135deg, var(--risk-high-bg-header) 0%, rgba(220, 38, 38, 0.08) 100%) !important;
  border-left-color: var(--risk-high) !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.file-item.risk-high {
  border-color: var(--risk-high);
  background: linear-gradient(135deg, var(--risk-high-bg) 0%, rgba(220, 38, 38, 0.03) 100%);
  border-left: 4px solid var(--risk-high);
}

.file-item.risk-high::before {
  background: var(--risk-high);
}

.file-item.risk-high:hover {
  background: linear-gradient(135deg, var(--risk-high-bg-hover) 0%, rgba(220, 38, 38, 0.08) 100%);
  border-color: var(--risk-high-hover);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(220, 38, 38, 0.3);
}

/* Enhanced Medium Risk - Orange */
.risk-medium {
  color: var(--risk-medium) !important;
  background: linear-gradient(135deg, var(--risk-medium-bg-header) 0%, rgba(234, 88, 12, 0.08) 100%) !important;
  border-left-color: var(--risk-medium) !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.2);
}

.file-item.risk-medium {
  border-color: var(--risk-medium);
  background: linear-gradient(135deg, var(--risk-medium-bg) 0%, rgba(234, 88, 12, 0.03) 100%);
  border-left: 4px solid var(--risk-medium);
}

.file-item.risk-medium::before {
  background: var(--risk-medium);
}

.file-item.risk-medium:hover {
  background: linear-gradient(135deg, var(--risk-medium-bg-hover) 0%, rgba(234, 88, 12, 0.08) 100%);
  border-color: var(--risk-medium-hover);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(234, 88, 12, 0.3);
}

/* Enhanced Low Risk - Yellow */
.risk-low {
  color: var(--risk-low) !important;
  background: linear-gradient(135deg, var(--risk-low-bg-header) 0%, rgba(202, 138, 4, 0.08) 100%) !important;
  border-left-color: var(--risk-low) !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(202, 138, 4, 0.2);
}

.file-item.risk-low {
  border-color: var(--risk-low);
  background: linear-gradient(135deg, var(--risk-low-bg) 0%, rgba(202, 138, 4, 0.03) 100%);
  border-left: 4px solid var(--risk-low);
}

.file-item.risk-low::before {
  background: var(--risk-low);
}

.file-item.risk-low:hover {
  background: linear-gradient(135deg, var(--risk-low-bg-hover) 0%, rgba(202, 138, 4, 0.08) 100%);
  border-color: var(--risk-low-hover);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(202, 138, 4, 0.3);
}


/* Enhanced Responsive Design for Scan Results */
@media (max-width: 1200px) {
  .scans-form {
    max-width: 80%;
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .scans-form {
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
  }
  
  .scans-form h1 {
    font-size: 1.75rem;
  }
  
  .navigation-list {
    grid-template-columns: 1fr;
  }
  
  .nav-item:hover {
    transform: translateY(-2px);
  }
  
  .scan-section h2 {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
  
  .file-item {
    padding: 0.875rem 1rem;
  }
  
  .file-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .file-size {
    align-self: flex-end;
  }
  
  .breadcrumb {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }
  
  .finding-group-header {
    padding: 0.875rem 1rem;
    flex-wrap: wrap;
  }
  
  .file-count {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .scans-form {
    margin: 0.5rem;
    padding: 1rem;
  }
  
  .scans-form h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .scan-section {
    margin-bottom: 2rem;
  }
  
  .nav-link::before {
    display: none;
  }
  
  .finding-group-header {
    gap: 0.5rem;
  }
  
  .group-name {
    font-size: 0.9rem;
  }
}

/* Loading Animation for Dynamic Content */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(13, 114, 186, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(13, 114, 186, 0.6);
  }
}

.scans-form {
  animation: fadeInScale 0.6s ease-out;
}

.nav-item,
.file-item,
.finding-group {
  animation: slideInUp 0.4s ease-out;
  animation-fill-mode: both;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }

.file-item:nth-child(odd) { animation-delay: 0.05s; }
.file-item:nth-child(even) { animation-delay: 0.1s; }

/* Focus states for accessibility */
.nav-link:focus,
.file-link:focus,
.finding-group-header:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nav-item,
  .file-item,
  .finding-group {
    border-width: 2px;
  }
  
  .nav-item:hover,
  .file-item:hover {
    border-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .nav-item,
  .file-item,
  .finding-group,
  .scans-form {
    animation: none;
  }
  
  .nav-item:hover,
  .file-item:hover {
    transform: none;
  }
  
  * {
    transition-duration: 0.01ms !important;
  }
}

/* Risk Level Section Styles */
.risk-level-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 24px 0;
  padding: 16px;
  background-color: var(--bg-tertiary);
  border-radius: 8px;
  border-left: 4px solid var(--border-primary);
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.risk-badge.risk-critical {
  background-color: var(--risk-critical-bg);
  color: var(--risk-critical);
  border-color: var(--risk-critical);
}

.risk-badge.risk-critical.exploitable {
  background-color: var(--risk-critical);
  color: white;
  border-color: var(--risk-critical);
  animation: pulseExploitable 2s ease-in-out infinite;
}

.risk-badge.risk-high {
  background-color: var(--risk-high-bg);
  color: var(--risk-high);
  border-color: var(--risk-high);
}

.risk-badge.risk-medium {
  background-color: var(--risk-medium-bg);
  color: var(--risk-medium);
  border-color: var(--risk-medium);
}

.risk-badge.risk-low {
  background-color: var(--risk-low-bg);
  color: var(--risk-low);
  border-color: var(--risk-low);
}

.risk-badge.risk-info {
  background-color: rgba(13, 114, 186, 0.1);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.risk-icon {
  font-size: 16px;
  display: inline-block;
}

.risk-text {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
}

.scan-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background-color: var(--bg-quaternary);
  color: var(--text-secondary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: 1px solid var(--border-secondary);
}

.scan-type-text {
  color: var(--text-light);
}

/* Exploitable vulnerability pulse animation */
@keyframes pulseExploitable {
  0% {
    box-shadow: 0 0 0 0 rgba(126, 31, 214, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(126, 31, 214, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(126, 31, 214, 0);
  }
}

/* Responsive design for risk level section */
@media (max-width: 768px) {
  .risk-level-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .risk-badge {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .scan-type-badge {
    font-size: 11px;
    padding: 4px 8px;
  }
}