/* ============================================================
   CodeAtlas Design System — Engineering Intelligence Dark
   ============================================================ */

/* ——— CSS Custom Properties ——— */
:root,
:root[data-theme="dark"] {
  /* Backgrounds */
  --bg-deep: oklch(14% 0.012 260);
  --bg: oklch(18% 0.015 260);
  --bg-elevated: oklch(22% 0.018 260);
  --bg-hover: oklch(26% 0.02 260);
  --bg-active: oklch(30% 0.022 260);

  /* Foreground */
  --fg: oklch(94% 0.003 260);
  --fg-muted: oklch(62% 0.01 260);
  --fg-subtle: oklch(42% 0.008 260);

  /* Borders */
  --border: oklch(28% 0.012 260);
  --border-strong: oklch(36% 0.015 260);

  /* Accents — restrained, product-grade */
  --accent-blue: oklch(60% 0.16 245);
  --accent-violet: oklch(55% 0.18 300);
  --accent-cyan: oklch(68% 0.12 200);

  /* Semantic */
  --success: oklch(65% 0.14 145);
  --warning: oklch(72% 0.14 85);
  --danger: oklch(58% 0.18 25);
  --info: oklch(62% 0.14 220);

  /* Glass — reduced */
  --glass-bg: rgba(22, 24, 40, 0.7);
  --glass-border: rgba(100, 120, 200, 0.08);
  --glass-blur: 10px;

  /* Gradients — only on hover/active */
  --gradient-primary: linear-gradient(135deg, var(--accent-blue), var(--accent-violet));
  --gradient-hero: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(100, 140, 255, 0.06), transparent);
  --gradient-glow: radial-gradient(circle at center, rgba(100, 140, 255, 0.03), transparent 70%);

  /* Glows — extremely subtle */
  --glow-blue: 0 0 4px rgba(100, 140, 255, 0.06);
  --glow-violet: 0 0 4px rgba(140, 80, 255, 0.06);
  --glow-cyan: 0 0 3px rgba(80, 200, 255, 0.05);
  --glow-success: 0 0 3px rgba(80, 200, 120, 0.05);
  --glow-warning: 0 0 3px rgba(255, 180, 50, 0.05);
  --glow-danger: 0 0 3px rgba(255, 70, 70, 0.05);

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, Menlo, monospace;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ——— Light Theme ——— */
:root[data-theme="light"] {
  --bg-deep: oklch(96% 0.003 260);
  --bg: oklch(100% 0 0);
  --bg-elevated: oklch(98% 0.002 260);
  --bg-hover: oklch(95% 0.003 260);
  --bg-active: oklch(92% 0.005 260);

  --fg: oklch(18% 0.01 260);
  --fg-muted: oklch(45% 0.01 260);
  --fg-subtle: oklch(62% 0.008 260);

  --border: oklch(88% 0.005 260);
  --border-strong: oklch(78% 0.008 260);

  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(100, 120, 200, 0.12);

  --gradient-hero: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(100, 140, 255, 0.08), transparent);
  --gradient-glow: radial-gradient(circle at center, rgba(100, 140, 255, 0.04), transparent 70%);

  --glow-blue: 0 0 4px rgba(100, 140, 255, 0.1);
  --glow-violet: 0 0 4px rgba(140, 80, 255, 0.1);
  --glow-cyan: 0 0 3px rgba(80, 200, 255, 0.08);
  --glow-success: 0 0 3px rgba(80, 200, 120, 0.08);
  --glow-warning: 0 0 3px rgba(255, 180, 50, 0.08);
  --glow-danger: 0 0 3px rgba(255, 70, 70, 0.08);
}

/* ——— Transitions & Layout ——— */
:root {
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-cinematic: 600ms;

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 64px;
  --topbar-height: 56px;
  --max-content: 1280px;
  --max-wide: 1440px;
}

/* ——— Reset & Base ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg-deep);
  overflow-x: hidden;
}

/* Noise texture overlay — reduced */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ——— Typography ——— */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: clamp(18px, 2vw, 22px); }
h4 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
h5 { font-size: 16px; font-weight: 500; }
h6 { font-size: 14px; font-weight: 500; }

p { color: var(--fg-muted); line-height: 1.7; }

.mono { font-family: var(--font-mono); font-size: 14px; }
.metric { font-family: var(--font-mono); font-size: 28px; font-weight: 600; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.caption { font-size: 13px; color: var(--fg-subtle); letter-spacing: 0.01em; }
.label { font-size: 13px; font-weight: 500; color: var(--fg-muted); text-transform: none; letter-spacing: 0.01em; }

/* ——— Layout Utilities ——— */
.container { max-width: var(--max-content); margin: 0 auto; padding: 0 var(--space-6); }
.container-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 var(--space-6); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.text-center { text-align: center; }
.relative { position: relative; }

/* ——— Glass Card ——— */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: all var(--duration-fast) var(--ease-out);
}

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

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--bg-elevated);
  color: var(--fg);
  border: 1px solid var(--border-strong);
}

.btn-primary:hover {
  background: rgba(100, 140, 255, 0.08);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
}

.btn-ghost:hover {
  color: var(--fg);
  background: var(--bg-elevated);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
}

/* ——— Badges & Pills ——— */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-active);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.badge-success { background: rgba(80, 200, 120, 0.1); color: var(--success); border-color: rgba(80, 200, 120, 0.2); }
.badge-warning { background: rgba(255, 180, 50, 0.1); color: var(--warning); border-color: rgba(255, 180, 50, 0.2); }
.badge-danger { background: rgba(255, 70, 70, 0.1); color: var(--danger); border-color: rgba(255, 70, 70, 0.2); }
.badge-info { background: rgba(100, 140, 255, 0.1); color: var(--info); border-color: rgba(100, 140, 255, 0.2); }

/* ——— Inputs ——— */
.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(100, 140, 255, 0.15);
}

.input::placeholder { color: var(--fg-subtle); }

/* ——— Tabs ——— */
.tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.tab {
  padding: var(--space-2) var(--space-4);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.tab:hover { color: var(--fg); }
.tab.active { background: var(--bg-elevated); color: var(--fg); }

/* ——— Toggle ——— */
.toggle {
  width: 44px;
  height: 24px;
  background: var(--bg-active);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--fg-muted);
  border-radius: 50%;
  transition: all var(--duration-fast) var(--ease-out);
}

.toggle.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.toggle.active::after {
  transform: translateX(20px);
  background: white;
}

/* ——— Tooltip ——— */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: var(--space-2) var(--space-3);
  font-size: 12px;
  color: var(--fg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

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

/* ——— Code Block ——— */
.code-block {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-muted);
  overflow-x: auto;
}

.code-block .keyword { color: var(--accent-violet); }
.code-block .string { color: var(--success); }
.code-block .comment { color: var(--fg-subtle); }
.code-block .function { color: var(--accent-blue); }

/* ——— Scrollbar ——— */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ——— Animations ——— */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

@keyframes glow {
  0%, 100% { box-shadow: 0 0 3px rgba(100, 140, 255, 0.04); }
  50% { box-shadow: 0 0 6px rgba(100, 140, 255, 0.06); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

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

.animate-fadeIn { animation: fadeIn var(--duration-slow) var(--ease-out) both; }
.animate-fadeInUp { animation: fadeInUp var(--duration-slow) var(--ease-out) both; }
.animate-scaleIn { animation: scaleIn var(--duration-slow) var(--ease-out) both; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-glow { animation: glow 3s ease-in-out infinite; }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

.delay-1 { animation-delay: 100ms; }
.delay-2 { animation-delay: 200ms; }
.delay-3 { animation-delay: 300ms; }
.delay-4 { animation-delay: 400ms; }
.delay-5 { animation-delay: 500ms; }

/* ——— Gradient Text ——— */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: saturate(0.85);
}

/* ——— Section Spacing ——— */
.section { padding: var(--space-16) 0; }
.section-sm { padding: var(--space-10) 0; }

/* ——— Divider ——— */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-8) 0;
}

/* ——— Responsive ——— */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  .section { padding: var(--space-12) 0; }
}

/* ——— Graph Node Styles ——— */
.graph-node {
  position: absolute;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  user-select: none;
}

.graph-node:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 4px rgba(100, 140, 255, 0.1);
  transform: translateY(-1px);
  z-index: 10;
}

.graph-node.critical {
  border-color: var(--danger);
  box-shadow: var(--glow-danger);
}

.graph-node.warning {
  border-color: var(--warning);
}

.graph-node.healthy {
  border-color: var(--success);
}

/* ——— Chart Styles ——— */
.chart-bar {
  transition: all var(--duration-normal) var(--ease-out);
}

.chart-bar:hover {
  filter: brightness(1.2);
}

/* ——— Insight Card ——— */
.insight-card, .ai-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
}

.insight-card::before, .ai-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  opacity: 1;
}

/* ——— Progress Bar ——— */
.progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-out);
}

.progress-bar-fill.success { background: var(--success); }
.progress-bar-fill.warning { background: var(--warning); }
.progress-bar-fill.danger { background: var(--danger); }
.progress-bar-fill.info { background: var(--info); }
.progress-bar-fill.gradient { background: var(--gradient-primary); }

/* ——— Sidebar ——— */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: var(--space-6) 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 0 var(--space-6);
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar-logo svg {
  width: 28px;
  height: 28px;
}

.sidebar-logo span {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 0 var(--space-3);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: 14px;
  color: var(--fg-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
  margin-bottom: var(--space-1);
}

.sidebar-item:hover {
  color: var(--fg);
  background: var(--bg-elevated);
}

.sidebar-item.active {
  color: var(--fg);
  background: var(--bg-active);
}

.sidebar-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-section-label {
  padding: var(--space-4) var(--space-4) var(--space-2);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-subtle);
}

/* ——— Topbar ——— */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: rgba(20, 22, 38, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  z-index: 99;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.repo-switcher-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--fg-muted);
}

/* ——— Main Content Area ——— */
.main-content {
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-height: 100vh;
}

.main-content-inner {
  padding: var(--space-6);
}

/* ——— Command Palette ——— */
.command-palette {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  max-height: 400px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  overflow: hidden;
  display: none;
}

.command-palette.open { display: block; animation: scaleIn var(--duration-normal) var(--ease-out); }

.command-palette-input {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  font-size: 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  outline: none;
}

.command-palette-results {
  max-height: 320px;
  overflow-y: auto;
  padding: var(--space-2);
}

.command-palette-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: 14px;
  color: var(--fg-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.command-palette-item:hover,
.command-palette-item.selected {
  background: var(--bg-active);
  color: var(--fg);
}

.command-palette-item kbd {
  margin-left: auto;
  padding: var(--space-1) var(--space-2);
  font-size: 11px;
  font-family: var(--font-mono);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg-subtle);
}

/* ——— Modal ——— */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 90%;
  max-width: 560px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--duration-normal) var(--ease-out);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

/* ——— Confidence Warning ——— */
.confidence-warning {
  background: rgba(255, 180, 50, 0.08);
  border: 1px solid rgba(255, 180, 50, 0.18);
  color: var(--warning);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: 13px;
}

/* ——— Engineering Note ——— */
.engineering-note {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: 14px;
  line-height: 1.6;
}

/* ——— Repo Switcher Dropdown ——— */
.repo-switcher {
  cursor: pointer;
}

.repo-dropdown {
  display: none;
  position: fixed;
  z-index: 2000;
  width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.repo-dropdown-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.repo-dropdown-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-subtle);
}

.repo-dropdown-list {
  max-height: 280px;
  overflow-y: auto;
}

.repo-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}

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

.repo-dropdown-item.active {
  background: rgba(100, 140, 255, 0.08);
}

.repo-dropdown-item-info {
  flex: 1;
  min-width: 0;
}

.repo-dropdown-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-dropdown-item-meta {
  font-size: 11px;
  color: var(--fg-subtle);
  margin-top: 2px;
}

.repo-dropdown-item-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(100, 140, 255, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.repo-dropdown-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  color: var(--fg-subtle);
  font-size: 13px;
}

.repo-dropdown-empty svg {
  opacity: 0.3;
}

.repo-dropdown-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-2);
}

.repo-dropdown-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.repo-dropdown-add:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(100, 140, 255, 0.05);
}
