/* 
  AWS VAPT Security Dashboard Design System
  Theme: Neon Cyber Security (Dark Mode + Glassmorphism)
*/

:root {
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: 'Plus Jakarta Sans', sans-serif;
  
  /* Color Palette - Default Dark Mode */
  --bg-main: #060913;
  --bg-surface: #0c1122;
  --bg-card-glass: rgba(15, 23, 42, 0.55);
  --border-glass: rgba(255, 255, 255, 0.06);
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.15);
  --primary-hover: #4f46e5;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  
  /* Severity Badges */
  --critical: #ef4444;
  --critical-bg: rgba(239, 68, 68, 0.12);
  --critical-border: rgba(239, 68, 68, 0.3);
  
  --high: #f97316;
  --high-bg: rgba(249, 115, 22, 0.12);
  --high-border: rgba(249, 115, 22, 0.3);
  
  --medium: #eab308;
  --medium-bg: rgba(234, 179, 8, 0.12);
  --medium-border: rgba(234, 179, 8, 0.3);
  
  --low: #0ea5e9;
  --low-bg: rgba(14, 165, 233, 0.12);
  --low-border: rgba(14, 165, 233, 0.3);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  
  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.1);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

/* Light Mode Overrides */
body.light-theme {
  --bg-main: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.75);
  --border-glass: rgba(15, 23, 42, 0.08);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dark: #64748b;
  
  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
}

/* Global Reset & Base Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glowing Ambient Background Circles */
.glow-accent-1 {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
}

.glow-accent-2 {
  position: absolute;
  bottom: 10%;
  right: 10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
}

body.light-theme .glow-accent-1 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, rgba(0,0,0,0) 70%);
}
body.light-theme .glow-accent-2 {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.04) 0%, rgba(0,0,0,0) 70%);
}

/* Main Layout Wrapper */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Glassmorphism Card Style Utility */
.glass {
  background: var(--bg-card-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
body.light-theme .glass:hover {
  border-color: rgba(15, 23, 42, 0.15);
}

/* App Header Section */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
body.light-theme .app-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.shield-logo {
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  color: white;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.logo-area h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.light-theme .logo-area h1 {
  background: linear-gradient(to right, #0f172a, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.scan-status-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  min-width: 220px;
}
body.light-theme .scan-status-info {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.05);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}

.status-dot.green { color: var(--success); background-color: var(--success); }
.status-dot.orange { color: var(--high); background-color: var(--high); }
.status-dot.red { color: var(--critical); background-color: var(--critical); }

/* Theme Toggle Button styling */
.btn-theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
}
.btn-theme-toggle:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
}
body.light-theme .btn-theme-toggle {
  border-color: rgba(15, 23, 42, 0.1);
}
body.light-theme .btn-theme-toggle:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.2);
}

.theme-icon-sun {
  display: none;
}
body.light-theme .theme-icon-sun {
  display: block;
}
body.light-theme .theme-icon-moon {
  display: none;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.btn-primary:active {
  transform: translateY(1px);
}

.icon-spin {
  transition: transform 0.8s ease;
}

.spinning {
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Demo Warning Banner */
.demo-warning-banner {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(249, 115, 22, 0.06) 100%);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-top: 8px;
  transition: all 0.3s ease;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #fbbf24;
}
body.light-theme .banner-content {
  color: #b45309;
}

.banner-content svg {
  flex-shrink: 0;
}

.banner-content a {
  color: white;
  text-decoration: underline;
  font-weight: 600;
}
body.light-theme .banner-content a {
  color: #0f172a;
}

.hidden {
  display: none !important;
}

/* Navigation Tabs Menu */
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 2px;
}
body.light-theme .nav-tabs {
  border-bottom-color: rgba(15, 23, 42, 0.05);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}
body.light-theme .tab-btn:hover {
  background: rgba(15, 23, 42, 0.03);
}

.tab-btn.active {
  color: white;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
}
body.light-theme .tab-btn.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.12);
}

/* Tab Views management */
.tab-view {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tab 1: Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Score Card radial */
.score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 310px;
}

.score-card h3 {
  align-self: flex-start;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.score-ring-container {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.score-svg {
  transform: rotate(-90deg);
}

.score-bg-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 12px;
}
body.light-theme .score-bg-circle {
  stroke: rgba(0, 0, 0, 0.03);
}

.score-progress-circle {
  fill: none;
  stroke: var(--primary);
  stroke-width: 12px;
  stroke-linecap: round;
  stroke-dasharray: 502.4;
  stroke-dashoffset: 502.4;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.2, 0.8, 0.2, 1), stroke 0.8s ease;
}

.score-text-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-value {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1px;
}

.score-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: -4px;
}

.card-desc {
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
}

/* Metrics summary */
.metrics-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.metric-item {
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease;
}
body.light-theme .metric-item {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.04);
}

.metric-item:hover {
  transform: scale(1.02);
}

.metric-val {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.metric-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.critical-accent { border-left: 3px solid var(--critical); }
.critical-accent .metric-val { color: var(--critical); }

.high-accent { border-left: 3px solid var(--high); }
.high-accent .metric-val { color: var(--high); }

.medium-accent { border-left: 3px solid var(--medium); }
.medium-accent .metric-val { color: var(--medium); }

.low-accent { border-left: 3px solid var(--low); }
.low-accent .metric-val { color: var(--low); }

.last-scan-status {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 16px;
}
body.light-theme .last-scan-status {
  border-top-color: rgba(15, 23, 42, 0.05);
}

/* Alert Summary Card */
.alert-summary-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.alert-status-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary);
}
body.light-theme .status-icon-box {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.05);
}

.status-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.status-item p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Table Card Details */
.table-card {
  padding: 0;
  overflow: hidden;
}

.card-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
body.light-theme .card-header {
  border-bottom-color: rgba(15, 23, 42, 0.05);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-text:hover {
  color: var(--primary-hover);
}

.table-wrapper {
  overflow-x: auto;
}

.findings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.findings-table th, 
.findings-table td {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
body.light-theme .findings-table th,
body.light-theme .findings-table td {
  border-bottom-color: rgba(15, 23, 42, 0.04);
}

.findings-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.01);
}
body.light-theme .findings-table th {
  background: rgba(15, 23, 42, 0.01);
}

.findings-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.01);
}
body.light-theme .findings-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.01);
}

.table-empty {
  text-align: center;
  color: var(--text-dark);
  padding: 40px !important;
}

/* Severity Badges styling */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.badge.critical {
  background-color: var(--critical-bg);
  color: var(--critical);
  border-color: var(--critical-border);
}

.badge.high {
  background-color: var(--high-bg);
  color: var(--high);
  border-color: var(--high-border);
}

.badge.medium {
  background-color: var(--medium-bg);
  color: var(--medium);
  border-color: var(--medium-border);
}

.badge.low {
  background-color: var(--low-bg);
  color: var(--low);
  border-color: var(--low-border);
}

.badge.success {
  background-color: var(--success-bg);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Compliance Mappings tags styling */
.badge-compliance {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.badge-compliance.iso {
  background: rgba(168, 85, 247, 0.08);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}
body.light-theme .badge-compliance.iso {
  color: #7e22ce;
  background: rgba(168, 85, 247, 0.06);
}

.badge-compliance.soc2 {
  background: rgba(14, 165, 233, 0.08);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.2);
}
body.light-theme .badge-compliance.soc2 {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.06);
}

/* Tab 2: VAPT Findings Page */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
body.light-theme .section-header {
  border-bottom-color: rgba(15, 23, 42, 0.05);
}

.section-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.action-bar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.select-filter {
  min-width: 160px;
  max-width: 100%;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 16px;
}
body.light-theme .export-actions {
  border-left-color: rgba(15, 23, 42, 0.1);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.3);
}
body.light-theme .btn-secondary {
  border-color: rgba(15, 23, 42, 0.15);
}
body.light-theme .btn-secondary:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.3);
}

.btn-secondary.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Findings List / Collapsibles */
.findings-list-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finding-card {
  padding: 0;
  overflow: hidden;
}

.finding-summary-row {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.finding-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.finding-title-block h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.finding-resource {
  font-size: 12px;
  font-family: monospace;
  color: var(--text-muted);
}

.compliance-mapping-line {
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

.chevron-icon {
  color: var(--text-dark);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.finding-card.expanded .chevron-icon {
  transform: rotate(180deg);
}

/* Collapsible Content */
.finding-details-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0, 0, 0, 0.15);
  border-top: 0 solid rgba(255, 255, 255, 0.03);
}
body.light-theme .finding-details-panel {
  background: rgba(15, 23, 42, 0.02);
  border-top-color: rgba(15, 23, 42, 0.04);
}

.finding-card.expanded .finding-details-panel {
  max-height: 1000px;
  border-top-width: 1px;
}

.panel-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.desc-section h5, 
.remediation-section h5 {
  font-size: 12px;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.desc-section p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.remediation-box {
  background: rgba(99, 102, 241, 0.03);
  border: 1px dashed rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-main);
}
body.light-theme .remediation-box {
  background: rgba(99, 102, 241, 0.02);
  border-color: rgba(99, 102, 241, 0.15);
}

/* Tab 3: Running Services Monitor */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-status-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.service-icon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ec2-color { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.s3-color { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.rds-color { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.iam-color { background: rgba(236, 72, 153, 0.1); color: #ec4899; }

.status-indicator-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-indicator-badge.ok {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}
.status-indicator-badge.warning {
  background: rgba(249, 115, 22, 0.1);
  color: var(--high);
}
.status-indicator-badge.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--critical);
}

.service-status-card h3 {
  font-size: 18px;
  font-weight: 700;
}

.service-stats {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stat-number {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.service-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 14px;
}
body.light-theme .service-desc {
  border-top-color: rgba(15, 23, 42, 0.05);
}

/* Tab 4: Settings Config Panel */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
}

.settings-form-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-form-card h3 {
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}
body.light-theme .settings-form-card h3 {
  border-bottom-color: rgba(15, 23, 42, 0.05);
}

.form-help {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.form-group-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

/* Input Fields styling */
.form-control {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
  min-width: 0;
}
body.light-theme .form-control {
  background: rgba(15, 23, 42, 0.01);
  border-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
  background: rgba(255, 255, 255, 0.04);
}
body.light-theme .form-control:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

select.form-control {
  width: 100%;

  appearance: none;
  -webkit-appearance: none;

  cursor: pointer;

  padding: 10px 42px 10px 14px;

  background-color: var(--bg-surface);
  color: var(--text-main);

  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);

  outline: none;

  background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");

  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;

  transition:
    background-color .25s ease,
    border-color .25s ease,
    color .25s ease;

  color-scheme: dark;
}

/* Focus */
select.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}

/* Dropdown menu */
select.form-control option {
  background-color: #0f172a;
  color: #f8fafc;
}

/* Hover */
select.form-control:hover {
  border-color: rgba(255,255,255,.18);
}

/* LIGHT THEME */

body.light-theme select.form-control {
  background-color: #ffffff;
  color: #0f172a;

  border-color: rgba(15,23,42,.10);

  color-scheme: light;
}

body.light-theme select.form-control:hover {
  border-color: rgba(15,23,42,.20);
}

body.light-theme select.form-control option {
  background: #ffffff;
  color: #0f172a;
}

/* Firefox */
select.form-control:-moz-focusring {
  color: transparent;
  text-shadow: 0 0 0 var(--text-main);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.form-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.btn-submit {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-submit:hover {
  background: var(--primary-hover);
}

/* Toast Notification Alert */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.light-theme .toast {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15);
}

@keyframes slideIn {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast.error {
  border-left: 4px solid var(--critical);
}

.toast.success {
  border-left: 4px solid var(--success);
}

@media (max-width: 900px) {
  .app-header,
  .section-header,
  .card-header,
  .action-bar-right {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .header-actions,
  .nav-tabs,
  .filters,
  .export-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .tab-btn {
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-start;
  }

  .scan-status-info {
    min-width: 100%;
  }
}

@media (max-width: 640px) {
  .form-group-row {
    grid-template-columns: 1fr;
  }

  .select-filter {
    min-width: 100%;
    width: 100%;
  }

  .export-actions {
    border-left: none;
    padding-left: 0;
  }

  .form-actions-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
}

/* 
  ==================================================
  PRINT DIRECTIVE FOR PDF EXPORTS
  ==================================================
*/
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12px !important;
  }

  .glow-accent-1, 
  .glow-accent-2,
  .app-header, 
  .nav-tabs, 
  #demo-banner,
  .action-bar-right,
  .settings-layout,
  #toast {
    display: none !important;
  }

  .app-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tab-view {
    display: none !important;
  }

  #tab-findings {
    display: block !important;
    animation: none !important;
  }

  .section-header {
    border-bottom: 2px solid #000000 !important;
    margin-bottom: 30px !important;
    padding-bottom: 10px !important;
  }

  .section-header h2 {
    color: #000000 !important;
    font-size: 24px !important;
  }

  .section-subtitle {
    color: #333333 !important;
  }

  .finding-card {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    page-break-inside: avoid;
    margin-bottom: 20px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
  }

  .finding-summary-row {
    padding: 12px 16px !important;
    border-bottom: 1px solid #eeeeee !important;
    background: #f8f8f8 !important;
  }

  .chevron-icon {
    display: none !important;
  }

  .finding-details-panel {
    max-height: none !important;
    display: block !important;
    background: #ffffff !important;
    border-top: 1px solid #eeeeee !important;
  }

  .panel-content {
    padding: 16px !important;
    gap: 12px !important;
  }

  .desc-section h5, 
  .remediation-section h5 {
    color: #111111 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  .desc-section p {
    color: #333333 !important;
    font-size: 12px !important;
  }

  .remediation-box {
    background: #fafafa !important;
    border: 1px solid #dddddd !important;
    color: #222222 !important;
    padding: 12px !important;
    font-size: 12px !important;
  }

  .badge {
    border: 1px solid #000000 !important;
    background: transparent !important;
    color: #000000 !important;
    padding: 2px 6px !important;
  }

  .badge-compliance {
    border: 1px solid #888888 !important;
    background: transparent !important;
    color: #333333 !important;
  }
}
