/* ============================================
   BIEN PROTOTYPE - Deep Mind Observatory
   A premium dark interface for EQ insights
   ============================================ */

/* Import Design System */
@import url('./variables.css');

/* ============================================
   CSS CUSTOM PROPERTIES - Extending tokens
   ============================================ */
:root {
  /* Glow effects */
  --glow-primary: 0 0 40px rgba(74, 63, 169, 0.4);
  --glow-accent: 0 0 30px rgba(230, 252, 64, 0.3);
  --glow-success: 0 0 20px rgba(16, 185, 129, 0.3);
  --glow-warning: 0 0 20px rgba(245, 158, 11, 0.3);

  /* Glass morphism */
  --glass-bg: rgba(17, 14, 44, 0.7);
  --glass-border: rgba(129, 121, 195, 0.2);
  --glass-blur: blur(20px);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #4A3FA9 0%, #BA2B81 50%, #72174E 100%);
  --gradient-card: linear-gradient(180deg, rgba(74, 63, 169, 0.15) 0%, rgba(74, 63, 169, 0.05) 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(230, 252, 64, 0.15) 0%, transparent 70%);

  /* Noise texture overlay */
  --noise-overlay: 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)'/%3E%3C/svg%3E");
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--foundation-typography-family-body), -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--foundation-color-brand-primary-950);
  color: var(--foundation-color-neutral-gray-100);
  line-height: var(--foundation-typography-line-height-normal);
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.visible {
  opacity: 1;
}

/* Ambient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(74, 63, 169, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(186, 43, 129, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(230, 252, 64, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle noise texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--noise-overlay);
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */
.app-container {
  display: block;
  position: relative;
  z-index: 1;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, rgba(17, 14, 44, 0.95) 0%, rgba(10, 8, 26, 0.98) 100%);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(230, 252, 64, 0.2) 50%, transparent 100%);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  padding: 0 0.5rem;
}

.logo-img {
  height: 36px;
  width: auto;
}

/* Dark mode: show inverted logo, hide regular */
.logo-dark {
  display: block;
}

.logo-light {
  display: none;
}

/* Navigation */
.nav-section {
  margin-bottom: 2rem;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--foundation-color-neutral-gray-500);
  padding: 0 0.75rem;
  margin-bottom: 0.75rem;
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  color: var(--foundation-color-neutral-gray-400);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--foundation-color-brand-accent-500);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
  box-shadow: var(--glow-accent);
}

.nav-link:hover {
  color: var(--foundation-color-neutral-gray-100);
  background: rgba(74, 63, 169, 0.15);
}

.nav-link.active {
  color: white;
  background: rgba(74, 63, 169, 0.25);
}

.nav-link.active::before {
  height: 60%;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.nav-link:hover svg,
.nav-link.active svg {
  opacity: 1;
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

/* Theme toggle in sidebar - icon visibility */
/* Show what mode you'll switch TO (not current mode) */
.nav-link .icon-moon,
.nav-link .theme-label-dark {
  display: none;
}

.nav-link .icon-sun,
.nav-link .theme-label-light {
  display: inline;
}

[data-theme="light"] .nav-link .icon-moon,
[data-theme="light"] .nav-link .theme-label-dark {
  display: inline;
}

[data-theme="light"] .nav-link .icon-sun,
[data-theme="light"] .nav-link .theme-label-light {
  display: none;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-card:hover {
  background: rgba(74, 63, 169, 0.15);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--foundation-color-brand-primary-400), var(--foundation-color-brand-secondary-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--foundation-color-neutral-gray-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-workspace {
  font-size: 0.7rem;
  color: var(--foundation-color-neutral-gray-500);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-left: 280px;
  padding: 2.5rem 3rem 2.5rem;
  max-width: 1100px;
}

.main-content > *:last-child {
  margin-bottom: 0;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.6s ease;
}

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

.page-title-section h1 {
  font-family: var(--foundation-typography-family-heading);
  font-size: 2.25rem;
  font-weight: 400;
  color: white;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--foundation-color-neutral-gray-400);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-self: flex-end;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: var(--foundation-typography-family-body);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--foundation-color-brand-primary-500);
  color: white;
  border-color: var(--foundation-color-brand-primary-400);
}

.btn-primary:hover {
  background: var(--foundation-color-brand-primary-400);
  box-shadow: var(--glow-primary);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--foundation-color-brand-accent-500);
  color: var(--foundation-color-brand-primary-900);
  border-color: var(--foundation-color-brand-accent-400);
  font-weight: 600;
}

.btn-accent:hover {
  background: var(--foundation-color-brand-accent-400);
  box-shadow: var(--glow-accent);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--foundation-color-neutral-gray-300);
  border-color: var(--glass-border);
}

.btn-ghost:hover {
  background: rgba(74, 63, 169, 0.2);
  border-color: var(--foundation-color-brand-primary-400);
  color: white;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
}

/* ============================================
   HERO SCORE CARD
   ============================================ */
.score-hero {
  background: var(--gradient-hero);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease 0.1s both;
}

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

.score-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.score-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(230, 252, 64, 0.3) 50%, transparent 100%);
}

.score-hero-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

/* Animated Score Circle */
.score-orb {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.score-orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.1);
}

.score-orb-ring::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--foundation-color-feedback-success-500);
  animation: orbRotate 8s linear infinite;
}

@keyframes orbRotate {
  to { transform: rotate(360deg); }
}

.score-orb-inner {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 0 30px rgba(255,255,255,0.1),
    0 0 60px rgba(230, 252, 64, 0.15);
}

.score-orb-value {
  font-family: var(--foundation-typography-family-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  text-shadow: 0 0 40px rgba(255,255,255,0.3);
}

.score-orb-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  animation: orbPulse 3s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Score Details */
.score-details {
  flex: 1;
}

.score-title {
  font-family: var(--foundation-typography-family-heading);
  font-size: 1.5rem;
  font-weight: 400;
  color: white;
  margin-bottom: 0.5rem;
}

.score-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.score-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.score-meta-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.score-meta-value {
  color: white;
  font-weight: 500;
}

/* ============================================
   QUADRANT GRID
   ============================================ */
.quadrant-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.quadrant-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease both;
}

.quadrant-card:nth-child(1) { animation-delay: 0.15s; }
.quadrant-card:nth-child(2) { animation-delay: 0.2s; }
.quadrant-card:nth-child(3) { animation-delay: 0.25s; }
.quadrant-card:nth-child(4) { animation-delay: 0.3s; }

.quadrant-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quadrant-card:hover {
  border-color: var(--foundation-color-brand-primary-400);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

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

.quadrant-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foundation-color-neutral-gray-400);
  margin-bottom: 0.75rem;
  position: relative;
}

.quadrant-score {
  font-family: var(--foundation-typography-family-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: white;
  line-height: 1;
  margin-bottom: 0.5rem;
  position: relative;
}

/* Score color variants */
.quadrant-score.success {
  color: var(--foundation-color-feedback-success-400);
}

.quadrant-score.warning {
  color: var(--foundation-color-feedback-warning-400);
}

.quadrant-score.error {
  color: var(--foundation-color-feedback-error-400);
}

.quadrant-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  position: relative;
}

.quadrant-trend.up {
  color: var(--foundation-color-feedback-success-700);
  background: rgba(16, 185, 129, 0.15);
}

.quadrant-trend.down {
  color: var(--foundation-color-feedback-error-400);
  background: rgba(220, 38, 38, 0.15);
}

.quadrant-trend.neutral {
  color: var(--foundation-color-neutral-gray-400);
  background: rgba(124, 121, 134, 0.15);
}

.quadrant-trend svg {
  width: 12px;
  height: 12px;
}

/* Mini trend indicator for inline use (channel rows) */
.quadrant-trend.mini {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  gap: 0.25rem;
  border-radius: 4px;
}

.quadrant-trend.mini svg {
  width: 10px;
  height: 10px;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--foundation-typography-family-heading);
  font-size: 1.25rem;
  font-weight: 400;
  color: white;
}

.section-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--foundation-color-brand-accent-500);
  text-decoration: none;
  transition: all 0.2s ease;
}

.section-link:hover {
  gap: 0.5rem;
}

.section-link svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   INSIGHTS LIST
   ============================================ */
.insights-section {
  animation: fadeInUp 0.6s ease 0.35s both;
  margin-bottom: 2.5rem;
}

.insights-list {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
}

.insights-list.stack {
  background: none;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stack .channel-row {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.stack .channel-row:last-child {
  border-bottom: 1px solid var(--glass-border);
}

.insight-item {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.insight-item:last-child {
  border-bottom: none;
}

.insight-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.2s ease;
}

.insight-item:hover {
  background: rgba(74, 63, 169, 0.15);
}

.insight-item:hover::before {
  background: var(--foundation-color-brand-primary-400);
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.insight-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.insight-icon.strength {
  background: rgba(230, 252, 64, 0.15);
  color: var(--foundation-color-brand-accent-500);
}

.insight-icon.growth {
  background: rgba(245, 158, 11, 0.15);
  color: var(--foundation-color-feedback-warning-400);
}

.insight-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(74, 63, 169, 0.3);
  color: var(--foundation-color-brand-primary-300);
}

.insight-text {
  font-size: 0.95rem;
  color: var(--foundation-color-neutral-gray-100);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.insight-meta {
  font-size: 0.75rem;
  color: var(--foundation-color-neutral-gray-500);
}

.insight-meta .channel {
  color: var(--foundation-color-neutral-gray-300);
  font-weight: 500;
}

/* ============================================
   GROUPS GRID
   ============================================ */
.groups-section {
  animation: fadeInUp 0.6s ease 0.4s both;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.group-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.group-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--foundation-color-brand-primary-500), var(--foundation-color-brand-secondary-500));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.group-card:hover {
  border-color: var(--foundation-color-brand-primary-400);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

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

.group-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--foundation-color-brand-primary-600), var(--foundation-color-brand-primary-700));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.group-icon svg {
  width: 20px;
  height: 20px;
  color: var(--foundation-color-brand-primary-200);
}

.group-name {
  font-family: var(--foundation-typography-family-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: white;
  margin-top: 0.75rem;
  margin-bottom: 0.125rem;
}

.group-meta {
  font-size: 0.8rem;
  color: var(--foundation-color-neutral-gray-500);
}

.group-score-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.group-score-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foundation-color-neutral-gray-500);
}

.group-score-value {
  font-family: var(--foundation-typography-family-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--foundation-color-brand-accent-400);
}

/* Add Group Card */
.add-card {
  border-style: dashed;
  border-color: var(--foundation-color-brand-primary-600);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--foundation-color-neutral-gray-500);
  min-height: 180px;
  background: transparent;
}

.add-card:hover {
  border-color: var(--foundation-color-brand-accent-500);
  color: var(--foundation-color-brand-accent-500);
  background: rgba(230, 252, 64, 0.03);
}

.add-card svg {
  width: 28px;
  height: 28px;
  opacity: 0.7;
}

.add-card span {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ============================================
   GROUPS LIST VIEW
   ============================================ */
.groups-list-section {
  animation: fadeInUp 0.6s ease 0.2s both;
}

.groups-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.group-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.group-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--foundation-color-brand-primary-500), var(--foundation-color-brand-secondary-500));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.group-row:hover {
  border-color: var(--foundation-color-brand-primary-400);
  transform: translateX(4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.group-row:hover::before {
  opacity: 1;
}

.group-row-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.group-row-info {
  flex: 1;
  min-width: 0;
}

.group-row-name {
  font-family: var(--foundation-typography-family-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: white;
  margin-bottom: 0.25rem;
}

.group-row-meta {
  font-size: 0.8rem;
  color: var(--foundation-color-neutral-gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trend-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.trend-chip.up {
  color: var(--foundation-color-feedback-success-700);
  background: rgba(16, 185, 129, 0.15);
}

.trend-chip.down {
  color: var(--foundation-color-feedback-error-400);
  background: rgba(220, 38, 38, 0.15);
}

.trend-chip.neutral {
  color: var(--foundation-color-neutral-gray-400);
  background: rgba(124, 121, 134, 0.15);
}

.group-row-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.group-row-score {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.group-row-score-value {
  font-family: var(--foundation-typography-family-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foundation-color-brand-accent-400);
}

.group-row-arrow {
  width: 20px;
  height: 20px;
  color: var(--foundation-color-neutral-gray-500);
  transition: all 0.3s ease;
}

.group-row:hover .group-row-arrow {
  color: var(--foundation-color-brand-accent-500);
  transform: translateX(4px);
}

/* ============================================
   CHANNELS LIST VIEW
   ============================================ */
.channels-list-section {
  animation: fadeInUp 0.6s ease 0.2s both;
}

.channels-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.channel-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.channel-row:hover {
  border-color: var(--foundation-color-brand-primary-400);
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.channel-row-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.channel-hash {
  font-family: var(--foundation-typography-family-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foundation-color-brand-primary-400);
  opacity: 0.7;
}

.channel-row-info {
  flex: 1;
  min-width: 0;
}

.channel-row-name {
  font-family: var(--foundation-typography-family-heading);
  font-size: 1rem;
  font-weight: 500;
  color: white;
  margin-bottom: 0.15rem;
}

.channel-row-meta {
  font-size: 0.75rem;
  color: var(--foundation-color-neutral-gray-500);
}

.channel-row-center {
  flex-shrink: 0;
  padding: 0 1.5rem;
}

.channel-groups {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.group-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  background: rgba(74, 63, 169, 0.2);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--foundation-color-brand-primary-300);
}

.group-chip.muted {
  background: rgba(124, 121, 134, 0.15);
  color: var(--foundation-color-neutral-gray-500);
  font-style: italic;
}

.channel-row-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.channel-row-score {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.channel-row-score-value {
  font-family: var(--foundation-typography-family-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foundation-color-brand-accent-400);
}

.channel-row-arrow {
  width: 18px;
  height: 18px;
  color: var(--foundation-color-neutral-gray-500);
  transition: all 0.3s ease;
}

.channel-row:hover .channel-row-arrow {
  color: var(--foundation-color-brand-accent-500);
  transform: translateX(4px);
}

/* ============================================
   CHANNEL AUDIT VIEW
   ============================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--foundation-color-neutral-gray-500);
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.5s ease;
}

.breadcrumb a {
  color: var(--foundation-color-neutral-gray-400);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--foundation-color-brand-accent-500);
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

.breadcrumb .current {
  color: white;
  font-weight: 500;
}

/* Audit Config Bar */
.audit-config {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.5s ease 0.1s both;
}

.period-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.period-label {
  font-size: 0.8rem;
  color: var(--foundation-color-neutral-gray-400);
}

.select {
  appearance: none;
  background-color: var(--foundation-color-brand-primary-800);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%238179C3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 10px;
  border: 1px solid var(--foundation-color-brand-primary-600);
  border-radius: 8px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-family: var(--foundation-typography-family-body);
  font-size: 0.85rem;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select:hover {
  border-color: var(--foundation-color-brand-primary-400);
}

.select:focus {
  outline: none;
  border-color: var(--foundation-color-brand-accent-500);
  box-shadow: 0 0 0 3px rgba(230, 252, 64, 0.1);
}

.audit-stats {
  flex: 1;
  display: flex;
  gap: 2rem;
  font-size: 0.85rem;
  color: var(--foundation-color-neutral-gray-400);
}

.audit-stat strong {
  color: white;
  font-weight: 600;
}

/* Channel Score Bar */
.channel-score-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.5s ease 0.15s both;
}

.channel-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.channel-score-label {
  font-size: 0.8rem;
  color: var(--foundation-color-neutral-gray-400);
}

.channel-score-value {
  font-family: var(--foundation-typography-family-display);
  font-size: 2rem;
  font-weight: 600;
  color: white;
}

.channel-score-value.success { color: var(--foundation-color-feedback-success-400); }
.channel-score-value.warning { color: var(--foundation-color-feedback-warning-400); }
.channel-score-value.error { color: var(--foundation-color-feedback-error-400); }

.score-bar {
  height: 10px;
  background: var(--foundation-color-brand-primary-800);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.score-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
}

.score-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease-out;
  position: relative;
}

.score-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
}

.score-bar-fill.excellent {
  background: linear-gradient(90deg, var(--foundation-color-feedback-success-600) 0%, var(--foundation-color-feedback-success-400) 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.score-bar-fill.good {
  background: linear-gradient(90deg, var(--foundation-color-brand-primary-600) 0%, var(--foundation-color-brand-primary-400) 100%);
  box-shadow: 0 0 20px rgba(74, 63, 169, 0.3);
}

.score-bar-fill.developing {
  background: linear-gradient(90deg, var(--foundation-color-feedback-warning-600) 0%, var(--foundation-color-feedback-warning-400) 100%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.score-bar-fill.success {
  background: linear-gradient(90deg, var(--foundation-color-feedback-success-600) 0%, var(--foundation-color-feedback-success-400) 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.score-bar-fill.warning {
  background: linear-gradient(90deg, var(--foundation-color-feedback-warning-600) 0%, var(--foundation-color-feedback-warning-400) 100%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.score-bar-fill.error {
  background: linear-gradient(90deg, var(--foundation-color-feedback-error-600) 0%, var(--foundation-color-feedback-error-400) 100%);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* Quadrant Detail Cards */
.quadrant-detail-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  animation: fadeInUp 0.5s ease both;
}

.quadrant-detail-card:nth-child(1) { animation-delay: 0.2s; }
.quadrant-detail-card:nth-child(2) { animation-delay: 0.25s; }
.quadrant-detail-card:nth-child(3) { animation-delay: 0.3s; }
.quadrant-detail-card:nth-child(4) { animation-delay: 0.35s; }

.quadrant-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 0.2s ease;
}

.quadrant-detail-header:hover {
  background: rgba(74, 63, 169, 0.1);
}

.quadrant-detail-title {
  font-family: var(--foundation-typography-family-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: white;
}

.quadrant-detail-score {
  font-family: var(--foundation-typography-family-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foundation-color-brand-accent-400);
}

.quadrant-detail-body {
  padding: 1.5rem;
}

/* Insight with Verbatim */
.insight-full {
  margin-bottom: 1.75rem;
}

.insight-full:last-child {
  margin-bottom: 0;
}

.insight-full-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.insight-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.insight-pill.strength {
  background: rgba(230, 252, 64, 0.12);
  color: var(--foundation-color-brand-accent-400);
}

.insight-pill.growth {
  background: rgba(245, 158, 11, 0.12);
  color: var(--foundation-color-feedback-warning-400);
}

.insight-pill svg {
  width: 12px;
  height: 12px;
}

.insight-competency {
  font-size: 0.8rem;
  color: var(--foundation-color-neutral-gray-400);
}

.insight-full-text {
  font-size: 0.95rem;
  color: var(--foundation-color-neutral-gray-200);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Verbatim Quote */
.verbatim {
  position: relative;
  background: var(--foundation-color-brand-secondary-900);
  border-radius: 0 12px 12px 0;
  padding: 1.25rem 1.5rem;
  margin-left: 0.25rem;
}

.verbatim::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--foundation-color-brand-accent-500) 0%, var(--foundation-color-brand-primary-500) 100%);
  border-radius: 2px;
}

.verbatim-text {
  font-family: var(--foundation-typography-family-body);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--foundation-color-neutral-gray-100);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.verbatim-text::before {
  content: '"';
  color: var(--foundation-color-brand-accent-500);
  font-size: 1.2rem;
  margin-right: 0.25rem;
}

.verbatim-text::after {
  content: '"';
  color: var(--foundation-color-brand-accent-500);
  font-size: 1.2rem;
  margin-left: 0.25rem;
}

.verbatim-meta {
  font-size: 0.75rem;
  color: var(--foundation-color-neutral-gray-500);
  text-align: right;
}

/* Historical Audits */
.historical-section {
  margin-top: 2.5rem;
  animation: fadeInUp 0.5s ease 0.4s both;
}

.historical-list {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.historical-item {
  background: var(--foundation-color-brand-primary-800);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--foundation-color-neutral-gray-300);
  cursor: pointer;
  transition: all 0.2s ease;
}

.historical-item:hover {
  border-color: var(--foundation-color-brand-accent-500);
  color: var(--foundation-color-brand-accent-400);
}

.historical-item strong {
  font-weight: 600;
  color: white;
}

/* ============================================
   GROUP VIEW
   ============================================ */
.group-hero {
  background: linear-gradient(135deg, var(--foundation-color-brand-primary-600) 0%, var(--foundation-color-brand-primary-800) 100%);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease 0.1s both;
}

.group-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.group-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.group-hero-title {
  font-family: var(--foundation-typography-family-heading);
  font-size: 1.75rem;
  font-weight: 400;
  color: white;
  margin-bottom: 0.25rem;
}

.group-hero-subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.group-hero-score {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.group-hero-score-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.group-hero-score-value {
  font-family: var(--foundation-typography-family-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  text-shadow: 0 0 40px rgba(255,255,255,0.2);
}

.channel-row {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.2s ease;
  text-decoration: none;
  color: inherit;
}

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

.channel-row:hover {
  background: rgba(74, 63, 169, 0.15);
}

.channel-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.channel-hash {
  color: var(--foundation-color-neutral-gray-500);
  font-weight: 400;
}

.channel-stat {
  width: 100px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--foundation-color-neutral-gray-400);
}

.channel-stat.score {
  font-family: var(--foundation-typography-family-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--foundation-color-brand-accent-400);
}

/* Score Badge - Filled circle with inverted text */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--foundation-typography-family-display);
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

/* Size variants */
.score-badge-lg {
  width: 40px;
  height: 40px;
  font-size: 0.95rem;
}

.score-badge-sm {
  width: 30px;
  height: 30px;
  font-size: 0.75rem;
}

/* Color variants based on score value */
.score-badge-success {
  background: var(--foundation-color-feedback-success-600);
}

.score-badge-warning {
  background: var(--foundation-color-feedback-warning-500);
  color: var(--foundation-color-neutral-gray-900);
}

.score-badge-error {
  background: var(--foundation-color-feedback-error-500);
}

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

.action-btn {
  padding: 0.4rem 0.75rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--foundation-color-neutral-gray-400);
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  color: white;
  border-color: var(--foundation-color-brand-primary-400);
  background: rgba(74, 63, 169, 0.2);
}

.action-btn.danger:hover {
  color: var(--foundation-color-feedback-error-400);
  border-color: var(--foundation-color-feedback-error-500);
  background: rgba(220, 38, 38, 0.1);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 26, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.modal {
  background: linear-gradient(180deg, var(--foundation-color-brand-primary-800) 0%, var(--foundation-color-brand-primary-900) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  height: 540px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

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

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

.modal-title {
  font-family: var(--foundation-typography-family-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: white;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--foundation-color-neutral-gray-400);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(220, 38, 38, 0.15);
  color: var(--foundation-color-feedback-error-400);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

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

/* Search Input */
.search-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--foundation-color-brand-primary-700);
  border: 1px solid var(--foundation-color-brand-primary-500);
  border-radius: 10px;
  font-family: var(--foundation-typography-family-body);
  font-size: 0.9rem;
  color: white;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: var(--foundation-color-neutral-gray-500);
}

.search-input:focus {
  outline: none;
  border-color: var(--foundation-color-brand-accent-500);
  box-shadow: 0 0 0 3px rgba(230, 252, 64, 0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--foundation-color-neutral-gray-500);
}

/* Checkbox List */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.checkbox-item:hover {
  background: rgba(74, 63, 169, 0.2);
}

.checkbox-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--foundation-color-brand-primary-400);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.checkbox-item.checked .checkbox-box {
  background: var(--foundation-color-brand-accent-500);
  border-color: var(--foundation-color-brand-accent-500);
}

.checkbox-box svg {
  width: 12px;
  height: 12px;
  color: var(--foundation-color-brand-primary-900);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}

.checkbox-item.checked .checkbox-box svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox-label {
  flex: 1;
  font-size: 0.9rem;
  color: white;
}

.checkbox-label .hash {
  color: var(--foundation-color-neutral-gray-500);
}

.checkbox-note {
  font-size: 0.75rem;
  color: var(--foundation-color-neutral-gray-500);
  font-style: italic;
}

.modal-note {
  font-size: 0.8rem;
  color: var(--foundation-color-neutral-gray-400);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .quadrant-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .groups-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .quadrant-grid {
    grid-template-columns: 1fr;
  }

  .groups-grid {
    grid-template-columns: 1fr;
  }

  .score-hero-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .audit-config {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .audit-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--foundation-color-neutral-gray-400);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: rgba(74, 63, 169, 0.2);
  border-color: var(--foundation-color-brand-primary-400);
  color: white;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Light theme toggle state */
[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] {
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glow-primary: 0 0 40px rgba(74, 63, 169, 0.15);
  --glow-accent: 0 0 30px rgba(74, 63, 169, 0.1);
}

[data-theme="light"] body {
  background: var(--foundation-color-neutral-gray-50);
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(74, 63, 169, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(186, 43, 129, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(74, 63, 169, 0.02) 0%, transparent 40%);
}

[data-theme="light"] body::after {
  opacity: 0.015;
}

/* Sidebar - Light */
[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(243, 242, 247, 0.98) 100%);
  border-right-color: var(--foundation-color-neutral-gray-200);
}

[data-theme="light"] .sidebar::before {
  background: linear-gradient(180deg, transparent 0%, rgba(74, 63, 169, 0.1) 50%, transparent 100%);
}

/* Light mode: swap logos */
[data-theme="light"] .logo-dark {
  display: none;
}

[data-theme="light"] .logo-light {
  display: block;
}

[data-theme="light"] .nav-label {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .nav-link {
  color: var(--foundation-color-neutral-gray-600);
}

[data-theme="light"] .nav-link:hover {
  color: var(--foundation-color-neutral-gray-900);
  background: rgba(74, 63, 169, 0.08);
}

[data-theme="light"] .nav-link.active {
  color: var(--foundation-color-brand-primary-700);
  background: rgba(74, 63, 169, 0.12);
}

[data-theme="light"] .sidebar-footer {
  border-top-color: var(--foundation-color-neutral-gray-200);
}

[data-theme="light"] .user-card:hover {
  background: rgba(74, 63, 169, 0.08);
}

[data-theme="light"] .user-name {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .user-workspace {
  color: var(--foundation-color-neutral-gray-500);
}

/* Page Header - Light */
[data-theme="light"] .page-title-section h1 {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .page-subtitle {
  color: var(--foundation-color-neutral-gray-500);
}

/* Buttons - Light */
[data-theme="light"] .btn-ghost {
  color: var(--foundation-color-neutral-gray-600);
  border-color: var(--foundation-color-neutral-gray-300);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(74, 63, 169, 0.08);
  border-color: var(--foundation-color-brand-primary-400);
  color: var(--foundation-color-brand-primary-700);
}

/* Group hero buttons stay dark mode style */
[data-theme="light"] .group-hero .btn-ghost {
  color: var(--foundation-color-neutral-gray-300);
  border-color: rgba(129, 121, 195, 0.2);
}

[data-theme="light"] .group-hero .btn-ghost:hover {
  background: rgba(74, 63, 169, 0.2);
  border-color: var(--foundation-color-brand-primary-400);
  color: white;
}

/* Score Hero - Light */
[data-theme="light"] .score-hero {
  background: linear-gradient(135deg, var(--foundation-color-brand-primary-500) 0%, var(--foundation-color-brand-secondary-500) 100%);
}

/* Quadrant Cards - Light */
[data-theme="light"] .quadrant-card {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .quadrant-card:hover {
  border-color: var(--foundation-color-brand-primary-300);
  box-shadow: 0 8px 24px rgba(74, 63, 169, 0.12);
}

[data-theme="light"] .quadrant-card::before {
  background: radial-gradient(ellipse at center, rgba(74, 63, 169, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .quadrant-label {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .quadrant-score {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .quadrant-score.success {
  color: var(--foundation-color-feedback-success-600);
}

[data-theme="light"] .quadrant-score.warning {
  color: var(--foundation-color-feedback-warning-600);
}

[data-theme="light"] .quadrant-score.error {
  color: var(--foundation-color-feedback-error-600);
}

/* Section Headers - Light */
[data-theme="light"] .section-title {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .section-link {
  color: var(--foundation-color-brand-primary-600);
}

/* Insights List - Light */
[data-theme="light"] .insights-list {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .insights-list.stack {
  background: none;
  box-shadow: none;
}

[data-theme="light"] .stack .channel-row {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
}

[data-theme="light"] .insight-item {
  border-bottom-color: var(--foundation-color-neutral-gray-100);
}

[data-theme="light"] .insight-item:hover {
  background: rgba(74, 63, 169, 0.04);
}

[data-theme="light"] .insight-item:hover::before {
  background: var(--foundation-color-brand-primary-500);
}

[data-theme="light"] .insight-icon.strength {
  background: rgba(16, 185, 129, 0.1);
  color: var(--foundation-color-feedback-success-600);
}

[data-theme="light"] .insight-icon.growth {
  background: rgba(245, 158, 11, 0.1);
  color: var(--foundation-color-feedback-warning-600);
}

[data-theme="light"] .insight-badge {
  background: rgba(74, 63, 169, 0.1);
  color: var(--foundation-color-brand-primary-700);
}

[data-theme="light"] .insight-text {
  color: var(--foundation-color-neutral-gray-800);
}

[data-theme="light"] .insight-meta {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .insight-meta .channel {
  color: var(--foundation-color-neutral-gray-700);
}

/* Groups Grid - Light */
[data-theme="light"] .group-card {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .group-card:hover {
  border-color: var(--foundation-color-brand-primary-300);
  box-shadow: 0 8px 24px rgba(74, 63, 169, 0.12);
}

[data-theme="light"] .group-icon {
  background: linear-gradient(135deg, var(--foundation-color-brand-primary-100), var(--foundation-color-brand-primary-200));
}

[data-theme="light"] .group-icon svg {
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .group-name {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .group-meta {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .group-score-label {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .group-score-value {
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .add-card {
  border-color: var(--foundation-color-neutral-gray-300);
  color: var(--foundation-color-neutral-gray-400);
}

[data-theme="light"] .add-card:hover {
  border-color: var(--foundation-color-brand-primary-400);
  color: var(--foundation-color-brand-primary-600);
  background: rgba(74, 63, 169, 0.04);
}

/* Groups List - Light */
[data-theme="light"] .group-row {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .group-row:hover {
  border-color: var(--foundation-color-brand-primary-300);
  box-shadow: 0 8px 24px rgba(74, 63, 169, 0.12);
}

[data-theme="light"] .group-row-name {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .group-row-meta {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .trend-chip.up {
  background: rgba(16, 185, 129, 0.12);
}

[data-theme="light"] .trend-chip.down {
  background: rgba(220, 38, 38, 0.12);
}

[data-theme="light"] .trend-chip.neutral {
  background: rgba(124, 121, 134, 0.12);
}

[data-theme="light"] .group-row-score-value {
  color: var(--foundation-color-brand-primary-600);
}

/* Channels List - Light */
[data-theme="light"] .channel-row {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .channel-row:hover {
  border-color: var(--foundation-color-brand-primary-300);
  box-shadow: 0 6px 20px rgba(74, 63, 169, 0.1);
}

[data-theme="light"] .channel-hash {
  color: var(--foundation-color-brand-primary-500);
}

[data-theme="light"] .channel-row-name {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .channel-row-meta {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .group-chip {
  background: rgba(74, 63, 169, 0.1);
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .group-chip.muted {
  background: rgba(124, 121, 134, 0.1);
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .channel-row-score-value {
  color: var(--foundation-color-brand-primary-600);
}

/* Breadcrumb - Light */
[data-theme="light"] .breadcrumb {
  color: var(--foundation-color-neutral-gray-400);
}

[data-theme="light"] .breadcrumb a {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .breadcrumb a:hover {
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .breadcrumb .current {
  color: var(--foundation-color-neutral-gray-900);
}

/* Audit Config - Light */
[data-theme="light"] .audit-config {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .period-label {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .select {
  background-color: var(--foundation-color-neutral-gray-50);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%234A3FA9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-color: var(--foundation-color-neutral-gray-300);
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .select:hover {
  border-color: var(--foundation-color-brand-primary-400);
}

[data-theme="light"] .audit-stats {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .audit-stat strong {
  color: var(--foundation-color-neutral-gray-900);
}

/* Channel Score Card - Light */
[data-theme="light"] .channel-score-card {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .channel-score-label {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .channel-score-value {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .channel-score-value.success { color: var(--foundation-color-feedback-success-600); }
[data-theme="light"] .channel-score-value.warning { color: var(--foundation-color-feedback-warning-600); }
[data-theme="light"] .channel-score-value.error { color: var(--foundation-color-feedback-error-600); }

[data-theme="light"] .score-bar {
  background: var(--foundation-color-neutral-gray-100);
}

/* Quadrant Detail Cards - Light */
[data-theme="light"] .quadrant-detail-card {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .quadrant-detail-header {
  border-bottom-color: var(--foundation-color-neutral-gray-100);
}

[data-theme="light"] .quadrant-detail-header:hover {
  background: rgba(74, 63, 169, 0.04);
}

[data-theme="light"] .quadrant-detail-title {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .quadrant-detail-score {
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .insight-pill.strength {
  background: rgba(16, 185, 129, 0.1);
  color: var(--foundation-color-feedback-success-700);
}

[data-theme="light"] .insight-pill.growth {
  background: rgba(245, 158, 11, 0.1);
  color: var(--foundation-color-feedback-warning-700);
}

[data-theme="light"] .insight-competency {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .insight-full-text {
  color: var(--foundation-color-neutral-gray-700);
}

/* Verbatim - Light */
[data-theme="light"] .verbatim {
  background: var(--foundation-color-brand-secondary-50);
}

[data-theme="light"] .verbatim::before {
  background: linear-gradient(180deg, var(--foundation-color-brand-primary-500) 0%, var(--foundation-color-brand-secondary-500) 100%);
}

[data-theme="light"] .verbatim-text {
  color: var(--foundation-color-neutral-gray-800);
}

[data-theme="light"] .verbatim-text::before,
[data-theme="light"] .verbatim-text::after {
  color: var(--foundation-color-brand-primary-500);
}

[data-theme="light"] .verbatim-meta {
  color: var(--foundation-color-neutral-gray-500);
}

/* Historical Section - Light */
[data-theme="light"] .historical-item {
  background: var(--foundation-color-neutral-gray-50);
  border-color: var(--foundation-color-neutral-gray-200);
  color: var(--foundation-color-neutral-gray-600);
}

[data-theme="light"] .historical-item:hover {
  border-color: var(--foundation-color-brand-primary-400);
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .historical-item strong {
  color: var(--foundation-color-neutral-gray-900);
}

/* Group Hero - Light */
[data-theme="light"] .group-hero {
  background: linear-gradient(135deg, var(--foundation-color-brand-primary-500) 0%, var(--foundation-color-brand-primary-600) 100%);
}

/* Channels Table - Light */
[data-theme="light"] .channel-row {
  border-bottom-color: var(--foundation-color-neutral-gray-100);
}

[data-theme="light"] .channel-row:hover {
  background: rgba(74, 63, 169, 0.04);
}

[data-theme="light"] .channel-name {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .channel-hash {
  color: var(--foundation-color-neutral-gray-400);
}

[data-theme="light"] .channel-stat {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .channel-stat.score {
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .action-btn {
  color: var(--foundation-color-neutral-gray-500);
  border-color: var(--foundation-color-neutral-gray-300);
}

[data-theme="light"] .action-btn:hover {
  color: var(--foundation-color-brand-primary-700);
  border-color: var(--foundation-color-brand-primary-400);
  background: rgba(74, 63, 169, 0.08);
}

[data-theme="light"] .action-btn.danger:hover {
  color: var(--foundation-color-feedback-error-600);
  border-color: var(--foundation-color-feedback-error-400);
  background: rgba(220, 38, 38, 0.08);
}

/* Modal - Light */
[data-theme="light"] .modal-overlay {
  background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .modal {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .modal-header {
  border-bottom-color: var(--foundation-color-neutral-gray-100);
}

[data-theme="light"] .modal-title {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .modal-close {
  color: var(--foundation-color-neutral-gray-400);
}

[data-theme="light"] .modal-close:hover {
  background: rgba(220, 38, 38, 0.08);
  color: var(--foundation-color-feedback-error-600);
}

[data-theme="light"] .modal-footer {
  border-top-color: var(--foundation-color-neutral-gray-100);
}

[data-theme="light"] .search-input {
  background: var(--foundation-color-neutral-gray-50);
  border-color: var(--foundation-color-neutral-gray-300);
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .search-input::placeholder {
  color: var(--foundation-color-neutral-gray-400);
}

[data-theme="light"] .search-input:focus {
  border-color: var(--foundation-color-brand-primary-500);
  box-shadow: 0 0 0 3px rgba(74, 63, 169, 0.1);
}

[data-theme="light"] .search-icon {
  color: var(--foundation-color-neutral-gray-400);
}

[data-theme="light"] .checkbox-item:hover {
  background: rgba(74, 63, 169, 0.06);
}

[data-theme="light"] .checkbox-box {
  border-color: var(--foundation-color-neutral-gray-300);
}

[data-theme="light"] .checkbox-item.checked .checkbox-box {
  background: var(--foundation-color-brand-primary-500);
  border-color: var(--foundation-color-brand-primary-500);
}

[data-theme="light"] .checkbox-box svg {
  color: white;
}

[data-theme="light"] .checkbox-label {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .checkbox-label .hash {
  color: var(--foundation-color-neutral-gray-400);
}

[data-theme="light"] .checkbox-note {
  color: var(--foundation-color-neutral-gray-400);
}

[data-theme="light"] .modal-note {
  color: var(--foundation-color-neutral-gray-500);
  border-top-color: var(--foundation-color-neutral-gray-100);
}

/* ============================================
   QUADRANT DETAIL PAGE
   ============================================ */

/* Quadrant Hero */
.quadrant-hero {
  background: linear-gradient(135deg, var(--foundation-color-brand-secondary-600) 0%, var(--foundation-color-brand-secondary-700) 50%, var(--foundation-color-brand-secondary-800) 100%);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease 0.1s both;
}

/* Group-context quadrant hero uses purple gradient (matching group hero) */
.quadrant-hero.group-context {
  background: linear-gradient(135deg, var(--foundation-color-brand-primary-600) 0%, var(--foundation-color-brand-primary-700) 50%, var(--foundation-color-brand-primary-800) 100%);
}

.quadrant-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}


.quadrant-hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.quadrant-hero-left {
  flex: 1;
}

/* Group context label above quadrant title */
.group-quadrant-context {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.group-quadrant-context svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.group-quadrant-group-name {
  color: var(--foundation-color-brand-accent-400);
}

.quadrant-hero-title {
  font-family: var(--foundation-typography-family-heading);
  font-size: 2rem;
  font-weight: 400;
  color: white;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.quadrant-hero-summary {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 500px;
}

.quadrant-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
}

.quadrant-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.quadrant-hero-meta-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.quadrant-hero-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.quadrant-hero-trend.up {
  background: rgba(16, 185, 129, 0.2);
  color: var(--foundation-color-feedback-success-300);
}

.quadrant-hero-trend.down {
  background: rgba(220, 38, 38, 0.2);
  color: var(--foundation-color-feedback-error-300);
}

.quadrant-hero-trend.neutral {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255,255,255,0.7);
}

.quadrant-hero-trend svg {
  width: 14px;
  height: 14px;
}

/* Score Orb (static version with SVG ring) */
.quadrant-score-orb {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.quadrant-score-orb-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.quadrant-score-orb-inner {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 0 30px rgba(255,255,255,0.1),
    0 0 60px rgba(230, 252, 64, 0.15);
}

.quadrant-score-orb-value {
  font-family: var(--foundation-typography-family-display);
  font-size: 3rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  text-shadow: 0 0 40px rgba(255,255,255,0.3);
}

/* Competency Section */
.competency-section {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.competency-bars {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.competency-bar-item {
  cursor: help;
}

.competency-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.competency-bar-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--foundation-color-neutral-gray-200);
}

.competency-bar-score {
  font-family: var(--foundation-typography-family-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--foundation-color-brand-accent-400);
}

.competency-bar-score.success { color: var(--foundation-color-feedback-success-400); }
.competency-bar-score.warning { color: var(--foundation-color-feedback-warning-400); }
.competency-bar-score.error { color: var(--foundation-color-feedback-error-400); }

.competency-bar-track {
  height: 8px;
  background: var(--foundation-color-brand-primary-800);
  border-radius: 4px;
  overflow: hidden;
}

.competency-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--foundation-color-brand-secondary-600), var(--foundation-color-brand-secondary-400));
  border-radius: 4px;
  transition: width 1s ease-out;
}

/* Group-context competency bars use purple */
.competency-section.group-context .competency-bar-fill {
  background: linear-gradient(90deg, var(--foundation-color-brand-primary-600), var(--foundation-color-brand-primary-400));
}

/* Score-based competency bar colors - higher specificity to override group-context */
.competency-section .competency-bar-fill.success,
.competency-bar-fill.success {
  background: linear-gradient(90deg, var(--foundation-color-feedback-success-600), var(--foundation-color-feedback-success-400));
}

.competency-section .competency-bar-fill.warning,
.competency-bar-fill.warning {
  background: linear-gradient(90deg, var(--foundation-color-feedback-warning-600), var(--foundation-color-feedback-warning-400));
}

.competency-section .competency-bar-fill.error,
.competency-bar-fill.error {
  background: linear-gradient(90deg, var(--foundation-color-feedback-error-600), var(--foundation-color-feedback-error-400));
}

/* Performance Grid */
.performance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.performance-section {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  animation: fadeInUp 0.6s ease 0.25s both;
}

.performance-section .section-header {
  margin-bottom: 1rem;
}

.select-sm {
  padding: 0.35rem 1.5rem 0.35rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 6px;
  background-position: right 0.5rem center;
}

.select-wide {
  min-width: 140px;
}

.performance-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.performance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: rgba(74, 63, 169, 0.1);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.performance-item:hover {
  background: rgba(74, 63, 169, 0.2);
  border-color: var(--foundation-color-brand-primary-500);
  transform: translateX(4px);
}

.performance-item-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.performance-item-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
}

.performance-item-type {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  background: rgba(74, 63, 169, 0.3);
  border-radius: 4px;
  color: var(--foundation-color-brand-primary-300);
}

.performance-item-msgs {
  font-size: 0.75rem;
  color: var(--foundation-color-neutral-gray-500);
}

.performance-item-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.performance-bar-mini {
  width: 80px;
  height: 6px;
  background: var(--foundation-color-brand-primary-800);
  border-radius: 3px;
  overflow: hidden;
}

.performance-bar-mini-fill {
  height: 100%;
  background: var(--foundation-color-brand-primary-400);
  border-radius: 3px;
  transition: width 0.6s ease-out;
}

.performance-bar-mini-fill.strong,
.performance-bar-mini-fill.success {
  background: linear-gradient(90deg, var(--foundation-color-feedback-success-500), var(--foundation-color-feedback-success-400));
}

.performance-bar-mini-fill.focus,
.performance-bar-mini-fill.warning {
  background: linear-gradient(90deg, var(--foundation-color-feedback-warning-500), var(--foundation-color-feedback-warning-400));
}

.performance-bar-mini-fill.error {
  background: linear-gradient(90deg, var(--foundation-color-feedback-error-500), var(--foundation-color-feedback-error-400));
}

.performance-item-score {
  font-family: var(--foundation-typography-family-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--foundation-color-brand-accent-400);
  min-width: 28px;
  text-align: right;
}

.performance-item-score.focus,
.performance-item-score.warning {
  color: var(--foundation-color-feedback-warning-400);
}

.performance-item-score.success {
  color: var(--foundation-color-feedback-success-400);
}

.performance-item-score.error {
  color: var(--foundation-color-feedback-error-400);
}

/* Examples Section */
.examples-section {
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.examples-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.example-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
}

.example-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.example-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.example-badge.strength {
  background: rgba(230, 252, 64, 0.12);
  color: var(--foundation-color-brand-accent-400);
}

.example-badge.growth {
  background: rgba(245, 158, 11, 0.12);
  color: var(--foundation-color-feedback-warning-400);
}

.example-badge svg {
  width: 12px;
  height: 12px;
}

.example-competency {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--foundation-color-neutral-gray-300);
}

.example-channel {
  font-size: 0.75rem;
  color: var(--foundation-color-neutral-gray-500);
  margin-left: auto;
}

.example-insight {
  font-size: 0.95rem;
  color: var(--foundation-color-neutral-gray-200);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Development Focus */
.development-focus {
  background: linear-gradient(135deg, var(--foundation-color-brand-primary-700) 0%, var(--foundation-color-brand-primary-800) 100%);
  border: 1px solid var(--foundation-color-brand-primary-500);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  animation: fadeInUp 0.6s ease 0.35s both;
}

.development-focus-icon {
  width: 48px;
  height: 48px;
  background: rgba(230, 252, 64, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.development-focus-icon svg {
  width: 24px;
  height: 24px;
  color: var(--foundation-color-brand-accent-400);
}

.development-focus-content {
  flex: 1;
}

.development-focus-title {
  font-family: var(--foundation-typography-family-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: white;
  margin-bottom: 0.5rem;
}

.development-focus-target {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--foundation-color-brand-accent-400);
  margin-bottom: 0.75rem;
}

.development-focus-text {
  font-size: 0.9rem;
  color: var(--foundation-color-neutral-gray-300);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.development-focus-suggestion {
  font-size: 0.9rem;
  color: var(--foundation-color-neutral-gray-200);
  line-height: 1.6;
}

.development-focus-suggestion strong {
  color: white;
}

/* ============================================
   QUADRANT PAGE - LIGHT THEME
   ============================================ */

/* Quadrant Hero - Light */
[data-theme="light"] .quadrant-hero {
  background: linear-gradient(135deg, var(--foundation-color-brand-secondary-500) 0%, var(--foundation-color-brand-secondary-600) 50%, var(--foundation-color-brand-secondary-700) 100%);
}

[data-theme="light"] .quadrant-hero.group-context {
  background: linear-gradient(135deg, var(--foundation-color-brand-primary-500) 0%, var(--foundation-color-brand-primary-600) 50%, var(--foundation-color-brand-primary-700) 100%);
}

/* Competency Section - Light */
[data-theme="light"] .competency-section {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .competency-bar-name {
  color: var(--foundation-color-neutral-gray-700);
}

[data-theme="light"] .competency-bar-score {
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .competency-bar-score.success { color: var(--foundation-color-feedback-success-600); }
[data-theme="light"] .competency-bar-score.warning { color: var(--foundation-color-feedback-warning-600); }
[data-theme="light"] .competency-bar-score.error { color: var(--foundation-color-feedback-error-600); }

[data-theme="light"] .competency-bar-track {
  background: var(--foundation-color-neutral-gray-100);
}

[data-theme="light"] .competency-bar-fill {
  background: linear-gradient(90deg, var(--foundation-color-brand-secondary-500), var(--foundation-color-brand-secondary-400));
}

[data-theme="light"] .competency-section.group-context .competency-bar-fill {
  background: linear-gradient(90deg, var(--foundation-color-brand-primary-500), var(--foundation-color-brand-primary-400));
}

[data-theme="light"] .competency-section .competency-bar-fill.success,
[data-theme="light"] .competency-bar-fill.success {
  background: linear-gradient(90deg, var(--foundation-color-feedback-success-500), var(--foundation-color-feedback-success-400));
}

[data-theme="light"] .competency-section .competency-bar-fill.warning,
[data-theme="light"] .competency-bar-fill.warning {
  background: linear-gradient(90deg, var(--foundation-color-feedback-warning-500), var(--foundation-color-feedback-warning-400));
}

[data-theme="light"] .competency-section .competency-bar-fill.error,
[data-theme="light"] .competency-bar-fill.error {
  background: linear-gradient(90deg, var(--foundation-color-feedback-error-500), var(--foundation-color-feedback-error-400));
}

/* Performance Section - Light */
[data-theme="light"] .performance-section {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .performance-item {
  background: rgba(74, 63, 169, 0.04);
}

[data-theme="light"] .performance-item:hover {
  background: rgba(74, 63, 169, 0.08);
  border-color: var(--foundation-color-brand-primary-300);
}

[data-theme="light"] .performance-item-name {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .performance-item-type {
  background: rgba(74, 63, 169, 0.1);
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .performance-item-msgs {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .performance-bar-mini {
  background: var(--foundation-color-neutral-gray-100);
}

[data-theme="light"] .performance-item-score {
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .performance-item-score.focus,
[data-theme="light"] .performance-item-score.warning {
  color: var(--foundation-color-feedback-warning-600);
}

[data-theme="light"] .performance-item-score.success {
  color: var(--foundation-color-feedback-success-600);
}

[data-theme="light"] .performance-item-score.error {
  color: var(--foundation-color-feedback-error-600);
}

/* Example Cards - Light */
[data-theme="light"] .example-card {
  background: white;
  border-color: var(--foundation-color-neutral-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .example-badge.strength {
  background: rgba(16, 185, 129, 0.1);
  color: var(--foundation-color-feedback-success-700);
}

[data-theme="light"] .example-badge.growth {
  background: rgba(245, 158, 11, 0.1);
  color: var(--foundation-color-feedback-warning-700);
}

[data-theme="light"] .example-competency {
  color: var(--foundation-color-neutral-gray-600);
}

[data-theme="light"] .example-channel {
  color: var(--foundation-color-neutral-gray-500);
}

[data-theme="light"] .example-insight {
  color: var(--foundation-color-neutral-gray-700);
}

/* Development Focus - Light */
[data-theme="light"] .development-focus {
  background: linear-gradient(135deg, var(--foundation-color-brand-primary-50) 0%, var(--foundation-color-brand-primary-100) 100%);
  border-color: var(--foundation-color-brand-primary-200);
}

[data-theme="light"] .development-focus-icon {
  background: rgba(74, 63, 169, 0.1);
}

[data-theme="light"] .development-focus-icon svg {
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .development-focus-title {
  color: var(--foundation-color-neutral-gray-900);
}

[data-theme="light"] .development-focus-target {
  color: var(--foundation-color-brand-primary-600);
}

[data-theme="light"] .development-focus-text {
  color: var(--foundation-color-neutral-gray-600);
}

[data-theme="light"] .development-focus-suggestion {
  color: var(--foundation-color-neutral-gray-700);
}

[data-theme="light"] .development-focus-suggestion strong {
  color: var(--foundation-color-neutral-gray-900);
}

/* Responsive - Quadrant Page */
@media (max-width: 900px) {
  .quadrant-hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .quadrant-hero-summary {
    max-width: none;
  }

  .quadrant-hero-meta {
    justify-content: center;
  }

  .performance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .performance-bar-mini {
    display: none;
  }

  .example-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .example-channel {
    margin-left: 0;
  }

  .development-focus {
    flex-direction: column;
    text-align: center;
  }

  .development-focus-icon {
    align-self: center;
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
