:root {
  /* Base Colors - Dark theme with depth */
  --bg: #0a0c10;
  --bg2: #0f1117;
  --bg3: #181c24;
  --bg4: #1f2532;
  --border: #2a3142;
  --border-light: #354052;
  --text: #f0f3f8;
  --text-secondary: #a0aec0;
  --muted: #6b7a8f;
  
  /* Accent Color System */
  --accent-primary: #6366f1;
  --accent-primary-dark: #4f46e5;
  --accent-primary-light: #818cf8;
  --accent-primary-glow: rgba(99, 102, 241, 0.4);
  
  --accent-success: #10b981;
  --accent-success-dark: #059669;
  --accent-success-glow: rgba(16, 185, 129, 0.4);
  
  --accent-warning: #f59e0b;
  --accent-warning-dark: #d97706;
  --accent-warning-glow: rgba(245, 158, 11, 0.4);
  
  --accent-danger: #ef4444;
  --accent-danger-dark: #dc2626;
  --accent-danger-glow: rgba(239, 68, 68, 0.4);
  
  --accent-info: #3b82f6;
  --accent-info-dark: #2563eb;
  
  /* Status Colors */
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.1);
  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.1);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.1);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.1);
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  
  /* Shadows & Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px var(--accent-primary-glow);
  --shadow-glow-success: 0 0 20px var(--accent-success-glow);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  background-image: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ── Navigation ───────────────────────────────────────────── */
nav {
  background: rgba(15, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-primary-light) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-light) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.logo-icon svg {
  width: 18px;
  height: 18px;
  fill: white;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

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

nav a::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

nav a:hover::after {
  transform: scaleX(1);
}

.nav-right {
  margin-left: auto;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  animation: pulse 2s infinite;
}

.status-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 0 var(--accent-success-glow);
  animation: pulse-green 2s infinite;
}

.status-dot.err {
  background: var(--red);
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 var(--accent-success-glow); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 16px;
}

.nav-stat {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.nav-stat-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.nav-stat-lbl {
  font-weight: 400;
  color: var(--muted);
}

.nav-stat-sep {
  color: var(--border);
  font-size: 14px;
}

/* ── Hero Section with Gradient ───────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 4rem 2rem 3rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.05) 0%,
    rgba(139, 92, 246, 0.03) 50%,
    transparent 100%);
  border-radius: var(--radius-xl);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
  filter: blur(60px);
  opacity: 0.3;
  pointer-events: none;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-primary-light) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.sample-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.sample-link:hover {
  color: var(--accent-primary-light);
  text-decoration: underline;
}

/* ── Form Section ───────────────────────────────────────────── */
.scan-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
}

.tab {
  padding: 12px 24px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
  position: relative;
}

.tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tab:hover:not(.active) {
  color: var(--text);
  border-bottom-color: var(--border-light);
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.input-group {
  display: flex;
  flex: 1;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast);
}

.input-group:focus-within {
  box-shadow: var(--shadow-glow);
}

.input-host {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  color: var(--text);
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-host:focus {
  border-color: var(--accent-primary);
}

.input-host::placeholder {
  color: var(--muted);
}

.input-port {
  width: 80px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  color: var(--text);
  padding: 12px 10px;
  font-size: 14px;
  outline: none;
  text-align: center;
  transition: border-color var(--transition-fast);
}

.input-port:focus {
  border-color: var(--accent-primary);
}

.audit-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.audit-select:hover {
  background: var(--bg4);
  border-color: var(--accent-primary);
}

.btn {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  height: 46px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  background: linear-gradient(135deg, var(--accent-primary-light) 0%, var(--accent-primary) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

.form-hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

/* ── Scanning Card with Glow Effect ───────────────────────────────────────────── */
.scanning-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
  display: none;
}

.scan-card {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99, 102, 241, 0.1);
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99, 102, 241, 0.1); }
  50% { box-shadow: var(--shadow-lg), 0 0 20px var(--accent-primary-glow), 0 0 0 1px var(--accent-primary); }
}

.scan-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.scan-card:hover::before {
  opacity: 1;
}

.scan-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.scan-sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 1.5rem;
}

/* Animated Shimmer Progress Bar */
.prog-bar {
  height: 6px;
  background: var(--bg4);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1.25rem;
  position: relative;
}

.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, 
    var(--accent-primary) 0%,
    var(--accent-primary-light) 50%,
    var(--accent-primary) 100%);
  width: 0%;
  transition: width 0.35s ease;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.prog-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.scan-log {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.log-info { color: var(--text-secondary); }
.log-fail { color: var(--red); }
.log-warn { color: var(--yellow); }
.log-ok { color: var(--green); }

/* ── Results Section ───────────────────────────────────────────── */
.results-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: none;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.r-host h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.r-host .meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.score-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: var(--bg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast);
}

.score-ring:hover {
  transform: scale(1.05);
}

.score-ring .num {
  font-size: 26px;
  line-height: 1;
}

.score-ring .denom {
  font-size: 11px;
  color: var(--muted);
}

.score-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.ga { border-color: var(--green); color: var(--green); box-shadow: var(--shadow-glow-success); }
.gb { border-color: #7ee787; color: #7ee787; }
.gc { border-color: var(--yellow); color: var(--yellow); box-shadow: var(--shadow-glow-warning); }
.gd { border-color: #f0883e; color: #f0883e; }
.gf { border-color: var(--red); color: var(--red); box-shadow: var(--shadow-glow-danger); }

.counts {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  background: var(--bg2);
}

.count-item {
  flex: 1;
  text-align: center;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.count-item:last-child {
  border-right: none;
}

.count-item:hover {
  background: var(--bg3);
}

.count-num {
  font-size: 28px;
  font-weight: 700;
}

.count-lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ── CVE Box ───────────────────────────────────────────── */
.cve-box {
  background: var(--red-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.cve-box h4 {
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cve-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
  font-size: 13px;
}

.cve-row:last-child {
  border-bottom: none;
}

.cve-id {
  font-family: var(--font-mono);
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  min-width: 140px;
}

.cve-desc {
  color: var(--text-secondary);
}

.cve-cvss {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #f0883e;
  font-weight: 600;
}

/* ── Sections with Card Depth ───────────────────────────────────────────── */
.rsec {
  margin-bottom: 1.5rem;
}

.sec-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg4) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.sec-hdr:hover {
  background: var(--bg4);
  border-color: var(--accent-primary);
}

.stag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.t-kex { background: var(--blue-bg); color: var(--blue); }
.t-key { background: var(--green-bg); color: var(--green); }
.t-enc { background: var(--yellow-bg); color: var(--yellow); }
.t-mac { background: #2a1f2e; color: #c9a0dc; }
.t-gen { background: var(--bg3); color: var(--muted); border: 1px solid var(--border); }

.chev {
  margin-left: auto;
  transition: transform var(--transition-fast);
}

.chev.open {
  transform: rotate(180deg);
}

.algo-tbl {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg2);
}

.algo-tbl tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.algo-tbl tr:last-child {
  border-bottom: none;
}

.algo-tbl tr:hover {
  background: var(--bg3);
}

.algo-tbl td {
  padding: 10px 14px;
  vertical-align: top;
}

.algo-tbl .c-stat {
  width: 70px;
}

.algo-tbl .c-name {
  color: var(--text);
  word-break: break-all;
  font-weight: 500;
}

.algo-tbl .c-notes {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-sans);
}

.algo-tbl tr.fail { background: rgba(239, 68, 68, 0.05); }
.algo-tbl tr.warn { background: rgba(245, 158, 11, 0.05); }
.algo-tbl tr.info { background: rgba(16, 185, 129, 0.05); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.b-fail { background: var(--red-bg); color: var(--red); }
.b-warn { background: var(--yellow-bg); color: var(--yellow); }
.b-info { background: var(--green-bg); color: var(--green); }

.note-ln {
  display: flex;
  gap: 8px;
  margin-top: 3px;
}

.note-ln:first-child {
  margin-top: 0;
}

.np {
  font-size: 11px;
  font-weight: 700;
}

.np.fail { color: var(--red); }
.np.warn { color: var(--yellow); }
.np.info { color: var(--green); }

/* ── Recommendations ───────────────────────────────────────────── */
.recs {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 1.75rem;
  box-shadow: var(--shadow-md);
}

.recs h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.recs p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 1.25rem;
}

.rec-ln {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 4px;
}

.rec-ln .add { color: var(--green); font-weight: 600; }
.rec-ln .rm { color: var(--red); font-weight: 600; }

.rec-section {
  margin-bottom: 1.25rem;
}

.rec-key {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

/* ── Error Box ───────────────────────────────────────────── */
.err-box {
  background: var(--red-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: var(--red);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* ── Install Hint ───────────────────────────────────────────── */
.install-hint {
  background: var(--green-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
}

.install-hint code {
  font-family: var(--font-mono);
  color: var(--green);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ── Info Cards ───────────────────────────────────────────── */
.info-sec {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.info-card {
  flex: 1;
  min-width: 240px;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.info-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 1rem;
}

.info-card ul {
  list-style: none;
}

.info-card li {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.info-card li:last-child {
  border-bottom: none;
}

.info-card a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.info-card a:hover {
  color: var(--accent-primary-light);
  text-decoration: underline;
}

.info-card code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  background: var(--green-bg);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ── Client Panel ───────────────────────────────────────────── */
.client-card {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.client-card p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 1.25rem;
}

.cmd-row {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
}

.copy-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--accent-primary);
  background: var(--bg4);
}

.timer-bar {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 1.25rem;
  display: none;
}

.timer-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
  width: 0%;
  transition: width 45s linear;
}

/* ── Footer ───────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 12px;
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

footer a:hover {
  color: var(--accent-primary-light);
  text-decoration: underline;
}

/* ── Hardening Guides ───────────────────────────────────────────── */
.guides-section {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}

.guides-inner {
  max-width: 960px;
  margin: 0 auto;
}

.guides-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-primary-light) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.guides-sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 1.75rem;
}

.guides-sub code {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 12px;
}

.guides-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.gtab {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.gtab:hover {
  color: var(--text);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.gtab.active {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.guides-body {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.gpanel {
  padding: 1.75rem;
}

.gpanel.hidden {
  display: none;
}

.gpanel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gpanel-hint {
  font-size: 12px;
  color: var(--muted);
}

.gpanel-hint code {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 11px;
}

.gpanel-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 1.5rem;
}

@media (max-width: 760px) {
  .gpanel-cols {
    grid-template-columns: 1fr;
  }
}

.gcol-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.galgo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.galgo-list li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  transition: all var(--transition-fast);
}

.galgo-list li:hover {
  border-color: var(--accent-primary);
  transform: translateX(4px);
}

.hg-pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.7;
  margin: 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ── Responsive Design ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 28px;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .input-host,
  .input-port,
  .audit-select {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border) !important;
  }
  
  .input-port {
    border-top: none !important;
  }
  
  .audit-select {
    border-top: none !important;
  }
  
  .btn {
    width: 100%;
  }
  
  .counts {
    flex-wrap: wrap;
  }
  
  .result-header {
    flex-direction: column;
  }
  
  nav {
    padding: 0 1rem;
  }
  
  .nav-right {
    gap: 1rem;
  }
  
  .nav-stats {
    display: none;
  }
}

/* ── Custom Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ── Loading Animation ───────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ── Focus Styles ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* ── Additional Polish & Micro-interactions ───────────────────────────────────────────── */

/* Tooltip styles */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--bg4);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
  z-index: 1000;
  font-family: var(--font-sans);
  box-shadow: var(--shadow-md);
}

[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-12px);
}

/* Badge variants */
.badge-success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Status indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.status-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.success::before {
  background: var(--green);
  box-shadow: 0 0 8px var(--accent-success-glow);
  animation: pulse-green 2s infinite;
}

.status-indicator.warning::before {
  background: var(--yellow);
  box-shadow: 0 0 8px var(--accent-warning-glow);
}

.status-indicator.error::before {
  background: var(--red);
  box-shadow: 0 0 8px var(--accent-danger-glow);
}

.status-indicator.info::before {
  background: var(--blue);
}

/* Progress steps */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step.active:not(:last-child)::after,
.step.completed:not(:last-child)::after {
  background: linear-gradient(90deg, var(--accent-primary), var(--border));
}

.step.completed:not(:last-child)::after {
  background: var(--accent-primary);
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  position: relative;
  z-index: 1;
  background: var(--bg2);
  transition: all var(--transition-fast);
}

.step.active .step-number {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.step.completed .step-number {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.step-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}

.step.active .step-label {
  color: var(--accent-primary);
}

.step.completed .step-label {
  color: var(--green);
}

/* Expand/Collapse animations */
.rsec {
  overflow: hidden;
  transition: all var(--transition-normal);
}

.sec-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
}

.sec-content.open {
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 280px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease-out;
  backdrop-filter: blur(8px);
}

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

.toast.success {
  border-left: 3px solid var(--green);
  background: linear-gradient(135deg, var(--bg3), var(--green-bg));
}

.toast.error {
  border-left: 3px solid var(--red);
  background: linear-gradient(135deg, var(--bg3), var(--red-bg));
}

.toast.warning {
  border-left: 3px solid var(--yellow);
  background: linear-gradient(135deg, var(--bg3), var(--yellow-bg));
}

.toast.info {
  border-left: 3px solid var(--blue);
  background: linear-gradient(135deg, var(--bg3), var(--blue-bg));
}

.toast-icon {
  font-size: 18px;
}

.toast-message {
  flex: 1;
  font-size: 13px;
  color: var(--text);
}

.toast-close {
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--text);
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  cursor: pointer;
  color: var(--muted);
  font-size: 20px;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Dropdown menus */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: 100;
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  padding: 8px 16px;
  color: var(--text);
  text-decoration: none;
  display: block;
  font-size: 13px;
  transition: background var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--bg4);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg4);
  transition: var(--transition-fast);
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--muted);
  transition: var(--transition-fast);
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--accent-primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
  background-color: white;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg3) 25%,
    var(--bg4) 50%,
    var(--bg3) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-text {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 20px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Print styles */
#print-meta { display: none; }

@media print {
  @page {
    size: A4;
    margin: 18mm 14mm 22mm;
  }

  /* Watermark */
  body::after {
    content: 'sshaudit.online';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    font-size: 72px;
    font-weight: 900;
    color: rgba(0,0,0,0.045);
    white-space: nowrap;
    pointer-events: none;
    z-index: 9999;
    letter-spacing: 4px;
  }

  /* Hide everything except results */
  nav, .hero, .scan-wrap, .scanning-wrap,
  .guides-section, footer, .info-sec,
  .btn-print, #print-btn { display: none !important; }

  body {
    background: #fff !important;
    color: #111 !important;
    font-size: 11px !important;
    line-height: 1.5;
  }

  .results-wrap {
    display: block !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* Print header */
  #print-meta { display: block !important; }

  .print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #6366f1;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }

  .print-logo {
    font-size: 18px;
    font-weight: 800;
    color: #6366f1;
    letter-spacing: -0.5px;
  }

  .print-info {
    text-align: right;
    font-size: 11px;
    color: #444;
    line-height: 1.7;
  }

  /* Result header card */
  .result-header {
    display: flex !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 12px;
  }

  .r-host h2 { color: #111 !important; font-size: 16px !important; }
  .r-host .meta { color: #555 !important; }

  .score-wrap { display: flex !important; }
  .score-ring { background: #fff !important; box-shadow: none !important; }
  .ga { border-color: #10b981 !important; color: #10b981 !important; }
  .gb { border-color: #7ee787 !important; color: #7ee787 !important; }
  .gc { border-color: #d97706 !important; color: #d97706 !important; }
  .gd { border-color: #f0883e !important; color: #f0883e !important; }
  .gf { border-color: #ef4444 !important; color: #ef4444 !important; }
  .score-ring .denom { color: #666 !important; }
  .score-label { color: #444 !important; }

  /* Counts bar */
  .counts {
    display: flex !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 12px;
  }
  .count-item { border-right-color: #ddd !important; }
  .count-item:hover { background: transparent !important; }
  .count-num { font-size: 20px !important; }
  .count-lbl { color: #666 !important; }

  /* Sections — show headers, fix overflow clipping */
  .rsec {
    overflow: visible !important;
    break-inside: avoid;
    margin-bottom: 14px;
  }

  .sec-hdr {
    display: flex !important;
    background: #f5f7fa !important;
    border: 1px solid #ddd !important;
    border-bottom: none !important;
    color: #111 !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    break-after: avoid;
    box-shadow: none !important;
  }

  .chev { display: none !important; }

  .stag {
    border: 1px solid #ccc !important;
    font-size: 10px !important;
  }
  .t-kex { background: #e8f0fe !important; color: #2563eb !important; }
  .t-key { background: #d1fae5 !important; color: #059669 !important; }
  .t-enc { background: #fef3c7 !important; color: #d97706 !important; }
  .t-mac { background: #f3e8ff !important; color: #7c3aed !important; }
  .t-gen { background: #f5f5f5 !important; color: #555 !important; }

  /* Algo tables — force proper 3-column table layout, no responsive stacking */
  .algo-tbl,
  .algo-tbl tbody,
  .algo-tbl tr,
  .algo-tbl td {
    display: revert !important;
  }

  .algo-tbl {
    width: 100% !important;
    table-layout: fixed !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-top: none !important;
    border-radius: 0 !important;
    font-size: 10px !important;
    box-shadow: none !important;
  }

  .algo-tbl colgroup { display: none !important; }

  .algo-tbl td {
    padding: 5px 8px !important;
    vertical-align: top !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }

  .algo-tbl td::before { display: none !important; }

  .algo-tbl .c-stat  { width: 52px !important; }
  .algo-tbl .c-name  { width: 38% !important; color: #111 !important; font-weight: 600 !important; word-break: break-word !important; }
  .algo-tbl .c-notes { color: #444 !important; font-size: 9.5px !important; }

  .algo-tbl tr { border-bottom: 1px solid #eee !important; }
  .algo-tbl tr:last-child { border-bottom: none !important; }
  .algo-tbl tr:hover { background: transparent !important; }
  .algo-tbl tr.fail { background: #fff5f5 !important; }
  .algo-tbl tr.warn { background: #fffbeb !important; }
  .algo-tbl tr.info { background: #f0fdf4 !important; }

  .badge { border: 1px solid #ccc !important; }
  .b-fail { background: #fee2e2 !important; color: #dc2626 !important; }
  .b-warn { background: #fef3c7 !important; color: #d97706 !important; }
  .b-info { background: #d1fae5 !important; color: #059669 !important; }

  .np.fail { color: #dc2626 !important; }
  .np.warn { color: #d97706 !important; }
  .np.info { color: #059669 !important; }

  /* CVE box */
  .cve-box {
    background: #fff5f5 !important;
    border: 1px solid #fca5a5 !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 12px;
  }
  .cve-box h4 { color: #dc2626 !important; }
  .cve-id { color: #dc2626 !important; }
  .cve-desc { color: #444 !important; }
  .cve-cvss { color: #ea580c !important; }
  .cve-row { border-bottom-color: #fecaca !important; }

  /* Recommendations */
  .recs {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-top: 12px;
  }
  .recs h3 { color: #111 !important; }
  .recs p { color: #555 !important; }
  .rec-key { color: #666 !important; }
  .rec-ln .add { color: #059669 !important; }
  .rec-ln .rm  { color: #dc2626 !important; }
}

/* ── Feedback Modal ───────────────────────────────────────────── */
.fb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.fb-overlay.fb-open { display: flex; }

.fb-modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  margin: 1rem;
  box-shadow: var(--shadow-xl);
  animation: fadeInUp .2s ease-out;
}

.fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
}

.fb-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color var(--transition-fast);
}
.fb-close:hover { color: var(--text); }

.fb-body { padding: 1.25rem 1.4rem; }

.fb-field { margin-bottom: 1rem; }
.fb-field label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.fb-counter { font-weight: 400; color: var(--muted); }

.fb-field select,
.fb-field textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast);
  resize: vertical;
}
.fb-field select:focus,
.fb-field textarea:focus { border-color: var(--accent-primary); }
.fb-field textarea { min-height: 110px; }

.fb-error {
  font-size: 12px;
  color: var(--red);
  min-height: 16px;
  margin-top: -4px;
}

.fb-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
}

.fb-btn-cancel {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.fb-btn-cancel:hover { color: var(--text); border-color: var(--muted); }

.fb-btn-submit {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
  border: none;
  color: #fff;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.fb-btn-submit:hover { opacity: .9; transform: translateY(-1px); }
.fb-btn-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.fb-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, var(--accent-success), var(--accent-success-dark));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 300;
  white-space: nowrap;
  pointer-events: none;
}
.fb-toast.fb-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media print { .fb-overlay { display: none !important; } }

/* ── High contrast mode support ───────────────────────────────────────────── */
@media (prefers-contrast: high) {
  :root {
    --bg: #000000;
    --bg2: #0a0a0a;
    --bg3: #111111;
    --border: #ffffff;
    --text: #ffffff;
    --muted: #cccccc;
  }
  
  .btn,
  .gtab.active {
    background: var(--accent-primary);
    color: black;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark mode enhancements (already dark, but adding subtle variations) */
@media (prefers-color-scheme: dark) {
  :root {
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  }
}

/* Focus visible improvements */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Selection color */
::selection {
  background: var(--accent-primary);
  color: white;
}

::-moz-selection {
  background: var(--accent-primary);
  color: white;
}

/* Placeholder styling */
::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

/* Number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 0.5;
}

input[type="number"]:hover::-webkit-inner-spin-button,
input[type="number"]:hover::-webkit-outer-spin-button {
  opacity: 1;
}

/* File input styling */
input[type="file"] {
  color: var(--muted);
  padding: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-right: 10px;
  transition: background var(--transition-fast);
}

input[type="file"]::file-selector-button:hover {
  background: var(--accent-primary-dark);
}

/* Responsive tables */
@media (max-width: 768px) {
  .algo-tbl,
  .algo-tbl tbody,
  .algo-tbl tr,
  .algo-tbl td {
    display: block;
  }
  
  .algo-tbl tr {
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
  }
  
  .algo-tbl td {
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .algo-tbl td::before {
    content: attr(data-label);
    font-weight: 700;
    min-width: 80px;
    color: var(--muted);
  }
  
  .cve-row {
    flex-direction: column;
    gap: 4px;
  }
  
  .cve-id {
    min-width: auto;
  }
}

/* Animation for new content */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.4s ease-out;
}

/* Card hover effects */
.hover-lift {
  transition: all var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-primary-light) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

/* Glass morphism utility */
.glass {
  background: rgba(15, 17, 23, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive font sizes */
html {
  font-size: 16px;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 12px;
  }
}